misty 1.4.0 → 1.5.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (153) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +87 -88
  3. data/lib/misty.rb +115 -1
  4. data/lib/misty/auth/catalog.rb +38 -0
  5. data/lib/misty/auth/catalog/v2.rb +15 -0
  6. data/lib/misty/auth/catalog/v3.rb +15 -0
  7. data/lib/misty/auth/token.rb +70 -0
  8. data/lib/misty/auth/token/v2.rb +63 -0
  9. data/lib/misty/auth/token/v3.rb +90 -0
  10. data/lib/misty/cloud.rb +74 -15
  11. data/lib/misty/config.rb +37 -43
  12. data/lib/misty/errors.rb +25 -5
  13. data/lib/misty/helper.rb +26 -0
  14. data/lib/misty/http/header.rb +3 -6
  15. data/lib/misty/http/method_builder.rb +2 -2
  16. data/lib/misty/http/request.rb +3 -3
  17. data/lib/misty/microversion.rb +12 -1
  18. data/lib/misty/misty.rb +7 -62
  19. data/lib/misty/openstack.rb +39 -0
  20. data/lib/misty/openstack/{aodh → api/aodh}/aodh_v2.rb +1 -1
  21. data/lib/misty/openstack/api/aodh/v2.rb +19 -0
  22. data/lib/misty/openstack/api/barbican/barbican_v1.rb +42 -0
  23. data/lib/misty/openstack/api/barbican/v1.rb +19 -0
  24. data/lib/misty/openstack/api/blazar/blazar_v1.rb +16 -0
  25. data/lib/misty/openstack/api/blazar/v1.rb +19 -0
  26. data/lib/misty/openstack/{ceilometer → api/ceilometer}/ceilometer_v2.rb +1 -1
  27. data/lib/misty/openstack/api/ceilometer/v2.rb +19 -0
  28. data/lib/misty/openstack/{cinder → api/cinder}/cinder_v1.rb +1 -1
  29. data/lib/misty/openstack/{cinder → api/cinder}/cinder_v2.rb +3 -3
  30. data/lib/misty/openstack/{cinder → api/cinder}/cinder_v3.rb +7 -4
  31. data/lib/misty/openstack/api/cinder/v1.rb +23 -0
  32. data/lib/misty/openstack/api/cinder/v2.rb +24 -0
  33. data/lib/misty/openstack/api/cinder/v3.rb +29 -0
  34. data/lib/misty/openstack/{designate → api/designate}/designate_v2.rb +2 -2
  35. data/lib/misty/openstack/api/designate/v2.rb +19 -0
  36. data/lib/misty/openstack/{freezer → api/freezer}/freezer_v1.rb +2 -2
  37. data/lib/misty/openstack/api/freezer/v1.rb +19 -0
  38. data/lib/misty/openstack/{glance → api/glance}/glance_v1.rb +1 -1
  39. data/lib/misty/openstack/{glance → api/glance}/glance_v2.rb +1 -1
  40. data/lib/misty/openstack/api/glance/v1.rb +19 -0
  41. data/lib/misty/openstack/api/glance/v2.rb +24 -0
  42. data/lib/misty/openstack/api/gnocchi/gnocchi_v1.rb +39 -0
  43. data/lib/misty/openstack/api/gnocchi/v1.rb +19 -0
  44. data/lib/misty/openstack/{heat → api/heat}/heat_v1.rb +1 -1
  45. data/lib/misty/openstack/api/heat/v1.rb +23 -0
  46. data/lib/misty/openstack/{ironic → api/ironic}/ironic_v1.rb +8 -2
  47. data/lib/misty/openstack/api/ironic/v1.rb +25 -0
  48. data/lib/misty/openstack/{karbor → api/karbor}/karbor_v1.rb +2 -2
  49. data/lib/misty/openstack/api/karbor/v1.rb +19 -0
  50. data/lib/misty/openstack/{keystone → api/keystone}/keystone_v2_0.rb +1 -1
  51. data/lib/misty/openstack/api/keystone/keystone_v2_0_ext.rb +14 -0
  52. data/lib/misty/openstack/{keystone → api/keystone}/keystone_v3.rb +35 -3
  53. data/lib/misty/openstack/{keystone → api/keystone}/keystone_v3_ext.rb +7 -9
  54. data/lib/misty/openstack/api/keystone/v2_0.rb +23 -0
  55. data/lib/misty/openstack/api/keystone/v3.rb +23 -0
  56. data/lib/misty/openstack/{magnum → api/magnum}/magnum_v1.rb +2 -2
  57. data/lib/misty/openstack/api/magnum/v1.rb +21 -0
  58. data/lib/misty/openstack/{manila → api/manila}/manila_v2.rb +7 -3
  59. data/lib/misty/openstack/api/manila/v2.rb +25 -0
  60. data/lib/misty/openstack/api/masakari/masakari_v1_0.rb +22 -0
  61. data/lib/misty/openstack/api/masakari/v1_0.rb +19 -0
  62. data/lib/misty/openstack/api/mistral/mistral_v2.rb +44 -0
  63. data/lib/misty/openstack/api/mistral/v2.rb +19 -0
  64. data/lib/misty/openstack/api/monasca/monasca_v2_0.rb +28 -0
  65. data/lib/misty/openstack/api/monasca/v2_0.rb +19 -0
  66. data/lib/misty/openstack/{murano → api/murano}/murano_v1.rb +1 -1
  67. data/lib/misty/openstack/api/murano/v1.rb +19 -0
  68. data/lib/misty/openstack/{neutron → api/neutron}/neutron_v2_0.rb +11 -12
  69. data/lib/misty/openstack/api/neutron/v2_0.rb +19 -0
  70. data/lib/misty/openstack/{nova → api/nova}/nova_v2_1.rb +1 -2
  71. data/lib/misty/openstack/api/nova/v2_1.rb +33 -0
  72. data/lib/misty/openstack/{octavia → api/octavia}/octavia_v2_0.rb +4 -3
  73. data/lib/misty/openstack/api/octavia/v2_0.rb +19 -0
  74. data/lib/misty/openstack/api/panko/panko_v2.rb +14 -0
  75. data/lib/misty/openstack/api/panko/v2.rb +19 -0
  76. data/lib/misty/openstack/api/placement/placement_v2_1.rb +50 -0
  77. data/lib/misty/openstack/api/placement/v2_1.rb +21 -0
  78. data/lib/misty/openstack/{sahara → api/sahara}/sahara_v1_1.rb +2 -2
  79. data/lib/misty/openstack/api/sahara/v1_1.rb +19 -0
  80. data/lib/misty/openstack/{searchlight → api/searchlight}/searchlight_v1.rb +2 -2
  81. data/lib/misty/openstack/api/searchlight/v1.rb +19 -0
  82. data/lib/misty/openstack/{senlin → api/senlin}/senlin_v1.rb +2 -2
  83. data/lib/misty/openstack/api/senlin/v1.rb +19 -0
  84. data/lib/misty/openstack/{swift → api/swift}/swift_v1.rb +2 -2
  85. data/lib/misty/openstack/api/swift/v1.rb +34 -0
  86. data/lib/misty/openstack/{tacker → api/tacker}/tacker_v1_0.rb +2 -2
  87. data/lib/misty/openstack/api/tacker/v1_0.rb +19 -0
  88. data/lib/misty/openstack/{trove → api/trove}/trove_v1_0.rb +23 -8
  89. data/lib/misty/openstack/api/trove/v1_0.rb +19 -0
  90. data/lib/misty/openstack/api/watcher/v1.rb +19 -0
  91. data/lib/misty/openstack/api/watcher/watcher_v1.rb +38 -0
  92. data/lib/misty/openstack/api/zaqar/v2.rb +19 -0
  93. data/lib/misty/openstack/{zaqar → api/zaqar}/zaqar_v2.rb +2 -2
  94. data/lib/misty/openstack/api/zun/v1.rb +19 -0
  95. data/lib/misty/openstack/api/zun/zun_v1.rb +55 -0
  96. data/lib/misty/openstack/service.rb +18 -15
  97. data/lib/misty/openstack/service_pack.rb +18 -0
  98. data/lib/misty/service.rb +4 -6
  99. data/lib/misty/services.rb +11 -10
  100. data/lib/misty/version.rb +1 -1
  101. data/test/integration/compute_test.rb +2 -2
  102. data/test/integration/{networking_test.rb → network_test.rb} +10 -10
  103. data/test/integration/orchestration_test.rb +4 -4
  104. data/test/integration/vcr/{networking_using_neutron_v2_0.yml → network_using_neutron_v2_0.yml} +0 -0
  105. data/test/unit/auth/catalog_test.rb +99 -0
  106. data/test/unit/{auth_test.rb → auth/token_test.rb} +79 -45
  107. data/test/unit/cloud/config_test.rb +79 -41
  108. data/test/unit/cloud/requests_test.rb +6 -6
  109. data/test/unit/cloud/services_test.rb +23 -23
  110. data/test/unit/cloud_test.rb +10 -10
  111. data/test/unit/http/method_builder_test.rb +13 -23
  112. data/test/unit/http/request_test.rb +1 -1
  113. data/test/unit/microversion_test.rb +13 -16
  114. data/test/unit/misty_test.rb +51 -49
  115. data/test/unit/openstack/APIs_test.rb +5 -9
  116. data/test/unit/openstack/extension_test.rb +6 -6
  117. data/test/unit/openstack/service_test.rb +2 -10
  118. data/test/unit/service_helper.rb +3 -8
  119. data/test/unit/services_test.rb +5 -5
  120. metadata +91 -66
  121. data/lib/misty/auth.rb +0 -91
  122. data/lib/misty/auth/auth_v2.rb +0 -65
  123. data/lib/misty/auth/auth_v3.rb +0 -89
  124. data/lib/misty/autoload.rb +0 -99
  125. data/lib/misty/client_pack.rb +0 -16
  126. data/lib/misty/openstack/aodh/v2.rb +0 -17
  127. data/lib/misty/openstack/ceilometer/v2.rb +0 -17
  128. data/lib/misty/openstack/cinder/v1.rb +0 -21
  129. data/lib/misty/openstack/cinder/v2.rb +0 -22
  130. data/lib/misty/openstack/cinder/v3.rb +0 -31
  131. data/lib/misty/openstack/designate/v2.rb +0 -17
  132. data/lib/misty/openstack/freezer/v1.rb +0 -17
  133. data/lib/misty/openstack/glance/v1.rb +0 -17
  134. data/lib/misty/openstack/glance/v2.rb +0 -17
  135. data/lib/misty/openstack/heat/v1.rb +0 -21
  136. data/lib/misty/openstack/ironic/v1.rb +0 -27
  137. data/lib/misty/openstack/karbor/v1.rb +0 -17
  138. data/lib/misty/openstack/keystone/keystone_v2_0_ext.rb +0 -18
  139. data/lib/misty/openstack/keystone/v2_0.rb +0 -21
  140. data/lib/misty/openstack/keystone/v3.rb +0 -21
  141. data/lib/misty/openstack/magnum/v1.rb +0 -23
  142. data/lib/misty/openstack/manila/v2.rb +0 -27
  143. data/lib/misty/openstack/murano/v1.rb +0 -17
  144. data/lib/misty/openstack/neutron/v2_0.rb +0 -17
  145. data/lib/misty/openstack/nova/v2_1.rb +0 -42
  146. data/lib/misty/openstack/octavia/v2_0.rb +0 -17
  147. data/lib/misty/openstack/sahara/v1_1.rb +0 -17
  148. data/lib/misty/openstack/searchlight/v1.rb +0 -17
  149. data/lib/misty/openstack/senlin/v1.rb +0 -17
  150. data/lib/misty/openstack/swift/v1.rb +0 -32
  151. data/lib/misty/openstack/tacker/v1_0.rb +0 -17
  152. data/lib/misty/openstack/trove/v1_0.rb +0 -17
  153. data/lib/misty/openstack/zaqar/v2.rb +0 -17
