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

Device component - ACTN Driver:

- Added missing log messages
- Corrected parsing of network topology
parent 72a15be4
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -109,6 +109,8 @@ class IetfActnDriver(_Driver):

                    results.extend(_results)
                except Exception as e:
                    MSG = 'Error processing resource_key: {:s}'
                    LOGGER.exception(MSG.format(str(resource_key)))
                    results.append((resource_key, e))

        return results
+9 −2
Original line number Diff line number Diff line
@@ -52,13 +52,20 @@ class NetworkTopologyHandler:

        if 'ietf-network:network' not in reply:
            raise Exception('Malformed reply. "ietf-network:network" missing')
        network = reply['ietf-network:network']
        networks = reply['ietf-network:network']

        if len(network) == 0:
        if len(networks) == 0:
            MSG = '[get] Network({:s}) not found; returning'
            LOGGER.debug(MSG.format(str(network_id)))
            return list()

        if len(networks) > 1:
            MSG = '[get] Multiple occurrences for Network({:s}); returning'
            LOGGER.debug(MSG.format(str(network_id)))
            return list()

        network = networks[0]

        MSG = '[get] import_topology={:s}'
        LOGGER.debug(MSG.format(str(self._import_topology)))