??????????????
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 d l m Z d d l m Z d d l
m Z d d l m
Z
m Z d d l m Z m Z y d d l m Z e Z Wn e k
r± e Z n Xd Z d e f d
YZ d S( i ( t absolute_importt divisiont print_function( t abstractmethod( t wraps( t
AnsiblePlugin( t AnsibleErrort AnsibleConnectionFailure( t to_bytest to_text( t SCPClientc ` s t f d } | S( Nc ` sO | j j } t | d d j j d s? t d n | | | S( Nt errorst surrogate_or_strictt #s' operation requires privilege escalation( t _connectiont
get_promptR t stript endswithR ( t selft argst kwargst prompt( t func( sD /usr/lib/python2.7/site-packages/ansible/plugins/cliconf/__init__.pyt wrapped% s !( R ( R R ( ( R sD /usr/lib/python2.7/site-packages/ansible/plugins/cliconf/__init__.pyt enable_mode$ s t CliconfBasec B` s e Z d Z d d d d d d g Z d Z d Z d" d" d" e e e e d Z d
Z
d Z d Z d
Z
d Z e d d" d" d Z e d" e d" e d" d Z e d" d" d" e e d" e d Z e d Z e d Z d" d Z d Z e d Z d" d" d d d Z d" d" d d d Z d" d" d" d" d" d" d Z d" e d Z d" e d" d" d Z d Z d" d d! Z RS(# s#
A base class for implementing cli connections
.. note:: String inputs to :meth:`send_command` will be cast to byte strings
within this method and as such are not required to be made byte strings
beforehand. Please avoid using literal byte strings (``b'string'``) in
:class:`CliConfBase` plugins as this can lead to unexpected errors when
running on Python 3
List of supported rpc's:
:get_config: Retrieves the specified configuration from the device
:edit_config: Loads the specified commands into the remote device
:get: Execute specified command on remote device
:get_capabilities: Retrieves device information and supported rpc methods
:commit: Load configuration from candidate to running
:discard_changes: Discard changes to candidate datastore
Note: List of supported rpc's for remote device can be extracted from
output of get_capabilities()
:returns: Returns output received from remote device as byte string
Usage:
from ansible.module_utils.connection import Connection
conn = Connection()
conn.get('show lldp neighbors detail'')
conn.get_config('running')
conn.edit_config(['hostname test', 'netconf ssh'])
t
get_configt edit_configt get_capabilitiest gett enable_response_loggingt disable_response_loggingc C` s5 t t | j | | _ t | _ t | _ d S( N( t superR t __init__R t listt historyt Falset response_logging( R t
connection( ( sD /usr/lib/python2.7/site-packages/ansible/plugins/cliconf/__init__.pyR! P s c C` s. | j j d d | j j j | j d S( s0 Alarm handler raised in case of command timeout t logs2 closing shell due to command timeout (%s seconds).N( R t
queue_messaget
_play_contextt timeoutt close( R t signumt frame( ( sD /usr/lib/python2.7/site-packages/ansible/plugins/cliconf/__init__.pyt _alarm_handlerV s c C` s# i t | d 6| d 6| d 6| d 6| d 6} | d k r t | t rp g | D] } t | ^ qQ | d