示例#1
0
    def Args(parser):
        # Does nothing for us, included in base.ListCommand
        base.URI_FLAG.RemoveFromParser(parser)

        mutex_group = parser.add_argument_group('ListLabelBindings.',
                                                required=True,
                                                mutex=True)
        label_group = mutex_group.add_argument_group('LabelValue.',
                                                     required=False)
        arguments.AddLabelValueIdArgToParser(label_group)
        arguments.AddLabelKeyArgToParser(
            label_group,
            required=False,
            message=(
                ' --label-key is required when using display name instead '
                'of numeric id for LABEL_VALUE_ID.'))
        arguments.AddLabelParentArgToParser(
            label_group,
            required=False,
            message=(
                ' --label-parent is required when using display name instead '
                'of numeric id for the --label-key.'))
        arguments.AddResourceArgToParser(
            mutex_group,
            required=False,
            message=(
                'Full resource name of the resource that the LabelValue is '
                'bound to.'))
示例#2
0
 def Args(parser):
   group = parser.add_argument_group('LabelValue.', required=False)
   arguments.AddLabelValueIdArgToParser(group)
   arguments.AddLabelKeyArgToParser(
       group,
       required=False,
       message=(' --label-key is required when using display name instead '
                'of numeric id for LABEL_VALUE_ID.'))
   arguments.AddLabelParentArgToParser(
       group,
       required=False,
       message=(' --label-parent is required when using display name instead '
                'of numeric id for the --label-key.'))
   arguments.AddResoruceArgToParser(parser)
 def Args(parser):
     group = parser.add_argument_group('LabelValue.')
     arguments.AddLabelValueIdArgToParser(group)
     arguments.AddLabelKeyArgToParser(
         group,
         required=False,
         message=('This field is required if LABEL_VALUE_ID is a '
                  'display name instead of a numeric id.'))
     arguments.AddLabelParentArgToParser(
         group,
         required=False,
         message=
         ('This field is required if and only if LABEL_VALUE_ID and '
          '--label-key are display names instead of one being a numeric id.'
          ))
示例#4
0
 def Args(parser):
     group = parser.add_argument_group('LabelValue.', required=True)
     arguments.AddLabelValueIdArgToParser(group)
     arguments.AddLabelKeyArgToParser(
         group,
         required=False,
         message=(
             ' --label-key is required when using display name instead '
             'of numeric id for LABEL_VALUE_ID.'))
     arguments.AddLabelParentArgToParser(
         group,
         required=False,
         message=(
             ' --label-parent is required when using display name instead '
             'of numeric id for the --label-key.'))
     arguments.AddResourceArgToParser(
         parser,
         required=True,
         message=(
             'Full resource name of the resource that the LabelValue is '
             'bound to.'))