lunanode 0.2.0 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop.yml +2 -0
- data/.travis.yml +8 -0
- data/CHANGELOG.md +21 -2
- data/Gemfile +1 -1
- data/Rakefile +17 -4
- data/config.reek +20 -0
- data/lib/lunanode/action_generator.rb +51 -41
- data/lib/lunanode/api.rb +20 -16
- data/lib/lunanode/api_actions/default/image.rb +4 -0
- data/lib/lunanode/api_actions/default/volume.rb +4 -0
- data/lib/lunanode/api_error.rb +1 -2
- data/lib/lunanode/version.rb +1 -1
- data/lunanode.gemspec +2 -0
- data/lunanode_api_def.yaml +101 -93
- metadata +31 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 25b84a457a8cec75b71c9506f0c7a1989507cb24
|
4
|
+
data.tar.gz: 592c51192a8a11f6582375a55552da9c2dfea090
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7380c1d7d2f152936d26827182e694738e80518a56891589dfae3f2b0278ec86edff4bb648e5ed50727180d302b7e9ebe48aece47f7df80154e1d31b03648d2c
|
7
|
+
data.tar.gz: 3d4d6d8a385269a9ba2e70d5236534a6b8d6422e1a29bc7c464702b2d1e39f50e3323cc88add8e0727be9a437c6447cb81f462d91bf226e6d9c8c8fe5b629c46
|
data/.rubocop.yml
CHANGED
data/.travis.yml
CHANGED
@@ -1,3 +1,4 @@
|
|
1
|
+
dist: trusty
|
1
2
|
sudo: false
|
2
3
|
language: ruby
|
3
4
|
rvm:
|
@@ -5,6 +6,13 @@ rvm:
|
|
5
6
|
- 2.3.3
|
6
7
|
- 2.2.6
|
7
8
|
- 2.1.10
|
9
|
+
- ruby-head
|
10
|
+
- jruby-9.1.5.0
|
11
|
+
- jruby-head
|
12
|
+
matrix:
|
13
|
+
allow_failures:
|
14
|
+
- rvm: ruby-head
|
15
|
+
- rvm: jruby-head
|
8
16
|
before_install:
|
9
17
|
- gem update --system
|
10
18
|
- gem --version
|
data/CHANGELOG.md
CHANGED
@@ -6,7 +6,25 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
|
|
6
6
|
|
7
7
|
## [Unreleased]
|
8
8
|
|
9
|
-
## [0.
|
9
|
+
## [0.3.0] - 2017-02-10
|
10
|
+
### Added
|
11
|
+
- New `api#image_rename` and `api#volume_rename` actions in the API. Thanks to
|
12
|
+
the people at Luna Node for implementing them so quickly!
|
13
|
+
- (Testing) Some rudimentary RSpec tests.
|
14
|
+
- (Development) Reek code analyzer for code smells.
|
15
|
+
- (Development) Rubocop-rspec code analyzer for tests.
|
16
|
+
|
17
|
+
### Changed
|
18
|
+
- Cleaned up and broke apart larger action generator methods.
|
19
|
+
- Changed API definition file to use Ruby-style parameter types.
|
20
|
+
- Simplified how APIError displays messages.
|
21
|
+
- Improved Travis CI setup to include JRuby.
|
22
|
+
- Miscellaneous code smells and cleanups.
|
23
|
+
|
24
|
+
### Fixed
|
25
|
+
- `RestClient::Exception` was passed a non-existent parameter.
|
26
|
+
|
27
|
+
## [0.2.0] - 2017-02-08
|
10
28
|
### Added
|
11
29
|
- Created this Changelog.
|
12
30
|
- API calls will now print potentially-useful information if $DEBUG=true
|
@@ -38,7 +56,8 @@ This is the first point of reasonable functionality/stability.
|
|
38
56
|
### Added
|
39
57
|
- Initial commit, not publicly released
|
40
58
|
|
41
|
-
[Unreleased]: https://github.com/nomoon/lunanode/compare/v0.
|
59
|
+
[Unreleased]: https://github.com/nomoon/lunanode/compare/v0.3.0...HEAD
|
60
|
+
[0.3.0]: https://github.com/nomoon/lunanode/compare/v0.2.0...v0.3.0
|
42
61
|
[0.2.0]: https://github.com/nomoon/lunanode/compare/v0.1.6...v0.2.0
|
43
62
|
[0.1.6]: https://github.com/nomoon/lunanode/compare/v0.1.5...v0.1.6
|
44
63
|
[0.1.5]: https://github.com/nomoon/lunanode/compare/v0.0.1...v0.1.5
|
data/Gemfile
CHANGED
data/Rakefile
CHANGED
@@ -1,7 +1,17 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
require "bundler/gem_tasks"
|
3
|
+
require "reek/rake/task"
|
4
|
+
require "rubocop/rake_task"
|
3
5
|
require "rspec/core/rake_task"
|
4
6
|
|
7
|
+
Reek::Rake::Task.new do |t|
|
8
|
+
t.fail_on_error = false
|
9
|
+
end
|
10
|
+
|
11
|
+
RuboCop::RakeTask.new do |t|
|
12
|
+
t.fail_on_error = false
|
13
|
+
end
|
14
|
+
|
5
15
|
RSpec::Core::RakeTask.new(:spec)
|
6
16
|
|
7
17
|
desc "Generates default actions modules from API spec YAML file."
|
@@ -10,10 +20,13 @@ task :generate_default_api_modules do
|
|
10
20
|
modules = Lunanode::ActionGenerator.generate_default_modules
|
11
21
|
modules.each do |category, module_s|
|
12
22
|
filename = "lib/lunanode/api_actions/default/#{category}.rb"
|
13
|
-
|
14
|
-
|
15
|
-
|
23
|
+
existing_data = File.read(filename) if File.exist?(filename)
|
24
|
+
if module_s == existing_data
|
25
|
+
puts "File unchanged: #{filename}"
|
26
|
+
else
|
27
|
+
puts "File written: #{filename} (#{File.write(filename, module_s)} bytes)"
|
28
|
+
end
|
16
29
|
end
|
17
30
|
end
|
18
31
|
|
19
|
-
task default:
|
32
|
+
task default: %i[reek rubocop spec]
|
data/config.reek
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
---
|
2
|
+
|
3
|
+
IrresponsibleModule:
|
4
|
+
enabled: false
|
5
|
+
|
6
|
+
NestedIterators:
|
7
|
+
max_allowed_nesting: 2
|
8
|
+
|
9
|
+
TooManyStatements:
|
10
|
+
max_statements: 10
|
11
|
+
|
12
|
+
UtilityFunction:
|
13
|
+
public_methods_only: true
|
14
|
+
|
15
|
+
# Don't complain about undocumented default actions
|
16
|
+
"lib/lunanode/api_actions/default":
|
17
|
+
DataClump:
|
18
|
+
enabled: false
|
19
|
+
LongParameterList:
|
20
|
+
enabled: false
|
@@ -23,20 +23,20 @@ module Lunanode
|
|
23
23
|
|
24
24
|
UNSAFE_IDENTIFIER = /.{21,}|[^A-Za-z0-9_*\-]/
|
25
25
|
|
26
|
-
def
|
27
|
-
|
28
|
-
name.capitalize
|
29
|
-
else
|
30
|
-
name.upcase
|
31
|
-
end
|
26
|
+
def check_safe!(identifier)
|
27
|
+
raise "Unsafe name `#{identifier}`" if identifier =~ UNSAFE_IDENTIFIER
|
32
28
|
end
|
33
29
|
|
34
30
|
def indent_lines(string)
|
35
31
|
string.gsub(/^(?!$)/, " ")
|
36
32
|
end
|
37
33
|
|
38
|
-
def
|
39
|
-
|
34
|
+
def module_name(name)
|
35
|
+
if name.length > 3
|
36
|
+
name.capitalize
|
37
|
+
else
|
38
|
+
name.upcase
|
39
|
+
end
|
40
40
|
end
|
41
41
|
|
42
42
|
def generate_categories(data)
|
@@ -48,49 +48,57 @@ module Lunanode
|
|
48
48
|
|
49
49
|
def generate_actions(category, actions)
|
50
50
|
actions = actions.map do |action, params|
|
51
|
-
generate_action(category, action, params)
|
51
|
+
indent_lines(generate_action(category, action, params))
|
52
52
|
end
|
53
53
|
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
actions_module = "module APIActions\n" +
|
59
|
-
indent_lines(category_module) +
|
60
|
-
"end\n"
|
61
|
-
|
62
|
-
src = "module #{name.split('::')[-2]}\n" +
|
63
|
-
indent_lines(actions_module) +
|
64
|
-
"end\n"
|
54
|
+
category_mod = "module #{module_name(category)}\n" \
|
55
|
+
"#{actions.join("\n")}end\n"
|
56
|
+
actions_mod = "module APIActions\n#{indent_lines(category_mod)}end\n"
|
65
57
|
|
66
|
-
"# frozen_string_literal: true\n\n
|
58
|
+
"# frozen_string_literal: true\n\n" \
|
59
|
+
"module #{name.split('::')[-2]}\n#{indent_lines(actions_mod)}end\n"
|
67
60
|
end
|
68
61
|
|
69
|
-
def
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
param_list = param_list_req + param_list_opt
|
76
|
-
param_list.each { |p| check_safe!(p) }
|
77
|
-
|
78
|
-
param_list_call_arr = param_list.map do |p|
|
79
|
-
p.start_with?("**") ? p : "#{p}: #{p}"
|
62
|
+
def generate_param_list(params)
|
63
|
+
params.to_h.each_with_object({}) do |(status, param_arr), acc|
|
64
|
+
param_arr.each do |param|
|
65
|
+
check_safe!(param)
|
66
|
+
acc[param] = status
|
67
|
+
end
|
80
68
|
end
|
69
|
+
end
|
81
70
|
|
82
|
-
|
83
|
-
|
71
|
+
def generate_param_list_sig(param_list)
|
72
|
+
param_list.map do |param, status|
|
73
|
+
case status
|
74
|
+
when :keyreq
|
75
|
+
"#{param}:"
|
76
|
+
when :key
|
77
|
+
"#{param}: nil"
|
78
|
+
when :keyrest
|
79
|
+
"**#{param}"
|
80
|
+
end
|
84
81
|
end
|
82
|
+
end
|
85
83
|
|
86
|
-
|
87
|
-
|
84
|
+
def generate_param_list_call(param_list)
|
85
|
+
param_list.map do |(param, status)|
|
86
|
+
case status
|
87
|
+
when :keyrest
|
88
|
+
"**#{param}"
|
89
|
+
else
|
90
|
+
"#{param}: #{param}"
|
91
|
+
end
|
88
92
|
end
|
89
|
-
|
93
|
+
end
|
94
|
+
|
95
|
+
def generate_action(category, action, params)
|
96
|
+
check_safe!(action)
|
97
|
+
param_list = generate_param_list(params)
|
90
98
|
|
91
99
|
unless param_list.empty?
|
92
|
-
param_list_call = ", #{
|
93
|
-
param_list_sig = "(#{
|
100
|
+
param_list_call = ", #{generate_param_list_call(param_list).join(', ')}"
|
101
|
+
param_list_sig = "(#{generate_param_list_sig(param_list).join(', ')})"
|
94
102
|
end
|
95
103
|
|
96
104
|
"def #{category}_#{action.to_s.tr('-', '_')}#{param_list_sig}\n" \
|
@@ -99,7 +107,9 @@ module Lunanode
|
|
99
107
|
end
|
100
108
|
|
101
109
|
private_constant :UNSAFE_IDENTIFIER
|
102
|
-
private_class_method :check_safe!, :
|
103
|
-
:
|
110
|
+
private_class_method :check_safe!, :indent_lines, :module_name,
|
111
|
+
:generate_categories, :generate_actions,
|
112
|
+
:generate_param_list, :generate_param_list_sig,
|
113
|
+
:generate_param_list_call, :generate_action
|
104
114
|
end
|
105
115
|
end
|
data/lib/lunanode/api.rb
CHANGED
@@ -40,12 +40,15 @@ module Lunanode
|
|
40
40
|
#
|
41
41
|
# @param method_name[#to_sym] The name of the API method
|
42
42
|
# @return [Hash] information about the method parameters.
|
43
|
+
#
|
43
44
|
def self.params_for(method_name)
|
45
|
+
method_name = method_name.to_sym
|
44
46
|
@params_for[method_name] ||= begin
|
45
|
-
method_name = method_name.to_sym
|
46
47
|
param_groups = instance_method(method_name).parameters.group_by(&:first)
|
47
|
-
out = param_groups.map
|
48
|
-
|
48
|
+
out = param_groups.map do |status, param_def|
|
49
|
+
[status, param_def.map(&:last)]
|
50
|
+
end
|
51
|
+
out.to_h.each_value(&:freeze).freeze
|
49
52
|
end
|
50
53
|
end
|
51
54
|
|
@@ -106,15 +109,14 @@ module Lunanode
|
|
106
109
|
#
|
107
110
|
def action(category, action, **params)
|
108
111
|
resp = call_api("#{category}/#{action}/", params)
|
109
|
-
raise APIError,
|
110
|
-
resp.delete(:success)
|
112
|
+
raise APIError, resp[:error] unless resp.delete(:success) == "yes"
|
111
113
|
|
112
114
|
if resp.size == 1
|
113
115
|
resp.values.first
|
114
116
|
else
|
115
117
|
resp
|
116
118
|
end
|
117
|
-
end
|
119
|
+
end # :reek:FeatureEnvy
|
118
120
|
|
119
121
|
private
|
120
122
|
|
@@ -122,31 +124,33 @@ module Lunanode
|
|
122
124
|
|
123
125
|
# Make an API call and return response.
|
124
126
|
def call_api(handler_path, params)
|
127
|
+
req_url = "#{rest_client.url}#{handler_path}"
|
125
128
|
req_formdata = auth_request_formdata(handler_path, clean_params(params))
|
129
|
+
|
126
130
|
if $DEBUG
|
127
131
|
STDERR.puts "call_api()\n" + JSON.pretty_generate(
|
128
|
-
path:
|
132
|
+
path: req_url,
|
129
133
|
req: JSON.parse(req_formdata[:req]),
|
130
134
|
signature: req_formdata[:signature],
|
131
135
|
nonce: req_formdata[:nonce]
|
132
136
|
)
|
133
137
|
end
|
134
|
-
|
135
|
-
|
138
|
+
|
139
|
+
response = rest_client[handler_path].post(req_formdata)
|
140
|
+
JSON.parse(response, symbolize_names: true)
|
136
141
|
rescue RestClient::Exception => err
|
137
|
-
err.message += "\n Request Path: #{
|
138
|
-
"\n Request Data: #{
|
142
|
+
err.message += "\n Request Path: #{req_url}" \
|
143
|
+
"\n Request Data: #{req_formdata}"
|
139
144
|
raise err
|
140
145
|
end
|
141
146
|
|
142
147
|
# Clean empty request parameters
|
143
148
|
def clean_params(params)
|
144
|
-
params.each_with_object({}) do |(
|
145
|
-
|
146
|
-
|
147
|
-
end
|
149
|
+
params.each_with_object({}) do |(param, value), acc|
|
150
|
+
next unless param.respond_to?(:to_sym) && value.respond_to?(:to_s)
|
151
|
+
acc[param.to_sym] = value.to_s
|
148
152
|
end
|
149
|
-
end
|
153
|
+
end # :reek:ManualDispatch
|
150
154
|
|
151
155
|
# Create signed request data
|
152
156
|
def auth_request_formdata(handler_path, params)
|
data/lib/lunanode/api_error.rb
CHANGED
@@ -7,8 +7,7 @@ module Lunanode
|
|
7
7
|
class APIError < RuntimeError
|
8
8
|
def to_s
|
9
9
|
unescaped = CGI.unescapeHTML(super)
|
10
|
-
|
11
|
-
JSON.pretty_generate(JSON.parse(unescaped.gsub(/\A"|"\z/, "")))
|
10
|
+
JSON.pretty_generate(JSON.parse(unescaped))
|
12
11
|
rescue JSON::ParserError
|
13
12
|
unescaped
|
14
13
|
end
|
data/lib/lunanode/version.rb
CHANGED
data/lunanode.gemspec
CHANGED
@@ -29,5 +29,7 @@ Gem::Specification.new do |spec|
|
|
29
29
|
spec.add_development_dependency "rspec", "~> 3.0"
|
30
30
|
spec.add_development_dependency "yard", "~> 0.9"
|
31
31
|
spec.add_development_dependency "pry", "~> 0.10"
|
32
|
+
spec.add_development_dependency "reek", "~> 4.5"
|
32
33
|
spec.add_development_dependency "rubocop", "~> 0.47"
|
34
|
+
spec.add_development_dependency "rubocop-rspec", "~> 1.10"
|
33
35
|
end
|
data/lunanode_api_def.yaml
CHANGED
@@ -1,74 +1,74 @@
|
|
1
1
|
:vm:
|
2
2
|
:start:
|
3
|
-
:
|
3
|
+
:keyreq:
|
4
4
|
- vm_id
|
5
5
|
:stop:
|
6
|
-
:
|
6
|
+
:keyreq:
|
7
7
|
- vm_id
|
8
8
|
:reboot:
|
9
|
-
:
|
9
|
+
:keyreq:
|
10
10
|
- vm_id
|
11
11
|
:diskswap:
|
12
|
-
:
|
12
|
+
:keyreq:
|
13
13
|
- vm_id
|
14
14
|
:info:
|
15
|
-
:
|
15
|
+
:keyreq:
|
16
16
|
- vm_id
|
17
17
|
:delete:
|
18
|
-
:
|
18
|
+
:keyreq:
|
19
19
|
- vm_id
|
20
20
|
:reimage:
|
21
|
-
:
|
21
|
+
:keyreq:
|
22
22
|
- vm_id
|
23
23
|
- image_id
|
24
24
|
:resize:
|
25
|
-
:
|
25
|
+
:keyreq:
|
26
26
|
- vm_id
|
27
27
|
- plan_id
|
28
28
|
:rescue:
|
29
|
-
:
|
29
|
+
:keyreq:
|
30
30
|
- vm_id
|
31
31
|
:vnc:
|
32
|
-
:
|
32
|
+
:keyreq:
|
33
33
|
- vm_id
|
34
34
|
:floatingip-add:
|
35
|
-
:
|
35
|
+
:keyreq:
|
36
36
|
- vm_id
|
37
|
-
:
|
37
|
+
:key:
|
38
38
|
- ip
|
39
39
|
- private_ip
|
40
40
|
:floatingip-delete:
|
41
|
-
:
|
41
|
+
:keyreq:
|
42
42
|
- vm_id
|
43
|
-
:
|
43
|
+
:key:
|
44
44
|
- ip
|
45
45
|
- keep
|
46
46
|
:iplist:
|
47
|
-
:
|
47
|
+
:keyreq:
|
48
48
|
- vm_id
|
49
49
|
:ip-add:
|
50
|
-
:
|
50
|
+
:keyreq:
|
51
51
|
- vm_id
|
52
|
-
:
|
52
|
+
:key:
|
53
53
|
- ip
|
54
54
|
:ip-delete:
|
55
|
-
:
|
55
|
+
:keyreq:
|
56
56
|
- vm_id
|
57
57
|
- ip
|
58
58
|
:securitygroup-add:
|
59
|
-
:
|
59
|
+
:keyreq:
|
60
60
|
- vm_id
|
61
61
|
- group_id
|
62
62
|
:securitygroup-remove:
|
63
|
-
:
|
63
|
+
:keyreq:
|
64
64
|
- vm_id
|
65
65
|
- group_id
|
66
66
|
:create:
|
67
|
-
:
|
67
|
+
:keyreq:
|
68
68
|
- hostname
|
69
69
|
- plan_id
|
70
70
|
- image_id
|
71
|
-
:
|
71
|
+
:key:
|
72
72
|
- region
|
73
73
|
- ip
|
74
74
|
- net_id
|
@@ -80,164 +80,172 @@
|
|
80
80
|
- set_password
|
81
81
|
- affinity_group
|
82
82
|
:snapshot:
|
83
|
-
:
|
83
|
+
:keyreq:
|
84
84
|
- vm_id
|
85
85
|
- name
|
86
86
|
:list:
|
87
87
|
:shelve:
|
88
|
-
:
|
88
|
+
:keyreq:
|
89
89
|
- vm_id
|
90
90
|
:unshelve:
|
91
|
-
:
|
91
|
+
:keyreq:
|
92
92
|
- vm_id
|
93
93
|
:rename:
|
94
|
-
:
|
94
|
+
:keyreq:
|
95
95
|
- vm_id
|
96
96
|
- hostname
|
97
97
|
:dns:
|
98
98
|
:list:
|
99
99
|
:set:
|
100
|
-
:
|
100
|
+
:keyreq:
|
101
101
|
- ip
|
102
102
|
- hostname
|
103
103
|
:zone-list:
|
104
104
|
:zone-add:
|
105
|
-
:
|
105
|
+
:keyreq:
|
106
106
|
- origin
|
107
|
-
:
|
107
|
+
:key:
|
108
108
|
- ttl
|
109
109
|
:zone-remove:
|
110
|
-
:
|
110
|
+
:keyreq:
|
111
111
|
- zone_id
|
112
112
|
:record-list:
|
113
|
-
:
|
113
|
+
:keyreq:
|
114
114
|
- zone_id
|
115
115
|
:record-add:
|
116
|
-
:
|
116
|
+
:keyreq:
|
117
117
|
- zone_id
|
118
118
|
- name
|
119
119
|
- data
|
120
120
|
- ttl
|
121
121
|
- type
|
122
122
|
:record-remove:
|
123
|
-
:
|
123
|
+
:keyreq:
|
124
124
|
- record_id
|
125
125
|
:dyn-list:
|
126
126
|
:dyn-add:
|
127
|
-
:
|
127
|
+
:keyreq:
|
128
128
|
- name
|
129
129
|
- ip
|
130
130
|
:dyn-update:
|
131
|
-
:
|
131
|
+
:keyreq:
|
132
132
|
- dyn_id
|
133
133
|
- name
|
134
134
|
- ip
|
135
135
|
:dyn-remove:
|
136
|
-
:
|
136
|
+
:keyreq:
|
137
137
|
- dyn_id
|
138
138
|
:image:
|
139
139
|
:list:
|
140
|
-
:
|
140
|
+
:key:
|
141
141
|
- region
|
142
142
|
:delete:
|
143
|
-
:
|
143
|
+
:keyreq:
|
144
144
|
- image_id
|
145
145
|
:details:
|
146
|
-
:
|
146
|
+
:keyreq:
|
147
147
|
- image_id
|
148
148
|
:replicate:
|
149
|
-
:
|
149
|
+
:keyreq:
|
150
150
|
- image_id
|
151
151
|
- region
|
152
152
|
:fetch:
|
153
|
-
:
|
153
|
+
:keyreq:
|
154
154
|
- region
|
155
155
|
- name
|
156
156
|
- location
|
157
157
|
- format
|
158
|
-
:
|
158
|
+
:key:
|
159
159
|
- virtio
|
160
160
|
:retrieve:
|
161
|
-
:
|
161
|
+
:keyreq:
|
162
162
|
- image_id
|
163
|
+
:rename:
|
164
|
+
:keyreq:
|
165
|
+
- image_id
|
166
|
+
- name
|
163
167
|
:volume:
|
164
168
|
:list:
|
165
|
-
:
|
169
|
+
:keyreq:
|
166
170
|
- region
|
167
171
|
:create:
|
168
|
-
:
|
172
|
+
:keyreq:
|
169
173
|
- region
|
170
174
|
- label
|
171
175
|
- size
|
172
|
-
:
|
176
|
+
:key:
|
173
177
|
- image
|
174
178
|
- snapshot_id
|
175
179
|
:delete:
|
176
|
-
:
|
180
|
+
:keyreq:
|
177
181
|
- region
|
178
182
|
- volume_id
|
179
183
|
:attach:
|
180
|
-
:
|
184
|
+
:keyreq:
|
181
185
|
- region
|
182
186
|
- volume_id
|
183
187
|
- vm_id
|
184
188
|
- target
|
185
189
|
:detach:
|
186
|
-
:
|
190
|
+
:keyreq:
|
187
191
|
- region
|
188
192
|
- volume_id
|
189
193
|
:info:
|
190
|
-
:
|
194
|
+
:keyreq:
|
191
195
|
- region
|
192
196
|
- volume_id
|
193
197
|
:extend:
|
194
|
-
:
|
198
|
+
:keyreq:
|
195
199
|
- region
|
196
200
|
- volume_id
|
197
201
|
- size
|
198
202
|
:snapshot-create:
|
199
|
-
:
|
203
|
+
:keyreq:
|
200
204
|
- region
|
201
205
|
- volume_id
|
202
206
|
- label
|
203
207
|
:snapshot-delete:
|
204
|
-
:
|
208
|
+
:keyreq:
|
205
209
|
- region
|
206
210
|
- snapshot_id
|
207
211
|
:snapshot-list:
|
208
|
-
:
|
212
|
+
:keyreq:
|
209
213
|
- region
|
214
|
+
:rename:
|
215
|
+
:keyreq:
|
216
|
+
- volume_id
|
217
|
+
- name
|
210
218
|
:floating:
|
211
219
|
:list:
|
212
220
|
:add:
|
213
|
-
:
|
221
|
+
:keyreq:
|
214
222
|
- region
|
215
223
|
:delete:
|
216
|
-
:
|
224
|
+
:keyreq:
|
217
225
|
- region
|
218
226
|
- ip
|
219
227
|
:network:
|
220
228
|
:list:
|
221
|
-
:
|
229
|
+
:key:
|
222
230
|
- region
|
223
231
|
:create:
|
224
|
-
:
|
232
|
+
:keyreq:
|
225
233
|
- region
|
226
234
|
- name
|
227
235
|
- subnet
|
228
236
|
- dns
|
229
237
|
:delete:
|
230
|
-
:
|
238
|
+
:keyreq:
|
231
239
|
- region
|
232
240
|
- net_id
|
233
241
|
:lb:
|
234
242
|
:list:
|
235
|
-
:
|
243
|
+
:keyreq:
|
236
244
|
- region
|
237
|
-
:
|
245
|
+
:key:
|
238
246
|
- net_id
|
239
247
|
:create:
|
240
|
-
:
|
248
|
+
:keyreq:
|
241
249
|
- region
|
242
250
|
- net_id
|
243
251
|
- name
|
@@ -246,26 +254,26 @@
|
|
246
254
|
- connection_limit
|
247
255
|
- port
|
248
256
|
:delete:
|
249
|
-
:
|
257
|
+
:keyreq:
|
250
258
|
- region
|
251
259
|
- lb_id
|
252
260
|
:info:
|
253
|
-
:
|
261
|
+
:keyreq:
|
254
262
|
- region
|
255
263
|
- lb_id
|
256
264
|
:member_add:
|
257
|
-
:
|
265
|
+
:keyreq:
|
258
266
|
- region
|
259
267
|
- lb_id
|
260
268
|
- ip
|
261
269
|
- port
|
262
270
|
:member_remove:
|
263
|
-
:
|
271
|
+
:keyreq:
|
264
272
|
- region
|
265
273
|
- lb_id
|
266
274
|
- member_id
|
267
275
|
:associate:
|
268
|
-
:
|
276
|
+
:keyreq:
|
269
277
|
- region
|
270
278
|
- lb_id
|
271
279
|
- ip
|
@@ -277,54 +285,54 @@
|
|
277
285
|
:check-list:
|
278
286
|
:check-types:
|
279
287
|
:check-add:
|
280
|
-
:
|
288
|
+
:keyreq:
|
281
289
|
- name
|
282
290
|
- type
|
283
291
|
- fail_count
|
284
292
|
- success_count
|
285
293
|
- check_interval
|
286
|
-
:
|
287
|
-
-
|
294
|
+
:keyrest:
|
295
|
+
- from_check_type
|
288
296
|
:check-remove:
|
289
|
-
:
|
297
|
+
:keyreq:
|
290
298
|
- check_id
|
291
299
|
:contact-list:
|
292
300
|
:contact-add:
|
293
301
|
:contact-remove:
|
294
|
-
:
|
302
|
+
:keyreq:
|
295
303
|
- type
|
296
304
|
- rel
|
297
305
|
:alert-list:
|
298
|
-
:
|
306
|
+
:keyreq:
|
299
307
|
- check_id
|
300
308
|
:alert-add:
|
301
|
-
:
|
309
|
+
:keyreq:
|
302
310
|
- check_id
|
303
311
|
- contact_id
|
304
312
|
:alert-remove:
|
305
|
-
:
|
313
|
+
:keyreq:
|
306
314
|
- alert_id
|
307
315
|
securitygroup:
|
308
316
|
:list:
|
309
317
|
:create:
|
310
|
-
:
|
318
|
+
:keyreq:
|
311
319
|
- region
|
312
320
|
- name
|
313
321
|
:delete:
|
314
|
-
:
|
322
|
+
:keyreq:
|
315
323
|
- region
|
316
324
|
- group_id
|
317
325
|
:rename:
|
318
|
-
:
|
326
|
+
:keyreq:
|
319
327
|
- region
|
320
328
|
- group_id
|
321
329
|
- name
|
322
330
|
:rule-list:
|
323
|
-
:
|
331
|
+
:keyreq:
|
324
332
|
- region
|
325
333
|
- group_id
|
326
334
|
:rule-insert:
|
327
|
-
:
|
335
|
+
:keyreq:
|
328
336
|
- region
|
329
337
|
- group_id
|
330
338
|
- direction
|
@@ -332,12 +340,12 @@ securitygroup:
|
|
332
340
|
- protocol
|
333
341
|
- remote_type
|
334
342
|
- remote_value
|
335
|
-
:
|
343
|
+
:key:
|
336
344
|
- port_min
|
337
345
|
- port_max
|
338
346
|
- label
|
339
347
|
:rule-delete:
|
340
|
-
:
|
348
|
+
:keyreq:
|
341
349
|
- region
|
342
350
|
- group_id
|
343
351
|
- rule_id
|
@@ -347,45 +355,45 @@ securitygroup:
|
|
347
355
|
:usage:
|
348
356
|
:domain-list:
|
349
357
|
:domain-add:
|
350
|
-
:
|
358
|
+
:keyreq:
|
351
359
|
- name
|
352
360
|
:domain-remove:
|
353
|
-
:
|
361
|
+
:keyreq:
|
354
362
|
- domain_id
|
355
363
|
:domain-dkim-set:
|
356
|
-
:
|
364
|
+
:keyreq:
|
357
365
|
- domain_id
|
358
366
|
- selector
|
359
367
|
- private_key
|
360
368
|
:domain-dkim-unset:
|
361
|
-
:
|
369
|
+
:keyreq:
|
362
370
|
- domain_id
|
363
371
|
:user-list:
|
364
|
-
:
|
372
|
+
:keyreq:
|
365
373
|
- domain_id
|
366
374
|
:user-add:
|
367
|
-
:
|
375
|
+
:keyreq:
|
368
376
|
- domain_id
|
369
377
|
- username
|
370
378
|
- password
|
371
379
|
:user-set-password:
|
372
|
-
:
|
380
|
+
:keyreq:
|
373
381
|
- domain_id
|
374
382
|
- user_id
|
375
383
|
- password
|
376
384
|
:user-remove:
|
377
|
-
:
|
385
|
+
:keyreq:
|
378
386
|
- domain_id
|
379
387
|
- user_id
|
380
388
|
:alias-list:
|
381
|
-
:
|
389
|
+
:keyreq:
|
382
390
|
- domain_id
|
383
391
|
:alias-add:
|
384
|
-
:
|
392
|
+
:keyreq:
|
385
393
|
- domain_id
|
386
394
|
- name
|
387
395
|
- target
|
388
396
|
:alias-remove:
|
389
|
-
:
|
397
|
+
:keyreq:
|
390
398
|
- domain_id
|
391
399
|
- alias_id
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: lunanode
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tim Bellefleur
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-02-
|
11
|
+
date: 2017-02-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rest-client
|
@@ -94,6 +94,20 @@ dependencies:
|
|
94
94
|
- - "~>"
|
95
95
|
- !ruby/object:Gem::Version
|
96
96
|
version: '0.10'
|
97
|
+
- !ruby/object:Gem::Dependency
|
98
|
+
name: reek
|
99
|
+
requirement: !ruby/object:Gem::Requirement
|
100
|
+
requirements:
|
101
|
+
- - "~>"
|
102
|
+
- !ruby/object:Gem::Version
|
103
|
+
version: '4.5'
|
104
|
+
type: :development
|
105
|
+
prerelease: false
|
106
|
+
version_requirements: !ruby/object:Gem::Requirement
|
107
|
+
requirements:
|
108
|
+
- - "~>"
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: '4.5'
|
97
111
|
- !ruby/object:Gem::Dependency
|
98
112
|
name: rubocop
|
99
113
|
requirement: !ruby/object:Gem::Requirement
|
@@ -108,6 +122,20 @@ dependencies:
|
|
108
122
|
- - "~>"
|
109
123
|
- !ruby/object:Gem::Version
|
110
124
|
version: '0.47'
|
125
|
+
- !ruby/object:Gem::Dependency
|
126
|
+
name: rubocop-rspec
|
127
|
+
requirement: !ruby/object:Gem::Requirement
|
128
|
+
requirements:
|
129
|
+
- - "~>"
|
130
|
+
- !ruby/object:Gem::Version
|
131
|
+
version: '1.10'
|
132
|
+
type: :development
|
133
|
+
prerelease: false
|
134
|
+
version_requirements: !ruby/object:Gem::Requirement
|
135
|
+
requirements:
|
136
|
+
- - "~>"
|
137
|
+
- !ruby/object:Gem::Version
|
138
|
+
version: '1.10'
|
111
139
|
description:
|
112
140
|
email:
|
113
141
|
- nomoon@phoebus.ca
|
@@ -131,6 +159,7 @@ files:
|
|
131
159
|
- Rakefile
|
132
160
|
- bin/console
|
133
161
|
- bin/setup
|
162
|
+
- config.reek
|
134
163
|
- lib/lunanode.rb
|
135
164
|
- lib/lunanode/action_generator.rb
|
136
165
|
- lib/lunanode/api.rb
|