fog 0.0.77 → 0.0.78

Sign up to get free protection for your applications and to get access to all the features.
Files changed (111) hide show
  1. data/Gemfile.lock +2 -2
  2. data/fog.gemspec +59 -48
  3. data/lib/fog.rb +2 -1
  4. data/lib/fog/aws/models/ec2/snapshot.rb +3 -1
  5. data/lib/fog/aws/models/ec2/volume.rb +4 -2
  6. data/lib/fog/aws/s3.rb +1 -1
  7. data/lib/fog/deprecation.rb +14 -0
  8. data/lib/fog/terremark.rb +7 -220
  9. data/lib/fog/terremark/bin.rb +24 -14
  10. data/lib/fog/terremark/ecloud.rb +51 -0
  11. data/lib/fog/terremark/models/shared/address.rb +29 -0
  12. data/lib/fog/terremark/models/shared/addresses.rb +49 -0
  13. data/lib/fog/terremark/models/shared/network.rb +30 -0
  14. data/lib/fog/terremark/models/shared/networks.rb +52 -0
  15. data/lib/fog/terremark/models/shared/server.rb +57 -0
  16. data/lib/fog/terremark/models/shared/servers.rb +55 -0
  17. data/lib/fog/terremark/models/shared/task.rb +43 -0
  18. data/lib/fog/terremark/models/shared/tasks.rb +58 -0
  19. data/lib/fog/terremark/parser.rb +18 -0
  20. data/lib/fog/terremark/parsers/shared/get_catalog.rb +46 -0
  21. data/lib/fog/terremark/parsers/shared/get_catalog_item.rb +46 -0
  22. data/lib/fog/terremark/parsers/shared/get_internet_services.rb +60 -0
  23. data/lib/fog/terremark/parsers/{get_node_services.rb → shared/get_node_services.rb} +10 -11
  24. data/lib/fog/terremark/parsers/shared/get_organization.rb +47 -0
  25. data/lib/fog/terremark/parsers/shared/get_organizations.rb +27 -0
  26. data/lib/fog/terremark/parsers/shared/get_public_ips.rb +30 -0
  27. data/lib/fog/terremark/parsers/shared/get_tasks_list.rb +52 -0
  28. data/lib/fog/terremark/parsers/shared/get_vapp_template.rb +46 -0
  29. data/lib/fog/terremark/parsers/shared/get_vdc.rb +108 -0
  30. data/lib/fog/terremark/parsers/shared/instantiate_vapp_template.rb +41 -0
  31. data/lib/fog/terremark/parsers/shared/internet_service.rb +65 -0
  32. data/lib/fog/terremark/parsers/shared/network.rb +51 -0
  33. data/lib/fog/terremark/parsers/shared/node_service.rb +32 -0
  34. data/lib/fog/terremark/parsers/shared/public_ip.rb +26 -0
  35. data/lib/fog/terremark/parsers/shared/task.rb +40 -0
  36. data/lib/fog/terremark/parsers/shared/vapp.rb +47 -0
  37. data/lib/fog/terremark/requests/shared/add_internet_service.rb +63 -0
  38. data/lib/fog/terremark/requests/shared/add_node_service.rb +63 -0
  39. data/lib/fog/terremark/requests/shared/create_internet_service.rb +63 -0
  40. data/lib/fog/terremark/requests/shared/delete_internet_service.rb +42 -0
  41. data/lib/fog/terremark/requests/shared/delete_node_service.rb +42 -0
  42. data/lib/fog/terremark/requests/shared/delete_public_ip.rb +30 -0
  43. data/lib/fog/terremark/requests/shared/delete_vapp.rb +42 -0
  44. data/lib/fog/terremark/requests/shared/deploy_vapp.rb +43 -0
  45. data/lib/fog/terremark/requests/shared/get_catalog.rb +40 -0
  46. data/lib/fog/terremark/requests/shared/get_catalog_item.rb +43 -0
  47. data/lib/fog/terremark/requests/shared/get_internet_services.rb +43 -0
  48. data/lib/fog/terremark/requests/shared/get_network.rb +37 -0
  49. data/lib/fog/terremark/requests/shared/get_node_services.rb +38 -0
  50. data/lib/fog/terremark/requests/shared/get_organization.rb +42 -0
  51. data/lib/fog/terremark/requests/shared/get_organizations.rb +39 -0
  52. data/lib/fog/terremark/requests/shared/get_public_ip.rb +41 -0
  53. data/lib/fog/terremark/requests/shared/get_public_ips.rb +41 -0
  54. data/lib/fog/terremark/requests/shared/get_task.rb +47 -0
  55. data/lib/fog/terremark/requests/shared/get_tasks_list.rb +40 -0
  56. data/lib/fog/terremark/requests/shared/get_vapp.rb +50 -0
  57. data/lib/fog/terremark/requests/shared/get_vapp_template.rb +43 -0
  58. data/lib/fog/terremark/requests/shared/get_vdc.rb +43 -0
  59. data/lib/fog/terremark/requests/shared/instantiate_vapp_template.rb +79 -0
  60. data/lib/fog/terremark/requests/shared/power_off.rb +43 -0
  61. data/lib/fog/terremark/requests/shared/power_on.rb +43 -0
  62. data/lib/fog/terremark/requests/shared/reset.rb +43 -0
  63. data/lib/fog/terremark/requests/shared/shutdown.rb +43 -0
  64. data/lib/fog/terremark/shared.rb +139 -0
  65. data/lib/fog/terremark/vcloud.rb +98 -0
  66. metadata +60 -49
  67. data/lib/fog/terremark/models/server.rb +0 -56
  68. data/lib/fog/terremark/models/servers.rb +0 -53
  69. data/lib/fog/terremark/models/task.rb +0 -41
  70. data/lib/fog/terremark/models/tasks.rb +0 -56
  71. data/lib/fog/terremark/parsers/get_catalog.rb +0 -44
  72. data/lib/fog/terremark/parsers/get_catalog_item.rb +0 -44
  73. data/lib/fog/terremark/parsers/get_internet_services.rb +0 -58
  74. data/lib/fog/terremark/parsers/get_organization.rb +0 -45
  75. data/lib/fog/terremark/parsers/get_organizations.rb +0 -26
  76. data/lib/fog/terremark/parsers/get_public_ips.rb +0 -28
  77. data/lib/fog/terremark/parsers/get_tasks_list.rb +0 -50
  78. data/lib/fog/terremark/parsers/get_vapp_template.rb +0 -44
  79. data/lib/fog/terremark/parsers/get_vdc.rb +0 -106
  80. data/lib/fog/terremark/parsers/instantiate_vapp_template.rb +0 -39
  81. data/lib/fog/terremark/parsers/internet_service.rb +0 -63
  82. data/lib/fog/terremark/parsers/node_service.rb +0 -30
  83. data/lib/fog/terremark/parsers/public_ip.rb +0 -24
  84. data/lib/fog/terremark/parsers/task.rb +0 -38
  85. data/lib/fog/terremark/parsers/vapp.rb +0 -45
  86. data/lib/fog/terremark/requests/add_internet_service.rb +0 -61
  87. data/lib/fog/terremark/requests/add_node_service.rb +0 -61
  88. data/lib/fog/terremark/requests/create_internet_service.rb +0 -61
  89. data/lib/fog/terremark/requests/delete_internet_service.rb +0 -40
  90. data/lib/fog/terremark/requests/delete_node_service.rb +0 -40
  91. data/lib/fog/terremark/requests/delete_public_ip.rb +0 -28
  92. data/lib/fog/terremark/requests/delete_vapp.rb +0 -40
  93. data/lib/fog/terremark/requests/deploy_vapp.rb +0 -41
  94. data/lib/fog/terremark/requests/get_catalog.rb +0 -38
  95. data/lib/fog/terremark/requests/get_catalog_item.rb +0 -41
  96. data/lib/fog/terremark/requests/get_internet_services.rb +0 -41
  97. data/lib/fog/terremark/requests/get_node_services.rb +0 -36
  98. data/lib/fog/terremark/requests/get_organization.rb +0 -40
  99. data/lib/fog/terremark/requests/get_organizations.rb +0 -37
  100. data/lib/fog/terremark/requests/get_public_ip.rb +0 -35
  101. data/lib/fog/terremark/requests/get_public_ips.rb +0 -35
  102. data/lib/fog/terremark/requests/get_task.rb +0 -45
  103. data/lib/fog/terremark/requests/get_tasks_list.rb +0 -38
  104. data/lib/fog/terremark/requests/get_vapp.rb +0 -48
  105. data/lib/fog/terremark/requests/get_vapp_template.rb +0 -41
  106. data/lib/fog/terremark/requests/get_vdc.rb +0 -41
  107. data/lib/fog/terremark/requests/instantiate_vapp_template.rb +0 -77
  108. data/lib/fog/terremark/requests/power_off.rb +0 -41
  109. data/lib/fog/terremark/requests/power_on.rb +0 -41
  110. data/lib/fog/terremark/requests/reset.rb +0 -41
  111. data/lib/fog/terremark/requests/shutdown.rb +0 -41
