Netstack Action Commands

This section contains payload examples and CLIs to demonstrate many of the netstack action command options and to show how the REST APIs correspond to the CLI commands

Clearing IP traffic

 Clearing IP traffic
POST http://<mgmt0_IP>/api/mo/sys/action.json
{   
    "actionLSubj": {
        "attributes": {
             "dn": "sys/action/lsubj-[sys]"
        }
         "children" : [{
             "ipv4InstClearTrafficStatLTask": {
               "attributes": {
                       "adminSt": "start",
                         "dn": "sys/action/lsubj-[sys]/ipv4InstClearTrafficStatLTask",
                        "freq": "one-shot"
}}}]}}
{
    imdata:[]
}

Clears IP global statistics.


CLI Command

The CLI command below is the equivalent to the payload example displayed in the pane on the right.

clear ip traffic

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
actionLSubj sys/action/lsubj-{[oDn]}
ipv4InstClearTrafficStatLTask sys/action/lsubj-{[oDn]}/ipv4InstClearTrafficStatLTask


actionLSubj Properties

The following table contains information about the actionLSubj 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
dn
reference:BinRef
A tag or metadata is a non-hierarchical keyword or term assigned to the fabric module.


ipv4InstClearTrafficStatLTask Properties

The following table contains information about the ipv4InstClearTrafficStatLTask 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
adminSt
action:AdminSt
scalar:Enum8
The administrative state of the object or policy.SELECTION:
  • 0 - unknown
  • 1 - start
  • 2 - stop
  • 3 - suspend
  • DEFAULT: unknown(0)
  • dn
    reference:BinRef
    A tag or metadata is a non-hierarchical keyword or term assigned to the fabric module.
    freq
    action:Freq
    scalar:Time
    Frequency at which tasks are executedSELECTION:
  • 0ull - one-shot
  • DEFAULT: 0

  • 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

    Clearing interface statistics

     Clearing interface statistics
    
    POST http://<mgmt0_IP>/api/mo/sys/action.json
    {    
        "actionLSubj": {
            "attributes": {
                 "dn": "sys/action/lsubj-[sys]"
            }
             "children" : [{
                 "ipv4InstClearIntfStatLTask": {
                   "attributes": {
                           "adminSt": "start",
                           "interface": "<type-with-port>"
                             "dn": "sys/action/lsubj-[sys]/ipv4InstClearIntfStatLTask",
                            "freq": "one-shot"
    }}}]}}
    
    {
        imdata:[]
    }
    

    Clears IP interface statistics.


    CLI Command

    The CLI command below is the equivalent to the payload example displayed in the pane on the right.

    clear ip interface statistics

    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
    actionLSubj sys/action/lsubj-{[oDn]}
    ipv4InstClearIntfStatLTask sys/action/lsubj-{[oDn]}/ipv4InstClearIntfStatLTask


    actionLSubj Properties

    The following table contains information about the actionLSubj 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
    dn
    reference:BinRef
    A tag or metadata is a non-hierarchical keyword or term assigned to the fabric module.


    ipv4InstClearIntfStatLTask Properties

    The following table contains information about the ipv4InstClearIntfStatLTask 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
    adminSt
    action:AdminSt
    scalar:Enum8
    The administrative state of the object or policy.SELECTION:
  • 0 - unknown
  • 1 - start
  • 2 - stop
  • 3 - suspend
  • DEFAULT: unknown(0)
  • interface
    nw:IfId
    base:IfIndex
    NO COMMENTS
    dn
    reference:BinRef
    A tag or metadata is a non-hierarchical keyword or term assigned to the fabric module.
    freq
    action:Freq
    scalar:Time
    Frequency at which tasks are executedSELECTION:
  • 0ull - one-shot
  • DEFAULT: 0

  • 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

    Clearing IPv6 Traffic

     Clearing IPv6 Traffic
    
    POST http://<mgmt0_IP>/api/mo/sys/action.json
    {   
        "actionLSubj": {
            "attributes": {
                 "dn": "sys/action/lsubj-[sys]"
            }
             "children" : [{
                 "ipv6InstClearTrafficStatLTask": {
                   "attributes": {
                           "adminSt": "start",
                             "dn": "sys/action/lsubj-[sys]/ipv6InstClearTrafficStatLTask",
                            "freq": "one-shot"
    }}}]}}
    
    {
        imdata:[]
    }
    

    Clears IPv6 traffic.


    CLI Command

    The CLI command below is the equivalent to the payload example displayed in the pane on the right. .

    clear ipv6 traffic

    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
    actionLSubj sys/action/lsubj-{[oDn]}
    ipv6InstClearTrafficStatLTask sys/action/lsubj-{[oDn]}/ipv6InstClearTrafficStatLTask


    actionLSubj Properties

    The following table contains information about the actionLSubj 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
    dn
    reference:BinRef
    A tag or metadata is a non-hierarchical keyword or term assigned to the fabric module.


    ipv6InstClearTrafficStatLTask Properties

    The following table contains information about the ipv6InstClearTrafficStatLTask 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
    adminSt
    action:AdminSt
    scalar:Enum8
    The administrative state of the object or policy.SELECTION:
  • 0 - unknown
  • 1 - start
  • 2 - stop
  • 3 - suspend
  • DEFAULT: unknown(0)
  • dn
    reference:BinRef
    A tag or metadata is a non-hierarchical keyword or term assigned to the fabric module.
    freq
    action:Freq
    scalar:Time
    Frequency at which tasks are executedSELECTION:
  • 0ull - one-shot
  • DEFAULT: 0

  • 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

    Clearing IPv6 Statistics

     Clearing IPv6 Statistics
    
    POST http://10.77.143.51/api/mo/sys/action.json
    {   	
        "actionLSubj": {
            "attributes": {
                 "dn": "sys/action/lsubj-[sys]"
            }
             "children" : [{
                 "ipv6InstClearGlobalStatLTask": {
                   "attributes": {
                           "adminSt": "start",
                             "dn": "sys/action/lsubj-[sys]/ipv6InstClearGlobalStatLTask",
                            "freq": "one-shot"
    }}}]}}
    
    {
        imdata:[]
    }
    

    Clears IPv6 statistics.


    CLI Command

    The CLI command below is the equivalent to the payload example displayed in the pane on the right.

    clear ipv6 statistics

    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
    actionLSubj sys/action/lsubj-{[oDn]}
    ipv6InstClearGlobalStatLTask sys/action/lsubj-{[oDn]}/ipv6InstClearGlobalStatLTask


    actionLSubj Properties

    The following table contains information about the actionLSubj 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
    dn
    reference:BinRef
    A tag or metadata is a non-hierarchical keyword or term assigned to the fabric module.


    ipv6InstClearGlobalStatLTask Properties

    The following table contains information about the ipv6InstClearGlobalStatLTask 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
    adminSt
    action:AdminSt
    scalar:Enum8
    The administrative state of the object or policy.SELECTION:
  • 0 - unknown
  • 1 - start
  • 2 - stop
  • 3 - suspend
  • DEFAULT: unknown(0)
  • dn
    reference:BinRef
    A tag or metadata is a non-hierarchical keyword or term assigned to the fabric module.
    freq
    action:Freq
    scalar:Time
    Frequency at which tasks are executedSELECTION:
  • 0ull - one-shot
  • DEFAULT: 0

  • 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

    Clearing IPv6 Interface Statistics

     Clearing IPv6 Interface Statistics
    
    POST http://10.77.143.51/api/mo/sys/action.json
    {    
    "actionLSubj": {
      "attributes": {
         "dn": "sys/action/lsubj-[sys]"
     }
     "children" : [{
         "ipv6InstClearIntfStatLTask": {
           "attributes": {
               "adminSt": "start",
               "interface": "<type-with-port>"
                 "dn": 	"sys/action/lsubj-[sys]/ipv6InstClearIntfStatLTask",
                "freq": "one-shot"
    }}}]}}
    
    {
        imdata:[]
    }
    

    Clears IPv6 interface statistics.


    CLI Command

    The CLI command below is the equivalent to the payload example displayed in the pane on the right.

    clear ipv6 interface statistics

    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
    actionLSubj sys/action/lsubj-{[oDn]}
    ipv6InstClearIntfStatLTask sys/action/lsubj-{[oDn]}/ipv6InstClearIntfStatLTask


    actionLSubj Properties

    The following table contains information about the actionLSubj 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
    dn
    reference:BinRef
    A tag or metadata is a non-hierarchical keyword or term assigned to the fabric module.


    ipv6InstClearIntfStatLTask Properties

    The following table contains information about the ipv6InstClearIntfStatLTask 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
    adminSt
    action:AdminSt
    scalar:Enum8
    The administrative state of the object or policy.SELECTION:
  • 0 - unknown
  • 1 - start
  • 2 - stop
  • 3 - suspend
  • DEFAULT: unknown(0)
  • interface
    nw:IfId
    base:IfIndex
    NO COMMENTS
    dn
    reference:BinRef
    A tag or metadata is a non-hierarchical keyword or term assigned to the fabric module.
    freq
    action:Freq
    scalar:Time
    Frequency at which tasks are executedSELECTION:
  • 0ull - one-shot
  • DEFAULT: 0

  • 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