From f3036b01959596b7a70e1717c9f64f0e3d1c973b Mon Sep 17 00:00:00 2001 From: =?utf8?q?C=C3=A9dric=20Ollivier?= Date: Tue, 19 Sep 2017 20:41:41 +0200 Subject: [PATCH] Support https endpoints (Keystone and Neutron) MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit It simply replaces http://${NEUTRON}:9696 by ${NEUTRONURL} and http://${KEYSTONE}:5000 by ${KEYSTONEURL}. It also switches to Variables.robot and defines ${NEUTRON_SUBNETS_API} in it. Change-Id: I76702facfbfb068160933fbba4dbb5f2cbc41d15 Signed-off-by: Cédric Ollivier --- csit/suites/openstack/neutron/001__reachability.robot | 2 +- csit/suites/openstack/neutron/010__networks.robot | 4 ++-- csit/suites/openstack/neutron/020__subnets.robot | 4 ++-- csit/suites/openstack/neutron/030__ports.robot | 4 ++-- csit/suites/openstack/neutron/040__delete_ports.robot | 4 ++-- csit/suites/openstack/neutron/050__delete_subnets.robot | 4 ++-- csit/suites/openstack/neutron/060__delete_networks.robot | 4 ++-- csit/suites/openstack/neutron/__init__.robot | 5 +++-- csit/variables/Variables.robot | 3 +++ 9 files changed, 19 insertions(+), 15 deletions(-) diff --git a/csit/suites/openstack/neutron/001__reachability.robot b/csit/suites/openstack/neutron/001__reachability.robot index d522a884fa..99e46291c5 100644 --- a/csit/suites/openstack/neutron/001__reachability.robot +++ b/csit/suites/openstack/neutron/001__reachability.robot @@ -2,7 +2,7 @@ Suite Setup Create Session ODL http://${ODL_SYSTEM_IP}:${PORT} headers=${HEADERS} auth=${AUTH} Suite Teardown Delete All Sessions Library RequestsLibrary -Variables ../../../variables/Variables.py +Resource ../../../variables/Variables.robot *** Test Cases *** Get the complete list of networks diff --git a/csit/suites/openstack/neutron/010__networks.robot b/csit/suites/openstack/neutron/010__networks.robot index fdda5b2b1b..90a378b556 100644 --- a/csit/suites/openstack/neutron/010__networks.robot +++ b/csit/suites/openstack/neutron/010__networks.robot @@ -1,10 +1,10 @@ *** Settings *** Documentation Checking Network created in OpenStack are pushed to OpenDaylight -Suite Setup Create Session OSSession http://${NEUTRON}:9696 headers=${X-AUTH} +Suite Setup Create Session OSSession ${NEUTRONURL} headers=${X-AUTH} Suite Teardown Delete All Sessions Library Collections Library RequestsLibrary -Variables ../../../variables/Variables.py +Resource ../../../variables/Variables.robot *** Variables *** ${OSREST} /v2.0/networks diff --git a/csit/suites/openstack/neutron/020__subnets.robot b/csit/suites/openstack/neutron/020__subnets.robot index bcd55e77a7..584ece1c0d 100644 --- a/csit/suites/openstack/neutron/020__subnets.robot +++ b/csit/suites/openstack/neutron/020__subnets.robot @@ -1,10 +1,10 @@ *** Settings *** Documentation Checking Subnets created in OpenStack are pushed to OpenDaylight -Suite Setup Create Session OSSession http://${NEUTRON}:9696 headers=${X-AUTH} +Suite Setup Create Session OSSession ${NEUTRONURL} headers=${X-AUTH} Suite Teardown Delete All Sessions Library Collections Library RequestsLibrary -Variables ../../../variables/Variables.py +Resource ../../../variables/Variables.robot *** Variables *** ${OSREST} /v2.0/subnets diff --git a/csit/suites/openstack/neutron/030__ports.robot b/csit/suites/openstack/neutron/030__ports.robot index fda0789254..1311061bd9 100644 --- a/csit/suites/openstack/neutron/030__ports.robot +++ b/csit/suites/openstack/neutron/030__ports.robot @@ -1,10 +1,10 @@ *** Settings *** Documentation Checking Port created in OpenStack are pushed to OpenDaylight -Suite Setup Create Session OSSession http://${NEUTRON}:9696 headers=${X-AUTH} +Suite Setup Create Session OSSession ${NEUTRONURL} headers=${X-AUTH} Suite Teardown Delete All Sessions Library Collections Library RequestsLibrary -Variables ../../../variables/Variables.py +Resource ../../../variables/Variables.robot *** Variables *** ${OSREST} /v2.0/ports diff --git a/csit/suites/openstack/neutron/040__delete_ports.robot b/csit/suites/openstack/neutron/040__delete_ports.robot index 5f629fec91..2a71496afe 100644 --- a/csit/suites/openstack/neutron/040__delete_ports.robot +++ b/csit/suites/openstack/neutron/040__delete_ports.robot @@ -3,7 +3,7 @@ Documentation Checking Port deleted in OpenStack are deleted also in OpenDay Suite Setup Start Suite Suite Teardown Delete All Sessions Library RequestsLibrary -Variables ../../../variables/Variables.py +Resource ../../../variables/Variables.robot *** Variables *** ${OSREST} /v2.0/ports/${PORTID} @@ -36,6 +36,6 @@ Check Port Exists Should be Equal As Strings ${resp.status_code} 200 Start Suite - Create Session OSSession http://${NEUTRON}:9696 headers=${X-AUTH-NOCONTENT} + Create Session OSSession ${NEUTRONURL} headers=${X-AUTH-NOCONTENT} Create Session ODLSession http://${ODL_SYSTEM_IP}:${PORT} headers=${HEADERS} auth=${AUTH} Check Port Exists ${PORTID} diff --git a/csit/suites/openstack/neutron/050__delete_subnets.robot b/csit/suites/openstack/neutron/050__delete_subnets.robot index 34eb159991..3607a7bf45 100644 --- a/csit/suites/openstack/neutron/050__delete_subnets.robot +++ b/csit/suites/openstack/neutron/050__delete_subnets.robot @@ -3,7 +3,7 @@ Documentation Checking Subnets deleted in OpenStack are deleted also in Open Suite Setup Start Suite Suite Teardown Delete All Sessions Library RequestsLibrary -Variables ../../../variables/Variables.py +Resource ../../../variables/Variables.robot *** Variables *** ${OSREST} /v2.0/subnets/${SUBNETID} @@ -36,6 +36,6 @@ Check Subnet Exists Should be Equal As Strings ${resp.status_code} 200 Start Suite - Create Session OSSession http://${NEUTRON}:9696 headers=${X-AUTH-NOCONTENT} + Create Session OSSession ${NEUTRONURL} headers=${X-AUTH-NOCONTENT} Create Session ODLSession http://${ODL_SYSTEM_IP}:${PORT} headers=${HEADERS} auth=${AUTH} Check Subnet Exists ${SUBNETID} diff --git a/csit/suites/openstack/neutron/060__delete_networks.robot b/csit/suites/openstack/neutron/060__delete_networks.robot index 0a1ed2623a..7cf6e8cb61 100644 --- a/csit/suites/openstack/neutron/060__delete_networks.robot +++ b/csit/suites/openstack/neutron/060__delete_networks.robot @@ -3,7 +3,7 @@ Documentation Checking Network deleted in OpenStack are deleted also in Open Suite Setup Start Suite Suite Teardown Delete All Sessions Library RequestsLibrary -Variables ../../../variables/Variables.py +Resource ../../../variables/Variables.robot *** Variables *** ${OSREST} /v2.0/networks/${NETID} @@ -36,6 +36,6 @@ Check Network Exists Should be Equal As Strings ${resp.status_code} 200 Start Suite - Create Session OSSession http://${NEUTRON}:9696 headers=${X-AUTH-NOCONTENT} + Create Session OSSession ${NEUTRONURL} headers=${X-AUTH-NOCONTENT} Create Session ODLSession http://${ODL_SYSTEM_IP}:${PORT} headers=${HEADERS} auth=${AUTH} Check Network Exists ${NETID} diff --git a/csit/suites/openstack/neutron/__init__.robot b/csit/suites/openstack/neutron/__init__.robot index 0d0a0f2cb7..212d17c97e 100644 --- a/csit/suites/openstack/neutron/__init__.robot +++ b/csit/suites/openstack/neutron/__init__.robot @@ -6,7 +6,7 @@ Library SSHLibrary Library Collections Library RequestsLibrary Library ../../../libraries/Common.py -Variables ../../../variables/Variables.py +Resource ../../../variables/Variables.robot *** Variables *** ${OSTENANTNAME} "admin" @@ -17,10 +17,11 @@ ${OSPROJECTDOMAINNAME} "Default" ${PASSWORD} {"user":{"name":${OSUSERNAME},"domain":{"name": ${OSUSERDOMAINNAME}},"password":${OSPASSWORD}}} ${SCOPE} {"project":{"name":${OSTENANTNAME},"domain":{"name": ${OSPROJECTDOMAINNAME}}}} ${UserInfo} {"auth":{"identity":{"methods":["password"],"password":${PASSWORD}},"scope":${SCOPE}}} +${KEYSTONEURL} http://${KEYSTONE}:5000 *** Keywords *** Start Suite - Create Session KeyStoneSession http://${KEYSTONE}:5000 headers=${HEADERS} + Create Session KeyStoneSession ${KEYSTONEURL} headers=${HEADERS} ${resp} post KeyStoneSession /v3/auth/tokens ${UserInfo} Should Be Equal As Strings ${resp.status_code} 201 ${TOKEN} Get From Dictionary ${resp.headers} X-Subject-Token diff --git a/csit/variables/Variables.robot b/csit/variables/Variables.robot index ae05ff96c1..a4026f5f36 100644 --- a/csit/variables/Variables.robot +++ b/csit/variables/Variables.robot @@ -99,8 +99,11 @@ ${LFM_RPC_API} /restconf/operations/odl-mappingservice # FIXME: Move to a ${LFM_RPC_API_LI} /restconf/operations/lfm-mapping-database # FIXME: Move to a separate LispFlowMapping-related Resource and add description. ${LFM_SB_RPC_API} /restconf/operations/odl-lisp-sb # FIXME: Move to a separate LispFlowMapping-related Resource and add description. ${MODULES_API} /restconf/modules # FIXME: Move to a separate Resource and add description. +${NEUTRON} 127.0.0.1 # FIXME: Move to a separate Neutron-related Resource and add description. +${NEUTRONURL} http://${NEUTRON}:9696 # FIXME: Move to a separate Neutron-related Resource and add description. ${NEUTRON_NB_API} /controller/nb/v2/neutron # FIXME: Move to a separate Neutron-related Resource and add description. ${NEUTRON_NETWORKS_API} ${NEUTRON_NB_API}/networks # FIXME: Move to a separate Neutron-related Resource and add description. +${NEUTRON_SUBNETS_API} ${NEUTRON_NB_API}/subnets # FIXME: Move to a separate Neutron-related Resource and add description. ${NEUTRON_PORTS_API} ${NEUTRON_NB_API}/ports # FIXME: Move to a separate Neutron-related Resource and add description. ${NEUTRON_ROUTERS_API} ${NEUTRON_NB_API}/routers # FIXME: Move to a separate Neutron-related Resource and add description. ${ODL_BGP_PORT} 1790 # ODL side of BGP communication listens on this port number. -- 2.36.6