@@ -1,12 +1,25 @@
1
1
  module Misty
2
2
  module Auth
3
3
  class AuthenticationError < StandardError; end
4
- class CatalogError < StandardError; end
5
- class TokenError < StandardError; end
4
+ class InitError < RuntimeError; end
6
5
 
7
- class ExpiryError < RuntimeError; end
8
- class InitError < RuntimeError; end
9
- class URLError < RuntimeError; end
6
+ module Catalog
7
+ class EndpointError < StandardError; end
8
+ class ServiceTypeError < StandardError; end
9
+ end
10
+
11
+ module Token
12
+ class ExpiryError < RuntimeError; end
13
+ class URLError < RuntimeError; end
14
+ end
15
+
16
+ module V2
17
+ class CredentialsError < RuntimeError; end
18
+ end
19
+
20
+ module V3
21
+ class DomainScopeError < RuntimeError; end
22
+ end
10
23
  end
11
24
 
12
25
  class Config
@@ -14,6 +27,13 @@ module Misty
14
27
  class InvalidDataError < StandardError; end
15
28
  end
16
29
 
30
+ module HTTP
31
+ class Header
32
+ class ArgumentError < RuntimeError; end
33
+ class TypeError < RuntimeError; end
34
+ end
35
+ end
36
+
17
37
  module Microversion
