
    
                     B    S r SSKJr  SSKJr  SSKJr  SSKJr  SS jrg)	z6Flags for the `compute sole-tenancy` related commands.    )absolute_import)division)unicode_literals)arg_parsersc                     U R                  SSS9nUR                  S[        R                  " 5       SS9  UR                  SSS	9  UR                  S
SS	9  U(       a  UR                  SSSS9  gg)z8Adds a node affinity flag used for scheduling instances.zSole Tenancy.T)mutexz--node-affinity-filea            The JSON/YAML file containing the configuration of desired nodes onto
          which this instance could be scheduled. These rules filter the nodes
          according to their node affinity labels. A node's affinity labels come
          from the node template of the group the node is in.

          The file should contain a list of a JSON/YAML objects. For an example,
          see https://cloud.google.com/compute/docs/nodes/provisioning-sole-tenant-vms#configure_node_affinity_labels.
          The following list describes the fields:

          *key*::: Corresponds to the node affinity label keys of
          the Node resource.
          *operator*::: Specifies the node selection type. Must be one of:
            `IN`: Requires Compute Engine to seek for matched nodes.
            `NOT_IN`: Requires Compute Engine to avoid certain nodes.
          *values*::: Optional. A list of values which correspond to the node
          affinity label values of the Node resource.
          )typehelpz--node-groupz8The name of the node group to schedule this instance on.)r
   z--nodez2The name of the node to schedule this instance on.z--clear-node-affinities
store_truez          Removes the node affinities field from the instance. If specified,
          the instance node settings will be cleared. The instance will not be
          scheduled onto a sole-tenant node.
          )actionr
   N)	add_groupadd_argumentr   FileContents)parser	is_updatesole_tenancy_groups      <lib/googlecloudsdk/command_lib/compute/sole_tenancy/flags.pyAddNodeAffinityFlagToParserr      s    ''t'D!!##% " * !!E " G !!I " K##! $      N)F)__doc__
__future__r   r   r   googlecloudsdk.callioper   r    r   r   <module>r      s    = &  ' /%r   