summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorge Kraft <george.kraft@calxeda.com>2013-04-26 15:39:14 -0500
committerGeorge Kraft <george.kraft@calxeda.com>2013-04-26 15:39:14 -0500
commita1a0e715fa5c83112beab46c24d65632cb5cd954 (patch)
treea4093d7552215fc7101445f2326e5d21a5c76be8
parent4f800c96d836a4b6a4b5740374e289c0b62ef1e5 (diff)
downloadcxmanage-a1a0e715fa5c83112beab46c24d65632cb5cd954.tar.gz
CXMAN-186: Add sol_tabs to cxmanage
It's still just a standalone script, but will be installed along with cxmanage when setup.py is run.
-rwxr-xr-xscripts/sol_tabs19
-rw-r--r--setup.py2
2 files changed, 20 insertions, 1 deletions
diff --git a/scripts/sol_tabs b/scripts/sol_tabs
new file mode 100755
index 0000000..097213c
--- /dev/null
+++ b/scripts/sol_tabs
@@ -0,0 +1,19 @@
+#!/bin/bash
+
+# Copyright 2012 Calxeda, Inc. All Rights Reserved.
+
+node_0_ip=$1
+
+for ip in `cxmanage ipinfo $node_0_ip | grep '\([0-9]\{1,3\}\.\)\{3\}[0-9]\{1,3\}' | grep -v from | awk {'print $3'}`
+do
+ echo $ip
+ WID=$(xprop -root | grep "_NET_ACTIVE_WINDOW(WINDOW)"| awk '{print $5}')
+ xdotool windowfocus $WID
+ xdotool key ctrl+shift+t
+ wmctrl -i -a $WID
+ sleep 3
+ xdotool type "
+ipmitool -I lanplus -U admin -P admin -H $ip sol deactivate
+ipmitool -I lanplus -U admin -P admin -H $ip sol activate
+"
+done
diff --git a/setup.py b/setup.py
index 3a8ee99..3c98429 100644
--- a/setup.py
+++ b/setup.py
@@ -35,7 +35,7 @@ setup(
name='cxmanage',
version='0.7.1',
packages=['cxmanage', 'cxmanage.commands', 'cxmanage_api'],
- scripts=['scripts/cxmanage'],
+ scripts=['scripts/cxmanage', 'scripts/sol_tabs'],
package_data={'cxmanage_api': ['data/cids', 'data/registers']},
description='Calxeda Management Utility',
# NOTE: As of right now, the pyipmi version requirement needs to be updated