18
38
  class VersionError < RuntimeError; end
19
39
  end
@@ -0,0 +1,26 @@
1
+ module Misty
2
+ module Helper
3
+ def self.json_encode?(data)
4
+ return true if data.is_a?(Array) || data.is_a?(Hash)
5
+ if data.is_a?(String)
6
+ begin
7
+ JSON.parse(data)
8
+ rescue JSON::ParserError
9
+ return false
10
+ else
11
+ return true
12
+ end
13
+ end
14
+ return false
15
+ end
16
+
17
+
18
+ def self.to_json(data)
19
+ if data.is_a? String
20
+ JSON.parse(data)
21
+ return data
22
+ end
23
+ return JSON.dump(data)
24
+ end
25
+ end
26
+ end
@@ -1,14 +1,11 @@
1
1
  module Misty
2
2
  module HTTP
3
3
  class Header
4
- class ArgumentError < RuntimeError; end
5
- class TypeError < RuntimeError; end
6
-
7
4
  def self.valid?(param)
8
- raise Misty::HTTP::Header::TypeError unless param.class == Hash
5
+ raise TypeError unless param.class == Hash
9
6
  param.each do |key, val|
10
- raise Misty::HTTP::Header::ArgumentError unless key.class == String
11
- raise Misty::HTTP::Header::ArgumentError unless val.class == String
7
+ raise ArgumentError unless key.class == String
8
+ raise ArgumentError unless val.class == String
12
9
  end
