Skip to content

Commit 80e4cd3

Browse files
committed
NE: change cidr to vpc_cidr when implement a VPC
1 parent af90319 commit 80e4cd3

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

framework/extensions/src/main/java/org/apache/cloudstack/framework/extensions/network/NetworkExtensionElement.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2323,7 +2323,7 @@ public boolean implementVpc(Vpc vpc, DeployDestination dest, ReservationContext
23232323
// Step 2: Create the VPC namespace (no anchor tier network needed).
23242324
JsonObject implPayload = new JsonObject();
23252325
implPayload.addProperty("vpc_id", String.valueOf(vpc.getId()));
2326-
implPayload.addProperty("cidr", safeStr(vpc.getCidr()));
2326+
implPayload.addProperty("vpc_cidr", safeStr(vpc.getCidr()));
23272327

23282328
// Include source NAT IP if already allocated, so the script can set up the
23292329
// VPC-level SNAT rule for the entire VPC CIDR.
@@ -2416,7 +2416,7 @@ public boolean updateVpcSourceNatIp(Vpc vpc, IpAddress address) {
24162416

24172417
final JsonObject payload = new JsonObject();
24182418
payload.addProperty("vpc_id", String.valueOf(vpc.getId()));
2419-
payload.addProperty("cidr", safeStr(vpc.getCidr()));
2419+
payload.addProperty("vpc_cidr", safeStr(vpc.getCidr()));
24202420
addPublicIpToPayload(payload, address.getId(), true);
24212421

24222422
final boolean result = executeVpcScript(vpc, CMD_UPDATE_VPC_SOURCE_NAT_IP, payload);

framework/extensions/src/main/java/org/apache/cloudstack/framework/extensions/network/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -401,7 +401,7 @@ can set up the VPC-level SNAT rule at this stage.
401401
| Field | Description |
402402
|---|---|
403403
| `vpc_id` | VPC ID. |
404-
| `cidr` | VPC supernet CIDR. |
404+
| `vpc_cidr` | VPC supernet CIDR. |
405405
| `public_ip` | Source-NAT IP, when already allocated. |
406406
| `public_vlan` | VLAN of the source-NAT IP, when present. |
407407
| `public_gateway` | Gateway of the source-NAT IP segment, when present. |
@@ -437,7 +437,7 @@ The `extension.details` blob is removed from CloudStack after a successful retur
437437
| Field | Description |
438438
|---|---|
439439
| `vpc_id` | VPC ID. |
440-
| `cidr` | VPC supernet CIDR. |
440+
| `vpc_cidr` | VPC supernet CIDR. |
441441
| `public_ip` | New source-NAT IP. |
442442
| `public_vlan` | VLAN of the new source-NAT IP. |
443443
| `public_gateway` | Gateway of the new source-NAT IP segment. |

0 commit comments

Comments
 (0)