%PDF- %PDF-
Direktori : /lib/python3/dist-packages/samba/netcmd/__pycache__/ |
Current File : //lib/python3/dist-packages/samba/netcmd/__pycache__/sites.cpython-312.pyc |
� ��d�. � �F � d dl mZmZ d dlmZ d dlmZmZm Z m Z d dlmZm Z d dlmZ G d� de� Z G d� d e� Z G d � de� Z G d� d e� Z G d� de� Z G d� de� Z G d� de� Z G d� de� Z G d� de� Z G d� de � Z G d� de � Zy)� )�sites�subnetsN)�Command�CommandError�SuperCommand�Option)�Site�Subnet)� ModelErrorc � � e Zd ZdZdZej ej ej d�Z e dddedd� � e d ddd d�� gZ dd�Z y)�cmd_sites_listzList sites.z%prog [options]�� sambaopts�versionopts�credopts�-H�--URL�%LDB URL for database or target server�URL�ldap_url��help�type�metavar�dest�--json�Output results in JSON format.� output_format�store_const�json�r r �action�constNc �x � | j |||� } t j |� D �ci c] }|j |j � �� }}|dk( r| j |� y |j � D ] }| j j |� d�� �" y c c}w # t $ r} t | � �d } ~ ww xY w)Nr � )�ldb_connectr �query�cn�as_dictr r � print_json�keys�outf�write) �selfr r r r r �ldb�site� sites_dict�es �4/usr/lib/python3/dist-packages/samba/netcmd/sites.py�runzcmd_sites_list.run1 s� � � ���x��H�=�� "�&*�j�j��o�7�"� �'�'�4�<�<�>�1� 7�J� 7� �F�"��O�O�J�'�"���)� -��� � ���4�&���,� -��7��� "��q�/�!�� "�s( �B �"B�B �B � B9�)B4�4B9�NNNNN)�__name__� __module__�__qualname__�__doc__�synopsis�options�SambaOptions�VersionOptions�CredentialsOptions�takes_optiongroupsr �str� takes_optionsr4 � � r3 r r sp � �� �H� �)�)��-�-��.�.��� �t�W�#J���Z� 9��x�>�#�M�� I��M� ;?�,0�-rC r c � � e Zd ZdZdZdgZej ej ej d�Z edddedd � � gZ d d�Zy)�cmd_sites_viewzView one site.�%prog <site> [options]�sitenamer r r r r r r Nc �� � | j |||� } t j ||�� }|�t d|� d�� �| j |j � � y # t $ r}t |� �d }~ww xY w)N�r( �Site � not found.)r&