Remove default value from Port binding:vnic_type parameter
Remove the default value from this parameter so that this plugin can be used with Neutron services that do not support the binding extension. Change-Id: Idb0cae57217905f5f191ed9fe24eabf226b2e7b1 Closes-Bug: 1405266
This commit is contained in:
parent
905ff13906
commit
07445bbe1f
@ -175,8 +175,9 @@ class Port(neutron.NeutronResource):
|
|||||||
'To support SR-IOV PCI passthrough networking, you can request '
|
'To support SR-IOV PCI passthrough networking, you can request '
|
||||||
'that the neutron port to be realized as normal (virtual nic), '
|
'that the neutron port to be realized as normal (virtual nic), '
|
||||||
'direct (pci passthrough), or macvtap '
|
'direct (pci passthrough), or macvtap '
|
||||||
'(virtual interface with a tap-like software interface).'),
|
'(virtual interface with a tap-like software interface). Note'
|
||||||
default='normal',
|
' that this only works for Neutron deployments that support '
|
||||||
|
'the bindings extension.'),
|
||||||
constraints=[
|
constraints=[
|
||||||
constraints.AllowedValues(['normal', 'direct', 'macvtap']),
|
constraints.AllowedValues(['normal', 'direct', 'macvtap']),
|
||||||
],
|
],
|
||||||
|
@ -2054,8 +2054,7 @@ class NeutronFloatingIPTest(common.HeatTestCase):
|
|||||||
{'subnet_id': u'sub1234', 'ip_address': u'10.0.0.10'}
|
{'subnet_id': u'sub1234', 'ip_address': u'10.0.0.10'}
|
||||||
],
|
],
|
||||||
'name': utils.PhysName('test_stack', 'port_floating'),
|
'name': utils.PhysName('test_stack', 'port_floating'),
|
||||||
'admin_state_up': True,
|
'admin_state_up': True}}
|
||||||
'binding:vnic_type': 'normal'}}
|
|
||||||
).AndReturn({'port': {
|
).AndReturn({'port': {
|
||||||
"status": "BUILD",
|
"status": "BUILD",
|
||||||
"id": "fc68ea2c-b60b-4b4f-bd82-94ec81110766"
|
"id": "fc68ea2c-b60b-4b4f-bd82-94ec81110766"
|
||||||
@ -2093,8 +2092,7 @@ class NeutronFloatingIPTest(common.HeatTestCase):
|
|||||||
'device_id': 'd6b4d3a5-c700-476f-b609-1493dd9dadc2',
|
'device_id': 'd6b4d3a5-c700-476f-b609-1493dd9dadc2',
|
||||||
'device_owner': 'network:floatingip',
|
'device_owner': 'network:floatingip',
|
||||||
'security_groups': [
|
'security_groups': [
|
||||||
'8a2f582a-e1cd-480f-b85d-b02631c10656'],
|
'8a2f582a-e1cd-480f-b85d-b02631c10656']
|
||||||
'binding:vnic_type': 'normal'
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
).AndReturn(None)
|
).AndReturn(None)
|
||||||
@ -2166,8 +2164,7 @@ class NeutronFloatingIPTest(common.HeatTestCase):
|
|||||||
{'subnet_id': u'sub1234', 'ip_address': u'10.0.0.10'}
|
{'subnet_id': u'sub1234', 'ip_address': u'10.0.0.10'}
|
||||||
],
|
],
|
||||||
'name': utils.PhysName('test_stack', 'port_floating'),
|
'name': utils.PhysName('test_stack', 'port_floating'),
|
||||||
'admin_state_up': True,
|
'admin_state_up': True}}
|
||||||
'binding:vnic_type': 'normal'}}
|
|
||||||
).AndReturn({'port': {
|
).AndReturn({'port': {
|
||||||
"status": "BUILD",
|
"status": "BUILD",
|
||||||
"id": "fc68ea2c-b60b-4b4f-bd82-94ec81110766"
|
"id": "fc68ea2c-b60b-4b4f-bd82-94ec81110766"
|
||||||
@ -2352,8 +2349,7 @@ class NeutronFloatingIPTest(common.HeatTestCase):
|
|||||||
{'subnet_id': u'sub1234', 'ip_address': u'10.0.0.10'}
|
{'subnet_id': u'sub1234', 'ip_address': u'10.0.0.10'}
|
||||||
],
|
],
|
||||||
'name': utils.PhysName('test_stack', 'port_floating'),
|
'name': utils.PhysName('test_stack', 'port_floating'),
|
||||||
'admin_state_up': True,
|
'admin_state_up': True}}
|
||||||
'binding:vnic_type': 'normal'}}
|
|
||||||
).AndReturn({'port': {
|
).AndReturn({'port': {
|
||||||
"status": "BUILD",
|
"status": "BUILD",
|
||||||
"id": "fc68ea2c-b60b-4b4f-bd82-94ec81110766"
|
"id": "fc68ea2c-b60b-4b4f-bd82-94ec81110766"
|
||||||
@ -2482,8 +2478,7 @@ class NeutronPortTest(common.HeatTestCase):
|
|||||||
],
|
],
|
||||||
'name': utils.PhysName('test_stack', 'port'),
|
'name': utils.PhysName('test_stack', 'port'),
|
||||||
'admin_state_up': True,
|
'admin_state_up': True,
|
||||||
'device_owner': u'network:dhcp',
|
'device_owner': u'network:dhcp'}}
|
||||||
'binding:vnic_type': 'normal'}}
|
|
||||||
).AndReturn({'port': {
|
).AndReturn({'port': {
|
||||||
"status": "BUILD",
|
"status": "BUILD",
|
||||||
"id": "fc68ea2c-b60b-4b4f-bd82-94ec81110766"
|
"id": "fc68ea2c-b60b-4b4f-bd82-94ec81110766"
|
||||||
@ -2525,8 +2520,7 @@ class NeutronPortTest(common.HeatTestCase):
|
|||||||
],
|
],
|
||||||
'name': utils.PhysName('test_stack', 'port'),
|
'name': utils.PhysName('test_stack', 'port'),
|
||||||
'admin_state_up': True,
|
'admin_state_up': True,
|
||||||
'device_owner': u'network:dhcp',
|
'device_owner': u'network:dhcp'}}
|
||||||
'binding:vnic_type': 'normal'}}
|
|
||||||
).AndReturn({'port': {
|
).AndReturn({'port': {
|
||||||
"status": "BUILD",
|
"status": "BUILD",
|
||||||
"id": "fc68ea2c-b60b-4b4f-bd82-94ec81110766"
|
"id": "fc68ea2c-b60b-4b4f-bd82-94ec81110766"
|
||||||
@ -2558,8 +2552,7 @@ class NeutronPortTest(common.HeatTestCase):
|
|||||||
'network_id': u'net1234',
|
'network_id': u'net1234',
|
||||||
'name': utils.PhysName('test_stack', 'port'),
|
'name': utils.PhysName('test_stack', 'port'),
|
||||||
'admin_state_up': True,
|
'admin_state_up': True,
|
||||||
'device_owner': u'network:dhcp',
|
'device_owner': u'network:dhcp'}}
|
||||||
'binding:vnic_type': 'normal'}}
|
|
||||||
).AndReturn({'port': {
|
).AndReturn({'port': {
|
||||||
"status": "BUILD",
|
"status": "BUILD",
|
||||||
"id": "fc68ea2c-b60b-4b4f-bd82-94ec81110766"
|
"id": "fc68ea2c-b60b-4b4f-bd82-94ec81110766"
|
||||||
@ -2598,8 +2591,7 @@ class NeutronPortTest(common.HeatTestCase):
|
|||||||
'mac_address': u'00-B0-D0-86-BB-F7'
|
'mac_address': u'00-B0-D0-86-BB-F7'
|
||||||
}],
|
}],
|
||||||
'name': utils.PhysName('test_stack', 'port'),
|
'name': utils.PhysName('test_stack', 'port'),
|
||||||
'admin_state_up': True,
|
'admin_state_up': True}}
|
||||||
'binding:vnic_type': 'normal'}}
|
|
||||||
).AndReturn({'port': {
|
).AndReturn({'port': {
|
||||||
"status": "BUILD",
|
"status": "BUILD",
|
||||||
"id": "fc68ea2c-b60b-4b4f-bd82-94ec81110766"
|
"id": "fc68ea2c-b60b-4b4f-bd82-94ec81110766"
|
||||||
@ -2632,8 +2624,7 @@ class NeutronPortTest(common.HeatTestCase):
|
|||||||
'ip_address': u'10.0.3.21',
|
'ip_address': u'10.0.3.21',
|
||||||
}],
|
}],
|
||||||
'name': utils.PhysName('test_stack', 'port'),
|
'name': utils.PhysName('test_stack', 'port'),
|
||||||
'admin_state_up': True,
|
'admin_state_up': True}}
|
||||||
'binding:vnic_type': 'normal'}}
|
|
||||||
).AndReturn({'port': {
|
).AndReturn({'port': {
|
||||||
"status": "BUILD",
|
"status": "BUILD",
|
||||||
"id": "fc68ea2c-b60b-4b4f-bd82-94ec81110766"
|
"id": "fc68ea2c-b60b-4b4f-bd82-94ec81110766"
|
||||||
@ -2691,8 +2682,7 @@ class NeutronPortTest(common.HeatTestCase):
|
|||||||
],
|
],
|
||||||
'name': utils.PhysName('test_stack', 'port'),
|
'name': utils.PhysName('test_stack', 'port'),
|
||||||
'admin_state_up': True,
|
'admin_state_up': True,
|
||||||
'device_owner': u'network:dhcp',
|
'device_owner': u'network:dhcp'}
|
||||||
'binding:vnic_type': 'normal'}
|
|
||||||
|
|
||||||
self._mock_create_with_security_groups(port_prop)
|
self._mock_create_with_security_groups(port_prop)
|
||||||
|
|
||||||
@ -2716,8 +2706,7 @@ class NeutronPortTest(common.HeatTestCase):
|
|||||||
],
|
],
|
||||||
'name': utils.PhysName('test_stack', 'port'),
|
'name': utils.PhysName('test_stack', 'port'),
|
||||||
'admin_state_up': True,
|
'admin_state_up': True,
|
||||||
'device_owner': u'network:dhcp',
|
'device_owner': u'network:dhcp'}
|
||||||
'binding:vnic_type': 'normal'}
|
|
||||||
|
|
||||||
self._mock_create_with_security_groups(port_prop)
|
self._mock_create_with_security_groups(port_prop)
|
||||||
|
|
||||||
@ -2734,8 +2723,7 @@ class NeutronPortTest(common.HeatTestCase):
|
|||||||
props = {'network_id': u'net1234',
|
props = {'network_id': u'net1234',
|
||||||
'name': utils.PhysName('test_stack', 'port'),
|
'name': utils.PhysName('test_stack', 'port'),
|
||||||
'admin_state_up': True,
|
'admin_state_up': True,
|
||||||
'device_owner': u'network:dhcp',
|
'device_owner': u'network:dhcp'}
|
||||||
'binding:vnic_type': 'normal'}
|
|
||||||
new_props = props.copy()
|
new_props = props.copy()
|
||||||
new_props['name'] = "new_name"
|
new_props['name'] = "new_name"
|
||||||
new_props['security_groups'] = [
|
new_props['security_groups'] = [
|
||||||
@ -2819,8 +2807,7 @@ class NeutronPortTest(common.HeatTestCase):
|
|||||||
props = {'network_id': u'net1234',
|
props = {'network_id': u'net1234',
|
||||||
'name': utils.PhysName('test_stack', 'port'),
|
'name': utils.PhysName('test_stack', 'port'),
|
||||||
'admin_state_up': True,
|
'admin_state_up': True,
|
||||||
'device_owner': u'network:dhcp',
|
'device_owner': u'network:dhcp'}
|
||||||
'binding:vnic_type': 'normal'}
|
|
||||||
|
|
||||||
neutronV20.find_resourceid_by_name_or_id(
|
neutronV20.find_resourceid_by_name_or_id(
|
||||||
mox.IsA(neutronclient.Client),
|
mox.IsA(neutronclient.Client),
|
||||||
@ -2893,8 +2880,7 @@ class NeutronPortTest(common.HeatTestCase):
|
|||||||
'network_id': u'net1234',
|
'network_id': u'net1234',
|
||||||
'name': utils.PhysName('test_stack', 'port'),
|
'name': utils.PhysName('test_stack', 'port'),
|
||||||
'admin_state_up': True,
|
'admin_state_up': True,
|
||||||
'device_owner': u'network:dhcp',
|
'device_owner': u'network:dhcp'}}
|
||||||
'binding:vnic_type': 'normal'}}
|
|
||||||
).AndReturn({'port': {
|
).AndReturn({'port': {
|
||||||
'status': 'BUILD',
|
'status': 'BUILD',
|
||||||
'id': 'fc68ea2c-b60b-4b4f-bd82-94ec81110766'
|
'id': 'fc68ea2c-b60b-4b4f-bd82-94ec81110766'
|
||||||
@ -2956,8 +2942,7 @@ class NeutronPortTest(common.HeatTestCase):
|
|||||||
'network_id': u'net1234',
|
'network_id': u'net1234',
|
||||||
'name': utils.PhysName('test_stack', 'port'),
|
'name': utils.PhysName('test_stack', 'port'),
|
||||||
'admin_state_up': True,
|
'admin_state_up': True,
|
||||||
'device_owner': u'network:dhcp',
|
'device_owner': u'network:dhcp'}}
|
||||||
'binding:vnic_type': 'normal'}}
|
|
||||||
).AndReturn({'port': {
|
).AndReturn({'port': {
|
||||||
'status': 'BUILD',
|
'status': 'BUILD',
|
||||||
'id': 'fc68ea2c-b60b-4b4f-bd82-94ec81110766'
|
'id': 'fc68ea2c-b60b-4b4f-bd82-94ec81110766'
|
||||||
|
Loading…
Reference in New Issue
Block a user