neutron_lib.objects.common_types module¶
- class neutron_lib.objects.common_types.DictOfMiscValues¶
Bases:
FieldTypeDictOfMiscValues custom field
This custom field is handling dictionary with miscellaneous value types, including integer, float, boolean and list and nested dictionaries.
- 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
- 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
- stringify(value)¶
Returns a short stringified version of a value.
- 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.DictOfMiscValuesField(nullable: bool = False, default: ~oslo_versionedobjects.fields.T | type[~oslo_versionedobjects.fields.UnspecifiedDefault] = <class 'oslo_versionedobjects.fields.UnspecifiedDefault'>, read_only: bool = False)¶
Bases:
AutoTypedField- AUTO_TYPE: FieldType[T] = <neutron_lib.objects.common_types.DictOfMiscValues object>¶
- class neutron_lib.objects.common_types.DomainName¶
Bases:
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(nullable: bool = False, default: ~oslo_versionedobjects.fields.T | type[~oslo_versionedobjects.fields.UnspecifiedDefault] = <class 'oslo_versionedobjects.fields.UnspecifiedDefault'>, read_only: bool = False)¶
Bases:
AutoTypedField- AUTO_TYPE: FieldType[T] = <neutron_lib.objects.common_types.DomainName object>¶
- class neutron_lib.objects.common_types.DscpMark(valid_values=None, **kwargs)¶
Bases:
IntegerEnum
- class neutron_lib.objects.common_types.DscpMarkField(nullable: bool = False, default: ~oslo_versionedobjects.fields.T | type[~oslo_versionedobjects.fields.UnspecifiedDefault] = <class 'oslo_versionedobjects.fields.UnspecifiedDefault'>, read_only: bool = False)¶
Bases:
AutoTypedField- AUTO_TYPE: FieldType[T] = <neutron_lib.objects.common_types.DscpMark object>¶
- class neutron_lib.objects.common_types.EtherTypeEnumField(nullable: bool = False, default: ~oslo_versionedobjects.fields.T | type[~oslo_versionedobjects.fields.UnspecifiedDefault] = <class 'oslo_versionedobjects.fields.UnspecifiedDefault'>, read_only: bool = False)¶
Bases:
AutoTypedField- AUTO_TYPE: FieldType[T] = <oslo_versionedobjects.fields.Enum object>¶
- class neutron_lib.objects.common_types.FloatingIPStatusEnumField(nullable: bool = False, default: ~oslo_versionedobjects.fields.T | type[~oslo_versionedobjects.fields.UnspecifiedDefault] = <class 'oslo_versionedobjects.fields.UnspecifiedDefault'>, read_only: bool = False)¶
Bases:
AutoTypedField- AUTO_TYPE: FieldType[T] = <oslo_versionedobjects.fields.Enum object>¶
- class neutron_lib.objects.common_types.FlowDirectionAndAnyEnumField(nullable: bool = False, default: ~oslo_versionedobjects.fields.T | type[~oslo_versionedobjects.fields.UnspecifiedDefault] = <class 'oslo_versionedobjects.fields.UnspecifiedDefault'>, read_only: bool = False)¶
Bases:
AutoTypedField- AUTO_TYPE: FieldType[T] = <oslo_versionedobjects.fields.Enum object>¶
- class neutron_lib.objects.common_types.FlowDirectionEnumField(nullable: bool = False, default: ~oslo_versionedobjects.fields.T | type[~oslo_versionedobjects.fields.UnspecifiedDefault] = <class 'oslo_versionedobjects.fields.UnspecifiedDefault'>, read_only: bool = False)¶
Bases:
AutoTypedField- AUTO_TYPE: FieldType[T] = <oslo_versionedobjects.fields.Enum object>¶
- class neutron_lib.objects.common_types.HARouterEnumField(nullable: bool = False, default: ~oslo_versionedobjects.fields.T | type[~oslo_versionedobjects.fields.UnspecifiedDefault] = <class 'oslo_versionedobjects.fields.UnspecifiedDefault'>, read_only: bool = False)¶
Bases:
AutoTypedField- AUTO_TYPE: FieldType[T] = <oslo_versionedobjects.fields.Enum object>¶
- class neutron_lib.objects.common_types.IPNetwork¶
Bases:
FieldTypeIPNetwork 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
- 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
- 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(nullable: bool = False, default: ~oslo_versionedobjects.fields.T | type[~oslo_versionedobjects.fields.UnspecifiedDefault] = <class 'oslo_versionedobjects.fields.UnspecifiedDefault'>, read_only: bool = False)¶
Bases:
AutoTypedField- AUTO_TYPE: FieldType[T] = <neutron_lib.objects.common_types.IPNetwork object>¶
- class neutron_lib.objects.common_types.IPNetworkPrefixLen(**kwargs)¶
Bases:
RangeConstrainedIntegerIP network (CIDR) prefix length custom Enum
- class neutron_lib.objects.common_types.IPNetworkPrefixLenField(nullable: bool = False, default: ~oslo_versionedobjects.fields.T | type[~oslo_versionedobjects.fields.UnspecifiedDefault] = <class 'oslo_versionedobjects.fields.UnspecifiedDefault'>, read_only: bool = False)¶
Bases:
AutoTypedField- AUTO_TYPE: FieldType[T] = <neutron_lib.objects.common_types.IPNetworkPrefixLen object>¶
- class neutron_lib.objects.common_types.IPV6ModeEnumField(nullable: bool = False, default: ~oslo_versionedobjects.fields.T | type[~oslo_versionedobjects.fields.UnspecifiedDefault] = <class 'oslo_versionedobjects.fields.UnspecifiedDefault'>, read_only: bool = False)¶
Bases:
AutoTypedField- AUTO_TYPE: FieldType[T] = <oslo_versionedobjects.fields.Enum object>¶
- class neutron_lib.objects.common_types.IPVersionEnum(**kwargs)¶
Bases:
IntegerEnumIP version integer Enum
- class neutron_lib.objects.common_types.IPVersionEnumField(nullable: bool = False, default: ~oslo_versionedobjects.fields.T | type[~oslo_versionedobjects.fields.UnspecifiedDefault] = <class 'oslo_versionedobjects.fields.UnspecifiedDefault'>, read_only: bool = False)¶
Bases:
AutoTypedField- AUTO_TYPE: FieldType[T] = <neutron_lib.objects.common_types.IPVersionEnum object>¶
- class neutron_lib.objects.common_types.IntegerEnum(valid_values=None, **kwargs)¶
Bases:
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:
EnumIP protocol number Enum
- class neutron_lib.objects.common_types.IpProtocolEnumField(nullable: bool = False, default: ~oslo_versionedobjects.fields.T | type[~oslo_versionedobjects.fields.UnspecifiedDefault] = <class 'oslo_versionedobjects.fields.UnspecifiedDefault'>, read_only: bool = False)¶
Bases:
AutoTypedField- AUTO_TYPE: FieldType[T] = <neutron_lib.objects.common_types.IpProtocolEnum object>¶
- class neutron_lib.objects.common_types.IpamAllocationStatusEnumField(nullable: bool = False, default: ~oslo_versionedobjects.fields.T | type[~oslo_versionedobjects.fields.UnspecifiedDefault] = <class 'oslo_versionedobjects.fields.UnspecifiedDefault'>, read_only: bool = False)¶
Bases:
AutoTypedField- AUTO_TYPE: FieldType[T] = <oslo_versionedobjects.fields.Enum object>¶
- class neutron_lib.objects.common_types.ListOfDictOfMiscValuesField(nullable: bool = False, default: ~oslo_versionedobjects.fields.T | type[~oslo_versionedobjects.fields.UnspecifiedDefault] = <class 'oslo_versionedobjects.fields.UnspecifiedDefault'>, read_only: bool = False)¶
Bases:
AutoTypedField- AUTO_TYPE: FieldType[T] = <oslo_versionedobjects.fields.List object>¶
- class neutron_lib.objects.common_types.ListOfIPNetworksField(nullable: bool = False, default: ~oslo_versionedobjects.fields.T | type[~oslo_versionedobjects.fields.UnspecifiedDefault] = <class 'oslo_versionedobjects.fields.UnspecifiedDefault'>, read_only: bool = False)¶
Bases:
AutoTypedField- AUTO_TYPE: FieldType[T] = <oslo_versionedobjects.fields.List object>¶
- class neutron_lib.objects.common_types.MACAddress¶
Bases:
FieldTypeMACAddress 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
- 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
- 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(nullable: bool = False, default: ~oslo_versionedobjects.fields.T | type[~oslo_versionedobjects.fields.UnspecifiedDefault] = <class 'oslo_versionedobjects.fields.UnspecifiedDefault'>, read_only: bool = False)¶
Bases:
AutoTypedField- AUTO_TYPE: FieldType[T] = <neutron_lib.objects.common_types.MACAddress object>¶
- class neutron_lib.objects.common_types.NetworkSegmentRangeNetworkTypeEnumField(nullable: bool = False, default: ~oslo_versionedobjects.fields.T | type[~oslo_versionedobjects.fields.UnspecifiedDefault] = <class 'oslo_versionedobjects.fields.UnspecifiedDefault'>, read_only: bool = False)¶
Bases:
AutoTypedField- AUTO_TYPE: FieldType[T] = <oslo_versionedobjects.fields.Enum object>¶
- class neutron_lib.objects.common_types.NumaAffinityPoliciesEnumField(nullable: bool = False, default: ~oslo_versionedobjects.fields.T | type[~oslo_versionedobjects.fields.UnspecifiedDefault] = <class 'oslo_versionedobjects.fields.UnspecifiedDefault'>, read_only: bool = False)¶
Bases:
AutoTypedField- AUTO_TYPE: FieldType[T] = <oslo_versionedobjects.fields.Enum object>¶
- class neutron_lib.objects.common_types.PortBindingStatusEnumField(nullable: bool = False, default: ~oslo_versionedobjects.fields.T | type[~oslo_versionedobjects.fields.UnspecifiedDefault] = <class 'oslo_versionedobjects.fields.UnspecifiedDefault'>, read_only: bool = False)¶
Bases:
AutoTypedField- AUTO_TYPE: FieldType[T] = <oslo_versionedobjects.fields.Enum object>¶
- class neutron_lib.objects.common_types.PortHardwareOffloadTypeEnumField(nullable: bool = False, default: ~oslo_versionedobjects.fields.T | type[~oslo_versionedobjects.fields.UnspecifiedDefault] = <class 'oslo_versionedobjects.fields.UnspecifiedDefault'>, read_only: bool = False)¶
Bases:
AutoTypedField- AUTO_TYPE: FieldType[T] = <oslo_versionedobjects.fields.Enum object>¶
- class neutron_lib.objects.common_types.PortRange(start=1, **kwargs)¶
Bases:
RangeConstrainedInteger
- class neutron_lib.objects.common_types.PortRangeField(nullable: bool = False, default: ~oslo_versionedobjects.fields.T | type[~oslo_versionedobjects.fields.UnspecifiedDefault] = <class 'oslo_versionedobjects.fields.UnspecifiedDefault'>, read_only: bool = False)¶
Bases:
AutoTypedField- AUTO_TYPE: FieldType[T] = <neutron_lib.objects.common_types.PortRange object>¶
- class neutron_lib.objects.common_types.PortRangeWith0Field(nullable: bool = False, default: ~oslo_versionedobjects.fields.T | type[~oslo_versionedobjects.fields.UnspecifiedDefault] = <class 'oslo_versionedobjects.fields.UnspecifiedDefault'>, read_only: bool = False)¶
Bases:
AutoTypedField- AUTO_TYPE: FieldType[T] = <neutron_lib.objects.common_types.PortRange object>¶
- class neutron_lib.objects.common_types.PortRanges¶
Bases:
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(nullable: bool = False, default: ~oslo_versionedobjects.fields.T | type[~oslo_versionedobjects.fields.UnspecifiedDefault] = <class 'oslo_versionedobjects.fields.UnspecifiedDefault'>, read_only: bool = False)¶
Bases:
AutoTypedField- AUTO_TYPE: FieldType[T] = <neutron_lib.objects.common_types.PortRanges object>¶
- class neutron_lib.objects.common_types.RangeConstrainedInteger(start, end, **kwargs)¶
Bases:
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(nullable: bool = False, default: ~oslo_versionedobjects.fields.T | type[~oslo_versionedobjects.fields.UnspecifiedDefault] = <class 'oslo_versionedobjects.fields.UnspecifiedDefault'>, read_only: bool = False)¶
Bases:
AutoTypedField- AUTO_TYPE: FieldType[T] = <oslo_versionedobjects.fields.Enum object>¶
- class neutron_lib.objects.common_types.SetOfUUIDsField(nullable: bool = False, default: ~oslo_versionedobjects.fields.T | type[~oslo_versionedobjects.fields.UnspecifiedDefault] = <class 'oslo_versionedobjects.fields.UnspecifiedDefault'>, read_only: bool = False)¶
Bases:
AutoTypedField- AUTO_TYPE: FieldType[T] = <oslo_versionedobjects.fields.Set object>¶
- class neutron_lib.objects.common_types.UUID¶
Bases:
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(nullable: bool = False, default: ~oslo_versionedobjects.fields.T | type[~oslo_versionedobjects.fields.UnspecifiedDefault] = <class 'oslo_versionedobjects.fields.UnspecifiedDefault'>, read_only: bool = False)¶
Bases:
AutoTypedField- AUTO_TYPE: FieldType[T] = <neutron_lib.objects.common_types.UUID object>¶
- class neutron_lib.objects.common_types.VlanIdRange(**kwargs)¶
Bases:
RangeConstrainedInteger
- class neutron_lib.objects.common_types.VlanIdRangeField(nullable: bool = False, default: ~oslo_versionedobjects.fields.T | type[~oslo_versionedobjects.fields.UnspecifiedDefault] = <class 'oslo_versionedobjects.fields.UnspecifiedDefault'>, read_only: bool = False)¶
Bases:
AutoTypedField- AUTO_TYPE: FieldType[T] = <neutron_lib.objects.common_types.VlanIdRange object>¶