From 71b8919054fc7cc7f95006f6d7e2bcee18c955e5 Mon Sep 17 00:00:00 2001 From: Brad Behle Date: Thu, 11 Feb 2016 15:20:27 -0600 Subject: Add "os subnet create" command using SDK Implement the openstack client subnet create command using SDK calls. Co-Authored-By: Terry Howe Partially implements: blueprint neutron-client Closes-Bug: #1542364 Change-Id: Ia6120b8dccf2ee83dc89b3f496f7180d4dc5199a --- doc/source/command-objects/subnet.rst | 108 ++++++++++++++++++++++++++++++++++ 1 file changed, 108 insertions(+) (limited to 'doc/source/command-objects') diff --git a/doc/source/command-objects/subnet.rst b/doc/source/command-objects/subnet.rst index 97d5c68b..56a28d73 100644 --- a/doc/source/command-objects/subnet.rst +++ b/doc/source/command-objects/subnet.rst @@ -20,6 +20,114 @@ Delete a subnet Subnet to delete (name or ID) +subnet create +-------------- + +Create new subnet + +.. program:: subnet create +.. code:: bash + + os subnet create + [--project [--project-domain ]] + [--subnet-pool | --use-default-subnet-pool [--prefix-length ]] + [--subnet-range ] + [--allocation-pool start=,end=] + [--dhcp | --no-dhcp] + [--dns-nameserver ] + [--gateway ] + [--host-route destination=,gateway=] + [--ip-version {4,6}] + [--ipv6-ra-mode {dhcpv6-stateful,dhcpv6-stateless,slaac}] + [--ipv6-address-mode {dhcpv6-stateful,dhcpv6-stateless,slaac}] + --network + + +.. option:: --project + + Owner's project (name or ID) + +.. option:: --project-domain + + Domain the project belongs to (name or ID). + This can be used in case collisions between project names exist. + +.. option:: --subnet-pool + + Subnet pool from which this subnet will obtain a CIDR (name or ID) + +.. option:: --use-default-subnet-pool + + Use default subnet pool for --ip-version + +.. option:: --prefix-length + + Prefix length for subnet allocation from subnet pool + +.. option:: --subnet-range + + Subnet range in CIDR notation + (required if --subnet-pool is not specified, optional otherwise) + +.. option:: --allocation-pool start=,end= + + Allocation pool IP addresses for this subnet e.g.: + start=192.168.199.2,end=192.168.199.254 (This option can be repeated) + +.. option:: --dhcp + + Enable DHCP (default) + +.. option:: --no-dhcp + + Disable DHCP + +.. option:: --dns-nameserver + + DNS name server for this subnet (This option can be repeated) + +.. option:: --gateway + + Specify a gateway for the subnet. The three options are: + : Specific IP address to use as the gateway + 'auto': Gateway address should automatically be chosen from + within the subnet itself + 'none': This subnet will not use a gateway + e.g.: --gateway 192.168.9.1, --gateway auto, --gateway none + (default is 'auto') + +.. option:: --host-route destination=,gateway= + + Additional route for this subnet e.g.: + destination=10.10.0.0/16,gateway=192.168.71.254 + destination: destination subnet (in CIDR notation) + gateway: nexthop IP address + (This option can be repeated) + +.. option:: --ip-version {4,6} + + IP version (default is 4). Note that when subnet pool is specified, + IP version is determined from the subnet pool and this option + is ignored. + +.. option:: --ipv6-ra-mode {dhcpv6-stateful,dhcpv6-stateless,slaac} + + IPv6 RA (Router Advertisement) mode, + valid modes: [dhcpv6-stateful, dhcpv6-stateless, slaac] + +.. option:: --ipv6-address-mode {dhcpv6-stateful,dhcpv6-stateless,slaac} + + IPv6 address mode, valid modes: [dhcpv6-stateful, dhcpv6-stateless, slaac] + +.. option:: --network + + Network this subnet belongs to (name or ID) + +.. _subnet_create-name: +.. describe:: + + Name of subnet to create + subnet list ----------- -- cgit v1.2.1