rPath Appliance Platform Agent:XML-RPC for Segmented Updates
From rPath Wiki
Use XML-RPC methods provided by rPath Appliance Platform Agent (rAPA) to develop a an XML-RPC client that uses the functions of the rAPA plugins.
Starting with version 2.1.3, rPath Appliance Platform Agent provides a segmented update system through XML-RPC. Segmented updates may reduce testing costs through ensuring a standard upgrade path from one version to the next. For example, updating a product from version 1.0 to 3.0 with segmented updates allows the version update path to start with upgrading version 1.0 to version 2.0, followed by a restart. Then, the version 2.0 to version 3.0 update may continue, also followed by a restart.
| The segmented updates function is available ONLY in rPath Appliance Platform Agent version 2.1.3 and above. |
Segmented Updates can be performed utilizing the following python script. Substitute your appliance IP Address for 192.168.X.X, and replace group-foo=1.0.3 and group-foo=1.0.6 to indicate the group update path for your appliance:
#!/usr/bin/python import xmlrpclib import time url = 'https://admin:password@192.168.X.X:8003/xmlrpc-request' server = xmlrpclib.ServerProxy(url) updateProxy = server.updatetroves.UpdateTroves schedId = updateProxy.callSegmentedCheck([['group-foo=1.0.3'], ['group-foo=1.0.6']]) time.sleep(5) running = updateProxy.callGetRunStatus() while running['schedId'] != -1: running = updateProxy.callGetRunStatus() time.sleep(.1) updates = updateProxy.callGetAvailableUpdates() updateId = updates[0]['updateId'] updateProxy.callDownload(updateId) time.sleep(5) running = updateProxy.callGetRunStatus() while running['schedId'] != -1: running = updateProxy.callGetRunStatus() time.sleep(.1) updates = updateProxy.callGetAvailableUpdates() updateId = updates[0]['updateId'] updateProxy.callUpdate(updateId) time.sleep(3) running = updateProxy.callGetRunStatus() while running['schedId'] != -1: running = updateProxy.callGetRunStatus() time.sleep(.1)
