Robot Test: Include SDNC create/delete account using osm cli 03/8103/1
authoryadavmr <my00514913@techmahindra.com>
Wed, 30 Oct 2019 11:20:20 +0000 (16:50 +0530)
committeryadavmr <my00514913@techmahindra.com>
Wed, 30 Oct 2019 11:20:20 +0000 (16:50 +0530)
Change-Id: I5f70987fd4987fc472a37355701761f8c37689b5
Signed-off-by: yadavmr <my00514913@techmahindra.com>
jenkins/ci-pipelines/ci_stage_3.groovy
robot-systest/lib/cli/sdnc_account_lib.robot [new file with mode: 0644]
robot-systest/testsuite/cli/TS008__Test_SDNC.robot [new file with mode: 0644]

index 99ba600..e0d6e05 100644 (file)
@@ -309,13 +309,9 @@ node("${params.NODE}") {
                 stage_archive = false
                 stage("System Integration Test") {
                     if ( params.DO_ROBOT ) {
-                        steps {
-                            run_robot_systest(container_name,container_name,params.TEST_NAME,params.ROBOT_VIM)
-                        }
+                        run_robot_systest(container_name,container_name,params.TEST_NAME,params.ROBOT_VIM)
                     } else {
-                        steps{
-                            run_systest(container_name,container_name,"openstack_stage_4",params.HIVE_VIM_1)
-                        }
+                        run_systest(container_name,container_name,"openstack_stage_4",params.HIVE_VIM_1)
                     }
 
                     if ( ! currentBuild.result.equals('UNSTABLE') ) {
diff --git a/robot-systest/lib/cli/sdnc_account_lib.robot b/robot-systest/lib/cli/sdnc_account_lib.robot
new file mode 100644 (file)
index 0000000..3085c1c
--- /dev/null
@@ -0,0 +1,65 @@
+# -*- coding: utf-8 -*-
+
+##
+# Copyright 2019 Tech Mahindra Limited
+#
+# All Rights Reserved.
+#
+# Licensed under the Apache License, Version 2.0 (the "License"); you may
+# not use this file except in compliance with the License. You may obtain
+# a copy of the License at
+#
+#         http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+# License for the specific language governing permissions and limitations
+# under the License.
+##
+
+
+*** Variables ***
+${success_return_code}    0
+${name}     "OpenSite"
+${user}     "admin"
+${password}     "admin"
+${ip}      "1.1.1.1"
+${type}     "onos"
+${port}     "5858"
+${dpid}   ""
+
+
+*** Keywords ***
+Create SDNC Account
+    [Documentation]  create new sdnc account
+
+     ${rc}    ${stdout}=      Run and Return RC and Output      osm sdnc-create --name ${name} --type ${type} --ip-address ${ip} --user ${user} --password ${password} --port ${port} --switch_dpid ${dpid}     return_rc=True
+    log  ${rc}
+    log  ${stdout}
+    Should Be Equal As Integers    ${rc}    ${success_return_code}
+
+
+Get SDNC List
+    [Documentation]  Get a sdnc account list
+
+    ${rc}    ${stdout}=      Run and Return RC and Output       osm sdnc-list
+    log     ${stdout}
+
+
+Show SDNC Account
+    [Documentation]  Get sdnc account details
+
+    ${rc}    ${stdout}=      Run and Return RC and Output       osm sdnc-show ${name}     return_rc=True
+    log  ${rc}
+    log  ${stdout}
+    Should Be Equal As Integers    ${rc}    ${success_return_code}
+
+
+Delete SDNC Account
+    [Documentation]  Get sdnc account details
+
+    ${rc}    ${stdout}=      Run and Return RC and Output       osm sdnc-delete ${name}     return_rc=True
+    log  ${rc}
+    log  ${stdout}
+    Should Be Equal As Integers    ${rc}    ${success_return_code}
\ No newline at end of file
diff --git a/robot-systest/testsuite/cli/TS008__Test_SDNC.robot b/robot-systest/testsuite/cli/TS008__Test_SDNC.robot
new file mode 100644 (file)
index 0000000..311448c
--- /dev/null
@@ -0,0 +1,45 @@
+# -*- coding: utf-8 -*-
+
+##
+# Copyright 2019 Tech Mahindra Limited
+#
+# All Rights Reserved.
+#
+# Licensed under the Apache License, Version 2.0 (the "License"); you may
+# not use this file except in compliance with the License. You may obtain
+# a copy of the License at
+#
+#         http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+# License for the specific language governing permissions and limitations
+# under the License.
+##
+
+
+*** Settings ***
+Documentation    Test suiet to create/delete sdnc account via osmclient
+Library     OperatingSystem
+Library     Collections
+Resource    ../../lib/cli/sdnc_account_lib.robot
+
+
+*** Test Cases ***
+Create SDNC Account Test
+    [Tags]  comprehensive    sdnc
+
+    Create SDNC Account
+
+
+Get SDNC Accounts List Test
+    [Tags]  comprehensive    sdnc
+
+    Get SDNC List
+
+
+Delete SDNC Account Test
+    [Tags]  comprehensive    sdnc
+
+    Delete SDNC Account