Merge lp:~emagana/neutron/plugin-framework-nxos into lp:~cisco-openstack/neutron/plugin-framework

Proposed by Edgar Magana
Status: Merged
Merged at revision: 45
Proposed branch: lp:~emagana/neutron/plugin-framework-nxos
Merge into: lp:~cisco-openstack/neutron/plugin-framework
Diff against target: 46 lines (+11/-3)
2 files modified
quantum/plugins/cisco/nexus/cisco_nexus_network_driver.py (+10/-2)
quantum/plugins/cisco/nexus/cisco_nexus_plugin.py (+1/-1)
To merge this branch: bzr merge lp:~emagana/neutron/plugin-framework-nxos
Reviewer Review Type Date Requested Status
Sumit Naiksatam (community) Approve
Review via email: mp+70361@code.launchpad.net

Description of the change

Fixing the issue removing the configuration for the Nexus Port Interface assigned.

To post a comment you must log in.
Revision history for this message
Sumit Naiksatam (snaiksat) wrote :

lgtm

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'quantum/plugins/cisco/nexus/cisco_nexus_network_driver.py'
2--- quantum/plugins/cisco/nexus/cisco_nexus_network_driver.py 2011-08-01 19:40:07 +0000
3+++ quantum/plugins/cisco/nexus/cisco_nexus_network_driver.py 2011-08-03 20:33:36 +0000
4@@ -193,6 +193,12 @@
5 print confstr
6 mgr.edit_config(target='running', config=confstr)
7
8+ def disable_switch_port(self, mgr, interface):
9+ confstr = cmd_no_switchport % (interface)
10+ confstr = exec_conf_prefix + confstr + exec_conf_postfix
11+ print confstr
12+ mgr.edit_config(target='running', config=confstr)
13+
14 def enable_vlan_on_trunk_int(self, mgr, interface, vlanid):
15 confstr = cmd_vlan_int_snippet % (interface, vlanid)
16 confstr = exec_conf_prefix + confstr + exec_conf_postfix
17@@ -221,12 +227,14 @@
18 with self.nxos_connect(nexus_host, 22, nexus_user,
19 nexus_password) as m:
20 self.enable_vlan(m, vlan_id, vlan_name)
21- self.enable_port_trunk(m, nexus_interface)
22+ self.enable_vlan_on_trunk_int(m, nexus_interface, vlan_id)
23
24- def delete_vlan(self, vlan_id, nexus_host, nexus_user, nexus_password):
25+ def delete_vlan(self, vlan_id, nexus_host, nexus_user,
26+ nexus_password, nexus_interface):
27 with self.nxos_connect(nexus_host, 22, nexus_user,
28 nexus_password) as m:
29 self.disable_vlan(m, vlan_id)
30+ self.disable_switch_port(m, nexus_interface)
31
32
33 def main():
34
35=== modified file 'quantum/plugins/cisco/nexus/cisco_nexus_plugin.py'
36--- quantum/plugins/cisco/nexus/cisco_nexus_plugin.py 2011-08-02 01:32:25 +0000
37+++ quantum/plugins/cisco/nexus/cisco_nexus_plugin.py 2011-08-03 20:33:36 +0000
38@@ -79,7 +79,7 @@
39 vlan_id = self._get_vlan_id_for_network(tenant_id, net_id)
40 if net:
41 self._client.delete_vlan(str(vlan_id), self._nexus_ip,
42- self._nexus_username, self._nexus_password)
43+ self._nexus_username, self._nexus_password, self._nexus_port)
44 self._networks.pop(net_id)
45 return net
46 # Network not found

Subscribers

People subscribed via source and target branches