in ec2stack/providers/cloudstack/volumes.py [0:0]
def _detach_volume_request():
"""
Request to detach a volume.
@return: Response.
"""
args = {}
volume_id = helpers.get('VolumeId')
if helpers.contains_parameter('InstanceId'):
args['virtualmachineid'] = helpers.get('InstanceId')
if helpers.contains_parameter('Device'):
args['deviceid'] = helpers.get('Device')
args['id'] = volume_id
args['command'] = 'detachVolume'
response = requester.make_request_async(args)
return response