HEX
Server: LiteSpeed
System: Linux shams.tasjeel.ae 5.14.0-611.5.1.el9_7.x86_64 #1 SMP PREEMPT_DYNAMIC Tue Nov 11 08:09:09 EST 2025 x86_64
User: infowars (1469)
PHP: 8.2.29
Disabled: NONE
Upload Files
File: //usr/lib/python3.9/site-packages/ipalib/__pycache__/messages.cpython-39.opt-1.pyc
a

�N(i=�@s�dZddlmZddlmZddlZddlmZddlm	Z
ddlmZmZddl
mZejrbeZd	d
�Zd^dd�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�Z6GdQdR�dRe�Z7GdSdT�dTe�Z8dUdV�Z9e:e;e9e<�e�dWdX�dY��Z=dZd[�Z>e?d\k�r�e>d]e=�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 |�dg��|���dS)N�messages)r�
setdefault�append�to_dict)�version�result�message�r�3/usr/lib/python3.9/site-packages/ipalib/messages.py�add_message.s
rc		Ks�|��D]6\}}t|t�szt|�||<Wqty<Yq0q||_|jj}|jdurp|durpt	d||f��|du�r|jdur�|dur�t	d|��||_d|_
|j||_t|jt�r�t
|j�||_n|j||_d|v�rpdd�}d�ttd��||d�f�}d�|j|f�|_nRt|ttf��r8t|�}n&t|�tu�r^ttd	t|t|�f��d
|_
||_||_|��D]\}}t|||��qxdS)Nz/non-generic %r needs format=None; got format=%rz/%s.format is None yet format=None, message=NoneF�instructionscSs&t|t�r"d�dd�|D��}|S|S)N�
css|]}t|�VqdS�N)�unicode)�.0�linerrr�	<genexpr>Q�zJprocess_message_arguments.<locals>.convert_instructions.<locals>.<genexpr>)�
isinstance�list�join)�valuerrrr�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_arguments3sV
��

�

�
�r2cCst�|�|Sr)�_textsr)rrrrrjs
rcs2eZdZdZd�fdd�	ZdZdZdd�Z�ZS)	�
PublicMessagezU
    **10000** Base class for messages that can be forwarded in an RPC response.
    Ncs*t|||fi|��tt|��|j�dSr)r2�superr4�__init__r()�selfr&rr#�r$rrr6sszPublicMessage.__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,r1r�code�data)�dictrr,r%r+�errnor#)r7rrrrzs�zPublicMessage.to_dict)NN)	r%�
__module__�__qualname__�__doc__r6r<r&r�
__classcell__rrr8rr4os
r4c@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%r=r>r?r<r,rr&rrrrrA�s
rAc@s eZdZdZdZdZed�ZdS)�ForwardersWarningz?
    **13002** Used when (master) zone contains forwarders
    i�2rBz�DNS forwarder semantics changed since IPA 4.0.
You may want to use forward zones (dnsforwardzone-*) instead.
For more details read the docs.NrCrrrrrD�s�rDc@s eZdZdZdZdZed�ZdS)�
DNSSECWarningz9
    **13003** Used when user change DNSSEC settings
    i�2rBz3DNSSEC support is experimental.
%(additional_info)sNrCrrrrrE�srEc@s eZdZdZdZdZed�ZdS)�OptionDeprecatedWarningz;
    **13004** Used when user uses a deprecated option
    i�2rBz6'%(option)s' option is deprecated. %(additional_info)sNrCrrrrrF�srFc@s eZdZdZdZdZed�ZdS)�OptionSemanticChangedWarningzP
    **13005** Used when option which recently changes its semantic is used
    i�2rBz@Semantic of %(label)s was changed. %(current_behavior)s
%(hint)sNrCrrrrrG�srGc@s eZdZdZdZdZed�ZdS)�DNSServerValidationWarningzK
    **13006**  Used when a DNS server is not to able to resolve query
    i�2rBz!DNS server %(server)s: %(error)s.NrCrrrrrH�srHc@s eZdZdZdZdZed�ZdS)�$DNSServerDoesNotSupportDNSSECWarningzM
    **13007** Used when a DNS server does not support DNSSEC validation
    i�2rBz~DNS server %(server)s does not support DNSSEC: %(error)s.
