%PDF- %PDF-
Direktori : /lib/python2.7/site-packages/salt/states/ |
Current File : //lib/python2.7/site-packages/salt/states/cisconso.pyo |
� ���^c @@ sZ d Z d d l m Z m Z m Z d d l Z d � Z d � Z d e f d � � YZ d S( u� State module for Cisco NSO Proxy minions .. versionadded: 2016.11.0 For documentation on setting up the cisconso proxy minion look in the documentation for :mod:`salt.proxy.cisconso <salt.proxy.cisconso>`. i ( t absolute_importt print_functiont unicode_literalsNc C@ s d t k S( Nu cisconso.set_data_value( t __salt__( ( ( s8 /usr/lib/python2.7/site-packages/salt/states/cisconso.pyt __virtual__ s c C@ sM i | d 6t d 6i d 6d d 6} t d | | � } t j j j | | � rd t | d <d | d <n� t d t k r� d | d <d | d <t | | � } | j � | d d <| j � | d d <| j � | d d <ns t d | | | � t | d <d | d <t | | � } | j � | d d <| j � | d d <| j � | d d <| S( u� Ensure a specific value exists at a given path :param name: The name for this rule :type name: ``str`` :param datastore: The datastore, e.g. running, operational. One of the NETCONF store IETF types :type datastore: :class:`DatastoreType` (``str`` enum). :param path: The device path to set the value at, a list of element names in order, / separated :type path: ``list``, ``str`` OR ``tuple`` :param config: The new value at the given path :type config: ``dict`` Examples: .. code-block:: yaml enable pap auth: cisconso.config_present: - name: enable_pap_auth - datastore: running - path: devices/device/ex0/config/sys/interfaces/serial/ppp0/authentication - config: authentication: method: pap "list-name": foobar u nameu resultu changesu u commentu cisconso.get_datau Config is already setu testu Config will be addedu newu removedu changedu cisconso.set_data_valueu Successfully added configN( t FalseR t saltt utilst compatt cmpt Truet __opts__t Nonet _DictDiffert addedt removedt changed( t namet datastoret patht configt rett existingt diff( ( s8 /usr/lib/python2.7/site-packages/salt/states/cisconso.pyt value_present s. ! R c B@ s; e Z d Z d � Z d � Z d � Z d � Z d � Z RS( u� Calculate the difference between two dictionaries as: (1) items added (2) items removed (3) keys same in both but changed values (4) keys same in both and unchanged values c C@ sZ | | | _ | _ t | j � � t | j � � | _ | _ | j j | j � | _ d S( N( t current_dictt past_dictt sett keyst set_currentt set_pastt intersectiont intersect( t selfR R ( ( s8 /usr/lib/python2.7/site-packages/salt/states/cisconso.pyt __init__^ s +c C@ s | j | j S( N( R R ( R! ( ( s8 /usr/lib/python2.7/site-packages/salt/states/cisconso.pyR c s c C@ s | j | j S( N( R R ( R! ( ( s8 /usr/lib/python2.7/site-packages/salt/states/cisconso.pyR f s c @ s t � f d � � j D� � S( Nc 3@ s/ | ]% } � j | � j | k r | Vq d S( N( R R ( t .0t o( R! ( s8 /usr/lib/python2.7/site-packages/salt/states/cisconso.pys <genexpr>j s ( R R ( R! ( ( R! s8 /usr/lib/python2.7/site-packages/salt/states/cisconso.pyR i s c @ s t � f d � � j D� � S( Nc 3@ s/ | ]% } � j | � j | k r | Vq d S( N( R R ( R# R$ ( R! ( s8 /usr/lib/python2.7/site-packages/salt/states/cisconso.pys <genexpr>m s ( R R ( R! ( ( R! s8 /usr/lib/python2.7/site-packages/salt/states/cisconso.pyt unchangedl s ( t __name__t __module__t __doc__R"