Remove regression tag from disabled daily tests
[osm/tests.git] / robot-systest / deprecated / lib / cli / osm_platform_resiliancy_recovery_lib.robot
1 # -*- coding: utf-8 -*-
2
3 ##
4 # Copyright 2019 Tech Mahindra Limited
5 #
6 # All Rights Reserved.
7 #
8 # Licensed under the Apache License, Version 2.0 (the "License"); you may
9 # not use this file except in compliance with the License. You may obtain
10 # a copy of the License at
11 #
12 #         http://www.apache.org/licenses/LICENSE-2.0
13 #
14 # Unless required by applicable law or agreed to in writing, software
15 # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
16 # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
17 # License for the specific language governing permissions and limitations
18 # under the License.
19 ##
20
21 ## Change log:
22 # 1. Jayant Madavi, Mrityunjay Yadav : MY00514913@techmahindra.com : 08-nov-2019
23 ##
24
25
26 *** Variables ***
27 ${success_return_code}    0
28 ${er_replicas}    0/1
29
30
31 *** Keywords ***
32 Check If OSM Working
33
34     ${rc}   ${stdout}=      Run and Return RC and Output    osm vnfpkg-list
35     log     ${stdout}
36     Should Be Equal As Integers    ${rc}    ${success_return_code}
37     ${rc}   ${stdout}=      Run and Return RC and Output    osm vim-list
38     log     ${stdout}
39     Should Be Equal As Integers    ${rc}    ${success_return_code}
40
41
42 Check All Service Are Running
43
44     ${rc}   ${stdout}=      Run and Return RC and Output    docker service ls
45     log     ${stdout}
46     Should Be Equal As Integers    ${rc}    ${success_return_code}
47     Should Not Contain      ${stdout}   ${er_replicas}
48
49
50 Kill Docker Container
51     [Arguments]  ${name}
52
53     ${rc}   ${stdout}=      Run and Return RC and Output    docker rm -f \$(docker ps |grep -i ${name}|awk '{print $1}')
54     log     ${stdout}
55     Should Be Equal As Integers    ${rc}    ${success_return_code}