NoneBases: ironic.objects.base.IronicObject
Trait.create(context=None)¶Create a Trait 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.: Trait(context). |
|---|---|
| Raises: | InvalidParameterValue if adding the trait would exceed the per-node traits limit. |
| Raises: | NodeNotFound if the node no longer appears in the database. |
Trait.destroy(context, node_id, trait)¶Delete the Trait from the DB.
| Parameters: |
|
|---|---|
| Raises: | NodeNotFound if the node no longer appears in the database. |
| Raises: | NodeTraitNotFound if the trait is not found. |
Trait.exists(context, node_id, trait)¶Check whether a Trait exists in the DB.
| Parameters: |
|
|---|---|
| Returns: | True if the trait exists otherwise False. |
| Raises: | NodeNotFound if the node no longer appears in the database. |
NoneBases: ironic.objects.base.IronicObjectListBase, ironic.objects.base.IronicObject
TraitList.create(context, node_id, traits)[source]¶Replace all existing traits with the specified list.
| Parameters: |
|
|---|---|
| Raises: | InvalidParameterValue if adding the trait would exceed the per-node traits limit. |
| Raises: | NodeNotFound if the node no longer appears in the database. |
TraitList.destroy(context, node_id)[source]¶Delete all traits for the specified node.
| Parameters: |
|
|---|---|
| Raises: | NodeNotFound if the node no longer appears in the database. |
TraitList.get_by_node_id(context, node_id)[source]¶Return all traits for the specified node.
| Parameters: |
|
|---|---|
| Raises: | NodeNotFound if the node no longer appears in the database. |
Except where otherwise noted, this document is licensed under Creative Commons Attribution 3.0 License. See all OpenStack Legal Documents.