Merge "Add translation rule to delete ssh auth key from Magnum baymodel"

This commit is contained in:
Jenkins
2016-03-29 12:02:45 +00:00
committed by Gerrit Code Review

View File

@@ -16,6 +16,7 @@ from heat.engine import constraints
from heat.engine import properties
from heat.engine import resource
from heat.engine import support
from heat.engine import translation
class BayModel(resource.Resource):
@@ -178,6 +179,16 @@ class BayModel(resource.Resource):
entity = 'baymodels'
def translation_rules(self, props):
if props.get(self.SSH_AUTHORIZED_KEY):
return [
translation.TranslationRule(
props,
translation.TranslationRule.DELETE,
[self.SSH_AUTHORIZED_KEY]
)
]
def handle_create(self):
args = {
'name': self.properties[self.NAME],