You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: framework/extensions/src/main/java/org/apache/cloudstack/framework/extensions/network/NetworkExtensionElement.java
+34-21Lines changed: 34 additions & 21 deletions
Original file line number
Diff line number
Diff line change
@@ -445,7 +445,7 @@ public boolean prepare(Network network, NicProfile nic, VirtualMachineProfile vm
445
445
}
446
446
addExtensionIpToPayload(payload, network);
447
447
448
-
logger.debug("Preparing NIC via extension script: network={} nicMac={} nicIp={}", network, nic != null ? nic.getMacAddress() : null, nic != null ? nic.getIPv4Address() : null);
448
+
logger.debug("Preparing NIC via extension script: network={} nicMac={} nicIp={}", network, nic.getMacAddress(), nic.getIPv4Address());
Copy file name to clipboardExpand all lines: framework/extensions/src/main/java/org/apache/cloudstack/framework/extensions/network/README.md
+37-11Lines changed: 37 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -254,26 +254,52 @@ For all standard network / VPC commands, CloudStack now executes the script as:
254
254
255
255
The following names appear repeatedly inside the nested `payload` object.
256
256
257
+
### Network-level fields (added by `addNetworkToPayload`)
258
+
257
259
| Field | Description |
258
260
|---|---|
259
261
|`network_id`| CloudStack numeric network ID. |
260
-
|`vpc_id`| CloudStack numeric VPC ID. Present for VPC tier networks and VPC-scoped commands. |
261
262
|`vlan`| Guest VLAN tag (for example `100`). Extracted from the broadcast URI. May be empty for flat networks. |
262
-
|`gateway`| Guest network gateway (for example `10.0.0.1`). |
263
-
|`cidr`| Guest network CIDR (for example `10.0.0.0/24`). |
263
+
|`zone_id`| CloudStack zone ID. |
264
+
|`guest_type`| Guest network type: `"isolated"`, `"shared"`, or `"l2"`. Scripts should use this to skip NAT/firewall operations that are not applicable to Shared or L2 networks. |
265
+
|`gateway`| Guest network gateway (for example `10.0.0.1`). Omitted when blank. |
266
+
|`cidr`| Guest network CIDR (for example `10.0.0.0/24`). Omitted when blank. |
267
+
|`vpc_id`| CloudStack numeric VPC ID. Present for VPC tier networks and VPC-scoped commands. |
264
268
|`network_ip6_gateway`| Guest network IPv6 gateway, when the network has IPv6 configured. |
265
269
|`network_ip6_cidr`| Guest network IPv6 CIDR, when the network has IPv6 configured. |
266
-
|`extension_ip`| The IP the extension device uses on the guest side. Equals the gateway when SourceNat/Gateway is provided; otherwise it is a dedicated IP from the guest subnet. |
267
-
|`public_ip`| A public IP address. |
268
-
|`public_cidr`| CIDR of the public IP (for example `203.0.113.5/24`). |
269
-
|`public_vlan`| VLAN tag of the public IP segment. |
270
-
|`public_gateway`| Gateway of the public IP segment. |
271
-
|`private_ip`| A VM's private guest-network IP address. |
270
+
271
+
### NIC-level fields (added by `addNicToPayload`)
272
+
273
+
| Field | Description |
274
+
|---|---|
275
+
|`nic_id`| CloudStack numeric NIC ID. |
276
+
|`nic_uuid`| NIC UUID — matches `external_ids:iface-id` written by the KVM agent for OVN port binding. |
277
+
|`mac`| VM NIC MAC address. |
278
+
|`ip`| VM NIC IPv4 address. |
279
+
|`gateway`| VM NIC IPv4 gateway (NIC-level; equals the network gateway for normal guest networks). |
280
+
|`netmask`| VM NIC IPv4 netmask (for example `255.255.255.0`). |
281
+
|`default_nic`| Stringified boolean — `"false"` for secondary NICs. |
282
+
|`device_id`| NIC device index in the VM (slot number). |
272
283
|`nic_ip6_address`| VM NIC IPv6 address, when the NIC has IPv6 configured. |
273
284
|`nic_ip6_gateway`| VM NIC IPv6 gateway, when available. |
274
285
|`nic_ip6_cidr`| VM NIC IPv6 CIDR, when available. |
275
-
|`source_nat`| Stringified boolean (`"true"` / `"false"`) indicating whether the public IP is a source-NAT IP. |
276
-
|`nic_uuid`| NIC UUID when the current API path has a `NicProfile` available. |
286
+
287
+
### Public-IP fields (added by `addPublicIpToPayload`)
288
+
289
+
| Field | Description |
290
+
|---|---|
291
+
|`public_ip`| A public IP address. |
292
+
|`public_vlan`| VLAN tag of the public IP segment. |
293
+
|`public_gateway`| Gateway of the public IP segment. |
294
+
|`public_cidr`| CIDR of the public IP (for example `203.0.113.0/24`). |
295
+
|`source_nat`| Stringified boolean (`"true"` / `"false"`) indicating whether the public IP is the source-NAT IP. |
296
+
|`private_ip`| A VM's private guest-network IP address (NAT target). |
297
+
298
+
### DNS / extension-IP fields
299
+
300
+
| Field | Description |
301
+
|---|---|
302
+
|`extension_ip`| The IP the extension device uses on the guest side. Equals the gateway when SourceNat/Gateway is provided; otherwise it is a dedicated IP from the guest subnet. |
0 commit comments