def _AddArgs(parser, supports_min_ready=False): """Adds args.""" instance_groups_managed_flags.AddTypeArg(parser) instance_groups_managed_flags.AddMaxSurgeArg(parser) instance_groups_managed_flags.AddMaxUnavailableArg(parser) if supports_min_ready: instance_groups_managed_flags.AddMinReadyArg(parser) instance_groups_managed_flags.AddReplacementMethodFlag(parser) parser.add_argument( '--version', type=arg_parsers.ArgDict(spec={'template': str, 'name': str}), metavar='template=TEMPLATE,[name=NAME]', help=('Original instance template resource to be used. ' 'Each version has the following format: ' 'template=TEMPLATE,[name=NAME]'), required=True) parser.add_argument( '--canary-version', type=arg_parsers.ArgDict( spec={'template': str, 'target-size': str, 'name': str}), category=base.COMMONLY_USED_FLAGS, metavar='template=TEMPLATE,target-size=FIXED_OR_PERCENT,[name=NAME]', help=('New instance template resource to be used. ' 'Each version has the following format: ' 'template=TEMPLATE,target-size=FIXED_OR_PERCENT,[name=NAME]')) instance_groups_managed_flags.AddForceArg(parser)
def _AddArgs(parser, supports_min_ready=False): """Adds args.""" instance_groups_managed_flags.AddMaxSurgeArg(parser) instance_groups_managed_flags.AddMaxUnavailableArg(parser) if supports_min_ready: instance_groups_managed_flags.AddMinReadyArg(parser) instance_groups_managed_flags.AddReplacementMethodFlag(parser)