def CommonArgs(cls, parser): # Flags specific to managed CR managed_group = flags.GetManagedArgGroup(parser) flags.AddRegionArg(managed_group) # Flags specific to CRoGKE gke_group = flags.GetGkeArgGroup(parser) concept_parsers.ConceptParser([resource_args.CLUSTER_PRESENTATION ]).AddToParser(gke_group) # Flags specific to connecting to a Kubernetes cluster (kubeconfig) kubernetes_group = flags.GetKubernetesArgGroup(parser) flags.AddKubeconfigFlags(kubernetes_group) # Flags specific to connecting to a cluster cluster_group = flags.GetClusterArgGroup(parser) namespace_presentation = presentation_specs.ResourcePresentationSpec( '--namespace', resource_args.GetNamespaceResourceSpec(), 'Namespace to list routes in.', required=True, prefixes=False) concept_parsers.ConceptParser([namespace_presentation ]).AddToParser(cluster_group) parser.display_info.AddFormat("""table( {ready_column}, metadata.name:label=ROUTE) """.format(ready_column=pretty_print.READY_COLUMN)) # Flags not specific to any platform flags.AddPlatformArg(parser) parser.display_info.AddUriFunc(cls._GetResourceUri)
def Args(parser): # Flags specific to managed CR managed_group = flags.GetManagedArgGroup(parser) flags.AddRegionArg(managed_group) # Flags specific to CRoGKE gke_group = flags.GetGkeArgGroup(parser) concept_parsers.ConceptParser([resource_args.CLUSTER_PRESENTATION ]).AddToParser(gke_group) # Flags specific to connecting to a Kubernetes cluster (kubeconfig) kubernetes_group = flags.GetKubernetesArgGroup(parser) flags.AddKubeconfigFlags(kubernetes_group) # Flags specific to connecting to a cluster cluster_group = flags.GetClusterArgGroup(parser) namespace_presentation = presentation_specs.ResourcePresentationSpec( '--namespace', resource_args.GetNamespaceResourceSpec(), 'Namespace to replace service.', required=True, prefixes=False) concept_parsers.ConceptParser( [namespace_presentation]).AddToParser(cluster_group) # Flags not specific to any platform flags.AddAsyncFlag(parser) flags.AddPlatformArg(parser) parser.add_argument( 'FILE', action='store', type=arg_parsers.YAMLFileContents(), help='The absolute path to the YAML file with a Knative ' 'service definition for the service to update or deploy.')
def CommonArgs(parser): # Flags specific to managed CR managed_group = flags.GetManagedArgGroup(parser) flags.AddRegionArg(managed_group) # Flags specific to CRoGKE gke_group = flags.GetGkeArgGroup(parser) concept_parsers.ConceptParser([resource_args.CLUSTER_PRESENTATION ]).AddToParser(gke_group) # Flags specific to connecting to a Kubernetes cluster (kubeconfig) kubernetes_group = flags.GetKubernetesArgGroup(parser) flags.AddKubeconfigFlags(kubernetes_group) # Flags not specific to any platform flags.AddPlatformArg(parser) events_flags.AddEventTypeFlagArg(parser) events_flags.AddTargetServiceFlag(parser, required=True) events_flags.AddBrokerFlag(parser) events_flags.AddParametersFlags(parser) events_flags.AddSecretsFlag(parser) trigger_presentation = presentation_specs.ResourcePresentationSpec( 'trigger', events_resource_args.GetTriggerResourceSpec(), 'Name of the trigger to create', required=True) concept_parsers.ConceptParser([trigger_presentation ]).AddToParser(parser)
def CommonArgs(parser): # Flags specific to managed CR managed_group = flags.GetManagedArgGroup(parser) flags.AddRegionArg(managed_group) flags.AddServiceAccountFlag(managed_group) flags.AddCloudSQLFlags(managed_group) # Flags specific to CRoGKE gke_group = flags.GetGkeArgGroup(parser) concept_parsers.ConceptParser([resource_args.CLUSTER_PRESENTATION ]).AddToParser(gke_group) # Flags specific to connecting to a Kubernetes cluster (kubeconfig) kubernetes_group = flags.GetKubernetesArgGroup(parser) flags.AddKubeconfigFlags(kubernetes_group) # Flags specific to connecting to a cluster cluster_group = flags.GetClusterArgGroup(parser) flags.AddEndpointVisibilityEnum(cluster_group) flags.AddCpuFlag(cluster_group) # Flags not specific to any platform service_presentation = presentation_specs.ResourcePresentationSpec( 'SERVICE', resource_args.GetServiceResourceSpec(prompt=True), 'Service to update the configuration of.', required=True, prefixes=False) flags.AddPlatformArg(parser) flags.AddMutexEnvVarsFlags(parser) flags.AddMemoryFlag(parser) flags.AddConcurrencyFlag(parser) flags.AddTimeoutFlag(parser) flags.AddAsyncFlag(parser) flags.AddLabelsFlags(parser, add_create=False) flags.AddMaxInstancesFlag(parser) concept_parsers.ConceptParser([service_presentation ]).AddToParser(parser)
def CommonArgs(cls, parser): # Flags specific to managed CR managed_group = flags.GetManagedArgGroup(parser) flags.AddRegionArgWithDefault(managed_group) # Flags specific to CRoGKE gke_group = flags.GetGkeArgGroup(parser) concept_parsers.ConceptParser( [resource_args.CLUSTER_PRESENTATION]).AddToParser(gke_group) # Flags specific to connecting to a Kubernetes cluster (kubeconfig) kubernetes_group = flags.GetKubernetesArgGroup(parser) flags.AddKubeconfigFlags(kubernetes_group) # Flags specific to connecting to a cluster cluster_group = flags.GetClusterArgGroup(parser) namespace_presentation = presentation_specs.ResourcePresentationSpec( '--namespace', resource_args.GetNamespaceResourceSpec(), 'Namespace to list configurations in.', required=True, prefixes=False) concept_parsers.ConceptParser( [namespace_presentation]).AddToParser(cluster_group) # Flags not specific to any platform flags.AddPlatformArg(parser) parser.display_info.AddFormat( 'table(' '{ready_column},' 'metadata.name:label=CONFIGURATION,' 'region:label=REGION,' 'status.latestCreatedRevisionName:label="LATEST REVISION",' 'status.latestReadyRevisionName:label="READY REVISION")'.format( ready_column=pretty_print.READY_COLUMN)) parser.display_info.AddUriFunc(cls._GetResourceUri)
def CommonArgs(cls, parser): # Flags specific to managed CR managed_group = flags.GetManagedArgGroup(parser) concept_parsers.ConceptParser([ resource_args.CLOUD_RUN_LOCATION_PRESENTATION ]).AddToParser(managed_group) # Flags specific to CRoGKE gke_group = flags.GetGkeArgGroup(parser) concept_parsers.ConceptParser([resource_args.CLUSTER_PRESENTATION ]).AddToParser(gke_group) # Flags specific to connecting to a Kubernetes cluster (kubeconfig) kubernetes_group = flags.GetKubernetesArgGroup(parser) flags.AddKubeconfigFlags(kubernetes_group) # Flags specific to connecting to a cluster cluster_group = flags.GetClusterArgGroup(parser) namespace_presentation = presentation_specs.ResourcePresentationSpec( '--namespace', resource_args.GetNamespaceResourceSpec(), 'Namespace to list services in.', required=True, prefixes=False) concept_parsers.ConceptParser([namespace_presentation ]).AddToParser(cluster_group) # Flags not specific to any platform flags.AddPlatformArg(parser) parser.display_info.AddUriFunc(cls._GetResourceUri)
def Args(parser): service_presentation = presentation_specs.ResourcePresentationSpec( 'SERVICE', resource_args.GetServiceResourceSpec(prompt=True), 'Service to deploy to.', required=True, prefixes=False) flags.AddSourceRefFlags(parser) flags.AddRegionArg(parser) flags.AddPlatformArg(parser) flags.AddKubeconfigFlags(parser) flags.AddFunctionArg(parser) flags.AddMutexEnvVarsFlags(parser) flags.AddCpuFlag(parser) flags.AddMemoryFlag(parser) flags.AddConcurrencyFlag(parser) flags.AddTimeoutFlag(parser) flags.AddAsyncFlag(parser) flags.AddEndpointVisibilityEnum(parser) flags.AddCloudSQLFlags(parser) flags.AddAllowUnauthenticatedFlag(parser) flags.AddServiceAccountFlag(parser) concept_parsers.ConceptParser( [resource_args.CLUSTER_PRESENTATION, service_presentation]).AddToParser(parser)
def CommonArgs(cls, parser): # Flags specific to managed CR managed_group = flags.GetManagedArgGroup(parser) flags.AddRegionArg(managed_group) # Flags specific to CRoGKE gke_group = flags.GetGkeArgGroup(parser) concept_parsers.ConceptParser([resource_args.CLUSTER_PRESENTATION ]).AddToParser(gke_group) # Flags specific to connecting to a Kubernetes cluster (kubeconfig) kubernetes_group = flags.GetKubernetesArgGroup(parser) flags.AddKubeconfigFlags(kubernetes_group) # Flags specific to connecting to a cluster cluster_group = flags.GetClusterArgGroup(parser) namespace_presentation = presentation_specs.ResourcePresentationSpec( '--namespace', resource_args.GetNamespaceResourceSpec(), 'Namespace to list triggers in.', required=True, prefixes=False) concept_parsers.ConceptParser([namespace_presentation ]).AddToParser(cluster_group) # Flags not specific to any platform flags.AddPlatformArg(parser) events_flags.AddTargetServiceFlag(parser) parser.display_info.AddFormat("""table( {ready_column}, firstof(id,metadata.name):label=TRIGGER, filter_attributes.extract({type_field}).join():label="EVENT TYPE", subscriber:label=TARGET)""".format( ready_column=pretty_print.READY_COLUMN, type_field=trigger.EVENT_TYPE_FIELD)) parser.display_info.AddUriFunc(cls._GetResourceUri)
def Args(parser): # Flags specific to managed CR managed_group = flags.GetManagedArgGroup(parser) flags.AddRegionArg(managed_group) # Flags specific to CRoGKE gke_group = flags.GetGkeArgGroup(parser) concept_parsers.ConceptParser([resource_args.CLUSTER_PRESENTATION ]).AddToParser(gke_group) # Flags specific to connecting to a Kubernetes cluster (kubeconfig) kubernetes_group = flags.GetKubernetesArgGroup(parser) flags.AddKubeconfigFlags(kubernetes_group) # Flags not specific to any platform service_presentation = presentation_specs.ResourcePresentationSpec( 'SERVICE', resource_args.GetServiceResourceSpec(prompt=True), 'Service to update the configuration of.', required=True, prefixes=False) flags.AddAsyncFlag(parser) flags.AddUpdateTrafficFlags(parser) concept_parsers.ConceptParser([service_presentation ]).AddToParser(parser) flags.AddPlatformArg(parser)
def CommonArgs(cls, parser): # Flags specific to managed CR managed_group = flags.GetManagedArgGroup(parser) flags.AddRegionArgWithDefault(managed_group) # Flags specific to CRoGKE gke_group = flags.GetGkeArgGroup(parser) concept_parsers.ConceptParser([resource_args.CLUSTER_PRESENTATION ]).AddToParser(gke_group) # Flags specific to connecting to a Kubernetes cluster (kubeconfig) kubernetes_group = flags.GetKubernetesArgGroup(parser) flags.AddKubeconfigFlags(kubernetes_group) # Flags specific to connecting to a cluster cluster_group = flags.GetClusterArgGroup(parser) namespace_presentation = presentation_specs.ResourcePresentationSpec( '--namespace', resource_args.GetNamespaceResourceSpec(), 'Namespace to list revisions in.', required=True, prefixes=False) concept_parsers.ConceptParser([namespace_presentation ]).AddToParser(cluster_group) # Flags not specific to any platform flags.AddServiceFlag(parser) flags.AddPlatformArg(parser) parser.display_info.AddFormat( 'table(' '{ready_column},' 'name:label=REVISION,' 'active.yesno(yes="yes", no=""),' 'service_name:label=SERVICE,' 'creation_timestamp.date("%Y-%m-%d %H:%M:%S %Z"):label=DEPLOYED,' 'author:label="DEPLOYED BY")'.format( ready_column=pretty_print.READY_COLUMN)) parser.display_info.AddUriFunc(cls._GetResourceUri)
def CommonArgs(parser): # Flags specific to managed CR managed_group = flags.GetManagedArgGroup(parser) flags.AddRegionArg(managed_group) # Flags specific to CRoGKE gke_group = flags.GetGkeArgGroup(parser) concept_parsers.ConceptParser([resource_args.CLUSTER_PRESENTATION ]).AddToParser(gke_group) # Flags specific to connecting to a Kubernetes cluster (kubeconfig) kubernetes_group = flags.GetKubernetesArgGroup(parser) flags.AddKubeconfigFlags(kubernetes_group) # Flags not specific to any platform parser.add_argument( '--service', required=True, help='Create domain mapping for the given service.') domain_mapping_presentation = presentation_specs.ResourcePresentationSpec( '--domain', resource_args.GetDomainMappingResourceSpec(), 'Domain name is the ID of DomainMapping resource.', required=True, prefixes=False) concept_parsers.ConceptParser([domain_mapping_presentation ]).AddToParser(parser) flags.AddPlatformArg(parser) parser.display_info.AddFormat("""table( name:label=NAME, type:label="RECORD TYPE", rrdata:label=CONTENTS)""")
def Args(parser): Deploy.CommonArgs(parser) # Flags specific to CRoGKE gke_group = flags.GetGkeArgGroup(parser) flags.AddEndpointVisibilityEnum(gke_group) flags.AddCpuFlag(gke_group) # Flags not specific to any platform flags.AddPlatformArg(parser)
def Args(parser): flags.AddRegionArg(parser) flags.AddPlatformArg(parser) flags.AddKubeconfigFlags(parser) service_presentation = presentation_specs.ResourcePresentationSpec( 'SERVICE', resource_args.GetServiceResourceSpec(), 'Service to delete.', required=True, prefixes=False) concept_parsers.ConceptParser( [resource_args.CLUSTER_PRESENTATION, service_presentation]).AddToParser(parser)
def Args(parser): flags.AddRegionArg(parser) flags.AddPlatformArg(parser) flags.AddKubeconfigFlags(parser) revision_presentation = presentation_specs.ResourcePresentationSpec( 'REVISION', resource_args.GetRevisionResourceSpec(), 'Revision to delete.', required=True, prefixes=False) concept_parsers.ConceptParser([ resource_args.CLUSTER_PRESENTATION, revision_presentation]).AddToParser(parser)
def Args(parser): flags.AddRegionArg(parser) flags.AddPlatformArg(parser) flags.AddKubeconfigFlags(parser) domain_mapping_presentation = presentation_specs.ResourcePresentationSpec( '--domain', resource_args.GetDomainMappingResourceSpec(), 'Domain name is the ID of DomainMapping resource.', required=True, prefixes=False) concept_parsers.ConceptParser( [resource_args.CLUSTER_PRESENTATION, domain_mapping_presentation]).AddToParser(parser) parser.display_info.AddFormat('yaml')
def Args(parser): flags.AddRegionArg(parser) flags.AddPlatformArg(parser) flags.AddKubeconfigFlags(parser) configuration_presentation = presentation_specs.ResourcePresentationSpec( 'CONFIGURATION', resource_args.GetConfigurationResourceSpec(), 'Configuration to describe.', required=True, prefixes=False) concept_parsers.ConceptParser( [resource_args.CLUSTER_PRESENTATION, configuration_presentation]).AddToParser(parser) parser.display_info.AddFormat('yaml')
def SetUp(self): self.args = parser_extensions.Namespace() # Set up mock deepest_parser for args.CONCEPTS deepest_parser = mock.Mock() deepest_parser._calliope_command.ai.concept_handler.return_value = mock.Mock( ) self.args._SetParser(deepest_parser) # Set up actual parser self.parser = argparse.ArgumentParser() flags.AddPlatformArg(self.parser) self.args._parsers.append(self.parser) properties.VALUES.run.platform.Set(None)
def CommonArgs(parser): # Flags specific to managed CR managed_group = flags.GetManagedArgGroup(parser) flags.AddRegionArg(managed_group) # Flags specific to CRoGKE gke_group = flags.GetGkeArgGroup(parser) concept_parsers.ConceptParser([resource_args.CLUSTER_PRESENTATION ]).AddToParser(gke_group) # Flags specific to connecting to a Kubernetes cluster (kubeconfig) kubernetes_group = flags.GetKubernetesArgGroup(parser) flags.AddKubeconfigFlags(kubernetes_group) # Flags not specific to any platform flags.AddPlatformArg(parser) parser.display_info.AddFormat("""table( source_kind:label=CATEGORY:sort=1)""")
def Args(parser): flags.AddRegionArg(parser) flags.AddPlatformArg(parser) flags.AddKubeconfigFlags(parser) revision_presentation = presentation_specs.ResourcePresentationSpec( 'REVISION', resource_args.GetRevisionResourceSpec(), 'Revision to describe.', required=True, prefixes=False) concept_parsers.ConceptParser( [resource_args.CLUSTER_PRESENTATION, revision_presentation]).AddToParser(parser) parser.display_info.AddFormat( 'yaml(apiVersion, kind, metadata, spec, status)')
def Args(parser): # Flags specific to managed CR managed_group = flags.GetManagedArgGroup(parser) flags.AddRegionArg(managed_group) # Flags specific to CRoGKE gke_group = flags.GetGkeArgGroup(parser) concept_parsers.ConceptParser([resource_args.CLUSTER_PRESENTATION ]).AddToParser(gke_group) # Flags not specific to any platform flags.AddAsyncFlag(parser) flags.AddPlatformArg(parser) parser.add_argument( 'FILE', action='store', help='The absolute path to the YAML file with a Knative ' 'service definition for the service to update or deploy.')
def Args(parser): # Flags specific to CRoGKE gke_group = flags.GetGkeArgGroup(parser) concept_parsers.ConceptParser([resource_args.CLUSTER_PRESENTATION ]).AddToParser(gke_group) # Flags not specific to any platform service_presentation = presentation_specs.ResourcePresentationSpec( 'SERVICE', resource_args.GetServiceResourceSpec(prompt=True), 'Service to update the configuration of.', required=True, prefixes=False) flags.AddAsyncFlag(parser) flags.AddSetTrafficFlags(parser) concept_parsers.ConceptParser([service_presentation ]).AddToParser(parser) flags.AddPlatformArg(parser)
def Args(cls, parser): flags.AddRegionArg(parser) flags.AddPlatformArg(parser) flags.AddKubeconfigFlags(parser) namespace_presentation = presentation_specs.ResourcePresentationSpec( '--namespace', resource_args.GetNamespaceResourceSpec(), 'Namespace list routes in.', required=True, prefixes=False) concept_parsers.ConceptParser( [resource_args.CLUSTER_PRESENTATION, namespace_presentation]).AddToParser(parser) parser.display_info.AddFormat("""table( {ready_column}, metadata.name:label=ROUTE) """.format(ready_column=pretty_print.READY_COLUMN)) parser.display_info.AddUriFunc(cls._GetResourceUri)
def Args(parser): service_presentation = presentation_specs.ResourcePresentationSpec( '--service', resource_args.GetServiceResourceSpec(prompt=True), 'Service to update the configuration of.', required=True, prefixes=False) flags.AddRegionArg(parser) flags.AddPlatformArg(parser) flags.AddKubeconfigFlags(parser) flags.AddMutexEnvVarsFlags(parser) flags.AddMemoryFlag(parser) flags.AddConcurrencyFlag(parser) flags.AddTimeoutFlag(parser) flags.AddServiceAccountFlag(parser) flags.AddAsyncFlag(parser) concept_parsers.ConceptParser( [resource_args.CLUSTER_PRESENTATION, service_presentation]).AddToParser(parser)
def CommonArgs(parser): # Flags specific to managed CR managed_group = flags.GetManagedArgGroup(parser) flags.AddRegionArg(managed_group) # Flags specific to CRoGKE gke_group = flags.GetGkeArgGroup(parser) concept_parsers.ConceptParser([resource_args.CLUSTER_PRESENTATION ]).AddToParser(gke_group) # Flags specific to connecting to a Kubernetes cluster (kubeconfig) kubernetes_group = flags.GetKubernetesArgGroup(parser) flags.AddKubeconfigFlags(kubernetes_group) # Flags not specific to any platform flags.AddPlatformArg(parser) events_flags.AddCategoryFlag(parser) base.URI_FLAG.RemoveFromParser(parser) parser.display_info.AddFormat("""table( details.type:sort=2, crd.source_kind:label=CATEGORY:sort=1, details.description:wrap)""")
def Args(parser): flags.AddRegionArg(parser) flags.AddPlatformArg(parser) flags.AddKubeconfigFlags(parser) parser.add_argument( '--service', required=True, help='Create domain mapping for the given service.') domain_mapping_presentation = presentation_specs.ResourcePresentationSpec( '--domain', resource_args.GetDomainMappingResourceSpec(), 'Domain name is the ID of DomainMapping resource.', required=True, prefixes=False) concept_parsers.ConceptParser( [resource_args.CLUSTER_PRESENTATION, domain_mapping_presentation]).AddToParser(parser) parser.display_info.AddFormat("""table( type:label="RECORD TYPE", rrdata:label=CONTENTS)""")
def Args(parser): """Adds --platform and the various related args.""" # Add --platform flags.AddPlatformArg(parser) platform_helpers_group = parser.add_mutually_exclusive_group( help='Arguments to locate resources, depending on the platform used.') # Add --region flag managed_group = flags.GetManagedArgGroup(platform_helpers_group) flags.AddRegionArg(managed_group) # Add --cluster and --cluster-location (plus properties) gke_group = flags.GetGkeArgGroup(platform_helpers_group) concept_parsers.ConceptParser( [resource_args.CLUSTER_PRESENTATION]).AddToParser(gke_group) # Add --kubeconfig and --context kubernetes_group = flags.GetKubernetesArgGroup(platform_helpers_group) flags.AddKubeconfigFlags(kubernetes_group)
def CommonArgs(parser): # Flags specific to managed CR managed_group = flags.GetManagedArgGroup(parser) flags.AddRegionArg(managed_group) # Flags specific to CRoGKE gke_group = flags.GetGkeArgGroup(parser) concept_parsers.ConceptParser([resource_args.CLUSTER_PRESENTATION ]).AddToParser(gke_group) # Flags specific to connecting to a Kubernetes cluster (kubeconfig) kubernetes_group = flags.GetKubernetesArgGroup(parser) flags.AddKubeconfigFlags(kubernetes_group) # Flags not specific to any platform revision_presentation = presentation_specs.ResourcePresentationSpec( 'REVISION', resource_args.GetRevisionResourceSpec(), 'Revision to delete.', required=True, prefixes=False) concept_parsers.ConceptParser([revision_presentation ]).AddToParser(parser) flags.AddPlatformArg(parser)
def CommonArgs(parser): # Flags specific to managed CR managed_group = flags.GetManagedArgGroup(parser) flags.AddRegionArg(managed_group) # Flags specific to CRoGKE gke_group = flags.GetGkeArgGroup(parser) concept_parsers.ConceptParser([resource_args.CLUSTER_PRESENTATION ]).AddToParser(gke_group) # Flags specific to connecting to a Kubernetes cluster (kubeconfig) kubernetes_group = flags.GetKubernetesArgGroup(parser) flags.AddKubeconfigFlags(kubernetes_group) # Flags not specific to any platform route_presentation = presentation_specs.ResourcePresentationSpec( 'ROUTE', resource_args.GetRouteResourceSpec(), 'Route to describe.', required=True, prefixes=False) concept_parsers.ConceptParser([route_presentation]).AddToParser(parser) flags.AddPlatformArg(parser) parser.display_info.AddFormat('yaml')
def CommonArgs(parser): """Defines arguments common to all release tracks.""" # Flags specific to managed CR managed_group = flags.GetManagedArgGroup(parser) flags.AddRegionArg(managed_group) # Flags specific to CRoGKE gke_group = flags.GetGkeArgGroup(parser) concept_parsers.ConceptParser([resource_args.CLUSTER_PRESENTATION ]).AddToParser(gke_group) # Flags specific to connecting to a Kubernetes cluster (kubeconfig) kubernetes_group = flags.GetKubernetesArgGroup(parser) flags.AddKubeconfigFlags(kubernetes_group) # Flags not specific to any platform flags.AddPlatformArg(parser) trigger_presentation = presentation_specs.ResourcePresentationSpec( 'trigger', events_resource_args.GetTriggerResourceSpec(), 'Name of the trigger to delete', required=True) concept_parsers.ConceptParser([trigger_presentation ]).AddToParser(parser)
def CommonArgs(parser): # Flags specific to managed CR managed_group = flags.GetManagedArgGroup(parser) flags.AddRegionArg(managed_group) # Flags specific to CRoGKE gke_group = flags.GetGkeArgGroup(parser) concept_parsers.ConceptParser([resource_args.CLUSTER_PRESENTATION ]).AddToParser(gke_group) # Flags specific to connecting to a Kubernetes cluster (kubeconfig) kubernetes_group = flags.GetKubernetesArgGroup(parser) flags.AddKubeconfigFlags(kubernetes_group) # Flags not specific to any platform domain_mapping_presentation = presentation_specs.ResourcePresentationSpec( '--domain', resource_args.GetDomainMappingResourceSpec(), 'Domain name is the ID of DomainMapping resource.', required=True, prefixes=False) concept_parsers.ConceptParser([domain_mapping_presentation ]).AddToParser(parser) flags.AddPlatformArg(parser)