Forum Discussion
gerald_wegener_
Nimbostratus
Feb 11, 2009Writing to an external class file
I've been able to write using the pyControl API to an internal address data group. However when I use the same syntax and substitute a datagroup that uses an external file I don't see any error...
Feb 11, 2009
The add_* methods are for internal data groups only, external classes are a different beast. There only API's for external classes are to manage the creation of them. These were really meant for larger lists that are managed off device and would be uploaded in-whole by another process.
If you are dead-set on an external data group, you'll have to use the ConfigSync.download_file() method to download the data group to your client workstation and the upload_file() method to upload the new changes.
Once you have modified the values of the external data group and would like to notify the iRules engine to re-read it, you can use the Class.set_external_class_file_mode() method to switch the file mode. Switch it to a different mode than it is and then back again to the original value. This will trigger the iRules engine to re-read the class file.
If you want granular control of entries, and your lists are not very long, you might want to look at using internal classes.
Hope this helps...
-Joe
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