??????????????
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ΥddlmZmZmZeZddlmZddlm Z ddl m Z ddl m Z mZddlmZmZyddlmZeZWnek r±eZnXd„Zd e fd „ƒYZd S( i(tabsolute_importtdivisiontprint_function(tabstractmethod(twraps(t AnsiblePlugin(t AnsibleErrortAnsibleConnectionFailure(tto_bytestto_text(t SCPClientc`stˆƒ‡fd†ƒ}|S(Nc`sO|jjƒ}t|ddƒjƒjdƒs?tdƒ‚nˆ|||ŽS(Nterrorstsurrogate_or_strictt#s'operation requires privilege escalation(t _connectiont get_promptR tstriptendswithR(tselftargstkwargstprompt(tfunc(sD/usr/lib/python2.7/site-packages/ansible/plugins/cliconf/__init__.pytwrapped%s!(R(RR((RsD/usr/lib/python2.7/site-packages/ansible/plugins/cliconf/__init__.pyt enable_mode$st CliconfBasec B`seZdZddddddgZd„Zd„Zd"d"d"eeeed „Z d „Z d „Z d „Z d „Z d„Zedd"d"d„ƒZed"ed"ed"d„ƒZed"d"d"eed"ed„ƒZed„ƒZed„ƒZd"d„Zd„Zed„Zd"d"ddd„Zd"d"ddd„Zd"d"d"d"d"d"d„Zd"ed„Zd"ed"d"d„Zd„Zd"d d!„ZRS(#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_configtget_capabilitiestgettenable_response_loggingtdisable_response_loggingcC`s5tt|ƒjƒ||_tƒ|_t|_dS(N(tsuperRt__init__RtlistthistorytFalsetresponse_logging(Rt connection((sD/usr/lib/python2.7/site-packages/ansible/plugins/cliconf/__init__.pyR!Ps  cC`s.|jjdd|jjjƒ|jƒdS(s0Alarm handler raised in case of command timeout tlogs2closing shell due to command timeout (%s seconds).N(Rt queue_messaget _play_contextttimeouttclose(Rtsignumtframe((sD/usr/lib/python2.7/site-packages/ansible/plugins/cliconf/__init__.pyt_alarm_handlerVs c C`s#it|ƒd6|d6|d6|d6|d6}|d k rƒt|tƒrpg|D]} t| ƒ^qQ|d, # the name of the transport 'device_info': { 'network_os': , 'network_os_version': , 'network_os_model': , 'network_os_hostname': , 'network_os_image': , 'network_os_platform': , }, 'device_operations': { 'supports_diff_replace': , # identify if config should be merged or replaced is supported 'supports_commit': , # identify if commit is supported by device or not 'supports_rollback': , # identify if rollback is supported or not 'supports_defaults': , # identify if fetching running config with default is supported 'supports_commit_comment': , # identify if adding comment to commit is supported of not 'supports_onbox_diff: , # identify if on box diff capability is supported or not 'supports_generate_diff: , # identify if diff capability is supported within plugin 'supports_multiline_delimiter: , # identify if multiline demiliter is supported within config 'supports_diff_match: , # identify if match is supported 'supports_diff_ignore_lines: , # identify if ignore line in diff is supported 'supports_config_replace': , # identify if running config replace with candidate config is supported 'supports_admin': , # identify if admin configure mode is supported or not 'supports_commit_label': , # identify if commit label is supported or not } 'format': [list of supported configuration format], 'diff_match': [list of supported match values], 'diff_replace': [list of supported replace values], 'output': [list of supported command output format] } :return: capability as json string trpct device_infotcliconft network_api(R=tget_device_info(Rtresult((sD/usr/lib/python2.7/site-packages/ansible/plugins/cliconf/__init__.pyRπs ) cC`sdS(sCReturns basic information about the network device. This method will provide basic information about the device such as OS version and model name. This data is expected to be used to fill the 'device_info' key in get_capabilities() above. :return: dictionary of device information N((R((sD/usr/lib/python2.7/site-packages/ansible/plugins/cliconf/__init__.pyROs cC`s|jjd|jjƒS(s˜Commit configuration changes This method will perform the commit operation on a previously loaded candidate configuration that was loaded using `edit_config()`. If there is a candidate configuration, it will be committed to the active configuration. If there is not a candidate configuration, this method should just silently return. :return: None s(commit is not supported by network_os %s(Rtmethod_not_foundR)t network_os(RRI((sD/usr/lib/python2.7/site-packages/ansible/plugins/cliconf/__init__.pyRF+s cC`s|jjd|jjƒS(sDiscard candidate configuration This method will discard the current candidate configuration if one is present. If there is no candidate configuration currently loaded, then this method should just silently return :returns: None s1discard_changes is not supported by network_os %s(RRQR)RR(R((sD/usr/lib/python2.7/site-packages/ansible/plugins/cliconf/__init__.pytdiscard_changes8s cC`sdS(sν :param rollback_id: The commit id to which configuration should be rollbacked :param commit: Flag to indicate if changes should be committed or not :return: Returns diff between before and after change. N((Rt rollback_idRF((sD/usr/lib/python2.7/site-packages/ansible/plugins/cliconf/__init__.pytrollbackCstscpic C`s‘|jjjƒ}|dkrits3tdƒ‚nt|jƒd|ƒ}|j||ƒ}WdQXn4|dkr|jƒ}|j||ƒWdQXndS(sΊCopies file over scp/sftp to remote device :param source: Source file path :param destination: Destination file path on remote device :param proto: Protocol to be used for file transfer, supported protocol: scp and sftp :param timeout: Specifies the wait time to receive response from remote host before triggering timeout exception :return: None RVsQRequired library scp is not installed. Please install it using `pip install scp`tsocket_timeoutNtsftp( Rt paramiko_connt_connect_uncachedtHAS_SCPRR t get_transporttputt open_sftp( RRBt destinationtprotoR*tsshRVtoutRX((sD/usr/lib/python2.7/site-packages/ansible/plugins/cliconf/__init__.pyt copy_fileLs   cC`s·|jjjƒ}|dkrts3tdƒ‚ny5t|jƒd|ƒ}|j||ƒWdQXWq³tk r{q³Xn4|dkr³|j ƒ}|j||ƒWdQXndS(s©Fetch file over scp/sftp from remote device :param source: Source file path :param destination: Destination file path :param proto: Protocol to be used for file transfer, supported protocol: scp and sftp :param timeout: Specifies the wait time to receive response from remote host before triggering timeout exception :return: None RVsQRequired library scp is not installed. Please install it using `pip install scp`RWNRX( RRYRZR[RR R\RtEOFErrorR^(RRBR_R`R*RaRVRX((sD/usr/lib/python2.7/site-packages/ansible/plugins/cliconf/__init__.pytget_fileas    cC`sdS(s: 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 and/or banner diff in json format. { 'config_diff': '' } N((RRERAt diff_matchtdiff_ignore_linestpatht diff_replace((sD/usr/lib/python2.7/site-packages/ansible/plugins/cliconf/__init__.pytget_diffzs"cC`sdS(sI Execute a list of commands on remote host and return the list of response :param commands: The list of command that needs to be executed on remote host. The individual command in list can either be a command string or command dict. If the command is dict the valid keys are { 'command': 'prompt': , 'answer': , 'output': , 'sendonly': } :param check_rc: Boolean flag to check if returned response should be checked for error or not. If check_rc is False the error output is appended in return response list, else if the value is True an exception is raised. :return: List of returned response N((Rtcommandstcheck_rc((sD/usr/lib/python2.7/site-packages/ansible/plugins/cliconf/__init__.pyt run_commandsžscC`sΆ| r| rtdƒ‚n|ttfkrBtd|ƒ‚n|rb|d rbtdƒ‚n|rŠ|jdtƒ rŠtdƒ‚n|r²|jdtƒ r²tdƒ‚ndS(Ns9must provide a candidate or replace to load configurations'commit' must be a bool, got %stsupports_replaces&configuration replace is not supportedtsupports_commit_commentscommit comment is not supported(t ValueErrorR@R$R(Rt operationsRERFRGRI((sD/usr/lib/python2.7/site-packages/ansible/plugins/cliconf/__init__.pytcheck_edit_config_capability²scC`sdS(s\ Ensure the command prompt on device is in right mode :return: None N((R((sD/usr/lib/python2.7/site-packages/ansible/plugins/cliconf/__init__.pytset_cli_prompt_contextΓstexitcC`s¨|jjƒ}|dkr7tdd|jjƒ‚nxjtr£t|ddƒjƒ}|rŸ|j|ƒrŸ|jj ddƒ|j |ƒ|jjƒ}q:Pq:WdS(s& Update the cli prompt context to ensure it is in operational mode :param config_context: It is string value to identify if the current cli prompt ends with config mode prompt :param exit_command: Command to execute to exit the config mode :return: None tmessageuGcli prompt is not identified from the last received response window: %sR tsurrogate_then_replacetvvvvs%wrong context, sending exit to deviceN( RRR5Rt_last_recv_windowR@R RRR(R;(Rtconfig_contextt exit_commandRb((sD/usr/lib/python2.7/site-packages/ansible/plugins/cliconf/__init__.pyt_update_cli_prompt_contextΚs    N(t__name__t __module__t__doc__R<R!R.R5R$R@R;R=R>R?RRRRRRRRORFRSRURcReRjRmRrRsR{(((sD/usr/lib/python2.7/site-packages/ansible/plugins/cliconf/__init__.pyR.s8  -    !/ $ N(t __future__RRRttypet __metaclass__tabcRt functoolsRtansible.pluginsRtansible.errorsRRtansible.module_utils._textRR RVR R@R[t ImportErrorR$RR(((sD/usr/lib/python2.7/site-packages/ansible/plugins/cliconf/__init__.pyts