Commit c85fce1a authored by Lluis Gifre Renom's avatar Lluis Gifre Renom
Browse files

Device component - IETF ACTN / NCE drivers:

- Fixed device type inference
parent 7e619115
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -80,7 +80,7 @@ class NetworkTopologyHandler:
            if 'ietf-te-topology:te-topology' in nnt:
                nnt_tet = nnt['ietf-te-topology:te-topology']
                if 'ietf-otn-topology:otn-topology' in nnt_tet:
                    device_type = DeviceTypeEnum.EMULATED_OPTICAL_ROADM.value
                    device_type = DeviceTypeEnum.OPTICAL_FGOTN.value
                    endpoint_type = 'optical'
                elif 'ietf-eth-te-topology:eth-tran-topology' in nnt_tet:
                    device_type = DeviceTypeEnum.EMULATED_PACKET_SWITCH.value
+6 −1
Original line number Diff line number Diff line
@@ -80,7 +80,7 @@ class NetworkTopologyHandler:
            if 'ietf-te-topology:te-topology' in nnt:
                nnt_tet = nnt['ietf-te-topology:te-topology']
                if 'ietf-otn-topology:otn-topology' in nnt_tet:
                    device_type = DeviceTypeEnum.EMULATED_OPTICAL_ROADM.value
                    device_type = DeviceTypeEnum.OPTICAL_OLT.value
                    endpoint_type = 'optical'
                elif 'ietf-eth-te-topology:eth-tran-topology' in nnt_tet:
                    device_type = DeviceTypeEnum.EMULATED_PACKET_SWITCH.value
@@ -105,6 +105,11 @@ class NetworkTopologyHandler:
                    if 'name' in ntea:
                        node_name = ntea['name']

            if 'OLT' in node_id:
                device_type = DeviceTypeEnum.OPTICAL_OLT.value
            elif 'ONT' in node_id:
                device_type = DeviceTypeEnum.OPTICAL_ONT.value

            device_url = '/devices/device[{:s}]'.format(node_id)
            device_data = {
                'uuid': node_id,