Method: Cisco::ObjectGroup.object_groups

Defined in:
lib/cisco_node_utils/object_group.rb

.object_groupsObject



61
62
63
64
65
66
67
68
69
70
71
72
73
# File 'lib/cisco_node_utils/object_group.rb', line 61

def self.object_groups
  hash = {}
  grps = config_get('object_group', 'all_object_groups')
  return hash if grps.nil?
  grps.each do |afi, type, name|
    lafi = afi
    lafi = 'ipv4' if afi == 'ip'
    hash[lafi] ||= {}
    hash[lafi][type] ||= {}
    hash[lafi][type][name] = ObjectGroup.new(lafi, type, name, false)
  end
  hash
end