diff options
author | Vratko Polak <vrpolak@cisco.com> | 2019-12-04 13:24:07 +0100 |
---|---|---|
committer | Peter Mikus <pmikus@cisco.com> | 2019-12-05 07:03:57 +0000 |
commit | 063abf35e81deaf749ebbcfee339fbd1d9e89412 (patch) | |
tree | c932eac04f162c46b0f3c38db10105b945a617cb /resources/libraries/python/ContainerUtils.py | |
parent | 6221f1b96d2a167c6db74ff26cd7ec7906ae9486 (diff) |
Deal with some "pylint: disable=" comments
+ When possible, fix the violation.
+ Else, add a comment:
+ An explanation (if not already present) and keep disable.
+ A TODO (if not already present) and remove the disable.
- This makes tox job report more pylint violations,
but any such violation is fixable and should be fixed.
- Although some need to be fixed in VPP, such as enum item long names.
Change-Id: I48604b5eda070083d79dff1439620dbd9e798e1f
Signed-off-by: Vratko Polak <vrpolak@cisco.com>
Diffstat (limited to 'resources/libraries/python/ContainerUtils.py')
-rw-r--r-- | resources/libraries/python/ContainerUtils.py | 21 |
1 files changed, 16 insertions, 5 deletions
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. |