ironic.objects.inspection_rule module¶
- class ironic.objects.inspection_rule.InspectionRule(context=None, **kwargs)[source]¶
- Bases: - IronicObject,- VersionedObjectDictCompat- VERSION = '1.1'¶
 - property actions¶
 - property conditions¶
 - create(context=None)[source]¶
- Create a InspectionRule 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.: InspectionRule(context). 
- Raises:
- InspectionRuleName if a inspection rule with the same name exists. 
- Raises:
- InspectionRuleAlreadyExists if a inspection rule with the same UUID exists. 
 
 - property created_at¶
 - dbapi = <oslo_db.api.DBAPI object>¶
 - property description¶
 - destroy()[source]¶
- Delete the InspectionRule from the DB. - Parameters:
- context – security context. NOTE: This should only be used internally by the indirection_api, but, 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.: InspectionRule(context). 
- Raises:
- InspectionRuleNotFound if the inspection_rule no longer appears in the database. 
 
 - fields = {'actions': List(default=<class 'oslo_versionedobjects.fields.UnspecifiedDefault'>,nullable=False), 'conditions': List(default=<class 'oslo_versionedobjects.fields.UnspecifiedDefault'>,nullable=True), 'created_at': DateTime(default=<class 'oslo_versionedobjects.fields.UnspecifiedDefault'>,nullable=True), 'description': String(default=<class 'oslo_versionedobjects.fields.UnspecifiedDefault'>,nullable=True), 'id': Integer(default=<class 'oslo_versionedobjects.fields.UnspecifiedDefault'>,nullable=False), 'phase': String(default=main,nullable=True), 'priority': Integer(default=0,nullable=False), 'scope': String(default=<class 'oslo_versionedobjects.fields.UnspecifiedDefault'>,nullable=True), 'sensitive': Boolean(default=False,nullable=False), 'updated_at': DateTime(default=<class 'oslo_versionedobjects.fields.UnspecifiedDefault'>,nullable=True), 'uuid': UUID(default=<class 'oslo_versionedobjects.fields.UnspecifiedDefault'>,nullable=False)}¶
 - classmethod get_by_uuid(context, uuid)[source]¶
- Find a inspection rule based on its UUID. - 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.: InspectionRule(context). 
- uuid – The UUID of a inspection rule. 
 
- Raises:
- InspectionRuleNotFound if the inspection rule no longer appears in the database. 
- Returns:
- a - InspectionRuleobject.
 
 - property id¶
 - classmethod list(context, limit=None, marker=None, sort_key=None, sort_dir=None, filters=None)[source]¶
- Return a list of InspectionRule objects. - 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.: InspectionRule(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”. 
 
- Returns:
- a list of - InspectionRuleobjects.
 
 - property phase¶
 - property priority¶
 - refresh(context=None)[source]¶
- Loads updates for this inspection rule. - Loads a inspection rule with the same uuid from the database and checks for updated attributes. Updates are applied from the loaded rule 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:
- InspectionRuleNotFound if the inspection rule no longer appears in the database. 
 
 - save(context=None)[source]¶
- Save updates to this InspectionRule. - Column-wise updates will be made based on the result of self.what_changed(). - Parameters:
- context – Security context. NOTE: This should only be used internally by the indirection_api, but, 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.: InspectionRule(context) 
- Raises:
- InspectionRuleNotFound if the inspection rule does not exist. 
 
 - property scope¶
 - property sensitive¶
 - property updated_at¶
 - property uuid¶
 
- class ironic.objects.inspection_rule.InspectionRuleCRUDNotification(context=None, **kwargs)[source]¶
- Bases: - NotificationBase- Notification emitted on inspection rule API operations. - VERSION = '1.0'¶
 - property created_at¶
 - property 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)}¶
 - property level¶
 - property payload¶
 - property publisher¶
 - property updated_at¶
 
- class ironic.objects.inspection_rule.InspectionRuleCRUDPayload(inspection_rule, **kwargs)[source]¶
- Bases: - NotificationPayloadBase- SCHEMA = {'actions': ('inspection_rule', 'actions'), 'conditions': ('inspection_rule', 'conditions'), 'created_at': ('inspection_rule', 'created_at'), 'description': ('inspection_rule', 'description'), 'phase': ('inspection_rule', 'phase'), 'priority': ('inspection_rule', 'priority'), 'scope': ('inspection_rule', 'scope'), 'sensitive': ('inspection_rule', 'sensitive'), 'updated_at': ('inspection_rule', 'updated_at'), 'uuid': ('inspection_rule', 'uuid')}¶
 - VERSION = '1.0'¶
 - property actions¶
 - property conditions¶
 - property created_at¶
 - property description¶
 - fields = {'actions': List(default=<class 'oslo_versionedobjects.fields.UnspecifiedDefault'>,nullable=False), 'conditions': List(default=<class 'oslo_versionedobjects.fields.UnspecifiedDefault'>,nullable=True), 'created_at': DateTime(default=<class 'oslo_versionedobjects.fields.UnspecifiedDefault'>,nullable=True), 'description': String(default=<class 'oslo_versionedobjects.fields.UnspecifiedDefault'>,nullable=True), 'phase': String(default=main,nullable=True), 'priority': Integer(default=0,nullable=False), 'scope': String(default=<class 'oslo_versionedobjects.fields.UnspecifiedDefault'>,nullable=True), 'sensitive': Boolean(default=False,nullable=False), 'updated_at': DateTime(default=<class 'oslo_versionedobjects.fields.UnspecifiedDefault'>,nullable=True), 'uuid': UUID(default=<class 'oslo_versionedobjects.fields.UnspecifiedDefault'>,nullable=False)}¶
 - property phase¶
 - property priority¶
 - property scope¶
 - property sensitive¶
 - property updated_at¶
 - property uuid¶
 
