diff options
author | John DeNisco <jdenisco@cisco.com> | 2018-03-30 10:50:19 -0400 |
---|---|---|
committer | Damjan Marion <dmarion.lists@gmail.com> | 2018-03-30 20:46:03 +0000 |
commit | 4dc8397629a30f3462ad695496ee3f943d85457d (patch) | |
tree | 6ac2ff2fdefe52ef60fc0dd4317bc898b09e907b | |
parent | 76981eedcdf6d236679d5aefccd905cd98540787 (diff) |
Fix minor issues.
Change-Id: I1ce5106d99dd4d4b1c033d4873b4511e9a170afc
Signed-off-by: John DeNisco <jdenisco@cisco.com>
-rw-r--r-- | extras/vpp_config/data/auto-config.yaml | 2 | ||||
-rw-r--r-- | extras/vpp_config/setup.py | 2 | ||||
-rwxr-xr-x | extras/vpp_config/vpp_config.py | 2 | ||||
-rw-r--r-- | extras/vpp_config/vpplib/VPPUtil.py | 26 |
4 files changed, 24 insertions, 8 deletions
diff --git a/extras/vpp_config/data/auto-config.yaml b/extras/vpp_config/data/auto-config.yaml index 83e3aab8470..129da3fc918 100644 --- a/extras/vpp_config/data/auto-config.yaml +++ b/extras/vpp_config/data/auto-config.yaml @@ -2,7 +2,7 @@ metadata: {system_config_file: /vpp/vpp-config/configs/system-config.yaml, versi nodes: DUT1: cpu: {grub_config_file: /vpp/vpp-config/dryrun/default/grub, reserve_vpp_main_core: false, - total_other_cpus: 0, total_vpp_cpus: 0} + total_other_cpus: 0, total_vpp_cpus: 0, total_rx_queues: 1} host: localhost hugepages: {hugepage_config_file: /vpp/vpp-config/dryrun/sysctl.d/80-vpp.conf, total: '1024'} diff --git a/extras/vpp_config/setup.py b/extras/vpp_config/setup.py index 81981933225..99d0ee22923 100644 --- a/extras/vpp_config/setup.py +++ b/extras/vpp_config/setup.py @@ -1,7 +1,7 @@ from setuptools import setup setup(name="vpp_config", - version="18.01.5", + version="18.01.11", author="John DeNisco", author_email="jdenisco@cisco.com", description="VPP Configuration Utility", diff --git a/extras/vpp_config/vpp_config.py b/extras/vpp_config/vpp_config.py index d9d65841359..a5d57bf3972 100755 --- a/extras/vpp_config/vpp_config.py +++ b/extras/vpp_config/vpp_config.py @@ -660,7 +660,7 @@ def autoconfig_setup(ask_questions=True): cmd = 'modprobe uio_pci_generic' (ret, stdout, stderr) = VPPUtil.exec_command(cmd) if ret != 0: - raise RuntimeError('{} failed on node {} {}'. format(cmd, node['host'], stderr)) + logging.warning('{} failed on node {} {}'. format(cmd, node['host'], stderr)) # noinspection PyUnresolvedReferences diff --git a/extras/vpp_config/vpplib/VPPUtil.py b/extras/vpp_config/vpplib/VPPUtil.py index 07d65b0d538..6f13a437826 100644 --- a/extras/vpp_config/vpplib/VPPUtil.py +++ b/extras/vpp_config/vpplib/VPPUtil.py @@ -145,6 +145,8 @@ class VPPUtil(object): # reps += 'repositories/fd.io.stable.{}.ubuntu.{}.main/ ./\n'.format(fdio_release, ubuntu_version) # When using release reps += 'repositories/fd.io.ubuntu.{}.main/ ./\n'.format(ubuntu_version) + # When using master + # reps += 'repositories/fd.io.master.ubuntu.{}.main/ ./\n'.format(ubuntu_version) cmd = 'echo "{0}" | sudo tee {1}'.format(reps, sfile) (ret, stdout, stderr) = self.exec_command(cmd) @@ -202,12 +204,18 @@ class VPPUtil(object): node['host'], stderr)) - reps = '[fdio-stable-{}]\n'.format(fdio_release) - reps += 'name=fd.io stable/{} branch latest merge\n'.format(fdio_release) + # Latest + # reps = '[fdio-master]\n' + # reps += 'name=fd.io master branch latest merge\n' + # reps += 'baseurl=https://nexus.fd.io/content/repositories/fd.io.master.{}/\n'.format(centos_version) + # reps = '[fdio-stable-{}]\n'.format(fdio_release) + # reps += 'name=fd.io stable/{} branch latest merge\n'.format(fdio_release) # When using stable # reps += 'baseurl=https://nexus.fd.io/content/repositories/fd.io.stable.{}.{}/\n'.\ # format(fdio_release, centos_version) # When using release + reps = '[fdio-release]\n' + reps += 'name=fd.io release branch latest merge\n' reps += 'baseurl=https://nexus.fd.io/content/repositories/fd.io.{}/\n'.format(centos_version) reps += 'enabled=1\n' reps += 'gpgcheck=0' @@ -240,13 +248,17 @@ class VPPUtil(object): :type node: dict """ distro = self.get_linux_distro() + logging.info(" {}".format(distro[0])) if distro[0] == 'Ubuntu': + logging.info("Install Ubuntu") self._install_vpp_ubuntu(node) elif distro[0] == 'CentOS Linux': logging.info("Install CentOS") self._install_vpp_centos(node) else: - return + logging.info("Install CentOS (default)") + self._install_vpp_centos(node) + return def _uninstall_vpp_pkg_ubuntu(self, node, pkg): """ @@ -348,11 +360,14 @@ class VPPUtil(object): distro = self.get_linux_distro() if distro[0] == 'Ubuntu': + logging.info("Uninstall Ubuntu") self._uninstall_vpp_ubuntu(node) elif distro[0] == 'CentOS Linux': logging.info("Uninstall CentOS") self._uninstall_vpp_centos(node) else: + logging.info("Uninstall CentOS (Default)") + self._uninstall_vpp_centos(node) return def show_vpp_settings(self, *additional_cmds): @@ -574,6 +589,7 @@ class VPPUtil(object): elif distro[0] == 'CentOS Linux': pkgs = self._get_installed_vpp_pkgs_centos() else: + pkgs = self._get_installed_vpp_pkgs_centos() return [] return pkgs @@ -712,7 +728,7 @@ class VPPUtil(object): distro = platform.linux_distribution() if distro[0] == 'Ubuntu' or \ distro[0] == 'CentOS Linux' or \ - distro[:26] == 'Linux Distribution Red Hat': + distro[:7] == 'Red Hat': return distro else: raise RuntimeError('Linux Distribution {} is not supported'.format(distro[0])) @@ -792,4 +808,4 @@ class VPPUtil(object): ifaces.append(ifcidx) print stdout - return ifaces
\ No newline at end of file + return ifaces |