Configuring Command Aliases

For information about command aliases, see the Cisco Nexus 9000 Series NX-OS Fundamentals Configuration Guide: https://www.cisco.com/c/en/us/support/switches/nexus-9000-series-switches/products-installation-and-configuration-guides-list.html

Specifying a Command Alias

Specifying a Command Alias
POST http://<mgmt0_IP>/api/mo/sys.json
{
  "topSystem": {
    "children": [
      {
        "vshdCliAlias": {
          "attributes": {
            "aliasCmd": "interface ethernet",
            "aliasName": "ethint"
}}}]}}
{
    imdata:[]
}
<System>
  <clialias-items>
    <CliAlias-list>
      <aliasName>ethint</aliasName>
      <aliasCmd>interface ethernet</aliasCmd>
    </CliAlias-list>
  </clialias-items>
</System>

Note: This example was added in Release 9.3(1).


CLI Commands

The CLI commands are equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload. Click the YANG tab to view the XML payload.

cli alias name ethint interface ethernet

Note: The property information for this example was added in Release 9.3(3).


Verifying a DME Configuration
The following table contains the distinguished name (DN) for each managed object (MO) in the DME payload. Issue a GET request using the DN to verify the configuration was posted or to get information about the configured properties of a particular object.

MODN
topSystem sys
vshdCliAlias sys/clialias-{aliasName}


vshdCliAlias Properties

The following table contains information about the vshdCliAlias properties in the DME payload. For more information about the properties and MOs, see the NX-API DME Model Reference linked in the Related Documentation section below.

Property NameData TypeDescriptionValues
aliasCmdstring:Basic
Alias command definition
RANGE: [0 , 1023]
aliasNamestring:Basic
Name of the aliasA sequence of characters


Related Documentation

For other CLI options, see the Cisco Nexus 9000 Series NX-OS Command Reference:

http://www.cisco.com/c/en/us/support/switches/nexus-9000-series-switches/products-command-reference-list.html

See the NX-API DME Model Reference for detailed information about classes and attributes described in the payload:

https://developer.cisco.com/site/nx-os/docs/nexus-model-reference/

For information about using the payloads, see the Cisco Nexus 9000 Series NX-OS Programmability Guide:

https://www.cisco.com/c/en/us/support/switches/nexus-9000-series-switches/products-programming-reference-guides-list.html

Deleting a Command Alias

Deleting a Command Alias
POST http://<mgmt0_IP>/api/mo/sys.json
{
  "topSystem": {
    "children": [
      {
        "vshdCliAlias": {
          "attributes": {
            "aliasName": "ethint",
            "status": "deleted"
}}}]}}
{
    imdata:[]
}
<System>
  <clialias-items>
    <CliAlias-list xc:operation="delete">
      <aliasName>ethint</aliasName>
    </CliAlias-list>
  </clialias-items>
</System>

Note: This example was added in Release 9.3(1).


CLI Commands

The CLI commands are equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload. Click the YANG tab to view the XML payload.

no cli alias name ethint interface ethernet

Note: The property information for this example was added in Release 9.3(3).


Verifying a DME Configuration
The following table contains the distinguished name (DN) for each managed object (MO) in the DME payload. Issue a GET request using the DN to verify the configuration was posted or to get information about the configured properties of a particular object.

MODN
topSystem sys
vshdCliAlias sys/clialias-{aliasName}


vshdCliAlias Properties

The following table contains information about the vshdCliAlias properties in the DME payload. For more information about the properties and MOs, see the NX-API DME Model Reference linked in the Related Documentation section below.

Property NameData TypeDescriptionValues
aliasNamestring:Basic
Name of the aliasA sequence of characters
statusmo:ModificationStatus
(scalar:Bitmask32)
The upgrade status. This property is for internal use only.SELECTION:
2 - created
4 - modified
8 - deleted
16 - replaced


Related Documentation

For other CLI options, see the Cisco Nexus 9000 Series NX-OS Command Reference:

http://www.cisco.com/c/en/us/support/switches/nexus-9000-series-switches/products-command-reference-list.html

See the NX-API DME Model Reference for detailed information about classes and attributes described in the payload:

https://developer.cisco.com/site/nx-os/docs/nexus-model-reference/

For information about using the payloads, see the Cisco Nexus 9000 Series NX-OS Programmability Guide:

https://www.cisco.com/c/en/us/support/switches/nexus-9000-series-switches/products-programming-reference-guides-list.html

Checking for Exact Match Only

Checking for Exact Match Only
POST http://<mgmt0_IP>/api/mo/sys.json
{
  "topSystem": {
    "children": [
      {
        "vshdCliAliasCheck": {
          "attributes": {
            "mode": "loose"
}}}]}}
{
    imdata:[]
}
<System>
  <clialiascheck-items>
    <mode>loose</mode>
  </clialiascheck-items>
</System>

Note: This example was added in Release 9.3(3).


CLI Commands

The CLI commands are equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload. Click the YANG tab to view the XML payload.

cli alias check loose


Verifying a DME Configuration

The following table contains the distinguished name (DN) for each managed object (MO) in the DME payload. Issue a GET request using the DN to verify the configuration was posted or to get information about the configured properties of a particular object.

MODN
topSystem sys
vshdCliAliasCheck sys/clialiascheck


vshdCliAliasCheck Properties

The following table contains information about the vshdCliAliasCheck properties in the DME payload. For more information about the properties and MOs, see the NX-API DME Model Reference linked in the Related Documentation section below.

Property NameData TypeDescriptionValues
modevshd:ModeType
(scalar:Enum8)
strict check for cli aliasSELECTION:
0 - default
1 - strict
2 - loose
DEFAULT: default


Related Documentation

For other CLI options, see the Cisco Nexus 9000 Series NX-OS Command Reference:

http://www.cisco.com/c/en/us/support/switches/nexus-9000-series-switches/products-command-reference-list.html

See the NX-API DME Model Reference for detailed information about classes and attributes described in the payload:

https://developer.cisco.com/site/nx-os/docs/nexus-model-reference/

For information about using the payloads, see the Cisco Nexus 9000 Series NX-OS Programmability Guide:

https://www.cisco.com/c/en/us/support/switches/nexus-9000-series-switches/products-programming-reference-guides-list.html

Deleting Checking for Exact Match Only

Deleting Checking for Exact Match Only
POST http://<mgmt0_IP>/api/mo/sys.json
{
  "topSystem": {
    "children": [
      {
        "vshdCliAliasCheck": {
          "attributes": {
            "mode": "default"
}}}]}}
{
    imdata:[]
}
<System>
  <clialiascheck-items>
    <mode>default</mode>
  </clialiascheck-items>
</System>

Note: This example was added in Release 9.3(3).


CLI Commands

The CLI commands are equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload. Click the YANG tab to view the XML payload.

no cli alias check loose


Verifying a DME Configuration

The following table contains the distinguished name (DN) for each managed object (MO) in the DME payload. Issue a GET request using the DN to verify the configuration was posted or to get information about the configured properties of a particular object.

MODN
topSystem sys
vshdCliAliasCheck sys/clialiascheck


vshdCliAliasCheck Properties

The following table contains information about the vshdCliAliasCheck properties in the DME payload. For more information about the properties and MOs, see the NX-API DME Model Reference linked in the Related Documentation section below.

Property NameData TypeDescriptionValues
modevshd:ModeType
(scalar:Enum8)
strict check for cli aliasSELECTION:
0 - default
1 - strict
2 - loose
DEFAULT: default


Related Documentation

For other CLI options, see the Cisco Nexus 9000 Series NX-OS Command Reference:

http://www.cisco.com/c/en/us/support/switches/nexus-9000-series-switches/products-command-reference-list.html

See the NX-API DME Model Reference for detailed information about classes and attributes described in the payload:

https://developer.cisco.com/site/nx-os/docs/nexus-model-reference/

For information about using the payloads, see the Cisco Nexus 9000 Series NX-OS Programmability Guide:

https://www.cisco.com/c/en/us/support/switches/nexus-9000-series-switches/products-programming-reference-guides-list.html

Checking for Exact and Partial Match Keyword

Checking for Exact and Partial Match Keyword
POST http://<mgmt0_IP>/api/mo/sys.json
{
  "topSystem": {
    "children": [
      {
        "vshdCliAliasCheck": {
          "attributes": {
            "mode": "strict"
}}}]}}
{
    imdata:[]
}
<System>
  <clialiascheck-items>
    <mode>strict</mode>
  </clialiascheck-items>
</System>

Note: This example was added in Release 9.3(3).


CLI Commands

The CLI commands are equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload. Click the YANG tab to view the XML payload.

cli alias check strict


Verifying a DME Configuration

The following table contains the distinguished name (DN) for each managed object (MO) in the DME payload. Issue a GET request using the DN to verify the configuration was posted or to get information about the configured properties of a particular object.

MODN
topSystem sys
vshdCliAliasCheck sys/clialiascheck


vshdCliAliasCheck Properties

The following table contains information about the vshdCliAliasCheck properties in the DME payload. For more information about the properties and MOs, see the NX-API DME Model Reference linked in the Related Documentation section below.

Property NameData TypeDescriptionValues
modevshd:ModeType
(scalar:Enum8)
strict check for cli aliasSELECTION:
0 - default
1 - strict
2 - loose
DEFAULT: default


Related Documentation

For other CLI options, see the Cisco Nexus 9000 Series NX-OS Command Reference:

http://www.cisco.com/c/en/us/support/switches/nexus-9000-series-switches/products-command-reference-list.html

See the NX-API DME Model Reference for detailed information about classes and attributes described in the payload:

https://developer.cisco.com/site/nx-os/docs/nexus-model-reference/

For information about using the payloads, see the Cisco Nexus 9000 Series NX-OS Programmability Guide:

https://www.cisco.com/c/en/us/support/switches/nexus-9000-series-switches/products-programming-reference-guides-list.html

Deleting Checking for Exact and Partial Match Keyword

Deleting Checking for Exact and Partial Match Keyword
POST http://<mgmt0_IP>/api/mo/sys.json
{
  "topSystem": {
    "children": [
      {
        "vshdCliAliasCheck": {
          "attributes": {
            "mode": "default"
}}}]}}
{
    imdata:[]
}
<System>
  <clialiascheck-items>
    <mode>default</mode>
  </clialiascheck-items>
</System>

Note: This example was added in Release 9.3(3).


CLI Commands

The CLI commands are equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload. Click the YANG tab to view the XML payload.

no cli alias check strict


Verifying a DME Configuration

The following table contains the distinguished name (DN) for each managed object (MO) in the DME payload. Issue a GET request using the DN to verify the configuration was posted or to get information about the configured properties of a particular object.

MODN
topSystem sys
vshdCliAliasCheck sys/clialiascheck


vshdCliAliasCheck Properties

The following table contains information about the vshdCliAliasCheck properties in the DME payload. For more information about the properties and MOs, see the NX-API DME Model Reference linked in the Related Documentation section below.

Property NameData TypeDescriptionValues
modevshd:ModeType
(scalar:Enum8)
strict check for cli aliasSELECTION:
0 - default
1 - strict
2 - loose
DEFAULT: default


Related Documentation

For other CLI options, see the Cisco Nexus 9000 Series NX-OS Command Reference:

http://www.cisco.com/c/en/us/support/switches/nexus-9000-series-switches/products-command-reference-list.html

See the NX-API DME Model Reference for detailed information about classes and attributes described in the payload:

https://developer.cisco.com/site/nx-os/docs/nexus-model-reference/

For information about using the payloads, see the Cisco Nexus 9000 Series NX-OS Programmability Guide:

https://www.cisco.com/c/en/us/support/switches/nexus-9000-series-switches/products-programming-reference-guides-list.html

Configuring a Variable

Configuring a Variable
POST http://<mgmt0_IP>/api/mo/sys.json
{
  "topSystem": {
    "children": [
      {
        "vshdCliVar": {
          "attributes": {
            "varName": "SampleString_123",
            "varValue": "123:12"
}}}]}}
{
    imdata:[]
}
<System>
  <clivar-items>
    <CliVar-list>
      <varName>SampleString_123</varName>
      <varValue>123:12</varValue>
    </CliVar-list>
  </clivar-items>
</System>

Note: This example was added in Release 9.3(3).


CLI Commands

The CLI commands are equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload. Click the YANG tab to view the XML payload.

cli var name SampleString_123 123:12


Verifying a DME Configuration

The following table contains the distinguished name (DN) for each managed object (MO) in the DME payload. Issue a GET request using the DN to verify the configuration was posted or to get information about the configured properties of a particular object.

MODN
topSystem sys
vshdCliVar sys/clivar-SampleString_123


vshdCliVar Properties

The following table contains information about the vshdCliVar properties in the DME payload. For more information about the properties and MOs, see the NX-API DME Model Reference linked in the Related Documentation section below.

Property NameData TypeDescriptionValues
varNamestring:Basic
Specify a variable nameA sequence of characters
varValuestring:Basic
Specify a variable value
RANGE: [0 , 256]


Related Documentation

For other CLI options, see the Cisco Nexus 9000 Series NX-OS Command Reference:

http://www.cisco.com/c/en/us/support/switches/nexus-9000-series-switches/products-command-reference-list.html

See the NX-API DME Model Reference for detailed information about classes and attributes described in the payload:

https://developer.cisco.com/site/nx-os/docs/nexus-model-reference/

For information about using the payloads, see the Cisco Nexus 9000 Series NX-OS Programmability Guide:

https://www.cisco.com/c/en/us/support/switches/nexus-9000-series-switches/products-programming-reference-guides-list.html

Deleting a Variable

Deleting a Variable
POST http://<mgmt0_IP>/api/mo/sys.json
{
  "topSystem": {
    "children": [
      {
        "vshdCliVar": {
          "attributes": {
            "status": "deleted",
            "varName": "SampleString_123"
}}}]}}
{
    imdata:[]
}
<System>
  <clivar-items>
    <CliVar-list nc:operation="delete">
      <varName>SampleString_123</varName>
    </CliVar-list>
  </clivar-items>
</System>

Note: This example was added in Release 9.3(3).


CLI Commands

The CLI commands are equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload. Click the YANG tab to view the XML payload.

no cli var name SampleString_123 123:12


Verifying a DME Configuration

The following table contains the distinguished name (DN) for each managed object (MO) in the DME payload. Issue a GET request using the DN to verify the configuration was posted or to get information about the configured properties of a particular object.

MODN
topSystem sys
vshdCliVar sys/clivar-SampleString_123


vshdCliVar Properties

The following table contains information about the vshdCliVar properties in the DME payload. For more information about the properties and MOs, see the NX-API DME Model Reference linked in the Related Documentation section below.

Property NameData TypeDescriptionValues
statusmo:ModificationStatus
(scalar:Bitmask32)
The upgrade status. This property is for internal use only.SELECTION:
2 - created
4 - modified
8 - deleted
16 - replaced
varNamestring:Basic
Specify a variable nameA sequence of characters


Related Documentation

For other CLI options, see the Cisco Nexus 9000 Series NX-OS Command Reference:

http://www.cisco.com/c/en/us/support/switches/nexus-9000-series-switches/products-command-reference-list.html

See the NX-API DME Model Reference for detailed information about classes and attributes described in the payload:

https://developer.cisco.com/site/nx-os/docs/nexus-model-reference/

For information about using the payloads, see the Cisco Nexus 9000 Series NX-OS Programmability Guide:

https://www.cisco.com/c/en/us/support/switches/nexus-9000-series-switches/products-programming-reference-guides-list.html