fog-openstack 0.2.1 → 0.2.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/README.md +8 -7
- data/examples/identity/basics.rb +4 -2
- data/examples/identity/basics_v3.rb +1 -3
- data/lib/fog/image/openstack/v2/models/image.rb +1 -1
- data/lib/fog/openstack/version.rb +1 -1
- data/lib/fog/storage/openstack.rb +0 -4
- data/lib/fog/storage/openstack/requests/get_object_https_url.rb +3 -3
- data/lib/fog/storage/openstack/requests/public_url.rb +2 -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: dd7c2060dd814a7a8348163937e8a1912789a29e
|
4
|
+
data.tar.gz: f5cd9bd84435b5502f0cc416c2aa98c24f4137fe
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 04d8c75eaa4931ad90290faadab052593a9ad9948876499b440273d278c4cc2e5a7f0aa6e5ecad30cb4eeed6d8dae7cff3453b4c6570bea8696b01781c00d867
|
7
|
+
data.tar.gz: 30b7cd277e256ee6a29077ffb74dc107216c84e4f102c7b92dba3ded1e2d33f7499002c0b3e522bf368628e31e14f7881a1a978e17a49aaf715bbaea3c2a8367
|
data/README.md
CHANGED
@@ -42,12 +42,12 @@ Checklist:
|
|
42
42
|
* All following examples assume that `@connection_params` is a hash of valid connection information for an OpenStack cloud.
|
43
43
|
* The `:openstack_username` and `:openstack_api_key` keys must map to a valid user/password combination in Keystone.
|
44
44
|
* If you don't know what domain your user belongs to, chances are it's the `default` domain. By default, all users are a member of the `default` domain unless otherwise specified.
|
45
|
-
|
45
|
+
* Keystone endpoints are version less. Version 3 is the default as v2.0 is deprecated. Meanwhile Keystone V3 still supports v2.0 for backward compatibility. Therefore passing a tenant instead of a project (along with a domain) makes Keystone provide v2.0 token.
|
46
46
|
Connection parameters:
|
47
47
|
|
48
48
|
```ruby
|
49
49
|
@connection_params = {
|
50
|
-
openstack_auth_url: "http://devstack.test:5000
|
50
|
+
openstack_auth_url: "http://devstack.test:5000",
|
51
51
|
openstack_username: "admin",
|
52
52
|
openstack_api_key: "password",
|
53
53
|
openstack_project_name: "admin",
|
@@ -55,14 +55,15 @@ Connection parameters:
|
|
55
55
|
}
|
56
56
|
```
|
57
57
|
|
58
|
-
If you're using Keystone V2, you don't need to supply domain details but ensure
|
58
|
+
If you're using Keystone V2, you don't need to supply domain details but ensure to either provide a tenant name (`openstack_tenant`)
|
59
|
+
or a tenant id (`openstack_tenant_id`). Alternatively you can use `:openstack_identity_api_version` parameter with 'v2.0'.
|
59
60
|
|
60
61
|
```ruby
|
61
62
|
@connection_params = {
|
62
|
-
openstack_auth_url:
|
63
|
-
openstack_username:
|
64
|
-
openstack_api_key:
|
65
|
-
|
63
|
+
openstack_auth_url: "http://devstack.test:5000",
|
64
|
+
openstack_username: "admin",
|
65
|
+
openstack_api_key: "password",
|
66
|
+
openstack_tenant: "admin"
|
66
67
|
}
|
67
68
|
```
|
68
69
|
|
data/examples/identity/basics.rb
CHANGED
@@ -3,13 +3,15 @@
|
|
3
3
|
require 'fog/openstack'
|
4
4
|
require 'pp'
|
5
5
|
|
6
|
-
auth_url = "https://example.net
|
6
|
+
auth_url = "https://example.net"
|
7
7
|
username = 'admin@example.net'
|
8
8
|
password = 'secret'
|
9
|
+
tenant = 'admin'
|
9
10
|
|
10
11
|
keystone = Fog::Identity::OpenStack.new :openstack_auth_url => auth_url,
|
11
12
|
:openstack_username => username,
|
12
|
-
:openstack_api_key => password
|
13
|
+
:openstack_api_key => password,
|
14
|
+
:openstack_tenant => tenant
|
13
15
|
# Optional, self-signed certs
|
14
16
|
#:connection_options => { :ssl_verify_peer => false }
|
15
17
|
|
@@ -3,14 +3,12 @@
|
|
3
3
|
require 'fog/openstack'
|
4
4
|
require 'pp'
|
5
5
|
|
6
|
-
auth_url = "https://example.net:35357
|
6
|
+
auth_url = "https://example.net:35357"
|
7
7
|
username = 'admin@example.net'
|
8
8
|
password = 'secret'
|
9
9
|
project = 'admin'
|
10
10
|
domain = 'Default'
|
11
11
|
|
12
|
-
|
13
|
-
|
14
12
|
keystone = Fog::Identity::OpenStack.new :openstack_auth_url => auth_url,
|
15
13
|
:openstack_username => username,
|
16
14
|
:openstack_api_key => password,
|
@@ -77,12 +77,8 @@ module Fog
|
|
77
77
|
@openstack_management_url = options[:openstack_management_url] || 'http://example:8774/v2/AUTH_1234'
|
78
78
|
|
79
79
|
@openstack_management_uri = URI.parse(@openstack_management_url)
|
80
|
-
|
81
|
-
@host = @openstack_management_uri.host
|
82
80
|
@path = @openstack_management_uri.path
|
83
81
|
@path.sub!(%r{/$}, '')
|
84
|
-
@port = @openstack_management_uri.port
|
85
|
-
@scheme = @openstack_management_uri.scheme
|
86
82
|
end
|
87
83
|
|
88
84
|
def data
|
@@ -38,9 +38,9 @@ module Fog
|
|
38
38
|
raise ArgumentError, "Insufficient parameters specified." unless container && object && expires && method
|
39
39
|
raise ArgumentError, "Storage must be instantiated with the :openstack_temp_url_key option" if @openstack_temp_url_key.nil?
|
40
40
|
|
41
|
-
scheme = options[:scheme] || @scheme
|
42
|
-
host = options[:host] || @host
|
43
|
-
port = options[:port] || @port
|
41
|
+
scheme = options[:scheme] || @openstack_management_uri.scheme
|
42
|
+
host = options[:host] || @openstack_management_uri.host
|
43
|
+
port = options[:port] || @openstack_management_uri.port
|
44
44
|
|
45
45
|
# POST not allowed
|
46
46
|
allowed_methods = %w(GET PUT HEAD)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fog-openstack
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Matt Darby
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-09-
|
11
|
+
date: 2018-09-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: fog-core
|