Provision a VLAN Private Network
After creating a network profile
with a VLAN transport zone, you can provision a VLAN private network.
- Verify that all general prerequisites and prerequisites for theAutomation AssemblerInfrastructure as a Service (IaaS) service have been satisfied. See Prerequisites for API Use Case Examples.
- Verify that you have the project ID. See Create a Project to use in Automation Assembler.
- Verify that you know the VLAN IDs that you want to use. Comma separated values can be 0 - 4094.
With VLAN IDs in your private
network definition,
Automation Assembler
allocates the cloud template to a network profile with a VLAN transport zone specified.
If no VLAN ID is specified, the cloud template is allocated to a network profile with an
overlay transport zone.- Assign your project ID variable.project_id='<your_project_id>'
- Provision the network with VLAN IDs that you choose.curl -X POST \ $url/iaas/api/networks?apiVersion=$api_version \ -H "Authorization: Bearer $access_token" \ -H 'Content-Type: application/json' \ -d '{ "name": "<your_network_name>", "description": "<your_description>", "projectId": "'$project_id'", "customProperties": { "networkType": "PRIVATE", "vlanIds": "<integer_values_0_to_4094>" } }' | jq "."The response includes a selfLink value.{ "progress": 0, "status": "INPROGRESS", "name": "Provisioning", "id": "example-selfLink-alphanumeric-string", "selfLink": "/iaas/api/request-tracker/example-selfLink-alphanumeric-string" }
- Assign the selfLink variable.selfLink_id='example-selfLink-alphanumeric-string'
- Use the selfLink variable to track the request.curl -X GET -H 'Content-Type: application/json' -H "Authorization: Bearer $access_token" "$url/iaas/api/request-tracker/$selfLink_id | jq "."
Provision a VLAN Private
Network
Provision a VLAN private network for a
project ID
Assign variables.
$ url='https://appliance.domain.com' $ api_version='2021-07-15'
Assign the project ID.
$ project_id='5944aacb-91de-4541-bb9e-ef2a5403f81b'
Provision the VLAN private network.
curl -X POST \ $url/iaas/api/networks?apiVersion=$api_version \ -H "Authorization: Bearer $access_token" \ -H 'Content-Type: application/json' \ -d '{ "name": "example-vlan-network", "description": "Example VLAN Network created using API", "projectId": "'$project_id'", "customProperties": { "networkType": "PRIVATE", "vlanIds": "1004, 1005" } }' | jq "."
The response includes a selfLink.
{ "progress": 0, "status": "INPROGRESS", "name": "Provisioning", "id": "dab1fe2f-4104-4fce-b534-e7ab5c172788", "selfLink": "/iaas/api/request-tracker/dab1fe2f-4104-4fce-b534-e7ab5c172788", "deploymentId": "8964a3f6-e829-40ad-b07c-0177abb7b4f4" }
Assign the selfLink variable.
selfLink_id='dab1fe2f-4104-4fce-b534-e7ab5c172788'
Use the selfLink variable to track the
request.
curl -X GET -H 'Content-Type: application/json' -H "Authorization: Bearer $access_token" "$url/iaas/api/request-tracker/$selfLink_id | jq "."
When the request completes successfully,
the response shows the network has been created.
{ "progress": 100, "message": "success", "status": "FINISHED", "resources": [ "/iaas/api/networks/3f3b4f87-3e0d-48e8-a484-a8f2890977df" ], "name": "example-vlan-network Allocation", "id": "1cca9d9c-1e93-40d6-8bab-fa92dd89566a", "selfLink": "/iaas/api/request-tracker/1cca9d9c-1e93-40d6-8bab-fa92dd89566a", "deploymentId": "8b8eef00-e159-4ba9-9e78-09089a3f5786" }