%PDF- %PDF-
| Direktori : /proc/self/root/proc/thread-self/root/lib/python2.7/site-packages/salt/states/ |
| Current File : //proc/self/root/proc/thread-self/root/lib/python2.7/site-packages/salt/states/influxdb08_user.pyo |
�
���^c @@ s_ d Z d d l m Z m Z m Z d � Z d d d d d d � Z d d d d d d � Z d S( u�
Management of InfluxDB 0.8 users
================================
(compatible with InfluxDB version 0.5-0.8)
.. versionadded:: 2014.7.0
i ( t absolute_importt print_functiont unicode_literalsc C@ s d t k r d St S( u9
Only load if the influxdb08 module is available
u influxdb08.db_existsu influxdb08_user( t __salt__t False( ( ( s? /usr/lib/python2.7/site-packages/salt/states/influxdb08_user.pyt __virtual__ s c C@ s2 i | d 6i d 6t d 6d d 6} | rf t d | | | | | � rf t | d <d j | � | d <| St d | | | | | | � st d r� d | d <d
j | � | d <| St d | | | | | | | � r� d j | � | d <d
| d | <| Sd j | � | d <t | d <| Sn d j | � | d <| S( u�
Ensure that the cluster admin or database user is present.
name
The name of the user to manage
passwd
The password of the user
database
The database to create the user in
user
The user to connect as (must be able to create the user)
password
The password of the user
host
The host to connect to
port
The port to connect to
u nameu changesu resultu u commentu influxdb08.db_existsu Database {0} does not existu influxdb08.user_existsu testu/ User {0} is not present and needs to be createdu influxdb08.user_createu User {0} has been createdu Presentu Failed to create user {0}u User {0} is already presentN( t TrueR R t formatt __opts__t None( t namet passwdt databaset usert passwordt hostt portt ret( ( s? /usr/lib/python2.7/site-packages/salt/states/influxdb08_user.pyt present s4
c C@ s� i | d 6i d 6t d 6d d 6} t d | | | | | | � r� t d rl d | d <d j | � | d <| St d | | | | | | � r� d
j | � | d <d | d | <| Sd j | � | d <t | d <| Sn d
j | � | d <| S( u�
Ensure that the named cluster admin or database user is absent.
name
The name of the user to remove
database
The database to remove the user from
user
The user to connect as (must be able to remove the user)
password
The password of the user
host
The host to connect to
port
The port to connect to
u nameu changesu resultu u commentu influxdb08.user_existsu testu+ User {0} is present and needs to be removedu influxdb08.user_removeu User {0} has been removedu Absentu Failed to remove user {0}u0 User {0} is not present, so it cannot be removedN( R R R R R R ( R
R R
R R R R ( ( s? /usr/lib/python2.7/site-packages/salt/states/influxdb08_user.pyt absent] s,
N( t __doc__t
__future__R R R R R R R ( ( ( s? /usr/lib/python2.7/site-packages/salt/states/influxdb08_user.pyt <module>
s ?