From a69b9f500b4f15f78e468cce8561af193a7eb83b Mon Sep 17 00:00:00 2001 From: Alexis de Talhouët Date: Mon, 18 Feb 2019 08:08:24 -0500 Subject: Simplify NetconfRpcService MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I6daac25c272ab6b437c07602167a76a2d61816db Issue-ID: CCSDK-790 Signed-off-by: Alexis de Talhouët --- .../Scripts/python/NetconfRpcExample.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'components/model-catalog/blueprint-model/test-blueprint/baseconfiguration/Scripts/python') diff --git a/components/model-catalog/blueprint-model/test-blueprint/baseconfiguration/Scripts/python/NetconfRpcExample.py b/components/model-catalog/blueprint-model/test-blueprint/baseconfiguration/Scripts/python/NetconfRpcExample.py index 26c66b667..94cd72a48 100644 --- a/components/model-catalog/blueprint-model/test-blueprint/baseconfiguration/Scripts/python/NetconfRpcExample.py +++ b/components/model-catalog/blueprint-model/test-blueprint/baseconfiguration/Scripts/python/NetconfRpcExample.py @@ -15,6 +15,7 @@ import netconf_constant from common import ResolutionHelper from java.lang import Exception as JavaException +from netconfclient import NetconfClient from org.onap.ccsdk.apps.blueprintsprocessor.functions.netconf.executor import \ NetconfComponentFunction @@ -31,17 +32,16 @@ class NetconfRpcExample(NetconfComponentFunction): payload = rr.resolve_and_generate_message_from_template_prefix("hostname") nc.connect() - response = nc.lock(message_id="lock-123") + response = nc.lock() if not response.isSuccess(): log.error(response.errorMessage) - nc.edit_config(message_id="edit-config-1", message_content=payload, - edit_default_peration="none") - # nc.validate(message_id="validate-123") - # nc.discard_change(message_id="discard-123") - nc.validate(message_id="validate-123") - nc.commit(message_id="commit-123") - nc.unlock(message_id="unlock-123") + nc.edit_config(message_content=payload, edit_default_peration="none") + nc.validate() + nc.discard_change() + nc.validate() + nc.commit() + nc.unlock() nc.disconnect() except JavaException, err: -- cgit 1.2.3-korg