summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMoshe Levi <moshele@mellanox.com>2017-06-17 11:14:29 +0300
committerMoshe Levi <moshele@mellanox.com>2017-06-17 11:14:29 +0300
commitdb9ef89ee0e62030eff5ef5a234a4112654194f3 (patch)
treeceb3bcb58136c0d5c479e67569acb37b9e691019
parent19af4386dec2eca06592c433210232cbab479633 (diff)
Fix typo VIFVIFHostDeviceDevType to VIFHostDeviceDevType
Notes
Notes (review): Code-Review+2: sean mooney <sean.k.mooney@intel.com> Code-Review+2: Jay Pipes <jaypipes@gmail.com> Workflow+1: Jay Pipes <jaypipes@gmail.com> Verified+2: Jenkins Submitted-by: Jenkins Submitted-at: Sun, 18 Jun 2017 20:40:03 +0000 Reviewed-on: https://review.openstack.org/475118 Project: openstack/os-vif Branch: refs/heads/master
-rw-r--r--os_vif/objects/fields.py10
-rw-r--r--os_vif/objects/vif.py2
-rw-r--r--os_vif/tests/test_vif.py4
3 files changed, 8 insertions, 8 deletions
diff --git a/os_vif/objects/fields.py b/os_vif/objects/fields.py
index 14c1c7d..004510c 100644
--- a/os_vif/objects/fields.py
+++ b/os_vif/objects/fields.py
@@ -70,16 +70,16 @@ class ListOfIPAddressField(fields.AutoTypedField):
70 AUTO_TYPE = fields.List(fields.IPAddress()) 70 AUTO_TYPE = fields.List(fields.IPAddress())
71 71
72 72
73class VIFVIFHostDeviceDevType(fields.Enum): 73class VIFHostDeviceDevType(fields.Enum):
74 ETHERNET = 'ethernet' 74 ETHERNET = 'ethernet'
75 GENERIC = 'generic' 75 GENERIC = 'generic'
76 76
77 ALL = (ETHERNET, GENERIC) 77 ALL = (ETHERNET, GENERIC)
78 78
79 def __init__(self): 79 def __init__(self):
80 super(VIFVIFHostDeviceDevType, self).__init__( 80 super(VIFHostDeviceDevType, self).__init__(
81 valid_values=VIFVIFHostDeviceDevType.ALL) 81 valid_values=VIFHostDeviceDevType.ALL)
82 82
83 83
84class VIFVIFHostDeviceDevTypeField(fields.BaseEnumField): 84class VIFHostDeviceDevTypeField(fields.BaseEnumField):
85 AUTO_TYPE = VIFVIFHostDeviceDevType() 85 AUTO_TYPE = VIFHostDeviceDevType()
diff --git a/os_vif/objects/vif.py b/os_vif/objects/vif.py
index 0f812c3..f0af973 100644
--- a/os_vif/objects/vif.py
+++ b/os_vif/objects/vif.py
@@ -154,7 +154,7 @@ class VIFHostDevice(VIFBase):
154 # Valid values are ethernet and generic. 154 # Valid values are ethernet and generic.
155 # Ethernet is <interface type='hostdev'> 155 # Ethernet is <interface type='hostdev'>
156 # Generic is <hostdev mode='subsystem' type='pci'> 156 # Generic is <hostdev mode='subsystem' type='pci'>
157 'dev_type': osv_fields.VIFVIFHostDeviceDevTypeField(), 157 'dev_type': osv_fields.VIFHostDeviceDevTypeField(),
158 158
159 # The PCI address of the host device 159 # The PCI address of the host device
160 'dev_address': osv_fields.PCIAddressField(), 160 'dev_address': osv_fields.PCIAddressField(),
diff --git a/os_vif/tests/test_vif.py b/os_vif/tests/test_vif.py
index 9a780f0..9f2d008 100644
--- a/os_vif/tests/test_vif.py
+++ b/os_vif/tests/test_vif.py
@@ -125,7 +125,7 @@ class TestVIFS(base.TestCase):
125 def test_vif_host_dev_plain(self): 125 def test_vif_host_dev_plain(self):
126 self._test_vif( 126 self._test_vif(
127 objects.vif.VIFHostDevice, 127 objects.vif.VIFHostDevice,
128 dev_type=objects.fields.VIFVIFHostDeviceDevType.ETHERNET, 128 dev_type=objects.fields.VIFHostDeviceDevType.ETHERNET,
129 dev_address="0002:24:12.3") 129 dev_address="0002:24:12.3")
130 130
131 def test_vif_host_dev_vepa_qbh(self): 131 def test_vif_host_dev_vepa_qbh(self):
@@ -151,7 +151,7 @@ object_data = {
151 'VIFBridge': '1.0-e78d355f3505361fafbf0797ffad484a', 151 'VIFBridge': '1.0-e78d355f3505361fafbf0797ffad484a',
152 'VIFDirect': '1.0-05c939280f4025fd1f7efb921a835c57', 152 'VIFDirect': '1.0-05c939280f4025fd1f7efb921a835c57',
153 'VIFGeneric': '1.0-c72e637ed620f0135ea50a9409a3f389', 153 'VIFGeneric': '1.0-c72e637ed620f0135ea50a9409a3f389',
154 'VIFHostDevice': '1.0-b3516f5af46ecb9432650e4938ac2643', 154 'VIFHostDevice': '1.0-bb090f1869c3b4df36efda216ab97a61',
155 'VIFOpenVSwitch': '1.0-e78d355f3505361fafbf0797ffad484a', 155 'VIFOpenVSwitch': '1.0-e78d355f3505361fafbf0797ffad484a',
156 'VIFPortProfile8021Qbg': '1.0-167f305f6e982b9368cc38763815d429', 156 'VIFPortProfile8021Qbg': '1.0-167f305f6e982b9368cc38763815d429',
157 'VIFPortProfile8021Qbh': '1.0-4b945f07d2666ab00a48d1dc225669b1', 157 'VIFPortProfile8021Qbh': '1.0-4b945f07d2666ab00a48d1dc225669b1',