�
�Udac @` s] d d l m Z m Z m Z e Z d d l m Z d d d d d � Z d � Z
d � Z d S( i ( t absolute_importt divisiont print_function( t run_commandsc C` sW d } | r) | r) | d | | f 7} n | r@ | d | 7} n | rS | d 7} n | S( s�
Method to generate the cli portion to launch the Netvisor cli.
:param module: The Ansible module to fetch username and password.
:return: The cli string for further processing.
t s --user "%s":"%s" s switch s switch-local ( ( t modulet switcht usernamet passwordt switch_localt cli( ( sQ /usr/lib/python2.7/site-packages/ansible/module_utils/network/netvisor/pn_nvos.pyt pn_cli s
c C` s0 | t k r d | S| t k r( d | Sd Sd S( Ns %s R ( t Truet False( t argt
trueStringt falseString( ( sQ /usr/lib/python2.7/site-packages/ansible/module_utils/network/netvisor/pn_nvos.pyt booleanArgs s
c C` s� | j d } | | } t | | � \ } } } t d | d d | d t � } | d k r} | j d | d d | d t � n | j | � d S( sE
This method executes the cli command on the target node(s) and returns the
output. The module then exits based on the output.
:param cli: the complete cli string to be executed on the target node(s).
:param state_map: Provides state of the command.
:param module: The Ansible module to fetch command
t statet commandt msgs %s operation completedt changedi s %s operation failedN( t paramsR t dictR t exit_jsonR
( R R
t state_mapR R t resultt outt errt results( ( sQ /usr/lib/python2.7/site-packages/ansible/module_utils/network/netvisor/pn_nvos.pyt run_cli( s
N( t
__future__R R R t typet
__metaclass__t. ansible.module_utils.network.netvisor.netvisorR t NoneR R R ( ( ( sQ /usr/lib/python2.7/site-packages/ansible/module_utils/network/netvisor/pn_nvos.pyt <module> s
Anons79 File Manager Version 1.0, Coded By Anons79
Email: [email protected]