squall 1.3.0 → 1.3.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (70) hide show
  1. checksums.yaml +7 -0
  2. data/LICENSE +1 -1
  3. data/README.md +64 -41
  4. data/Rakefile +3 -9
  5. data/lib/squall/data_store_zone.rb +20 -26
  6. data/lib/squall/disk.rb +174 -0
  7. data/lib/squall/firewall_rule.rb +34 -41
  8. data/lib/squall/hypervisor.rb +40 -38
  9. data/lib/squall/hypervisor_zone.rb +51 -63
  10. data/lib/squall/ip_address.rb +32 -37
  11. data/lib/squall/ip_address_join.rb +13 -22
  12. data/lib/squall/network.rb +36 -33
  13. data/lib/squall/network_zone.rb +27 -29
  14. data/lib/squall/payment.rb +22 -32
  15. data/lib/squall/role.rb +30 -37
  16. data/lib/squall/statistic.rb +3 -1
  17. data/lib/squall/support/base.rb +35 -31
  18. data/lib/squall/support/config.rb +25 -1
  19. data/lib/squall/support/version.rb +1 -1
  20. data/lib/squall/template.rb +7 -5
  21. data/lib/squall/transaction.rb +6 -4
  22. data/lib/squall/user.rb +84 -83
  23. data/lib/squall/user_group.rb +17 -30
  24. data/lib/squall/virtual_machine.rb +154 -178
  25. data/lib/squall/whitelist.rb +29 -40
  26. data/lib/squall.rb +27 -25
  27. data/spec/spec_helper.rb +6 -11
  28. data/spec/squall/data_store_zone_spec.rb +2 -20
  29. data/spec/squall/disk_spec.rb +189 -0
  30. data/spec/squall/firewall_rule_spec.rb +2 -32
  31. data/spec/squall/hypervisor_spec.rb +3 -47
  32. data/spec/squall/hypervisor_zone_spec.rb +3 -28
  33. data/spec/squall/ip_address_join_spec.rb +1 -15
  34. data/spec/squall/ip_address_spec.rb +10 -35
  35. data/spec/squall/network_spec.rb +20 -31
  36. data/spec/squall/network_zone_spec.rb +2 -36
  37. data/spec/squall/payment_spec.rb +2 -21
  38. data/spec/squall/role_spec.rb +4 -16
  39. data/spec/squall/support/base_spec.rb +10 -16
  40. data/spec/squall/template_spec.rb +0 -4
  41. data/spec/squall/transaction_spec.rb +1 -3
  42. data/spec/squall/user_group_spec.rb +1 -17
  43. data/spec/squall/user_spec.rb +4 -92
  44. data/spec/squall/virtual_machine_spec.rb +8 -242
  45. data/spec/squall/whitelist_spec.rb +2 -40
  46. data/spec/squall_spec.rb +2 -2
  47. data/spec/vcr_cassettes/disk/add_schedule.yml +40 -0
  48. data/spec/vcr_cassettes/disk/auto_backup_off.yml +40 -0
  49. data/spec/vcr_cassettes/disk/auto_backup_on.yml +40 -0
  50. data/spec/vcr_cassettes/disk/backups.yml +40 -0
  51. data/spec/vcr_cassettes/disk/build.yml +40 -0
  52. data/spec/vcr_cassettes/disk/create.yml +40 -0
  53. data/spec/vcr_cassettes/disk/delete.yml +38 -0
  54. data/spec/vcr_cassettes/disk/edit.yml +40 -0
  55. data/spec/vcr_cassettes/disk/iops_usage.yml +40 -0
  56. data/spec/vcr_cassettes/disk/list.yml +40 -0
  57. data/spec/vcr_cassettes/disk/migrate.yml +38 -0
  58. data/spec/vcr_cassettes/disk/schedules.yml +40 -0
  59. data/spec/vcr_cassettes/disk/unlock.yml +40 -0
  60. data/spec/vcr_cassettes/disk/vm_disk_list.yml +40 -0
  61. data/spec/vcr_cassettes/network/rebuild.yml +41 -0
  62. metadata +217 -66
  63. data/.gitignore +0 -13
  64. data/.rspec +0 -2
  65. data/.rvmrc +0 -41
  66. data/.travis.yml +0 -17
  67. data/lib/squall/support/params.rb +0 -50
  68. data/lib/squall/support/yaml.rb +0 -5
  69. data/spec/squall/support/params_spec.rb +0 -195
  70. data/squall.gemspec +0 -32
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: e4e877b7b98d79a741107b805282e235e4f18a7b
4
+ data.tar.gz: 0d74e4d6ab3b2765e7c60f488e353f97b575965c
5
+ SHA512:
6
+ metadata.gz: 5ae37aad74e9d15a958c9bd1524c8c72a63fd0971bd16bebea5c62ed1fbcef551be04d58153329f6df2eff4de67ca27806816a570adae97b07559a269668fa21
7
+ data.tar.gz: 29ddbec2e6e0de8af682dc088fad4df8fb07c0b92e946b154b526e4cdbdcd43876b62421d0eb9adc82e003ea8cb25c107063c2bb1d8355517a9e314e8694e398
data/LICENSE CHANGED
@@ -1,4 +1,4 @@
1
- Copyright (c) 2011 Site5.com <http://www.site5.com/>
1
+ Copyright (c) 2010-2014 Site5.com <http://www.site5.com/>
2
2
 
