
    	                         d Z ddlmZ ddlmZ ddlmZ ddlmZ ddlmZ ddl	m
Z
 ddl	mZ  G d d	ej                  ej                  e
j                        Zy
)z.Manages content bundles for Policy Controller.    )absolute_import)division)unicode_literals)base)command)contentc                   4    e Zd ZdZdZdZed        Zd Zd Z	y)Removea  Removes a bundle installation for Policy Controller content.

  Google-defined policy bundles of constraints can be installed onto Policy
  Controller installations. This command removes those bundles.

  ## EXAMPLES

  To remove a policy bundle:

    $ {command} cis-k8s-v1.5.1
  policycontrollerc                     t        j                  |d      }|j                          |j                  t         j                  d       y )Nbundlesz7The constraint bundle to remove from Policy Controller.)help)r   Flagsadd_membershipsadd_argumentARG_LABEL_BUNDLE)clsparser	cmd_flagss      Flib/surface/container/fleet/policycontroller/content/bundles/remove.pyArgszRemove.Args*   s=    fi0I
  F      c           	          t        j                  || j                        }| j                  |d      }|j	                         D ci c]  \  }}|| j                  ||       }}}| j                  |      S c c}}w )NT)r   
FlagParsermessages
path_specsitemsmodifyupdate_specs)selfargsr   specspathsupdated_specss          r   Runz
Remove.Run4   sm    dmm4FOOD$'EAFOgdAT4;;q&11MO]++ Ps   A7c                     |j                   j                  j                  }|j                  |      |j                   j                  _        |S )N)r   policyControllerHubConfigpolicyContentremove_bundle)r    specr   policy_contents       r   r   zRemove.modify:   sG    77EE  	^, 	33A Kr   N)
__name__
__module____qualname____doc__feature_namemf_nameclassmethodr   r&   r    r   r   r
   r
      s/    
 $,' ,r   r
   N)r0   
__future__r   r   r   3googlecloudsdk.command_lib.container.fleet.featuresr   =googlecloudsdk.command_lib.container.fleet.membershipfeaturesmf_base;googlecloudsdk.command_lib.container.fleet.policycontrollerr   r   UpdateCommandPocoCommandr
   r4   r   r   <module>r<      sA    5 &  ' D Y O O'T!6!68K8K 'r   