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

NBI Component - SSE Telemetry:

- Fixed xpath handling
parent 81eb9896
Loading
Loading
Loading
Loading
+5 −3
Original line number Diff line number Diff line
@@ -88,14 +88,16 @@ def decompose_subscription(
    input_data = s['ietf-subscribed-notifications:input']
    xpath_filter = input_data['ietf-yang-push:datastore-xpath-filter']

    xpath_filter_2 = xpath_filter.replace('/simap-telemetry', '')

    rest_conf_client = RestConfClient(
        '10.254.0.9', port=8080, scheme='http', username='admin', password='admin',
        logger=logging.getLogger('RestConfClient')
    )
    xpath_data = rest_conf_client.get(xpath_filter)
    xpath_data = rest_conf_client.get(xpath_filter_2)
    if not xpath_data:
        MSG = 'Resource({:s}) not found in SIMAP Server'
        raise Exception(MSG.format(str(xpath_filter)))
        MSG = 'Resource({:s} => {:s}) not found in SIMAP Server'
        raise Exception(MSG.format(str(xpath_filter), str(xpath_filter_2)))

#    # Parse the XPath to extract network and link information
#    # Format: /ietf-network:networks/network=<network-id>/ietf-network-topology:link=<link-id>/simap-telemetry