fog-terremark 0.0.2 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (56) hide show
  1. checksums.yaml +4 -4
  2. data/lib/fog/compute/terremark/common.rb +1 -1
  3. data/lib/fog/compute/terremark/mock.rb +2 -2
  4. data/lib/fog/compute/terremark/models/address.rb +1 -1
  5. data/lib/fog/compute/terremark/models/addresses.rb +1 -1
  6. data/lib/fog/compute/terremark/models/image.rb +1 -1
  7. data/lib/fog/compute/terremark/models/images.rb +1 -1
  8. data/lib/fog/compute/terremark/models/internetservice.rb +1 -1
  9. data/lib/fog/compute/terremark/models/internetservices.rb +1 -1
  10. data/lib/fog/compute/terremark/models/network.rb +1 -1
  11. data/lib/fog/compute/terremark/models/networks.rb +1 -1
  12. data/lib/fog/compute/terremark/models/nodeservice.rb +1 -1
  13. data/lib/fog/compute/terremark/models/nodeservices.rb +1 -1
  14. data/lib/fog/compute/terremark/models/server.rb +1 -1
  15. data/lib/fog/compute/terremark/models/servers.rb +1 -1
  16. data/lib/fog/compute/terremark/models/task.rb +1 -1
  17. data/lib/fog/compute/terremark/models/tasks.rb +1 -1
  18. data/lib/fog/compute/terremark/models/vdc.rb +1 -1
  19. data/lib/fog/compute/terremark/models/vdcs.rb +1 -1
  20. data/lib/fog/compute/terremark/parser.rb +1 -1
  21. data/lib/fog/compute/terremark/real.rb +7 -2
  22. data/lib/fog/compute/terremark/requests/add_internet_service.rb +2 -2
  23. data/lib/fog/compute/terremark/requests/add_node_service.rb +2 -2
  24. data/lib/fog/compute/terremark/requests/configure_vapp.rb +2 -2
  25. data/lib/fog/compute/terremark/requests/create_internet_service.rb +2 -2
  26. data/lib/fog/compute/terremark/requests/delete_internet_service.rb +2 -2
  27. data/lib/fog/compute/terremark/requests/delete_node_service.rb +2 -2
  28. data/lib/fog/compute/terremark/requests/delete_public_ip.rb +2 -2
  29. data/lib/fog/compute/terremark/requests/delete_vapp.rb +2 -2
  30. data/lib/fog/compute/terremark/requests/deploy_vapp.rb +2 -2
  31. data/lib/fog/compute/terremark/requests/get_catalog.rb +2 -2
  32. data/lib/fog/compute/terremark/requests/get_catalog_item.rb +2 -2
  33. data/lib/fog/compute/terremark/requests/get_internet_services.rb +2 -2
  34. data/lib/fog/compute/terremark/requests/get_keys_list.rb +2 -2
  35. data/lib/fog/compute/terremark/requests/get_network.rb +3 -3
  36. data/lib/fog/compute/terremark/requests/get_network_ips.rb +2 -2
  37. data/lib/fog/compute/terremark/requests/get_node_services.rb +2 -4
  38. data/lib/fog/compute/terremark/requests/get_organization.rb +3 -3
  39. data/lib/fog/compute/terremark/requests/get_organizations.rb +3 -3
  40. data/lib/fog/compute/terremark/requests/get_public_ip.rb +2 -2
  41. data/lib/fog/compute/terremark/requests/get_public_ips.rb +3 -3
  42. data/lib/fog/compute/terremark/requests/get_task.rb +2 -2
  43. data/lib/fog/compute/terremark/requests/get_tasks_list.rb +2 -2
  44. data/lib/fog/compute/terremark/requests/get_vapp.rb +2 -2
  45. data/lib/fog/compute/terremark/requests/get_vapp_template.rb +2 -2
  46. data/lib/fog/compute/terremark/requests/get_vdc.rb +3 -3
  47. data/lib/fog/compute/terremark/requests/instantiate_vapp_template.rb +2 -2
  48. data/lib/fog/compute/terremark/requests/power_off.rb +2 -2
  49. data/lib/fog/compute/terremark/requests/power_on.rb +2 -2
  50. data/lib/fog/compute/terremark/requests/power_reset.rb +2 -2
  51. data/lib/fog/compute/terremark/requests/power_shutdown.rb +2 -2
  52. data/lib/fog/terremark/vcloud/mock.rb +1 -1
  53. data/lib/fog/terremark/vcloud/real.rb +1 -1
  54. data/lib/fog/terremark/version.rb +1 -1
  55. data/spec/credentials_spec.rb +9 -0
  56. metadata +4 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 82f3be84a4e140df14962dc623f801353c99af87
