Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
translation.TranslationRule.REPLACE,
translation_path=[self.NETWORKS, self.NETWORK_ID],
value_name=self.NETWORK_UUID),
translation.TranslationRule(
props,
translation.TranslationRule.RESOLVE,
translation_path=[self.FLAVOR],
client_plugin=self.client_plugin('nova'),
finder='find_flavor_by_name_or_id'),
translation.TranslationRule(
props,
translation.TranslationRule.RESOLVE,
translation_path=[self.IMAGE],
client_plugin=glance_client_plugin,
finder='find_image_by_name_or_id'),
translation.TranslationRule(
props,
translation.TranslationRule.REPLACE,
translation_path=[self.BLOCK_DEVICE_MAPPING_V2,
self.BLOCK_DEVICE_MAPPING_IMAGE],
value_name=self.BLOCK_DEVICE_MAPPING_IMAGE_ID),
translation.TranslationRule(
props,
translation.TranslationRule.RESOLVE,
translation_path=[self.BLOCK_DEVICE_MAPPING_V2,
self.BLOCK_DEVICE_MAPPING_IMAGE],
client_plugin=glance_client_plugin,
finder='find_image_by_name_or_id'),
translation.TranslationRule(
props,
translation.TranslationRule.RESOLVE,
translation_path=[self.NETWORKS, self.NETWORK_ID],
def translation_rules(self, props):
return [
translation.TranslationRule(
props,
translation.TranslationRule.REPLACE,
[self.CONNECTIONS, self.NETWORK],
value_name=self.NETWORK_ID
),
translation.TranslationRule(
props,
translation.TranslationRule.RESOLVE,
[self.CONNECTIONS, self.NETWORK],
client_plugin=self.client_plugin(),
finder='find_resourceid_by_name_or_id',
entity='network'
)
def translation_rules(self, props):
if props.get(self.SEQUENCE):
return [
translation.TranslationRule(
props,
translation.TranslationRule.ADD,
[self.CHARACTER_CLASSES],
[{self.CHARACTER_CLASSES_CLASS: props.get(
self.SEQUENCE),
self.CHARACTER_CLASSES_MIN: 1}]),
translation.TranslationRule(
props,
translation.TranslationRule.DELETE,
[self.SEQUENCE]
)
def translation_rules(self, props):
return [
translation.TranslationRule(
props,
translation.TranslationRule.RESOLVE,
[self.PROJECT],
client_plugin=self.client_plugin('keystone'),
finder='get_project_id')
]
def translation_rules(self, properties):
return [
translation.TranslationRule(
properties,
translation.TranslationRule.RESOLVE,
[self.DOMAIN],
client_plugin=self.client_plugin(),
finder='get_domain_id'
)
def translation_rules(self, props):
return [
translation.TranslationRule(
props,
translation.TranslationRule.RESOLVE,
[self.PORT_PAIRS],
client_plugin=self.client_plugin(),
finder='resolve_ext_resource',
entity='port_pair'
)
def translation_rules(self, props):
client_plugin = self.client_plugin()
rules = [
translation.TranslationRule(
props,
translation.TranslationRule.RESOLVE,
[self.EXTERNAL_GATEWAY, self.EXTERNAL_GATEWAY_NETWORK],
client_plugin=client_plugin,
finder='find_resourceid_by_name_or_id',
entity=client_plugin.RES_TYPE_NETWORK
),
translation.TranslationRule(
props,
translation.TranslationRule.RESOLVE,
[self.EXTERNAL_GATEWAY, self.EXTERNAL_GATEWAY_FIXED_IPS,
self.SUBNET],
client_plugin=client_plugin,
finder='find_resourceid_by_name_or_id',
entity=client_plugin.RES_TYPE_SUBNET
),
def translation_rules(self, props):
return [
translation.TranslationRule(
props,
translation.TranslationRule.RESOLVE,
[self.CLUSTER_TEMPLATE],
client_plugin=self.client_plugin('magnum'),
finder='get_cluster_template')
]
def translation_rules(self, properties):
return [
translation.TranslationRule(
properties,
translation.TranslationRule.RESOLVE,
[self.DOMAIN],
client_plugin=self.client_plugin(),
finder='get_domain_id'
)