ironic.objects.fields module
updated: 2023-10-04 09:19
ironic.objects.fields module
-
class ironic.objects.fields.BooleanField(**kwargs)[source]
Bases: BooleanField
-
class ironic.objects.fields.DateTimeField(tzinfo_aware=True, **kwargs)[source]
Bases: DateTimeField
-
class ironic.objects.fields.EnumField(valid_values, **kwargs)[source]
Bases: EnumField
-
class ironic.objects.fields.FlexibleDict[source]
Bases: 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
-
class ironic.objects.fields.FlexibleDictField(**kwargs)[source]
Bases: AutoTypedField
-
AUTO_TYPE = <ironic.objects.fields.FlexibleDict object>
-
class ironic.objects.fields.IntegerField(**kwargs)[source]
Bases: IntegerField
-
class ironic.objects.fields.ListOfFlexibleDictsField(**kwargs)[source]
Bases: AutoTypedField
-
AUTO_TYPE = <oslo_versionedobjects.fields.List object>
-
class ironic.objects.fields.ListOfObjectsField(objtype, subclasses=False, **kwargs)[source]
Bases: ListOfObjectsField
-
class ironic.objects.fields.ListOfStringsField(**kwargs)[source]
Bases: ListOfStringsField
-
class ironic.objects.fields.MACAddress[source]
Bases: 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
-
class ironic.objects.fields.MACAddressField(**kwargs)[source]
Bases: AutoTypedField
-
AUTO_TYPE = <ironic.objects.fields.MACAddress object>
-
class ironic.objects.fields.NotificationLevel[source]
Bases: 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: BaseEnumField
-
AUTO_TYPE = <ironic.objects.fields.NotificationLevel object>
-
class ironic.objects.fields.NotificationStatus[source]
Bases: Enum
-
ALL = ('start', 'end', 'error', 'success')
-
END = 'end'
-
ERROR = 'error'
-
START = 'start'
-
SUCCESS = 'success'
-
class ironic.objects.fields.NotificationStatusField(**kwargs)[source]
Bases: BaseEnumField
-
AUTO_TYPE = <ironic.objects.fields.NotificationStatus object>
-
class ironic.objects.fields.ObjectField(objtype, subclasses=False, **kwargs)[source]
Bases: ObjectField
-
class ironic.objects.fields.StringAcceptsCallable[source]
Bases: 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
-
class ironic.objects.fields.StringField(**kwargs)[source]
Bases: StringField
-
class ironic.objects.fields.StringFieldThatAcceptsCallable(**kwargs)[source]
Bases: StringField
Custom 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>
-
class ironic.objects.fields.UUIDField(**kwargs)[source]
Bases: UUIDField
updated: 2023-10-04 09:19