NoneBases: ironic.objects.base.IronicObject, oslo_versionedobjects.base.VersionedObjectDictCompat
Port.create(context=None)¶Create a Port record in the DB.
| Parameters: | 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) |
|---|---|
| Raises: | MACAlreadyExists if ‘address’ column is not unique |
| Raises: | PortAlreadyExists if ‘uuid’ column is not unique |
Port.destroy(context=None)¶Delete the Port from the DB.
| Parameters: | 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) |
|---|---|
| Raises: | PortNotFound |
Port.get(context, port_id)¶Find a port.
Find a port based on its id or uuid or MAC address and return a Port object.
| Parameters: |
|
|---|---|
| Returns: | a |
| Raises: | InvalidIdentity |
Port.get_by_address(context, address)¶Find a port based on address and return a Port object.
| Parameters: |
|
|---|---|
| Returns: | a |
| Raises: | PortNotFound |
Port.get_by_id(context, port_id)¶Find a port based on its integer ID and return a Port object.
| Parameters: |
|
|---|---|
| Returns: | a |
| Raises: | PortNotFound |
Port.get_by_uuid(context, uuid)¶Find a port based on UUID and return a Port object.
| Parameters: |
|
|---|---|
| Returns: | a |
| Raises: | PortNotFound |
Port.list(context, limit=None, marker=None, sort_key=None, sort_dir=None)¶Return a list of Port objects.
| Parameters: |
|
|---|---|
| Returns: | a list of |
| Raises: | InvalidParameterValue |
Port.list_by_node_id(context, node_id, limit=None, marker=None, sort_key=None, sort_dir=None)¶Return a list of Port objects associated with a given node ID.
| Parameters: |
|
|---|---|
| Returns: | a list of |
Port.list_by_portgroup_id(context, portgroup_id, limit=None, marker=None, sort_key=None, sort_dir=None)¶Return a list of Port objects associated with a given portgroup ID.
| Parameters: |
|
|---|---|
| Returns: | a list of |
Port.refresh(context=None)¶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.
| Parameters: | 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) |
|---|---|
| Raises: | PortNotFound |
Port.save(context=None)¶Save updates to this Port.
Updates will be made column by column based on the result of self.what_changed().
| Parameters: | 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) |
|---|---|
| Raises: | PortNotFound |
| Raises: | MACAlreadyExists if ‘address’ column is not unique |
Port.supports_physical_network()¶Return whether the physical_network field is supported.
| Returns: | Whether the physical_network field is supported |
|---|---|
| Raises: | ovo_exception.IncompatibleObjectVersion |
NoneBases: ironic.objects.notification.NotificationBase
Notification emitted when ironic creates, updates or deletes a port.
NoneBases: ironic.objects.notification.NotificationPayloadBase
Except where otherwise noted, this document is licensed under Creative Commons Attribution 3.0 License. See all OpenStack Legal Documents.