
                            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 ej                   ej                  ej                  j                         ej"                   G d dej$                                             Zej                   ej                  ej                  j(                        ej"                   G d	 d
e                           Zy)!Create a Cloud NetApp Host Group.    )client)base)flags)labels_util)logc                   \    e Zd ZdZej
                  j                  ZdddZe	d        Z
d Zy)Creater   z6          Create a Cloud NetApp Host Group.
          z          The following command creates a Host Group named NAME using the required arguments:

              $ {command} NAME --location=us-central1 --type=ISCSI_INITIATOR --hosts=host1,host2 --os-type=LINUX
          )DESCRIPTIONEXAMPLESc                 .    t        j                  |        y )N)host_groups_flagsAddHostGroupCreateArgs)parsers    (lib/surface/netapp/host_groups/create.pyArgszCreate.Args,   s    ,,V4    c                    |j                   j                  j                         }t        j                  | j
                        }t        j                  |j                  |j                        }t        j                  |j                  |j                        }t        j                  ||j                  j                  j                        }|j!                  |j#                         ||j$                  ||j&                  |      }|j)                  ||j*                  |      }|j*                  rWdj-                  | j/                         j0                        }	t2        j4                  j7                  dj-                  |	             |S )z8Create a Cloud NetApp Host Group in the current project.)namehost_group_typehostsos_typedescriptionlabelsz!gcloud {} netapp host-groups listzHCheck the status of the new host group by listing all host groups:
$ {} )CONCEPTS
host_groupParsehost_groups_clientHostGroupsClient_RELEASE_TRACKr   GetHostGroupTypeEnumFromArgtypemessagesGetHostGroupOsTypeEnumFromArgr   r   ParseCreateArgs	HostGroupLabelsValueParseHostGroupConfigRelativeNamer   r   CreateHostGroupasync_formatReleaseTrackprefixr   statusPrint)
selfargshost_group_refr   r   r   r   r   resultcommands
             r   Runz
Create.Run0   s;   ]]--335N001D1DEF'CC		6??O  ==fooG ((foo''33F ,,((*'jj$$ - J ##NDKKLF{{3::




$
$g 
jj&/ Mr   N)__name__
__module____qualname____doc__r   r-   ALPHAr    detailed_helpstaticmethodr   r6    r   r   r
   r
      sB     *$$**.		- 5 5"r   r
   c                   <    e Zd ZdZej
                  j                  Zy)
CreateBetar   N)r7   r8   r9   r:   r   r-   BETAr    r>   r   r   r@   r@   U   s     *$$)).r   r@   N)r:   )googlecloudsdk.api_lib.netapp.host_groupsr   r   googlecloudsdk.callioper   -googlecloudsdk.command_lib.netapp.host_groupsr   r   $googlecloudsdk.command_lib.util.argsr   googlecloudsdk.corer   DefaultUniverseOnlyReleaseTracksr-   r;   HiddenCreateCommandr
   rA   r@   r>   r   r   <module>rK      s     ( R ( T < # D%%++,6T 6  - 6r D%%**+* *  , *r   