Skip to content

Commit

Permalink
Merge pull request #685 from grycap/devel
Browse files Browse the repository at this point in the history
Devel
  • Loading branch information
micafer authored Oct 3, 2018
2 parents 0a2d62a + 2499e41 commit aab9d85
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 1 deletion.
2 changes: 2 additions & 0 deletions IM/InfrastructureManager.py
Original file line number Diff line number Diff line change
Expand Up @@ -1111,6 +1111,8 @@ def DestroyInfrastructure(inf_id, auth):

sel_inf = InfrastructureManager.get_infrastructure(inf_id, auth)
delete_list = list(reversed(sel_inf.get_vm_list()))
# First stop ctxt processes
sel_inf.stop()
# Destroy the Infrastructure
sel_inf.destroy(auth, delete_list)
# Set the Infrastructure as deleted
Expand Down
11 changes: 10 additions & 1 deletion IM/tosca/Tosca.py
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,16 @@ def _order_deploys(self, radl):
else:
priv.append(d)

radl.deploys = pub + priv
# This is patch, we need a solution for that
wn = []
fe = []
for d in pub:
if "wn" in d.id:
wn.append(d)
else:
fe.append(d)

radl.deploys = fe + wn + priv

def _get_num_instances(self, sys_name, inf_info):
"""
Expand Down
2 changes: 2 additions & 0 deletions test/unit/Tosca.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,8 @@ def test_tosca_to_radl(self):
self.assertEqual(lrms_wn.getValue("spot"), 'no')
self.assertEqual(lrms_wn.getValue("instance_type"), 'some_type')

self.assertEqual([d.id for d in radl.deploys], ['other_server', 'lrms_server', 'lrms_wn'])

def test_tosca_get_outputs(self):
"""Test TOSCA get_outputs function"""
tosca_data = read_file_as_string('../files/tosca_create.yml')
Expand Down

0 comments on commit aab9d85

Please sign in to comment.