fog-openstack 0.1.25 → 0.1.26
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop.yml +3 -1
- data/.travis.yml +4 -4
- data/.zuul.yaml +35 -0
- data/README.md +3 -3
- data/Rakefile +6 -9
- data/docs/planning.md +3 -3
- data/docs/storage.md +1 -1
- data/examples/planning/basics.rb +1 -1
- data/fog-openstack.gemspec +3 -3
- data/lib/fog/baremetal/openstack/requests/create_chassis.rb +4 -4
- data/lib/fog/baremetal/openstack/requests/create_node.rb +4 -4
- data/lib/fog/baremetal/openstack/requests/create_port.rb +4 -4
- data/lib/fog/baremetal/openstack/requests/get_chassis.rb +6 -6
- data/lib/fog/baremetal/openstack/requests/get_driver.rb +6 -6
- data/lib/fog/baremetal/openstack/requests/get_driver_properties.rb +6 -6
- data/lib/fog/baremetal/openstack/requests/get_node.rb +6 -6
- data/lib/fog/baremetal/openstack/requests/get_port.rb +6 -6
- data/lib/fog/baremetal/openstack/requests/list_chassis.rb +6 -6
- data/lib/fog/baremetal/openstack/requests/list_chassis_detailed.rb +6 -6
- data/lib/fog/baremetal/openstack/requests/list_drivers.rb +6 -6
- data/lib/fog/baremetal/openstack/requests/list_nodes.rb +6 -6
- data/lib/fog/baremetal/openstack/requests/list_nodes_detailed.rb +6 -6
- data/lib/fog/baremetal/openstack/requests/list_ports.rb +6 -6
- data/lib/fog/baremetal/openstack/requests/list_ports_detailed.rb +6 -6
- data/lib/fog/baremetal/openstack/requests/patch_chassis.rb +4 -4
- data/lib/fog/baremetal/openstack/requests/patch_node.rb +4 -4
- data/lib/fog/baremetal/openstack/requests/patch_port.rb +4 -4
- data/lib/fog/baremetal/openstack/requests/set_node_maintenance.rb +4 -4
- data/lib/fog/baremetal/openstack/requests/set_node_power_state.rb +4 -4
- data/lib/fog/baremetal/openstack/requests/set_node_provision_state.rb +4 -4
- data/lib/fog/baremetal/openstack/requests/unset_node_maintenance.rb +4 -4
- data/lib/fog/compute/openstack/models/network.rb +4 -4
- data/lib/fog/compute/openstack/models/networks.rb +4 -4
- data/lib/fog/compute/openstack/models/server.rb +1 -1
- data/lib/fog/compute/openstack/models/server_group.rb +4 -4
- data/lib/fog/compute/openstack/models/server_groups.rb +4 -4
- data/lib/fog/compute/openstack/models/tenant.rb +4 -4
- data/lib/fog/compute/openstack/models/tenants.rb +4 -4
- data/lib/fog/compute/openstack/requests/add_aggregate_host.rb +4 -4
- data/lib/fog/compute/openstack/requests/add_fixed_ip.rb +7 -7
- data/lib/fog/compute/openstack/requests/allocate_address.rb +3 -3
- data/lib/fog/compute/openstack/requests/boot_from_snapshot.rb +3 -3
- data/lib/fog/compute/openstack/requests/create_aggregate.rb +4 -4
- data/lib/fog/compute/openstack/requests/create_flavor.rb +4 -4
- data/lib/fog/compute/openstack/requests/create_flavor_metadata.rb +4 -4
- data/lib/fog/compute/openstack/requests/create_key_pair.rb +4 -4
- data/lib/fog/compute/openstack/requests/create_security_group.rb +4 -4
- data/lib/fog/compute/openstack/requests/create_security_group_rule.rb +4 -4
- data/lib/fog/compute/openstack/requests/delete_aggregate.rb +4 -4
- data/lib/fog/compute/openstack/requests/delete_flavor.rb +4 -4
- data/lib/fog/compute/openstack/requests/delete_key_pair.rb +4 -4
- data/lib/fog/compute/openstack/requests/delete_security_group.rb +4 -4
- data/lib/fog/compute/openstack/requests/delete_security_group_rule.rb +4 -4
- data/lib/fog/compute/openstack/requests/delete_service.rb +4 -4
- data/lib/fog/compute/openstack/requests/disable_service.rb +4 -4
- data/lib/fog/compute/openstack/requests/disable_service_log_reason.rb +4 -4
- data/lib/fog/compute/openstack/requests/enable_service.rb +4 -4
- data/lib/fog/compute/openstack/requests/get_address.rb +4 -4
- data/lib/fog/compute/openstack/requests/get_aggregate.rb +4 -4
- data/lib/fog/compute/openstack/requests/get_flavor_metadata.rb +4 -4
- data/lib/fog/compute/openstack/requests/get_host_details.rb +4 -4
- data/lib/fog/compute/openstack/requests/get_security_group.rb +4 -4
- data/lib/fog/compute/openstack/requests/get_security_group_rule.rb +4 -4
- data/lib/fog/compute/openstack/requests/get_server_volumes.rb +1 -1
- data/lib/fog/compute/openstack/requests/get_vnc_console.rb +7 -7
- data/lib/fog/compute/openstack/requests/list_aggregates.rb +4 -4
- data/lib/fog/compute/openstack/requests/list_all_addresses.rb +4 -4
- data/lib/fog/compute/openstack/requests/list_hosts.rb +4 -4
- data/lib/fog/compute/openstack/requests/list_key_pairs.rb +4 -4
- data/lib/fog/compute/openstack/requests/list_security_groups.rb +4 -4
- data/lib/fog/compute/openstack/requests/list_services.rb +4 -4
- data/lib/fog/compute/openstack/requests/list_tenants.rb +4 -4
- data/lib/fog/compute/openstack/requests/pause_server.rb +7 -7
- data/lib/fog/compute/openstack/requests/release_address.rb +1 -1
- data/lib/fog/compute/openstack/requests/remove_aggregate_host.rb +4 -4
- data/lib/fog/compute/openstack/requests/remove_fixed_ip.rb +7 -7
- data/lib/fog/compute/openstack/requests/rescue_server.rb +7 -7
- data/lib/fog/compute/openstack/requests/resume_server.rb +7 -7
- data/lib/fog/compute/openstack/requests/server_actions.rb +7 -7
- data/lib/fog/compute/openstack/requests/server_diagnostics.rb +7 -7
- data/lib/fog/compute/openstack/requests/set_tenant.rb +3 -3
- data/lib/fog/compute/openstack/requests/shelve_offload_server.rb +7 -7
- data/lib/fog/compute/openstack/requests/shelve_server.rb +7 -7
- data/lib/fog/compute/openstack/requests/start_server.rb +7 -7
- data/lib/fog/compute/openstack/requests/stop_server.rb +7 -7
- data/lib/fog/compute/openstack/requests/suspend_server.rb +7 -7
- data/lib/fog/compute/openstack/requests/unpause_server.rb +7 -7
- data/lib/fog/compute/openstack/requests/unshelve_server.rb +7 -7
- data/lib/fog/compute/openstack/requests/update_aggregate.rb +4 -4
- data/lib/fog/compute/openstack/requests/update_aggregate_metadata.rb +4 -4
- data/lib/fog/dns/openstack.rb +3 -0
- data/lib/fog/identity/openstack.rb +3 -0
- data/lib/fog/identity/openstack/v2/models/role.rb +5 -5
- data/lib/fog/identity/openstack/v2/models/roles.rb +4 -4
- data/lib/fog/identity/openstack/v2/models/tenant.rb +5 -5
- data/lib/fog/identity/openstack/v2/models/tenants.rb +5 -5
- data/lib/fog/identity/openstack/v2/models/user.rb +5 -5
- data/lib/fog/identity/openstack/v2/models/users.rb +5 -5
- data/lib/fog/identity/openstack/v2/requests/add_user_to_tenant.rb +6 -6
- data/lib/fog/identity/openstack/v2/requests/create_ec2_credential.rb +1 -1
- data/lib/fog/identity/openstack/v2/requests/create_role.rb +1 -1
- data/lib/fog/identity/openstack/v2/requests/create_tenant.rb +8 -8
- data/lib/fog/identity/openstack/v2/requests/create_user.rb +1 -1
- data/lib/fog/identity/openstack/v2/requests/create_user_role.rb +1 -1
- data/lib/fog/identity/openstack/v2/requests/delete_ec2_credential.rb +1 -1
- data/lib/fog/identity/openstack/v2/requests/delete_role.rb +1 -1
- data/lib/fog/identity/openstack/v2/requests/delete_tenant.rb +8 -8
- data/lib/fog/identity/openstack/v2/requests/delete_user.rb +1 -1
- data/lib/fog/identity/openstack/v2/requests/delete_user_role.rb +1 -1
- data/lib/fog/identity/openstack/v2/requests/get_ec2_credential.rb +1 -1
- data/lib/fog/identity/openstack/v2/requests/get_role.rb +5 -5
- data/lib/fog/identity/openstack/v2/requests/get_tenant.rb +7 -7
- data/lib/fog/identity/openstack/v2/requests/get_tenants_by_id.rb +1 -1
- data/lib/fog/identity/openstack/v2/requests/get_tenants_by_name.rb +1 -1
- data/lib/fog/identity/openstack/v2/requests/get_user_by_id.rb +1 -1
- data/lib/fog/identity/openstack/v2/requests/get_user_by_name.rb +1 -1
- data/lib/fog/identity/openstack/v2/requests/list_ec2_credentials.rb +1 -1
- data/lib/fog/identity/openstack/v2/requests/list_endpoints_for_token.rb +1 -1
- data/lib/fog/identity/openstack/v2/requests/list_roles.rb +1 -1
- data/lib/fog/identity/openstack/v2/requests/list_roles_for_user_on_tenant.rb +8 -8
- data/lib/fog/identity/openstack/v2/requests/list_tenants.rb +7 -7
- data/lib/fog/identity/openstack/v2/requests/list_user_global_roles.rb +1 -1
- data/lib/fog/identity/openstack/v2/requests/list_users.rb +6 -6
- data/lib/fog/identity/openstack/v2/requests/remove_user_from_tenant.rb +6 -6
- data/lib/fog/identity/openstack/v2/requests/set_tenant.rb +4 -4
- data/lib/fog/identity/openstack/v2/requests/update_tenant.rb +8 -8
- data/lib/fog/identity/openstack/v2/requests/update_user.rb +1 -1
- data/lib/fog/image/openstack.rb +3 -0
- data/lib/fog/image/openstack/v1/requests/add_member_to_image.rb +7 -7
- data/lib/fog/image/openstack/v1/requests/get_image.rb +6 -6
- data/lib/fog/image/openstack/v1/requests/get_image_by_id.rb +6 -6
- data/lib/fog/image/openstack/v1/requests/get_image_members.rb +6 -6
- data/lib/fog/image/openstack/v1/requests/get_shared_images.rb +6 -6
- data/lib/fog/image/openstack/v1/requests/list_public_images.rb +6 -6
- data/lib/fog/image/openstack/v1/requests/list_public_images_detailed.rb +6 -6
- data/lib/fog/image/openstack/v1/requests/remove_member_from_image.rb +6 -6
- data/lib/fog/image/openstack/v1/requests/set_tenant.rb +3 -3
- data/lib/fog/image/openstack/v1/requests/update_image_members.rb +5 -5
- data/lib/fog/image/openstack/v2/requests/add_member_to_image.rb +6 -6
- data/lib/fog/image/openstack/v2/requests/add_tag_to_image.rb +6 -6
- data/lib/fog/image/openstack/v2/requests/download_image.rb +6 -6
- data/lib/fog/image/openstack/v2/requests/get_image.rb +6 -6
- data/lib/fog/image/openstack/v2/requests/get_image_by_id.rb +6 -6
- data/lib/fog/image/openstack/v2/requests/get_image_members.rb +6 -6
- data/lib/fog/image/openstack/v2/requests/get_member_details.rb +6 -6
- data/lib/fog/image/openstack/v2/requests/get_shared_images.rb +6 -6
- data/lib/fog/image/openstack/v2/requests/list_images.rb +6 -6
- data/lib/fog/image/openstack/v2/requests/remove_member_from_image.rb +6 -6
- data/lib/fog/image/openstack/v2/requests/remove_tag_from_image.rb +6 -6
- data/lib/fog/image/openstack/v2/requests/set_tenant.rb +3 -3
- data/lib/fog/image/openstack/v2/requests/update_image_member.rb +5 -5
- data/lib/fog/openstack.rb +27 -47
- data/lib/fog/openstack/version.rb +2 -2
- data/lib/fog/planning/openstack.rb +2 -2
- data/lib/fog/planning/openstack/models/plan.rb +1 -1
- data/lib/fog/planning/openstack/models/plans.rb +2 -2
- data/lib/fog/planning/openstack/models/role.rb +1 -1
- data/lib/fog/planning/openstack/models/roles.rb +2 -2
- data/lib/fog/planning/openstack/requests/add_role_to_plan.rb +7 -7
- data/lib/fog/planning/openstack/requests/create_plan.rb +7 -7
- data/lib/fog/planning/openstack/requests/delete_plan.rb +7 -7
- data/lib/fog/planning/openstack/requests/get_plan.rb +7 -7
- data/lib/fog/planning/openstack/requests/get_plan_templates.rb +7 -7
- data/lib/fog/planning/openstack/requests/list_plans.rb +7 -7
- data/lib/fog/planning/openstack/requests/list_roles.rb +7 -7
- data/lib/fog/planning/openstack/requests/patch_plan.rb +7 -7
- data/lib/fog/planning/openstack/requests/remove_role_from_plan.rb +7 -7
- data/lib/fog/shared_file_system/openstack.rb +44 -9
- data/lib/fog/shared_file_system/openstack/requests/add_security_service_to_share_network.rb +28 -0
- data/lib/fog/shared_file_system/openstack/requests/create_security_service.rb +47 -0
- data/lib/fog/shared_file_system/openstack/requests/delete_security_service.rb +24 -0
- data/lib/fog/shared_file_system/openstack/requests/get_security_service.rb +26 -0
- data/lib/fog/shared_file_system/openstack/requests/list_security_services.rb +25 -0
- data/lib/fog/shared_file_system/openstack/requests/list_security_services_detail.rb +25 -0
- data/lib/fog/shared_file_system/openstack/requests/remove_security_service_from_share_network.rb +28 -0
- data/lib/fog/shared_file_system/openstack/requests/share_network_action.rb +16 -0
- data/lib/fog/shared_file_system/openstack/requests/update_security_service.rb +31 -0
- data/lib/fog/storage/openstack/models/file.rb +2 -0
- data/lib/fog/volume/openstack.rb +3 -0
- data/lib/fog/volume/openstack/requests/set_tenant.rb +3 -3
- data/playbooks/.gitkeep +0 -0
- data/playbooks/fog-openstack-unittest-spec/run.yaml +57 -0
- data/playbooks/fog-openstack-unittest-test/run.yaml +57 -0
- metadata +18 -6
- data/.ruby-version +0 -1
@@ -11,14 +11,14 @@ module Fog
|
|
11
11
|
def shelve_server(server_id)
|
12
12
|
body = {'shelve' => nil}
|
13
13
|
server_action(server_id, body).status == 202
|
14
|
-
end
|
15
|
-
end
|
14
|
+
end
|
15
|
+
end
|
16
16
|
|
17
17
|
class Mock
|
18
18
|
def shelve_server(_server_id)
|
19
19
|
true
|
20
|
-
end
|
21
|
-
end
|
22
|
-
end
|
23
|
-
end
|
24
|
-
end
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
@@ -11,14 +11,14 @@ module Fog
|
|
11
11
|
def start_server(server_id)
|
12
12
|
body = {'os-start' => nil}
|
13
13
|
server_action(server_id, body).status == 202
|
14
|
-
end
|
15
|
-
end
|
14
|
+
end
|
15
|
+
end
|
16
16
|
|
17
17
|
class Mock
|
18
18
|
def start_server(_server_id)
|
19
19
|
true
|
20
|
-
end
|
21
|
-
end
|
22
|
-
end
|
23
|
-
end
|
24
|
-
end
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
@@ -11,14 +11,14 @@ module Fog
|
|
11
11
|
def stop_server(server_id)
|
12
12
|
body = {'os-stop' => nil}
|
13
13
|
server_action(server_id, body).status == 202
|
14
|
-
end
|
15
|
-
end
|
14
|
+
end
|
15
|
+
end
|
16
16
|
|
17
17
|
class Mock
|
18
18
|
def stop_server(_server_id)
|
19
19
|
true
|
20
|
-
end
|
21
|
-
end
|
22
|
-
end
|
23
|
-
end
|
24
|
-
end
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
@@ -11,14 +11,14 @@ module Fog
|
|
11
11
|
def suspend_server(server_id)
|
12
12
|
body = {'suspend' => nil}
|
13
13
|
server_action(server_id, body).status == 202
|
14
|
-
end
|
15
|
-
end
|
14
|
+
end
|
15
|
+
end
|
16
16
|
|
17
17
|
class Mock
|
18
18
|
def suspend_server(_server_id)
|
19
19
|
true
|
20
|
-
end
|
21
|
-
end
|
22
|
-
end
|
23
|
-
end
|
24
|
-
end
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
@@ -11,14 +11,14 @@ module Fog
|
|
11
11
|
def unpause_server(server_id)
|
12
12
|
body = {'unpause' => nil}
|
13
13
|
server_action(server_id, body).status == 202
|
14
|
-
end
|
15
|
-
end
|
14
|
+
end
|
15
|
+
end
|
16
16
|
|
17
17
|
class Mock
|
18
18
|
def unpause_server(_server_id)
|
19
19
|
true
|
20
|
-
end
|
21
|
-
end
|
22
|
-
end
|
23
|
-
end
|
24
|
-
end
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
@@ -11,14 +11,14 @@ module Fog
|
|
11
11
|
def unshelve_server(server_id)
|
12
12
|
body = {'unshelve' => nil}
|
13
13
|
server_action(server_id, body).status == 202
|
14
|
-
end
|
15
|
-
end
|
14
|
+
end
|
15
|
+
end
|
16
16
|
|
17
17
|
class Mock
|
18
18
|
def unshelve_server(_server_id)
|
19
19
|
true
|
20
|
-
end
|
21
|
-
end
|
22
|
-
end
|
23
|
-
end
|
24
|
-
end
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
data/lib/fog/dns/openstack.rb
CHANGED
@@ -1,6 +1,9 @@
|
|
1
1
|
module Fog
|
2
2
|
module DNS
|
3
3
|
class OpenStack < Fog::Service
|
4
|
+
autoload :V1, 'fog/dns/openstack/v1'
|
5
|
+
autoload :V2, 'fog/dns/openstack/v2'
|
6
|
+
|
4
7
|
# Fog::DNS::OpenStack.new() will return a Fog::DNS::OpenStack::V2 or a Fog::DNS::OpenStack::V1,
|
5
8
|
# choosing the latest available
|
6
9
|
def self.new(args = {})
|
@@ -3,6 +3,9 @@
|
|
3
3
|
module Fog
|
4
4
|
module Identity
|
5
5
|
class OpenStack < Fog::Service
|
6
|
+
autoload :V2, 'fog/identity/openstack/v2'
|
7
|
+
autoload :V3, 'fog/identity/openstack/v3'
|
8
|
+
|
6
9
|
requires :openstack_auth_url
|
7
10
|
recognizes :openstack_auth_token, :openstack_management_url, :persistent,
|
8
11
|
:openstack_service_type, :openstack_service_name, :openstack_tenant,
|
@@ -46,8 +46,8 @@ module Fog
|
|
46
46
|
def get_id(model_or_string)
|
47
47
|
model_or_string.kind_of?(String) ? id : model_or_string.id
|
48
48
|
end
|
49
|
-
end
|
50
|
-
end
|
51
|
-
end
|
52
|
-
end
|
53
|
-
end
|
49
|
+
end
|
50
|
+
end
|
51
|
+
end
|
52
|
+
end
|
53
|
+
end
|
@@ -56,8 +56,8 @@ module Fog
|
|
56
56
|
def revoke_user_role(user_id, role_id)
|
57
57
|
service.remove_user_from_tenant(id, user_id, role_id)
|
58
58
|
end
|
59
|
-
end
|
60
|
-
end
|
61
|
-
end
|
62
|
-
end
|
63
|
-
end
|
59
|
+
end
|
60
|
+
end
|
61
|
+
end
|
62
|
+
end
|
63
|
+
end
|
@@ -10,7 +10,7 @@ module Fog
|
|
10
10
|
:path => "/tenants/#{tenant_id}/users/#{user_id}/roles/OS-KSADM/#{role_id}"
|
11
11
|
)
|
12
12
|
end
|
13
|
-
end
|
13
|
+
end
|
14
14
|
|
15
15
|
class Mock
|
16
16
|
def add_user_to_tenant(tenant_id, user_id, role_id)
|
@@ -28,9 +28,9 @@ module Fog
|
|
28
28
|
}
|
29
29
|
}
|
30
30
|
response
|
31
|
-
end
|
32
|
-
end
|
33
|
-
end
|
34
|
-
end
|
35
|
-
end
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
36
36
|
end
|
@@ -10,8 +10,8 @@ module Fog
|
|
10
10
|
:path => "tenants",
|
11
11
|
:body => Fog::JSON.encode('tenant' => attributes)
|
12
12
|
)
|
13
|
-
end
|
14
|
-
end
|
13
|
+
end
|
14
|
+
end
|
15
15
|
|
16
16
|
class Mock
|
17
17
|
def create_tenant(attributes)
|
@@ -26,9 +26,9 @@ module Fog
|
|
26
26
|
}
|
27
27
|
}
|
28
28
|
response
|
29
|
-
end
|
30
|
-
end
|
31
|
-
end
|
32
|
-
end
|
33
|
-
end
|
34
|
-
end
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
@@ -9,8 +9,8 @@ module Fog
|
|
9
9
|
:method => 'DELETE',
|
10
10
|
:path => "tenants/#{id}"
|
11
11
|
)
|
12
|
-
end
|
13
|
-
end
|
12
|
+
end
|
13
|
+
end
|
14
14
|
|
15
15
|
class Mock
|
16
16
|
def delete_tenant(_attributes)
|
@@ -25,9 +25,9 @@ module Fog
|
|
25
25
|
}
|
26
26
|
}
|
27
27
|
response
|
28
|
-
end
|
29
|
-
end
|
30
|
-
end
|
31
|
-
end
|
32
|
-
end
|
33
|
-
end
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|