The high-level task flow for OpenStack Networking involves creating a network, associating a subnet with that network, and booting a VM that is attached to the network. Clean-up includes deleting the VM, deleting any ports associated with the network, and deleting the networks. OpenStack Networking deletes any subnets associated with the deleted network.
To use OpenStack Networking - high-level task flow
Create a network
The tenant creates a network.
For example, the tenant creates the
net1
network. Its ID is net1_id.Associate a subnet with the network
The tenant associates a subnet with that network.
For example, the tenant associates the
10.0.0.0/24
subnet with thenet1
network.Boot a VM and attach it to the network
The tenant boots a virtual machine (VM) and specifies a single NIC that connects to the network.
The following examples use the nova client to boot a VM.
In the first example, Nova contacts OpenStack Networking to create the NIC and attach it to the
net1
network, with the ID net1_id:$ nova boot <server_name> --image <image> --flavor <flavor> --nic net-id=<net1_id>
In a second example, you first create the
port1
, port and then you boot the VM with a specified port. OpenStack Networking creates a NIC and attaches it to theport1
port, with the ID port1_id:$ nova boot <server_name> --image <image> --flavor <flavor> --nic port-id=<port1_id>
OpenStack Networking chooses and assigns an IP address to the
port1
port.For information about how to create ports, see the section called “Create Port”.
For more information about the nova boot command, enter:
$ nova help boot
Delete the VM
The tenant deletes the VM.
Nova contacts OpenStack Networking and deletes the
port1
port.The allocated IP address is returned to the pool of available IP addresses.
Delete any ports
If the tenant created any ports and associated them with the network, the tenant deletes the ports.
Delete the network
The tenant deletes the network. This operation deletes an OpenStack Networking network and its associated subnets provided that no port is currently configured on the network.