Give correct example for translation_rules definition
Change-Id: I21208ac0803b4dd7835bac619c64fc3b6fb25988
This commit is contained in:
parent
0dcf342b88
commit
b579d9f582
@ -258,9 +258,17 @@ must overload `translation_rules` method, which should return a list of
|
|||||||
|
|
||||||
.. code-block:: python
|
.. code-block:: python
|
||||||
|
|
||||||
def translation_rules(self):
|
def translation_rules(self, properties):
|
||||||
return [properties.TranslationRule(
|
rules = [
|
||||||
self.properties,
|
translation.TranslationRule(
|
||||||
properties.TranslationRule.REPLACE,
|
properties,
|
||||||
|
translation.TranslationRule.REPLACE,
|
||||||
translation_path=[self.NETWORKS, self.NETWORK_ID],
|
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
|
||||||
|
Loading…
Reference in New Issue
Block a user