Creating the network for the instance requires two things: the network itself, and associating subnet with it. First, we need to supply the network properties, such as the ML2 driver (Flat, VLAN, VxLAN, and so on), the segmentation ID that differentiates between the networks running on the same interface, the MTU, and the physical interface, if the instance traffic needs to traverse external networks. Second, we need to provide the subnet properties, such as the network CIDR, the gateway IP, The IPAM parameters (DHCP/DNS server if defined), and which network ID is associated with the subnet as in below screenshot:
Now we will develop a Python script to interact with the neutron project and create a network ...