If DNSSEC validation is enabled on IPA server(s), please disable it.NrCrrrrrI�srIc@s eZdZdZdZdZed�ZdS)� ForwardzoneIsNotEffectiveWarningz�
    **13008** Forwardzone is not effective, forwarding will not work because
    there is authoritative parent zone, without proper NS delegation
    i�2rBz�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".NrCrrrrrJ�srJc@s eZdZdZdZdZed�ZdS)�#DNSServerDoesNotSupportEDNS0Warningzb
    **13009** Used when a DNS server does not support EDNS0, required for
    DNSSEC support
    i�2rBz�DNS server %(server)s does not support EDNS0 (RFC 6891): %(error)s.
If DNSSEC validation is enabled on IPA server(s), please disable it.NrCrrrrrK�srKc@s eZdZdZdZdZed�ZdS)�DNSSECValidationFailingWarningzJ
    **13010** Used when a DNSSEC validation failed on IPA DNS server
    i�2rBz}DNSSEC validation failed: %(error)s.
Please verify your DNSSEC configuration or disable DNSSEC validation on all IPA servers.NrCrrrrrL�srLc@s eZdZdZdZdZed�ZdS)� KerberosTXTRecordCreationFailurezZ
    **13011** Used when a _kerberos TXT record could not be added to
    a DNS zone.
    i�2rBz�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'NrCrrrrrMs�rMc@s eZdZdZdZdZed�ZdS)� KerberosTXTRecordDeletionFailurez^
    **13012** Used when a _kerberos TXT record could not be removed from
    a DNS zone.
    i�2rBz�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.NrCrrrrrNs�rNc@s eZdZdZdZdZed�ZdS)�DNSSECMasterNotInstalledzm
    **13013** Used when a DNSSEC is not installed on system (no DNSSEC
    master server is installed).
    i�2rBznNo DNSSEC key master is installed. DNSSEC zone signing will not work until the DNSSEC key master is installed.NrCrrrrrOs�rOc@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�2rBz�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.NrCrrrrrP,s�rPc@s eZdZdZdZdZed�ZdS)�CommandDeprecatedWarningz;
    **13015** Used when user uses a deprecated option
    i�2rBz0'%(command)s' is deprecated. %(additional_info)sNrCrrrrrQ<srQc@s eZdZdZdZdZed�ZdS)�ExternalCommandOutputz<
    **13016** Line of output from an external command.
    i�2�infoz%(line)sNrCrrrrrRFsrRc@s eZdZdZdZdZed�ZdS)�SearchResultTruncatedz=
    **13017** Results of LDAP search has been truncated
    i�2rBz,Search result has been truncated: %(reason)sNrCrrrrrTPsrTc@s eZdZdZdZdZed�ZdS)�BrokenTrustz:
    **13018** Trust for a specified domain is broken
    i�2rBzYYour trust to %(domain)s is broken. Please re-create it by running 'ipa trust-add' again.NrCrrrrrUZsrUc@seZdZdZdZdZdS)�ResultFormattingErrorzF
    **13019** Unable to correctly format some part of the result
    rBi�2N)r%r=r>r?r,r<rrrrrVesrVc@s eZdZdZdZdZed�ZdS)�FailedToRemoveHostDNSRecordsz5
    **13020** Failed to remove host DNS records
    i�2rBzADNS record(s) of host %(host)s could not be removed. (%(reason)s)NrCrrrrrWmsrWc@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�2rBz�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'.NrCrrrrrXxs�rXc@s eZdZdZdZdZed�ZdS)�DNSUpdateOfSystemRecordFailedz8
    **13022** Update of a DNS system record failed
    i�2rBzAUpdate of system record '%(record)s' failed with error: %(error)sNrCrrrrrY�s�rYc@s eZdZdZdZdZed�ZdS)�DNSUpdateNotIPAManagedZonezA
    **13023** Zone for system records is not managed by IPA
    i�2rBzUIPA does not manage the zone %(zone)s, please add records to your DNS server manuallyNrCrrrrrZ�s�rZc@s eZdZdZdZdZed�ZdS)�AutomaticDNSRecordsUpdateFailedz:
    **13024** Automatic update of DNS records failed
    i�2rBz~Automatic update of DNS system records failed. Please re-run update of system records manually to get list of missing records.NrCrrrrr[�s�r[c@s eZdZdZdZdZed�ZdS)�ServiceRestartRequiredz/
    **13025** Service restart is required
    i�2rBz]Service %(service)s requires restart on IPA server %(server)s to apply configuration changes.NrCrrrrr\�s�r\c@s eZdZdZdZdZed�ZdS)�LocationWithoutDNSServerz/
    **13026** Location without DNS server
    i�2rBzeNo DNS servers in IPA location %(location)s. Without DNS servers location is not working as expected.NrCrrrrr]�s�r]c@seZdZdZdZdZdS)�ServerRemovalInfozL
    **13027** Informative message printed during removal of IPA server
    i�2rSN�r%r=r>r?r<r,rrrrr^�sr^c@seZdZdZdZdZdS)�ServerRemovalWarningz?
    **13028** Warning raised during removal of IPA server
    i�2rBNr_rrrrr`�sr`c@s eZdZdZdZdZed�ZdS)�CertificateInvalidz1
    **13029** Failed to parse a certificate
    i�2�errorz.%(subject)s: Malformed certificate. %(reason)sNrCrrrrra�srac@s eZdZdZdZdZed�ZdS)�FailedToAddHostDNSRecordsz2
    **13030** Failed to add host DNS records
    i�2rBz=The host was added but the DNS update failed with: %(reason)sNrCrrrrrc�srcc@s eZdZdZdZdZed�ZdS)�$LightweightCACertificateNotAvailablez0
    **13031** Certificate is not available
    i�2rbz;The certificate for %(ca)s is not available on this server.NrCrrrrrd�srdc@s eZdZdZdZdZed�ZdS)�#MissingTargetAttributesinPermissionzD
    **13032** A permission was added with no target attributes
    i�2rBz>The permission has %(right)s rights but no attributes are set.NrCrrrrre�srec@s eZdZdZdZdZed�ZdS)�ServerUpgradeRequiredz+
    **13033** Server upgrade required
    i�2rBz�Change of the state of '%(feature)s' feature requires to run 'ipa-server-upgrade' command on IPA server %(server)s to apply configuration changes.NrCrrrrrf�s�rfc@s eZdZdZdZdZed�ZdS)�UidNumberOutOfLocalIDRangez<
    **13034** UID Number is out of all local ID Ranges
    i�2rBzpUser '%(user)s', with UID Number '%(uidnumber)d' is out of all ID Ranges, 'SID' will not be correctly generated.NrCrrrrrg
s�rgccs:|��D],\}}|�d�st|�s$qt||�r|VqdS)z'Return a tuple with all subclasses
    rN)r �
startswithr�
issubclass)Z	variables�baser0rrrr�
iter_messagess

rkcCs|jSr)r<)�Errr�<lambda>!rrm)r0cCs6|D]}td|j|jf�qtdt|�|f�dS)Nz%d	%sz(%d %s))�printr<r%�len)Zlabel�classes�clsrrr�print_report#srr�__main__zpublic messages)NN)@r?Z
__future__r�inspectrZsixZipalib.constantsrZipalib.textrr*rrZipalib.capabilitiesrZPY3r)rrr2r3�UserWarningr4rArDrErFrGrHrIrJrKrLrMrNrOrPrQrRrTrUrVrWrXrYrZr[r\r]r^r`rarcrdrerfrgrk�tuple�sorted�globalsZpublic_messagesrrr%rrrr�<module>sn
5








	


