Created
August 15, 2014 19:20
-
-
Save elyezer/0656d2ddb75c712440f3 to your computer and use it in GitHub Desktop.
Example of VM Provisioning API for Robottelo
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Test body | |
with VirtualMachine(ram=512, cpu=1, os='rhel7') as vm: | |
stdout, stderr = vm.command('echo "hellow world"') | |
vm.ip_addr | |
vm.hostname | |
# one vm for a test case | |
class ClientTestCase(UnitTest): | |
def setUp(self): | |
self.vm = VirtualMachine(...) | |
def tearDown(self): | |
self.vm.shutdown() | |
# properties | |
provisioning_host = machine.domain.com |
Yes! The rule will be that you have to provide a tearDown
in order to use this new functionality with your tests.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Is something like this in mind?