403Webshell
Server IP : 35.236.43.222  /  Your IP : 216.73.216.143
Web Server : Apache
System : Linux order-form-vm-001 5.10.0-37-cloud-amd64 #1 SMP Debian 5.10.247-1 (2025-12-11) x86_64
User : deploy ( 1002)
PHP Version : 8.1.31
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : OFF
Directory :  /usr/lib/google-cloud-sdk/lib/googlecloudsdk/calliope/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /usr/lib/google-cloud-sdk/lib/googlecloudsdk/calliope/__pycache__/base.cpython-311.pyc
�

������dZddlmZddlmZddlmZddlZddlZddlZddlZddl	m
Z
ddlZddlZddl
Z
ddlmZddlmZdd	lmZdd
lmZddlmZddlmZddlZ	ejZn
#e$reZYnwxYwd
ZdZdZdZdZdZdZ dZ!dZ"dZ#dZ$dZ%dZ&dZ'dZ(dZ)dZ*dZ+dZ,d Z-d!Z.d"Z/d#Z0d$Z1d%Z2d&Z3d'Z4d(Z5d)Z6d*Z7d+Z8d,Z9d-Z:d.Z;d/Z<d)Z6d0Z=d1Z>d2Z?d3Z@d4ZAd5ZBd6ZCd7ZDGd8�d9ejE��ZFejGGd:�d;ejH����ZIGd<�d=ejJejKeL����ZMGd>�d?eM��ZNGd@�dAeM��ZOdBZPeOdCdDdePdE�F��ZQeOdGdHdejR��ePdI�J��ZSeOdKdePdL�TdM�UejV�������N��ZWdOZXeOdPdQdRdS�T��ZYeOdUdVdWeXdX�Y��ZZeOdZej[d[e
j\d\�]��dWeXd^�_��Z]eOd`ej[d[e
j\d\�]��dWeXda�_��Z^eOdbdcejR��dWeXdd�e��Z_eOdfdQdWeXdg�h��Z`diZaeOdjd\dQdWeadk�l��ZbGdm�dnejJejKeL����ZcGdo�dpec��ZdGdq�drejJejKec����ZeGds�dtejJejKee����ZfGdu�dvejJejKee����ZgGdw�dxejJejKee����ZhGdy�dzejJejKee����ZiGd{�d|ejJejKee����ZjGd}�d~ejJejKee����ZkGd�d�ejJejKee����ZlGd��d�ejJejKee����ZmGd��d�ejJejKem����ZnGd��d�emeg��ZoGd��d�emeg��ZpGd��d�emeg��ZqGd��d�eg��Zrd��Zsd��Ztd��Zud��Zvd��Zwd��Zxd��Zyd��Zz			d�d��Z{d��Z|d��Z}			d�d��Z~ejd����Z�d��Z�d��Z�d��Z�d��Z�d��Z�d��Z�d��Z�d��Z�d��Z�d��Z�d��Z�dS)�z0Base classes for calliope commands and groups.

�)�absolute_import)�division)�unicode_literalsN��wraps)�arg_parsers)�display)�
exceptions)�log)�
properties)�resource_printerzAI and Machine Learningz	Vertex AIzAI Platform TensorboardzAPI Platform and Ecosystemsz
Anthos CLIzAnthos Authz
App Engine�Batch�Composer�ComputezData Analytics�	DatabaseszIdentity and SecurityzInternet of ThingszManagement Tools�Mobile�
NetworkingzNetwork Securityz	SDK Tools�Disks�Info�	InstanceszLoad Balancing�Tools�Storage�Transfer�Billing�Security�IdentityzBig DatazCI/CD�
Monitoring�	Solutions�
Serverless�Other�CommercezDeclarative Resource Management�
Microservices�Web3�SaaS�*�_�`c��eZdZdZdS)�DeprecationExceptionz=An exception for when a command or group has been deprecated.N��__name__�
__module__�__qualname__�__doc__���#lib/googlecloudsdk/calliope/base.pyr)r)`s������E�E�E�Er0r)c���eZdZdZd�Zd�Zed���ZdZdd�	e
��dfZd	d
�	e
��dfZe
d���Ze
d
���Ze
d���ZdS)�ReleaseTrackaDAn enum representing the release track of a command or command group.

  The release track controls where a command appears.  The default of GA means
  it will show up under gcloud.  If you enable a command or group for the alpha,
  beta, or preview tracks, those commands will be duplicated under those groups
  as well.
  c�0�||_||_||_dS�N)�prefix�help_tag�	help_note)�selfr6r7r8s    r1�__init__zReleaseTrack.__init__ns���D�K��D�M��D�N�N�Nr0c��|jSr5��name�r9s r1�__str__zReleaseTrack.__str__ss
���9�r0c��|jSr5r<r>s r1�idzReleaseTrack.idvs
���9�r0)NNN�betaz
{0}(BETA){0} zBThis command is currently in beta and might change without notice.�alphaz{0}(ALPHA){0} z�This command is currently in alpha and might change without notice. If this command fails with API permission errors despite specifying the correct project, you might be trying to access an API with an invitation-only early access allowlist.c�*�tt��S)zRGets all possible enum values.

    Returns:
      list, All the enum values.
    )�listr3r/r0r1�	AllValueszReleaseTrack.AllValues�s������r0c�8�tD]}|j|kr|cS�dS)aGets a ReleaseTrack from the given release track prefix.

    Args:
      prefix: str, The prefix string that might be a release track name.

    Returns:
      ReleaseTrack, The corresponding object or None if the prefix was not a
      valid release track.
    N)r3r6)r6�tracks  r1�
FromPrefixzReleaseTrack.FromPrefix�s3������	���	�	�����
 ��4r0c�~�	t|S#t$r#td�|�����wxYw)aGets a ReleaseTrack from the given release track prefix.

    Args:
      id: str, The id string that must be a release track name.

    Raises:
      ValueError: For unknown release track ids.

    Returns:
      ReleaseTrack, The corresponding object.
    zUnknown release track id [{}].)r3�KeyError�
ValueError�format)rAs r1�FromIdzReleaseTrack.FromId�sO��D�
�"�
����D�D�D��7�>�>�r�B�B�C�C�C�D���s��-<N)r+r,r-r.r:r?�propertyrA�GArM�
MARKDOWN_BOLD�BETA�ALPHA�staticmethodrFrIrNr/r0r1r3r3ds������������
�������8���"�����]�+�+�J�
�$�����m�,�,�5�		�%�����<���
�
��<�
��D�D��<�D�D�Dr0r3c�Z�eZdZdZd�Zed���Zejd���Z	d�Z
d�ZdS)�ActionzBA class that allows you to save an Action configuration for reuse.c�"�||_||_dS)z�Creates the Action.

    Args:
      *args: The positional args to parser.add_argument.
      **kwargs: The keyword args to parser.add_argument.
    N)�args�kwargs)r9rXrYs   r1r:zAction.__init__�s���D�I��D�K�K�Kr0c��|jdS�Nr)rXr>s r1r=zAction.name�s���9�Q�<�r0c��dS)z�Adds this Action to the given parser.

    Args:
      parser: The argparse parser.

    Returns:
      The result of adding the Action to the parser.
    Nr/�r9�parsers  r1�AddToParserzAction.AddToParser�s	��	�Dr0c��dS)z]Removes this Action from the given parser.

    Args:
      parser: The argparse parser.
    Nr/r]s  r1�RemoveFromParserzAction.RemoveFromParser�s	��	�Dr0c��dS)z�Sets the default value for this Action in the given parser.

    Args:
      parser: The argparse parser.
      default: The default value.
    Nr/)r9r^�defaults   r1�
SetDefaultzAction.SetDefault��	��	�Dr0N)r+r,r-r.r:rOr=�abc�abstractmethodr_rardr/r0r1rVrV�s�������J�J��������8����		�		���		�	�	�	�	�	�	�	�	r0rVc�4��eZdZdZ�fd�Zd�Zd�Zd�Z�xZS)�
ArgumentGroupzMA class that allows you to save an argument group configuration for reuse.
  c�V��tt|��j|i|��g|_dSr5)�superrir:�	arguments�r9rXrY�	__class__s   �r1r:zArgumentGroup.__init__�s0���'�E�-����'��8��8�8�8��D�N�N�Nr0c�:�|j�|��dSr5)rl�append)r9�args  r1�AddArgumentzArgumentGroup.AddArgument�s���N���#�����r0c�n�|�|��}|jD]}|�|���|S)z�Adds this argument group to the given parser.

    Args:
      parser: The argparse parser.

    Returns:
      The result of parser.add_argument().
    )�_CreateGrouprlr_)r9r^�grouprqs    r1r_zArgumentGroup.AddToParser�sB��
���f�%�%�E��~����	�o�o�e������Lr0c�0�|j|ji|j��Sr5)�	add_grouprXrYr]s  r1rtzArgumentGroup._CreateGroup�s���6��T�Y�6�$�+�6�6�6r0)	r+r,r-r.r:rrr_rt�
__classcell__�rns@r1riri�so��������������������7�7�7�7�7�7�7r0ric�0�eZdZdZd�Zd�Zd�Zd�Zd�ZdS)�ArgumentzDA class that allows you to save an argument configuration for reuse.c�n�tj|j|j��D]}|j|jvr|cS�dS)z"Returns the flag object in parser.N)�	itertools�chain�	flag_args�ancestor_flag_argsr=�option_strings)r9r^�flags   r1�	__GetFlagzArgument.__GetFlagsF����� 0�&�2K�L�L����	
��d�)�	)�	)�����
*��4r0c�0�|j|ji|j��S)z�Adds this argument to the given parser.

    Args:
      parser: The argparse parser.

    Returns:
      The result of parser.add_argument().
    )�add_argumentrXrYr]s  r1r_zArgument.AddToParser
s ���6���	�9�T�[�9�9�9r0c�h�|�|��}|�r|jd}||fg}d|dd�z}tj|j|j��D]"}||jvr|�||f���#|j�||��|D]�\}}|j	�
|jd��|j|jvr|j�
|j��||jvr|j�
|��||jvr|j�
|����dSdS)z[Removes this flag from the given parser.

    Args:
      parser: The argparse parser.
    rz--no-�N)�_Argument__GetFlagr�r}r~rr�rp�	container�_handle_conflict_resolve�defaults�pop�dest�dests�removerl)r9r^r�r=�	conflicts�no_name�no_flagr&s        r1razArgument.RemoveFromParsersb���>�>�&�!�!�D��(�
�
 ��
#�d��$�<�.�i��$�q�r�r�(�"�g��_�V�%5�%+�%>�@�@�/�/�'��g�,�,�,�
�
�
�G�W�-�
.�
.�
.��
�n�-�-�d�I�>�>�>��(�(�'�!�T�����D�I�t�,�,�,��9���$�$�
�,�
�
�d�i�
(�
(�
(��6�#�#�#�
�
�
!�
!�$�
'�
'�
'��6�#�#�#�
�
�
!�
!�$�
'�
'�
'��'(�(�(�(r0c�p�|�|��}|r�|j|i}|jdi|��|j}t	jd|tj��}|r>d�|�d��||�d����}n|d�|��z}||_dSdS)z�Sets the default value for this flag in the given parser.

    Args:
      parser: The argparse parser.
      default: The default flag value.
    z%(.*The default is ).*?(\.([ \t\n].*))z{}*{}*{}�r�z The default is *{}*.Nr/)	r�r��set_defaults�help�re�search�DOTALLrMru)r9r^rcr�rY�
original_help�match�new_helps        r1rdzArgument.SetDefault4s����>�>�&�!�!�D����	�7�#�f��f��#�#�F�#�#�#��i�m��i�@�%�r�y�2�2�e�	�K��$�$�U�[�[��^�^�W�e�k�k�!�n�n�M�M��� �#:�#A�#A�'�#J�#J�J���d�i�i�i��r0c�6�t|jd��S)N�hidden)�boolrYr>s r1�IsHiddenzArgument.IsHiddenJs�����H�%�&�&�&r0N)	r+r,r-r.r�r_rardr�r/r0r1r{r{se������L�L����	:�	:�	:�(�(�(�8���,'�'�'�'�'r0r{z
COMMONLY USEDz--flags-file�	YAML_FILEaS        A YAML or JSON file that specifies a *--flag*:*value* dictionary.
        Useful for specifying complex flag values with special characters
        that work with any command interpreter. Additionally, each
        *--flags-file* arg is replaced by its constituent flags. See
        $ gcloud topic flags-file for more information.)�metavarrc�categoryr�z	--flatten�KEYa�        Flatten _name_[] output resource slices in _KEY_ into separate records
        for each item in each slice. Multiple keys and slices may be specified.
        This also flattens keys for *--format* and *--filter*. For example,
        *--flatten=abc.def* flattens *abc.def[].ghi* references to
        *abc.def.ghi*. A resource record containing *abc.def[]* with N elements
        will expand to N records in the flattened output. This allows us to
        specify what `resource-key` the `filter` will operate on. This flag
        interacts with other flags that are applied in this order: *--flatten*,
        *--sort-by*, *--filter*, *--limit*.)r�rc�typer�r�z--formata�        Sets the format for printing command output resources. The default is a
        command-specific human-friendly output format. If both `core/format` and
        `--format` are specified, `--format` takes precedence. `--format`
        and `core/format` both take precedence over `core/default_format`. The
        supported formats are limited to: `{0}`. For more details run $ gcloud
        topic formats. Run `$ gcloud config set --help` to see more information
        about `core/format`z`, `)rcr�r�zLIST COMMANDz--async�
