sistero 0.4.4 → 0.4.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/bin/sistero +18 -17
- data/lib/sistero/version.rb +1 -1
- data/sistero.gemspec +1 -1
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 913412741f25ddaf2dfe20d72a32f85f0bccefcf
|
4
|
+
data.tar.gz: 973044328104b9e4b7a623655f15e24ca036a662
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 68a5594b6eff47df34ff8926a1657428e78cf9fb0aa347e6a16ecacd9e46129a7361e5cd9bd444e0eccf355f0b7305ab9e746851dfa159cf1315bd00c168f816
|
7
|
+
data.tar.gz: fbeed2abe6ee036806844b1470cca8e90a6e1c199e83fd43b2dc0ad973bffc4a62a301f13981838db51f482cf8b256559134717a06b2cf4723d0cc1ffc02f87d
|
data/bin/sistero
CHANGED
@@ -7,6 +7,7 @@ require 'moister'
|
|
7
7
|
module Sistero::Command
|
8
8
|
def self.run args
|
9
9
|
config = nil
|
10
|
+
command = nil
|
10
11
|
|
11
12
|
Moister::SubcommandOptionParser.new do |op|
|
12
13
|
op.banner = 'usage: sistero [global options] command [command options]'
|
@@ -20,12 +21,12 @@ module Sistero::Command
|
|
20
21
|
|
21
22
|
op.on '-c', '--config file', 'override path to config file', 'cfg_file_path'
|
22
23
|
|
23
|
-
op.subcommand 'ssh', 'ssh to vm' do |subop|
|
24
|
+
op.subcommand 'ssh [vm]', 'ssh to vm' do |subop|
|
24
25
|
subop.on '-o val', 'add ssh options', 'ssh_options'
|
25
26
|
end
|
26
27
|
|
27
|
-
op.subcommand 'create', 'create vm'
|
28
|
-
op.subcommand 'destroy', 'destroy vm'
|
28
|
+
op.subcommand 'create [*vms]', 'create vm'
|
29
|
+
op.subcommand 'destroy [*vms]', 'destroy vm'
|
29
30
|
op.subcommand 'list', 'list vms'
|
30
31
|
op.subcommand 'show-config', 'show configuration'
|
31
32
|
op.subcommand 'ssh-keys', 'show ssh keys'
|
@@ -33,31 +34,31 @@ module Sistero::Command
|
|
33
34
|
op.subcommand 'regions', 'show possible regions'
|
34
35
|
op.subcommand 'images', 'show images'
|
35
36
|
|
36
|
-
parsed_cfg = op.parse
|
37
|
-
|
38
|
-
|
39
|
-
parsed_cfg.delete :config
|
40
|
-
|
41
|
-
config = OpenStruct.new parsed_cfg
|
37
|
+
parsed_cfg = op.parse args
|
38
|
+
command = parsed_cfg[:command]
|
39
|
+
config = OpenStruct.new parsed_cfg[:config]
|
42
40
|
end
|
43
41
|
|
44
|
-
unless
|
42
|
+
unless command
|
45
43
|
puts 'please supply a command, see --help'
|
46
44
|
exit
|
47
45
|
end
|
48
46
|
|
47
|
+
command_cfg = OpenStruct.new config[command]
|
49
48
|
sistero = Sistero::Instance.new({ cfg_file_path: config.cfg_file_path })
|
50
|
-
|
49
|
+
|
50
|
+
case command
|
51
51
|
when 'ssh'
|
52
|
-
vm_name, *ssh_args = config.positionals
|
53
52
|
# TODO: pass ssh_args
|
54
|
-
sistero.ssh_to_vm(vm_name, ssh_options:
|
53
|
+
sistero.ssh_to_vm(command_cfg.vm_name, ssh_options: command_cfg.ssh_options)
|
55
54
|
when 'create'
|
56
|
-
vms =
|
57
|
-
vms.
|
55
|
+
vms = command_cfg.vms
|
56
|
+
vms.push nil if vms.empty?
|
57
|
+
vms.each &sistero.method(:create_vm)
|
58
58
|
when 'destroy'
|
59
|
-
vms =
|
60
|
-
vms.
|
59
|
+
vms = command_cfg.vms
|
60
|
+
vms.push nil if vms.empty?
|
61
|
+
vms.each &sistero.method(:destroy_vm)
|
61
62
|
when 'list'
|
62
63
|
sistero.list_vms()
|
63
64
|
when 'show-config'
|
data/lib/sistero/version.rb
CHANGED
data/sistero.gemspec
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sistero
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- James Pike
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-01-
|
11
|
+
date: 2016-01-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -72,14 +72,14 @@ dependencies:
|
|
72
72
|
requirements:
|
73
73
|
- - "~>"
|
74
74
|
- !ruby/object:Gem::Version
|
75
|
-
version: '0.
|
75
|
+
version: '0.3'
|
76
76
|
type: :runtime
|
77
77
|
prerelease: false
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
80
|
- - "~>"
|
81
81
|
- !ruby/object:Gem::Version
|
82
|
-
version: '0.
|
82
|
+
version: '0.3'
|
83
83
|
description: Profile based digital ocean cluster management command line tool.
|
84
84
|
email:
|
85
85
|
- github@chilon.net
|
@@ -123,7 +123,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
123
123
|
version: '0'
|
124
124
|
requirements: []
|
125
125
|
rubyforge_project:
|
126
|
-
rubygems_version: 2.
|
126
|
+
rubygems_version: 2.5.1
|
127
127
|
signing_key:
|
128
128
|
specification_version: 4
|
129
129
|
summary: Profile based digital ocean cluster management command line tool.
|