fc5da56edb7a6d7266225b3792afd34a9a0ce79c
[it/test.git] / test_scripts / O2IMS_Compliance_Test / o2ims_compliance / 7.3.10_SMO_succeeds_to_get_O2dms_(in_Kubernetes_native_API_Profile)_access_information.robot
1 *** Settings ***
2 Documentation  Verify SMO succeeds to get O2dms (in kubernetes native API profile) access information
3 # Library  REST       ssl_verify=False    loglevel=DEBUG
4 Library  REST       ssl_verify=False
5 Variables              ${EXECDIR}${/}test_configs.yaml
6
7 Suite Setup            Set REST Headers
8
9 *** Variables ***
10 ${ORAN_HOST_EXTERNAL_IP}    ${ocloud.oran_o2_app.api.host}
11 ${ORAN_SERVICE_NODE_PORT}   ${ocloud.oran_o2_app.api.node_port}
12 ${GLOBAL_OCLOUD_ID1}        ${ocloud.oran_o2_app.g_ocloud_id}
13 ${SMO_TOKEN_DATA}           ${ocloud.oran_o2_app.smo_token_data}
14 ${globalLocationId}         ${ocloud.oran_o2_app.g_location_id}
15
16 ${ORAN_O2IMS_ENDPOINT}  ${ocloud.oran_o2_app.api.protocol}://${ORAN_HOST_EXTERNAL_IP}:${ORAN_SERVICE_NODE_PORT}
17
18 ${deploymentManagerName}    kubernetes
19
20 *** Test Cases ***
21 s1, query deploymentManager list without filter
22     [documentation]  This test case verifies query deploymentManager list without filter
23     [tags]  ORAN_Compliance     ORAN_O2     ORAN_O2IMS     ORAN_O2IMS_DeploymentManager
24
25     # Clear Expectations
26     Expect Response Body        ${CURDIR}/schemas/deploymentManagers_properties.json
27     ${res}     GET   ${ORAN_O2IMS_ENDPOINT}/o2ims-infrastructureInventory/v1/deploymentManagers
28     # Output Schema   response body   ${CURDIR}/schemas/.output/deploymentManagers_properties.json
29     Clear Expectations
30     log      ${res}   level=DEBUG
31     Integer  response status    200
32     Array   response body
33
34 s2, query deploymentManager list with filter
35     [documentation]  This test case verifies query deploymentManager list with filter
36     [tags]  ORAN_Compliance     ORAN_O2     ORAN_O2IMS     ORAN_O2IMS_DeploymentManager
37
38     # Clear Expectations
39     Expect Response Body        ${CURDIR}/schemas/deploymentManagers_properties.json
40     ${res}     GET   ${ORAN_O2IMS_ENDPOINT}/o2ims-infrastructureInventory/v1/deploymentManagers?filter=(cont,name,${deploymentManagerName})
41     Clear Expectations
42     log      ${res}   level=INFO
43     Integer     response status    200
44     Array       response body
45     Array       $   minItems=1  uniqueItems=true
46
47 s3, query a deploymentManager detail
48     [documentation]  This test case verifies query a deploymentManager detail
49     [tags]  ORAN_Compliance     ORAN_O2     ORAN_O2IMS     ORAN_O2IMS_DeploymentManager
50
51     Clear Expectations
52     # Expect Response Body        ${CURDIR}/schemas/deploymentManagers_properties.json
53     ${res1}     GET   ${ORAN_O2IMS_ENDPOINT}/o2ims-infrastructureInventory/v1/deploymentManagers?filter=(cont,name,${deploymentManagerName})
54     # Clear Expectations
55     log      ${res1}   level=INFO
56     Integer     response status    200
57     Array       response body
58     Array       $   minItems=1  uniqueItems=true
59
60     ${deploymentManagerId}      output   $[0].deploymentManagerId
61
62     # Clear Expectations
63     Expect Response Body        ${CURDIR}/schemas/deploymentManager_properties.json
64     ${res}     GET   ${ORAN_O2IMS_ENDPOINT}/o2ims-infrastructureInventory/v1/deploymentManagers/${deploymentManagerId}
65     # Output Schema   response body   ${CURDIR}/schemas/.output/deploymentManager_properties.json
66     Clear Expectations
67     log      ${res}   level=INFO
68     Integer     response status    200
69     Object       response body
70
71     # all_fields
72     Expect Response Body        ${CURDIR}/schemas/deploymentManager_allfields_properties.json
73     ${res}     GET   ${ORAN_O2IMS_ENDPOINT}/o2ims-infrastructureInventory/v1/deploymentManagers/${deploymentManagerId}?all_fields
74     # Output Schema   response body   ${CURDIR}/schemas/.output/deploymentManager_allfields_properties.json
75     Clear Expectations
76     log      ${res}   level=INFO
77     Integer     response status    200
78     Object       response body
79
80
81 *** Keywords ***
82 Set REST Headers
83     Set Headers     {"accept": "application/json"}
84     Set Headers     {"Authorization": "Bearer ${SMO_TOKEN_DATA}"}