lunanode 0.1.5 → 0.1.6

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 6cb25dc43d07fe6725275b15c5b10a48d4b8c0e7
4
- data.tar.gz: df01e9542eff9498a710ec7589d5b7d7474dbf31
3
+ metadata.gz: b4a86afa70afc9876d468543733644a5d6250c43
4
+ data.tar.gz: 653e08f16c13c01829deda1e1193a99b6a85d394
5
5
  SHA512:
6
- metadata.gz: e81cd909af5d0869cf64ef5892e616ca810f46ccc3d3e3ac87ece2cf325a065c3ce1ef95c689e6b617eef250e4fd4a39b244fd0c0751aaae0f595d12150324e0
7
- data.tar.gz: 147833acf55cb3287e971dfac65b51b8ce6db2f7fb56bd85bee0b9d93821775e4b478cf8b1e5b444ae6dd410d4e48584806de15fc1bdd5927423a955e72d3718
6
+ metadata.gz: ecb1f25922f283901cd4a2c97d17feda5754b8c9858f57d3bf1a5678be512e38ca534c366d995c16c1937e2fb172ea8c48939b8ba8f7478d99c54185f3e3327c
7
+ data.tar.gz: 989713bca6baddc11020910e6a982cc98ddb0415ca2071b239b99af6ab573631ffd71b5ba5bd73bacc4ce1967a6d0a7b2d016609cc214ef2e1742cd58a5367b1
data/README.md CHANGED
@@ -2,6 +2,8 @@
2
2
 
