%PDF- %PDF-
| Direktori : /proc/self/root/proc/3522530/root/usr/lib/python2.7/site-packages/salt/states/ |
| Current File : //proc/self/root/proc/3522530/root/usr/lib/python2.7/site-packages/salt/states/mssql_login.pyo |
�
���^c @@ sb d Z d d l m Z m Z m Z d d l Z d � Z d � Z d d d d d � Z d � Z
d S( u�
Management of Microsoft SQLServer Logins
========================================
The mssql_login module is used to create
and manage SQL Server Logins
.. code-block:: yaml
frank:
mssql_login.present
- domain: mydomain
i ( t absolute_importt print_functiont unicode_literalsNc C@ s
d t k S( u2
Only load if the mssql module is present
u
mssql.version( t __salt__( ( ( s; /usr/lib/python2.7/site-packages/salt/states/mssql_login.pyt __virtual__ s c C@ s� t | � t t j g k rJ g | j � D] \ } } d j | | � ^ q( St | � t k r� t | � s t | d � t k r� | St | � t k s� t | d � t t j g k r� g Sg | D] } t | � D] } | ^ q� q� S( Nu {0}={1}i (
t typet dictt collectionst OrderedDictt itemst formatt listt lent strt _normalize_options( t optionst kt vt dt o( ( s; /usr/lib/python2.7/site-packages/salt/states/mssql_login.pyR s /51c K@ s3 i | d 6i d 6t d 6d d 6} t | � t | � k rR t | d <d | d <| St d | d | | �r� d j | � | d <| St d
r� d | d <d j | � | d <| St d | d
| d | d | d t | � | �} | t k rt | d <d j | | � | d <| Sd j | � | d <d | d | <| S( u�
Checks existance of the named login.
If not present, creates the login with the specified roles and options.
name
The name of the login to manage
password
Creates a SQL Server authentication login
Since hashed passwords are varbinary values, if the
new_login_password is 'long', it will be considered
to be HASHED.
domain
Creates a Windows authentication login.
Needs to be NetBIOS domain or hostname
server_roles
Add this login to all the server roles in the list
options
Can be a list of strings, a dictionary, or a list of dictionaries
u nameu changesu resultu u commentu; One and only one of password and domain should be specifiesu mssql.login_existst domainuC Login {0} is already present (Not going to try to set its password)u testu Login {0} is set to be addedu mssql.login_createt new_login_passwordt new_login_domaint new_login_rolest new_login_optionsu! Login {0} failed to be added: {1}u Login {0} has been added. u PresentN( t Truet boolt FalseR R
t __opts__t NoneR ( t namet passwordR t server_rolesR t kwargst rett
login_created( ( s; /usr/lib/python2.7/site-packages/salt/states/mssql_login.pyt present% s8
c K@ s� i | d 6i d 6t d 6d d 6} t d | � sI d j | � | d <| St d rt d | d <d j | � | d <| St d
| | � r� d j | � | d <d | d | <| St | d <d
j | � | d <| S( ua
Ensure that the named login is absent
name
The name of the login to remove
u nameu changesu resultu u commentu mssql.login_existsu Login {0} is not presentu testu Login {0} is set to be removedu mssql.login_removeu Login {0} has been removedu Absentu Login {0} failed to be removedN( R R R
R R R ( R R! R"