diff options
Diffstat (limited to 'components/scripts')
-rw-r--r-- | components/scripts/python/ccsdk_netconf/netconfclient.py | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/components/scripts/python/ccsdk_netconf/netconfclient.py b/components/scripts/python/ccsdk_netconf/netconfclient.py index 448e03dc1..421e50098 100644 --- a/components/scripts/python/ccsdk_netconf/netconfclient.py +++ b/components/scripts/python/ccsdk_netconf/netconfclient.py @@ -4,15 +4,19 @@ from netconf_constant import CONFIG_TARGET_RUNNING, CONFIG_DEFAULT_OPERATION_REP class NetconfClient: - def __init__(self, log, nc): + def __init__(self, log, componentFunction): self.log = log - self.nc = nc + self.componentFunction = componentFunction + self.nc = None + + def createRPCServiceFromRequirement(self, requirementName): + self.nc = self.componentFunction.netconfRpcClientService(requirementName) def disconnect(self): self.nc.disconnect() return - def connect(self,deviceInfo): + def connect(self, deviceInfo): self.nc.connect(deviceInfo) return |