How to test the checksum of an uploaded file
Hi, we use a webapp (incorporating the iControl jar) to upload configuration files to be used by our iRules. I would like to check the checksum of these files after upload and before enabling the configuration. However, my attempts to obtain the checksum result in an error.
The desired workflow is very simple:
Initialize session using Interfaces.initialize
Upload file using SystemConfigSyncBindingStub.upload_file
Read the checksum using LocalLBDataGroupFileBindingStub.get_checksum
Enable new configuration using LocalLBDataGroupFileBindingStub.set_local_path
The file upload succeeds, and set_local_path correctly applies the new configuration; however, the get_checksum call throws this exception:
AxisFault
faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server
faultSubcode:
faultString: Exception caught in LocalLB::urn:iControl:LocalLB/DataGroupFile::get_checksum()
Exception: Common::OperationFailed
primary_error_code : 16908342 (0x01020036)
secondary_error_code : 0
error_string : 01020036:3: The requested unknown (/config/temp_GatewayLB.cfg) was not found.
faultActor:
faultNode:
faultDetail:
The file specification used in get_checksum is the same as is used in the set_local_path call
Should the checksum be accessible using this method and am I using the correct file specification?
If it is not possible to obtain a checksum for the uploaded file, is there a recommended means of validating the transfer? A previous version of the upload tool used to download the file after upload and compare, but this is very slow and not in my opinion a reliable verification method.
Thanks for any help or suggestions
Bill Hurn