@@ -0,0 +1,42 @@
1
+ module Fog
2
+ module Terremark
3
+ module Shared
4
+ module Real
5
+
6
+ # Destroy an internet service
7
+ #
8
+ # ==== Parameters
9
+ # * internet_service_id<~Integer> - Id of service to destroy
10
+ #
11
+ # ==== Returns
12
+ # * response<~Excon::Response>:
13
+ # * body<~Hash>:
14
+
15
+ # FIXME
16
+
17
+ # * 'CatalogItems'<~Array>
18
+ # * 'href'<~String> - linke to item
19
+ # * 'name'<~String> - name of item
20
+ # * 'type'<~String> - type of item
21
+ # * 'description'<~String> - Description of catalog
22
+ # * 'name'<~String> - Name of catalog
23
+ def delete_internet_service(internet_service_id)
24
+ request(
25
+ :expects => 200,
26
+ :method => 'DELETE',
27
+ :path => "InternetServices/#{internet_service_id}"
28
+ )
29
+ end
30
+
31
+ end
32
+
33
+ module Mock
34
+
35
+ def delete_internet_service(internet_service_id)
36
+ raise MockNotImplemented.new("Contributions welcome!")
37
+ end
38
+
39
+ end
40
+ end
41
+ end
42
+ end
@@ -0,0 +1,42 @@
1
+ module Fog
2
+ module Terremark
3
+ module Shared
4
+ module Real
5
+
6
+ # Destroy a node
7
+ #
8
+ # ==== Parameters
9
+ # * node_service_id<~Integer> - Id of node to destroy
10
+ #
11
+ # ==== Returns
12
+ # * response<~Excon::Response>:
13
+ # * body<~Hash>:
14
+
15
+ # FIXME
16
+
17
+ # * 'CatalogItems'<~Array>
18
+ # * 'href'<~String> - linke to item
19
+ # * 'name'<~String> - name of item
20
+ # * 'type'<~String> - type of item
21
+ # * 'description'<~String> - Description of catalog
22
+ # * 'name'<~String> - Name of catalog
23
+ def delete_node_service(node_service_id)
24
+ request(
25
+ :expects => 200,
26
+ :method => 'DELETE',
27
+ :path => "nodeServices/#{node_service_id}"
28
+ )
29
+ end
30
+
31
+ end
32
+
33
+ module Mock
34
+
35
+ def delete_node_service(node_id)
36
+ raise MockNotImplemented.new("Contributions welcome!")
37
+ end
38
+
39
+ end
40
+ end
41
+ end
42
+ end
@@ -0,0 +1,30 @@
1
+ module Fog
2
+ module Terremark
3
+ module Shared
4
+ module Real
5
+
6
+ # Destroy a public ip
7
+ #
8
+ # ==== Parameters
9
+ # * public_ip_id<~Integer> - Id of public ip to destroy
10
+ #
11
+ def delete_public_ip(public_ip_id)
12
+ request(
13
+ :expects => 200,
14
+ :method => 'DELETE',
15
+ :path => "publicIps/#{public_ip_id}"
16
+ )
17
+ end
18
+
19
+ end
20
+
21
+ module Mock
22
+
23
+ def delete_public_ip(public_ip_id)
24
+ raise MockNotImplemented.new("Contributions welcome!")
25
+ end
26
+
27
+ end
28
+ end
29
+ end
30
+ end
@@ -0,0 +1,42 @@
1
+ module Fog
2
+ module Terremark
3
+ module Shared
4
+ module Real
5
+
6
+ # Destroy a vapp
7
+ #
8
+ # ==== Parameters
9
+ # * vapp_id<~Integer> - Id of vapp to destroy
10
+ #
11
+ # ==== Returns
12
+ # * response<~Excon::Response>:
13
+ # * body<~Hash>:
14
+
15
+ # FIXME
16
+
17
+ # * 'CatalogItems'<~Array>
18
+ # * 'href'<~String> - linke to item
19
+ # * 'name'<~String> - name of item
20
+ # * 'type'<~String> - type of item
21
+ # * 'description'<~String> - Description of catalog
22
+ # * 'name'<~String> - Name of catalog
23
+ def delete_vapp(vapp_id)
24
+ request(
25
+ :expects => 202,
26
+ :method => 'DELETE',
27
+ :path => "vApp/#{vapp_id}"
28
+ )
29
+ end
30
+
31
+ end
32
+
33
+ module Mock
34
+
35
+ def delete_vapp(vapp_id)
36
+ raise MockNotImplemented.new("Contributions welcome!")
37
+ end
38
+
39
+ end
40
+ end
41
+ end
42
+ end
@@ -0,0 +1,43 @@
1
+ module Fog
2
+ module Terremark
3
+ module Shared
4
+ module Real
5
+
6
+ # Reserve requested resources and deploy vApp
7
+ #
8
+ # ==== Parameters
9
+ # * vapp_id<~Integer> - Id of vApp to deploy
10
+ #
11
+ # ==== Returns
12
+ # * response<~Excon::Response>:
13
+ # * body<~Hash>:
14
+ # * 'endTime'<~String> - endTime of task
15
+ # * 'href'<~String> - link to task
16
+ # * 'startTime'<~String> - startTime of task
17
+ # * 'status'<~String> - status of task
18
+ # * 'type'<~String> - type of task
19
+ # * 'Owner'<~String> -
20
+ # * 'href'<~String> - href of owner
21
+ # * 'name'<~String> - name of owner
22
+ # * 'type'<~String> - type of owner
23
+ def deploy_vapp(vapp_id)
24
+ request(
25
+ :expects => 202,
26
+ :method => 'POST',
27
+ :parser => Fog::Parsers::Terremark::Shared::Task.new,
28
+ :path => "vApp/#{vapp_id}/action/deploy"
29
+ )
30
+ end
31
+
32
+ end
33
+
34
+ module Mock
35
+
36
+ def deploy_vapp(vapp_id)
37
+ raise MockNotImplemented.new("Contributions welcome!")
38
+ end
39
+
40
+ end
41
+ end
42
+ end
43
+ end
@@ -0,0 +1,40 @@
1
+ module Fog
2
+ module Terremark
3
+ module Shared
4
+ module Real
5
+
6
+ # Get details of a catalog
7
+ #
8
+ # ==== Parameters
9
+ # * vdc_id<~Integer> - Id of vdc to view catalog for
10
+ #
11
+ # ==== Returns
12
+ # * response<~Excon::Response>:
13
+ # * body<~Hash>:
14
+ # * 'CatalogItems'<~Array>
15
+ # * 'href'<~String> - linke to item
16
+ # * 'name'<~String> - name of item
17
+ # * 'type'<~String> - type of item
18
+ # * 'description'<~String> - Description of catalog
19
+ # * 'name'<~String> - Name of catalog
20
+ def get_catalog(vdc_id)
21
+ request(
22
+ :expects => 200,
23
+ :method => 'GET',
24
+ :parser => Fog::Parsers::Terremark::Shared::GetCatalog.new,
25
+ :path => "vdc/#{vdc_id}/catalog"
26
+ )
27
+ end
28
+
29
+ end
30
+
31
+ module Mock
32
+
33
+ def get_catalog(vdc_id)
34
+ raise MockNotImplemented.new("Contributions welcome!")
35
+ end
36
+
37
+ end
38
+ end
39
+ end
40
+ end
@@ -0,0 +1,43 @@
1
+ module Fog
2
+ module Terremark
3
+ module Shared
4
+ module Real
5
+
6
+ # Get details of a catalog item
7
+ #
8
+ # ==== Parameters
9
+ # * catalog_item_id<~Integer> - Id of catalog item to lookup
10
+ #
11
+ # ==== Returns
12
+ # * response<~Excon::Response>:
13
+ # * body<~Hash>:
14
+
15
+ # FIXME
16
+
17
+ # * 'CatalogItems'<~Array>
18
+ # * 'href'<~String> - linke to item
19
+ # * 'name'<~String> - name of item
20
+ # * 'type'<~String> - type of item
21
+ # * 'description'<~String> - Description of catalog
22
+ # * 'name'<~String> - Name of catalog
23
+ def get_catalog_item(catalog_item_id)
24
+ request(
25
+ :expects => 200,
26
+ :method => 'GET',
27
+ :parser => Fog::Parsers::Terremark::Shared::GetCatalogItem.new,
28
+ :path => "catalogItem/#{catalog_item_id}"
29
+ )
30
+ end
31
+
32
+ end
33
+
34
+ module Mock
35
+
36
+ def get_catalog_item(catalog_item_id)
37
+ raise MockNotImplemented.new("Contributions welcome!")
38
+ end
39
+
40
+ end
41
+ end
42
+ end
43
+ end
@@ -0,0 +1,43 @@
1
+ module Fog
2
+ module Terremark
3
+ module Shared
4
+ module Real
5
+
6
+ require 'fog/terremark/parsers/shared/get_internet_services'
7
+
8
+ # Get a list of all internet services for a vdc
9
+ #
10
+ # ==== Parameters
11
+ # * vdc_id<~Integer> - Id of vDc to get list of internet services for
12
+ #
13
+ # ==== Returns
14
+ # * response<~Excon::Response>:
15
+ # * body<~Hash>:
16
+ # * 'InternetServices'<~Array>
17
+ # * 'id'<~String> => id of the internet service
18
+ # * 'name'<~String> => name of service
19
+ # * 'PublicIPAddress'<~Hash>
20
+ # * 'Id'<~String> => id of the public IP
21
+ # * 'name'<~String> => actual ip address
22
+ #
23
+ def get_internet_services(vdc_id)
24
+ request(
25
+ :expects => 200,
26
+ :method => 'GET',
27
+ :parser => Fog::Parsers::Terremark::Shared::GetInternetServices.new,
28
+ :path => "vdc/#{vdc_id}/internetServices"
29
+ )
30
+ end
31
+
32
+ end
33
+
34
+ module Mock
35
+
36
+ def get_internet_services(vdc_id)
37
+ raise MockNotImplemented.new("Contributions welcome!")
38
+ end
39
+
40
+ end
41
+ end
42
+ end
43
+ end
@@ -0,0 +1,37 @@
1
+ module Fog
2
+ module Terremark
3
+ module Shared
4
+ module Real
5
+
6
+ # Get details for a Network
7
+ #
8
+ # ==== Parameters
9
+ # * network_id<~Integer> - Id of the network to look up
10
+ #
11
+ # ==== Returns
12
+ # * response<~Excon::Response>:
13
+ # * body<~Hash>:
14
+ # * 'PublicIpAddresses'<~Array>
15
+ # * 'href'<~String> - linke to item
16
+ # * 'name'<~String> - name of item
17
+ def get_network(network_id)
18
+ request(
19
+ :expects => 200,
20
+ :method => 'GET',
21
+ :parser => Fog::Parsers::Terremark::Shared::Network.new,
22
+ :path => "network/#{network_id}"
23
+ )
24
+ end
25
+
26
+ end
27
+
28
+ module Mock
29
+
30
+ def get_network(network_id)
31
+ raise MockNotImplemented.new("Contributions welcome!")
32
+ end
33
+
34
+ end
35
+ end
36
+ end
37
+ end
@@ -0,0 +1,38 @@
1
+ module Fog
2
+ module Terremark
3
+ module Shared
4
+ module Real
5
+
6
+ require 'fog/terremark/parsers/shared/get_node_services'
7
+
8
+ # Get a list of all internet services for a vdc
9
+ #
10
+ # ==== Parameters
11
+ # * service_id<~Integer> - Id of internet service that we want a list of nodes for
12
+ #
13
+ # ==== Returns
14
+ # * response<~Excon::Response>:
15
+ # * body<~Hash>:
16
+
17
+ #
18
+ def get_node_services(service_id)
19
+ request(
20
+ :expects => 200,
21
+ :method => 'GET',
22
+ :parser => Fog::Parsers::Terremark::Shared::GetNodeServices.new,
23
+ :path => "InternetServices/#{service_id}/nodes"
24
+ )
25
+ end
26
+
27
+ end
28
+
29
+ module Mock
30
+
31
+ def get_node_services(vdc_id)
32
+ raise MockNotImplemented.new("Contributions welcome!")
33
+ end
34
+
35
+ end
36
+ end
37
+ end
38
+ end
@@ -0,0 +1,42 @@
1
+ module Fog
2
+ module Terremark
3
+ module Shared
4
+ module Real
5
+
6
+ # Get details of an organization
7
+ #
8
+ # ==== Parameters
9
+ # * organization_id<~Integer> - Id of organization to lookup
10
+ #
11
+ # ==== Returns
12
+ # * response<~Excon::Response>:
13
+ # * body<~Hash>:
14
+ # * 'description'<~String> - Description of organization
15
+ # * 'links'<~Array> - An array of links to entities in the organization
16
+ # * 'href'<~String> - location of link
17
+ # * 'name'<~String> - name of link
18
+ # * 'rel'<~String> - action to perform
19
+ # * 'type'<~String> - type of link
20
+ # * 'name'<~String> - Name of organization
21
+ def get_organization(organization_id)
22
+ response = request(
23
+ :expects => 200,
24
+ :method => 'GET',
25
+ :parser => Fog::Parsers::Terremark::Shared::GetOrganization.new,
26
+ :path => "org/#{organization_id}"
27
+ )
28
+ response
29
+ end
30
+
31
+ end
32
+
33
+ module Mock
34
+
35
+ def get_organization(organization_id)
36
+ raise MockNotImplemented.new("Contributions welcome!")
37
+ end
38
+ end
39
+
40
+ end
41
+ end
42
+ end