Class: Fog::Network::AzureRM::VpnClientConfiguration

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

Overview

Vpn Client Configuration model class for Network Service

Class Method Summary collapse

Class Method Details

.parse(vpn_client_config) ⇒ Object



10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
# File 'lib/fog/azurerm/models/network/vpn_client_configuration.rb', line 10

def self.parse(vpn_client_config)
  hash = {}
  hash['address_pool'] = []
  vpn_client_config.vpn_client_address_pool.each do |address_prefix|
    hash['address_pool'] << address_prefix
  end unless vpn_client_config.vpn_client_address_pool.nil?

  hash['root_certificates'] = []
  vpn_client_config.vpn_client_root_certificates.each do |root_cert|
    root_certificate = Fog::Network::AzureRM::VpnClientRootCertificate.new
    hash['root_certificates'] << root_certificate.merge_attributes(Fog::Network::AzureRM::VpnClientRootCertificate.parse(root_cert))
  end unless vpn_client_config.vpn_client_root_certificates.nil?

  hash['revoked_certificates'] = []
  vpn_client_config.vpn_client_revoked_certificates.each do |revoked_cert|
    revoked_certificate = Fog::Network::AzureRM::VpnClientRevokedCertificate.new
    hash['revoked_certificates'] << revoked_certificate.merge_attributes(Fog::Network::AzureRM::VpnClientRevokedCertificate.parse(revoked_cert))
  end unless vpn_client_config.vpn_client_revoked_certificates.nil?

  hash
end