4
- data.tar.gz: 5a9def508f97ff40135012ec29766f32d9d7799c
3
+ metadata.gz: 2a64a4dc8465dbef97566ac40df9eadf55082645
4
+ data.tar.gz: 51fe44d6f759172319b639f7a82346378f2dcc5e
5
5
  SHA512:
6
- metadata.gz: 88fc8e621bb52096c5fd990aaf73512260f00274ee69d989938891b13f90a25595bae938f6ff6b1cce408dd772ff35b0458361af7e8509b2a24c95499de039d8
7
- data.tar.gz: 3b7382a3f45911352743637485397fc1fcb2c532f6d16db25f8e27de346549f533883d4370c45a80c2b0409363026327ad2f7de4e6aa9fcef58e4859ca9a2ec1
6
+ metadata.gz: ddef7490923c5fccb39199805cdc90c8e838a22142a84ffe01ba96cae45b2f69367c272d6c387f7e003fbad0ccb0731897114847c193fe24718a9c5e5c3810c9
7
+ data.tar.gz: 3f1c094464eeeb8857560e2a7c88586777f31f9d5c4eb9ee85070510fa5ff3f8343593115d0eadc845fd2b9f0f1909c1ad26299c11dd8c57980d689cd8e32047
@@ -1,6 +1,6 @@
1
1
  module Fog
2
2
  module Compute
3
- module Terremark
3
+ class Terremark
4
4
  module Common
5
5
  def default_organization_id
6
6
  @default_organization_id ||= begin
@@ -1,7 +1,7 @@
1
1
  module Fog
2
2
  module Compute
3
- module Terremark
4
- module Mock
3
+ class Terremark
4
+ class Mock
5
5
  include Common
6
6
 
7
7
  def self.mock_data
@@ -1,6 +1,6 @@
1
1
  module Fog
2
2
  module Compute
3
- module Terremark
3
+ class Terremark
4
4
  class Address < Fog::Model
5
5
  identity :id
6
6
 
@@ -1,6 +1,6 @@
1
1
  module Fog
2
2
  module Compute
3
- module Terremark
3
+ class Terremark
4
4
  class Addresses < Fog::Collection
5
5
  model Fog::Compute::Terremark::Address
6
6
 
@@ -1,6 +1,6 @@
1
1
  module Fog
2
2
  module Compute
3
- module Terremark
3
+ class Terremark
4
4
  class Image < Fog::Model
5
5
  identity :id
6
6
 
@@ -1,6 +1,6 @@
1
1
  module Fog
2
2
  module Compute
3
- module Terremark
3
+ class Terremark
4
4
  class Images < Fog::Collection
5
5
  model Fog::Compute::Terremark::Image
6
6
 
@@ -1,6 +1,6 @@
1
1
  module Fog
2
2
  module Compute
3
- module Terremark
3
+ class Terremark
4
4
  class InternetService < Fog::Model
5
5
  identity :Id
6
6
 
@@ -1,6 +1,6 @@
1
1
  module Fog
2
2
  module Compute
3
- module Terremark
3
+ class Terremark
4
4
  class InternetServices < Fog::Collection
5
5
  model Fog::Compute::Terremark::InternetService
6
6
 
@@ -1,6 +1,6 @@
1
1
  module Fog
2
2
  module Compute
3
- module Terremark
3
+ class Terremark
4
4
  class Network < Fog::Model
5
5
  identity :id
6
6
 
@@ -1,6 +1,6 @@
1
1
  module Fog
2
2
  module Compute
3
- module Terremark
3
+ class Terremark
4
4
  class Networks < Fog::Collection
5
5
  model Fog::Compute::Terremark::Network
6
6
 
@@ -1,6 +1,6 @@
1
1
  module Fog
2
2
  module Compute
3
- module Terremark
3
+ class Terremark
4
4
  class NodeService < Fog::Model
5
5
  identity :Id
6
6
  attribute :Name
@@ -1,6 +1,6 @@
1
1
  module Fog
2
2
  module Compute
3
- module Terremark
3
+ class Terremark
4
4
  class NodeServices < Fog::Collection
5
5
  model Fog::Compute::Terremark::NodeService
6
6
 
@@ -1,6 +1,6 @@
1
1
  module Fog
2
2
  module Compute
3
- module Terremark
3
+ class Terremark
4
4
  class Server < Fog::Model
5
5
  module VAppStatus
