项目作者: reismarcelo

项目描述 :
Cisco NSO package to demo external resource allocation using kickers
高级语言: Python
项目地址: git://github.com/reismarcelo/loopback.git
创建时间: 2018-01-24T17:45:40Z
项目社区:https://github.com/reismarcelo/loopback

开源协议:

下载


Loopback package

Provided a device name this package will allocate an configure an address on its loopback interface. The goal is to
demonstrate the use of kickers to implement an external resource manager. Resource allocations are tracked in a JSON
file.

There is also code to demonstrate using custom validators in python. This is used to validate the description field.

Initial setup

The resource allocations file ‘resource-pools.json’ is automatically created with some predefined defaults if it doesn’t
yet exist. The default pool created is ‘pool-1’.

The setup container is used primarily to configure the kickers (i.e. applying setup-template.xml). It needs to be configured
before devices can be specified.

  1. admin@ncs(config)# services loopback ?
  2. Possible completions:
  3. setup <cr>
  4. admin@ncs(config)# services loopback setup
  5. admin@ncs(config-loopback)# commit
  6. Commit complete.

In order to view the configured kickers we need to create and unhide the debug group:

a. Add the following to ncs.conf file and restart NSO:

  1. <hide-group>
  2. <name>debug</name>
  3. </hide-group>

b. Unhide the debug group via cli:

  1. admin@ncs# unhide debug

c. Show running kickers:

  1. admin@ncs# show running-config kickers
  2. kickers data-kicker resource-diff-iter
  3. monitor /loopback:external-resource-manager/loopback:id-pool/loopback:allocation
  4. trigger-expr request
  5. kick-node /external-resource-manager
  6. action-name diff-iter
  7. !
  8. <snip>

Specifying device to configure the loopback

  1. admin@ncs(config)# services loopback device IOS-0
  2. admin@ncs(config-device-IOS-0)# commit