fog-maestrodev 1.18.0.20131121075022 → 1.18.0.20131122203507

Sign up to get free protection for your applications and to get access to all the features.
Files changed (108) hide show
  1. checksums.yaml +8 -8
  2. data/fog.gemspec +2 -2
  3. data/lib/fog/aws/models/auto_scaling/configuration.rb +1 -0
  4. data/lib/fog/aws/models/compute/flavors.rb +10 -0
  5. data/lib/fog/aws/models/glacier/vault.rb +1 -1
  6. data/lib/fog/aws/parsers/auto_scaling/describe_launch_configurations.rb +3 -0
  7. data/lib/fog/aws/requests/auto_scaling/create_launch_configuration.rb +1 -0
  8. data/lib/fog/aws/requests/dns/get_change.rb +1 -1
  9. data/lib/fog/aws/storage.rb +2 -1
  10. data/lib/fog/core/errors.rb +3 -3
  11. data/lib/fog/dreamhost/dns.rb +2 -4
  12. data/lib/fog/google/compute.rb +72 -62
  13. data/lib/fog/google/models/compute/zones.rb +1 -1
  14. data/lib/fog/google/requests/compute/delete_disk.rb +19 -2
  15. data/lib/fog/google/requests/compute/delete_server.rb +3 -3
  16. data/lib/fog/google/requests/compute/get_disk.rb +26 -2
  17. data/lib/fog/google/requests/compute/get_image.rb +3 -3
  18. data/lib/fog/google/requests/compute/get_server.rb +1 -0
  19. data/lib/fog/google/requests/compute/insert_disk.rb +37 -2
  20. data/lib/fog/google/requests/compute/insert_firewall.rb +2 -1
  21. data/lib/fog/google/requests/compute/insert_image.rb +1 -1
  22. data/lib/fog/google/requests/compute/insert_server.rb +31 -22
  23. data/lib/fog/google/requests/compute/list_disks.rb +8 -2
  24. data/lib/fog/google/requests/compute/list_images.rb +2 -2
  25. data/lib/fog/google/requests/compute/list_machine_types.rb +2 -2
  26. data/lib/fog/google/requests/compute/list_servers.rb +2 -2
  27. data/lib/fog/google/requests/compute/list_zone_operations.rb +1 -1
  28. data/lib/fog/google/requests/compute/list_zones.rb +1 -1
  29. data/lib/fog/hp.rb +1 -1
  30. data/lib/fog/hp/README.md +57 -0
  31. data/lib/fog/hp/articles/auth_caching.md +23 -0
  32. data/lib/fog/hp/docs/connect.md +152 -0
  33. data/lib/fog/hp/docs/install.md +133 -0
  34. data/lib/fog/hp/examples/block_storage.md +296 -0
  35. data/lib/fog/hp/examples/block_storage_v2.md +446 -0
  36. data/lib/fog/hp/examples/cdn.md +54 -0
  37. data/lib/fog/hp/examples/compute.md +794 -0
  38. data/lib/fog/hp/examples/compute_v2.md +848 -0
  39. data/lib/fog/hp/examples/getting_started_examples.md +30 -0
  40. data/lib/fog/hp/examples/networking.md +472 -0
  41. data/lib/fog/hp/examples/object_storage.md +387 -0
  42. data/lib/fog/json.rb +6 -3
  43. data/lib/fog/openstack/identity.rb +2 -3
  44. data/lib/fog/openstack/image.rb +1 -4
  45. data/lib/fog/openstack/metering.rb +1 -4
  46. data/lib/fog/openstack/network.rb +1 -3
  47. data/lib/fog/openstack/requests/compute/add_flavor_access.rb +1 -1
  48. data/lib/fog/openstack/requests/compute/allocate_address.rb +1 -1
  49. data/lib/fog/openstack/requests/compute/attach_volume.rb +1 -1
  50. data/lib/fog/openstack/requests/compute/boot_from_snapshot.rb +1 -1
  51. data/lib/fog/openstack/requests/compute/create_flavor.rb +1 -1
  52. data/lib/fog/openstack/requests/compute/create_key_pair.rb +1 -1
  53. data/lib/fog/openstack/requests/compute/create_security_group.rb +1 -1
  54. data/lib/fog/openstack/requests/compute/create_security_group_rule.rb +1 -1
  55. data/lib/fog/openstack/requests/compute/create_volume.rb +1 -1
  56. data/lib/fog/openstack/requests/compute/create_volume_snapshot.rb +1 -1
  57. data/lib/fog/openstack/requests/compute/list_tenants.rb +1 -1
  58. data/lib/fog/openstack/requests/compute/remove_flavor_access.rb +1 -1
  59. data/lib/fog/openstack/requests/compute/update_quota.rb +1 -1
  60. data/lib/fog/openstack/requests/identity/create_ec2_credential.rb +1 -1
  61. data/lib/fog/openstack/requests/identity/create_role.rb +1 -1
  62. data/lib/fog/openstack/requests/identity/create_user.rb +1 -1
  63. data/lib/fog/openstack/requests/identity/update_user.rb +1 -1
  64. data/lib/fog/openstack/requests/image/update_image_members.rb +1 -1
  65. data/lib/fog/openstack/requests/orchestration/create_stack.rb +2 -2
  66. data/lib/fog/openstack/requests/orchestration/update_stack.rb +1 -1
  67. data/lib/fog/openstack/requests/volume/create_volume.rb +1 -1
  68. data/lib/fog/openstack/requests/volume/create_volume_snapshot.rb +1 -1
  69. data/lib/fog/openstack/volume.rb +1 -4
  70. data/lib/fog/rackspace/compute_v2.rb +1 -0
  71. data/lib/fog/rackspace/examples/queues/claim_messages.rb +60 -0
  72. data/lib/fog/rackspace/examples/queues/create_queue.rb +45 -0
  73. data/lib/fog/rackspace/examples/queues/delete_message.rb +72 -0
  74. data/lib/fog/rackspace/examples/queues/delete_queue.rb +53 -0
  75. data/lib/fog/rackspace/examples/queues/list_messages.rb +64 -0
  76. data/lib/fog/rackspace/examples/queues/post_message.rb +59 -0
  77. data/lib/fog/rackspace/models/queues/claim.rb +2 -0
  78. data/lib/fog/rackspace/models/queues/message.rb +5 -5
  79. data/lib/fog/rackspace/models/queues/queue.rb +1 -1
  80. data/lib/fog/rackspace/service.rb +1 -1
  81. data/lib/fog/riakcs.rb +2 -2
  82. data/lib/fog/riakcs/provisioning.rb +1 -3
  83. data/lib/fog/riakcs/requests/provisioning/create_user.rb +2 -2
  84. data/lib/fog/riakcs/requests/provisioning/get_user.rb +1 -1
  85. data/lib/fog/riakcs/requests/provisioning/list_users.rb +1 -1
  86. data/lib/fog/riakcs/requests/usage/get_usage.rb +1 -1
  87. data/lib/fog/riakcs/usage.rb +0 -2
  88. data/lib/fog/vsphere/compute.rb +1 -0
  89. data/lib/fog/vsphere/models/compute/datastore.rb +1 -0
  90. data/lib/fog/vsphere/requests/compute/list_datastores.rb +9 -8
  91. data/lib/fog/vsphere/requests/compute/set_vm_customvalue.rb +19 -0
  92. data/lib/tasks/changelog_task.rb +0 -1
  93. data/tests/google/models/compute/disk_tests.rb +5 -0
  94. data/tests/google/models/compute/disks_tests.rb +5 -0
  95. data/tests/google/models/compute/server_tests.rb +3 -0
  96. data/tests/google/models/compute/servers_tests.rb +5 -0
  97. data/tests/google/requests/compute/disk_tests.rb +2 -1
  98. data/tests/google/requests/compute/firewall_tests.rb +1 -0
  99. data/tests/google/requests/compute/image_tests.rb +3 -0
  100. data/tests/google/requests/compute/network_tests.rb +1 -0
  101. data/tests/google/requests/compute/operation_tests.rb +1 -0
  102. data/tests/google/requests/compute/server_tests.rb +2 -3
  103. data/tests/google/requests/compute/zone_tests.rb +1 -6
  104. data/tests/helpers/mock_helper.rb +3 -4
  105. data/tests/rackspace/models/queues/message_tests.rb +16 -0
  106. data/tests/vsphere/requests/compute/set_vm_customvalue_tests.rb +21 -0
  107. metadata +29 -3
  108. data/lib/fog/hp/README_HP.rdoc +0 -61
