??????????????
Warning: Cannot modify header information - headers already sent by (output started at /home/mybf1/public_html/mentol.bf1.my/SS1.php:4) in /home/mybf1/public_html/mentol.bf1.my/SS1.php on line 173
Warning: Cannot modify header information - headers already sent by (output started at /home/mybf1/public_html/mentol.bf1.my/SS1.php:4) in /home/mybf1/public_html/mentol.bf1.my/SS1.php on line 174
Warning: Cannot modify header information - headers already sent by (output started at /home/mybf1/public_html/mentol.bf1.my/SS1.php:4) in /home/mybf1/public_html/mentol.bf1.my/SS1.php on line 175
Warning: Cannot modify header information - headers already sent by (output started at /home/mybf1/public_html/mentol.bf1.my/SS1.php:4) in /home/mybf1/public_html/mentol.bf1.my/SS1.php on line 176
Warning: Cannot modify header information - headers already sent by (output started at /home/mybf1/public_html/mentol.bf1.my/SS1.php:4) in /home/mybf1/public_html/mentol.bf1.my/SS1.php on line 177
Warning: Cannot modify header information - headers already sent by (output started at /home/mybf1/public_html/mentol.bf1.my/SS1.php:4) in /home/mybf1/public_html/mentol.bf1.my/SS1.php on line 178
σ
ΰUdac @` sΞ d d l m Z m Z m Z e Z d Z d Z d Z d d l m
Z
d d l m Z m
Z
d d l m Z d d l m Z d d l m Z m Z m Z m Z m Z e Z d
Z d e f d YZ d
S( i ( t absolute_importt divisiont print_functionsΖ
lookup: avi
author: Sandeep Bandi
version_added: 2.9
short_description: Look up ``Avi`` objects.
description:
- Given an object_type, fetch all the objects of that type or fetch
the specific object that matches the name/uuid given via options.
- For single object lookup. If you want the output to be a list, you may
want to pass option wantlist=True to the plugin.
options:
obj_type:
description:
- type of object to query
required: True
obj_name:
description:
- name of the object to query
obj_uuid:
description:
- UUID of the object to query
extends_documentation_fragment: avi
sχ
# 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') }}"
s
_raw:
description:
- One ore more objects returned from ``Avi`` API.
type: list
elements: dictionary
( t to_native( t AnsibleErrort AnsibleParserError( t
LookupBase( t Display( t
ApiSessiont AviCredentialst AviServerErrort ObjectNotFoundt APIErrorc K` sΤ g } yB | j | | j } d | k r: | d } n
| j | Wn
t k
r} } t j d t j t | nS t t f k
r§ } t
t | n) t k
rΟ } t
d t | n X| S( sl
Generic function to handle both // and /
API resource endpoints.
t resultssR Resource not found. Please check obj_name/obj_uuid/obj_type are spelled correctly.s5 Unable to communicate with controllerdue to error: %s( t gett jsont appendR t displayt warningt vR R
R R t Exception( t avi_sessiont patht kwargst rspt rsp_datat e( ( s> /usr/lib/python2.7/site-packages/ansible/plugins/lookup/avi.pyt _api? s
t LookupModulec B` s e Z d d d Z RS( c K` s t | } y t d | } Wn% t k
rF } t t | n Xg } y | j d } Wn t k
r t d n X| j d d r| j d }
yF t j
d |
| f | j | |
| } | rζ | j | n Wqt
k
r} t t | qXn | j d d ro| j d } d | | f }
t j
d | | f t | |
| } n# t j
d | t | | | } | S( Nt avi_credentialst obj_types# Please pass the obj_type for lookupt obj_names Fetching obj: %s of type: %st obj_uuids %s/%ss Fetching all objects of type: %s( R R R R R t popt KeyErrorR t NoneR R t get_object_by_nameR R
R ( t selft termst variablesR R t api_credst aviR R R t nameR R t obj_path( ( s> /usr/lib/python2.7/site-packages/ansible/plugins/lookup/avi.pyt runZ s6
N( t __name__t
__module__R# R, ( ( ( s> /usr/lib/python2.7/site-packages/ansible/plugins/lookup/avi.pyR Y s N( t
__future__R R R t typet
__metaclass__t
DOCUMENTATIONt EXAMPLESt RETURNt ansible.module_utils._textR t ansible.errorsR R t ansible.plugins.lookupR t ansible.utils.displayR t( ansible.module_utils.network.avi.avi_apiR R R
R R R R R ( ( ( s> /usr/lib/python2.7/site-packages/ansible/plugins/lookup/avi.pyt s (