X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=resources%2Flibraries%2Fpython%2FContainerUtils.py;h=9dabc731733ef62e9992be179f2a13f2f341f1a4;hb=refs%2Fchanges%2F80%2F11580%2F10;hp=3bf3516e6dd952491818c5cfdb26794c42925447;hpb=30c94055dd6ec2fe1cb83455cf6eb4bca8648d45;p=csit.git diff --git a/resources/libraries/python/ContainerUtils.py b/resources/libraries/python/ContainerUtils.py index 3bf3516e6d..9dabc73173 100644 --- a/resources/libraries/python/ContainerUtils.py +++ b/resources/libraries/python/ContainerUtils.py @@ -1,4 +1,4 @@ -# Copyright (c) 2017 Cisco and/or its affiliates. +# Copyright (c) 2018 Cisco and/or its affiliates. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at: @@ -156,6 +156,12 @@ class ContainerManager(object): self.engine.install_vpp() self.engine.restart_vpp() + def restart_vpp_in_all_containers(self): + """Restart VPP on all containers.""" + for container in self.containers: + self.engine.container = self.containers[container] + self.engine.restart_vpp() + def configure_vpp_in_all_containers(self, vat_template_file): """Configure VPP in all containers. @@ -275,9 +281,9 @@ class ContainerEngine(object): def install_vpp(self, install_dkms=False): """Install VPP inside a container. - :param install_dkms: If install dkms package. This will impact install - time. Dkms is required for installation of vpp-dpdk-dkms. Default is - false. + :param install_dkms: If install dkms package. This will impact + install time. Dkms is required for installation of vpp-dpdk-dkms. + Default is false. :type install_dkms: bool """ self.execute('ln -s /dev/null /etc/sysctl.d/80-vpp.conf') @@ -412,10 +418,10 @@ class LXC(ContainerEngine): """Acquire a privileged system object where configuration is stored. :param force: If a container exists, destroy it and create a new - container. + container. :type force: bool :raises RuntimeError: If creating the container or writing the container - config fails. + config fails. """ if self.is_container_present(): if force: