cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
23
Views
0
Helpful
1
Replies
Highlighted
Cisco Employee

direct device vs. device template configuration differences

Hi Team,

We have noticed that when we configure, using the NCS CLI,  configuration directly towards the device how the NCS CLI presents the NED configuration options is different.  Is this normal?  In many cases direct configuration of the device is feasible, but when we try the same within a device template the configuration towards the device is rendered by fastmap incorrectly.  Below is an examples showing how the direct device configuration differs from device template configuration.

Thanks, Julie Ann and Phathu

Example 1:


    

Here is the option of configuring CARD on a template:

admin@ncs(config)# devices template oam-test config

Possible completions:

<slot:string>  3  4  5  6  range

admin@ncs(config-config)# staros:card 3 ?

Possible completions:

  link-aggregation mode  redundant  <cr>

admin@ncs(config-config)# staros:card 3

admin@ncs(config-staros:card-3)# ?

Possible completions:

  link-aggregation

  mode

  redundant

  ---

  commit Commit current set of changes

  describe Display transparent command information

  exit Exit from current mode

  help Provide help information

  no Negate a command or set its defaults

  pwd Display current mode path

  rload Load configuration from an ASCII file relative to current location

  top Exit to top level and optionally run command

admin@ncs(config-staros:card-3)# mode ?

Possible completions:

<string>[true]

Here is the config when going directly to a device - note that we get the correct choices of active/standby.


admin@ncs(config)# devices device VPC-DI config staros:card 3

admin@ncs(config-staros:card-3)# ?

Possible completions:

  link-aggregation

  mode

  redundant

  ---

  commit             Commit current set of changes

  describe           Display transparent command information

  exit               Exit from current mode

  help               Provide help information

  no                 Negate a command or set its defaults

  pwd                Display current mode path

  rload              Load configuration from an ASCII file relative to current location

  top                Exit to top level and optionally run command

admin@ncs(config-staros:card-3)# mode ?

Possible completions:

  [active]  active  standby

admin@ncs(config-staros:card-3)# mode

Everyone's tags (4)
1 ACCEPTED SOLUTION

Accepted Solutions
Cisco Employee

Re: direct device vs. device template configuration differences

jconnary wrote:

Hi Team,

We have noticed that when we configure, using the NCS CLI,  configuration directly towards the device how the NCS CLI presents the NED configuration options is different.  Is this normal?

Yes this is normal.

When a YANG model for a device is compiled for NCS three different subtrees will be produced from the original YANG file (see packages/*/src/ncsc-out/modules/yang/*.yang of any package). Each one of the three resulting subtrees will be augmented into different positions in the configuration tree.

The most obvious is the one which is augmented under /devices/device/config which holds the actual configuration. The second one is augmented under /devices/device/live-status and contains besides the config elements the "config false" elements. The third subtree is  augmented /devices/template/config aka. device template.

The subtree of the device template has been totally rewritten for example all mandatory keywords has been removed as all constrains on input values. Now to the answer to the question: all datatypes has been changed to string. This is to make it possible to enter XPATH expressions as the value of an element. If a value consists of curly brackets the expression within the will be treated as an XPATH expression and the result of that expression will be used when the template is applied. See examples.ncs/getting-started/developing-with-ncs/12-templates. Because the datatype is rewritten to string no TAB completion is avaiable in the CLI.

Cheers

/Dag

View solution in original post

1 REPLY 1
Cisco Employee

Re: direct device vs. device template configuration differences

jconnary wrote:

Hi Team,

We have noticed that when we configure, using the NCS CLI,  configuration directly towards the device how the NCS CLI presents the NED configuration options is different.  Is this normal?

Yes this is normal.

When a YANG model for a device is compiled for NCS three different subtrees will be produced from the original YANG file (see packages/*/src/ncsc-out/modules/yang/*.yang of any package). Each one of the three resulting subtrees will be augmented into different positions in the configuration tree.

The most obvious is the one which is augmented under /devices/device/config which holds the actual configuration. The second one is augmented under /devices/device/live-status and contains besides the config elements the "config false" elements. The third subtree is  augmented /devices/template/config aka. device template.

The subtree of the device template has been totally rewritten for example all mandatory keywords has been removed as all constrains on input values. Now to the answer to the question: all datatypes has been changed to string. This is to make it possible to enter XPATH expressions as the value of an element. If a value consists of curly brackets the expression within the will be treated as an XPATH expression and the result of that expression will be used when the template is applied. See examples.ncs/getting-started/developing-with-ncs/12-templates. Because the datatype is rewritten to string no TAB completion is avaiable in the CLI.

Cheers

/Dag

View solution in original post

Content for Community-Ad
August's Community Spotlight Awards
This widget could not be displayed.