??????????????
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âddlmZmZmZeZdZddlZddlZddl Z ddl m Z ddl m Z ddlmZddlmZddlmZmZdd lmZdd lmZmZd efd „ƒYZdS( i(tabsolute_importtdivisiontprint_functions --- author: Ansible Networking Team cliconf: ios short_description: Use ios cliconf to run command on Cisco IOS platform description: - This ios plugin provides low level abstraction apis for sending and receiving CLI commands from Cisco IOS network devices. version_added: "2.4" N(tAnsibleConnectionFailure(tto_text(tMapping(t iteritems(t NetworkConfigtdumps(tto_list(t CliconfBaset enable_modetCliconfcB`sòeZedddd„ƒZddddddd„Zededdd„ƒZdeddd„Zddde dee d„Z d„Z d„Z d „Z d „Zdd ed „Zded „Zd„Zd„Zd„Zd„ZRS(trunningcC`s”|dkrtd|ƒ‚n|r8td|ƒ‚n|sGg}n|dkr\d}nd}|djt|ƒƒ7}|jƒ}|j|ƒS( NR tstartups/fetching configuration from %s is not supporteds1'format' value %s is not supported for get_configsshow running-config sshow startup-config t (srunningR(t ValueErrortjoinR tstript send_command(tselftsourcetflagstformattcmd((s?/usr/lib/python2.7/site-packages/ansible/plugins/cliconf/ios.pyt get_config0s     tlinec C`s i}|jƒ}|jƒ} |dkrC|drCtdƒ‚n|| dkrytd|dj| dƒfƒ‚n|| dkr¯td|dj| dƒfƒ‚ntdd ƒ} |j|ƒ\} } | j| ƒ|rF|d krF|j|ƒ\} }tdd d | d |ƒ}| j|d |d|d|ƒ}n| j }i}|rjt |dƒnd|d<|j | |ƒ}|r’|ni|d<|S(sS Generate diff between candidate and running configuration. If the remote host supports onbox diff capabilities ie. supports_onbox_diff in that case candidate and running configurations are not required to be passed as argument. In case if onbox diff capability is not supported candidate argument is mandatory and running argument is optional. :param candidate: The configuration which is expected to be present on remote host. :param running: The base configuration which is used to generate diff. :param diff_match: Instructs how to match the candidate configuration with current device configuration Valid values are 'line', 'strict', 'exact', 'none'. 'line' - commands are matched line by line 'strict' - command lines are matched with respect to position 'exact' - command lines must be an equal match 'none' - will not compare the candidate configuration with the running configuration :param diff_ignore_lines: Use this argument to specify one or more lines that should be ignored during the diff. This is used for lines in the configuration that are automatically updated by the system. This argument takes a list of regular expressions or exact line matches. :param path: The ordered set of parents that uniquely identify the section or hierarchy the commands should be checked against. If the parents argument is omitted, the commands are checked against the set of top level or global commands. :param diff_replace: Instructs on the way to perform the configuration on the device. If the replace argument is set to I(line) then the modified lines are pushed to the device in configuration mode. If the replace argument is set to I(block) then the entire command block is pushed to the device in configuration mode if any line is not correct. :return: Configuration diff in json format. { 'config_diff': '', 'banner_diff': {} } tsupports_generate_diffs4candidate configuration is required to generate difft diff_matchs0'match' value %s in invalid, valid values are %ss, t diff_replaces2'replace' value %s in invalid, valid values are %stindentitnonetcontentst ignore_linestpathtmatchtreplacetcommandstt config_difft banner_diffN( tget_device_operationstget_option_valuestNoneRRRt_extract_bannerstloadt differencetitemsRt _diff_banners(Rt candidateR Rtdiff_ignore_linesR"Rtdifftdevice_operationst option_valuest candidate_objtwant_srct want_bannersthave_srct have_bannerst running_objtconfigdiffobjstbanners((s?/usr/lib/python2.7/site-packages/ansible/plugins/cliconf/ios.pytget_diffDs,#  && $ c C`si}|jƒ}|j|||||ƒg}g}|rÜ|jdƒxt|ƒD]q} t| tƒs|i| d6} n| d} | dkrW| ddkrW|j|j| ƒ|j| ƒqWqWW|jdƒn tdƒ‚||d<||d<|S( Nsconfigure terminaltcommandtendit!scheck mode is not supportedtrequesttresponse(R)tcheck_edit_config_capabilityRR t isinstanceRtappendR( RR1tcommitR$tcommenttrespt operationstresultstrequestsRR((s?/usr/lib/python2.7/site-packages/ansible/plugins/cliconf/ios.pyt edit_configˆs&      c C`sVi}|jƒ}|j|||||ƒg}g}|r>d} |jdƒtjdƒ| |jdƒd7} |jdƒ} x |D]} | d| d7} qŠW| | d7} i| d6td 6} |j|j| ƒ|j| ƒtjdƒ|jd d tƒtjdƒ|j|jdƒƒ|jdƒn||d <||d <|S( s· ios_config: lines: "{{ macro_lines }}" parents: "macro name {{ macro_name }}" after: '@' match: line replace: block R&sconfig terminalgš™™™™™¹?is iÿÿÿÿRR?tsendonlyR@RBRC(R)RDRttimetsleeptpoptTrueRF( RR1RGR$RHRIRJRKRLR%tmultiline_delimiterRtobj((s?/usr/lib/python2.7/site-packages/ansible/plugins/cliconf/ios.pyt edit_macro£s2          c C`s\|stdƒ‚n|r.td|ƒ‚n|jd|d|d|d|d|d|ƒS( Ns(must provide value of command to executes*'output' value %s is not supported for getR?tprompttanswerRNtnewlinet check_all(RR(RR?RVRWRNtoutputRXRY((s?/usr/lib/python2.7/site-packages/ansible/plugins/cliconf/ios.pytgetÊs cC`s<i}d|d<|jddƒ}t|ddƒjƒ}tjd|ƒ}|rq|jdƒjd ƒ|d t run_commandstget_defaults_flagR4(tsuperR tget_capabilitiesR)tupdateR*tjsonR(Rtresult((s?/usr/lib/python2.7/site-packages/ansible/plugins/cliconf/ios.pyR…s t@c C`si}tj|ƒ}g}g}|rüxÒt|ƒD]Á\}} |d|7}|jddtƒxN|| |gD]=} i| d6td6} |j|j| ƒ|j| ƒqqW|jddtƒtjdƒ|j|jdƒƒ|jdƒq4Wn||d<||d <|S( sb Edit banner on remote device :param banners: Banners to be loaded in json format :param multiline_delimiter: Line delimiter for banner :param commit: Boolean value that indicates if the device candidate configuration should be pushed in the running configuration or discarded. :param diff: Boolean flag to indicate if configuration that is applied on remote host should generated and returned in response or not :return: Returns response of executing the configuration command received from remote host s %ssconfig terminalRNR?R@gš™™™™™¹?s RBRC(R‡tloadsRRRRRFRORP( RR1RSRGRIt banners_objRKRLtkeytvalueRRT((s?/usr/lib/python2.7/site-packages/ansible/plugins/cliconf/ios.pyR s&    cC`sã|dkrtdƒ‚ntƒ}x¸t|ƒD]ª}t|tƒsVi|d6}n|jddƒ}|rtd|ƒ‚ny|j|}Wn7tk rÍ}|r²‚nt |dt |ƒƒ}nX|j |ƒq1W|S(Ns'commands' value is requiredR?RZs3'output' value %s is not supported for run_commandsterr( R+RtlistR RERRQRRtgetattrRRF(RR%tcheck_rct responsesRRZtoutte((s?/usr/lib/python2.7/site-packages/ansible/plugins/cliconf/ios.pyR‚0s"  cC`s…|jdƒ}t|ddƒ}tƒ}x@|jƒD]2}|jƒr7|j|jƒjƒdƒq7q7Wd|kr}dSdSdS(s¢ The method identifies the filter that should be used to fetch running-configuration with defaults. :return: valid default filter sshow running-config ?R^tsurrogate_then_replaceitalltfullN(R[Rtsett splitlinesRtaddRi(RR“R%R((s?/usr/lib/python2.7/site-packages/ansible/plugins/cliconf/ios.pyRƒHs  $ cC`s”|jjr|jjƒ}|d krCtdd|jjƒ‚ntjdt|ddƒj ƒƒr|jj ddƒ|jj dƒqnd S( sT Make sure we are in the operational cli mode :return: None tmessageuGcli prompt is not identified from the last received response window: %ss config.*\)#R^R•tvvvvs$wrong context, sending end to deviceR@N( t _connectiont connectedt get_promptR+Rt_last_recv_windowReRfRRt queue_messageR(RR“((s?/usr/lib/python2.7/site-packages/ansible/plugins/cliconf/ios.pytset_cli_prompt_context[s   $cC`sùi}tjd|tjƒ}x\|D]T}d|}tj||tjƒ}|r%d|}|jdƒjƒ||RRRMRUR{R[RpR)R*R…RR‚RƒR¢R,R0(((s?/usr/lib/python2.7/site-packages/ansible/plugins/cliconf/ios.pyR .s"D'    #   (t __future__RRRttypet __metaclass__t DOCUMENTATIONReROR‡tansible.errorsRtansible.module_utils._textRt/ansible.module_utils.common._collections_compatRtansible.module_utils.sixRt*ansible.module_utils.network.common.configRRt)ansible.module_utils.network.common.utilsR tansible.plugins.cliconfR R R (((s?/usr/lib/python2.7/site-packages/ansible/plugins/cliconf/ios.pyts