misty 1.1.0 → 1.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/misty/auth.rb +5 -13
- data/lib/misty/auth/auth_v2.rb +13 -11
- data/lib/misty/auth/auth_v3.rb +11 -9
- data/lib/misty/auth/errors.rb +12 -0
- data/lib/misty/auth/name.rb +4 -4
- data/lib/misty/client.rb +105 -0
- data/lib/misty/client_pack.rb +16 -0
- data/lib/misty/http/method_builder.rb +36 -20
- data/lib/misty/misty.rb +14 -0
- data/lib/misty/openstack/aodh/aodh_v2.rb +1 -1
- data/lib/misty/openstack/aodh/v2.rb +5 -8
- data/lib/misty/openstack/ceilometer/ceilometer_v2.rb +1 -1
- data/lib/misty/openstack/ceilometer/v2.rb +5 -8
- data/lib/misty/openstack/cinder/cinder_v1.rb +1 -1
- data/lib/misty/openstack/cinder/cinder_v2.rb +1 -1
- data/lib/misty/openstack/cinder/cinder_v3.rb +1 -1
- data/lib/misty/openstack/cinder/v1.rb +6 -9
- data/lib/misty/openstack/cinder/v2.rb +6 -9
- data/lib/misty/openstack/cinder/v3.rb +7 -10
- data/lib/misty/openstack/designate/designate_v2.rb +1 -1
- data/lib/misty/openstack/designate/v2.rb +5 -8
- data/lib/misty/openstack/extension.rb +33 -0
- data/lib/misty/openstack/freezer/freezer_v1.rb +1 -1
- data/lib/misty/openstack/freezer/v1.rb +5 -8
- data/lib/misty/openstack/glance/glance_v1.rb +1 -1
- data/lib/misty/openstack/glance/glance_v2.rb +1 -1
- data/lib/misty/openstack/glance/v1.rb +5 -8
- data/lib/misty/openstack/glance/v2.rb +5 -8
- data/lib/misty/openstack/heat/heat_v1.rb +1 -1
- data/lib/misty/openstack/heat/v1.rb +6 -9
- data/lib/misty/openstack/ironic/ironic_v1.rb +1 -1
- data/lib/misty/openstack/ironic/v1.rb +6 -9
- data/lib/misty/openstack/karbor/karbor_v1.rb +1 -1
- data/lib/misty/openstack/karbor/v1.rb +5 -8
- data/lib/misty/openstack/keystone/keystone_v2_0.rb +1 -1
- data/lib/misty/openstack/keystone/keystone_v2_0_ext.rb +2 -2
- data/lib/misty/openstack/keystone/keystone_v3.rb +1 -1
- data/lib/misty/openstack/keystone/keystone_v3_ext.rb +2 -2
- data/lib/misty/openstack/keystone/v2_0.rb +8 -10
- data/lib/misty/openstack/keystone/v3.rb +8 -10
- data/lib/misty/openstack/magnum/magnum_v1.rb +1 -1
- data/lib/misty/openstack/magnum/v1.rb +6 -9
- data/lib/misty/openstack/manila/manila_v2.rb +1 -1
- data/lib/misty/openstack/manila/v2.rb +6 -9
- data/lib/misty/openstack/murano/murano_v1.rb +1 -1
- data/lib/misty/openstack/murano/v1.rb +5 -8
- data/lib/misty/openstack/neutron/neutron_v2_0.rb +1 -1
- data/lib/misty/openstack/neutron/v2_0.rb +5 -8
- data/lib/misty/openstack/nova/nova_v2_1.rb +1 -1
- data/lib/misty/openstack/nova/v2_1.rb +7 -9
- data/lib/misty/openstack/octavia/octavia_v2_0.rb +1 -1
- data/lib/misty/openstack/octavia/v2_0.rb +5 -8
- data/lib/misty/openstack/sahara/sahara_v1_1.rb +1 -1
- data/lib/misty/openstack/sahara/v1_1.rb +5 -8
- data/lib/misty/openstack/searchlight/searchlight_v1.rb +1 -1
- data/lib/misty/openstack/searchlight/v1.rb +5 -8
- data/lib/misty/openstack/senlin/senlin_v1.rb +1 -1
- data/lib/misty/openstack/senlin/v1.rb +5 -8
- data/lib/misty/openstack/swift/swift_v1.rb +1 -1
- data/lib/misty/openstack/swift/v1.rb +17 -9
- data/lib/misty/openstack/tacker/tacker_v1_0.rb +1 -1
- data/lib/misty/openstack/tacker/v1_0.rb +5 -8
- data/lib/misty/openstack/trove/trove_v1_0.rb +1 -1
- data/lib/misty/openstack/trove/v1_0.rb +5 -8
- data/lib/misty/openstack/zaqar/v2.rb +5 -8
- data/lib/misty/openstack/zaqar/zaqar_v2.rb +1 -1
- data/lib/misty/version.rb +1 -1
- data/test/unit/{http/client_test.rb → client_test.rb} +20 -8
- data/test/unit/cloud/requests_test.rb +77 -5
- data/test/unit/cloud/services_test.rb +20 -5
- data/test/unit/http/header_test.rb +0 -1
- data/test/unit/http/method_builder_test.rb +4 -4
- data/test/unit/http/request_test.rb +29 -20
- data/test/unit/microversion_test.rb +1 -1
- data/test/unit/misty_test.rb +18 -0
- data/test/unit/openstack/APIs_test.rb +18 -13
- data/test/unit/openstack/extension_test.rb +68 -0
- data/test/unit/service_helper.rb +1 -1
- metadata +8 -4
- data/lib/misty/http/client.rb +0 -108
@@ -1,20 +1,18 @@
|
|
1
|
-
require 'misty/http/client'
|
2
1
|
require 'misty/openstack/keystone/keystone_v3'
|
3
2
|
require 'misty/openstack/keystone/keystone_v3_ext'
|
3
|
+
require 'misty/openstack/extension'
|
4
|
+
require 'misty/client_pack'
|
4
5
|
|
5
6
|
module Misty
|
6
7
|
module Openstack
|
7
8
|
module Keystone
|
8
|
-
class V3
|
9
|
-
|
9
|
+
class V3
|
10
|
+
include Misty::Openstack::KeystoneV3
|
11
|
+
include Misty::Openstack::KeystoneV3_ext
|
12
|
+
include Misty::ClientPack
|
13
|
+
include Misty::Openstack::Extension
|
10
14
|
|
11
|
-
def
|
12
|
-
api = v3
|
13
|
-
api.merge!(v3_ext)
|
14
|
-
api
|
15
|
-
end
|
16
|
-
|
17
|
-
def self.service_names
|
15
|
+
def service_names
|
18
16
|
%w{identity}
|
19
17
|
end
|
20
18
|
end
|
@@ -1,19 +1,16 @@
|
|
1
|
-
require 'misty/http/client'
|
2
|
-
require 'misty/openstack/microversion'
|
3
1
|
require 'misty/openstack/magnum/magnum_v1'
|
2
|
+
require 'misty/client_pack'
|
3
|
+
require 'misty/openstack/microversion'
|
4
4
|
|
5
5
|
module Misty
|
6
6
|
module Openstack
|
7
7
|
module Magnum
|
8
|
-
class V1
|
9
|
-
|
8
|
+
class V1
|
9
|
+
include Misty::Openstack::MagnumV1
|
10
|
+
include Misty::ClientPack
|
10
11
|
include Misty::HTTP::Microversion
|
11
12
|
|
12
|
-
def
|
13
|
-
v1
|
14
|
-
end
|
15
|
-
|
16
|
-
def self.service_names
|
13
|
+
def service_names
|
17
14
|
%w{container}
|
18
15
|
end
|
19
16
|
end
|
@@ -1,19 +1,16 @@
|
|
1
|
-
require 'misty/http/client'
|
2
|
-
require 'misty/microversion'
|
3
1
|
require 'misty/openstack/manila/manila_v2'
|
2
|
+
require 'misty/client_pack'
|
3
|
+
require 'misty/microversion'
|
4
4
|
|
5
5
|
module Misty
|
6
6
|
module Openstack
|
7
7
|
module Manila
|
8
|
-
class V2
|
9
|
-
|
8
|
+
class V2
|
9
|
+
include Misty::Openstack::ManilaV2
|
10
|
+
include Misty::ClientPack
|
10
11
|
include Misty::Microversion
|
11
12
|
|
12
|
-
def
|
13
|
-
v2
|
14
|
-
end
|
15
|
-
|
16
|
-
def self.service_names
|
13
|
+
def service_names
|
17
14
|
%w{shared-file-systems shared}
|
18
15
|
end
|
19
16
|
end
|
@@ -1,17 +1,14 @@
|
|
1
|
-
require 'misty/http/client'
|
2
1
|
require 'misty/openstack/murano/murano_v1'
|
2
|
+
require 'misty/client_pack'
|
3
3
|
|
4
4
|
module Misty
|
5
5
|
module Openstack
|
6
6
|
module Murano
|
7
|
-
class V1
|
8
|
-
|
7
|
+
class V1
|
8
|
+
include Misty::Openstack::MuranoV1
|
9
|
+
include Misty::ClientPack
|
9
10
|
|
10
|
-
def
|
11
|
-
v1
|
12
|
-
end
|
13
|
-
|
14
|
-
def self.service_names
|
11
|
+
def service_names
|
15
12
|
%w{application-catalog}
|
16
13
|
end
|
17
14
|
end
|
@@ -1,17 +1,14 @@
|
|
1
|
-
require 'misty/http/client'
|
2
1
|
require 'misty/openstack/neutron/neutron_v2_0'
|
2
|
+
require 'misty/client_pack'
|
3
3
|
|
4
4
|
module Misty
|
5
5
|
module Openstack
|
6
6
|
module Neutron
|
7
|
-
class V2_0
|
8
|
-
|
7
|
+
class V2_0
|
8
|
+
include Misty::Openstack::NeutronV2_0
|
9
|
+
include Misty::ClientPack
|
9
10
|
|
10
|
-
def
|
11
|
-
v2_0
|
12
|
-
end
|
13
|
-
|
14
|
-
def self.service_names
|
11
|
+
def service_names
|
15
12
|
%w{network networking}
|
16
13
|
end
|
17
14
|
end
|
@@ -1,18 +1,16 @@
|
|
1
|
-
require 'misty/http/client'
|
2
|
-
require 'misty/microversion'
|
3
1
|
require 'misty/openstack/nova/nova_v2_1'
|
2
|
+
require 'misty/client_pack'
|
3
|
+
require 'misty/microversion'
|
4
4
|
|
5
5
|
module Misty
|
6
6
|
module Openstack
|
7
7
|
module Nova
|
8
|
-
class V2_1
|
9
|
-
|
8
|
+
class V2_1
|
9
|
+
include Misty::Openstack::NovaV2_1
|
10
|
+
include Misty::ClientPack
|
10
11
|
include Misty::Microversion
|
11
12
|
|
12
|
-
|
13
|
-
v2_1
|
14
|
-
end
|
15
|
-
|
13
|
+
# TODO: Verify
|
16
14
|
# Overrides API because the definitions don't specify prefix
|
17
15
|
def self.list_all_major_versions
|
18
16
|
http_get('/', headers)
|
@@ -22,7 +20,7 @@ module Misty
|
|
22
20
|
http_get("/#{version}", headers)
|
23
21
|
end
|
24
22
|
|
25
|
-
def
|
23
|
+
def service_names
|
26
24
|
%w{compute}
|
27
25
|
end
|
28
26
|
|
@@ -1,17 +1,14 @@
|
|
1
|
-
require 'misty/http/client'
|
2
1
|
require 'misty/openstack/octavia/octavia_v2_0'
|
2
|
+
require 'misty/client_pack'
|
3
3
|
|
4
4
|
module Misty
|
5
5
|
module Openstack
|
6
6
|
module Octavia
|
7
|
-
class V2_0
|
8
|
-
|
7
|
+
class V2_0
|
8
|
+
include Misty::Openstack::OctaviaV2_0
|
9
|
+
include Misty::ClientPack
|
9
10
|
|
10
|
-
def
|
11
|
-
v2_0
|
12
|
-
end
|
13
|
-
|
14
|
-
def self.service_names
|
11
|
+
def service_names
|
15
12
|
%w{load-balancer}
|
16
13
|
end
|
17
14
|
end
|
@@ -1,17 +1,14 @@
|
|
1
|
-
require 'misty/http/client'
|
2
1
|
require 'misty/openstack/sahara/sahara_v1_1'
|
2
|
+
require 'misty/client_pack'
|
3
3
|
|
4
4
|
module Misty
|
5
5
|
module Openstack
|
6
6
|
module Sahara
|
7
|
-
class V1_1
|
8
|
-
|
7
|
+
class V1_1
|
8
|
+
include Misty::Openstack::SaharaV1_1
|
9
|
+
include Misty::ClientPack
|
9
10
|
|
10
|
-
def
|
11
|
-
v1_1
|
12
|
-
end
|
13
|
-
|
14
|
-
def self.service_names
|
11
|
+
def service_names
|
15
12
|
%w{data-processing}
|
16
13
|
end
|
17
14
|
end
|
@@ -1,17 +1,14 @@
|
|
1
|
-
require 'misty/http/client'
|
2
1
|
require 'misty/openstack/searchlight/searchlight_v1'
|
2
|
+
require 'misty/client_pack'
|
3
3
|
|
4
4
|
module Misty
|
5
5
|
module Openstack
|
6
6
|
module Searchlight
|
7
|
-
class V1
|
8
|
-
|
7
|
+
class V1
|
8
|
+
include Misty::Openstack::SearchlightV1
|
9
|
+
include Misty::ClientPack
|
9
10
|
|
10
|
-
def
|
11
|
-
v1
|
12
|
-
end
|
13
|
-
|
14
|
-
def self.service_names
|
11
|
+
def service_names
|
15
12
|
%w{search}
|
16
13
|
end
|
17
14
|
end
|
@@ -1,17 +1,14 @@
|
|
1
|
-
require 'misty/http/client'
|
2
1
|
require 'misty/openstack/senlin/senlin_v1'
|
2
|
+
require 'misty/client_pack'
|
3
3
|
|
4
4
|
module Misty
|
5
5
|
module Openstack
|
6
6
|
module Senlin
|
7
|
-
class V1
|
8
|
-
|
7
|
+
class V1
|
8
|
+
include Misty::Openstack::SenlinV1
|
9
|
+
include Misty::ClientPack
|
9
10
|
|
10
|
-
def
|
11
|
-
v1
|
12
|
-
end
|
13
|
-
|
14
|
-
def self.service_names
|
11
|
+
def service_names
|
15
12
|
%w{clustering}
|
16
13
|
end
|
17
14
|
end
|
@@ -1,23 +1,31 @@
|
|
1
|
-
require 'misty/http/client'
|
2
1
|
require 'misty/openstack/swift/swift_v1'
|
2
|
+
require 'misty/client_pack'
|
3
3
|
|
4
4
|
module Misty
|
5
5
|
module Openstack
|
6
6
|
module Swift
|
7
|
-
class V1
|
8
|
-
|
7
|
+
class V1
|
8
|
+
include Misty::Openstack::SwiftV1
|
9
|
+
include Misty::ClientPack
|
9
10
|
|
10
|
-
def
|
11
|
-
v1
|
12
|
-
end
|
13
|
-
|
14
|
-
def self.prefix_path_to_ignore
|
11
|
+
def prefix_path_to_ignore
|
15
12
|
'/v1/{account}'
|
16
13
|
end
|
17
14
|
|
18
|
-
def
|
15
|
+
def service_names
|
19
16
|
%w{object-storage object-store}
|
20
17
|
end
|
18
|
+
|
19
|
+
# Custom requests
|
20
|
+
def requests_custom
|
21
|
+
[ :bulk_delete ]
|
22
|
+
end
|
23
|
+
|
24
|
+
def bulk_delete(data)
|
25
|
+
param = 'bulk-delete=1'
|
26
|
+
header = Misty::HTTP::Header.new('Content-Type' => 'text/plain')
|
27
|
+
create_update_or_delete_account_metadata(param, data, header)
|
28
|
+
end
|
21
29
|
end
|
22
30
|
end
|
23
31
|
end
|
@@ -1,17 +1,14 @@
|
|
1
|
-
require 'misty/http/client'
|
2
1
|
require 'misty/openstack/tacker/tacker_v1_0'
|
2
|
+
require 'misty/client_pack'
|
3
3
|
|
4
4
|
module Misty
|
5
5
|
module Openstack
|
6
6
|
module Tacker
|
7
|
-
class V1_0
|
8
|
-
|
7
|
+
class V1_0
|
8
|
+
include Misty::Openstack::TackerV1_0
|
9
|
+
include Misty::ClientPack
|
9
10
|
|
10
|
-
def
|
11
|
-
v1_0
|
12
|
-
end
|
13
|
-
|
14
|
-
def self.service_names
|
11
|
+
def service_names
|
15
12
|
%w{nfv-orchestration}
|
16
13
|
end
|
17
14
|
end
|
@@ -1,17 +1,14 @@
|
|
1
|
-
require 'misty/http/client'
|
2
1
|
require 'misty/openstack/trove/trove_v1_0'
|
2
|
+
require 'misty/client_pack'
|
3
3
|
|
4
4
|
module Misty
|
5
5
|
module Openstack
|
6
6
|
module Trove
|
7
|
-
class V1_0
|
8
|
-
|
7
|
+
class V1_0
|
8
|
+
include Misty::Openstack::TroveV1_0
|
9
|
+
include Misty::ClientPack
|
9
10
|
|
10
|
-
def
|
11
|
-
v1_0
|
12
|
-
end
|
13
|
-
|
14
|
-
def self.service_names
|
11
|
+
def service_names
|
15
12
|
%w{database}
|
16
13
|
end
|
17
14
|
end
|
@@ -1,17 +1,14 @@
|
|
1
|
-
require 'misty/http/client'
|
2
1
|
require 'misty/openstack/zaqar/zaqar_v2'
|
2
|
+
require 'misty/client_pack'
|
3
3
|
|
4
4
|
module Misty
|
5
5
|
module Openstack
|
6
6
|
module Zaqar
|
7
|
-
class V2
|
8
|
-
|
7
|
+
class V2
|
8
|
+
include Misty::Openstack::ZaqarV2
|
9
|
+
include Misty::ClientPack
|
9
10
|
|
10
|
-
def
|
11
|
-
v2
|
12
|
-
end
|
13
|
-
|
14
|
-
def self.service_names
|
11
|
+
def service_names
|
15
12
|
%w{messaging}
|
16
13
|
end
|
17
14
|
end
|