Python-on-whales wrapper for Docker-based ns-3 tests. More...
Public Member Functions | |
__init__ (self, unittest.TestCase currentTestCase, str containerName="ubuntu:latest") | |
Create and start container with containerName in the current ns-3 directory. | |
__enter__ (self) | |
Return the managed container when entiring the block "with DockerContainerManager() as container". | |
__exit__ (self, exc_type, exc_val, exc_tb) | |
Clean up the managed container at the end of the block "with DockerContainerManager() as container". | |
Public Attributes | |
container | |
The Python-on-whales container instance. | |
Python-on-whales wrapper for Docker-based ns-3 tests.
Definition at line 187 of file test-ns3.py.
test-ns3.DockerContainerManager.__init__ | ( | self, | |
unittest.TestCase | currentTestCase, | ||
str | containerName = "ubuntu:latest" ) |
Create and start container with containerName in the current ns-3 directory.
self | the current DockerContainerManager instance |
currentTestCase | the test case instance creating the DockerContainerManager |
containerName | name of the container image to be used |
Definition at line 192 of file test-ns3.py.
test-ns3.DockerContainerManager.__enter__ | ( | self | ) |
Return the managed container when entiring the block "with DockerContainerManager() as container".
self | the current DockerContainerManager instance |
Definition at line 234 of file test-ns3.py.
References test-ns3.DockerContainerManager.container.
test-ns3.DockerContainerManager.__exit__ | ( | self, | |
exc_type, | |||
exc_val, | |||
exc_tb ) |
Clean up the managed container at the end of the block "with DockerContainerManager() as container".
self | the current DockerContainerManager instance |
exc_type | unused parameter |
exc_val | unused parameter |
exc_tb | unused parameter |
Definition at line 242 of file test-ns3.py.
References test-ns3.DockerContainerManager.container.
test-ns3.DockerContainerManager.container |
The Python-on-whales container instance.
Definition at line 219 of file test-ns3.py.
Referenced by test-ns3.DockerContainerManager.__enter__(), and test-ns3.DockerContainerManager.__exit__().