mystro-client 0.1.0.rc2 → 0.1.0.rc3

Sign up to get free protection for your applications and to get access to all the features.
data/.ruby-version ADDED
@@ -0,0 +1 @@
1
+ ruby-1.9.3-p194
data/bin/mystro CHANGED
@@ -47,8 +47,9 @@ module Mystro
47
47
  exec("ssh #{options} #{user}@#{host}")
48
48
  end
49
49
  end
50
- subcommand "csshx", "use csshx to connect to all servers of environment" do
50
+ subcommand "csshx", "use csshx to connect to all servers of search" do
51
51
  option %w{-x --user}, "USER", "the user to connect as", default: "ubuntu"
52
+ option %w{-o --options}, "[OPTIONS]", "additional ssh options"
52
53
  parameter "PATTERN ...", "name or pattern of servers"
53
54
 
54
55
  def execute
@@ -60,6 +61,20 @@ module Mystro
60
61
  exec(cmd)
61
62
  end
62
63
  end
64
+ subcommand "cssh", "use cssh to connect to all servers of search" do
65
+ option %w{-x --user}, "USER", "the user to connect as", default: "ubuntu"
66
+ option %w{-o --options}, "[OPTIONS]", "additional ssh options"
67
+ parameter "PATTERN ...", "name or pattern of servers"
68
+
69
+ def execute
70
+ client = get_client(:compute, account)
71
+ list = client.search(pattern_list.join(","))
72
+ puts "servers found: #{list.map{|e| e["name"]}.join(", ")}"
73
+ cmd = "cssh --username #{user} #{"--options #{options}" if options} #{list.map {|e| e["long"]||e["dns"]}.join(" ")}"
74
+ puts "cmd: #{cmd}"
75
+ exec(cmd)
76
+ end
77
+ end
63
78
 
64
79
  subcommand "compute", "manage computes" do
65
80
  self.default_subcommand = "list"
@@ -5,7 +5,7 @@ unless defined?(Mystro::Client::Version)
5
5
  MAJOR = 0
6
6
  MINOR = 1
7
7
  TINY = 0
8
- TAG = "rc2"
8
+ TAG = "rc3"
9
9
  STRING = [MAJOR, MINOR, TINY, TAG].compact.join('.')
10
10
  end
11
11
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mystro-client
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0.rc2
4
+ version: 0.1.0.rc3
5
5
  prerelease: 6
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-04-02 00:00:00.000000000 Z
12
+ date: 2013-04-09 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: mystro-common
@@ -84,6 +84,7 @@ extensions: []
84
84
  extra_rdoc_files: []
85
85
  files:
86
86
  - .gitignore
87
+ - .ruby-version
87
88
  - CHANGELOG.md
88
89
  - Gemfile
89
90
  - LICENSE.txt
@@ -119,7 +120,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
119
120
  version: 1.3.1
120
121
  requirements: []
121
122
  rubyforge_project:
122
- rubygems_version: 1.8.24
123
+ rubygems_version: 1.8.23
123
124
  signing_key:
124
125
  specification_version: 3
125
126
  summary: mystro client