X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=blobdiff_plain;f=src%2Fovs%2Fdpctl.py;h=015fb38c4bb5859d52d46c3cfaff3c108cc21150;hb=ca9c9275ed6d5d852987c69a378e88a3502cb2ab;hp=8ecac6dc25371f4f4693561a4588a9b780b314e2;hpb=76aba6f4fcb5e2a030893c01a3103bf8e94aa288;p=vswitchperf.git diff --git a/src/ovs/dpctl.py b/src/ovs/dpctl.py index 8ecac6dc..015fb38c 100644 --- a/src/ovs/dpctl.py +++ b/src/ovs/dpctl.py @@ -1,4 +1,4 @@ -# Copyright 2016 Intel Corporation. +# Copyright 2016-2017 Intel Corporation. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -15,17 +15,11 @@ """Wrapper for an OVS dpctl (``ovs-dpctl``) for managing datapaths. """ - -import os import logging -import string from tools import tasks from conf import settings -_OVS_DPCTL_BIN = os.path.join(settings.getValue('OVS_DIR'), 'utilities', - 'ovs-dpctl') - _OVS_LOCAL_DATAPATH = 'ovs-system' class DPCtl(object): @@ -51,7 +45,7 @@ class DPCtl(object): :return: None """ - cmd = ['sudo', _OVS_DPCTL_BIN, + cmd = ['sudo', settings.getValue('TOOLS')['ovs-dpctl'], '--timeout', str(self.timeout)] + args return tasks.run_task( @@ -68,4 +62,3 @@ class DPCtl(object): """ self.logger.debug('delete datapath ' + dp_name) self.run_dpctl(['del-dp', dp_name]) -