Forum Discussion
15 Replies
- Brent_West_7733Historic F5 Account
Tony,
The appropriate interfaces are
I think that it wouldn't be too difficult to do what your asking. Are you writing the scripts yourself?
- ANL_158394Nimbostratus
Yes, I have also been looking at the libraries in .NET if that would make it any easier... What do you suggest?
- Brent_West_7733Historic F5 Account
The Zonerunner (BIND) code is the more difficult of the two in my opinion. The datagroup manipulation is pretty straight forward.
The only scripts I could find for manipulating BIND on GTM and datagroup manipulation were in pyControl, but this may get you started at least as a pseudocode.
I'll be honest, my development expertise in iControl is in PHP, Perl, and Python.
- ANL_158394Nimbostratus
Thanks, I will review these and see if I can make this work.
- ANL_158394Nimbostratus
FYI, I am proceeding with .NET development for this as I do not see a way to do this with PowerShell. Although I am now running into issues with the add_cname method as referenced by this question: https://devcentral.f5.com/questions/net-add_cname-method
Thanks for the help! Tony
- ANL_158394Nimbostratus
FYI, I am proceeding with .NET development for this as I do not see a way to do this with PowerShell. Although I am now running into issues with the add_cname method as referenced by this question: https://devcentral.f5.com/questions/net-add_cname-method
Thanks for the help! Tony
- Brent_West_7733Historic F5 Account
What error are you given?
- ANL_158394Nimbostratus
Error1The best overloaded method match for 'iControl.ManagementResourceRecord.add_cname(iControl.ManagementViewZone[], iControl.ManagementCNAMERecord[][])' has some invalid arguments
I get that the ViewZone would be an array, but it looks like it wants a a multi-dimensional array for the records? Reviewing this:
https://devcentral.f5.com/wiki/iControl.Create-CNAME-Resource-Record-in-Zone-Runner.ashx
It appears there should be some kind of sequence method, but only shows to be an alias in .NET. I'm confused...
- Brent_West_7733Historic F5 Account
I find that the correct format of the arrays is the most difficult aspect of any iControl interface. I'll take a look at this a bit later today and see if I can find the correct format.
If I was to guess, it looks like the view array expects the view name and the zone name, and I'm unsure about how those are keyed.
You might try various 'get_' methods to see how the arrays are constructed.
- ANL_158394Nimbostratus
I'll keep looking at it. I've been experimenting for a couple days now and can't seem to get it right. I've tried loading it into a List, I've paused the execution to view the data structures and it's all really confusing... Actually, here's the code I posted in the other forum (thought it was already here...):
Interfaces interfaces = new Interfaces();
string[] view = { "external" };
ManagementViewZone[] viewZones = interfaces.ManagementZone.get_zone_name(view);
ManagementZoneInfo[] zoneInfo = interfaces.ManagementZone.get_zone(viewZones);
ManagementCNAMERecord record = new ManagementCNAMERecord();
record.cname = "test";
record.domain_name = "st.int";
record.ttl = 3600;
interfaces.ManagementResourceRecord.add_cname(viewZones, record);
Thanks! Tony