Managing Images

Reloading an Image

Reload an Image
POST  http://<IP_Address>/api/mo/sys/action.json
{
    "actionLSubj": {
        "attributes": {
            "dn": "sys/action/lsubj-[sys]"
        }   
        "children" : [{
            "eqptChReloadLTask": {
                "attributes": {
                    "adminSt": "start",
                    "dn": "sys/action/lsubj-[sys]/eqptChReloadLTask",
                    "freq": "one-shot"
                }   
            }   
        }]  
    }   
}
<reload xmlns="http://cisco.com/ns/yang/cisco-nx-os-device"/> 

Deleting a File

Deleting a File
POST http://<IP_Address>/api/mo.json
{
    "actionLSubj": {
        "attributes": {
            "dn": "sys/action/lsubj-[sys]"
        }
        "children" : [{
            "topSystemDeleteFileLTask": {
                "attributes": {
                    "adminSt": "start",

                    "uri": "bootflash://sup-local/t7",

                    "dn": "sys/action/lsubj-[sys]/topSystemDeleteFileLTask",
                    "freq": "one-shot"
                }
            }
        }]
    }
}
<delete xmlns="http://cisco.com/ns/yang/cisco-nx-os-device">
     <target>sample_copy_file.txt</target> 
</delete>

Confirming a File was Deleted

Confirming a File was Deleted
GET http://<IP_Address>/api/mo/sys/action.json?rsp-subtree=full
{
    "totalCount": "1",
    "imdata": [
        {
            "actionLCont": {
                "attributes": {
                    "childAction": "",
                    "dn": "sys/action",
                    "modTs": "2011-02-03T15:06:15.754+00:00",
                    "monPolDn": "uni/fabric/monfab-default",
                    "persistentOnReload": "true",
                    "status": "",
                    "uid": "0"
                },
                "children": [
                    {
                        "actionLSubj": {
                            "attributes": {
                                "childAction": "",
                                "modTs": "2011-02-03T15:21:51.904+00:00",
                                "monPolDn": "uni/fabric/monfab-default",
                                "oCl": "unspecified",
                                "oDn": "sys",
                                "persistentOnReload": "true",
                                "rn": "lsubj-[sys]",
                                "status": "",
                                "uid": "0"
                            },
                            "children": [
                                {
                                    "topSystemDeleteFileLTask": {
                                        "attributes": {
                                            "adminSt": "unknown",
                                            "childAction": "",
                                            "descr": "",
                                            "freq": "one-shot",
                                            "modTs": "2011-02-08T09:41:52.305+00:00",
                                            "peerClassId": "topSystemDeleteFileRslt",
                                            "persistentOnReload": "true",
                                            "rSz": "100",
                                            "rTm": "00:00:00:00.000",
                                            "rn": "topSystemDeleteFileLTask",
                                            "startTs": "2011-02-08T09:41:52.305+00:00",
                                            "status": "",
                                            "type": "clear",
                                            "uid": "0",
                                            "uri": "bootflash://sup-local/t7"
                                        }
                                    }
                                },
                                {
                                    "topSystemDeleteFileRslt": {
                                        "attributes": {
                                            "ack": "no",
                                            "childAction": "",
                                            "descr": "SUCCESS",
                                            "endTs": "2011-02-08T09:41:52.305+00:00",
                                            "modTs": "never",
                                            "operSt": "completed",
                                            "peerClassId": "unspecified",
                                            "persistentOnReload": "false",
                                            "qual": "",
                                            "rSz": "0",
                                            "rTm": "00:00:00:00.000",
                                            "rn": "topSystemDeleteFileRslt",
                                            "startTs": "2011-02-08T09:41:52.305+00:00",
                                            "status": "",
                                            "type": "0"
                                        }
                                    }
                                }
                            ]
                        }
                    }
                ]
            }
        }
    ]
}

Enabling Image Signature Verification

Enabling Image Signature Verification
POST http://<mgmt0_IP>/api/mo/sys/boot.json
{
  "bootBoot": {
    "children": [
      {
        "bootImage": {
          "attributes": {
            "imageverification": "enable"
}}}]}}
{
    imdata:[]
}
<System>
  <boot-items>
    <image-items>
      <imageverification>enable</imageverification>
    </image-items>
  </boot-items>
</System>

Note: This example was added in Release 9.2(2).


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.

feature signature-verification

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

For detailed information about classes and attributes in the payload, see the NX-API DME Model Reference:
https://developer.cisco.com/media/dme/index.html

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

Disabling Image Signature Verification

Disabling Image Signature Verification
POST http://<mgmt0_IP>/api/mo/sys/boot.json
{
  "bootBoot": {
    "children": [
      {
        "bootImage": {
          "attributes": {
            "imageverification": "disable"
}}}]}}
{
    imdata:[]
}
<System>
  <boot-items>
    <image-items>
      <imageverification>disable</imageverification>
    </image-items>
  </boot-items>
</System>

Note: This example was added in Release 9.2(2).


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 feature signature-verification

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

For detailed information about classes and attributes in the payload, see the NX-API DME Model Reference:
https://developer.cisco.com/media/dme/index.html

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