Create VPCS VM on controller

This commit is contained in:
Julien Duponchelle committed 2016-03-11 15:06:14 +01:00
1 parent 4326d412f9
commit be4aa41dda
13 files changed
+76 -34

No files matched your search

+7 -2
View File
@@ -38,5 +38,10 @@ def test_json(tmpdir):
def test_addVM(async_run):
hypervisor = MagicMock()
project = Project()
vm = async_run(project.addVM(hypervisor, None, name="test", vm_type="vpcs", startup_config="test.cfg"))
hypervisor.post.assert_called_with('/projects/{}/vpcs/vms'.format(project.id), data={'console': None, 'vm_id': vm.id, 'console_type': 'telnet', 'startup_config': 'test.cfg'})
vm = async_run(project.addVM(hypervisor, None, name="test", vm_type="vpcs", properties= {"startup_config": "test.cfg"}))
hypervisor.post.assert_called_with('/projects/{}/vpcs/vms'.format(project.id),
data={'console': None,
'vm_id': vm.id,
'console_type': 'telnet',
'startup_config': 'test.cfg',
'name': 'test'})