zergrush 0.0.21 → 0.0.24

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- ZWRjZjJlYjUwNGVkMDJlZDYzYmRhN2I1NzJkMmZmMWYyNjBhNTEyYg==
4
+ NWNmNTcxZTk3ZTViZmFlNmYyYzEwNGM3M2FlZDczNjdjMDFjM2ZlYg==
5
5
  data.tar.gz: !binary |-
6
- Yzc0Mzg0YjE0ZjdmZTVjM2E3YmIyMDhiOTBkMjgxZDA1MmQ4N2NmZA==
6
+ YmYyNDVhZDMwZjJmYTcxYmFkMzFkOWQ1NzhkNzhhZTc2YTE4MTgyNA==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- YTFmNjUzY2VlMGYxZGNmY2Y5MGQ5YzBhZTQ5ZDM5YjIxNDI3YzdhNzQ4MjJm
10
- ZmY1NzYxNGRkOTIzOWUzOTEzYjU0MTAwNmJhMTE2MjY1ZTRlM2RhZTBhODUz
11
- MzlhYjZlNzc3MmI3ZjIzYjVhMmYzY2RmOGI0MmYwY2RkMzI5MTc=
9
+ ODliMmVkODhkZWM2OTk0NjIzMmRlZWUwMjlkNTA4OGNhZDFjZjA1NTJlYWRj
10
+ MDBjYTY0ZjQ2YTFmMzE0ZmUzNGIwMTU0MjRiMjQzYzE1Zjk3NDZlMDk1NzZm
11
+ OGYzM2IyOGNjZWE4YzRlMWNkMmE1ZjQ0M2E2MDE5YTczZTAwNjg=
12
12
  data.tar.gz: !binary |-
13
- MTJkZDI1NWY0NGNhYTZhMWE3MjRlNDk5YWNlODRhYjNmMThlMmE2ODBhYjc5
14
- YjNhNTgyZDIwYzA0MWRlMTYwNmU2MGQ2ZWMxZjhiZTUxMzkxOWM5OGNiNDI0
15
- OWMwMDc1NGU2ZDBkZDE1OGFkMDg2ZDU3ODlhNThlZmEyYTg0MWE=
13
+ ZjFkNWI1NzJiZDIwMmMxZWVlMzVjOWJhNWI3YTQxOTZkMTljZmVlYmI1NzBm
14
+ MjZkMDZhMTE0MzBmOGE2MzQ2NWNlOGU0MzRjYmNmMWVlYmRmOGIyNGI1YWFl
15
+ YjQ2MTllMGFkZjk5MGRlNWMzYzlhOTVjMjgxM2I3MjUxZjc4MDY=
@@ -59,7 +59,8 @@ module Zerg
59
59
 
60
60
  class CLI < Thor
61
61
  class_option :force, :type => :boolean, :banner => "force overwrite of files"
62
- class_option :debug, :type => :boolean, :banner => "add debug option to driver"
62
+ class_option :debug, :type => :boolean, :banner => "add debug option to driver"
63
+ class_option :base, :type => :string, :banner => "base name for the snapshot"
63
64
 
64
65
  def self.exit_on_failure?
65
66
  true
@@ -84,6 +85,11 @@ module Zerg
84
85
  def halt(task)
85
86
  puts Zerg::Runner.halt(task, options[:debug])
86
87
  end
88
+
89
+ desc "snapshot [TASK]", "takes a snapshot of currently running vms"
90
+ def snapshot(task)
91
+ puts Zerg::Runner.snapshot(task, options[:base])
92
+ end
87
93
 
88
94
  register(HiveCLI, 'hive', 'hive [COMMAND]', 'Manage hive - a collection of task descriptions.')
89
95
  end
@@ -82,5 +82,23 @@ module Zerg
82
82
  end
83
83
  puts("SUCCESS!")
84
84
  end
85
+
86
+ def self.snapshot(task, base)
87
+ # load the hive first
88
+ Zerg::Hive.instance.load
89
+
90
+ puts "Loaded hive. Looking for task #{task}..."
91
+ abort("ERROR: Task #{task} not found in current hive!") unless Zerg::Hive.instance.hive.has_key?(task)
92
+
93
+ begin
94
+ pmgr = ZergGemPlugin::Manager.instance
95
+ pmgr.load
96
+ driver = pmgr.create("/driver/#{Zerg::Hive.instance.hive[task]["vm"]["driver"]["drivertype"]}")
97
+ driver.snapshot Zerg::Hive.instance.load_path, task, Zerg::Hive.instance.hive[task], base
98
+ rescue ZergGemPlugin::PluginNotLoaded
99
+ abort("ERROR: driver #{Zerg::Hive.instance.hive[task]["vm"]["driver"]["drivertype"]} not found. Did you install the plugin gem?")
100
+ end
101
+ puts("SUCCESS!")
102
+ end
85
103
  end
86
104
  end
@@ -22,5 +22,5 @@
22
22
  #++
23
23
 
24
24
  module Zerg
25
- VERSION = "0.0.21"
25
+ VERSION = "0.0.24"
26
26
  end
@@ -26,8 +26,8 @@ Gem::Specification.new do |s|
26
26
  s.add_dependency "json-schema"
27
27
  s.add_dependency "thor"
28
28
  s.add_dependency "highline"
29
- s.add_dependency "zergrush_vagrant", ">= 0.0.4"
30
- s.add_dependency "zergrush_cf", ">= 0.0.14"
29
+ s.add_dependency "zergrush_vagrant", ">= 0.0.5"
30
+ s.add_dependency "zergrush_cf", ">= 0.0.17"
31
31
 
32
32
  s.files = `git ls-files`.split("\n")
33
33
  s.executables = `git ls-files`.split("\n").map{|f| f =~ /^bin\/(.*)/ ? $1 : nil}.compact
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: zergrush
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.21
4
+ version: 0.0.24
5
5
  platform: ruby
6
6
  authors:
7
7
  - MTN Satellite Communications
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-06-18 00:00:00.000000000 Z
11
+ date: 2014-09-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -156,28 +156,28 @@ dependencies:
156
156
  requirements:
157
157
  - - ! '>='
158
158
  - !ruby/object:Gem::Version
159
- version: 0.0.4
159
+ version: 0.0.5
160
160
  type: :runtime
161
161
  prerelease: false
162
162
  version_requirements: !ruby/object:Gem::Requirement
163
163
  requirements:
164
164
  - - ! '>='
165
165
  - !ruby/object:Gem::Version
166
- version: 0.0.4
166
+ version: 0.0.5
167
167
  - !ruby/object:Gem::Dependency
168
168
  name: zergrush_cf
169
169
  requirement: !ruby/object:Gem::Requirement
170
170
  requirements:
171
171
  - - ! '>='
172
172
  - !ruby/object:Gem::Version
173
- version: 0.0.14
173
+ version: 0.0.17
174
174
  type: :runtime
175
175
  prerelease: false
176
176
  version_requirements: !ruby/object:Gem::Requirement
177
177
  requirements:
178
178
  - - ! '>='
179
179
  - !ruby/object:Gem::Version
180
- version: 0.0.14
180
+ version: 0.0.17
181
181
  description: Zerg is a tool for launching an arbitrary number of virtual machines
182
182
  and running a task on all of them at once
183
183
  email: