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

Device component - NCE Driver:

- Fixed AppFlow RESTCONF POST calls
parent a49f657b
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -48,7 +48,7 @@ class AppFlowHandler:
            for qos_profile in qos_profiles:
                request = {'huawei-nce-app-flow:qos-profiles': {'qos-profile': qos_profile}}
                LOGGER.info('Creating QoS Profile: {:s}'.format(str(request)))
                self._rest_conf_client.post(self._url_qos_profile, json=request)
                self._rest_conf_client.post(self._url_qos_profile, body=request)

            applications = (
                data
@@ -59,7 +59,7 @@ class AppFlowHandler:
            for application in applications:
                request = {'huawei-nce-app-flow:applications': {'application': application}}
                LOGGER.info('Creating Application: {:s}'.format(str(request)))
                self._rest_conf_client.post(self._url_application, json=request)
                self._rest_conf_client.post(self._url_application, body=request)

            app_flows = (
                data
@@ -69,7 +69,7 @@ class AppFlowHandler:
            for app_flow in app_flows:
                request = {'huawei-nce-app-flow:app-flows': {'app-flow': app_flow}}
                LOGGER.info('Creating App Flow: {:s}'.format(str(request)))
                self._rest_conf_client.post(self._url_app_flow, json=request)
                self._rest_conf_client.post(self._url_app_flow, body=request)

        except requests.exceptions.ConnectionError as e:
            MSG = 'Failed to send POST requests to NCE FAN NBI'