6
6
  BEING_CREATED = "0"
@@ -1,6 +1,6 @@
1
1
  module Fog
2
2
  module Compute
3
- module Terremark
3
+ class Terremark
4
4
  class Servers < Fog::Collection
5
5
  model Fog::Compute::Terremark::Server
6
6
 
@@ -1,6 +1,6 @@
1
1
  module Fog
2
2
  module Compute
3
- module Terremark
3
+ class Terremark
4
4
  class Task < Fog::Model
5
5
  identity :id
6
6
 
@@ -1,6 +1,6 @@
1
1
  module Fog
2
2
  module Compute
3
- module Terremark
3
+ class Terremark
4
4
  class Tasks < Fog::Collection
5
5
  model Fog::Compute::Terremark::Task
6
6
 
@@ -1,6 +1,6 @@
1
1
  module Fog
2
2
  module Compute
3
- module Terremark
3
+ class Terremark
4
4
  class Vdc < Fog::Model
5
5
  identity :id
6
6
 
@@ -1,6 +1,6 @@
1
1
  module Fog
2
2
  module Compute
3
- module Terremark
3
+ class Terremark
4
4
  class Vdcs < Fog::Collection
5
5
  model Fog::Compute::Terremark::Vdc
6
6
 
@@ -1,6 +1,6 @@
1
1
  module Fog
2
2
  module Compute
3
- module Terremark
3
+ class Terremark
4
4
  module Parser
5
5
  def parse(data)
6
6
  case data['type']
@@ -1,9 +1,14 @@
1
1
  module Fog
2
2
  module Compute
3
- module Terremark
4
- module Real
3
+ class Terremark
4
+ class Real
5
5
  include Common
6
6
 
7
+ def initialize(options = {})
8
+ @terremark_username = options[:terremark_vcloud_username]
9
+ @terremark_password = options[:terremark_vcloud_password]
10
+ end
11
+
7
12
  private
8
13
 
9
14
  def auth_token
@@ -1,7 +1,7 @@
1
1
  module Fog
2
2
  module Compute
3
- module Terremark
4
- module Real
3
+ class Terremark
4
+ class Real
5
5
  # Reserve requested resources and deploy vApp
6
6
  #
7
7
  # ==== Parameters
@@ -1,7 +1,7 @@
1
1
  module Fog
2
2
  module Compute
3
- module Terremark
4
- module Real
3
+ class Terremark
4
+ class Real
5
5
  # Reserve requested resources and deploy vApp
6
6
  #
7
7
  # ==== Parameters
@@ -1,7 +1,7 @@
1
1
  module Fog
2
2
  module Compute
3
- module Terremark
4
- module Real
3
+ class Terremark
4
+ class Real
5
5
  def configure_vapp(vapp_id, vapp_name, options = {})
6
6
  items = ""
7
7
  vapp_uri = [@host, @path, "vApp", vapp_id.to_s].join("/")
@@ -1,7 +1,7 @@
1
1
  module Fog
2
2
  module Compute
3
- module Terremark
4
- module Real
3
+ class Terremark
4
+ class Real
5
5
  # Reserve requested resources and deploy vApp
6
6
  #
7
7
  # ==== Parameters
@@ -1,7 +1,7 @@
1
1
  module Fog
2
2
  module Compute
3
- module Terremark
4
- module Real
3
+ class Terremark
4
+ class Real
5
5
  # Destroy an internet service
6
6
  #
7
7
  # ==== Parameters
@@ -1,7 +1,7 @@
1
1
  module Fog
2
2
  module Compute
3
- module Terremark
4
- module Real
3
+ class Terremark
4
+ class Real
5
5
  # Destroy a node
6
6
  #
7
7
  # ==== Parameters
@@ -1,7 +1,7 @@
1
1
  module Fog
2
2
  module Compute
3
- module Terremark
4
- module Real
3
+ class Terremark
4
+ class Real
5
5
  # Destroy a public ip
6
6
  #
7
7
  # ==== Parameters
@@ -1,7 +1,7 @@
1
1
  module Fog
2
2
  module Compute
3
- module Terremark
4
- module Real
3
+ class Terremark
4
+ class Real
5
5
  # Destroy a vapp
6
6
  #
7
7
  # ==== Parameters
@@ -1,7 +1,7 @@
1
1
  module Fog
2
2
  module Compute
3
- module Terremark
4
- module Real
3
+ class Terremark
4
+ class Real
5
5
  # Reserve requested resources and deploy vApp
6
6
  #
7
7
  # ==== Parameters
