Python-on-whales wrapper for Docker-based ns-3 tests. More...
Public Member Functions | |
| def | __init__ (self, unittest.TestCase currentTestCase, str containerName="ubuntu:latest") |
| Create and start container with containerName in the current ns-3 directory. | |
| def | __enter__ (self) |
| Return the managed container when entiring the block "with DockerContainerManager() as container". | |
| def | __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 188 of file test-ns3.py.
| def 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 193 of file test-ns3.py.
| def 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 232 of file test-ns3.py.
References test-ns3.DockerContainerManager.container.
| def 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 240 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__().