Skip to content
Permalink
Browse files
Minor changes to controllers
  • Loading branch information
brogand93 committed Feb 22, 2014
1 parent 78a79ee commit 9f5e97a6a098c24f02bdac804fda25be2571c2c9
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
@@ -74,8 +74,6 @@ def _describe_specific_instances():
response = describe_item_by_id(
instance_id,
_describe_virtual_machines_request)
if 'errortext' in response:
invalid_instance_id()

instances = instances + get_items_from_response(
response, 'virtualmachine', cloudstack_instance_attributes_to_aws)
@@ -7,8 +7,8 @@

from ec2stack import helpers
from ec2stack.helpers import authentication_required
from ec2stack.providers.cloudstack import requester, translator, \
disk_offerings, cloudstack_helpers
from ec2stack.providers.cloudstack import requester, \
disk_offerings, cloudstack_helpers


cloudstack_volume_attributes_to_aws = {
@@ -42,7 +42,7 @@ def create_volume():
args['size'] = helpers.get('Size', request.form)
args['diskofferingid'] = \
disk_offerings.get_disk_offerings_id_by_name('Custom')

response = _create_volume_request(args)
return create_volume_response(response)

@@ -71,10 +71,12 @@ def _describe_volumes_request():
return response


def _create_volume_request(args = None):
def _create_volume_request(args=None):
args['command'] = 'listZones'
requester.make_request(args)
if args is None:
args = {}

args['zoneid'] = helpers.get('AvailabilityZone', request.form)
args['command'] = 'createVolume'
args['name'] = uuid.uuid4()

0 comments on commit 9f5e97a

Please sign in to comment.