fixes #14
This commit is contained in:
@@ -182,6 +182,12 @@ class ComputeBackend(KindBackend, ActionBackend):
|
||||
context = extras['nova_ctx']
|
||||
uid = entity.attributes['occi.core.id']
|
||||
|
||||
# set state and applicable actions - so even if the user hasn't done
|
||||
# a GET het can still the most applicable action now...
|
||||
state, actions = vm.get_occi_state(uid, context)
|
||||
entity.attributes['occi.compute.state'] = state
|
||||
entity.actions = actions
|
||||
|
||||
if action not in entity.actions:
|
||||
raise AttributeError("This action is currently not applicable.")
|
||||
elif action == infrastructure.START:
|
||||
|
@@ -334,6 +334,7 @@ def attach_volume(instance_id, volume_id, mount_point, context):
|
||||
vol_instance = VOLUME_API.get(context, volume_id)
|
||||
except exception.NotFound:
|
||||
raise exceptions.HTTPError(404, 'Volume not found!')
|
||||
print vol_instance, dir(vol_instance)
|
||||
volume_id = vol_instance[0]
|
||||
|
||||
COMPUTE_API.attach_volume(
|
||||
|
Reference in New Issue
Block a user