13
10
  true
14
11
  end
@@ -12,9 +12,9 @@ module Misty
12
12
  private
13
13
 
14
14
  def process_data(header, args)
15
- if args.size == 1 && Misty.json_encode?(args[0])
15
+ if args.size == 1 && Misty::Helper.json_encode?(args[0])
16
16
  header.add('Content-Type' => 'application/json')
17
- return Misty.to_json(args[0])
17
+ return Misty::Helper.to_json(args[0])
18
18
  elsif args.size == 1
19
19
  return args[0]
20
20
  end
@@ -23,10 +23,10 @@ module Misty
23
23
  end
24
24
 
25
25
  def http(request)
26
- request['X-Auth-Token'] = @auth.get_token
26
+ request['X-Auth-Token'] = @token.get
27
27
 
28
28
  Misty::HTTP::NetHTTP.http_request(
29
- @uri, ssl_verify_mode: @ssl_verify_mode, log: @log
29
+ @endpoint, ssl_verify_mode: @ssl_verify_mode, log: @log
30
30
  ) do |connection|
31
31
  response = connection.request(request)
32
32
  response.body = JSON.parse(response.body) if decode?(response)
@@ -86,7 +86,7 @@ module Misty
86
86
  end
87
87
 
88
88
  def http_to_s(verb, path, headers, data = nil)
