Dan Kenigsberg has uploaded a new change for review.
Change subject: openstack_net hook: search for ovs_vsctl only when needed ......................................................................
openstack_net hook: search for ovs_vsctl only when needed
Change-Id: I397e17782f61a94f734cf060d5ecad768379abcc Bug-Url: https://bugzilla.redhat.com/1074628 Signed-off-by: Dan Kenigsberg danken@redhat.com --- M vdsm_hooks/openstacknet/after_device_destroy.py M vdsm_hooks/openstacknet/before_device_create.py M vdsm_hooks/openstacknet/openstacknet_utils.py 3 files changed, 7 insertions(+), 7 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/89/25889/1
diff --git a/vdsm_hooks/openstacknet/after_device_destroy.py b/vdsm_hooks/openstacknet/after_device_destroy.py index 8e13412..3cc7261 100755 --- a/vdsm_hooks/openstacknet/after_device_destroy.py +++ b/vdsm_hooks/openstacknet/after_device_destroy.py @@ -19,7 +19,6 @@ import hooking from openstacknet_utils import EXT_BRCTL from openstacknet_utils import EXT_IP -from openstacknet_utils import EXT_OVS_VSCTL from openstacknet_utils import INTEGRATION_BRIDGE from openstacknet_utils import OPENSTACK_NET_PROVIDER_TYPE from openstacknet_utils import PLUGIN_TYPE_KEY @@ -29,6 +28,7 @@ from openstacknet_utils import deviceExists from openstacknet_utils import devName from openstacknet_utils import executeOrExit +from openstacknet_utils import ovs_vsctl
def disconnectVnic(portId): @@ -40,7 +40,7 @@ executeOrExit([EXT_BRCTL, 'delif', brName, vethBr]) executeOrExit([EXT_IP, 'link', 'set', brName, 'down']) executeOrExit([EXT_BRCTL, 'delbr', brName]) - executeOrExit([EXT_OVS_VSCTL, 'del-port', INTEGRATION_BRIDGE, vethOvs]) + executeOrExit([ovs_vsctl.cmd, 'del-port', INTEGRATION_BRIDGE, vethOvs]) executeOrExit([EXT_IP, 'link', 'delete', vethOvs])
diff --git a/vdsm_hooks/openstacknet/before_device_create.py b/vdsm_hooks/openstacknet/before_device_create.py index 74f4671..e322ec3 100755 --- a/vdsm_hooks/openstacknet/before_device_create.py +++ b/vdsm_hooks/openstacknet/before_device_create.py @@ -40,7 +40,6 @@ from openstacknet_utils import DUMMY_BRIDGE from openstacknet_utils import EXT_BRCTL from openstacknet_utils import EXT_IP -from openstacknet_utils import EXT_OVS_VSCTL from openstacknet_utils import INTEGRATION_BRIDGE from openstacknet_utils import OPENSTACK_NET_PROVIDER_TYPE from openstacknet_utils import PLUGIN_TYPE_KEY @@ -52,6 +51,7 @@ from openstacknet_utils import deviceExists from openstacknet_utils import devName from openstacknet_utils import executeOrExit +from openstacknet_utils import ovs_vsctl
HELP_ARG = "-h" TEST_ARG = "-t" @@ -117,7 +117,7 @@ executeOrExit([EXT_BRCTL, 'addif', brName, vethBr])
mac = iface.getElementsByTagName('mac')[0].getAttribute('address') - executeOrExit([EXT_OVS_VSCTL, '--', '--may-exist', 'add-port', + executeOrExit([ovs_vsctl.cmd, '--', '--may-exist', 'add-port', INTEGRATION_BRIDGE, vethOvs, '--', 'set', 'Interface', vethOvs, 'external-ids:iface-id=%s' % portId, diff --git a/vdsm_hooks/openstacknet/openstacknet_utils.py b/vdsm_hooks/openstacknet/openstacknet_utils.py index 686e4a0..e919908 100644 --- a/vdsm_hooks/openstacknet/openstacknet_utils.py +++ b/vdsm_hooks/openstacknet/openstacknet_utils.py @@ -21,9 +21,9 @@
EXT_BRCTL = CommandPath('brctl', '/sbin/brctl', '/usr/sbin/brctl').cmd EXT_IP = CommandPath('ip', '/sbin/ip').cmd -EXT_OVS_VSCTL = CommandPath('ovs-vsctl', - '/usr/sbin/ovs-vsctl', - '/usr/bin/ovs-vsctl').cmd +ovs_vsctl = CommandPath('ovs-vsctl', + '/usr/sbin/aovs-vsctl', + '/usr/bin/aovs-vsctl')
# Make pyflakes happy DUMMY_BRIDGE
oVirt Jenkins CI Server has posted comments on this change.
Change subject: openstack_net hook: search for ovs_vsctl only when needed ......................................................................
Patch Set 1:
Build Successful
http://jenkins.ovirt.org/job/vdsm_unit_tests_gerrit_el/6714/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_master_pep8_gerrit/7504/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_unit_tests_gerrit/7614/ : SUCCESS
oVirt Jenkins CI Server has posted comments on this change.
Change subject: openstack_net hook: search for ovs_vsctl only when needed ......................................................................
Patch Set 2:
Build Successful
http://jenkins.ovirt.org/job/vdsm_unit_tests_gerrit_el/6715/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_master_pep8_gerrit/7505/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_unit_tests_gerrit/7615/ : SUCCESS
oVirt Jenkins CI Server has posted comments on this change.
Change subject: openstack_net hook: search for ovs_vsctl only when needed ......................................................................
Patch Set 3:
Build Successful
http://jenkins.ovirt.org/job/vdsm_unit_tests_gerrit_el/6716/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_master_pep8_gerrit/7506/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_unit_tests_gerrit/7616/ : SUCCESS
Moti Asayag has posted comments on this change.
Change subject: openstack_net hook: search for ovs_vsctl only when needed ......................................................................
Patch Set 3: Code-Review+1
Dan Kenigsberg has posted comments on this change.
Change subject: openstack_net hook: search for ovs_vsctl only when needed ......................................................................
Patch Set 3: Code-Review+2
Dan Kenigsberg has submitted this change and it was merged.
Change subject: openstack_net hook: search for ovs_vsctl only when needed ......................................................................
openstack_net hook: search for ovs_vsctl only when needed
Change-Id: I397e17782f61a94f734cf060d5ecad768379abcc Bug-Url: https://bugzilla.redhat.com/1077283 Signed-off-by: Dan Kenigsberg danken@redhat.com Reviewed-on: http://gerrit.ovirt.org/25889 Reviewed-by: Moti Asayag masayag@redhat.com Tested-by: Martin Pavlik xpavli44@gmail.com --- M vdsm_hooks/openstacknet/after_device_destroy.py M vdsm_hooks/openstacknet/before_device_create.py M vdsm_hooks/openstacknet/openstacknet_utils.py 3 files changed, 7 insertions(+), 7 deletions(-)
Approvals: Martin Pavlik: Verified Dan Kenigsberg: Looks good to me, approved Moti Asayag: Looks good to me, but someone else must approve
vdsm-patches@lists.fedorahosted.org