Class: Rbeapi::Api::Aaa

Inherits:
Entity
  • Object
show all
Defined in:
lib/rbeapi/api/aaa.rb

Overview

The Aaa class manages Authorization, Authentication and Accounting (AAA) on an EOS node.

Instance Attribute Summary

Attributes inherited from Entity

#config, #error, #node

Instance Method Summary collapse

Methods inherited from Entity

#command_builder, #configure, #configure_interface, #get_block, #initialize, instance

Constructor Details

This class inherits a constructor from Rbeapi::Api::Entity

Instance Method Details

#getHash<Symbol, Object>

get returns a hash of all Aaa resources.

Examples:

{
  <groups>: {
    <name>: {
      type: <string>,
      servers: <array>
    },
    <name>: {
      type: <string>,
      servers: <array>
    }
  }
}

Returns:

  • (Hash<Symbol, Object>)

    Returns the Aaa resources as a Hash. If no Aaa resources are found, an empty hash is returned.



63
64
65
66
67
# File 'lib/rbeapi/api/aaa.rb', line 63

def get
  response = {}
  response[:groups] = groups.getall
  response
end

#groupsObject

Returns an object node for working with AaaGroups class.



71
72
73
74
75
# File 'lib/rbeapi/api/aaa.rb', line 71

def groups
  return @groups if @groups
  @groups = AaaGroups.new node
  @groups
end