%PDF- %PDF-
Direktori : /usr/lib/python2.7/site-packages/salt/modules/ |
Current File : //usr/lib/python2.7/site-packages/salt/modules/cisconso.pyc |
� ���^c @@ s� d Z d d l m Z m Z m Z d d l Z d d l m Z d g Z d Z d � Z d � Z d � Z d � Z d � Z d � Z d � Z d � Z d S( u� Execution module for Cisco Network Services Orchestrator 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_literalsN( t sixu cisconsoc C@ s t j j j � r t St d f S( NuN The cisconso execution module failed to load: only available on proxy minions.( t saltt utilst platformt is_proxyt __virtualname__t False( ( ( s9 /usr/lib/python2.7/site-packages/salt/modules/cisconso.pyt __virtual__ s c C@ s t d � S( u� Return system information for grains of the NSO proxy minion .. code-block:: bash salt '*' cisconso.info u info( t _proxy_cmd( ( ( s9 /usr/lib/python2.7/site-packages/salt/modules/cisconso.pyt info s c C@ s4 t | t j � r$ d j | � } n t d | | � S( u/ Get the configuration of the device tree at the given path :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`` :return: The network configuration at that tree :rtype: ``dict`` .. code-block:: bash salt cisco-nso cisconso.get_data running 'devices/ex0' u /u get_data( t isinstanceR t string_typest splitR ( t datastoret path( ( s9 /usr/lib/python2.7/site-packages/salt/modules/cisconso.pyt get_data% s c C@ s7 t | t j � r$ d j | � } n t d | | | � S( u| Set a data entry in a datastore :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 data: The new value at the given path :type data: ``dict`` :rtype: ``bool`` :return: ``True`` if successful, otherwise error. .. code-block:: bash salt cisco-nso cisconso.set_data_value running 'devices/ex0/routes' 10.0.0.20/24 u /u set_data_value( R R R R R ( R R t data( ( s9 /usr/lib/python2.7/site-packages/salt/modules/cisconso.pyt set_data_value= s c C@ s t d � S( u Get a list of stored configuration rollbacks .. code-block:: bash salt cisco-nso cisconso.get_rollbacks u get_rollbacks( R ( ( ( s9 /usr/lib/python2.7/site-packages/salt/modules/cisconso.pyt get_rollbacksX s c C@ s t d | � S( u Get the backup of stored a configuration rollback :param name: Typically an ID of the backup :type name: ``str`` :rtype: ``str`` :return: the contents of the rollback snapshot .. code-block:: bash salt cisco-nso cisconso.get_rollback 52 u get_rollback( R ( t name( ( s9 /usr/lib/python2.7/site-packages/salt/modules/cisconso.pyt get_rollbackc s c C@ s t d | | � S( ud Apply a system rollback :param datastore: The datastore, e.g. running, operational. One of the NETCONF store IETF types :type datastore: :class:`DatastoreType` (``str`` enum). :param name: an ID of the rollback to restore :type name: ``str`` .. code-block:: bash salt cisco-nso cisconso.apply_rollback 52 u apply_rollback( R ( R R ( ( s9 /usr/lib/python2.7/site-packages/salt/modules/cisconso.pyt apply_rollbackt s c O@ st t d d } d j | | g � } | t k r3 t Sx- | D]% } | j d � r: | j | � q: q: Wt | | | � S( u run commands from __proxy__ :mod:`salt.proxy.cisconso<salt.proxy.cisconso>` command function from `salt.proxy.cisconso` to run args positional args to pass to `command` function kwargs key word arguments to pass to `command` function u proxyu proxytypeu .u __pub_( t __opts__t joint __proxy__R t startswitht pop( t commandt argst kwargst proxy_prefixt proxy_cmdt k( ( s9 /usr/lib/python2.7/site-packages/salt/modules/cisconso.pyR � s ( t __doc__t __future__R R R t salt.utils.platformR t salt.extR t __proxyenabled__R R R R R R R R R ( ( ( s9 /usr/lib/python2.7/site-packages/salt/modules/cisconso.pyt <module> s