lib/azure/armrest/storage_account_service.rb
# Converts a StorageAccount::Blob object into a StorageAccount::PrivateImage
# object, which is a mix of Blob and StorageAccount properties.
#
Converts a StorageAccount::Blob object into a StorageAccount::PrivateImage
object, which is a mix of Blob and StorageAccount properties.
Converts a StorageAccount :: Blob object into a StorageAccount :: PrivateImage object which is a mix of Blob and StorageAccount properties .
def blob_to_private_image_object(storage_account, blob, blob_properties)
        hash = blob.to_h.merge(
          :storage_account  => storage_account.to_h,
          :blob_properties  => blob_properties.to_h,
          :operating_system => blob_properties[:x_ms_meta_microsoftazurecompute_ostype],
          :uri              => File.join(
            storage_account.blob_endpoint_from_hash,
            blob[:container],
            blob.name_from_hash
          )
        )
        StorageAccount::PrivateImage.new(hash).tap { |image| image.resource_group = storage_account.resource_group }
      end
def blob_to_private_image_object ( storage_account , blob , blob_properties ) hash = blob . to_h . merge ( :storage_account => storage_account . to_h , :blob_properties => blob_properties . to_h , :operating_system => blob_properties [ :x_ms_meta_microsoftazurecompute_ostype ] , :uri => File . join ( storage_account . blob_endpoint_from_hash , blob [ :container ] , blob . name_from_hash ) ) StorageAccount :: PrivateImage . new ( hash ) . tap { | image | image . resource_group = storage_account . resource_group } end
Converts a StorageAccount::Blob object into a StorageAccount::PrivateImage
object, which is a mix of Blob and StorageAccount properties.
Converts a StorageAccount :: Blob object into a StorageAccount :: PrivateImage object which is a mix of Blob and StorageAccount properties .
storage_account
<not_specific>
blob
<not_specific>
blob_properties
<not_specific>