Browse Source

Merge "Use Field in fixed_ip"

changes/70/92670/1
Jenkins 7 years ago
committed by Gerrit Code Review
parent
commit
181b29eba4
  1. 4
      nova/objects/fields.py
  2. 2
      nova/objects/fixed_ip.py

4
nova/objects/fields.py

@ -481,6 +481,10 @@ class IPV6AddressField(AutoTypedField):
AUTO_TYPE = IPV6Address()
class IPV4AndV6AddressField(AutoTypedField):
AUTO_TYPE = IPV4AndV6Address()
class IPNetworkField(AutoTypedField):
AUTO_TYPE = IPNetwork()

2
nova/objects/fixed_ip.py

@ -32,7 +32,7 @@ class FixedIP(obj_base.NovaPersistentObject, obj_base.NovaObject):
fields = {
'id': fields.IntegerField(),
'address': fields.IPV4AndV6Address(),
'address': fields.IPV4AndV6AddressField(),
'network_id': fields.IntegerField(nullable=True),
'virtual_interface_id': fields.IntegerField(nullable=True),
'instance_uuid': fields.UUIDField(nullable=True),

Loading…
Cancel
Save