Skip to content
This repository has been archived by the owner on Apr 24, 2024. It is now read-only.

Commit

Permalink
Fix up delete / create tags actions
Browse files Browse the repository at this point in the history
  • Loading branch information
brogand93 committed Jun 1, 2014
1 parent a9a56cf commit 97c6021
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions ec2stack/providers/cloudstack/tags.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,6 @@ def _create_tag_request():

response = requester.make_request_async(args)

response = response['createtagsresponse']

return response


Expand Down Expand Up @@ -86,16 +84,21 @@ def _delete_tag_request():
key = helpers.get('Tag.1.Key')
resource_id = helpers.get('ResourceId.1')

if resource_id in current_app.config['RESOURCE_TYPE_MAP']:
resource_type = current_app.config['RESOURCE_TYPE_MAP'][resource_id]
else:
errors.invalid_request(
str(resource_id) + " not found in configuration")

args = {
'command': 'deleteTag',
'command': 'deleteTags',
'resourceids': resource_id,
'resourcetype': resource_type,
'tags[0].key': key
}

response = requester.make_request_async(args)

response = response['deletetagsresponse']

return response


Expand Down

0 comments on commit 97c6021

Please sign in to comment.