Managing lifecycle of an Application

Managing lifecycle of an Application
POST http://<mgmt0_IP>/api/mo/sys/action.json
  {
    "actionLCont": {
        "children": [
            {
                "actionLSubj": {
                    "attributes": {
                        "dn": "sys/action/lsubj-[sys]"
                    },
                    "children" : [
                        {
                            "topSystemApphostingLTask": {
                                "attributes": {
                                    "dn": "sys/action/lsubj-[sys]/topSystemApphostingLTask",
                                    "appId": "te_app",
                                    "appAction": "install",
                                    "appPkgName": "bootflash:thousandeyes-enterprise-agent-4.0.2.cisco.tar.gz",
                                    "adminSt": "start"
 }}}]}}]}}
 
{
    imdata:[]
}


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.

app-hosting install appid application-name package package-path
app-hosting activate appid application-name
app-hosting start appid application-name app-hosting stop appid application-name
app-hosting deactivate appid application-name
app-hosting uninstall appid application-name

Note: The property information for this example was added in release 10.3(1)F.


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


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 TypeValuesDescription
dnreference: BinRef-A tag or metadata is a non-hierarchical keyword or term assigned to the fabric module


topSystemApphostingLTask Properties

The following table contains information about the topSystemApphostingLTask 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 TypeValuesDescription
adminStscalar: Enum8Selection:
0: unknown
1: start
2: stop
3: suspend
Default: unknown(0)
The administrative state of the object or policy
appIdstring: BasicRange: [1-64]Unique Id of the application to manage
appActionscalar: Enum16Selection:
0: unknown
1: install
2: uninstall
3: activate
4: deactivate
5: start
6: stop
Default: unknown(0)
Action type of application management
appPkgNamereference: URIRANGE:
Min: "256"
Max: "4096" (EXCLUDE)
Default: ""--Empty string as default URI
Package name to specify the docker image tar ball or cisco signed CAF package
dnreference: BinRef-A tag or metadata is a non-hierarchical keyword or term assigned to the fabric module


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