ironic.objects.fields module¶
-
class
ironic.objects.fields.BooleanField(**kwargs)[source]¶ Bases:
oslo_versionedobjects.fields.BooleanField
-
class
ironic.objects.fields.DateTimeField(tzinfo_aware=True, **kwargs)[source]¶ Bases:
oslo_versionedobjects.fields.DateTimeField
-
class
ironic.objects.fields.EnumField(valid_values, **kwargs)[source]¶ Bases:
oslo_versionedobjects.fields.EnumField
-
class
ironic.objects.fields.FlexibleDict[source]¶ Bases:
oslo_versionedobjects.fields.FieldType-
static
coerce(obj, attr, value)[source]¶ This is called to coerce (if possible) a value on assignment.
This method should convert the value given into the designated type, or throw an exception if this is not possible.
- Param:obj
The VersionedObject on which an attribute is being set
- Param:attr
The name of the attribute being set
- Param:value
The value being set
- Returns
A properly-typed value
-
static
-
class
ironic.objects.fields.FlexibleDictField(**kwargs)[source]¶ Bases:
oslo_versionedobjects.fields.AutoTypedField-
AUTO_TYPE= <ironic.objects.fields.FlexibleDict object>¶
-
-
class
ironic.objects.fields.IntegerField(**kwargs)[source]¶ Bases:
oslo_versionedobjects.fields.IntegerField
-
class
ironic.objects.fields.ListOfFlexibleDictsField(**kwargs)[source]¶ Bases:
oslo_versionedobjects.fields.AutoTypedField-
AUTO_TYPE= <oslo_versionedobjects.fields.List object>¶
-
-
class
ironic.objects.fields.ListOfObjectsField(objtype, subclasses=False, **kwargs)[source]¶ Bases:
oslo_versionedobjects.fields.ListOfObjectsField
-
class
ironic.objects.fields.ListOfStringsField(**kwargs)[source]¶ Bases:
oslo_versionedobjects.fields.ListOfStringsField
-
class
ironic.objects.fields.MACAddress[source]¶ Bases:
oslo_versionedobjects.fields.FieldType-
static
coerce(obj, attr, value)[source]¶ This is called to coerce (if possible) a value on assignment.
This method should convert the value given into the designated type, or throw an exception if this is not possible.
- Param:obj
The VersionedObject on which an attribute is being set
- Param:attr
The name of the attribute being set
- Param:value
The value being set
- Returns
A properly-typed value
-
static
-
class
ironic.objects.fields.MACAddressField(**kwargs)[source]¶ Bases:
oslo_versionedobjects.fields.AutoTypedField-
AUTO_TYPE= <ironic.objects.fields.MACAddress object>¶
-
-
class
ironic.objects.fields.NotificationLevel[source]¶ Bases:
oslo_versionedobjects.fields.Enum-
ALL= ('debug', 'info', 'warning', 'error', 'critical')¶
-
CRITICAL= 'critical'¶
-
DEBUG= 'debug'¶
-
ERROR= 'error'¶
-
INFO= 'info'¶
-
WARNING= 'warning'¶
-
-
class
ironic.objects.fields.NotificationLevelField(**kwargs)[source]¶ Bases:
oslo_versionedobjects.fields.BaseEnumField-
AUTO_TYPE= <ironic.objects.fields.NotificationLevel object>¶
-
-
class
ironic.objects.fields.NotificationStatus[source]¶ Bases:
oslo_versionedobjects.fields.Enum-
ALL= ('start', 'end', 'error', 'success')¶
-
END= 'end'¶
-
ERROR= 'error'¶
-
START= 'start'¶
-
SUCCESS= 'success'¶
-
-
class
ironic.objects.fields.NotificationStatusField(**kwargs)[source]¶ Bases:
oslo_versionedobjects.fields.BaseEnumField-
AUTO_TYPE= <ironic.objects.fields.NotificationStatus object>¶
-
-
class
ironic.objects.fields.ObjectField(objtype, subclasses=False, **kwargs)[source]¶ Bases:
oslo_versionedobjects.fields.ObjectField
-
class
ironic.objects.fields.StringAcceptsCallable[source]¶ Bases:
oslo_versionedobjects.fields.String-
static
coerce(obj, attr, value)[source]¶ This is called to coerce (if possible) a value on assignment.
This method should convert the value given into the designated type, or throw an exception if this is not possible.
- Param:obj
The VersionedObject on which an attribute is being set
- Param:attr
The name of the attribute being set
- Param:value
The value being set
- Returns
A properly-typed value
-
static
-
class
ironic.objects.fields.StringField(**kwargs)[source]¶ Bases:
oslo_versionedobjects.fields.StringField
-
class
ironic.objects.fields.StringFieldThatAcceptsCallable(**kwargs)[source]¶ Bases:
oslo_versionedobjects.fields.StringFieldCustom StringField object that allows for functions as default
In some cases we need to allow for dynamic defaults based on configuration options, this StringField object allows for a function to be passed as a default, and will only process it at the point the field is coerced
-
AUTO_TYPE= <ironic.objects.fields.StringAcceptsCallable object>¶
-