store_true�async_zV    Return immediately, without waiting for the operation in progress to
    complete.)�actionr�r�z--filter�
EXPRESSIONFa`    Apply a Boolean filter _EXPRESSION_ to each resource item to be listed.
    If the expression evaluates `True`, then that item is listed. For more
    details and examples of filter expressions, run $ gcloud topic filters. This
    flag interacts with other flags that are applied in this order: *--flatten*,
    *--sort-by*, *--filter*, *--limit*.)r��require_coverage_in_testsr�r�z--limitr�T)�	unlimitedz�    Maximum number of resources to list. The default is *unlimited*.
    This flag interacts with other flags that are applied in this order:
    *--flatten*, *--sort-by*, *--filter*, *--limit*.
    )r�r�r�r�z--page-sizeaM    Some services group resource list output into pages. This flag specifies
    the maximum number of resources per page. The default is determined by the
    service if it supports paging, otherwise it is *unlimited* (no paging).
    Paging may be applied before or after *--filter* and *--limit* depending
    on the service.
    z	--sort-by�FIELDa%    Comma-separated list of resource field key names to sort by. The
    default order is ascending. Prefix a field with ``~'' for descending
    order on that field. This flag interacts with other flags that are applied
    in this order: *--flatten*, *--sort-by*, *--filter*, *--limit*.
    )r�r�r�r�r�z--uria    Print a list of resource URIs instead of the default output, and change the
    command output to a list of URIs. If this flag is used with *--format*,
    the formatting is applied on this URI list. To display URIs alongside other
    keys instead, use the *uri()* transform.
    )r�r�r�r�zBINARY BACKED COMMANDz--show-exec-errorz^If true and command fails, print the underlying command that was executed and its exit status.)r�r��requiredr�r�c��eZdZdZdZdZdZdZdZdZ	dZ
dZdZdZ
dZdd�Zed���Zed���Zed���Zed	���Zed
���Zed���Zed���Zed
���Zed���Zed���Zed���Zedd���Zed���Zed���Zed���Z ed���Z!dS)�_Commonz!Base class for Command and Group.NFTc�"�d|_||_dSr[)�	exit_code�is_group)r9r�s  r1r:z_Common.__init__�s���D�N��D�M�M�Mr0c��dS)z\Set up arguments for this command.

    Args:
      parser: An argparse.ArgumentParser.
    Nr/�r^s r1�Argsz_Common.Args�rer0c��dS)zUAdds subclass flags.

    Args:
      parser: An argparse.ArgumentParser object.
    Nr/r�s r1�_Flagsz_Common._Flags�rer0c��|jSr5��
_is_hidden��clss r1r�z_Common.IsHidden�s
���>�r0c��|jS)z?Returns whether or not this command or group is auto generated.��_is_auto_generatedr�s r1�IsAutoGeneratedz_Common.IsAutoGenerated�s
���!�!r0c��|jSr5��_universe_compatibler�s r1�IsUniverseCompatiblez_Common.IsUniverseCompatibles���#�#r0c��|jSr5)�_default_universe_compatibler�s r1�IsDefaultUniverseCompatiblez#_Common.IsDefaultUniverseCompatibles���+�+r0c�,�tjr|jSdS�NT)�six�PY2�_is_unicode_supportedr�s r1�IsUnicodeSupportedz_Common.IsUnicodeSupporteds��
�w�'�
�
&�&��4r0c��|jSr5)�_release_trackr�s r1r3z_Common.ReleaseTrack�����r0c��|jSr5)�_valid_release_tracksr�s r1�ValidReleaseTracksz_Common.ValidReleaseTrackss���$�$r0c�0�tD]~}||jvr�g}|�|dz|jz��|jr |�|dz|jz��|D]&}t||��rt
||��ccS�'�t
||d��S)a
Gets the attribute value from obj for tracks.

    The values are checked in ReleaseTrack order.

    Args:
      obj: The object to extract attribute from.
      attribute: The attribute name in object.

    Returns:
      The attribute value from obj for tracks.
    r&N)r3r�rprAr6�hasattr�getattr)r��obj�	attributerH�namesr=s      r1�GetTrackedAttributez_Common.GetTrackedAttributes����	$�	$��	�c�/�	/�	/���e��l�l�9�s�?�U�X�-�.�.�.�	��5�
���Y��_�u�|�3�4�4�4��$�$�$��3����	$���d�#�#�
#�
#�
#�
#�
#�	$�$��3�	�4�(�(�(r0c��|jSr5��_noticesr�s r1�Noticesz_Common.Notices0s
���<�r0c�P�|jsi|_||jvr|rdS||j|<dSr5r�)r��tag�msg�preserve_existings    r1�	AddNoticez_Common.AddNotice4s=���<���c�l�
�c�l���0���f��C�L����r0c��|jSr5��_is_deprecatedr�s r1�
Deprecatedz_Common.Deprecated<r�r0c��||_dSr5r�)r��
is_deprecateds  r1�
SetDeprecatedz_Common.SetDeprecated@s��&�C���r0c�,�|jr|jjSdS)z�Get a generator function that can be used to execute a gcloud command.

    Returns:
      A bound generator function to execute a gcloud command.
    N)�_cli_generator�Generater�s r1�GetCLIGeneratorz_Common.GetCLIGeneratorDs ����)�
�
�
(�(��4r0c��tjjj���rdS|���rA|���|vr-tjjj�d��dSdSdS)a/Enable self signed jwt feature for the given tracks.

    The feature can be disabled manually by running
    `gcloud config set auth/service_account_use_self_signed_jwt false`.

    Args:
      tracks: [base.ReleaseTrack], A list of release tracks where self signed
        jwt feature is enabled.
    NT)r�VALUES�auth�#service_account_use_self_signed_jwt�IsExplicitlySetr3�Set)r��trackss  r1�EnableSelfSignedJwtForTracksz$_Common.EnableSelfSignedJwtForTracksOs���	���B�R�R�T�T�
�
�f�
�����K�c�.�.�0�0�F�:�:����@�D�D�T�J�J�J�J�J�K�K�:�:r0)F)"r+r,r-r.r�r�r�r�r�r�r�r�r�r�r�r:rTr�r��classmethodr�r�r�r�r�r3r�r�r�r�r�r�r�r�r/r0r1r�r��s$������)�)�
�(��.��*������.���!%����
�(��.������	�	��<�	��	�	��<�	�����;���"�"��;�"��$�$��;�$��,�,��;�,�����;������;���%�%��;�%��)�)��;�)�0����;�������;������;���'�'��;�'�����;���K�K��;�K�K�Kr0r�c�,��eZdZdZdZ�fd�Zd�Z�xZS)�Groupz.Group is a base class for groups to implement.Tc�Z��tt|���d���dS)NT�r�)rkr�r:)r9rns �r1r:zGroup.__init__is*���	�%��������.�.�.�.�.r0c��dS)a>Modify the context that will be given to this group's commands when run.

    Args:
      context: {str:object}, A set of key-value pairs that can be used for
          common initialization among commands.
      args: argparse.Namespace: The same namespace given to the corresponding
          .Run() invocation.
    Nr/)r9�contextrXs   r1�FilterzGroup.Filterls	��	�Dr0)r+r,r-r.�IS_COMMAND_GROUPr:r�rxrys@r1r�r�dsS�������6�6���/�/�/�/�/�		�		�		�		�		�		�		r0r�c���eZdZdZdZ�fd�Zed���Zd�Ze	d���Z
ejd���Z
d�Zd	�Zd
�Z�xZS)�Commanda�Command is a base class for commands to implement.

  Attributes:
    _cli_do_not_use_directly: calliope.cli.CLI, The CLI object representing this
      command line tool. This should *only* be accessed via commands that
      absolutely *need* introspection of the entire CLI.
    context: {str:object}, A set of key-value pairs that can be used for
        common initialization among commands.
    _uri_cache_enabled: bool, The URI cache enabled state.
  Tc���tt|���d���||_||_d|_dS)NFr�)rkrr:�_cli_do_not_use_directlyr��_uri_cache_enabled)r9�clir�rns   �r1r:zCommand.__init__�sA���	�'�4���!�!�5�!�1�1�1�$'�D�!��D�L�#�D���r0c��|jSr5)rr>s r1�_cli_power_users_onlyzCommand._cli_power_users_only�s���(�(r0c�:�|j�|d���S)aLExecute a command using the given CLI.

    Do not introduce new invocations of this method unless your command
    *requires* it; any such new invocations must be approved by a team lead.

    Args:
      args: list of str, the args to Execute() via the CLI.

    Returns:
      pass-through of the return value from Execute()
    F)�call_arg_complete)r�Execute�r9rXs  r1�ExecuteCommandDoNotUsezCommand.ExecuteCommandDoNotUse�s ���%�-�-�d�e�-�L�L�Lr0c��|j�tjjj�����dS)zRSets the default output format.

    Args:
      parser: The argparse parser.
    N)�display_info�	AddFormatrr��core�default_format�Getr�s r1r�zCommand._Flags�s6����!�!�*�"3�"8�"G�"K�"K�"M�"M�N�N�N�N�Nr0c��dS)z�Runs the command.

    Args:
      args: argparse.Namespace, An object that contains the values for the
          arguments specified in the .Args() method.

    Returns:
      A resource object dispatched by display.Displayer().
    Nr/rs  r1�RunzCommand.Run�s	��	�Dr0c�
�|}dS)��Called after resources are displayed if the default format was used.

    Args:
      resources_were_displayed: True if resources were displayed.
    Nr/)r9�resources_were_displayedr&s   r1�EpilogzCommand.Epilog�s
��	!�A�A�Ar0c�R�tj||d�����S)zFReturns the key names referenced by the filter and format expressions.N)r	�	Displayer�GetReferencedKeyNamesrs  r1rzCommand.GetReferencedKeyNames�s#����T�4��.�.�D�D�F�F�Fr0c��dS)z�Returns a function that transforms a command resource item to a URI.

    Returns:
      func(resource) that transforms resource into a URI.
    Nr/r>s r1�
GetUriFunczCommand.GetUriFunc�s	���4r0)r+r,r-r.�
IS_COMMANDr:rOrrrTr�rfrgrrrrrxrys@r1rrxs��������	�	��*�$�$�$�$�$��)�)��8�)�M�M�M��O�O��<�O���
	�
	���
	�!�!�!�G�G�G�������r0rc��eZdZdZd�ZdS)�TopicCommandz2A command that displays its own help on execution.c�R�|�|jdd�dgz��dS)Nr�z--document=style=topic)r�command_pathrs  r1rzTopicCommand.Run�s8������ 1�!�"�"� 5�!9� :�!;�<�<�<��4r0N)r+r,r-r.rr/r0r1r r �s)������:�:�����r0r c�(�eZdZdZed���ZdS)�
SilentCommandz"A command that produces no output.c�:�|j�d��dS)N�none)rrr�s r1r�zSilentCommand._Flags�s��
��!�!�&�)�)�)�)�)r0N)r+r,r-r.rTr�r/r0r1r$r$�s3������*�*��*�*��<�*�*�*r0r$c��eZdZdZdS)�DescribeCommandz;A command that prints one resource in the 'default' format.Nr*r/r0r1r(r(��������C�C�C�Cr0r(c��eZdZdZdS)�
ImportCommandz5A command that imports one resource from yaml format.Nr*r/r0r1r+r+�s������=�=�=�=r0r+c��eZdZdZdS)�
ExportCommandz;A command that outputs one resource to file in yaml format.Nr*r/r0r1r-r-�r)r0r-c��eZdZdZdS)�DeclarativeCommandz<Command class for managing gcp resources as YAML/JSON files.Nr*r/r0r1r/r/�s������D�D�D�Dr0r/c�>�eZdZdZed���Zed���ZdS)�BinaryBackedCommandz-A command that wraps a BinaryBackedOperation.c�:�t�|��dSr5)�SHOW_EXEC_ERROR_FLAGr_r�s r1r�zBinaryBackedCommand._Flags�s���$�$�V�,�,�,�,�,r0c��|jrtj|j��|jr$tj�|j��|jrdS|jS)z-Process results of BinaryOperation Execution.N)�stdoutr�Print�stderr�status�failed)�responses r1� _DefaultOperationResponseHandlerz4BinaryBackedCommand._DefaultOperationResponseHandler�sY����!�	�i��� � � ���(�	�j���x��'�'�'����
�T��?�r0N)r+r,r-r.rTr�r;r/r0r1r1r1�sN������5�5��-�-��<�-�����<���r0r1c�"��eZdZdZ�fd�Z�xZS)�CacheCommandz.A command that affects the resource URI cache.c�V��tt|��j|i|��d|_dSr�)rkr=r:rrms   �r1r:zCacheCommand.__init__s3���&�E�,����&��7��7�7�7�"�D���r0)r+r,r-r.r:rxrys@r1r=r=s>�������6�6�#�#�#�#�#�#�#�#�#r0r=c�.�eZdZdZed���Zd�ZdS)�ListCommandz+A command that pretty-prints all resources.c��t�|��t�|��t�|��t�|��t
�|��|j�tj	j
j�����dS)zgAdds the default flags for all ListCommand commands.

    Args:
      parser: The argparse parser.
    N)
�FILTER_FLAGr_�
LIMIT_FLAG�PAGE_SIZE_FLAG�SORT_BY_FLAG�URI_FLAGrrrr�rrrr�s r1r�zListCommand._Flagss������F�#�#�#����6�"�"�"����v�&�&�&����V�$�$�$����� � � �
��!�!�*�"3�"8�"G�"K�"K�"M�"M�N�N�N�N�Nr0c�L�|s!tj�d��dSdS)rzListed 0 items.N)rr8r6)r9rs  r1rzListCommand.Epilogs3��$�*�	�j���(�)�)�)�)�)�*�*r0N)r+r,r-r.rTr�rr/r0r1r@r@sE������3�3��O�O��<�O�*�*�*�*�*r0r@c��eZdZdZdS)�
CreateCommandz!A command that creates resources.Nr*r/r0r1rIrI$�������)�)�)�)r0rIc��eZdZdZdS)�
DeleteCommandz!A command that deletes resources.Nr*r/r0r1rLrL(rJr0rLc��eZdZdZdS)�RestoreCommandz"A command that restores resources.Nr*r/r0r1rNrN,s������*�*�*�*r0rNc��eZdZdZdS)�
UpdateCommandz!A command that updates resources.Nr*r/r0r1rPrP0s������)�)��$r0rPc��d|_|S)a?Decorator for hiding calliope commands and groups.

  Decorate a subclass of base.Command or base.Group with this function, and the
  decorated command or group will not show up in help text.

  Args:
    cmd_class: base._Common, A calliope command or group.

  Returns:
    A modified version of the provided class.
  Tr���	cmd_classs r1�HiddenrT6s���)��	�r0c��d|_|S)a�Decorator for making visible calliope commands and groups.

  Decorate a subclass of base.Command or base.Group with this function, and the
  decorated command or group will show up in help text. This is the default
  for base.Command and base.Group subclasses.

  Args:
    cmd_class: base._Common, A calliope command or group.

  Returns:
    A modified version of the provided class.
  Fr�rRs r1�VisiblerVGs���)��	�r0c��d|_|S)a!Decorator for marking calliope groups as autogenerated.

  Decorate a subclass of base.Group with this function, and the decorated
  group will be treated as autogenerated.

  Args:
    group_class: base.Group, A calliope group.

  Returns:
    A modified version of the provided class.
  Tr�)�group_classs r1�
AutogeneratedrYYs��$(�+� �	�r0c��d|_|S)a�Decorator for marking calliope commands and groups available in universes.

  Decorate a subclass of base.Command or base.Group with this function, and the
  decorated command or group will display help text with information about
  command or group is supported in universes.

  Args:
    cmd_class: base._Common, A calliope command or group.

  Returns:
    A modified version of the provided class.
  Tr�rRs r1�UniverseCompatibler[js��$(�)� �	�r0c��d|_|S)a�Decorator for marking commands & groups available only in default universe.

  Decorate a subclass of base.Command or base.Group with this function, and the
  decorated command or group will display help text with disclaimer information
  about the command or group is not available in universes.

  Args:
    cmd_class: base._Common, A calliope command or group.

  Returns:
    A modified version of the provided class.
  Fr�rRs r1�DefaultUniverseOnlyr]|s��$)�)� �	�r0c�"�d|_d|_|S)a�Decorator for marking commands & groups not available in default universe.

  Decorate a subclass of base.Command or base.Group with this function, and the
  decorated command or group will display help text with disclaimer information
  about the command or group is supported only outside the default universe.

  Args:
    cmd_class: base._Common, A calliope command or group.

  Returns:
    A modified version of the provided class.
  TF)r�r�rRs r1�NonDefaultUniverseOnlyr_�s��$(�)� �+0�)�(�	�r0c��d|_|S)auDecorator for calliope commands and groups that support unicode.

  Decorate a subclass of base.Command or base.Group with this function, and the
  decorated command or group will not raise the argparse unicode command line
  argument exception.

  Args:
    cmd_class: base._Common, A calliope command or group.

  Returns:
    A modified version of the provided class.
  T)r�rRs r1�UnicodeIsSupportedra�s��%)�)�!�	�r0c����fd�}|S)z�Mark this class as the command implementation for the given release tracks.

  Args:
    *tracks: [ReleaseTrack], A list of release tracks that this is valid for.

  Returns:
    The decorated function.
  c�0��t���|_|S)z#Wrapper function for the decorator.)�setr�)rSr�s �r1�ApplyReleaseTracksz)ReleaseTracks.<locals>.ApplyReleaseTracks�s���'*�&�k�k�I�#��r0r/)r�res` r1�
