gerald_wegener_
Feb 11, 2009Nimbostratus
Writing 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 messages in pyControl but the entry does not get written to the external file. I tried doing a 'b load' thinking that bipip needs to reload the external class file but that still didn't work. As far as I can tell the syntax I'm using is correct.
So my question is -- is it possible to write via the API to an external class file?
Here is the syntax I'm using from pyControl:
First I do the write ip address 172.21.6.1 to data the group 'blacklisttest' which points to an external file in /var/class/ named 'blacklist'
b.LocalLB_Class.add_address_class_member(class_members = [{'members': [{'address': '172.21.6.1', 'netmask': '25
5.255.255.255'}], 'name': 'blacklisttest'}])
Out[25]: {}
When I check for the enty of 172.21.6.1 it's not there:
b.LocalLB_Class.get_address_class(class_names = ['blacklisttest'])
Out[26]:
{'return': [{'members': [{'address': '10.1.1.1',
'netmask': '255.255.255.255'},
{'address': '10.2.2.2',
'netmask': '255.255.255.255'}],
'name': 'blacklisttest'}]}
In [27]:
Thank you for any help.