Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace the vNet and zone validation logic #1836

Merged
merged 1 commit into from
Sep 27, 2024

Conversation

yunkon-kim
Copy link
Member

@yunkon-kim yunkon-kim commented Sep 27, 2024

  • Due to the connection name pattern

Tested by
POST /ns/{nsId}/resources/vNet

(Case 1)
nsId: default
Request body:

{
  "cidrBlock": "10.0.0.0/16",
  "connectionName": "aws-ap-northeast-2-ap-northeast-2a",
  "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": "ap-northeast-2a"
    }
  ]
}

Response body:

{
  "resourceType": "vNet",
  "id": "vnet00",
  "uid": "crr9av5tv3aetsf218jg",
  "cspResourceName": "crr9av5tv3aetsf218jg",
  "cspResourceId": "vpc-03f6c920d0c67879c",
  "name": "vnet00",
  "connectionName": "aws-ap-northeast-2-ap-northeast-2a",
  "cidrBlock": "10.0.0.0/16",
  "subnetInfoList": [
    {
      "resourceType": "subnet",
      "id": "subnet00",
      "uid": "crr9av5tv3aetsf218k0",
      "cspResourceName": "crr9av5tv3aetsf218k0",
      "name": "subnet00",
      "connectionName": "aws-ap-northeast-2-ap-northeast-2a",
      "cspVNetName": "crr9av5tv3aetsf218jg",
      "status": "Available",
      "ipv4_CIDR": "10.0.1.0/24",
      "zone": "ap-northeast-2a",
      "keyValueList": [
        {
          "key": "VpcId",
          "value": "vpc-03f6c920d0c67879c"
        },
        {
          "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": ""
}

(Case 2)
nsId: default
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": "crr9inttv3aetsf218kg",
  "cspResourceName": "crr9inttv3aetsf218kg",
  "cspResourceId": "vpc-0177733c4bb98cd93",
  "name": "vnet00",
  "connectionName": "aws-ap-northeast-2",
  "cidrBlock": "10.0.0.0/16",
  "subnetInfoList": [
    {
      "resourceType": "subnet",
      "id": "subnet00",
      "uid": "crr9inttv3aetsf218l0",
      "cspResourceName": "crr9inttv3aetsf218l0",
      "name": "subnet00",
      "connectionName": "aws-ap-northeast-2",
      "cspVNetName": "crr9inttv3aetsf218kg",
      "status": "Available",
      "ipv4_CIDR": "10.0.1.0/24",
      "zone": "ap-northeast-2a",
      "keyValueList": [
        {
          "key": "VpcId",
          "value": "vpc-0177733c4bb98cd93"
        },
        {
          "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": ""
}

Close #1835

* Due to the connection name pattern
@yunkon-kim
Copy link
Member Author

/approve

@github-actions github-actions bot added the approved This PR is approved and will be merged soon. label Sep 27, 2024
@cb-github-robot cb-github-robot merged commit 437768a into cloud-barista:main Sep 27, 2024
4 checks passed
@yunkon-kim yunkon-kim deleted the 240927-20 branch November 12, 2024 01:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved This PR is approved and will be merged soon.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

I got an error that "nativeRegion 'kr1-kr-pub-a' not found in Provider 'nhncloud'"
2 participants