Forum Discussion
Steve_Brown_882
Jul 13, 2009Historic F5 Account
more pyControl questions
I am on to a new script and I just can't seem to get the code to work. I am trying to use
Management_KeyCertificate.certificate_request_import_from_file(
mode = 0, I think this is correct.
key_ids = "Name", I think this is what you want the key to be named when it
file_names = , Should this be an OS path or do I need to open the file first as an object?
overwrite = 0 I tried 0 'false'
)
The problem is I can't for the life of me figure out the syntaxt of the commands. I have tried quite a few things, but no luck. Does anyone have an example of this in python?
- Steve_Brown_882Historic F5 AccountOk I think I am close, but still can't get this to work.
- L4L7_53191
Nimbostratus
Here's an example of some code that works syntax wise:In [20]: b.Management_KeyCertificate.key_import_from_file(mode = 'MANAGEMENT_MODE_DEFAULT', key_ids = ['testKey.key'], file_names = ['/config/ssl/ssl.key/testKey.key'], overwrite = 1)
- Steve_Brown_882Historic F5 AccountAh ok. Well that makes sence then that it wouldn't work the way I was trying it. I liked this way better because it had built in overwrite control, but at least I know I wasn't going crazy! Thanks for the responce.
- Steve_Brown_882Historic F5 AccountOk Matt I think I can probably get this with one last question.
- Steve_Brown_882Historic F5 AccountThanks so much for all of you help and the general info on how to figure it out should be helpful.
Recent Discussions
Related Content
DevCentral Quicklinks
* 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
Discover DevCentral Connects