HEX
Server: LiteSpeed
System: Linux s1049.use1.mysecurecloudhost.com 4.18.0-477.27.2.lve.el8.x86_64 #1 SMP Wed Oct 11 12:32:56 UTC 2023 x86_64
User: xedaptot (3356)
PHP: 8.3.31
Disabled: NONE
Upload Files
File: //usr/lib/python3.6/site-packages/ipalib/__pycache__/messages.cpython-36.opt-1.pyc
3

�d[e�:�@s�dZddlmZddlmZddlZddlmZddlm	Z
ddlmZmZddl
mZejrbeZd	d
�ZdZdd�ZgZd
d�Z	Gdd�de�ZGdd�de�ZGdd�de�ZGdd�de�ZGdd�de�ZGdd�de�ZGdd�de�ZGdd�de�ZGdd �d e�ZGd!d"�d"e�ZGd#d$�d$e�Z Gd%d&�d&e�Z!Gd'd(�d(e�Z"Gd)d*�d*e�Z#Gd+d,�d,e�Z$Gd-d.�d.e�Z%Gd/d0�d0e�Z&Gd1d2�d2e�Z'Gd3d4�d4e�Z(Gd5d6�d6e�Z)Gd7d8�d8e�Z*Gd9d:�d:e�Z+Gd;d<�d<e�Z,Gd=d>�d>e�Z-Gd?d@�d@e�Z.GdAdB�dBe�Z/GdCdD�dDe�Z0GdEdF�dFe�Z1GdGdH�dHe�Z2GdIdJ�dJe�Z3GdKdL�dLe�Z4GdMdN�dNe�Z5GdOdP�dPe�Z6dQdR�Z7e8e9e7e:�e�dSdT�dU��Z;dVdW�Z<e=dXk�r�e<dYe;�dS)[a�
Custom message (debug, info, warning) classes passed through RPC.

These are added to the "messages" entry in a RPC response, and printed to the
user as log messages.

Each message class has a unique numeric "errno" attribute from the 10000-10999
range, so that it does not clash with PublicError numbers.

Messages also have the 'type' argument, set to one of 'debug', 'info',
'warning', 'error'. This determines the severity of the message.
�)�print_function)�isclassN)�
TYPE_ERROR)�_)�Gettext�NGettext)�client_has_capabilitycCs$t|d�r |jdg�j|j��dS)NZmessages)r�
setdefault�append�to_dict)�version�result�message�r�/usr/lib/python3.6/messages.py�add_message.s
rc	Ks�xD|j�D]8\}}t|t�s
yt|�||<Wq
tk
r@Yq
Xq
W||_|jj}|jdk	rv|dk	rvt	d||f��|dk�r$|jdkr�|dkr�t	d|��||_d|_
|j||_t|jt�r�t
|j�||_n|j||_d|k�rvdd�}djttd��||d�f�}dj|j|f�|_nRt|ttf��r>t|�}n&t|�tk	�rdttd	t|t|�f��d
|_
||_||_x"|j�D]\}}t|||��q�WdS)Nz/non-generic %r needs format=None; got format=%rz/%s.format is None yet format=None, message=NoneF�instructionscSs&t|t�r"djdd�|D��}|S|S)N�
css|]}t|�VqdS)N)�unicode)�.0�linerrr�	<genexpr>QszJprocess_message_arguments.<locals>.convert_instructions.<locals>.<genexpr>)�
isinstance�list�join)�valuer
rrr�convert_instructionsOs
z7process_message_arguments.<locals>.convert_instructionsrzAdditional instructions:rT)�itemsr�intr�UnicodeError�kw�	__class__�__name__�format�
ValueErrorZ	forwarded�msg�str�ugettext�strerrorrrrr�type�	TypeErrorr�setattr)	�objr#rr �keyr�namerrrrr�process_message_arguments3sL






