This commit is contained in:
Thijs Metsch
2012-07-02 10:32:28 +02:00
parent bbf86d5a01
commit fd310fc56b
2 changed files with 7 additions and 0 deletions

View File

@@ -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:

View File

@@ -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(