fog-openstack 1.1.3 → 1.1.5

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 875cc651549a0a511608a854c37921af998a4bddac743ea40f2e5e21ba305276
4
- data.tar.gz: 0eba3c4561a600fc74fb26e86ccae2764338477f249d8b200d8357a139a4f7e7
3
+ metadata.gz: 9ec4a88f44d8f16a049716fa0d49659759a19845d5e3bc6faf28782f82943b39
4
+ data.tar.gz: e15cd2db5aa37baad7effc046137f8de088bce7eddb8fc69255431e51d483a01
5
5
  SHA512:
6
- metadata.gz: '09508ee23c695352b96d869a87288ab92614c6a09663487048af0ec6c6b955768ddc3dc14fd61a51108af9550785b4a383d15e6ec704dc23ac3f4590fd397fd9'
7
- data.tar.gz: ce564ff2deba87dd0dd2d3916b0849441356c13e276ab3f8166d87e9a10d1d1fe87247da7958f17679a631b41f09bebb6d3c4da0f341522fec1f5a4a1a618c4b
6
+ metadata.gz: fca48675057519c7b76a213a2803d2528ec9ac6828e1f56bca7b0c1bec379c541d40d840a7046ff969edb3ca09c349911cf05d2386b81ca518573e5feb090c8c
7
+ data.tar.gz: 4c3246a07bdbad1d1f1530481a8752bd88ffbc8724275e374a4ad6f5f11b8dc3e9b670a2d2405c21866dba1d25dc991726bee8b8a82b4003136dbd6ab8b95b32
@@ -13,4 +13,4 @@ permissions:
13
13
 
14
14
  jobs:
15
15
  Shared:
16
- uses: fog/.github/.github/workflows/ci.yml@v1.4.0
16
+ uses: fog/.github/.github/workflows/ci.yml@v1.5.0
data/CHANGELOG.md CHANGED
@@ -1,3 +1,13 @@
1
+ # 1.1.5 2025/03/18
2
+
3
+ * add initial support for application credentials
4
+
5
+ # 1.1.4 2025/02/05
6
+
7
+ * fix DSL REST API v2 docs
8
+ * update to latest fog/.github
9
+ * fix namespace for OpenStack Orchestration utils
10
+
1
11
  # 1.1.3 2024/06/12
2
12
 
3
13
  * add support for application credentials to storage
data/docs/workflow.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  This document explains how to get started using OpenStack Workflow (Mistral) with Fog. It assumes you have read the [Getting Started with Fog and the OpenStack](getting_started.md) document.
4
4
 
