Skip to content
This repository has been archived by the owner on Oct 30, 2018. It is now read-only.

Module to manage F5 GTM virtual servers #555

Closed
wants to merge 7 commits into from

Conversation

perzizzle
Copy link

Supports enabling/disabling F5 GTM virtual servers. Stubbed out where to add/remove virtual servers.

@perzizzle perzizzle changed the title Module to manage f5 virtual servers Module to manage F5 GTM virtual servers May 29, 2015
@gregdek
Copy link
Contributor

gregdek commented Jun 19, 2015

@perzizzle ready for review?

@perzizzle
Copy link
Author

I think its ready for review. There is plenty of opportunity to add more features but this is all I needed so far. I intend on adding more eventually.

@gregdek
Copy link
Contributor

gregdek commented Jun 22, 2015

@mhite @srvg as the owners of the other F5 modules, can you guys review this new module?

@mhite
Copy link
Contributor

mhite commented Jun 25, 2015

Since I don't run GTM, I'm a bad person to test this. Can you solicit some GTM users on the mailing list to test this?

else:
bigsuds_found = True

def bigip_api(bigip, user, password):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps replace bigip with server for consistency

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think I just copied this out of the LTM modules but seems like a reasonable change to improve readability.

module.fail_json(msg="virtual server does not exist")

if state == 'absent':
if virtual_server_name and virtual_server_server:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This condition seems unneccessary as both vars are required?
Also, if this condition wasn't met (which can't happen), the module would exit without result being set.

@srgvg
Copy link
Contributor

srgvg commented Jul 3, 2015

So, same for me, I don't have GTM gear to test this.
I did review the code to the best of my knowlegde but without begin able to test run it...

Most things seem OK, some minor remarks on the specific functions, but unless I read main() badly (it's late here) it seems to have some logic flaws.

@perzizzle
Copy link
Author

Thanks for the review, I'll make some updates based on the comments. You can tell I started out with just providing the ability to enable/disable virtual servers and then shoehorned in the ability to add/remove virtual servers.

@perzizzle
Copy link
Author

Playbook to validate functionality https://gist.github.com/perzizzle/5ffa93735881ce7cbf9b depends on an extra_vars.yml similar to https://gist.github.com/perzizzle/190195da598a0311ce6b run with ansible-playbook main_virtual_server.yml --extra-vars=@extra_vars.yml -vv

@gregdek
Copy link
Contributor

gregdek commented Aug 31, 2015

@caphrim007 Please review this PR to make sure it adheres to the following guidelines:

http://docs.ansible.com/developing_modules.html#module-checklist

If it passes these guidelines, and if you believe it’s a good PR otherwise, please add a comment with "shipit" in the text, and we will flag it for inclusion.

If it fails these guidelines, please add a comment with "needs_revision" in the text, along with the needed changes, and we will flag it for revision.


# import module snippets
from ansible.module_utils.basic import *
main()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My only nit here is that I'd wrap this main in a conditional

@caphrim007
Copy link
Contributor

I've verified that this module works on 11.6.0 provided you create a data center and a server to associate to the VS. Add the conditional to the bottom and lgtm

@robynbergeron
Copy link
Contributor

Hi @perzizzle -- sorry this one is taking so long -- looks like it fell through the cracks. :\

Looks like @caphrim007 had a request for you to add something -- can you address that, and then it looks like we can probably merge this? Thanks!

@caphrim007
Copy link
Contributor

@robynbergeron arg, my bad. I forgot to tag the needs_revision. Still new to this workflow. sorry about that!

@gregdek
Copy link
Contributor

gregdek commented Nov 3, 2015

@caphrim007 no worries; so are we. :)

@perzizzle
Copy link
Author

@gregdek @caphrim007 I updated this PR with the parameter changes suggested by @resmo. And then ran through creating, deleting, enabling and disabling virtual servers with the new defaults.

@resmo
Copy link
Contributor

resmo commented May 9, 2016

there is a catchall exception handling, but not a reason to block this module for integration. Based on my code review, I give it a +1.

shipit

@gregdek
Copy link
Contributor

gregdek commented May 9, 2016

I count multiple shipits. :)

@resmo
Copy link
Contributor

resmo commented May 9, 2016

@perzizzle as I see you do not return anything, you can just add an empty return:

RETURN = '''# '''

@alikins
Copy link
Contributor

alikins commented May 16, 2016

@alikins alikins added needs_info and removed shipit labels May 16, 2016
@perzizzle
Copy link
Author

@alikins that module manages F5 LTMs, this one manages GTM.

@alikins
Copy link
Contributor

alikins commented May 16, 2016

Pushed to devel at 677a2dd with some minor pep8 cleanups and the RESULTS change resmo suggested.

@alikins alikins closed this May 16, 2016
@jimi-c jimi-c removed the needs_info label May 16, 2016
@caphrim007
Copy link
Contributor

@alikins the thing that you pushed to devel went in to the f5/ directory. Not the network/f5 directory as per the other f5 modules. Can you take a look?

@mhite
Copy link
Contributor

mhite commented May 18, 2016

Yeah, that's weird. Wrong directory!

@alikins
Copy link
Contributor

alikins commented May 25, 2016

Huh, weird. I think I must have done a git-format-patch/git-am when rebasing/testing and dropped a '-P' level somewhere.

Fixing...

@alikins
Copy link
Contributor

alikins commented May 25, 2016

Dir fixup pr at #2302

resmo pushed a commit that referenced this pull request May 27, 2016
f5/ was the wrong directory. Move it to network/f5
and remove f5/.
cinek810 pushed a commit to cinek810/ansible-modules-extras that referenced this pull request Jun 12, 2016
)

f5/ was the wrong directory. Move it to network/f5
and remove f5/.
Constantin07 pushed a commit to Constantin07/ansible-modules-extras that referenced this pull request Jun 28, 2016
)

f5/ was the wrong directory. Move it to network/f5
and remove f5/.
haad pushed a commit to haad/ansible-modules-extras that referenced this pull request Jun 29, 2016
)

f5/ was the wrong directory. Move it to network/f5
and remove f5/.
dfjaimes pushed a commit to dfjaimes/ansible-modules-extras that referenced this pull request Jul 2, 2016
)

f5/ was the wrong directory. Move it to network/f5
and remove f5/.
perzizzle pushed a commit to perzizzle/ansible-modules-extras that referenced this pull request Jul 12, 2016
)

f5/ was the wrong directory. Move it to network/f5
and remove f5/.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

9 participants