X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=extras%2Fvpp_config%2Fvpp_config.py;h=e863cde854e70f9a6d452ed7b2ad087666bc21d1;hb=1839fe165c7ffb834775b8582fe0ee2321ff2ab6;hp=1f792014074ca9a1192d414606c1fb23abcb0275;hpb=339bc6b51dd1ea7d783b211c485881ccb495fd0d;p=vpp.git diff --git a/extras/vpp_config/vpp_config.py b/extras/vpp_config/vpp_config.py index 1f792014074..e863cde854e 100755 --- a/extras/vpp_config/vpp_config.py +++ b/extras/vpp_config/vpp_config.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # Copyright (c) 2016 Cisco and/or its affiliates. # Copyright (c) 2018 Vinci Consulting Corp. All rights reserved. @@ -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)