The ironic.api.controllers.v1.port Module

class ironic.api.controllers.v1.port.Port(**kwargs)[source]

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 sample(expand=True)[source]
class ironic.api.controllers.v1.port.PortCollection(**kwargs)[source]

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

API representation of a collection of ports.

classmethod sample()[source]
class ironic.api.controllers.v1.port.PortPatchType(**kw)[source]

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

class ironic.api.controllers.v1.port.PortsController[source]

Bases: pecan.rest.RestController

REST controller for Ports.

delete(*args, **kwargs)[source]

Delete a port.

Parameters:port_uuid – UUID of a port.
detail(*args, **kwargs)[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.
  • marker – pagination marker for large data sets.
  • limit – maximum number of resources to return in a single result.
  • sort_key – column to sort results by. Default: id.
  • sort_dir – direction to sort. “asc” or “desc”. Default: asc.
get_all(*args, **kwargs)[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.
  • 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.
get_one(*args, **kwargs)[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.
patch(*args, **kwargs)[source]

Update an existing port.

Parameters:
  • port_uuid – UUID of a port.
  • patch – a json PATCH document to apply to this port.
post(*args, **kwargs)[source]

Create a new port.

Parameters:port – a port within the request body.

Project Source

This Page