예제 #1
0
파일: list.py 프로젝트: Akiho-Yasuda/wip
 def UriFunc(resource):
     registry = filestore_client.GetFilestoreRegistry(
         filestore_client.BETA_API_VERSION)
     ref = registry.Parse(
         resource.name,
         collection=filestore_client.OPERATIONS_COLLECTION)
     return ref.SelfLink()
예제 #2
0
def GetResourceRef(args):
  """Creates a Snapshot and returns its reference."""
  project = properties.VALUES.core.project.Get(required=True)
  api_version = util.GetApiVersionFromArgs(args)
  registry = filestore_client.GetFilestoreRegistry(api_version)
  ref = registry.Create(
      'file.projects.locations.instances.snapshots',
      projectsId=project,
      locationsId=args.instance_region,
      instancesId=args.instance,
      snapshotsId=args.snapshot)
  return ref
예제 #3
0
 def UriFunc(resource):
   registry = filestore_client.GetFilestoreRegistry()
   ref = registry.Parse(
       resource.name, collection=filestore_client.INSTANCES_COLLECTION)
   return ref.SelfLink()