summaryrefslogtreecommitdiff
path: root/doc/source/command-objects/port.rst
blob: 4d7b95b4e312f7abde0440d900d5bd31cacfc9e2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
====
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

.. program:: port create
.. code:: bash

    os port create
        --network <network>
        [--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>

.. option:: --network <network>

    Network this port belongs to (name or ID)

.. option:: --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)

.. option:: --device <device-id>

    Port device ID

.. option:: --device-owner <device-owner>

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

.. option:: --vnic-type <vnic-type>

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

.. option:: --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)

.. option:: --host <host-id>

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

.. option:: --enable

    Enable port (default)

.. option:: --disable

    Disable port

.. option:: --mac-address <mac-address>

    MAC address of this port

.. 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.

.. _port_create-name:
.. describe:: <name>

    Name of this port

port delete
-----------

Delete port(s)

.. program:: port delete
.. code:: bash

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

.. _port_delete-port:
.. describe:: <port>

    Port(s) to delete (name or ID)

port list
---------

List ports

.. program:: port list
.. code:: bash

    os port list
        [--device-owner <device-owner>]
        [--router <router>]

.. option:: --device-owner <device-owner>

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

.. option:: --router <router>

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

port set
--------

Set port properties

.. program:: port set
.. code:: bash

    os port set
        [--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>

.. option:: --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)

.. option:: --no-fixed-ip

    Clear existing information of fixed IP addresses

.. option:: --device <device-id>

    Port device ID

.. option:: --device-owner <device-owner>

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

.. option:: --vnic-type <vnic-type>

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

.. option:: --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)

.. option:: --no-binding-profile

    Clear existing information of binding:profile

.. option:: --host <host-id>

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

.. option:: --enable

    Enable port

.. option:: --disable

    Disable port

.. option:: --name

    Set port name

.. _port_set-port:
.. describe:: <port>

    Port to modify (name or ID)

port show
---------

Display port details

.. program:: port show
.. code:: bash

    os port show
        <port>

.. _port_show-port:
.. describe:: <port>

    Port to display (name or ID)

port unset
----------

Unset port properties

.. program:: port unset
.. code:: bash

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

.. option:: --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)

.. option:: --binding-profile <binding-profile-key>

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

.. _port_unset-port:
.. describe:: <port>

    Port to modify (name or ID)