Fix appliance properties lost when you create two node from template

This commit is contained in:
Julien Duponchelle committed 2017-06-28 09:37:19 +02:00
1 parent 617868402f
commit 0a6dc55645
4 files changed
+22 -5

No files matched your search

+16 -2
View File
@@ -193,7 +193,10 @@ def test_add_node_from_appliance(async_run, controller):
"server": "local",
"name": "Test",
"default_name_format": "{name}-{0}",
"node_type": "vpcs"
"node_type": "vpcs",
"properties": {
"a": 1
}
})
controller._computes["local"] = compute
@@ -211,11 +214,22 @@ def test_add_node_from_appliance(async_run, controller):
})
compute.post.assert_any_call('/projects/{}/vpcs/nodes'.format(project.id),
data={'node_id': node.id,
'name': 'Test-1'},
'name': 'Test-1',
'a': 1,
},
timeout=120)
assert compute in project._project_created_on_compute
controller.notification.emit.assert_any_call("node.created", node.__json__())
# Make sure we can call twice the node creation
node = async_run(project.add_node_from_appliance("fakeid", x=13, y=12))
compute.post.assert_any_call('/projects/{}/vpcs/nodes'.format(project.id),
data={'node_id': node.id,
'name': 'Test-2',
'a': 1
},
timeout=120)
def test_create_iou_on_multiple_node(async_run, controller):
"""