5
- Fog uses the [OpenStack Mistral API](http://docs.openstack.org/developer/mistral/developer/webapi/v2.html).
5
+ Fog uses the [OpenStack Mistral API](http://docs.openstack.org/mistral/latest/user/rest_api_v2.html).
6
6
 
7
7
  ## Workflow Service
8
8
 
@@ -125,7 +125,7 @@ https://github.com/fog/fog-openstack/tree/master/examples/workflow/workflow-exam
125
125
  ## Additional Resources
126
126
 
127
127
  * [Mistral Wiki](https://wiki.openstack.org/wiki/Mistral)
128
- * [Mistral DSL v2](http://docs.openstack.org/developer/mistral/dsl/dsl_v2.html)
129
- * [Mistral API v2](http://docs.openstack.org/developer/mistral/developer/webapi/v2.html)
128
+ * [Mistral DSL v2](http://docs.openstack.org/mistral/ocata/dsl/dsl_v2.html)
129
+ * [Mistral API v2](http://docs.openstack.org/mistral/latest/user/rest_api_v2.html)
130
130
  * [Mistral python client](https://github.com/openstack/python-mistralclient) Can be useful to see how to interact with the API.
131
131
  * [more resources and feedback](common/resources.md)
@@ -0,0 +1,43 @@
1
+ require 'fog/openstack/models/model'
2
+
3
+ module Fog
4
+ module OpenStack
5
+ class Identity
6
+ class V3
7
+ class ApplicationCredential < Fog::OpenStack::Model
8
+ identity :id
9
+
10
+ attribute :description
11
+ attribute :name
12
+ attribute :roles
13
+ attribute :expires_at
14
+ attribute :user_id
15
+ attribute :secret
16
+
17
+ class << self
18
+ attr_accessor :cache
19
+ end
20
+
21
+ @cache = {}
22
+
23
+ def to_s
24
+ id.to_s
25
+ end
26
+
27
+ def destroy
28
+ requires :id
29
+ service.delete_application_credentials(id, user_id)
30
+ true
31
+ end
32
+
33
+ def create
34
+ merge_attributes(
35
+ service.create_application_credentials(attributes).body['application_credential']
36
+ )
37
+ self
38
+ end
39
+ end
40
+ end
41
+ end
42
+ end
43
+ end
@@ -0,0 +1,32 @@
1
+ require 'fog/openstack/models/collection'
2
+ require 'fog/openstack/identity/v3/models/os_credential'
3
+
4
+ module Fog
5
+ module OpenStack
6
+ class Identity
7
+ class V3
8
+ class ApplicationCredentials < Fog::OpenStack::Collection
9
+ model Fog::OpenStack::Identity::V3::ApplicationCredential
10
+
11
+ def all(options = {})
12
+ load_response(service.list_application_credentials(options), 'application_credentials')
13
+ end
14
+
15
+ def find_by_id(id, user_id)
16
+ cached_credential = all(user_id).find { |application_credential| application_credential.id == id }
17
+ return cached_credential if cached_credential
18
+ credential_hash = service.get_application_credentials(id, user_id).body['application_credential']
19
+ Fog::OpenStack::Identity::V3::ApplicationCredential.new(
20
+ credential_hash.merge(:service => service)
21
+ )
22
+ end
23
+
24
+ def destroy(id)
25
+ credential = find_by_id(id)
26
+ credential.destroy
27
+ end
28
+ end
29
+ end
30
+ end
31
+ end
32
+ end
@@ -30,6 +30,11 @@ module Fog
30
30
  service.list_user_projects(id).body['projects']
31
31
  end
32
32
 
33
+ def application_credentials
34
+ requires :id
35
+ service.list_application_credentials(id).body['application_credentials']
36
+ end
37
+
33
38
  def roles
34
39
  requires :id, :domain_id
35
40
  service.list_domain_user_roles(domain_id, id).body['roles']
@@ -0,0 +1,25 @@
1
+ module Fog
2
+ module OpenStack
3
+ class Identity
4
+ class V3
5
+ class Real
6
+ def create_application_credentials(credential = {})
7
+ user_id = credential.delete('user_id') || credential.delete(:user_id)
8
+ request(
9
+ :expects => [201],
10
+ :method => 'POST',
11
+ :path => "users/#{user_id}/application_credentials",
12
+ :body => Fog::JSON.encode(:application_credential => credential)
13
+ )
14
+ end
15
+ end
16
+
17
+ class Mock
18
+ def create_application_credentials(credential = {})
19
+ raise Fog::Errors::MockNotImplemented
20
+ end
21
+ end
22
+ end
23
+ end
24
+ end
25
+ end
@@ -0,0 +1,24 @@
1
+ module Fog
2
+ module OpenStack
3
+ class Identity
4
+ class V3
5
+ class Real
6
+ def delete_application_credentials(application_credential_id, user_id)
7
+ request(
8
+ :expects => [204],
9
+ :method => 'DELETE',
10
+ :path => "users/#{user_id}/application_credentials/#{application_credential_id}",
11
+ )
12
+ end
13
+ end
14
+
15
+ class Mock
16
+ def delete_application_credentials(application_credential_id, user_id)
17
+ raise Fog::Errors::MockNotImplemented
18
+ end
19
+ end
20
+ end
21
+ end
22
+ end
23
+ end
24
+
@@ -0,0 +1,24 @@
1
+ module Fog
2
+ module OpenStack
3
+ class Identity
4
+ class V3
5
+ class Real
6
+ def get_application_credentials(id, user_id)
7
+ request(
8
+ :expects => [200],
9
+ :method => 'GET',
10
+ :path => "users/#{user_id}/application_credentials/#{id}",
11
+ )
12
+ end
13
+ end
14
+
15
+ class Mock
16
+ def get_application_credentials(id, user_id)
17
+ raise Fog::Errors::MockNotImplemented
18
+ end
19
+ end
20
+ end
21
+ end
22
+ end
23
+ end
24
+
@@ -0,0 +1,23 @@
1
+ module Fog
2
+ module OpenStack
3
+ class Identity
4
+ class V3
5
+ class Real
6
+ def list_application_credentials(user_id)
7
+ request(
8
+ :expects => [200],
9
+ :method => 'GET',
10
+ :path => "users/#{user_id}/application_credentials",
11
+ )
12
+ end
13
+ end
14
+
15
+ class Mock
16
+ def list_application_credentials(user_id)
17
+ raise Fog::Errors::MockNotImplemented
18
+ end
19
+ end
20
+ end
21
+ end
22
+ end
23
+ end
@@ -37,6 +37,8 @@ module Fog
37
37
  collection :role_assignments
38
38
  model :os_credential
39
39
  collection :os_credentials
40
+ model :application_credential
41
+ collection :application_credentials
40
42
  model :policy
41
43
  collection :policies
42
44
 
@@ -111,12 +113,16 @@ module Fog
111
113
  request :create_os_credential
112
114
  request :update_os_credential
113
115
  request :delete_os_credential
116
+ request :list_application_credentials
117
+ request :create_application_credentials
118
+ request :delete_application_credentials
119
+ request :get_application_credentials
114
120
  request :list_policies
115
121
  request :get_policy
116
122
  request :create_policy
117
123
  request :update_policy
118
124
  request :delete_policy
119
-
125
+
120
126
  class Mock
121
127
  include Fog::OpenStack::Core
122
128
  def initialize(options = {})
@@ -37,7 +37,7 @@ module Fog
37
37
  # and replaces it with :template.
38
38
  # see https://github.com/openstack-infra/shade/blob/master/shade/openstackcloud.py#L1201
39
39
  # see https://developer.openstack.org/api-ref/orchestration/v1/index.html#create-stack
40
- file_resolver = Util::RecursiveHotFileLoader.new(options[:template] || options[:template_url], options[:files])
40
+ file_resolver = OrchestrationUtil::RecursiveHotFileLoader.new(options[:template] || options[:template_url], options[:files])
41
41
  options[:template] = file_resolver.template
42
42
  options[:files] = file_resolver.files unless file_resolver.files.empty?
43
43
 
@@ -1,5 +1,5 @@
1
1
  module Fog
2
2
  module OpenStack
3
- VERSION = '1.1.3'.freeze
3
+ VERSION = '1.1.5'.freeze
4
4
  end
5
5
  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.3
4
+ version: 1.1.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matt Darby
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2024-06-12 00:00:00.000000000 Z
11
+ date: 2025-03-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: fog-core
@@ -588,6 +588,8 @@ files:
588
588
  - lib/fog/openstack/identity/v2/requests/update_user.rb
589
589
  - lib/fog/openstack/identity/v2/requests/validate_token.rb
590
590
  - lib/fog/openstack/identity/v3.rb
591
+ - lib/fog/openstack/identity/v3/models/application_credential.rb
592
+ - lib/fog/openstack/identity/v3/models/application_credentials.rb
591
593
  - lib/fog/openstack/identity/v3/models/domain.rb
592
594
  - lib/fog/openstack/identity/v3/models/domains.rb
593
595
  - lib/fog/openstack/identity/v3/models/endpoint.rb
@@ -617,6 +619,7 @@ files:
617
619
  - lib/fog/openstack/identity/v3/requests/check_domain_user_role.rb
618
620
  - lib/fog/openstack/identity/v3/requests/check_project_group_role.rb
619
621
  - lib/fog/openstack/identity/v3/requests/check_project_user_role.rb
622
+ - lib/fog/openstack/identity/v3/requests/create_application_credentials.rb
620
623
  - lib/fog/openstack/identity/v3/requests/create_domain.rb
621
624
  - lib/fog/openstack/identity/v3/requests/create_endpoint.rb
622
625
  - lib/fog/openstack/identity/v3/requests/create_group.rb
@@ -626,6 +629,7 @@ files:
626
629
  - lib/fog/openstack/identity/v3/requests/create_role.rb
627
630
  - lib/fog/openstack/identity/v3/requests/create_service.rb
628
631
  - lib/fog/openstack/identity/v3/requests/create_user.rb
632
+ - lib/fog/openstack/identity/v3/requests/delete_application_credentials.rb
629
633
  - lib/fog/openstack/identity/v3/requests/delete_domain.rb
630
634
  - lib/fog/openstack/identity/v3/requests/delete_endpoint.rb
631
635
  - lib/fog/openstack/identity/v3/requests/delete_group.rb
@@ -635,6 +639,7 @@ files:
635
639
  - lib/fog/openstack/identity/v3/requests/delete_role.rb
636
640
  - lib/fog/openstack/identity/v3/requests/delete_service.rb
637
641
  - lib/fog/openstack/identity/v3/requests/delete_user.rb
642
+ - lib/fog/openstack/identity/v3/requests/get_application_credentials.rb
638
643
  - lib/fog/openstack/identity/v3/requests/get_domain.rb
639
644
  - lib/fog/openstack/identity/v3/requests/get_endpoint.rb
640
645
  - lib/fog/openstack/identity/v3/requests/get_group.rb
@@ -649,6 +654,7 @@ files:
649
654
  - lib/fog/openstack/identity/v3/requests/grant_project_group_role.rb
650
655
  - lib/fog/openstack/identity/v3/requests/grant_project_user_role.rb
651
656
  - lib/fog/openstack/identity/v3/requests/group_user_check.rb
657
+ - lib/fog/openstack/identity/v3/requests/list_application_credentials.rb
652
658
  - lib/fog/openstack/identity/v3/requests/list_domain_group_roles.rb
653
659
  - lib/fog/openstack/identity/v3/requests/list_domain_user_roles.rb
654
660
  - lib/fog/openstack/identity/v3/requests/list_domains.rb
@@ -1454,7 +1460,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
1454
1460
  - !ruby/object:Gem::Version
1455
1461
  version: '0'
1456
1462
  requirements: []
1457
- rubygems_version: 3.4.10
1463
+ rubygems_version: 3.5.18
1458
1464
  signing_key:
1459
1465
  specification_version: 4
1460
1466
  summary: OpenStack fog provider gem