summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJenkins <jenkins@review.openstack.org>2016-11-17 03:25:46 +0000
committerGerrit Code Review <review@openstack.org>2016-11-17 03:25:46 +0000
commit674c34bfd23d2312f06e480ef77258af8c8fd3f8 (patch)
treefed2aa34e09cdd113275bb4a03a5ad029270cf4e
parentfcbe9327720c19b4e2f291c89e2e2e2d9a2a6fe3 (diff)
parentb579d9f58216349395a017bbfb4bdf84f88c8c12 (diff)
downloadheat-674c34bfd23d2312f06e480ef77258af8c8fd3f8.tar.gz
Merge "Give correct example for translation_rules definition"8.0.0.0b1
-rw-r--r--doc/source/developing_guides/supportstatus.rst18
1 files changed, 13 insertions, 5 deletions
diff --git a/doc/source/developing_guides/supportstatus.rst b/doc/source/developing_guides/supportstatus.rst
index 47646d68d..1abfb8a8c 100644
--- a/doc/source/developing_guides/supportstatus.rst
+++ b/doc/source/developing_guides/supportstatus.rst
@@ -258,9 +258,17 @@ must overload `translation_rules` method, which should return a list of
.. code-block:: python
- def translation_rules(self):
- return [properties.TranslationRule(
- self.properties,
- properties.TranslationRule.REPLACE,
+ def translation_rules(self, properties):
+ rules = [
+ translation.TranslationRule(
+ properties,
+ translation.TranslationRule.REPLACE,
translation_path=[self.NETWORKS, self.NETWORK_ID],
- value_name=self.NETWORK_UUID)]
+ value_name=self.NETWORK_UUID),
+ translation.TranslationRule(
+ properties,
+ translation.TranslationRule.RESOLVE,
+ translation_path=[self.FLAVOR],
+ client_plugin=self.client_plugin('nova'),
+ finder='find_flavor_by_name_or_id')]
+ return rules