Skip to content

Latest commit

 

History

History
794 lines (699 loc) · 16.2 KB

test-result-of-the-enhanced-network-features.md

File metadata and controls

794 lines (699 loc) · 16.2 KB

Test result of the enhanced network features in Tumblebug

This document shares the test result of the enhanced network features.

APIs image

The test results for each API are as follows. In all test nsId = default is used. : nsId = default

AWS test

Environment

  • Tumblebug v0.9.15+@
  • Spider 0.9.6
  • AWS, ap-northeast-2

Create vNet

: API = POST /ns/{nsId}/resources/vNet

: request body

{
  "cidrBlock": "10.0.0.0/16",
  "connectionName": "aws-ap-northeast-2",
  "description": "vnet00 managed by CB-Tumblebug",
  "name": "vnet00",
  "subnetInfoList": [
    {
      "description": "subnet00 managed by CB-Tumblebug",
      "ipv4_CIDR": "10.0.1.0/24",
      "name": "subnet00"
    }
  ]
}

: response body

{
  "resourceType": "vNet",
  "id": "vnet00",
  "uid": "crvrf63aek6blb511vdg",
  "cspResourceName": "crvrf63aek6blb511vdg",
  "cspResourceId": "vpc-0bccc226cc5638974",
  "name": "vnet00",
  "connectionName": "aws-ap-northeast-2",
  "cidrBlock": "10.0.0.0/16",
  "subnetInfoList": [
    {
      "resourceType": "subnet",
      "id": "subnet00",
      "uid": "crvrf63aek6blb511ve0",
      "cspResourceName": "crvrf63aek6blb511ve0",
      "name": "subnet00",
      "connectionName": "aws-ap-northeast-2",
      "cspVNetName": "crvrf63aek6blb511vdg",
      "status": "Available",
      "ipv4_CIDR": "10.0.1.0/24",
      "zone": "ap-northeast-2a",
      "keyValueList": [
        {
          "key": "VpcId",
          "value": "vpc-0bccc226cc5638974"
        },
        {
          "key": "MapPublicIpOnLaunch",
          "value": "false"
        },
        {
          "key": "AvailableIpAddressCount",
          "value": "251"
        },
        {
          "key": "AvailabilityZone",
          "value": "ap-northeast-2a"
        },
        {
          "key": "Status",
          "value": "available"
        }
      ],
      "description": ""
    }
  ],
  "description": "vnet00 managed by CB-Tumblebug",
  "status": "InUse",
  "associatedObjectList": null,
  "isAutoGenerated": false,
  "systemLabel": ""
}

Add subnet

: API = POST /ns/{nsId}/resources/vNet/{vNetId}/subnet

: vNetId = vnet00

: request body

{
  "description": "subnet01 managed by CB-Tumblebug",
  "ipv4_CIDR": "10.0.2.0/24",
  "name": "subnet01"
}

: response body

{
  "resourceType": "subnet",
  "id": "subnet01",
  "uid": "crvrfkjaek6blb511veg",
  "cspResourceName": "crvrfkjaek6blb511veg",
  "name": "subnet01",
  "connectionName": "aws-ap-northeast-2",
  "cspVNetName": "crvrf63aek6blb511vdg",
  "status": "Available",
  "ipv4_CIDR": "10.0.2.0/24",
  "zone": "ap-northeast-2a",
  "keyValueList": [
    {
      "key": "VpcId",
      "value": "vpc-0bccc226cc5638974"
    },
    {
      "key": "MapPublicIpOnLaunch",
      "value": "false"
    },
    {
      "key": "AvailableIpAddressCount",
      "value": "251"
    },
    {
      "key": "AvailabilityZone",
      "value": "ap-northeast-2a"
    },
    {
      "key": "Status",
      "value": "available"
    }
  ],
  "description": ""
}

Get vNet

: API = GET /ns/{nsId}/resources/vNet/{vNetId}

: vNetId = vnet00

: response body

