watcher.objects.fields Module¶Utility methods for objects
watcher.objects.fields.BaseWatcherEnum(**kwargs)[source]¶Bases: oslo_versionedobjects.fields.Enum
watcher.objects.fields.DictField(**kwargs)[source]¶Bases: oslo_versionedobjects.fields.AutoTypedField
watcher.objects.fields.FlexibleDictField(**kwargs)[source]¶Bases: oslo_versionedobjects.fields.AutoTypedField
watcher.objects.fields.FlexibleListOfDict[source]¶Bases: oslo_versionedobjects.fields.FieldType
watcher.objects.fields.FlexibleListOfDictField(**kwargs)[source]¶Bases: oslo_versionedobjects.fields.AutoTypedField
watcher.objects.fields.Json[source]¶Bases: oslo_versionedobjects.fields.FieldType
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
from_primitive(obj, attr, value)[source]¶This is called to deserialize a value.
This method should deserialize a value from the form given by to_primitive() to the designated type.
:param:obj: The VersionedObject on which the value is to be set :param:attr: The name of the attribute which will hold the value :param:value: The serialized form of the value :returns: The natural form of the value
to_primitive(obj, attr, value)[source]¶This is called to serialize a value.
This method should serialize a value to the form expected by from_primitive().
:param:obj: The VersionedObject on which the value is set :param:attr: The name of the attribute holding the value :param:value: The natural form of the value :returns: The serialized form of the value
watcher.objects.fields.JsonField(**kwargs)[source]¶Bases: oslo_versionedobjects.fields.AutoTypedField
watcher.objects.fields.ListOfUUIDsField(**kwargs)[source]¶Bases: oslo_versionedobjects.fields.AutoTypedField
watcher.objects.fields.NotificationActionField(**kwargs)[source]¶Bases: oslo_versionedobjects.fields.BaseEnumField
watcher.objects.fields.NotificationPhaseField(**kwargs)[source]¶Bases: oslo_versionedobjects.fields.BaseEnumField
watcher.objects.fields.NotificationPriorityField(**kwargs)[source]¶Bases: oslo_versionedobjects.fields.BaseEnumField
Except where otherwise noted, this document is licensed under Creative Commons Attribution 3.0 License. See all OpenStack Legal Documents.