neutron_lib.objects.common_types module¶
-
class
neutron_lib.objects.common_types.
DictOfMiscValues
¶ Bases:
oslo_versionedobjects.fields.FieldType
DictOfMiscValues custom field
This custom field is handling dictionary with miscellaneous value types, including integer, float, boolean and list and nested dictionaries.
-
static
coerce
(obj, attr, value)¶ 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
from_primitive
(obj, attr, value)¶ 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
-
static
stringify
(value)¶ Returns a short stringified version of a value.
-
static
to_primitive
(obj, attr, value)¶ 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
-
static
-
class
neutron_lib.objects.common_types.
DictOfMiscValuesField
(**kwargs)¶ Bases:
oslo_versionedobjects.fields.AutoTypedField
-
AUTO_TYPE
¶
-
-
class
neutron_lib.objects.common_types.
DomainName
¶ Bases:
oslo_versionedobjects.fields.String
-
coerce
(obj, attr, value)¶ 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
neutron_lib.objects.common_types.
DomainNameField
(**kwargs)¶ Bases:
oslo_versionedobjects.fields.AutoTypedField
-
AUTO_TYPE
= <neutron_lib.objects.common_types.DomainName object>¶
-
-
class
neutron_lib.objects.common_types.
DscpMark
(valid_values=None, **kwargs)¶
-
class
neutron_lib.objects.common_types.
DscpMarkField
(**kwargs)¶ Bases:
oslo_versionedobjects.fields.AutoTypedField
-
AUTO_TYPE
= <neutron_lib.objects.common_types.DscpMark object>¶
-
-
class
neutron_lib.objects.common_types.
EtherTypeEnumField
(**kwargs)¶ Bases:
oslo_versionedobjects.fields.AutoTypedField
-
AUTO_TYPE
= <oslo_versionedobjects.fields.Enum object>¶
-
-
class
neutron_lib.objects.common_types.
FloatingIPStatusEnumField
(**kwargs)¶ Bases:
oslo_versionedobjects.fields.AutoTypedField
-
AUTO_TYPE
= <oslo_versionedobjects.fields.Enum object>¶
-
-
class
neutron_lib.objects.common_types.
FlowDirectionAndAnyEnumField
(**kwargs)¶ Bases:
oslo_versionedobjects.fields.AutoTypedField
-
AUTO_TYPE
= <oslo_versionedobjects.fields.Enum object>¶
-
-
class
neutron_lib.objects.common_types.
FlowDirectionEnumField
(**kwargs)¶ Bases:
oslo_versionedobjects.fields.AutoTypedField
-
AUTO_TYPE
= <oslo_versionedobjects.fields.Enum object>¶
-
-
class
neutron_lib.objects.common_types.
HARouterEnumField
(**kwargs)¶ Bases:
oslo_versionedobjects.fields.AutoTypedField
-
AUTO_TYPE
= <oslo_versionedobjects.fields.Enum object>¶
-
-
class
neutron_lib.objects.common_types.
IPNetwork
¶ Bases:
oslo_versionedobjects.fields.FieldType
IPNetwork custom field.
This custom field is different from the one provided by oslo.versionedobjects library: it does not reset string representation for the field.
-
coerce
(obj, attr, value)¶ 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
from_primitive
(obj, attr, value)¶ 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
-
static
to_primitive
(obj, attr, value)¶ 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
-
-
class
neutron_lib.objects.common_types.
IPNetworkField
(**kwargs)¶ Bases:
oslo_versionedobjects.fields.AutoTypedField
-
AUTO_TYPE
= <neutron_lib.objects.common_types.IPNetwork object>¶
-
-
class
neutron_lib.objects.common_types.
IPNetworkPrefixLen
(**kwargs)¶ Bases:
neutron_lib.objects.common_types.RangeConstrainedInteger
IP network (CIDR) prefix length custom Enum
-
class
neutron_lib.objects.common_types.
IPNetworkPrefixLenField
(**kwargs)¶ Bases:
oslo_versionedobjects.fields.AutoTypedField
-
AUTO_TYPE
= <neutron_lib.objects.common_types.IPNetworkPrefixLen object>¶
-
-
class
neutron_lib.objects.common_types.
IPV6ModeEnumField
(**kwargs)¶ Bases:
oslo_versionedobjects.fields.AutoTypedField
-
AUTO_TYPE
= <oslo_versionedobjects.fields.Enum object>¶
-
-
class
neutron_lib.objects.common_types.
IPVersionEnum
(**kwargs)¶ Bases:
neutron_lib.objects.common_types.IntegerEnum
IP version integer Enum
-
class
neutron_lib.objects.common_types.
IPVersionEnumField
(**kwargs)¶ Bases:
oslo_versionedobjects.fields.AutoTypedField
-
AUTO_TYPE
= <neutron_lib.objects.common_types.IPVersionEnum object>¶
-
-
class
neutron_lib.objects.common_types.
IntegerEnum
(valid_values=None, **kwargs)¶ Bases:
oslo_versionedobjects.fields.Integer
-
coerce
(obj, attr, value)¶ 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
neutron_lib.objects.common_types.
IpProtocolEnum
(**kwargs)¶ Bases:
oslo_versionedobjects.fields.Enum
IP protocol number Enum
-
class
neutron_lib.objects.common_types.
IpProtocolEnumField
(**kwargs)¶ Bases:
oslo_versionedobjects.fields.AutoTypedField
-
AUTO_TYPE
= <neutron_lib.objects.common_types.IpProtocolEnum object>¶
-
-
class
neutron_lib.objects.common_types.
IpamAllocationStatusEnumField
(**kwargs)¶ Bases:
oslo_versionedobjects.fields.AutoTypedField
-
AUTO_TYPE
= <oslo_versionedobjects.fields.Enum object>¶
-
-
class
neutron_lib.objects.common_types.
ListOfDictOfMiscValuesField
(**kwargs)¶ Bases:
oslo_versionedobjects.fields.AutoTypedField
-
AUTO_TYPE
= <oslo_versionedobjects.fields.List object>¶
-
-
class
neutron_lib.objects.common_types.
ListOfIPNetworksField
(**kwargs)¶ Bases:
oslo_versionedobjects.fields.AutoTypedField
-
AUTO_TYPE
= <oslo_versionedobjects.fields.List object>¶
-
-
class
neutron_lib.objects.common_types.
MACAddress
¶ Bases:
oslo_versionedobjects.fields.FieldType
MACAddress custom field.
This custom field is different from the one provided by oslo.versionedobjects library: it uses netaddr.EUI type instead of strings.
-
coerce
(obj, attr, value)¶ 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
from_primitive
(obj, attr, value)¶ 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
-
static
to_primitive
(obj, attr, value)¶ 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
-
-
class
neutron_lib.objects.common_types.
MACAddressField
(**kwargs)¶ Bases:
oslo_versionedobjects.fields.AutoTypedField
-
AUTO_TYPE
= <neutron_lib.objects.common_types.MACAddress object>¶
-
-
class
neutron_lib.objects.common_types.
NetworkSegmentRangeNetworkTypeEnumField
(**kwargs)¶ Bases:
oslo_versionedobjects.fields.AutoTypedField
-
AUTO_TYPE
= <oslo_versionedobjects.fields.Enum object>¶
-
-
class
neutron_lib.objects.common_types.
NumaAffinityPoliciesEnumField
(**kwargs)¶ Bases:
oslo_versionedobjects.fields.AutoTypedField
-
AUTO_TYPE
= <oslo_versionedobjects.fields.Enum object>¶
-
-
class
neutron_lib.objects.common_types.
PortBindingStatusEnumField
(**kwargs)¶ Bases:
oslo_versionedobjects.fields.AutoTypedField
-
AUTO_TYPE
= <oslo_versionedobjects.fields.Enum object>¶
-
-
class
neutron_lib.objects.common_types.
PortRange
(start=1, **kwargs)¶ Bases:
neutron_lib.objects.common_types.RangeConstrainedInteger
-
class
neutron_lib.objects.common_types.
PortRangeField
(**kwargs)¶ Bases:
oslo_versionedobjects.fields.AutoTypedField
-
AUTO_TYPE
= <neutron_lib.objects.common_types.PortRange object>¶
-
-
class
neutron_lib.objects.common_types.
PortRangeWith0Field
(**kwargs)¶ Bases:
oslo_versionedobjects.fields.AutoTypedField
-
AUTO_TYPE
= <neutron_lib.objects.common_types.PortRange object>¶
-
-
class
neutron_lib.objects.common_types.
PortRanges
¶ Bases:
oslo_versionedobjects.fields.FieldType
-
coerce
(obj, attr, value)¶ 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
-
get_schema
()¶
-
-
class
neutron_lib.objects.common_types.
PortRangesField
(**kwargs)¶ Bases:
oslo_versionedobjects.fields.AutoTypedField
-
AUTO_TYPE
= <neutron_lib.objects.common_types.PortRanges object>¶
-
-
class
neutron_lib.objects.common_types.
RangeConstrainedInteger
(start, end, **kwargs)¶ Bases:
oslo_versionedobjects.fields.Integer
-
coerce
(obj, attr, value)¶ 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
neutron_lib.objects.common_types.
RouterStatusEnumField
(**kwargs)¶ Bases:
oslo_versionedobjects.fields.AutoTypedField
-
AUTO_TYPE
= <oslo_versionedobjects.fields.Enum object>¶
-
-
class
neutron_lib.objects.common_types.
SetOfUUIDsField
(**kwargs)¶ Bases:
oslo_versionedobjects.fields.AutoTypedField
-
AUTO_TYPE
= <oslo_versionedobjects.fields.Set object>¶
-
-
class
neutron_lib.objects.common_types.
UUID
¶ Bases:
oslo_versionedobjects.fields.UUID
-
coerce
(obj, attr, value)¶ 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
neutron_lib.objects.common_types.
UUIDField
(**kwargs)¶ Bases:
oslo_versionedobjects.fields.AutoTypedField
-
AUTO_TYPE
= <neutron_lib.objects.common_types.UUID object>¶
-
-
class
neutron_lib.objects.common_types.
VlanIdRange
(**kwargs)¶ Bases:
neutron_lib.objects.common_types.RangeConstrainedInteger