Forum Discussion
iapps template for f5,BIG-IP licence validation automation script
Hi,
I want to develop an iapps application template for licence validation such that the application can scp/ftp the licence file from remote machine and validate the licence fiel when the image sping up first time.
is it possible to automate this scenario?? or any suggestion to write the script .
reagrds, Raghavendrachari
7 Replies
- Fred_Slater_856Historic F5 Account
It is possible, but an iapps template is not the right vehicle. Bash is probably your best bet.
- Raghavendrachar
Nimbostratus
what about icontrol's pycontrol module , is it ok for licence validation - Tim_Rupp
Altostratus
I've had some experience in this arena. Specifically I have an ansible module that uses iControl SOAP to license BIG-IP. I haven't had a chance yet to upstream the module, but I can post it to our github account in the meantime as unsupported code if you would like
- Raghavendrachar
Nimbostratus
when am trying to validate the licence am getting the following error
Attempting to get license online. License server requires you to submit EULA. Reg Key list is empty, attempting to retrieve existing keys from the unit Getting dossier using keys:[] No handlers could be found for logger "suds.client" Get Dossier error. Check log. Traceback (most recent call last): File "big_ip_licence.py", line 171, in get_dossier dossier_string = obj.Management.LicenseAdministration.get_system_dossier ( reg_keys ) File "/usr/local/lib/python2.7/dist-packages/suds/client.py", line 542, in call return client.invoke(args, kwargs) File "/usr/local/lib/python2.7/dist-packages/suds/client.py", line 602, in invoke result = self.send(soapenv) File "/usr/local/lib/python2.7/dist-packages/suds/client.py", line 649, in send result = self.failed(binding, e) File "/usr/local/lib/python2.7/dist-packages/suds/client.py", line 702, in failed r, p = binding.get_fault(reply) File "/usr/local/lib/python2.7/dist-packages/suds/bindings/binding.py", line 265, in get_fault raise WebFault(p, faultroot) WebFault: Server raised fault: 'Exception caught in Management::urn:iControl:Management/LicenseAdministration::get_system_dossier() Exception: Common::OperationFailed primary_error_code : 16908289 (0x01020001) secondary_error_code : 0 error_string : Invalid Registration Key: ' Can't find a locally stored WSDL file. Attempting to fetch wsdl online. Can't retrieve License from Server Traceback (most recent call last): File "big_ip_licence.py", line 115, in get_license_from_F5_License_Server country = country, File "/usr/local/lib/python2.7/dist-packages/suds/client.py", line 542, in call return client.invoke(args, kwargs) File "/usr/local/lib/python2.7/dist-packages/suds/client.py", line 602, in invoke result = self.send(soapenv) File "/usr/local/lib/python2.7/dist-packages/suds/client.py", line 643, in send result = self.succeeded(binding, reply.message) File "/usr/local/lib/python2.7/dist-packages/suds/client.py", line 678, in succeeded reply, result = binding.get_reply(self.method, reply) File "/usr/local/lib/python2.7/dist-packages/suds/bindings/binding.py", line 145, in get_reply replyroot = sax.parse(string=reply) File "/usr/local/lib/python2.7/dist-packages/suds/sax/parser.py", line 136, in parse sax.parse(source) File "/usr/lib/python2.7/xml/sax/expatreader.py", line 107, in parse xmlreader.IncrementalParser.parse(self, source) File "/usr/lib/python2.7/xml/sax/xmlreader.py", line 123, in parse self.feed(buffer) File "/usr/lib/python2.7/xml/sax/expatreader.py", line 214, in feed self._err_handler.fatalError(exc) File "/usr/lib/python2.7/xml/sax/handler.py", line 38, in fatalError raise exception SAXParseException: :25:25: not well-formed (invalid token) Sorry. Could not retrieve License. Check your connection License status = STATE_DISABLED
- Tim_Rupp
Altostratus
Not entirely sure what code you're looking at Raghavendrachari, but look at the bigip_license.py ansible module here https://github.com/F5Networks/f5-ansible The error being raised by SAX indicates that you're receiving invalid XML in the response you're getting. This is totally possible when talking to activate.f5.com, I noticed that I had to change the suds client location param to work around this. Perhaps you can point to the code you're using? - Raghavendrachar
Nimbostratus
pycontrol .. big_ip_license.py https://devcentral.f5.com/codeshare?sid=222 - Raghavendrachar
Nimbostratus
pycontrol .. big_ip_license.py https://devcentral.f5.com/codeshare?sid=222
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com