fog-ecloud 0.1.1 → 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/fog/compute/ecloud.rb +4 -4
- data/lib/fog/compute/ecloud/models/admin_organization.rb +5 -0
- data/lib/fog/compute/ecloud/models/compute_pool.rb +13 -0
- data/lib/fog/compute/ecloud/models/environment.rb +18 -0
- data/lib/fog/compute/ecloud/models/environments.rb +12 -2
- data/lib/fog/compute/ecloud/models/internet_service.rb +6 -0
- data/lib/fog/compute/ecloud/models/ip_address.rb +5 -0
- data/lib/fog/compute/ecloud/models/layout.rb +5 -0
- data/lib/fog/compute/ecloud/models/location.rb +5 -0
- data/lib/fog/compute/ecloud/models/network.rb +6 -0
- data/lib/fog/compute/ecloud/models/node.rb +5 -0
- data/lib/fog/compute/ecloud/models/operating_system_family.rb +5 -0
- data/lib/fog/compute/ecloud/models/organization.rb +13 -0
- data/lib/fog/compute/ecloud/models/organizations.rb +5 -0
- data/lib/fog/compute/ecloud/models/server.rb +9 -0
- data/lib/fog/compute/ecloud/models/trusted_network_group.rb +5 -0
- data/lib/fog/ecloud/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0ec8e33430c2f7d0e58e5f35e129e0299c535e71
|
4
|
+
data.tar.gz: 04fe961db178cc2ea233cc763e2e04fdfc7ab866
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9c960b0135d9e5a89fb2bbe8217ff72f21e9017f9c6f0ce28c83a13febbbae67eaca6d1ae12398e0aebdc99256ecb6ff05a9a2729f9394815311f428e204441b
|
7
|
+
data.tar.gz: 7f35e38111a6b82c25e5c950f91ddfb42b4dff4b59d63612262e440f457e2e88b120d69aeea534bdd5d4cd02cc545aabfcd81ab6496390bfc0827b7caef211bc
|
data/lib/fog/compute/ecloud.rb
CHANGED
@@ -289,8 +289,8 @@ module Fog
|
|
289
289
|
@persistent = options[:persistent] || false
|
290
290
|
@version = options[:ecloud_version] || "2013-06-01"
|
291
291
|
@authentication_method = options[:ecloud_authentication_method] || :cloud_api_auth
|
292
|
-
@access_key = options[:ecloud_access_key]
|
293
|
-
@private_key = options[:ecloud_private_key]
|
292
|
+
@access_key = options[:ecloud_access_key].to_s
|
293
|
+
@private_key = options[:ecloud_private_key].to_s
|
294
294
|
if @private_key.nil? || @authentication_method == :basic_auth
|
295
295
|
@authentication_method = :basic_auth
|
296
296
|
@username = options[:ecloud_username]
|
@@ -308,7 +308,7 @@ module Fog
|
|
308
308
|
if params[:uri].is_a?(String)
|
309
309
|
params[:uri] = URI.parse(@host + params[:uri])
|
310
310
|
end
|
311
|
-
host_url = "#{params[:uri].scheme}://#{params[:uri].host}#{params[:uri].port ?
|
311
|
+
host_url = "#{params[:uri].scheme}://#{params[:uri].host}#{params[:uri].port ? ":#{params[:uri].port}" : ''}"
|
312
312
|
|
313
313
|
# Hash connections on the host_url ... There"s nothing to say we won"t get URI"s that go to
|
314
314
|
# different hosts.
|
@@ -401,7 +401,7 @@ module Fog
|
|
401
401
|
# section 5.6.3.3 in the ~1000 page pdf spec
|
402
402
|
def canonicalize_resource(path)
|
403
403
|
uri, query_string = path.split("?")
|
404
|
-
return uri if query_string.nil?
|
404
|
+
return uri.downcase if query_string.nil?
|
405
405
|
query_string_pairs = query_string.split("&").sort.map { |e| e.split("=") }
|
406
406
|
tm_query_string = query_string_pairs.map { |x| "#{x.first.downcase}:#{x.last}" }.join("\n")
|
407
407
|
"#{uri.downcase}\n#{tm_query_string}\n"
|
@@ -64,6 +64,19 @@ module Fog
|
|
64
64
|
def id
|
65
65
|
href.scan(/\d+/)[0]
|
66
66
|
end
|
67
|
+
|
68
|
+
def reload
|
69
|
+
@servers = nil
|
70
|
+
@layout = nil
|
71
|
+
@cpu_usage = nil
|
72
|
+
@memory_usage = nil
|
73
|
+
@storage_usage = nil
|
74
|
+
@operating_system_families = nil
|
75
|
+
@templates = nil
|
76
|
+
@detached_disks = nil
|
77
|
+
@environment = nil
|
78
|
+
super
|
79
|
+
end
|
67
80
|
end
|
68
81
|
end
|
69
82
|
end
|
@@ -104,6 +104,24 @@ module Fog
|
|
104
104
|
self.service.organizations.new(organization_link)
|
105
105
|
end
|
106
106
|
end
|
107
|
+
|
108
|
+
def reload
|
109
|
+
@public_ips = nil
|
110
|
+
@internet_services = nil
|
111
|
+
@node_services = nil
|
112
|
+
@backup_internet_services = nil
|
113
|
+
@networks = nil
|
114
|
+
@layout = nil
|
115
|
+
@rows = nil
|
116
|
+
@tasks = nil
|
117
|
+
@firewall_acls = nil
|
118
|
+
@compute_pools = nil
|
119
|
+
@physical_devices = nil
|
120
|
+
@trusted_network_groups = nil
|
121
|
+
@rnats = nil
|
122
|
+
@organization = nil
|
123
|
+
super
|
124
|
+
end
|
107
125
|
end
|
108
126
|
Vdc = Environment
|
109
127
|
end
|
@@ -12,8 +12,18 @@ module Fog
|
|
12
12
|
|
13
13
|
def all
|
14
14
|
data = []
|
15
|
-
service.get_organization(href).body[:Locations][:Location]
|
16
|
-
|
15
|
+
raw_location = service.get_organization(href).body[:Locations][:Location]
|
16
|
+
if raw_location.is_a?(Array)
|
17
|
+
# If there's more than one location, the XML parser returns an
|
18
|
+
# array.
|
19
|
+
location = raw_location
|
20
|
+
else
|
21
|
+
# Otherwise it returns a hash.
|
22
|
+
location = [raw_location]
|
23
|
+
end
|
24
|
+
|
25
|
+
location.each do |l|
|
26
|
+
environments = l[:Environments]
|
17
27
|
next unless environments
|
18
28
|
if environments[:Environment].is_a?(Array)
|
19
29
|
environments[:Environment].each { |e| data << e }
|
@@ -39,6 +39,19 @@ module Fog
|
|
39
39
|
end
|
40
40
|
end
|
41
41
|
|
42
|
+
# Set instance variables for child collections/models to nil so that they will be reloaded correctly
|
43
|
+
#
|
44
|
+
# @return nothing
|
45
|
+
def reload
|
46
|
+
@locations = nil
|
47
|
+
@environments = nil
|
48
|
+
@tags = nil
|
49
|
+
@admin = nil
|
50
|
+
@users = nil
|
51
|
+
@support_tickets = nil
|
52
|
+
super
|
53
|
+
end
|
54
|
+
|
42
55
|
def edit_authentication_levels(options = {})
|
43
56
|
options[:uri] = "#{service.base_path}/admin/organizations/#{id}/authenticationLevels"
|
44
57
|
data = service.admin_edit_authentication_levels(options).body
|
data/lib/fog/ecloud/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fog-ecloud
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
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: 2015-
|
11
|
+
date: 2015-06-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: fog-core
|