@@ -43,7 +43,6 @@ module Fog
43
43
  end
44
44
 
45
45
  def initialize(options={})
46
- require 'multi_json'
47
46
  @openstack_username = options[:openstack_username]
48
47
  @openstack_tenant = options[:openstack_tenant]
49
48
  @openstack_auth_uri = URI.parse(options[:openstack_auth_url])
@@ -90,8 +89,6 @@ module Fog
90
89
  attr_reader :current_tenant
91
90
 
92
91
  def initialize(options={})
93
- require 'multi_json'
94
-
95
92
  @openstack_auth_token = options[:openstack_auth_token]
96
93
 
97
94
  unless @openstack_auth_token
@@ -165,7 +162,7 @@ module Fog
165
162
  end
166
163
  end
167
164
  unless response.body.empty?
168
- response.body = MultiJson.decode(response.body)
165
+ response.body = Fog::JSON.decode(response.body)
169
166
  end
170
167
  response
171
168
  end
@@ -179,8 +179,6 @@ module Fog
179
179
  attr_reader :current_tenant
180
180
 
181
181
  def initialize(options={})
182
- require 'multi_json'
183
-
184
182
  @openstack_auth_token = options[:openstack_auth_token]
185
183
 
186
184
  unless @openstack_auth_token
@@ -254,7 +252,7 @@ module Fog
254
252
  end
