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

Device component - ACTN Driver:

- Fixed RestConfClient instantiation
parent bcbdb6d2
Loading
Loading
Loading
Loading
+8 −2
Original line number Diff line number Diff line
@@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

import json, logging, requests, threading
import copy, json, logging, requests, threading
from typing import Any, Iterator, List, Optional, Tuple, Union
from common.method_wrappers.Decorator import MetricsPool, metered_subclass_method
from common.tools.client.RestConfClient import RestConfClient
@@ -40,8 +40,14 @@ class IetfActnDriver(_Driver):
        self.__lock = threading.Lock()
        self.__started = threading.Event()
        self.__terminate = threading.Event()

        self._rest_api_client = RestApiClient(address, port, settings=settings)
        self._rest_conf_client = RestConfClient(address, port, **settings)

        restconf_settings = copy.deepcopy(settings)
        restconf_settings.pop('base_url', None)
        restconf_settings.pop('import_topology', None)
        self._rest_conf_client = RestConfClient(address, port=port, **restconf_settings)

        self._handler_etht_service = EthtServiceHandler(self._rest_api_client)
        self._handler_net_topology = NetworkTopologyHandler(self._rest_conf_client, **settings)
        self._handler_osu_tunnel = OsuTunnelHandler(self._rest_api_client)