diff options
author | Ethan Lynn <xjunlin@cn.ibm.com> | 2017-01-05 11:53:36 +0800 |
---|---|---|
committer | Ethan Lynn <xjunlin@cn.ibm.com> | 2017-01-09 19:37:28 +0800 |
commit | 71ca073a9708a65f4f275efc4dc3d1ec1adaabe6 (patch) | |
tree | b731ccbf622de12ca56664b2bcea6a9e8bda19a4 /heat/engine/resources/openstack/senlin | |
parent | 3c53b2456768e7f048af464d08d05f509883cc8d (diff) | |
download | heat-71ca073a9708a65f4f275efc4dc3d1ec1adaabe6.tar.gz |
Add translate rules for senlin cluster
Add translate rules for senlin cluster
Change-Id: Ia2d5677eea9a3c3dc5552ee71d75ea5c303b41f3
Diffstat (limited to 'heat/engine/resources/openstack/senlin')
-rw-r--r-- | heat/engine/resources/openstack/senlin/cluster.py | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/heat/engine/resources/openstack/senlin/cluster.py b/heat/engine/resources/openstack/senlin/cluster.py index 9c8ee9b57..97cb52f01 100644 --- a/heat/engine/resources/openstack/senlin/cluster.py +++ b/heat/engine/resources/openstack/senlin/cluster.py @@ -21,6 +21,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 Cluster(resource.Resource): @@ -142,6 +143,17 @@ class Cluster(resource.Resource): ), } + def translation_rules(self, props): + rules = [ + translation.TranslationRule( + props, + translation.TranslationRule.RESOLVE, + translation_path=[self.PROFILE], + client_plugin=self.client_plugin(), + finder='get_profile_id'), + ] + return rules + def handle_create(self): params = { 'name': (self.properties[self.NAME] or |