Adds OVS_HYBRID_PLUG flag to portbindings
Adds a flag to the ML2, openvswitch, and BigSwitch plugins to inform nova that the OVS hybrid plugging strategy should be used. Closes-Bug: #1112912 Change-Id: If004db60e084f4cea095ca9ecccb0537240d4183
This commit is contained in:
parent
b390cbb5a9
commit
2aa63514b8
@ -43,7 +43,10 @@ PROFILE = 'binding:profile'
|
||||
#
|
||||
# - port_filter : Boolean value indicating Neutron provides port filtering
|
||||
# features such as security group and anti MAC/IP spoofing
|
||||
# - ovs_hybrid_plug: Boolean used to inform Nova that the hybrid plugging
|
||||
# strategy for OVS should be used
|
||||
CAP_PORT_FILTER = 'port_filter'
|
||||
OVS_HYBRID_PLUG = 'ovs_hybrid_plug'
|
||||
|
||||
VIF_TYPE_UNBOUND = 'unbound'
|
||||
VIF_TYPE_BINDING_FAILED = 'binding_failed'
|
||||
|
@ -374,7 +374,9 @@ class NeutronRestProxyV2Base(db_base_plugin_v2.NeutronDbPluginV2,
|
||||
port[portbindings.VIF_DETAILS] = {
|
||||
# TODO(rkukura): Replace with new VIF security details
|
||||
portbindings.CAP_PORT_FILTER:
|
||||
'security-group' in self.supported_extension_aliases}
|
||||
'security-group' in self.supported_extension_aliases,
|
||||
portbindings.OVS_HYBRID_PLUG: True
|
||||
}
|
||||
return port
|
||||
|
||||
def _check_hostvif_override(self, hostid):
|
||||
|
@ -41,7 +41,8 @@ class OfagentMechanismDriver(mech_agent.SimpleAgentMechanismDriverBase):
|
||||
super(OfagentMechanismDriver, self).__init__(
|
||||
constants.AGENT_TYPE_OFA,
|
||||
portbindings.VIF_TYPE_OVS,
|
||||
{portbindings.CAP_PORT_FILTER: True})
|
||||
{portbindings.CAP_PORT_FILTER: True,
|
||||
portbindings.OVS_HYBRID_PLUG: True})
|
||||
|
||||
def check_segment_for_agent(self, segment, agent):
|
||||
mappings = agent['configurations'].get('bridge_mappings', {})
|
||||
|
@ -36,7 +36,8 @@ class OpenvswitchMechanismDriver(mech_agent.SimpleAgentMechanismDriverBase):
|
||||
super(OpenvswitchMechanismDriver, self).__init__(
|
||||
constants.AGENT_TYPE_OVS,
|
||||
portbindings.VIF_TYPE_OVS,
|
||||
{portbindings.CAP_PORT_FILTER: True})
|
||||
{portbindings.CAP_PORT_FILTER: True,
|
||||
portbindings.OVS_HYBRID_PLUG: True})
|
||||
|
||||
def check_segment_for_agent(self, segment, agent):
|
||||
mappings = agent['configurations'].get('bridge_mappings', {})
|
||||
|
@ -401,7 +401,10 @@ class NECPluginV2(db_base_plugin_v2.NeutronDbPluginV2,
|
||||
portbindings.VIF_DETAILS: {
|
||||
# TODO(rkukura): Replace with new VIF security details
|
||||
portbindings.CAP_PORT_FILTER:
|
||||
'security-group' in self.supported_extension_aliases}}
|
||||
'security-group' in self.supported_extension_aliases,
|
||||
portbindings.OVS_HYBRID_PLUG: True
|
||||
}
|
||||
}
|
||||
return binding
|
||||
|
||||
def _extend_port_dict_binding_portinfo(self, port_res, portinfo):
|
||||
|
@ -292,7 +292,8 @@ class OVSNeutronPluginV2(db_base_plugin_v2.NeutronDbPluginV2,
|
||||
portbindings.VIF_DETAILS: {
|
||||
# TODO(rkukura): Replace with new VIF security details
|
||||
portbindings.CAP_PORT_FILTER:
|
||||
'security-group' in self.supported_extension_aliases}}
|
||||
'security-group' in self.supported_extension_aliases,
|
||||
portbindings.OVS_HYBRID_PLUG: True}}
|
||||
self._parse_network_vlan_ranges()
|
||||
ovs_db_v2.sync_vlan_allocations(self.network_vlan_ranges)
|
||||
self.tenant_network_type = cfg.CONF.OVS.tenant_network_type
|
||||
|
@ -116,7 +116,10 @@ class RyuNeutronPluginV2(db_base_plugin_v2.NeutronDbPluginV2,
|
||||
portbindings.VIF_DETAILS: {
|
||||
# TODO(rkukura): Replace with new VIF security details
|
||||
portbindings.CAP_PORT_FILTER:
|
||||
'security-group' in self.supported_extension_aliases}}
|
||||
'security-group' in self.supported_extension_aliases,
|
||||
portbindings.OVS_HYBRID_PLUG: True
|
||||
}
|
||||
}
|
||||
portbindings_base.register_port_dict_function()
|
||||
self.tunnel_key = db_api_v2.TunnelKey(
|
||||
cfg.CONF.OVS.tunnel_key_min, cfg.CONF.OVS.tunnel_key_max)
|
||||
|
Loading…
Reference in New Issue
Block a user