summaryrefslogtreecommitdiffstats
path: root/extras/vpp_config/vpp_config.py
diff options
context:
space:
mode:
authorjdenisco <jdenisco@cisco.com>2019-04-05 12:25:50 -0400
committerjdenisco <jdenisco@cisco.com>2019-04-09 12:55:20 -0400
commitaf86c6396b36968a081cc1ed5a9f5ee37ff544fa (patch)
tree9e8dedac1117352465b9960e126b75e00834127a /extras/vpp_config/vpp_config.py
parent26e035bfcda580a8ce06df7498ca30e0a39b45ef (diff)
Fix some python3, cleanup cpu allocation
Change-Id: I97cecc964f341720d8c4894656637082db5886d7 Signed-off-by: jdenisco <jdenisco@cisco.com>
Diffstat (limited to 'extras/vpp_config/vpp_config.py')
-rwxr-xr-xextras/vpp_config/vpp_config.py13
1 files changed, 7 insertions, 6 deletions
diff --git a/extras/vpp_config/vpp_config.py b/extras/vpp_config/vpp_config.py
index 1f792014074..0ff40f161b5 100755
--- a/extras/vpp_config/vpp_config.py
+++ b/extras/vpp_config/vpp_config.py
@@ -341,12 +341,6 @@ def autoconfig_dryrun(ask_questions=True):
"""
- vutil = VPPUtil()
- pkgs = vutil.get_installed_vpp_pkgs()
- if len(pkgs) == 0:
- print ("\nVPP is not installed, please install VPP.")
- return
-
acfg = AutoConfig(rootdir, VPP_AUTO_CONFIGURATION_FILE, clean=True)
# Stop VPP on each node
@@ -371,6 +365,13 @@ def autoconfig_dryrun(ask_questions=True):
else:
acfg.update_interfaces_config()
+ # If there are no interfaces, just return
+ for i in nodes.items():
+ node = i[1]
+ if not acfg.has_interfaces(node):
+ print("\nThere are no VPP interfaces configured, please configure at least 1.")
+ return
+
# Modify CPU
acfg.modify_cpu(ask_questions)