diff options
author | Alexis de Talhouët <adetalhouet89@gmail.com> | 2019-03-26 09:49:13 -0400 |
---|---|---|
committer | Alexis de Talhouët <adetalhouet89@gmail.com> | 2019-03-26 09:49:13 -0400 |
commit | 72d22a4339db09824d46746dacbba1e141763dc0 (patch) | |
tree | 7fbfea4b81afca0bc0c95e5d4b810f236f4dea29 /components/scripts/python/ccsdk_netconf/netconfclient.py | |
parent | ef6983b670796becfa66c69075c1829e8f9aef4b (diff) |
Migrate ccdsk/apps to ccsdk/cds
Change-Id: I020a2ccec4e691717f888e8bd2afec91a7c4e987
Issue-ID: CCSDK-1178
Signed-off-by: Alexis de Talhouët <adetalhouet89@gmail.com>
Diffstat (limited to 'components/scripts/python/ccsdk_netconf/netconfclient.py')
-rw-r--r-- | components/scripts/python/ccsdk_netconf/netconfclient.py | 62 |
1 files changed, 0 insertions, 62 deletions
diff --git a/components/scripts/python/ccsdk_netconf/netconfclient.py b/components/scripts/python/ccsdk_netconf/netconfclient.py deleted file mode 100644 index e263ba8f..00000000 --- a/components/scripts/python/ccsdk_netconf/netconfclient.py +++ /dev/null @@ -1,62 +0,0 @@ -from netconf_constant import CONFIG_TARGET_RUNNING, CONFIG_TARGET_CANDIDATE, \ - CONFIG_DEFAULT_OPERATION_REPLACE - - -class NetconfClient: - - def __init__(self, log, component_function, requirement_name): - self.log = log - self.component_function = component_function - netconf_device = self.component_function.initializeNetconfConnection( - requirement_name) - self.netconf_rpc_client = netconf_device.netconfRpcService - self.netconf_session = netconf_device.netconfSession - - def disconnect(self): - self.netconf_session.disconnect() - return - - def connect(self): - self.netconf_session.connect() - return - - def lock(self, config_target=CONFIG_TARGET_CANDIDATE): - device_response = self.netconf_rpc_client.lock(config_target) - return device_response - - def get_config(self, filter="", config_target=CONFIG_TARGET_RUNNING): - device_response = self.netconf_rpc_client.getConfig(filter, config_target) - return device_response - - def edit_config(self, message_content, config_target=CONFIG_TARGET_CANDIDATE, - edit_default_peration=CONFIG_DEFAULT_OPERATION_REPLACE): - device_response = self.netconf_rpc_client.editConfig(message_content, - config_target, - edit_default_peration) - return device_response - - def commit(self, confirmed=False, confirm_timeout=60, persist="", - persist_id=""): - device_response = self.netconf_rpc_client.commit(confirmed, confirm_timeout, - persist, persist_id) - return device_response - - def invoke_rpc(self, rpc): - device_response = self.netconf_rpc_client.invokeRpc(rpc) - return device_response - - def cancel_commit(self, persist_id=""): - device_response = self.netconf_rpc_client.cancelCommit(persist_id) - return device_response - - def unlock(self, config_target=CONFIG_TARGET_CANDIDATE): - device_response = self.netconf_rpc_client.unLock(config_target) - return device_response - - def validate(self, config_target=CONFIG_TARGET_CANDIDATE): - device_response = self.netconf_rpc_client.validate(config_target) - return device_response - - def discard_change(self): - device_response = self.netconf_rpc_client.discardConfig() - return device_response |