lib/fog/azurerm/models/compute/managed_disk.rb in fog-azure-rm-0.4.8 vs lib/fog/azurerm/models/compute/managed_disk.rb in fog-azure-rm-0.4.9
- old
+ new
@@ -44,12 +44,14 @@
disk = service.create_or_update_managed_disk(managed_disk_params)
merge_attributes(Fog::Compute::AzureRM::ManagedDisk.parse(disk))
end
- def destroy
- service.delete_managed_disk(resource_group_name, name)
+ def destroy(async = false)
+ response = service.delete_managed_disk(resource_group_name, name,
+ async)
+ async ? create_fog_async_response(response) : response
end
private
def validate_creation_data_params(creation_data)
@@ -68,9 +70,14 @@
disk_size_gb: disk_size_gb,
tags: tags,
creation_data: creation_data,
encryption_settings: encryption_settings
}
+ end
+
+ def create_fog_async_response(response, delete_extra_resource = false)
+ disk = Fog::Compute::AzureRM::ManagedDisk.new(service: service)
+ Fog::AzureRM::AsyncResponse.new(disk, response, delete_extra_resource)
end
end
end
end
end