fog 1.32.0 → 1.33.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +59 -0
- data/Gemfile +1 -0
- data/Rakefile +4 -4
- data/fog.gemspec +3 -2
- data/lib/fog/linode/requests/compute/avail_datacenters.rb +8 -7
- data/lib/fog/openstack.rb +1 -0
- data/lib/fog/openstack/compute.rb +7 -1
- data/lib/fog/openstack/core.rb +28 -54
- data/lib/fog/openstack/identity.rb +1 -0
- data/lib/fog/openstack/identity_v3.rb +10 -9
- data/lib/fog/openstack/models/baremetal/chassis.rb +3 -14
- data/lib/fog/openstack/models/baremetal/chassis_collection.rb +5 -5
- data/lib/fog/openstack/models/baremetal/driver.rb +2 -8
- data/lib/fog/openstack/models/baremetal/drivers.rb +3 -5
- data/lib/fog/openstack/models/baremetal/node.rb +3 -14
- data/lib/fog/openstack/models/baremetal/nodes.rb +4 -4
- data/lib/fog/openstack/models/baremetal/port.rb +3 -14
- data/lib/fog/openstack/models/baremetal/ports.rb +4 -4
- data/lib/fog/openstack/models/collection.rb +45 -0
- data/lib/fog/openstack/models/compute/address.rb +2 -2
- data/lib/fog/openstack/models/compute/addresses.rb +3 -5
- data/lib/fog/openstack/models/compute/aggregate.rb +2 -8
- data/lib/fog/openstack/models/compute/aggregates.rb +3 -5
- data/lib/fog/openstack/models/compute/availability_zone.rb +14 -0
- data/lib/fog/openstack/models/compute/availability_zones.rb +22 -0
- data/lib/fog/openstack/models/compute/flavor.rb +2 -8
- data/lib/fog/openstack/models/compute/flavors.rb +6 -6
- data/lib/fog/openstack/models/compute/host.rb +1 -1
- data/lib/fog/openstack/models/compute/hosts.rb +4 -6
- data/lib/fog/openstack/models/compute/image.rb +2 -8
- data/lib/fog/openstack/models/compute/images.rb +4 -6
- data/lib/fog/openstack/models/compute/key_pair.rb +2 -2
- data/lib/fog/openstack/models/compute/key_pairs.rb +3 -4
- data/lib/fog/openstack/models/compute/metadata.rb +3 -2
- data/lib/fog/openstack/models/compute/metadatum.rb +2 -2
- data/lib/fog/openstack/models/compute/network.rb +2 -2
- data/lib/fog/openstack/models/compute/networks.rb +3 -2
- data/lib/fog/openstack/models/compute/security_group.rb +2 -2
- data/lib/fog/openstack/models/compute/security_group_rule.rb +2 -2
- data/lib/fog/openstack/models/compute/security_group_rules.rb +2 -2
- data/lib/fog/openstack/models/compute/security_groups.rb +3 -5
- data/lib/fog/openstack/models/compute/server.rb +20 -1
- data/lib/fog/openstack/models/compute/servers.rb +9 -5
- data/lib/fog/openstack/models/compute/service.rb +2 -8
- data/lib/fog/openstack/models/compute/services.rb +4 -4
- data/lib/fog/openstack/models/compute/snapshot.rb +2 -8
- data/lib/fog/openstack/models/compute/snapshots.rb +5 -5
- data/lib/fog/openstack/models/compute/tenant.rb +2 -2
- data/lib/fog/openstack/models/compute/tenants.rb +3 -4
- data/lib/fog/openstack/models/compute/volume.rb +2 -8
- data/lib/fog/openstack/models/compute/volumes.rb +5 -5
- data/lib/fog/openstack/models/identity_v2/ec2_credential.rb +3 -9
- data/lib/fog/openstack/models/identity_v2/ec2_credentials.rb +3 -5
- data/lib/fog/openstack/models/identity_v2/role.rb +3 -3
- data/lib/fog/openstack/models/identity_v2/roles.rb +3 -5
- data/lib/fog/openstack/models/identity_v2/tenant.rb +5 -9
- data/lib/fog/openstack/models/identity_v2/tenants.rb +3 -5
- data/lib/fog/openstack/models/identity_v2/user.rb +2 -8
- data/lib/fog/openstack/models/identity_v2/users.rb +3 -5
- data/lib/fog/openstack/models/identity_v3/domain.rb +5 -9
- data/lib/fog/openstack/models/identity_v3/domains.rb +3 -5
- data/lib/fog/openstack/models/identity_v3/endpoint.rb +5 -9
- data/lib/fog/openstack/models/identity_v3/endpoints.rb +3 -5
- data/lib/fog/openstack/models/identity_v3/group.rb +5 -9
- data/lib/fog/openstack/models/identity_v3/groups.rb +3 -5
- data/lib/fog/openstack/models/identity_v3/os_credential.rb +3 -3
- data/lib/fog/openstack/models/identity_v3/os_credentials.rb +3 -5
- data/lib/fog/openstack/models/identity_v3/policies.rb +3 -5
- data/lib/fog/openstack/models/identity_v3/policy.rb +5 -9
- data/lib/fog/openstack/models/identity_v3/project.rb +5 -8
- data/lib/fog/openstack/models/identity_v3/projects.rb +21 -10
- data/lib/fog/openstack/models/identity_v3/role.rb +3 -8
- data/lib/fog/openstack/models/identity_v3/role_assignment.rb +3 -3
- data/lib/fog/openstack/models/identity_v3/role_assignments.rb +3 -5
- data/lib/fog/openstack/models/identity_v3/roles.rb +3 -5
- data/lib/fog/openstack/models/identity_v3/service.rb +3 -3
- data/lib/fog/openstack/models/identity_v3/services.rb +3 -5
- data/lib/fog/openstack/models/identity_v3/token.rb +3 -3
- data/lib/fog/openstack/models/identity_v3/tokens.rb +3 -3
- data/lib/fog/openstack/models/identity_v3/user.rb +3 -9
- data/lib/fog/openstack/models/identity_v3/users.rb +3 -5
- data/lib/fog/openstack/models/image/image.rb +2 -13
- data/lib/fog/openstack/models/image/images.rb +5 -5
- data/lib/fog/openstack/models/metering/resource.rb +2 -7
- data/lib/fog/openstack/models/metering/resources.rb +3 -3
- data/lib/fog/openstack/models/model.rb +44 -0
- data/lib/fog/openstack/models/network/floating_ip.rb +2 -7
- data/lib/fog/openstack/models/network/floating_ips.rb +3 -5
- data/lib/fog/openstack/models/network/lb_health_monitor.rb +2 -12
- data/lib/fog/openstack/models/network/lb_health_monitors.rb +3 -5
- data/lib/fog/openstack/models/network/lb_member.rb +2 -12
- data/lib/fog/openstack/models/network/lb_members.rb +3 -5
- data/lib/fog/openstack/models/network/lb_pool.rb +2 -12
- data/lib/fog/openstack/models/network/lb_pools.rb +3 -5
- data/lib/fog/openstack/models/network/lb_vip.rb +2 -12
- data/lib/fog/openstack/models/network/lb_vips.rb +3 -5
- data/lib/fog/openstack/models/network/network.rb +2 -12
- data/lib/fog/openstack/models/network/networks.rb +3 -5
- data/lib/fog/openstack/models/network/port.rb +2 -13
- data/lib/fog/openstack/models/network/ports.rb +3 -5
- data/lib/fog/openstack/models/network/router.rb +2 -13
- data/lib/fog/openstack/models/network/routers.rb +3 -5
- data/lib/fog/openstack/models/network/security_group.rb +2 -2
- data/lib/fog/openstack/models/network/security_group_rule.rb +2 -2
- data/lib/fog/openstack/models/network/security_group_rules.rb +3 -5
- data/lib/fog/openstack/models/network/security_groups.rb +3 -5
- data/lib/fog/openstack/models/network/subnet.rb +3 -14
- data/lib/fog/openstack/models/network/subnets.rb +3 -5
- data/lib/fog/openstack/models/orchestration/event.rb +2 -2
- data/lib/fog/openstack/models/orchestration/events.rb +5 -7
- data/lib/fog/openstack/models/orchestration/resource.rb +2 -2
- data/lib/fog/openstack/models/orchestration/resource_schemas.rb +2 -2
- data/lib/fog/openstack/models/orchestration/resources.rb +3 -5
- data/lib/fog/openstack/models/orchestration/stack.rb +3 -7
- data/lib/fog/openstack/models/orchestration/stacks.rb +5 -5
- data/lib/fog/openstack/models/orchestration/template.rb +2 -2
- data/lib/fog/openstack/models/orchestration/templates.rb +1 -1
- data/lib/fog/openstack/models/planning/plan.rb +2 -13
- data/lib/fog/openstack/models/planning/plans.rb +3 -5
- data/lib/fog/openstack/models/planning/role.rb +2 -8
- data/lib/fog/openstack/models/planning/roles.rb +3 -6
- data/lib/fog/openstack/models/storage/directories.rb +4 -6
- data/lib/fog/openstack/models/storage/directory.rb +2 -2
- data/lib/fog/openstack/models/storage/file.rb +15 -2
- data/lib/fog/openstack/models/storage/files.rb +7 -8
- data/lib/fog/openstack/models/volume/availability_zone.rb +13 -0
- data/lib/fog/openstack/models/volume/availability_zones.rb +17 -0
- data/lib/fog/openstack/models/volume/transfer.rb +36 -0
- data/lib/fog/openstack/models/volume/transfers.rb +38 -0
- data/lib/fog/openstack/models/volume/volume.rb +9 -8
- data/lib/fog/openstack/models/volume/volume_type.rb +2 -8
- data/lib/fog/openstack/models/volume/volume_types.rb +3 -6
- data/lib/fog/openstack/models/volume/volumes.rb +5 -6
- data/lib/fog/openstack/requests/compute/list_servers.rb +8 -5
- data/lib/fog/openstack/requests/compute/list_servers_detail.rb +9 -6
- data/lib/fog/openstack/requests/compute/list_zones.rb +6 -5
- data/lib/fog/openstack/requests/compute/list_zones_detailed.rb +55 -0
- data/lib/fog/openstack/requests/compute/shelve_offload_server.rb +24 -0
- data/lib/fog/openstack/requests/compute/shelve_server.rb +24 -0
- data/lib/fog/openstack/requests/compute/unshelve_server.rb +24 -0
- data/lib/fog/openstack/requests/identity_v3/get_project.rb +2 -2
- data/lib/fog/openstack/requests/network/create_subnet.rb +1 -1
- data/lib/fog/openstack/requests/network/update_subnet.rb +8 -7
- data/lib/fog/openstack/requests/volume/accept_transfer.rb +24 -0
- data/lib/fog/openstack/requests/volume/create_transfer.rb +27 -0
- data/lib/fog/openstack/requests/volume/delete_transfer.rb +17 -0
- data/lib/fog/openstack/requests/volume/extend_volume.rb +25 -0
- data/lib/fog/openstack/requests/volume/get_transfer_details.rb +17 -0
- data/lib/fog/openstack/requests/volume/list_transfers.rb +18 -0
- data/lib/fog/openstack/requests/volume/list_transfers_detailed.rb +18 -0
- data/lib/fog/openstack/requests/volume/list_zones.rb +32 -0
- data/lib/fog/openstack/storage.rb +3 -1
- data/lib/fog/openstack/volume.rb +16 -0
- data/lib/fog/rackspace/examples/compute_v2/create_network.rb +1 -1
- data/lib/fog/vcloud_director/generators/compute/edge_gateway_service_configuration.rb +31 -30
- data/lib/fog/vcloud_director/models/compute/task.rb +2 -2
- data/lib/fog/version.rb +1 -1
- data/lib/fog/vsphere/compute.rb +1 -0
- data/lib/fog/vsphere/requests/compute/get_resource_pool.rb +1 -1
- data/lib/fog/vsphere/requests/compute/get_virtual_machine.rb +4 -3
- data/lib/fog/vsphere/requests/compute/list_clusters.rb +1 -1
- data/lib/fog/vsphere/requests/compute/list_vm_interfaces.rb +2 -2
- data/lib/fog/vsphere/requests/compute/vm_clone.rb +101 -30
- data/lib/fog/vsphere/requests/compute/vm_execute.rb +47 -0
- data/lib/tasks/changelog_task.rb +1 -0
- data/spec/fog/openstack/identity_v3/{idv3.yml → common_setup.yml} +0 -0
- data/spec/fog/openstack/identity_v3/idv3_project_hier_crud_list.yml +1394 -0
- data/spec/fog/openstack/identity_v3_spec.rb +255 -196
- data/spec/fog/openstack/network/common_setup.yml +131 -0
- data/spec/fog/openstack/network/subnets_crud.yml +140 -0
- data/spec/fog/openstack/network_spec.rb +43 -0
- data/spec/fog/openstack/shared_context.rb +98 -0
- data/spec/fog/openstack/volume/{volume_common_setup.yml → common_setup.yml} +0 -0
- data/spec/fog/openstack/volume/volume_extend.yml +762 -0
- data/spec/fog/openstack/volume/volume_transfer_and_accept.yml +1078 -0
- data/spec/fog/openstack/volume/volume_transfer_and_delete.yml +695 -0
- data/spec/fog/openstack/volume_spec.rb +232 -67
- data/tests/openstack/models/storage/file_tests.rb +26 -0
- data/tests/openstack/requests/compute/availability_zone_tests.rb +18 -0
- data/tests/openstack/requests/compute/server_tests.rb +12 -0
- data/tests/openstack/requests/network/subnet_tests.rb +2 -2
- data/tests/openstack/requests/volume/availability_zone_tests.rb +13 -0
- data/tests/vcloud_director/requests/compute/edge_gateway_tests.rb +2 -2
- metadata +61 -26
- data/lib/fog/dynect.rb +0 -1
- data/lib/fog/dynect/core.rb +0 -26
- data/lib/fog/dynect/dns.rb +0 -157
- data/lib/fog/dynect/models/dns/record.rb +0 -67
- data/lib/fog/dynect/models/dns/records.rb +0 -48
- data/lib/fog/dynect/models/dns/zone.rb +0 -56
- data/lib/fog/dynect/models/dns/zones.rb +0 -25
- data/lib/fog/dynect/requests/dns/delete_record.rb +0 -55
- data/lib/fog/dynect/requests/dns/delete_zone.rb +0 -41
- data/lib/fog/dynect/requests/dns/get_all_records.rb +0 -56
- data/lib/fog/dynect/requests/dns/get_node_list.rb +0 -55
- data/lib/fog/dynect/requests/dns/get_record.rb +0 -83
- data/lib/fog/dynect/requests/dns/get_zone.rb +0 -57
- data/lib/fog/dynect/requests/dns/post_record.rb +0 -71
- data/lib/fog/dynect/requests/dns/post_session.rb +0 -43
- data/lib/fog/dynect/requests/dns/post_zone.rb +0 -70
- data/lib/fog/dynect/requests/dns/put_record.rb +0 -76
- data/lib/fog/dynect/requests/dns/put_zone.rb +0 -76
- data/tests/dynect/requests/dns/dns_tests.rb +0 -258
@@ -1,10 +1,10 @@
|
|
1
|
-
require 'fog/
|
1
|
+
require 'fog/openstack/models/collection'
|
2
2
|
require 'fog/openstack/models/compute/volume'
|
3
3
|
|
4
4
|
module Fog
|
5
5
|
module Compute
|
6
6
|
class OpenStack
|
7
|
-
class Volumes < Fog::Collection
|
7
|
+
class Volumes < Fog::OpenStack::Collection
|
8
8
|
model Fog::Compute::OpenStack::Volume
|
9
9
|
|
10
10
|
def all(options = true)
|
@@ -14,14 +14,14 @@ module Fog
|
|
14
14
|
else
|
15
15
|
Fog::Logger.deprecation('Calling OpenStack[:compute].volumes.all(false) is deprecated, use .volumes.summary')
|
16
16
|
end
|
17
|
-
|
17
|
+
load_response(service.list_volumes(options), 'volumes')
|
18
18
|
else
|
19
|
-
|
19
|
+
load_response(service.list_volumes_detail(options), 'volumes')
|
20
20
|
end
|
21
21
|
end
|
22
22
|
|
23
23
|
def summary(options = {})
|
24
|
-
|
24
|
+
load_response(service.list_volumes(options), 'volumes')
|
25
25
|
end
|
26
26
|
|
27
27
|
def get(volume_id)
|
@@ -1,22 +1,16 @@
|
|
1
|
-
require 'fog/
|
1
|
+
require 'fog/openstack/models/model'
|
2
2
|
|
3
3
|
module Fog
|
4
4
|
module Identity
|
5
5
|
class OpenStack
|
6
6
|
class V2
|
7
|
-
class Ec2Credential < Fog::Model
|
7
|
+
class Ec2Credential < Fog::OpenStack::Model
|
8
8
|
identity :access, :aliases => 'access_key'
|
9
9
|
|
10
10
|
attribute :secret, :aliases => 'secret_key'
|
11
11
|
attribute :tenant_id
|
12
12
|
attribute :user_id
|
13
13
|
|
14
|
-
def initialize(attributes)
|
15
|
-
# Old 'connection' is renamed as service and should be used instead
|
16
|
-
prepare_service_value(attributes)
|
17
|
-
super
|
18
|
-
end
|
19
|
-
|
20
14
|
def destroy
|
21
15
|
requires :access
|
22
16
|
requires :user_id
|
@@ -42,4 +36,4 @@ module Fog
|
|
42
36
|
end
|
43
37
|
end
|
44
38
|
end
|
45
|
-
end
|
39
|
+
end
|
@@ -1,11 +1,11 @@
|
|
1
|
-
require 'fog/
|
1
|
+
require 'fog/openstack/models/collection'
|
2
2
|
require 'fog/openstack/models/identity_v2/ec2_credential'
|
3
3
|
|
4
4
|
module Fog
|
5
5
|
module Identity
|
6
6
|
class OpenStack
|
7
7
|
class V2
|
8
|
-
class Ec2Credentials < Fog::Collection
|
8
|
+
class Ec2Credentials < Fog::OpenStack::Collection
|
9
9
|
model Fog::Identity::OpenStack::V2::Ec2Credential
|
10
10
|
|
11
11
|
attribute :user
|
@@ -16,11 +16,9 @@ module Fog
|
|
16
16
|
options[:user_id] = user_id
|
17
17
|
ec2_credentials = service.list_ec2_credentials(options)
|
18
18
|
|
19
|
-
|
19
|
+
load_response(ec2_credentials, 'credentials')
|
20
20
|
end
|
21
21
|
|
22
|
-
alias_method :summary, :all
|
23
|
-
|
24
22
|
def create(attributes = {})
|
25
23
|
if user then
|
26
24
|
attributes[:user_id] ||= user.id
|
@@ -1,10 +1,10 @@
|
|
1
|
-
require 'fog/
|
1
|
+
require 'fog/openstack/models/model'
|
2
2
|
|
3
3
|
module Fog
|
4
4
|
module Identity
|
5
5
|
class OpenStack
|
6
6
|
class V2
|
7
|
-
class Role < Fog::Model
|
7
|
+
class Role < Fog::OpenStack::Model
|
8
8
|
identity :id
|
9
9
|
attribute :name
|
10
10
|
|
@@ -49,4 +49,4 @@ module Fog
|
|
49
49
|
end # class V2
|
50
50
|
end # class OpenStack
|
51
51
|
end # module Identity
|
52
|
-
end # module Fog
|
52
|
+
end # module Fog
|
@@ -1,19 +1,17 @@
|
|
1
|
-
require 'fog/
|
1
|
+
require 'fog/openstack/models/collection'
|
2
2
|
require 'fog/openstack/models/identity_v2/role'
|
3
3
|
|
4
4
|
module Fog
|
5
5
|
module Identity
|
6
6
|
class OpenStack
|
7
7
|
class V2
|
8
|
-
class Roles < Fog::Collection
|
8
|
+
class Roles < Fog::OpenStack::Collection
|
9
9
|
model Fog::Identity::OpenStack::V2::Role
|
10
10
|
|
11
11
|
def all(options = {})
|
12
|
-
|
12
|
+
load_response(service.list_roles(options), 'roles')
|
13
13
|
end
|
14
14
|
|
15
|
-
alias_method :summary, :all
|
16
|
-
|
17
15
|
def get(id)
|
18
16
|
service.get_role(id)
|
19
17
|
end
|
@@ -1,10 +1,10 @@
|
|
1
|
-
require 'fog/
|
1
|
+
require 'fog/openstack/models/model'
|
2
2
|
|
3
3
|
module Fog
|
4
4
|
module Identity
|
5
5
|
class OpenStack
|
6
6
|
class V2
|
7
|
-
class Tenant < Fog::Model
|
7
|
+
class Tenant < Fog::OpenStack::Model
|
8
8
|
identity :id
|
9
9
|
|
10
10
|
attribute :description
|
@@ -33,18 +33,14 @@ module Fog
|
|
33
33
|
end
|
34
34
|
|
35
35
|
def update(attr = nil)
|
36
|
-
requires :id
|
36
|
+
requires :id, :name
|
37
37
|
merge_attributes(
|
38
38
|
service.update_tenant(self.id, attr || attributes).body['tenant'])
|
39
39
|
self
|
40
40
|
end
|
41
41
|
|
42
|
-
def save
|
43
|
-
requires :name
|
44
|
-
identity ? update : create
|
45
|
-
end
|
46
|
-
|
47
42
|
def create
|
43
|
+
requires :name
|
48
44
|
merge_attributes(
|
49
45
|
service.create_tenant(attributes).body['tenant'])
|
50
46
|
self
|
@@ -61,4 +57,4 @@ module Fog
|
|
61
57
|
end # class V2
|
62
58
|
end # class OpenStack
|
63
59
|
end # module Identity
|
64
|
-
end # module Fog
|
60
|
+
end # module Fog
|
@@ -1,19 +1,17 @@
|
|
1
|
-
require 'fog/
|
1
|
+
require 'fog/openstack/models/collection'
|
2
2
|
require 'fog/openstack/models/identity_v2/tenant'
|
3
3
|
|
4
4
|
module Fog
|
5
5
|
module Identity
|
6
6
|
class OpenStack
|
7
7
|
class V2
|
8
|
-
class Tenants < Fog::Collection
|
8
|
+
class Tenants < Fog::OpenStack::Collection
|
9
9
|
model Fog::Identity::OpenStack::V2::Tenant
|
10
10
|
|
11
11
|
def all(options = {})
|
12
|
-
|
12
|
+
load_response(service.list_tenants(options), 'tenants')
|
13
13
|
end
|
14
14
|
|
15
|
-
alias_method :summary, :all
|
16
|
-
|
17
15
|
def find_by_id(id)
|
18
16
|
cached_tenant = self.find { |tenant| tenant.id == id }
|
19
17
|
return cached_tenant if cached_tenant
|
@@ -1,10 +1,10 @@
|
|
1
|
-
require 'fog/
|
1
|
+
require 'fog/openstack/models/model'
|
2
2
|
|
3
3
|
module Fog
|
4
4
|
module Identity
|
5
5
|
class OpenStack
|
6
6
|
class V2
|
7
|
-
class User < Fog::Model
|
7
|
+
class User < Fog::OpenStack::Model
|
8
8
|
identity :id
|
9
9
|
|
10
10
|
attribute :email
|
@@ -15,12 +15,6 @@ module Fog
|
|
15
15
|
|
16
16
|
attr_accessor :email, :name, :tenant_id, :enabled, :password
|
17
17
|
|
18
|
-
def initialize(attributes)
|
19
|
-
# Old 'connection' is renamed as service and should be used instead
|
20
|
-
prepare_service_value(attributes)
|
21
|
-
super
|
22
|
-
end
|
23
|
-
|
24
18
|
def ec2_credentials
|
25
19
|
requires :id
|
26
20
|
service.ec2_credentials(:user => self)
|
@@ -1,11 +1,11 @@
|
|
1
|
-
require 'fog/
|
1
|
+
require 'fog/openstack/models/collection'
|
2
2
|
require 'fog/openstack/models/identity_v2/user'
|
3
3
|
|
4
4
|
module Fog
|
5
5
|
module Identity
|
6
6
|
class OpenStack
|
7
7
|
class V2
|
8
|
-
class Users < Fog::Collection
|
8
|
+
class Users < Fog::OpenStack::Collection
|
9
9
|
model Fog::Identity::OpenStack::V2::User
|
10
10
|
|
11
11
|
attribute :tenant_id
|
@@ -13,11 +13,9 @@ module Fog
|
|
13
13
|
def all(options = {})
|
14
14
|
options[:tenant_id] = tenant_id
|
15
15
|
|
16
|
-
|
16
|
+
load_response(service.list_users(options), 'users')
|
17
17
|
end
|
18
18
|
|
19
|
-
alias_method :summary, :all
|
20
|
-
|
21
19
|
def find_by_id(id)
|
22
20
|
self.find { |user| user.id == id } ||
|
23
21
|
Fog::Identity::OpenStack::V2::User.new(
|
@@ -1,10 +1,10 @@
|
|
1
|
-
require 'fog/
|
1
|
+
require 'fog/openstack/models/model'
|
2
2
|
|
3
3
|
module Fog
|
4
4
|
module Identity
|
5
5
|
class OpenStack
|
6
6
|
class V3
|
7
|
-
class Domain < Fog::Model
|
7
|
+
class Domain < Fog::OpenStack::Model
|
8
8
|
identity :id
|
9
9
|
|
10
10
|
attribute :description
|
@@ -23,18 +23,14 @@ module Fog
|
|
23
23
|
end
|
24
24
|
|
25
25
|
def update(attr = nil)
|
26
|
-
requires :id
|
26
|
+
requires :id, :name
|
27
27
|
merge_attributes(
|
28
28
|
service.update_domain(self.id, attr || attributes).body['domain'])
|
29
29
|
self
|
30
30
|
end
|
31
31
|
|
32
|
-
def save
|
33
|
-
requires :name
|
34
|
-
identity ? update : create
|
35
|
-
end
|
36
|
-
|
37
32
|
def create
|
33
|
+
requires :name
|
38
34
|
merge_attributes(
|
39
35
|
service.create_domain(attributes).body['domain'])
|
40
36
|
self
|
@@ -44,4 +40,4 @@ module Fog
|
|
44
40
|
end
|
45
41
|
end
|
46
42
|
end
|
47
|
-
end
|
43
|
+
end
|
@@ -1,19 +1,17 @@
|
|
1
|
-
require 'fog/
|
1
|
+
require 'fog/openstack/models/collection'
|
2
2
|
require 'fog/openstack/models/identity_v3/domain'
|
3
3
|
|
4
4
|
module Fog
|
5
5
|
module Identity
|
6
6
|
class OpenStack
|
7
7
|
class V3
|
8
|
-
class Domains < Fog::Collection
|
8
|
+
class Domains < Fog::OpenStack::Collection
|
9
9
|
model Fog::Identity::OpenStack::V3::Domain
|
10
10
|
|
11
11
|
def all(options = {})
|
12
|
-
|
12
|
+
load_response(service.list_domains(options), 'domains')
|
13
13
|
end
|
14
14
|
|
15
|
-
alias_method :summary, :all
|
16
|
-
|
17
15
|
def auth_domains(options = {})
|
18
16
|
load(service.auth_domains(options).body['domains'])
|
19
17
|
end
|
@@ -1,10 +1,10 @@
|
|
1
|
-
require 'fog/
|
1
|
+
require 'fog/openstack/models/model'
|
2
2
|
|
3
3
|
module Fog
|
4
4
|
module Identity
|
5
5
|
class OpenStack
|
6
6
|
class V3
|
7
|
-
class Endpoint < Fog::Model
|
7
|
+
class Endpoint < Fog::OpenStack::Model
|
8
8
|
identity :id
|
9
9
|
|
10
10
|
attribute :description
|
@@ -26,18 +26,14 @@ module Fog
|
|
26
26
|
end
|
27
27
|
|
28
28
|
def update(attr = nil)
|
29
|
-
requires :id
|
29
|
+
requires :id, :name
|
30
30
|
merge_attributes(
|
31
31
|
service.update_endpoint(self.id, attr || attributes).body['endpoint'])
|
32
32
|
self
|
33
33
|
end
|
34
34
|
|
35
|
-
def save
|
36
|
-
requires :name
|
37
|
-
identity ? update : create
|
38
|
-
end
|
39
|
-
|
40
35
|
def create
|
36
|
+
requires :name
|
41
37
|
merge_attributes(
|
42
38
|
service.create_endpoint(attributes).body['endpoint'])
|
43
39
|
self
|
@@ -47,4 +43,4 @@ module Fog
|
|
47
43
|
end
|
48
44
|
end
|
49
45
|
end
|
50
|
-
end
|
46
|
+
end
|
@@ -1,19 +1,17 @@
|
|
1
|
-
require 'fog/
|
1
|
+
require 'fog/openstack/models/collection'
|
2
2
|
require 'fog/openstack/models/identity_v3/service'
|
3
3
|
|
4
4
|
module Fog
|
5
5
|
module Identity
|
6
6
|
class OpenStack
|
7
7
|
class V3
|
8
|
-
class Endpoints < Fog::Collection
|
8
|
+
class Endpoints < Fog::OpenStack::Collection
|
9
9
|
model Fog::Identity::OpenStack::V3::Endpoint
|
10
10
|
|
11
11
|
def all(options = {})
|
12
|
-
|
12
|
+
load_response(service.list_endpoints(options), 'endpoints')
|
13
13
|
end
|
14
14
|
|
15
|
-
alias_method :summary, :all
|
16
|
-
|
17
15
|
def find_by_id(id)
|
18
16
|
cached_endpoint = self.find { |endpoint| endpoint.id == id }
|
19
17
|
return cached_endpoint if cached_endpoint
|
@@ -1,10 +1,10 @@
|
|
1
|
-
require 'fog/
|
1
|
+
require 'fog/openstack/models/model'
|
2
2
|
|
3
3
|
module Fog
|
4
4
|
module Identity
|
5
5
|
class OpenStack
|
6
6
|
class V3
|
7
|
-
class Group < Fog::Model
|
7
|
+
class Group < Fog::OpenStack::Model
|
8
8
|
identity :id
|
9
9
|
|
10
10
|
attribute :description
|
@@ -23,18 +23,14 @@ module Fog
|
|
23
23
|
end
|
24
24
|
|
25
25
|
def update(attr = nil)
|
26
|
-
requires :id
|
26
|
+
requires :id, :name
|
27
27
|
merge_attributes(
|
28
28
|
service.update_group(self.id, attr || attributes).body['group'])
|
29
29
|
self
|
30
30
|
end
|
31
31
|
|
32
|
-
def save
|
33
|
-
requires :name
|
34
|
-
identity ? update : create
|
35
|
-
end
|
36
|
-
|
37
32
|
def create
|
33
|
+
requires :name
|
38
34
|
merge_attributes(
|
39
35
|
service.create_group(attributes).body['group'])
|
40
36
|
self
|
@@ -93,4 +89,4 @@ module Fog
|
|
93
89
|
end
|
94
90
|
end
|
95
91
|
end
|
96
|
-
end
|
92
|
+
end
|
@@ -1,19 +1,17 @@
|
|
1
|
-
require 'fog/
|
1
|
+
require 'fog/openstack/models/collection'
|
2
2
|
require 'fog/openstack/models/identity_v3/group'
|
3
3
|
|
4
4
|
module Fog
|
5
5
|
module Identity
|
6
6
|
class OpenStack
|
7
7
|
class V3
|
8
|
-
class Groups < Fog::Collection
|
8
|
+
class Groups < Fog::OpenStack::Collection
|
9
9
|
model Fog::Identity::OpenStack::V3::Group
|
10
10
|
|
11
11
|
def all(options = {})
|
12
|
-
|
12
|
+
load_response(service.list_groups(options), 'groups')
|
13
13
|
end
|
14
14
|
|
15
|
-
alias_method :summary, :all
|
16
|
-
|
17
15
|
def find_by_id(id)
|
18
16
|
cached_group = self.find { |group| group.id == id }
|
19
17
|
return cached_group if cached_group
|
@@ -1,10 +1,10 @@
|
|
1
|
-
require 'fog/
|
1
|
+
require 'fog/openstack/models/model'
|
2
2
|
|
3
3
|
module Fog
|
4
4
|
module Identity
|
5
5
|
class OpenStack
|
6
6
|
class V3
|
7
|
-
class OsCredential < Fog::Model
|
7
|
+
class OsCredential < Fog::OpenStack::Model
|
8
8
|
identity :id
|
9
9
|
|
10
10
|
attribute :project_id
|
@@ -70,4 +70,4 @@ module Fog
|
|
70
70
|
end
|
71
71
|
end
|
72
72
|
end
|
73
|
-
end
|
73
|
+
end
|