Commit b6822d07 authored by Pavel Spirek's avatar Pavel Spirek

YANG library not parsed twice anymore

parent c6219e8f
......@@ -5,7 +5,6 @@ from enum import Enum
from colorlog import error, warning as warn, info
from typing import List, Any, Dict, Callable, Optional, Tuple
from datetime import datetime
from pkg_resources import resource_string
from yangson.datamodel import DataModel
from yangson.enumerations import ContentType, ValidationScope
......@@ -254,8 +253,7 @@ class BaseDatastore:
if with_nacm:
self.nacm = NacmConfig(self, self._dm)
yang_lib_str = resource_string(CONFIG["GLOBAL"]["BACKEND_PACKAGE"], "yang-library-data.json").decode("utf-8")
self._yang_lib_data = self._dm.from_raw(json.loads(yang_lib_str))
self._yang_lib_data = self._dm.from_raw(self._dm.yang_library)
# Returns DataModel object
def get_dm(self) -> DataModel:
......@@ -6,5 +6,5 @@ pyaml==16.12.2
-e .
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment