Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding Avi ansible lookup module #58667

Open
wants to merge 5 commits into
base: devel
from

Conversation

Projects
None yet
5 participants
@sandeepavi
Copy link

commented Jul 3, 2019

SUMMARY

Adding new lookup plugin to allow lookups against Avi controller objects

ISSUE TYPE
  • New Module Pull Request
COMPONENT NAME

avi lookup plugin
lib/ansible/plugins/lookup/avi.py

ADDITIONAL INFORMATION
# Lookup query for all the objects of a specific type.
- debug: msg="{{ lookup('avi', avi_credentials=avi_credentials, obj_type='virtualservice') }}"
# Lookup query for an object with the given name and type.
- debug: msg="{{ lookup('avi', avi_credentials=avi_credentials, obj_name='vs1', obj_type='virtualservice', wantlist=True) }}"
# Lookup query for an object with the given UUID and type.
- debug: msg="{{ lookup('avi', obj_uuid='virtualservice-5c0e183a-690a-45d8-8d6f-88c30a52550d', obj_type='virtualservice') }}"
# We can replace lookup with query function to always the get the output as list.
# This is helpful for looping.
- debug: msg="{{ query('avi', obj_uuid='virtualservice-5c0e183a-690a-45d8-8d6f-88c30a52550d', obj_type='virtualservice') }}"

Adding Avi ansible lookup module
(cherry picked from commit 77b8951f68cbc889e6595b2a359ca27b84a43c0d)
@grastogi23
Copy link
Contributor

left a comment

+shipit

sandeepavi added some commits Jul 10, 2019

@bcoca bcoca added networking and removed needs_triage labels Jul 11, 2019

@pabelanger pabelanger self-assigned this Jul 17, 2019

@pabelanger

This comment has been minimized.

Copy link
Contributor

commented Jul 17, 2019

Adding myself to look deeper, there is some concern about if this is the style of a lookup plugin we would like to add.

@ansibot ansibot added core_review and removed needs_revision labels Jul 17, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.