Fix incorrect line continuation characters
Existing code incorrectly uses the forward slash character for line continuations. This isn't consistent with upstream conventions, and is fixed in this patch. Change-Id: I0c0db5f2105ef0751e3b88d157aeef99acbae6c3
This commit is contained in:
		@@ -29,8 +29,8 @@ _get_attrs_address_scope_new = address_scope._get_attrs
 | 
			
		||||
 | 
			
		||||
def _get_attrs_address_scope_extension(client_manager, parsed_args):
 | 
			
		||||
    attrs = _get_attrs_address_scope_new(client_manager, parsed_args)
 | 
			
		||||
    if 'apic_distinguished_names' in parsed_args and \
 | 
			
		||||
       parsed_args.apic_distinguished_names:
 | 
			
		||||
    if ('apic_distinguished_names' in parsed_args and
 | 
			
		||||
        parsed_args.apic_distinguished_names):
 | 
			
		||||
        result = {}
 | 
			
		||||
        for element in parsed_args.apic_distinguished_names:
 | 
			
		||||
            result.update(element)
 | 
			
		||||
 
 | 
			
		||||
@@ -110,10 +110,10 @@ class CreatePolicyTarget(neutronV20.CreateCommand):
 | 
			
		||||
                               ['name', 'tenant_id', 'description',
 | 
			
		||||
                                'segmentation_labels'])
 | 
			
		||||
        if parsed_args.policy_target_group:
 | 
			
		||||
            body[self.resource]['policy_target_group_id'] = \
 | 
			
		||||
            body[self.resource]['policy_target_group_id'] = (
 | 
			
		||||
                neutronV20.find_resourceid_by_name_or_id(
 | 
			
		||||
                    self.get_client(), 'policy_target_group',
 | 
			
		||||
                    parsed_args.policy_target_group)
 | 
			
		||||
                    parsed_args.policy_target_group))
 | 
			
		||||
 | 
			
		||||
        if parsed_args.port_id:
 | 
			
		||||
            body[self.resource]['port_id'] = (
 | 
			
		||||
@@ -242,10 +242,10 @@ class CreatePolicyTargetGroup(neutronV20.CreateCommand):
 | 
			
		||||
        body = {self.resource: {}, }
 | 
			
		||||
 | 
			
		||||
        if parsed_args.l2_policy:
 | 
			
		||||
            body[self.resource]['l2_policy_id'] = \
 | 
			
		||||
            body[self.resource]['l2_policy_id'] = (
 | 
			
		||||
                neutronV20.find_resourceid_by_name_or_id(
 | 
			
		||||
                    self.get_client(), 'l2_policy',
 | 
			
		||||
                    parsed_args.l2_policy)
 | 
			
		||||
                    parsed_args.l2_policy))
 | 
			
		||||
 | 
			
		||||
        if parsed_args.application_policy_group:
 | 
			
		||||
            body[self.resource]['application_policy_group_id'] = (
 | 
			
		||||
@@ -254,10 +254,10 @@ class CreatePolicyTargetGroup(neutronV20.CreateCommand):
 | 
			
		||||
                    parsed_args.application_policy_group))
 | 
			
		||||
 | 
			
		||||
        if parsed_args.network_service_policy:
 | 
			
		||||
            body[self.resource]['network_service_policy_id'] = \
 | 
			
		||||
            body[self.resource]['network_service_policy_id'] = (
 | 
			
		||||
                neutronV20.find_resourceid_by_name_or_id(
 | 
			
		||||
                    self.get_client(), 'network_service_policy',
 | 
			
		||||
                    parsed_args.network_service_policy)
 | 
			
		||||
                    parsed_args.network_service_policy))
 | 
			
		||||
 | 
			
		||||
        if parsed_args.provided_policy_rule_sets:
 | 
			
		||||
            for key in list(
 | 
			
		||||
@@ -265,8 +265,8 @@ class CreatePolicyTargetGroup(neutronV20.CreateCommand):
 | 
			
		||||
                id_key = neutronV20.find_resourceid_by_name_or_id(
 | 
			
		||||
                    self.get_client(), 'policy_rule_set',
 | 
			
		||||
                    key)
 | 
			
		||||
                parsed_args.provided_policy_rule_sets[id_key] = \
 | 
			
		||||
                    parsed_args.provided_policy_rule_sets.pop(key)
 | 
			
		||||
                parsed_args.provided_policy_rule_sets[id_key] = (
 | 
			
		||||
                    parsed_args.provided_policy_rule_sets.pop(key))
 | 
			
		||||
 | 
			
		||||
        if parsed_args.consumed_policy_rule_sets:
 | 
			
		||||
            for key in list(
 | 
			
		||||
@@ -274,8 +274,8 @@ class CreatePolicyTargetGroup(neutronV20.CreateCommand):
 | 
			
		||||
                id_key = neutronV20.find_resourceid_by_name_or_id(
 | 
			
		||||
                    self.get_client(), 'policy_rule_set',
 | 
			
		||||
                    key)
 | 
			
		||||
                parsed_args.consumed_policy_rule_sets[id_key] = \
 | 
			
		||||
                    parsed_args.consumed_policy_rule_sets.pop(key)
 | 
			
		||||
                parsed_args.consumed_policy_rule_sets[id_key] = (
 | 
			
		||||
                    parsed_args.consumed_policy_rule_sets.pop(key))
 | 
			
		||||
 | 
			
		||||
        neutronV20.update_dict(parsed_args, body[self.resource],
 | 
			
		||||
                               ['name', 'tenant_id', 'description',
 | 
			
		||||
@@ -338,10 +338,10 @@ class UpdatePolicyTargetGroup(neutronV20.UpdateCommand):
 | 
			
		||||
        body = {self.resource: {}, }
 | 
			
		||||
 | 
			
		||||
        if parsed_args.l2_policy:
 | 
			
		||||
            body[self.resource]['l2_policy_id'] = \
 | 
			
		||||
            body[self.resource]['l2_policy_id'] = (
 | 
			
		||||
                neutronV20.find_resourceid_by_name_or_id(
 | 
			
		||||
                    self.get_client(), 'l2_policy',
 | 
			
		||||
                    parsed_args.l2_policy)
 | 
			
		||||
                    parsed_args.l2_policy))
 | 
			
		||||
 | 
			
		||||
        if parsed_args.application_policy_group == '':
 | 
			
		||||
            body[self.resource]['application_policy_group_id'] = None
 | 
			
		||||
@@ -354,10 +354,10 @@ class UpdatePolicyTargetGroup(neutronV20.UpdateCommand):
 | 
			
		||||
        if parsed_args.network_service_policy == '':
 | 
			
		||||
            body[self.resource]['network_service_policy_id'] = None
 | 
			
		||||
        elif parsed_args.network_service_policy:
 | 
			
		||||
            body[self.resource]['network_service_policy_id'] = \
 | 
			
		||||
            body[self.resource]['network_service_policy_id'] = (
 | 
			
		||||
                neutronV20.find_resourceid_by_name_or_id(
 | 
			
		||||
                    self.get_client(), 'network_service_policy',
 | 
			
		||||
                    parsed_args.network_service_policy)
 | 
			
		||||
                    parsed_args.network_service_policy))
 | 
			
		||||
 | 
			
		||||
        if parsed_args.provided_policy_rule_sets:
 | 
			
		||||
            for key in list(
 | 
			
		||||
@@ -365,8 +365,8 @@ class UpdatePolicyTargetGroup(neutronV20.UpdateCommand):
 | 
			
		||||
                id_key = neutronV20.find_resourceid_by_name_or_id(
 | 
			
		||||
                    self.get_client(), 'policy_rule_set',
 | 
			
		||||
                    key)
 | 
			
		||||
                parsed_args.provided_policy_rule_sets[id_key] = \
 | 
			
		||||
                    parsed_args.provided_policy_rule_sets.pop(key)
 | 
			
		||||
                parsed_args.provided_policy_rule_sets[id_key] = (
 | 
			
		||||
                    parsed_args.provided_policy_rule_sets.pop(key))
 | 
			
		||||
 | 
			
		||||
        if parsed_args.consumed_policy_rule_sets:
 | 
			
		||||
            for key in list(
 | 
			
		||||
@@ -374,8 +374,8 @@ class UpdatePolicyTargetGroup(neutronV20.UpdateCommand):
 | 
			
		||||
                id_key = neutronV20.find_resourceid_by_name_or_id(
 | 
			
		||||
                    self.get_client(), 'policy_rule_set',
 | 
			
		||||
                    key)
 | 
			
		||||
                parsed_args.consumed_policy_rule_sets[id_key] = \
 | 
			
		||||
                    parsed_args.consumed_policy_rule_sets.pop(key)
 | 
			
		||||
                parsed_args.consumed_policy_rule_sets[id_key] = (
 | 
			
		||||
                    parsed_args.consumed_policy_rule_sets.pop(key))
 | 
			
		||||
 | 
			
		||||
        neutronV20.update_dict(parsed_args, body[self.resource],
 | 
			
		||||
                               ['name', 'tenant_id', 'description',
 | 
			
		||||
@@ -447,18 +447,18 @@ class CreateL2Policy(neutronV20.CreateCommand):
 | 
			
		||||
                               ['name', 'tenant_id', 'description', 'shared',
 | 
			
		||||
                                'inject_default_route'])
 | 
			
		||||
        if parsed_args.l3_policy:
 | 
			
		||||
            body[self.resource]['l3_policy_id'] = \
 | 
			
		||||
            body[self.resource]['l3_policy_id'] = (
 | 
			
		||||
                neutronV20.find_resourceid_by_name_or_id(
 | 
			
		||||
                    self.get_client(), 'l3_policy',
 | 
			
		||||
                    parsed_args.l3_policy)
 | 
			
		||||
                    parsed_args.l3_policy))
 | 
			
		||||
        if parsed_args.network:
 | 
			
		||||
            body[self.resource]['network_id'] = (
 | 
			
		||||
                parsed_args.network)
 | 
			
		||||
        if parsed_args.reuse_bd:
 | 
			
		||||
            body[self.resource]['reuse_bd'] = \
 | 
			
		||||
            body[self.resource]['reuse_bd'] = (
 | 
			
		||||
                neutronV20.find_resourceid_by_name_or_id(
 | 
			
		||||
                    self.get_client(), 'l2_policy',
 | 
			
		||||
                    parsed_args.reuse_bd)
 | 
			
		||||
                    parsed_args.reuse_bd))
 | 
			
		||||
        return body
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@@ -500,10 +500,10 @@ class UpdateL2Policy(neutronV20.UpdateCommand):
 | 
			
		||||
                               ['name', 'tenant_id', 'description', 'shared',
 | 
			
		||||
                                'inject_default_route'])
 | 
			
		||||
        if parsed_args.l3_policy:
 | 
			
		||||
            body[self.resource]['l3_policy_id'] = \
 | 
			
		||||
            body[self.resource]['l3_policy_id'] = (
 | 
			
		||||
                neutronV20.find_resourceid_by_name_or_id(
 | 
			
		||||
                    self.get_client(), 'l3_policy',
 | 
			
		||||
                    parsed_args.l3_policy)
 | 
			
		||||
                    parsed_args.l3_policy))
 | 
			
		||||
 | 
			
		||||
        return body
 | 
			
		||||
 | 
			
		||||
@@ -1149,11 +1149,11 @@ class CreatePolicyRule(neutronV20.CreateCommand):
 | 
			
		||||
                    elem) for elem in parsed_args.actions]
 | 
			
		||||
 | 
			
		||||
        if parsed_args.classifier:
 | 
			
		||||
            body[self.resource]['policy_classifier_id'] = \
 | 
			
		||||
            body[self.resource]['policy_classifier_id'] = (
 | 
			
		||||
                neutronV20.find_resourceid_by_name_or_id(
 | 
			
		||||
                    self.get_client(),
 | 
			
		||||
                    'policy_classifier',
 | 
			
		||||
                    parsed_args.classifier)
 | 
			
		||||
                    parsed_args.classifier))
 | 
			
		||||
 | 
			
		||||
        neutronV20.update_dict(parsed_args, body[self.resource],
 | 
			
		||||
                               ['name', 'tenant_id', 'description',
 | 
			
		||||
@@ -1209,11 +1209,11 @@ class UpdatePolicyRule(neutronV20.UpdateCommand):
 | 
			
		||||
                    elem) for elem in parsed_args.actions]
 | 
			
		||||
 | 
			
		||||
        if parsed_args.classifier:
 | 
			
		||||
            body[self.resource]['policy_classifier_id'] = \
 | 
			
		||||
            body[self.resource]['policy_classifier_id'] = (
 | 
			
		||||
                neutronV20.find_resourceid_by_name_or_id(
 | 
			
		||||
                    self.get_client(),
 | 
			
		||||
                    'policy_classifier',
 | 
			
		||||
                    parsed_args.classifier)
 | 
			
		||||
                    parsed_args.classifier))
 | 
			
		||||
 | 
			
		||||
        neutronV20.update_dict(parsed_args, body[self.resource],
 | 
			
		||||
                               ['name', 'description',
 | 
			
		||||
 
 | 
			
		||||
@@ -29,11 +29,11 @@ _get_attrs_network_new = network._get_attrs_network
 | 
			
		||||
 | 
			
		||||
def _get_attrs_network_extension(client_manager, parsed_args):
 | 
			
		||||
    attrs = _get_attrs_network_new(client_manager, parsed_args)
 | 
			
		||||
    if 'apic_svi_enable' in parsed_args and \
 | 
			
		||||
       parsed_args.apic_svi_enable:
 | 
			
		||||
    if ('apic_svi_enable' in parsed_args and
 | 
			
		||||
        parsed_args.apic_svi_enable):
 | 
			
		||||
        attrs['apic:svi'] = True
 | 
			
		||||
    if 'apic_svi_disable' in parsed_args and \
 | 
			
		||||
       parsed_args.apic_svi_disable:
 | 
			
		||||
    if ('apic_svi_disable' in parsed_args and
 | 
			
		||||
        parsed_args.apic_svi_disable):
 | 
			
		||||
        attrs['apic:svi'] = False
 | 
			
		||||
    if parsed_args.apic_bgp_enable:
 | 
			
		||||
        attrs['apic:bgp_enable'] = True
 | 
			
		||||
@@ -79,8 +79,8 @@ def _get_attrs_network_extension(client_manager, parsed_args):
 | 
			
		||||
    if parsed_args.apic_epg_contract_masters:
 | 
			
		||||
        attrs['apic:epg_contract_masters'
 | 
			
		||||
              ] = parsed_args.apic_epg_contract_masters.split(",")
 | 
			
		||||
    if 'apic_distinguished_names' in parsed_args and \
 | 
			
		||||
       parsed_args.apic_distinguished_names:
 | 
			
		||||
    if ('apic_distinguished_names' in parsed_args and
 | 
			
		||||
        parsed_args.apic_distinguished_names):
 | 
			
		||||
        result = {}
 | 
			
		||||
        for element in parsed_args.apic_distinguished_names:
 | 
			
		||||
            result.update(element)
 | 
			
		||||
@@ -95,8 +95,8 @@ def _get_attrs_network_extension(client_manager, parsed_args):
 | 
			
		||||
        if parsed_args.apic_external_cidrs:
 | 
			
		||||
            attrs['apic:external_cidrs'
 | 
			
		||||
                  ] = parsed_args.apic_external_cidrs.split(",")
 | 
			
		||||
        if 'apic_no_external_cidrs' in parsed_args and \
 | 
			
		||||
           parsed_args.apic_no_external_cidrs:
 | 
			
		||||
        if ('apic_no_external_cidrs' in parsed_args and
 | 
			
		||||
            parsed_args.apic_no_external_cidrs):
 | 
			
		||||
            attrs['apic:external_cidrs'] = []
 | 
			
		||||
    return attrs
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -32,11 +32,11 @@ def _get_attrs_subnet_extension(client_manager, parsed_args, is_create=True):
 | 
			
		||||
        attrs['apic:snat_host_pool'] = True
 | 
			
		||||
    if parsed_args.apic_snat_host_pool_disable:
 | 
			
		||||
        attrs['apic:snat_host_pool'] = False
 | 
			
		||||
    if 'apic_active_active_aap_enable' in parsed_args and \
 | 
			
		||||
       parsed_args.apic_active_active_aap_enable:
 | 
			
		||||
    if ('apic_active_active_aap_enable' in parsed_args and
 | 
			
		||||
        parsed_args.apic_active_active_aap_enable):
 | 
			
		||||
        attrs['apic:active_active_aap'] = True
 | 
			
		||||
    if 'apic_active_active_aap_disable' in parsed_args and \
 | 
			
		||||
       parsed_args.apic_active_active_aap_disable:
 | 
			
		||||
    if ('apic_active_active_aap_disable' in parsed_args and
 | 
			
		||||
        parsed_args.apic_active_active_aap_disable):
 | 
			
		||||
        attrs['apic:active_active_aap'] = False
 | 
			
		||||
    if parsed_args.apic_snat_subnet_only_enable:
 | 
			
		||||
        attrs['apic:snat_subnet_only'] = True
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user