{
  "resourceType": "vNet",
  "id": "vnet00",
  "uid": "crvrf63aek6blb511vdg",
  "cspResourceName": "crvrf63aek6blb511vdg",
  "cspResourceId": "vpc-0bccc226cc5638974",
  "name": "vnet00",
  "connectionName": "aws-ap-northeast-2",
  "cidrBlock": "10.0.0.0/16",
  "subnetInfoList": [
    {
      "resourceType": "subnet",
      "id": "subnet00",
      "uid": "crvrf63aek6blb511ve0",
      "cspResourceName": "crvrf63aek6blb511ve0",
      "name": "subnet00",
      "connectionName": "aws-ap-northeast-2",
      "cspVNetName": "crvrf63aek6blb511vdg",
      "status": "Available",
      "ipv4_CIDR": "10.0.1.0/24",
      "zone": "ap-northeast-2a",
      "keyValueList": [
        {
          "key": "VpcId",
          "value": "vpc-0bccc226cc5638974"
        },
        {
          "key": "MapPublicIpOnLaunch",
          "value": "false"
        },
        {
          "key": "AvailableIpAddressCount",
          "value": "251"
        },
        {
          "key": "AvailabilityZone",
          "value": "ap-northeast-2a"
        },
        {
          "key": "Status",
          "value": "available"
        }
      ],
      "description": ""
    },
    {
      "resourceType": "subnet",
      "id": "subnet01",
      "uid": "crvrfkjaek6blb511veg",
      "cspResourceName": "crvrfkjaek6blb511veg",
      "name": "subnet01",
      "connectionName": "aws-ap-northeast-2",
      "cspVNetName": "crvrf63aek6blb511vdg",
      "status": "Available",
      "ipv4_CIDR": "10.0.2.0/24",
      "zone": "ap-northeast-2a",
      "keyValueList": [
        {
          "key": "VpcId",
          "value": "vpc-0bccc226cc5638974"
        },
        {
          "key": "MapPublicIpOnLaunch",
          "value": "false"
        },
        {
          "key": "AvailableIpAddressCount",
          "value": "251"
        },
        {
          "key": "AvailabilityZone",
          "value": "ap-northeast-2a"
        },
        {
          "key": "Status",
          "value": "available"
        }
      ],
      "description": ""
    }
  ],
  "description": "vnet00 managed by CB-Tumblebug",
  "status": "InUse",
  "associatedObjectList": null,
  "isAutoGenerated": false,
  "systemLabel": ""
}

Delete subnet

: API = DELETE /ns/{nsId}/resources/vNet/{vNetId}/subnet/{subnetId}

: vNetId = vnet00

: subnetId = subnet01

: action = ""

: response body

{
  "message": "the subnet (subnet01) has been deleted"
}

Get vNet

: API = POST /ns/{nsId}/resources/vNet/{vNetId}

: vNetId = vent00

: response body

{
  "resourceType": "vNet",
  "id": "vnet00",
  "uid": "crvrf63aek6blb511vdg",
  "cspResourceName": "crvrf63aek6blb511vdg",
  "cspResourceId": "vpc-0bccc226cc5638974",
  "name": "vnet00",
  "connectionName": "aws-ap-northeast-2",
  "cidrBlock": "10.0.0.0/16",
  "subnetInfoList": [
    {
      "resourceType": "subnet",
      "id": "subnet00",
      "uid": "crvrf63aek6blb511ve0",
      "cspResourceName": "crvrf63aek6blb511ve0",
      "name": "subnet00",
      "connectionName": "aws-ap-northeast-2",
      "cspVNetName": "crvrf63aek6blb511vdg",
      "status": "Available",
      "ipv4_CIDR": "10.0.1.0/24",
      "zone": "ap-northeast-2a",
      "keyValueList": [
        {
          "key": "VpcId",
          "value": "vpc-0bccc226cc5638974"
        },
        {
          "key": "MapPublicIpOnLaunch",
          "value": "false"
        },
        {
          "key": "AvailableIpAddressCount",
          "value": "251"
        },
        {
          "key": "AvailabilityZone",
          "value": "ap-northeast-2a"
        },
        {
          "key": "Status",
          "value": "available"
        }
      ],
      "description": ""
    }
  ],
  "description": "vnet00 managed by CB-Tumblebug",
  "status": "InUse",
  "associatedObjectList": null,
  "isAutoGenerated": false,
  "systemLabel": ""
}

Delete vNet

: API = DELETE /ns/{nsId}/resources/vNet/{vNetId}

: vNetId = vnet00

: action = ""

: request body = none

: response body

{
  "message": "the vNet (vnet00) is in-use, may have subnets"
}

: vNetId = vnet00

: action = "withsubnets"

: request body = none

: response body

{
  "message": "the vNet (vnet00) has been deleted"
}

Get vNet

: API = GET /ns/{nsId}/resources/vNet/{vNetId}

: vNetId = vnet00

: response body

{
  "message": "does not exist, vNet: vnet00"
}

Register vNet created externally

: API = POST /ns/{nsId}/externalResources/vNet

: request body

{
  "connectionName": "aws-ap-northeast-2",
  "cspResourceId": "vpc-055243ccca00ec02c",
  "description": "It is registered",
  "name": "vnet01"
}

: response body

