??????????????
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 d l Z d d l Z d d l Z d d l
m 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 d d
l m Z m Z d e f d „ ƒ YZ d S(
i ( t absolute_importt divisiont print_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( t AnsibleConnectionFailure( t to_text( t Mapping( t iteritems( t
NetworkConfigt dumps( t to_list( t CliconfBaset enable_modet Cliconfc B` sò e Z e d d d d „ ƒ Z d d d d d d d „ Z e d e d d d „ ƒ Z d e d d d „ Z d d d e d e e d „ Z
d „ Z d „ Z d „ Z
d
„ Z d d e d „ Z d e d
„ Z d „ Z d „ Z d „ Z d „ Z RS( t runningc C` s” | d k r t d | ƒ ‚ n | r8 t d | ƒ ‚ n | sG g } n | d k r\ d } n d } | d j t | ƒ ƒ 7} | j ƒ } | j | ƒ S( NR
t startups/ fetching configuration from %s is not supporteds1 'format' value %s is not supported for get_configs show running-config s show startup-config t ( s runningR ( t
ValueErrort joinR t stript send_command( t selft sourcet flagst formatt cmd( ( s? /usr/lib/python2.7/site-packages/ansible/plugins/cliconf/ios.pyt
get_config0 s t linec
C` s i } | j ƒ } | j ƒ } | d k rC | d rC t d ƒ ‚ n | | d k ry t d | d j | d ƒ f ƒ ‚ n | | d k r¯ t d | d j | d ƒ f ƒ ‚ n t d d ƒ }
| j | ƒ \ } } |
j | ƒ | rF| d
k rF| j | ƒ \ }
} t d d d |
d | ƒ } |
j | d
| d | d | ƒ} n |
j } i } | rjt
| d ƒ n d | d <| j | | ƒ } | r’| n i | 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': {}
}
t supports_generate_diffs4 candidate 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 %st indenti t nonet contentst ignore_linest patht matcht replacet commandst t config_difft banner_diffN( t get_device_operationst get_option_valuest NoneR R R t _extract_bannerst loadt
differencet itemsR t
_diff_banners( R t candidateR
R t diff_ignore_linesR" R t difft device_operationst
option_valuest
candidate_objt want_srct want_bannerst have_srct have_bannerst running_objt configdiffobjst banners( ( s? /usr/lib/python2.7/site-packages/ansible/plugins/cliconf/ios.pyt get_diffD s, #&&
$ c C` s i } | j ƒ } | j | | | | | ƒ g } g } | rÜ | j d ƒ x t | ƒ D]q } t | t ƒ s| i | d 6} n | d }
|
d k rW |
d d k rW | j | j | ƒ | j |
ƒ qW qW W| j d ƒ n t d ƒ ‚ | | d <| | d <| S( Ns configure terminalt commandt endi t !s check mode is not supportedt requestt response( R) t check_edit_config_capabilityR R t
isinstanceR t appendR ( R R1 t commitR$ t commentt respt
operationst resultst requestsR R ( ( s? /usr/lib/python2.7/site-packages/ansible/plugins/cliconf/ios.pyt edit_configˆ s&