ReleaseTracksrf�s$��������

�r0�This command is deprecated.�This command has been removed.c��������fd�}|S)a.Decorator that marks a Calliope command as deprecated.

  Decorate a subclass of base.Command with this function and the
  decorated command will be modified as follows:

  - If is_removed is false, a warning will be logged when *command* is run,
  otherwise an *exception* will be thrown containing error message

  -Command help output will be modified to include warning/error message
  depending on value of is_removed

  - Command help text will automatically hidden from the reference documentation
  (e.g. @base.Hidden) if is_removed is True


  Args:
      is_removed: boolean, True if the command should raise an error
      when executed. If false, a warning is printed
      warning: string, warning message
      error: string, error message

  Returns:
    A modified version of the provided class.
  c����r�}d�t��}n�}d�t��}|�||��|�d�����fd�}t	|t
��r||j��|_n||j��|_�rt|��S|S)z�Wrapper Function that creates actual decorated class.

    Args:
      cmd_class: base.Command or base.Group subclass to be decorated

    Returns:
      The decorated class.
    z{0}(REMOVED){0} z{0}(DEPRECATED){0} Tc�D���t�������fd���}|S)Nc�^���rt����tj����|i|��Sr5)r)r�warning)rX�kw�error�
is_removed�run_funcrms  ����r1�
WrappedRunzMDeprecate.<locals>.DeprecateCommand.<locals>.RunDecorator.<locals>.WrappedRun�s>����	,�$�U�+�+�
+���G�����x��$��$�$�$r0r)rqrrrorprms` ���r1�RunDecoratorz9Deprecate.<locals>.DeprecateCommand.<locals>.RunDecorator�sD�����X���%�%�%�%�%�%�%���%�
�r0)	rMrQr�r��
issubclassr�r�rrT)rSr��deprecation_tagrsrorprms    ���r1�DeprecateCommandz#Deprecate.<locals>.DeprecateCommand�s�����D��c�*�1�1�-�@�@�o�o��c�-�4�4�]�C�C�o�
�����-�-�-�
���D�!�!�!���������)�U�#�#�2�%��i�&6�7�7�i���"�l�9�=�1�1�i�m���
�I�
�
���r0r/)rprmrorvs``` r1�	Deprecaterw�s1�����8$�$�$�$�$�$�$�L
�r0c�R�|�dd�����S)aReturns a function that ensures choice flag values match Cloud SDK Style.

  Args:
    value: string, string representing flag choice value parsed from command
           line.

  Returns:
       A string value entirely in lower case, with words separated by
       hyphens.
  r&�-)�replace�lower��values r1�_ChoiceValueTyper~	s$��
���s�C�	 �	 �	&�	&�	(�	(�(r0c��d�|D��S)z4Applies _ChoiceValueType to a collection of choices.c�,�g|]}t|����Sr/)r~)�.0�xs  r1�
<listcomp>z#SanitizeChoices.<locals>.<listcomp>s!��	0�	0�	0�!�
�1�
�
�	0�	0�	0r0r/)�iterables r1�SanitizeChoicesr�s��	0�	0�x�	0�	0�	0�0r0c	���
�|std���t|tj��rt|tj��r5t
d�d�|�������tj
d���
�
fd�|D��}	|	r5td�d�|	�������t|||t||||||��
�
S)aReturns Argument with a Cloud SDK style compliant set of choices.

  Args:
    name_or_flag: string, Either a name or a list of option strings,
       e.g. foo or -f, --foo.
    choices: container,  A container (e.g. set, dict, list, tuple) of the
       allowable values for the argument. Should consist of strings entirely in
       lower case, with words separated by hyphens.
    help_str: string,  A brief description of what the argument does.
    required: boolean, Whether or not the command-line option may be omitted.
    action: string or argparse.Action, The basic type of argeparse.action
       to be taken when this argument is encountered at the command line.
    metavar: string,  A name for the argument in usage messages.
    dest: string,  The name of the attribute to be added to the object returned
       by parse_args().
    default: string,  The value produced if the argument is absent from the
       command line.
    hidden: boolean, Whether or not the command-line option is hidden.

  Returns:
     Argument object with choices, that can accept both lowercase and uppercase
     user input with hyphens or undersores.

  Raises:
     TypeError: If choices are not an iterable container of string options.
     ValueError: If provided choices are not Cloud SDK Style compliant.
  zChoices must not be empty.z7Choices must be an iterable container of options: [{}].�, z^([a-z0-9]\.?-?)+[a-z0-9]$c�>��g|]}��|���|��Sr/)r�)r�r��	choice_res  �r1r�z"ChoiceArgument.<locals>.<listcomp>Gs*���B�B�B�1�y���q�/A�/A�B�Q�B�B�Br0z^Invalid choices [{}]. Choices must be entirely in lowercase with words separated by hyphens(-))	�choicesr�r�r�r�r�r�rcr�)
