
    c                         S r SSKJr  SSKJr  SSKJr  SSKJr  SSKJ	r	  SSK
Jr  SSK
Jr  SS	KJr  SSKJ	r  SSKJ	r  SS
KJr  \	R*                   " S S\R,                  \R.                  \R0                  5      5       rg)z1The command to disable Config Management Feature.    )absolute_import)division)unicode_literals)
exceptions)base)flags)	resources)utils)
console_ioc                       \ rS rSrSr\R                  r\R                  rSr	\
S 5       r\R                  " S5      S 5       rSrg)	Disable   a  Disable the Config Management feature.

Disable the Config Management feature entirely, or disable specific
configuration on the feature.

`{command}` without flags deletes the Config Management feature,
which unmanages and leaves existing Config Sync installations on membership
clusters. Running the command without flags exits silently if the feature
does not exist. Specify flags to disable configuration on parts of the feature
without deleting it.

## EXAMPLES

To disable the Config Management feature entirely, run:

  $ {command}

To unmanage Config Sync only on select memberships, run:

  $ {command} --memberships=example-membership-1,example-membership-2
Tc                 Z   U R                   R                  U5        UR                  5       nU R                  R                  U5        UR	                  SS9nUR                  SSSSS9  UR                  5       n[        R                  " USS9  [        R                  R                  U5        g	)
zAdds flags to the command.

Args:
  parser: googlecloudsdk.calliope.parser_arguments.ArgumentInterceptor,
    Argument parser to add flags to.
aA  Membership-specific flags. In the absence of `--uninstall`, using either `--memberships` or `--all-memberships` removes the entire configuration for the specified memberships, which unmanages and leaves existing Config Sync installations on the membership clusters. Unmanagement does not error if the feature is disabled.)helpz--uninstallstore_constTa.  Uninstall any previously-installed and managed Config Sync on the specified
memberships by setting the `enabled`
[field](https://cloud.google.com/kubernetes-engine/enterprise/config-sync/docs/reference/gcloud-apply-fields)
to false. Clears all other configuration for each membership. Does not wait for
the uninstallation to complete. To bypass the confirmation prompt, use
`--force`. Requires the feature to be enabled.

To uninstall Config Sync on select memberships, run:

  $ {command} --uninstall --memberships=example-membership-1,example-membership-2
)actionconstr   )pluralN)

FORCE_FLAGAddToParseradd_mutually_exclusive_group FLEET_DEFAULT_MEMBER_CONFIG_FLAG	add_groupadd_argumentr	   AddMembershipResourceArgr   ALL_MEMBERSHIPS_FLAG)clsparserpartial_disable_flag_groupmembership_disable_groupmemberships_groups        8lib/surface/container/fleet/config_management/disable.pyArgsDisable.Args?   s     NNv&!'!D!D!F((445OP9CCG  D    ))	 * " 1MMO&&'8F	**+<=    z	{message}c                    UR                   (       a  U R                  5         g/ nUR                  (       d"  UR                  (       d  UR                  (       a  [
        R                  " USSS9nUR                  (       a6  U R                  5         UR                  (       d  [        R                  " SSS9  U H  nUR                  (       ar  U R                  US/U R                  R                  U R                  R                  U R                  R                  U R                  R!                  SS9S	9S
9S95        M  U R#                  U5        M     U(       d  U R%                  UR                  5        gg)aR  Executes command logic.

Disables parts of or the entire feature specified by args.

Args:
  args: Flags specified in the call. The value associated with each flag
    is stored on an args field that is named after the flag with dashes
    replaced by underscores.
Returns:
  None. In other words, completes without outputting the disabled or
    partially disabled Feature.
Raises:
  api_lib.util.exceptions.HttpException: On HTTP errors from API calls,
    raises the exception without details to remove the stack trace.
    `gcloud info --show-log` shows the entire error to users who care.
NT)promptsearchzaAbout to uninstall any previously-installed and managed Config Sync on the specified memberships.)messagecancel_on_nospecF)enabled)
configSync)configmanagement)r+   )fleet_default_member_configclear_fleet_default	uninstallmembershipsall_membershipsfeatures_baseParseMembershipsPlural
GetFeatureforcer   PromptContinueUpdateV2messages_v2MembershipFeatureFeatureSpecConfigManagementSpecConfigManagementConfigSyncDeleteV2r   )selfargsr2   
memberships       r"   RunDisable.Runo   s=   $ ''
 K~~))T-A-A "88@D@DFk ~~ ooZZ!!= 	
 "
	j6(D,<,<,N,N!!--!%!1!1!F!F#//JJ %  K   "G " .  -O -
 	 	j! " 
ll4:: r%    N)__name__
__module____qualname____firstlineno____doc__r
   CONFIG_MANAGEMENT_FEATURE_NAMEfeature_namemf_namesupport_fleet_defaultclassmethodr#   gcloud_exception CatchHTTPErrorRaiseHTTPExceptionrC   __static_attributes__rE   r%   r"   r   r      sX    , 55,00'-> ->^ 44[A5 B5r%   r   N)rJ   
__future__r   r   r   googlecloudsdk.api_lib.utilr   rP   googlecloudsdk.callioper   *googlecloudsdk.command_lib.container.fleetr   r	   <googlecloudsdk.command_lib.container.fleet.config_managementr
   3googlecloudsdk.command_lib.container.fleet.featuresr4   =googlecloudsdk.command_lib.container.fleet.membershipfeaturesmembershipfeatures_basegooglecloudsdk.core.consoler   DefaultUniverseOnlyDisableCommandDeleteCommandMixinUpdateCommandMixinr   rE   r%   r"   <module>r`      sh    8 &  ' F ( < @ N U i 2 E  ....E Er%   