azure-armrest 0.9.14 → 0.9.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGES +4 -0
- data/lib/azure/armrest/version.rb +1 -1
- data/lib/azure/armrest/virtual_machine_service.rb +19 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 80afc2002d933a6dcb326ccac2d00089cabb7e4a7b6682035aaf230fd39331e7
|
4
|
+
data.tar.gz: faf1d1200944bff09a16d42245cb3e09cb3c0c7d77c6f1fa205da31f8b30eeb2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 41f18c5fd46a8de71bdbe70e5dbcbdf7488a6b17ea50a9d8340380220b4a6372cc6d3466acd880700808114c84fa929c7dae404fd789c4eb403d85af3643c3be
|
7
|
+
data.tar.gz: 608c0b7d4661ea5f3b6071715c37ea3fe039fa818de14d16e02b4e960c80a10da85abc9b76a4fcc634ff3400175d4a9c12f3101eee3c4a4b6de99cc031af6133
|
data/CHANGES
CHANGED
@@ -1,3 +1,7 @@
|
|
1
|
+
= 0.9.15 - 23-Jan-2020
|
2
|
+
* The VirtualMachineService#delete_associated_resources now supports deleting
|
3
|
+
attached data disks.
|
4
|
+
|
1
5
|
= 0.9.14 - 23-Oct-2019
|
2
6
|
* Added the VirtualMachineService#list_by_location method.
|
3
7
|
* The VirtualMachineService#vm_operations method now returns a response object
|
@@ -152,6 +152,7 @@ module Azure
|
|
152
152
|
:network_interfaces => true,
|
153
153
|
:ip_addresses => true,
|
154
154
|
:os_disk => true,
|
155
|
+
:data_disks => false,
|
155
156
|
:network_security_groups => false,
|
156
157
|
:storage_account => false,
|
157
158
|
:verbose => false
|
@@ -172,6 +173,10 @@ module Azure
|
|
172
173
|
if options[:os_disk] || options[:storage_account]
|
173
174
|
delete_associated_disk(vm, options)
|
174
175
|
end
|
176
|
+
|
177
|
+
if options[:data_disks]
|
178
|
+
delete_associated_data_disks(vm, options)
|
179
|
+
end
|
175
180
|
end
|
176
181
|
|
177
182
|
def model_class
|
@@ -235,6 +240,20 @@ module Azure
|
|
235
240
|
end
|
236
241
|
end
|
237
242
|
|
243
|
+
# This deletes any attached data disks that are associated with the
|
244
|
+
# virtual machine. Note that this should only happen after the VM
|
245
|
+
# has been deleted.
|
246
|
+
#
|
247
|
+
def delete_associated_data_disks(vm, options)
|
248
|
+
sds = Azure::Armrest::Storage::DiskService.new(configuration)
|
249
|
+
data_disks = vm.properties.storage_profile.try(:data_disks)
|
250
|
+
|
251
|
+
data_disks&.each do |data_disk|
|
252
|
+
disk = sds.get_by_id(data_disk.managed_disk.id)
|
253
|
+
delete_and_wait(sds, disk.name, disk.resource_group, options)
|
254
|
+
end
|
255
|
+
end
|
256
|
+
|
238
257
|
def delete_managed_storage(vm, options)
|
239
258
|
sds = Azure::Armrest::Storage::DiskService.new(configuration)
|
240
259
|
disk = sds.get_by_id(vm.properties.storage_profile.os_disk.managed_disk.id)
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: azure-armrest
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.9.
|
4
|
+
version: 0.9.15
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Daniel J. Berger
|
@@ -11,7 +11,7 @@ authors:
|
|
11
11
|
autorequire:
|
12
12
|
bindir: bin
|
13
13
|
cert_chain: []
|
14
|
-
date:
|
14
|
+
date: 2020-01-23 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: json
|