{
  "resourceType": "vNet",
  "id": "vnet01",
  "uid": "crvrj03aek6blb511vf0",
  "cspResourceName": "crvrj03aek6blb511vf0",
  "cspResourceId": "vpc-055243ccca00ec02c",
  "name": "vnet01",
  "connectionName": "aws-ap-northeast-2",
  "cidrBlock": "10.0.0.0/16",
  "subnetInfoList": [
    {
      "resourceType": "",
      "id": "reg-subnet-01",
      "uid": "crvrj0baek6blb511vfg",
      "cspResourceName": "crvrj03aek6blb511vf0-subnet-0",
      "name": "reg-subnet-01",
      "connectionName": "aws-ap-northeast-2",
      "cspVNetName": "crvrj03aek6blb511vf0",
      "status": "Unknown",
      "ipv4_CIDR": "10.0.144.0/20",
      "zone": "ap-northeast-2b",
      "keyValueList": [
        {
          "key": "VpcId",
          "value": "vpc-055243ccca00ec02c"
        },
        {
          "key": "MapPublicIpOnLaunch",
          "value": "false"
        },
        {
          "key": "AvailableIpAddressCount",
          "value": "4091"
        },
        {
          "key": "AvailabilityZone",
          "value": "ap-northeast-2b"
        },
        {
          "key": "Status",
          "value": "available"
        }
      ],
      "description": ""
    },
    {
      "resourceType": "",
      "id": "reg-subnet-02",
      "uid": "crvrj0baek6blb511vg0",
      "cspResourceName": "crvrj03aek6blb511vf0-subnet-1",
      "name": "reg-subnet-02",
      "connectionName": "aws-ap-northeast-2",
      "cspVNetName": "crvrj03aek6blb511vf0",
      "status": "Unknown",
      "ipv4_CIDR": "10.0.128.0/20",
      "zone": "ap-northeast-2a",
      "keyValueList": [
        {
          "key": "VpcId",
          "value": "vpc-055243ccca00ec02c"
        },
        {
          "key": "MapPublicIpOnLaunch",
          "value": "false"
        },
        {
          "key": "AvailableIpAddressCount",
          "value": "4091"
        },
        {
          "key": "AvailabilityZone",
          "value": "ap-northeast-2a"
        },
        {
          "key": "Status",
          "value": "available"
        }
      ],
      "description": ""
    },
    {
      "resourceType": "",
      "id": "reg-subnet-03",
      "uid": "crvrj0baek6blb511vgg",
      "cspResourceName": "crvrj03aek6blb511vf0-subnet-2",
      "name": "reg-subnet-03",
      "connectionName": "aws-ap-northeast-2",
      "cspVNetName": "crvrj03aek6blb511vf0",
      "status": "Unknown",
      "ipv4_CIDR": "10.0.16.0/20",
      "zone": "ap-northeast-2b",
      "keyValueList": [
        {
          "key": "VpcId",
          "value": "vpc-055243ccca00ec02c"
        },
        {
          "key": "MapPublicIpOnLaunch",
          "value": "false"
        },
        {
          "key": "AvailableIpAddressCount",
          "value": "4091"
        },
        {
          "key": "AvailabilityZone",
          "value": "ap-northeast-2b"
        },
        {
          "key": "Status",
          "value": "available"
        }
      ],
      "description": ""
    },
    {
      "resourceType": "",
      "id": "reg-subnet-04",
      "uid": "crvrj0baek6blb511vh0",
      "cspResourceName": "crvrj03aek6blb511vf0-subnet-3",
      "name": "reg-subnet-04",
      "connectionName": "aws-ap-northeast-2",
      "cspVNetName": "crvrj03aek6blb511vf0",
      "status": "Unknown",
      "ipv4_CIDR": "10.0.0.0/20",
      "zone": "ap-northeast-2a",
      "keyValueList": [
        {
          "key": "VpcId",
          "value": "vpc-055243ccca00ec02c"
        },
        {
          "key": "MapPublicIpOnLaunch",
          "value": "false"
        },
        {
          "key": "AvailableIpAddressCount",
          "value": "4091"
        },
        {
          "key": "AvailabilityZone",
          "value": "ap-northeast-2a"
        },
        {
          "key": "Status",
          "value": "available"
        }
      ],
      "description": ""
    }
  ],
  "description": "It is registered",
  "status": "Available",
  "associatedObjectList": null,
  "isAutoGenerated": false,
  "systemLabel": "Registered from CSP resource"
}

Deregister vNet

: API = DELETE /ns/{nsId}/externalResources/vNet/{vNetId}

: vNetId = vnet07

: withSubnets = "false"

: request body = none

: response body

{
  "message": "the vNet (vnet01) is in-use, may have subnets"
}

: vNetId = vnet07 : withSubnets = "true"

:response body

{
  "message": "the vnet (vnet01) has been deregistered"
}

Get vNet

: API = GET /ns/{nsId}/resources/vNet/{vNetId}

: vNetId = vnet01

: response body

{
  "message": "does not exist, vNet: vnet01"
}

Validation: invalid zone

: API = POST /ns/{nsId}/resources/vNet

: request body

