aboutsummaryrefslogtreecommitdiffstats
path: root/components/scripts
diff options
context:
space:
mode:
authorMuthuramalingam, Brinda Santh <brindasanth@in.ibm.com>2019-02-12 15:26:19 -0500
committerMuthuramalingam, Brinda Santh <brindasanth@in.ibm.com>2019-02-12 15:26:19 -0500
commitf7c657993d50ed855a1ac359b5dd325960a6051b (patch)
tree6eedbb5cccf3f0dcaf7052544f69fd3c35529438 /components/scripts
parent4d7d6d918a724e9c83692bf8e5c7a491f073d970 (diff)
Add netconf script component function
Change-Id: I094025fba5626bae0b4b13320f1cbbb76cda3bfd Issue-ID: CCSDK-790 Signed-off-by: Muthuramalingam, Brinda Santh <brindasanth@in.ibm.com>
Diffstat (limited to 'components/scripts')
-rw-r--r--components/scripts/python/ccsdk_netconf/netconfclient.py10
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