
    i                         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 dd	lmZ  G d
 dej                        Zy)z*Command to show fleet scopes in a project.    )absolute_import)division)unicode_literals)client)base)
exceptions)util)
propertiesc                   &    e Zd ZdZed        Zd Zy)Listaa  List RBAC RoleBindings in a fleet scope.

  This command can fail for the following reasons:
  * The scope specified does not exist.
  * The user does not have access to the specified scope.

  ## EXAMPLES

  The following command lists RBAC RoleBindings in scope `SCOPE` in
  project `PROJECT_ID`:

    $ {command} --scope=SCOPE --project=PROJECT_ID
  c                     | j                   j                  t        j                         | j	                  dt
        dd       y )Nz--scopeTz7Name of the fleet scope to list RBAC RoleBindings from.)typerequiredhelp)display_info	AddFormatr	   RB_LIST_FORMATadd_argumentstr)parsers    ;lib/surface/container/fleet/scopes/rbacrolebindings/list.pyArgsz	List.Args+   s=     !!$"5"56
F	      c                 P   t        j                  | j                               }|j                  }|2t        j
                  j                  j                  j                         }|j                  d      r|j                  ||j                        S t        j                  dd      )N)release_trackscopezNamespace parent is required.)r   FleetClientReleaseTrackprojectr
   VALUEScoreGetIsKnownAndSpecifiedListScopeRBACRoleBindingsr   calliope_exceptionsRequiredArgumentException)selfargsfleetclientr   s       r   RunzList.Run6   s    $$43D3D3FGKllG!!&&..224g(227DJJGG

7
70 r   N)__name__
__module____qualname____doc__staticmethodr   r*    r   r   r   r      s       	r   r   N)r.   
__future__r   r   r   &googlecloudsdk.api_lib.container.fleetr   googlecloudsdk.callioper   r   r%   *googlecloudsdk.command_lib.container.fleetr	   googlecloudsdk.corer
   ListCommandr   r0   r   r   <module>r7      s4    1 &  ' 9 ( E ; *#4 #r   