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 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431
|
.. -*- rst -*-
================
Trunk networking
================
The trunk extension can be used to multiplex packets coming from and going to
multiple neutron logical networks using a single neutron logical port. A trunk
is modeled in neutron as a collection of neutron logical ports. One port,
called parent port, must be associated to a trunk and it is *the* port to
be used to connect instances with neutron. A sequence of subports (or
sub_ports) each typically belonging to distinct neutron networks, is also
associated to a trunk, and each subport may have a segmentation type and ID
used to mux/demux the traffic coming in and out of the parent port.
In more details, the extension introduces the following resources:
- **trunk**. A top level logical entity to model the group of neutron
logical networks whose traffic flows through the trunk.
- **sub_port**. An association to a neutron logical port with attributes
segmentation_id and segmentation_type.
Resource timestamps
===================
The ``standard-attr-timestamp`` extension adds the ``created_at`` and
``updated_at`` attributes to all resources that have standard attributes.
Tag extension
=============
The ``standard-attr-tag`` adds Tag support for resources with
standard attributes by adding the ``tags`` attribute
allowing consumers to associate tags with resources.
List trunks
===========
.. rest_method:: GET /v2.0/trunks
Lists trunks that are accessible to the user who submits the request.
Default policy settings return only those trunks that are
owned by the user who submits the request, unless an admin user
submits the request.
.. include:: filtering-list.inc
Normal response codes: 200
Error response codes: 401, 404
Request Parameters
------------------
.. rest_parameters:: parameters.yaml
- admin_state_up: admin_state_up_trunk-query
- description: description-query
- id: id-query
- name: name-query
- port_id: trunk_port_id-query
- revision_number: revision_number-query
- status: trunk-status-query
- tenant_id: project_id-query
- project_id: project_id-query
- sort_dir: sort_dir
- sort_key: trunk-sort_key
- tags: tags-query
- tags-any: tags-any-query
- not-tags: not-tags-query
- not-tags-any: not-tags-any-query
Response Parameters
-------------------
.. rest_parameters:: parameters.yaml
- admin_state_up: admin_state_up_trunk
- created_at: created_at_resource
- description: description_resource
- id: id_resource
- name: name_resource
- port_id: trunk_port_id
- revision_number: revision_number
- status: trunk-status
- tenant_id: project_id-request
- project_id: project_id-request
- sub_ports: sub_ports
- updated_at: updated_at_resource
- tags: tags
Response Example
----------------
.. literalinclude:: ../v2/samples/trunks/trunks-list-response.json
:language: javascript
Create trunk
============
.. rest_method:: POST /v2.0/trunks
Error codes:
- ``400`` The operation returns this error code if the request is malformed,
e.g. there are missing or invalid parameters in the request.
- ``401`` The operation is not authorized.
- ``404`` If the extension is not available or the port UUID of any of the
specified ports is not found.
- ``409`` The operation returns this error code for one of these
reasons:
- A port to be used as subport is in use by another trunk.
- The segmentation type and segmentation ID are already in use in the trunk.
- A port to be used as parent port is in use by another trunk or cannot be trunked.
- A system configuration prevents the operation from succeeding.
Normal response codes: 201
Error response codes: 400, 401, 404, 409
Request
-------
.. rest_parameters:: parameters.yaml
- tenant_id: project_id
- project_id: project_id
- port_id: trunk_port_id
- name: name_resource
- description: description_resource
- admin_state_up: admin_state_up_trunk
- sub_ports: sub_ports
Request Example
---------------
.. literalinclude:: ../v2/samples/trunks/trunk-create-request.json
:language: javascript
Response Parameters
-------------------
.. rest_parameters:: parameters.yaml
- admin_state_up: admin_state_up_trunk
- created_at: created_at_resource
- description: description_resource
- id: id_resource
- name: name_resource
- port_id: trunk_port_id
- revision_number: revision_number
- status: trunk-status
- tenant_id: project_id
- project_id: project_id
- sub_ports: sub_ports
- updated_at: updated_at_resource
- tags: tags
Response Example
----------------
.. literalinclude:: ../v2/samples/trunks/trunks-create-response.json
:language: javascript
Add subports to trunk
=====================
.. rest_method:: PUT /v2.0/trunks/{trunk_id}/add_subports
Normal response codes: 200
Error response codes: 400, 401, 404, 409
Request
-------
.. rest_parameters:: parameters.yaml
- trunk_id: trunk_id
- segmentation_id: segmentation_id
- segmentation_type: segmentation_type-request
- port_id: port_id_subport
Request Example
---------------
.. literalinclude:: ../v2/samples/trunks/trunk-add-subports-request.json
:language: javascript
Response Parameters
-------------------
.. rest_parameters:: parameters.yaml
- admin_state_up: admin_state_up_trunk
- created_at: created_at_resource
- description: description_resource
- id: id_resource
- name: name_resource
- port_id: trunk_port_id
- revision_number: revision_number
- status: trunk-status
- tenant_id: project_id
- project_id: project_id
- sub_ports: sub_ports
- updated_at: updated_at_resource
- tags: tags
Response Example
----------------
.. literalinclude:: ../v2/samples/trunks/trunk-add-subports-response.json
:language: javascript
Delete subports from trunk
==========================
.. rest_method:: PUT /v2.0/trunks/{trunk_id}/remove_subports
Normal response codes: 200
Error response codes: 400, 401, 404, 409
Request
-------
.. rest_parameters:: parameters.yaml
- trunk_id: trunk_id
- port_id: port_id
Request Example
---------------
.. literalinclude:: ../v2/samples/trunks/trunk-remove-subports-request.json
:language: javascript
Response Parameters
-------------------
.. rest_parameters:: parameters.yaml
- admin_state_up: admin_state_up_trunk
- created_at: created_at_resource
- description: description_resource
- id: id_resource
- name: name_resource
- port_id: trunk_port_id
- revision_number: revision_number
- status: trunk-status
- tenant_id: project_id
- project_id: project_id
- sub_ports: sub_ports
- updated_at: updated_at_resource
- tags: tags
Response Example
----------------
.. literalinclude:: ../v2/samples/trunks/trunk-remove-subports-response.json
:language: javascript
List subports for trunk
=======================
.. rest_method:: GET /v2.0/trunks/{trunk_id}/get_subports
Normal response codes: 200
.. include:: filtering-list.inc
Error response codes: 401, 404
Request
-------
.. rest_parameters:: parameters.yaml
- trunk_id: trunk_id
Response Parameters
-------------------
.. rest_parameters:: parameters.yaml
- port_id: port_id_subport
- segmentation_type: segmentation_type
- segmentation_id: segmentation_id
- tags: tags
Response Example
----------------
.. literalinclude:: ../v2/samples/trunks/trunk-list-subports-response.json
:language: javascript
Update trunk
============
.. rest_method:: PUT /v2.0/trunks/{trunk_id}
The update request is only for changing fields like name, description or
admin_state_up. Setting the admin_state_up to False locks the trunk in
that it prevents operations such as as adding/removing subports.
Normal response codes: 200
Error response codes: 400, 401, 404, 409, 412
Request
-------
.. rest_parameters:: parameters.yaml
- name_resource: name_resource
- admin_state_up_trunk: admin_state_up
- description_resource: description_resource
- trunk_id: trunk_id
Request Example
---------------
.. literalinclude:: ../v2/samples/trunks/trunk-update-request.json
:language: javascript
Response Parameters
-------------------
.. rest_parameters:: parameters.yaml
- admin_state_up: admin_state_up_trunk
- created_at: created_at_resource
- description: description_resource
- id: id_resource
- name: name_resource
- port_id: trunk_port_id
- revision_number: revision_number
- status: trunk-status
- tenant_id: project_id
- project_id: project_id
- sub_ports: sub_ports
- updated_at: updated_at_resource
- tags: tags
Response Example
----------------
.. literalinclude:: ../v2/samples/trunks/trunk-update-response.json
:language: javascript
Show trunk
==========
.. rest_method:: GET /v2.0/trunks/{trunk_id}
Shows details for a trunk.
.. include:: filtering-show.inc
Normal response codes: 200
Error response codes: 401, 404
Request
-------
.. rest_parameters:: parameters.yaml
- trunk_id: trunk_id
Response Parameters
-------------------
.. rest_parameters:: parameters.yaml
- admin_state_up: admin_state_up_trunk
- created_at: created_at_resource
- description: description_resource
- id: id_resource
- name: name_resource
- port_id: trunk_port_id
- revision_number: revision_number
- status: trunk-status
- tenant_id: project_id
- project_id: project_id
- sub_ports: sub_ports
- updated_at: updated_at_resource
- tags: tags
Response Example
----------------
.. literalinclude:: ../v2/samples/trunks/trunk-show-response.json
:language: javascript
Delete trunk
============
.. rest_method:: DELETE /v2.0/trunks/{trunk_id}
Deletes a trunk, if its state allows it.
Normal response codes: 204
Error response codes: 401, 404, 409, 412
Request
-------
.. rest_parameters:: parameters.yaml
- trunk_id: trunk_id
|