89
- log = "HTTP #{verb} base_url='#{@uri.host}:#{@uri.port}', path='#{path}', header=#{headers}"
89
+ log = "HTTP #{verb} '#{@endpoint.host}:#{@endpoint.port}/#{path}', header=#{headers}"
90
90
  log << ", data='#{data}'" if data
91
91
  log
92
92
  end
@@ -16,11 +16,22 @@ module Misty
16
16
  end
17
17
 
18
18
  def microversion_header(version)
19
- {'X-Openstack-API-Version' => "#{service_names[0]} #{version}" }
19
+ {'X-Openstack-API-Version' => "#{service_types[0]} #{version}" }
20
20
  end
21
21
 
22
22
  private
23
23
 
24
+ def get_microversion
25
+ project = self.class.to_s.split('::')[-2].downcase.to_sym
26
+ s = Misty.services.find {|service| service.project == project}
27
+ raise RuntimeError, 'No microversion found!' unless s&.microversion
28
+ s.microversion
29
+ end
30
+
31
+ def microversion
32
+ @microversion ||= get_microversion
33
+ end
34
+
24
35
  def versions
25
36
  @versions ||= versions_fetch
26
37
  end
@@ -1,70 +1,15 @@
1
1
  require 'misty/services'
2
- require 'logger'
3
-
4
- # Misty is a HTTP client for OpenStack APIs, aiming to be fast, flexible and exhaustive.
5
- # Misty acts as a conduit to OpenStack APIs by handling requests as transparently as possible.
2
+ require 'misty/helper'
3
+ require 'misty/openstack'
6
4
 
7
5
  module Misty
8
- SERVICES = [
9
- { name: :application_catalog, project: :murano, versions: ['v1']},
10
- { name: :alarming, project: :aodh, versions: ['v2']},
11
- { name: :backup, project: :freezer, versions: ['v1']},
12
- { name: :baremetal, project: :ironic, versions: ['v1'], microversion: 'v1'},
13
- { name: :block_storage, project: :cinder, versions: ['v3', 'v2', 'v1'], microversion: 'v3'},
14
- { name: :clustering, project: :senlin, versions: ['v1']},
15
- { name: :compute, project: :nova, versions: ['v2.1'], microversion: 'v2.1'},
16
- { name: :container_infrastructure_management, project: :magnum, versions: ['v1'], microversion: 'v1'},
17
- { name: :data_processing, project: :sahara, versions: ['v1.1']},
18
- { name: :data_protection_orchestration, project: :karbor, versions: ['v1']},
19
- { name: :database, project: :trove, versions: ['v1.0']},
20
- { name: :dns , project: :designate, versions: ['v2']},
21
- { name: :identity, project: :keystone, versions: ['v3', 'v2.0']},
22
- { name: :image, project: :glance, versions: ['v2', 'v1']},
23
- { name: :load_balancer, project: :octavia, versions: ['v2.0']},
24
- { name: :messaging, project: :zaqar, versions: ['v2']},
25
- { name: :metering, project: :ceilometer, versions: ['v2']},
26
- { name: :networking, project: :neutron, versions: ['v2.0']},
27
- { name: :nfv_orchestration, project: :tacker, versions: ['v1.0']},
28
- { name: :object_storage, project: :swift, versions: ['v1']},
29
- { name: :orchestration, project: :heat, versions: ['v1']},
30
- { name: :search, project: :searchlight, versions: ['v1']},
31
- { name: :shared_file_systems, project: :manila, versions: ['v2'], microversion: 'v2'}
32
- ]
33
-
34
- # Default Domain ID
35
- DOMAIN_ID = 'default'
36
-
37
- def self.json_encode?(data)
38
- return true if data.is_a?(Array) || data.is_a?(Hash)
39
- if data.is_a?(String)
40
- begin
41
- JSON.parse(data)
42
- rescue JSON::ParserError
43
- return false
44
- else
45
- return true
46
- end
47
- end
48
- return false
6
+ def self.build(list)
7
+ services_list = Misty::Services.new
8
+ list.each {|s| services_list.add(s)}
9
+ services_list
49
10
  end