255
253
  end
256
254
  unless response.body.empty?
257
- response.body = MultiJson.decode(response.body)
255
+ response.body = Fog::JSON.decode(response.body)
258
256
  end
259
257
  response
260
258
  end
@@ -4,7 +4,7 @@ module Fog
4
4
  class Real
5
5
  def add_flavor_access(flavor_ref, tenant_id)
6
6
  request(
7
- :body => MultiJson.encode({
7
+ :body => Fog::JSON.encode({
8
8
  "addTenantAccess" => {
9
9
  "tenant" => tenant_id
10
10
  }
@@ -6,7 +6,7 @@ module Fog
6
6
  def allocate_address(pool = nil)
7
7
 
8
8
  request(
9
- :body => MultiJson.encode({'pool' => pool}),
9
+ :body => Fog::JSON.encode({'pool' => pool}),
10
10
  :expects => [200, 202],
11
11
  :method => 'POST',
12
12
  :path => 'os-floating-ips.json'
@@ -11,7 +11,7 @@ module Fog
11
11
  }
12
12
  }
13
13
  request(
14
- :body => MultiJson.encode(data),
14
+ :body => Fog::JSON.encode(data),
15
15
  :expects => [200, 202],
16
16
  :method => 'POST',
17
17
  :path => "servers/%s/os-volume_attachments" % [server_id]
@@ -29,7 +29,7 @@ module Fog
29
29
  end
30
30
 
31
31
  request(
32
- :body => MultiJson.encode(data),
32
+ :body => Fog::JSON.encode(data),
33
33
  :expects => [200, 202],
34
34
  :method => 'POST',
35
35
  :path => '/os-volumes_boot.json'
@@ -35,7 +35,7 @@ module Fog
35
35
  }
36
36
 
37
37
  request(
38
- :body => MultiJson.encode(data),
38
+ :body => Fog::JSON.encode(data),
39
39
  :expects => 200,
40
40
  :method => 'POST',
41
41
  :path => 'flavors'
@@ -14,7 +14,7 @@ module Fog
14
14
  data['keypair']['public_key'] = public_key unless public_key.nil?
15
15
 
16
16
  request(
17
- :body => MultiJson.encode(data),
17
+ :body => Fog::JSON.encode(data),
18
18
  :expects => 200,
19
19
  :method => 'POST',
20
20
  :path => 'os-keypairs.json'
@@ -12,7 +12,7 @@ module Fog
12
12
  }
13
13
 
14
14
  request(
15
- :body => MultiJson.encode(data),
15
+ :body => Fog::JSON.encode(data),
16
16
  :expects => 200,
17
17
  :method => 'POST',
18
18
  :path => 'os-security-groups.json'
@@ -18,7 +18,7 @@ module Fog
18
18
  request(
19
19
  :expects => 200,
20
20
  :method => 'POST',
21
- :body => MultiJson.encode(data),
21
+ :body => Fog::JSON.encode(data),
22
22
  :path => 'os-security-group-rules.json'
23
23
  )
24
24
  end
@@ -17,7 +17,7 @@ module Fog
17
17
  data['volume'][key] = options[key]
18
18
  end
19
19
  request(
20
- :body => MultiJson.encode(data),
20
+ :body => Fog::JSON.encode(data),
21
21
  :expects => [200, 202],
22
22
  :method => 'POST',
23
23
  :path => "os-volumes"
@@ -14,7 +14,7 @@ module Fog
14
14
  }
15
15
 
16
16
  request(
17
- :body => MultiJson.encode(data),
17
+ :body => Fog::JSON.encode(data),
18
18
  :expects => [200, 202],
19
19
  :method => 'POST',
20
20
  :path => "os-snapshots"
@@ -11,7 +11,7 @@ module Fog
11
11
  :method => 'GET',
12
12
  :path => '/v2.0/tenants'
13
13
  })
14
- response.body = MultiJson.decode(response.body)
14
+ response.body = Fog::JSON.decode(response.body)
15
15
  response
16
16
  end
17
17
  end
@@ -4,7 +4,7 @@ module Fog
4
4
  class Real
5
5
  def remove_flavor_access(flavor_ref, tenant_id)
6
6
  request(
7
- :body => MultiJson.encode({
7
+ :body => Fog::JSON.encode({
8
8
  "removeTenantAccess" => {
9
9
  "tenant" => tenant_id.to_s
10
10
  }
@@ -6,7 +6,7 @@ module Fog
6
6
  def update_quota(tenant_id, options = {})
7
7
  options['tenant_id'] = tenant_id
8
8
  request(
9
- :body => MultiJson.encode({ 'quota_set' => options }),
9
+ :body => Fog::JSON.encode({ 'quota_set' => options }),
10
10
  :expects => 200,
11
11
  :method => 'PUT',
12
12
  :path => "/os-quota-sets/#{tenant_id}"
@@ -26,7 +26,7 @@ module Fog
26
26
  data = { 'tenant_id' => tenant_id }
27
27
 
28
28
  request(
29
- :body => MultiJson.encode(data),
29
+ :body => Fog::JSON.encode(data),
30
30
  :expects => [200, 202],
31
31
  :method => 'POST',
32
32
  :path => "users/#{user_id}/credentials/OS-EC2"
@@ -10,7 +10,7 @@ module Fog
10
10
  }
11
11
 
12
12
  request(
13
- :body => MultiJson.encode(data),
13
+ :body => Fog::JSON.encode(data),
14
14
  :expects => [200, 202],
15
15
  :method => 'POST',
16
16
  :path => '/OS-KSADM/roles'
@@ -15,7 +15,7 @@ module Fog
15
15
  }
16
16
 
17
17
  request(
18
- :body => MultiJson.encode(data),
18
+ :body => Fog::JSON.encode(data),
19
19
  :expects => [200, 202],
20
20
  :method => 'POST',
21
21
  :path => '/users'
@@ -6,7 +6,7 @@ module Fog
6
6
  def update_user(user_id, options = {})
7
7
  url = options.delete('url') || "/users/#{user_id}"
8
8
  request(
9
- :body => MultiJson.encode({ 'user' => options }),
9
+ :body => Fog::JSON.encode({ 'user' => options }),
10
10
  :expects => 200,
11
11
  :method => 'PUT',
12
12
  :path => url
@@ -11,7 +11,7 @@ module Fog
11
11
  data = { 'memberships' => members }
12
12
 
13
13
  request(
14
- :body => MultiJson.encode(data),
14
+ :body => Fog::JSON.encode(data),
15
15
  :expects => [200, 202],
16
16
  :method => 'PUT',
17
17
  :path => "images/#{image_id}/members"
@@ -25,12 +25,12 @@ module Fog
25
25
  :expects => 201,
26
26
  :path => 'stacks',
27
27
  :method => 'POST',
28
- :body => MultiJson.encode(params)
28
+ :body => Fog::JSON.encode(params)
29
29
  )
30
30
  end
31
31
 
32
32
  end
33
-
33
+
34
34
  class Mock
35
35
  def create_stack(stack_name, options = {})
36
36
  stack_id = Fog::Mock.random_hex(32)
@@ -22,7 +22,7 @@ module Fog
22
22
  :expects => 202,
23
23
  :path => "stacks/#{stack_name}/#{stack_id}",
24
24
  :method => 'PUT',
25
- :body => MultiJson.encode(params)
25
+ :body => Fog::JSON.encode(params)
26
26
  )
27
27
  end
28
28
 
@@ -18,7 +18,7 @@ module Fog
18
18
  data['volume'][key] = options[key]
19
19
  end
20
20
  request(
21
- :body => MultiJson.encode(data),
21
+ :body => Fog::JSON.encode(data),
22
22
  :expects => [200, 202],
23
23
  :method => 'POST',
24
24
  :path => "volumes"
@@ -14,7 +14,7 @@ module Fog
14
14
  }
15
15
 
16
16
  request(
17
- :body => MultiJson.encode(data),
17
+ :body => Fog::JSON.encode(data),
18
18
  :expects => [200, 202],
19
19
  :method => 'POST',
20
20
  :path => "snapshots"
@@ -61,7 +61,6 @@ module Fog
61
61
  end
62
62
 
63
63
  def initialize(options={})
64
- require 'multi_json'
65
64
  @openstack_username = options[:openstack_username]
66
65
  @openstack_tenant = options[:openstack_tenant]
67
66
  @openstack_auth_uri = URI.parse(options[:openstack_auth_url])
@@ -108,8 +107,6 @@ module Fog
108
107
  attr_reader :current_tenant
109
108
 
110
109
  def initialize(options={})
111
- require 'multi_json'
112
-
113
110
  @openstack_auth_token = options[:openstack_auth_token]
114
111
 
115
112
  unless @openstack_auth_token
@@ -181,7 +178,7 @@ module Fog
181
178
  end
182
179
  end
183
180
  unless response.body.empty?
184
- response.body = MultiJson.decode(response.body)
181
+ response.body = Fog::JSON.decode(response.body)
185
182
  end
186
183
  response
187
184
  end
@@ -1,3 +1,4 @@
1
+ require 'fog/rackspace'
1
2
  require 'fog/compute'
2
3
 
3
4
  module Fog
@@ -0,0 +1,60 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ # This example demonstrates claiming messages with the Rackpace Open Cloud
4
+
5
+ require 'rubygems' #required for Ruby 1.8.x
6
+ require 'fog'
7
+
8
+ def get_user_input(prompt)
9
+ print "#{prompt}: "
10
+ gets.chomp
11
+ end
12
+
13
+ def select_queue(queues)
14
+ abort "\nThere are not any queues the Chicago region. Try running create_queue.rb\n\n" if queues.empty?
15
+
16
+ puts "\nSelect Queue To Delete:\n\n"
17
+ queues.each_with_index do |queue, i|
18
+ puts "\t #{i}. #{queue.name}"
19
+ end
20
+
21
+ delete_str = get_user_input "\nEnter Queue Number"
22
+ queues[delete_str.to_i]
23
+ end
24
+
25
+ # Use username defined in ~/.fog file, if absent prompt for username.
26
+ # For more details on ~/.fog refer to http://fog.io/about/getting_started.html
27
+ def rackspace_username
28
+ Fog.credentials[:rackspace_username] || get_user_input("Enter Rackspace Username")
29
+ end
30
+
31
+ # Use api key defined in ~/.fog file, if absent prompt for api key
32
+ # For more details on ~/.fog refer to http://fog.io/about/getting_started.html
33
+ def rackspace_api_key
34
+ Fog.credentials[:rackspace_api_key] || get_user_input("Enter Rackspace API key")
35
+ end
36
+
37
+ # create Queue Service
38
+ service = Fog::Rackspace::Queues.new({
39
+ :rackspace_username => rackspace_username,
40
+ :rackspace_api_key => rackspace_api_key,
41
+ :rackspace_region => :ord #Use Chicago Region
42
+ })
43
+
44
+ # retrieve list of queues
45
+ queues = service.queues
46
+
47
+ # prompt for queue
48
+ queue = select_queue(queues)
49
+
50
+ # prompt for number of messages to claim
51
+ num_claims = get_user_input "Enter Number of Messages to Claim"
52
+
53
+ # Claim messages
54
+ claim = queue.claims.create :ttl => 300, :grace => 100, :limit => num_claims
55
+
56
+ puts "The following messages have been claimed for the next 5 minutes [#{claim.id}]"
57
+
58
+ claim.messages.each do |message|
59
+ puts "\t[#{message.id}] #{message.body[0..50]}"
60
+ end
@@ -0,0 +1,45 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ # This example demonstrates creating a queue with the Rackpace Open Cloud
4
+
5
+ require 'rubygems' #required for Ruby 1.8.x
6
+ require 'fog'
7
+
8
+ def get_user_input(prompt)
9
+ print "#{prompt}: "
10
+ gets.chomp
11
+ end
12
+
13
+ # Use username defined in ~/.fog file, if absent prompt for username.
14
+ # For more details on ~/.fog refer to http://fog.io/about/getting_started.html
15
+ def rackspace_username
16
+ Fog.credentials[:rackspace_username] || get_user_input("Enter Rackspace Username")
17
+ end
18
+
19
+ # Use api key defined in ~/.fog file, if absent prompt for api key
20
+ # For more details on ~/.fog refer to http://fog.io/about/getting_started.html
21
+ def rackspace_api_key
22
+ Fog.credentials[:rackspace_api_key] || get_user_input("Enter Rackspace API key")
23
+ end
24
+
25
+ # create Queue Service
26
+ service = Fog::Rackspace::Queues.new({
27
+ :rackspace_username => rackspace_username,
28
+ :rackspace_api_key => rackspace_api_key,
29
+ :rackspace_region => :ord #Use Chicago Region
30
+ })
31
+
32
+ #prompt for queue name
33
+ queue_name = get_user_input "Enter name for queue"
34
+
35
+ begin
36
+ # create queue
37
+ queue = service.queues.create :name => queue_name
38
+ puts "Queue #{queue_name} was successfully created"
39
+
40
+ puts "To delete the queue please execute the delete_queue.rb script\n\n"
41
+ rescue Fog::Rackspace::Queues::ServiceError => e
42
+ if e.status_code == 204
43
+ puts "Queue #{queue_name} already exists"
44
+ end
45
+ end
@@ -0,0 +1,72 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ # This example demonstrates deleting a message with the Rackpace Open Cloud
4
+
5
+ require 'rubygems' #required for Ruby 1.8.x
6
+ require 'fog'
7
+
8
+ def get_user_input(prompt)
9
+ print "#{prompt}: "
10
+ gets.chomp
11
+ end
12
+
13
+ def select_queue(queues)
14
+ abort "\nThere are not any queues in the Chicago region. Try running create_queue.rb\n\n" if queues.empty?
15
+
16
+ puts "\nSelect Queue To Delete:\n\n"
17
+ queues.each_with_index do |queue, i|
18
+ puts "\t #{i}. #{queue.name}"
19
+ end
20
+
21
+ delete_str = get_user_input "\nEnter Queue Number"
22
+ queues[delete_str.to_i]
23
+ end
24
+
25
+ def select_message(messages)
26
+ abort "\nThere are not any messages in the Chicago region. Try running post_message.rb\n\n" if messages.empty?
27
+
28
+ puts "\nSelect Message To Delete:\n\n"
29
+ messages.each_with_index do |message, i|
30
+ puts "\t #{i}. [#{message.id}] #{message.body[0..50]}"
31
+ end
32
+
33
+ delete_str = get_user_input "\nEnter Message Number"
34
+ messages[delete_str.to_i]
35
+ end
36
+
37
+
38
+ # Use username defined in ~/.fog file, if absent prompt for username.
39
+ # For more details on ~/.fog refer to http://fog.io/about/getting_started.html
40
+ def rackspace_username
41
+ Fog.credentials[:rackspace_username] || get_user_input("Enter Rackspace Username")
42
+ end
43
+
44
+ # Use api key defined in ~/.fog file, if absent prompt for api key
45
+ # For more details on ~/.fog refer to http://fog.io/about/getting_started.html
46
+ def rackspace_api_key
47
+ Fog.credentials[:rackspace_api_key] || get_user_input("Enter Rackspace API key")
48
+ end
49
+
50
+ # create Queue Service
51
+ service = Fog::Rackspace::Queues.new({
52
+ :rackspace_username => rackspace_username,
53
+ :rackspace_api_key => rackspace_api_key,
54
+ :rackspace_region => :ord #Use Chicago Region
55
+ })
56
+
57
+ # retrieve list of queues
58
+ queues = service.queues
59
+
60
+ # prompt for queue
61
+ queue = select_queue(queues)
62
+
63
+ #retrieve list of messages
64
+ messages = queue.messages
65
+
66
+ # prompt for message
67
+ message = select_message(messages)
68
+
69
+ # delete message
70
+ message.destroy
71
+
72
+ puts "\nMessage #{message.id} has been destroyed\n"