3
3
  [![Build Status](https://travis-ci.org/nomoon/lunanode.svg?branch=master)](https://travis-ci.org/nomoon/lunanode)
4
4
  [![Code Climate](https://codeclimate.com/github/nomoon/lunanode/badges/gpa.svg)](https://codeclimate.com/github/nomoon/lunanode)
5
+ [![Dependency Status](https://gemnasium.com/badges/github.com/nomoon/lunanode.svg)](https://gemnasium.com/github.com/nomoon/lunanode)
6
+ [![Gem Version](https://badge.fury.io/rb/lunanode.svg)](https://badge.fury.io/rb/lunanode)
5
7
 
6
8
  A basic implementation of the [Luna Node API](https://wiki.lunanode.com/index.php/API) for Ruby.
7
9
  **Unofficial and unsupported by the people at [Luna Node](https://lunanode.com).**
@@ -21,7 +21,7 @@ module Lunanode
21
21
  generate_categories(api_data)
22
22
  end
23
23
 
24
- UNSAFE_IDENTIFIER = /.{21,}|[^A-Za-z0-9_*]/
24
+ UNSAFE_IDENTIFIER = /.{21,}|[^A-Za-z0-9_*\-]/
25
25
 
26
26
  def module_name(name)
27
27
  if name.length > 3
@@ -93,8 +93,8 @@ module Lunanode
93
93
  param_list_sig = "(#{param_list_sig_arr.join(', ')})"
94
94
  end
95
95
 
96
- "def #{category}_#{action}#{param_list_sig}\n" \
97
- " action(:#{category}, :#{action}#{param_list_call})\n" \
96
+ "def #{category}_#{action.to_s.tr('-', '_')}#{param_list_sig}\n" \
97
+ " action(:#{category}, #{action.inspect}#{param_list_call})\n" \
98
98
  "end\n"
99
99
  end
100
100
 
@@ -12,43 +12,43 @@ module Lunanode
12
12
  end
13
13
 
14
14
  def dns_zone_list
15
- action(:dns, :zone_list)
15
+ action(:dns, :"zone-list")
16
16
  end
17
17
 
18
18
  def dns_zone_add(origin:, ttl: nil)
19
- action(:dns, :zone_add, origin: origin, ttl: ttl)
19
+ action(:dns, :"zone-add", origin: origin, ttl: ttl)
20
20
  end
21
21
 
22
22
  def dns_zone_remove(zone_id:)
23
- action(:dns, :zone_remove, zone_id: zone_id)
23
+ action(:dns, :"zone-remove", zone_id: zone_id)
24
24
  end
25
25
 
26
26
  def dns_record_list(zone_id:)
27
- action(:dns, :record_list, zone_id: zone_id)
27
+ action(:dns, :"record-list", zone_id: zone_id)
28
28
  end
29
29
 
30
30
  def dns_record_add(zone_id:, name:, data:, ttl:, type:)
31
- action(:dns, :record_add, zone_id: zone_id, name: name, data: data, ttl: ttl, type: type)
31
+ action(:dns, :"record-add", zone_id: zone_id, name: name, data: data, ttl: ttl, type: type)
32
32
  end
33
33
 
34
34
  def dns_record_remove(record_id:)
35
- action(:dns, :record_remove, record_id: record_id)
35
+ action(:dns, :"record-remove", record_id: record_id)
36
36
  end
37
37
 
38
38
  def dns_dyn_list
39
- action(:dns, :dyn_list)
39
+ action(:dns, :"dyn-list")
40
40
  end
41
41
 
42
42
  def dns_dyn_add(name:, ip:)
43
- action(:dns, :dyn_add, name: name, ip: ip)
43
+ action(:dns, :"dyn-add", name: name, ip: ip)
44
44
  end
45
45
 
46
46
  def dns_dyn_update(dyn_id:, name:, ip:)
47
- action(:dns, :dyn_update, dyn_id: dyn_id, name: name, ip: ip)
47
+ action(:dns, :"dyn-update", dyn_id: dyn_id, name: name, ip: ip)
48
48
  end
49
49
 
50
50
  def dns_dyn_remove(dyn_id:)
51
- action(:dns, :dyn_remove, dyn_id: dyn_id)
51
+ action(:dns, :"dyn-remove", dyn_id: dyn_id)
52
52
  end
53
53
  end
54
54
  end
@@ -8,51 +8,51 @@ module Lunanode
8
8
  end
9
9
 
10
10
  def email_domain_list
11
- action(:email, :domain_list)
11
+ action(:email, :"domain-list")
12
12
  end
13
13
 
14
14
  def email_domain_add(name:)
15
- action(:email, :domain_add, name: name)
15
+ action(:email, :"domain-add", name: name)
16
16
  end
17
17
 
18
18
  def email_domain_remove(domain_id:)
19
- action(:email, :domain_remove, domain_id: domain_id)
19
+ action(:email, :"domain-remove", domain_id: domain_id)
20
20
  end
21
21
 
22
22
  def email_domain_dkim_set(domain_id:, selector:, private_key:)
23
- action(:email, :domain_dkim_set, domain_id: domain_id, selector: selector, private_key: private_key)
23
+ action(:email, :"domain-dkim-set", domain_id: domain_id, selector: selector, private_key: private_key)
24
24
  end
25
25
 
26
26
  def email_domain_dkim_unset(domain_id:)
27
- action(:email, :domain_dkim_unset, domain_id: domain_id)
27
+ action(:email, :"domain-dkim-unset", domain_id: domain_id)
28
28
  end
29
29
 
30
30
  def email_user_list(domain_id:)
31
- action(:email, :user_list, domain_id: domain_id)
31
+ action(:email, :"user-list", domain_id: domain_id)
32
32
  end
33
33
 
34
34
  def email_user_add(domain_id:, username:, password:)
35
- action(:email, :user_add, domain_id: domain_id, username: username, password: password)
35
+ action(:email, :"user-add", domain_id: domain_id, username: username, password: password)
36
36
  end
37
37
 
38
38
  def email_user_set_password(domain_id:, user_id:, password:)
39
- action(:email, :user_set_password, domain_id: domain_id, user_id: user_id, password: password)
39
+ action(:email, :"user-set-password", domain_id: domain_id, user_id: user_id, password: password)
40
40
  end
41
41
 
42
42
  def email_user_remove(domain_id:, user_id:)
43
- action(:email, :user_remove, domain_id: domain_id, user_id: user_id)
43
+ action(:email, :"user-remove", domain_id: domain_id, user_id: user_id)
44
44
  end
45
45
 
46
46
  def email_alias_list(domain_id:)
47
- action(:email, :alias_list, domain_id: domain_id)
47
+ action(:email, :"alias-list", domain_id: domain_id)
48
48
  end
49
49
 
50
50
  def email_alias_add(domain_id:, name:, target:)
51
- action(:email, :alias_add, domain_id: domain_id, name: name, target: target)
51
+ action(:email, :"alias-add", domain_id: domain_id, name: name, target: target)
52
52
  end
53
53
 
54
54
  def email_alias_remove(domain_id:, alias_id:)
55
- action(:email, :alias_remove, domain_id: domain_id, alias_id: alias_id)
55
+ action(:email, :"alias-remove", domain_id: domain_id, alias_id: alias_id)
56
56
  end
57
57
  end
58
58
  end
@@ -4,43 +4,43 @@ module Lunanode
4
4
  module APIActions
5
5
  module Monitor
6
6
  def monitor_check_list
7
- action(:monitor, :check_list)
7
+ action(:monitor, :"check-list")
8
8
  end
9
9
 
10
10
  def monitor_check_types
11
- action(:monitor, :check_types)
11
+ action(:monitor, :"check-types")
12
12
  end
13
13
 
14
14
  def monitor_check_add(name:, type:, fail_count:, success_count:, check_interval:, **from_check_type)
15
- action(:monitor, :check_add, name: name, type: type, fail_count: fail_count, success_count: success_count, check_interval: check_interval, **from_check_type)
15
+ action(:monitor, :"check-add", name: name, type: type, fail_count: fail_count, success_count: success_count, check_interval: check_interval, **from_check_type)
16
16
  end
17
17
 
18
18
  def monitor_check_remove(check_id:)
19
- action(:monitor, :check_remove, check_id: check_id)
19
+ action(:monitor, :"check-remove", check_id: check_id)
20
20
  end
21
21
 
22
22
  def monitor_contact_list
23
- action(:monitor, :contact_list)
23
+ action(:monitor, :"contact-list")
24
24
  end
25
25
 
26
26
  def monitor_contact_add
27
- action(:monitor, :contact_add)
27
+ action(:monitor, :"contact-add")
28
28
  end
29
29
 
30
30
  def monitor_contact_remove(type:, rel:)
31
- action(:monitor, :contact_remove, type: type, rel: rel)
31
+ action(:monitor, :"contact-remove", type: type, rel: rel)
32
32
  end
33
33
 
34
34
  def monitor_alert_list(check_id:)
35
- action(:monitor, :alert_list, check_id: check_id)
35
+ action(:monitor, :"alert-list", check_id: check_id)
36
36
  end
37
37
 
38
38
  def monitor_alert_add(check_id:, contact_id:)
39
- action(:monitor, :alert_add, check_id: check_id, contact_id: contact_id)
39
+ action(:monitor, :"alert-add", check_id: check_id, contact_id: contact_id)
40
40
  end
41
41
 
42
42
  def monitor_alert_remove(alert_id:)
43
- action(:monitor, :alert_remove, alert_id: alert_id)
43
+ action(:monitor, :"alert-remove", alert_id: alert_id)
44
44
  end
45
45
  end
46
46
  end
@@ -20,15 +20,15 @@ module Lunanode
20
20
  end
21
21
 
22
22
  def securitygroup_rule_list(region:, group_id:)
23
- action(:securitygroup, :rule_list, region: region, group_id: group_id)
23
+ action(:securitygroup, :"rule-list", region: region, group_id: group_id)
24
24
  end
25
25
 
26
26
  def securitygroup_rule_insert(region:, group_id:, direction:, type:, protocol:, remote_type:, remote_value:, port_min: nil, port_max: nil, label: nil)
27
- action(:securitygroup, :rule_insert, region: region, group_id: group_id, direction: direction, type: type, protocol: protocol, remote_type: remote_type, remote_value: remote_value, port_min: port_min, port_max: port_max, label: label)
27
+ action(:securitygroup, :"rule-insert", region: region, group_id: group_id, direction: direction, type: type, protocol: protocol, remote_type: remote_type, remote_value: remote_value, port_min: port_min, port_max: port_max, label: label)
28
28
  end
29
29
 
30
30
  def securitygroup_rule_delete(region:, group_id:, rule_id:)
31
- action(:securitygroup, :rule_delete, region: region, group_id: group_id, rule_id: rule_id)
31
+ action(:securitygroup, :"rule-delete", region: region, group_id: group_id, rule_id: rule_id)
32
32
  end
33
33
  end
34
34
  end
@@ -44,11 +44,11 @@ module Lunanode
44
44
  end
45
45
 
46
46
  def vm_floatingip_add(vm_id:, ip: nil, private_ip: nil)
47
- action(:vm, :floatingip_add, vm_id: vm_id, ip: ip, private_ip: private_ip)
47
+ action(:vm, :"floatingip-add", vm_id: vm_id, ip: ip, private_ip: private_ip)
48
48
  end
49
49
 
50
50
  def vm_floatingip_delete(vm_id:, ip: nil, keep: nil)
51
- action(:vm, :floatingip_delete, vm_id: vm_id, ip: ip, keep: keep)
51
+ action(:vm, :"floatingip-delete", vm_id: vm_id, ip: ip, keep: keep)
52
52
  end
53
53
 
54
54
  def vm_iplist(vm_id:)
@@ -56,19 +56,19 @@ module Lunanode
56
56
  end
57
57
 
58
58
  def vm_ip_add(vm_id:, ip: nil)
59
- action(:vm, :ip_add, vm_id: vm_id, ip: ip)
59
+ action(:vm, :"ip-add", vm_id: vm_id, ip: ip)
60
60
  end
61
61
 
62
62
  def vm_ip_delete(vm_id:, ip:)
63
- action(:vm, :ip_delete, vm_id: vm_id, ip: ip)
63
+ action(:vm, :"ip-delete", vm_id: vm_id, ip: ip)
64
64
  end
65
65
 
66
66
  def vm_securitygroup_add(vm_id:, group_id:)
67
- action(:vm, :securitygroup_add, vm_id: vm_id, group_id: group_id)
67
+ action(:vm, :"securitygroup-add", vm_id: vm_id, group_id: group_id)
68
68
  end
69
69
 
70
70
  def vm_securitygroup_remove(vm_id:, group_id:)
71
- action(:vm, :securitygroup_remove, vm_id: vm_id, group_id: group_id)
71
+ action(:vm, :"securitygroup-remove", vm_id: vm_id, group_id: group_id)
72
72
  end
73
73
 
74
74
  def vm_create(hostname:, plan_id:, image_id:, region: nil, ip: nil, net_id: nil, securitygroups: nil, scripts: nil, volume_id: nil, volume_virtio: nil, key_id: nil, set_password: nil, affinity_group: nil)
@@ -32,15 +32,15 @@ module Lunanode
32
32
  end
33
33
 
34
34
  def volume_snapshot_create(region:, volume_id:, label:)
35
- action(:volume, :snapshot_create, region: region, volume_id: volume_id, label: label)
35
+ action(:volume, :"snapshot-create", region: region, volume_id: volume_id, label: label)
36
36
  end
37
37
 
38
38
  def volume_snapshot_delete(region:, snapshot_id:)
39
- action(:volume, :snapshot_delete, region: region, snapshot_id: snapshot_id)
39
+ action(:volume, :"snapshot-delete", region: region, snapshot_id: snapshot_id)
40
40
  end
41
41
 
42
42
  def volume_snapshot_list(region:)
43
- action(:volume, :snapshot_list, region: region)
43
+ action(:volume, :"snapshot-list", region: region)
44
44
  end
45
45
  end
46
46
  end
@@ -1,4 +1,4 @@
1
1
  # frozen_string_literal: true
2
2
  module Lunanode
3
- VERSION = "0.1.5".freeze
3
+ VERSION = "0.1.6".freeze
4
4
  end
@@ -31,13 +31,13 @@
31
31
  :vnc:
32
32
  :required:
33
33
  - vm_id
34
- :floatingip_add:
34
+ :floatingip-add:
35
35
  :required:
36
36
  - vm_id
37
37
  :optional:
38
38
  - ip
39
39
  - private_ip
40
- :floatingip_delete:
40
+ :floatingip-delete:
41
41
  :required:
42
42
  - vm_id
43
43
  :optional:
@@ -46,20 +46,20 @@
46
46
  :iplist:
47
47
  :required:
48
48
  - vm_id
49
- :ip_add:
49
+ :ip-add:
50
50
  :required:
51
51
  - vm_id
52
52
  :optional:
53
53
  - ip
54
- :ip_delete:
54
+ :ip-delete:
55
55
  :required:
56
56
  - vm_id
57
57
  - ip
58
- :securitygroup_add:
58
+ :securitygroup-add:
59
59
  :required:
60
60
  - vm_id
61
61
  - group_id
62
- :securitygroup_remove:
62
+ :securitygroup-remove:
63
63
  :required:
64
64
  - vm_id
65
65
  - group_id
@@ -100,39 +100,39 @@
100
100
  :required:
101
101
  - ip
102
102
  - hostname
103
- :zone_list:
104
- :zone_add:
103
+ :zone-list:
104
+ :zone-add:
105
105
  :required:
106
106
  - origin
107
107
  :optional:
108
108
  - ttl
109
- :zone_remove:
109
+ :zone-remove:
110
110
  :required:
111
111
  - zone_id
112
- :record_list:
112
+ :record-list:
113
113
  :required:
114
114
  - zone_id
115
- :record_add:
115
+ :record-add:
116
116
  :required:
117
117
  - zone_id
118
118
  - name
119
119
  - data
120
120
  - ttl
121
121
  - type
122
- :record_remove:
122
+ :record-remove:
123
123
  :required:
124
124
  - record_id
125
- :dyn_list:
126
- :dyn_add:
125
+ :dyn-list:
126
+ :dyn-add:
127
127
  :required:
128
128
  - name
129
129
  - ip
130
- :dyn_update:
130
+ :dyn-update:
131
131
  :required:
132
132
  - dyn_id
133
133
  - name
134
134
  - ip
135
- :dyn_remove:
135
+ :dyn-remove:
136
136
  :required:
137
137
  - dyn_id
138
138
  :image:
@@ -195,16 +195,16 @@
195
195
  - region
196
196
  - volume_id
197
197
  - size
198
- :snapshot_create:
198
+ :snapshot-create:
199
199
  :required:
200
200
  - region
201
201
  - volume_id
202
202
  - label
203
- :snapshot_delete:
203
+ :snapshot-delete:
204
204
  :required:
205
205
  - region
206
206
  - snapshot_id
207
- :snapshot_list:
207
+ :snapshot-list:
208
208
  :required:
209
209
  - region
210
210
  :floating:
@@ -274,9 +274,9 @@
274
274
  :region:
275
275
  :list:
276
276
  :monitor:
277
- :check_list:
278
- :check_types:
279
- :check_add:
277
+ :check-list:
278
+ :check-types:
279
+ :check-add:
280
280
  :required:
281
281
  - name
282
282
  - type
@@ -285,23 +285,23 @@
285
285
  - check_interval
286
286
  :optional:
287
287
  - "**from_check_type"
288
- :check_remove:
288
+ :check-remove:
289
289
  :required:
290
290
  - check_id
291
- :contact_list:
292
- :contact_add:
293
- :contact_remove:
291
+ :contact-list:
292
+ :contact-add:
293
+ :contact-remove:
294
294
  :required:
295
295
  - type
296
296
  - rel
297
- :alert_list:
297
+ :alert-list:
298
298
  :required:
299
299
  - check_id
300
- :alert_add:
300
+ :alert-add:
301
301
  :required:
302
302
  - check_id
303
303
  - contact_id
304
- :alert_remove:
304
+ :alert-remove:
305
305
  :required:
306
306
  - alert_id
307
307
  securitygroup:
@@ -319,11 +319,11 @@ securitygroup:
319
319
  - region
320
320
  - group_id
321
321
  - name
322
- :rule_list:
322
+ :rule-list:
323
323
  :required:
324
324
  - region
325
325
  - group_id
326
- :rule_insert:
326
+ :rule-insert:
327
327
  :required:
328
328
  - region
329
329
  - group_id
@@ -336,7 +336,7 @@ securitygroup:
336
336
  - port_min
337
337
  - port_max
338
338
  - label
339
- :rule_delete:
339
+ :rule-delete:
340
340
  :required:
341
341
  - region
342
342
  - group_id
@@ -345,47 +345,47 @@ securitygroup:
345
345
  :list:
346
346
  :email:
347
347
  :usage:
348
- :domain_list:
349
- :domain_add:
348
+ :domain-list:
349
+ :domain-add:
350
350
  :required:
351
351
  - name
352
- :domain_remove:
352
+ :domain-remove:
353
353
  :required:
354
354
  - domain_id
355
- :domain_dkim_set:
355
+ :domain-dkim-set:
356
356
  :required:
357
357
  - domain_id
358
358
  - selector
359
359
  - private_key
360
- :domain_dkim_unset:
360
+ :domain-dkim-unset:
361
361
  :required:
362
362
  - domain_id
363
- :user_list:
363
+ :user-list:
364
364
  :required:
365
365
  - domain_id
366
- :user_add:
366
+ :user-add:
367
367
  :required:
368
368
  - domain_id
369
369
  - username
370
370
  - password
371
- :user_set_password:
371
+ :user-set-password:
372
372
  :required:
373
373
  - domain_id
374
374
  - user_id
375
375
  - password
376
- :user_remove:
376
+ :user-remove:
377
377
  :required:
378
378
  - domain_id
379
379
  - user_id
380
- :alias_list:
380
+ :alias-list:
381
381
  :required:
382
382
  - domain_id
383
- :alias_add:
383
+ :alias-add:
384
384
  :required:
385
385
  - domain_id
386
386
  - name
387
387
  - target
388
- :alias_remove:
388
+ :alias-remove:
389
389
  :required:
390
390
  - domain_id
391
391
  - alias_id
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lunanode
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.5
4
+ version: 0.1.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tim Bellefleur