Sha256: a0962dfa02307e254e7ed24e47e52a62ac83b31621ac4a0b7b4887463300b712

Contents?: true

Size: 1.29 KB

Versions: 46

Compression:

Stored size: 1.29 KB

Contents

module Fog
  module Network
    class AzureRM
      # collection class for Network Security Rule
      class NetworkSecurityRules < Fog::Collection
        model Fog::Network::AzureRM::NetworkSecurityRule
        attribute :resource_group
        attribute :network_security_group_name

        def all
          requires :resource_group, :network_security_group_name
          network_security_rules = []
          service.list_network_security_rules(resource_group, network_security_group_name).each do |nsr|
            network_security_rules << Fog::Network::AzureRM::NetworkSecurityRule.parse(nsr)
          end
          load(network_security_rules)
        end

        def get(resource_group, network_security_group_name, name)
          network_security_rule = service.get_network_security_rule(resource_group, network_security_group_name, name)
          network_security_rule_fog = Fog::Network::AzureRM::NetworkSecurityRule.new(service: service)
          network_security_rule_fog.merge_attributes(Fog::Network::AzureRM::NetworkSecurityRule.parse(network_security_rule))
        end

        def check_net_sec_rule_exists(resource_group, network_security_group_name, name)
          service.check_net_sec_rule_exists(resource_group, network_security_group_name, name)
        end
      end
    end
  end
end

Version data entries

46 entries across 46 versions & 4 rubygems

Version Path
fog-azure-rm-0.6.0 lib/fog/azurerm/models/network/network_security_rules.rb
fog-azure-rm-0.5.3 lib/fog/azurerm/models/network/network_security_rules.rb
fog-azure-rm-0.5.2 lib/fog/azurerm/models/network/network_security_rules.rb
far-gem-0.5.6 lib/fog/azurerm/models/network/network_security_rules.rb
fog-azure-rm-0.5.1 lib/fog/azurerm/models/network/network_security_rules.rb
far-gem-0.5.5 lib/fog/azurerm/models/network/network_security_rules.rb
fog-azure-rm-0.5.0 lib/fog/azurerm/models/network/network_security_rules.rb
far-gem-0.5.4 lib/fog/azurerm/models/network/network_security_rules.rb
far-gem-0.5.3 lib/fog/azurerm/models/network/network_security_rules.rb
fog-azure-rm-0.4.9 lib/fog/azurerm/models/network/network_security_rules.rb
far-gem-0.5.2 lib/fog/azurerm/models/network/network_security_rules.rb
fog-azure-rm-0.4.8 lib/fog/azurerm/models/network/network_security_rules.rb
fog-azure-rm-0.4.7 lib/fog/azurerm/models/network/network_security_rules.rb
fog-azure-rm-0.4.6 lib/fog/azurerm/models/network/network_security_rules.rb
fog-azure-rm-0.4.5 lib/fog/azurerm/models/network/network_security_rules.rb
fog-azure-rm-temp-0.0.5 lib/fog/azurerm/models/network/network_security_rules.rb
fog-azure-rm-0.4.4 lib/fog/azurerm/models/network/network_security_rules.rb
fog-azure-rm-0.4.3 lib/fog/azurerm/models/network/network_security_rules.rb
far-gem-0.5.1 lib/fog/azurerm/models/network/network_security_rules.rb
fog-azure-rm-0.4.2 lib/fog/azurerm/models/network/network_security_rules.rb