aboutsummaryrefslogtreecommitdiffstats
path: root/yardstick/benchmark/scenarios/availability/ha_tools/pacemaker
diff options
context:
space:
mode:
authortjuyinkanglin <14_ykl@tongji.edu.cn>2017-08-09 23:06:56 +0800
committertjuyinkanglin <14_ykl@tongji.edu.cn>2017-08-23 12:35:28 +0800
commitf71c4a0694365b846146f2957c26c4f071413ace (patch)
tree5fb540a2b15da11f82c14f4a901e5c7fbd0219b9 /yardstick/benchmark/scenarios/availability/ha_tools/pacemaker
parentb39fe5457e846e734e980666bc209fb7c07a6bdc (diff)
Add test case file, document and related scripts of yardstick
tc057(HA_TC014) JIRA: YARDSTICK-779 Change-Id: I6a812b1c88229b20a0dd0ce5bc135c9ba15266db Signed-off-by: tjuyinkanglin <14_ykl@tongji.edu.cn>
Diffstat (limited to 'yardstick/benchmark/scenarios/availability/ha_tools/pacemaker')
-rw-r--r--yardstick/benchmark/scenarios/availability/ha_tools/pacemaker/get_resource_status.bash14
-rw-r--r--yardstick/benchmark/scenarios/availability/ha_tools/pacemaker/get_resource_status_host.bash15
-rw-r--r--yardstick/benchmark/scenarios/availability/ha_tools/pacemaker/get_vip_host.bash15
3 files changed, 44 insertions, 0 deletions
diff --git a/yardstick/benchmark/scenarios/availability/ha_tools/pacemaker/get_resource_status.bash b/yardstick/benchmark/scenarios/availability/ha_tools/pacemaker/get_resource_status.bash
new file mode 100644
index 000000000..68707cf4f
--- /dev/null
+++ b/yardstick/benchmark/scenarios/availability/ha_tools/pacemaker/get_resource_status.bash
@@ -0,0 +1,14 @@
+#!/bin/bash
+
+##############################################################################
+# (c) OPNFV, Yin Kanglin and others.
+# 14_ykl@tongji.edu.cn
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+##############################################################################
+
+# get pacemaker resource status
+
+pcs resource show \ No newline at end of file
diff --git a/yardstick/benchmark/scenarios/availability/ha_tools/pacemaker/get_resource_status_host.bash b/yardstick/benchmark/scenarios/availability/ha_tools/pacemaker/get_resource_status_host.bash
new file mode 100644
index 000000000..7a02ccf29
--- /dev/null
+++ b/yardstick/benchmark/scenarios/availability/ha_tools/pacemaker/get_resource_status_host.bash
@@ -0,0 +1,15 @@
+#!/bin/bash
+
+##############################################################################
+# (c) OPNFV, Yin Kanglin and others.
+# 14_ykl@tongji.edu.cn
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+##############################################################################
+
+# get pacemaker resource status of hosts
+# parameter: $1 - resource name $2 status
+
+pcs resource show | grep $1 -A 3 | grep $2 \ No newline at end of file
diff --git a/yardstick/benchmark/scenarios/availability/ha_tools/pacemaker/get_vip_host.bash b/yardstick/benchmark/scenarios/availability/ha_tools/pacemaker/get_vip_host.bash
new file mode 100644
index 000000000..f4870fdae
--- /dev/null
+++ b/yardstick/benchmark/scenarios/availability/ha_tools/pacemaker/get_vip_host.bash
@@ -0,0 +1,15 @@
+#!/bin/bash
+
+##############################################################################
+# (c) OPNFV, Yin Kanglin and others.
+# 14_ykl@tongji.edu.cn
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+##############################################################################
+
+# get vip host in pacemaker
+# parameter: $1 - virtual ip name
+
+pcs resource show| grep -w $1 | awk '{print $4}' \ No newline at end of file