misty 0.1.0 → 0.3.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 +222 -1
- data/lib/misty.rb +8 -0
- data/lib/misty/auth.rb +60 -0
- data/lib/misty/auth/auth_v2.rb +46 -0
- data/lib/misty/auth/auth_v3.rb +58 -0
- data/lib/misty/autoload.rb +82 -0
- data/lib/misty/cloud.rb +133 -0
- data/lib/misty/http/client.rb +115 -0
- data/lib/misty/http/direct.rb +26 -0
- data/lib/misty/http/method_builder.rb +96 -0
- data/lib/misty/http/request.rb +75 -0
- data/lib/misty/misty.rb +51 -0
- data/lib/misty/openstack/aodh/aodh_v2.rb +12 -0
- data/lib/misty/openstack/aodh/v2.rb +20 -0
- data/lib/misty/openstack/ceilometer/ceilometer_v2.rb +13 -0
- data/lib/misty/openstack/ceilometer/v2.rb +20 -0
- data/lib/misty/openstack/cinder/cinder_v1.rb +35 -0
- data/lib/misty/openstack/cinder/cinder_v3.rb +148 -0
- data/lib/misty/openstack/cinder/v1.rb +24 -0
- data/lib/misty/openstack/cinder/v3.rb +24 -0
- data/lib/misty/openstack/designate/designate_v2.rb +69 -0
- data/lib/misty/openstack/designate/v2.rb +20 -0
- data/lib/misty/openstack/glance/glance_v1.rb +16 -0
- data/lib/misty/openstack/glance/glance_v2.rb +29 -0
- data/lib/misty/openstack/glance/v1.rb +20 -0
- data/lib/misty/openstack/glance/v2.rb +20 -0
- data/lib/misty/openstack/heat/heat_v1.rb +85 -0
- data/lib/misty/openstack/heat/v1.rb +24 -0
- data/lib/misty/openstack/ironic/ironic_v1.rb +71 -0
- data/lib/misty/openstack/ironic/v1.rb +26 -0
- data/lib/misty/openstack/karbor/karbor_v1.rb +32 -0
- data/lib/misty/openstack/karbor/v1.rb +20 -0
- data/lib/misty/openstack/keystone/keystone_v2_0.rb +11 -0
- data/lib/misty/openstack/keystone/keystone_v2_0_ext.rb +32 -0
- data/lib/misty/openstack/keystone/keystone_v3.rb +147 -0
- data/lib/misty/openstack/keystone/keystone_v3_ext.rb +124 -0
- data/lib/misty/openstack/keystone/v2_0.rb +23 -0
- data/lib/misty/openstack/keystone/v3.rb +23 -0
- data/lib/misty/openstack/magnum/magnum_v1.rb +41 -0
- data/lib/misty/openstack/magnum/v1.rb +26 -0
- data/lib/misty/openstack/manila/manila_v2.rb +143 -0
- data/lib/misty/openstack/manila/v2.rb +26 -0
- data/lib/misty/openstack/microversion.rb +62 -0
- data/lib/misty/openstack/neutron/neutron_v2_0.rb +205 -0
- data/lib/misty/openstack/neutron/v2_0.rb +20 -0
- data/lib/misty/openstack/nova/nova_v2_1.rb +269 -0
- data/lib/misty/openstack/nova/v2_1.rb +40 -0
- data/lib/misty/openstack/sahara/sahara_v1_1.rb +77 -0
- data/lib/misty/openstack/sahara/v1_1.rb +20 -0
- data/lib/misty/openstack/searchlight/searchlight_v1.rb +15 -0
- data/lib/misty/openstack/searchlight/v1.rb +20 -0
- data/lib/misty/openstack/senlin/senlin_v1.rb +66 -0
- data/lib/misty/openstack/senlin/v1.rb +20 -0
- data/lib/misty/openstack/swift/swift_v1.rb +23 -0
- data/lib/misty/openstack/swift/v1.rb +20 -0
- data/lib/misty/openstack/trove/trove_v1_0.rb +51 -0
- data/lib/misty/openstack/trove/v1_0.rb +20 -0
- data/lib/misty/openstack/zaqar/v2.rb +20 -0
- data/lib/misty/openstack/zaqar/zaqar_v2.rb +46 -0
- data/lib/misty/version.rb +2 -2
- data/test/integration/compute_test.rb +35 -0
- data/test/integration/network_test.rb +34 -0
- data/test/integration/orchestration_test.rb +92 -0
- data/test/integration/test_helper.rb +19 -0
- data/test/integration/vcr/compute_using_nova_v2_1.yml +1107 -0
- data/test/integration/vcr/network_using_neutron_v2_0.yml +1029 -0
- data/test/integration/vcr/orchestration_using_heat_v1.yml +1457 -0
- data/test/unit/auth_helper.rb +52 -0
- data/test/unit/auth_test.rb +99 -0
- data/test/unit/cloud/requests_test.rb +113 -0
- data/test/unit/cloud/services_test.rb +171 -0
- data/test/unit/cloud_test.rb +145 -0
- data/test/unit/http/client_test.rb +74 -0
- data/test/unit/http/direct_test.rb +103 -0
- data/test/unit/http/method_builder_test.rb +133 -0
- data/test/unit/http/request_test.rb +123 -0
- data/test/unit/misty_test.rb +36 -0
- data/test/unit/openstack/APIs_test.rb +40 -0
- data/test/unit/openstack/microversion_test.rb +70 -0
- data/test/unit/service_helper.rb +25 -0
- data/test/unit/test_helper.rb +8 -0
- metadata +170 -5
data/lib/misty/misty.rb
ADDED
@@ -0,0 +1,51 @@
|
|
1
|
+
module Misty
|
2
|
+
HEADER_JSON = {
|
3
|
+
"Content-Type" => "application/json",
|
4
|
+
"Accept" => "application/json"
|
5
|
+
}
|
6
|
+
|
7
|
+
# Default log file. Use :log_file option to override
|
8
|
+
LOG_FILE = "misty.log"
|
9
|
+
# Default log level. Use :log_level option to override
|
10
|
+
LOG_LEVEL = Logger::INFO
|
11
|
+
|
12
|
+
Service = Struct.new(:name, :project, :versions) do
|
13
|
+
def to_s
|
14
|
+
"#{name}: #{project} => #{versions}"
|
15
|
+
end
|
16
|
+
end
|
17
|
+
|
18
|
+
SERVICES = []
|
19
|
+
SERVICES << Service.new(:alarming, :aodh, ["v2"])
|
20
|
+
SERVICES << Service.new(:baremetal, :ironic, ["v1"])
|
21
|
+
SERVICES << Service.new(:block_storage, :cinder, ["v3", "v1"])
|
22
|
+
SERVICES << Service.new(:clustering, :senlin, ["v1"])
|
23
|
+
SERVICES << Service.new(:compute, :nova, ["v2.1"])
|
24
|
+
SERVICES << Service.new(:container, :magnum, ["v1"])
|
25
|
+
SERVICES << Service.new(:data_processing, :sahara, ["v1.1"])
|
26
|
+
SERVICES << Service.new(:data_protection, :karbor, ["v1"])
|
27
|
+
SERVICES << Service.new(:database, :trove, ["v1.0"])
|
28
|
+
SERVICES << Service.new(:dns, :designate, ["v2"])
|
29
|
+
SERVICES << Service.new(:identity, :keystone, ["v3", "v2.0"])
|
30
|
+
SERVICES << Service.new(:image, :glance, ["v2", "v1"])
|
31
|
+
SERVICES << Service.new(:messaging, :zaqar, ["v2"])
|
32
|
+
SERVICES << Service.new(:metering, :ceilometer, ["v2"])
|
33
|
+
SERVICES << Service.new(:network, :neutron, ["v2.0"])
|
34
|
+
SERVICES << Service.new(:object_storage, :swift, ["v1"])
|
35
|
+
SERVICES << Service.new(:orchestration, :heat, ["v1"])
|
36
|
+
SERVICES << Service.new(:search, :searchlight, ["v1"])
|
37
|
+
SERVICES << Service.new(:shared_file_systems, :manila, ["v2"])
|
38
|
+
SERVICES.freeze
|
39
|
+
|
40
|
+
def self.services
|
41
|
+
SERVICES
|
42
|
+
end
|
43
|
+
|
44
|
+
def self.to_json(data)
|
45
|
+
if data.is_a? String
|
46
|
+
JSON.parse(data)
|
47
|
+
return data
|
48
|
+
end
|
49
|
+
return JSON.dump(data)
|
50
|
+
end
|
51
|
+
end
|
@@ -0,0 +1,12 @@
|
|
1
|
+
module Misty::Openstack::AodhV2
|
2
|
+
def v2
|
3
|
+
{"/v2/capabilities"=>{:GET=>[:list_capabilities]},
|
4
|
+
"/v2/alarms"=>{:GET=>[:list_alarms], :POST=>[:create_alarm]},
|
5
|
+
"/v2/alarms/{alarm_id}"=>
|
6
|
+
{:GET=>[:show_alarm], :PUT=>[:"update_alarm}"], :DELETE=>[:delete_alarm]},
|
7
|
+
"/v2/alarms/{alarm_id}/history"=>{:GET=>[:show_alarm_history]},
|
8
|
+
"/v2/alarms/{alarm_id}/state"=>{:GET=>[:show_alarm_state], :PUT=>[:"update_alarm_state}"]},
|
9
|
+
"/v2/query/alarms"=>{:POST=>[:create_alarms_query]},
|
10
|
+
"/v2/query/alarms/history"=>{:POST=>[:create_alarm_query_history]}}
|
11
|
+
end
|
12
|
+
end
|
@@ -0,0 +1,20 @@
|
|
1
|
+
require 'misty/http/client'
|
2
|
+
require "misty/openstack/aodh/aodh_v2"
|
3
|
+
|
4
|
+
module Misty
|
5
|
+
module Openstack
|
6
|
+
module Aodh
|
7
|
+
class V2 < Misty::HTTP::Client
|
8
|
+
extend Misty::Openstack::AodhV2
|
9
|
+
|
10
|
+
def self.api
|
11
|
+
v2
|
12
|
+
end
|
13
|
+
|
14
|
+
def self.service_names
|
15
|
+
%w{alarming}
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
@@ -0,0 +1,13 @@
|
|
1
|
+
module Misty::Openstack::CeilometerV2
|
2
|
+
def v2
|
3
|
+
{"/v2/resources"=>{:GET=>[:list_resources]},
|
4
|
+
"/v2/resources/{resource_id}"=>{:GET=>[:show_ressource]},
|
5
|
+
"/v2/meters"=>{:GET=>[:list_meters]},
|
6
|
+
"/v2/meters/{meter_name}"=>{:GET=>[:show_meter], :POST=>[:create_meter_samples]},
|
7
|
+
"/v2/meters/{meter_name}/statistics"=>{:GET=>[:show_statistics]},
|
8
|
+
"/v2/samples"=>{:GET=>[:list_samples]},
|
9
|
+
"/v2/samples/{sample_id}"=>{:GET=>[:show_sample]},
|
10
|
+
"/v2/capabilities"=>{:GET=>[:list_capabilities]},
|
11
|
+
"/v2/query/samples"=>{:POST=>[:create_query_sample]}}
|
12
|
+
end
|
13
|
+
end
|
@@ -0,0 +1,20 @@
|
|
1
|
+
require 'misty/http/client'
|
2
|
+
require "misty/openstack/ceilometer/ceilometer_v2"
|
3
|
+
|
4
|
+
module Misty
|
5
|
+
module Openstack
|
6
|
+
module Ceilometer
|
7
|
+
class V2 < Misty::HTTP::Client
|
8
|
+
extend Misty::Openstack::CeilometerV2
|
9
|
+
|
10
|
+
def self.api
|
11
|
+
v2
|
12
|
+
end
|
13
|
+
|
14
|
+
def self.service_names
|
15
|
+
%w{metering}
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
@@ -0,0 +1,35 @@
|
|
1
|
+
module Misty::Openstack::CinderV1
|
2
|
+
def v1
|
3
|
+
{"/v1/{admin_tenant_id}/os-quota-sets/{tenant_id}/detail/{user_id}"=>
|
4
|
+
{:GET=>[:show_quota_details_for_user_v1]},
|
5
|
+
"/v1/{tenant_id}/os-quota-sets/defaults"=>{:GET=>[:show_default_quotas]},
|
6
|
+
"/v1/{admin_tenant_id}/os-quota-sets/{tenant_id}"=>
|
7
|
+
{:GET=>[:show_quotas_v1],
|
8
|
+
:PUT=>[:update_quotas_v1],
|
9
|
+
:DELETE=>[:delete_quotas_v1]},
|
10
|
+
"/v1/{admin_tenant_id}/os-quota-sets/{tenant_id}/{user_id}"=>
|
11
|
+
{:GET=>[:show_quotas_for_user_v1],
|
12
|
+
:POST=>[:update_quotas_for_user_v1],
|
13
|
+
:DELETE=>[:delete_quotas_for_user_v1]},
|
14
|
+
"/v1/{tenant_id}/snapshots/{snapshot_id}"=>
|
15
|
+
{:GET=>[:show_snapshot_details_v1], :DELETE=>[:delete_snapshot_v1]},
|
16
|
+
"/v1/{tenant_id}/snapshots/detail"=>{:GET=>[:list_snapshots_with_details_v1]},
|
17
|
+
"/v1/{tenant_id}/snapshots"=>
|
18
|
+
{:POST=>[:create_snapshot_v1], :GET=>[:list_snapshots_v1]},
|
19
|
+
"/v1/{tenant_id}/snapshots/{snapshot_id}/metadata"=>
|
20
|
+
{:GET=>[:show_snapshot_metadata_v1], :PUT=>[:update_snapshot_metadata_v1]},
|
21
|
+
"/v1/{tenant_id}/types"=>
|
22
|
+
{:GET=>[:list_volume_types_v1], :POST=>[:create_volume_type_v1]},
|
23
|
+
"/v1/{tenant_id}/types/{volume_type_id}"=>
|
24
|
+
{:PUT=>[:update_volume_type_v1, :update_extra_specs_for_a_volume_type_v1],
|
25
|
+
:GET=>[:show_volume_type_details_v1],
|
26
|
+
:DELETE=>[:delete_volume_type_v1]},
|
27
|
+
"/v1"=>{:GET=>[:show_api_v1_details]},
|
28
|
+
"/"=>{:GET=>[:list_api_versions_v1]},
|
29
|
+
"/v1/{tenant_id}/volumes/detail"=>{:GET=>[:list_volumes_with_details_v1]},
|
30
|
+
"/v1/{tenant_id}/volumes"=>
|
31
|
+
{:POST=>[:create_volume_v1], :GET=>[:list_volumes_v1]},
|
32
|
+
"/v1/{tenant_id}/volumes/{volume_id}"=>
|
33
|
+
{:GET=>[:show_volume_details_v1], :DELETE=>[:delete_volume_v1]}}
|
34
|
+
end
|
35
|
+
end
|
@@ -0,0 +1,148 @@
|
|
1
|
+
module Misty::Openstack::CinderV3
|
2
|
+
def v3
|
3
|
+
{"/"=>{:GET=>[:list_all_api_versions, :list_known_api_versions]},
|
4
|
+
"/v3/{project_id}/backups/detail"=>{:GET=>[:list_backups_with_detail]},
|
5
|
+
"/v3/{project_id}/backups/{backup_id}"=>
|
6
|
+
{:GET=>[:show_backup_detail], :DELETE=>[:delete_a_backup]},
|
7
|
+
"/v3/{project_id}/backups/{backup_id}/restore"=>{:POST=>[:restore_a_backup]},
|
8
|
+
"/v3/{project_id}/backups"=>
|
9
|
+
{:POST=>[:create_a_backup], :GET=>[:list_backups_for_project]},
|
10
|
+
"/v3/{project_id}/backups/{backup_id}/action"=>
|
11
|
+
{:POST=>[:force_delete_a_backup]},
|
12
|
+
"/v3/{project_id}/capabilities/{hostname}"=>
|
13
|
+
{: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
|
+
"/v3/{project_id}/consistencygroups"=>
|
23
|
+
{:GET=>[:list_project_s_consistency_groups],
|
24
|
+
:POST=>[:create_a_consistency_group]},
|
25
|
+
"/v3/{project_id}/consistencygroups/{consistencygroup_id}"=>
|
26
|
+
{:GET=>[:show_a_consistency_group_s_details]},
|
27
|
+
"/v3/{project_id}/consistencygroups/create_from_src"=>
|
28
|
+
{:POST=>[:create_a_consistency_group_from_source]},
|
29
|
+
"/v3/{project_id}/consistencygroups/{consistencygroup_id}/delete"=>
|
30
|
+
{:POST=>[:delete_a_consistency_group]},
|
31
|
+
"/v3/{project_id}/consistencygroups/detail"=>
|
32
|
+
{:GET=>[:list_consistency_groups_and_details]},
|
33
|
+
"/v3/{project_id}/consistencygroups/{consistencygroup_id}/update"=>
|
34
|
+
{:PUT=>[:update_a_consistency_group]},
|
35
|
+
"/v3/{project_id}/groups"=>{:GET=>[:list_groups], :POST=>[:create_group]},
|
36
|
+
"/v3/{project_id}/groups/{group_id}"=>
|
37
|
+
{:GET=>[:show_group_details], :PUT=>[:update_group]},
|
38
|
+
"/v3/{project_id}/groups/action"=>{:POST=>[:create_group_from_source]},
|
39
|
+
"/v3/{project_id}/groups/{group_id}/action"=>{:POST=>[:delete_group]},
|
40
|
+
"/v3/{project_id}/groups/detail"=>{:GET=>[:list_groups_with_details]},
|
41
|
+
"/v3/{project_id}/group_snapshots/{group_snapshot_id}"=>
|
42
|
+
{:DELETE=>[:delete_group_snapshot], :GET=>[:show_group_snapshot_details]},
|
43
|
+
"/v3/{project_id}/group_snapshots/detail"=>
|
44
|
+
{:GET=>[:list_group_snapshots_with_details]},
|
45
|
+
"/v3/{project_id}/group_snapshots"=>
|
46
|
+
{:GET=>[:list_group_snapshots], :POST=>[:create_group_snapshot]},
|
47
|
+
"/v3/{project_id}/group_types/{group_type_id}"=>
|
48
|
+
{:PUT=>[:update_group_type],
|
49
|
+
:GET=>[:show_group_type_details],
|
50
|
+
:DELETE=>[:delete_group_type]},
|
51
|
+
"/v3/{project_id}/group_types/{group_type_id}/group_specs"=>
|
52
|
+
{:POST=>[:create_group_specs_for_a_group_type]},
|
53
|
+
"/v3/{project_id}/group_types"=>
|
54
|
+
{:GET=>[:list_group_types], :POST=>[:create_group_type]},
|
55
|
+
"/v3/{project_id}/limits"=>{:GET=>[:show_absolute_limits_for_project]},
|
56
|
+
"/v3/{project_id}/os-vol-image-meta"=>
|
57
|
+
{:GET=>[:show_image_metadata_for_a_volume]},
|
58
|
+
"/v3/{project_id}/scheduler-stats/get_pools"=>
|
59
|
+
{:GET=>[:list_all_back_end_storage_pools]},
|
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]},
|
69
|
+
"/v3/{project_id}/qos-specs/{qos_id}/disassociate_all"=>
|
70
|
+
{:GET=>[:disassociate_a_qos_specification_from_all_associations]},
|
71
|
+
"/v3/{project_id}/qos-specs/{qos_id}/delete_keys"=>
|
72
|
+
{:PUT=>[:unset_keys_in_a_qos_specification]},
|
73
|
+
"/v3/{project_id}/qos-specs/{qos_id}/associations"=>
|
74
|
+
{:GET=>[:get_all_associations_for_a_qos_specification]},
|
75
|
+
"/v3/{project_id}/qos-specs/{qos_id}/associate"=>
|
76
|
+
{:GET=>[:associate_qos_specification_with_a_volume_type]},
|
77
|
+
"/v3/{project_id}/qos-specs/{qos_id}/disassociate"=>
|
78
|
+
{:GET=>[:disassociate_qos_specification_from_a_volume_type]},
|
79
|
+
"/v3/{project_id}/qos-specs/{qos_id}"=>
|
80
|
+
{:GET=>[:show_a_qos_specification_details],
|
81
|
+
:PUT=>[:set_keys_in_a_qos_specification],
|
82
|
+
:DELETE=>[:delete_a_qos_specification]},
|
83
|
+
"/v3/{project_id}/qos-specs"=>
|
84
|
+
{: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
|
+
"/v3/{admin_project_id}/os-quota-sets/{project_id}"=>
|
90
|
+
{:GET=>[:show_quotas_for_a_project],
|
91
|
+
:PUT=>[:update_quotas_for_a_project],
|
92
|
+
:DELETE=>[:delete_quotas_for_a_project]},
|
93
|
+
"/v3/{admin_project_id}/os-quota-sets/{project_id}/detail/{user_id}"=>
|
94
|
+
{:GET=>[:show_quota_details_for_a_user]},
|
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]}}
|
147
|
+
end
|
148
|
+
end
|
@@ -0,0 +1,24 @@
|
|
1
|
+
require 'misty/http/client'
|
2
|
+
require "misty/openstack/cinder/cinder_v1"
|
3
|
+
|
4
|
+
module Misty
|
5
|
+
module Openstack
|
6
|
+
module Cinder
|
7
|
+
class V1 < Misty::HTTP::Client
|
8
|
+
extend Misty::Openstack::CinderV1
|
9
|
+
|
10
|
+
def self.api
|
11
|
+
v1
|
12
|
+
end
|
13
|
+
|
14
|
+
def self.prefix_path_to_ignore
|
15
|
+
"/v1/{admin_tenant_id}/"
|
16
|
+
end
|
17
|
+
|
18
|
+
def self.service_names
|
19
|
+
%w{block-storage, block-store, volume}
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
@@ -0,0 +1,24 @@
|
|
1
|
+
require 'misty/http/client'
|
2
|
+
require "misty/openstack/cinder/cinder_v3"
|
3
|
+
|
4
|
+
module Misty
|
5
|
+
module Openstack
|
6
|
+
module Cinder
|
7
|
+
class V3 < Misty::HTTP::Client
|
8
|
+
extend Misty::Openstack::CinderV3
|
9
|
+
|
10
|
+
def self.api
|
11
|
+
v3
|
12
|
+
end
|
13
|
+
|
14
|
+
def self.prefix_path_to_ignore
|
15
|
+
"/v3/{tenant_id}"
|
16
|
+
end
|
17
|
+
|
18
|
+
def self.service_names
|
19
|
+
%w{block-storage, block-store, volume}
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
@@ -0,0 +1,69 @@
|
|
1
|
+
module Misty::Openstack::DesignateV2
|
2
|
+
def v2
|
3
|
+
{"/"=>{:GET=>[:list_all_api_versions]},
|
4
|
+
"/v2/zones"=>{:POST=>[:create_zone], :GET=>[:list_zones]},
|
5
|
+
"/v2/zones/{zone_id}"=>
|
6
|
+
{:GET=>[:show_a_zone], :PATCH=>[:update_a_zone], :DELETE=>[:delete_a_zone]},
|
7
|
+
"/v2/zones/{zone_id}/nameservers"=>{:GET=>[:get_the_name_servers_for_a_zone]},
|
8
|
+
"/v2/zones/tasks/imports"=>
|
9
|
+
{:POST=>[:create_a_zone_import], :GET=>[:list_all_zone_imports]},
|
10
|
+
"/v2/zones/tasks/imports/{zone_import_id}"=>
|
11
|
+
{:GET=>[:show_a_zone_import], :DELETE=>[:delete_a_zone_import]},
|
12
|
+
"/v2/zones/{zone_id}/tasks/export"=>{:POST=>[:create_a_zone_export]},
|
13
|
+
"/v2/zones/tasks/exports"=>{:GET=>[:list_all_zone_exports]},
|
14
|
+
"/v2/zones/tasks/exports/{zone_export_id}"=>
|
15
|
+
{:GET=>[:show_a_zone_export_information], :DELETE=>[:delete_a_zone_export]},
|
16
|
+
"/v2/zones/tasks/exports/{zone_export_id}/export"=>
|
17
|
+
{:GET=>[:retrive_a_zone_export_from_the_designate_datastore]},
|
18
|
+
"/v2/zones/{zone_id}/tasks/abandon"=>{:POST=>[:abandon_zone]},
|
19
|
+
"/v2/zones/{zone_id}/tasks/xfr"=>
|
20
|
+
{:POST=>[:manually_trigger_an_update_of_a_secondary_zone]},
|
21
|
+
"/v2/zones/{zone_id}/tasks/transfer_requests"=>
|
22
|
+
{:POST=>[:create_zone_transfer_request]},
|
23
|
+
"/v2/zones/tasks/transfer_requests"=>{:GET=>[:list_zone_transfer_requests]},
|
24
|
+
"/v2/zones/tasks/transfer_requests/{zone_transfer_request_id}"=>
|
25
|
+
{:GET=>[:show_a_zone_transfer_request],
|
26
|
+
:PATCH=>[:update_a_zone_transfer_request],
|
27
|
+
:DELETE=>[:delete_a_zone_transfer_request]},
|
28
|
+
"/v2/zones/tasks/transfer_accepts"=>
|
29
|
+
{:POST=>[:create_zone_transfer_accept], :GET=>[:list_zone_transfer_accepts]},
|
30
|
+
"/v2/zones/tasks/transfer_requests/{zone_transfer_accept_id}"=>
|
31
|
+
{:GET=>[:get_zone_transfer_accept]},
|
32
|
+
"/v2/zones/{zone_id}/recordsets"=>
|
33
|
+
{:POST=>
|
34
|
+
[:create_recordset,
|
35
|
+
:create_a_mx_recordset,
|
36
|
+
:create_a_sshfp_recordset,
|
37
|
+
:create_a_spf_recordset,
|
38
|
+
:create_a_srv_recordset],
|
39
|
+
:GET=>[:list_recordsets_in_a_zone]},
|
40
|
+
"/v2/recordsets"=>{:GET=>[:list_all_recordsets_owned_by_project]},
|
41
|
+
"/v2/zones/{zone_id}/recordsets/{recordset_id}"=>
|
42
|
+
{:GET=>[:show_a_recordset],
|
43
|
+
:PUT=>[:update_a_recordset],
|
44
|
+
:DELETE=>[:delete_a_recordset]},
|
45
|
+
"/v2/pools"=>{:GET=>[:list_all_pools]},
|
46
|
+
"/v2/pools/{pool_id}"=>{:GET=>[:show_a_pool]},
|
47
|
+
"/v2/limits"=>{:GET=>[:get_project_limits]},
|
48
|
+
"/v2/tlds"=>{:POST=>[:create_tld], :GET=>[:list_tlds]},
|
49
|
+
"/v2/tlds/{tld_id}"=>
|
50
|
+
{:GET=>[:show_tld], :PATCH=>[:update_tld], :DELETE=>[:delete_tld]},
|
51
|
+
"/v2/tsigkeys"=>{:POST=>[:create_tsigkeys], :GET=>[:list_tsigkeys]},
|
52
|
+
"/v2/tsigkeys/{tsigkey_id}"=>
|
53
|
+
{:GET=>[:show_a_tsigkey],
|
54
|
+
:PATCH=>[:update_tsigkey],
|
55
|
+
:DELETE=>[:delete_a_tsigkey]},
|
56
|
+
"/v2/blacklists"=>{:POST=>[:create_blacklist], :GET=>[:list_blacklists]},
|
57
|
+
"/v2/blacklists/{blacklist_id}"=>
|
58
|
+
{:GET=>[:show_blacklist],
|
59
|
+
:PATCH=>[:update_blacklist],
|
60
|
+
:DELETE=>[:delete_a_blacklist]},
|
61
|
+
"/v2/quotas/{project_id}"=>
|
62
|
+
{:GET=>[:view_quotas], :PATCH=>[:set_quotas], :DELETE=>[:reset_quotas]},
|
63
|
+
"/v2/quotas/"=>{:GET=>[:view_current_project_s_quotas]},
|
64
|
+
"/v2/reverse/floatingips/{region}:{floatingip_id}"=>
|
65
|
+
{:PATCH=>[:set_floatingip_s_ptr_record, :unset_floatingip_s_ptr_record],
|
66
|
+
:GET=>[:show_floatingip_s_ptr_record]},
|
67
|
+
"/v2/reverse/floatingips"=>{:GET=>[:list_floatingip_s_ptr_record]}}
|
68
|
+
end
|
69
|
+
end
|
@@ -0,0 +1,20 @@
|
|
1
|
+
require 'misty/http/client'
|
2
|
+
require "misty/openstack/designate/designate_v2"
|
3
|
+
|
4
|
+
module Misty
|
5
|
+
module Openstack
|
6
|
+
module Designate
|
7
|
+
class V2 < Misty::HTTP::Client
|
8
|
+
extend Misty::Openstack::DesignateV2
|
9
|
+
|
10
|
+
def self.api
|
11
|
+
v2
|
12
|
+
end
|
13
|
+
|
14
|
+
def self.service_names
|
15
|
+
%w{dns}
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|