Commit 57fa1503 authored by Lluis Gifre Renom's avatar Lluis Gifre Renom
Browse files

Pre-merge code cleanup and addition of headers

parent b38dd2fa
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -43,7 +43,7 @@ def setup_config_rules(
    vlan_id             = json_endpoint_settings.get('vlan_id',             1        )  # 400
    address_ip          = json_endpoint_settings.get('address_ip',          '0.0.0.0')  # '2.2.2.1'
    address_prefix      = json_endpoint_settings.get('address_prefix',      24       )  # 30
    if_subif_name       = '{:s}.{:s}'.format(endpoint_name, str(vlan_id))
    if_subif_name       = '{:s}.{:d}'.format(endpoint_name, vlan_id)

    json_config_rules = [
        json_config_rule_set(
@@ -163,7 +163,7 @@ def teardown_config_rules(
    #address_ip          = json_endpoint_settings.get('address_ip',          '0.0.0.0')  # '2.2.2.1'
    #address_prefix      = json_endpoint_settings.get('address_prefix',      24       )  # 30

    if_subif_name             = '{:s}.{:s}'.format(endpoint_name, vlan_id)
    if_subif_name             = '{:s}.{:d}'.format(endpoint_name, vlan_id)
    service_short_uuid        = service_uuid.split('-')[-1]
    network_instance_name     = '{:s}-NetInst'.format(service_short_uuid)
    #network_interface_desc    = '{:s}-NetIf'.format(service_uuid)
+3 −5
Original line number Diff line number Diff line
@@ -12,11 +12,9 @@
# See the License for the specific language governing permissions and
# limitations under the License.

import logging
from typing import Dict, List, Tuple
from common.tools.object_factory.ConfigRule import json_config_rule_delete, json_config_rule_set
from service.service.service_handler_api.AnyTreeTools import TreeNode
LOGGER = logging.getLogger(__name__)

def setup_config_rules(
    service_uuid : str, connection_uuid : str, device_uuid : str, endpoint_uuid : str, endpoint_name : str,
@@ -50,7 +48,7 @@ def setup_config_rules(
    #network_instance_name    = '{:s}-NetInst'.format(service_short_uuid)
    network_instance_name     = json_endpoint_settings.get('ni_name',          service_uuid.split('-')[-1])  #ELAN-AC:1

    if_subif_name       = '{:s}.{:s}'.format(endpoint_name, vlan_id)
    if_subif_name       = '{:s}.{:d}'.format(endpoint_name, vlan_id)

    json_config_rules = [
        # Configure Interface (not used)
@@ -219,7 +217,7 @@ def teardown_config_rules(
    policy_import       = json_endpoint_settings.get('policy_AZ',            '2'      )  # 2
    policy_export       = json_endpoint_settings.get('policy_ZA',            '7'      )  # 30

    if_subif_name             = '{:s}.{:s}'.format(endpoint_name, vlan_id)
    if_subif_name             = '{:s}.{:d}'.format(endpoint_name, vlan_id)

    json_config_rules = [
        #Delete table connections
+2 −2

File changed.

Contains only whitespace changes.