From abc0e95377ebc065dcd0ea91ad9129bd0aea2efd Mon Sep 17 00:00:00 2001 From: Itzik Brown Date: Tue, 19 Dec 2017 12:42:19 +0200 Subject: [PATCH] Set AUTH variable in natapp basic suite Using ODL_RESTCONF_USER and ODL_RESTCONF_PASSWORD to set the AUTH variable Change-Id: Ibfda4f3ed38abfe360042c2ef5b3c29412b56974 Signed-off-by: Itzik Brown --- csit/suites/natapp/basic/restconf_modules.robot | 5 +++-- csit/variables/Variables.robot | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/csit/suites/natapp/basic/restconf_modules.robot b/csit/suites/natapp/basic/restconf_modules.robot index 88c9b22157..acf67954f8 100644 --- a/csit/suites/natapp/basic/restconf_modules.robot +++ b/csit/suites/natapp/basic/restconf_modules.robot @@ -1,13 +1,14 @@ *** Settings *** Documentation Test suite to verify Restconf is OK. -Suite Setup RequestsLibrary.Create_Session session http://${ODL_SYSTEM_IP}:${RESTCONFPORT} auth=${AUTH} headers=${HEADERS_XML} Suite Teardown RequestsLibrary.Delete_All_Sessions Library RequestsLibrary -Variables ${CURDIR}/../../../variables/Variables.py +Resource ${CURDIR}/../../../variables/Variables.robot *** Test Cases *** Get Controller Modules [Documentation] Get the restconf modules, check 200 status and ietf-restconf presence. + ${AUTH} = Set Variable ${ODL_RESTCONF_USER} ${ODL_RESTCONF_PASSWORD} + RequestsLibrary.Create_Session session http://${ODL_SYSTEM_IP}:${RESTCONFPORT} auth=${AUTH} headers=&{HEADERS_XML} ${resp} = RequestsLibrary.Get_Request session ${MODULES_API} BuiltIn.Log ${resp.content} BuiltIn.Should_Be_Equal ${resp.status_code} ${200} diff --git a/csit/variables/Variables.robot b/csit/variables/Variables.robot index c693f3ded7..1812f0cb45 100644 --- a/csit/variables/Variables.robot +++ b/csit/variables/Variables.robot @@ -27,7 +27,7 @@ Documentation Resource consisting purely of variable definitions useful for ${ALERTFIELDCONTENTRULERECORD} /restconf/config/alertrule:alertFieldContentRuleRecord/ # FIXME: Move to a separate Centinel-related Resource and add description. ${ALERTFIELDVALUERULERECORD} /restconf/config/alertrule:alertFieldValueRuleRecord # FIXME: Move to a separate Centinel-related Resource and add description. ${ALERTMESSAGECOUNTRULERECORD} /restconf/config/alertrule:alertMessageCountRuleRecord/ # FIXME: Move to a separate Centinel-related Resource and add description. -@{AUTH} admin admin # Authentication tuple for accessing ODL RESTCONF server. TODO: Migrate most suites to TemplatedRequests, then chose a more descriptive name. +@{AUTH} ${ODL_RESTCONF_USER} ${ODL_RESTCONF_PASSWORD} # Authentication tuple for accessing ODL RESTCONF server. TODO: Migrate most suites to TemplatedRequests, then chose a more descriptive name. @{AUTH_SDN} sdnadmin sdnsdn # Authentication tuple for accessing ODL RESTCONF server with Keystone Authentication @{AUTH_SDN_DOMAIN} sdnadmin@sdn sdnsdn # Authentication tuple for accessing ODL RESTCONF server with Keystone Authentication @{AUTH_SDN_WRONG_DOM} sdnadmin@wrong sdnsdn # Authentication tuple for accessing ODL RESTCONF server with Keystone Authentication -- 2.36.6