Sha256: 12b885e6a55b0543e6570fe791c23ea6784df5bb2f860fdc2c18fba35dc3e982

Contents?: true

Size: 854 Bytes

Versions: 8

Compression:

Stored size: 854 Bytes

Contents

module Fog
  module Network
    class AzureRM
      # Path Rule model class for Network Service
      class PathRule < Fog::Model
        attribute :paths
        attribute :backend_address_pool_id
        attribute :backend_http_settings_id

        def self.parse(path_rule)
          paths = path_rule['paths']

          hash = {}
          hash['paths'] = []
          paths.each do |path|
            hash['paths'] << path
          end unless paths.nil?

          unless path_rule['backendAddressPool'].nil?
            hash['backend_address_pool_id'] = path_rule['backendAddressPool']['id']
          end
          unless path_rule['backendHttpsettings'].nil?
            hash['backend_http_settings_id'] = path_rule['backendHttpsettings']['id']
          end
          hash
        end
      end
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
fog-azure-rm-0.1.1 lib/fog/azurerm/models/network/path_rule.rb
fog-azure-rm-0.1.0 lib/fog/azurerm/models/network/path_rule.rb
fog-azure-rm-0.0.9 lib/fog/azurerm/models/network/path_rule.rb
fog-azure-rm-0.0.8 lib/fog/azurerm/models/network/path_rule.rb
fog-azure-rm-0.0.6 lib/fog/azurerm/models/network/path_rule.rb
fog-azure-rm-0.0.5 lib/fog/azurerm/models/network/path_rule.rb
fog-azure-rm-0.0.4 lib/fog/azurerm/models/network/path_rule.rb
fog-azure-rm-0.0.3 lib/fog/azurerm/models/network/path_rule.rb