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
=== modified file 'quantum/plugins/cisco/nexus/cisco_nexus_network_driver.py'
--- quantum/plugins/cisco/nexus/cisco_nexus_network_driver.py 2011-08-01 19:40:07 +0000
+++ quantum/plugins/cisco/nexus/cisco_nexus_network_driver.py 2011-08-03 20:33:36 +0000
@@ -193,6 +193,12 @@
193 print confstr193 print confstr
194 mgr.edit_config(target='running', config=confstr)194 mgr.edit_config(target='running', config=confstr)
195195
196 def disable_switch_port(self, mgr, interface):
197 confstr = cmd_no_switchport % (interface)
198 confstr = exec_conf_prefix + confstr + exec_conf_postfix
199 print confstr
200 mgr.edit_config(target='running', config=confstr)
201
196 def enable_vlan_on_trunk_int(self, mgr, interface, vlanid):202 def enable_vlan_on_trunk_int(self, mgr, interface, vlanid):
197 confstr = cmd_vlan_int_snippet % (interface, vlanid)203 confstr = cmd_vlan_int_snippet % (interface, vlanid)
198 confstr = exec_conf_prefix + confstr + exec_conf_postfix204 confstr = exec_conf_prefix + confstr + exec_conf_postfix
@@ -221,12 +227,14 @@
221 with self.nxos_connect(nexus_host, 22, nexus_user,227 with self.nxos_connect(nexus_host, 22, nexus_user,
222 nexus_password) as m:228 nexus_password) as m:
223 self.enable_vlan(m, vlan_id, vlan_name)229 self.enable_vlan(m, vlan_id, vlan_name)
224 self.enable_port_trunk(m, nexus_interface)230 self.enable_vlan_on_trunk_int(m, nexus_interface, vlan_id)
225231
226 def delete_vlan(self, vlan_id, nexus_host, nexus_user, nexus_password):232 def delete_vlan(self, vlan_id, nexus_host, nexus_user,
233 nexus_password, nexus_interface):
227 with self.nxos_connect(nexus_host, 22, nexus_user,234 with self.nxos_connect(nexus_host, 22, nexus_user,
228 nexus_password) as m:235 nexus_password) as m:
229 self.disable_vlan(m, vlan_id)236 self.disable_vlan(m, vlan_id)
237 self.disable_switch_port(m, nexus_interface)
230238
231239
232def main():240def main():
233241
=== modified file 'quantum/plugins/cisco/nexus/cisco_nexus_plugin.py'
--- quantum/plugins/cisco/nexus/cisco_nexus_plugin.py 2011-08-02 01:32:25 +0000
+++ quantum/plugins/cisco/nexus/cisco_nexus_plugin.py 2011-08-03 20:33:36 +0000
@@ -79,7 +79,7 @@
79 vlan_id = self._get_vlan_id_for_network(tenant_id, net_id)79 vlan_id = self._get_vlan_id_for_network(tenant_id, net_id)
80 if net:80 if net:
81 self._client.delete_vlan(str(vlan_id), self._nexus_ip,81 self._client.delete_vlan(str(vlan_id), self._nexus_ip,
82 self._nexus_username, self._nexus_password)82 self._nexus_username, self._nexus_password, self._nexus_port)
83 self._networks.pop(net_id)83 self._networks.pop(net_id)
84 return net84 return net
85 # Network not found85 # Network not found

Subscribers

People subscribed via source and target branches