aboutsummaryrefslogtreecommitdiffstats
path: root/cmso-robot/robot
diff options
context:
space:
mode:
Diffstat (limited to 'cmso-robot/robot')
-rw-r--r--cmso-robot/robot/assets/test_properties.py8
-rw-r--r--cmso-robot/robot/resources/optimizer_common.robot18
-rw-r--r--cmso-robot/robot/resources/scheduler_common.robot13
-rw-r--r--cmso-robot/robot/resources/ticketmgt_common.robot72
-rw-r--r--cmso-robot/robot/resources/topology_common.robot72
-rw-r--r--cmso-robot/robot/testsuites/MiscTests.robot51
6 files changed, 226 insertions, 8 deletions
diff --git a/cmso-robot/robot/assets/test_properties.py b/cmso-robot/robot/assets/test_properties.py
index 38840ac..99e92e3 100644
--- a/cmso-robot/robot/assets/test_properties.py
+++ b/cmso-robot/robot/assets/test_properties.py
@@ -11,6 +11,14 @@ GLOBAL_OPTIMIZER_URL = "http://127.0.0.1:7997"
GLOBAL_OPTIMIZER_USER = "oof@oof.onap.org"
GLOBAL_OPTIMIZER_PASSWORD = "demo123456!"
+GLOBAL_TICKET_MGT_URL = "http://127.0.0.1:7999"
+GLOBAL_TICKET_MGT_USER = "oof@oof.onap.org"
+GLOBAL_TICKET_MGT_PASSWORD = "demo123456!"
+
+GLOBAL_TOPOLOGY_URL = "http://127.0.0.1:7998"
+GLOBAL_TOPOLOGY_USER = "oof@oof.onap.org"
+GLOBAL_TOPOLOGY_PASSWORD = "demo123456!"
+
GLOBAL_CALLBACK_USERID = "onap-user"
GLOBAL_CALLBACK_PASSWORD = "onap-user"
diff --git a/cmso-robot/robot/resources/optimizer_common.robot b/cmso-robot/robot/resources/optimizer_common.robot
index 81c0c75..7212f03 100644
--- a/cmso-robot/robot/resources/optimizer_common.robot
+++ b/cmso-robot/robot/resources/optimizer_common.robot
@@ -46,14 +46,28 @@ Delete Optimizer
Get Optimizer
[Documentation] Runs a scheduler GET request
- [Arguments] ${alias} ${resource}
+ [Arguments] ${alias} ${resource} ${accept}=application/json
${data_path}= Catenate ${OPTIMIZER_PATH}/${resource}
${url}= Catenate ${GLOBAL_OPTIMIZER_URL}
${uuid}= Generate UUID
${proxies}= Create Dictionary no=pass
${session}= Create Session ${alias} ${url}
${auth_string}= B64 Encode ${GLOBAL_OPTIMIZER_USER}:${GLOBAL_OPTIMIZER_PASSWORD}
- ${headers}= Create Dictionary Accept=application/json Content-Type=application/json X-TransactionId=${GLOBAL_APPLICATION_ID}-${uuid} X-FromAppId=${GLOBAL_APPLICATION_ID} Authorization=Basic ${auth_string}
+ ${headers}= Create Dictionary Accept=${accept} Content-Type=application/json X-TransactionId=${GLOBAL_APPLICATION_ID}-${uuid} X-FromAppId=${GLOBAL_APPLICATION_ID} Authorization=Basic ${auth_string}
${resp}= Get Request ${alias} ${data_path} headers=${headers}
Log Received response from scheduler ${resp.json()}
[Return] ${resp}
+
+Get Optimizer Plain Text
+ [Documentation] Runs a scheduler GET request
+ [Arguments] ${alias} ${resource} ${accept}=text/plain
+ ${data_path}= Catenate ${OPTIMIZER_PATH}/${resource}
+ ${url}= Catenate ${GLOBAL_OPTIMIZER_URL}
+ ${uuid}= Generate UUID
+ ${proxies}= Create Dictionary no=pass
+ ${session}= Create Session ${alias} ${url}
+ ${auth_string}= B64 Encode ${GLOBAL_OPTIMIZER_USER}:${GLOBAL_OPTIMIZER_PASSWORD}
+ ${headers}= Create Dictionary Accept=${accept} Content-Type=application/json X-TransactionId=${GLOBAL_APPLICATION_ID}-${uuid} X-FromAppId=${GLOBAL_APPLICATION_ID} Authorization=Basic ${auth_string}
+ ${resp}= Get Request ${alias} ${data_path} headers=${headers}
+ Log Received response from scheduler ${resp.text}
+ [Return] ${resp}
diff --git a/cmso-robot/robot/resources/scheduler_common.robot b/cmso-robot/robot/resources/scheduler_common.robot
index 1256480..ab1e8fb 100644
--- a/cmso-robot/robot/resources/scheduler_common.robot
+++ b/cmso-robot/robot/resources/scheduler_common.robot
@@ -83,3 +83,16 @@ Get Scheduler
${valid}= Split String ${valid_status_codes}
Validate Status ${resp} ${valid}
[Return] ${resp}
+
+Get Scheduler Plain Text
+ [Documentation] Runs a scheduler GET request
+ [Arguments] ${alias} ${data_path}
+ ${url}= Catenate ${GLOBAL_SCHEDULER_URL}
+ ${uuid}= Generate UUID
+ ${proxies}= Create Dictionary no=pass
+ ${session}= Create Session ${alias} ${url}
+ ${auth_string}= B64 Encode ${GLOBAL_SCHEDULER_USER}:${GLOBAL_SCHEDULER_PASSWORD}
+ ${headers}= Create Dictionary Accept=text/plain Content-Type=application/json X-TransactionId=${GLOBAL_APPLICATION_ID}-${uuid} X-FromAppId=${GLOBAL_APPLICATION_ID} Authorization=Basic ${auth_string}
+ ${resp}= Get Request ${alias} ${data_path} headers=${headers}
+ Log Received response from scheduler ${resp.text}
+ [Return] ${resp}
diff --git a/cmso-robot/robot/resources/ticketmgt_common.robot b/cmso-robot/robot/resources/ticketmgt_common.robot
new file mode 100644
index 0000000..42b54fe
--- /dev/null
+++ b/cmso-robot/robot/resources/ticketmgt_common.robot
@@ -0,0 +1,72 @@
+*** Settings ***
+Documentation The private interface for interacting with Openstack. It handles low level stuff like managing the authtoken and Openstack required fields
+
+Library Collections
+Library RequestsLibrary
+Library UUID
+Library HTTPUtils
+Library String
+Resource misc.robot
+*** Variables ***
+*** Variables ***
+${TICKET_MGT_PATH} /ticketmgt/v1
+#**************** Test Case Variables ******************
+
+*** Keywords ***
+
+
+Post Ticket Mgt
+ [Documentation] Runs a scheduler POST request
+ [Arguments] ${alias} ${resource} ${data}={}
+ ${data_path}= Catenate ${TICKET_MGT_PATH}/${resource}
+ ${url}= Catenate ${GLOBAL_TICKET_MGT_URL}
+ ${uuid}= Generate UUID
+ ${proxies}= Create Dictionary no=pass
+ ${session}= Create Session ${alias} ${url}
+ ${auth_string}= B64 Encode ${GLOBAL_TICKET_MGT_USER}:${GLOBAL_TICKET_MGT_PASSWORD}
+ ${headers}= Create Dictionary Accept=application/json Content-Type=application/json X-TransactionId=${GLOBAL_APPLICATION_ID}-${uuid} X-FromAppId=${GLOBAL_APPLICATION_ID} Authorization=Basic ${auth_string}
+ ${resp}= Post Request ${alias} ${data_path} headers=${headers} data=${data}
+ Log Received response from scheduler ${resp.text}
+ [Return] ${resp}
+
+Delete Ticket Mgt
+ [Documentation] Runs a scheduler DELETE request (this may need to be changed for 1802 US change Delete schedule to Cancel Schedule)
+ [Arguments] ${alias} ${resource}
+ ${data_path}= Catenate ${TICKET_MGT_PATH}/${resource}
+ ${url}= Catenate ${GLOBAL_TICKET_MGT_URL}
+ ${uuid}= Generate UUID
+ ${proxies}= Create Dictionary no=pass
+ ${session}= Create Session ${alias} ${url}
+ ${auth_string}= B64 Encode ${GLOBAL_TICKET_MGT_USER}:${GLOBAL_TICKET_MGT_PASSWORD}
+ ${headers}= Create Dictionary Accept=application/json Content-Type=application/json X-TransactionId=${GLOBAL_APPLICATION_ID}-${uuid} X-FromAppId=${GLOBAL_APPLICATION_ID} Authorization=Basic ${auth_string}
+ ${resp}= Delete Request ${alias} ${data_path} headers=${headers}
+ Log Received response from scheduler ${resp.text}
+ [Return] ${resp}
+
+Get Ticket Mgt
+ [Documentation] Runs a scheduler GET request
+ [Arguments] ${alias} ${resource}
+ ${data_path}= Catenate ${TICKET_MGT_PATH}/${resource}
+ ${url}= Catenate ${GLOBAL_TICKET_MGT_URL}
+ ${uuid}= Generate UUID
+ ${proxies}= Create Dictionary no=pass
+ ${session}= Create Session ${alias} ${url}
+ ${auth_string}= B64 Encode ${GLOBAL_TICKET_MGT_USER}:${GLOBAL_TICKET_MGT_PASSWORD}
+ ${headers}= Create Dictionary Accept=application/json Content-Type=application/json X-TransactionId=${GLOBAL_APPLICATION_ID}-${uuid} X-FromAppId=${GLOBAL_APPLICATION_ID} Authorization=Basic ${auth_string}
+ ${resp}= Get Request ${alias} ${data_path} headers=${headers}
+ Log Received response from scheduler ${resp.json()}
+ [Return] ${resp}
+
+Get Ticket Mgt Plain Text
+ [Documentation] Runs a scheduler GET request
+ [Arguments] ${alias} ${resource}
+ ${data_path}= Catenate ${TICKET_MGT_PATH}/${resource}
+ ${url}= Catenate ${GLOBAL_TICKET_MGT_URL}
+ ${uuid}= Generate UUID
+ ${proxies}= Create Dictionary no=pass
+ ${session}= Create Session ${alias} ${url}
+ ${auth_string}= B64 Encode ${GLOBAL_TICKET_MGT_USER}:${GLOBAL_TICKET_MGT_PASSWORD}
+ ${headers}= Create Dictionary Accept=text/plain Content-Type=application/json X-TransactionId=${GLOBAL_APPLICATION_ID}-${uuid} X-FromAppId=${GLOBAL_APPLICATION_ID} Authorization=Basic ${auth_string}
+ ${resp}= Get Request ${alias} ${data_path} headers=${headers}
+ Log Received response from scheduler ${resp.text}
+ [Return] ${resp}
diff --git a/cmso-robot/robot/resources/topology_common.robot b/cmso-robot/robot/resources/topology_common.robot
new file mode 100644
index 0000000..32176f0
--- /dev/null
+++ b/cmso-robot/robot/resources/topology_common.robot
@@ -0,0 +1,72 @@
+*** Settings ***
+Documentation The private interface for interacting with Openstack. It handles low level stuff like managing the authtoken and Openstack required fields
+
+Library Collections
+Library RequestsLibrary
+Library UUID
+Library HTTPUtils
+Library String
+Resource misc.robot
+*** Variables ***
+*** Variables ***
+${TOPOLOGY_PATH} /topology/v1
+#**************** Test Case Variables ******************
+
+*** Keywords ***
+
+
+Post Topology
+ [Documentation] Runs a scheduler POST request
+ [Arguments] ${alias} ${resource} ${data}={}
+ ${data_path}= Catenate ${TOPOLOGY_PATH}/${resource}
+ ${url}= Catenate ${GLOBAL_TOPOLOGY_URL}
+ ${uuid}= Generate UUID
+ ${proxies}= Create Dictionary no=pass
+ ${session}= Create Session ${alias} ${url}
+ ${auth_string}= B64 Encode ${GLOBAL_TOPOLOGY_USER}:${GLOBAL_TOPOLOGY_PASSWORD}
+ ${headers}= Create Dictionary Accept=application/json Content-Type=application/json X-TransactionId=${GLOBAL_APPLICATION_ID}-${uuid} X-FromAppId=${GLOBAL_APPLICATION_ID} Authorization=Basic ${auth_string}
+ ${resp}= Post Request ${alias} ${data_path} headers=${headers} data=${data}
+ Log Received response from scheduler ${resp.text}
+ [Return] ${resp}
+
+Delete Topology
+ [Documentation] Runs a scheduler DELETE request (this may need to be changed for 1802 US change Delete schedule to Cancel Schedule)
+ [Arguments] ${alias} ${resource}
+ ${data_path}= Catenate ${TOPOLOGY_PATH}/${resource}
+ ${url}= Catenate ${GLOBAL_TOPOLOGY_URL}
+ ${uuid}= Generate UUID
+ ${proxies}= Create Dictionary no=pass
+ ${session}= Create Session ${alias} ${url}
+ ${auth_string}= B64 Encode ${GLOBAL_TOPOLOGY_USER}:${GLOBAL_TOPOLOGY_PASSWORD}
+ ${headers}= Create Dictionary Accept=application/json Content-Type=application/json X-TransactionId=${GLOBAL_APPLICATION_ID}-${uuid} X-FromAppId=${GLOBAL_APPLICATION_ID} Authorization=Basic ${auth_string}
+ ${resp}= Delete Request ${alias} ${data_path} headers=${headers}
+ Log Received response from scheduler ${resp.text}
+ [Return] ${resp}
+
+Get Topology
+ [Documentation] Runs a scheduler GET request
+ [Arguments] ${alias} ${resource}
+ ${data_path}= Catenate ${TOPOLOGY_PATH}/${resource}
+ ${url}= Catenate ${GLOBAL_TOPOLOGY_URL}
+ ${uuid}= Generate UUID
+ ${proxies}= Create Dictionary no=pass
+ ${session}= Create Session ${alias} ${url}
+ ${auth_string}= B64 Encode ${GLOBAL_TOPOLOGY_USER}:${GLOBAL_TOPOLOGY_PASSWORD}
+ ${headers}= Create Dictionary Accept=application/json Content-Type=application/json X-TransactionId=${GLOBAL_APPLICATION_ID}-${uuid} X-FromAppId=${GLOBAL_APPLICATION_ID} Authorization=Basic ${auth_string}
+ ${resp}= Get Request ${alias} ${data_path} headers=${headers}
+ Log Received response from scheduler ${resp.json()}
+ [Return] ${resp}
+
+Get Topology Plain Text
+ [Documentation] Runs a scheduler GET request
+ [Arguments] ${alias} ${resource}
+ ${data_path}= Catenate ${TOPOLOGY_PATH}/${resource}
+ ${url}= Catenate ${GLOBAL_TOPOLOGY_URL}
+ ${uuid}= Generate UUID
+ ${proxies}= Create Dictionary no=pass
+ ${session}= Create Session ${alias} ${url}
+ ${auth_string}= B64 Encode ${GLOBAL_TOPOLOGY_USER}:${GLOBAL_TOPOLOGY_PASSWORD}
+ ${headers}= Create Dictionary Accept=text/plain Content-Type=application/json X-TransactionId=${GLOBAL_APPLICATION_ID}-${uuid} X-FromAppId=${GLOBAL_APPLICATION_ID} Authorization=Basic ${auth_string}
+ ${resp}= Get Request ${alias} ${data_path} headers=${headers}
+ Log Received response from scheduler ${resp.text}
+ [Return] ${resp}
diff --git a/cmso-robot/robot/testsuites/MiscTests.robot b/cmso-robot/robot/testsuites/MiscTests.robot
index 6873e3f..a3b9428 100644
--- a/cmso-robot/robot/testsuites/MiscTests.robot
+++ b/cmso-robot/robot/testsuites/MiscTests.robot
@@ -3,9 +3,12 @@ Documentation Creates VID VNF Instance
Library StringTemplater
Library UUID
+Library Collections
-Resource ../resources/test_templates/change_management.robot
-Resource ../resources/test_templates/check_logs.robot
+Resource ../resources/optimizer_common.robot
+Resource ../resources/scheduler_common.robot
+Resource ../resources/ticketmgt_common.robot
+Resource ../resources/topology_common.robot
# Test Setup
# Test Teardown
@@ -15,9 +18,45 @@ ${password}=
${uuid_list_file}= robot/assets/get_schedule_UUIDs.txt
${template_folder}= robot/assets/templates/changemanagement
*** Test Cases ***
-Get Schedule
- Get Schedule Test Template ${uuid_list_file}
+Test CMSO Optimizer Admin
+ [Tags] ete
+ ${response}= Get Optimizer Plain Text alias admin/password
+ Should Contain ${response.text} kECFDaLusYNHTN6Q4DmsYw==
-Post Existing Immediate Schedule
- Change Management Already Exists Immediate Template OneVnfImmediateReplaceVNFInfra.json.template ${template_folder}
+Test CMSO Service Admin
+ [Tags] ete
+ ${response}= Get Scheduler Plain Text alias /cmso/v1/admin/password
+ Should Contain ${response.text} kECFDaLusYNHTN6Q4DmsYw==
+Test CMSO Ticket Mgt Admin
+ [Tags] ete
+ ${response}= Get Ticket Mgt Plain Text alias admin/password
+ Should Contain ${response.text} kECFDaLusYNHTN6Q4DmsYw==
+
+Test CMSO Topology Admin
+ [Tags] ete
+ ${response}= Get Topology Plain Text alias admin/password
+ Should Contain ${response.text} kECFDaLusYNHTN6Q4DmsYw==
+
+Test CMSO Optimizer Health
+ [Tags] ete
+ ${response}= Get Optimizer alias health
+ Dictionary Should Contain Item ${response.json()} healthy True
+
+Test CMSO Service Health
+ [Tags] ete
+ ${response}= Get Scheduler alias /cmso/v1/health
+ Dictionary Should Contain Item ${response.json()} healthy True
+
+
+Test CMSO Ticket Mgt Health
+ [Tags] ete
+ ${response}= Get Ticket Mgt alias health
+ Dictionary Should Contain Item ${response.json()} healthy True
+
+
+Test CMSO Topology Health
+ [Tags] ete
+ ${response}= Get Topology alias health
+ Dictionary Should Contain Item ${response.json()} healthy True
+