Add more configurability to Netconf device configurator 90/35190/2
authorJozef Behran <jbehran@cisco.com>
Mon, 22 Feb 2016 11:47:11 +0000 (12:47 +0100)
committerGerrit Code Review <gerrit@opendaylight.org>
Mon, 22 Feb 2016 14:31:26 +0000 (14:31 +0000)
The Configure_Device_On_Netconf now got "address", "port",
"user" and "password" arguments that specify these
configuration options for the device. This is needed to be
able to connect to non-testtool devices which have real
authentication and live on different address:port than
the testtool ones live.

Change-Id: I22c541302bfc2c9d78eee18358654aaaa1baf052
Signed-off-by: Jozef Behran <jbehran@cisco.com>
csit/libraries/NetconfKeywords.robot
csit/variables/netconf/device/configure-via-topology/data.xml
csit/variables/netconf/device/default/data.xml

index a89e449732348fae0be78c35b313589960e45b02..36731719f9e4bee877cdc449912c98000543daaf 100644 (file)
@@ -37,9 +37,9 @@ Setup_NetconfKeywords
     NexusKeywords.Initialize_Artifact_Deployment_And_Usage
 
 Configure_Device_In_Netconf
-    [Arguments]    ${device_name}    ${device_type}=default    ${device_port}=${FIRST_TESTTOOL_PORT}
+    [Arguments]    ${device_name}    ${device_type}=default    ${device_port}=${FIRST_TESTTOOL_PORT}    ${device_address}=${TOOLS_SYSTEM_IP}    ${device_user}=admin    ${device_password}=topsecret
     [Documentation]    Tell Netconf about the specified device so it can add it into its configuration.
-    ${template_as_string}=    BuiltIn.Set_Variable    {'DEVICE_IP': '${TOOLS_SYSTEM_IP}', 'DEVICE_NAME': '${device_name}', 'DEVICE_PORT': '${device_port}'}
+    ${template_as_string}=    BuiltIn.Set_Variable    {'DEVICE_IP': '${device_address}', 'DEVICE_NAME': '${device_name}', 'DEVICE_PORT': '${device_port}', 'DEVICE_USER': '${device_user}', 'DEVICE_PASSWORD': '${device_password}'}
     NetconfViaRestconf.Put_Xml_Template_Folder_Via_Restconf    ${DIRECTORY_WITH_DEVICE_TEMPLATES}${/}${device_type}    ${template_as_string}
     Collections.Set_To_Dictionary    ${NetconfKeywords__mounted_device_types}    ${device_name}    ${device_type}
 
index 9099d39b710c168ce1f2f83be2e72ded0c63b6c3..6c8b35260425d33502216087eba252e141d062c3 100644 (file)
@@ -2,8 +2,8 @@
   <node-id>$DEVICE_NAME</node-id>
   <host xmlns="urn:opendaylight:netconf-node-topology">$DEVICE_IP</host>
   <port xmlns="urn:opendaylight:netconf-node-topology">$DEVICE_PORT</port>
-  <username xmlns="urn:opendaylight:netconf-node-topology">admin</username>
-  <password xmlns="urn:opendaylight:netconf-node-topology">topsecret</password>
+  <username xmlns="urn:opendaylight:netconf-node-topology">$DEVICE_USER</username>
+  <password xmlns="urn:opendaylight:netconf-node-topology">$DEVICE_PASSWORD</password>
   <tcp-only xmlns="urn:opendaylight:netconf-node-topology">false</tcp-only>
   <keepalive-delay xmlns="urn:opendaylight:netconf-node-topology">0</keepalive-delay>
 </node>
index 0bc58019617df4b49b376c359fe8b67800ce40e9..295f00c35e2a428939191039467f7f3229d239f7 100644 (file)
@@ -3,8 +3,8 @@
   <name>$DEVICE_NAME</name>
   <address xmlns="urn:opendaylight:params:xml:ns:yang:controller:md:sal:connector:netconf">$DEVICE_IP</address>
   <port xmlns="urn:opendaylight:params:xml:ns:yang:controller:md:sal:connector:netconf">$DEVICE_PORT</port>
-  <username xmlns="urn:opendaylight:params:xml:ns:yang:controller:md:sal:connector:netconf">admin</username>
-  <password xmlns="urn:opendaylight:params:xml:ns:yang:controller:md:sal:connector:netconf">topsecret</password>
+  <username xmlns="urn:opendaylight:params:xml:ns:yang:controller:md:sal:connector:netconf">$DEVICE_USER</username>
+  <password xmlns="urn:opendaylight:params:xml:ns:yang:controller:md:sal:connector:netconf">$DEVICE_PASSWORD</password>
   <tcp-only xmlns="urn:opendaylight:params:xml:ns:yang:controller:md:sal:connector:netconf">false</tcp-only>
   <event-executor xmlns="urn:opendaylight:params:xml:ns:yang:controller:md:sal:connector:netconf">
     <type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller:netty">prefix:netty-event-executor</type>