Clean up code of virt_phy_sw_v2 module
Removes two methods not used: * _get_all_segmentation_ids * _validate_vlan_id About log formatting: * In the __init__, '\n' can be removed from this line: LOG.debug(_("Loaded device plugin %s\n"), Closes-Bug: 1180783 Change-Id: Ic0aea7e8016f198e2ba245c710e12bc490720039
This commit is contained in:
parent
b857c86f3b
commit
2e15369bf1
@ -74,7 +74,7 @@ class VirtualPhysicalSwitchModelV2(neutron_plugin_base_v2.NeutronPluginBaseV2):
|
|||||||
plugin_obj = conf.CISCO_PLUGINS[key]
|
plugin_obj = conf.CISCO_PLUGINS[key]
|
||||||
if plugin_obj is not None:
|
if plugin_obj is not None:
|
||||||
self._plugins[key] = importutils.import_object(plugin_obj)
|
self._plugins[key] = importutils.import_object(plugin_obj)
|
||||||
LOG.debug(_("Loaded device plugin %s\n"),
|
LOG.debug(_("Loaded device plugin %s"),
|
||||||
conf.CISCO_PLUGINS[key])
|
conf.CISCO_PLUGINS[key])
|
||||||
|
|
||||||
if ((const.VSWITCH_PLUGIN in self._plugins) and
|
if ((const.VSWITCH_PLUGIN in self._plugins) and
|
||||||
@ -176,20 +176,6 @@ class VirtualPhysicalSwitchModelV2(neutron_plugin_base_v2.NeutronPluginBaseV2):
|
|||||||
raise cexc.NetworkSegmentIDNotFound(net_id=network_id)
|
raise cexc.NetworkSegmentIDNotFound(net_id=network_id)
|
||||||
return binding_seg_id.segmentation_id
|
return binding_seg_id.segmentation_id
|
||||||
|
|
||||||
def _get_all_segmentation_ids(self):
|
|
||||||
vlan_ids = cdb.get_ovs_vlans()
|
|
||||||
vlanids = ''
|
|
||||||
for v_id in vlan_ids:
|
|
||||||
if int(v_id) > 0:
|
|
||||||
vlanids = str(v_id) + ',' + vlanids
|
|
||||||
return vlanids.strip(',')
|
|
||||||
|
|
||||||
def _validate_vlan_id(self, vlan_id):
|
|
||||||
if vlan_id and int(vlan_id) > 1:
|
|
||||||
return True
|
|
||||||
else:
|
|
||||||
return False
|
|
||||||
|
|
||||||
def _get_instance_host(self, tenant_id, instance_id):
|
def _get_instance_host(self, tenant_id, instance_id):
|
||||||
keystone_conf = cfg.CONF.keystone_authtoken
|
keystone_conf = cfg.CONF.keystone_authtoken
|
||||||
keystone_auth_url = '%s://%s:%s/v2.0/' % (keystone_conf.auth_protocol,
|
keystone_auth_url = '%s://%s:%s/v2.0/' % (keystone_conf.auth_protocol,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user