- for action, value in tosca_props['config_actions'].items():
- conf = {}
- if _validate_action(value):
- conf['trigger'] = action
- conf['ns-config-primitive-name-ref'] = value
- self.properties['scaling-config-action'].append(conf)
- else:
- err_msg = _("{0}: Did not find the action {1} in "
- "config primitives"). \
- format(self, action)
- self.log.error(err_msg)
- raise ValidationError(message=err_msg)
+ if 'config_actions' in tosca_props:
+ for action, value in tosca_props['config_actions'].items():
+ conf = {}
+ if _validate_action(value):
+ conf['trigger'] = action
+ conf['ns-config-primitive-name-ref'] = value
+ self.properties['scaling-config-action'].append(conf)
+ else:
+ err_msg = _("{0}: Did not find the action {1} in "
+ "config primitives"). \
+ format(self, action)
+ self.log.error(err_msg)
+ raise ValidationError(message=err_msg)