fog-terremark 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +23 -0
- data/.rubocop.yml +20 -0
- data/.ruby-gemset +1 -0
- data/.ruby-version +1 -0
- data/.travis.yml +17 -0
- data/CONTRIBUTING.md +18 -0
- data/CONTRIBUTORS.md +10 -0
- data/Gemfile +4 -0
- data/LICENSE.md +20 -0
- data/README.md +36 -0
- data/Rakefile +11 -0
- data/fog-terremark.gemspec +34 -0
- data/gemfiles/Gemfile.1.9.2- +8 -0
- data/gemfiles/Gemfile.1.9.3+ +7 -0
- data/lib/fog/compute/terremark.rb +62 -0
- data/lib/fog/compute/terremark/common.rb +18 -0
- data/lib/fog/compute/terremark/mock.rb +144 -0
- data/lib/fog/compute/terremark/models/address.rb +23 -0
- data/lib/fog/compute/terremark/models/addresses.rb +33 -0
- data/lib/fog/compute/terremark/models/image.rb +17 -0
- data/lib/fog/compute/terremark/models/images.rb +26 -0
- data/lib/fog/compute/terremark/models/internetservice.rb +60 -0
- data/lib/fog/compute/terremark/models/internetservices.rb +24 -0
- data/lib/fog/compute/terremark/models/network.rb +29 -0
- data/lib/fog/compute/terremark/models/networks.rb +37 -0
- data/lib/fog/compute/terremark/models/nodeservice.rb +44 -0
- data/lib/fog/compute/terremark/models/nodeservices.rb +14 -0
- data/lib/fog/compute/terremark/models/server.rb +201 -0
- data/lib/fog/compute/terremark/models/servers.rb +35 -0
- data/lib/fog/compute/terremark/models/task.rb +44 -0
- data/lib/fog/compute/terremark/models/tasks.rb +41 -0
- data/lib/fog/compute/terremark/models/vdc.rb +39 -0
- data/lib/fog/compute/terremark/models/vdcs.rb +36 -0
- data/lib/fog/compute/terremark/parser.rb +16 -0
- data/lib/fog/compute/terremark/real.rb +67 -0
- data/lib/fog/compute/terremark/requests/add_internet_service.rb +54 -0
- data/lib/fog/compute/terremark/requests/add_node_service.rb +51 -0
- data/lib/fog/compute/terremark/requests/configure_vapp.rb +58 -0
- data/lib/fog/compute/terremark/requests/create_internet_service.rb +57 -0
- data/lib/fog/compute/terremark/requests/delete_internet_service.rb +21 -0
- data/lib/fog/compute/terremark/requests/delete_node_service.rb +21 -0
- data/lib/fog/compute/terremark/requests/delete_public_ip.rb +21 -0
- data/lib/fog/compute/terremark/requests/delete_vapp.rb +20 -0
- data/lib/fog/compute/terremark/requests/deploy_vapp.rb +33 -0
- data/lib/fog/compute/terremark/requests/get_catalog.rb +30 -0
- data/lib/fog/compute/terremark/requests/get_catalog_item.rb +33 -0
- data/lib/fog/compute/terremark/requests/get_internet_services.rb +32 -0
- data/lib/fog/compute/terremark/requests/get_keys_list.rb +32 -0
- data/lib/fog/compute/terremark/requests/get_network.rb +70 -0
- data/lib/fog/compute/terremark/requests/get_network_ips.rb +29 -0
- data/lib/fog/compute/terremark/requests/get_node_services.rb +29 -0
- data/lib/fog/compute/terremark/requests/get_organization.rb +89 -0
- data/lib/fog/compute/terremark/requests/get_organizations.rb +45 -0
- data/lib/fog/compute/terremark/requests/get_public_ip.rb +31 -0
- data/lib/fog/compute/terremark/requests/get_public_ips.rb +69 -0
- data/lib/fog/compute/terremark/requests/get_task.rb +37 -0
- data/lib/fog/compute/terremark/requests/get_tasks_list.rb +30 -0
- data/lib/fog/compute/terremark/requests/get_vapp.rb +40 -0
- data/lib/fog/compute/terremark/requests/get_vapp_template.rb +33 -0
- data/lib/fog/compute/terremark/requests/get_vdc.rb +153 -0
- data/lib/fog/compute/terremark/requests/instantiate_vapp_template.rb +75 -0
- data/lib/fog/compute/terremark/requests/power_off.rb +33 -0
- data/lib/fog/compute/terremark/requests/power_on.rb +33 -0
- data/lib/fog/compute/terremark/requests/power_reset.rb +33 -0
- data/lib/fog/compute/terremark/requests/power_shutdown.rb +22 -0
- data/lib/fog/parsers/terremark.rb +26 -0
- data/lib/fog/parsers/terremark/base.rb +23 -0
- data/lib/fog/parsers/terremark/get_catalog.rb +31 -0
- data/lib/fog/parsers/terremark/get_catalog_item.rb +30 -0
- data/lib/fog/parsers/terremark/get_internet_services.rb +55 -0
- data/lib/fog/parsers/terremark/get_keys_list.rb +36 -0
- data/lib/fog/parsers/terremark/get_network_ips.rb +22 -0
- data/lib/fog/parsers/terremark/get_node_services.rb +30 -0
- data/lib/fog/parsers/terremark/get_organization.rb +46 -0
- data/lib/fog/parsers/terremark/get_organizations.rb +27 -0
- data/lib/fog/parsers/terremark/get_public_ips.rb +24 -0
- data/lib/fog/parsers/terremark/get_tasks_list.rb +33 -0
- data/lib/fog/parsers/terremark/get_vapp_template.rb +29 -0
- data/lib/fog/parsers/terremark/get_vdc.rb +85 -0
- data/lib/fog/parsers/terremark/instantiate_vapp_template.rb +24 -0
- data/lib/fog/parsers/terremark/internet_service.rb +56 -0
- data/lib/fog/parsers/terremark/network.rb +37 -0
- data/lib/fog/parsers/terremark/node_service.rb +26 -0
- data/lib/fog/parsers/terremark/public_ip.rb +20 -0
- data/lib/fog/parsers/terremark/task.rb +23 -0
- data/lib/fog/parsers/terremark/vapp.rb +59 -0
- data/lib/fog/terremark.rb +17 -0
- data/lib/fog/terremark/vcloud.rb +27 -0
- data/lib/fog/terremark/vcloud/mock.rb +24 -0
- data/lib/fog/terremark/vcloud/real.rb +66 -0
- data/lib/fog/terremark/version.rb +5 -0
- data/spec/minitest_helper.rb +31 -0
- metadata +251 -0
@@ -0,0 +1,57 @@
|
|
1
|
+
module Fog
|
2
|
+
module Compute
|
3
|
+
module Terremark
|
4
|
+
module Real
|
5
|
+
# Reserve requested resources and deploy vApp
|
6
|
+
#
|
7
|
+
# ==== Parameters
|
8
|
+
# * vdc_id<~Integer> - Id of vDc to add internet service to
|
9
|
+
# * name<~String> - Name of service
|
10
|
+
# * protocol<~String> - Protocol of service
|
11
|
+
# * port<~Integer> - Port of service
|
12
|
+
# * options<~Hash>:
|
13
|
+
# * Enabled<~Boolean>: defaults to true
|
14
|
+
# * Description<~String>: optional description
|
15
|
+
#
|
16
|
+
# ==== Returns
|
17
|
+
# * response<~Excon::Response>:
|
18
|
+
# * body<~Hash>:
|
19
|
+
# * 'endTime'<~String> - endTime of task
|
20
|
+
# * 'href'<~String> - link to task
|
21
|
+
# * 'startTime'<~String> - startTime of task
|
22
|
+
# * 'status'<~String> - status of task
|
23
|
+
# * 'type'<~String> - type of task
|
24
|
+
# * 'Owner'<~String> -
|
25
|
+
# * 'href'<~String> - href of owner
|
26
|
+
# * 'name'<~String> - name of owner
|
27
|
+
# * 'type'<~String> - type of owner
|
28
|
+
def create_internet_service(vdc_id, name, protocol, port, options = {})
|
29
|
+
unless options.key?('Enabled')
|
30
|
+
options['Enabled'] = true
|
31
|
+
end
|
32
|
+
#Sample: "https://services.vcloudexpress.terremark.com/api/extensions/v1.6/vdc/3142/internetServices"
|
33
|
+
path = vdcs.get(vdc_id).links.find { |item| item['name'] == 'Internet Services'}['href'].split(@host)[1]
|
34
|
+
data = <<-DATA
|
35
|
+
<CreateInternetServiceRequest xml:lang="en" xmlns="urn:tmrk:vCloudExpressExtensions-1.6" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
36
|
+
<Name>#{name}</Name>
|
37
|
+
<Protocol>#{protocol.upcase}</Protocol>
|
38
|
+
<Port>#{port}</Port>
|
39
|
+
<Enabled>#{options['Enabled']}</Enabled>
|
40
|
+
<Description>#{options['Description']}</Description>
|
41
|
+
</CreateInternetServiceRequest>
|
42
|
+
DATA
|
43
|
+
response = request(
|
44
|
+
:body => data,
|
45
|
+
:expects => 200,
|
46
|
+
:headers => {'Content-Type' => 'application/vnd.tmrk.vCloud.internetService+xml'},
|
47
|
+
:method => 'POST',
|
48
|
+
:parser => Fog::Parsers::Terremark::InternetService.new,
|
49
|
+
:path => path,
|
50
|
+
:override_path => true
|
51
|
+
)
|
52
|
+
response
|
53
|
+
end
|
54
|
+
end
|
55
|
+
end
|
56
|
+
end
|
57
|
+
end
|
@@ -0,0 +1,21 @@
|
|
1
|
+
module Fog
|
2
|
+
module Compute
|
3
|
+
module Terremark
|
4
|
+
module Real
|
5
|
+
# Destroy an internet service
|
6
|
+
#
|
7
|
+
# ==== Parameters
|
8
|
+
# * internet_service_id<~Integer> - Id of service to destroy
|
9
|
+
#
|
10
|
+
def delete_internet_service(internet_service_id)
|
11
|
+
request(
|
12
|
+
:expects => 200,
|
13
|
+
:method => 'DELETE',
|
14
|
+
:path => "api/extensions/v1.6/internetService/#{internet_service_id}",
|
15
|
+
:override_path => true
|
16
|
+
)
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
@@ -0,0 +1,21 @@
|
|
1
|
+
module Fog
|
2
|
+
module Compute
|
3
|
+
module Terremark
|
4
|
+
module Real
|
5
|
+
# Destroy a node
|
6
|
+
#
|
7
|
+
# ==== Parameters
|
8
|
+
# * node_service_id<~Integer> - Id of node to destroy
|
9
|
+
#
|
10
|
+
def delete_node_service(node_service_id)
|
11
|
+
request(
|
12
|
+
:expects => 200,
|
13
|
+
:method => 'DELETE',
|
14
|
+
:path => "api/extensions/v1.6/nodeService/#{node_service_id}",
|
15
|
+
:override_path => true
|
16
|
+
)
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
@@ -0,0 +1,21 @@
|
|
1
|
+
module Fog
|
2
|
+
module Compute
|
3
|
+
module Terremark
|
4
|
+
module Real
|
5
|
+
# Destroy a public ip
|
6
|
+
#
|
7
|
+
# ==== Parameters
|
8
|
+
# * public_ip_id<~Integer> - Id of public ip to destroy
|
9
|
+
#
|
10
|
+
def delete_public_ip(public_ip_id)
|
11
|
+
request(
|
12
|
+
:expects => 200,
|
13
|
+
:method => 'DELETE',
|
14
|
+
:path => "api/extensions/v1.6/publicIp/#{public_ip_id}",
|
15
|
+
:override_path => true
|
16
|
+
)
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
@@ -0,0 +1,20 @@
|
|
1
|
+
module Fog
|
2
|
+
module Compute
|
3
|
+
module Terremark
|
4
|
+
module Real
|
5
|
+
# Destroy a vapp
|
6
|
+
#
|
7
|
+
# ==== Parameters
|
8
|
+
# * vapp_id<~Integer> - Id of vapp to destroy
|
9
|
+
#
|
10
|
+
def delete_vapp(vapp_id)
|
11
|
+
request(
|
12
|
+
:expects => 202,
|
13
|
+
:method => 'DELETE',
|
14
|
+
:path => "vApp/#{vapp_id}"
|
15
|
+
)
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
@@ -0,0 +1,33 @@
|
|
1
|
+
module Fog
|
2
|
+
module Compute
|
3
|
+
module Terremark
|
4
|
+
module Real
|
5
|
+
# Reserve requested resources and deploy vApp
|
6
|
+
#
|
7
|
+
# ==== Parameters
|
8
|
+
# * vapp_id<~Integer> - Id of vApp to deploy
|
9
|
+
#
|
10
|
+
# ==== Returns
|
11
|
+
# * response<~Excon::Response>:
|
12
|
+
# * body<~Hash>:
|
13
|
+
# * 'endTime'<~String> - endTime of task
|
14
|
+
# * 'href'<~String> - link to task
|
15
|
+
# * 'startTime'<~String> - startTime of task
|
16
|
+
# * 'status'<~String> - status of task
|
17
|
+
# * 'type'<~String> - type of task
|
18
|
+
# * 'Owner'<~String> -
|
19
|
+
# * 'href'<~String> - href of owner
|
20
|
+
# * 'name'<~String> - name of owner
|
21
|
+
# * 'type'<~String> - type of owner
|
22
|
+
def deploy_vapp(vapp_id)
|
23
|
+
request(
|
24
|
+
:expects => 202,
|
25
|
+
:method => 'POST',
|
26
|
+
:parser => Fog::Parsers::Terremark::Task.new,
|
27
|
+
:path => "vApp/#{vapp_id}/action/deploy"
|
28
|
+
)
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|
@@ -0,0 +1,30 @@
|
|
1
|
+
module Fog
|
2
|
+
module Compute
|
3
|
+
module Terremark
|
4
|
+
module Real
|
5
|
+
# Get details of a catalog
|
6
|
+
#
|
7
|
+
# ==== Parameters
|
8
|
+
# * vdc_id<~Integer> - Id of vdc to view catalog for
|
9
|
+
#
|
10
|
+
# ==== Returns
|
11
|
+
# * response<~Excon::Response>:
|
12
|
+
# * body<~Hash>:
|
13
|
+
# * 'CatalogItems'<~Array>
|
14
|
+
# * 'href'<~String> - linke to item
|
15
|
+
# * 'name'<~String> - name of item
|
16
|
+
# * 'type'<~String> - type of item
|
17
|
+
# * 'description'<~String> - Description of catalog
|
18
|
+
# * 'name'<~String> - Name of catalog
|
19
|
+
def get_catalog(vdc_id)
|
20
|
+
request(
|
21
|
+
:expects => 200,
|
22
|
+
:method => 'GET',
|
23
|
+
:parser => Fog::Parsers::Terremark::GetCatalog.new,
|
24
|
+
:path => "vdc/#{vdc_id}/catalog"
|
25
|
+
)
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
@@ -0,0 +1,33 @@
|
|
1
|
+
module Fog
|
2
|
+
module Compute
|
3
|
+
module Terremark
|
4
|
+
module Real
|
5
|
+
# Get details of a catalog item
|
6
|
+
#
|
7
|
+
# ==== Parameters
|
8
|
+
# * catalog_item_id<~Integer> - Id of catalog item to lookup
|
9
|
+
#
|
10
|
+
# ==== Returns
|
11
|
+
# * response<~Excon::Response>:
|
12
|
+
# * body<~Hash>:
|
13
|
+
|
14
|
+
# FIXME
|
15
|
+
|
16
|
+
# * 'CatalogItems'<~Array>
|
17
|
+
# * 'href'<~String> - linke to item
|
18
|
+
# * 'name'<~String> - name of item
|
19
|
+
# * 'type'<~String> - type of item
|
20
|
+
# * 'description'<~String> - Description of catalog
|
21
|
+
# * 'name'<~String> - Name of catalog
|
22
|
+
def get_catalog_item(catalog_item_id)
|
23
|
+
request(
|
24
|
+
:expects => 200,
|
25
|
+
:method => 'GET',
|
26
|
+
:parser => Fog::Parsers::Terremark::GetCatalogItem.new,
|
27
|
+
:path => "catalogItem/#{catalog_item_id}"
|
28
|
+
)
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|
@@ -0,0 +1,32 @@
|
|
1
|
+
module Fog
|
2
|
+
module Compute
|
3
|
+
module Terremark
|
4
|
+
module Real
|
5
|
+
# Get a list of all internet services for a vdc
|
6
|
+
#
|
7
|
+
# ==== Parameters
|
8
|
+
# * vdc_id<~Integer> - Id of vDc to get list of internet services for
|
9
|
+
#
|
10
|
+
# ==== Returns
|
11
|
+
# * response<~Excon::Response>:
|
12
|
+
# * body<~Hash>:
|
13
|
+
# * 'InternetServices'<~Array>
|
14
|
+
# * 'id'<~String> => id of the internet service
|
15
|
+
# * 'name'<~String> => name of service
|
16
|
+
# * 'PublicIPAddress'<~Hash>
|
17
|
+
# * 'Id'<~String> => id of the public IP
|
18
|
+
# * 'name'<~String> => actual ip address
|
19
|
+
#
|
20
|
+
def get_internet_services(vdc_id)
|
21
|
+
request(
|
22
|
+
:expects => 200,
|
23
|
+
:method => 'GET',
|
24
|
+
:parser => Fog::Parsers::Terremark::GetInternetServices.new,
|
25
|
+
:path => "api/extensions/v1.6/vdc/#{vdc_id}/internetServices",
|
26
|
+
:override_path => true
|
27
|
+
)
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
@@ -0,0 +1,32 @@
|
|
1
|
+
module Fog
|
2
|
+
module Compute
|
3
|
+
module Terremark
|
4
|
+
module Real
|
5
|
+
# Get list of SSH keys for an organization
|
6
|
+
#
|
7
|
+
# ==== Parameters
|
8
|
+
# * organization_id<~Integer> - Id of organization to lookup
|
9
|
+
#
|
10
|
+
# ==== Returns
|
11
|
+
# * response<~Excon::Response>:
|
12
|
+
# * body<~Hash>:
|
13
|
+
# * 'description'<~String> - Description of organization
|
14
|
+
# * 'links'<~Array> - An array of links to entities in the organization
|
15
|
+
# * 'href'<~String> - location of link
|
16
|
+
# * 'name'<~String> - name of link
|
17
|
+
# * 'rel'<~String> - action to perform
|
18
|
+
# * 'type'<~String> - type of link
|
19
|
+
def get_keys_list(organization_id)
|
20
|
+
response = request(
|
21
|
+
:expects => 200,
|
22
|
+
:method => 'GET',
|
23
|
+
:parser => Fog::Parsers::Terremark::GetKeysList.new,
|
24
|
+
:path => "api/extensions/v1.6/org/#{organization_id}/keys",
|
25
|
+
:override_path => true
|
26
|
+
)
|
27
|
+
response
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
@@ -0,0 +1,70 @@
|
|
1
|
+
module Fog
|
2
|
+
module Compute
|
3
|
+
module Terremark
|
4
|
+
module Real
|
5
|
+
# Get details for a Network
|
6
|
+
#
|
7
|
+
# ==== Parameters
|
8
|
+
# * network_id<~Integer> - Id of the network to look up
|
9
|
+
#
|
10
|
+
# ==== Returns
|
11
|
+
# * response<~Excon::Response>:
|
12
|
+
# * body<~Hash>:
|
13
|
+
# FIXME
|
14
|
+
def get_network(network_id)
|
15
|
+
request(
|
16
|
+
:expects => 200,
|
17
|
+
:method => 'GET',
|
18
|
+
:parser => Fog::Parsers::Terremark::Network.new,
|
19
|
+
:path => "network/#{network_id}"
|
20
|
+
)
|
21
|
+
end
|
22
|
+
end
|
23
|
+
|
24
|
+
module Mock
|
25
|
+
def get_network(network_id)
|
26
|
+
network_id = network_id.to_i
|
27
|
+
response = Excon::Response.new
|
28
|
+
network = self.data[:organizations].map { |org| org[:vdcs].map { |vdc| vdc[:networks] } }.flatten.find { |network| network[:id] == network_id }
|
29
|
+
if network
|
30
|
+
|
31
|
+
body = { "links" => [],
|
32
|
+
"type" => "application/vnd.vmware.vcloud.network+xml",
|
33
|
+
"href" => "#{@base_url}/network/#{network_id}" }
|
34
|
+
|
35
|
+
network.each_key do |key|
|
36
|
+
body[key.to_s] = network[key]
|
37
|
+
end
|
38
|
+
|
39
|
+
link = { "name" => "IP Addresses",
|
40
|
+
"rel" => "down",
|
41
|
+
"type" => "application/xml" }
|
42
|
+
link["href"] = case self
|
43
|
+
when Fog::Terremark::Ecloud::Mock
|
44
|
+
"#{@base_url}/extensions/network/#{network_id}/ips"
|
45
|
+
when Fog::Terremark::Vcloud::Mock
|
46
|
+
"#{@base_url}/network/#{network_id}/ipAddresses"
|
47
|
+
end
|
48
|
+
body["links"] << link
|
49
|
+
|
50
|
+
response.status = 200
|
51
|
+
response.body = body
|
52
|
+
response.headers = Fog::Compute::Terremark::Mock.headers(response.body,
|
53
|
+
case self
|
54
|
+
when Fog::Terremark::Ecloud::Mock
|
55
|
+
"application/vnd.vmware.vcloud.network+xml"
|
56
|
+
when Fog::Terremark::Vcloud::Mock
|
57
|
+
"application/xml; charset=utf-8"
|
58
|
+
end
|
59
|
+
)
|
60
|
+
else
|
61
|
+
response.status = Fog::Compute::Terremark::Mock.unathorized_status
|
62
|
+
response.headers = Fog::Compute::Terremark::Mock.error_headers
|
63
|
+
end
|
64
|
+
|
65
|
+
response
|
66
|
+
end
|
67
|
+
end
|
68
|
+
end
|
69
|
+
end
|
70
|
+
end
|
@@ -0,0 +1,29 @@
|
|
1
|
+
module Fog
|
2
|
+
module Compute
|
3
|
+
module Terremark
|
4
|
+
module Real
|
5
|
+
# Get details for a Network
|
6
|
+
#
|
7
|
+
# ==== Parameters
|
8
|
+
# * network_id<~Integer> - Id of the network to look up
|
9
|
+
#
|
10
|
+
# ==== Returns
|
11
|
+
# * response<~Excon::Response>:
|
12
|
+
# * body<~Hash>:
|
13
|
+
# FIXME
|
14
|
+
def get_network_ips(network_id)
|
15
|
+
opts = {
|
16
|
+
:expects => 200,
|
17
|
+
:method => 'GET',
|
18
|
+
:parser => Fog::Parsers::Terremark::GetNetworkIps.new,
|
19
|
+
:path => "network/#{network_id}/ipAddresses"
|
20
|
+
}
|
21
|
+
if self.is_a?(Fog::Terremark::Ecloud::Real)
|
22
|
+
opts[:path] = "/extensions/network/#{network_id}/ips"
|
23
|
+
end
|
24
|
+
request(opts)
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
@@ -0,0 +1,29 @@
|
|
1
|
+
module Fog
|
2
|
+
module Compute
|
3
|
+
module Terremark
|
4
|
+
module Real
|
5
|
+
require 'fog/terremark/parsers/terremark/get_node_services'
|
6
|
+
|
7
|
+
# Get a list of all internet services for a vdc
|
8
|
+
#
|
9
|
+
# ==== Parameters
|
10
|
+
# * service_id<~Integer> - Id of internet service that we want a list of nodes for
|
11
|
+
#
|
12
|
+
# ==== Returns
|
13
|
+
# * response<~Excon::Response>:
|
14
|
+
# * body<~Hash>:
|
15
|
+
|
16
|
+
#
|
17
|
+
def get_node_services(service_id)
|
18
|
+
request(
|
19
|
+
:expects => 200,
|
20
|
+
:method => 'GET',
|
21
|
+
:parser => Fog::Parsers::Terremark::GetNodeServices.new,
|
22
|
+
:path => "api/extensions/v1.6/internetService/#{service_id}/nodeServices",
|
23
|
+
:override_path => true
|
24
|
+
)
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|