r/cCstj|�|S)N)�_textsr
)rrrrrjs
rcs2eZdZdZd�fdd�	ZdZdZdd�Z�ZS)	�
PublicMessagezU
    **10000** Base class for messages that can be forwarded in an RPC response.
    Ncs&t|||f|�tt|�j|j�dS)N)r/�superr1�__init__r%)�selfr#rr )r!rrr3sszPublicMessage.__init__i'cCs(tt|j�tt|�j�|j|j|jd�S)z:Export this message to a dict that can be sent through RPC)r)r.r�code�data)�dictrr)r"r(�errnor )r4rrrrzszPublicMessage.to_dict)NN)	r"�
__module__�__qualname__�__doc__r3r8r#r�
__classcell__rr)r!rr1os
r1c@s eZdZdZdZdZed�ZdS)�VersionMissinga
    **13001** Used when client did not send the API version.

    For example:

    >>> VersionMissing(server_version='2.123').strerror
    u"API Version number was not sent, forward compatibility not guaranteed. Assuming server's API version, 2.123"

    i�2�warningzxAPI Version number was not sent, forward compatibility not guaranteed. Assuming server's API version, %(server_version)sN)r"r9r:r;r8r)rr#rrrrr=�s	r=c@s eZdZdZdZdZed�ZdS)�ForwardersWarningz?
    **13002** Used when (master) zone contains forwarders
    i�2r>z�DNS forwarder semantics changed since IPA 4.0.
You may want to use forward zones (dnsforwardzone-*) instead.
For more details read the docs.N)r"r9r:r;r8r)rr#rrrrr?�s
r?c@s eZdZdZdZdZed�ZdS)�
DNSSECWarningz9
    **13003** Used when user change DNSSEC settings
    i�2r>z3DNSSEC support is experimental.
%(additional_info)sN)r"r9r:r;r8r)rr#rrrrr@�sr@c@s eZdZdZdZdZed�ZdS)�OptionDeprecatedWarningz;
    **13004** Used when user uses a deprecated option
    i�2r>z6'%(option)s' option is deprecated. %(additional_info)sN)r"r9r:r;r8r)rr#rrrrrA�srAc@s eZdZdZdZdZed�ZdS)�OptionSemanticChangedWarningzP
    **13005** Used when option which recently changes its semantic is used
    i�2r>z@Semantic of %(label)s was changed. %(current_behavior)s
%(hint)sN)r"r9r:r;r8r)rr#rrrrrB�srBc@s eZdZdZdZdZed�ZdS)�DNSServerValidationWarningzK
    **13006**  Used when a DNS server is not to able to resolve query
    i�2r>z!DNS server %(server)s: %(error)s.N)r"r9r:r;r8r)rr#rrrrrC�srCc@s eZdZdZdZdZed�ZdS)�$DNSServerDoesNotSupportDNSSECWarningzM
    **13007** Used when a DNS server does not support DNSSEC validation
    i�2r>z~DNS server %(server)s does not support DNSSEC: %(error)s.
If DNSSEC validation is enabled on IPA server(s), please disable it.N)r"r9r:r;r8r)rr#rrrrrD�srDc@s eZdZdZdZdZed�ZdS)� ForwardzoneIsNotEffectiveWarningz�
    **13008** Forwardzone is not effective, forwarding will not work because
    there is authoritative parent zone, without proper NS delegation
    i�2r>z�forward zone "%(fwzone)s" is not effective because of missing proper NS delegation in authoritative zone "%(authzone)s". Please add NS record "%(ns_rec)s" to parent zone "%(authzone)s".N)r"r9r:r;r8r)rr#rrrrrE�srEc@s eZdZdZdZdZed�ZdS)�#DNSServerDoesNotSupportEDNS0Warningzb
    **13009** Used when a DNS server does not support EDNS0, required for
    DNSSEC support
    i�2r>z�DNS server %(server)s does not support EDNS0 (RFC 6891): %(error)s.
If DNSSEC validation is enabled on IPA server(s), please disable it.N)r"r9r:r;r8r)rr#rrrrrF�srFc@s eZdZdZdZdZed�ZdS)�DNSSECValidationFailingWarningzJ
    **13010** Used when a DNSSEC validation failed on IPA DNS server
    i�2r>z}DNSSEC validation failed: %(error)s.
