]> git.ipfire.org Git - thirdparty/libcgroup.git/commit
tests: Add functional test LXC container class
authorTom Hromatka <tom.hromatka@oracle.com>
Fri, 21 Jun 2019 15:40:23 +0000 (09:40 -0600)
committerDhaval Giani <dhaval.giani@oracle.com>
Tue, 17 Sep 2019 22:14:02 +0000 (15:14 -0700)
commit6c08dce9140e91a2018407456ae470ec540f9467
treecc25db0986260bb61ddfa17ad115767491c9d0e6
parent8175ae65c5a746921180b5fcdb0a16b2317b773f
tests: Add functional test LXC container class

This commit adds a Container() class for managing LXC containers.
This class provides methods to abstract the management of LXC
containers and simplify their usage in the functional test suite.

Example usages:
  # instantiate the class
  mycontainer = Container('TheNameOfMyContainer')

  # create and start the container
  mycontainer.create()
  mycontainer.start()

Container() can raise ValueError on invalid parameters,
ContainerError when a container operation unexpectedly failes,
or RunError when running a command fails.

Signed-off-by: Tom Hromatka <tom.hromatka@oracle.com>
Signed-off-by: Dhaval Giani <dhaval.giani@oracle.com>
tests/ftests/consts.py
tests/ftests/container.py [new file with mode: 0644]
tests/ftests/default.conf [new file with mode: 0644]