75283dcb2dcd567dc01dabc3dd9b959a648ec289
[integration/csit.git] / tests / sdnc / sdnc_netconf_tls_post_deploy / sdnc_post_deploy_cert_check.robot
1 *** Settings ***
2 Library     Collections
3 Library     RequestsLibrary
4 Library     OperatingSystem
5 Library     json
6 Library     String
7
8 *** Variables ***
9 ${SDNC_KEYSTORE_CONFIG_PATH}    /config/netconf-keystore:keystore
10 ${SDNC_MOUNT_PATH}    /config/network-topology:network-topology/topology/topology-netconf/node/netopeer2
11 ${PNFSIM_MOUNT_PATH}    /config/network-topology:network-topology/topology/topology-netconf/node/netopeer2/yang-ext:mount/mynetconf:netconflist
12
13  *** Test Cases ***
14  Test SDNC Keystore
15       [Documentation]    Checking keystore after SDNC installation
16       Create Session   sdnc  http://localhost:8282/restconf
17       &{headers}=  Create Dictionary    Authorization=Basic YWRtaW46S3A4Yko0U1hzek0wV1hsaGFrM2VIbGNzZTJnQXc4NHZhb0dHbUp2VXkyVQ==    Content-Type=application/json    Accept=application/json
18       ${resp}=    Get Request    sdnc    ${SDNC_KEYSTORE_CONFIG_PATH}    headers=${headers}
19       Should Be Equal As Strings    ${resp.status_code}    200
20       ${keystoreContent}=    Convert To String    ${resp.content}
21       Log to console  *************************
22       Log to console  ${resp.content}
23       Log to console  *************************
24
25 # Test SDNC PNF Mount
26 #     [Documentation]    Checking PNF mount after SDNC installation
27 #     Create Session   sdnc  http://localhost:8282/restconf
28 #     ${mount}=    Get File     ${CURDIR}${/}data${/}mount.xml
29 #     Log to console  ${mount}
30 #     &{headers}=  Create Dictionary    Authorization=Basic YWRtaW46S3A4Yko0U1hzek0wV1hsaGFrM2VIbGNzZTJnQXc4NHZhb0dHbUp2VXkyVQ==    Content-Type=application/xml    Accept=application/xml
31 #     ${resp}=    Put Request    sdnc    ${SDNC_MOUNT_PATH}    data=${mount}    headers=${headers}
32 #     Should Be Equal As Strings    ${resp.status_code}    201
33 #     Sleep  30
34 #     &{headers1}=  Create Dictionary    Authorization=Basic YWRtaW46S3A4Yko0U1hzek0wV1hsaGFrM2VIbGNzZTJnQXc4NHZhb0dHbUp2VXkyVQ==    Content-Type=application/json    Accept=application/json
35 #     ${resp1}=    Get Request    sdnc    ${PNFSIM_MOUNT_PATH}    headers=${headers1}
36 #     Should Be Equal As Strings    ${resp1.status_code}    200
37 #     Log to console  ${resp1.content}
38 #     Should Contain  ${resp1.content}     netconf-id
39 #     Should Contain  ${resp1.content}     netconf-param