diff options
author | Rahul Yadav <rahul4talk@gmail.com> | 2019-03-29 16:34:32 +0000 |
---|---|---|
committer | Rahul Tyagi <rahul.tyagi@ericsson.com> | 2019-04-04 15:02:12 +0000 |
commit | 1f080ab55640d6cd754b83822cdd9793a68976e2 (patch) | |
tree | f000c7946f927de4a3c422459e30851abf6aa44d /tests/sdnc/sdnc_netconf_tls_post_deploy | |
parent | 0937239c445e93e7ceabd27bcef313e0acfcd59b (diff) |
CSIT for SDNC Netconf Configuration
This commit have 2 csits for sdnc
1. Checking keystore after SDNC installation
2. Checking PNF mount after SDNC installation
Change-Id: I69782b3bc426dac02c691392ae679aeedcf81ee3
Signed-off-by: Rahul Yadav <rahul4talk@gmail.com>
Issue-ID: SDNC-660
Diffstat (limited to 'tests/sdnc/sdnc_netconf_tls_post_deploy')
3 files changed, 55 insertions, 0 deletions
diff --git a/tests/sdnc/sdnc_netconf_tls_post_deploy/_init_.robot b/tests/sdnc/sdnc_netconf_tls_post_deploy/_init_.robot new file mode 100644 index 00000000..d7353060 --- /dev/null +++ b/tests/sdnc/sdnc_netconf_tls_post_deploy/_init_.robot @@ -0,0 +1,2 @@ +1 *** Settings *** +2 Documentation SDNC - keystorecheck diff --git a/tests/sdnc/sdnc_netconf_tls_post_deploy/data/mount.xml b/tests/sdnc/sdnc_netconf_tls_post_deploy/data/mount.xml new file mode 100644 index 00000000..108369bc --- /dev/null +++ b/tests/sdnc/sdnc_netconf_tls_post_deploy/data/mount.xml @@ -0,0 +1,14 @@ +<node xmlns="urn:TBD:params:xml:ns:yang:network-topology"> + <node-id>netopeer2</node-id> + <key-based xmlns="urn:opendaylight:netconf-node-topology"> + <key-id xmlns="urn:opendaylight:netconf-node-topology">ODL_private_key_0</key-id> + <username xmlns="urn:opendaylight:netconf-node-topology">netconf</username> + </key-based> + <host xmlns="urn:opendaylight:netconf-node-topology">pnfaddr</host> + <port xmlns="urn:opendaylight:netconf-node-topology">6513</port> + <tcp-only xmlns="urn:opendaylight:netconf-node-topology">false</tcp-only> + <protocol xmlns="urn:opendaylight:netconf-node-topology"> + <name xmlns="urn:opendaylight:netconf-node-topology">TLS</name> + </protocol> + <max-connection-attempts xmlns="urn:opendaylight:netconf-node-topology">2</max-connection-attempts> +</node> diff --git a/tests/sdnc/sdnc_netconf_tls_post_deploy/sdnc_post_deploy_cert_check.robot b/tests/sdnc/sdnc_netconf_tls_post_deploy/sdnc_post_deploy_cert_check.robot new file mode 100644 index 00000000..f1814144 --- /dev/null +++ b/tests/sdnc/sdnc_netconf_tls_post_deploy/sdnc_post_deploy_cert_check.robot @@ -0,0 +1,39 @@ +*** Settings *** +Library Collections +Library RequestsLibrary +Library OperatingSystem +Library json +Library String + +*** Variables *** +${SDNC_KEYSTORE_CONFIG_PATH} /config/netconf-keystore:keystore +${SDNC_MOUNT_PATH} /config/network-topology:network-topology/topology/topology-netconf/node/netopeer2 +${PNFSIM_MOUNT_PATH} /config/network-topology:network-topology/topology/topology-netconf/node/netopeer2/yang-ext:mount/mynetconf:netconflist + + *** Test Cases *** + Test SDNC Keystore + [Documentation] Checking keystore after SDNC installation + Create Session sdnc http://localhost:8282/restconf + &{headers}= Create Dictionary Authorization=Basic YWRtaW46S3A4Yko0U1hzek0wV1hsaGFrM2VIbGNzZTJnQXc4NHZhb0dHbUp2VXkyVQ== Content-Type=application/json Accept=application/json + ${resp}= Get Request sdnc ${SDNC_KEYSTORE_CONFIG_PATH} headers=${headers} + Should Be Equal As Strings ${resp.status_code} 200 + ${keystoreContent}= Convert To String ${resp.content} + Log to console ************************* + Log to console ${resp.content} + Log to console ************************* + + Test SDNC PNF Mount + [Documentation] Checking PNF mount after SDNC installation + Create Session sdnc http://localhost:8282/restconf + ${mount}= Get File ${CURDIR}${/}data${/}mount.xml + Log to console ${mount} + &{headers}= Create Dictionary Authorization=Basic YWRtaW46S3A4Yko0U1hzek0wV1hsaGFrM2VIbGNzZTJnQXc4NHZhb0dHbUp2VXkyVQ== Content-Type=application/xml Accept=application/xml + ${resp}= Put Request sdnc ${SDNC_MOUNT_PATH} data=${mount} headers=${headers} + Should Be Equal As Strings ${resp.status_code} 201 + Sleep 30 + &{headers1}= Create Dictionary Authorization=Basic YWRtaW46S3A4Yko0U1hzek0wV1hsaGFrM2VIbGNzZTJnQXc4NHZhb0dHbUp2VXkyVQ== Content-Type=application/json Accept=application/json + ${resp1}= Get Request sdnc ${PNFSIM_MOUNT_PATH} headers=${headers1} + Should Be Equal As Strings ${resp1.status_code} 200 + Log to console ${resp1.content} + Should Contain ${resp1.content} netconf-id + Should Contain ${resp1.content} netconf-param
\ No newline at end of file |