3
3
  Permission is hereby granted, free of charge, to any person obtaining
4
4
  a copy of this software and associated documentation files (the
data/README.md CHANGED
@@ -3,21 +3,31 @@ Squall [![Squall Build Status][Build Icon]][Build Status]
3
3
 
4
4
  A Ruby library for working with the [OnApp REST API][].
5
5
 
6
- Squall has been tested on MRI 1.8.7, MRI 1.9.2, MRI 1.9.3 Preview 1,
7
- Rubinius 2.0.0pre, and JRuby 1.6.2.
6
+ Squall has been tested on MRI versions 1.9.2, 1.9.3, 2.0.0 and 1.9-compatible
7
+ JRuby.
8
8
 
9
- Documentation is available in [RDoc][] format.
9
+ Documentation is available in [TomDoc][] format.
10
10
 
11
11
  [Build Status]: http://travis-ci.org/site5/squall
12
12
  [Build Icon]: https://secure.travis-ci.org/site5/squall.png?branch=master
13
- [OnApp REST API]: https://help.onapp.com/manual.php?m=2
14
- [RDoc]: http://rdoc.info/github/site5/squall/master/frames
13
+ [OnApp REST API]: http://onapp.com/cloud/technology/api/
14
+ [TomDoc]: http://site5.github.io/squall/
15
15
 
16
16
  Install
17
17
  -------
18
18
 
19
- gem install squall
20
- bundle install
19
+ To install Squall using [Bundler](http://bundler.io):
20
+
21
+ ```
22
+ echo "gem 'squall'" >> Gemfile
23
+ bundle install
24
+ ```
25
+
26
+ To install Squall globally using RubyGems:
27
+
28
+ ```
29
+ gem install squall
30
+ ```
21
31
 
22
32
  Configuration
23
33
  -------------
@@ -26,30 +36,38 @@ You have two main options for configuring Squall.
26
36
 
27
37
  Directly in a config block:
28
38
 
29
- require 'squall'
39
+ ```ruby
40
+ require 'squall'
30
41
 
31
- Squall.config do |c|
32
- c.base_uri 'https://onappurl.com' # Root level URI for OnApp instance
33
- c.username 'username' # OnApp username
34
- c.password 'topsecret' # OnApp password
35
- c.debug true # Toggle HTTParty debugging (prints to $stderr)
36
- end
42
+ Squall.config do |c|
43
+ c.base_uri 'https://onappurl.com' # Root level URI for OnApp instance
44
+ c.username 'username' # OnApp username
45
+ c.password 'topsecret' # OnApp password
46
+ c.debug true # Toggle HTTP/Faraday debugging (prints to $stderr)
47
+ end
48
+ ```
37
49
 
38
50
  Squall can load configuration from a yaml file:
39
51
 
40
- # .squall.yml
41
- base_uri: 'https://onappurl.com'
42
- username: 'username'
43
- password: 'topsecret'
44
- debug: false
52
+ ```yaml
53
+ # .squall.yml
54
+ base_uri: 'https://onappurl.com'
55
+ username: 'username'
56
+ password: 'topsecret'
57
+ debug: false
58
+ ```
45
59
 
46
60
  To load it (by default it assumes ~/.squall.yml):
47
61
 
48
- Squall.config_file(/[path]/[to]/.squall.yml)
62
+ ```ruby
63
+ Squall.config_file("/path/to/.squall.yml")
64
+ ```
49
65
 
50
66
  It is also possible to change individual configuration settings on the fly.
51
67
 
52
- Squall.configuration.debug(true)
68
+ ```ruby
69
+ Squall.configuration.debug(true)
70
+ ```
53
71
 
54
72
  Note: you will need to re-instantiate all modules after changing Squall's configuration.
55
73
 
@@ -58,25 +76,29 @@ Usage
58
76
 
59
77
  Show the info for a VM:
60
78
 
61
- vm = Squall::VirtualMachine.new
62
- vm.show 1
79
+ ```ruby
80
+ vm = Squall::VirtualMachine.new
81
+ vm.show 1
82
+ ```
63
83
 
64
84
  Create a new VM:
65
85
 
66
- vm = Squall::VirtualMachine.new
86
+ ```ruby
87
+ vm = Squall::VirtualMachine.new
67
88
 
68
- params = {
69
- :label => 'testmachine',
70
- :hypervisor_id => 5,
71
- :hostname => 'testmachine',
72
- :memory => 512,
73
- :cpus => 1,
74
- :cpu_shares => 10,
75
- :primary_disk_size => 10,
76
- :template_id => 1
77
- }
89
+ params = {
90
+ label: 'testmachine',
91
+ hypervisor_id: 5,
92
+ hostname: 'testmachine',
93
+ memory: 512,
94
+ cpus: 1,
95
+ cpu_shares: 10,
96
+ primary_disk_size: 10,
97
+ template_id: 1
98
+ }
78
99
 
79
- vm.create params
100
+ vm.create params
101
+ ```
80
102
 
81
103
  Supported Methods
82
104
  -----------------
@@ -101,13 +123,13 @@ The following OnApp modules have been added:
101
123
  * Transactions
102
124
  * Virtual machines
103
125
  * Whitelists
126
+ * Disks
104
127
 
105
128
  The following still need to be added:
106
129
 
107
130
  * Billing plans
108
131
  * Currencies
109
132
  * Network interfaces
110
- * Disks
111
133
  * Template groups
112
134
  * Software licenses
113
135
  * Resolvers
@@ -129,8 +151,10 @@ Tests
129
151
 
130
152
  Squall uses rspec for tests. To run:
131
153
 
132
- bundle exec rake # Runs all tests
133
- bundle exec rspec spec/squall/[module]_spec.rb # Runs tests for a specific module
154
+ ```
155
+ bundle exec rake # Runs all tests
156
+ bundle exec rspec spec/squall/[module]_spec.rb # Runs tests for a specific module
157
+ ```
134
158
 
135
159
  Squall uses [VCR](https://github.com/myronmarston/vcr) to cache server
136
160
  responses to test against. To test via live http connections, pass RERECORD=1
@@ -142,8 +166,7 @@ Known issues:
142
166
 
143
167
  1. VirtualMachine#change_user currently breaks the parser on an invalid
144
168
  user_id because OnApp returns html instead of JSON
145
- 2. VirtualMachine#create is currently broken in certain cases. See
146
- <https://help.onapp.com/kb_article.php?s=0b397f5b851334cea54da9ddd829bf5f&ref=8181-TYFH-8069>
169
+ 2. VirtualMachine#create is currently broken in certain cases.
147
170
  3. FirewallRule#edit and #create break the parser by returning invalid JSON
148
171
 
149
172
  Note on Patches/Pull Requests
@@ -161,4 +184,4 @@ Note on Patches/Pull Requests
161
184
  Copyright
162
185
  ---------
163
186
 
164
- Copyright (c) 2012 Site5.com. See LICENSE for details.
187
+ Copyright (c) 2010-2014 Site5.com. See LICENSE for details.
data/Rakefile CHANGED
@@ -1,18 +1,12 @@
1
- require 'bundler'
2
- require 'uri'
3
1
  begin
2
+ require 'bundler/gem_tasks'
4
3
  require 'rspec/core/rake_task'
4
+ require 'rake-tomdoc' unless RUBY_PLATFORM == 'java'
5
5
  rescue LoadError
6
- puts "Please install rspec (bundle install)"
7
- exit
6
+ abort "Please run `bundle install` first"
8
7
  end
9
8
 
10
9
  RSpec::Core::RakeTask.new :spec
11
10
  Bundler::GemHelper.install_tasks
12
11
 
13
- desc "Open an irb session preloaded with this library"
14
- task :console do
15
- sh "irb -rubygems -r ./lib/squall.rb -I ./lib"
16
- end
17
-
18
12
  task :default => [:spec]
@@ -1,56 +1,50 @@
1
1
  module Squall
2
2
  # OnApp DataStoreZone
3
3
  class DataStoreZone < Base
4
- # Returns a list of data store zones
4
+ # Public: List data store zones.
5
+ #
6
+ # Returns an Array.
5
7
  def list
6
8
  response = request(:get, "/data_store_zones.json")
7
9
  response.collect { |i| i['data_store_group'] }
8
10
  end
9
11
 
10
- # Get the details for a data store zone
12
+ # Public: Get the details for a data store zone.
11
13
  #
12
- # ==== Params
14
+ # id - ID of the data store zone
13
15
  #
14
- # * +id+ - ID of the data store zone
16
+ # Returns a Hash.
15
17
  def show(id)
16
18
  response = request(:get, "/data_store_zones/#{id}.json")
17
19
  response['data_store_group']
18
20
  end
19
21
 
20
- # Updates an existing data store zone
21
- #
22
- # ==== Params
23
- #
24
- # * +id+ - ID of the data store zone
25
- # * +options+ - Params for the data store zone
22
+ # Public: Updates an existing data store zone.
26
23
  #
27
- # ==== Options
24
+ # id - ID of the data store zone
25
+ # options - Params for the data store zone:
26
+ # :label - Label for the data store zone
28
27
  #
29
- # * +label*+ - Label for the data store zone
28
+ # Returns an empty Hash.
30
29
  def edit(id, options = {})
31
- params.required(:label).validate!(options)
32
- response = request(:put, "/data_store_zones/#{id}.json", :query => {:pack => options})
30
+ request(:put, "/data_store_zones/#{id}.json", query: { pack: options })
33
31
  end
34
32
 
35
- # Creates a new DataStoreZone
36
- #
37
- # ==== Params
38
- #
39
- # * +options+ - Params for the data store zone
33
+ # Public: Creates a new DataStoreZone.
40
34
  #
41
- # ==== Options
35
+ # options - Params for the data store zone:
36
+ # :label - Label for the data store zone
42
37
  #
43
- # * +label*+ - Label for the data store zone
38
+ # Returns a Hash.
44
39
  def create(options = {})
45
- params.required(:label).validate!(options)
46
- response = request(:post, "/data_store_zones.json", :query => {:pack => options})
40
+ request(:post, "/data_store_zones.json", query: { pack: options })
47
41
  end
48
42
 
49
- # Deletes an existing DataStoreZone
43
+ # Public: Deletes an existing DataStoreZone.
50
44
  #
51
- # ==== Params
45
+ # id - ID of the data store zone
52
46
  #
53
- # * +id+ - ID of the data store zone
47
+ # Returns an empty Hash.
54
48
  def delete(id)
55
49
  request(:delete, "/data_store_zones/#{id}.json")
56
50
  end
@@ -0,0 +1,174 @@
1
+ module Squall
2
+ # OnApp Disk
3
+ class Disk < Base
4
+ # Public: List all disks.
5
+ #
6
+ # Returns an Array.
7
+ def list
8
+ response = request(:get, "/settings/disks.json")
9
+ response.collect { |i| i['disk'] }
10
+ end
11
+
12
+ # Public: List all disks available for a particular VM.
13
+ #
14
+ # id - ID of the virtual machine
15
+ #
16
+ # Returns an Array.
17
+ def vm_disk_list(id)
18
+ response = request(:get, "/virtual_machines/#{id}/disks.json")
19
+ response.collect { |i| i['disk'] }
20
+ end
21
+
22
+ # Public: Creates a new Disk.
23
+ #
24
+ # id - ID of the virtual machine
25
+ # options - Params for the disk:
26
+ # :add_to_linux_fstab - Set true to add
27
+ # :data_store_id - The ID of a data store where this disk is
28
+ # located
29
+ # :disk_size - The disk space in GB
30
+ # :is_swap - Set true if this is a swap disk
31
+ # :mount_point - a physical location in the partition used
32
+ # as a root filesystem
33
+ # :require_format_disk – set true to format disk
34
+ #
35
+ # Example
36
+ #
37
+ # create(
38
+ # add_to_linux_fstab: 1,
39
+ # data_store_id: 1,
40
+ # disk_size: 10,
41
+ # is_swap: 0,
42
+ # mount_point: '/disk2',
43
+ # require_format_disk: 1
44
+ # )
45
+ #
46
+ # Returns a Hash.
47
+ def create(id, options = {})
48
+ request(:post, "/virtual_machines/#{id}/disks.json", default_params(options))
49
+ end
50
+
51
+ # Public: Updates an existing disk.
52
+ #
53
+ # id - ID of the disk
54
+ # options - Params for the disk
55
+ # :disk_size - The disk space in GB
56
+ #
57
+ # Returns a Hash.
58
+ def edit(id, options = {})
59
+ request(:put, "/settings/disks/#{id}.json", default_params(options))
60
+ end
61
+
62
+ # Public: Migrates a VM disk to another data store.
63
+ #
64
+ # vm_id - ID of the virtual machine
65
+ # id - ID of the disk
66
+ # options - Params for the disk
67
+ # :data_store_id - The disk space in GB
68
+ #
69
+ # Returns a Hash.
70
+ def migrate(vm_id, id, options = {})
71
+ request(:post, "/virtual_machines/#{vm_id}/disks/#{id}/migrate.json", default_params(options))
72
+ end
73
+
74
+ # Public: View Input/Output statistics for a disk.
75
+ #
76
+ # id - ID of the disk
77
+ #
78
+ # Returns an Array
79
+ def iops_usage(id)
80
+ response = request(:get, "/settings/disks/#{id}/usage.json")
81
+ response.collect { |i| i['disk_hourly_stat'] }
82
+ end
83
+
84
+ # Public: Builds a disk.
85
+ #
86
+ # id - ID of the disk
87
+ #
88
+ # Returns a Hash.
89
+ def build(id)
90
+ response = request(:post, "/settings/disks/#{id}/build.json")
91
+ response['disk']
92
+ end
93
+
94
+ # Public: Unlock a disk.
95
+ #
96
+ # id - ID of the disk
97
+ #
98
+ # Returns a Hash.
99
+ def unlock(id)
100
+ response = request(:post, "/settings/disks/#{id}/unlock.json")
101
+ response['disk']
102
+ end
103
+
104
+ # Public: Enable autobackups for a disk.
105
+ #
106
+ # id - ID of the disk
107
+ #
108
+ # Returns a Hash.
109
+ def auto_backup_on(id)
110
+ response = request(:post, "/settings/disks/#{id}/autobackup_enable.json")
111
+ response['disk']
112
+ end
113
+
114
+ # Public: Disable autobackups for a disk
115
+ #
116
+ # id - ID of the disk
117
+ #
118
+ # Returns a Hash.
119
+ def auto_backup_off(id)
120
+ response = request(:post, "/settings/disks/#{id}/autobackup_disable.json")
121
+ response['disk']
122
+ end
123
+
124
+ # Public: Get the list of schedules for a disk.
125
+ #
126
+ # id - ID of the disk
127
+ #
128
+ # Returns an Array.
129
+ def schedules(id)
130
+ response = request(:get, "/settings/disks/#{id}/schedules.json")
131
+ response.collect { |i| i['schedule'] }
132
+ end
133
+
134
+ # Public: Add autobackup schedule to a disk
135
+ #
136
+ # id - ID of the disk
137
+ # options - Params for the disk
138
+ # :action - set Autobackup to add a backup schedule
139
+ # :duration - specify duration
140
+ # :period - set the period (days|weeks|months|years)
141
+ #
142
+ # Example
143
+ #
144
+ # params = {
145
+ # action: 'autobackup',
146
+ # duration: 10,
147
+ # period: days
148
+ # }
149
+ #
150
+ # Returns an Array.
151
+ def add_schedule(id, options = {})
152
+ request(:post, "/settings/disks/#{id}/schedules.json", default_params(options))
153
+ end
154
+
155
+ # Public: List backups available for a disk.
156
+ #
157
+ # id - ID of the disk
158
+ #
159
+ # Returns an Array.
160
+ def backups(id)
161
+ response = request(:get, "/settings/disks/#{id}/backups.json")
162
+ response.collect { |i| i['backup'] }
163
+ end
164
+
165
+ # Public: Delete a disk.
166
+ #
167
+ # id - ID of the disk
168
+ #
169
+ # Returns a Hash.
170
+ def delete(id)
171
+ request(:delete, "/settings/disks/#{id}.json")
172
+ end
173
+ end
174
+ end
@@ -1,66 +1,59 @@
1
1
  module Squall
2
2
  # OnApp FirewallRule
3
3
  class FirewallRule < Base
4
-
5
- # Return a list of all firewall rules for a virtual machine
4
+ # Public: Lists all firewall rules for a virtual machine.
6
5
  #
7
- # ==== Params
6
+ # vm_id - ID of the virtual machine
8
7
  #
9
- # * +vm_id*+ - ID of the virtual machine
8
+ # Returns an Array.
10
9
  def list(vm_id)
11
10
  response = request(:get, "/virtual_machines/#{vm_id}/firewall_rules.json")
12
11
  response.collect { |firewall_rule| user['firewall_rule'] }
13
12
  end
14
13
 
15
- # Create a firewall rule for a virtual machine
16
- #
17
- # ==== Params
18
- #
19
- # * +vm_id*+ - ID of the virtual machine
20
- #
21
- # ==== Options
22
- #
23
- # * +command*+ - DROP or ACCEPT
24
- # * +protocol*+ - TCP or UDP
25
- # * +network_interface_id*+ - ID of the network interface
26
- # * +address+ - IP address or range scope for rule. Leave blank to apply to all.
27
- # * +port+ - Port address for rule
28
- #
29
- # ==== Example
30
- #
31
- # create :command => "DROP",
32
- # :protocol => "TCP",
33
- # :network_interface_id => 1
34
- def create(vm_id, options={})
35
- params.required(:command, :protocol, :network_interface_id).accepts(:address, :port).validate!(options)
14
+ # Public: Create a firewall rule for a virtual machine.
15
+ #
16
+ # vm_id - ID of the virtual machine
17
+ # options - A Hash of options for the firewall rule:
18
+ # :address - IP address or range scope for rule.
19
+ # Leave blank to apply to all.
20
+ # :command - DROP or ACCEPT
21
+ # :network_interface_id - ID of the network interface
22
+ # :port - Port address for rule
23
+ # :protocol - TCP or UDP
24
+ #
25
+ # Example
26
+ #
27
+ # create(
28
+ # command: "DROP",
29
+ # protocol "TCP",
30
+ # network_interface_id: 1
31
+ # )
32
+ #
33
+ # Returns a Hash.
34
+ def create(vm_id, options = {})
36
35
  request(:post, "/virtual_machines/#{vm_id}/firewall_rules.json", default_params(options))
37
36
  end
38
37
 
39
- # Edit a firewall rule
40
- #
41
- # ==== Params
38
+ # Public: Edit a firewall rule.
42
39
  #
43
- # * +vm_id+ - ID of the virtual machine
44
- # * +id+ - ID of the firewall rule
45
- # * +options+ - Options for the firewall rule.
40
+ # vm_id - ID of the virtual machine
41
+ # id - ID of the firewall rule
42
+ # options - A Hash of options for the firewall rule, see `#create`.
46
43
  #
47
- # ==== Options
48
- #
49
- # See #create
50
- def edit(vm_id, id, options={})
51
- params.accepts(:command, :protocol, :network_interface_id, :address, :port).validate!(options)
44
+ # Returns a Hash.
45
+ def edit(vm_id, id, options = {})
52
46
  request(:put, "/virtual_machines/#{vm_id}/firewall_rules/#{id}.json", default_params(options))
53
47
  end
54
48
 
55
- # Delete a firewall rule
49
+ # Public: Delete a firewall rule.
56
50
  #
57
- # ==== Params
51
+ # vm_id - ID of the virtual machine
52
+ # id - ID of the firewall rule
58
53
  #
59
- # * +vm_id*+ - ID of the virtual machine
60
- # * +id+ - ID of the firewall rule
54
+ # Returns a Hash.
61
55
  def delete(vm_id, id)
62
56
  request(:delete, "/virtual_machines/#{vm_id}/firewall_rules/#{id}.json")
63
57
  end
64
-
65
58
  end
66
59
  end