Please verify your DNSSEC configuration or disable DNSSEC validation on all IPA servers.N)r"r9r:r;r8r)rr#rrrrrG�srGc@s eZdZdZdZdZed�ZdS)� KerberosTXTRecordCreationFailurezZ
    **13011** Used when a _kerberos TXT record could not be added to
    a DNS zone.
    i�2r>z�The _kerberos TXT record from domain %(domain)s could not be created (%(error)s).
This can happen if the zone is not managed by IPA. Please create the record manually, containing the following value: '%(realm)s'N)r"r9r:r;r8r)rr#rrrrrHs
rHc@s eZdZdZdZdZed�ZdS)� KerberosTXTRecordDeletionFailurez^
    **13012** Used when a _kerberos TXT record could not be removed from
    a DNS zone.
    i�2r>z�The _kerberos TXT record from domain %(domain)s could not be removed (%(error)s).
This can happen if the zone is not managed by IPA. Please remove the record manually.N)r"r9r:r;r8r)rr#rrrrrIs
rIc@s eZdZdZdZdZed�ZdS)�DNSSECMasterNotInstalledzm
    **13013** Used when a DNSSEC is not installed on system (no DNSSEC
    master server is installed).
    i�2r>znNo DNSSEC key master is installed. DNSSEC zone signing will not work until the DNSSEC key master is installed.N)r"r9r:r;r8r)rr#rrrrrJs
rJc@s eZdZdZdZdZed�ZdS)�DNSSuspiciousRelativeNamez�
    **13014** Relative name "record.zone" is being added into zone "zone.",
    which is probably a mistake. User probably wanted to either specify
    relative name "record" or use FQDN "record.zone.".
    i�2r>z�Relative record name '%(record)s' contains the zone name '%(zone)s' as a suffix, which results in FQDN '%(fqdn)s'. This is usually a mistake caused by a missing dot at the end of the name specification.N)r"r9r:r;r8r)rr#rrrrrK,s
rKc@s eZdZdZdZdZed�ZdS)�CommandDeprecatedWarningz;
    **13015** Used when user uses a deprecated option
    i�2r>z0'%(command)s' is deprecated. %(additional_info)sN)r"r9r:r;r8r)rr#rrrrrL<srLc@s eZdZdZdZdZed�ZdS)�ExternalCommandOutputz<
    **13016** Line of output from an external command.
    i�2�infoz%(line)sN)r"r9r:r;r8r)rr#rrrrrMFsrMc@s eZdZdZdZdZed�ZdS)�SearchResultTruncatedz=
    **13017** Results of LDAP search has been truncated
    i�2r>z,Search result has been truncated: %(reason)sN)r"r9r:r;r8r)rr#rrrrrOPsrOc@s eZdZdZdZdZed�ZdS)�BrokenTrustz:
    **13018** Trust for a specified domain is broken
    i�2r>zYYour trust to %(domain)s is broken. Please re-create it by running 'ipa trust-add' again.N)r"r9r:r;r8r)rr#rrrrrPZsrPc@seZdZdZdZdZdS)�ResultFormattingErrorzF
    **13019** Unable to correctly format some part of the result
    r>i�2N)r"r9r:r;r)r8rrrrrQesrQc@s eZdZdZdZdZed�ZdS)�FailedToRemoveHostDNSRecordsz5
    **13020** Failed to remove host DNS records
    i�2r>zADNS record(s) of host %(host)s could not be removed. (%(reason)s)N)r"r9r:r;r8r)rr#rrrrrRmsrRc@s eZdZdZdZdZed�ZdS)�%DNSForwardPolicyConflictWithEmptyZonez�
    **13021** Forward zone 1.10.in-addr.arpa with policy "first"
    will not forward anything because BIND automatically prefers
    empty zone "10.in-addr.arpa.".
    i�2r>z�Forwarding policy conflicts with some automatic empty zones. Queries for zones specified by RFC 6303 will ignore forwarding and recursion and always result in NXDOMAIN answers. To override this behavior use forward policy 'only'.N)r"r9r:r;r8r)rr#rrrrrSxs
