openstack-python-openstackc.../doc/source/command-objects/network.rst
Tang Chen ddc97c6dc5 Support "network list" command in nova network
"network list" command is not implemented in nova network.
This patch implements it.

The Network object in novaclient is quite different from
the one in sdk. And the output of "network list" using
Nova network is also quite different from using Neutron.

It is like this:

# openstack network list
+--------------------------------------+---------+-------------+
| ID                                   | Name    | Subnet      |
+--------------------------------------+---------+-------------+
| 96a98ec4-31f6-45f6-99e6-9384569b3bb5 | private | 10.0.0.0/24 |
+--------------------------------------+---------+-------------+

--long and --external options have not been implemented because
the attrs in Network object in novaclient is too much different.

This patch also introduces a new FakeNetwork class in compute/v2/fake.py
to fake nova network.

Change-Id: Id1fdf81fb2fa8b39f2c76b7bae37ac4fecafd0f7
Depends-On: I1b59264cd40aaf1062f4e8db233ccb7fd0e95f0e
partial-Bug: 1543672
2016-02-17 17:04:43 +08:00

146 lines
2.3 KiB
ReStructuredText

=======
network
=======
Compute v2, Network v2
network create
--------------
Create new network
.. program:: network create
.. code:: bash
os network create
[--project <project> [--project-domain <project-domain>]]
[--enable | --disable]
[--share | --no-share]
[--availability-zone-hint <availability-zone>]
<name>
.. option:: --project <project>
Owner's project (name or ID)
.. option:: --project-domain <project-domain>
Domain the project belongs to (name or ID).
This can be used in case collisions between project names exist.
.. option:: --enable
Enable network (default)
.. option:: --disable
Disable network
.. option:: --share
Share the network between projects
.. option:: --no-share
Do not share the network between projects
.. option:: --availability-zone-hint <availability-zone>
Availability Zone in which to create this network (requires the Network
Availability Zone extension, this option can be repeated).
.. _network_create-name:
.. describe:: <name>
New network name
network delete
--------------
Delete network(s)
.. program:: network delete
.. code:: bash
os network delete
<network> [<network> ...]
.. _network_delete-network:
.. describe:: <network>
Network(s) to delete (name or ID)
network list
------------
List networks
.. program:: network list
.. code:: bash
os network list
[--external]
[--long]
.. option:: --external
List external networks
.. option:: --long
List additional fields in output
network set
-----------
Set network properties
.. program:: network set
.. code:: bash
os network set
[--name <name>]
[--enable | --disable]
[--share | --no-share]
<network>
.. option:: --name <name>
Set network name
.. option:: --enable
Enable network
.. option:: --disable
Disable network
.. option:: --share
Share the network between projects
.. option:: --no-share
Do not share the network between projects
.. _network_set-network:
.. describe:: <network>
Network to modify (name or ID)
network show
------------
Display network details
.. program:: network show
.. code:: bash
os network show
<network>
.. _network_show-network:
.. describe:: <network>
Network to display (name or ID)