50
11
 
51
- # Provides list of supported services
52
- # ==== Example
53
- # pp Misty.services
54
-
55
12
  def self.services
56
- services = Misty::Services.new
57
- SERVICES.each do |service|
58
- services.add(service)
59
- end
60
- services
61
- end
62
-
63
- def self.to_json(data)
64
- if data.is_a? String
65
- JSON.parse(data)
66
- return data
67
- end
68
- return JSON.dump(data)
13
+ @services ||= build(Misty::Openstack::SERVICES)
69
14
  end
70
15
  end
@@ -0,0 +1,39 @@
1
+ module Misty
2
+ module Openstack
3
+ SERVICES = [
4
+ {:type=>:application_catalog, :project=>:murano, :versions=>["v1"]},
5
+ {:type=>:alarming, :project=>:aodh, :versions=>["v2"]},
6
+ {:type=>:backup, :project=>:freezer, :versions=>["v1"]},
7
+ {:type=>:baremetal, :project=>:ironic, :versions=>["v1"], :microversion=>"1.32"},
8
+ {:type=>:block_storage, :project=>:cinder, :versions=>["v3", "v2", "v1"], :microversion=>"3.44"},
9
+ {:type=>:clustering, :project=>:senlin, :versions=>["v1"]},
10
+ {:type=>:compute, :project=>:nova, :versions=>["v2.1"], :microversion=>"2.60"},
11
+ {:type=>:container_infrastructure_management, :project=>:magnum, :versions=>["v1"], :microversion=>"1.4"},
12
+ {:type=>:container_service, :project=>:zun, :versions=>["v1"]},
13
+ {:type=>:data_processing, :project=>:sahara, :versions=>["v1.1"]},
14
+ {:type=>:data_protection_orchestration, :project=>:karbor, :versions=>["v1"]},
15
+ {:type=>:database, :project=>:trove, :versions=>["v1.0"]},
16
+ {:type=>:dns, :project=>:designate, :versions=>["v2"]},
17
+ {:type=>:event, :project=>:panko, :versions=>["v2"]},
18
+ {:type=>:identity, :project=>:keystone, :versions=>["v3", "v2.0"]},
19
+ {:type=>:image, :project=>:glance, :versions=>["v2", "v1"]},
20
+ {:type=>:instance_ha, :project=>:masakari, :versions=>["v1.0"]},
21
+ {:type=>:key_manager, :project=>:barbican, :versions=>["v1"]},
22
+ {:type=>:load_balancer, :project=>:octavia, :versions=>["v2.0"]},
23
+ {:type=>:metric, :project=>:gnocchi, :versions=>["v1"]},
24
+ {:type=>:messaging, :project=>:zaqar, :versions=>["v2"]},
25
+ {:type=>:metering, :project=>:ceilometer, :versions=>["v2"]},
26
+ {:type=>:monitoring, :project=>:monasca, :versions=>["v2.0"]},
27
+ {:type=>:network, :project=>:neutron, :versions=>["v2.0"]},
28
+ {:type=>:nfv_orchestration, :project=>:tacker, :versions=>["v1.0"]},
29
+ {:type=>:object_storage, :project=>:swift, :versions=>["v1"]},
30
+ {:type=>:orchestration, :project=>:heat, :versions=>["v1"]},
31
+ {:type=>:placement, :project=>:placement, :versions=>["v2.1"], :microversion=>"2.60"},
32
+ {:type=>:reservation, :project=>:blazar, :versions=>["v1"]},
33
+ {:type=>:resource_optimization, :project=>:watcher, :versions=>["v1"]},
34
+ {:type=>:search, :project=>:searchlight, :versions=>["v1"]},
35
+ {:type=>:shared_file_systems, :project=>:manila, :versions=>["v2"], :microversion=>"2.40"},
36
+ {:type=>:workflow, :project=>:mistral, :versions=>["v2"]}
37
+ ]
38
+ end
39
+ end
@@ -1,4 +1,4 @@
1
- module Misty::Openstack::AodhV2
1
+ module Misty::Openstack::API::AodhV2
2
2
  def tag
