Sha256: 721da5eb9bfbf6a26b8e87ef98190cbfcb5af12f06464dd570602052cebf0a82

Contents?: true

Size: 1.49 KB

Versions: 2

Compression:

Stored size: 1.49 KB

Contents

module Fog
  module Network
    class AzureRM
      # Http Listener class for Network Service
      class ApplicationGatewayHttpListener < Fog::Model
        identity :name
        attribute :frontend_ip_config_id
        attribute :frontend_port_id
        attribute :protocol
        attribute :host_name
        attribute :ssl_certificate_id
        attribute :require_server_name_indication

        def self.parse(http_listener)
          http_listener_properties = http_listener['properties']
          hash = {}
          hash['name'] = http_listener['name']
          unless http_listener_properties.nil?
            unless http_listener_properties['frontendIPConfiguration'].nil?
              hash['frontend_ip_config_id'] = http_listener_properties['frontendIPConfiguration']['id']
            end
            unless http_listener_properties['frontendPort'].nil?
              hash['frontend_port_id'] = http_listener_properties['frontendPort']['id']
            end
            hash['protocol'] = http_listener_properties['protocol']
            hash['host_name'] = http_listener_properties['hostName']
            unless http_listener_properties['sslCertificate'].nil?
              hash['ssl_certificate_id'] = http_listener_properties['sslCertificate']['id']
              hash['require_server_name_indication'] = http_listener_properties['sslCertificate']['requireServerNameIndication']
            end
          end
          hash
        end
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
fog-azure-rm-0.0.4 lib/fog/azurerm/models/network/application_gateway_http_listener.rb
fog-azure-rm-0.0.3 lib/fog/azurerm/models/network/application_gateway_http_listener.rb