vipruby 0.1.7 → 0.1.7.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.yardoc/checksums +14 -4
- data/.yardoc/object_types +0 -0
- data/.yardoc/objects/root.dat +0 -0
- data/{LICENSE.txt → LICENSE} +2 -2
- data/README.md +94 -12
- data/doc/Vipr.html +139 -29
- data/doc/ViprAutoTier.html +426 -0
- data/doc/ViprBase.html +1 -1
- data/doc/ViprBlockVirtualPool.html +859 -0
- data/doc/ViprFileVirtualPool.html +859 -0
- data/doc/ViprHost.html +1 -1
- data/doc/ViprServiceCatalog.html +800 -0
- data/doc/ViprStoragePool.html +664 -0
- data/doc/ViprStoragePort.html +664 -0
- data/doc/ViprStorageSystem.html +2588 -805
- data/doc/ViprStorageTier.html +323 -0
- data/doc/ViprTenant.html +529 -0
- data/doc/ViprVcenter.html +1 -1
- data/doc/ViprVirtualArray.html +1230 -0
- data/doc/ViprVirtualDataCenter.html +407 -0
- data/doc/Vipruby.html +2 -2
- data/doc/_index.html +51 -1
- data/doc/class_list.html +1 -1
- data/doc/file.README.html +71 -26
- data/doc/index.html +71 -26
- data/doc/method_list.html +438 -12
- data/doc/top-level-namespace.html +2 -2
- data/lib/doc/_index.html +88 -0
- data/lib/doc/class_list.html +58 -0
- data/lib/doc/css/common.css +1 -0
- data/lib/doc/css/full_list.css +57 -0
- data/lib/doc/css/style.css +339 -0
- data/lib/doc/file_list.html +57 -0
- data/lib/doc/frames.html +26 -0
- data/lib/doc/index.html +88 -0
- data/lib/doc/js/app.js +219 -0
- data/lib/doc/js/full_list.js +181 -0
- data/lib/doc/js/jquery.js +4 -0
- data/lib/doc/method_list.html +57 -0
- data/lib/doc/top-level-namespace.html +102 -0
- data/lib/vipruby.rb +1 -5
- data/lib/vipruby/objects/autotier.rb +30 -0
- data/lib/vipruby/objects/blockvirtualpool.rb +74 -0
- data/lib/vipruby/objects/filevirtualpool.rb +74 -0
- data/lib/vipruby/objects/servicecatalog.rb +81 -0
- data/lib/vipruby/objects/storagepool.rb +80 -0
- data/lib/vipruby/objects/storageport.rb +62 -0
- data/lib/vipruby/objects/storagesystem.rb +169 -0
- data/lib/vipruby/objects/storagetier.rb +21 -0
- data/lib/vipruby/objects/tenant.rb +39 -0
- data/lib/vipruby/objects/virtualarray.rb +100 -0
- data/lib/vipruby/objects/virtualdatacenter.rb +28 -0
- data/lib/vipruby/version.rb +1 -1
- data/lib/vipruby/vipr.rb +25 -5
- data/vipruby.gemspec +2 -2
- metadata +39 -6
@@ -0,0 +1,62 @@
|
|
1
|
+
require 'json'
|
2
|
+
|
3
|
+
# The following StoragePort calls will get and execute StoragePort items
|
4
|
+
module ViprStoragePort
|
5
|
+
# Get All StoragePorts
|
6
|
+
#
|
7
|
+
# @return [json] JSON object of all the StoragePorts
|
8
|
+
def get_storage_ports(auth=nil, cert=nil)
|
9
|
+
rest_get("#{@base_url}/vdc/storage-ports", auth.nil? ? @auth_token : auth, cert.nil? ? @verify_cert : cert)
|
10
|
+
end
|
11
|
+
|
12
|
+
# Get single StoragePort information
|
13
|
+
#
|
14
|
+
# @param storage_port_id [urn:id] URN of a StoragePort. Required Param
|
15
|
+
#
|
16
|
+
# @return [JSON] The JSON object of the StoragePort
|
17
|
+
def get_storage_port(storage_port_id,auth=nil, cert=nil)
|
18
|
+
rest_get("#{@base_url}/vdc/storage-ports/#{storage_port_id}", auth.nil? ? @auth_token : auth, cert.nil? ? @verify_cert : cert)
|
19
|
+
end
|
20
|
+
|
21
|
+
# Deregister StoragePort. Allows the user to deregister a registered storage port so that it is no longer used by the system. This simply sets the registration_status of the storage port to UNREGISTERED
|
22
|
+
#
|
23
|
+
# @param storage_port_id [urn:id] URN of a StoragePort. Required Param
|
24
|
+
#
|
25
|
+
# @return [JSON] The JSON object of the StoragePort
|
26
|
+
def storage_port_deregister(storage_port_id=nil,auth=nil, cert=nil)
|
27
|
+
check_storage_port_id_post(storage_port_id)
|
28
|
+
payload = {
|
29
|
+
id: storage_port_id
|
30
|
+
}.to_json
|
31
|
+
rest_post(payload, "#{@base_url}/vdc/storage-ports/#{storage_port_id}/deregister", auth.nil? ? @auth_token : auth, cert.nil? ? @verify_cert : cert)
|
32
|
+
end
|
33
|
+
|
34
|
+
# Deactivate StoragePort. Remove a storage port. The method would remove the deregistered storage port and all resources associated with the storage port from the database. Note they are not removed from the storage system physically, but become unavailable for the user.
|
35
|
+
#
|
36
|
+
# @param storage_port_id [urn:id] URN of a StoragePort. Required Param
|
37
|
+
#
|
38
|
+
# @return [JSON] The JSON object of the StoragePort
|
39
|
+
def storage_port_deactivate(storage_port_id=nil,auth=nil, cert=nil)
|
40
|
+
check_storage_port_id_post(storage_port_id)
|
41
|
+
payload = {
|
42
|
+
id: storage_port_id
|
43
|
+
}.to_json
|
44
|
+
rest_post(payload, "#{@base_url}/vdc/storage-ports/#{storage_port_id}/deactivate", auth.nil? ? @auth_token : auth, cert.nil? ? @verify_cert : cert)
|
45
|
+
end
|
46
|
+
|
47
|
+
|
48
|
+
private
|
49
|
+
# Error Handling method to check for Missing Storage Port ID param. If the pass fails, an error exception is raised
|
50
|
+
#
|
51
|
+
# @param storage_port_id [String] Requires the string of the storage_port_id uid
|
52
|
+
# @return [Boolean] True if pass, false if it fails
|
53
|
+
#
|
54
|
+
# @private
|
55
|
+
def check_storage_port_id_post(storage_port_id=nil)
|
56
|
+
if storage_port_id == nil
|
57
|
+
raise "Missing param (storage_port_id)"
|
58
|
+
end
|
59
|
+
end
|
60
|
+
|
61
|
+
|
62
|
+
end
|
@@ -3,6 +3,163 @@ require 'json'
|
|
3
3
|
|
4
4
|
# The Following Storage System calls will add Storage Systems for all tenants. these commands can only be ran as the root/default tenant
|
5
5
|
module ViprStorageSystem
|
6
|
+
# Get All Storage Systems. Gets the id, name, and self link for all registered storage systems.
|
7
|
+
#
|
8
|
+
# @return [json] JSON object of all the Storage Systems.
|
9
|
+
def get_storage_systems(auth=nil, cert=nil)
|
10
|
+
rest_get("#{@base_url}/vdc/storage-systems", auth.nil? ? @auth_token : auth, cert.nil? ? @verify_cert : cert)
|
11
|
+
end
|
12
|
+
|
13
|
+
# Get single Storage System information
|
14
|
+
#
|
15
|
+
# @param storage_system_id [urn:id] URN of a Storage System. Required Param
|
16
|
+
#
|
17
|
+
# @return [JSON] The JSON object of the Storage System
|
18
|
+
def get_storage_system(storage_system_id,auth=nil, cert=nil)
|
19
|
+
rest_get("#{@base_url}/vdc/storage-systems/#{storage_system_id}", auth.nil? ? @auth_token : auth, cert.nil? ? @verify_cert : cert)
|
20
|
+
end
|
21
|
+
|
22
|
+
# Register Storage System. Allows the user register the storage system with the passed id.
|
23
|
+
#
|
24
|
+
# @param storage_system_id [urn:id] URN of a Storage System. Required Param
|
25
|
+
#
|
26
|
+
# @return [JSON] The JSON object of the Storage System
|
27
|
+
def storage_system_register(storage_system_id=nil,auth=nil, cert=nil)
|
28
|
+
check_storage_system_id_post(storage_system_id)
|
29
|
+
payload = {
|
30
|
+
id: storage_system_id
|
31
|
+
}.to_json
|
32
|
+
rest_post(payload, "#{@base_url}/vdc/storage-systems/#{storage_system_id}/register", auth.nil? ? @auth_token : auth, cert.nil? ? @verify_cert : cert)
|
33
|
+
end
|
34
|
+
|
35
|
+
# Discover Storage System. Allows the user to manually discover the registered storage system with the passed id.
|
36
|
+
#
|
37
|
+
# @param storage_system_id [urn:id] URN of a Storage System. Required Param
|
38
|
+
#
|
39
|
+
# @return [JSON] The JSON object of the Storage System
|
40
|
+
def storage_system_discover(storage_system_id=nil,auth=nil, cert=nil)
|
41
|
+
check_storage_system_id_post(storage_system_id)
|
42
|
+
payload = {
|
43
|
+
id: storage_system_id
|
44
|
+
}.to_json
|
45
|
+
rest_post(payload, "#{@base_url}/vdc/storage-systems/#{storage_system_id}/discover", auth.nil? ? @auth_token : auth, cert.nil? ? @verify_cert : cert)
|
46
|
+
end
|
47
|
+
|
48
|
+
# Deregister Storage System. Allows the user to deregister a registered storage system so that it is no longer used by the system. This simply sets the registration_status of the storage system to UNREGISTERED
|
49
|
+
#
|
50
|
+
# @param storage_system_id [urn:id] URN of a Storage System. Required Param
|
51
|
+
#
|
52
|
+
# @return [JSON] The JSON object of the Storage System
|
53
|
+
def storage_system_deregister(storage_system_id=nil,auth=nil, cert=nil)
|
54
|
+
check_storage_system_id_post(storage_system_id)
|
55
|
+
payload = {
|
56
|
+
id: storage_system_id
|
57
|
+
}.to_json
|
58
|
+
rest_post(payload, "#{@base_url}/vdc/storage-systems/#{storage_system_id}/deregister", auth.nil? ? @auth_token : auth, cert.nil? ? @verify_cert : cert)
|
59
|
+
end
|
60
|
+
|
61
|
+
# Deactivate Storage System. Remove a storage system. The method would remove the storage system from the system control and will remove all resources associated with the storage system from the database. Note that resources (pools, ports, volumes, etc.) are not removed from the storage system physically, but become unavailable for the user.
|
62
|
+
#
|
63
|
+
# @param storage_system_id [urn:id] URN of a Storage System. Required Param
|
64
|
+
#
|
65
|
+
# @return [JSON] The JSON object of the Storage System
|
66
|
+
def storage_system_deactivate(storage_system_id=nil,auth=nil, cert=nil)
|
67
|
+
check_storage_system_id_post(storage_system_id)
|
68
|
+
payload = {
|
69
|
+
id: storage_system_id
|
70
|
+
}.to_json
|
71
|
+
rest_post(payload, "#{@base_url}/vdc/storage-systems/#{storage_system_id}/deactivate", auth.nil? ? @auth_token : auth, cert.nil? ? @verify_cert : cert)
|
72
|
+
end
|
73
|
+
|
74
|
+
# Get single Storage System Storage Pools
|
75
|
+
#
|
76
|
+
# @param storage_system_id [urn:id] URN of a Storage System. Required Param
|
77
|
+
#
|
78
|
+
# @return [JSON] The JSON object of the Storage System Storage Pools
|
79
|
+
def get_storage_system_storage_pools(storage_system_id,auth=nil, cert=nil)
|
80
|
+
rest_get("#{@base_url}/vdc/storage-systemss/#{storage_system_id}/storage-pools", auth.nil? ? @auth_token : auth, cert.nil? ? @verify_cert : cert)
|
81
|
+
end
|
82
|
+
|
83
|
+
# Get single Storage System Storage Ports
|
84
|
+
#
|
85
|
+
# @param storage_system_id [urn:id] URN of a Storage System. Required Param
|
86
|
+
#
|
87
|
+
# @return [JSON] The JSON object of the Storage System Storage Ports
|
88
|
+
def get_storage_system_storage_ports(storage_system_id,auth=nil, cert=nil)
|
89
|
+
rest_get("#{@base_url}/vdc/storage-systemss/#{storage_system_id}/storage-ports", auth.nil? ? @auth_token : auth, cert.nil? ? @verify_cert : cert)
|
90
|
+
end
|
91
|
+
|
92
|
+
# Get single Storage System Auto-Tier Policies
|
93
|
+
#
|
94
|
+
# @param storage_system_id [urn:id] URN of a Storage System. Required Param
|
95
|
+
#
|
96
|
+
# @return [JSON] The JSON object of the Storage System Auto-Tier Policies
|
97
|
+
def get_storage_system_auto_tier_policy(storage_system_id,auth=nil, cert=nil)
|
98
|
+
rest_get("#{@base_url}/vdc/storage-systemss/#{storage_system_id}/auto-tier-policies", auth.nil? ? @auth_token : auth, cert.nil? ? @verify_cert : cert)
|
99
|
+
end
|
100
|
+
|
101
|
+
# Get single Storage System unmanaged volumes available
|
102
|
+
#
|
103
|
+
# @param storage_system_id [urn:id] URN of a Storage System. Required Param
|
104
|
+
#
|
105
|
+
# @return [JSON] The JSON object of the Storage System unmanaged volumes available
|
106
|
+
def get_storage_system_unmanaged_volumes(storage_system_id,auth=nil, cert=nil)
|
107
|
+
rest_get("#{@base_url}/vdc/storage-systemss/#{storage_system_id}/unmanaged/volumes", auth.nil? ? @auth_token : auth, cert.nil? ? @verify_cert : cert)
|
108
|
+
end
|
109
|
+
|
110
|
+
# Get single Storage System unmanaged filesystems available
|
111
|
+
#
|
112
|
+
# @param storage_system_id [urn:id] URN of a Storage System. Required Param
|
113
|
+
#
|
114
|
+
# @return [JSON] The JSON object of the Storage System unmanaged filesystems available
|
115
|
+
def get_storage_system_unmanaged_filesystems(storage_system_id,auth=nil, cert=nil)
|
116
|
+
rest_get("#{@base_url}/vdc/storage-systemss/#{storage_system_id}/unmanaged/filesystems", auth.nil? ? @auth_token : auth, cert.nil? ? @verify_cert : cert)
|
117
|
+
end
|
118
|
+
|
119
|
+
# Get All Storage Providers. Gets the id, name, and self link for all registered storage providers.
|
120
|
+
#
|
121
|
+
# @return [json] JSON object of all the Storage Providers.
|
122
|
+
def get_storage_providers(auth=nil, cert=nil)
|
123
|
+
rest_get("#{@base_url}/vdc/storage-providers", auth.nil? ? @auth_token : auth, cert.nil? ? @verify_cert : cert)
|
124
|
+
end
|
125
|
+
|
126
|
+
# Get single Storage Provider information
|
127
|
+
#
|
128
|
+
# @param storage_provider_id [urn:id] URN of a Storage Provider. Required Param
|
129
|
+
#
|
130
|
+
# @return [JSON] The JSON object of the Storage Provider
|
131
|
+
def get_storage_provider(storage_provider_id,auth=nil, cert=nil)
|
132
|
+
rest_get("#{@base_url}/vdc/storage-providers/#{storage_provider_id}", auth.nil? ? @auth_token : auth, cert.nil? ? @verify_cert : cert)
|
133
|
+
end
|
134
|
+
|
135
|
+
# Get single Storage Provider Storage Systems information
|
136
|
+
#
|
137
|
+
# @param storage_provider_id [urn:id] URN of a Storage Provider. Required Param
|
138
|
+
#
|
139
|
+
# @return [JSON] The JSON object of the Storage Provider Storage Systems
|
140
|
+
def get_storage_provider_storage_systems(storage_provider_id,auth=nil, cert=nil)
|
141
|
+
rest_get("#{@base_url}/vdc/storage-providers/#{storage_provider_id}/storage-systems", auth.nil? ? @auth_token : auth, cert.nil? ? @verify_cert : cert)
|
142
|
+
end
|
143
|
+
|
144
|
+
# Get single Storage Provider Storage System information
|
145
|
+
#
|
146
|
+
# @param storage_provider_id [urn:id] URN of a Storage Provider. Required Param
|
147
|
+
# @param storage_system_id [urn:id] URN of a Storage System. Required Param
|
148
|
+
#
|
149
|
+
# @return [JSON] The JSON object of the Storage Provider Storage Systems
|
150
|
+
def get_storage_provider_storage_system(storage_provider_id, storage_system_id,auth=nil, cert=nil)
|
151
|
+
rest_get("#{@base_url}/vdc/storage-providers/#{storage_provider_id}/storage-systems/#{storage_system_id}", auth.nil? ? @auth_token : auth, cert.nil? ? @verify_cert : cert)
|
152
|
+
end
|
153
|
+
|
154
|
+
# Get single Storage Provider Tasks information
|
155
|
+
#
|
156
|
+
# @param storage_provider_id [urn:id] URN of a Storage Provider. Required Param
|
157
|
+
#
|
158
|
+
# @return [JSON] The JSON object of the Storage Provider Tasks
|
159
|
+
def get_storage_provider_tasks(storage_provider_id,auth=nil, cert=nil)
|
160
|
+
rest_get("#{@base_url}/vdc/storage-providers/#{storage_provider_id}/tasks", auth.nil? ? @auth_token : auth, cert.nil? ? @verify_cert : cert)
|
161
|
+
end
|
162
|
+
|
6
163
|
# JSON Structure for creating the payload for Storage Providers
|
7
164
|
#
|
8
165
|
# @param name [String] Name of the Storage Provider. This name is arbitrary and only exists within ViPR. This is a required string.
|
@@ -275,4 +432,16 @@ module ViprStorageSystem
|
|
275
432
|
end
|
276
433
|
end
|
277
434
|
|
435
|
+
# Error Handling method to check for Missing Storage System ID param. If the pass fails, an error exception is raised
|
436
|
+
#
|
437
|
+
# @param storage_system_id [String] Requires the string of the storage_system_id uid [urn]
|
438
|
+
# @return [Boolean] True if pass, false if it fails
|
439
|
+
#
|
440
|
+
# @private
|
441
|
+
def check_storage_system_id_post(storage_system_id=nil)
|
442
|
+
if storage_system_id == nil
|
443
|
+
raise "Missing param (storage_system_id)"
|
444
|
+
end
|
445
|
+
end
|
446
|
+
|
278
447
|
end
|
@@ -0,0 +1,21 @@
|
|
1
|
+
require 'json'
|
2
|
+
|
3
|
+
# The following Storage Tier calls will get and execute Storage Tier items
|
4
|
+
module ViprStorageTier
|
5
|
+
# Get Storage Tiers
|
6
|
+
#
|
7
|
+
# @return [json] JSON object of all the Storage Tiers
|
8
|
+
def get_storage_tiers(auth=nil, cert=nil)
|
9
|
+
rest_get("#{@base_url}/vdc/storage-tiers", auth.nil? ? @auth_token : auth, cert.nil? ? @verify_cert : cert)
|
10
|
+
end
|
11
|
+
|
12
|
+
# Get Single Storage Tier information
|
13
|
+
#
|
14
|
+
# @param storage_tier_id [urn:id] URN of a storage tier. Required Param
|
15
|
+
#
|
16
|
+
# @return [JSON] The JSON object of the Storage Tier
|
17
|
+
def get_storage_tier(storage_tier_id,auth=nil, cert=nil)
|
18
|
+
rest_get("#{@base_url}/vdc/#{storage_tier_id}", auth.nil? ? @auth_token : auth, cert.nil? ? @verify_cert : cert)
|
19
|
+
end
|
20
|
+
|
21
|
+
end
|
@@ -0,0 +1,39 @@
|
|
1
|
+
require 'json'
|
2
|
+
|
3
|
+
# The following Tenant calls will get and execute tenant items
|
4
|
+
module ViprTenant
|
5
|
+
# Get tenants
|
6
|
+
#
|
7
|
+
# @return [json] JSON object of all the tenants in URN forman
|
8
|
+
def get_tenants(auth=nil, cert=nil)
|
9
|
+
rest_get("#{@base_url}/tenants/bulk", auth.nil? ? @auth_token : auth, cert.nil? ? @verify_cert : cert)
|
10
|
+
end
|
11
|
+
|
12
|
+
# Get single tenant information
|
13
|
+
#
|
14
|
+
# @param tenant_id [urn:id] URN of a tenant. Required Param
|
15
|
+
#
|
16
|
+
# @return [JSON] The JSON object of the tenant
|
17
|
+
def get_tenant(tenant_id,auth=nil, cert=nil)
|
18
|
+
rest_get("#{@base_url}/tenants/#{tenant_id}", auth.nil? ? @auth_token : auth, cert.nil? ? @verify_cert : cert)
|
19
|
+
end
|
20
|
+
|
21
|
+
# Get single tenant subtenants information
|
22
|
+
#
|
23
|
+
# @param tenant_id [urn:id] URN of a tenant. Required Param
|
24
|
+
#
|
25
|
+
# @return [JSON] The JSON object of all subtenants of a tenant
|
26
|
+
def get_subtenants(tenant_id,auth=nil, cert=nil)
|
27
|
+
rest_get("#{@base_url}/tenants/#{tenant_id}/subtenants", auth.nil? ? @auth_token : auth, cert.nil? ? @verify_cert : cert)
|
28
|
+
end
|
29
|
+
|
30
|
+
# Get single tenant projects information
|
31
|
+
#
|
32
|
+
# @param tenant_id [urn:id] URN of a tenant. Required Param
|
33
|
+
#
|
34
|
+
# @return [JSON] The JSON object of all projects of a tenant
|
35
|
+
def get_tenant_projects(tenant_id,auth=nil, cert=nil)
|
36
|
+
rest_get("#{@base_url}/tenants/#{tenant_id}/projects", auth.nil? ? @auth_token : auth, cert.nil? ? @verify_cert : cert)
|
37
|
+
end
|
38
|
+
|
39
|
+
end
|
@@ -0,0 +1,100 @@
|
|
1
|
+
require 'json'
|
2
|
+
|
3
|
+
# The following Virtual Array calls will get and execute virtual array items
|
4
|
+
module ViprVirtualArray
|
5
|
+
# Search VirtualArrays
|
6
|
+
#
|
7
|
+
# @return [json] JSON object of all the VirtualArrays in zone
|
8
|
+
def search_varrays(auth=nil, cert=nil)
|
9
|
+
rest_get("#{@base_url}/vdc/varrays/search", auth.nil? ? @auth_token : auth, cert.nil? ? @verify_cert : cert)
|
10
|
+
end
|
11
|
+
|
12
|
+
# Get/List VirtualArrays in zone
|
13
|
+
#
|
14
|
+
# @return [json] JSON object of all the VirtualArrays in zone
|
15
|
+
def get_varrays(auth=nil, cert=nil)
|
16
|
+
rest_get("#{@base_url}/vdc/varrays", auth.nil? ? @auth_token : auth, cert.nil? ? @verify_cert : cert)
|
17
|
+
end
|
18
|
+
|
19
|
+
# Get single VirtualArray information
|
20
|
+
#
|
21
|
+
# @param varray [urn:id] URN of a VirtualArray. Required Param
|
22
|
+
#
|
23
|
+
# @return [JSON] The JSON object of the VirtualArray
|
24
|
+
def get_varray(varray_id,auth=nil, cert=nil)
|
25
|
+
rest_get("#{@base_url}/vdc/varrays/#{varray_id}", auth.nil? ? @auth_token : auth, cert.nil? ? @verify_cert : cert)
|
26
|
+
end
|
27
|
+
|
28
|
+
# Get single VirtualArray Auto-Tier Policy
|
29
|
+
#
|
30
|
+
# @param varray [urn:id] URN of a VirtualArray. Required Param
|
31
|
+
#
|
32
|
+
# @return [JSON] The JSON object of the VirtualArray Auto-Tier Policy
|
33
|
+
def get_varray_autotier_policy(varray_id,auth=nil, cert=nil)
|
34
|
+
rest_get("#{@base_url}/vdc/varrays/#{varray_id}/auto-tier-policies", auth.nil? ? @auth_token : auth, cert.nil? ? @verify_cert : cert)
|
35
|
+
end
|
36
|
+
|
37
|
+
# Get single VirtualArray Storage Pools
|
38
|
+
#
|
39
|
+
# @param varray [urn:id] URN of a VirtualArray. Required Param
|
40
|
+
#
|
41
|
+
# @return [JSON] The JSON object of the VirtualArray Storage Pools
|
42
|
+
def get_varray_storage_pools(varray_id,auth=nil, cert=nil)
|
43
|
+
rest_get("#{@base_url}/vdc/varrays/#{varray_id}/storage-pools", auth.nil? ? @auth_token : auth, cert.nil? ? @verify_cert : cert)
|
44
|
+
end
|
45
|
+
|
46
|
+
# Get single VirtualArray Storage Ports
|
47
|
+
#
|
48
|
+
# @param varray [urn:id] URN of a VirtualArray. Required Param
|
49
|
+
#
|
50
|
+
# @return [JSON] The JSON object of the VirtualArray Storage Ports
|
51
|
+
def get_varray_storage_ports(varray_id,auth=nil, cert=nil)
|
52
|
+
rest_get("#{@base_url}/vdc/varrays/#{varray_id}/storage-ports", auth.nil? ? @auth_token : auth, cert.nil? ? @verify_cert : cert)
|
53
|
+
end
|
54
|
+
|
55
|
+
# Get single VirtualArray Virtual Pools
|
56
|
+
#
|
57
|
+
# @param varray [urn:id] URN of a VirtualArray. Required Param
|
58
|
+
#
|
59
|
+
# @return [JSON] The JSON object of the VirtualArray Virtual Pools
|
60
|
+
def get_varray_virtual_pools(varray_id,auth=nil, cert=nil)
|
61
|
+
rest_get("#{@base_url}/vdc/varrays/#{varray_id}/vpools", auth.nil? ? @auth_token : auth, cert.nil? ? @verify_cert : cert)
|
62
|
+
end
|
63
|
+
|
64
|
+
# Get single VirtualArray Networks
|
65
|
+
#
|
66
|
+
# @param varray [urn:id] URN of a VirtualArray. Required Param
|
67
|
+
#
|
68
|
+
# @return [JSON] The JSON object of the VirtualArray Networks
|
69
|
+
def get_varray_networks(varray_id,auth=nil, cert=nil)
|
70
|
+
rest_get("#{@base_url}/vdc/varrays/#{varray_id}/networks", auth.nil? ? @auth_token : auth, cert.nil? ? @verify_cert : cert)
|
71
|
+
end
|
72
|
+
|
73
|
+
# Get single VirtualArray ACL
|
74
|
+
#
|
75
|
+
# @param varray [urn:id] URN of a VirtualArray. Required Param
|
76
|
+
#
|
77
|
+
# @return [JSON] The JSON object of the VirtualArray ACL
|
78
|
+
def get_varray_acl(varray_id,auth=nil, cert=nil)
|
79
|
+
rest_get("#{@base_url}/vdc/varrays/#{varray_id}/acl", auth.nil? ? @auth_token : auth, cert.nil? ? @verify_cert : cert)
|
80
|
+
end
|
81
|
+
|
82
|
+
# Get single VirtualArray Connectivity
|
83
|
+
#
|
84
|
+
# @param varray [urn:id] URN of a VirtualArray. Required Param
|
85
|
+
#
|
86
|
+
# @return [JSON] The JSON object of the VirtualArray Connectivity
|
87
|
+
def get_varray_connectivity(varray_id,auth=nil, cert=nil)
|
88
|
+
rest_get("#{@base_url}/vdc/varrays/#{varray_id}/connectivity", auth.nil? ? @auth_token : auth, cert.nil? ? @verify_cert : cert)
|
89
|
+
end
|
90
|
+
|
91
|
+
# Get single VirtualArray available attributes
|
92
|
+
#
|
93
|
+
# @param varray [urn:id] URN of a VirtualArray. Required Param
|
94
|
+
#
|
95
|
+
# @return [JSON] The JSON object of the VirtualArray available attributes
|
96
|
+
def get_varray_attributes(varray_id,auth=nil, cert=nil)
|
97
|
+
rest_get("#{@base_url}/vdc/varrays/#{varray_id}/available-attributes", auth.nil? ? @auth_token : auth, cert.nil? ? @verify_cert : cert)
|
98
|
+
end
|
99
|
+
|
100
|
+
end
|
@@ -0,0 +1,28 @@
|
|
1
|
+
require 'json'
|
2
|
+
|
3
|
+
# The following VirtualDataCenter calls will get and execute VirtualDataCenter items
|
4
|
+
module ViprVirtualDataCenter
|
5
|
+
# Get All VirtualDataCenters
|
6
|
+
#
|
7
|
+
# @return [json] JSON object of all the VirtualDataCenters
|
8
|
+
def get_vdcs(auth=nil, cert=nil)
|
9
|
+
rest_get("#{@base_url}/vdc", auth.nil? ? @auth_token : auth, cert.nil? ? @verify_cert : cert)
|
10
|
+
end
|
11
|
+
|
12
|
+
# Get single VirtualDataCenter information
|
13
|
+
#
|
14
|
+
# @param vdc_id [urn:id] URN of a VirtualDatacenter. Required Param
|
15
|
+
#
|
16
|
+
# @return [JSON] The JSON object of the VirtualDataCenter
|
17
|
+
def get_vdc(vdc_id,auth=nil, cert=nil)
|
18
|
+
rest_get("#{@base_url}/vdc/#{vdc_id}", auth.nil? ? @auth_token : auth, cert.nil? ? @verify_cert : cert)
|
19
|
+
end
|
20
|
+
|
21
|
+
# Get single VirtualDataCenter Secret-Key
|
22
|
+
#
|
23
|
+
# @return [JSON] The JSON object of the VirtualDataCenter Secret-Key
|
24
|
+
def get_vdc_secretkey(auth=nil, cert=nil)
|
25
|
+
rest_get("#{@base_url}/vdc/secret-key", auth.nil? ? @auth_token : auth, cert.nil? ? @verify_cert : cert)
|
26
|
+
end
|
27
|
+
|
28
|
+
end
|
data/lib/vipruby/version.rb
CHANGED
data/lib/vipruby/vipr.rb
CHANGED
@@ -1,16 +1,36 @@
|
|
1
1
|
|
2
2
|
require "vipruby/viprbase"
|
3
|
-
require
|
4
|
-
require 'vipruby/objects/
|
3
|
+
require 'vipruby/objects/autotier'
|
4
|
+
require 'vipruby/objects/blockvirtualpool'
|
5
|
+
require 'vipruby/objects/filevirtualpool'
|
5
6
|
require 'vipruby/objects/host'
|
7
|
+
require 'vipruby/objects/servicecatalog'
|
8
|
+
require 'vipruby/objects/storagepool'
|
9
|
+
require 'vipruby/objects/storageport'
|
10
|
+
require 'vipruby/objects/storagesystem'
|
11
|
+
require 'vipruby/objects/storagetier'
|
12
|
+
require 'vipruby/objects/tenant'
|
13
|
+
require "vipruby/objects/vcenter"
|
14
|
+
require 'vipruby/objects/virtualarray'
|
15
|
+
require 'vipruby/objects/virtualdatacenter'
|
6
16
|
|
7
17
|
# The base class for the gem. Every subsequent method relies on creating an object from this class
|
8
18
|
class Vipr
|
9
19
|
include ViprBase
|
10
|
-
include
|
11
|
-
include
|
20
|
+
include ViprAutoTier
|
21
|
+
include ViprBlockVirtualPool
|
22
|
+
include ViprFileVirtualPool
|
12
23
|
include ViprHost
|
13
|
-
|
24
|
+
include ViprServiceCatalog
|
25
|
+
include ViprStoragePool
|
26
|
+
include ViprStoragePort
|
27
|
+
include ViprStorageSystem
|
28
|
+
include ViprStorageTier
|
29
|
+
include ViprTenant
|
30
|
+
include ViprVcenter
|
31
|
+
include ViprVirtualArray
|
32
|
+
include ViprVirtualDataCenter
|
33
|
+
|
14
34
|
# required params used for almost every single method
|
15
35
|
attr_accessor :tenant_uid, :auth_token, :base_url, :verify_cert
|
16
36
|
|