3
3
  'Alarming API Legacy'
4
4
  end
@@ -0,0 +1,19 @@
1
+ require 'misty/openstack/api/aodh/aodh_v2'
2
+ require 'misty/openstack/service_pack'
3
+
4
+ module Misty
5
+ module Openstack
6
+ module API
7
+ module Aodh
8
+ class V2
9
+ include Misty::Openstack::API::AodhV2
10
+ include Misty::Openstack::ServicePack
11
+
12
+ def service_types
13
+ %w(alarming alarm)
14
+ end
15
+ end
16
+ end
17
+ end
18
+ end
19
+ end
@@ -0,0 +1,42 @@
1
+ module Misty::Openstack::API::BarbicanV1
2
+ def tag
3
+ 'Barbican API'
4
+ end
5
+
6
+ def api
7
+ {"{container_ref}/consumers"=>
8
+ {:GET=>[:list_container_consumers],
9
+ :POST=>[:create_consumer],
10
+ :DELETE=>[:delete_consumer]},
11
+ "/v1/containers"=>{:GET=>[:list_containers], :POST=>[:create_container]},
12
+ "/v1/containers/{uuid}"=>
13
+ {:GET=>[:get_containers], :DELETE=>[:delete_containers]},
14
+ "/v1/containers/{container_uuid}/secrets"=>
15
+ {:POST=>[:create_container_secret], :DELETE=>[:delete_container_secret]},
16
+ "/v1/quotas"=>{:GET=>[:list_quotas]},
17
+ "/v1/project-quotas"=>{:GET=>[:list_project_quotas]},
18
+ "/v1/project-quotas/{uuid}"=>
19
+ {:GET=>[:get_project_quotas],
20
+ :PUT=>[:create_or_update_project_quotas],
21
+ :DELETE=>[:delete_project_quotas]},
22
+ "/v1/secrets/{uuid}/metadata"=>
23
+ {:GET=>[:list_secret_metadata], :PUT=>[:create_secret_metadata]},
24
+ "/v1/secrets/{uuid}/metadata/{key}"=>
25
+ {:GET=>[:get_secret_metadata_key],
26
+ :PUT=>[:update_secret_metadata_key],
27
+ :DELETE=>[:delete_secret_metadata]},
28
+ "/v1/secrets/{uuid}/metadata/"=>{:POST=>[:create_secret_metadata_key]},
29
+ "/v1/secret-stores"=>{:GET=>[:list_secret_stores]},
30
+ "/v1/secret-stores/{secret_store_id}"=>{:GET=>[:get_secret_store]},
31
+ "/v1/secret-stores/preferred"=>{:GET=>[:get_secret_stores_preferred]},
32
+ "/v1/secret-stores/{secret_store_id}/preferred"=>
33
+ {:POST=>[:create_secret_stores_preferred],
34
+ :DELETE=>[:delete_secret_store_preferred]},
35
+ "/v1/secret-stores/global-default"=>
36
+ {:GET=>[:get_secret_stores_global_default]},
37
+ "/v1/secrets"=>{:GET=>[:list_secrets], :POST=>[:update_secrets]},
38
+ "/v1/secrets/{uuid}"=>
39
+ {:GET=>[:get_secret], :PUT=>[:create_secret], :DELETE=>[:delete_secret]},
40
+ "/v1/secrets/{uuid}/payload"=>{:GET=>[:get_secret_payload]}}
41
+ end
42
+ end
@@ -0,0 +1,19 @@
1
+ require 'misty/openstack/api/barbican/barbican_v1'
2
+ require 'misty/openstack/service_pack'
3
+
4
+ module Misty
5
+ module Openstack
6
+ module API
7
+ module Barbican
8
+ class V1
9
+ include Misty::Openstack::API::BarbicanV1
10
+ include Misty::Openstack::ServicePack
11
+
12
+ def service_types
13
+ %w(key-manager)
14
+ end
15
+ end
16
+ end
17
+ end
18
+ end
19
+ end
@@ -0,0 +1,16 @@
1
+ module Misty::Openstack::API::BlazarV1
2
+ def tag
3
+ 'Reservation API Reference '
4
+ end
5
+
6
+ def api
7
+ {"v1/leases"=>{:GET=>[:list_leases], :POST=>[:create_lease]},
8
+ "v1/leases/{lease_id}"=>
9
+ {:GET=>[:show_lease_details],
10
+ :PUT=>[:update_lease],
11
+ :DELETE=>[:delete_lease]},
12
+ "v1/os_hosts"=>{:GET=>[:list_hosts], :POST=>[:create_host]},
13
+ "v1/os_hosts/{host_id}"=>
14
+ {:GET=>[:show_host_details], :PUT=>[:update_host], :DELETE=>[:delete_host]}}
15
+ end
16
+ end
@@ -0,0 +1,19 @@
1
+ require 'misty/openstack/api/blazar/blazar_v1'
2
+ require 'misty/openstack/service_pack'
3
+
4
+ module Misty
5
+ module Openstack
6
+ module API
7
+ module Blazar
8
+ class V1
9
+ include Misty::Openstack::API::BlazarV1
10
+ include Misty::Openstack::ServicePack
11
+
12
+ def service_types
13
+ %w(reservation)
14
+ end
15
+ end
16
+ end
17
+ end
18
+ end
19
+ end
@@ -1,4 +1,4 @@
1
- module Misty::Openstack::CeilometerV2
1
+ module Misty::Openstack::API::CeilometerV2
2
2
  def tag
