X-Git-Url: https://gerrit.fd.io/r/gitweb?p=csit.git;a=blobdiff_plain;f=resources%2Flibraries%2Fpython%2FContainerUtils.py;h=74add983596bfd690704bf1a5443de8914720557;hp=fc61eea3bde663c133a7ffb5765d1c24da18c225;hb=063abf35e81deaf749ebbcfee339fbd1d9e89412;hpb=6221f1b96d2a167c6db74ff26cd7ec7906ae9486 diff --git a/resources/libraries/python/ContainerUtils.py b/resources/libraries/python/ContainerUtils.py index fc61eea3bd..74add98359 100644 --- a/resources/libraries/python/ContainerUtils.py +++ b/resources/libraries/python/ContainerUtils.py @@ -11,15 +11,14 @@ # See the License for the specific language governing permissions and # limitations under the License. -# Bug workaround in pylint for abstract classes. -# pylint: disable=W0223 - """Library to manipulate Containers.""" from collections import OrderedDict, Counter from io import open from string import Template +from robot.libraries.BuiltIn import BuiltIn + from resources.libraries.python.Constants import Constants from resources.libraries.python.ssh import SSH from resources.libraries.python.topology import Topology, SocketType @@ -442,8 +441,6 @@ class ContainerEngine: ) self.execute(u"supervisorctl start vpp") - # pylint: disable=import-outside-toplevel - from robot.libraries.BuiltIn import BuiltIn topo_instance = BuiltIn().get_library_instance( u"resources.libraries.python.topology.Topology" ) @@ -652,6 +649,13 @@ class LXC(ContainerEngine): self._configure_cgroup(u"lxc") + def build(self): + """Build container (compile). + + TODO: Remove from parent class if no sibling implements this. + """ + raise NotImplementedError + def create(self): """Create/deploy an application inside a container on system. @@ -870,6 +874,13 @@ class Docker(ContainerEngine): if self.container.cpuset_cpus: self._configure_cgroup(u"docker") + def build(self): + """Build container (compile). + + TODO: Remove from parent class if no sibling implements this. + """ + raise NotImplementedError + def create(self): """Create/deploy container.