@@ -1,7 +1,7 @@
1
1
  module Fog
2
2
  module Compute
3
- module Terremark
4
- module Real
3
+ class Terremark
4
+ class Real
5
5
  # Get details of a catalog
6
6
  #
7
7
  # ==== Parameters
@@ -1,7 +1,7 @@
1
1
  module Fog
2
2
  module Compute
3
- module Terremark
4
- module Real
3
+ class Terremark
4
+ class Real
5
5
  # Get details of a catalog item
6
6
  #
7
7
  # ==== Parameters
@@ -1,7 +1,7 @@
1
1
  module Fog
2
2
  module Compute
3
- module Terremark
4
- module Real
3
+ class Terremark
4
+ class Real
5
5
  # Get a list of all internet services for a vdc
6
6
  #
7
7
  # ==== Parameters
@@ -1,7 +1,7 @@
1
1
  module Fog
2
2
  module Compute
3
- module Terremark
4
- module Real
3
+ class Terremark
4
+ class Real
5
5
  # Get list of SSH keys for an organization
6
6
  #
7
7
  # ==== Parameters
@@ -1,7 +1,7 @@
1
1
  module Fog
2
2
  module Compute
3
- module Terremark
4
- module Real
3
+ class Terremark
4
+ class Real
5
5
  # Get details for a Network
6
6
  #
7
7
  # ==== Parameters
@@ -21,7 +21,7 @@ module Fog
21
21
  end
22
22
  end
23
23
 
24
- module Mock
24
+ class Mock
25
25
  def get_network(network_id)
26
26
  network_id = network_id.to_i
27
27
  response = Excon::Response.new
@@ -1,7 +1,7 @@
1
1
  module Fog
2
2
  module Compute
3
- module Terremark
4
- module Real
3
+ class Terremark
4
+ class Real
5
5
  # Get details for a Network
6
6
  #
7
7
  # ==== Parameters
@@ -1,9 +1,7 @@
1
1
  module Fog
2
2
  module Compute
3
- module Terremark
4
- module Real
5
- require 'fog/terremark/parsers/terremark/get_node_services'
6
-
3
+ class Terremark
4
+ class Real
7
5
  # Get a list of all internet services for a vdc
8
6
  #
9
7
  # ==== Parameters
@@ -1,7 +1,7 @@
1
1
  module Fog
2
2
  module Compute
3
- module Terremark
4
- module Real
3
+ class Terremark
4
+ class Real
5
5
  # Get details of an organization
6
6
  #
7
7
  # ==== Parameters
@@ -28,7 +28,7 @@ module Fog
28
28
  end
29
29
  end
30
30
 
31
- module Mock
31
+ class Mock
32
32
  def get_organization(organization_id)
33
33
  organization_id = organization_id.to_i
34
34
  response = Excon::Response.new
@@ -1,7 +1,7 @@
1
1
  module Fog
2
2
  module Compute
3
- module Terremark
4
- module Real
3
+ class Terremark
4
+ class Real
5
5
  # Get list of organizations
6
6
  #
7
7
  # ==== Returns
@@ -25,7 +25,7 @@ module Fog
25
25
  end
26
26
  end
27
27
 
28
- module Mock
28
+ class Mock
29
29
  def get_organizations
30
30
  response = Excon::Response.new
31
31
  org_list = self.data[:organizations].map do |organization|
@@ -1,7 +1,7 @@
1
1
  module Fog
2
2
  module Compute
3
- module Terremark
4
- module Real
3
+ class Terremark
4
+ class Real
5
5
  # Get details for a public ip
6
6
  #
7
7
  # ==== Parameters
@@ -1,7 +1,7 @@
1
1
  module Fog
2
2
  module Compute
3
- module Terremark
4
- module Real
3
+ class Terremark
4
+ class Real
5
5
  # Get list of public ips
6
6
  #
7
7
  # ==== Parameters
@@ -27,7 +27,7 @@ module Fog
27
27
  end
28
28
  end
29
29
 
30
- module Mock
30
+ class Mock
31
31
  def get_public_ips(vdc_id)
32
32
  vdc_id = vdc_id.to_i
33
33
  response = Excon::Response.new
@@ -1,7 +1,7 @@
1
1
  module Fog
2
2
  module Compute
3
- module Terremark
4
- module Real
3
+ class Terremark
4
+ class Real
5
5
  # Get details of a task
6
6
  #
7
7
  # ==== Parameters
@@ -1,7 +1,7 @@
1
1
  module Fog
2
2
  module Compute
