oraclecloud 1.0.0 → 1.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +3 -0
- data/lib/oraclecloud/client.rb +14 -4
- data/lib/oraclecloud/instance_request.rb +1 -1
- data/lib/oraclecloud/orchestrations.rb +2 -2
- data/lib/oraclecloud/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: fb91dc27431a829a92b8410ee1176a4c0e3652d4
|
4
|
+
data.tar.gz: 0d55cb121a613f2fd488b9c5730a9740d5e77ec5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 11e4eff48cbc99ec3fe94f7783383947b34c5d85ee7e8311459a5c9557462c04f966b581fc0c5b1fdda03aa2b89c9bece193a6c0341f41d4545bb523479f4dca
|
7
|
+
data.tar.gz: 6058dafde29ca9173ab44414a2869d659f7bf72300ec99a101fef27227b797d33e2f82d6b8974bff2e075a8b7dc40adf7276a5d9baad362400c669bae6afbc0f
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,8 @@
|
|
1
1
|
# oraclecloud client gem CHANGELOG
|
2
2
|
|
3
|
+
## v1.1.0 (2015-11-12)
|
4
|
+
* [pr#4](https://github.com/chef-partners/oracle-cloud-client/pull/4) Added support for non-public deployments of Oracle Cloud where the identity domain follows a different convention
|
5
|
+
|
3
6
|
## v1.0.0 (2015-10-15)
|
4
7
|
* Initial release
|
5
8
|
|
data/lib/oraclecloud/client.rb
CHANGED
@@ -17,6 +17,7 @@
|
|
17
17
|
#
|
18
18
|
|
19
19
|
require 'ffi_yajl'
|
20
|
+
require 'json'
|
20
21
|
require 'rest-client'
|
21
22
|
|
22
23
|
module OracleCloud
|
@@ -26,6 +27,7 @@ module OracleCloud
|
|
26
27
|
def initialize(opts)
|
27
28
|
@api_url = opts[:api_url]
|
28
29
|
@identity_domain = opts[:identity_domain]
|
30
|
+
@private_cloud = opts[:private_cloud] || false
|
29
31
|
@username = opts[:username]
|
30
32
|
@password = opts[:password]
|
31
33
|
@verify_ssl = opts.fetch(:verify_ssl, true)
|
@@ -86,12 +88,20 @@ module OracleCloud
|
|
86
88
|
false
|
87
89
|
end
|
88
90
|
|
91
|
+
def private_cloud?
|
92
|
+
@private_cloud
|
93
|
+
end
|
94
|
+
|
89
95
|
def username_with_domain
|
90
|
-
"#{
|
96
|
+
"#{full_identity_domain}/#{@username}"
|
91
97
|
end
|
92
98
|
|
93
|
-
def
|
94
|
-
|
99
|
+
def full_identity_domain
|
100
|
+
if private_cloud?
|
101
|
+
@identity_domain
|
102
|
+
else
|
103
|
+
"Compute-#{@identity_domain}"
|
104
|
+
end
|
95
105
|
end
|
96
106
|
|
97
107
|
def authenticate!
|
@@ -168,7 +178,7 @@ module OracleCloud
|
|
168
178
|
end
|
169
179
|
|
170
180
|
def url_with_identity_domain(type, path = '')
|
171
|
-
"/#{type}/#{
|
181
|
+
"/#{type}/#{full_identity_domain}/#{path}"
|
172
182
|
end
|
173
183
|
|
174
184
|
def http_get(request_type, url)
|
@@ -35,9 +35,9 @@ module OracleCloud
|
|
35
35
|
|
36
36
|
def create_request_payload
|
37
37
|
{
|
38
|
-
'name' => "#{client.
|
38
|
+
'name' => "#{client.full_identity_domain}/#{client.username}/#{create_opts[:name]}",
|
39
39
|
'relationships' => [],
|
40
|
-
'account' => "#{client.
|
40
|
+
'account' => "#{client.full_identity_domain}/default",
|
41
41
|
'description' => create_opts[:description],
|
42
42
|
'schedule' => { 'start_time' => nil, 'stop_time' => nil },
|
43
43
|
'uri' => nil,
|
data/lib/oraclecloud/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: oraclecloud
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Chef Partner Engineering
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-11-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rest-client
|