- if entity.attributes['occi.compute.state'] == 'inactive':
- entity.actions = [START]
- if entity.attributes['occi.compute.state'] == 'active':
- entity.actions = [STOP, SUSPEND, RESTART]
- if entity.attributes['occi.compute.state'] == 'suspended':
- entity.actions = [START]
+ else:
+ if entity.attributes['occi.compute.state'] == 'inactive':
+ entity.actions = [START]
+ if entity.attributes['occi.compute.state'] == 'active':
+ entity.actions = [STOP, SUSPEND, RESTART]
+ if entity.attributes['occi.compute.state'] == 'suspended':
+ entity.actions = [START]