3
- module Terremark
4
- module Real
3
+ class Terremark
4
+ class Real
5
5
  # Get list of tasks
6
6
  #
7
7
  # ==== Parameters
@@ -1,7 +1,7 @@
1
1
  module Fog
2
2
  module Compute
3
- module Terremark
4
- module Real
3
+ class Terremark
4
+ class Real
5
5
  # Get details of a vapp
6
6
  #
7
7
  # ==== Parameters
@@ -1,7 +1,7 @@
1
1
  module Fog
2
2
  module Compute
3
- module Terremark
4
- module Real
3
+ class Terremark
4
+ class Real
5
5
  # Get details of a vapp template
6
6
  #
7
7
  # ==== Parameters
@@ -1,7 +1,7 @@
1
1
  module Fog
2
2
  module Compute
3
- module Terremark
4
- module Real
3
+ class Terremark
4
+ class Real
5
5
  # Get details of a vdc
6
6
  #
7
7
  # ==== Parameters
@@ -29,7 +29,7 @@ module Fog
29
29
  end
30
30
  end
31
31
 
32
- module Mock
32
+ class Mock
33
33
  def get_vdc(vdc_id)
34
34
  vdc_id = vdc_id.to_i
35
35
  response = Excon::Response.new
@@ -1,7 +1,7 @@
1
1
  module Fog
2
2
  module Compute
3
- module Terremark
4
- module Real
3
+ class Terremark
4
+ class Real
5
5
  # Instatiate a vapp template
6
6
  #
7
7
  # ==== Parameters
@@ -1,7 +1,7 @@
1
1
  module Fog
2
2
  module Compute
3
- module Terremark
4
- module Real
3
+ class Terremark
4
+ class Real
5
5
  # Power off a vapp
6
6
  #
7
7
  # ==== Parameters
@@ -1,7 +1,7 @@
1
1
  module Fog
2
2
  module Compute
3
- module Terremark
4
- module Real
3
+ class Terremark
4
+ class Real
5
5
  # Power on a vapp
6
6
  #
7
7
  # ==== Parameters
@@ -1,7 +1,7 @@
1
1
  module Fog
2
2
  module Compute
3
- module Terremark
4
- module Real
3
+ class Terremark
4
+ class Real
5
5
  # Reset a vapp
6
6
  #
7
7
  # ==== Parameters
@@ -1,7 +1,7 @@
1
1
  module Fog
2
2
  module Compute
3
- module Terremark
4
- module Real
3
+ class Terremark
4
+ class Real
5
5
  # Shutdown a vapp
6
6
  #
7
7
  # ==== Parameters
@@ -1,6 +1,6 @@
1
1
  module Fog
2
2
  module Terremark
3
- module Vcloud
3
+ class Vcloud
4
4
  class Mock < Fog::Compute::Terremark::Mock
5
5
  def initialize(option = {})
6
6
  super
@@ -1,6 +1,6 @@
1
1
  module Fog
2
2
  module Terremark
3
- module Vcloud
3
+ class Vcloud
4
4
  class Real < Fog::Compute::Terremark::Real
5
5
  def initialize(options={})
6
6
  @terremark_password = options[:terremark_vcloud_password]
@@ -1,5 +1,5 @@
1
1
  module Fog
2
2
  module Terremark
3
- VERSION = "0.0.2"
3
+ VERSION = "0.0.3"
4
4
  end
5
5
  end
@@ -0,0 +1,9 @@
1
+ require 'minitest_helper'
2
+
3
+ describe Fog::Compute::Terremark do
4
+ it 'authenticates' do
5
+ Fog::Compute::Terremark.new(
6
+ :terremark_vcloud_username => 'test@example.com',
7
+ :terremark_vcloud_password => '123456')
8
+ end
9
+ end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fog-terremark
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Paulo Henrique Lopes Ribeiro
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-11-14 00:00:00.000000000 Z
11
+ date: 2014-11-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: fog-core
@@ -223,6 +223,7 @@ files:
223
223
  - lib/fog/terremark/vcloud/mock.rb
224
224
  - lib/fog/terremark/vcloud/real.rb
225
225
  - lib/fog/terremark/version.rb
226
+ - spec/credentials_spec.rb
226
227
  - spec/minitest_helper.rb
227
228
  homepage: ''
228
229
  licenses:
@@ -249,4 +250,5 @@ signing_key:
249
250
  specification_version: 4
250
251
  summary: Module for the 'fog' gem to support Terremark vCloud.
251
252
  test_files:
253
+ - spec/credentials_spec.rb
252
254
  - spec/minitest_helper.rb