misty 0.6.2 → 0.7.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +37 -31
- data/lib/misty/auth.rb +1 -1
- data/lib/misty/autoload.rb +17 -0
- data/lib/misty/cloud.rb +40 -4
- data/lib/misty/misty.rb +6 -2
- data/lib/misty/openstack/cinder/cinder_v2.rb +125 -0
- data/lib/misty/openstack/cinder/cinder_v3.rb +122 -82
- data/lib/misty/openstack/cinder/v2.rb +24 -0
- data/lib/misty/openstack/designate/designate_v2.rb +1 -0
- data/lib/misty/openstack/freezer/freezer_v1.rb +27 -0
- data/lib/misty/openstack/freezer/v1.rb +20 -0
- data/lib/misty/openstack/keystone/keystone_v3.rb +2 -1
- data/lib/misty/openstack/keystone/keystone_v3_ext.rb +1 -1
- data/lib/misty/openstack/magnum/magnum_v1.rb +6 -5
- data/lib/misty/openstack/murano/murano_v1.rb +50 -0
- data/lib/misty/openstack/murano/v1.rb +20 -0
- data/lib/misty/openstack/neutron/neutron_v2_0.rb +63 -16
- data/lib/misty/openstack/nova/nova_v2_1.rb +26 -24
- data/lib/misty/openstack/octavia/octavia_v2_0.rb +56 -0
- data/lib/misty/openstack/octavia/v2_0.rb +20 -0
- data/lib/misty/openstack/senlin/senlin_v1.rb +7 -2
- data/lib/misty/openstack/tacker/tacker_v1_0.rb +35 -0
- data/lib/misty/openstack/tacker/v1_0.rb +20 -0
- data/lib/misty/services.rb +8 -0
- data/lib/misty/version.rb +1 -1
- data/test/unit/cloud/services_test.rb +46 -3
- data/test/unit/misty_test.rb +2 -2
- metadata +12 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8cceca72756e7b5ac049400a5dd97043be65bb7d
|
4
|
+
data.tar.gz: 52dfc65c6b4054a6b605b66af4ee2a4f63e87199
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2395f2cbe462561f24239d559cf972aa41b3a7259e42855ef7406eea894180ae062bf8446bb3b02a23ca754b6efe21f5dfbd0b5af84b263b83c32b98e5d442dc
|
7
|
+
data.tar.gz: 727fd1657060393641224ba738189d4ee6283eaabdbabb3ee31abb9b0bd568320ed41ba1264b7f0c9407a9b860bc3832390124a5b3844feb502172ce49b11266
|
data/README.md
CHANGED
@@ -3,35 +3,34 @@ Misty is a HTTP client for OpenStack APIs, aiming to be fast and to provide a fl
|
|
3
3
|
APIs experience.
|
4
4
|
|
5
5
|
## Features
|
6
|
-
*
|
7
|
-
*
|
8
|
-
* Microversions
|
9
|
-
*
|
10
|
-
*
|
11
|
-
*
|
12
|
-
* Token automatically refreshed when expired
|
13
|
-
* Raw JSON or Ruby format for queries and responses
|
6
|
+
* Flexible Openstack APIs integration
|
7
|
+
* Standardized Openstack APIs: [Based upon API-ref](https://developer.openstack.org/api-guide/quick-start/)
|
8
|
+
* Multiple Service versions and Microversions
|
9
|
+
* On demand services - Auto loads required versions
|
10
|
+
* Low dependency - Use standard Net/HTTP and JSON gem only
|
11
|
+
* I/O format choice: JSON or Ruby structures for queries and responses
|
14
12
|
* Persistent HTTP connections (default since HTTP 1.1 anyway) but for the authentication bootstrapping
|
15
13
|
* Direct HTTP Methods for custom needs
|
16
14
|
|
17
15
|
## A solid KISS
|
18
|
-
For REST transactions
|
19
|
-
besides 'json'.
|
16
|
+
For REST transactions Misty relies on standard Net/HTTP library.
|
17
|
+
No other gems are required besides 'json'.
|
20
18
|
|
21
|
-
|
22
|
-
|
23
|
-
available APIs.
|
19
|
+
Not having to use the help of a more complex HTTP framework is a choice that reduces dependencies.
|
20
|
+
Meanwhile a better reason would be because Openstack offers a common modus operandi across all APIs.
|
21
|
+
The authentication process provides a Service Catalog serving all available APIs entry points.
|
24
22
|
|
25
23
|
## APIs Definitions
|
26
24
|
The rich variety of OpenStack projects requires lots of Application Program Interfaces to handle.
|
27
|
-
Maintaining and extending those APIs
|
25
|
+
Maintaining and extending those APIs implies a structural complexity challenge.
|
28
26
|
Therefore the more automated the process, the better.
|
29
|
-
Thanks to the help of Phoenix project
|
30
|
-
|
31
|
-
|
32
|
-
|
27
|
+
Thanks to the help of Phoenix project [OpenStack API-ref](https://developer.openstack.org/api-guide/quick-start/)
|
28
|
+
providing the latest standard of OpenStack APIs.
|
29
|
+
The APIs interface definitions are generated automatically from the API-ref reference manuals (misty-builder) which
|
30
|
+
allows:
|
31
|
+
* More consistent APIs
|
33
32
|
* More recent APIs definitions
|
34
|
-
* Easier
|
33
|
+
* Easier addition of a new service's API
|
35
34
|
|
36
35
|
[1] https://developer.openstack.org/api-guide/quick-start/
|
37
36
|
|
@@ -48,10 +47,11 @@ require 'misty'
|
|
48
47
|
|
49
48
|
auth_v3 = {
|
50
49
|
:url => "http://localhost:5000",
|
51
|
-
:user
|
52
|
-
:password
|
53
|
-
:
|
54
|
-
:
|
50
|
+
:user => "admin",
|
51
|
+
:password => "secret",
|
52
|
+
:domain => "default",
|
53
|
+
:project => "admin",
|
54
|
+
:project_domain_id => 'default'
|
55
55
|
}
|
56
56
|
|
57
57
|
openstack = Misty::Cloud.new(:auth => auth_v3)
|
@@ -67,11 +67,10 @@ puts network.body
|
|
67
67
|
## Services
|
68
68
|
Once the Misty::Cloud object is created, the Openstack services can be used.
|
69
69
|
|
70
|
-
The Cloud object
|
71
|
-
When an OpenStack API service is
|
72
|
-
by Misty so only the services used are loaded.
|
70
|
+
The Cloud object is authenticated by the identity server (bootstrap) and is provided with a service catalog.
|
71
|
+
When an OpenStack API service is required, the catalog entry's endpoint is used and the service is dynamically called.
|
73
72
|
|
74
|
-
|
73
|
+
Each service name (i.e. `compute`) is the object handling API requests.
|
75
74
|
|
76
75
|
```ruby
|
77
76
|
openstack = Misty::Cloud.new(:auth => { ... })
|
@@ -90,9 +89,11 @@ Which produces the equivalent of the following:
|
|
90
89
|
|
91
90
|
name | project | versions
|
92
91
|
--- | --- | ---
|
92
|
+
application_catalog | murano | ["v1"]
|
93
93
|
alarming | aodh | ["v2"]
|
94
|
+
backup | freezer | ["v1"]
|
94
95
|
baremetal | ironic | ["v1"]
|
95
|
-
block_storage | cinder | ["v3", "v1"]
|
96
|
+
block_storage | cinder | ["v3", "v2", "v1"]
|
96
97
|
clustering | senlin | ["v1"]
|
97
98
|
compute | nova | ["v2.1"]
|
98
99
|
container | magnum | ["v1"]
|
@@ -102,9 +103,11 @@ database | trove | ["v1.0"]
|
|
102
103
|
dns | designate | ["v2"]
|
103
104
|
identity | keystone | ["v3", "v2.0"]
|
104
105
|
image | glance | ["v2", "v1"]
|
106
|
+
load_balancer | octavia | ["v2.0"]
|
105
107
|
messaging | zaqar | ["v2"]
|
106
108
|
metering | ceilometer | ["v2"]
|
107
|
-
|
109
|
+
networking | neutron | ["v2.0"]
|
110
|
+
nfv_orchestration | tacker | ["v1.0"]
|
108
111
|
object_storage | swift | ["v1"]
|
109
112
|
orchestration | heat | ["v1"]
|
110
113
|
search | searchlight | ["v1"]
|
@@ -112,6 +115,9 @@ shared_file_systems | manila | ["v2"]
|
|
112
115
|
|
113
116
|
* Notes
|
114
117
|
When an Openstack service requires a different service name, the :service_names option can be used (see below).
|
118
|
+
`volume` is an alias for `block_storage`.
|
119
|
+
Unique prefixed service names can be used: For instance `network` (or even `net`) instead of `networking`. Meanwhile
|
120
|
+
`data` doesn't work because it's ambiguous between `data_processing` and `data_protection`
|
115
121
|
|
116
122
|
The #requests method provides the available requests for a service, for example:
|
117
123
|
```ruby
|
@@ -158,8 +164,8 @@ The following parameters can be used:
|
|
158
164
|
* `:token`
|
159
165
|
User provided token, overrides all user and password parameters.
|
160
166
|
* `:context`
|
161
|
-
I you have a proper context with `token id`, `service catalog` and `expire date` you can bypass the authentication
|
162
|
-
Overrides all user and password parameters
|
167
|
+
I you have a proper context with `token id`, `service catalog` and `expire date` you can bypass the authentication
|
168
|
+
Overrides all user and password parameters
|
163
169
|
Example: ``{:context => { :token => token_id, :catalog => service_catalog, :expires => expire_date }}``
|
164
170
|
|
165
171
|
#### Keystone v3
|
data/lib/misty/auth.rb
CHANGED
data/lib/misty/autoload.rb
CHANGED
@@ -10,6 +10,7 @@ module Misty
|
|
10
10
|
|
11
11
|
module Cinder
|
12
12
|
autoload :V1, "misty/openstack/cinder/v1"
|
13
|
+
autoload :V2, "misty/openstack/cinder/v2"
|
13
14
|
autoload :V3, "misty/openstack/cinder/v3"
|
14
15
|
end
|
15
16
|
|
@@ -17,6 +18,10 @@ module Misty
|
|
17
18
|
autoload :V2, "misty/openstack/designate/v2"
|
18
19
|
end
|
19
20
|
|
21
|
+
module Freezer
|
22
|
+
autoload :V1, "misty/openstack/freezer/v1"
|
23
|
+
end
|
24
|
+
|
20
25
|
module Glance
|
21
26
|
autoload :V1, "misty/openstack/glance/v1"
|
22
27
|
autoload :V2, "misty/openstack/glance/v2"
|
@@ -47,6 +52,10 @@ module Misty
|
|
47
52
|
autoload :V2, "misty/openstack/manila/v2"
|
48
53
|
end
|
49
54
|
|
55
|
+
module Murano
|
56
|
+
autoload :V1, "misty/openstack/murano/v1"
|
57
|
+
end
|
58
|
+
|
50
59
|
module Neutron
|
51
60
|
autoload :V2_0, "misty/openstack/neutron/v2_0"
|
52
61
|
end
|
@@ -55,6 +64,10 @@ module Misty
|
|
55
64
|
autoload :V2_1, "misty/openstack/nova/v2_1"
|
56
65
|
end
|
57
66
|
|
67
|
+
module Octavia
|
68
|
+
autoload :V2_0, "misty/openstack/octavia/v2_0"
|
69
|
+
end
|
70
|
+
|
58
71
|
module Sahara
|
59
72
|
autoload :V1_1, "misty/openstack/sahara/v1_1"
|
60
73
|
end
|
@@ -71,6 +84,10 @@ module Misty
|
|
71
84
|
autoload :V1, "misty/openstack/swift/v1"
|
72
85
|
end
|
73
86
|
|
87
|
+
module Tacker
|
88
|
+
autoload :V1_0, "misty/openstack/tacker/v1_0"
|
89
|
+
end
|
90
|
+
|
74
91
|
module Trove
|
75
92
|
autoload :V1_0, "misty/openstack/trove/v1_0"
|
76
93
|
end
|
data/lib/misty/cloud.rb
CHANGED
@@ -7,6 +7,8 @@ module Misty
|
|
7
7
|
attr_accessor :auth, :content_type, :interface, :log, :region_id, :ssl_verify_mode
|
8
8
|
end
|
9
9
|
|
10
|
+
attr_reader :auth
|
11
|
+
|
10
12
|
def self.dot_to_underscore(val)
|
11
13
|
val.gsub(/\./,'_')
|
12
14
|
end
|
@@ -38,10 +40,18 @@ module Misty
|
|
38
40
|
klass.new(@auth, @config, service.options)
|
39
41
|
end
|
40
42
|
|
43
|
+
def application_catalog
|
44
|
+
@application_catalog ||= build_service(:application_catalog)
|
45
|
+
end
|
46
|
+
|
41
47
|
def alarming
|
42
48
|
@alarming ||= build_service(:alarming)
|
43
49
|
end
|
44
50
|
|
51
|
+
def backup
|
52
|
+
@backup ||= build_service(:backup)
|
53
|
+
end
|
54
|
+
|
45
55
|
def baremetal
|
46
56
|
@baremetal ||= build_service(:baremetal)
|
47
57
|
end
|
@@ -50,8 +60,6 @@ module Misty
|
|
50
60
|
@block_storage ||= build_service(:block_storage)
|
51
61
|
end
|
52
62
|
|
53
|
-
alias volume block_storage
|
54
|
-
|
55
63
|
def clustering
|
56
64
|
@clustering ||= build_service(:clustering)
|
57
65
|
end
|
@@ -88,6 +96,10 @@ module Misty
|
|
88
96
|
@image ||= build_service(:image)
|
89
97
|
end
|
90
98
|
|
99
|
+
def load_balancer
|
100
|
+
@load_balancer ||= build_service(:load_balancer)
|
101
|
+
end
|
102
|
+
|
91
103
|
def messaging
|
92
104
|
@messaging ||= build_service(:messaging)
|
93
105
|
end
|
@@ -96,8 +108,12 @@ module Misty
|
|
96
108
|
@metering ||= build_service(:metering)
|
97
109
|
end
|
98
110
|
|
99
|
-
def
|
100
|
-
@
|
111
|
+
def networking
|
112
|
+
@networking ||= build_service(:networking)
|
113
|
+
end
|
114
|
+
|
115
|
+
def nfv_orchestration
|
116
|
+
@nfv_orchestration ||= build_service(:nfv_orchestration)
|
101
117
|
end
|
102
118
|
|
103
119
|
def object_storage
|
@@ -115,5 +131,25 @@ module Misty
|
|
115
131
|
def shared_file_systems
|
116
132
|
@shared_file_systems ||= build_service(:shared_file_systems)
|
117
133
|
end
|
134
|
+
|
135
|
+
alias volume block_storage
|
136
|
+
|
137
|
+
private
|
138
|
+
|
139
|
+
def method_missing(method_name)
|
140
|
+
services_avail = []
|
141
|
+
@services.names.each do |service_name|
|
142
|
+
services_avail << service_name if /#{method_name}/.match(service_name)
|
143
|
+
end
|
144
|
+
|
145
|
+
if services_avail.size == 1
|
146
|
+
self.send(services_avail[0])
|
147
|
+
return self.instance_variable_get("@#{services_avail[0]}")
|
148
|
+
elsif services_avail.size > 1
|
149
|
+
raise NoMethodError, "Ambiguous Cloud Service: #{method_name}"
|
150
|
+
else
|
151
|
+
raise NoMethodError, "No such Cloud Service: #{method_name}"
|
152
|
+
end
|
153
|
+
end
|
118
154
|
end
|
119
155
|
end
|
data/lib/misty/misty.rb
CHANGED
@@ -30,9 +30,11 @@ module Misty
|
|
30
30
|
|
31
31
|
def self.services
|
32
32
|
services = Misty::Services.new
|
33
|
+
services.add(:application_catalog, :murano, ["v1"])
|
33
34
|
services.add(:alarming, :aodh, ["v2"])
|
35
|
+
services.add(:backup, :freezer, ["v1"])
|
34
36
|
services.add(:baremetal, :ironic, ["v1"])
|
35
|
-
services.add(:block_storage, :cinder, ["v3", "v1"])
|
37
|
+
services.add(:block_storage, :cinder, ["v3", "v2", "v1"])
|
36
38
|
services.add(:clustering, :senlin, ["v1"])
|
37
39
|
services.add(:compute, :nova, ["v2.1"])
|
38
40
|
services.add(:container, :magnum, ["v1"])
|
@@ -42,9 +44,11 @@ module Misty
|
|
42
44
|
services.add(:dns, :designate, ["v2"])
|
43
45
|
services.add(:identity, :keystone, ["v3", "v2.0"])
|
44
46
|
services.add(:image, :glance, ["v2", "v1"])
|
47
|
+
services.add(:load_balancer, :octavia, ["v2.0"])
|
45
48
|
services.add(:messaging, :zaqar, ["v2"])
|
46
49
|
services.add(:metering, :ceilometer, ["v2"])
|
47
|
-
services.add(:
|
50
|
+
services.add(:networking, :neutron, ["v2.0"])
|
51
|
+
services.add(:nfv_orchestration, :tacker, ["v1.0"])
|
48
52
|
services.add(:object_storage, :swift, ["v1"])
|
49
53
|
services.add(:orchestration, :heat, ["v1"])
|
50
54
|
services.add(:search, :searchlight, ["v1"])
|
@@ -0,0 +1,125 @@
|
|
1
|
+
module Misty::Openstack::CinderV2
|
2
|
+
def v2
|
3
|
+
{"/"=>{:GET=>[:list_api_versions]},
|
4
|
+
"/v2/{tenant_id}/backups/detail"=>{:GET=>[:list_backups_with_details]},
|
5
|
+
"/v2/{tenant_id}/backups/{backup_id}"=>
|
6
|
+
{:GET=>[:show_backup_details], :DELETE=>[:delete_backup]},
|
7
|
+
"/v2/{tenant_id}/backups/{backup_id}/restore"=>{:POST=>[:restore_backup]},
|
8
|
+
"/v2/{tenant_id}/backups"=>{:POST=>[:create_backup], :GET=>[:list_backups]},
|
9
|
+
"/v2/{tenant_id}/backups/{backup_id}/action"=>{:POST=>[:force_delete_backup]},
|
10
|
+
"/v2/{tenant_id}/capabilities/{hostname}"=>
|
11
|
+
{:GET=>[:show_back_end_capabilities]},
|
12
|
+
"/v2/{tenant_id}/cgsnapshots/{cgsnapshot_id}"=>
|
13
|
+
{:DELETE=>[:delete_consistency_group_snapshot],
|
14
|
+
:GET=>[:show_consistency_group_snapshot_details]},
|
15
|
+
"/v2/{tenant_id}/cgsnapshots/detail"=>
|
16
|
+
{:GET=>[:list_consistency_group_snapshots_with_details]},
|
17
|
+
"/v2/{tenant_id}/cgsnapshots"=>
|
18
|
+
{:GET=>[:list_consistency_group_snapshots],
|
19
|
+
:POST=>[:create_consistency_group_snapshot]},
|
20
|
+
"/v2/{tenant_id}/consistencygroups"=>
|
21
|
+
{:GET=>[:list_consistency_groups], :POST=>[:create_consistency_group]},
|
22
|
+
"/v2/{tenant_id}/consistencygroups/{consistencygroup_id}"=>
|
23
|
+
{:GET=>[:show_consistency_group_details]},
|
24
|
+
"/v2/{tenant_id}/consistencygroups/create_from_src"=>
|
25
|
+
{:POST=>[:create_consistency_group_from_source]},
|
26
|
+
"/v2/{tenant_id}/consistencygroups/{consistencygroup_id}/delete"=>
|
27
|
+
{:POST=>[:delete_consistency_group]},
|
28
|
+
"/v2/{tenant_id}/consistencygroups/detail"=>
|
29
|
+
{:GET=>[:list_consistency_groups_with_details]},
|
30
|
+
"/v2/{tenant_id}/consistencygroups/{consistencygroup_id}/update"=>
|
31
|
+
{:PUT=>[:update_consistency_group]},
|
32
|
+
"/v2/{admin_tenant_id}/os-hosts"=>{:GET=>[:list_all_hosts]},
|
33
|
+
"/v2/{admin_tenant_id}/os-hosts/{host_name}"=>{:GET=>[:show_host_details]},
|
34
|
+
"/v2/{tenant_id}/limits"=>{:GET=>[:show_absolute_limits]},
|
35
|
+
"/v2/{tenant_id}/os-vol-image-meta"=>
|
36
|
+
{:GET=>[:show_image_metadata_for_volume]},
|
37
|
+
"/v2/{tenant_id}/scheduler-stats/get_pools"=>
|
38
|
+
{:GET=>[:list_back_end_storage_pools]},
|
39
|
+
"/v2/{tenant_id}/os-volume-transfer/{transfer_id}/accept"=>
|
40
|
+
{:POST=>[:accept_volume_transfer]},
|
41
|
+
"/v2/{tenant_id}/os-volume-transfer"=>
|
42
|
+
{:POST=>[:create_volume_transfer], :GET=>[:list_volume_transfers]},
|
43
|
+
"/v2/{tenant_id}/os-volume-transfer/{transfer_id}"=>
|
44
|
+
{:GET=>[:show_volume_transfer_details], :DELETE=>[:delete_volume_transfer]},
|
45
|
+
"/v2/{tenant_id}/os-volume-transfer/detail"=>
|
46
|
+
{:GET=>[:list_volume_transfers_with_details]},
|
47
|
+
"/v2/{tenant_id}/qos-specs/{qos_id}/disassociate_all"=>
|
48
|
+
{:GET=>[:disassociate_qos_specification_from_all_associations]},
|
49
|
+
"/v2/{tenant_id}/qos-specs/{qos_id}/delete_keys"=>
|
50
|
+
{:PUT=>[:unset_keys_in_qos_specification]},
|
51
|
+
"/v2/{tenant_id}/qos-specs/{qos_id}/associations"=>
|
52
|
+
{:GET=>[:get_all_associations_for_qos_specification]},
|
53
|
+
"/v2/{tenant_id}/qos-specs/{qos_id}/associate"=>
|
54
|
+
{:GET=>[:associate_qos_specification_with_volume_type]},
|
55
|
+
"/v2/{tenant_id}/qos-specs/{qos_id}/disassociate"=>
|
56
|
+
{:GET=>[:disassociate_qos_specification_from_volume_type]},
|
57
|
+
"/v2/{tenant_id}/qos-specs/{qos_id}"=>
|
58
|
+
{:GET=>[:show_qos_specification_details],
|
59
|
+
:PUT=>[:set_keys_in_qos_specification],
|
60
|
+
:DELETE=>[:delete_qos_specification]},
|
61
|
+
"/v2/{tenant_id}/qos-specs"=>
|
62
|
+
{:POST=>[:create_qos_specification], :GET=>[:list_qos_specs]},
|
63
|
+
"/v2/{admin_tenant_id}/os-quota-sets/{tenant_id}"=>
|
64
|
+
{:GET=>[:show_quotas], :PUT=>[:update_quotas], :DELETE=>[:delete_quotas]},
|
65
|
+
"/v2/{admin_tenant_id}/os-quota-sets/{tenant_id}/defaults"=>
|
66
|
+
{:GET=>[:get_default_quotas]},
|
67
|
+
"/v2/{tenant_id}/os-volume-manage"=>{:POST=>[:manage_existing_volume]},
|
68
|
+
"/v2/{tenant_id}/types/{volume_type}/action"=>
|
69
|
+
{:POST=>
|
70
|
+
[:add_private_volume_type_access, :remove_private_volume_type_access]},
|
71
|
+
"/v2/{tenant_id}/types/{volume_type}/os-volume-type-access"=>
|
72
|
+
{:GET=>[:list_private_volume_type_access_details]},
|
73
|
+
"/v2/{tenant_id}/extensions"=>{:GET=>[:list_api_extensions]},
|
74
|
+
"/v2/{tenant_id}/snapshots/detail"=>{:GET=>[:list_snapshots_with_details]},
|
75
|
+
"/v2/{tenant_id}/snapshots"=>
|
76
|
+
{:POST=>[:create_snapshot], :GET=>[:list_snapshots]},
|
77
|
+
"/v2/{tenant_id}/snapshots/{snapshot_id}/metadata"=>
|
78
|
+
{:GET=>[:show_snapshot_metadata],
|
79
|
+
:POST=>[:create_snapshot_metadata],
|
80
|
+
:PUT=>[:update_snapshot_metadata]},
|
81
|
+
"/v2/{tenant_id}/snapshots/{snapshot_id}"=>
|
82
|
+
{:GET=>[:show_snapshot_details],
|
83
|
+
:PUT=>[:update_snapshot],
|
84
|
+
:DELETE=>[:delete_snapshot]},
|
85
|
+
"/v2/{tenant_id}/types/{volume_type_id}"=>
|
86
|
+
{:PUT=>[:update_volume_type, :update_extra_specs_for_a_volume_type],
|
87
|
+
:GET=>[:show_volume_type_details_for_v2],
|
88
|
+
:DELETE=>[:delete_volume_type]},
|
89
|
+
"/v2/{tenant_id}/types"=>
|
90
|
+
{:GET=>[:list_all_volume_types_for_v2], :POST=>[:create_volume_type_for_v2]},
|
91
|
+
"/v2/{tenant_id}/types/{volume_type_id}/encryption"=>
|
92
|
+
{:GET=>[:show_an_encryption_type_for_v2],
|
93
|
+
:POST=>[:create_an_encryption_type_for_v2]},
|
94
|
+
"/v2/{tenant_id}/types/{volume_type_id}/encryption/{encryption_id}"=>
|
95
|
+
{:GET=>[:delete_an_encryption_type_for_v2],
|
96
|
+
:POST=>[:update_an_encryption_type_for_v2]},
|
97
|
+
"/v2"=>{:GET=>[:show_api_v2_details]},
|
98
|
+
"/v2/{tenant_id}/volumes/{volume_id}/action"=>
|
99
|
+
{:POST=>
|
100
|
+
[:extend_volume_size,
|
101
|
+
:reset_volume_statuses,
|
102
|
+
:set_image_metadata_for_volume,
|
103
|
+
:remove_image_metadata_from_volume,
|
104
|
+
:attach_volume_to_server,
|
105
|
+
:detach_volume_from_a_server,
|
106
|
+
:unmanage_volume,
|
107
|
+
:force_detach_volume,
|
108
|
+
:force_delete_volume,
|
109
|
+
:update_volume_bootable_status]},
|
110
|
+
"/v2/{project_id}/volumes/{volume_id}/action"=>{:POST=>[:retype_volume]},
|
111
|
+
"/v2/{tenant_id}/volumes/detail"=>{:GET=>[:list_volumes_with_details]},
|
112
|
+
"/v2/{tenant_id}/volumes"=>{:POST=>[:create_volume], :GET=>[:list_volumes]},
|
113
|
+
"/v2/{tenant_id}/volumes/{volume_id}"=>
|
114
|
+
{:GET=>[:show_volume_details],
|
115
|
+
:PUT=>[:update_volume],
|
116
|
+
:DELETE=>[:delete_volume]},
|
117
|
+
"/v2/{tenant_id}/volumes/{volume_id}/metadata"=>
|
118
|
+
{:POST=>[:create_volume_metadata],
|
119
|
+
:GET=>[:show_volume_metadata],
|
120
|
+
:PUT=>[:update_volume_metadata]},
|
121
|
+
"/v2/{tenant_id}/volumes/{volume_id}/metadata/{key}"=>
|
122
|
+
{:GET=>[:show_volume_metadata_for_a_specific_key],
|
123
|
+
:DELETE=>[:delete_volume_metadata]}}
|
124
|
+
end
|
125
|
+
end
|
@@ -1,9 +1,108 @@
|
|
1
1
|
module Misty::Openstack::CinderV3
|
2
2
|
def v3
|
3
|
-
{"/"=>{:GET=>[:list_all_api_versions
|
3
|
+
{"/"=>{:GET=>[:list_all_api_versions]},
|
4
|
+
"/v3"=>{:GET=>[:show_api_v3_details]},
|
5
|
+
"/v3/{project_id}/extensions"=>{:GET=>[:list_known_api_extensions]},
|
6
|
+
"/v3/{project_id}/types/{volume_type_id}"=>
|
7
|
+
{:PUT=>[:update_a_volume_type, :update_extra_specs_for_volume_type],
|
8
|
+
:GET=>[:show_volume_type_detail],
|
9
|
+
:DELETE=>[:delete_a_volume_type]},
|
10
|
+
"/v3/{project_id}/types"=>
|
11
|
+
{:GET=>[:list_all_volume_types], :POST=>[:create_a_volume_type]},
|
12
|
+
"/v3/{project_id}/types/{volume_type_id}/encryption"=>
|
13
|
+
{:GET=>[:show_an_encryption_type], :POST=>[:create_an_encryption_type]},
|
14
|
+
"/v3/{project_id}/types/{volume_type_id}/encryption/{encryption_id}"=>
|
15
|
+
{:GET=>[:delete_an_encryption_type], :POST=>[:update_an_encryption_type]},
|
16
|
+
"/v3/{project_id}/types/{volume_type}/action"=>
|
17
|
+
{:POST=>
|
18
|
+
[:add_private_volume_type_access_to_project,
|
19
|
+
:remove_private_volume_type_access_from_project]},
|
20
|
+
"/v3/{project_id}/types/{volume_type}/os-volume-type-access"=>
|
21
|
+
{:GET=>[:list_private_volume_type_access_detail]},
|
22
|
+
"/v3/{project_id}/volumes/detail"=>
|
23
|
+
{:GET=>[:list_accessible_volumes_with_details]},
|
24
|
+
"/v3/{project_id}/volumes"=>
|
25
|
+
{:POST=>[:create_a_volume], :GET=>[:list_accessible_volumes]},
|
26
|
+
"/v3/{project_id}/volumes/{volume_id}"=>
|
27
|
+
{:GET=>[:show_a_volume_s_details],
|
28
|
+
:PUT=>[:update_a_volume],
|
29
|
+
:DELETE=>[:delete_a_volume]},
|
30
|
+
"/v3/{project_id}/volumes/{volume_id}/metadata"=>
|
31
|
+
{:POST=>[:create_metadata_for_volume],
|
32
|
+
:GET=>[:show_a_volume_s_metadata],
|
33
|
+
:PUT=>[:update_a_volume_s_metadata]},
|
34
|
+
"/v3/{project_id}/volumes/{volume_id}/metadata/{key}"=>
|
35
|
+
{:GET=>[:show_a_volume_s_metadata_for_a_specific_key],
|
36
|
+
:DELETE=>[:delete_a_volume_s_metadata],
|
37
|
+
:PUT=>[:update_a_volume_s_metadata_for_a_specific_key]},
|
38
|
+
"/v3/{project_id}/volumes/summary"=>{:GET=>[:get_volumes_summary]},
|
39
|
+
"/v3/{project_id}/volumes/{volume_id}/action"=>
|
40
|
+
{:POST=>
|
41
|
+
[:extend_a_volume_size,
|
42
|
+
:reset_a_volume_s_statuses,
|
43
|
+
:revert_volume_to_snapshot,
|
44
|
+
:set_image_metadata_for_a_volume,
|
45
|
+
:remove_image_metadata_from_a_volume,
|
46
|
+
:attach_volume_to_a_server,
|
47
|
+
:detach_volume_from_server,
|
48
|
+
:unmanage_a_volume,
|
49
|
+
:force_detach_a_volume,
|
50
|
+
:retype_a_volume,
|
51
|
+
:force_delete_a_volume,
|
52
|
+
:update_a_volume_s_bootable_status,
|
53
|
+
:upload_volume_to_image]},
|
54
|
+
"/v3/{project_id}/os-vol-image-meta"=>
|
55
|
+
{:GET=>[:show_image_metadata_for_a_volume]},
|
56
|
+
"/v3/{project_id}/manageable_volumes"=>
|
57
|
+
{:POST=>[:manage_an_existing_volume],
|
58
|
+
:GET=>[:list_summary_of_volumes_available_to_manage]},
|
59
|
+
"/v3/{project_id}/manageable_volumes/detail"=>
|
60
|
+
{:GET=>[:list_detail_of_volumes_available_to_manage]},
|
61
|
+
"/v3/{project_id}/snapshots/detail"=>{:GET=>[:list_snapshots_and_details]},
|
62
|
+
"/v3/{project_id}/snapshots"=>
|
63
|
+
{:POST=>[:create_a_snapshot], :GET=>[:list_accessible_snapshots]},
|
64
|
+
"/v3/{project_id}/snapshots/{snapshot_id}/metadata"=>
|
65
|
+
{:GET=>[:show_a_snapshot_s_metadata],
|
66
|
+
:POST=>[:create_a_snapshot_s_metadata],
|
67
|
+
:PUT=>[:update_a_snapshot_s_metadata]},
|
68
|
+
"/v3/{project_id}/snapshots/{snapshot_id}"=>
|
69
|
+
{:GET=>[:show_a_snapshot_s_details],
|
70
|
+
:PUT=>[:update_a_snapshot],
|
71
|
+
:DELETE=>[:delete_a_snapshot]},
|
72
|
+
"/v3/{project_id}/snapshot/{snapshot_id}/metadata/{key}"=>
|
73
|
+
{:GET=>[:show_a_snapshot_s_metadata_for_a_specific_key]},
|
74
|
+
"/v3/{project_id}/snapshots/{snapshot_id}/metadata/{key}"=>
|
75
|
+
{:DELETE=>[:delete_a_snapshot_s_metadata],
|
76
|
+
:PUT=>[:update_a_snapshot_s_metadata_for_a_specific_key]},
|
77
|
+
"/v3/{project_id}/manageable_snapshots"=>
|
78
|
+
{:POST=>[:manage_an_existing_snapshot],
|
79
|
+
:GET=>[:list_summary_of_snapshots_available_to_manage]},
|
80
|
+
"/v3/{project_id}/manageable_snapshots/detail"=>
|
81
|
+
{:GET=>[:list_detail_of_snapshots_available_to_manage]},
|
82
|
+
"/v3/{project_id}/os-volume-transfer/{transfer_id}/accept"=>
|
83
|
+
{:POST=>[:accept_a_volume_transfer]},
|
84
|
+
"/v3/{project_id}/os-volume-transfer"=>
|
85
|
+
{:POST=>[:create_a_volume_transfer],
|
86
|
+
:GET=>[:list_volume_transfers_for_a_project]},
|
87
|
+
"/v3/{project_id}/os-volume-transfer/{transfer_id}"=>
|
88
|
+
{:GET=>[:show_volume_transfer_detail], :DELETE=>[:delete_a_volume_transfer]},
|
89
|
+
"/v3/{project_id}/os-volume-transfer/detail"=>
|
90
|
+
{:GET=>[:list_volume_transfers_and_details]},
|
91
|
+
"/v3/{project_id}/attachments/{attachment_id}"=>
|
92
|
+
{:DELETE=>[:delete_attachment],
|
93
|
+
:GET=>[:show_attachment_details],
|
94
|
+
:PUT=>[:update_an_attachment]},
|
95
|
+
"/v3/{project_id}/attachments/detail"=>
|
96
|
+
{:GET=>[:list_attachments_with_details]},
|
97
|
+
"/v3/{project_id}/attachments"=>
|
98
|
+
{:GET=>[:list_attachments], :POST=>[:create_attachment]},
|
99
|
+
"/v3/{project_id}/scheduler-stats/get_pools"=>
|
100
|
+
{:GET=>[:list_all_back_end_storage_pools]},
|
4
101
|
"/v3/{project_id}/backups/detail"=>{:GET=>[:list_backups_with_detail]},
|
5
102
|
"/v3/{project_id}/backups/{backup_id}"=>
|
6
|
-
{:GET=>[:show_backup_detail],
|
103
|
+
{:GET=>[:show_backup_detail],
|
104
|
+
:DELETE=>[:delete_a_backup],
|
105
|
+
:PUT=>[:update_a_backup]},
|
7
106
|
"/v3/{project_id}/backups/{backup_id}/restore"=>{:POST=>[:restore_a_backup]},
|
8
107
|
"/v3/{project_id}/backups"=>
|
9
108
|
{:POST=>[:create_a_backup], :GET=>[:list_backups_for_project]},
|
@@ -11,14 +110,6 @@ module Misty::Openstack::CinderV3
|
|
11
110
|
{:POST=>[:force_delete_a_backup]},
|
12
111
|
"/v3/{project_id}/capabilities/{hostname}"=>
|
13
112
|
{:GET=>[:show_all_back_end_capabilities]},
|
14
|
-
"/v3/{project_id}/cgsnapshots/{cgsnapshot_id}"=>
|
15
|
-
{:DELETE=>[:delete_a_consistency_group_snapshot],
|
16
|
-
:GET=>[:show_consistency_group_snapshot_detail]},
|
17
|
-
"/v3/{project_id}/cgsnapshots/detail"=>
|
18
|
-
{:GET=>[:list_all_consistency_group_snapshots_with_details]},
|
19
|
-
"/v3/{project_id}/cgsnapshots"=>
|
20
|
-
{:GET=>[:list_all_consistency_group_snapshots],
|
21
|
-
:POST=>[:create_a_consistency_group_snapshot]},
|
22
113
|
"/v3/{project_id}/consistencygroups"=>
|
23
114
|
{:GET=>[:list_project_s_consistency_groups],
|
24
115
|
:POST=>[:create_a_consistency_group]},
|
@@ -32,11 +123,20 @@ module Misty::Openstack::CinderV3
|
|
32
123
|
{:GET=>[:list_consistency_groups_and_details]},
|
33
124
|
"/v3/{project_id}/consistencygroups/{consistencygroup_id}/update"=>
|
34
125
|
{:PUT=>[:update_a_consistency_group]},
|
126
|
+
"/v3/{project_id}/cgsnapshots/{cgsnapshot_id}"=>
|
127
|
+
{:DELETE=>[:delete_a_consistency_group_snapshot],
|
128
|
+
:GET=>[:show_consistency_group_snapshot_detail]},
|
129
|
+
"/v3/{project_id}/cgsnapshots/detail"=>
|
130
|
+
{:GET=>[:list_all_consistency_group_snapshots_with_details]},
|
131
|
+
"/v3/{project_id}/cgsnapshots"=>
|
132
|
+
{:GET=>[:list_all_consistency_group_snapshots],
|
133
|
+
:POST=>[:create_a_consistency_group_snapshot]},
|
35
134
|
"/v3/{project_id}/groups"=>{:GET=>[:list_groups], :POST=>[:create_group]},
|
36
135
|
"/v3/{project_id}/groups/{group_id}"=>
|
37
136
|
{:GET=>[:show_group_details], :PUT=>[:update_group]},
|
38
137
|
"/v3/{project_id}/groups/action"=>{:POST=>[:create_group_from_source]},
|
39
|
-
"/v3/{project_id}/groups/{group_id}/action"=>
|
138
|
+
"/v3/{project_id}/groups/{group_id}/action"=>
|
139
|
+
{:POST=>[:delete_group, :reset_group_status]},
|
40
140
|
"/v3/{project_id}/groups/detail"=>{:GET=>[:list_groups_with_details]},
|
41
141
|
"/v3/{project_id}/group_snapshots/{group_snapshot_id}"=>
|
42
142
|
{:DELETE=>[:delete_group_snapshot], :GET=>[:show_group_snapshot_details]},
|
@@ -44,6 +144,8 @@ module Misty::Openstack::CinderV3
|
|
44
144
|
{:GET=>[:list_group_snapshots_with_details]},
|
45
145
|
"/v3/{project_id}/group_snapshots"=>
|
46
146
|
{:GET=>[:list_group_snapshots], :POST=>[:create_group_snapshot]},
|
147
|
+
"/v3/{project_id}/group_snapshots/{group_snapshot_id}/action"=>
|
148
|
+
{:POST=>[:reset_group_snapshot_status]},
|
47
149
|
"/v3/{project_id}/group_types/{group_type_id}"=>
|
48
150
|
{:PUT=>[:update_group_type],
|
49
151
|
:GET=>[:show_group_type_details],
|
@@ -52,20 +154,14 @@ module Misty::Openstack::CinderV3
|
|
52
154
|
{:POST=>[:create_group_specs_for_a_group_type]},
|
53
155
|
"/v3/{project_id}/group_types"=>
|
54
156
|
{:GET=>[:list_group_types], :POST=>[:create_group_type]},
|
157
|
+
"/v3/{admin_project_id}/os-hosts"=>{:GET=>[:list_all_hosts_for_a_project]},
|
158
|
+
"/v3/{admin_project_id}/os-hosts/{host_name}"=>
|
159
|
+
{:GET=>[:show_host_details_for_a_project]},
|
55
160
|
"/v3/{project_id}/limits"=>{:GET=>[:show_absolute_limits_for_project]},
|
56
|
-
"/v3/{project_id}/
|
57
|
-
{:GET=>[:
|
58
|
-
"/v3/{project_id}/
|
59
|
-
|
60
|
-
"/v3/{project_id}/os-volume-transfer/{transfer_id}/accept"=>
|
61
|
-
{:POST=>[:accept_a_volume_transfer]},
|
62
|
-
"/v3/{project_id}/os-volume-transfer"=>
|
63
|
-
{:POST=>[:create_a_volume_transfer],
|
64
|
-
:GET=>[:list_volume_transfers_for_a_project]},
|
65
|
-
"/v3/{project_id}/os-volume-transfer/{transfer_id}"=>
|
66
|
-
{:GET=>[:show_volume_transfer_detail], :DELETE=>[:delete_a_volume_transfer]},
|
67
|
-
"/v3/{project_id}/os-volume-transfer/detail"=>
|
68
|
-
{:GET=>[:list_volume_transfers_and_details]},
|
161
|
+
"/v3/{project_id}/messages/{message_id}"=>
|
162
|
+
{:DELETE=>[:delete_message], :GET=>[:show_message_details]},
|
163
|
+
"/v3/{project_id}/messages"=>{:GET=>[:list_messages]},
|
164
|
+
"/v3/{project_id}/resource_filters"=>{:GET=>[:list_resource_filters]},
|
69
165
|
"/v3/{project_id}/qos-specs/{qos_id}/disassociate_all"=>
|
70
166
|
{:GET=>[:disassociate_a_qos_specification_from_all_associations]},
|
71
167
|
"/v3/{project_id}/qos-specs/{qos_id}/delete_keys"=>
|
@@ -82,67 +178,11 @@ module Misty::Openstack::CinderV3
|
|
82
178
|
:DELETE=>[:delete_a_qos_specification]},
|
83
179
|
"/v3/{project_id}/qos-specs"=>
|
84
180
|
{:POST=>[:create_a_qos_specification], :GET=>[:list_qos_specifications]},
|
85
|
-
"/v3/{admin_project_id}/os-quota-sets/{project_id}/{user_id}"=>
|
86
|
-
{:GET=>[:show_quotas_for_a_user],
|
87
|
-
:PUT=>[:update_quotas_for_a_user],
|
88
|
-
:DELETE=>[:delete_quotas_for_a_user]},
|
89
181
|
"/v3/{admin_project_id}/os-quota-sets/{project_id}"=>
|
90
182
|
{:GET=>[:show_quotas_for_a_project],
|
91
183
|
:PUT=>[:update_quotas_for_a_project],
|
92
184
|
:DELETE=>[:delete_quotas_for_a_project]},
|
93
|
-
"/v3/{admin_project_id}/os-quota-sets/{project_id}/
|
94
|
-
{:GET=>[:
|
95
|
-
"/v3/{project_id}/os-quota-sets/defaults"=>
|
96
|
-
{:GET=>[:get_default_quotas_for_a_project]},
|
97
|
-
"/v3/{project_id}/os-volume-manage"=>{:POST=>[:manage_an_existing_volume]},
|
98
|
-
"/v3/{project_id}/types/{volume_type}/action"=>
|
99
|
-
{:POST=>
|
100
|
-
[:add_private_volume_type_access_to_project,
|
101
|
-
:remove_private_volume_type_access_from_project]},
|
102
|
-
"/v3/{project_id}/types/{volume_type}/os-volume-type-access"=>
|
103
|
-
{:GET=>[:list_private_volume_type_access_detail]},
|
104
|
-
"/v3/{project_id}/extensions"=>{:GET=>[:list_known_api_extensions]},
|
105
|
-
"/v3/{project_id}/snapshots/detail"=>{:GET=>[:list_snapshots_and_details]},
|
106
|
-
"/v3/{project_id}/snapshots"=>
|
107
|
-
{:POST=>[:create_a_snapshot], :GET=>[:list_accessible_snapshots]},
|
108
|
-
"/v3/{project_id}/snapshots/{snapshot_id}/metadata"=>
|
109
|
-
{:GET=>[:show_a_snapshot_s_metadata], :PUT=>[:update_a_snapshot_s_metadata]},
|
110
|
-
"/v3/{project_id}/snapshots/{snapshot_id}"=>
|
111
|
-
{:GET=>[:show_a_snapshot_s_details],
|
112
|
-
:PUT=>[:update_a_snapshot],
|
113
|
-
:DELETE=>[:delete_a_snapshot]},
|
114
|
-
"/v3/{project_id}/types/{volume_type_id}"=>
|
115
|
-
{:PUT=>[:update_a_volume_type, :update_extra_specs_for_volume_type],
|
116
|
-
:GET=>[:show_volume_type_detail],
|
117
|
-
:DELETE=>[:delete_a_volume_type]},
|
118
|
-
"/v3/{project_id}/types"=>
|
119
|
-
{:GET=>[:list_all_volume_types], :POST=>[:create_a_volume_type]},
|
120
|
-
"/v3/{project_id}/types/{volume_type_id}/encryption"=>
|
121
|
-
{:GET=>[:show_an_encryption_type], :POST=>[:create_an_encryption_type]},
|
122
|
-
"/v3/{project_id}/types/{volume_type_id}/encryption/{encryption_id}"=>
|
123
|
-
{:GET=>[:delete_an_encryption_type], :POST=>[:update_an_encryption_type]},
|
124
|
-
"/v3"=>{:GET=>[:show_api_v3_details]},
|
125
|
-
"/v3/{project_id}/volumes/{volume_id}/action"=>
|
126
|
-
{:POST=>
|
127
|
-
[:extend_a_volume_size,
|
128
|
-
:reset_a_volume_s_statuses,
|
129
|
-
:set_image_metadata_for_a_volume,
|
130
|
-
:remove_image_metadata_from_a_volume,
|
131
|
-
:attach_volume_to_a_server,
|
132
|
-
:unmanage_a_volume,
|
133
|
-
:force_detach_a_volume]},
|
134
|
-
"/v3/{project_id}/volumes/detail"=>
|
135
|
-
{:GET=>[:list_accessbile_volumes_with_details]},
|
136
|
-
"/v3/{project_id}/volumes"=>
|
137
|
-
{:POST=>[:create_a_volume], :GET=>[:list_accessible_volumes]},
|
138
|
-
"/v3/{project_id}/volumes/{volume_id}"=>
|
139
|
-
{:GET=>[:show_a_volume_s_details],
|
140
|
-
:PUT=>[:update_a_volume],
|
141
|
-
:DELETE=>[:delete_a_volume]},
|
142
|
-
"/v3/{project_id}/volumes/{volume_id}/metadata"=>
|
143
|
-
{:POST=>[:create_metadata_for_volume],
|
144
|
-
:GET=>[:show_a_volume_s_metadata],
|
145
|
-
:PUT=>[:update_a_volume_s_metadata]},
|
146
|
-
"/v3/{project_id}/volumes/summary"=>{:GET=>[:get_volumes_summary]}}
|
185
|
+
"/v3/{admin_project_id}/os-quota-sets/{project_id}/defaults"=>
|
186
|
+
{:GET=>[:get_default_quotas_for_a_project]}}
|
147
187
|
end
|
148
188
|
end
|