Skip to content

Managing Zone Allocation Strategies

Zone allocation strategies define how logical networks distribute their resources across availability zones. They can be configured on both logical network profiles (as templates) and directly on logical networks (for per-network overrides).

In MetalSoft, a zone represents an availability boundary within a fabric — typically corresponding to a rack, a group of switches or a failure domain. Zones ensure that network resources (such as VLAN/VNI allocations) are distributed across these boundaries according to a defined strategy.

Zone allocation strategies work alongside the existing VLAN, VNI and IPv4/IPv6 allocation strategies on logical networks and profiles. While those strategies control what resources are allocated, zone strategies control where they are allocated.

KindDescription
autoThe system automatically assigns zones based on available resources and placement rules. You only need to specify the scope.
manualYou explicitly specify the zone name to use. This gives full control over which zone receives the resource.

Each strategy is also associated with a scope that limits where it applies:

ScopeDescription
globalApplies across all fabrics and sites
site_groupApplies to a group of sites
siteApplies to a single site
fabric_groupApplies to a group of fabrics
fabricApplies to a single fabric
rackApplies to a single rack
device_groupApplies to a group of network devices
network_deviceApplies to a single network device

Zone allocation on logical network profiles

Section titled “Zone allocation on logical network profiles”

Zone allocation strategies on a logical network profile serve as a template. When a logical network is created from the profile, it inherits the zone strategies.

Creating a zone allocation strategy on a profile

Section titled “Creating a zone allocation strategy on a profile”
Terminal window
# Automatic zone allocation
curl -X POST "https://<your-server>/api/v2/logical-network-profiles/{id}/zone/zone-allocation-strategies" \
-H "Content-Type: application/json" \
-d '{
"kind": "auto",
"scope": {
"kind": "fabric",
"resourceId": 1
}
}'
# Manual zone allocation
curl -X POST "https://<your-server>/api/v2/logical-network-profiles/{id}/zone/zone-allocation-strategies" \
-H "Content-Type: application/json" \
-d '{
"kind": "manual",
"zoneName": "zone-a",
"scope": {
"kind": "fabric",
"resourceId": 1
}
}'

Listing zone allocation strategies on a profile

Section titled “Listing zone allocation strategies on a profile”
Terminal window
curl "https://<your-server>/api/v2/logical-network-profiles/{id}/zone/zone-allocation-strategies"
Terminal window
curl "https://<your-server>/api/v2/logical-network-profiles/{id}/zone/zone-allocation-strategies/{allocationStrategyId}"

Use PUT to replace an existing strategy entirely:

Terminal window
curl -X PUT "https://<your-server>/api/v2/logical-network-profiles/{id}/zone/zone-allocation-strategies/{allocationStrategyId}" \
-H "Content-Type: application/json" \
-d '{
"kind": "manual",
"zoneName": "zone-b",
"scope": {
"kind": "fabric",
"resourceId": 1
}
}'
Terminal window
curl -X DELETE "https://<your-server>/api/v2/logical-network-profiles/{id}/zone/zone-allocation-strategies/{allocationStrategyId}"

Logical networks have their own zone allocation strategies under their config. These can be inherited from the profile or set independently.

The API endpoints follow the same pattern but are nested under the logical network’s config:

Creating a zone allocation strategy on a logical network

Section titled “Creating a zone allocation strategy on a logical network”
Terminal window
curl -X POST "https://<your-server>/api/v2/logical-networks/{id}/config/zone/zone-allocation-strategies" \
-H "Content-Type: application/json" \
-d '{
"kind": "auto",
"scope": {
"kind": "fabric",
"resourceId": 1
}
}'
Terminal window
# List all
curl "https://<your-server>/api/v2/logical-networks/{id}/config/zone/zone-allocation-strategies"
# Get one
curl "https://<your-server>/api/v2/logical-networks/{id}/config/zone/zone-allocation-strategies/{allocationStrategyId}"
# Replace
curl -X PUT "https://<your-server>/api/v2/logical-networks/{id}/config/zone/zone-allocation-strategies/{allocationStrategyId}" \
-H "Content-Type: application/json" \
-d '{
"kind": "manual",
"zoneName": "zone-c",
"scope": {
"kind": "rack",
"resourceId": 5
}
}'
# Delete
curl -X DELETE "https://<your-server>/api/v2/logical-networks/{id}/config/zone/zone-allocation-strategies/{allocationStrategyId}"

Once zone strategies are defined and a logical network is deployed, the system creates zone allocations — the actual zone assignments. These are visible on the logical network’s zone property:

Terminal window
curl "https://<your-server>/api/v2/logical-networks/{id}"

The zone.zones array contains the allocated zones, each with:

FieldDescription
idUnique ID of the zone allocation
scopeThe scope this allocation applies to
statusAllocation status: allocated, pending_allocation or deleting
zoneNameThe name of the allocated zone

The zone.zoneAllocationStrategies array shows the strategies that produced these allocations.

Specifying zones at logical network creation

Section titled “Specifying zones at logical network creation”

Zone allocation strategies can also be set inline when creating a logical network:

Terminal window
curl -X POST "https://<your-server>/api/v2/logical-networks" \
-H "Content-Type: application/json" \
-d '{
"label": "my-network",
"name": "My Network",
"networkProfileId": 1,
"zone": {
"zoneAllocationStrategies": [
{
"kind": "auto",
"scope": {
"kind": "fabric",
"resourceId": 1
}
}
]
}
}'

This is equivalent to creating the logical network and then adding the strategy separately.