rSc@s eZdZdZdZdZed�ZdS)�DNSUpdateOfSystemRecordFailedz8
    **13022** Update of a DNS system record failed
    i�2r>zAUpdate of system record '%(record)s' failed with error: %(error)sN)r"r9r:r;r8r)rr#rrrrrT�s
rTc@s eZdZdZdZdZed�ZdS)�DNSUpdateNotIPAManagedZonezA
    **13023** Zone for system records is not managed by IPA
    i�2r>zUIPA does not manage the zone %(zone)s, please add records to your DNS server manuallyN)r"r9r:r;r8r)rr#rrrrrU�s
rUc@s eZdZdZdZdZed�ZdS)�AutomaticDNSRecordsUpdateFailedz:
    **13024** Automatic update of DNS records failed
    i�2r>z~Automatic update of DNS system records failed. Please re-run update of system records manually to get list of missing records.N)r"r9r:r;r8r)rr#rrrrrV�s
rVc@s eZdZdZdZdZed�ZdS)�ServiceRestartRequiredz/
    **13025** Service restart is required
    i�2r>z]Service %(service)s requires restart on IPA server %(server)s to apply configuration changes.N)r"r9r:r;r8r)rr#rrrrrW�s
rWc@s eZdZdZdZdZed�ZdS)�LocationWithoutDNSServerz/
    **13026** Location without DNS server
    i�2r>zeNo DNS servers in IPA location %(location)s. Without DNS servers location is not working as expected.N)r"r9r:r;r8r)rr#rrrrrX�s
rXc@seZdZdZdZdZdS)�ServerRemovalInfozL
    **13027** Informative message printed during removal of IPA server
    i�2rNN)r"r9r:r;r8r)rrrrrY�srYc@seZdZdZdZdZdS)�ServerRemovalWarningz?
    **13028** Warning raised during removal of IPA server
    i�2r>N)r"r9r:r;r8r)rrrrrZ�srZc@s eZdZdZdZdZed�ZdS)�CertificateInvalidz1
    **13029** Failed to parse a certificate
    i�2�errorz.%(subject)s: Malformed certificate. %(reason)sN)r"r9r:r;r8r)rr#rrrrr[�sr[c@s eZdZdZdZdZed�ZdS)�FailedToAddHostDNSRecordsz2
    **13030** Failed to add host DNS records
    i�2r>z=The host was added but the DNS update failed with: %(reason)sN)r"r9r:r;r8r)rr#rrrrr]�sr]c@s eZdZdZdZdZed�ZdS)�$LightweightCACertificateNotAvailablez0
    **13031** Certificate is not available
    i�2r\z;The certificate for %(ca)s is not available on this server.N)r"r9r:r;r8r)rr#rrrrr^�sr^c@s eZdZdZdZdZed�ZdS)�#MissingTargetAttributesinPermissionzD
    **13032** A permission was added with no target attributes
    i�2r>z>The permission has %(right)s rights but no attributes are set.N)r"r9r:r;r8r)rr#rrrrr_�sr_ccs@x:|j�D].\}}|jd�s
t|�r(q
t||�r
|Vq
WdS)z'Return a tuple with all subclasses
    rN)r�
startswithr�
issubclass)�	variables�baser-rrrr�
iter_messages�s

rdcCs|jS)N)r8)�Errr�<lambda>srf)r-cCs:x |D]}td|j|jf�qWtdt|�|f�dS)Nz%d	%sz(%d %s))�printr8r"�len)Zlabel�classes�clsrrr�print_report
s
rk�__main__zpublic messages)NN)>r;Z
__future__r�inspectrZsixZipalib.constantsrZipalib.textrr'rrZipalib.capabilitiesrZPY3r&rrr/r0�UserWarningr1r=r?r@rArBrCrDrErFrGrHrIrJrKrLrMrOrPrQrRrSrTrUrVrWrXrYrZr[r]r^r_rd�tuple�sorted�globalsZpublic_messagesrkr"rrrr�<module>sh
5