Aradhana Singh c99ec284db Add description field port create & port set
This patchset
1. adds description field to openstack port create and
 openstack port set.
2. updates method _add_updatable_args with 4 spaces instead
 of existing 8 spaces

Partially Implements: blueprint neutron-client-descriptions
Partially Implements: blueprint network-commands-options

Change-Id: I4598e555722b1de7bc47f3a9be0fd81eacfcb572
2016-10-17 22:21:34 +00:00

5.9 KiB

port

A port is a connection point for attaching a single device, such as the NIC of a server, to a network. The port also describes the associated network configuration, such as the MAC and IP addresses to be used on that port.

Network v2

port create

Create new port

port create

os port create
    --network <network>
    [--description <description>]
    [--fixed-ip subnet=<subnet>,ip-address=<ip-address>]
    [--device <device-id>]
    [--device-owner <device-owner>]
    [--vnic-type <vnic-type>]
    [--binding-profile <binding-profile>]
    [--host <host-id>]
    [--enable | --disable]
    [--mac-address <mac-address>]
    [--project <project> [--project-domain <project-domain>]]
    <name>

--network <network>

Network this port belongs to (name or ID)

--description <description>

Description of this port

--fixed-ip subnet=<subnet>,ip-address=<ip-address>

Desired IP and/or subnet (name or ID) for this port: subnet=<subnet>,ip-address=<ip-address> (repeat option to set multiple fixed IP addresses)

--device <device-id>

Port device ID

--device-owner <device-owner>

Device owner of this port. This is the entity that uses the port (for example, network:dhcp).

--vnic-type <vnic-type>

VNIC type for this port (direct | direct-physical | macvtap | normal | baremetal, default: normal)

--binding-profile <binding-profile>

Custom data to be passed as binding:profile. Data may be passed as <key>=<value> or JSON. (repeat option to set multiple binding:profile data)

--host <host-id>

Allocate port on host <host-id> (ID only)

--enable

Enable port (default)

--disable

Disable port

--mac-address <mac-address>

MAC address of this port

--project <project>

Owner's project (name or ID)

--project-domain <project-domain>

Domain the project belongs to (name or ID). This can be used in case collisions between project names exist.

Name of this port

port delete

Delete port(s)

port delete

os port delete
    <port> [<port> ...]




Port(s) to delete (name or ID)

port list

List ports

port list

os port list
    [--device-owner <device-owner>]
    [--router <router> | --server <server>]
    [--network <network>]

--device-owner <device-owner>

List only ports with the specified device owner. This is the entity that uses the port (for example, network:dhcp).

--router <router>

List only ports attached to this router (name or ID)

--server <server>

List only ports attached to this server (name or ID)

--network <network>

List only ports attached to this network (name or ID)

port set

Set port properties

port set

os port set
    [--description <description>]
    [--fixed-ip subnet=<subnet>,ip-address=<ip-address>]
    [--no-fixed-ip]
    [--device <device-id>]
    [--device-owner <device-owner>]
    [--vnic-type <vnic-type>]
    [--binding-profile <binding-profile>]
    [--no-binding-profile]
    [--host <host-id>]
    [--enable | --disable]
    [--name <name>]
    <port>

--description <description>

Description of this port

--fixed-ip subnet=<subnet>,ip-address=<ip-address>

Desired IP and/or subnet (name or ID) for this port: subnet=<subnet>,ip-address=<ip-address> (repeat option to set multiple fixed IP addresses)

--no-fixed-ip

Clear existing information of fixed IP addresses. Specify both --fixed-ip and --no-fixed-ip to overwrite the current fixed IP addresses.

--device <device-id>

Port device ID

--device-owner <device-owner>

Device owner of this port. This is the entity that uses the port (for example, network:dhcp).

--vnic-type <vnic-type>

VNIC type for this port (direct | direct-physical | macvtap | normal | baremetal, default: normal)

--binding-profile <binding-profile>

Custom data to be passed as binding:profile. Data may be passed as <key>=<value> or JSON. (repeat option to set multiple binding:profile data)

--no-binding-profile

Clear existing information of binding:profile. Specify both --binding-profile and --no-binding-profile to overwrite the current binding:profile information.

--host <host-id>

Allocate port on host <host-id> (ID only)

--enable

Enable port

--disable

Disable port

--name

Set port name

Port to modify (name or ID)

port show

Display port details

port show

os port show
    <port>




Port to display (name or ID)

port unset

Unset port properties

port unset

os port unset
    [--fixed-ip subnet=<subnet>,ip-address=<ip-address> [...]]
    [--binding-profile <binding-profile-key> [...]]
    <port>

--fixed-ip subnet=<subnet>,ip-address=<ip-address>

Desired IP and/or subnet (name or ID) which should be removed from this port: subnet=<subnet>,ip-address=<ip-address> (repeat option to unset multiple fixed IP addresses)

--binding-profile <binding-profile-key>

Desired key which should be removed from binding-profile (repeat option to unset multiple binding:profile data)

Port to modify (name or ID)