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-pathapp-hosting activate appid application-nameapp-hosting start appid application-name
app-hosting stop appid application-nameapp-hosting deactivate appid application-nameapp-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.
| MO | DN |
|---|---|
| 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 Name | Data Type | Values | Description |
|---|---|---|---|
| dn | reference: 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 Name | Data Type | Values | Description |
|---|---|---|---|
| adminSt | scalar: Enum8 | Selection: 0: unknown 1: start 2: stop 3: suspend Default: unknown(0) | The administrative state of the object or policy |
| appId | string: Basic | Range: [1-64] | Unique Id of the application to manage |
| appAction | scalar: Enum16 | Selection: 0: unknown 1: install 2: uninstall 3: activate 4: deactivate 5: start 6: stop Default: unknown(0) | Action type of application management |
| appPkgName | reference: URI | RANGE: 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 |
| dn | reference: 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:
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: