aboutsummaryrefslogtreecommitdiffstats
path: root/components/model-catalog/blueprint-model/test-blueprint/baseconfiguration/Scripts/python
diff options
context:
space:
mode:
authorAlexis de Talhouët <adetalhouet89@gmail.com>2019-02-18 08:08:24 -0500
committerAlexis de Talhouët <adetalhouet89@gmail.com>2019-02-18 17:31:41 -0500
commita69b9f500b4f15f78e468cce8561af193a7eb83b (patch)
tree0fb974eed1f44019c2d03c19bbedd0397ead3afd /components/model-catalog/blueprint-model/test-blueprint/baseconfiguration/Scripts/python
parent455c33fc94acfad8d8f577e2439e5ac56adfa05c (diff)
Simplify NetconfRpcService
Change-Id: I6daac25c272ab6b437c07602167a76a2d61816db Issue-ID: CCSDK-790 Signed-off-by: Alexis de Talhouët <adetalhouet89@gmail.com>
Diffstat (limited to 'components/model-catalog/blueprint-model/test-blueprint/baseconfiguration/Scripts/python')
-rw-r--r--components/model-catalog/blueprint-model/test-blueprint/baseconfiguration/Scripts/python/NetconfRpcExample.py16
1 files changed, 8 insertions, 8 deletions
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: