misty 1.4.0 → 1.5.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +87 -88
- data/lib/misty.rb +115 -1
- data/lib/misty/auth/catalog.rb +38 -0
- data/lib/misty/auth/catalog/v2.rb +15 -0
- data/lib/misty/auth/catalog/v3.rb +15 -0
- data/lib/misty/auth/token.rb +70 -0
- data/lib/misty/auth/token/v2.rb +63 -0
- data/lib/misty/auth/token/v3.rb +90 -0
- data/lib/misty/cloud.rb +74 -15
- data/lib/misty/config.rb +37 -43
- data/lib/misty/errors.rb +25 -5
- data/lib/misty/helper.rb +26 -0
- data/lib/misty/http/header.rb +3 -6
- data/lib/misty/http/method_builder.rb +2 -2
- data/lib/misty/http/request.rb +3 -3
- data/lib/misty/microversion.rb +12 -1
- data/lib/misty/misty.rb +7 -62
- data/lib/misty/openstack.rb +39 -0
- data/lib/misty/openstack/{aodh → api/aodh}/aodh_v2.rb +1 -1
- data/lib/misty/openstack/api/aodh/v2.rb +19 -0
- data/lib/misty/openstack/api/barbican/barbican_v1.rb +42 -0
- data/lib/misty/openstack/api/barbican/v1.rb +19 -0
- data/lib/misty/openstack/api/blazar/blazar_v1.rb +16 -0
- data/lib/misty/openstack/api/blazar/v1.rb +19 -0
- data/lib/misty/openstack/{ceilometer → api/ceilometer}/ceilometer_v2.rb +1 -1
- data/lib/misty/openstack/api/ceilometer/v2.rb +19 -0
- data/lib/misty/openstack/{cinder → api/cinder}/cinder_v1.rb +1 -1
- data/lib/misty/openstack/{cinder → api/cinder}/cinder_v2.rb +3 -3
- data/lib/misty/openstack/{cinder → api/cinder}/cinder_v3.rb +7 -4
- data/lib/misty/openstack/api/cinder/v1.rb +23 -0
- data/lib/misty/openstack/api/cinder/v2.rb +24 -0
- data/lib/misty/openstack/api/cinder/v3.rb +29 -0
- data/lib/misty/openstack/{designate → api/designate}/designate_v2.rb +2 -2
- data/lib/misty/openstack/api/designate/v2.rb +19 -0
- data/lib/misty/openstack/{freezer → api/freezer}/freezer_v1.rb +2 -2
- data/lib/misty/openstack/api/freezer/v1.rb +19 -0
- data/lib/misty/openstack/{glance → api/glance}/glance_v1.rb +1 -1
- data/lib/misty/openstack/{glance → api/glance}/glance_v2.rb +1 -1
- data/lib/misty/openstack/api/glance/v1.rb +19 -0
- data/lib/misty/openstack/api/glance/v2.rb +24 -0
- data/lib/misty/openstack/api/gnocchi/gnocchi_v1.rb +39 -0
- data/lib/misty/openstack/api/gnocchi/v1.rb +19 -0
- data/lib/misty/openstack/{heat → api/heat}/heat_v1.rb +1 -1
- data/lib/misty/openstack/api/heat/v1.rb +23 -0
- data/lib/misty/openstack/{ironic → api/ironic}/ironic_v1.rb +8 -2
- data/lib/misty/openstack/api/ironic/v1.rb +25 -0
- data/lib/misty/openstack/{karbor → api/karbor}/karbor_v1.rb +2 -2
- data/lib/misty/openstack/api/karbor/v1.rb +19 -0
- data/lib/misty/openstack/{keystone → api/keystone}/keystone_v2_0.rb +1 -1
- data/lib/misty/openstack/api/keystone/keystone_v2_0_ext.rb +14 -0
- data/lib/misty/openstack/{keystone → api/keystone}/keystone_v3.rb +35 -3
- data/lib/misty/openstack/{keystone → api/keystone}/keystone_v3_ext.rb +7 -9
- data/lib/misty/openstack/api/keystone/v2_0.rb +23 -0
- data/lib/misty/openstack/api/keystone/v3.rb +23 -0
- data/lib/misty/openstack/{magnum → api/magnum}/magnum_v1.rb +2 -2
- data/lib/misty/openstack/api/magnum/v1.rb +21 -0
- data/lib/misty/openstack/{manila → api/manila}/manila_v2.rb +7 -3
- data/lib/misty/openstack/api/manila/v2.rb +25 -0
- data/lib/misty/openstack/api/masakari/masakari_v1_0.rb +22 -0
- data/lib/misty/openstack/api/masakari/v1_0.rb +19 -0
- data/lib/misty/openstack/api/mistral/mistral_v2.rb +44 -0
- data/lib/misty/openstack/api/mistral/v2.rb +19 -0
- data/lib/misty/openstack/api/monasca/monasca_v2_0.rb +28 -0
- data/lib/misty/openstack/api/monasca/v2_0.rb +19 -0
- data/lib/misty/openstack/{murano → api/murano}/murano_v1.rb +1 -1
- data/lib/misty/openstack/api/murano/v1.rb +19 -0
- data/lib/misty/openstack/{neutron → api/neutron}/neutron_v2_0.rb +11 -12
- data/lib/misty/openstack/api/neutron/v2_0.rb +19 -0
- data/lib/misty/openstack/{nova → api/nova}/nova_v2_1.rb +1 -2
- data/lib/misty/openstack/api/nova/v2_1.rb +33 -0
- data/lib/misty/openstack/{octavia → api/octavia}/octavia_v2_0.rb +4 -3
- data/lib/misty/openstack/api/octavia/v2_0.rb +19 -0
- data/lib/misty/openstack/api/panko/panko_v2.rb +14 -0
- data/lib/misty/openstack/api/panko/v2.rb +19 -0
- data/lib/misty/openstack/api/placement/placement_v2_1.rb +50 -0
- data/lib/misty/openstack/api/placement/v2_1.rb +21 -0
- data/lib/misty/openstack/{sahara → api/sahara}/sahara_v1_1.rb +2 -2
- data/lib/misty/openstack/api/sahara/v1_1.rb +19 -0
- data/lib/misty/openstack/{searchlight → api/searchlight}/searchlight_v1.rb +2 -2
- data/lib/misty/openstack/api/searchlight/v1.rb +19 -0
- data/lib/misty/openstack/{senlin → api/senlin}/senlin_v1.rb +2 -2
- data/lib/misty/openstack/api/senlin/v1.rb +19 -0
- data/lib/misty/openstack/{swift → api/swift}/swift_v1.rb +2 -2
- data/lib/misty/openstack/api/swift/v1.rb +34 -0
- data/lib/misty/openstack/{tacker → api/tacker}/tacker_v1_0.rb +2 -2
- data/lib/misty/openstack/api/tacker/v1_0.rb +19 -0
- data/lib/misty/openstack/{trove → api/trove}/trove_v1_0.rb +23 -8
- data/lib/misty/openstack/api/trove/v1_0.rb +19 -0
- data/lib/misty/openstack/api/watcher/v1.rb +19 -0
- data/lib/misty/openstack/api/watcher/watcher_v1.rb +38 -0
- data/lib/misty/openstack/api/zaqar/v2.rb +19 -0
- data/lib/misty/openstack/{zaqar → api/zaqar}/zaqar_v2.rb +2 -2
- data/lib/misty/openstack/api/zun/v1.rb +19 -0
- data/lib/misty/openstack/api/zun/zun_v1.rb +55 -0
- data/lib/misty/openstack/service.rb +18 -15
- data/lib/misty/openstack/service_pack.rb +18 -0
- data/lib/misty/service.rb +4 -6
- data/lib/misty/services.rb +11 -10
- data/lib/misty/version.rb +1 -1
- data/test/integration/compute_test.rb +2 -2
- data/test/integration/{networking_test.rb → network_test.rb} +10 -10
- data/test/integration/orchestration_test.rb +4 -4
- data/test/integration/vcr/{networking_using_neutron_v2_0.yml → network_using_neutron_v2_0.yml} +0 -0
- data/test/unit/auth/catalog_test.rb +99 -0
- data/test/unit/{auth_test.rb → auth/token_test.rb} +79 -45
- data/test/unit/cloud/config_test.rb +79 -41
- data/test/unit/cloud/requests_test.rb +6 -6
- data/test/unit/cloud/services_test.rb +23 -23
- data/test/unit/cloud_test.rb +10 -10
- data/test/unit/http/method_builder_test.rb +13 -23
- data/test/unit/http/request_test.rb +1 -1
- data/test/unit/microversion_test.rb +13 -16
- data/test/unit/misty_test.rb +51 -49
- data/test/unit/openstack/APIs_test.rb +5 -9
- data/test/unit/openstack/extension_test.rb +6 -6
- data/test/unit/openstack/service_test.rb +2 -10
- data/test/unit/service_helper.rb +3 -8
- data/test/unit/services_test.rb +5 -5
- metadata +91 -66
- data/lib/misty/auth.rb +0 -91
- data/lib/misty/auth/auth_v2.rb +0 -65
- data/lib/misty/auth/auth_v3.rb +0 -89
- data/lib/misty/autoload.rb +0 -99
- data/lib/misty/client_pack.rb +0 -16
- data/lib/misty/openstack/aodh/v2.rb +0 -17
- data/lib/misty/openstack/ceilometer/v2.rb +0 -17
- data/lib/misty/openstack/cinder/v1.rb +0 -21
- data/lib/misty/openstack/cinder/v2.rb +0 -22
- data/lib/misty/openstack/cinder/v3.rb +0 -31
- data/lib/misty/openstack/designate/v2.rb +0 -17
- data/lib/misty/openstack/freezer/v1.rb +0 -17
- data/lib/misty/openstack/glance/v1.rb +0 -17
- data/lib/misty/openstack/glance/v2.rb +0 -17
- data/lib/misty/openstack/heat/v1.rb +0 -21
- data/lib/misty/openstack/ironic/v1.rb +0 -27
- data/lib/misty/openstack/karbor/v1.rb +0 -17
- data/lib/misty/openstack/keystone/keystone_v2_0_ext.rb +0 -18
- data/lib/misty/openstack/keystone/v2_0.rb +0 -21
- data/lib/misty/openstack/keystone/v3.rb +0 -21
- data/lib/misty/openstack/magnum/v1.rb +0 -23
- data/lib/misty/openstack/manila/v2.rb +0 -27
- data/lib/misty/openstack/murano/v1.rb +0 -17
- data/lib/misty/openstack/neutron/v2_0.rb +0 -17
- data/lib/misty/openstack/nova/v2_1.rb +0 -42
- data/lib/misty/openstack/octavia/v2_0.rb +0 -17
- data/lib/misty/openstack/sahara/v1_1.rb +0 -17
- data/lib/misty/openstack/searchlight/v1.rb +0 -17
- data/lib/misty/openstack/senlin/v1.rb +0 -17
- data/lib/misty/openstack/swift/v1.rb +0 -32
- data/lib/misty/openstack/tacker/v1_0.rb +0 -17
- data/lib/misty/openstack/trove/v1_0.rb +0 -17
- data/lib/misty/openstack/zaqar/v2.rb +0 -17
data/lib/misty/errors.rb
CHANGED
@@ -1,12 +1,25 @@
|
|
1
1
|
module Misty
|
2
2
|
module Auth
|
3
3
|
class AuthenticationError < StandardError; end
|
4
|
-
class
|
5
|
-
class TokenError < StandardError; end
|
4
|
+
class InitError < RuntimeError; end
|
6
5
|
|
7
|
-
|
8
|
-
|
9
|
-
|
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
|
data/lib/misty/helper.rb
ADDED
@@ -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
|
data/lib/misty/http/header.rb
CHANGED
@@ -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
|
5
|
+
raise TypeError unless param.class == Hash
|
9
6
|
param.each do |key, val|
|
10
|
-
raise
|
11
|
-
raise
|
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
|
data/lib/misty/http/request.rb
CHANGED
@@ -23,10 +23,10 @@ module Misty
|
|
23
23
|
end
|
24
24
|
|
25
25
|
def http(request)
|
26
|
-
request['X-Auth-Token'] = @
|
26
|
+
request['X-Auth-Token'] = @token.get
|
27
27
|
|
28
28
|
Misty::HTTP::NetHTTP.http_request(
|
29
|
-
@
|
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}
|
89
|
+
log = "HTTP #{verb} '#{@endpoint.host}:#{@endpoint.port}/#{path}', header=#{headers}"
|
90
90
|
log << ", data='#{data}'" if data
|
91
91
|
log
|
92
92
|
end
|
data/lib/misty/microversion.rb
CHANGED
@@ -16,11 +16,22 @@ module Misty
|
|
16
16
|
end
|
17
17
|
|
18
18
|
def microversion_header(version)
|
19
|
-
{'X-Openstack-API-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
|
data/lib/misty/misty.rb
CHANGED
@@ -1,70 +1,15 @@
|
|
1
1
|
require 'misty/services'
|
2
|
-
require '
|
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
|
-
|
9
|
-
|
10
|
-
{
|
11
|
-
|
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
|
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
|
@@ -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
|
@@ -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::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
|
-
:
|
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,
|