Class: Fog::Compute::AzureRM::EncryptionSettings

Inherits:
Model
  • Object
show all
Defined in:
lib/fog/azurerm/models/compute/encryption_settings.rb

Overview

EncryptionSettings model for Compute Service

Class Method Summary collapse

Class Method Details

.parse(encryption_settings) ⇒ Object



12
13
14
15
16
17
18
19
20
21
22
23
24
25
# File 'lib/fog/azurerm/models/compute/encryption_settings.rb', line 12

def self.parse(encryption_settings)
  settings = {}
  settings['enabled'] = encryption_settings.enabled

  if encryption_settings.disk_encryption_key
    settings['secret_url'] = encryption_settings.disk_encryption_key.secret_url
    settings['disk_source_vault_id'] = encryption_settings.disk_encryption_key.source_vault.id
  end
  if encryption_settings.key_encryption_key
    settings['key_url'] = encryption_settings.key_encryption_key.key_url
    settings['key_source_vault_id'] = encryption_settings.key_encryption_key.source_vault.id
  end
  settings
end