Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 23 additions & 2 deletions msa_sdk/orchestration.py
Original file line number Diff line number Diff line change
Expand Up @@ -228,8 +228,7 @@ def delete_service(self, service_id):

"""
self.path = \
'/orchestration/{}/service/instance/{}'.format(self.ubiqube_id,
service_id)
'/orchestration/v1/service/instance/{}'.format(service_id)

self._call_delete()

Expand Down Expand Up @@ -750,3 +749,25 @@ def attach_wf_to_subtenant(self, ubiqubeIds, uri):
"""
self.path = "{}/service/attach?ubiqubeIds={}&uri={}".format(self.api_path, ubiqubeIds, uri)
self._call_post()

def execute_delete_process(self, process_name: str, service_id: int):
"""

Execute the deletion of a service.

Parameters
----------
process_name: String
Process name
service_id: Integer
Service ID

Returns
-------
None

"""
format_path = ('/orchestration/process/execute/{}/{}?processName={}')
self.path = format_path.format(self.ubiqube_id, service_id, process_name)
self._call_post()

2 changes: 1 addition & 1 deletion tests/test_orchestration.py
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ def test_delete_service_by_id(orchestration_fixture):
with patch('msa_sdk.msa_api.MSA_API._call_delete') as mock_call_delete:
orch = orchestration_fixture
orch.delete_service('1234')
assert orch.path == '/orchestration/MSAA19224/service/instance/1234'
assert orch.path == '/orchestration/v1/service/instance/1234'
mock_call_delete.assert_called_once()


Expand Down