rL�
isinstance�collections_abc�Iterabler��string_types�	TypeErrorrM�joinr��compiler{r~)�name_or_flagr��help_strr�r�r�r�rcr��invalid_choicesr�s          @r1�ChoiceArgumentr�s���>
�3�
�1�
2�
2�2�
�W�o�6�
7�
7�!�	�G�S�-�	.�	.�!�
�A�H�H��I�I�g���	 �	 �!�!�!��j�6�7�7�)�B�B�B�B��B�B�B�/��N�
�
)�*0�&����?�1K�1K�*L�*L�N�N�N�
�,��(�'�h�v�!��g�f�
N�
N�
N�Nr0c#�dK�tj���tj�tjjjtjjjd��	dV�tj���dS#tj���wxYw)a�Context where x-goog-user-project header is not populated.

  In this context, user's setting of quota_project will be ignored, including
  settings in:
  - --billing-project
  - configuration of billing/quota_project
  - CLOUDSDK_BILLING_QUOTA_PROJECT
  quota_project settings by the command group's Filter functions will also be
  ignored. Use this context when you don't want to send the x-goog-user-project
  header.

  Yields:
    yield to the surrounded code block.
  N)rr��PushInvocationValues�SetInvocationValue�billing�
quota_project�LEGACY�PopInvocationValuesr/r0r1�WithLegacyQuotar�Rs����� 
��(�(�*�*�*���&�&�z�'8�'@�'N�'1�'8�'@�'G��O�O�O�,�	�E�E�E���)�)�+�+�+�+�+��J��)�)�+�+�+�+���s�+B� B/c���tjjj���tjjj��fd���dS)Nc����Sr5r/r|s�r1�<lambda>z._SetUserProjectQuotaFallback.<locals>.<lambda>ps���e�r0)rr�r�r��
ClearCallback�AddCallbackr|s`r1�_SetUserProjectQuotaFallbackr�ksI���
���)�7�7�9�9�9����)�5�5�m�m�m�m�D�D�D�D�Dr0c�L�ttjjj��dS)awDisable the quota project header.

   This function will set the value for properties.VALUES.billing.quota_project
   which is used to decide if we want to send the quota project header
   x-goog-user-project and what value to put in the header. Gcloud's property
   has multiple layers of fallbacks when resolving its value. Specifically for
   quota_project property:

   L1: invocation stack populated by parsing --billing-project.
   L2: its env variable CLOUDSDK_BILLING_QUOTA_PROJECT
   L3: user configuration or installation configuration from gcloud config set.
   L4: value provided by its fallbacks if exists.
   L5: default value

  This function sets the value at L4 (fallbacks). It should be used in command
  group's Filter function so that the command group will work in LEGACY mode
  (DO NOT send the quota project header). It sets at L4 because:

  1. L1-L3 are user settings we want to honor. This func
     cannot operate in L1-L3 because it will mix with user settings.
     Whether the setting is from user is an important information when we decide
     how override works.
  2. L4 can override the default value (L5).
  N)r�rr�r�r�r/r0r1�DisableUserProjectQuotar�ss!��2�z�0�8�?�@�@�@�@�@r0c�L�ttjjj��dS)arEnable the quota project header for current project.

  The project in core/project will be used to populate the quota project header.
  It should be used in command group's Filter function so that commands in the
  group will send the current project (core/project) in the quota project
  header.

  See the docstring of DisableUserProjectQuota for more information.
  N)r�rr�r��CURRENT_PROJECTr/r0r1�EnableUserProjectQuotar��s!���z�0�8�H�I�I�I�I�Ir0c�L�ttjjj��dS)a�Tries the current project and fall back to the legacy mode.

  The project in core/project will be used to populate the quota project header.
  It should be used in command group's Filter function so that commands in the
  group will send the current project (core/project) in the quota project
  header. If the user does not have the permission to use the project,
  we will retry the request after removing the quota project header.

  See the docstring of DisableUserProjectQuota for more information.
  N)r�rr�r��CURRENT_PROJECT_WITH_FALLBACKr/r0r1�"EnableUserProjectQuotaWithFallbackr��s,������=�?�?�?�?�?r0c��tjjj���tjjjkS)z=Returns if the CURRENT_PROJECT_WITH_FALLBACK mode is enabled.)rr�r�r�rr�r/r0r1�#UserProjectQuotaWithFallbackEnabledr��s4��	�	�	"�	0�	4�	4�
�
��� �>�
?�?r0c�X�tjjj�d��dS)z�Opts the command group out of using requests to make HTTP requests.

  Call this function in the Filter method of the command group
  to disable requests.
  TN)rr��	transport�opt_out_requestsr�r/r0r1�OptOutRequestsr��s'��
���.�2�2�4�8�8�8�8�8r0c���t��oQtjjj���o(tjjj���S)z�Returns True if using requests to make HTTP requests.

  transport/disable_requests_override is a global switch to turn off requests in
  case support is buggy. transport/opt_out_requests is an internal property
  to opt surfaces out of requests.
  )�
UseGoogleAuthrr�r�r��GetBool�disable_requests_overrider/r0r1�UseRequestsr��sS���/�/�N���)�:�B�B�D�D�
D�N���)�C�K�K�M�M�
M�Or0c�X�tjjj�d��dS)z�Opt-out the command group to use google auth for authentication.

  Call this function in the Filter method of the command group
  to opt-out google-auth.
  TN)rr�r��opt_out_google_authr�r/r0r1�OptOutGoogleAuthr��s'��
���,�0�0��6�6�6�6�6r0c��tjjj���p'tjjj���S)z�Returns True if using google-auth to authenticate the http request.

  auth/disable_load_google_auth is a global switch to turn off google-auth in
  case google-auth is crashing. auth/opt_out_google_auth is an internal property
  to opt-out a surface.
  )rr�r�r�r��disable_load_google_authr/r0r1r�r��sF����$�8�@�@�B�B�H���$�=�E�E�G�G�
I�Ir0c��ttj|�������}d�d�|D����}tjd�||����dS)aLog (to debug) the command/arguments being run in a standard format.

  `gcloud feedback` depends on this format.

  Example format is:

      Running [gcloud.example.command] with arguments: [--bar: "baz"]

  Args:
    prog: string, the dotted name of the command being run (ex.
        "gcloud.foos.list")
    args: argparse.namespace, the parsed arguments from the command line
  r�c�@�g|]\}}d�||����S)z{}: "{}")rM)r��k�vs   r1r�zLogCommand.<locals>.<listcomp>�s,��M�M�M�d�a��*�+�+�A�q�1�1�M�M�Mr0z!Running [{}] with arguments: [{}]N)�sortedr��	iteritems�GetSpecifiedArgsr�r�debugrM)�progrX�specified_args�
arg_strings    r1�
LogCommandr��sn���#�-��(=�(=�(?�(?�@�@�A�A�.��y�y�M�M�n�M�M�M�N�N�*��)�/�6�6�t�Z�H�H�I�I�I�I�Ir0c��|jr/|j���rtjd���dStjjj���}|r(|���rtjd���dSdS)z�Prohibit specifying project as a project number.

  Most APIs accept both project number and project id, some of them accept only
  project ids.

  Args:
     args: argparse.namespace, the parsed arguments from the command line
  zlThe value of ``--project'' flag was set to Project number.To use this command, set it to PROJECT ID instead.Nz�The value of ``core/project'' property is set to project number.To use this command, set ``--project'' flag to PROJECT ID or set ``core/project'' property to PROJECT ID.)�project�isdigitr�InvalidValueErrorr�rr)rX�projs  r1�RequireProjectIDr��s���
�\���|�����
��(�?�
@�
@�@�
�f���!�)�-�-�/�/�D����������(�9�
�
�����r0)Trgrh)NFNNNNF)�r.�
__future__rrrrf�collections�
contextlib�enum�	functoolsrr}r��sys�googlecloudsdk.callioperr	�googlecloudsdk.corer
rr�googlecloudsdk.core.resourcer
r�r��AttributeError� AI_AND_MACHINE_LEARNING_CATEGORY�VERTEX_AI_CATEGORY�TENSORBOARD_CATEGORY�$API_PLATFORM_AND_ECOSYSTEMS_CATEGORY�ANTHOS_CLI_CATEGORY�ANTHOS_AUTH_CATEGORY�APP_ENGINE_CATEGORY�BATCH_CATEGORY�COMPOSER_CATEGORY�COMPUTE_CATEGORY�DATA_ANALYTICS_CATEGORY�DATABASES_CATEGORY�IDENTITY_AND_SECURITY_CATEGORY�INTERNET_OF_THINGS_CATEGORY�MANAGEMENT_TOOLS_CATEGORY�MOBILE_CATEGORY�NETWORKING_CATEGORY�NETWORK_SECURITY_CATEGORY�SDK_TOOLS_CATEGORY�DISKS_CATEGORY�
INFO_CATEGORY�INSTANCES_CATEGORY�LOAD_BALANCING_CATEGORY�TOOLS_CATEGORY�STORAGE_CATEGORY�TRANSFER_CATEGORY�BILLING_CATEGORY�SECURITY_CATEGORY�IDENTITY_CATEGORY�BIG_DATA_CATEGORY�CI_CD_CATEGORY�MONITORING_CATEGORY�SOLUTIONS_CATEGORY�SERVERLESS_CATEGORY�UNCATEGORIZED_CATEGORY�COMMERCE_CATEGORY�"DECLARATIVE_CONFIGURATION_CATEGORY�MICROSERVICES_CATEGORY�
WEB3_CATEGORY�
SAAS_CATEGORYrQ�MARKDOWN_ITALIC�
MARKDOWN_CODE�Errorr)�unique�Enumr3�with_metaclass�ABCMeta�objectrVrir{�COMMONLY_USED_FLAGS�FLAGS_FILE_FLAG�ArgList�FLATTEN_FLAGrMr��SupportedFormats�FORMAT_FLAG�LIST_COMMAND_FLAGS�
ASYNC_FLAGrB�
BoundedInt�maxsizerCrDrErF�BINARY_BACKED_COMMAND_FLAGSr3r�r�rr r$r(r+r-r/r1r=r@rIrLrNrPrTrVrYr[r]r_rarfrwr~r�r��contextmanagerr�r�r�r�r�r�r�r�r�r�r�r�r/r0r1�<module>rs�
����'�&�&�&�&�&�������'�'�'�'�'�'�
�
�
�
�����������������������	�	�	�	�
�
�
�
�/�/�/�/�/�/�+�+�+�+�+�+�*�*�*�*�*�*�#�#�#�#�#�#�*�*�*�*�*�*�9�9�9�9�9�9�
�
�
�
� ��O�/�/��� � � ��/�/�/� ����$=� � ��0��'D�$�"��$��"��������*�� ��!8��2��.����"��.�� �����
� ��*������������������"�� ��"�� ������%F�"�(���
��
��
����
�F�F�F�F�F�:�+�F�F�F���OD�OD�OD�OD�OD�4�9�OD�OD�
��OD�d,	�,	�,	�,	�,	�
�S�
���V�
4�
4�,	�,	�,	�^7�7�7�7�7�F�7�7�7�:H'�H'�H'�H'�H'�v�H'�H'�H'�^&���(����
 �
;�
<�
<�
<���x����	��	�	�	�
 �	
/�
0�0�0��"�h���
 �
� &�v��K�K�9�(�9�;�;�<�<� >� >�?�?�?��$��
�X�
��	�
�	���
��h���#�
�
+�
,�
,�
,���X�
�	��	��3�;�$�	?�	?�	?�#�
�
�		�		�		�
����	��	��3�;�$�	?�	?�	?�#�
�
�	�	�	���x���	��	�	�	�#�
�
�
	�	�	���8���#�
�
�
	�
	�
	��6���x����
�
(�
2�
3�3�3��NK�NK�NK�NK�NK� �c� ���f�5�5�NK�NK�NK�b	�	�	�	�	�G�	�	�	�(N�N�N�N�N� �c� ���g�6�6�N�N�N�b�����%�3�%�c�k�7�;�;����*�*�*�*�*�&�C�&�s�{�G�<�<�*�*�*�D�D�D�D�D�(�c�(���g�>�>�D�D�D�>�>�>�>�>�&�C�&�s�{�G�<�<�>�>�>�D�D�D�D�D�&�C�&�s�{�G�<�<�D�D�D�E�E�E�E�E�+��+�C�K��A�A�E�E�E������,�#�,�S�[�'�B�B����,#�#�#�#�#�%�3�%�c�k�7�;�;�#�#�#�*�*�*�*�*�$�#�$�S�[�,�?�?�*�*�*�8*�*�*�*�*�L�-�*�*�*�*�*�*�*�*�L�-�*�*�*�+�+�+�+�+�\�=�+�+�+������M�������"���$���"���$���$���&���$���"�3�4�B�B�B�B�J)�)�)�1�1�1�
CH�AE��3N�3N�3N�3N�l��,�,���,�0E�E�E�A�A�A�8
J�
J�
J�?�?�?�?�?�?�9�9�9�
O�
O�
O�7�7�7�I�I�I�J�J�J�&����s� A(�(A2�1A2

Youez - 2016 - github.com/yon3zu
LinuXploit