Open ephenix opened 7 years ago
Personally, I think it would be a great idea to incorporate other modules into this wrapper.
I'm thinking about something along those lines. What you're calling a wrapper, I would think of as a new parent PS module (something like F5-BIGIP) that loads in child modules (i.e. F5-LTM, F5-DNS, F5-SYS (for working with certs and other things)). I also have an idea for a new PS module for working with iHealth and qkviews, which may or may not be able to be incorporated as another child module.
We'd probably end up duplicating the session functions (primarily Get-F5Session and New-F5Session) in the parent module. How does all of that sound?
It sounds good. I can't wait to see how it goes.
In case it helps at all, I have a few rough GTM functions in my local cache. Here's a gist of them: https://gist.github.com/elijahgagne/798fd09e89df9859332ec68a4c2b08fe
I would be interested in incorporating them (or their functionality) into whatever comes out of this.
Thanks, Elijah. I think that would be very helpful. My only comment is, to help follow one of the conventions we've been using, I'd be in favor of merging the single and plural functions, and returning all results if no specific item is specified. I.e. Get-WideIP, if not passed an IP, returns, all. Likewise with Get-GTMPool. I'd also like to follow the convention of each function being its own file in the public folder, and importing the functions at load time into the module.
thanks Elijah, that's all helpful! I'm going to have to second Joel's comment.
We are attempting to follow PowerShell standards and build the module out with public and private functions, session-based token authentication, and follow Microsoft's guidelines for function names: https://msdn.microsoft.com/en-us/library/dd878270(v=vs.85).aspx
What I'm looking at so far in my local branch is to rename all functions according to their REST resource. Get-F5Pool would become ambiguous, so to get /mgmt/tm/gtm/pool/a you'd call Get-F5GtmPool, and to get the /mtmt/tm/ltm/pool/a resources,, you'd call Get-F5LtmPool, for example. I think to handle a, aaaa, cname, and mx, we add a parameter that defaults to 'a' for record type.
New-F5
Certainly. These are just rough functions I quickly wrote one day to solve an immediate need. When we have a module to add this functionality to, I see a lot of areas to improve them.
One thing to keep in mind while we're working on this, though, is to, if at all possible, not introduce any breaking changes. Some of the functions that are not specific to the LTM (New-F5Session, Invoke-RestMethodOverride, Sync-DeviceToGroup, etc) could be moved into a new parent module without renames. For things like Get-F5Pool and others that would become ambiguous, I'd prefer to leave the old, ambiguous names as aliases for the new module-specific names, at least for an agreed-upon period of time, before deprecating them completely.
I have a working structure for this, but I'm not sure where the appropriate place is for it. It might be best to put it in a new repo, since it's not simply a fork of the existing F5-LTM module. At least temporarily, I'm going to create a POSH-F5-BIGIP repo and push what I have there, just so as not to muddy these waters too much. I haven't added any BIG-IP DNS functions (I'd like to go with DNS instead of GTM since F5 renamed this as of v12) but the module files are there, as are folders for Public and Private functions. Comment, concerns, questions - all welcome.
https://github.com/ephenix/F5-DNS
Module is not complete yet, but it's started here. Once it gets more usable we can work on merging.
Looks like a great start! I'll take a shot at testing it out on some of my lab setups.
Has there been any work done on incorporating some GTM (now BigIP DNS) commands into this module?
If not, we're going to be building this functionality internally; would you be open to merging these features back in when our work is complete?
And if so, what would be your preference on naming these functions, as they're technically no longer LTM functions, but for the LTM. This wrapper could technically connect to anything using the BigIP REST API.
Thanks,