Файловый менеджер - Редактировать - /usr/lib64/python3.6/site-packages/samba/netcmd/domain/auth/__pycache__/silo.cpython-36.pyc
Ðазад
3 �I�d�: � @ s� d dl jZd dlmZmZmZmZ d dlm Z m Z d dlmZ ddl mZ G dd� de�ZG d d � d e�ZG dd� de�ZG d d� de�ZG dd� de�ZG dd� de�ZdS )� N)�Command�CommandError�Option�SuperCommand)�AuthenticationPolicy�AuthenticationSilo)� ModelError� )�cmd_domain_auth_silo_memberc @ sR e Zd ZdZdZejejd�Ze ddde ddd �e d ddd dd�gZddd�ZdS )�cmd_domain_auth_silo_listz(List authentication silos on the domain.z%prog -H <URL> [options])� sambaopts�credoptsz-Hz--URLz&LDB URL for database or target server.�URL�ldap_url)�help�type�metavar�destz--jsonzOutput results in JSON format.� output_format�store_const�json)r r �action�constNc C s� | j |||�}ydd� tj|�D �}W n* tk rP } zt|��W Y d d }~X nX |dkrf| j|� n$x"|j� D ]}| jj|� d�� qpW d S )Nc S s i | ]}|j � |j�qS � )�as_dict�cn)�.0�silor r �/usr/lib64/python3.6/silo.py� <dictcomp>7 s z1cmd_domain_auth_silo_list.run.<locals>.<dictcomp>r � ) �ldb_connectr Zqueryr r � print_json�keys�outf�write) �selfr r r r �ldbZsilos�er r r r �run0 s zcmd_domain_auth_silo_list.run)NNNN) �__name__� __module__�__qualname__�__doc__�synopsis�options�SambaOptions�CredentialsOptions�takes_optiongroupsr �str� takes_optionsr) r r r r r s r c @ sR e Zd ZdZdZejejd�Ze ddde ddd �e d ddd e d�gZddd�ZdS )�cmd_domain_auth_silo_viewz*View an authentication silo on the domain.z%prog -H <URL> [options])r r z-Hz--URLz&LDB URL for database or target server.r r )r r r r z--namez/Name of authentication silo to view (required).�name�store)r r r r Nc C s� |st d��| j|||�}ytj||d�}W n* tk rV } zt |��W Y d d }~X nX |d krpt d|� d���| j|j� � d S )NzArgument --name is required.)r zAuthentication silo z not found.)r r! r �getr r"