3
3
  'Metering API Legacy'
4
4
  end
@@ -0,0 +1,19 @@
1
+ require 'misty/openstack/api/ceilometer/ceilometer_v2'
2
+ require 'misty/openstack/service_pack'
3
+
4
+ module Misty
5
+ module Openstack
6
+ module API
7
+ module Ceilometer
8
+ class V2
9
+ include Misty::Openstack::API::CeilometerV2
10
+ include Misty::Openstack::ServicePack
11
+
12
+ def service_types
13
+ %w(meter metering telemetry)
14
+ end
15
+ end
16
+ end
17
+ end
18
+ end
19
+ end
@@ -1,4 +1,4 @@
1
- module Misty::Openstack::CinderV1
1
+ module Misty::Openstack::API::CinderV1
2
2
  def tag
3
3
  'Block Storage API Legacy'
4
4
  end
@@ -1,4 +1,4 @@
1
- module Misty::Openstack::CinderV2
1
+ module Misty::Openstack::API::CinderV2
2
2
  def tag
3
3
  'Block Storage API Reference 12.0.0'
4
4
  end
@@ -102,8 +102,8 @@ module Misty::Openstack::CinderV2
102
102
  :POST=>[:create_an_encryption_type_for_v2]},
103
103
  "/v2/{project_id}/types/{volume_type_id}/encryption/{encryption_id}"=>
104
104
  {:GET=>[:delete_an_encryption_type_for_v2],
105
- :POST=>[:update_an_encryption_type_for_v2]},
106
- "/v2"=>{:GET=>[:show_api_v2_details]},
105
+ :PUT=>[:update_an_encryption_type_for_v2]},
106
+ "/v2/"=>{:GET=>[:show_api_v2_details]},
107
107
  "/v2/{project_id}/volumes/{volume_id}/action"=>
108
108
  {:POST=>
109
109
  [:extend_volume_size,