Atom feed of this document
 

 API Abstractions

The Quantum v2.0 API provides control over both L2 network topologies and the IP addresses used on those networks (IP Address Management or IPAM). There is also an extension to cover basic L3 forwarding and NAT, providing capabilities similar to nova-network.

In the Quantum API, an isolated L2 network segment (similar to a VLAN) is called a 'Network' and forms the basis for describing the L2 network topology available in a given Quantum deployment.

The Quantum API uses the notion of a 'Subnet', which associates a block of IP addresses and other network configuration (e.g., default gateway, dns-servers) with a Quantum Network. Each subnet represents an IPv4 or IPv6 address block and each Quantum Network can have multiple subnets, if desired. 

A 'Port' represents an attachment port to a L2 Quantum Network. When a port is created on the network, by default it will be allocated an available fixed IP address out of one of the designated Subnets for each IP version (if one exists).  When the Port is destroyed, the allocated addresses return to the pool of available IPs on the subnet(s). Users of the Quantum API can either choose a specific IP address from the block, or let Quantum choose the first available IP address.

The table below summarizes the attributes available for each of these abstractions. For more operations about API abstraction and operations, please refer to the Quantum v2.0 API Developer Guide.

Table 4.1. Network
Attribute name Type Default Value Description
id uuid-str generated UUID for the network.
name String None Human-readable name for the network. Might not be unique.
admin_state_up Bool True The administrative state of network. If false (down), the network does not forward packets.
status String N/A

Indicates whether network is currently operational.

subnets list(uuid-str) Empty list Subnets associated with this network.
shared Bool False Specifies whether the network resource can be accessed by any tenant or not.
tenant_id uuid-str N/A Owner of network. Only admin users can specify a tenant_id other than its own.
Table 4.2. Subnet
Attribute Type Default Value Description
id uuid-str generated UUID representing the subnet
network_id uuid-str N/A network this subnet is associated with.
name String None Human-readable name for the subnet. Might not be unique.
ip_version int 4 IP version
cidr string N/A cidr representing IP range for this subnet, based on IP version
gateway_ip string first address in cidr default gateway used by devices in this subnet
dns_nameservers list(str) Empty list DNS name servers used by hosts in this subnet.
allocation_pools list(dict) Every address in cidr, excluding gateway_ip if configured Sub-ranges of cidr available for dynamic allocation to ports [ { "start": "10.0.0.2", "end": "10.0.0.254"} ]
host_routes list(dict) Empty List Routes that should be used by devices with IPs from this subnet (not including local subnet route).
enable_dhcp Bool True Specifies whether DHCP is enabled for this subnet or not.
tenant_id uuid-str N/A Owner of network. Only admin users can specify a tenant_id other than its own.
Table 4.3. Port
Attribute Type Default Value Description
id uuid-str generated UUID for the port.
network_id uuid-str N/A Network that this port is associated with.
name String None Human-readable name for the port. Might not be unique.
admin_state_up bool true Administrative state of port. If false (down), port does not forward packets.
status string N/A

Indicates whether network is currently operational.

mac_address string generated Mac address to use on this port.
fixed_ips list(dict) automatically allocated from pool Specifies IP addresses for the port thus associating the port itself with the subnets where the IP addresses are picked from
device_id str None identifies the device (e.g., virtual server) using this port.
device_owner str None Identifies the entity (e.g.: dhcp agent) using this port.
tenant_id uuid-str N/A Owner of network. Only admin users can specify a tenant_id other than its own.


loading table of contents...