{
  "cidrBlock": "10.0.0/16",
  "connectionName": "aws-ap-northeast-2",
  "description": "vnet00 managed by CB-Tumblebug",
  "name": "vnet00",
  "subnetInfoList": [
    {
      "description": "subnet00 managed by CB-Tumblebug",
      "ipv4_CIDR": "10.0.1.0/24",
      "name": "subnet00",
      "zone": "aaaa"
    }
  ]
}

:response body

{
  "message": "invalid zone: aaaa"
}

Validation: invalid vNet CIDR block

: API = POST /ns/{nsId}/resources/vNet

: request body

{
  "cidrBlock": "10.0.0/16",
  "connectionName": "aws-ap-northeast-2",
  "description": "vnet00 managed by CB-Tumblebug",
  "name": "vnet00",
  "subnetInfoList": [
    {
      "description": "subnet00 managed by CB-Tumblebug",
      "ipv4_CIDR": "10.0.1.0/24",
      "name": "subnet00",
      "zone": ""
    }
  ]
}

: response body

{
  "message": "invalid CIDR block '10.0.0/16': invalid CIDR address: 10.0.0/16"
}

Validation: invalid subnet CIDR block

: API = POST /ns/{nsId}/resources/vNet

: request body

{
  "cidrBlock": "10.0.0.0/16",
  "connectionName": "aws-ap-northeast-2",
  "description": "vnet00 managed by CB-Tumblebug",
  "name": "vnet00",
  "subnetInfoList": [
    {
      "description": "subnet00 managed by CB-Tumblebug",
      "ipv4_CIDR": "10.0.1.0/24",
      "name": "subnet00",
      "zone": ""
    }
  ]
}

: response body

{
  "resourceType": "vNet",
  "id": "vnet00",
  "uid": "crvrm83aek6blb511vig",
  "cspResourceName": "crvrm83aek6blb511vig",
  "cspResourceId": "vpc-0a046cb44dd590b41",
  "name": "vnet00",
  "connectionName": "aws-ap-northeast-2",
  "cidrBlock": "10.0.0.0/16",
  "subnetInfoList": [
    {
      "resourceType": "subnet",
      "id": "subnet00",
      "uid": "crvrm83aek6blb511vj0",
      "cspResourceName": "crvrm83aek6blb511vj0",
      "name": "subnet00",
      "connectionName": "aws-ap-northeast-2",
      "cspVNetName": "crvrm83aek6blb511vig",
      "status": "Available",
      "ipv4_CIDR": "10.0.1.0/24",
      "zone": "ap-northeast-2a",
      "keyValueList": [
        {
          "key": "VpcId",
          "value": "vpc-0a046cb44dd590b41"
        },
        {
          "key": "MapPublicIpOnLaunch",
          "value": "false"
        },
        {
          "key": "AvailableIpAddressCount",
          "value": "251"
        },
        {
          "key": "AvailabilityZone",
          "value": "ap-northeast-2a"
        },
        {
          "key": "Status",
          "value": "available"
        }
      ],
      "description": ""
    }
  ],
  "description": "vnet00 managed by CB-Tumblebug",
  "status": "InUse",
  "associatedObjectList": null,
  "isAutoGenerated": false,
  "systemLabel": ""
}

: API = POST /ns/{nsId}/resources/vNet/{vNetId}/subnet

: vNetId = vnet01

: request body

{
  "description": "subnet01 managed by CB-Tumblebug",
  "ipv4_CIDR": "10.0.1.0/24",
  "name": "subnet01"
}

: response body

{
  "message": "in network '10.0.0.0/16': overlapping subnets found: '10.0.1.0/24' and '10.0.1.0/24'"
}

Validation: Successfully clean up the vNet object if vNet creation fails.

: The case that vNet creation fails due to the VPC limit exceeded

: API = POST /ns/{nsId}/resources/vNet

: resquest body

{
  "cidrBlock": "10.0.0.0/16",
  "connectionName": "aws-ap-northeast-2",
  "description": "vnet02 managed by CB-Tumblebug",
  "name": "vnet02",
  "subnetInfoList": [
    {
      "description": "subnet00 managed by CB-Tumblebug",
      "ipv4_CIDR": "10.0.1.0/24",
      "name": "subnet00",
      "zone": ""
    }
  ]
}

: response body

{
  "message": "[Error from: http://cb-spider:1024/spider/vpc] Status code: 500 Internal Server Error, Message: {\"message\":\"VpcLimitExceeded: The maximum number of VPCs has been reached.\\n\\tstatus code: 400, request id: 963ae0d3-7c93-485c-af0e-8790dda0757e\"}\n"
}

: API = GET /ns/{nsId}/resources/vNet/{vNetId}

: request body = none

: vNetId = vnet02

: response body

{
  "message": "does not exist, vNet: vnet02"
}