lib/fog/azurerm/models/network/network_security_rules.rb in fog-azure-rm-0.0.9 vs lib/fog/azurerm/models/network/network_security_rules.rb in fog-azure-rm-0.1.0
- old
+ new
@@ -1,19 +1,15 @@
-require 'fog/core/collection'
-require 'fog/azurerm/models/network/network_security_rule'
-
module Fog
module Network
class AzureRM
# collection class for Network Security Rule
class NetworkSecurityRules < Fog::Collection
- model Fog::Network::AzureRM::NetworkSecurityRule
+ model NetworkSecurityRule
attribute :resource_group
attribute :network_security_group_name
def all
- requires :resource_group
- requires :network_security_group_name
+ 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 << NetworkSecurityRule.parse(nsr)
end
load(network_security_rules)