ironic.api.controllers.v1.port module

ironic.api.controllers.v1.port module

service None

Bases: ironic.api.controllers.base.APIBase

API representation of a port.

This class enforces type checking and value constraints, and converts between the internal object model and the API representation of a port.

classmethod Port.sample(expand=True)
service None

Bases: ironic.api.controllers.v1.collection.Collection

API representation of a collection of ports.

classmethod PortCollection.sample()
service None

Bases: ironic.api.controllers.v1.types.JsonPatchType

static PortPatchType.internal_attrs()

Returns a list of internal attributes.

Internal attributes can’t be added, replaced or removed. This method may be overwritten by derived class.

service None

Bases: pecan.rest.RestController

REST controller for Ports.

PortsController.delete(port_uuid)[source]

Delete a port.

Parameters:port_uuid – UUID of a port.
Raises:OperationNotPermitted, HTTPNotFound
PortsController.detail(node=None, node_uuid=None, address=None, marker=None, limit=None, sort_key='id', sort_dir='asc', portgroup=None)[source]

Retrieve a list of ports with detail.

Note that the ‘node_uuid’ interface is deprecated in favour of the ‘node’ interface

Parameters:
  • node – UUID or name of a node, to get only ports for that node.
  • node_uuid – UUID of a node, to get only ports for that node.
  • address – MAC address of a port, to get the port which has this MAC address.
  • portgroup – UUID or name of a portgroup, to get only ports for that portgroup.
  • marker – pagination marker for large data sets.
  • limit – maximum number of resources to return in a single result. This value cannot be larger than the value of max_limit in the [api] section of the ironic configuration, or only max_limit resources will be returned.
  • sort_key – column to sort results by. Default: id.
  • sort_dir – direction to sort. “asc” or “desc”. Default: asc.
Raises:

NotAcceptable, HTTPNotFound

PortsController.get_all(node=None, node_uuid=None, address=None, marker=None, limit=None, sort_key='id', sort_dir='asc', fields=None, portgroup=None, detail=None)[source]

Retrieve a list of ports.

Note that the ‘node_uuid’ interface is deprecated in favour of the ‘node’ interface

Parameters:
  • node – UUID or name of a node, to get only ports for that node.
  • node_uuid – UUID of a node, to get only ports for that node.
  • address – MAC address of a port, to get the port which has this MAC address.
  • marker – pagination marker for large data sets.
  • limit – maximum number of resources to return in a single result. This value cannot be larger than the value of max_limit in the [api] section of the ironic configuration, or only max_limit resources will be returned.
  • sort_key – column to sort results by. Default: id.
  • sort_dir – direction to sort. “asc” or “desc”. Default: asc.
  • fields – Optional, a list with a specified set of fields of the resource to be returned.
  • portgroup – UUID or name of a portgroup, to get only ports for that portgroup.
Raises:

NotAcceptable, HTTPNotFound

PortsController.get_one(port_uuid, fields=None)[source]

Retrieve information about the given port.

Parameters:
  • port_uuid – UUID of a port.
  • fields – Optional, a list with a specified set of fields of the resource to be returned.
Raises:

NotAcceptable, HTTPNotFound

PortsController.patch(port_uuid, patch)[source]

Update an existing port.

Parameters:
  • port_uuid – UUID of a port.
  • patch – a json PATCH document to apply to this port.
Raises:

NotAcceptable, HTTPNotFound

PortsController.post(port)[source]

Create a new port.

Parameters:port – a port within the request body.
Raises:NotAcceptable, HTTPNotFound, Conflict
Creative Commons Attribution 3.0 License

Except where otherwise noted, this document is licensed under Creative Commons Attribution 3.0 License. See all OpenStack Legal Documents.