Sha256: 5a267c482db44072cf53cada23ecbeb07e04ed912b8b6f05174be77a4c2a2acb

Contents?: true

Size: 1.09 KB

Versions: 46

Compression:

Stored size: 1.09 KB

Contents

module Fog
  module Network
    class AzureRM
      # collection class for Network Security Group
      class NetworkSecurityGroups < Fog::Collection
        model Fog::Network::AzureRM::NetworkSecurityGroup
        attribute :resource_group

        def all
          requires :resource_group
          network_security_groups = []
          service.list_network_security_groups(resource_group).each do |nsg|
            network_security_groups << Fog::Network::AzureRM::NetworkSecurityGroup.parse(nsg)
          end
          load(network_security_groups)
        end

        def get(resource_group, name)
          network_security_group = service.get_network_security_group(resource_group, name)
          network_security_group_fog = Fog::Network::AzureRM::NetworkSecurityGroup.new(service: service)
          network_security_group_fog.merge_attributes(Fog::Network::AzureRM::NetworkSecurityGroup.parse(network_security_group))
        end

        def check_net_sec_group_exists(resource_group, name)
          service.check_net_sec_group_exists(resource_group, 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_groups.rb
fog-azure-rm-0.5.3 lib/fog/azurerm/models/network/network_security_groups.rb
fog-azure-rm-0.5.2 lib/fog/azurerm/models/network/network_security_groups.rb
far-gem-0.5.6 lib/fog/azurerm/models/network/network_security_groups.rb
fog-azure-rm-0.5.1 lib/fog/azurerm/models/network/network_security_groups.rb
far-gem-0.5.5 lib/fog/azurerm/models/network/network_security_groups.rb
fog-azure-rm-0.5.0 lib/fog/azurerm/models/network/network_security_groups.rb
far-gem-0.5.4 lib/fog/azurerm/models/network/network_security_groups.rb
far-gem-0.5.3 lib/fog/azurerm/models/network/network_security_groups.rb
fog-azure-rm-0.4.9 lib/fog/azurerm/models/network/network_security_groups.rb
far-gem-0.5.2 lib/fog/azurerm/models/network/network_security_groups.rb
fog-azure-rm-0.4.8 lib/fog/azurerm/models/network/network_security_groups.rb
fog-azure-rm-0.4.7 lib/fog/azurerm/models/network/network_security_groups.rb
fog-azure-rm-0.4.6 lib/fog/azurerm/models/network/network_security_groups.rb
fog-azure-rm-0.4.5 lib/fog/azurerm/models/network/network_security_groups.rb
fog-azure-rm-temp-0.0.5 lib/fog/azurerm/models/network/network_security_groups.rb
fog-azure-rm-0.4.4 lib/fog/azurerm/models/network/network_security_groups.rb
fog-azure-rm-0.4.3 lib/fog/azurerm/models/network/network_security_groups.rb
far-gem-0.5.1 lib/fog/azurerm/models/network/network_security_groups.rb
fog-azure-rm-0.4.2 lib/fog/azurerm/models/network/network_security_groups.rb