solusvm 0.4.0 → 0.4.1
Sign up to get free protection for your applications and to get access to all the features.
- data/README.rdoc +34 -0
- data/VERSION.yml +1 -1
- data/bin/solusvm +11 -11
- data/solusvm.gemspec +2 -2
- metadata +4 -4
data/README.rdoc
CHANGED
@@ -28,6 +28,40 @@ This library was first created for internal use at {Site5 LLC}[http://www.site5.
|
|
28
28
|
"extraipaddress"=>{}, "hostname"=>"server.hostname", "rootpassword"=>"password", "status"=>"success"}
|
29
29
|
|
30
30
|
|
31
|
+
== Command Line Usage
|
32
|
+
USAGE: solusvm <command> [options]
|
33
|
+
-I, --api-login [id] API ID
|
34
|
+
-K, --api-key [key] API KEY
|
35
|
+
-N, --node [node] Node to provision on
|
36
|
+
-U, --api-url [URL] URL to the API
|
37
|
+
-u, --username [username] The client to put the VPS under
|
38
|
+
-k, --kind [kind] Type of VPS (openvz,xen,xen hvm)
|
39
|
+
-t, --template [template] VPS template to boot from
|
40
|
+
-p, --plan [plan] Plan to use
|
41
|
+
-i, --ips [number] Number of ips to add to the VPS
|
42
|
+
-h, --help Show help documentation
|
43
|
+
Commands:
|
44
|
+
server-check-exists <vserverid>
|
45
|
+
server-shutdown <vserverid>
|
46
|
+
server-changeplan <vserverid> <newplan>
|
47
|
+
server-resume <vserverid>
|
48
|
+
server-reboot <vserverid>
|
49
|
+
server-status <vserverid>
|
50
|
+
server-boot <vserverid>
|
51
|
+
server-create <hostname> <password> -t myimag -k xen -p myplan -i 1
|
52
|
+
server-suspend <vserverid>
|
53
|
+
server-addip <vserverid>
|
54
|
+
|
55
|
+
== Default Config for Command Line
|
56
|
+
The command line utility, solusvm, will look for a .solusvm.yml file in ~/. You can specify some defaults.
|
57
|
+
~/.soulsvm.yml
|
58
|
+
id: api_id
|
59
|
+
key: api_key
|
60
|
+
# URL to the API endpoint
|
61
|
+
url: https://portal.yoursite.com/api/admin/command.php
|
62
|
+
# Default client to put servers under
|
63
|
+
username: bob
|
64
|
+
|
31
65
|
== REQUIREMENTS:
|
32
66
|
* xml-simple
|
33
67
|
|
data/VERSION.yml
CHANGED
data/bin/solusvm
CHANGED
@@ -21,40 +21,40 @@ shell_methods['server-changeplan'] = "<vserverid> <newplan>"
|
|
21
21
|
shell_methods['server-check-exists'] = "<vserverid>"
|
22
22
|
|
23
23
|
OptionParser.new do |o|
|
24
|
-
o.banner = "USAGE: #{$0} <command> [options]"
|
25
|
-
o.on("-I", "--api-login [id]", "API ID
|
24
|
+
o.banner = "USAGE: #{File.basename($0)} <command> [options]"
|
25
|
+
o.on("-I", "--api-login [id]", "API ID") do |opt|
|
26
26
|
opts[:api_id] = opt
|
27
27
|
end
|
28
28
|
|
29
|
-
o.on("-K", "--api-key [key]", "API KEY
|
29
|
+
o.on("-K", "--api-key [key]", "API KEY") do |opt|
|
30
30
|
opts[:api_key] = opt
|
31
31
|
end
|
32
32
|
|
33
|
-
o.on("-N", "--node [node]", "Node to provision on
|
33
|
+
o.on("-N", "--node [node]", "Node to provision on") do |opt|
|
34
34
|
opts[:node] = opt
|
35
35
|
end
|
36
36
|
|
37
|
-
o.on("-U", "--api-url [URL]", "URL to the API
|
37
|
+
o.on("-U", "--api-url [URL]", "URL to the API") do |opt|
|
38
38
|
opts[:api_url] = opt
|
39
39
|
end
|
40
40
|
|
41
|
-
o.on("-u", "--username [username]", "The client to put the VPS under
|
41
|
+
o.on("-u", "--username [username]", "The client to put the VPS under") do |opt|
|
42
42
|
opts[:username] = opt
|
43
43
|
end
|
44
44
|
|
45
|
-
o.on("-k", "--kind [kind]", "Type of VPS (#{Solusvm::Server::VALID_SERVER_TYPES.join(',')})
|
45
|
+
o.on("-k", "--kind [kind]", "Type of VPS (#{Solusvm::Server::VALID_SERVER_TYPES.join(',')})") do |opt|
|
46
46
|
opts[:kind] = opt
|
47
47
|
end
|
48
48
|
|
49
|
-
o.on("-t", "--template [template]", "VPS template to boot from
|
49
|
+
o.on("-t", "--template [template]", "VPS template to boot from") do |opt|
|
50
50
|
opts[:template] = opt
|
51
51
|
end
|
52
52
|
|
53
|
-
o.on("-p", "--plan [plan]", "Plan to use
|
53
|
+
o.on("-p", "--plan [plan]", "Plan to use") do |opt|
|
54
54
|
opts[:plan] = opt
|
55
55
|
end
|
56
56
|
|
57
|
-
o.on("-i", "--ips [number]", "Number of ips to add to the VPS
|
57
|
+
o.on("-i", "--ips [number]", "Number of ips to add to the VPS") do |opt|
|
58
58
|
opts[:ips] = opt.to_i
|
59
59
|
end
|
60
60
|
|
@@ -70,7 +70,7 @@ end.parse!
|
|
70
70
|
config_file = File.join(File.expand_path(ENV['HOME']), '.soulsvm.yml')
|
71
71
|
server = Solusvm::Server.new
|
72
72
|
if ARGV.empty?
|
73
|
-
STDERR.puts "USAGE: #{$0} [function] [options]"
|
73
|
+
STDERR.puts "USAGE: #{File.basename($0)} [function] [options]"
|
74
74
|
else
|
75
75
|
if File.exists?(config_file)
|
76
76
|
config = YAML::load(File.open(config_file))
|
data/solusvm.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{solusvm}
|
8
|
-
s.version = "0.4.
|
8
|
+
s.version = "0.4.1"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Justin Mazzi"]
|
12
|
-
s.date = %q{2010-06-
|
12
|
+
s.date = %q{2010-06-23}
|
13
13
|
s.default_executable = %q{solusvm}
|
14
14
|
s.description = %q{Solusvm allows for easy interaction with the SolusVM Admin::API.}
|
15
15
|
s.email = %q{jmazzi@gmail.com}
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: solusvm
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 13
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 4
|
9
|
-
-
|
10
|
-
version: 0.4.
|
9
|
+
- 1
|
10
|
+
version: 0.4.1
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Justin Mazzi
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2010-06-
|
18
|
+
date: 2010-06-23 00:00:00 -04:00
|
19
19
|
default_executable: solusvm
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|