Commit 4580bbff authored by Lluis Gifre Renom's avatar Lluis Gifre Renom
Browse files

Device component - OpenConfig driver:

- Fixes in per-vendor specificities
- Renamed sequence_id to statement_name
parent 9ad5578d
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -54,8 +54,7 @@ def create_If_SubIf(data,vendor, DEL):
                    with tag('enabled'):text('true')    
                with tag('subinterfaces'):
                    with tag('subinterface'):
                        # if vendor == 'ADVA':
                        if True:
                        if vendor is None or vendor == 'ADVA':
                            with tag('index'): text('0')
                        with tag('config'):
                            with tag('index'): text('0')
+3 −6
Original line number Diff line number Diff line
@@ -66,12 +66,10 @@ def create_NI(parameters,vendor,DEL):
                        with tag('name'):text(parameters['name'])
                        if "router_id" in parameters: 
                            with tag('router-id'):text(parameters['router_id'])
                        # if vendor == "ADVA": 
                        if True:
                        if vendor is None or vendor == 'ADVA':
                            with tag('type', 'xmlns:oc-ni-types="http://openconfig.net/yang/network-instance-types"'):text('oc-ni-types:',parameters['type'])
                            with tag('route-distinguisher'):text(parameters['route_distinguisher'])
                    # if vendor == "ADVA": 
                    if True:
                    if vendor is None or vendor == 'ADVA':
                        with tag('encapsulation'):
                            with tag('config'):
                                with tag('encapsulation-type', 'xmlns:oc-ni-types="http://openconfig.net/yang/network-instance-types"')  :text('oc-ni-types:MPLS')
@@ -149,8 +147,7 @@ def add_protocol_NI(parameters,vendor, DEL):
                                                    with tag('neighbor-address'): text(neighbor['ip_address'])
                                                    with tag('enabled'): text('true')
                                                    with tag('peer-as'): text(parameters['as'])
                # if vendor == "ADVA": 
                if True: 
                if vendor is None or vendor == 'ADVA':
                    with tag('tables'):
                      with tag('table'):
                          with tag('protocol', 'xmlns:oc-pol-types="http://openconfig.net/yang/policy-types"'):text('oc-pol-types:',parameters['identifier'])
+2 −3
Original line number Diff line number Diff line
@@ -40,7 +40,6 @@ def create_rp_statement(data, DEL):
    RP_statement_name       = data['statement_name']
    RP_policy_result        = data['policy_result']
    RP_ext_comm_set_name    = data['ext_community_set_name']
    RP_sequence_id          = data['sequence_id']
    

    with tag('routing-policy', xmlns="http://openconfig.net/yang/routing-policy"):
@@ -56,9 +55,9 @@ def create_rp_statement(data, DEL):
                        with tag('name'):text(RP_policy_name)
                    with tag('statements'):
                        with tag('statement'):
                            with tag('name'):text(RP_sequence_id)
                            with tag('name'):text(RP_statement_name)
                            with tag('config'):
                                with tag('name'):text(RP_sequence_id)
                                with tag('name'):text(RP_statement_name)
                            with tag('conditions'):
                                with tag('config'):
                                    with tag('install-protocol-eq', **{'xmlns:openconfig-policy-types': 'http://openconfig.net/yang/policy-types'}):text('openconfig-policy-types:DIRECTLY_CONNECTED')
+2 −2
Original line number Diff line number Diff line
@@ -8,9 +8,9 @@
            </config>
            <statements>
                <statement>
                    <name>{{sequence_id}}</name>
                    <name>{{statement_name}}</name>
                    <config>
                        <name>{{sequence_id}}</name>
                        <name>{{statement_name}}</name>
                    </config>
                    <conditions>
                         <config>