Example: Upgrade Process

Top  Previous  Next

To get started with Platform Administrative Web Services consider the example.

 

Example scenario: You want to upgrade a server which includes preparing the server for the upgrade, doing the actual upgrade and monitoring the upgrade process.

 

This task requires you to complete the following:

 

1.Activate the PAWS Web Service

2.Determine which files are available for the upgrade.

3.Prepare the server for the upgrade.

4.Start the upgrade.

5.Monitor the upgrade process.

 

Activate the PAWS Web Service

The PAWS web service needs to be activated and running before you can begin to use the PAWS APIs. The PAWS service can be activated through  CLI commands or through the Serviceability Administration page.  You find out more about how to activate PAWS in the Getting Started Section.

 

Determine which files are available for the upgrade

You first need to determine which file(s) of those available in the FTP or SFTP directory are valid for the upgrade. You use the upgradeFilter Service for this purpose. First your client application will need to get the list of possible upgrade file names from the FTP or SFTP directory and build the list of file names.  Then, the client application will send this list to the upgradeFilter Service, and the upgradeFilter Service will determine which of these upgrades are valid.

 

Within the Platform Administrative Web Services request message after the header, you enter this code to look for upgrade files of type "patch", that match the following file names.

 

<SOAP-ENV:Body>

      <upgradeFilter    xmlns="http://services.api.platform.vos.cisco.com">

        <args0>patch</args0>

        <args1>UCSInstall_UCOS_8.6.0.98000-9002.iso</args1>

    <args1>UCSInstall_UCOS_8.6.0.98000-9012.iso</args1>

        <args1>UCSInstall_UCOS_8.6.0.98000-9020.iso</args1>

      </upgradeFilter>

</SOAP-ENV:Body>

 

If the upgrade filter is successful, you will see a response like the following.  This response indicates that the file was found and is available for the upgrade.

 

<soapenv:Body>

       <ns:upgradeFilterResponse xmlns:ns="server_url">

           <ns:return xmlns:ax233="server_url/xsd"

               xmlns:ax234="server_url/xsd"

               xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

               xsi:type="ax233:UpgradeFilterResponse">

               <ax233:result>internal.request.complete</ax233:result>

               <ax233:upgradeFiles>UCSInstall_UCOS_8.6.0.96000-9007.iso</ax233:upgradeFiles>

           </ns:return>

       </ns:upgradeFilterResponse>

   </soapenv:Body>

 

Prepare the server for the upgrade.

Using the results of the previous call, UCSInstall_UCOS_8.6.0.98000-9012.iso, you next prepare the server for the upgrade using the PrepareUpgradeService, prepareRemoteUpgrade call.

 

Within this Platform Administrative Web Services request message after the header, you enter this code:

 

<soapenv:Body>

   <ser:prepareRemoteUpgrade>

     <!--Optional:-->

     <ser:args0>

       <!--Optional:-->

       <xsd:name> UCSInstall_UCOS_8.6.0.98000-9012.iso</xsd:name>

       <!--Optional:-->

       <xsd:password>password</xsd:password>

       <!--Optional:-->

       <xsd:path>/ks/sw/ccm/official-patches</xsd:path>

       <!--Optional:-->

       <xsd:server>servername</xsd:server>

       <!--Optional:-->

       <xsd:upgradeLocation>upgradefile.location.remote.sftp</xsd:upgradeLocation>

       <!--Optional:-->

       <xsd:upgradeType>patch</xsd:upgradeType>

       <!--Optional:-->

       <xsd:user>root</xsd:user>

     </ser:args0>

     <!--Optional:-->

     <ser:args1>pm123</ser:args1>

     <!--Optional:-->

     <ser:args2>false</ser:args2>

   </ser:prepareRemoteUpgrade>

 </soapenv:Body>

 

Start the upgrade.

You are now ready to start the upgrade.

 

Within this Platform Administrative Web Services request message after the header, you enter this code:

 

<SOAP-ENV:Body>

 <startUpgrade xmlns="http://services.api.platform.vos.cisco.com">

 <args0>pm238</args0>

 <args1>false</args1>

 <args2>false</args2>

  </startUpgrade>

</SOAP-ENV:Body>

 

Monitor the upgrade process.

To monitor the process of the upgrade, use the UpgradeStage Service, upgradeStage request call.

 

Within this Platform Administrative Web Services request message after the header, you enter this code:

 

<SOAP-ENV:Body>

     <getUpgradeStage    xmlns="http://services.api.platform.vos.cisco.com"/>

</SOAP-ENV:Body>