ironic.objects.port.
Port
(context=None, **kwargs)[source]¶Bases: ironic.objects.base.IronicObject
, oslo_versionedobjects.base.VersionedObjectDictCompat
VERSION
= '1.9'¶address
¶create
(context=None)[source]¶Create a Port record in the DB.
context – Security context. NOTE: This should only be used internally by the indirection_api. Unfortunately, RPC requires context as the first argument, even though we don’t use it. A context should be set when instantiating the object, e.g.: Port(context)
MACAlreadyExists if ‘address’ column is not unique
PortAlreadyExists if ‘uuid’ column is not unique
created_at
¶dbapi
= <oslo_db.api.DBAPI object>¶destroy
(context=None)[source]¶Delete the Port from the DB.
context – Security context. NOTE: This should only be used internally by the indirection_api. Unfortunately, RPC requires context as the first argument, even though we don’t use it. A context should be set when instantiating the object, e.g.: Port(context)
PortNotFound
extra
¶fields
= {'address': MACAddress(default=<class 'oslo_versionedobjects.fields.UnspecifiedDefault'>,nullable=True), 'created_at': DateTime(default=<class 'oslo_versionedobjects.fields.UnspecifiedDefault'>,nullable=True), 'extra': FlexibleDict(default=<class 'oslo_versionedobjects.fields.UnspecifiedDefault'>,nullable=True), 'id': Integer(default=<class 'oslo_versionedobjects.fields.UnspecifiedDefault'>,nullable=False), 'internal_info': FlexibleDict(default=<class 'oslo_versionedobjects.fields.UnspecifiedDefault'>,nullable=True), 'is_smartnic': Boolean(default=False,nullable=True), 'local_link_connection': FlexibleDict(default=<class 'oslo_versionedobjects.fields.UnspecifiedDefault'>,nullable=True), 'node_id': Integer(default=<class 'oslo_versionedobjects.fields.UnspecifiedDefault'>,nullable=True), 'physical_network': String(default=<class 'oslo_versionedobjects.fields.UnspecifiedDefault'>,nullable=True), 'portgroup_id': Integer(default=<class 'oslo_versionedobjects.fields.UnspecifiedDefault'>,nullable=True), 'pxe_enabled': Boolean(default=<class 'oslo_versionedobjects.fields.UnspecifiedDefault'>,nullable=False), 'updated_at': DateTime(default=<class 'oslo_versionedobjects.fields.UnspecifiedDefault'>,nullable=True), 'uuid': UUID(default=<class 'oslo_versionedobjects.fields.UnspecifiedDefault'>,nullable=True)}¶get
(context, port_id)[source]¶Find a port.
Find a port based on its id or uuid or MAC address and return a Port object.
context – Security context
port_id – the id or uuid or MAC address of a port.
a Port
object.
InvalidIdentity
get_by_address
(context, address, owner=None, project=None)[source]¶Find a port based on address and return a Port
object.
get_by_id
(context, port_id)[source]¶Find a port based on its integer ID and return a Port object.
id
¶internal_info
¶is_smartnic
¶list
(context, limit=None, marker=None, sort_key=None, sort_dir=None, owner=None, project=None)[source]¶Return a list of Port objects.
context – Security context.
limit – maximum number of resources to return in a single result.
marker – pagination marker for large data sets.
sort_key – column to sort results by.
sort_dir – direction to sort. “asc” or “desc”.
owner – DEPRECATED a node owner to match against
project – a node owner or lessee to match against
a list of Port
object.
InvalidParameterValue
list_by_node_id
(context, node_id, limit=None, marker=None, sort_key=None, sort_dir=None, owner=None, project=None)[source]¶Return a list of Port objects associated with a given node ID.
context – Security context.
node_id – the ID of the node.
limit – maximum number of resources to return in a single result.
marker – pagination marker for large data sets.
sort_key – column to sort results by.
sort_dir – direction to sort. “asc” or “desc”.
owner – DEPRECATED a node owner to match against
project – a node owner or lessee to match against
a list of Port
object.
list_by_portgroup_id
(context, portgroup_id, limit=None, marker=None, sort_key=None, sort_dir=None, owner=None, project=None)[source]¶Return a list of Port objects associated with a given portgroup ID.
context – Security context.
portgroup_id – the ID of the portgroup.
limit – maximum number of resources to return in a single result.
marker – pagination marker for large data sets.
sort_key – column to sort results by.
sort_dir – direction to sort. “asc” or “desc”.
owner – DEPRECATED a node owner to match against
project – a node owner or lessee to match against
a list of Port
object.
local_link_connection
¶node_id
¶physical_network
¶portgroup_id
¶pxe_enabled
¶refresh
(context=None)[source]¶Loads updates for this Port.
Loads a port with the same uuid from the database and checks for updated attributes. Updates are applied from the loaded port column by column, if there are any updates.
context – Security context. NOTE: This should only be used internally by the indirection_api. Unfortunately, RPC requires context as the first argument, even though we don’t use it. A context should be set when instantiating the object, e.g.: Port(context)
PortNotFound
save
(context=None)[source]¶Save updates to this Port.
Updates will be made column by column based on the result of self.what_changed().
context – Security context. NOTE: This should only be used internally by the indirection_api. Unfortunately, RPC requires context as the first argument, even though we don’t use it. A context should be set when instantiating the object, e.g.: Port(context)
PortNotFound
MACAlreadyExists if ‘address’ column is not unique
supports_is_smartnic
()[source]¶Return whether is_smartnic field is supported.
Whether is_smartnic field is supported
ovo_exception.IncompatibleObjectVersion
supports_physical_network
()[source]¶Return whether the physical_network field is supported.
Whether the physical_network field is supported
ovo_exception.IncompatibleObjectVersion
updated_at
¶uuid
¶ironic.objects.port.
PortCRUDNotification
(context=None, **kwargs)[source]¶Bases: ironic.objects.notification.NotificationBase
Notification emitted when ironic creates, updates or deletes a port.
VERSION
= '1.0'¶created_at
¶event_type
¶fields
= {'created_at': DateTime(default=<class 'oslo_versionedobjects.fields.UnspecifiedDefault'>,nullable=True), 'event_type': Object(default=<class 'oslo_versionedobjects.fields.UnspecifiedDefault'>,nullable=False), 'level': NotificationLevel(default=<class 'oslo_versionedobjects.fields.UnspecifiedDefault'>,nullable=False,valid_values=('debug', 'info', 'warning', 'error', 'critical')), 'payload': Object(default=<class 'oslo_versionedobjects.fields.UnspecifiedDefault'>,nullable=False), 'publisher': Object(default=<class 'oslo_versionedobjects.fields.UnspecifiedDefault'>,nullable=False), 'updated_at': DateTime(default=<class 'oslo_versionedobjects.fields.UnspecifiedDefault'>,nullable=True)}¶level
¶payload
¶publisher
¶updated_at
¶ironic.objects.port.
PortCRUDPayload
(port, node_uuid, portgroup_uuid)[source]¶Bases: ironic.objects.notification.NotificationPayloadBase
SCHEMA
= {'address': ('port', 'address'), 'created_at': ('port', 'created_at'), 'extra': ('port', 'extra'), 'is_smartnic': ('port', 'is_smartnic'), 'local_link_connection': ('port', 'local_link_connection'), 'physical_network': ('port', 'physical_network'), 'pxe_enabled': ('port', 'pxe_enabled'), 'updated_at': ('port', 'updated_at'), 'uuid': ('port', 'uuid')}¶VERSION
= '1.3'¶address
¶created_at
¶extra
¶fields
= {'address': MACAddress(default=<class 'oslo_versionedobjects.fields.UnspecifiedDefault'>,nullable=True), 'created_at': DateTime(default=<class 'oslo_versionedobjects.fields.UnspecifiedDefault'>,nullable=True), 'extra': FlexibleDict(default=<class 'oslo_versionedobjects.fields.UnspecifiedDefault'>,nullable=True), 'is_smartnic': Boolean(default=False,nullable=True), 'local_link_connection': FlexibleDict(default=<class 'oslo_versionedobjects.fields.UnspecifiedDefault'>,nullable=True), 'node_uuid': UUID(default=<class 'oslo_versionedobjects.fields.UnspecifiedDefault'>,nullable=False), 'physical_network': String(default=<class 'oslo_versionedobjects.fields.UnspecifiedDefault'>,nullable=True), 'portgroup_uuid': UUID(default=<class 'oslo_versionedobjects.fields.UnspecifiedDefault'>,nullable=True), 'pxe_enabled': Boolean(default=<class 'oslo_versionedobjects.fields.UnspecifiedDefault'>,nullable=True), 'updated_at': DateTime(default=<class 'oslo_versionedobjects.fields.UnspecifiedDefault'>,nullable=True), 'uuid': UUID(default=<class 'oslo_versionedobjects.fields.UnspecifiedDefault'>,nullable=False)}¶is_smartnic
¶local_link_connection
¶node_uuid
¶physical_network
¶portgroup_uuid
¶pxe_enabled
¶updated_at
¶uuid
¶Except where otherwise noted, this document is licensed under Creative Commons Attribution 3.0 License. See all OpenStack Legal Documents.