Esempio n. 1
0
  def Args(parser):
    concept_parsers.ConceptParser([flags.GetListingLocationPresentationSpec(
        'The location in which to list instances.')]).AddToParser(parser)
    parser.display_info.AddFormat(instances_flags.INSTANCES_LIST_FORMAT)

    def UriFunc(resource):
      registry = filestore_client.GetFilestoreRegistry()
      ref = registry.Parse(
          resource.name, collection=filestore_client.INSTANCES_COLLECTION)
      return ref.SelfLink()

    parser.display_info.AddUriFunc(UriFunc)
Esempio n. 2
0
  def Args(parser):
    concept_parsers.ConceptParser([flags.GetListingLocationPresentationSpec(
        'The location in which to list instances.')]).AddToParser(parser)
    parser.display_info.AddFormat(instances_flags.INSTANCES_LIST_FORMAT)

    def UriFunc(resource):
      registry = resources.REGISTRY.Clone()
      registry.RegisterApiByName(
          filestore_client.API_NAME,
          api_version=filestore_client.ALPHA_API_VERSION)
      ref = registry.Parse(
          resource.name, collection=filestore_client.INSTANCES_COLLECTION)
      return ref.SelfLink()

    parser.display_info.AddUriFunc(UriFunc)
Esempio n. 3
0
    def Args(parser):
        concept_parsers.ConceptParser([
            flags.GetListingLocationPresentationSpec(
                'The location in which to list operations.')
        ]).AddToParser(parser)
        parser.display_info.AddFormat(operations_flags.OPERATIONS_LIST_FORMAT)

        def UriFunc(resource):
            registry = resources.REGISTRY.Clone()
            registry.RegisterApiByName(
                filestore_client.FILESTORE_API_NAME,
                api_version=filestore_client.FILESTORE_ALPHA_API_VERSION)
            ref = registry.Parse(
                resource.name, collection='file.projects.locations.operations')
            return ref.SelfLink()

        parser.display_info.AddUriFunc(UriFunc)
Esempio n. 4
0
 def Args(parser):
   concept_parsers.ConceptParser([flags.GetListingLocationPresentationSpec(
       'The location in which to list instances.')]).AddToParser(parser)
   parser.display_info.AddFormat(instances_flags.INSTANCES_LIST_FORMAT)
Esempio n. 5
0
 def Args(parser):
   concept_parsers.ConceptParser(
       [flags.GetListingLocationPresentationSpec(
           'The location in which to list operations.')]
   ).AddToParser(parser)
   parser.display_info.AddFormat(operations_flags.OPERATIONS_LIST_FORMAT)