fog-openstack 1.1.0.pre → 1.1.1
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/.github/FUNDING.yml +2 -0
- data/.github/dependabot.yml +10 -0
- data/.github/workflows/ci.yml +16 -0
- data/.github/workflows/linting.yml +1 -1
- data/CHANGELOG.md +8 -0
- data/SECURITY.md +6 -0
- data/examples/image/upload-test-image.rb +0 -0
- data/fog-openstack.gemspec +1 -1
- data/lib/fog/openstack/auth/token/v3.rb +11 -0
- data/lib/fog/openstack/compute/models/server.rb +1 -1
- data/lib/fog/openstack/compute.rb +2 -1
- data/lib/fog/openstack/core.rb +7 -4
- data/lib/fog/openstack/identity/v3.rb +2 -1
- data/lib/fog/openstack/network.rb +2 -1
- data/lib/fog/openstack/orchestration/util/recursive_hot_file_loader.rb +3 -3
- data/lib/fog/openstack/version.rb +1 -1
- metadata +11 -8
- data/.github/workflows/main.yml +0 -37
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f3adcbc3b2e1bfb5ec832857aadbf366addc242625e603eaa30277b0fedd646c
|
4
|
+
data.tar.gz: 265e0255ed0e95c7e7fc6bd7931ca09f3bf032f8ab7eef2e99bf13248b2e206d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 33e9423077610614300eb3349fa2b0e32058a3492d230e05f7d21b92ecbf6aba5caccd0bc438b4d692adc5bbea75982be4d0732b3db6e96f62a04b5e5e7febdc
|
7
|
+
data.tar.gz: ebb5f6115296d6a8d166f15a10900afa3e5ffff9abd43ba34907d53865b840afe0a2465d204e3c145dd16dbd7f0eec3a3ab010d86fe48bcc9bca6c5fd6d5b9c7
|
data/.github/FUNDING.yml
ADDED
@@ -0,0 +1,16 @@
|
|
1
|
+
name: CI
|
2
|
+
|
3
|
+
on:
|
4
|
+
push:
|
5
|
+
branches: [ master ]
|
6
|
+
pull_request:
|
7
|
+
branches: [ master ]
|
8
|
+
schedule:
|
9
|
+
- cron: '0 0 * * 1' # At 00:00 on Monday.
|
10
|
+
|
11
|
+
permissions:
|
12
|
+
contents: read
|
13
|
+
|
14
|
+
jobs:
|
15
|
+
Shared:
|
16
|
+
uses: fog/.github/.github/workflows/ci.yml@v1.4.0
|
data/CHANGELOG.md
CHANGED
data/SECURITY.md
ADDED
File without changes
|
data/fog-openstack.gemspec
CHANGED
@@ -34,5 +34,5 @@ Gem::Specification.new do |spec|
|
|
34
34
|
spec.add_development_dependency 'rubocop'
|
35
35
|
spec.add_development_dependency 'shindo', '~> 0.3'
|
36
36
|
spec.add_development_dependency 'vcr'
|
37
|
-
spec.add_development_dependency 'webmock', '~>
|
37
|
+
spec.add_development_dependency 'webmock', '~> 3.16.2'
|
38
38
|
end
|
@@ -18,6 +18,11 @@ module Fog
|
|
18
18
|
'methods' => ['token'],
|
19
19
|
'token' => {'id' => @token}
|
20
20
|
}
|
21
|
+
elsif @application_credential
|
22
|
+
{
|
23
|
+
'methods' => ['application_credential'],
|
24
|
+
'application_credential' => @application_credential
|
25
|
+
}
|
21
26
|
else
|
22
27
|
{
|
23
28
|
'methods' => ['password'],
|
@@ -50,6 +55,7 @@ module Fog
|
|
50
55
|
end
|
51
56
|
|
52
57
|
def scope
|
58
|
+
return nil if @application_credential
|
53
59
|
return @project.identity if @project
|
54
60
|
return @domain.identity if @domain
|
55
61
|
end
|
@@ -96,6 +102,11 @@ module Fog
|
|
96
102
|
|
97
103
|
if auth[:openstack_auth_token]
|
98
104
|
@token = auth[:openstack_auth_token]
|
105
|
+
elsif auth[:openstack_application_credential_id] and auth[:openstack_application_credential_secret]
|
106
|
+
@application_credential = {
|
107
|
+
:id => auth[:openstack_application_credential_id],
|
108
|
+
:secret => auth[:openstack_application_credential_secret],
|
109
|
+
}
|
99
110
|
else
|
100
111
|
@user = Fog::OpenStack::Auth::User.new(auth[:openstack_userid], auth[:openstack_username])
|
101
112
|
@user.password = auth[:openstack_api_key]
|
@@ -14,7 +14,8 @@ module Fog
|
|
14
14
|
:openstack_project_name, :openstack_project_id,
|
15
15
|
:openstack_project_domain, :openstack_user_domain, :openstack_domain_name,
|
16
16
|
:openstack_project_domain_id, :openstack_user_domain_id, :openstack_domain_id,
|
17
|
-
:openstack_identity_api_version
|
17
|
+
:openstack_identity_api_version, :openstack_application_credential_id,
|
18
|
+
:openstack_application_credential_secret
|
18
19
|
|
19
20
|
## MODELS
|
20
21
|
#
|
data/lib/fog/openstack/core.rb
CHANGED
@@ -16,6 +16,8 @@ module Fog
|
|
16
16
|
attr_reader :openstack_project_id
|
17
17
|
attr_reader :openstack_project_domain_id
|
18
18
|
attr_reader :openstack_identity_api_version
|
19
|
+
attr_reader :openstack_application_credential_id
|
20
|
+
attr_reader :openstack_application_credential_secret
|
19
21
|
|
20
22
|
# fallback
|
21
23
|
def self.not_found_class
|
@@ -184,10 +186,11 @@ module Fog
|
|
184
186
|
@openstack_can_reauthenticate = false
|
185
187
|
else
|
186
188
|
missing_credentials = []
|
187
|
-
|
188
|
-
|
189
|
-
|
190
|
-
|
189
|
+
unless @openstack_application_credential_secret and @openstack_application_credential_id
|
190
|
+
missing_credentials << :openstack_api_key unless @openstack_api_key
|
191
|
+
unless @openstack_username || @openstack_userid
|
192
|
+
missing_credentials << 'openstack_username/openstack_userid or openstack_application_credential_secret and openstack_application_credential_id'
|
193
|
+
end
|
191
194
|
end
|
192
195
|
unless missing_credentials.empty?
|
193
196
|
raise ArgumentError, "Missing required arguments: #{missing_credentials.join(', ')}"
|
@@ -13,7 +13,8 @@ module Fog
|
|
13
13
|
:openstack_user_domain_id, :openstack_project_domain_id,
|
14
14
|
:openstack_api_key, :openstack_current_user_id, :openstack_userid, :openstack_username,
|
15
15
|
:current_user, :current_user_id, :current_tenant,
|
16
|
-
:provider, :openstack_identity_api_version, :openstack_cache_ttl
|
16
|
+
:provider, :openstack_identity_api_version, :openstack_cache_ttl, :openstack_application_credential_id,
|
17
|
+
:openstack_application_credential_secret
|
17
18
|
|
18
19
|
model_path 'fog/openstack/identity/v3/models'
|
19
20
|
model :domain
|
@@ -13,7 +13,8 @@ module Fog
|
|
13
13
|
:openstack_project_name, :openstack_project_id,
|
14
14
|
:openstack_project_domain, :openstack_user_domain, :openstack_domain_name,
|
15
15
|
:openstack_project_domain_id, :openstack_user_domain_id, :openstack_domain_id,
|
16
|
-
:openstack_identity_api_version
|
16
|
+
:openstack_identity_api_version, :openstack_application_credential_id,
|
17
|
+
:openstack_application_credential_secret
|
17
18
|
|
18
19
|
## MODELS
|
19
20
|
#
|
@@ -68,12 +68,12 @@ module Fog
|
|
68
68
|
template = template_file
|
69
69
|
elsif template_is_raw?(template_file)
|
70
70
|
template_base_url = local_base_url
|
71
|
-
template = YAML.safe_load(template_file, [Date])
|
71
|
+
template = YAML.safe_load(template_file, :permitted_classes => [Date])
|
72
72
|
elsif template_is_url?(template_file)
|
73
73
|
template_file = normalise_file_path_to_url(template_file)
|
74
74
|
template_base_url = base_url_for_url(template_file)
|
75
75
|
raw_template = read_uri(template_file)
|
76
|
-
template = YAML.safe_load(raw_template, [Date])
|
76
|
+
template = YAML.safe_load(raw_template, :permitted_classes => [Date])
|
77
77
|
|
78
78
|
Fog::Logger.debug("Template visited: #{@visited}")
|
79
79
|
@visited.add(template_file)
|
@@ -212,7 +212,7 @@ module Fog
|
|
212
212
|
def deep_copy(item)
|
213
213
|
return item if item.kind_of?(String)
|
214
214
|
|
215
|
-
YAML.safe_load(YAML.dump(item), [Date])
|
215
|
+
YAML.safe_load(YAML.dump(item), :permitted_classes => [Date])
|
216
216
|
end
|
217
217
|
end
|
218
218
|
end
|
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: 1.1.
|
4
|
+
version: 1.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Matt Darby
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2024-05-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: fog-core
|
@@ -184,14 +184,14 @@ dependencies:
|
|
184
184
|
requirements:
|
185
185
|
- - "~>"
|
186
186
|
- !ruby/object:Gem::Version
|
187
|
-
version:
|
187
|
+
version: 3.16.2
|
188
188
|
type: :development
|
189
189
|
prerelease: false
|
190
190
|
version_requirements: !ruby/object:Gem::Requirement
|
191
191
|
requirements:
|
192
192
|
- - "~>"
|
193
193
|
- !ruby/object:Gem::Version
|
194
|
-
version:
|
194
|
+
version: 3.16.2
|
195
195
|
description: OpenStack fog provider gem.
|
196
196
|
email:
|
197
197
|
- matt.darby@rackspace.com
|
@@ -199,8 +199,10 @@ executables: []
|
|
199
199
|
extensions: []
|
200
200
|
extra_rdoc_files: []
|
201
201
|
files:
|
202
|
+
- ".github/FUNDING.yml"
|
203
|
+
- ".github/dependabot.yml"
|
204
|
+
- ".github/workflows/ci.yml"
|
202
205
|
- ".github/workflows/linting.yml"
|
203
|
-
- ".github/workflows/main.yml"
|
204
206
|
- ".gitignore"
|
205
207
|
- ".hound.yml"
|
206
208
|
- ".rubocop.yml"
|
@@ -214,6 +216,7 @@ files:
|
|
214
216
|
- LICENSE.md
|
215
217
|
- README.md
|
216
218
|
- Rakefile
|
219
|
+
- SECURITY.md
|
217
220
|
- bin/console
|
218
221
|
- bin/setup
|
219
222
|
- docker-compose.yml
|
@@ -1447,11 +1450,11 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
1447
1450
|
version: 2.2.0
|
1448
1451
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
1449
1452
|
requirements:
|
1450
|
-
- - "
|
1453
|
+
- - ">="
|
1451
1454
|
- !ruby/object:Gem::Version
|
1452
|
-
version:
|
1455
|
+
version: '0'
|
1453
1456
|
requirements: []
|
1454
|
-
rubygems_version: 3.
|
1457
|
+
rubygems_version: 3.4.22
|
1455
1458
|
signing_key:
|
1456
1459
|
specification_version: 4
|
1457
1460
|
summary: OpenStack fog provider gem
|
data/.github/workflows/main.yml
DELETED
@@ -1,37 +0,0 @@
|
|
1
|
-
# This workflow uses actions that are not certified by GitHub.
|
2
|
-
# They are provided by a third-party and are governed by
|
3
|
-
# separate terms of service, privacy policy, and support
|
4
|
-
# documentation.
|
5
|
-
# This workflow will download a prebuilt Ruby version, install dependencies and run tests with Rake
|
6
|
-
# For more information see: https://github.com/marketplace/actions/setup-ruby-jruby-and-truffleruby
|
7
|
-
|
8
|
-
name: Ruby
|
9
|
-
|
10
|
-
on:
|
11
|
-
push:
|
12
|
-
branches: [ master ]
|
13
|
-
pull_request:
|
14
|
-
branches: [ master ]
|
15
|
-
|
16
|
-
jobs:
|
17
|
-
test:
|
18
|
-
|
19
|
-
runs-on: ubuntu-latest
|
20
|
-
strategy:
|
21
|
-
matrix:
|
22
|
-
ruby-version: ['2.6', '2.7', '3.0']
|
23
|
-
|
24
|
-
steps:
|
25
|
-
- uses: actions/checkout@v2
|
26
|
-
- name: Set up Ruby
|
27
|
-
# To automatically get bug fixes and new Ruby versions for ruby/setup-ruby,
|
28
|
-
# change this to (see https://github.com/ruby/setup-ruby#versioning):
|
29
|
-
# uses: ruby/setup-ruby@v1
|
30
|
-
uses: ruby/setup-ruby@v1
|
31
|
-
with:
|
32
|
-
ruby-version: ${{ matrix.ruby-version }}
|
33
|
-
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
|
34
|
-
- name: Run unit tests
|
35
|
-
run: bundle exec rake tests:unit
|
36
|
-
- name: Run specs tests
|
37
|
-
run: bundle exec rake tests:spec
|