Spaces:
Running on RTX PRO 6000
Running on RTX PRO 6000
Deploy simready-assets run 20260928-ed4eb73 (GPU variant)
Browse filesThis view is limited to 50 files because it contains too many changes. See raw diff
- Dockerfile +28 -1
- docker/hf-space/hf-storage-api/SOURCE.txt +6 -0
- docker/hf-space/hf-storage-api/constraints-hf-storage-api.txt +19 -0
- docker/hf-space/hf-storage-api/generated/nvidia/omniverse/notifications/consumer/v1beta/event_consumer_pb2.py +67 -0
- docker/hf-space/hf-storage-api/generated/nvidia/omniverse/notifications/consumer/v1beta/event_consumer_pb2.pyi +118 -0
- docker/hf-space/hf-storage-api/generated/nvidia/omniverse/notifications/consumer/v1beta/event_consumer_pb2_grpc.py +269 -0
- docker/hf-space/hf-storage-api/generated/nvidia/omniverse/storage/capabilities/v1alpha/capabilities_pb2.py +55 -0
- docker/hf-space/hf-storage-api/generated/nvidia/omniverse/storage/capabilities/v1alpha/capabilities_pb2.pyi +57 -0
- docker/hf-space/hf-storage-api/generated/nvidia/omniverse/storage/capabilities/v1alpha/capabilities_pb2_grpc.py +183 -0
- docker/hf-space/hf-storage-api/generated/nvidia/omniverse/storage/capabilities/v1beta/capabilities_pb2.py +49 -0
- docker/hf-space/hf-storage-api/generated/nvidia/omniverse/storage/capabilities/v1beta/capabilities_pb2.pyi +41 -0
- docker/hf-space/hf-storage-api/generated/nvidia/omniverse/storage/capabilities/v1beta/capabilities_pb2_grpc.py +140 -0
- docker/hf-space/hf-storage-api/generated/nvidia/omniverse/storage/filefolder/v1alpha/filefolder_service_pb2.py +64 -0
- docker/hf-space/hf-storage-api/generated/nvidia/omniverse/storage/filefolder/v1alpha/filefolder_service_pb2.pyi +94 -0
- docker/hf-space/hf-storage-api/generated/nvidia/omniverse/storage/filefolder/v1alpha/filefolder_service_pb2_grpc.py +269 -0
- docker/hf-space/hf-storage-api/generated/nvidia/omniverse/storage/filefolder/v1beta/filefolder_service_pb2.py +54 -0
- docker/hf-space/hf-storage-api/generated/nvidia/omniverse/storage/filefolder/v1beta/filefolder_service_pb2.pyi +60 -0
- docker/hf-space/hf-storage-api/generated/nvidia/omniverse/storage/filefolder/v1beta/filefolder_service_pb2_grpc.py +183 -0
- docker/hf-space/hf-storage-api/generated/nvidia/omniverse/storage/fileobject/v1alpha/fileobject_pb2.py +52 -0
- docker/hf-space/hf-storage-api/generated/nvidia/omniverse/storage/fileobject/v1alpha/fileobject_pb2.pyi +64 -0
- docker/hf-space/hf-storage-api/generated/nvidia/omniverse/storage/fileobject/v1alpha/fileobject_pb2_grpc.py +24 -0
- docker/hf-space/hf-storage-api/generated/nvidia/omniverse/storage/fileobject/v1alpha/fileobject_service_pb2.py +112 -0
- docker/hf-space/hf-storage-api/generated/nvidia/omniverse/storage/fileobject/v1alpha/fileobject_service_pb2.pyi +314 -0
- docker/hf-space/hf-storage-api/generated/nvidia/omniverse/storage/fileobject/v1alpha/fileobject_service_pb2_grpc.py +656 -0
- docker/hf-space/hf-storage-api/generated/nvidia/omniverse/storage/fileobject/v1beta/fileobject_pb2.py +52 -0
- docker/hf-space/hf-storage-api/generated/nvidia/omniverse/storage/fileobject/v1beta/fileobject_pb2.pyi +64 -0
- docker/hf-space/hf-storage-api/generated/nvidia/omniverse/storage/fileobject/v1beta/fileobject_pb2_grpc.py +24 -0
- docker/hf-space/hf-storage-api/generated/nvidia/omniverse/storage/fileobject/v1beta/fileobject_service_pb2.py +100 -0
- docker/hf-space/hf-storage-api/generated/nvidia/omniverse/storage/fileobject/v1beta/fileobject_service_pb2.pyi +262 -0
- docker/hf-space/hf-storage-api/generated/nvidia/omniverse/storage/fileobject/v1beta/fileobject_service_pb2_grpc.py +527 -0
- docker/hf-space/hf-storage-api/generated/nvidia/omniverse/storage/metadata/v1alpha/metadata_pb2.py +56 -0
- docker/hf-space/hf-storage-api/generated/nvidia/omniverse/storage/metadata/v1alpha/metadata_pb2.pyi +69 -0
- docker/hf-space/hf-storage-api/generated/nvidia/omniverse/storage/metadata/v1alpha/metadata_pb2_grpc.py +183 -0
- docker/hf-space/hf-storage-api/generated/nvidia/omniverse/storage/versioning/v1alpha/versioning_pb2.py +46 -0
- docker/hf-space/hf-storage-api/generated/nvidia/omniverse/storage/versioning/v1alpha/versioning_pb2.pyi +44 -0
- docker/hf-space/hf-storage-api/generated/nvidia/omniverse/storage/versioning/v1alpha/versioning_pb2_grpc.py +97 -0
- docker/hf-space/hf-storage-api/generated/nvidia/omniverse/storage/versioning/v1beta/versioning_pb2.py +46 -0
- docker/hf-space/hf-storage-api/generated/nvidia/omniverse/storage/versioning/v1beta/versioning_pb2.pyi +42 -0
- docker/hf-space/hf-storage-api/generated/nvidia/omniverse/storage/versioning/v1beta/versioning_pb2_grpc.py +97 -0
- docker/hf-space/hf-storage-api/hf_storage_api/__init__.py +6 -0
- docker/hf-space/hf-storage-api/hf_storage_api/__main__.py +18 -0
- docker/hf-space/hf-storage-api/hf_storage_api/addressing.py +159 -0
- docker/hf-space/hf-storage-api/hf_storage_api/auth.py +58 -0
- docker/hf-space/hf-storage-api/hf_storage_api/cache.py +172 -0
- docker/hf-space/hf-storage-api/hf_storage_api/catalog/__init__.py +2 -0
- docker/hf-space/hf-storage-api/hf_storage_api/catalog/loader.py +282 -0
- docker/hf-space/hf-storage-api/hf_storage_api/catalog/model.py +174 -0
- docker/hf-space/hf-storage-api/hf_storage_api/catalog/urllist.py +203 -0
- docker/hf-space/hf-storage-api/hf_storage_api/catalog_sync/__init__.py +47 -0
- docker/hf-space/hf-storage-api/hf_storage_api/catalog_sync/__main__.py +177 -0
Dockerfile
CHANGED
|
@@ -166,6 +166,15 @@ RUN python3.12 -m venv /app/.venv \
|
|
| 166 |
&& rm -rf /tmp/usdsearch-wheels \
|
| 167 |
&& chown -R 1000:1000 /app/.venv
|
| 168 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 169 |
COPY --from=opensearch-src --chown=1000:1000 /usr/share/opensearch /usr/share/opensearch
|
| 170 |
|
| 171 |
RUN /usr/share/opensearch/bin/opensearch-plugin remove opensearch-performance-analyzer
|
|
@@ -216,6 +225,14 @@ COPY docker/hf-space/nginx.conf.template /etc/nginx/hf-space.conf.template
|
|
| 216 |
|
| 217 |
COPY services/explorer/dist /usr/share/nginx/explorer
|
| 218 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 219 |
COPY --chown=1000:1000 pipeline /app/hf-space-pipeline/pipeline
|
| 220 |
|
| 221 |
ARG ARTIFACT_S3_URI
|
|
@@ -238,7 +255,13 @@ ARG ES_NAME
|
|
| 238 |
ARG S3_STORAGE_BUCKET_NAME
|
| 239 |
ARG S3_STORAGE_REGION_NAME=us-west-2
|
| 240 |
ARG STORAGE_BACKEND_TYPE=s3
|
| 241 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 242 |
S3_STORAGE_BUCKET_NAME=${S3_STORAGE_BUCKET_NAME} \
|
| 243 |
S3_STORAGE_REGION_NAME=${S3_STORAGE_REGION_NAME} \
|
| 244 |
opensearch_host=http://localhost:9200 \
|
|
@@ -262,6 +285,10 @@ ENV STORAGE_BACKEND_TYPE=${STORAGE_BACKEND_TYPE} \
|
|
| 262 |
HYBRID_SEARCH_SCORING_CONFIG_VECTOR_FIELDS="{\"siglip2-embedding.embedding\":{\"enabled\":true,\"weight\":1,\"field_name\":\"siglip2-embedding.embedding\",\"dimension\":1536}}" \
|
| 263 |
USDSEARCH_URL_MAPPING_MODE=rules \
|
| 264 |
USDSEARCH_URL_MAPPING_RULES="[{\"internal\": \"hf://huggingface.co/datasets/nvidia/srp-staging-controlled/\", \"public\": \"https://huggingface.co/datasets/nvidia/srp-staging-controlled/blob/main/\"}]" \
|
|
|
|
|
|
|
|
|
|
|
|
|
| 265 |
SIGLIP2_TRITON_SERVER_URL=localhost:8001 \
|
| 266 |
TRITON_SERVER_URL=localhost:8001 \
|
| 267 |
SIGLIP2_TRITON_SERVER_SSL=false \
|
|
|
|
| 166 |
&& rm -rf /tmp/usdsearch-wheels \
|
| 167 |
&& chown -R 1000:1000 /app/.venv
|
| 168 |
|
| 169 |
+
# hf-storage-api — see docker/Dockerfile.hf-space's own copy of this block
|
| 170 |
+
# for the full explanation (identical here; this variant serves the same
|
| 171 |
+
# corpus/storage backend, just with a different SigLIP2 backend).
|
| 172 |
+
COPY docker/hf-space/hf-storage-api/hf_storage_api /app/hf-storage-api/src/hf_storage_api
|
| 173 |
+
COPY docker/hf-space/hf-storage-api/generated /app/hf-storage-api/generated
|
| 174 |
+
RUN GRPCIO_VERSION=$(/app/.venv/bin/pip show grpcio | sed -n 's/^Version: //p') \
|
| 175 |
+
&& env -u PYTHONPATH /app/.venv/bin/pip install --no-cache-dir "grpcio-health-checking==${GRPCIO_VERSION}" \
|
| 176 |
+
&& chown -R 1000:1000 /app/hf-storage-api
|
| 177 |
+
|
| 178 |
COPY --from=opensearch-src --chown=1000:1000 /usr/share/opensearch /usr/share/opensearch
|
| 179 |
|
| 180 |
RUN /usr/share/opensearch/bin/opensearch-plugin remove opensearch-performance-analyzer
|
|
|
|
| 225 |
|
| 226 |
COPY services/explorer/dist /usr/share/nginx/explorer
|
| 227 |
|
| 228 |
+
# Explorer download stopgap — see docker/Dockerfile.hf-space's copy of this block.
|
| 229 |
+
ARG DOWNLOAD_ENABLED=false
|
| 230 |
+
RUN if [ "$DOWNLOAD_ENABLED" = "true" ]; then \
|
| 231 |
+
f=$(grep -l 'ENABLE_DOWNLOADS:!' /usr/share/nginx/explorer/static/js/main.*.js) \
|
| 232 |
+
&& sed -i 's/ENABLE_DOWNLOADS:!1/ENABLE_DOWNLOADS:!0/' $f \
|
| 233 |
+
&& grep -q 'ENABLE_DOWNLOADS:!0' $f; \
|
| 234 |
+
fi
|
| 235 |
+
|
| 236 |
COPY --chown=1000:1000 pipeline /app/hf-space-pipeline/pipeline
|
| 237 |
|
| 238 |
ARG ARTIFACT_S3_URI
|
|
|
|
| 255 |
ARG S3_STORAGE_BUCKET_NAME
|
| 256 |
ARG S3_STORAGE_REGION_NAME=us-west-2
|
| 257 |
ARG STORAGE_BACKEND_TYPE=s3
|
| 258 |
+
# DOWNLOAD_ENABLED / HF_TOKEN / STORAGE_API_* — see
|
| 259 |
+
# docker/Dockerfile.hf-space's own copies of these comments for the full
|
| 260 |
+
# explanation.
|
| 261 |
+
ARG DOWNLOAD_ENABLED=false
|
| 262 |
+
ENV HF_TOKEN= \
|
| 263 |
+
DOWNLOAD_ENABLED=${DOWNLOAD_ENABLED} \
|
| 264 |
+
STORAGE_BACKEND_TYPE=${STORAGE_BACKEND_TYPE} \
|
| 265 |
S3_STORAGE_BUCKET_NAME=${S3_STORAGE_BUCKET_NAME} \
|
| 266 |
S3_STORAGE_REGION_NAME=${S3_STORAGE_REGION_NAME} \
|
| 267 |
opensearch_host=http://localhost:9200 \
|
|
|
|
| 285 |
HYBRID_SEARCH_SCORING_CONFIG_VECTOR_FIELDS="{\"siglip2-embedding.embedding\":{\"enabled\":true,\"weight\":1,\"field_name\":\"siglip2-embedding.embedding\",\"dimension\":1536}}" \
|
| 286 |
USDSEARCH_URL_MAPPING_MODE=rules \
|
| 287 |
USDSEARCH_URL_MAPPING_RULES="[{\"internal\": \"hf://huggingface.co/datasets/nvidia/srp-staging-controlled/\", \"public\": \"https://huggingface.co/datasets/nvidia/srp-staging-controlled/blob/main/\"}]" \
|
| 288 |
+
STORAGE_API_GRPC_ENDPOINT=localhost:50051 \
|
| 289 |
+
STORAGE_API_SSL=false \
|
| 290 |
+
STORAGE_API_IGNORE_FILE_FOLDER_API=true \
|
| 291 |
+
STORAGE_API_THUMBNAIL_METADATA_FIELDS="[\"hf:thumbnail_url\"]" \
|
| 292 |
SIGLIP2_TRITON_SERVER_URL=localhost:8001 \
|
| 293 |
TRITON_SERVER_URL=localhost:8001 \
|
| 294 |
SIGLIP2_TRITON_SERVER_SSL=false \
|
docker/hf-space/hf-storage-api/SOURCE.txt
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Generated by scripts/extract_hf_storage_api.sh — do not hand-edit.
|
| 2 |
+
source_image=nvcr.io/m3sujtetvf5w/usdsearch/hf-storage-api:71b7537
|
| 3 |
+
regenerated_against_protobuf=6.33.6
|
| 4 |
+
regenerated_against_grpcio_tools=1.80.0
|
| 5 |
+
regenerated_from_constraints=docker/hf-space/wheels/constraints.txt
|
| 6 |
+
extracted_at=2026-09-29T13:00:16Z
|
docker/hf-space/hf-storage-api/constraints-hf-storage-api.txt
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
annotated-types==0.8.0
|
| 2 |
+
anyio==4.15.1
|
| 3 |
+
certifi==2026.7.22
|
| 4 |
+
grpcio==1.84.0
|
| 5 |
+
grpcio-health-checking==1.84.0
|
| 6 |
+
grpcio-tools==1.84.0
|
| 7 |
+
h11==0.16.0
|
| 8 |
+
httpcore==1.0.9
|
| 9 |
+
httpx==0.28.1
|
| 10 |
+
idna==3.20
|
| 11 |
+
packaging==26.3
|
| 12 |
+
protobuf==7.36.2
|
| 13 |
+
pydantic==2.13.5
|
| 14 |
+
pydantic_core==2.46.5
|
| 15 |
+
pydantic-settings==2.15.0
|
| 16 |
+
python-dotenv==1.2.3
|
| 17 |
+
PyYAML==6.0.3
|
| 18 |
+
typing_extensions==4.16.0
|
| 19 |
+
typing-inspection==0.4.4
|
docker/hf-space/hf-storage-api/generated/nvidia/omniverse/notifications/consumer/v1beta/event_consumer_pb2.py
ADDED
|
@@ -0,0 +1,67 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# -*- coding: utf-8 -*-
|
| 2 |
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
| 3 |
+
# NO CHECKED-IN PROTOBUF GENCODE
|
| 4 |
+
# source: nvidia/omniverse/notifications/consumer/v1beta/event_consumer.proto
|
| 5 |
+
# Protobuf Python Version: 6.31.1
|
| 6 |
+
"""Generated protocol buffer code."""
|
| 7 |
+
from google.protobuf import descriptor as _descriptor
|
| 8 |
+
from google.protobuf import descriptor_pool as _descriptor_pool
|
| 9 |
+
from google.protobuf import runtime_version as _runtime_version
|
| 10 |
+
from google.protobuf import symbol_database as _symbol_database
|
| 11 |
+
from google.protobuf.internal import builder as _builder
|
| 12 |
+
_runtime_version.ValidateProtobufRuntimeVersion(
|
| 13 |
+
_runtime_version.Domain.PUBLIC,
|
| 14 |
+
6,
|
| 15 |
+
31,
|
| 16 |
+
1,
|
| 17 |
+
'',
|
| 18 |
+
'nvidia/omniverse/notifications/consumer/v1beta/event_consumer.proto'
|
| 19 |
+
)
|
| 20 |
+
# @@protoc_insertion_point(imports)
|
| 21 |
+
|
| 22 |
+
_sym_db = _symbol_database.Default()
|
| 23 |
+
|
| 24 |
+
|
| 25 |
+
from google.protobuf import struct_pb2 as google_dot_protobuf_dot_struct__pb2
|
| 26 |
+
from google.protobuf import timestamp_pb2 as google_dot_protobuf_dot_timestamp__pb2
|
| 27 |
+
|
| 28 |
+
|
| 29 |
+
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\nCnvidia/omniverse/notifications/consumer/v1beta/event_consumer.proto\x12.nvidia.omniverse.notifications.consumer.v1beta\x1a\x1cgoogle/protobuf/struct.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"e\n\x1c\x43onsumeDurableEventsResponse\x12\x45\n\x06\x65vents\x18\x01 \x03(\x0b\x32\x35.nvidia.omniverse.notifications.consumer.v1beta.Event\"\x81\x01\n\x1f\x43onsumeNonDurableEventsResponse\x12\x45\n\x06\x65vents\x18\x01 \x03(\x0b\x32\x35.nvidia.omniverse.notifications.consumer.v1beta.Event\x12\x17\n\x0freconnect_token\x18\x02 \x01(\t\"/\n\x1b\x43onsumeDurableEventsRequest\x12\x10\n\x08queue_id\x18\x01 \x01(\t\"\x83\x02\n\x1e\x43onsumeNonDurableEventsRequest\x12R\n\rfilter_groups\x18\x01 \x03(\x0b\x32;.nvidia.omniverse.notifications.consumer.v1beta.FilterGroup\x12\x1c\n\x0freconnect_token\x18\x02 \x01(\tH\x00\x88\x01\x01\x12[\n\x16previous_filter_groups\x18\x03 \x03(\x0b\x32;.nvidia.omniverse.notifications.consumer.v1beta.FilterGroupB\x12\n\x10_reconnect_token\"o\n\x19\x43reateDurableQueueRequest\x12R\n\rfilter_groups\x18\x01 \x03(\x0b\x32;.nvidia.omniverse.notifications.consumer.v1beta.FilterGroup\".\n\x1a\x43reateDurableQueueResponse\x12\x10\n\x08queue_id\x18\x01 \x01(\t\"-\n\x19\x44\x65leteDurableQueueRequest\x12\x10\n\x08queue_id\x18\x01 \x01(\t\"\xe1\x01\n\x19UpdateDurableQueueRequest\x12\x10\n\x08queue_id\x18\x01 \x01(\t\x12Z\n\x15\x63urrent_filter_groups\x18\x02 \x03(\x0b\x32;.nvidia.omniverse.notifications.consumer.v1beta.FilterGroup\x12V\n\x11new_filter_groups\x18\x03 \x03(\x0b\x32;.nvidia.omniverse.notifications.consumer.v1beta.FilterGroup\"\x1c\n\x1a\x44\x65leteDurableQueueResponse\"\x1c\n\x1aUpdateDurableQueueResponse\"\xc4\x01\n\x05\x45vent\x12\x12\n\nevent_type\x18\x01 \x01(\t\x12\x1a\n\x12principal_identity\x18\x02 \x01(\t\x12/\n\x0boccurred_at\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x30\n\x0cpublished_at\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12(\n\x07message\x18\x05 \x01(\x0b\x32\x17.google.protobuf.Struct\"r\n\x0b\x46ilterGroup\x12\x12\n\nevent_type\x18\x01 \x01(\t\x12O\n\x07\x66ilters\x18\x02 \x03(\x0b\x32>.nvidia.omniverse.notifications.consumer.v1beta.ResourceFilter\"\x8b\x02\n\x0eResourceFilter\x12^\n\x0b\x66ilter_type\x18\x01 \x01(\x0e\x32I.nvidia.omniverse.notifications.consumer.v1beta.ResourceFilter.FilterType\x12\x13\n\x0bresource_id\x18\x02 \x01(\t\"\x83\x01\n\nFilterType\x12\x1b\n\x17\x46ILTER_TYPE_UNSPECIFIED\x10\x00\x12\x12\n\x0e\x46ILTER_TYPE_EQ\x10\x01\x12 \n\x1c\x46ILTER_TYPE_STARTS_WITH_LAZY\x10\x02\x12\"\n\x1e\x46ILTER_TYPE_STARTS_WITH_GREEDY\x10\x03\x32\xa1\x07\n\x14\x45ventConsumerService\x12\xb5\x01\n\x14\x43onsumeDurableEvents\x12K.nvidia.omniverse.notifications.consumer.v1beta.ConsumeDurableEventsRequest\x1aL.nvidia.omniverse.notifications.consumer.v1beta.ConsumeDurableEventsResponse\"\x00\x30\x01\x12\xc0\x01\n\x17\x43onsumeNonDurableEvents\x12N.nvidia.omniverse.notifications.consumer.v1beta.ConsumeNonDurableEventsRequest\x1aO.nvidia.omniverse.notifications.consumer.v1beta.ConsumeNonDurableEventsResponse\"\x00(\x01\x30\x01\x12\xad\x01\n\x12\x43reateDurableQueue\x12I.nvidia.omniverse.notifications.consumer.v1beta.CreateDurableQueueRequest\x1aJ.nvidia.omniverse.notifications.consumer.v1beta.CreateDurableQueueResponse\"\x00\x12\xad\x01\n\x12\x44\x65leteDurableQueue\x12I.nvidia.omniverse.notifications.consumer.v1beta.DeleteDurableQueueRequest\x1aJ.nvidia.omniverse.notifications.consumer.v1beta.DeleteDurableQueueResponse\"\x00\x12\xad\x01\n\x12UpdateDurableQueue\x12I.nvidia.omniverse.notifications.consumer.v1beta.UpdateDurableQueueRequest\x1aJ.nvidia.omniverse.notifications.consumer.v1beta.UpdateDurableQueueResponse\"\x00\x42\x85\x01\n2com.nvidia.omniverse.notifications.consumer.v1betaB\x12\x45ventConsumerProtoP\x01Z9github.com/nvidia/omniverse/notifications/consumer/v1betab\x06proto3')
|
| 30 |
+
|
| 31 |
+
_globals = globals()
|
| 32 |
+
_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
|
| 33 |
+
_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'nvidia.omniverse.notifications.consumer.v1beta.event_consumer_pb2', _globals)
|
| 34 |
+
if not _descriptor._USE_C_DESCRIPTORS:
|
| 35 |
+
_globals['DESCRIPTOR']._loaded_options = None
|
| 36 |
+
_globals['DESCRIPTOR']._serialized_options = b'\n2com.nvidia.omniverse.notifications.consumer.v1betaB\022EventConsumerProtoP\001Z9github.com/nvidia/omniverse/notifications/consumer/v1beta'
|
| 37 |
+
_globals['_CONSUMEDURABLEEVENTSRESPONSE']._serialized_start=182
|
| 38 |
+
_globals['_CONSUMEDURABLEEVENTSRESPONSE']._serialized_end=283
|
| 39 |
+
_globals['_CONSUMENONDURABLEEVENTSRESPONSE']._serialized_start=286
|
| 40 |
+
_globals['_CONSUMENONDURABLEEVENTSRESPONSE']._serialized_end=415
|
| 41 |
+
_globals['_CONSUMEDURABLEEVENTSREQUEST']._serialized_start=417
|
| 42 |
+
_globals['_CONSUMEDURABLEEVENTSREQUEST']._serialized_end=464
|
| 43 |
+
_globals['_CONSUMENONDURABLEEVENTSREQUEST']._serialized_start=467
|
| 44 |
+
_globals['_CONSUMENONDURABLEEVENTSREQUEST']._serialized_end=726
|
| 45 |
+
_globals['_CREATEDURABLEQUEUEREQUEST']._serialized_start=728
|
| 46 |
+
_globals['_CREATEDURABLEQUEUEREQUEST']._serialized_end=839
|
| 47 |
+
_globals['_CREATEDURABLEQUEUERESPONSE']._serialized_start=841
|
| 48 |
+
_globals['_CREATEDURABLEQUEUERESPONSE']._serialized_end=887
|
| 49 |
+
_globals['_DELETEDURABLEQUEUEREQUEST']._serialized_start=889
|
| 50 |
+
_globals['_DELETEDURABLEQUEUEREQUEST']._serialized_end=934
|
| 51 |
+
_globals['_UPDATEDURABLEQUEUEREQUEST']._serialized_start=937
|
| 52 |
+
_globals['_UPDATEDURABLEQUEUEREQUEST']._serialized_end=1162
|
| 53 |
+
_globals['_DELETEDURABLEQUEUERESPONSE']._serialized_start=1164
|
| 54 |
+
_globals['_DELETEDURABLEQUEUERESPONSE']._serialized_end=1192
|
| 55 |
+
_globals['_UPDATEDURABLEQUEUERESPONSE']._serialized_start=1194
|
| 56 |
+
_globals['_UPDATEDURABLEQUEUERESPONSE']._serialized_end=1222
|
| 57 |
+
_globals['_EVENT']._serialized_start=1225
|
| 58 |
+
_globals['_EVENT']._serialized_end=1421
|
| 59 |
+
_globals['_FILTERGROUP']._serialized_start=1423
|
| 60 |
+
_globals['_FILTERGROUP']._serialized_end=1537
|
| 61 |
+
_globals['_RESOURCEFILTER']._serialized_start=1540
|
| 62 |
+
_globals['_RESOURCEFILTER']._serialized_end=1807
|
| 63 |
+
_globals['_RESOURCEFILTER_FILTERTYPE']._serialized_start=1676
|
| 64 |
+
_globals['_RESOURCEFILTER_FILTERTYPE']._serialized_end=1807
|
| 65 |
+
_globals['_EVENTCONSUMERSERVICE']._serialized_start=1810
|
| 66 |
+
_globals['_EVENTCONSUMERSERVICE']._serialized_end=2739
|
| 67 |
+
# @@protoc_insertion_point(module_scope)
|
docker/hf-space/hf-storage-api/generated/nvidia/omniverse/notifications/consumer/v1beta/event_consumer_pb2.pyi
ADDED
|
@@ -0,0 +1,118 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import datetime
|
| 2 |
+
|
| 3 |
+
from google.protobuf import struct_pb2 as _struct_pb2
|
| 4 |
+
from google.protobuf import timestamp_pb2 as _timestamp_pb2
|
| 5 |
+
from google.protobuf.internal import containers as _containers
|
| 6 |
+
from google.protobuf.internal import enum_type_wrapper as _enum_type_wrapper
|
| 7 |
+
from google.protobuf import descriptor as _descriptor
|
| 8 |
+
from google.protobuf import message as _message
|
| 9 |
+
from collections.abc import Iterable as _Iterable, Mapping as _Mapping
|
| 10 |
+
from typing import ClassVar as _ClassVar, Optional as _Optional, Union as _Union
|
| 11 |
+
|
| 12 |
+
DESCRIPTOR: _descriptor.FileDescriptor
|
| 13 |
+
|
| 14 |
+
class ConsumeDurableEventsResponse(_message.Message):
|
| 15 |
+
__slots__ = ("events",)
|
| 16 |
+
EVENTS_FIELD_NUMBER: _ClassVar[int]
|
| 17 |
+
events: _containers.RepeatedCompositeFieldContainer[Event]
|
| 18 |
+
def __init__(self, events: _Optional[_Iterable[_Union[Event, _Mapping]]] = ...) -> None: ...
|
| 19 |
+
|
| 20 |
+
class ConsumeNonDurableEventsResponse(_message.Message):
|
| 21 |
+
__slots__ = ("events", "reconnect_token")
|
| 22 |
+
EVENTS_FIELD_NUMBER: _ClassVar[int]
|
| 23 |
+
RECONNECT_TOKEN_FIELD_NUMBER: _ClassVar[int]
|
| 24 |
+
events: _containers.RepeatedCompositeFieldContainer[Event]
|
| 25 |
+
reconnect_token: str
|
| 26 |
+
def __init__(self, events: _Optional[_Iterable[_Union[Event, _Mapping]]] = ..., reconnect_token: _Optional[str] = ...) -> None: ...
|
| 27 |
+
|
| 28 |
+
class ConsumeDurableEventsRequest(_message.Message):
|
| 29 |
+
__slots__ = ("queue_id",)
|
| 30 |
+
QUEUE_ID_FIELD_NUMBER: _ClassVar[int]
|
| 31 |
+
queue_id: str
|
| 32 |
+
def __init__(self, queue_id: _Optional[str] = ...) -> None: ...
|
| 33 |
+
|
| 34 |
+
class ConsumeNonDurableEventsRequest(_message.Message):
|
| 35 |
+
__slots__ = ("filter_groups", "reconnect_token", "previous_filter_groups")
|
| 36 |
+
FILTER_GROUPS_FIELD_NUMBER: _ClassVar[int]
|
| 37 |
+
RECONNECT_TOKEN_FIELD_NUMBER: _ClassVar[int]
|
| 38 |
+
PREVIOUS_FILTER_GROUPS_FIELD_NUMBER: _ClassVar[int]
|
| 39 |
+
filter_groups: _containers.RepeatedCompositeFieldContainer[FilterGroup]
|
| 40 |
+
reconnect_token: str
|
| 41 |
+
previous_filter_groups: _containers.RepeatedCompositeFieldContainer[FilterGroup]
|
| 42 |
+
def __init__(self, filter_groups: _Optional[_Iterable[_Union[FilterGroup, _Mapping]]] = ..., reconnect_token: _Optional[str] = ..., previous_filter_groups: _Optional[_Iterable[_Union[FilterGroup, _Mapping]]] = ...) -> None: ...
|
| 43 |
+
|
| 44 |
+
class CreateDurableQueueRequest(_message.Message):
|
| 45 |
+
__slots__ = ("filter_groups",)
|
| 46 |
+
FILTER_GROUPS_FIELD_NUMBER: _ClassVar[int]
|
| 47 |
+
filter_groups: _containers.RepeatedCompositeFieldContainer[FilterGroup]
|
| 48 |
+
def __init__(self, filter_groups: _Optional[_Iterable[_Union[FilterGroup, _Mapping]]] = ...) -> None: ...
|
| 49 |
+
|
| 50 |
+
class CreateDurableQueueResponse(_message.Message):
|
| 51 |
+
__slots__ = ("queue_id",)
|
| 52 |
+
QUEUE_ID_FIELD_NUMBER: _ClassVar[int]
|
| 53 |
+
queue_id: str
|
| 54 |
+
def __init__(self, queue_id: _Optional[str] = ...) -> None: ...
|
| 55 |
+
|
| 56 |
+
class DeleteDurableQueueRequest(_message.Message):
|
| 57 |
+
__slots__ = ("queue_id",)
|
| 58 |
+
QUEUE_ID_FIELD_NUMBER: _ClassVar[int]
|
| 59 |
+
queue_id: str
|
| 60 |
+
def __init__(self, queue_id: _Optional[str] = ...) -> None: ...
|
| 61 |
+
|
| 62 |
+
class UpdateDurableQueueRequest(_message.Message):
|
| 63 |
+
__slots__ = ("queue_id", "current_filter_groups", "new_filter_groups")
|
| 64 |
+
QUEUE_ID_FIELD_NUMBER: _ClassVar[int]
|
| 65 |
+
CURRENT_FILTER_GROUPS_FIELD_NUMBER: _ClassVar[int]
|
| 66 |
+
NEW_FILTER_GROUPS_FIELD_NUMBER: _ClassVar[int]
|
| 67 |
+
queue_id: str
|
| 68 |
+
current_filter_groups: _containers.RepeatedCompositeFieldContainer[FilterGroup]
|
| 69 |
+
new_filter_groups: _containers.RepeatedCompositeFieldContainer[FilterGroup]
|
| 70 |
+
def __init__(self, queue_id: _Optional[str] = ..., current_filter_groups: _Optional[_Iterable[_Union[FilterGroup, _Mapping]]] = ..., new_filter_groups: _Optional[_Iterable[_Union[FilterGroup, _Mapping]]] = ...) -> None: ...
|
| 71 |
+
|
| 72 |
+
class DeleteDurableQueueResponse(_message.Message):
|
| 73 |
+
__slots__ = ()
|
| 74 |
+
def __init__(self) -> None: ...
|
| 75 |
+
|
| 76 |
+
class UpdateDurableQueueResponse(_message.Message):
|
| 77 |
+
__slots__ = ()
|
| 78 |
+
def __init__(self) -> None: ...
|
| 79 |
+
|
| 80 |
+
class Event(_message.Message):
|
| 81 |
+
__slots__ = ("event_type", "principal_identity", "occurred_at", "published_at", "message")
|
| 82 |
+
EVENT_TYPE_FIELD_NUMBER: _ClassVar[int]
|
| 83 |
+
PRINCIPAL_IDENTITY_FIELD_NUMBER: _ClassVar[int]
|
| 84 |
+
OCCURRED_AT_FIELD_NUMBER: _ClassVar[int]
|
| 85 |
+
PUBLISHED_AT_FIELD_NUMBER: _ClassVar[int]
|
| 86 |
+
MESSAGE_FIELD_NUMBER: _ClassVar[int]
|
| 87 |
+
event_type: str
|
| 88 |
+
principal_identity: str
|
| 89 |
+
occurred_at: _timestamp_pb2.Timestamp
|
| 90 |
+
published_at: _timestamp_pb2.Timestamp
|
| 91 |
+
message: _struct_pb2.Struct
|
| 92 |
+
def __init__(self, event_type: _Optional[str] = ..., principal_identity: _Optional[str] = ..., occurred_at: _Optional[_Union[datetime.datetime, _timestamp_pb2.Timestamp, _Mapping]] = ..., published_at: _Optional[_Union[datetime.datetime, _timestamp_pb2.Timestamp, _Mapping]] = ..., message: _Optional[_Union[_struct_pb2.Struct, _Mapping]] = ...) -> None: ...
|
| 93 |
+
|
| 94 |
+
class FilterGroup(_message.Message):
|
| 95 |
+
__slots__ = ("event_type", "filters")
|
| 96 |
+
EVENT_TYPE_FIELD_NUMBER: _ClassVar[int]
|
| 97 |
+
FILTERS_FIELD_NUMBER: _ClassVar[int]
|
| 98 |
+
event_type: str
|
| 99 |
+
filters: _containers.RepeatedCompositeFieldContainer[ResourceFilter]
|
| 100 |
+
def __init__(self, event_type: _Optional[str] = ..., filters: _Optional[_Iterable[_Union[ResourceFilter, _Mapping]]] = ...) -> None: ...
|
| 101 |
+
|
| 102 |
+
class ResourceFilter(_message.Message):
|
| 103 |
+
__slots__ = ("filter_type", "resource_id")
|
| 104 |
+
class FilterType(int, metaclass=_enum_type_wrapper.EnumTypeWrapper):
|
| 105 |
+
__slots__ = ()
|
| 106 |
+
FILTER_TYPE_UNSPECIFIED: _ClassVar[ResourceFilter.FilterType]
|
| 107 |
+
FILTER_TYPE_EQ: _ClassVar[ResourceFilter.FilterType]
|
| 108 |
+
FILTER_TYPE_STARTS_WITH_LAZY: _ClassVar[ResourceFilter.FilterType]
|
| 109 |
+
FILTER_TYPE_STARTS_WITH_GREEDY: _ClassVar[ResourceFilter.FilterType]
|
| 110 |
+
FILTER_TYPE_UNSPECIFIED: ResourceFilter.FilterType
|
| 111 |
+
FILTER_TYPE_EQ: ResourceFilter.FilterType
|
| 112 |
+
FILTER_TYPE_STARTS_WITH_LAZY: ResourceFilter.FilterType
|
| 113 |
+
FILTER_TYPE_STARTS_WITH_GREEDY: ResourceFilter.FilterType
|
| 114 |
+
FILTER_TYPE_FIELD_NUMBER: _ClassVar[int]
|
| 115 |
+
RESOURCE_ID_FIELD_NUMBER: _ClassVar[int]
|
| 116 |
+
filter_type: ResourceFilter.FilterType
|
| 117 |
+
resource_id: str
|
| 118 |
+
def __init__(self, filter_type: _Optional[_Union[ResourceFilter.FilterType, str]] = ..., resource_id: _Optional[str] = ...) -> None: ...
|
docker/hf-space/hf-storage-api/generated/nvidia/omniverse/notifications/consumer/v1beta/event_consumer_pb2_grpc.py
ADDED
|
@@ -0,0 +1,269 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
|
| 2 |
+
"""Client and server classes corresponding to protobuf-defined services."""
|
| 3 |
+
import grpc
|
| 4 |
+
import warnings
|
| 5 |
+
|
| 6 |
+
from nvidia.omniverse.notifications.consumer.v1beta import event_consumer_pb2 as nvidia_dot_omniverse_dot_notifications_dot_consumer_dot_v1beta_dot_event__consumer__pb2
|
| 7 |
+
|
| 8 |
+
GRPC_GENERATED_VERSION = '1.80.0'
|
| 9 |
+
GRPC_VERSION = grpc.__version__
|
| 10 |
+
_version_not_supported = False
|
| 11 |
+
|
| 12 |
+
try:
|
| 13 |
+
from grpc._utilities import first_version_is_lower
|
| 14 |
+
_version_not_supported = first_version_is_lower(GRPC_VERSION, GRPC_GENERATED_VERSION)
|
| 15 |
+
except ImportError:
|
| 16 |
+
_version_not_supported = True
|
| 17 |
+
|
| 18 |
+
if _version_not_supported:
|
| 19 |
+
raise RuntimeError(
|
| 20 |
+
f'The grpc package installed is at version {GRPC_VERSION},'
|
| 21 |
+
+ ' but the generated code in nvidia/omniverse/notifications/consumer/v1beta/event_consumer_pb2_grpc.py depends on'
|
| 22 |
+
+ f' grpcio>={GRPC_GENERATED_VERSION}.'
|
| 23 |
+
+ f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}'
|
| 24 |
+
+ f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.'
|
| 25 |
+
)
|
| 26 |
+
|
| 27 |
+
|
| 28 |
+
class EventConsumerServiceStub(object):
|
| 29 |
+
"""Missing associated documentation comment in .proto file."""
|
| 30 |
+
|
| 31 |
+
def __init__(self, channel):
|
| 32 |
+
"""Constructor.
|
| 33 |
+
|
| 34 |
+
Args:
|
| 35 |
+
channel: A grpc.Channel.
|
| 36 |
+
"""
|
| 37 |
+
self.ConsumeDurableEvents = channel.unary_stream(
|
| 38 |
+
'/nvidia.omniverse.notifications.consumer.v1beta.EventConsumerService/ConsumeDurableEvents',
|
| 39 |
+
request_serializer=nvidia_dot_omniverse_dot_notifications_dot_consumer_dot_v1beta_dot_event__consumer__pb2.ConsumeDurableEventsRequest.SerializeToString,
|
| 40 |
+
response_deserializer=nvidia_dot_omniverse_dot_notifications_dot_consumer_dot_v1beta_dot_event__consumer__pb2.ConsumeDurableEventsResponse.FromString,
|
| 41 |
+
_registered_method=True)
|
| 42 |
+
self.ConsumeNonDurableEvents = channel.stream_stream(
|
| 43 |
+
'/nvidia.omniverse.notifications.consumer.v1beta.EventConsumerService/ConsumeNonDurableEvents',
|
| 44 |
+
request_serializer=nvidia_dot_omniverse_dot_notifications_dot_consumer_dot_v1beta_dot_event__consumer__pb2.ConsumeNonDurableEventsRequest.SerializeToString,
|
| 45 |
+
response_deserializer=nvidia_dot_omniverse_dot_notifications_dot_consumer_dot_v1beta_dot_event__consumer__pb2.ConsumeNonDurableEventsResponse.FromString,
|
| 46 |
+
_registered_method=True)
|
| 47 |
+
self.CreateDurableQueue = channel.unary_unary(
|
| 48 |
+
'/nvidia.omniverse.notifications.consumer.v1beta.EventConsumerService/CreateDurableQueue',
|
| 49 |
+
request_serializer=nvidia_dot_omniverse_dot_notifications_dot_consumer_dot_v1beta_dot_event__consumer__pb2.CreateDurableQueueRequest.SerializeToString,
|
| 50 |
+
response_deserializer=nvidia_dot_omniverse_dot_notifications_dot_consumer_dot_v1beta_dot_event__consumer__pb2.CreateDurableQueueResponse.FromString,
|
| 51 |
+
_registered_method=True)
|
| 52 |
+
self.DeleteDurableQueue = channel.unary_unary(
|
| 53 |
+
'/nvidia.omniverse.notifications.consumer.v1beta.EventConsumerService/DeleteDurableQueue',
|
| 54 |
+
request_serializer=nvidia_dot_omniverse_dot_notifications_dot_consumer_dot_v1beta_dot_event__consumer__pb2.DeleteDurableQueueRequest.SerializeToString,
|
| 55 |
+
response_deserializer=nvidia_dot_omniverse_dot_notifications_dot_consumer_dot_v1beta_dot_event__consumer__pb2.DeleteDurableQueueResponse.FromString,
|
| 56 |
+
_registered_method=True)
|
| 57 |
+
self.UpdateDurableQueue = channel.unary_unary(
|
| 58 |
+
'/nvidia.omniverse.notifications.consumer.v1beta.EventConsumerService/UpdateDurableQueue',
|
| 59 |
+
request_serializer=nvidia_dot_omniverse_dot_notifications_dot_consumer_dot_v1beta_dot_event__consumer__pb2.UpdateDurableQueueRequest.SerializeToString,
|
| 60 |
+
response_deserializer=nvidia_dot_omniverse_dot_notifications_dot_consumer_dot_v1beta_dot_event__consumer__pb2.UpdateDurableQueueResponse.FromString,
|
| 61 |
+
_registered_method=True)
|
| 62 |
+
|
| 63 |
+
|
| 64 |
+
class EventConsumerServiceServicer(object):
|
| 65 |
+
"""Missing associated documentation comment in .proto file."""
|
| 66 |
+
|
| 67 |
+
def ConsumeDurableEvents(self, request, context):
|
| 68 |
+
"""Missing associated documentation comment in .proto file."""
|
| 69 |
+
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
| 70 |
+
context.set_details('Method not implemented!')
|
| 71 |
+
raise NotImplementedError('Method not implemented!')
|
| 72 |
+
|
| 73 |
+
def ConsumeNonDurableEvents(self, request_iterator, context):
|
| 74 |
+
"""Missing associated documentation comment in .proto file."""
|
| 75 |
+
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
| 76 |
+
context.set_details('Method not implemented!')
|
| 77 |
+
raise NotImplementedError('Method not implemented!')
|
| 78 |
+
|
| 79 |
+
def CreateDurableQueue(self, request, context):
|
| 80 |
+
"""Missing associated documentation comment in .proto file."""
|
| 81 |
+
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
| 82 |
+
context.set_details('Method not implemented!')
|
| 83 |
+
raise NotImplementedError('Method not implemented!')
|
| 84 |
+
|
| 85 |
+
def DeleteDurableQueue(self, request, context):
|
| 86 |
+
"""Missing associated documentation comment in .proto file."""
|
| 87 |
+
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
| 88 |
+
context.set_details('Method not implemented!')
|
| 89 |
+
raise NotImplementedError('Method not implemented!')
|
| 90 |
+
|
| 91 |
+
def UpdateDurableQueue(self, request, context):
|
| 92 |
+
"""Missing associated documentation comment in .proto file."""
|
| 93 |
+
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
| 94 |
+
context.set_details('Method not implemented!')
|
| 95 |
+
raise NotImplementedError('Method not implemented!')
|
| 96 |
+
|
| 97 |
+
|
| 98 |
+
def add_EventConsumerServiceServicer_to_server(servicer, server):
|
| 99 |
+
rpc_method_handlers = {
|
| 100 |
+
'ConsumeDurableEvents': grpc.unary_stream_rpc_method_handler(
|
| 101 |
+
servicer.ConsumeDurableEvents,
|
| 102 |
+
request_deserializer=nvidia_dot_omniverse_dot_notifications_dot_consumer_dot_v1beta_dot_event__consumer__pb2.ConsumeDurableEventsRequest.FromString,
|
| 103 |
+
response_serializer=nvidia_dot_omniverse_dot_notifications_dot_consumer_dot_v1beta_dot_event__consumer__pb2.ConsumeDurableEventsResponse.SerializeToString,
|
| 104 |
+
),
|
| 105 |
+
'ConsumeNonDurableEvents': grpc.stream_stream_rpc_method_handler(
|
| 106 |
+
servicer.ConsumeNonDurableEvents,
|
| 107 |
+
request_deserializer=nvidia_dot_omniverse_dot_notifications_dot_consumer_dot_v1beta_dot_event__consumer__pb2.ConsumeNonDurableEventsRequest.FromString,
|
| 108 |
+
response_serializer=nvidia_dot_omniverse_dot_notifications_dot_consumer_dot_v1beta_dot_event__consumer__pb2.ConsumeNonDurableEventsResponse.SerializeToString,
|
| 109 |
+
),
|
| 110 |
+
'CreateDurableQueue': grpc.unary_unary_rpc_method_handler(
|
| 111 |
+
servicer.CreateDurableQueue,
|
| 112 |
+
request_deserializer=nvidia_dot_omniverse_dot_notifications_dot_consumer_dot_v1beta_dot_event__consumer__pb2.CreateDurableQueueRequest.FromString,
|
| 113 |
+
response_serializer=nvidia_dot_omniverse_dot_notifications_dot_consumer_dot_v1beta_dot_event__consumer__pb2.CreateDurableQueueResponse.SerializeToString,
|
| 114 |
+
),
|
| 115 |
+
'DeleteDurableQueue': grpc.unary_unary_rpc_method_handler(
|
| 116 |
+
servicer.DeleteDurableQueue,
|
| 117 |
+
request_deserializer=nvidia_dot_omniverse_dot_notifications_dot_consumer_dot_v1beta_dot_event__consumer__pb2.DeleteDurableQueueRequest.FromString,
|
| 118 |
+
response_serializer=nvidia_dot_omniverse_dot_notifications_dot_consumer_dot_v1beta_dot_event__consumer__pb2.DeleteDurableQueueResponse.SerializeToString,
|
| 119 |
+
),
|
| 120 |
+
'UpdateDurableQueue': grpc.unary_unary_rpc_method_handler(
|
| 121 |
+
servicer.UpdateDurableQueue,
|
| 122 |
+
request_deserializer=nvidia_dot_omniverse_dot_notifications_dot_consumer_dot_v1beta_dot_event__consumer__pb2.UpdateDurableQueueRequest.FromString,
|
| 123 |
+
response_serializer=nvidia_dot_omniverse_dot_notifications_dot_consumer_dot_v1beta_dot_event__consumer__pb2.UpdateDurableQueueResponse.SerializeToString,
|
| 124 |
+
),
|
| 125 |
+
}
|
| 126 |
+
generic_handler = grpc.method_handlers_generic_handler(
|
| 127 |
+
'nvidia.omniverse.notifications.consumer.v1beta.EventConsumerService', rpc_method_handlers)
|
| 128 |
+
server.add_generic_rpc_handlers((generic_handler,))
|
| 129 |
+
server.add_registered_method_handlers('nvidia.omniverse.notifications.consumer.v1beta.EventConsumerService', rpc_method_handlers)
|
| 130 |
+
|
| 131 |
+
|
| 132 |
+
# This class is part of an EXPERIMENTAL API.
|
| 133 |
+
class EventConsumerService(object):
|
| 134 |
+
"""Missing associated documentation comment in .proto file."""
|
| 135 |
+
|
| 136 |
+
@staticmethod
|
| 137 |
+
def ConsumeDurableEvents(request,
|
| 138 |
+
target,
|
| 139 |
+
options=(),
|
| 140 |
+
channel_credentials=None,
|
| 141 |
+
call_credentials=None,
|
| 142 |
+
insecure=False,
|
| 143 |
+
compression=None,
|
| 144 |
+
wait_for_ready=None,
|
| 145 |
+
timeout=None,
|
| 146 |
+
metadata=None):
|
| 147 |
+
return grpc.experimental.unary_stream(
|
| 148 |
+
request,
|
| 149 |
+
target,
|
| 150 |
+
'/nvidia.omniverse.notifications.consumer.v1beta.EventConsumerService/ConsumeDurableEvents',
|
| 151 |
+
nvidia_dot_omniverse_dot_notifications_dot_consumer_dot_v1beta_dot_event__consumer__pb2.ConsumeDurableEventsRequest.SerializeToString,
|
| 152 |
+
nvidia_dot_omniverse_dot_notifications_dot_consumer_dot_v1beta_dot_event__consumer__pb2.ConsumeDurableEventsResponse.FromString,
|
| 153 |
+
options,
|
| 154 |
+
channel_credentials,
|
| 155 |
+
insecure,
|
| 156 |
+
call_credentials,
|
| 157 |
+
compression,
|
| 158 |
+
wait_for_ready,
|
| 159 |
+
timeout,
|
| 160 |
+
metadata,
|
| 161 |
+
_registered_method=True)
|
| 162 |
+
|
| 163 |
+
@staticmethod
|
| 164 |
+
def ConsumeNonDurableEvents(request_iterator,
|
| 165 |
+
target,
|
| 166 |
+
options=(),
|
| 167 |
+
channel_credentials=None,
|
| 168 |
+
call_credentials=None,
|
| 169 |
+
insecure=False,
|
| 170 |
+
compression=None,
|
| 171 |
+
wait_for_ready=None,
|
| 172 |
+
timeout=None,
|
| 173 |
+
metadata=None):
|
| 174 |
+
return grpc.experimental.stream_stream(
|
| 175 |
+
request_iterator,
|
| 176 |
+
target,
|
| 177 |
+
'/nvidia.omniverse.notifications.consumer.v1beta.EventConsumerService/ConsumeNonDurableEvents',
|
| 178 |
+
nvidia_dot_omniverse_dot_notifications_dot_consumer_dot_v1beta_dot_event__consumer__pb2.ConsumeNonDurableEventsRequest.SerializeToString,
|
| 179 |
+
nvidia_dot_omniverse_dot_notifications_dot_consumer_dot_v1beta_dot_event__consumer__pb2.ConsumeNonDurableEventsResponse.FromString,
|
| 180 |
+
options,
|
| 181 |
+
channel_credentials,
|
| 182 |
+
insecure,
|
| 183 |
+
call_credentials,
|
| 184 |
+
compression,
|
| 185 |
+
wait_for_ready,
|
| 186 |
+
timeout,
|
| 187 |
+
metadata,
|
| 188 |
+
_registered_method=True)
|
| 189 |
+
|
| 190 |
+
@staticmethod
|
| 191 |
+
def CreateDurableQueue(request,
|
| 192 |
+
target,
|
| 193 |
+
options=(),
|
| 194 |
+
channel_credentials=None,
|
| 195 |
+
call_credentials=None,
|
| 196 |
+
insecure=False,
|
| 197 |
+
compression=None,
|
| 198 |
+
wait_for_ready=None,
|
| 199 |
+
timeout=None,
|
| 200 |
+
metadata=None):
|
| 201 |
+
return grpc.experimental.unary_unary(
|
| 202 |
+
request,
|
| 203 |
+
target,
|
| 204 |
+
'/nvidia.omniverse.notifications.consumer.v1beta.EventConsumerService/CreateDurableQueue',
|
| 205 |
+
nvidia_dot_omniverse_dot_notifications_dot_consumer_dot_v1beta_dot_event__consumer__pb2.CreateDurableQueueRequest.SerializeToString,
|
| 206 |
+
nvidia_dot_omniverse_dot_notifications_dot_consumer_dot_v1beta_dot_event__consumer__pb2.CreateDurableQueueResponse.FromString,
|
| 207 |
+
options,
|
| 208 |
+
channel_credentials,
|
| 209 |
+
insecure,
|
| 210 |
+
call_credentials,
|
| 211 |
+
compression,
|
| 212 |
+
wait_for_ready,
|
| 213 |
+
timeout,
|
| 214 |
+
metadata,
|
| 215 |
+
_registered_method=True)
|
| 216 |
+
|
| 217 |
+
@staticmethod
|
| 218 |
+
def DeleteDurableQueue(request,
|
| 219 |
+
target,
|
| 220 |
+
options=(),
|
| 221 |
+
channel_credentials=None,
|
| 222 |
+
call_credentials=None,
|
| 223 |
+
insecure=False,
|
| 224 |
+
compression=None,
|
| 225 |
+
wait_for_ready=None,
|
| 226 |
+
timeout=None,
|
| 227 |
+
metadata=None):
|
| 228 |
+
return grpc.experimental.unary_unary(
|
| 229 |
+
request,
|
| 230 |
+
target,
|
| 231 |
+
'/nvidia.omniverse.notifications.consumer.v1beta.EventConsumerService/DeleteDurableQueue',
|
| 232 |
+
nvidia_dot_omniverse_dot_notifications_dot_consumer_dot_v1beta_dot_event__consumer__pb2.DeleteDurableQueueRequest.SerializeToString,
|
| 233 |
+
nvidia_dot_omniverse_dot_notifications_dot_consumer_dot_v1beta_dot_event__consumer__pb2.DeleteDurableQueueResponse.FromString,
|
| 234 |
+
options,
|
| 235 |
+
channel_credentials,
|
| 236 |
+
insecure,
|
| 237 |
+
call_credentials,
|
| 238 |
+
compression,
|
| 239 |
+
wait_for_ready,
|
| 240 |
+
timeout,
|
| 241 |
+
metadata,
|
| 242 |
+
_registered_method=True)
|
| 243 |
+
|
| 244 |
+
@staticmethod
|
| 245 |
+
def UpdateDurableQueue(request,
|
| 246 |
+
target,
|
| 247 |
+
options=(),
|
| 248 |
+
channel_credentials=None,
|
| 249 |
+
call_credentials=None,
|
| 250 |
+
insecure=False,
|
| 251 |
+
compression=None,
|
| 252 |
+
wait_for_ready=None,
|
| 253 |
+
timeout=None,
|
| 254 |
+
metadata=None):
|
| 255 |
+
return grpc.experimental.unary_unary(
|
| 256 |
+
request,
|
| 257 |
+
target,
|
| 258 |
+
'/nvidia.omniverse.notifications.consumer.v1beta.EventConsumerService/UpdateDurableQueue',
|
| 259 |
+
nvidia_dot_omniverse_dot_notifications_dot_consumer_dot_v1beta_dot_event__consumer__pb2.UpdateDurableQueueRequest.SerializeToString,
|
| 260 |
+
nvidia_dot_omniverse_dot_notifications_dot_consumer_dot_v1beta_dot_event__consumer__pb2.UpdateDurableQueueResponse.FromString,
|
| 261 |
+
options,
|
| 262 |
+
channel_credentials,
|
| 263 |
+
insecure,
|
| 264 |
+
call_credentials,
|
| 265 |
+
compression,
|
| 266 |
+
wait_for_ready,
|
| 267 |
+
timeout,
|
| 268 |
+
metadata,
|
| 269 |
+
_registered_method=True)
|
docker/hf-space/hf-storage-api/generated/nvidia/omniverse/storage/capabilities/v1alpha/capabilities_pb2.py
ADDED
|
@@ -0,0 +1,55 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# -*- coding: utf-8 -*-
|
| 2 |
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
| 3 |
+
# NO CHECKED-IN PROTOBUF GENCODE
|
| 4 |
+
# source: nvidia/omniverse/storage/capabilities/v1alpha/capabilities.proto
|
| 5 |
+
# Protobuf Python Version: 6.31.1
|
| 6 |
+
"""Generated protocol buffer code."""
|
| 7 |
+
from google.protobuf import descriptor as _descriptor
|
| 8 |
+
from google.protobuf import descriptor_pool as _descriptor_pool
|
| 9 |
+
from google.protobuf import runtime_version as _runtime_version
|
| 10 |
+
from google.protobuf import symbol_database as _symbol_database
|
| 11 |
+
from google.protobuf.internal import builder as _builder
|
| 12 |
+
_runtime_version.ValidateProtobufRuntimeVersion(
|
| 13 |
+
_runtime_version.Domain.PUBLIC,
|
| 14 |
+
6,
|
| 15 |
+
31,
|
| 16 |
+
1,
|
| 17 |
+
'',
|
| 18 |
+
'nvidia/omniverse/storage/capabilities/v1alpha/capabilities.proto'
|
| 19 |
+
)
|
| 20 |
+
# @@protoc_insertion_point(imports)
|
| 21 |
+
|
| 22 |
+
_sym_db = _symbol_database.Default()
|
| 23 |
+
|
| 24 |
+
|
| 25 |
+
|
| 26 |
+
|
| 27 |
+
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n@nvidia/omniverse/storage/capabilities/v1alpha/capabilities.proto\x12-nvidia.omniverse.storage.capabilities.v1alpha\"\x15\n\x13ListServicesRequest\"e\n\x14ListServicesResponse\x12M\n\x08services\x18\x01 \x03(\x0b\x32;.nvidia.omniverse.storage.capabilities.v1alpha.ServiceEntry\">\n\x0cServiceEntry\x12\x14\n\x0cservice_name\x18\x01 \x01(\t\x12\x18\n\x10service_versions\x18\x02 \x03(\t\"\x1e\n\x1cListTopLevelAddressesRequest\"s\n\x1dListTopLevelAddressesResponse\x12R\n\x05items\x18\x01 \x03(\x0b\x32\x43.nvidia.omniverse.storage.capabilities.v1alpha.TopLevelAddressEntry\"\x13\n\x11ListRoutesRequest\"Y\n\x12ListRoutesResponse\x12\x43\n\x05items\x18\x01 \x03(\x0b\x32\x34.nvidia.omniverse.storage.capabilities.v1alpha.Route\"1\n\x14TopLevelAddressEntry\x12\x19\n\x11top_level_address\x18\x01 \x01(\t\"1\n\x05Route\x12\x1a\n\x10wildcard_pattern\x18\x01 \x01(\tH\x00\x42\x0c\n\nroute_type2\xf8\x03\n\x13\x43\x61pabilitiesService\x12\x97\x01\n\x0cListServices\x12\x42.nvidia.omniverse.storage.capabilities.v1alpha.ListServicesRequest\x1a\x43.nvidia.omniverse.storage.capabilities.v1alpha.ListServicesResponse\x12\xb2\x01\n\x15ListTopLevelAddresses\x12K.nvidia.omniverse.storage.capabilities.v1alpha.ListTopLevelAddressesRequest\x1aL.nvidia.omniverse.storage.capabilities.v1alpha.ListTopLevelAddressesResponse\x12\x91\x01\n\nListRoutes\x12@.nvidia.omniverse.storage.capabilities.v1alpha.ListRoutesRequest\x1a\x41.nvidia.omniverse.storage.capabilities.v1alpha.ListRoutesResponseB\x8a\x01\n1com.nvidia.omniverse.storage.capabilities.v1alphaB\x11\x43\x61pabilitiesProtoP\x01Z@pb.api.nvidia.com/omniverse/storage/capabilities/v1alpha;storageb\x06proto3')
|
| 28 |
+
|
| 29 |
+
_globals = globals()
|
| 30 |
+
_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
|
| 31 |
+
_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'nvidia.omniverse.storage.capabilities.v1alpha.capabilities_pb2', _globals)
|
| 32 |
+
if not _descriptor._USE_C_DESCRIPTORS:
|
| 33 |
+
_globals['DESCRIPTOR']._loaded_options = None
|
| 34 |
+
_globals['DESCRIPTOR']._serialized_options = b'\n1com.nvidia.omniverse.storage.capabilities.v1alphaB\021CapabilitiesProtoP\001Z@pb.api.nvidia.com/omniverse/storage/capabilities/v1alpha;storage'
|
| 35 |
+
_globals['_LISTSERVICESREQUEST']._serialized_start=115
|
| 36 |
+
_globals['_LISTSERVICESREQUEST']._serialized_end=136
|
| 37 |
+
_globals['_LISTSERVICESRESPONSE']._serialized_start=138
|
| 38 |
+
_globals['_LISTSERVICESRESPONSE']._serialized_end=239
|
| 39 |
+
_globals['_SERVICEENTRY']._serialized_start=241
|
| 40 |
+
_globals['_SERVICEENTRY']._serialized_end=303
|
| 41 |
+
_globals['_LISTTOPLEVELADDRESSESREQUEST']._serialized_start=305
|
| 42 |
+
_globals['_LISTTOPLEVELADDRESSESREQUEST']._serialized_end=335
|
| 43 |
+
_globals['_LISTTOPLEVELADDRESSESRESPONSE']._serialized_start=337
|
| 44 |
+
_globals['_LISTTOPLEVELADDRESSESRESPONSE']._serialized_end=452
|
| 45 |
+
_globals['_LISTROUTESREQUEST']._serialized_start=454
|
| 46 |
+
_globals['_LISTROUTESREQUEST']._serialized_end=473
|
| 47 |
+
_globals['_LISTROUTESRESPONSE']._serialized_start=475
|
| 48 |
+
_globals['_LISTROUTESRESPONSE']._serialized_end=564
|
| 49 |
+
_globals['_TOPLEVELADDRESSENTRY']._serialized_start=566
|
| 50 |
+
_globals['_TOPLEVELADDRESSENTRY']._serialized_end=615
|
| 51 |
+
_globals['_ROUTE']._serialized_start=617
|
| 52 |
+
_globals['_ROUTE']._serialized_end=666
|
| 53 |
+
_globals['_CAPABILITIESSERVICE']._serialized_start=669
|
| 54 |
+
_globals['_CAPABILITIESSERVICE']._serialized_end=1173
|
| 55 |
+
# @@protoc_insertion_point(module_scope)
|
docker/hf-space/hf-storage-api/generated/nvidia/omniverse/storage/capabilities/v1alpha/capabilities_pb2.pyi
ADDED
|
@@ -0,0 +1,57 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
from google.protobuf.internal import containers as _containers
|
| 2 |
+
from google.protobuf import descriptor as _descriptor
|
| 3 |
+
from google.protobuf import message as _message
|
| 4 |
+
from collections.abc import Iterable as _Iterable, Mapping as _Mapping
|
| 5 |
+
from typing import ClassVar as _ClassVar, Optional as _Optional, Union as _Union
|
| 6 |
+
|
| 7 |
+
DESCRIPTOR: _descriptor.FileDescriptor
|
| 8 |
+
|
| 9 |
+
class ListServicesRequest(_message.Message):
|
| 10 |
+
__slots__ = ()
|
| 11 |
+
def __init__(self) -> None: ...
|
| 12 |
+
|
| 13 |
+
class ListServicesResponse(_message.Message):
|
| 14 |
+
__slots__ = ("services",)
|
| 15 |
+
SERVICES_FIELD_NUMBER: _ClassVar[int]
|
| 16 |
+
services: _containers.RepeatedCompositeFieldContainer[ServiceEntry]
|
| 17 |
+
def __init__(self, services: _Optional[_Iterable[_Union[ServiceEntry, _Mapping]]] = ...) -> None: ...
|
| 18 |
+
|
| 19 |
+
class ServiceEntry(_message.Message):
|
| 20 |
+
__slots__ = ("service_name", "service_versions")
|
| 21 |
+
SERVICE_NAME_FIELD_NUMBER: _ClassVar[int]
|
| 22 |
+
SERVICE_VERSIONS_FIELD_NUMBER: _ClassVar[int]
|
| 23 |
+
service_name: str
|
| 24 |
+
service_versions: _containers.RepeatedScalarFieldContainer[str]
|
| 25 |
+
def __init__(self, service_name: _Optional[str] = ..., service_versions: _Optional[_Iterable[str]] = ...) -> None: ...
|
| 26 |
+
|
| 27 |
+
class ListTopLevelAddressesRequest(_message.Message):
|
| 28 |
+
__slots__ = ()
|
| 29 |
+
def __init__(self) -> None: ...
|
| 30 |
+
|
| 31 |
+
class ListTopLevelAddressesResponse(_message.Message):
|
| 32 |
+
__slots__ = ("items",)
|
| 33 |
+
ITEMS_FIELD_NUMBER: _ClassVar[int]
|
| 34 |
+
items: _containers.RepeatedCompositeFieldContainer[TopLevelAddressEntry]
|
| 35 |
+
def __init__(self, items: _Optional[_Iterable[_Union[TopLevelAddressEntry, _Mapping]]] = ...) -> None: ...
|
| 36 |
+
|
| 37 |
+
class ListRoutesRequest(_message.Message):
|
| 38 |
+
__slots__ = ()
|
| 39 |
+
def __init__(self) -> None: ...
|
| 40 |
+
|
| 41 |
+
class ListRoutesResponse(_message.Message):
|
| 42 |
+
__slots__ = ("items",)
|
| 43 |
+
ITEMS_FIELD_NUMBER: _ClassVar[int]
|
| 44 |
+
items: _containers.RepeatedCompositeFieldContainer[Route]
|
| 45 |
+
def __init__(self, items: _Optional[_Iterable[_Union[Route, _Mapping]]] = ...) -> None: ...
|
| 46 |
+
|
| 47 |
+
class TopLevelAddressEntry(_message.Message):
|
| 48 |
+
__slots__ = ("top_level_address",)
|
| 49 |
+
TOP_LEVEL_ADDRESS_FIELD_NUMBER: _ClassVar[int]
|
| 50 |
+
top_level_address: str
|
| 51 |
+
def __init__(self, top_level_address: _Optional[str] = ...) -> None: ...
|
| 52 |
+
|
| 53 |
+
class Route(_message.Message):
|
| 54 |
+
__slots__ = ("wildcard_pattern",)
|
| 55 |
+
WILDCARD_PATTERN_FIELD_NUMBER: _ClassVar[int]
|
| 56 |
+
wildcard_pattern: str
|
| 57 |
+
def __init__(self, wildcard_pattern: _Optional[str] = ...) -> None: ...
|
docker/hf-space/hf-storage-api/generated/nvidia/omniverse/storage/capabilities/v1alpha/capabilities_pb2_grpc.py
ADDED
|
@@ -0,0 +1,183 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
|
| 2 |
+
"""Client and server classes corresponding to protobuf-defined services."""
|
| 3 |
+
import grpc
|
| 4 |
+
import warnings
|
| 5 |
+
|
| 6 |
+
from nvidia.omniverse.storage.capabilities.v1alpha import capabilities_pb2 as nvidia_dot_omniverse_dot_storage_dot_capabilities_dot_v1alpha_dot_capabilities__pb2
|
| 7 |
+
|
| 8 |
+
GRPC_GENERATED_VERSION = '1.80.0'
|
| 9 |
+
GRPC_VERSION = grpc.__version__
|
| 10 |
+
_version_not_supported = False
|
| 11 |
+
|
| 12 |
+
try:
|
| 13 |
+
from grpc._utilities import first_version_is_lower
|
| 14 |
+
_version_not_supported = first_version_is_lower(GRPC_VERSION, GRPC_GENERATED_VERSION)
|
| 15 |
+
except ImportError:
|
| 16 |
+
_version_not_supported = True
|
| 17 |
+
|
| 18 |
+
if _version_not_supported:
|
| 19 |
+
raise RuntimeError(
|
| 20 |
+
f'The grpc package installed is at version {GRPC_VERSION},'
|
| 21 |
+
+ ' but the generated code in nvidia/omniverse/storage/capabilities/v1alpha/capabilities_pb2_grpc.py depends on'
|
| 22 |
+
+ f' grpcio>={GRPC_GENERATED_VERSION}.'
|
| 23 |
+
+ f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}'
|
| 24 |
+
+ f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.'
|
| 25 |
+
)
|
| 26 |
+
|
| 27 |
+
|
| 28 |
+
class CapabilitiesServiceStub(object):
|
| 29 |
+
"""Missing associated documentation comment in .proto file."""
|
| 30 |
+
|
| 31 |
+
def __init__(self, channel):
|
| 32 |
+
"""Constructor.
|
| 33 |
+
|
| 34 |
+
Args:
|
| 35 |
+
channel: A grpc.Channel.
|
| 36 |
+
"""
|
| 37 |
+
self.ListServices = channel.unary_unary(
|
| 38 |
+
'/nvidia.omniverse.storage.capabilities.v1alpha.CapabilitiesService/ListServices',
|
| 39 |
+
request_serializer=nvidia_dot_omniverse_dot_storage_dot_capabilities_dot_v1alpha_dot_capabilities__pb2.ListServicesRequest.SerializeToString,
|
| 40 |
+
response_deserializer=nvidia_dot_omniverse_dot_storage_dot_capabilities_dot_v1alpha_dot_capabilities__pb2.ListServicesResponse.FromString,
|
| 41 |
+
_registered_method=True)
|
| 42 |
+
self.ListTopLevelAddresses = channel.unary_unary(
|
| 43 |
+
'/nvidia.omniverse.storage.capabilities.v1alpha.CapabilitiesService/ListTopLevelAddresses',
|
| 44 |
+
request_serializer=nvidia_dot_omniverse_dot_storage_dot_capabilities_dot_v1alpha_dot_capabilities__pb2.ListTopLevelAddressesRequest.SerializeToString,
|
| 45 |
+
response_deserializer=nvidia_dot_omniverse_dot_storage_dot_capabilities_dot_v1alpha_dot_capabilities__pb2.ListTopLevelAddressesResponse.FromString,
|
| 46 |
+
_registered_method=True)
|
| 47 |
+
self.ListRoutes = channel.unary_unary(
|
| 48 |
+
'/nvidia.omniverse.storage.capabilities.v1alpha.CapabilitiesService/ListRoutes',
|
| 49 |
+
request_serializer=nvidia_dot_omniverse_dot_storage_dot_capabilities_dot_v1alpha_dot_capabilities__pb2.ListRoutesRequest.SerializeToString,
|
| 50 |
+
response_deserializer=nvidia_dot_omniverse_dot_storage_dot_capabilities_dot_v1alpha_dot_capabilities__pb2.ListRoutesResponse.FromString,
|
| 51 |
+
_registered_method=True)
|
| 52 |
+
|
| 53 |
+
|
| 54 |
+
class CapabilitiesServiceServicer(object):
|
| 55 |
+
"""Missing associated documentation comment in .proto file."""
|
| 56 |
+
|
| 57 |
+
def ListServices(self, request, context):
|
| 58 |
+
"""Missing associated documentation comment in .proto file."""
|
| 59 |
+
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
| 60 |
+
context.set_details('Method not implemented!')
|
| 61 |
+
raise NotImplementedError('Method not implemented!')
|
| 62 |
+
|
| 63 |
+
def ListTopLevelAddresses(self, request, context):
|
| 64 |
+
"""Missing associated documentation comment in .proto file."""
|
| 65 |
+
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
| 66 |
+
context.set_details('Method not implemented!')
|
| 67 |
+
raise NotImplementedError('Method not implemented!')
|
| 68 |
+
|
| 69 |
+
def ListRoutes(self, request, context):
|
| 70 |
+
"""Missing associated documentation comment in .proto file."""
|
| 71 |
+
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
| 72 |
+
context.set_details('Method not implemented!')
|
| 73 |
+
raise NotImplementedError('Method not implemented!')
|
| 74 |
+
|
| 75 |
+
|
| 76 |
+
def add_CapabilitiesServiceServicer_to_server(servicer, server):
|
| 77 |
+
rpc_method_handlers = {
|
| 78 |
+
'ListServices': grpc.unary_unary_rpc_method_handler(
|
| 79 |
+
servicer.ListServices,
|
| 80 |
+
request_deserializer=nvidia_dot_omniverse_dot_storage_dot_capabilities_dot_v1alpha_dot_capabilities__pb2.ListServicesRequest.FromString,
|
| 81 |
+
response_serializer=nvidia_dot_omniverse_dot_storage_dot_capabilities_dot_v1alpha_dot_capabilities__pb2.ListServicesResponse.SerializeToString,
|
| 82 |
+
),
|
| 83 |
+
'ListTopLevelAddresses': grpc.unary_unary_rpc_method_handler(
|
| 84 |
+
servicer.ListTopLevelAddresses,
|
| 85 |
+
request_deserializer=nvidia_dot_omniverse_dot_storage_dot_capabilities_dot_v1alpha_dot_capabilities__pb2.ListTopLevelAddressesRequest.FromString,
|
| 86 |
+
response_serializer=nvidia_dot_omniverse_dot_storage_dot_capabilities_dot_v1alpha_dot_capabilities__pb2.ListTopLevelAddressesResponse.SerializeToString,
|
| 87 |
+
),
|
| 88 |
+
'ListRoutes': grpc.unary_unary_rpc_method_handler(
|
| 89 |
+
servicer.ListRoutes,
|
| 90 |
+
request_deserializer=nvidia_dot_omniverse_dot_storage_dot_capabilities_dot_v1alpha_dot_capabilities__pb2.ListRoutesRequest.FromString,
|
| 91 |
+
response_serializer=nvidia_dot_omniverse_dot_storage_dot_capabilities_dot_v1alpha_dot_capabilities__pb2.ListRoutesResponse.SerializeToString,
|
| 92 |
+
),
|
| 93 |
+
}
|
| 94 |
+
generic_handler = grpc.method_handlers_generic_handler(
|
| 95 |
+
'nvidia.omniverse.storage.capabilities.v1alpha.CapabilitiesService', rpc_method_handlers)
|
| 96 |
+
server.add_generic_rpc_handlers((generic_handler,))
|
| 97 |
+
server.add_registered_method_handlers('nvidia.omniverse.storage.capabilities.v1alpha.CapabilitiesService', rpc_method_handlers)
|
| 98 |
+
|
| 99 |
+
|
| 100 |
+
# This class is part of an EXPERIMENTAL API.
|
| 101 |
+
class CapabilitiesService(object):
|
| 102 |
+
"""Missing associated documentation comment in .proto file."""
|
| 103 |
+
|
| 104 |
+
@staticmethod
|
| 105 |
+
def ListServices(request,
|
| 106 |
+
target,
|
| 107 |
+
options=(),
|
| 108 |
+
channel_credentials=None,
|
| 109 |
+
call_credentials=None,
|
| 110 |
+
insecure=False,
|
| 111 |
+
compression=None,
|
| 112 |
+
wait_for_ready=None,
|
| 113 |
+
timeout=None,
|
| 114 |
+
metadata=None):
|
| 115 |
+
return grpc.experimental.unary_unary(
|
| 116 |
+
request,
|
| 117 |
+
target,
|
| 118 |
+
'/nvidia.omniverse.storage.capabilities.v1alpha.CapabilitiesService/ListServices',
|
| 119 |
+
nvidia_dot_omniverse_dot_storage_dot_capabilities_dot_v1alpha_dot_capabilities__pb2.ListServicesRequest.SerializeToString,
|
| 120 |
+
nvidia_dot_omniverse_dot_storage_dot_capabilities_dot_v1alpha_dot_capabilities__pb2.ListServicesResponse.FromString,
|
| 121 |
+
options,
|
| 122 |
+
channel_credentials,
|
| 123 |
+
insecure,
|
| 124 |
+
call_credentials,
|
| 125 |
+
compression,
|
| 126 |
+
wait_for_ready,
|
| 127 |
+
timeout,
|
| 128 |
+
metadata,
|
| 129 |
+
_registered_method=True)
|
| 130 |
+
|
| 131 |
+
@staticmethod
|
| 132 |
+
def ListTopLevelAddresses(request,
|
| 133 |
+
target,
|
| 134 |
+
options=(),
|
| 135 |
+
channel_credentials=None,
|
| 136 |
+
call_credentials=None,
|
| 137 |
+
insecure=False,
|
| 138 |
+
compression=None,
|
| 139 |
+
wait_for_ready=None,
|
| 140 |
+
timeout=None,
|
| 141 |
+
metadata=None):
|
| 142 |
+
return grpc.experimental.unary_unary(
|
| 143 |
+
request,
|
| 144 |
+
target,
|
| 145 |
+
'/nvidia.omniverse.storage.capabilities.v1alpha.CapabilitiesService/ListTopLevelAddresses',
|
| 146 |
+
nvidia_dot_omniverse_dot_storage_dot_capabilities_dot_v1alpha_dot_capabilities__pb2.ListTopLevelAddressesRequest.SerializeToString,
|
| 147 |
+
nvidia_dot_omniverse_dot_storage_dot_capabilities_dot_v1alpha_dot_capabilities__pb2.ListTopLevelAddressesResponse.FromString,
|
| 148 |
+
options,
|
| 149 |
+
channel_credentials,
|
| 150 |
+
insecure,
|
| 151 |
+
call_credentials,
|
| 152 |
+
compression,
|
| 153 |
+
wait_for_ready,
|
| 154 |
+
timeout,
|
| 155 |
+
metadata,
|
| 156 |
+
_registered_method=True)
|
| 157 |
+
|
| 158 |
+
@staticmethod
|
| 159 |
+
def ListRoutes(request,
|
| 160 |
+
target,
|
| 161 |
+
options=(),
|
| 162 |
+
channel_credentials=None,
|
| 163 |
+
call_credentials=None,
|
| 164 |
+
insecure=False,
|
| 165 |
+
compression=None,
|
| 166 |
+
wait_for_ready=None,
|
| 167 |
+
timeout=None,
|
| 168 |
+
metadata=None):
|
| 169 |
+
return grpc.experimental.unary_unary(
|
| 170 |
+
request,
|
| 171 |
+
target,
|
| 172 |
+
'/nvidia.omniverse.storage.capabilities.v1alpha.CapabilitiesService/ListRoutes',
|
| 173 |
+
nvidia_dot_omniverse_dot_storage_dot_capabilities_dot_v1alpha_dot_capabilities__pb2.ListRoutesRequest.SerializeToString,
|
| 174 |
+
nvidia_dot_omniverse_dot_storage_dot_capabilities_dot_v1alpha_dot_capabilities__pb2.ListRoutesResponse.FromString,
|
| 175 |
+
options,
|
| 176 |
+
channel_credentials,
|
| 177 |
+
insecure,
|
| 178 |
+
call_credentials,
|
| 179 |
+
compression,
|
| 180 |
+
wait_for_ready,
|
| 181 |
+
timeout,
|
| 182 |
+
metadata,
|
| 183 |
+
_registered_method=True)
|
docker/hf-space/hf-storage-api/generated/nvidia/omniverse/storage/capabilities/v1beta/capabilities_pb2.py
ADDED
|
@@ -0,0 +1,49 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# -*- coding: utf-8 -*-
|
| 2 |
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
| 3 |
+
# NO CHECKED-IN PROTOBUF GENCODE
|
| 4 |
+
# source: nvidia/omniverse/storage/capabilities/v1beta/capabilities.proto
|
| 5 |
+
# Protobuf Python Version: 6.31.1
|
| 6 |
+
"""Generated protocol buffer code."""
|
| 7 |
+
from google.protobuf import descriptor as _descriptor
|
| 8 |
+
from google.protobuf import descriptor_pool as _descriptor_pool
|
| 9 |
+
from google.protobuf import runtime_version as _runtime_version
|
| 10 |
+
from google.protobuf import symbol_database as _symbol_database
|
| 11 |
+
from google.protobuf.internal import builder as _builder
|
| 12 |
+
_runtime_version.ValidateProtobufRuntimeVersion(
|
| 13 |
+
_runtime_version.Domain.PUBLIC,
|
| 14 |
+
6,
|
| 15 |
+
31,
|
| 16 |
+
1,
|
| 17 |
+
'',
|
| 18 |
+
'nvidia/omniverse/storage/capabilities/v1beta/capabilities.proto'
|
| 19 |
+
)
|
| 20 |
+
# @@protoc_insertion_point(imports)
|
| 21 |
+
|
| 22 |
+
_sym_db = _symbol_database.Default()
|
| 23 |
+
|
| 24 |
+
|
| 25 |
+
|
| 26 |
+
|
| 27 |
+
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n?nvidia/omniverse/storage/capabilities/v1beta/capabilities.proto\x12,nvidia.omniverse.storage.capabilities.v1beta\"\x15\n\x13ListServicesRequest\"d\n\x14ListServicesResponse\x12L\n\x08services\x18\x01 \x03(\x0b\x32:.nvidia.omniverse.storage.capabilities.v1beta.ServiceEntry\">\n\x0cServiceEntry\x12\x14\n\x0cservice_name\x18\x01 \x01(\t\x12\x18\n\x10service_versions\x18\x02 \x03(\t\"\x1e\n\x1cListTopLevelAddressesRequest\"r\n\x1dListTopLevelAddressesResponse\x12Q\n\x05items\x18\x01 \x03(\x0b\x32\x42.nvidia.omniverse.storage.capabilities.v1beta.TopLevelAddressEntry\"1\n\x14TopLevelAddressEntry\x12\x19\n\x11top_level_address\x18\x01 \x01(\t2\xe0\x02\n\x13\x43\x61pabilitiesService\x12\x95\x01\n\x0cListServices\x12\x41.nvidia.omniverse.storage.capabilities.v1beta.ListServicesRequest\x1a\x42.nvidia.omniverse.storage.capabilities.v1beta.ListServicesResponse\x12\xb0\x01\n\x15ListTopLevelAddresses\x12J.nvidia.omniverse.storage.capabilities.v1beta.ListTopLevelAddressesRequest\x1aK.nvidia.omniverse.storage.capabilities.v1beta.ListTopLevelAddressesResponseB\x88\x01\n0com.nvidia.omniverse.storage.capabilities.v1betaB\x11\x43\x61pabilitiesProtoP\x01Z?pb.api.nvidia.com/omniverse/storage/capabilities/v1beta;storageb\x06proto3')
|
| 28 |
+
|
| 29 |
+
_globals = globals()
|
| 30 |
+
_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
|
| 31 |
+
_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'nvidia.omniverse.storage.capabilities.v1beta.capabilities_pb2', _globals)
|
| 32 |
+
if not _descriptor._USE_C_DESCRIPTORS:
|
| 33 |
+
_globals['DESCRIPTOR']._loaded_options = None
|
| 34 |
+
_globals['DESCRIPTOR']._serialized_options = b'\n0com.nvidia.omniverse.storage.capabilities.v1betaB\021CapabilitiesProtoP\001Z?pb.api.nvidia.com/omniverse/storage/capabilities/v1beta;storage'
|
| 35 |
+
_globals['_LISTSERVICESREQUEST']._serialized_start=113
|
| 36 |
+
_globals['_LISTSERVICESREQUEST']._serialized_end=134
|
| 37 |
+
_globals['_LISTSERVICESRESPONSE']._serialized_start=136
|
| 38 |
+
_globals['_LISTSERVICESRESPONSE']._serialized_end=236
|
| 39 |
+
_globals['_SERVICEENTRY']._serialized_start=238
|
| 40 |
+
_globals['_SERVICEENTRY']._serialized_end=300
|
| 41 |
+
_globals['_LISTTOPLEVELADDRESSESREQUEST']._serialized_start=302
|
| 42 |
+
_globals['_LISTTOPLEVELADDRESSESREQUEST']._serialized_end=332
|
| 43 |
+
_globals['_LISTTOPLEVELADDRESSESRESPONSE']._serialized_start=334
|
| 44 |
+
_globals['_LISTTOPLEVELADDRESSESRESPONSE']._serialized_end=448
|
| 45 |
+
_globals['_TOPLEVELADDRESSENTRY']._serialized_start=450
|
| 46 |
+
_globals['_TOPLEVELADDRESSENTRY']._serialized_end=499
|
| 47 |
+
_globals['_CAPABILITIESSERVICE']._serialized_start=502
|
| 48 |
+
_globals['_CAPABILITIESSERVICE']._serialized_end=854
|
| 49 |
+
# @@protoc_insertion_point(module_scope)
|
docker/hf-space/hf-storage-api/generated/nvidia/omniverse/storage/capabilities/v1beta/capabilities_pb2.pyi
ADDED
|
@@ -0,0 +1,41 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
from google.protobuf.internal import containers as _containers
|
| 2 |
+
from google.protobuf import descriptor as _descriptor
|
| 3 |
+
from google.protobuf import message as _message
|
| 4 |
+
from collections.abc import Iterable as _Iterable, Mapping as _Mapping
|
| 5 |
+
from typing import ClassVar as _ClassVar, Optional as _Optional, Union as _Union
|
| 6 |
+
|
| 7 |
+
DESCRIPTOR: _descriptor.FileDescriptor
|
| 8 |
+
|
| 9 |
+
class ListServicesRequest(_message.Message):
|
| 10 |
+
__slots__ = ()
|
| 11 |
+
def __init__(self) -> None: ...
|
| 12 |
+
|
| 13 |
+
class ListServicesResponse(_message.Message):
|
| 14 |
+
__slots__ = ("services",)
|
| 15 |
+
SERVICES_FIELD_NUMBER: _ClassVar[int]
|
| 16 |
+
services: _containers.RepeatedCompositeFieldContainer[ServiceEntry]
|
| 17 |
+
def __init__(self, services: _Optional[_Iterable[_Union[ServiceEntry, _Mapping]]] = ...) -> None: ...
|
| 18 |
+
|
| 19 |
+
class ServiceEntry(_message.Message):
|
| 20 |
+
__slots__ = ("service_name", "service_versions")
|
| 21 |
+
SERVICE_NAME_FIELD_NUMBER: _ClassVar[int]
|
| 22 |
+
SERVICE_VERSIONS_FIELD_NUMBER: _ClassVar[int]
|
| 23 |
+
service_name: str
|
| 24 |
+
service_versions: _containers.RepeatedScalarFieldContainer[str]
|
| 25 |
+
def __init__(self, service_name: _Optional[str] = ..., service_versions: _Optional[_Iterable[str]] = ...) -> None: ...
|
| 26 |
+
|
| 27 |
+
class ListTopLevelAddressesRequest(_message.Message):
|
| 28 |
+
__slots__ = ()
|
| 29 |
+
def __init__(self) -> None: ...
|
| 30 |
+
|
| 31 |
+
class ListTopLevelAddressesResponse(_message.Message):
|
| 32 |
+
__slots__ = ("items",)
|
| 33 |
+
ITEMS_FIELD_NUMBER: _ClassVar[int]
|
| 34 |
+
items: _containers.RepeatedCompositeFieldContainer[TopLevelAddressEntry]
|
| 35 |
+
def __init__(self, items: _Optional[_Iterable[_Union[TopLevelAddressEntry, _Mapping]]] = ...) -> None: ...
|
| 36 |
+
|
| 37 |
+
class TopLevelAddressEntry(_message.Message):
|
| 38 |
+
__slots__ = ("top_level_address",)
|
| 39 |
+
TOP_LEVEL_ADDRESS_FIELD_NUMBER: _ClassVar[int]
|
| 40 |
+
top_level_address: str
|
| 41 |
+
def __init__(self, top_level_address: _Optional[str] = ...) -> None: ...
|
docker/hf-space/hf-storage-api/generated/nvidia/omniverse/storage/capabilities/v1beta/capabilities_pb2_grpc.py
ADDED
|
@@ -0,0 +1,140 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
|
| 2 |
+
"""Client and server classes corresponding to protobuf-defined services."""
|
| 3 |
+
import grpc
|
| 4 |
+
import warnings
|
| 5 |
+
|
| 6 |
+
from nvidia.omniverse.storage.capabilities.v1beta import capabilities_pb2 as nvidia_dot_omniverse_dot_storage_dot_capabilities_dot_v1beta_dot_capabilities__pb2
|
| 7 |
+
|
| 8 |
+
GRPC_GENERATED_VERSION = '1.80.0'
|
| 9 |
+
GRPC_VERSION = grpc.__version__
|
| 10 |
+
_version_not_supported = False
|
| 11 |
+
|
| 12 |
+
try:
|
| 13 |
+
from grpc._utilities import first_version_is_lower
|
| 14 |
+
_version_not_supported = first_version_is_lower(GRPC_VERSION, GRPC_GENERATED_VERSION)
|
| 15 |
+
except ImportError:
|
| 16 |
+
_version_not_supported = True
|
| 17 |
+
|
| 18 |
+
if _version_not_supported:
|
| 19 |
+
raise RuntimeError(
|
| 20 |
+
f'The grpc package installed is at version {GRPC_VERSION},'
|
| 21 |
+
+ ' but the generated code in nvidia/omniverse/storage/capabilities/v1beta/capabilities_pb2_grpc.py depends on'
|
| 22 |
+
+ f' grpcio>={GRPC_GENERATED_VERSION}.'
|
| 23 |
+
+ f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}'
|
| 24 |
+
+ f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.'
|
| 25 |
+
)
|
| 26 |
+
|
| 27 |
+
|
| 28 |
+
class CapabilitiesServiceStub(object):
|
| 29 |
+
"""Missing associated documentation comment in .proto file."""
|
| 30 |
+
|
| 31 |
+
def __init__(self, channel):
|
| 32 |
+
"""Constructor.
|
| 33 |
+
|
| 34 |
+
Args:
|
| 35 |
+
channel: A grpc.Channel.
|
| 36 |
+
"""
|
| 37 |
+
self.ListServices = channel.unary_unary(
|
| 38 |
+
'/nvidia.omniverse.storage.capabilities.v1beta.CapabilitiesService/ListServices',
|
| 39 |
+
request_serializer=nvidia_dot_omniverse_dot_storage_dot_capabilities_dot_v1beta_dot_capabilities__pb2.ListServicesRequest.SerializeToString,
|
| 40 |
+
response_deserializer=nvidia_dot_omniverse_dot_storage_dot_capabilities_dot_v1beta_dot_capabilities__pb2.ListServicesResponse.FromString,
|
| 41 |
+
_registered_method=True)
|
| 42 |
+
self.ListTopLevelAddresses = channel.unary_unary(
|
| 43 |
+
'/nvidia.omniverse.storage.capabilities.v1beta.CapabilitiesService/ListTopLevelAddresses',
|
| 44 |
+
request_serializer=nvidia_dot_omniverse_dot_storage_dot_capabilities_dot_v1beta_dot_capabilities__pb2.ListTopLevelAddressesRequest.SerializeToString,
|
| 45 |
+
response_deserializer=nvidia_dot_omniverse_dot_storage_dot_capabilities_dot_v1beta_dot_capabilities__pb2.ListTopLevelAddressesResponse.FromString,
|
| 46 |
+
_registered_method=True)
|
| 47 |
+
|
| 48 |
+
|
| 49 |
+
class CapabilitiesServiceServicer(object):
|
| 50 |
+
"""Missing associated documentation comment in .proto file."""
|
| 51 |
+
|
| 52 |
+
def ListServices(self, request, context):
|
| 53 |
+
"""Missing associated documentation comment in .proto file."""
|
| 54 |
+
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
| 55 |
+
context.set_details('Method not implemented!')
|
| 56 |
+
raise NotImplementedError('Method not implemented!')
|
| 57 |
+
|
| 58 |
+
def ListTopLevelAddresses(self, request, context):
|
| 59 |
+
"""Missing associated documentation comment in .proto file."""
|
| 60 |
+
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
| 61 |
+
context.set_details('Method not implemented!')
|
| 62 |
+
raise NotImplementedError('Method not implemented!')
|
| 63 |
+
|
| 64 |
+
|
| 65 |
+
def add_CapabilitiesServiceServicer_to_server(servicer, server):
|
| 66 |
+
rpc_method_handlers = {
|
| 67 |
+
'ListServices': grpc.unary_unary_rpc_method_handler(
|
| 68 |
+
servicer.ListServices,
|
| 69 |
+
request_deserializer=nvidia_dot_omniverse_dot_storage_dot_capabilities_dot_v1beta_dot_capabilities__pb2.ListServicesRequest.FromString,
|
| 70 |
+
response_serializer=nvidia_dot_omniverse_dot_storage_dot_capabilities_dot_v1beta_dot_capabilities__pb2.ListServicesResponse.SerializeToString,
|
| 71 |
+
),
|
| 72 |
+
'ListTopLevelAddresses': grpc.unary_unary_rpc_method_handler(
|
| 73 |
+
servicer.ListTopLevelAddresses,
|
| 74 |
+
request_deserializer=nvidia_dot_omniverse_dot_storage_dot_capabilities_dot_v1beta_dot_capabilities__pb2.ListTopLevelAddressesRequest.FromString,
|
| 75 |
+
response_serializer=nvidia_dot_omniverse_dot_storage_dot_capabilities_dot_v1beta_dot_capabilities__pb2.ListTopLevelAddressesResponse.SerializeToString,
|
| 76 |
+
),
|
| 77 |
+
}
|
| 78 |
+
generic_handler = grpc.method_handlers_generic_handler(
|
| 79 |
+
'nvidia.omniverse.storage.capabilities.v1beta.CapabilitiesService', rpc_method_handlers)
|
| 80 |
+
server.add_generic_rpc_handlers((generic_handler,))
|
| 81 |
+
server.add_registered_method_handlers('nvidia.omniverse.storage.capabilities.v1beta.CapabilitiesService', rpc_method_handlers)
|
| 82 |
+
|
| 83 |
+
|
| 84 |
+
# This class is part of an EXPERIMENTAL API.
|
| 85 |
+
class CapabilitiesService(object):
|
| 86 |
+
"""Missing associated documentation comment in .proto file."""
|
| 87 |
+
|
| 88 |
+
@staticmethod
|
| 89 |
+
def ListServices(request,
|
| 90 |
+
target,
|
| 91 |
+
options=(),
|
| 92 |
+
channel_credentials=None,
|
| 93 |
+
call_credentials=None,
|
| 94 |
+
insecure=False,
|
| 95 |
+
compression=None,
|
| 96 |
+
wait_for_ready=None,
|
| 97 |
+
timeout=None,
|
| 98 |
+
metadata=None):
|
| 99 |
+
return grpc.experimental.unary_unary(
|
| 100 |
+
request,
|
| 101 |
+
target,
|
| 102 |
+
'/nvidia.omniverse.storage.capabilities.v1beta.CapabilitiesService/ListServices',
|
| 103 |
+
nvidia_dot_omniverse_dot_storage_dot_capabilities_dot_v1beta_dot_capabilities__pb2.ListServicesRequest.SerializeToString,
|
| 104 |
+
nvidia_dot_omniverse_dot_storage_dot_capabilities_dot_v1beta_dot_capabilities__pb2.ListServicesResponse.FromString,
|
| 105 |
+
options,
|
| 106 |
+
channel_credentials,
|
| 107 |
+
insecure,
|
| 108 |
+
call_credentials,
|
| 109 |
+
compression,
|
| 110 |
+
wait_for_ready,
|
| 111 |
+
timeout,
|
| 112 |
+
metadata,
|
| 113 |
+
_registered_method=True)
|
| 114 |
+
|
| 115 |
+
@staticmethod
|
| 116 |
+
def ListTopLevelAddresses(request,
|
| 117 |
+
target,
|
| 118 |
+
options=(),
|
| 119 |
+
channel_credentials=None,
|
| 120 |
+
call_credentials=None,
|
| 121 |
+
insecure=False,
|
| 122 |
+
compression=None,
|
| 123 |
+
wait_for_ready=None,
|
| 124 |
+
timeout=None,
|
| 125 |
+
metadata=None):
|
| 126 |
+
return grpc.experimental.unary_unary(
|
| 127 |
+
request,
|
| 128 |
+
target,
|
| 129 |
+
'/nvidia.omniverse.storage.capabilities.v1beta.CapabilitiesService/ListTopLevelAddresses',
|
| 130 |
+
nvidia_dot_omniverse_dot_storage_dot_capabilities_dot_v1beta_dot_capabilities__pb2.ListTopLevelAddressesRequest.SerializeToString,
|
| 131 |
+
nvidia_dot_omniverse_dot_storage_dot_capabilities_dot_v1beta_dot_capabilities__pb2.ListTopLevelAddressesResponse.FromString,
|
| 132 |
+
options,
|
| 133 |
+
channel_credentials,
|
| 134 |
+
insecure,
|
| 135 |
+
call_credentials,
|
| 136 |
+
compression,
|
| 137 |
+
wait_for_ready,
|
| 138 |
+
timeout,
|
| 139 |
+
metadata,
|
| 140 |
+
_registered_method=True)
|
docker/hf-space/hf-storage-api/generated/nvidia/omniverse/storage/filefolder/v1alpha/filefolder_service_pb2.py
ADDED
|
@@ -0,0 +1,64 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# -*- coding: utf-8 -*-
|
| 2 |
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
| 3 |
+
# NO CHECKED-IN PROTOBUF GENCODE
|
| 4 |
+
# source: nvidia/omniverse/storage/filefolder/v1alpha/filefolder_service.proto
|
| 5 |
+
# Protobuf Python Version: 6.31.1
|
| 6 |
+
"""Generated protocol buffer code."""
|
| 7 |
+
from google.protobuf import descriptor as _descriptor
|
| 8 |
+
from google.protobuf import descriptor_pool as _descriptor_pool
|
| 9 |
+
from google.protobuf import runtime_version as _runtime_version
|
| 10 |
+
from google.protobuf import symbol_database as _symbol_database
|
| 11 |
+
from google.protobuf.internal import builder as _builder
|
| 12 |
+
_runtime_version.ValidateProtobufRuntimeVersion(
|
| 13 |
+
_runtime_version.Domain.PUBLIC,
|
| 14 |
+
6,
|
| 15 |
+
31,
|
| 16 |
+
1,
|
| 17 |
+
'',
|
| 18 |
+
'nvidia/omniverse/storage/filefolder/v1alpha/filefolder_service.proto'
|
| 19 |
+
)
|
| 20 |
+
# @@protoc_insertion_point(imports)
|
| 21 |
+
|
| 22 |
+
_sym_db = _symbol_database.Default()
|
| 23 |
+
|
| 24 |
+
|
| 25 |
+
from nvidia.omniverse.storage.fileobject.v1alpha import fileobject_pb2 as nvidia_dot_omniverse_dot_storage_dot_fileobject_dot_v1alpha_dot_fileobject__pb2
|
| 26 |
+
|
| 27 |
+
|
| 28 |
+
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\nDnvidia/omniverse/storage/filefolder/v1alpha/filefolder_service.proto\x12+nvidia.omniverse.storage.filefolder.v1alpha\x1a<nvidia/omniverse/storage/fileobject/v1alpha/fileobject.proto\"Y\n\x0bListRequest\x12J\n\x06\x66older\x18\x01 \x01(\x0b\x32:.nvidia.omniverse.storage.filefolder.v1alpha.FolderAddress\"\x87\x01\n\x0cListResponse\x12W\n\x13subfolder_addresses\x18\x01 \x03(\x0b\x32:.nvidia.omniverse.storage.filefolder.v1alpha.FolderAddress\x12\x1e\n\x16sub_resource_addresses\x18\x02 \x03(\t\"]\n\x0fListStatRequest\x12J\n\x06\x66older\x18\x01 \x01(\x0b\x32:.nvidia.omniverse.storage.filefolder.v1alpha.FolderAddress\"\xb3\x01\n\x10ListStatResponse\x12W\n\x13subfolder_addresses\x18\x01 \x03(\x0b\x32:.nvidia.omniverse.storage.filefolder.v1alpha.FolderAddress\x12\x46\n\x07\x65ntries\x18\x02 \x03(\x0b\x32\x35.nvidia.omniverse.storage.filefolder.v1alpha.ListItem\"a\n\x13\x44\x65leteFolderRequest\x12J\n\x06\x66older\x18\x01 \x01(\x0b\x32:.nvidia.omniverse.storage.filefolder.v1alpha.FolderAddress\"\x16\n\x14\x44\x65leteFolderResponse\"a\n\x13\x43reateFolderRequest\x12J\n\x06\x66older\x18\x01 \x01(\x0b\x32:.nvidia.omniverse.storage.filefolder.v1alpha.FolderAddress\"\x16\n\x14\x43reateFolderResponse\"\x8d\x01\n\x08ListItem\x12\x18\n\x10resource_address\x18\x01 \x01(\t\x12U\n\rresource_info\x18\x02 \x01(\x0b\x32\x39.nvidia.omniverse.storage.fileobject.v1alpha.ResourceInfoH\x00\x88\x01\x01\x42\x10\n\x0e_resource_info\"b\n\x14GetFolderModeRequest\x12J\n\x06\x66older\x18\x01 \x01(\x0b\x32:.nvidia.omniverse.storage.filefolder.v1alpha.FolderAddress\"e\n\x15GetFolderModeResponse\x12L\n\x0b\x66older_mode\x18\x01 \x01(\x0e\x32\x37.nvidia.omniverse.storage.filefolder.v1alpha.FolderMode\"\x1c\n\rFolderAddress\x12\x0b\n\x03uri\x18\x01 \x01(\t*s\n\nFolderMode\x12\x1b\n\x17\x46OLDER_MODE_UNSPECIFIED\x10\x00\x12\x16\n\x12\x46OLDER_MODE_NATIVE\x10\x01\x12\x18\n\x14\x46OLDER_MODE_NO_EMPTY\x10\x02\x12\x16\n\x12\x46OLDER_MODE_HYBRID\x10\x03\x32\xe3\x05\n\x11\x46ileFolderService\x12\x93\x01\n\x0c\x43reateFolder\x12@.nvidia.omniverse.storage.filefolder.v1alpha.CreateFolderRequest\x1a\x41.nvidia.omniverse.storage.filefolder.v1alpha.CreateFolderResponse\x12\x96\x01\n\rGetFolderMode\x12\x41.nvidia.omniverse.storage.filefolder.v1alpha.GetFolderModeRequest\x1a\x42.nvidia.omniverse.storage.filefolder.v1alpha.GetFolderModeResponse\x12}\n\x04List\x12\x38.nvidia.omniverse.storage.filefolder.v1alpha.ListRequest\x1a\x39.nvidia.omniverse.storage.filefolder.v1alpha.ListResponse0\x01\x12\x89\x01\n\x08ListStat\x12<.nvidia.omniverse.storage.filefolder.v1alpha.ListStatRequest\x1a=.nvidia.omniverse.storage.filefolder.v1alpha.ListStatResponse0\x01\x12\x93\x01\n\x0c\x44\x65leteFolder\x12@.nvidia.omniverse.storage.filefolder.v1alpha.DeleteFolderRequest\x1a\x41.nvidia.omniverse.storage.filefolder.v1alpha.DeleteFolderResponseB\x8b\x01\n/com.nvidia.omniverse.storage.filefolder.v1alphaB\x16\x46ilefolderServiceProtoP\x01Z>pb.api.nvidia.com/omniverse/storage/filefolder/v1alpha;storageb\x06proto3')
|
| 29 |
+
|
| 30 |
+
_globals = globals()
|
| 31 |
+
_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
|
| 32 |
+
_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'nvidia.omniverse.storage.filefolder.v1alpha.filefolder_service_pb2', _globals)
|
| 33 |
+
if not _descriptor._USE_C_DESCRIPTORS:
|
| 34 |
+
_globals['DESCRIPTOR']._loaded_options = None
|
| 35 |
+
_globals['DESCRIPTOR']._serialized_options = b'\n/com.nvidia.omniverse.storage.filefolder.v1alphaB\026FilefolderServiceProtoP\001Z>pb.api.nvidia.com/omniverse/storage/filefolder/v1alpha;storage'
|
| 36 |
+
_globals['_FOLDERMODE']._serialized_start=1308
|
| 37 |
+
_globals['_FOLDERMODE']._serialized_end=1423
|
| 38 |
+
_globals['_LISTREQUEST']._serialized_start=179
|
| 39 |
+
_globals['_LISTREQUEST']._serialized_end=268
|
| 40 |
+
_globals['_LISTRESPONSE']._serialized_start=271
|
| 41 |
+
_globals['_LISTRESPONSE']._serialized_end=406
|
| 42 |
+
_globals['_LISTSTATREQUEST']._serialized_start=408
|
| 43 |
+
_globals['_LISTSTATREQUEST']._serialized_end=501
|
| 44 |
+
_globals['_LISTSTATRESPONSE']._serialized_start=504
|
| 45 |
+
_globals['_LISTSTATRESPONSE']._serialized_end=683
|
| 46 |
+
_globals['_DELETEFOLDERREQUEST']._serialized_start=685
|
| 47 |
+
_globals['_DELETEFOLDERREQUEST']._serialized_end=782
|
| 48 |
+
_globals['_DELETEFOLDERRESPONSE']._serialized_start=784
|
| 49 |
+
_globals['_DELETEFOLDERRESPONSE']._serialized_end=806
|
| 50 |
+
_globals['_CREATEFOLDERREQUEST']._serialized_start=808
|
| 51 |
+
_globals['_CREATEFOLDERREQUEST']._serialized_end=905
|
| 52 |
+
_globals['_CREATEFOLDERRESPONSE']._serialized_start=907
|
| 53 |
+
_globals['_CREATEFOLDERRESPONSE']._serialized_end=929
|
| 54 |
+
_globals['_LISTITEM']._serialized_start=932
|
| 55 |
+
_globals['_LISTITEM']._serialized_end=1073
|
| 56 |
+
_globals['_GETFOLDERMODEREQUEST']._serialized_start=1075
|
| 57 |
+
_globals['_GETFOLDERMODEREQUEST']._serialized_end=1173
|
| 58 |
+
_globals['_GETFOLDERMODERESPONSE']._serialized_start=1175
|
| 59 |
+
_globals['_GETFOLDERMODERESPONSE']._serialized_end=1276
|
| 60 |
+
_globals['_FOLDERADDRESS']._serialized_start=1278
|
| 61 |
+
_globals['_FOLDERADDRESS']._serialized_end=1306
|
| 62 |
+
_globals['_FILEFOLDERSERVICE']._serialized_start=1426
|
| 63 |
+
_globals['_FILEFOLDERSERVICE']._serialized_end=2165
|
| 64 |
+
# @@protoc_insertion_point(module_scope)
|
docker/hf-space/hf-storage-api/generated/nvidia/omniverse/storage/filefolder/v1alpha/filefolder_service_pb2.pyi
ADDED
|
@@ -0,0 +1,94 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
from nvidia.omniverse.storage.fileobject.v1alpha import fileobject_pb2 as _fileobject_pb2
|
| 2 |
+
from google.protobuf.internal import containers as _containers
|
| 3 |
+
from google.protobuf.internal import enum_type_wrapper as _enum_type_wrapper
|
| 4 |
+
from google.protobuf import descriptor as _descriptor
|
| 5 |
+
from google.protobuf import message as _message
|
| 6 |
+
from collections.abc import Iterable as _Iterable, Mapping as _Mapping
|
| 7 |
+
from typing import ClassVar as _ClassVar, Optional as _Optional, Union as _Union
|
| 8 |
+
|
| 9 |
+
DESCRIPTOR: _descriptor.FileDescriptor
|
| 10 |
+
|
| 11 |
+
class FolderMode(int, metaclass=_enum_type_wrapper.EnumTypeWrapper):
|
| 12 |
+
__slots__ = ()
|
| 13 |
+
FOLDER_MODE_UNSPECIFIED: _ClassVar[FolderMode]
|
| 14 |
+
FOLDER_MODE_NATIVE: _ClassVar[FolderMode]
|
| 15 |
+
FOLDER_MODE_NO_EMPTY: _ClassVar[FolderMode]
|
| 16 |
+
FOLDER_MODE_HYBRID: _ClassVar[FolderMode]
|
| 17 |
+
FOLDER_MODE_UNSPECIFIED: FolderMode
|
| 18 |
+
FOLDER_MODE_NATIVE: FolderMode
|
| 19 |
+
FOLDER_MODE_NO_EMPTY: FolderMode
|
| 20 |
+
FOLDER_MODE_HYBRID: FolderMode
|
| 21 |
+
|
| 22 |
+
class ListRequest(_message.Message):
|
| 23 |
+
__slots__ = ("folder",)
|
| 24 |
+
FOLDER_FIELD_NUMBER: _ClassVar[int]
|
| 25 |
+
folder: FolderAddress
|
| 26 |
+
def __init__(self, folder: _Optional[_Union[FolderAddress, _Mapping]] = ...) -> None: ...
|
| 27 |
+
|
| 28 |
+
class ListResponse(_message.Message):
|
| 29 |
+
__slots__ = ("subfolder_addresses", "sub_resource_addresses")
|
| 30 |
+
SUBFOLDER_ADDRESSES_FIELD_NUMBER: _ClassVar[int]
|
| 31 |
+
SUB_RESOURCE_ADDRESSES_FIELD_NUMBER: _ClassVar[int]
|
| 32 |
+
subfolder_addresses: _containers.RepeatedCompositeFieldContainer[FolderAddress]
|
| 33 |
+
sub_resource_addresses: _containers.RepeatedScalarFieldContainer[str]
|
| 34 |
+
def __init__(self, subfolder_addresses: _Optional[_Iterable[_Union[FolderAddress, _Mapping]]] = ..., sub_resource_addresses: _Optional[_Iterable[str]] = ...) -> None: ...
|
| 35 |
+
|
| 36 |
+
class ListStatRequest(_message.Message):
|
| 37 |
+
__slots__ = ("folder",)
|
| 38 |
+
FOLDER_FIELD_NUMBER: _ClassVar[int]
|
| 39 |
+
folder: FolderAddress
|
| 40 |
+
def __init__(self, folder: _Optional[_Union[FolderAddress, _Mapping]] = ...) -> None: ...
|
| 41 |
+
|
| 42 |
+
class ListStatResponse(_message.Message):
|
| 43 |
+
__slots__ = ("subfolder_addresses", "entries")
|
| 44 |
+
SUBFOLDER_ADDRESSES_FIELD_NUMBER: _ClassVar[int]
|
| 45 |
+
ENTRIES_FIELD_NUMBER: _ClassVar[int]
|
| 46 |
+
subfolder_addresses: _containers.RepeatedCompositeFieldContainer[FolderAddress]
|
| 47 |
+
entries: _containers.RepeatedCompositeFieldContainer[ListItem]
|
| 48 |
+
def __init__(self, subfolder_addresses: _Optional[_Iterable[_Union[FolderAddress, _Mapping]]] = ..., entries: _Optional[_Iterable[_Union[ListItem, _Mapping]]] = ...) -> None: ...
|
| 49 |
+
|
| 50 |
+
class DeleteFolderRequest(_message.Message):
|
| 51 |
+
__slots__ = ("folder",)
|
| 52 |
+
FOLDER_FIELD_NUMBER: _ClassVar[int]
|
| 53 |
+
folder: FolderAddress
|
| 54 |
+
def __init__(self, folder: _Optional[_Union[FolderAddress, _Mapping]] = ...) -> None: ...
|
| 55 |
+
|
| 56 |
+
class DeleteFolderResponse(_message.Message):
|
| 57 |
+
__slots__ = ()
|
| 58 |
+
def __init__(self) -> None: ...
|
| 59 |
+
|
| 60 |
+
class CreateFolderRequest(_message.Message):
|
| 61 |
+
__slots__ = ("folder",)
|
| 62 |
+
FOLDER_FIELD_NUMBER: _ClassVar[int]
|
| 63 |
+
folder: FolderAddress
|
| 64 |
+
def __init__(self, folder: _Optional[_Union[FolderAddress, _Mapping]] = ...) -> None: ...
|
| 65 |
+
|
| 66 |
+
class CreateFolderResponse(_message.Message):
|
| 67 |
+
__slots__ = ()
|
| 68 |
+
def __init__(self) -> None: ...
|
| 69 |
+
|
| 70 |
+
class ListItem(_message.Message):
|
| 71 |
+
__slots__ = ("resource_address", "resource_info")
|
| 72 |
+
RESOURCE_ADDRESS_FIELD_NUMBER: _ClassVar[int]
|
| 73 |
+
RESOURCE_INFO_FIELD_NUMBER: _ClassVar[int]
|
| 74 |
+
resource_address: str
|
| 75 |
+
resource_info: _fileobject_pb2.ResourceInfo
|
| 76 |
+
def __init__(self, resource_address: _Optional[str] = ..., resource_info: _Optional[_Union[_fileobject_pb2.ResourceInfo, _Mapping]] = ...) -> None: ...
|
| 77 |
+
|
| 78 |
+
class GetFolderModeRequest(_message.Message):
|
| 79 |
+
__slots__ = ("folder",)
|
| 80 |
+
FOLDER_FIELD_NUMBER: _ClassVar[int]
|
| 81 |
+
folder: FolderAddress
|
| 82 |
+
def __init__(self, folder: _Optional[_Union[FolderAddress, _Mapping]] = ...) -> None: ...
|
| 83 |
+
|
| 84 |
+
class GetFolderModeResponse(_message.Message):
|
| 85 |
+
__slots__ = ("folder_mode",)
|
| 86 |
+
FOLDER_MODE_FIELD_NUMBER: _ClassVar[int]
|
| 87 |
+
folder_mode: FolderMode
|
| 88 |
+
def __init__(self, folder_mode: _Optional[_Union[FolderMode, str]] = ...) -> None: ...
|
| 89 |
+
|
| 90 |
+
class FolderAddress(_message.Message):
|
| 91 |
+
__slots__ = ("uri",)
|
| 92 |
+
URI_FIELD_NUMBER: _ClassVar[int]
|
| 93 |
+
uri: str
|
| 94 |
+
def __init__(self, uri: _Optional[str] = ...) -> None: ...
|
docker/hf-space/hf-storage-api/generated/nvidia/omniverse/storage/filefolder/v1alpha/filefolder_service_pb2_grpc.py
ADDED
|
@@ -0,0 +1,269 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
|
| 2 |
+
"""Client and server classes corresponding to protobuf-defined services."""
|
| 3 |
+
import grpc
|
| 4 |
+
import warnings
|
| 5 |
+
|
| 6 |
+
from nvidia.omniverse.storage.filefolder.v1alpha import filefolder_service_pb2 as nvidia_dot_omniverse_dot_storage_dot_filefolder_dot_v1alpha_dot_filefolder__service__pb2
|
| 7 |
+
|
| 8 |
+
GRPC_GENERATED_VERSION = '1.80.0'
|
| 9 |
+
GRPC_VERSION = grpc.__version__
|
| 10 |
+
_version_not_supported = False
|
| 11 |
+
|
| 12 |
+
try:
|
| 13 |
+
from grpc._utilities import first_version_is_lower
|
| 14 |
+
_version_not_supported = first_version_is_lower(GRPC_VERSION, GRPC_GENERATED_VERSION)
|
| 15 |
+
except ImportError:
|
| 16 |
+
_version_not_supported = True
|
| 17 |
+
|
| 18 |
+
if _version_not_supported:
|
| 19 |
+
raise RuntimeError(
|
| 20 |
+
f'The grpc package installed is at version {GRPC_VERSION},'
|
| 21 |
+
+ ' but the generated code in nvidia/omniverse/storage/filefolder/v1alpha/filefolder_service_pb2_grpc.py depends on'
|
| 22 |
+
+ f' grpcio>={GRPC_GENERATED_VERSION}.'
|
| 23 |
+
+ f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}'
|
| 24 |
+
+ f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.'
|
| 25 |
+
)
|
| 26 |
+
|
| 27 |
+
|
| 28 |
+
class FileFolderServiceStub(object):
|
| 29 |
+
"""Missing associated documentation comment in .proto file."""
|
| 30 |
+
|
| 31 |
+
def __init__(self, channel):
|
| 32 |
+
"""Constructor.
|
| 33 |
+
|
| 34 |
+
Args:
|
| 35 |
+
channel: A grpc.Channel.
|
| 36 |
+
"""
|
| 37 |
+
self.CreateFolder = channel.unary_unary(
|
| 38 |
+
'/nvidia.omniverse.storage.filefolder.v1alpha.FileFolderService/CreateFolder',
|
| 39 |
+
request_serializer=nvidia_dot_omniverse_dot_storage_dot_filefolder_dot_v1alpha_dot_filefolder__service__pb2.CreateFolderRequest.SerializeToString,
|
| 40 |
+
response_deserializer=nvidia_dot_omniverse_dot_storage_dot_filefolder_dot_v1alpha_dot_filefolder__service__pb2.CreateFolderResponse.FromString,
|
| 41 |
+
_registered_method=True)
|
| 42 |
+
self.GetFolderMode = channel.unary_unary(
|
| 43 |
+
'/nvidia.omniverse.storage.filefolder.v1alpha.FileFolderService/GetFolderMode',
|
| 44 |
+
request_serializer=nvidia_dot_omniverse_dot_storage_dot_filefolder_dot_v1alpha_dot_filefolder__service__pb2.GetFolderModeRequest.SerializeToString,
|
| 45 |
+
response_deserializer=nvidia_dot_omniverse_dot_storage_dot_filefolder_dot_v1alpha_dot_filefolder__service__pb2.GetFolderModeResponse.FromString,
|
| 46 |
+
_registered_method=True)
|
| 47 |
+
self.List = channel.unary_stream(
|
| 48 |
+
'/nvidia.omniverse.storage.filefolder.v1alpha.FileFolderService/List',
|
| 49 |
+
request_serializer=nvidia_dot_omniverse_dot_storage_dot_filefolder_dot_v1alpha_dot_filefolder__service__pb2.ListRequest.SerializeToString,
|
| 50 |
+
response_deserializer=nvidia_dot_omniverse_dot_storage_dot_filefolder_dot_v1alpha_dot_filefolder__service__pb2.ListResponse.FromString,
|
| 51 |
+
_registered_method=True)
|
| 52 |
+
self.ListStat = channel.unary_stream(
|
| 53 |
+
'/nvidia.omniverse.storage.filefolder.v1alpha.FileFolderService/ListStat',
|
| 54 |
+
request_serializer=nvidia_dot_omniverse_dot_storage_dot_filefolder_dot_v1alpha_dot_filefolder__service__pb2.ListStatRequest.SerializeToString,
|
| 55 |
+
response_deserializer=nvidia_dot_omniverse_dot_storage_dot_filefolder_dot_v1alpha_dot_filefolder__service__pb2.ListStatResponse.FromString,
|
| 56 |
+
_registered_method=True)
|
| 57 |
+
self.DeleteFolder = channel.unary_unary(
|
| 58 |
+
'/nvidia.omniverse.storage.filefolder.v1alpha.FileFolderService/DeleteFolder',
|
| 59 |
+
request_serializer=nvidia_dot_omniverse_dot_storage_dot_filefolder_dot_v1alpha_dot_filefolder__service__pb2.DeleteFolderRequest.SerializeToString,
|
| 60 |
+
response_deserializer=nvidia_dot_omniverse_dot_storage_dot_filefolder_dot_v1alpha_dot_filefolder__service__pb2.DeleteFolderResponse.FromString,
|
| 61 |
+
_registered_method=True)
|
| 62 |
+
|
| 63 |
+
|
| 64 |
+
class FileFolderServiceServicer(object):
|
| 65 |
+
"""Missing associated documentation comment in .proto file."""
|
| 66 |
+
|
| 67 |
+
def CreateFolder(self, request, context):
|
| 68 |
+
"""Missing associated documentation comment in .proto file."""
|
| 69 |
+
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
| 70 |
+
context.set_details('Method not implemented!')
|
| 71 |
+
raise NotImplementedError('Method not implemented!')
|
| 72 |
+
|
| 73 |
+
def GetFolderMode(self, request, context):
|
| 74 |
+
"""Missing associated documentation comment in .proto file."""
|
| 75 |
+
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
| 76 |
+
context.set_details('Method not implemented!')
|
| 77 |
+
raise NotImplementedError('Method not implemented!')
|
| 78 |
+
|
| 79 |
+
def List(self, request, context):
|
| 80 |
+
"""Missing associated documentation comment in .proto file."""
|
| 81 |
+
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
| 82 |
+
context.set_details('Method not implemented!')
|
| 83 |
+
raise NotImplementedError('Method not implemented!')
|
| 84 |
+
|
| 85 |
+
def ListStat(self, request, context):
|
| 86 |
+
"""Missing associated documentation comment in .proto file."""
|
| 87 |
+
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
| 88 |
+
context.set_details('Method not implemented!')
|
| 89 |
+
raise NotImplementedError('Method not implemented!')
|
| 90 |
+
|
| 91 |
+
def DeleteFolder(self, request, context):
|
| 92 |
+
"""Missing associated documentation comment in .proto file."""
|
| 93 |
+
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
| 94 |
+
context.set_details('Method not implemented!')
|
| 95 |
+
raise NotImplementedError('Method not implemented!')
|
| 96 |
+
|
| 97 |
+
|
| 98 |
+
def add_FileFolderServiceServicer_to_server(servicer, server):
|
| 99 |
+
rpc_method_handlers = {
|
| 100 |
+
'CreateFolder': grpc.unary_unary_rpc_method_handler(
|
| 101 |
+
servicer.CreateFolder,
|
| 102 |
+
request_deserializer=nvidia_dot_omniverse_dot_storage_dot_filefolder_dot_v1alpha_dot_filefolder__service__pb2.CreateFolderRequest.FromString,
|
| 103 |
+
response_serializer=nvidia_dot_omniverse_dot_storage_dot_filefolder_dot_v1alpha_dot_filefolder__service__pb2.CreateFolderResponse.SerializeToString,
|
| 104 |
+
),
|
| 105 |
+
'GetFolderMode': grpc.unary_unary_rpc_method_handler(
|
| 106 |
+
servicer.GetFolderMode,
|
| 107 |
+
request_deserializer=nvidia_dot_omniverse_dot_storage_dot_filefolder_dot_v1alpha_dot_filefolder__service__pb2.GetFolderModeRequest.FromString,
|
| 108 |
+
response_serializer=nvidia_dot_omniverse_dot_storage_dot_filefolder_dot_v1alpha_dot_filefolder__service__pb2.GetFolderModeResponse.SerializeToString,
|
| 109 |
+
),
|
| 110 |
+
'List': grpc.unary_stream_rpc_method_handler(
|
| 111 |
+
servicer.List,
|
| 112 |
+
request_deserializer=nvidia_dot_omniverse_dot_storage_dot_filefolder_dot_v1alpha_dot_filefolder__service__pb2.ListRequest.FromString,
|
| 113 |
+
response_serializer=nvidia_dot_omniverse_dot_storage_dot_filefolder_dot_v1alpha_dot_filefolder__service__pb2.ListResponse.SerializeToString,
|
| 114 |
+
),
|
| 115 |
+
'ListStat': grpc.unary_stream_rpc_method_handler(
|
| 116 |
+
servicer.ListStat,
|
| 117 |
+
request_deserializer=nvidia_dot_omniverse_dot_storage_dot_filefolder_dot_v1alpha_dot_filefolder__service__pb2.ListStatRequest.FromString,
|
| 118 |
+
response_serializer=nvidia_dot_omniverse_dot_storage_dot_filefolder_dot_v1alpha_dot_filefolder__service__pb2.ListStatResponse.SerializeToString,
|
| 119 |
+
),
|
| 120 |
+
'DeleteFolder': grpc.unary_unary_rpc_method_handler(
|
| 121 |
+
servicer.DeleteFolder,
|
| 122 |
+
request_deserializer=nvidia_dot_omniverse_dot_storage_dot_filefolder_dot_v1alpha_dot_filefolder__service__pb2.DeleteFolderRequest.FromString,
|
| 123 |
+
response_serializer=nvidia_dot_omniverse_dot_storage_dot_filefolder_dot_v1alpha_dot_filefolder__service__pb2.DeleteFolderResponse.SerializeToString,
|
| 124 |
+
),
|
| 125 |
+
}
|
| 126 |
+
generic_handler = grpc.method_handlers_generic_handler(
|
| 127 |
+
'nvidia.omniverse.storage.filefolder.v1alpha.FileFolderService', rpc_method_handlers)
|
| 128 |
+
server.add_generic_rpc_handlers((generic_handler,))
|
| 129 |
+
server.add_registered_method_handlers('nvidia.omniverse.storage.filefolder.v1alpha.FileFolderService', rpc_method_handlers)
|
| 130 |
+
|
| 131 |
+
|
| 132 |
+
# This class is part of an EXPERIMENTAL API.
|
| 133 |
+
class FileFolderService(object):
|
| 134 |
+
"""Missing associated documentation comment in .proto file."""
|
| 135 |
+
|
| 136 |
+
@staticmethod
|
| 137 |
+
def CreateFolder(request,
|
| 138 |
+
target,
|
| 139 |
+
options=(),
|
| 140 |
+
channel_credentials=None,
|
| 141 |
+
call_credentials=None,
|
| 142 |
+
insecure=False,
|
| 143 |
+
compression=None,
|
| 144 |
+
wait_for_ready=None,
|
| 145 |
+
timeout=None,
|
| 146 |
+
metadata=None):
|
| 147 |
+
return grpc.experimental.unary_unary(
|
| 148 |
+
request,
|
| 149 |
+
target,
|
| 150 |
+
'/nvidia.omniverse.storage.filefolder.v1alpha.FileFolderService/CreateFolder',
|
| 151 |
+
nvidia_dot_omniverse_dot_storage_dot_filefolder_dot_v1alpha_dot_filefolder__service__pb2.CreateFolderRequest.SerializeToString,
|
| 152 |
+
nvidia_dot_omniverse_dot_storage_dot_filefolder_dot_v1alpha_dot_filefolder__service__pb2.CreateFolderResponse.FromString,
|
| 153 |
+
options,
|
| 154 |
+
channel_credentials,
|
| 155 |
+
insecure,
|
| 156 |
+
call_credentials,
|
| 157 |
+
compression,
|
| 158 |
+
wait_for_ready,
|
| 159 |
+
timeout,
|
| 160 |
+
metadata,
|
| 161 |
+
_registered_method=True)
|
| 162 |
+
|
| 163 |
+
@staticmethod
|
| 164 |
+
def GetFolderMode(request,
|
| 165 |
+
target,
|
| 166 |
+
options=(),
|
| 167 |
+
channel_credentials=None,
|
| 168 |
+
call_credentials=None,
|
| 169 |
+
insecure=False,
|
| 170 |
+
compression=None,
|
| 171 |
+
wait_for_ready=None,
|
| 172 |
+
timeout=None,
|
| 173 |
+
metadata=None):
|
| 174 |
+
return grpc.experimental.unary_unary(
|
| 175 |
+
request,
|
| 176 |
+
target,
|
| 177 |
+
'/nvidia.omniverse.storage.filefolder.v1alpha.FileFolderService/GetFolderMode',
|
| 178 |
+
nvidia_dot_omniverse_dot_storage_dot_filefolder_dot_v1alpha_dot_filefolder__service__pb2.GetFolderModeRequest.SerializeToString,
|
| 179 |
+
nvidia_dot_omniverse_dot_storage_dot_filefolder_dot_v1alpha_dot_filefolder__service__pb2.GetFolderModeResponse.FromString,
|
| 180 |
+
options,
|
| 181 |
+
channel_credentials,
|
| 182 |
+
insecure,
|
| 183 |
+
call_credentials,
|
| 184 |
+
compression,
|
| 185 |
+
wait_for_ready,
|
| 186 |
+
timeout,
|
| 187 |
+
metadata,
|
| 188 |
+
_registered_method=True)
|
| 189 |
+
|
| 190 |
+
@staticmethod
|
| 191 |
+
def List(request,
|
| 192 |
+
target,
|
| 193 |
+
options=(),
|
| 194 |
+
channel_credentials=None,
|
| 195 |
+
call_credentials=None,
|
| 196 |
+
insecure=False,
|
| 197 |
+
compression=None,
|
| 198 |
+
wait_for_ready=None,
|
| 199 |
+
timeout=None,
|
| 200 |
+
metadata=None):
|
| 201 |
+
return grpc.experimental.unary_stream(
|
| 202 |
+
request,
|
| 203 |
+
target,
|
| 204 |
+
'/nvidia.omniverse.storage.filefolder.v1alpha.FileFolderService/List',
|
| 205 |
+
nvidia_dot_omniverse_dot_storage_dot_filefolder_dot_v1alpha_dot_filefolder__service__pb2.ListRequest.SerializeToString,
|
| 206 |
+
nvidia_dot_omniverse_dot_storage_dot_filefolder_dot_v1alpha_dot_filefolder__service__pb2.ListResponse.FromString,
|
| 207 |
+
options,
|
| 208 |
+
channel_credentials,
|
| 209 |
+
insecure,
|
| 210 |
+
call_credentials,
|
| 211 |
+
compression,
|
| 212 |
+
wait_for_ready,
|
| 213 |
+
timeout,
|
| 214 |
+
metadata,
|
| 215 |
+
_registered_method=True)
|
| 216 |
+
|
| 217 |
+
@staticmethod
|
| 218 |
+
def ListStat(request,
|
| 219 |
+
target,
|
| 220 |
+
options=(),
|
| 221 |
+
channel_credentials=None,
|
| 222 |
+
call_credentials=None,
|
| 223 |
+
insecure=False,
|
| 224 |
+
compression=None,
|
| 225 |
+
wait_for_ready=None,
|
| 226 |
+
timeout=None,
|
| 227 |
+
metadata=None):
|
| 228 |
+
return grpc.experimental.unary_stream(
|
| 229 |
+
request,
|
| 230 |
+
target,
|
| 231 |
+
'/nvidia.omniverse.storage.filefolder.v1alpha.FileFolderService/ListStat',
|
| 232 |
+
nvidia_dot_omniverse_dot_storage_dot_filefolder_dot_v1alpha_dot_filefolder__service__pb2.ListStatRequest.SerializeToString,
|
| 233 |
+
nvidia_dot_omniverse_dot_storage_dot_filefolder_dot_v1alpha_dot_filefolder__service__pb2.ListStatResponse.FromString,
|
| 234 |
+
options,
|
| 235 |
+
channel_credentials,
|
| 236 |
+
insecure,
|
| 237 |
+
call_credentials,
|
| 238 |
+
compression,
|
| 239 |
+
wait_for_ready,
|
| 240 |
+
timeout,
|
| 241 |
+
metadata,
|
| 242 |
+
_registered_method=True)
|
| 243 |
+
|
| 244 |
+
@staticmethod
|
| 245 |
+
def DeleteFolder(request,
|
| 246 |
+
target,
|
| 247 |
+
options=(),
|
| 248 |
+
channel_credentials=None,
|
| 249 |
+
call_credentials=None,
|
| 250 |
+
insecure=False,
|
| 251 |
+
compression=None,
|
| 252 |
+
wait_for_ready=None,
|
| 253 |
+
timeout=None,
|
| 254 |
+
metadata=None):
|
| 255 |
+
return grpc.experimental.unary_unary(
|
| 256 |
+
request,
|
| 257 |
+
target,
|
| 258 |
+
'/nvidia.omniverse.storage.filefolder.v1alpha.FileFolderService/DeleteFolder',
|
| 259 |
+
nvidia_dot_omniverse_dot_storage_dot_filefolder_dot_v1alpha_dot_filefolder__service__pb2.DeleteFolderRequest.SerializeToString,
|
| 260 |
+
nvidia_dot_omniverse_dot_storage_dot_filefolder_dot_v1alpha_dot_filefolder__service__pb2.DeleteFolderResponse.FromString,
|
| 261 |
+
options,
|
| 262 |
+
channel_credentials,
|
| 263 |
+
insecure,
|
| 264 |
+
call_credentials,
|
| 265 |
+
compression,
|
| 266 |
+
wait_for_ready,
|
| 267 |
+
timeout,
|
| 268 |
+
metadata,
|
| 269 |
+
_registered_method=True)
|
docker/hf-space/hf-storage-api/generated/nvidia/omniverse/storage/filefolder/v1beta/filefolder_service_pb2.py
ADDED
|
@@ -0,0 +1,54 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# -*- coding: utf-8 -*-
|
| 2 |
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
| 3 |
+
# NO CHECKED-IN PROTOBUF GENCODE
|
| 4 |
+
# source: nvidia/omniverse/storage/filefolder/v1beta/filefolder_service.proto
|
| 5 |
+
# Protobuf Python Version: 6.31.1
|
| 6 |
+
"""Generated protocol buffer code."""
|
| 7 |
+
from google.protobuf import descriptor as _descriptor
|
| 8 |
+
from google.protobuf import descriptor_pool as _descriptor_pool
|
| 9 |
+
from google.protobuf import runtime_version as _runtime_version
|
| 10 |
+
from google.protobuf import symbol_database as _symbol_database
|
| 11 |
+
from google.protobuf.internal import builder as _builder
|
| 12 |
+
_runtime_version.ValidateProtobufRuntimeVersion(
|
| 13 |
+
_runtime_version.Domain.PUBLIC,
|
| 14 |
+
6,
|
| 15 |
+
31,
|
| 16 |
+
1,
|
| 17 |
+
'',
|
| 18 |
+
'nvidia/omniverse/storage/filefolder/v1beta/filefolder_service.proto'
|
| 19 |
+
)
|
| 20 |
+
# @@protoc_insertion_point(imports)
|
| 21 |
+
|
| 22 |
+
_sym_db = _symbol_database.Default()
|
| 23 |
+
|
| 24 |
+
|
| 25 |
+
from nvidia.omniverse.storage.fileobject.v1beta import fileobject_pb2 as nvidia_dot_omniverse_dot_storage_dot_fileobject_dot_v1beta_dot_fileobject__pb2
|
| 26 |
+
|
| 27 |
+
|
| 28 |
+
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\nCnvidia/omniverse/storage/filefolder/v1beta/filefolder_service.proto\x12*nvidia.omniverse.storage.filefolder.v1beta\x1a;nvidia/omniverse/storage/fileobject/v1beta/fileobject.proto\"X\n\x0bListRequest\x12I\n\x06\x66older\x18\x01 \x01(\x0b\x32\x39.nvidia.omniverse.storage.filefolder.v1beta.FolderAddress\"\x86\x01\n\x0cListResponse\x12V\n\x13subfolder_addresses\x18\x01 \x03(\x0b\x32\x39.nvidia.omniverse.storage.filefolder.v1beta.FolderAddress\x12\x1e\n\x16sub_resource_addresses\x18\x02 \x03(\t\"\\\n\x0fListStatRequest\x12I\n\x06\x66older\x18\x01 \x01(\x0b\x32\x39.nvidia.omniverse.storage.filefolder.v1beta.FolderAddress\"\xb1\x01\n\x10ListStatResponse\x12V\n\x13subfolder_addresses\x18\x01 \x03(\x0b\x32\x39.nvidia.omniverse.storage.filefolder.v1beta.FolderAddress\x12\x45\n\x07\x65ntries\x18\x02 \x03(\x0b\x32\x34.nvidia.omniverse.storage.filefolder.v1beta.ListItem\"`\n\x13\x44\x65leteFolderRequest\x12I\n\x06\x66older\x18\x01 \x01(\x0b\x32\x39.nvidia.omniverse.storage.filefolder.v1beta.FolderAddress\"\x16\n\x14\x44\x65leteFolderResponse\"\x8c\x01\n\x08ListItem\x12\x18\n\x10resource_address\x18\x01 \x01(\t\x12T\n\rresource_info\x18\x02 \x01(\x0b\x32\x38.nvidia.omniverse.storage.fileobject.v1beta.ResourceInfoH\x00\x88\x01\x01\x42\x10\n\x0e_resource_info\"\x1c\n\rFolderAddress\x12\x0b\n\x03uri\x18\x01 \x01(\t2\xae\x03\n\x11\x46ileFolderService\x12{\n\x04List\x12\x37.nvidia.omniverse.storage.filefolder.v1beta.ListRequest\x1a\x38.nvidia.omniverse.storage.filefolder.v1beta.ListResponse0\x01\x12\x87\x01\n\x08ListStat\x12;.nvidia.omniverse.storage.filefolder.v1beta.ListStatRequest\x1a<.nvidia.omniverse.storage.filefolder.v1beta.ListStatResponse0\x01\x12\x91\x01\n\x0c\x44\x65leteFolder\x12?.nvidia.omniverse.storage.filefolder.v1beta.DeleteFolderRequest\x1a@.nvidia.omniverse.storage.filefolder.v1beta.DeleteFolderResponseB\x89\x01\n.com.nvidia.omniverse.storage.filefolder.v1betaB\x16\x46ilefolderServiceProtoP\x01Z=pb.api.nvidia.com/omniverse/storage/filefolder/v1beta;storageb\x06proto3')
|
| 29 |
+
|
| 30 |
+
_globals = globals()
|
| 31 |
+
_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
|
| 32 |
+
_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'nvidia.omniverse.storage.filefolder.v1beta.filefolder_service_pb2', _globals)
|
| 33 |
+
if not _descriptor._USE_C_DESCRIPTORS:
|
| 34 |
+
_globals['DESCRIPTOR']._loaded_options = None
|
| 35 |
+
_globals['DESCRIPTOR']._serialized_options = b'\n.com.nvidia.omniverse.storage.filefolder.v1betaB\026FilefolderServiceProtoP\001Z=pb.api.nvidia.com/omniverse/storage/filefolder/v1beta;storage'
|
| 36 |
+
_globals['_LISTREQUEST']._serialized_start=176
|
| 37 |
+
_globals['_LISTREQUEST']._serialized_end=264
|
| 38 |
+
_globals['_LISTRESPONSE']._serialized_start=267
|
| 39 |
+
_globals['_LISTRESPONSE']._serialized_end=401
|
| 40 |
+
_globals['_LISTSTATREQUEST']._serialized_start=403
|
| 41 |
+
_globals['_LISTSTATREQUEST']._serialized_end=495
|
| 42 |
+
_globals['_LISTSTATRESPONSE']._serialized_start=498
|
| 43 |
+
_globals['_LISTSTATRESPONSE']._serialized_end=675
|
| 44 |
+
_globals['_DELETEFOLDERREQUEST']._serialized_start=677
|
| 45 |
+
_globals['_DELETEFOLDERREQUEST']._serialized_end=773
|
| 46 |
+
_globals['_DELETEFOLDERRESPONSE']._serialized_start=775
|
| 47 |
+
_globals['_DELETEFOLDERRESPONSE']._serialized_end=797
|
| 48 |
+
_globals['_LISTITEM']._serialized_start=800
|
| 49 |
+
_globals['_LISTITEM']._serialized_end=940
|
| 50 |
+
_globals['_FOLDERADDRESS']._serialized_start=942
|
| 51 |
+
_globals['_FOLDERADDRESS']._serialized_end=970
|
| 52 |
+
_globals['_FILEFOLDERSERVICE']._serialized_start=973
|
| 53 |
+
_globals['_FILEFOLDERSERVICE']._serialized_end=1403
|
| 54 |
+
# @@protoc_insertion_point(module_scope)
|
docker/hf-space/hf-storage-api/generated/nvidia/omniverse/storage/filefolder/v1beta/filefolder_service_pb2.pyi
ADDED
|
@@ -0,0 +1,60 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
from nvidia.omniverse.storage.fileobject.v1beta import fileobject_pb2 as _fileobject_pb2
|
| 2 |
+
from google.protobuf.internal import containers as _containers
|
| 3 |
+
from google.protobuf import descriptor as _descriptor
|
| 4 |
+
from google.protobuf import message as _message
|
| 5 |
+
from collections.abc import Iterable as _Iterable, Mapping as _Mapping
|
| 6 |
+
from typing import ClassVar as _ClassVar, Optional as _Optional, Union as _Union
|
| 7 |
+
|
| 8 |
+
DESCRIPTOR: _descriptor.FileDescriptor
|
| 9 |
+
|
| 10 |
+
class ListRequest(_message.Message):
|
| 11 |
+
__slots__ = ("folder",)
|
| 12 |
+
FOLDER_FIELD_NUMBER: _ClassVar[int]
|
| 13 |
+
folder: FolderAddress
|
| 14 |
+
def __init__(self, folder: _Optional[_Union[FolderAddress, _Mapping]] = ...) -> None: ...
|
| 15 |
+
|
| 16 |
+
class ListResponse(_message.Message):
|
| 17 |
+
__slots__ = ("subfolder_addresses", "sub_resource_addresses")
|
| 18 |
+
SUBFOLDER_ADDRESSES_FIELD_NUMBER: _ClassVar[int]
|
| 19 |
+
SUB_RESOURCE_ADDRESSES_FIELD_NUMBER: _ClassVar[int]
|
| 20 |
+
subfolder_addresses: _containers.RepeatedCompositeFieldContainer[FolderAddress]
|
| 21 |
+
sub_resource_addresses: _containers.RepeatedScalarFieldContainer[str]
|
| 22 |
+
def __init__(self, subfolder_addresses: _Optional[_Iterable[_Union[FolderAddress, _Mapping]]] = ..., sub_resource_addresses: _Optional[_Iterable[str]] = ...) -> None: ...
|
| 23 |
+
|
| 24 |
+
class ListStatRequest(_message.Message):
|
| 25 |
+
__slots__ = ("folder",)
|
| 26 |
+
FOLDER_FIELD_NUMBER: _ClassVar[int]
|
| 27 |
+
folder: FolderAddress
|
| 28 |
+
def __init__(self, folder: _Optional[_Union[FolderAddress, _Mapping]] = ...) -> None: ...
|
| 29 |
+
|
| 30 |
+
class ListStatResponse(_message.Message):
|
| 31 |
+
__slots__ = ("subfolder_addresses", "entries")
|
| 32 |
+
SUBFOLDER_ADDRESSES_FIELD_NUMBER: _ClassVar[int]
|
| 33 |
+
ENTRIES_FIELD_NUMBER: _ClassVar[int]
|
| 34 |
+
subfolder_addresses: _containers.RepeatedCompositeFieldContainer[FolderAddress]
|
| 35 |
+
entries: _containers.RepeatedCompositeFieldContainer[ListItem]
|
| 36 |
+
def __init__(self, subfolder_addresses: _Optional[_Iterable[_Union[FolderAddress, _Mapping]]] = ..., entries: _Optional[_Iterable[_Union[ListItem, _Mapping]]] = ...) -> None: ...
|
| 37 |
+
|
| 38 |
+
class DeleteFolderRequest(_message.Message):
|
| 39 |
+
__slots__ = ("folder",)
|
| 40 |
+
FOLDER_FIELD_NUMBER: _ClassVar[int]
|
| 41 |
+
folder: FolderAddress
|
| 42 |
+
def __init__(self, folder: _Optional[_Union[FolderAddress, _Mapping]] = ...) -> None: ...
|
| 43 |
+
|
| 44 |
+
class DeleteFolderResponse(_message.Message):
|
| 45 |
+
__slots__ = ()
|
| 46 |
+
def __init__(self) -> None: ...
|
| 47 |
+
|
| 48 |
+
class ListItem(_message.Message):
|
| 49 |
+
__slots__ = ("resource_address", "resource_info")
|
| 50 |
+
RESOURCE_ADDRESS_FIELD_NUMBER: _ClassVar[int]
|
| 51 |
+
RESOURCE_INFO_FIELD_NUMBER: _ClassVar[int]
|
| 52 |
+
resource_address: str
|
| 53 |
+
resource_info: _fileobject_pb2.ResourceInfo
|
| 54 |
+
def __init__(self, resource_address: _Optional[str] = ..., resource_info: _Optional[_Union[_fileobject_pb2.ResourceInfo, _Mapping]] = ...) -> None: ...
|
| 55 |
+
|
| 56 |
+
class FolderAddress(_message.Message):
|
| 57 |
+
__slots__ = ("uri",)
|
| 58 |
+
URI_FIELD_NUMBER: _ClassVar[int]
|
| 59 |
+
uri: str
|
| 60 |
+
def __init__(self, uri: _Optional[str] = ...) -> None: ...
|
docker/hf-space/hf-storage-api/generated/nvidia/omniverse/storage/filefolder/v1beta/filefolder_service_pb2_grpc.py
ADDED
|
@@ -0,0 +1,183 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
|
| 2 |
+
"""Client and server classes corresponding to protobuf-defined services."""
|
| 3 |
+
import grpc
|
| 4 |
+
import warnings
|
| 5 |
+
|
| 6 |
+
from nvidia.omniverse.storage.filefolder.v1beta import filefolder_service_pb2 as nvidia_dot_omniverse_dot_storage_dot_filefolder_dot_v1beta_dot_filefolder__service__pb2
|
| 7 |
+
|
| 8 |
+
GRPC_GENERATED_VERSION = '1.80.0'
|
| 9 |
+
GRPC_VERSION = grpc.__version__
|
| 10 |
+
_version_not_supported = False
|
| 11 |
+
|
| 12 |
+
try:
|
| 13 |
+
from grpc._utilities import first_version_is_lower
|
| 14 |
+
_version_not_supported = first_version_is_lower(GRPC_VERSION, GRPC_GENERATED_VERSION)
|
| 15 |
+
except ImportError:
|
| 16 |
+
_version_not_supported = True
|
| 17 |
+
|
| 18 |
+
if _version_not_supported:
|
| 19 |
+
raise RuntimeError(
|
| 20 |
+
f'The grpc package installed is at version {GRPC_VERSION},'
|
| 21 |
+
+ ' but the generated code in nvidia/omniverse/storage/filefolder/v1beta/filefolder_service_pb2_grpc.py depends on'
|
| 22 |
+
+ f' grpcio>={GRPC_GENERATED_VERSION}.'
|
| 23 |
+
+ f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}'
|
| 24 |
+
+ f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.'
|
| 25 |
+
)
|
| 26 |
+
|
| 27 |
+
|
| 28 |
+
class FileFolderServiceStub(object):
|
| 29 |
+
"""Missing associated documentation comment in .proto file."""
|
| 30 |
+
|
| 31 |
+
def __init__(self, channel):
|
| 32 |
+
"""Constructor.
|
| 33 |
+
|
| 34 |
+
Args:
|
| 35 |
+
channel: A grpc.Channel.
|
| 36 |
+
"""
|
| 37 |
+
self.List = channel.unary_stream(
|
| 38 |
+
'/nvidia.omniverse.storage.filefolder.v1beta.FileFolderService/List',
|
| 39 |
+
request_serializer=nvidia_dot_omniverse_dot_storage_dot_filefolder_dot_v1beta_dot_filefolder__service__pb2.ListRequest.SerializeToString,
|
| 40 |
+
response_deserializer=nvidia_dot_omniverse_dot_storage_dot_filefolder_dot_v1beta_dot_filefolder__service__pb2.ListResponse.FromString,
|
| 41 |
+
_registered_method=True)
|
| 42 |
+
self.ListStat = channel.unary_stream(
|
| 43 |
+
'/nvidia.omniverse.storage.filefolder.v1beta.FileFolderService/ListStat',
|
| 44 |
+
request_serializer=nvidia_dot_omniverse_dot_storage_dot_filefolder_dot_v1beta_dot_filefolder__service__pb2.ListStatRequest.SerializeToString,
|
| 45 |
+
response_deserializer=nvidia_dot_omniverse_dot_storage_dot_filefolder_dot_v1beta_dot_filefolder__service__pb2.ListStatResponse.FromString,
|
| 46 |
+
_registered_method=True)
|
| 47 |
+
self.DeleteFolder = channel.unary_unary(
|
| 48 |
+
'/nvidia.omniverse.storage.filefolder.v1beta.FileFolderService/DeleteFolder',
|
| 49 |
+
request_serializer=nvidia_dot_omniverse_dot_storage_dot_filefolder_dot_v1beta_dot_filefolder__service__pb2.DeleteFolderRequest.SerializeToString,
|
| 50 |
+
response_deserializer=nvidia_dot_omniverse_dot_storage_dot_filefolder_dot_v1beta_dot_filefolder__service__pb2.DeleteFolderResponse.FromString,
|
| 51 |
+
_registered_method=True)
|
| 52 |
+
|
| 53 |
+
|
| 54 |
+
class FileFolderServiceServicer(object):
|
| 55 |
+
"""Missing associated documentation comment in .proto file."""
|
| 56 |
+
|
| 57 |
+
def List(self, request, context):
|
| 58 |
+
"""Missing associated documentation comment in .proto file."""
|
| 59 |
+
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
| 60 |
+
context.set_details('Method not implemented!')
|
| 61 |
+
raise NotImplementedError('Method not implemented!')
|
| 62 |
+
|
| 63 |
+
def ListStat(self, request, context):
|
| 64 |
+
"""Missing associated documentation comment in .proto file."""
|
| 65 |
+
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
| 66 |
+
context.set_details('Method not implemented!')
|
| 67 |
+
raise NotImplementedError('Method not implemented!')
|
| 68 |
+
|
| 69 |
+
def DeleteFolder(self, request, context):
|
| 70 |
+
"""Missing associated documentation comment in .proto file."""
|
| 71 |
+
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
| 72 |
+
context.set_details('Method not implemented!')
|
| 73 |
+
raise NotImplementedError('Method not implemented!')
|
| 74 |
+
|
| 75 |
+
|
| 76 |
+
def add_FileFolderServiceServicer_to_server(servicer, server):
|
| 77 |
+
rpc_method_handlers = {
|
| 78 |
+
'List': grpc.unary_stream_rpc_method_handler(
|
| 79 |
+
servicer.List,
|
| 80 |
+
request_deserializer=nvidia_dot_omniverse_dot_storage_dot_filefolder_dot_v1beta_dot_filefolder__service__pb2.ListRequest.FromString,
|
| 81 |
+
response_serializer=nvidia_dot_omniverse_dot_storage_dot_filefolder_dot_v1beta_dot_filefolder__service__pb2.ListResponse.SerializeToString,
|
| 82 |
+
),
|
| 83 |
+
'ListStat': grpc.unary_stream_rpc_method_handler(
|
| 84 |
+
servicer.ListStat,
|
| 85 |
+
request_deserializer=nvidia_dot_omniverse_dot_storage_dot_filefolder_dot_v1beta_dot_filefolder__service__pb2.ListStatRequest.FromString,
|
| 86 |
+
response_serializer=nvidia_dot_omniverse_dot_storage_dot_filefolder_dot_v1beta_dot_filefolder__service__pb2.ListStatResponse.SerializeToString,
|
| 87 |
+
),
|
| 88 |
+
'DeleteFolder': grpc.unary_unary_rpc_method_handler(
|
| 89 |
+
servicer.DeleteFolder,
|
| 90 |
+
request_deserializer=nvidia_dot_omniverse_dot_storage_dot_filefolder_dot_v1beta_dot_filefolder__service__pb2.DeleteFolderRequest.FromString,
|
| 91 |
+
response_serializer=nvidia_dot_omniverse_dot_storage_dot_filefolder_dot_v1beta_dot_filefolder__service__pb2.DeleteFolderResponse.SerializeToString,
|
| 92 |
+
),
|
| 93 |
+
}
|
| 94 |
+
generic_handler = grpc.method_handlers_generic_handler(
|
| 95 |
+
'nvidia.omniverse.storage.filefolder.v1beta.FileFolderService', rpc_method_handlers)
|
| 96 |
+
server.add_generic_rpc_handlers((generic_handler,))
|
| 97 |
+
server.add_registered_method_handlers('nvidia.omniverse.storage.filefolder.v1beta.FileFolderService', rpc_method_handlers)
|
| 98 |
+
|
| 99 |
+
|
| 100 |
+
# This class is part of an EXPERIMENTAL API.
|
| 101 |
+
class FileFolderService(object):
|
| 102 |
+
"""Missing associated documentation comment in .proto file."""
|
| 103 |
+
|
| 104 |
+
@staticmethod
|
| 105 |
+
def List(request,
|
| 106 |
+
target,
|
| 107 |
+
options=(),
|
| 108 |
+
channel_credentials=None,
|
| 109 |
+
call_credentials=None,
|
| 110 |
+
insecure=False,
|
| 111 |
+
compression=None,
|
| 112 |
+
wait_for_ready=None,
|
| 113 |
+
timeout=None,
|
| 114 |
+
metadata=None):
|
| 115 |
+
return grpc.experimental.unary_stream(
|
| 116 |
+
request,
|
| 117 |
+
target,
|
| 118 |
+
'/nvidia.omniverse.storage.filefolder.v1beta.FileFolderService/List',
|
| 119 |
+
nvidia_dot_omniverse_dot_storage_dot_filefolder_dot_v1beta_dot_filefolder__service__pb2.ListRequest.SerializeToString,
|
| 120 |
+
nvidia_dot_omniverse_dot_storage_dot_filefolder_dot_v1beta_dot_filefolder__service__pb2.ListResponse.FromString,
|
| 121 |
+
options,
|
| 122 |
+
channel_credentials,
|
| 123 |
+
insecure,
|
| 124 |
+
call_credentials,
|
| 125 |
+
compression,
|
| 126 |
+
wait_for_ready,
|
| 127 |
+
timeout,
|
| 128 |
+
metadata,
|
| 129 |
+
_registered_method=True)
|
| 130 |
+
|
| 131 |
+
@staticmethod
|
| 132 |
+
def ListStat(request,
|
| 133 |
+
target,
|
| 134 |
+
options=(),
|
| 135 |
+
channel_credentials=None,
|
| 136 |
+
call_credentials=None,
|
| 137 |
+
insecure=False,
|
| 138 |
+
compression=None,
|
| 139 |
+
wait_for_ready=None,
|
| 140 |
+
timeout=None,
|
| 141 |
+
metadata=None):
|
| 142 |
+
return grpc.experimental.unary_stream(
|
| 143 |
+
request,
|
| 144 |
+
target,
|
| 145 |
+
'/nvidia.omniverse.storage.filefolder.v1beta.FileFolderService/ListStat',
|
| 146 |
+
nvidia_dot_omniverse_dot_storage_dot_filefolder_dot_v1beta_dot_filefolder__service__pb2.ListStatRequest.SerializeToString,
|
| 147 |
+
nvidia_dot_omniverse_dot_storage_dot_filefolder_dot_v1beta_dot_filefolder__service__pb2.ListStatResponse.FromString,
|
| 148 |
+
options,
|
| 149 |
+
channel_credentials,
|
| 150 |
+
insecure,
|
| 151 |
+
call_credentials,
|
| 152 |
+
compression,
|
| 153 |
+
wait_for_ready,
|
| 154 |
+
timeout,
|
| 155 |
+
metadata,
|
| 156 |
+
_registered_method=True)
|
| 157 |
+
|
| 158 |
+
@staticmethod
|
| 159 |
+
def DeleteFolder(request,
|
| 160 |
+
target,
|
| 161 |
+
options=(),
|
| 162 |
+
channel_credentials=None,
|
| 163 |
+
call_credentials=None,
|
| 164 |
+
insecure=False,
|
| 165 |
+
compression=None,
|
| 166 |
+
wait_for_ready=None,
|
| 167 |
+
timeout=None,
|
| 168 |
+
metadata=None):
|
| 169 |
+
return grpc.experimental.unary_unary(
|
| 170 |
+
request,
|
| 171 |
+
target,
|
| 172 |
+
'/nvidia.omniverse.storage.filefolder.v1beta.FileFolderService/DeleteFolder',
|
| 173 |
+
nvidia_dot_omniverse_dot_storage_dot_filefolder_dot_v1beta_dot_filefolder__service__pb2.DeleteFolderRequest.SerializeToString,
|
| 174 |
+
nvidia_dot_omniverse_dot_storage_dot_filefolder_dot_v1beta_dot_filefolder__service__pb2.DeleteFolderResponse.FromString,
|
| 175 |
+
options,
|
| 176 |
+
channel_credentials,
|
| 177 |
+
insecure,
|
| 178 |
+
call_credentials,
|
| 179 |
+
compression,
|
| 180 |
+
wait_for_ready,
|
| 181 |
+
timeout,
|
| 182 |
+
metadata,
|
| 183 |
+
_registered_method=True)
|
docker/hf-space/hf-storage-api/generated/nvidia/omniverse/storage/fileobject/v1alpha/fileobject_pb2.py
ADDED
|
@@ -0,0 +1,52 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# -*- coding: utf-8 -*-
|
| 2 |
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
| 3 |
+
# NO CHECKED-IN PROTOBUF GENCODE
|
| 4 |
+
# source: nvidia/omniverse/storage/fileobject/v1alpha/fileobject.proto
|
| 5 |
+
# Protobuf Python Version: 6.31.1
|
| 6 |
+
"""Generated protocol buffer code."""
|
| 7 |
+
from google.protobuf import descriptor as _descriptor
|
| 8 |
+
from google.protobuf import descriptor_pool as _descriptor_pool
|
| 9 |
+
from google.protobuf import runtime_version as _runtime_version
|
| 10 |
+
from google.protobuf import symbol_database as _symbol_database
|
| 11 |
+
from google.protobuf.internal import builder as _builder
|
| 12 |
+
_runtime_version.ValidateProtobufRuntimeVersion(
|
| 13 |
+
_runtime_version.Domain.PUBLIC,
|
| 14 |
+
6,
|
| 15 |
+
31,
|
| 16 |
+
1,
|
| 17 |
+
'',
|
| 18 |
+
'nvidia/omniverse/storage/fileobject/v1alpha/fileobject.proto'
|
| 19 |
+
)
|
| 20 |
+
# @@protoc_insertion_point(imports)
|
| 21 |
+
|
| 22 |
+
_sym_db = _symbol_database.Default()
|
| 23 |
+
|
| 24 |
+
|
| 25 |
+
from google.protobuf import timestamp_pb2 as google_dot_protobuf_dot_timestamp__pb2
|
| 26 |
+
|
| 27 |
+
|
| 28 |
+
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n<nvidia/omniverse/storage/fileobject/v1alpha/fileobject.proto\x12+nvidia.omniverse.storage.fileobject.v1alpha\x1a\x1fgoogle/protobuf/timestamp.proto\"\x16\n\x05\x43hunk\x12\r\n\x05\x63hunk\x18\x01 \x01(\x0c\"\x9c\x01\n\x08Metadata\x12\x1d\n\x10\x64\x61ta_object_size\x18\x01 \x01(\x04H\x00\x88\x01\x01\x12@\n\x17last_modified_timestamp\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampH\x01\x88\x01\x01\x42\x13\n\x11_data_object_sizeB\x1a\n\x18_last_modified_timestamp\"%\n\x06Header\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t\"\x8c\x01\n\x08Redirect\x12\x1b\n\x13redirect_target_url\x18\x01 \x01(\t\x12\x12\n\x06method\x18\x02 \x01(\tB\x02\x18\x01\x12O\n\x12\x61\x64\x64itional_headers\x18\x03 \x03(\x0b\x32\x33.nvidia.omniverse.storage.fileobject.v1alpha.Header\"p\n\x0b\x41\x64\x64ressInfo\x12\x18\n\x10resource_address\x18\x01 \x01(\t\x12G\n\x08metadata\x18\x02 \x01(\x0b\x32\x35.nvidia.omniverse.storage.fileobject.v1alpha.Metadata\"\xb1\x01\n\x0cResourceInfo\x12X\n\x11resource_identity\x18\x01 \x01(\x0b\x32=.nvidia.omniverse.storage.fileobject.v1alpha.ResourceIdentity\x12G\n\x08metadata\x18\x02 \x01(\x0b\x32\x35.nvidia.omniverse.storage.fileobject.v1alpha.Metadata\",\n\x10ResourceIdentity\x12\x18\n\x10\x65ncoded_identity\x18\x01 \x01(\tB\x84\x01\n/com.nvidia.omniverse.storage.fileobject.v1alphaB\x0f\x46ileobjectProtoP\x01Z>pb.api.nvidia.com/omniverse/storage/fileobject/v1alpha;storageb\x06proto3')
|
| 29 |
+
|
| 30 |
+
_globals = globals()
|
| 31 |
+
_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
|
| 32 |
+
_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'nvidia.omniverse.storage.fileobject.v1alpha.fileobject_pb2', _globals)
|
| 33 |
+
if not _descriptor._USE_C_DESCRIPTORS:
|
| 34 |
+
_globals['DESCRIPTOR']._loaded_options = None
|
| 35 |
+
_globals['DESCRIPTOR']._serialized_options = b'\n/com.nvidia.omniverse.storage.fileobject.v1alphaB\017FileobjectProtoP\001Z>pb.api.nvidia.com/omniverse/storage/fileobject/v1alpha;storage'
|
| 36 |
+
_globals['_REDIRECT'].fields_by_name['method']._loaded_options = None
|
| 37 |
+
_globals['_REDIRECT'].fields_by_name['method']._serialized_options = b'\030\001'
|
| 38 |
+
_globals['_CHUNK']._serialized_start=142
|
| 39 |
+
_globals['_CHUNK']._serialized_end=164
|
| 40 |
+
_globals['_METADATA']._serialized_start=167
|
| 41 |
+
_globals['_METADATA']._serialized_end=323
|
| 42 |
+
_globals['_HEADER']._serialized_start=325
|
| 43 |
+
_globals['_HEADER']._serialized_end=362
|
| 44 |
+
_globals['_REDIRECT']._serialized_start=365
|
| 45 |
+
_globals['_REDIRECT']._serialized_end=505
|
| 46 |
+
_globals['_ADDRESSINFO']._serialized_start=507
|
| 47 |
+
_globals['_ADDRESSINFO']._serialized_end=619
|
| 48 |
+
_globals['_RESOURCEINFO']._serialized_start=622
|
| 49 |
+
_globals['_RESOURCEINFO']._serialized_end=799
|
| 50 |
+
_globals['_RESOURCEIDENTITY']._serialized_start=801
|
| 51 |
+
_globals['_RESOURCEIDENTITY']._serialized_end=845
|
| 52 |
+
# @@protoc_insertion_point(module_scope)
|
docker/hf-space/hf-storage-api/generated/nvidia/omniverse/storage/fileobject/v1alpha/fileobject_pb2.pyi
ADDED
|
@@ -0,0 +1,64 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import datetime
|
| 2 |
+
|
| 3 |
+
from google.protobuf import timestamp_pb2 as _timestamp_pb2
|
| 4 |
+
from google.protobuf.internal import containers as _containers
|
| 5 |
+
from google.protobuf import descriptor as _descriptor
|
| 6 |
+
from google.protobuf import message as _message
|
| 7 |
+
from collections.abc import Iterable as _Iterable, Mapping as _Mapping
|
| 8 |
+
from typing import ClassVar as _ClassVar, Optional as _Optional, Union as _Union
|
| 9 |
+
|
| 10 |
+
DESCRIPTOR: _descriptor.FileDescriptor
|
| 11 |
+
|
| 12 |
+
class Chunk(_message.Message):
|
| 13 |
+
__slots__ = ("chunk",)
|
| 14 |
+
CHUNK_FIELD_NUMBER: _ClassVar[int]
|
| 15 |
+
chunk: bytes
|
| 16 |
+
def __init__(self, chunk: _Optional[bytes] = ...) -> None: ...
|
| 17 |
+
|
| 18 |
+
class Metadata(_message.Message):
|
| 19 |
+
__slots__ = ("data_object_size", "last_modified_timestamp")
|
| 20 |
+
DATA_OBJECT_SIZE_FIELD_NUMBER: _ClassVar[int]
|
| 21 |
+
LAST_MODIFIED_TIMESTAMP_FIELD_NUMBER: _ClassVar[int]
|
| 22 |
+
data_object_size: int
|
| 23 |
+
last_modified_timestamp: _timestamp_pb2.Timestamp
|
| 24 |
+
def __init__(self, data_object_size: _Optional[int] = ..., last_modified_timestamp: _Optional[_Union[datetime.datetime, _timestamp_pb2.Timestamp, _Mapping]] = ...) -> None: ...
|
| 25 |
+
|
| 26 |
+
class Header(_message.Message):
|
| 27 |
+
__slots__ = ("name", "value")
|
| 28 |
+
NAME_FIELD_NUMBER: _ClassVar[int]
|
| 29 |
+
VALUE_FIELD_NUMBER: _ClassVar[int]
|
| 30 |
+
name: str
|
| 31 |
+
value: str
|
| 32 |
+
def __init__(self, name: _Optional[str] = ..., value: _Optional[str] = ...) -> None: ...
|
| 33 |
+
|
| 34 |
+
class Redirect(_message.Message):
|
| 35 |
+
__slots__ = ("redirect_target_url", "method", "additional_headers")
|
| 36 |
+
REDIRECT_TARGET_URL_FIELD_NUMBER: _ClassVar[int]
|
| 37 |
+
METHOD_FIELD_NUMBER: _ClassVar[int]
|
| 38 |
+
ADDITIONAL_HEADERS_FIELD_NUMBER: _ClassVar[int]
|
| 39 |
+
redirect_target_url: str
|
| 40 |
+
method: str
|
| 41 |
+
additional_headers: _containers.RepeatedCompositeFieldContainer[Header]
|
| 42 |
+
def __init__(self, redirect_target_url: _Optional[str] = ..., method: _Optional[str] = ..., additional_headers: _Optional[_Iterable[_Union[Header, _Mapping]]] = ...) -> None: ...
|
| 43 |
+
|
| 44 |
+
class AddressInfo(_message.Message):
|
| 45 |
+
__slots__ = ("resource_address", "metadata")
|
| 46 |
+
RESOURCE_ADDRESS_FIELD_NUMBER: _ClassVar[int]
|
| 47 |
+
METADATA_FIELD_NUMBER: _ClassVar[int]
|
| 48 |
+
resource_address: str
|
| 49 |
+
metadata: Metadata
|
| 50 |
+
def __init__(self, resource_address: _Optional[str] = ..., metadata: _Optional[_Union[Metadata, _Mapping]] = ...) -> None: ...
|
| 51 |
+
|
| 52 |
+
class ResourceInfo(_message.Message):
|
| 53 |
+
__slots__ = ("resource_identity", "metadata")
|
| 54 |
+
RESOURCE_IDENTITY_FIELD_NUMBER: _ClassVar[int]
|
| 55 |
+
METADATA_FIELD_NUMBER: _ClassVar[int]
|
| 56 |
+
resource_identity: ResourceIdentity
|
| 57 |
+
metadata: Metadata
|
| 58 |
+
def __init__(self, resource_identity: _Optional[_Union[ResourceIdentity, _Mapping]] = ..., metadata: _Optional[_Union[Metadata, _Mapping]] = ...) -> None: ...
|
| 59 |
+
|
| 60 |
+
class ResourceIdentity(_message.Message):
|
| 61 |
+
__slots__ = ("encoded_identity",)
|
| 62 |
+
ENCODED_IDENTITY_FIELD_NUMBER: _ClassVar[int]
|
| 63 |
+
encoded_identity: str
|
| 64 |
+
def __init__(self, encoded_identity: _Optional[str] = ...) -> None: ...
|
docker/hf-space/hf-storage-api/generated/nvidia/omniverse/storage/fileobject/v1alpha/fileobject_pb2_grpc.py
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
|
| 2 |
+
"""Client and server classes corresponding to protobuf-defined services."""
|
| 3 |
+
import grpc
|
| 4 |
+
import warnings
|
| 5 |
+
|
| 6 |
+
|
| 7 |
+
GRPC_GENERATED_VERSION = '1.80.0'
|
| 8 |
+
GRPC_VERSION = grpc.__version__
|
| 9 |
+
_version_not_supported = False
|
| 10 |
+
|
| 11 |
+
try:
|
| 12 |
+
from grpc._utilities import first_version_is_lower
|
| 13 |
+
_version_not_supported = first_version_is_lower(GRPC_VERSION, GRPC_GENERATED_VERSION)
|
| 14 |
+
except ImportError:
|
| 15 |
+
_version_not_supported = True
|
| 16 |
+
|
| 17 |
+
if _version_not_supported:
|
| 18 |
+
raise RuntimeError(
|
| 19 |
+
f'The grpc package installed is at version {GRPC_VERSION},'
|
| 20 |
+
+ ' but the generated code in nvidia/omniverse/storage/fileobject/v1alpha/fileobject_pb2_grpc.py depends on'
|
| 21 |
+
+ f' grpcio>={GRPC_GENERATED_VERSION}.'
|
| 22 |
+
+ f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}'
|
| 23 |
+
+ f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.'
|
| 24 |
+
)
|
docker/hf-space/hf-storage-api/generated/nvidia/omniverse/storage/fileobject/v1alpha/fileobject_service_pb2.py
ADDED
|
@@ -0,0 +1,112 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# -*- coding: utf-8 -*-
|
| 2 |
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
| 3 |
+
# NO CHECKED-IN PROTOBUF GENCODE
|
| 4 |
+
# source: nvidia/omniverse/storage/fileobject/v1alpha/fileobject_service.proto
|
| 5 |
+
# Protobuf Python Version: 6.31.1
|
| 6 |
+
"""Generated protocol buffer code."""
|
| 7 |
+
from google.protobuf import descriptor as _descriptor
|
| 8 |
+
from google.protobuf import descriptor_pool as _descriptor_pool
|
| 9 |
+
from google.protobuf import runtime_version as _runtime_version
|
| 10 |
+
from google.protobuf import symbol_database as _symbol_database
|
| 11 |
+
from google.protobuf.internal import builder as _builder
|
| 12 |
+
_runtime_version.ValidateProtobufRuntimeVersion(
|
| 13 |
+
_runtime_version.Domain.PUBLIC,
|
| 14 |
+
6,
|
| 15 |
+
31,
|
| 16 |
+
1,
|
| 17 |
+
'',
|
| 18 |
+
'nvidia/omniverse/storage/fileobject/v1alpha/fileobject_service.proto'
|
| 19 |
+
)
|
| 20 |
+
# @@protoc_insertion_point(imports)
|
| 21 |
+
|
| 22 |
+
_sym_db = _symbol_database.Default()
|
| 23 |
+
|
| 24 |
+
|
| 25 |
+
from nvidia.omniverse.storage.fileobject.v1alpha import fileobject_pb2 as nvidia_dot_omniverse_dot_storage_dot_fileobject_dot_v1alpha_dot_fileobject__pb2
|
| 26 |
+
|
| 27 |
+
|
| 28 |
+
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\nDnvidia/omniverse/storage/fileobject/v1alpha/fileobject_service.proto\x12+nvidia.omniverse.storage.fileobject.v1alpha\x1a<nvidia/omniverse/storage/fileobject/v1alpha/fileobject.proto\",\n\x10\x45numerateRequest\x12\x18\n\x10resource_address\x18\x01 \x01(\t\"\\\n\x11\x45numerateResponse\x12G\n\x05items\x18\x01 \x03(\x0b\x32\x38.nvidia.omniverse.storage.fileobject.v1alpha.AddressInfo\"\'\n\x0bStatRequest\x12\x18\n\x10resource_address\x18\x01 \x01(\t\"`\n\x0cStatResponse\x12P\n\rresource_info\x18\x01 \x01(\x0b\x32\x39.nvidia.omniverse.storage.fileobject.v1alpha.ResourceInfo\"\xe2\x01\n\x0bReadRequest\x12X\n\x11resource_identity\x18\x01 \x01(\x0b\x32=.nvidia.omniverse.storage.fileobject.v1alpha.ResourceIdentity\x12\x61\n\x13\x64ownload_preference\x18\x02 \x01(\x0e\x32?.nvidia.omniverse.storage.fileobject.v1alpha.DownloadPreferenceH\x00\x88\x01\x01\x42\x16\n\x14_download_preference\"\xf7\x01\n\x0cReadResponse\x12I\n\x08metadata\x18\x01 \x01(\x0b\x32\x35.nvidia.omniverse.storage.fileobject.v1alpha.MetadataH\x00\x12\x43\n\x05\x63hunk\x18\x02 \x01(\x0b\x32\x32.nvidia.omniverse.storage.fileobject.v1alpha.ChunkH\x00\x12I\n\x08redirect\x18\x03 \x01(\x0b\x32\x35.nvidia.omniverse.storage.fileobject.v1alpha.RedirectH\x00\x42\x0c\n\nreply_type\"\xad\x01\n\x16ReadFromAddressRequest\x12\x18\n\x10resource_address\x18\x01 \x01(\t\x12\x61\n\x13\x64ownload_preference\x18\x02 \x01(\x0e\x32?.nvidia.omniverse.storage.fileobject.v1alpha.DownloadPreferenceH\x00\x88\x01\x01\x42\x16\n\x14_download_preference\"\x8b\x02\n\x17ReadFromAddressResponse\x12R\n\rresource_info\x18\x01 \x01(\x0b\x32\x39.nvidia.omniverse.storage.fileobject.v1alpha.ResourceInfoH\x00\x12\x43\n\x05\x63hunk\x18\x02 \x01(\x0b\x32\x32.nvidia.omniverse.storage.fileobject.v1alpha.ChunkH\x00\x12I\n\x08redirect\x18\x03 \x01(\x0b\x32\x35.nvidia.omniverse.storage.fileobject.v1alpha.RedirectH\x00\x42\x0c\n\nreply_type\"A\n\x19\x46\x65tchWriteTypeInfoRequest\x12$\n\x1c\x64\x65stination_resource_address\x18\x01 \x01(\t\"\xbe\x01\n\x18WriteTypeForSizeInterval\x12 \n\x18minimum_data_object_size\x18\x01 \x01(\x04\x12 \n\x18maximum_data_object_size\x18\x02 \x01(\x04\x12^\n\x17preferred_upload_method\x18\x03 \x01(\x0e\x32=.nvidia.omniverse.storage.fileobject.v1alpha.UploadPreference\"\x81\x01\n\x1a\x46\x65tchWriteTypeInfoResponse\x12\x63\n\x14write_type_intervals\x18\x01 \x03(\x0b\x32\x45.nvidia.omniverse.storage.fileobject.v1alpha.WriteTypeForSizeInterval\"\xb9\x01\n\x0cWriteRequest\x12N\n\x06params\x18\x01 \x01(\x0b\x32<.nvidia.omniverse.storage.fileobject.v1alpha.WriteParametersH\x00\x12\x43\n\x05\x63hunk\x18\x02 \x01(\x0b\x32\x32.nvidia.omniverse.storage.fileobject.v1alpha.ChunkH\x00\x42\x14\n\x12write_request_type\"\xb9\x02\n\x0fWriteParameters\x12$\n\x1c\x64\x65stination_resource_address\x18\x01 \x01(\t\x12\\\n\x10previous_version\x18\x02 \x01(\x0b\x32=.nvidia.omniverse.storage.fileobject.v1alpha.ResourceIdentityH\x00\x88\x01\x01\x12\x18\n\x10\x64\x61ta_object_size\x18\x03 \x01(\x04\x12]\n\x11upload_preference\x18\x04 \x01(\x0e\x32=.nvidia.omniverse.storage.fileobject.v1alpha.UploadPreferenceH\x01\x88\x01\x01\x42\x13\n\x11_previous_versionB\x14\n\x12_upload_preference\"\xf3\x01\n\x17WriteRedirectProperties\x12\x1b\n\x13redirect_target_url\x18\x01 \x01(\t\x12I\n\x06method\x18\x02 \x01(\x0e\x32\x39.nvidia.omniverse.storage.fileobject.v1alpha.UploadMethod\x12O\n\x12\x61\x64\x64itional_headers\x18\x03 \x03(\x0b\x32\x33.nvidia.omniverse.storage.fileobject.v1alpha.Header\x12\x1f\n\x17\x63ompletion_header_names\x18\x04 \x03(\t\"\x15\n\x13WriteChunksAccepted\"\xa5\x03\n\rWriteResponse\x12\x61\n\x15write_chunks_accepted\x18\x01 \x01(\x0b\x32@.nvidia.omniverse.storage.fileobject.v1alpha.WriteChunksAcceptedH\x00\x12R\n\rresource_info\x18\x02 \x01(\x0b\x32\x39.nvidia.omniverse.storage.fileobject.v1alpha.ResourceInfoH\x00\x12^\n\x0ewrite_redirect\x18\x03 \x01(\x0b\x32\x44.nvidia.omniverse.storage.fileobject.v1alpha.WriteRedirectPropertiesH\x00\x12\x66\n\x10multipart_upload\x18\x04 \x01(\x0b\x32J.nvidia.omniverse.storage.fileobject.v1alpha.CreateMultipartUploadResponseH\x00\x42\x15\n\x13write_response_type\"\x96\x01\n\x1d\x43ompleteRedirectUploadRequest\x12$\n\x1c\x64\x65stination_resource_address\x18\x01 \x01(\t\x12O\n\x12\x61\x64\x64itional_headers\x18\x02 \x03(\x0b\x32\x33.nvidia.omniverse.storage.fileobject.v1alpha.Header\"r\n\x1e\x43ompleteRedirectUploadResponse\x12P\n\rresource_info\x18\x01 \x01(\x0b\x32\x39.nvidia.omniverse.storage.fileobject.v1alpha.ResourceInfo\"\xd3\x02\n\x1d\x43reateMultipartUploadResponse\x12\x11\n\tupload_id\x18\x01 \x01(\t\x12g\n\x19\x66irst_part_write_redirect\x18\x02 \x01(\x0b\x32\x44.nvidia.omniverse.storage.fileobject.v1alpha.WriteRedirectProperties\x12!\n\x14maximum_parts_number\x18\x03 \x01(\rH\x00\x88\x01\x01\x12\"\n\x15minimum_size_per_part\x18\x04 \x01(\x04H\x01\x88\x01\x01\x12\"\n\x15maximum_size_per_part\x18\x05 \x01(\x04H\x02\x88\x01\x01\x42\x17\n\x15_maximum_parts_numberB\x18\n\x16_minimum_size_per_partB\x18\n\x16_maximum_size_per_part\"\x89\x01\n\x11UploadPartRequest\x12\x11\n\tupload_id\x18\x01 \x01(\t\x12$\n\x1c\x64\x65stination_resource_address\x18\x02 \x01(\t\x12\x13\n\x0bpart_number\x18\x03 \x01(\r\x12\x17\n\npart_count\x18\x04 \x01(\rH\x00\x88\x01\x01\x42\r\n\x0b_part_count\"x\n\x12UploadPartResponse\x12\x62\n\x14part_write_redirects\x18\x01 \x03(\x0b\x32\x44.nvidia.omniverse.storage.fileobject.v1alpha.WriteRedirectProperties\"p\n\x13\x43ompletedUploadPart\x12\x13\n\x0bpart_number\x18\x01 \x01(\r\x12\x44\n\x07headers\x18\x02 \x03(\x0b\x32\x33.nvidia.omniverse.storage.fileobject.v1alpha.Header\"\xaa\x01\n\x1e\x43ompleteMultipartUploadRequest\x12\x11\n\tupload_id\x18\x01 \x01(\t\x12$\n\x1c\x64\x65stination_resource_address\x18\x02 \x01(\t\x12O\n\x05parts\x18\x03 \x03(\x0b\x32@.nvidia.omniverse.storage.fileobject.v1alpha.CompletedUploadPart\"s\n\x1f\x43ompleteMultipartUploadResponse\x12P\n\rresource_info\x18\x01 \x01(\x0b\x32\x39.nvidia.omniverse.storage.fileobject.v1alpha.ResourceInfo\"V\n\x1b\x41\x62ortMultipartUploadRequest\x12\x11\n\tupload_id\x18\x01 \x01(\t\x12$\n\x1c\x64\x65stination_resource_address\x18\x02 \x01(\t\"\x1e\n\x1c\x41\x62ortMultipartUploadResponse\"\x9c\x01\n\rDeleteRequest\x12\x18\n\x10resource_address\x18\x01 \x01(\t\x12\\\n\x10previous_version\x18\x02 \x01(\x0b\x32=.nvidia.omniverse.storage.fileobject.v1alpha.ResourceIdentityH\x00\x88\x01\x01\x42\x13\n\x11_previous_version\"\x10\n\x0e\x44\x65leteResponse\"\x87\x02\n\x0b\x43opyRequest\x12_\n\x18source_resource_identity\x18\x01 \x01(\x0b\x32=.nvidia.omniverse.storage.fileobject.v1alpha.ResourceIdentity\x12$\n\x1c\x64\x65stination_resource_address\x18\x02 \x01(\t\x12\\\n\x10previous_version\x18\x03 \x01(\x0b\x32=.nvidia.omniverse.storage.fileobject.v1alpha.ResourceIdentityH\x00\x88\x01\x01\x42\x13\n\x11_previous_version\"h\n\x0c\x43opyResponse\x12X\n\x11resource_identity\x18\x01 \x01(\x0b\x32=.nvidia.omniverse.storage.fileobject.v1alpha.ResourceIdentity\"\xe0\x02\n\x0bMoveRequest\x12\x1f\n\x17source_resource_address\x18\x01 \x01(\t\x12\x63\n\x17source_previous_version\x18\x02 \x01(\x0b\x32=.nvidia.omniverse.storage.fileobject.v1alpha.ResourceIdentityH\x00\x88\x01\x01\x12$\n\x1c\x64\x65stination_resource_address\x18\x03 \x01(\t\x12h\n\x1c\x64\x65stination_previous_version\x18\x04 \x01(\x0b\x32=.nvidia.omniverse.storage.fileobject.v1alpha.ResourceIdentityH\x01\x88\x01\x01\x42\x1a\n\x18_source_previous_versionB\x1f\n\x1d_destination_previous_version\"h\n\x0cMoveResponse\x12X\n\x11resource_identity\x18\x01 \x01(\x0b\x32=.nvidia.omniverse.storage.fileobject.v1alpha.ResourceIdentity\">\n\"GetOptimisticLockingSupportRequest\x12\x18\n\x10resource_address\x18\x01 \x01(\t\"\x84\x01\n#GetOptimisticLockingSupportResponse\x12\x16\n\x0esupports_write\x18\x01 \x01(\x08\x12\x17\n\x0fsupports_delete\x18\x02 \x01(\x08\x12\x15\n\rsupports_copy\x18\x03 \x01(\x08\x12\x15\n\rsupports_move\x18\x04 \x01(\x08*y\n\x12\x44ownloadPreference\x12#\n\x1f\x44OWNLOAD_PREFERENCE_UNSPECIFIED\x10\x00\x12\x1c\n\x18\x44OWNLOAD_PREFERENCE_BODY\x10\x01\x12 \n\x1c\x44OWNLOAD_PREFERENCE_REDIRECT\x10\x02*\x92\x01\n\x10UploadPreference\x12!\n\x1dUPLOAD_PREFERENCE_UNSPECIFIED\x10\x00\x12\x1a\n\x16UPLOAD_PREFERENCE_BODY\x10\x01\x12\x1e\n\x1aUPLOAD_PREFERENCE_REDIRECT\x10\x02\x12\x1f\n\x1bUPLOAD_PREFERENCE_MULTIPART\x10\x03*\\\n\x0cUploadMethod\x12\x1d\n\x19UPLOAD_METHOD_UNSPECIFIED\x10\x00\x12\x16\n\x12UPLOAD_METHOD_POST\x10\x01\x12\x15\n\x11UPLOAD_METHOD_PUT\x10\x02\x32\xd6\x10\n\x11\x46ileObjectService\x12\x8c\x01\n\tEnumerate\x12=.nvidia.omniverse.storage.fileobject.v1alpha.EnumerateRequest\x1a>.nvidia.omniverse.storage.fileobject.v1alpha.EnumerateResponse0\x01\x12{\n\x04Stat\x12\x38.nvidia.omniverse.storage.fileobject.v1alpha.StatRequest\x1a\x39.nvidia.omniverse.storage.fileobject.v1alpha.StatResponse\x12}\n\x04Read\x12\x38.nvidia.omniverse.storage.fileobject.v1alpha.ReadRequest\x1a\x39.nvidia.omniverse.storage.fileobject.v1alpha.ReadResponse0\x01\x12\x9e\x01\n\x0fReadFromAddress\x12\x43.nvidia.omniverse.storage.fileobject.v1alpha.ReadFromAddressRequest\x1a\x44.nvidia.omniverse.storage.fileobject.v1alpha.ReadFromAddressResponse0\x01\x12\xa5\x01\n\x12\x46\x65tchWriteTypeInfo\x12\x46.nvidia.omniverse.storage.fileobject.v1alpha.FetchWriteTypeInfoRequest\x1aG.nvidia.omniverse.storage.fileobject.v1alpha.FetchWriteTypeInfoResponse\x12\x82\x01\n\x05Write\x12\x39.nvidia.omniverse.storage.fileobject.v1alpha.WriteRequest\x1a:.nvidia.omniverse.storage.fileobject.v1alpha.WriteResponse(\x01\x30\x01\x12\xb1\x01\n\x16\x43ompleteRedirectUpload\x12J.nvidia.omniverse.storage.fileobject.v1alpha.CompleteRedirectUploadRequest\x1aK.nvidia.omniverse.storage.fileobject.v1alpha.CompleteRedirectUploadResponse\x12\x8d\x01\n\nUploadPart\x12>.nvidia.omniverse.storage.fileobject.v1alpha.UploadPartRequest\x1a?.nvidia.omniverse.storage.fileobject.v1alpha.UploadPartResponse\x12\xb4\x01\n\x17\x43ompleteMultipartUpload\x12K.nvidia.omniverse.storage.fileobject.v1alpha.CompleteMultipartUploadRequest\x1aL.nvidia.omniverse.storage.fileobject.v1alpha.CompleteMultipartUploadResponse\x12\xab\x01\n\x14\x41\x62ortMultipartUpload\x12H.nvidia.omniverse.storage.fileobject.v1alpha.AbortMultipartUploadRequest\x1aI.nvidia.omniverse.storage.fileobject.v1alpha.AbortMultipartUploadResponse\x12\x81\x01\n\x06\x44\x65lete\x12:.nvidia.omniverse.storage.fileobject.v1alpha.DeleteRequest\x1a;.nvidia.omniverse.storage.fileobject.v1alpha.DeleteResponse\x12{\n\x04\x43opy\x12\x38.nvidia.omniverse.storage.fileobject.v1alpha.CopyRequest\x1a\x39.nvidia.omniverse.storage.fileobject.v1alpha.CopyResponse\x12{\n\x04Move\x12\x38.nvidia.omniverse.storage.fileobject.v1alpha.MoveRequest\x1a\x39.nvidia.omniverse.storage.fileobject.v1alpha.MoveResponse\x12\xc0\x01\n\x1bGetOptimisticLockingSupport\x12O.nvidia.omniverse.storage.fileobject.v1alpha.GetOptimisticLockingSupportRequest\x1aP.nvidia.omniverse.storage.fileobject.v1alpha.GetOptimisticLockingSupportResponseB\x8b\x01\n/com.nvidia.omniverse.storage.fileobject.v1alphaB\x16\x46ileobjectServiceProtoP\x01Z>pb.api.nvidia.com/omniverse/storage/fileobject/v1alpha;storageb\x06proto3')
|
| 29 |
+
|
| 30 |
+
_globals = globals()
|
| 31 |
+
_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
|
| 32 |
+
_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'nvidia.omniverse.storage.fileobject.v1alpha.fileobject_service_pb2', _globals)
|
| 33 |
+
if not _descriptor._USE_C_DESCRIPTORS:
|
| 34 |
+
_globals['DESCRIPTOR']._loaded_options = None
|
| 35 |
+
_globals['DESCRIPTOR']._serialized_options = b'\n/com.nvidia.omniverse.storage.fileobject.v1alphaB\026FileobjectServiceProtoP\001Z>pb.api.nvidia.com/omniverse/storage/fileobject/v1alpha;storage'
|
| 36 |
+
_globals['_DOWNLOADPREFERENCE']._serialized_start=5578
|
| 37 |
+
_globals['_DOWNLOADPREFERENCE']._serialized_end=5699
|
| 38 |
+
_globals['_UPLOADPREFERENCE']._serialized_start=5702
|
| 39 |
+
_globals['_UPLOADPREFERENCE']._serialized_end=5848
|
| 40 |
+
_globals['_UPLOADMETHOD']._serialized_start=5850
|
| 41 |
+
_globals['_UPLOADMETHOD']._serialized_end=5942
|
| 42 |
+
_globals['_ENUMERATEREQUEST']._serialized_start=179
|
| 43 |
+
_globals['_ENUMERATEREQUEST']._serialized_end=223
|
| 44 |
+
_globals['_ENUMERATERESPONSE']._serialized_start=225
|
| 45 |
+
_globals['_ENUMERATERESPONSE']._serialized_end=317
|
| 46 |
+
_globals['_STATREQUEST']._serialized_start=319
|
| 47 |
+
_globals['_STATREQUEST']._serialized_end=358
|
| 48 |
+
_globals['_STATRESPONSE']._serialized_start=360
|
| 49 |
+
_globals['_STATRESPONSE']._serialized_end=456
|
| 50 |
+
_globals['_READREQUEST']._serialized_start=459
|
| 51 |
+
_globals['_READREQUEST']._serialized_end=685
|
| 52 |
+
_globals['_READRESPONSE']._serialized_start=688
|
| 53 |
+
_globals['_READRESPONSE']._serialized_end=935
|
| 54 |
+
_globals['_READFROMADDRESSREQUEST']._serialized_start=938
|
| 55 |
+
_globals['_READFROMADDRESSREQUEST']._serialized_end=1111
|
| 56 |
+
_globals['_READFROMADDRESSRESPONSE']._serialized_start=1114
|
| 57 |
+
_globals['_READFROMADDRESSRESPONSE']._serialized_end=1381
|
| 58 |
+
_globals['_FETCHWRITETYPEINFOREQUEST']._serialized_start=1383
|
| 59 |
+
_globals['_FETCHWRITETYPEINFOREQUEST']._serialized_end=1448
|
| 60 |
+
_globals['_WRITETYPEFORSIZEINTERVAL']._serialized_start=1451
|
| 61 |
+
_globals['_WRITETYPEFORSIZEINTERVAL']._serialized_end=1641
|
| 62 |
+
_globals['_FETCHWRITETYPEINFORESPONSE']._serialized_start=1644
|
| 63 |
+
_globals['_FETCHWRITETYPEINFORESPONSE']._serialized_end=1773
|
| 64 |
+
_globals['_WRITEREQUEST']._serialized_start=1776
|
| 65 |
+
_globals['_WRITEREQUEST']._serialized_end=1961
|
| 66 |
+
_globals['_WRITEPARAMETERS']._serialized_start=1964
|
| 67 |
+
_globals['_WRITEPARAMETERS']._serialized_end=2277
|
| 68 |
+
_globals['_WRITEREDIRECTPROPERTIES']._serialized_start=2280
|
| 69 |
+
_globals['_WRITEREDIRECTPROPERTIES']._serialized_end=2523
|
| 70 |
+
_globals['_WRITECHUNKSACCEPTED']._serialized_start=2525
|
| 71 |
+
_globals['_WRITECHUNKSACCEPTED']._serialized_end=2546
|
| 72 |
+
_globals['_WRITERESPONSE']._serialized_start=2549
|
| 73 |
+
_globals['_WRITERESPONSE']._serialized_end=2970
|
| 74 |
+
_globals['_COMPLETEREDIRECTUPLOADREQUEST']._serialized_start=2973
|
| 75 |
+
_globals['_COMPLETEREDIRECTUPLOADREQUEST']._serialized_end=3123
|
| 76 |
+
_globals['_COMPLETEREDIRECTUPLOADRESPONSE']._serialized_start=3125
|
| 77 |
+
_globals['_COMPLETEREDIRECTUPLOADRESPONSE']._serialized_end=3239
|
| 78 |
+
_globals['_CREATEMULTIPARTUPLOADRESPONSE']._serialized_start=3242
|
| 79 |
+
_globals['_CREATEMULTIPARTUPLOADRESPONSE']._serialized_end=3581
|
| 80 |
+
_globals['_UPLOADPARTREQUEST']._serialized_start=3584
|
| 81 |
+
_globals['_UPLOADPARTREQUEST']._serialized_end=3721
|
| 82 |
+
_globals['_UPLOADPARTRESPONSE']._serialized_start=3723
|
| 83 |
+
_globals['_UPLOADPARTRESPONSE']._serialized_end=3843
|
| 84 |
+
_globals['_COMPLETEDUPLOADPART']._serialized_start=3845
|
| 85 |
+
_globals['_COMPLETEDUPLOADPART']._serialized_end=3957
|
| 86 |
+
_globals['_COMPLETEMULTIPARTUPLOADREQUEST']._serialized_start=3960
|
| 87 |
+
_globals['_COMPLETEMULTIPARTUPLOADREQUEST']._serialized_end=4130
|
| 88 |
+
_globals['_COMPLETEMULTIPARTUPLOADRESPONSE']._serialized_start=4132
|
| 89 |
+
_globals['_COMPLETEMULTIPARTUPLOADRESPONSE']._serialized_end=4247
|
| 90 |
+
_globals['_ABORTMULTIPARTUPLOADREQUEST']._serialized_start=4249
|
| 91 |
+
_globals['_ABORTMULTIPARTUPLOADREQUEST']._serialized_end=4335
|
| 92 |
+
_globals['_ABORTMULTIPARTUPLOADRESPONSE']._serialized_start=4337
|
| 93 |
+
_globals['_ABORTMULTIPARTUPLOADRESPONSE']._serialized_end=4367
|
| 94 |
+
_globals['_DELETEREQUEST']._serialized_start=4370
|
| 95 |
+
_globals['_DELETEREQUEST']._serialized_end=4526
|
| 96 |
+
_globals['_DELETERESPONSE']._serialized_start=4528
|
| 97 |
+
_globals['_DELETERESPONSE']._serialized_end=4544
|
| 98 |
+
_globals['_COPYREQUEST']._serialized_start=4547
|
| 99 |
+
_globals['_COPYREQUEST']._serialized_end=4810
|
| 100 |
+
_globals['_COPYRESPONSE']._serialized_start=4812
|
| 101 |
+
_globals['_COPYRESPONSE']._serialized_end=4916
|
| 102 |
+
_globals['_MOVEREQUEST']._serialized_start=4919
|
| 103 |
+
_globals['_MOVEREQUEST']._serialized_end=5271
|
| 104 |
+
_globals['_MOVERESPONSE']._serialized_start=5273
|
| 105 |
+
_globals['_MOVERESPONSE']._serialized_end=5377
|
| 106 |
+
_globals['_GETOPTIMISTICLOCKINGSUPPORTREQUEST']._serialized_start=5379
|
| 107 |
+
_globals['_GETOPTIMISTICLOCKINGSUPPORTREQUEST']._serialized_end=5441
|
| 108 |
+
_globals['_GETOPTIMISTICLOCKINGSUPPORTRESPONSE']._serialized_start=5444
|
| 109 |
+
_globals['_GETOPTIMISTICLOCKINGSUPPORTRESPONSE']._serialized_end=5576
|
| 110 |
+
_globals['_FILEOBJECTSERVICE']._serialized_start=5945
|
| 111 |
+
_globals['_FILEOBJECTSERVICE']._serialized_end=8079
|
| 112 |
+
# @@protoc_insertion_point(module_scope)
|
docker/hf-space/hf-storage-api/generated/nvidia/omniverse/storage/fileobject/v1alpha/fileobject_service_pb2.pyi
ADDED
|
@@ -0,0 +1,314 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
from nvidia.omniverse.storage.fileobject.v1alpha import fileobject_pb2 as _fileobject_pb2
|
| 2 |
+
from google.protobuf.internal import containers as _containers
|
| 3 |
+
from google.protobuf.internal import enum_type_wrapper as _enum_type_wrapper
|
| 4 |
+
from google.protobuf import descriptor as _descriptor
|
| 5 |
+
from google.protobuf import message as _message
|
| 6 |
+
from collections.abc import Iterable as _Iterable, Mapping as _Mapping
|
| 7 |
+
from typing import ClassVar as _ClassVar, Optional as _Optional, Union as _Union
|
| 8 |
+
|
| 9 |
+
DESCRIPTOR: _descriptor.FileDescriptor
|
| 10 |
+
|
| 11 |
+
class DownloadPreference(int, metaclass=_enum_type_wrapper.EnumTypeWrapper):
|
| 12 |
+
__slots__ = ()
|
| 13 |
+
DOWNLOAD_PREFERENCE_UNSPECIFIED: _ClassVar[DownloadPreference]
|
| 14 |
+
DOWNLOAD_PREFERENCE_BODY: _ClassVar[DownloadPreference]
|
| 15 |
+
DOWNLOAD_PREFERENCE_REDIRECT: _ClassVar[DownloadPreference]
|
| 16 |
+
|
| 17 |
+
class UploadPreference(int, metaclass=_enum_type_wrapper.EnumTypeWrapper):
|
| 18 |
+
__slots__ = ()
|
| 19 |
+
UPLOAD_PREFERENCE_UNSPECIFIED: _ClassVar[UploadPreference]
|
| 20 |
+
UPLOAD_PREFERENCE_BODY: _ClassVar[UploadPreference]
|
| 21 |
+
UPLOAD_PREFERENCE_REDIRECT: _ClassVar[UploadPreference]
|
| 22 |
+
UPLOAD_PREFERENCE_MULTIPART: _ClassVar[UploadPreference]
|
| 23 |
+
|
| 24 |
+
class UploadMethod(int, metaclass=_enum_type_wrapper.EnumTypeWrapper):
|
| 25 |
+
__slots__ = ()
|
| 26 |
+
UPLOAD_METHOD_UNSPECIFIED: _ClassVar[UploadMethod]
|
| 27 |
+
UPLOAD_METHOD_POST: _ClassVar[UploadMethod]
|
| 28 |
+
UPLOAD_METHOD_PUT: _ClassVar[UploadMethod]
|
| 29 |
+
DOWNLOAD_PREFERENCE_UNSPECIFIED: DownloadPreference
|
| 30 |
+
DOWNLOAD_PREFERENCE_BODY: DownloadPreference
|
| 31 |
+
DOWNLOAD_PREFERENCE_REDIRECT: DownloadPreference
|
| 32 |
+
UPLOAD_PREFERENCE_UNSPECIFIED: UploadPreference
|
| 33 |
+
UPLOAD_PREFERENCE_BODY: UploadPreference
|
| 34 |
+
UPLOAD_PREFERENCE_REDIRECT: UploadPreference
|
| 35 |
+
UPLOAD_PREFERENCE_MULTIPART: UploadPreference
|
| 36 |
+
UPLOAD_METHOD_UNSPECIFIED: UploadMethod
|
| 37 |
+
UPLOAD_METHOD_POST: UploadMethod
|
| 38 |
+
UPLOAD_METHOD_PUT: UploadMethod
|
| 39 |
+
|
| 40 |
+
class EnumerateRequest(_message.Message):
|
| 41 |
+
__slots__ = ("resource_address",)
|
| 42 |
+
RESOURCE_ADDRESS_FIELD_NUMBER: _ClassVar[int]
|
| 43 |
+
resource_address: str
|
| 44 |
+
def __init__(self, resource_address: _Optional[str] = ...) -> None: ...
|
| 45 |
+
|
| 46 |
+
class EnumerateResponse(_message.Message):
|
| 47 |
+
__slots__ = ("items",)
|
| 48 |
+
ITEMS_FIELD_NUMBER: _ClassVar[int]
|
| 49 |
+
items: _containers.RepeatedCompositeFieldContainer[_fileobject_pb2.AddressInfo]
|
| 50 |
+
def __init__(self, items: _Optional[_Iterable[_Union[_fileobject_pb2.AddressInfo, _Mapping]]] = ...) -> None: ...
|
| 51 |
+
|
| 52 |
+
class StatRequest(_message.Message):
|
| 53 |
+
__slots__ = ("resource_address",)
|
| 54 |
+
RESOURCE_ADDRESS_FIELD_NUMBER: _ClassVar[int]
|
| 55 |
+
resource_address: str
|
| 56 |
+
def __init__(self, resource_address: _Optional[str] = ...) -> None: ...
|
| 57 |
+
|
| 58 |
+
class StatResponse(_message.Message):
|
| 59 |
+
__slots__ = ("resource_info",)
|
| 60 |
+
RESOURCE_INFO_FIELD_NUMBER: _ClassVar[int]
|
| 61 |
+
resource_info: _fileobject_pb2.ResourceInfo
|
| 62 |
+
def __init__(self, resource_info: _Optional[_Union[_fileobject_pb2.ResourceInfo, _Mapping]] = ...) -> None: ...
|
| 63 |
+
|
| 64 |
+
class ReadRequest(_message.Message):
|
| 65 |
+
__slots__ = ("resource_identity", "download_preference")
|
| 66 |
+
RESOURCE_IDENTITY_FIELD_NUMBER: _ClassVar[int]
|
| 67 |
+
DOWNLOAD_PREFERENCE_FIELD_NUMBER: _ClassVar[int]
|
| 68 |
+
resource_identity: _fileobject_pb2.ResourceIdentity
|
| 69 |
+
download_preference: DownloadPreference
|
| 70 |
+
def __init__(self, resource_identity: _Optional[_Union[_fileobject_pb2.ResourceIdentity, _Mapping]] = ..., download_preference: _Optional[_Union[DownloadPreference, str]] = ...) -> None: ...
|
| 71 |
+
|
| 72 |
+
class ReadResponse(_message.Message):
|
| 73 |
+
__slots__ = ("metadata", "chunk", "redirect")
|
| 74 |
+
METADATA_FIELD_NUMBER: _ClassVar[int]
|
| 75 |
+
CHUNK_FIELD_NUMBER: _ClassVar[int]
|
| 76 |
+
REDIRECT_FIELD_NUMBER: _ClassVar[int]
|
| 77 |
+
metadata: _fileobject_pb2.Metadata
|
| 78 |
+
chunk: _fileobject_pb2.Chunk
|
| 79 |
+
redirect: _fileobject_pb2.Redirect
|
| 80 |
+
def __init__(self, metadata: _Optional[_Union[_fileobject_pb2.Metadata, _Mapping]] = ..., chunk: _Optional[_Union[_fileobject_pb2.Chunk, _Mapping]] = ..., redirect: _Optional[_Union[_fileobject_pb2.Redirect, _Mapping]] = ...) -> None: ...
|
| 81 |
+
|
| 82 |
+
class ReadFromAddressRequest(_message.Message):
|
| 83 |
+
__slots__ = ("resource_address", "download_preference")
|
| 84 |
+
RESOURCE_ADDRESS_FIELD_NUMBER: _ClassVar[int]
|
| 85 |
+
DOWNLOAD_PREFERENCE_FIELD_NUMBER: _ClassVar[int]
|
| 86 |
+
resource_address: str
|
| 87 |
+
download_preference: DownloadPreference
|
| 88 |
+
def __init__(self, resource_address: _Optional[str] = ..., download_preference: _Optional[_Union[DownloadPreference, str]] = ...) -> None: ...
|
| 89 |
+
|
| 90 |
+
class ReadFromAddressResponse(_message.Message):
|
| 91 |
+
__slots__ = ("resource_info", "chunk", "redirect")
|
| 92 |
+
RESOURCE_INFO_FIELD_NUMBER: _ClassVar[int]
|
| 93 |
+
CHUNK_FIELD_NUMBER: _ClassVar[int]
|
| 94 |
+
REDIRECT_FIELD_NUMBER: _ClassVar[int]
|
| 95 |
+
resource_info: _fileobject_pb2.ResourceInfo
|
| 96 |
+
chunk: _fileobject_pb2.Chunk
|
| 97 |
+
redirect: _fileobject_pb2.Redirect
|
| 98 |
+
def __init__(self, resource_info: _Optional[_Union[_fileobject_pb2.ResourceInfo, _Mapping]] = ..., chunk: _Optional[_Union[_fileobject_pb2.Chunk, _Mapping]] = ..., redirect: _Optional[_Union[_fileobject_pb2.Redirect, _Mapping]] = ...) -> None: ...
|
| 99 |
+
|
| 100 |
+
class FetchWriteTypeInfoRequest(_message.Message):
|
| 101 |
+
__slots__ = ("destination_resource_address",)
|
| 102 |
+
DESTINATION_RESOURCE_ADDRESS_FIELD_NUMBER: _ClassVar[int]
|
| 103 |
+
destination_resource_address: str
|
| 104 |
+
def __init__(self, destination_resource_address: _Optional[str] = ...) -> None: ...
|
| 105 |
+
|
| 106 |
+
class WriteTypeForSizeInterval(_message.Message):
|
| 107 |
+
__slots__ = ("minimum_data_object_size", "maximum_data_object_size", "preferred_upload_method")
|
| 108 |
+
MINIMUM_DATA_OBJECT_SIZE_FIELD_NUMBER: _ClassVar[int]
|
| 109 |
+
MAXIMUM_DATA_OBJECT_SIZE_FIELD_NUMBER: _ClassVar[int]
|
| 110 |
+
PREFERRED_UPLOAD_METHOD_FIELD_NUMBER: _ClassVar[int]
|
| 111 |
+
minimum_data_object_size: int
|
| 112 |
+
maximum_data_object_size: int
|
| 113 |
+
preferred_upload_method: UploadPreference
|
| 114 |
+
def __init__(self, minimum_data_object_size: _Optional[int] = ..., maximum_data_object_size: _Optional[int] = ..., preferred_upload_method: _Optional[_Union[UploadPreference, str]] = ...) -> None: ...
|
| 115 |
+
|
| 116 |
+
class FetchWriteTypeInfoResponse(_message.Message):
|
| 117 |
+
__slots__ = ("write_type_intervals",)
|
| 118 |
+
WRITE_TYPE_INTERVALS_FIELD_NUMBER: _ClassVar[int]
|
| 119 |
+
write_type_intervals: _containers.RepeatedCompositeFieldContainer[WriteTypeForSizeInterval]
|
| 120 |
+
def __init__(self, write_type_intervals: _Optional[_Iterable[_Union[WriteTypeForSizeInterval, _Mapping]]] = ...) -> None: ...
|
| 121 |
+
|
| 122 |
+
class WriteRequest(_message.Message):
|
| 123 |
+
__slots__ = ("params", "chunk")
|
| 124 |
+
PARAMS_FIELD_NUMBER: _ClassVar[int]
|
| 125 |
+
CHUNK_FIELD_NUMBER: _ClassVar[int]
|
| 126 |
+
params: WriteParameters
|
| 127 |
+
chunk: _fileobject_pb2.Chunk
|
| 128 |
+
def __init__(self, params: _Optional[_Union[WriteParameters, _Mapping]] = ..., chunk: _Optional[_Union[_fileobject_pb2.Chunk, _Mapping]] = ...) -> None: ...
|
| 129 |
+
|
| 130 |
+
class WriteParameters(_message.Message):
|
| 131 |
+
__slots__ = ("destination_resource_address", "previous_version", "data_object_size", "upload_preference")
|
| 132 |
+
DESTINATION_RESOURCE_ADDRESS_FIELD_NUMBER: _ClassVar[int]
|
| 133 |
+
PREVIOUS_VERSION_FIELD_NUMBER: _ClassVar[int]
|
| 134 |
+
DATA_OBJECT_SIZE_FIELD_NUMBER: _ClassVar[int]
|
| 135 |
+
UPLOAD_PREFERENCE_FIELD_NUMBER: _ClassVar[int]
|
| 136 |
+
destination_resource_address: str
|
| 137 |
+
previous_version: _fileobject_pb2.ResourceIdentity
|
| 138 |
+
data_object_size: int
|
| 139 |
+
upload_preference: UploadPreference
|
| 140 |
+
def __init__(self, destination_resource_address: _Optional[str] = ..., previous_version: _Optional[_Union[_fileobject_pb2.ResourceIdentity, _Mapping]] = ..., data_object_size: _Optional[int] = ..., upload_preference: _Optional[_Union[UploadPreference, str]] = ...) -> None: ...
|
| 141 |
+
|
| 142 |
+
class WriteRedirectProperties(_message.Message):
|
| 143 |
+
__slots__ = ("redirect_target_url", "method", "additional_headers", "completion_header_names")
|
| 144 |
+
REDIRECT_TARGET_URL_FIELD_NUMBER: _ClassVar[int]
|
| 145 |
+
METHOD_FIELD_NUMBER: _ClassVar[int]
|
| 146 |
+
ADDITIONAL_HEADERS_FIELD_NUMBER: _ClassVar[int]
|
| 147 |
+
COMPLETION_HEADER_NAMES_FIELD_NUMBER: _ClassVar[int]
|
| 148 |
+
redirect_target_url: str
|
| 149 |
+
method: UploadMethod
|
| 150 |
+
additional_headers: _containers.RepeatedCompositeFieldContainer[_fileobject_pb2.Header]
|
| 151 |
+
completion_header_names: _containers.RepeatedScalarFieldContainer[str]
|
| 152 |
+
def __init__(self, redirect_target_url: _Optional[str] = ..., method: _Optional[_Union[UploadMethod, str]] = ..., additional_headers: _Optional[_Iterable[_Union[_fileobject_pb2.Header, _Mapping]]] = ..., completion_header_names: _Optional[_Iterable[str]] = ...) -> None: ...
|
| 153 |
+
|
| 154 |
+
class WriteChunksAccepted(_message.Message):
|
| 155 |
+
__slots__ = ()
|
| 156 |
+
def __init__(self) -> None: ...
|
| 157 |
+
|
| 158 |
+
class WriteResponse(_message.Message):
|
| 159 |
+
__slots__ = ("write_chunks_accepted", "resource_info", "write_redirect", "multipart_upload")
|
| 160 |
+
WRITE_CHUNKS_ACCEPTED_FIELD_NUMBER: _ClassVar[int]
|
| 161 |
+
RESOURCE_INFO_FIELD_NUMBER: _ClassVar[int]
|
| 162 |
+
WRITE_REDIRECT_FIELD_NUMBER: _ClassVar[int]
|
| 163 |
+
MULTIPART_UPLOAD_FIELD_NUMBER: _ClassVar[int]
|
| 164 |
+
write_chunks_accepted: WriteChunksAccepted
|
| 165 |
+
resource_info: _fileobject_pb2.ResourceInfo
|
| 166 |
+
write_redirect: WriteRedirectProperties
|
| 167 |
+
multipart_upload: CreateMultipartUploadResponse
|
| 168 |
+
def __init__(self, write_chunks_accepted: _Optional[_Union[WriteChunksAccepted, _Mapping]] = ..., resource_info: _Optional[_Union[_fileobject_pb2.ResourceInfo, _Mapping]] = ..., write_redirect: _Optional[_Union[WriteRedirectProperties, _Mapping]] = ..., multipart_upload: _Optional[_Union[CreateMultipartUploadResponse, _Mapping]] = ...) -> None: ...
|
| 169 |
+
|
| 170 |
+
class CompleteRedirectUploadRequest(_message.Message):
|
| 171 |
+
__slots__ = ("destination_resource_address", "additional_headers")
|
| 172 |
+
DESTINATION_RESOURCE_ADDRESS_FIELD_NUMBER: _ClassVar[int]
|
| 173 |
+
ADDITIONAL_HEADERS_FIELD_NUMBER: _ClassVar[int]
|
| 174 |
+
destination_resource_address: str
|
| 175 |
+
additional_headers: _containers.RepeatedCompositeFieldContainer[_fileobject_pb2.Header]
|
| 176 |
+
def __init__(self, destination_resource_address: _Optional[str] = ..., additional_headers: _Optional[_Iterable[_Union[_fileobject_pb2.Header, _Mapping]]] = ...) -> None: ...
|
| 177 |
+
|
| 178 |
+
class CompleteRedirectUploadResponse(_message.Message):
|
| 179 |
+
__slots__ = ("resource_info",)
|
| 180 |
+
RESOURCE_INFO_FIELD_NUMBER: _ClassVar[int]
|
| 181 |
+
resource_info: _fileobject_pb2.ResourceInfo
|
| 182 |
+
def __init__(self, resource_info: _Optional[_Union[_fileobject_pb2.ResourceInfo, _Mapping]] = ...) -> None: ...
|
| 183 |
+
|
| 184 |
+
class CreateMultipartUploadResponse(_message.Message):
|
| 185 |
+
__slots__ = ("upload_id", "first_part_write_redirect", "maximum_parts_number", "minimum_size_per_part", "maximum_size_per_part")
|
| 186 |
+
UPLOAD_ID_FIELD_NUMBER: _ClassVar[int]
|
| 187 |
+
FIRST_PART_WRITE_REDIRECT_FIELD_NUMBER: _ClassVar[int]
|
| 188 |
+
MAXIMUM_PARTS_NUMBER_FIELD_NUMBER: _ClassVar[int]
|
| 189 |
+
MINIMUM_SIZE_PER_PART_FIELD_NUMBER: _ClassVar[int]
|
| 190 |
+
MAXIMUM_SIZE_PER_PART_FIELD_NUMBER: _ClassVar[int]
|
| 191 |
+
upload_id: str
|
| 192 |
+
first_part_write_redirect: WriteRedirectProperties
|
| 193 |
+
maximum_parts_number: int
|
| 194 |
+
minimum_size_per_part: int
|
| 195 |
+
maximum_size_per_part: int
|
| 196 |
+
def __init__(self, upload_id: _Optional[str] = ..., first_part_write_redirect: _Optional[_Union[WriteRedirectProperties, _Mapping]] = ..., maximum_parts_number: _Optional[int] = ..., minimum_size_per_part: _Optional[int] = ..., maximum_size_per_part: _Optional[int] = ...) -> None: ...
|
| 197 |
+
|
| 198 |
+
class UploadPartRequest(_message.Message):
|
| 199 |
+
__slots__ = ("upload_id", "destination_resource_address", "part_number", "part_count")
|
| 200 |
+
UPLOAD_ID_FIELD_NUMBER: _ClassVar[int]
|
| 201 |
+
DESTINATION_RESOURCE_ADDRESS_FIELD_NUMBER: _ClassVar[int]
|
| 202 |
+
PART_NUMBER_FIELD_NUMBER: _ClassVar[int]
|
| 203 |
+
PART_COUNT_FIELD_NUMBER: _ClassVar[int]
|
| 204 |
+
upload_id: str
|
| 205 |
+
destination_resource_address: str
|
| 206 |
+
part_number: int
|
| 207 |
+
part_count: int
|
| 208 |
+
def __init__(self, upload_id: _Optional[str] = ..., destination_resource_address: _Optional[str] = ..., part_number: _Optional[int] = ..., part_count: _Optional[int] = ...) -> None: ...
|
| 209 |
+
|
| 210 |
+
class UploadPartResponse(_message.Message):
|
| 211 |
+
__slots__ = ("part_write_redirects",)
|
| 212 |
+
PART_WRITE_REDIRECTS_FIELD_NUMBER: _ClassVar[int]
|
| 213 |
+
part_write_redirects: _containers.RepeatedCompositeFieldContainer[WriteRedirectProperties]
|
| 214 |
+
def __init__(self, part_write_redirects: _Optional[_Iterable[_Union[WriteRedirectProperties, _Mapping]]] = ...) -> None: ...
|
| 215 |
+
|
| 216 |
+
class CompletedUploadPart(_message.Message):
|
| 217 |
+
__slots__ = ("part_number", "headers")
|
| 218 |
+
PART_NUMBER_FIELD_NUMBER: _ClassVar[int]
|
| 219 |
+
HEADERS_FIELD_NUMBER: _ClassVar[int]
|
| 220 |
+
part_number: int
|
| 221 |
+
headers: _containers.RepeatedCompositeFieldContainer[_fileobject_pb2.Header]
|
| 222 |
+
def __init__(self, part_number: _Optional[int] = ..., headers: _Optional[_Iterable[_Union[_fileobject_pb2.Header, _Mapping]]] = ...) -> None: ...
|
| 223 |
+
|
| 224 |
+
class CompleteMultipartUploadRequest(_message.Message):
|
| 225 |
+
__slots__ = ("upload_id", "destination_resource_address", "parts")
|
| 226 |
+
UPLOAD_ID_FIELD_NUMBER: _ClassVar[int]
|
| 227 |
+
DESTINATION_RESOURCE_ADDRESS_FIELD_NUMBER: _ClassVar[int]
|
| 228 |
+
PARTS_FIELD_NUMBER: _ClassVar[int]
|
| 229 |
+
upload_id: str
|
| 230 |
+
destination_resource_address: str
|
| 231 |
+
parts: _containers.RepeatedCompositeFieldContainer[CompletedUploadPart]
|
| 232 |
+
def __init__(self, upload_id: _Optional[str] = ..., destination_resource_address: _Optional[str] = ..., parts: _Optional[_Iterable[_Union[CompletedUploadPart, _Mapping]]] = ...) -> None: ...
|
| 233 |
+
|
| 234 |
+
class CompleteMultipartUploadResponse(_message.Message):
|
| 235 |
+
__slots__ = ("resource_info",)
|
| 236 |
+
RESOURCE_INFO_FIELD_NUMBER: _ClassVar[int]
|
| 237 |
+
resource_info: _fileobject_pb2.ResourceInfo
|
| 238 |
+
def __init__(self, resource_info: _Optional[_Union[_fileobject_pb2.ResourceInfo, _Mapping]] = ...) -> None: ...
|
| 239 |
+
|
| 240 |
+
class AbortMultipartUploadRequest(_message.Message):
|
| 241 |
+
__slots__ = ("upload_id", "destination_resource_address")
|
| 242 |
+
UPLOAD_ID_FIELD_NUMBER: _ClassVar[int]
|
| 243 |
+
DESTINATION_RESOURCE_ADDRESS_FIELD_NUMBER: _ClassVar[int]
|
| 244 |
+
upload_id: str
|
| 245 |
+
destination_resource_address: str
|
| 246 |
+
def __init__(self, upload_id: _Optional[str] = ..., destination_resource_address: _Optional[str] = ...) -> None: ...
|
| 247 |
+
|
| 248 |
+
class AbortMultipartUploadResponse(_message.Message):
|
| 249 |
+
__slots__ = ()
|
| 250 |
+
def __init__(self) -> None: ...
|
| 251 |
+
|
| 252 |
+
class DeleteRequest(_message.Message):
|
| 253 |
+
__slots__ = ("resource_address", "previous_version")
|
| 254 |
+
RESOURCE_ADDRESS_FIELD_NUMBER: _ClassVar[int]
|
| 255 |
+
PREVIOUS_VERSION_FIELD_NUMBER: _ClassVar[int]
|
| 256 |
+
resource_address: str
|
| 257 |
+
previous_version: _fileobject_pb2.ResourceIdentity
|
| 258 |
+
def __init__(self, resource_address: _Optional[str] = ..., previous_version: _Optional[_Union[_fileobject_pb2.ResourceIdentity, _Mapping]] = ...) -> None: ...
|
| 259 |
+
|
| 260 |
+
class DeleteResponse(_message.Message):
|
| 261 |
+
__slots__ = ()
|
| 262 |
+
def __init__(self) -> None: ...
|
| 263 |
+
|
| 264 |
+
class CopyRequest(_message.Message):
|
| 265 |
+
__slots__ = ("source_resource_identity", "destination_resource_address", "previous_version")
|
| 266 |
+
SOURCE_RESOURCE_IDENTITY_FIELD_NUMBER: _ClassVar[int]
|
| 267 |
+
DESTINATION_RESOURCE_ADDRESS_FIELD_NUMBER: _ClassVar[int]
|
| 268 |
+
PREVIOUS_VERSION_FIELD_NUMBER: _ClassVar[int]
|
| 269 |
+
source_resource_identity: _fileobject_pb2.ResourceIdentity
|
| 270 |
+
destination_resource_address: str
|
| 271 |
+
previous_version: _fileobject_pb2.ResourceIdentity
|
| 272 |
+
def __init__(self, source_resource_identity: _Optional[_Union[_fileobject_pb2.ResourceIdentity, _Mapping]] = ..., destination_resource_address: _Optional[str] = ..., previous_version: _Optional[_Union[_fileobject_pb2.ResourceIdentity, _Mapping]] = ...) -> None: ...
|
| 273 |
+
|
| 274 |
+
class CopyResponse(_message.Message):
|
| 275 |
+
__slots__ = ("resource_identity",)
|
| 276 |
+
RESOURCE_IDENTITY_FIELD_NUMBER: _ClassVar[int]
|
| 277 |
+
resource_identity: _fileobject_pb2.ResourceIdentity
|
| 278 |
+
def __init__(self, resource_identity: _Optional[_Union[_fileobject_pb2.ResourceIdentity, _Mapping]] = ...) -> None: ...
|
| 279 |
+
|
| 280 |
+
class MoveRequest(_message.Message):
|
| 281 |
+
__slots__ = ("source_resource_address", "source_previous_version", "destination_resource_address", "destination_previous_version")
|
| 282 |
+
SOURCE_RESOURCE_ADDRESS_FIELD_NUMBER: _ClassVar[int]
|
| 283 |
+
SOURCE_PREVIOUS_VERSION_FIELD_NUMBER: _ClassVar[int]
|
| 284 |
+
DESTINATION_RESOURCE_ADDRESS_FIELD_NUMBER: _ClassVar[int]
|
| 285 |
+
DESTINATION_PREVIOUS_VERSION_FIELD_NUMBER: _ClassVar[int]
|
| 286 |
+
source_resource_address: str
|
| 287 |
+
source_previous_version: _fileobject_pb2.ResourceIdentity
|
| 288 |
+
destination_resource_address: str
|
| 289 |
+
destination_previous_version: _fileobject_pb2.ResourceIdentity
|
| 290 |
+
def __init__(self, source_resource_address: _Optional[str] = ..., source_previous_version: _Optional[_Union[_fileobject_pb2.ResourceIdentity, _Mapping]] = ..., destination_resource_address: _Optional[str] = ..., destination_previous_version: _Optional[_Union[_fileobject_pb2.ResourceIdentity, _Mapping]] = ...) -> None: ...
|
| 291 |
+
|
| 292 |
+
class MoveResponse(_message.Message):
|
| 293 |
+
__slots__ = ("resource_identity",)
|
| 294 |
+
RESOURCE_IDENTITY_FIELD_NUMBER: _ClassVar[int]
|
| 295 |
+
resource_identity: _fileobject_pb2.ResourceIdentity
|
| 296 |
+
def __init__(self, resource_identity: _Optional[_Union[_fileobject_pb2.ResourceIdentity, _Mapping]] = ...) -> None: ...
|
| 297 |
+
|
| 298 |
+
class GetOptimisticLockingSupportRequest(_message.Message):
|
| 299 |
+
__slots__ = ("resource_address",)
|
| 300 |
+
RESOURCE_ADDRESS_FIELD_NUMBER: _ClassVar[int]
|
| 301 |
+
resource_address: str
|
| 302 |
+
def __init__(self, resource_address: _Optional[str] = ...) -> None: ...
|
| 303 |
+
|
| 304 |
+
class GetOptimisticLockingSupportResponse(_message.Message):
|
| 305 |
+
__slots__ = ("supports_write", "supports_delete", "supports_copy", "supports_move")
|
| 306 |
+
SUPPORTS_WRITE_FIELD_NUMBER: _ClassVar[int]
|
| 307 |
+
SUPPORTS_DELETE_FIELD_NUMBER: _ClassVar[int]
|
| 308 |
+
SUPPORTS_COPY_FIELD_NUMBER: _ClassVar[int]
|
| 309 |
+
SUPPORTS_MOVE_FIELD_NUMBER: _ClassVar[int]
|
| 310 |
+
supports_write: bool
|
| 311 |
+
supports_delete: bool
|
| 312 |
+
supports_copy: bool
|
| 313 |
+
supports_move: bool
|
| 314 |
+
def __init__(self, supports_write: bool = ..., supports_delete: bool = ..., supports_copy: bool = ..., supports_move: bool = ...) -> None: ...
|
docker/hf-space/hf-storage-api/generated/nvidia/omniverse/storage/fileobject/v1alpha/fileobject_service_pb2_grpc.py
ADDED
|
@@ -0,0 +1,656 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
|
| 2 |
+
"""Client and server classes corresponding to protobuf-defined services."""
|
| 3 |
+
import grpc
|
| 4 |
+
import warnings
|
| 5 |
+
|
| 6 |
+
from nvidia.omniverse.storage.fileobject.v1alpha import fileobject_service_pb2 as nvidia_dot_omniverse_dot_storage_dot_fileobject_dot_v1alpha_dot_fileobject__service__pb2
|
| 7 |
+
|
| 8 |
+
GRPC_GENERATED_VERSION = '1.80.0'
|
| 9 |
+
GRPC_VERSION = grpc.__version__
|
| 10 |
+
_version_not_supported = False
|
| 11 |
+
|
| 12 |
+
try:
|
| 13 |
+
from grpc._utilities import first_version_is_lower
|
| 14 |
+
_version_not_supported = first_version_is_lower(GRPC_VERSION, GRPC_GENERATED_VERSION)
|
| 15 |
+
except ImportError:
|
| 16 |
+
_version_not_supported = True
|
| 17 |
+
|
| 18 |
+
if _version_not_supported:
|
| 19 |
+
raise RuntimeError(
|
| 20 |
+
f'The grpc package installed is at version {GRPC_VERSION},'
|
| 21 |
+
+ ' but the generated code in nvidia/omniverse/storage/fileobject/v1alpha/fileobject_service_pb2_grpc.py depends on'
|
| 22 |
+
+ f' grpcio>={GRPC_GENERATED_VERSION}.'
|
| 23 |
+
+ f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}'
|
| 24 |
+
+ f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.'
|
| 25 |
+
)
|
| 26 |
+
|
| 27 |
+
|
| 28 |
+
class FileObjectServiceStub(object):
|
| 29 |
+
"""Missing associated documentation comment in .proto file."""
|
| 30 |
+
|
| 31 |
+
def __init__(self, channel):
|
| 32 |
+
"""Constructor.
|
| 33 |
+
|
| 34 |
+
Args:
|
| 35 |
+
channel: A grpc.Channel.
|
| 36 |
+
"""
|
| 37 |
+
self.Enumerate = channel.unary_stream(
|
| 38 |
+
'/nvidia.omniverse.storage.fileobject.v1alpha.FileObjectService/Enumerate',
|
| 39 |
+
request_serializer=nvidia_dot_omniverse_dot_storage_dot_fileobject_dot_v1alpha_dot_fileobject__service__pb2.EnumerateRequest.SerializeToString,
|
| 40 |
+
response_deserializer=nvidia_dot_omniverse_dot_storage_dot_fileobject_dot_v1alpha_dot_fileobject__service__pb2.EnumerateResponse.FromString,
|
| 41 |
+
_registered_method=True)
|
| 42 |
+
self.Stat = channel.unary_unary(
|
| 43 |
+
'/nvidia.omniverse.storage.fileobject.v1alpha.FileObjectService/Stat',
|
| 44 |
+
request_serializer=nvidia_dot_omniverse_dot_storage_dot_fileobject_dot_v1alpha_dot_fileobject__service__pb2.StatRequest.SerializeToString,
|
| 45 |
+
response_deserializer=nvidia_dot_omniverse_dot_storage_dot_fileobject_dot_v1alpha_dot_fileobject__service__pb2.StatResponse.FromString,
|
| 46 |
+
_registered_method=True)
|
| 47 |
+
self.Read = channel.unary_stream(
|
| 48 |
+
'/nvidia.omniverse.storage.fileobject.v1alpha.FileObjectService/Read',
|
| 49 |
+
request_serializer=nvidia_dot_omniverse_dot_storage_dot_fileobject_dot_v1alpha_dot_fileobject__service__pb2.ReadRequest.SerializeToString,
|
| 50 |
+
response_deserializer=nvidia_dot_omniverse_dot_storage_dot_fileobject_dot_v1alpha_dot_fileobject__service__pb2.ReadResponse.FromString,
|
| 51 |
+
_registered_method=True)
|
| 52 |
+
self.ReadFromAddress = channel.unary_stream(
|
| 53 |
+
'/nvidia.omniverse.storage.fileobject.v1alpha.FileObjectService/ReadFromAddress',
|
| 54 |
+
request_serializer=nvidia_dot_omniverse_dot_storage_dot_fileobject_dot_v1alpha_dot_fileobject__service__pb2.ReadFromAddressRequest.SerializeToString,
|
| 55 |
+
response_deserializer=nvidia_dot_omniverse_dot_storage_dot_fileobject_dot_v1alpha_dot_fileobject__service__pb2.ReadFromAddressResponse.FromString,
|
| 56 |
+
_registered_method=True)
|
| 57 |
+
self.FetchWriteTypeInfo = channel.unary_unary(
|
| 58 |
+
'/nvidia.omniverse.storage.fileobject.v1alpha.FileObjectService/FetchWriteTypeInfo',
|
| 59 |
+
request_serializer=nvidia_dot_omniverse_dot_storage_dot_fileobject_dot_v1alpha_dot_fileobject__service__pb2.FetchWriteTypeInfoRequest.SerializeToString,
|
| 60 |
+
response_deserializer=nvidia_dot_omniverse_dot_storage_dot_fileobject_dot_v1alpha_dot_fileobject__service__pb2.FetchWriteTypeInfoResponse.FromString,
|
| 61 |
+
_registered_method=True)
|
| 62 |
+
self.Write = channel.stream_stream(
|
| 63 |
+
'/nvidia.omniverse.storage.fileobject.v1alpha.FileObjectService/Write',
|
| 64 |
+
request_serializer=nvidia_dot_omniverse_dot_storage_dot_fileobject_dot_v1alpha_dot_fileobject__service__pb2.WriteRequest.SerializeToString,
|
| 65 |
+
response_deserializer=nvidia_dot_omniverse_dot_storage_dot_fileobject_dot_v1alpha_dot_fileobject__service__pb2.WriteResponse.FromString,
|
| 66 |
+
_registered_method=True)
|
| 67 |
+
self.CompleteRedirectUpload = channel.unary_unary(
|
| 68 |
+
'/nvidia.omniverse.storage.fileobject.v1alpha.FileObjectService/CompleteRedirectUpload',
|
| 69 |
+
request_serializer=nvidia_dot_omniverse_dot_storage_dot_fileobject_dot_v1alpha_dot_fileobject__service__pb2.CompleteRedirectUploadRequest.SerializeToString,
|
| 70 |
+
response_deserializer=nvidia_dot_omniverse_dot_storage_dot_fileobject_dot_v1alpha_dot_fileobject__service__pb2.CompleteRedirectUploadResponse.FromString,
|
| 71 |
+
_registered_method=True)
|
| 72 |
+
self.UploadPart = channel.unary_unary(
|
| 73 |
+
'/nvidia.omniverse.storage.fileobject.v1alpha.FileObjectService/UploadPart',
|
| 74 |
+
request_serializer=nvidia_dot_omniverse_dot_storage_dot_fileobject_dot_v1alpha_dot_fileobject__service__pb2.UploadPartRequest.SerializeToString,
|
| 75 |
+
response_deserializer=nvidia_dot_omniverse_dot_storage_dot_fileobject_dot_v1alpha_dot_fileobject__service__pb2.UploadPartResponse.FromString,
|
| 76 |
+
_registered_method=True)
|
| 77 |
+
self.CompleteMultipartUpload = channel.unary_unary(
|
| 78 |
+
'/nvidia.omniverse.storage.fileobject.v1alpha.FileObjectService/CompleteMultipartUpload',
|
| 79 |
+
request_serializer=nvidia_dot_omniverse_dot_storage_dot_fileobject_dot_v1alpha_dot_fileobject__service__pb2.CompleteMultipartUploadRequest.SerializeToString,
|
| 80 |
+
response_deserializer=nvidia_dot_omniverse_dot_storage_dot_fileobject_dot_v1alpha_dot_fileobject__service__pb2.CompleteMultipartUploadResponse.FromString,
|
| 81 |
+
_registered_method=True)
|
| 82 |
+
self.AbortMultipartUpload = channel.unary_unary(
|
| 83 |
+
'/nvidia.omniverse.storage.fileobject.v1alpha.FileObjectService/AbortMultipartUpload',
|
| 84 |
+
request_serializer=nvidia_dot_omniverse_dot_storage_dot_fileobject_dot_v1alpha_dot_fileobject__service__pb2.AbortMultipartUploadRequest.SerializeToString,
|
| 85 |
+
response_deserializer=nvidia_dot_omniverse_dot_storage_dot_fileobject_dot_v1alpha_dot_fileobject__service__pb2.AbortMultipartUploadResponse.FromString,
|
| 86 |
+
_registered_method=True)
|
| 87 |
+
self.Delete = channel.unary_unary(
|
| 88 |
+
'/nvidia.omniverse.storage.fileobject.v1alpha.FileObjectService/Delete',
|
| 89 |
+
request_serializer=nvidia_dot_omniverse_dot_storage_dot_fileobject_dot_v1alpha_dot_fileobject__service__pb2.DeleteRequest.SerializeToString,
|
| 90 |
+
response_deserializer=nvidia_dot_omniverse_dot_storage_dot_fileobject_dot_v1alpha_dot_fileobject__service__pb2.DeleteResponse.FromString,
|
| 91 |
+
_registered_method=True)
|
| 92 |
+
self.Copy = channel.unary_unary(
|
| 93 |
+
'/nvidia.omniverse.storage.fileobject.v1alpha.FileObjectService/Copy',
|
| 94 |
+
request_serializer=nvidia_dot_omniverse_dot_storage_dot_fileobject_dot_v1alpha_dot_fileobject__service__pb2.CopyRequest.SerializeToString,
|
| 95 |
+
response_deserializer=nvidia_dot_omniverse_dot_storage_dot_fileobject_dot_v1alpha_dot_fileobject__service__pb2.CopyResponse.FromString,
|
| 96 |
+
_registered_method=True)
|
| 97 |
+
self.Move = channel.unary_unary(
|
| 98 |
+
'/nvidia.omniverse.storage.fileobject.v1alpha.FileObjectService/Move',
|
| 99 |
+
request_serializer=nvidia_dot_omniverse_dot_storage_dot_fileobject_dot_v1alpha_dot_fileobject__service__pb2.MoveRequest.SerializeToString,
|
| 100 |
+
response_deserializer=nvidia_dot_omniverse_dot_storage_dot_fileobject_dot_v1alpha_dot_fileobject__service__pb2.MoveResponse.FromString,
|
| 101 |
+
_registered_method=True)
|
| 102 |
+
self.GetOptimisticLockingSupport = channel.unary_unary(
|
| 103 |
+
'/nvidia.omniverse.storage.fileobject.v1alpha.FileObjectService/GetOptimisticLockingSupport',
|
| 104 |
+
request_serializer=nvidia_dot_omniverse_dot_storage_dot_fileobject_dot_v1alpha_dot_fileobject__service__pb2.GetOptimisticLockingSupportRequest.SerializeToString,
|
| 105 |
+
response_deserializer=nvidia_dot_omniverse_dot_storage_dot_fileobject_dot_v1alpha_dot_fileobject__service__pb2.GetOptimisticLockingSupportResponse.FromString,
|
| 106 |
+
_registered_method=True)
|
| 107 |
+
|
| 108 |
+
|
| 109 |
+
class FileObjectServiceServicer(object):
|
| 110 |
+
"""Missing associated documentation comment in .proto file."""
|
| 111 |
+
|
| 112 |
+
def Enumerate(self, request, context):
|
| 113 |
+
"""Missing associated documentation comment in .proto file."""
|
| 114 |
+
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
| 115 |
+
context.set_details('Method not implemented!')
|
| 116 |
+
raise NotImplementedError('Method not implemented!')
|
| 117 |
+
|
| 118 |
+
def Stat(self, request, context):
|
| 119 |
+
"""Missing associated documentation comment in .proto file."""
|
| 120 |
+
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
| 121 |
+
context.set_details('Method not implemented!')
|
| 122 |
+
raise NotImplementedError('Method not implemented!')
|
| 123 |
+
|
| 124 |
+
def Read(self, request, context):
|
| 125 |
+
"""Missing associated documentation comment in .proto file."""
|
| 126 |
+
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
| 127 |
+
context.set_details('Method not implemented!')
|
| 128 |
+
raise NotImplementedError('Method not implemented!')
|
| 129 |
+
|
| 130 |
+
def ReadFromAddress(self, request, context):
|
| 131 |
+
"""Missing associated documentation comment in .proto file."""
|
| 132 |
+
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
| 133 |
+
context.set_details('Method not implemented!')
|
| 134 |
+
raise NotImplementedError('Method not implemented!')
|
| 135 |
+
|
| 136 |
+
def FetchWriteTypeInfo(self, request, context):
|
| 137 |
+
"""Missing associated documentation comment in .proto file."""
|
| 138 |
+
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
| 139 |
+
context.set_details('Method not implemented!')
|
| 140 |
+
raise NotImplementedError('Method not implemented!')
|
| 141 |
+
|
| 142 |
+
def Write(self, request_iterator, context):
|
| 143 |
+
"""Missing associated documentation comment in .proto file."""
|
| 144 |
+
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
| 145 |
+
context.set_details('Method not implemented!')
|
| 146 |
+
raise NotImplementedError('Method not implemented!')
|
| 147 |
+
|
| 148 |
+
def CompleteRedirectUpload(self, request, context):
|
| 149 |
+
"""Missing associated documentation comment in .proto file."""
|
| 150 |
+
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
| 151 |
+
context.set_details('Method not implemented!')
|
| 152 |
+
raise NotImplementedError('Method not implemented!')
|
| 153 |
+
|
| 154 |
+
def UploadPart(self, request, context):
|
| 155 |
+
"""Missing associated documentation comment in .proto file."""
|
| 156 |
+
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
| 157 |
+
context.set_details('Method not implemented!')
|
| 158 |
+
raise NotImplementedError('Method not implemented!')
|
| 159 |
+
|
| 160 |
+
def CompleteMultipartUpload(self, request, context):
|
| 161 |
+
"""Missing associated documentation comment in .proto file."""
|
| 162 |
+
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
| 163 |
+
context.set_details('Method not implemented!')
|
| 164 |
+
raise NotImplementedError('Method not implemented!')
|
| 165 |
+
|
| 166 |
+
def AbortMultipartUpload(self, request, context):
|
| 167 |
+
"""Missing associated documentation comment in .proto file."""
|
| 168 |
+
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
| 169 |
+
context.set_details('Method not implemented!')
|
| 170 |
+
raise NotImplementedError('Method not implemented!')
|
| 171 |
+
|
| 172 |
+
def Delete(self, request, context):
|
| 173 |
+
"""Missing associated documentation comment in .proto file."""
|
| 174 |
+
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
| 175 |
+
context.set_details('Method not implemented!')
|
| 176 |
+
raise NotImplementedError('Method not implemented!')
|
| 177 |
+
|
| 178 |
+
def Copy(self, request, context):
|
| 179 |
+
"""Missing associated documentation comment in .proto file."""
|
| 180 |
+
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
| 181 |
+
context.set_details('Method not implemented!')
|
| 182 |
+
raise NotImplementedError('Method not implemented!')
|
| 183 |
+
|
| 184 |
+
def Move(self, request, context):
|
| 185 |
+
"""Missing associated documentation comment in .proto file."""
|
| 186 |
+
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
| 187 |
+
context.set_details('Method not implemented!')
|
| 188 |
+
raise NotImplementedError('Method not implemented!')
|
| 189 |
+
|
| 190 |
+
def GetOptimisticLockingSupport(self, request, context):
|
| 191 |
+
"""Missing associated documentation comment in .proto file."""
|
| 192 |
+
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
| 193 |
+
context.set_details('Method not implemented!')
|
| 194 |
+
raise NotImplementedError('Method not implemented!')
|
| 195 |
+
|
| 196 |
+
|
| 197 |
+
def add_FileObjectServiceServicer_to_server(servicer, server):
|
| 198 |
+
rpc_method_handlers = {
|
| 199 |
+
'Enumerate': grpc.unary_stream_rpc_method_handler(
|
| 200 |
+
servicer.Enumerate,
|
| 201 |
+
request_deserializer=nvidia_dot_omniverse_dot_storage_dot_fileobject_dot_v1alpha_dot_fileobject__service__pb2.EnumerateRequest.FromString,
|
| 202 |
+
response_serializer=nvidia_dot_omniverse_dot_storage_dot_fileobject_dot_v1alpha_dot_fileobject__service__pb2.EnumerateResponse.SerializeToString,
|
| 203 |
+
),
|
| 204 |
+
'Stat': grpc.unary_unary_rpc_method_handler(
|
| 205 |
+
servicer.Stat,
|
| 206 |
+
request_deserializer=nvidia_dot_omniverse_dot_storage_dot_fileobject_dot_v1alpha_dot_fileobject__service__pb2.StatRequest.FromString,
|
| 207 |
+
response_serializer=nvidia_dot_omniverse_dot_storage_dot_fileobject_dot_v1alpha_dot_fileobject__service__pb2.StatResponse.SerializeToString,
|
| 208 |
+
),
|
| 209 |
+
'Read': grpc.unary_stream_rpc_method_handler(
|
| 210 |
+
servicer.Read,
|
| 211 |
+
request_deserializer=nvidia_dot_omniverse_dot_storage_dot_fileobject_dot_v1alpha_dot_fileobject__service__pb2.ReadRequest.FromString,
|
| 212 |
+
response_serializer=nvidia_dot_omniverse_dot_storage_dot_fileobject_dot_v1alpha_dot_fileobject__service__pb2.ReadResponse.SerializeToString,
|
| 213 |
+
),
|
| 214 |
+
'ReadFromAddress': grpc.unary_stream_rpc_method_handler(
|
| 215 |
+
servicer.ReadFromAddress,
|
| 216 |
+
request_deserializer=nvidia_dot_omniverse_dot_storage_dot_fileobject_dot_v1alpha_dot_fileobject__service__pb2.ReadFromAddressRequest.FromString,
|
| 217 |
+
response_serializer=nvidia_dot_omniverse_dot_storage_dot_fileobject_dot_v1alpha_dot_fileobject__service__pb2.ReadFromAddressResponse.SerializeToString,
|
| 218 |
+
),
|
| 219 |
+
'FetchWriteTypeInfo': grpc.unary_unary_rpc_method_handler(
|
| 220 |
+
servicer.FetchWriteTypeInfo,
|
| 221 |
+
request_deserializer=nvidia_dot_omniverse_dot_storage_dot_fileobject_dot_v1alpha_dot_fileobject__service__pb2.FetchWriteTypeInfoRequest.FromString,
|
| 222 |
+
response_serializer=nvidia_dot_omniverse_dot_storage_dot_fileobject_dot_v1alpha_dot_fileobject__service__pb2.FetchWriteTypeInfoResponse.SerializeToString,
|
| 223 |
+
),
|
| 224 |
+
'Write': grpc.stream_stream_rpc_method_handler(
|
| 225 |
+
servicer.Write,
|
| 226 |
+
request_deserializer=nvidia_dot_omniverse_dot_storage_dot_fileobject_dot_v1alpha_dot_fileobject__service__pb2.WriteRequest.FromString,
|
| 227 |
+
response_serializer=nvidia_dot_omniverse_dot_storage_dot_fileobject_dot_v1alpha_dot_fileobject__service__pb2.WriteResponse.SerializeToString,
|
| 228 |
+
),
|
| 229 |
+
'CompleteRedirectUpload': grpc.unary_unary_rpc_method_handler(
|
| 230 |
+
servicer.CompleteRedirectUpload,
|
| 231 |
+
request_deserializer=nvidia_dot_omniverse_dot_storage_dot_fileobject_dot_v1alpha_dot_fileobject__service__pb2.CompleteRedirectUploadRequest.FromString,
|
| 232 |
+
response_serializer=nvidia_dot_omniverse_dot_storage_dot_fileobject_dot_v1alpha_dot_fileobject__service__pb2.CompleteRedirectUploadResponse.SerializeToString,
|
| 233 |
+
),
|
| 234 |
+
'UploadPart': grpc.unary_unary_rpc_method_handler(
|
| 235 |
+
servicer.UploadPart,
|
| 236 |
+
request_deserializer=nvidia_dot_omniverse_dot_storage_dot_fileobject_dot_v1alpha_dot_fileobject__service__pb2.UploadPartRequest.FromString,
|
| 237 |
+
response_serializer=nvidia_dot_omniverse_dot_storage_dot_fileobject_dot_v1alpha_dot_fileobject__service__pb2.UploadPartResponse.SerializeToString,
|
| 238 |
+
),
|
| 239 |
+
'CompleteMultipartUpload': grpc.unary_unary_rpc_method_handler(
|
| 240 |
+
servicer.CompleteMultipartUpload,
|
| 241 |
+
request_deserializer=nvidia_dot_omniverse_dot_storage_dot_fileobject_dot_v1alpha_dot_fileobject__service__pb2.CompleteMultipartUploadRequest.FromString,
|
| 242 |
+
response_serializer=nvidia_dot_omniverse_dot_storage_dot_fileobject_dot_v1alpha_dot_fileobject__service__pb2.CompleteMultipartUploadResponse.SerializeToString,
|
| 243 |
+
),
|
| 244 |
+
'AbortMultipartUpload': grpc.unary_unary_rpc_method_handler(
|
| 245 |
+
servicer.AbortMultipartUpload,
|
| 246 |
+
request_deserializer=nvidia_dot_omniverse_dot_storage_dot_fileobject_dot_v1alpha_dot_fileobject__service__pb2.AbortMultipartUploadRequest.FromString,
|
| 247 |
+
response_serializer=nvidia_dot_omniverse_dot_storage_dot_fileobject_dot_v1alpha_dot_fileobject__service__pb2.AbortMultipartUploadResponse.SerializeToString,
|
| 248 |
+
),
|
| 249 |
+
'Delete': grpc.unary_unary_rpc_method_handler(
|
| 250 |
+
servicer.Delete,
|
| 251 |
+
request_deserializer=nvidia_dot_omniverse_dot_storage_dot_fileobject_dot_v1alpha_dot_fileobject__service__pb2.DeleteRequest.FromString,
|
| 252 |
+
response_serializer=nvidia_dot_omniverse_dot_storage_dot_fileobject_dot_v1alpha_dot_fileobject__service__pb2.DeleteResponse.SerializeToString,
|
| 253 |
+
),
|
| 254 |
+
'Copy': grpc.unary_unary_rpc_method_handler(
|
| 255 |
+
servicer.Copy,
|
| 256 |
+
request_deserializer=nvidia_dot_omniverse_dot_storage_dot_fileobject_dot_v1alpha_dot_fileobject__service__pb2.CopyRequest.FromString,
|
| 257 |
+
response_serializer=nvidia_dot_omniverse_dot_storage_dot_fileobject_dot_v1alpha_dot_fileobject__service__pb2.CopyResponse.SerializeToString,
|
| 258 |
+
),
|
| 259 |
+
'Move': grpc.unary_unary_rpc_method_handler(
|
| 260 |
+
servicer.Move,
|
| 261 |
+
request_deserializer=nvidia_dot_omniverse_dot_storage_dot_fileobject_dot_v1alpha_dot_fileobject__service__pb2.MoveRequest.FromString,
|
| 262 |
+
response_serializer=nvidia_dot_omniverse_dot_storage_dot_fileobject_dot_v1alpha_dot_fileobject__service__pb2.MoveResponse.SerializeToString,
|
| 263 |
+
),
|
| 264 |
+
'GetOptimisticLockingSupport': grpc.unary_unary_rpc_method_handler(
|
| 265 |
+
servicer.GetOptimisticLockingSupport,
|
| 266 |
+
request_deserializer=nvidia_dot_omniverse_dot_storage_dot_fileobject_dot_v1alpha_dot_fileobject__service__pb2.GetOptimisticLockingSupportRequest.FromString,
|
| 267 |
+
response_serializer=nvidia_dot_omniverse_dot_storage_dot_fileobject_dot_v1alpha_dot_fileobject__service__pb2.GetOptimisticLockingSupportResponse.SerializeToString,
|
| 268 |
+
),
|
| 269 |
+
}
|
| 270 |
+
generic_handler = grpc.method_handlers_generic_handler(
|
| 271 |
+
'nvidia.omniverse.storage.fileobject.v1alpha.FileObjectService', rpc_method_handlers)
|
| 272 |
+
server.add_generic_rpc_handlers((generic_handler,))
|
| 273 |
+
server.add_registered_method_handlers('nvidia.omniverse.storage.fileobject.v1alpha.FileObjectService', rpc_method_handlers)
|
| 274 |
+
|
| 275 |
+
|
| 276 |
+
# This class is part of an EXPERIMENTAL API.
|
| 277 |
+
class FileObjectService(object):
|
| 278 |
+
"""Missing associated documentation comment in .proto file."""
|
| 279 |
+
|
| 280 |
+
@staticmethod
|
| 281 |
+
def Enumerate(request,
|
| 282 |
+
target,
|
| 283 |
+
options=(),
|
| 284 |
+
channel_credentials=None,
|
| 285 |
+
call_credentials=None,
|
| 286 |
+
insecure=False,
|
| 287 |
+
compression=None,
|
| 288 |
+
wait_for_ready=None,
|
| 289 |
+
timeout=None,
|
| 290 |
+
metadata=None):
|
| 291 |
+
return grpc.experimental.unary_stream(
|
| 292 |
+
request,
|
| 293 |
+
target,
|
| 294 |
+
'/nvidia.omniverse.storage.fileobject.v1alpha.FileObjectService/Enumerate',
|
| 295 |
+
nvidia_dot_omniverse_dot_storage_dot_fileobject_dot_v1alpha_dot_fileobject__service__pb2.EnumerateRequest.SerializeToString,
|
| 296 |
+
nvidia_dot_omniverse_dot_storage_dot_fileobject_dot_v1alpha_dot_fileobject__service__pb2.EnumerateResponse.FromString,
|
| 297 |
+
options,
|
| 298 |
+
channel_credentials,
|
| 299 |
+
insecure,
|
| 300 |
+
call_credentials,
|
| 301 |
+
compression,
|
| 302 |
+
wait_for_ready,
|
| 303 |
+
timeout,
|
| 304 |
+
metadata,
|
| 305 |
+
_registered_method=True)
|
| 306 |
+
|
| 307 |
+
@staticmethod
|
| 308 |
+
def Stat(request,
|
| 309 |
+
target,
|
| 310 |
+
options=(),
|
| 311 |
+
channel_credentials=None,
|
| 312 |
+
call_credentials=None,
|
| 313 |
+
insecure=False,
|
| 314 |
+
compression=None,
|
| 315 |
+
wait_for_ready=None,
|
| 316 |
+
timeout=None,
|
| 317 |
+
metadata=None):
|
| 318 |
+
return grpc.experimental.unary_unary(
|
| 319 |
+
request,
|
| 320 |
+
target,
|
| 321 |
+
'/nvidia.omniverse.storage.fileobject.v1alpha.FileObjectService/Stat',
|
| 322 |
+
nvidia_dot_omniverse_dot_storage_dot_fileobject_dot_v1alpha_dot_fileobject__service__pb2.StatRequest.SerializeToString,
|
| 323 |
+
nvidia_dot_omniverse_dot_storage_dot_fileobject_dot_v1alpha_dot_fileobject__service__pb2.StatResponse.FromString,
|
| 324 |
+
options,
|
| 325 |
+
channel_credentials,
|
| 326 |
+
insecure,
|
| 327 |
+
call_credentials,
|
| 328 |
+
compression,
|
| 329 |
+
wait_for_ready,
|
| 330 |
+
timeout,
|
| 331 |
+
metadata,
|
| 332 |
+
_registered_method=True)
|
| 333 |
+
|
| 334 |
+
@staticmethod
|
| 335 |
+
def Read(request,
|
| 336 |
+
target,
|
| 337 |
+
options=(),
|
| 338 |
+
channel_credentials=None,
|
| 339 |
+
call_credentials=None,
|
| 340 |
+
insecure=False,
|
| 341 |
+
compression=None,
|
| 342 |
+
wait_for_ready=None,
|
| 343 |
+
timeout=None,
|
| 344 |
+
metadata=None):
|
| 345 |
+
return grpc.experimental.unary_stream(
|
| 346 |
+
request,
|
| 347 |
+
target,
|
| 348 |
+
'/nvidia.omniverse.storage.fileobject.v1alpha.FileObjectService/Read',
|
| 349 |
+
nvidia_dot_omniverse_dot_storage_dot_fileobject_dot_v1alpha_dot_fileobject__service__pb2.ReadRequest.SerializeToString,
|
| 350 |
+
nvidia_dot_omniverse_dot_storage_dot_fileobject_dot_v1alpha_dot_fileobject__service__pb2.ReadResponse.FromString,
|
| 351 |
+
options,
|
| 352 |
+
channel_credentials,
|
| 353 |
+
insecure,
|
| 354 |
+
call_credentials,
|
| 355 |
+
compression,
|
| 356 |
+
wait_for_ready,
|
| 357 |
+
timeout,
|
| 358 |
+
metadata,
|
| 359 |
+
_registered_method=True)
|
| 360 |
+
|
| 361 |
+
@staticmethod
|
| 362 |
+
def ReadFromAddress(request,
|
| 363 |
+
target,
|
| 364 |
+
options=(),
|
| 365 |
+
channel_credentials=None,
|
| 366 |
+
call_credentials=None,
|
| 367 |
+
insecure=False,
|
| 368 |
+
compression=None,
|
| 369 |
+
wait_for_ready=None,
|
| 370 |
+
timeout=None,
|
| 371 |
+
metadata=None):
|
| 372 |
+
return grpc.experimental.unary_stream(
|
| 373 |
+
request,
|
| 374 |
+
target,
|
| 375 |
+
'/nvidia.omniverse.storage.fileobject.v1alpha.FileObjectService/ReadFromAddress',
|
| 376 |
+
nvidia_dot_omniverse_dot_storage_dot_fileobject_dot_v1alpha_dot_fileobject__service__pb2.ReadFromAddressRequest.SerializeToString,
|
| 377 |
+
nvidia_dot_omniverse_dot_storage_dot_fileobject_dot_v1alpha_dot_fileobject__service__pb2.ReadFromAddressResponse.FromString,
|
| 378 |
+
options,
|
| 379 |
+
channel_credentials,
|
| 380 |
+
insecure,
|
| 381 |
+
call_credentials,
|
| 382 |
+
compression,
|
| 383 |
+
wait_for_ready,
|
| 384 |
+
timeout,
|
| 385 |
+
metadata,
|
| 386 |
+
_registered_method=True)
|
| 387 |
+
|
| 388 |
+
@staticmethod
|
| 389 |
+
def FetchWriteTypeInfo(request,
|
| 390 |
+
target,
|
| 391 |
+
options=(),
|
| 392 |
+
channel_credentials=None,
|
| 393 |
+
call_credentials=None,
|
| 394 |
+
insecure=False,
|
| 395 |
+
compression=None,
|
| 396 |
+
wait_for_ready=None,
|
| 397 |
+
timeout=None,
|
| 398 |
+
metadata=None):
|
| 399 |
+
return grpc.experimental.unary_unary(
|
| 400 |
+
request,
|
| 401 |
+
target,
|
| 402 |
+
'/nvidia.omniverse.storage.fileobject.v1alpha.FileObjectService/FetchWriteTypeInfo',
|
| 403 |
+
nvidia_dot_omniverse_dot_storage_dot_fileobject_dot_v1alpha_dot_fileobject__service__pb2.FetchWriteTypeInfoRequest.SerializeToString,
|
| 404 |
+
nvidia_dot_omniverse_dot_storage_dot_fileobject_dot_v1alpha_dot_fileobject__service__pb2.FetchWriteTypeInfoResponse.FromString,
|
| 405 |
+
options,
|
| 406 |
+
channel_credentials,
|
| 407 |
+
insecure,
|
| 408 |
+
call_credentials,
|
| 409 |
+
compression,
|
| 410 |
+
wait_for_ready,
|
| 411 |
+
timeout,
|
| 412 |
+
metadata,
|
| 413 |
+
_registered_method=True)
|
| 414 |
+
|
| 415 |
+
@staticmethod
|
| 416 |
+
def Write(request_iterator,
|
| 417 |
+
target,
|
| 418 |
+
options=(),
|
| 419 |
+
channel_credentials=None,
|
| 420 |
+
call_credentials=None,
|
| 421 |
+
insecure=False,
|
| 422 |
+
compression=None,
|
| 423 |
+
wait_for_ready=None,
|
| 424 |
+
timeout=None,
|
| 425 |
+
metadata=None):
|
| 426 |
+
return grpc.experimental.stream_stream(
|
| 427 |
+
request_iterator,
|
| 428 |
+
target,
|
| 429 |
+
'/nvidia.omniverse.storage.fileobject.v1alpha.FileObjectService/Write',
|
| 430 |
+
nvidia_dot_omniverse_dot_storage_dot_fileobject_dot_v1alpha_dot_fileobject__service__pb2.WriteRequest.SerializeToString,
|
| 431 |
+
nvidia_dot_omniverse_dot_storage_dot_fileobject_dot_v1alpha_dot_fileobject__service__pb2.WriteResponse.FromString,
|
| 432 |
+
options,
|
| 433 |
+
channel_credentials,
|
| 434 |
+
insecure,
|
| 435 |
+
call_credentials,
|
| 436 |
+
compression,
|
| 437 |
+
wait_for_ready,
|
| 438 |
+
timeout,
|
| 439 |
+
metadata,
|
| 440 |
+
_registered_method=True)
|
| 441 |
+
|
| 442 |
+
@staticmethod
|
| 443 |
+
def CompleteRedirectUpload(request,
|
| 444 |
+
target,
|
| 445 |
+
options=(),
|
| 446 |
+
channel_credentials=None,
|
| 447 |
+
call_credentials=None,
|
| 448 |
+
insecure=False,
|
| 449 |
+
compression=None,
|
| 450 |
+
wait_for_ready=None,
|
| 451 |
+
timeout=None,
|
| 452 |
+
metadata=None):
|
| 453 |
+
return grpc.experimental.unary_unary(
|
| 454 |
+
request,
|
| 455 |
+
target,
|
| 456 |
+
'/nvidia.omniverse.storage.fileobject.v1alpha.FileObjectService/CompleteRedirectUpload',
|
| 457 |
+
nvidia_dot_omniverse_dot_storage_dot_fileobject_dot_v1alpha_dot_fileobject__service__pb2.CompleteRedirectUploadRequest.SerializeToString,
|
| 458 |
+
nvidia_dot_omniverse_dot_storage_dot_fileobject_dot_v1alpha_dot_fileobject__service__pb2.CompleteRedirectUploadResponse.FromString,
|
| 459 |
+
options,
|
| 460 |
+
channel_credentials,
|
| 461 |
+
insecure,
|
| 462 |
+
call_credentials,
|
| 463 |
+
compression,
|
| 464 |
+
wait_for_ready,
|
| 465 |
+
timeout,
|
| 466 |
+
metadata,
|
| 467 |
+
_registered_method=True)
|
| 468 |
+
|
| 469 |
+
@staticmethod
|
| 470 |
+
def UploadPart(request,
|
| 471 |
+
target,
|
| 472 |
+
options=(),
|
| 473 |
+
channel_credentials=None,
|
| 474 |
+
call_credentials=None,
|
| 475 |
+
insecure=False,
|
| 476 |
+
compression=None,
|
| 477 |
+
wait_for_ready=None,
|
| 478 |
+
timeout=None,
|
| 479 |
+
metadata=None):
|
| 480 |
+
return grpc.experimental.unary_unary(
|
| 481 |
+
request,
|
| 482 |
+
target,
|
| 483 |
+
'/nvidia.omniverse.storage.fileobject.v1alpha.FileObjectService/UploadPart',
|
| 484 |
+
nvidia_dot_omniverse_dot_storage_dot_fileobject_dot_v1alpha_dot_fileobject__service__pb2.UploadPartRequest.SerializeToString,
|
| 485 |
+
nvidia_dot_omniverse_dot_storage_dot_fileobject_dot_v1alpha_dot_fileobject__service__pb2.UploadPartResponse.FromString,
|
| 486 |
+
options,
|
| 487 |
+
channel_credentials,
|
| 488 |
+
insecure,
|
| 489 |
+
call_credentials,
|
| 490 |
+
compression,
|
| 491 |
+
wait_for_ready,
|
| 492 |
+
timeout,
|
| 493 |
+
metadata,
|
| 494 |
+
_registered_method=True)
|
| 495 |
+
|
| 496 |
+
@staticmethod
|
| 497 |
+
def CompleteMultipartUpload(request,
|
| 498 |
+
target,
|
| 499 |
+
options=(),
|
| 500 |
+
channel_credentials=None,
|
| 501 |
+
call_credentials=None,
|
| 502 |
+
insecure=False,
|
| 503 |
+
compression=None,
|
| 504 |
+
wait_for_ready=None,
|
| 505 |
+
timeout=None,
|
| 506 |
+
metadata=None):
|
| 507 |
+
return grpc.experimental.unary_unary(
|
| 508 |
+
request,
|
| 509 |
+
target,
|
| 510 |
+
'/nvidia.omniverse.storage.fileobject.v1alpha.FileObjectService/CompleteMultipartUpload',
|
| 511 |
+
nvidia_dot_omniverse_dot_storage_dot_fileobject_dot_v1alpha_dot_fileobject__service__pb2.CompleteMultipartUploadRequest.SerializeToString,
|
| 512 |
+
nvidia_dot_omniverse_dot_storage_dot_fileobject_dot_v1alpha_dot_fileobject__service__pb2.CompleteMultipartUploadResponse.FromString,
|
| 513 |
+
options,
|
| 514 |
+
channel_credentials,
|
| 515 |
+
insecure,
|
| 516 |
+
call_credentials,
|
| 517 |
+
compression,
|
| 518 |
+
wait_for_ready,
|
| 519 |
+
timeout,
|
| 520 |
+
metadata,
|
| 521 |
+
_registered_method=True)
|
| 522 |
+
|
| 523 |
+
@staticmethod
|
| 524 |
+
def AbortMultipartUpload(request,
|
| 525 |
+
target,
|
| 526 |
+
options=(),
|
| 527 |
+
channel_credentials=None,
|
| 528 |
+
call_credentials=None,
|
| 529 |
+
insecure=False,
|
| 530 |
+
compression=None,
|
| 531 |
+
wait_for_ready=None,
|
| 532 |
+
timeout=None,
|
| 533 |
+
metadata=None):
|
| 534 |
+
return grpc.experimental.unary_unary(
|
| 535 |
+
request,
|
| 536 |
+
target,
|
| 537 |
+
'/nvidia.omniverse.storage.fileobject.v1alpha.FileObjectService/AbortMultipartUpload',
|
| 538 |
+
nvidia_dot_omniverse_dot_storage_dot_fileobject_dot_v1alpha_dot_fileobject__service__pb2.AbortMultipartUploadRequest.SerializeToString,
|
| 539 |
+
nvidia_dot_omniverse_dot_storage_dot_fileobject_dot_v1alpha_dot_fileobject__service__pb2.AbortMultipartUploadResponse.FromString,
|
| 540 |
+
options,
|
| 541 |
+
channel_credentials,
|
| 542 |
+
insecure,
|
| 543 |
+
call_credentials,
|
| 544 |
+
compression,
|
| 545 |
+
wait_for_ready,
|
| 546 |
+
timeout,
|
| 547 |
+
metadata,
|
| 548 |
+
_registered_method=True)
|
| 549 |
+
|
| 550 |
+
@staticmethod
|
| 551 |
+
def Delete(request,
|
| 552 |
+
target,
|
| 553 |
+
options=(),
|
| 554 |
+
channel_credentials=None,
|
| 555 |
+
call_credentials=None,
|
| 556 |
+
insecure=False,
|
| 557 |
+
compression=None,
|
| 558 |
+
wait_for_ready=None,
|
| 559 |
+
timeout=None,
|
| 560 |
+
metadata=None):
|
| 561 |
+
return grpc.experimental.unary_unary(
|
| 562 |
+
request,
|
| 563 |
+
target,
|
| 564 |
+
'/nvidia.omniverse.storage.fileobject.v1alpha.FileObjectService/Delete',
|
| 565 |
+
nvidia_dot_omniverse_dot_storage_dot_fileobject_dot_v1alpha_dot_fileobject__service__pb2.DeleteRequest.SerializeToString,
|
| 566 |
+
nvidia_dot_omniverse_dot_storage_dot_fileobject_dot_v1alpha_dot_fileobject__service__pb2.DeleteResponse.FromString,
|
| 567 |
+
options,
|
| 568 |
+
channel_credentials,
|
| 569 |
+
insecure,
|
| 570 |
+
call_credentials,
|
| 571 |
+
compression,
|
| 572 |
+
wait_for_ready,
|
| 573 |
+
timeout,
|
| 574 |
+
metadata,
|
| 575 |
+
_registered_method=True)
|
| 576 |
+
|
| 577 |
+
@staticmethod
|
| 578 |
+
def Copy(request,
|
| 579 |
+
target,
|
| 580 |
+
options=(),
|
| 581 |
+
channel_credentials=None,
|
| 582 |
+
call_credentials=None,
|
| 583 |
+
insecure=False,
|
| 584 |
+
compression=None,
|
| 585 |
+
wait_for_ready=None,
|
| 586 |
+
timeout=None,
|
| 587 |
+
metadata=None):
|
| 588 |
+
return grpc.experimental.unary_unary(
|
| 589 |
+
request,
|
| 590 |
+
target,
|
| 591 |
+
'/nvidia.omniverse.storage.fileobject.v1alpha.FileObjectService/Copy',
|
| 592 |
+
nvidia_dot_omniverse_dot_storage_dot_fileobject_dot_v1alpha_dot_fileobject__service__pb2.CopyRequest.SerializeToString,
|
| 593 |
+
nvidia_dot_omniverse_dot_storage_dot_fileobject_dot_v1alpha_dot_fileobject__service__pb2.CopyResponse.FromString,
|
| 594 |
+
options,
|
| 595 |
+
channel_credentials,
|
| 596 |
+
insecure,
|
| 597 |
+
call_credentials,
|
| 598 |
+
compression,
|
| 599 |
+
wait_for_ready,
|
| 600 |
+
timeout,
|
| 601 |
+
metadata,
|
| 602 |
+
_registered_method=True)
|
| 603 |
+
|
| 604 |
+
@staticmethod
|
| 605 |
+
def Move(request,
|
| 606 |
+
target,
|
| 607 |
+
options=(),
|
| 608 |
+
channel_credentials=None,
|
| 609 |
+
call_credentials=None,
|
| 610 |
+
insecure=False,
|
| 611 |
+
compression=None,
|
| 612 |
+
wait_for_ready=None,
|
| 613 |
+
timeout=None,
|
| 614 |
+
metadata=None):
|
| 615 |
+
return grpc.experimental.unary_unary(
|
| 616 |
+
request,
|
| 617 |
+
target,
|
| 618 |
+
'/nvidia.omniverse.storage.fileobject.v1alpha.FileObjectService/Move',
|
| 619 |
+
nvidia_dot_omniverse_dot_storage_dot_fileobject_dot_v1alpha_dot_fileobject__service__pb2.MoveRequest.SerializeToString,
|
| 620 |
+
nvidia_dot_omniverse_dot_storage_dot_fileobject_dot_v1alpha_dot_fileobject__service__pb2.MoveResponse.FromString,
|
| 621 |
+
options,
|
| 622 |
+
channel_credentials,
|
| 623 |
+
insecure,
|
| 624 |
+
call_credentials,
|
| 625 |
+
compression,
|
| 626 |
+
wait_for_ready,
|
| 627 |
+
timeout,
|
| 628 |
+
metadata,
|
| 629 |
+
_registered_method=True)
|
| 630 |
+
|
| 631 |
+
@staticmethod
|
| 632 |
+
def GetOptimisticLockingSupport(request,
|
| 633 |
+
target,
|
| 634 |
+
options=(),
|
| 635 |
+
channel_credentials=None,
|
| 636 |
+
call_credentials=None,
|
| 637 |
+
insecure=False,
|
| 638 |
+
compression=None,
|
| 639 |
+
wait_for_ready=None,
|
| 640 |
+
timeout=None,
|
| 641 |
+
metadata=None):
|
| 642 |
+
return grpc.experimental.unary_unary(
|
| 643 |
+
request,
|
| 644 |
+
target,
|
| 645 |
+
'/nvidia.omniverse.storage.fileobject.v1alpha.FileObjectService/GetOptimisticLockingSupport',
|
| 646 |
+
nvidia_dot_omniverse_dot_storage_dot_fileobject_dot_v1alpha_dot_fileobject__service__pb2.GetOptimisticLockingSupportRequest.SerializeToString,
|
| 647 |
+
nvidia_dot_omniverse_dot_storage_dot_fileobject_dot_v1alpha_dot_fileobject__service__pb2.GetOptimisticLockingSupportResponse.FromString,
|
| 648 |
+
options,
|
| 649 |
+
channel_credentials,
|
| 650 |
+
insecure,
|
| 651 |
+
call_credentials,
|
| 652 |
+
compression,
|
| 653 |
+
wait_for_ready,
|
| 654 |
+
timeout,
|
| 655 |
+
metadata,
|
| 656 |
+
_registered_method=True)
|
docker/hf-space/hf-storage-api/generated/nvidia/omniverse/storage/fileobject/v1beta/fileobject_pb2.py
ADDED
|
@@ -0,0 +1,52 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# -*- coding: utf-8 -*-
|
| 2 |
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
| 3 |
+
# NO CHECKED-IN PROTOBUF GENCODE
|
| 4 |
+
# source: nvidia/omniverse/storage/fileobject/v1beta/fileobject.proto
|
| 5 |
+
# Protobuf Python Version: 6.31.1
|
| 6 |
+
"""Generated protocol buffer code."""
|
| 7 |
+
from google.protobuf import descriptor as _descriptor
|
| 8 |
+
from google.protobuf import descriptor_pool as _descriptor_pool
|
| 9 |
+
from google.protobuf import runtime_version as _runtime_version
|
| 10 |
+
from google.protobuf import symbol_database as _symbol_database
|
| 11 |
+
from google.protobuf.internal import builder as _builder
|
| 12 |
+
_runtime_version.ValidateProtobufRuntimeVersion(
|
| 13 |
+
_runtime_version.Domain.PUBLIC,
|
| 14 |
+
6,
|
| 15 |
+
31,
|
| 16 |
+
1,
|
| 17 |
+
'',
|
| 18 |
+
'nvidia/omniverse/storage/fileobject/v1beta/fileobject.proto'
|
| 19 |
+
)
|
| 20 |
+
# @@protoc_insertion_point(imports)
|
| 21 |
+
|
| 22 |
+
_sym_db = _symbol_database.Default()
|
| 23 |
+
|
| 24 |
+
|
| 25 |
+
from google.protobuf import timestamp_pb2 as google_dot_protobuf_dot_timestamp__pb2
|
| 26 |
+
|
| 27 |
+
|
| 28 |
+
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n;nvidia/omniverse/storage/fileobject/v1beta/fileobject.proto\x12*nvidia.omniverse.storage.fileobject.v1beta\x1a\x1fgoogle/protobuf/timestamp.proto\"\x16\n\x05\x43hunk\x12\r\n\x05\x63hunk\x18\x01 \x01(\x0c\"\x9c\x01\n\x08Metadata\x12\x1d\n\x10\x64\x61ta_object_size\x18\x01 \x01(\x04H\x00\x88\x01\x01\x12@\n\x17last_modified_timestamp\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampH\x01\x88\x01\x01\x42\x13\n\x11_data_object_sizeB\x1a\n\x18_last_modified_timestamp\"%\n\x06Header\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t\"\x8b\x01\n\x08Redirect\x12\x1b\n\x13redirect_target_url\x18\x01 \x01(\t\x12\x12\n\x06method\x18\x02 \x01(\tB\x02\x18\x01\x12N\n\x12\x61\x64\x64itional_headers\x18\x03 \x03(\x0b\x32\x32.nvidia.omniverse.storage.fileobject.v1beta.Header\"o\n\x0b\x41\x64\x64ressInfo\x12\x18\n\x10resource_address\x18\x01 \x01(\t\x12\x46\n\x08metadata\x18\x02 \x01(\x0b\x32\x34.nvidia.omniverse.storage.fileobject.v1beta.Metadata\"\xaf\x01\n\x0cResourceInfo\x12W\n\x11resource_identity\x18\x01 \x01(\x0b\x32<.nvidia.omniverse.storage.fileobject.v1beta.ResourceIdentity\x12\x46\n\x08metadata\x18\x02 \x01(\x0b\x32\x34.nvidia.omniverse.storage.fileobject.v1beta.Metadata\",\n\x10ResourceIdentity\x12\x18\n\x10\x65ncoded_identity\x18\x01 \x01(\tB\x82\x01\n.com.nvidia.omniverse.storage.fileobject.v1betaB\x0f\x46ileobjectProtoP\x01Z=pb.api.nvidia.com/omniverse/storage/fileobject/v1beta;storageb\x06proto3')
|
| 29 |
+
|
| 30 |
+
_globals = globals()
|
| 31 |
+
_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
|
| 32 |
+
_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'nvidia.omniverse.storage.fileobject.v1beta.fileobject_pb2', _globals)
|
| 33 |
+
if not _descriptor._USE_C_DESCRIPTORS:
|
| 34 |
+
_globals['DESCRIPTOR']._loaded_options = None
|
| 35 |
+
_globals['DESCRIPTOR']._serialized_options = b'\n.com.nvidia.omniverse.storage.fileobject.v1betaB\017FileobjectProtoP\001Z=pb.api.nvidia.com/omniverse/storage/fileobject/v1beta;storage'
|
| 36 |
+
_globals['_REDIRECT'].fields_by_name['method']._loaded_options = None
|
| 37 |
+
_globals['_REDIRECT'].fields_by_name['method']._serialized_options = b'\030\001'
|
| 38 |
+
_globals['_CHUNK']._serialized_start=140
|
| 39 |
+
_globals['_CHUNK']._serialized_end=162
|
| 40 |
+
_globals['_METADATA']._serialized_start=165
|
| 41 |
+
_globals['_METADATA']._serialized_end=321
|
| 42 |
+
_globals['_HEADER']._serialized_start=323
|
| 43 |
+
_globals['_HEADER']._serialized_end=360
|
| 44 |
+
_globals['_REDIRECT']._serialized_start=363
|
| 45 |
+
_globals['_REDIRECT']._serialized_end=502
|
| 46 |
+
_globals['_ADDRESSINFO']._serialized_start=504
|
| 47 |
+
_globals['_ADDRESSINFO']._serialized_end=615
|
| 48 |
+
_globals['_RESOURCEINFO']._serialized_start=618
|
| 49 |
+
_globals['_RESOURCEINFO']._serialized_end=793
|
| 50 |
+
_globals['_RESOURCEIDENTITY']._serialized_start=795
|
| 51 |
+
_globals['_RESOURCEIDENTITY']._serialized_end=839
|
| 52 |
+
# @@protoc_insertion_point(module_scope)
|
docker/hf-space/hf-storage-api/generated/nvidia/omniverse/storage/fileobject/v1beta/fileobject_pb2.pyi
ADDED
|
@@ -0,0 +1,64 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import datetime
|
| 2 |
+
|
| 3 |
+
from google.protobuf import timestamp_pb2 as _timestamp_pb2
|
| 4 |
+
from google.protobuf.internal import containers as _containers
|
| 5 |
+
from google.protobuf import descriptor as _descriptor
|
| 6 |
+
from google.protobuf import message as _message
|
| 7 |
+
from collections.abc import Iterable as _Iterable, Mapping as _Mapping
|
| 8 |
+
from typing import ClassVar as _ClassVar, Optional as _Optional, Union as _Union
|
| 9 |
+
|
| 10 |
+
DESCRIPTOR: _descriptor.FileDescriptor
|
| 11 |
+
|
| 12 |
+
class Chunk(_message.Message):
|
| 13 |
+
__slots__ = ("chunk",)
|
| 14 |
+
CHUNK_FIELD_NUMBER: _ClassVar[int]
|
| 15 |
+
chunk: bytes
|
| 16 |
+
def __init__(self, chunk: _Optional[bytes] = ...) -> None: ...
|
| 17 |
+
|
| 18 |
+
class Metadata(_message.Message):
|
| 19 |
+
__slots__ = ("data_object_size", "last_modified_timestamp")
|
| 20 |
+
DATA_OBJECT_SIZE_FIELD_NUMBER: _ClassVar[int]
|
| 21 |
+
LAST_MODIFIED_TIMESTAMP_FIELD_NUMBER: _ClassVar[int]
|
| 22 |
+
data_object_size: int
|
| 23 |
+
last_modified_timestamp: _timestamp_pb2.Timestamp
|
| 24 |
+
def __init__(self, data_object_size: _Optional[int] = ..., last_modified_timestamp: _Optional[_Union[datetime.datetime, _timestamp_pb2.Timestamp, _Mapping]] = ...) -> None: ...
|
| 25 |
+
|
| 26 |
+
class Header(_message.Message):
|
| 27 |
+
__slots__ = ("name", "value")
|
| 28 |
+
NAME_FIELD_NUMBER: _ClassVar[int]
|
| 29 |
+
VALUE_FIELD_NUMBER: _ClassVar[int]
|
| 30 |
+
name: str
|
| 31 |
+
value: str
|
| 32 |
+
def __init__(self, name: _Optional[str] = ..., value: _Optional[str] = ...) -> None: ...
|
| 33 |
+
|
| 34 |
+
class Redirect(_message.Message):
|
| 35 |
+
__slots__ = ("redirect_target_url", "method", "additional_headers")
|
| 36 |
+
REDIRECT_TARGET_URL_FIELD_NUMBER: _ClassVar[int]
|
| 37 |
+
METHOD_FIELD_NUMBER: _ClassVar[int]
|
| 38 |
+
ADDITIONAL_HEADERS_FIELD_NUMBER: _ClassVar[int]
|
| 39 |
+
redirect_target_url: str
|
| 40 |
+
method: str
|
| 41 |
+
additional_headers: _containers.RepeatedCompositeFieldContainer[Header]
|
| 42 |
+
def __init__(self, redirect_target_url: _Optional[str] = ..., method: _Optional[str] = ..., additional_headers: _Optional[_Iterable[_Union[Header, _Mapping]]] = ...) -> None: ...
|
| 43 |
+
|
| 44 |
+
class AddressInfo(_message.Message):
|
| 45 |
+
__slots__ = ("resource_address", "metadata")
|
| 46 |
+
RESOURCE_ADDRESS_FIELD_NUMBER: _ClassVar[int]
|
| 47 |
+
METADATA_FIELD_NUMBER: _ClassVar[int]
|
| 48 |
+
resource_address: str
|
| 49 |
+
metadata: Metadata
|
| 50 |
+
def __init__(self, resource_address: _Optional[str] = ..., metadata: _Optional[_Union[Metadata, _Mapping]] = ...) -> None: ...
|
| 51 |
+
|
| 52 |
+
class ResourceInfo(_message.Message):
|
| 53 |
+
__slots__ = ("resource_identity", "metadata")
|
| 54 |
+
RESOURCE_IDENTITY_FIELD_NUMBER: _ClassVar[int]
|
| 55 |
+
METADATA_FIELD_NUMBER: _ClassVar[int]
|
| 56 |
+
resource_identity: ResourceIdentity
|
| 57 |
+
metadata: Metadata
|
| 58 |
+
def __init__(self, resource_identity: _Optional[_Union[ResourceIdentity, _Mapping]] = ..., metadata: _Optional[_Union[Metadata, _Mapping]] = ...) -> None: ...
|
| 59 |
+
|
| 60 |
+
class ResourceIdentity(_message.Message):
|
| 61 |
+
__slots__ = ("encoded_identity",)
|
| 62 |
+
ENCODED_IDENTITY_FIELD_NUMBER: _ClassVar[int]
|
| 63 |
+
encoded_identity: str
|
| 64 |
+
def __init__(self, encoded_identity: _Optional[str] = ...) -> None: ...
|
docker/hf-space/hf-storage-api/generated/nvidia/omniverse/storage/fileobject/v1beta/fileobject_pb2_grpc.py
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
|
| 2 |
+
"""Client and server classes corresponding to protobuf-defined services."""
|
| 3 |
+
import grpc
|
| 4 |
+
import warnings
|
| 5 |
+
|
| 6 |
+
|
| 7 |
+
GRPC_GENERATED_VERSION = '1.80.0'
|
| 8 |
+
GRPC_VERSION = grpc.__version__
|
| 9 |
+
_version_not_supported = False
|
| 10 |
+
|
| 11 |
+
try:
|
| 12 |
+
from grpc._utilities import first_version_is_lower
|
| 13 |
+
_version_not_supported = first_version_is_lower(GRPC_VERSION, GRPC_GENERATED_VERSION)
|
| 14 |
+
except ImportError:
|
| 15 |
+
_version_not_supported = True
|
| 16 |
+
|
| 17 |
+
if _version_not_supported:
|
| 18 |
+
raise RuntimeError(
|
| 19 |
+
f'The grpc package installed is at version {GRPC_VERSION},'
|
| 20 |
+
+ ' but the generated code in nvidia/omniverse/storage/fileobject/v1beta/fileobject_pb2_grpc.py depends on'
|
| 21 |
+
+ f' grpcio>={GRPC_GENERATED_VERSION}.'
|
| 22 |
+
+ f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}'
|
| 23 |
+
+ f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.'
|
| 24 |
+
)
|
docker/hf-space/hf-storage-api/generated/nvidia/omniverse/storage/fileobject/v1beta/fileobject_service_pb2.py
ADDED
|
@@ -0,0 +1,100 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# -*- coding: utf-8 -*-
|
| 2 |
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
| 3 |
+
# NO CHECKED-IN PROTOBUF GENCODE
|
| 4 |
+
# source: nvidia/omniverse/storage/fileobject/v1beta/fileobject_service.proto
|
| 5 |
+
# Protobuf Python Version: 6.31.1
|
| 6 |
+
"""Generated protocol buffer code."""
|
| 7 |
+
from google.protobuf import descriptor as _descriptor
|
| 8 |
+
from google.protobuf import descriptor_pool as _descriptor_pool
|
| 9 |
+
from google.protobuf import runtime_version as _runtime_version
|
| 10 |
+
from google.protobuf import symbol_database as _symbol_database
|
| 11 |
+
from google.protobuf.internal import builder as _builder
|
| 12 |
+
_runtime_version.ValidateProtobufRuntimeVersion(
|
| 13 |
+
_runtime_version.Domain.PUBLIC,
|
| 14 |
+
6,
|
| 15 |
+
31,
|
| 16 |
+
1,
|
| 17 |
+
'',
|
| 18 |
+
'nvidia/omniverse/storage/fileobject/v1beta/fileobject_service.proto'
|
| 19 |
+
)
|
| 20 |
+
# @@protoc_insertion_point(imports)
|
| 21 |
+
|
| 22 |
+
_sym_db = _symbol_database.Default()
|
| 23 |
+
|
| 24 |
+
|
| 25 |
+
from nvidia.omniverse.storage.fileobject.v1beta import fileobject_pb2 as nvidia_dot_omniverse_dot_storage_dot_fileobject_dot_v1beta_dot_fileobject__pb2
|
| 26 |
+
|
| 27 |
+
|
| 28 |
+
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\nCnvidia/omniverse/storage/fileobject/v1beta/fileobject_service.proto\x12*nvidia.omniverse.storage.fileobject.v1beta\x1a;nvidia/omniverse/storage/fileobject/v1beta/fileobject.proto\",\n\x10\x45numerateRequest\x12\x18\n\x10resource_address\x18\x01 \x01(\t\"[\n\x11\x45numerateResponse\x12\x46\n\x05items\x18\x01 \x03(\x0b\x32\x37.nvidia.omniverse.storage.fileobject.v1beta.AddressInfo\"\'\n\x0bStatRequest\x12\x18\n\x10resource_address\x18\x01 \x01(\t\"_\n\x0cStatResponse\x12O\n\rresource_info\x18\x01 \x01(\x0b\x32\x38.nvidia.omniverse.storage.fileobject.v1beta.ResourceInfo\"\xe0\x01\n\x0bReadRequest\x12W\n\x11resource_identity\x18\x01 \x01(\x0b\x32<.nvidia.omniverse.storage.fileobject.v1beta.ResourceIdentity\x12`\n\x13\x64ownload_preference\x18\x02 \x01(\x0e\x32>.nvidia.omniverse.storage.fileobject.v1beta.DownloadPreferenceH\x00\x88\x01\x01\x42\x16\n\x14_download_preference\"\xf4\x01\n\x0cReadResponse\x12H\n\x08metadata\x18\x01 \x01(\x0b\x32\x34.nvidia.omniverse.storage.fileobject.v1beta.MetadataH\x00\x12\x42\n\x05\x63hunk\x18\x02 \x01(\x0b\x32\x31.nvidia.omniverse.storage.fileobject.v1beta.ChunkH\x00\x12H\n\x08redirect\x18\x03 \x01(\x0b\x32\x34.nvidia.omniverse.storage.fileobject.v1beta.RedirectH\x00\x42\x0c\n\nreply_type\"\xac\x01\n\x16ReadFromAddressRequest\x12\x18\n\x10resource_address\x18\x01 \x01(\t\x12`\n\x13\x64ownload_preference\x18\x02 \x01(\x0e\x32>.nvidia.omniverse.storage.fileobject.v1beta.DownloadPreferenceH\x00\x88\x01\x01\x42\x16\n\x14_download_preference\"\x88\x02\n\x17ReadFromAddressResponse\x12Q\n\rresource_info\x18\x01 \x01(\x0b\x32\x38.nvidia.omniverse.storage.fileobject.v1beta.ResourceInfoH\x00\x12\x42\n\x05\x63hunk\x18\x02 \x01(\x0b\x32\x31.nvidia.omniverse.storage.fileobject.v1beta.ChunkH\x00\x12H\n\x08redirect\x18\x03 \x01(\x0b\x32\x34.nvidia.omniverse.storage.fileobject.v1beta.RedirectH\x00\x42\x0c\n\nreply_type\"A\n\x19\x46\x65tchWriteTypeInfoRequest\x12$\n\x1c\x64\x65stination_resource_address\x18\x01 \x01(\t\"\xbd\x01\n\x18WriteTypeForSizeInterval\x12 \n\x18minimum_data_object_size\x18\x01 \x01(\x04\x12 \n\x18maximum_data_object_size\x18\x02 \x01(\x04\x12]\n\x17preferred_upload_method\x18\x03 \x01(\x0e\x32<.nvidia.omniverse.storage.fileobject.v1beta.UploadPreference\"\x80\x01\n\x1a\x46\x65tchWriteTypeInfoResponse\x12\x62\n\x14write_type_intervals\x18\x01 \x03(\x0b\x32\x44.nvidia.omniverse.storage.fileobject.v1beta.WriteTypeForSizeInterval\"\xb7\x01\n\x0cWriteRequest\x12M\n\x06params\x18\x01 \x01(\x0b\x32;.nvidia.omniverse.storage.fileobject.v1beta.WriteParametersH\x00\x12\x42\n\x05\x63hunk\x18\x02 \x01(\x0b\x32\x31.nvidia.omniverse.storage.fileobject.v1beta.ChunkH\x00\x42\x14\n\x12write_request_type\"\xb7\x02\n\x0fWriteParameters\x12$\n\x1c\x64\x65stination_resource_address\x18\x01 \x01(\t\x12[\n\x10previous_version\x18\x02 \x01(\x0b\x32<.nvidia.omniverse.storage.fileobject.v1beta.ResourceIdentityH\x00\x88\x01\x01\x12\x18\n\x10\x64\x61ta_object_size\x18\x03 \x01(\x04\x12\\\n\x11upload_preference\x18\x04 \x01(\x0e\x32<.nvidia.omniverse.storage.fileobject.v1beta.UploadPreferenceH\x01\x88\x01\x01\x42\x13\n\x11_previous_versionB\x14\n\x12_upload_preference\"\xf1\x01\n\x17WriteRedirectProperties\x12\x1b\n\x13redirect_target_url\x18\x01 \x01(\t\x12H\n\x06method\x18\x02 \x01(\x0e\x32\x38.nvidia.omniverse.storage.fileobject.v1beta.UploadMethod\x12N\n\x12\x61\x64\x64itional_headers\x18\x03 \x03(\x0b\x32\x32.nvidia.omniverse.storage.fileobject.v1beta.Header\x12\x1f\n\x17\x63ompletion_header_names\x18\x04 \x03(\t\"\x15\n\x13WriteChunksAccepted\"\xa1\x03\n\rWriteResponse\x12`\n\x15write_chunks_accepted\x18\x01 \x01(\x0b\x32?.nvidia.omniverse.storage.fileobject.v1beta.WriteChunksAcceptedH\x00\x12Q\n\rresource_info\x18\x02 \x01(\x0b\x32\x38.nvidia.omniverse.storage.fileobject.v1beta.ResourceInfoH\x00\x12]\n\x0ewrite_redirect\x18\x03 \x01(\x0b\x32\x43.nvidia.omniverse.storage.fileobject.v1beta.WriteRedirectPropertiesH\x00\x12\x65\n\x10multipart_upload\x18\x04 \x01(\x0b\x32I.nvidia.omniverse.storage.fileobject.v1beta.CreateMultipartUploadResponseH\x00\x42\x15\n\x13write_response_type\"\x95\x01\n\x1d\x43ompleteRedirectUploadRequest\x12$\n\x1c\x64\x65stination_resource_address\x18\x01 \x01(\t\x12N\n\x12\x61\x64\x64itional_headers\x18\x02 \x03(\x0b\x32\x32.nvidia.omniverse.storage.fileobject.v1beta.Header\"q\n\x1e\x43ompleteRedirectUploadResponse\x12O\n\rresource_info\x18\x01 \x01(\x0b\x32\x38.nvidia.omniverse.storage.fileobject.v1beta.ResourceInfo\"\xd2\x02\n\x1d\x43reateMultipartUploadResponse\x12\x11\n\tupload_id\x18\x01 \x01(\t\x12\x66\n\x19\x66irst_part_write_redirect\x18\x02 \x01(\x0b\x32\x43.nvidia.omniverse.storage.fileobject.v1beta.WriteRedirectProperties\x12!\n\x14maximum_parts_number\x18\x03 \x01(\rH\x00\x88\x01\x01\x12\"\n\x15minimum_size_per_part\x18\x04 \x01(\x04H\x01\x88\x01\x01\x12\"\n\x15maximum_size_per_part\x18\x05 \x01(\x04H\x02\x88\x01\x01\x42\x17\n\x15_maximum_parts_numberB\x18\n\x16_minimum_size_per_partB\x18\n\x16_maximum_size_per_part\"\x89\x01\n\x11UploadPartRequest\x12\x11\n\tupload_id\x18\x01 \x01(\t\x12$\n\x1c\x64\x65stination_resource_address\x18\x02 \x01(\t\x12\x13\n\x0bpart_number\x18\x03 \x01(\r\x12\x17\n\npart_count\x18\x04 \x01(\rH\x00\x88\x01\x01\x42\r\n\x0b_part_count\"w\n\x12UploadPartResponse\x12\x61\n\x14part_write_redirects\x18\x01 \x03(\x0b\x32\x43.nvidia.omniverse.storage.fileobject.v1beta.WriteRedirectProperties\"o\n\x13\x43ompletedUploadPart\x12\x13\n\x0bpart_number\x18\x01 \x01(\r\x12\x43\n\x07headers\x18\x02 \x03(\x0b\x32\x32.nvidia.omniverse.storage.fileobject.v1beta.Header\"\xa9\x01\n\x1e\x43ompleteMultipartUploadRequest\x12\x11\n\tupload_id\x18\x01 \x01(\t\x12$\n\x1c\x64\x65stination_resource_address\x18\x02 \x01(\t\x12N\n\x05parts\x18\x03 \x03(\x0b\x32?.nvidia.omniverse.storage.fileobject.v1beta.CompletedUploadPart\"r\n\x1f\x43ompleteMultipartUploadResponse\x12O\n\rresource_info\x18\x01 \x01(\x0b\x32\x38.nvidia.omniverse.storage.fileobject.v1beta.ResourceInfo\"V\n\x1b\x41\x62ortMultipartUploadRequest\x12\x11\n\tupload_id\x18\x01 \x01(\t\x12$\n\x1c\x64\x65stination_resource_address\x18\x02 \x01(\t\"\x1e\n\x1c\x41\x62ortMultipartUploadResponse\"\x9b\x01\n\rDeleteRequest\x12\x18\n\x10resource_address\x18\x01 \x01(\t\x12[\n\x10previous_version\x18\x02 \x01(\x0b\x32<.nvidia.omniverse.storage.fileobject.v1beta.ResourceIdentityH\x00\x88\x01\x01\x42\x13\n\x11_previous_version\"\x10\n\x0e\x44\x65leteResponse*y\n\x12\x44ownloadPreference\x12#\n\x1f\x44OWNLOAD_PREFERENCE_UNSPECIFIED\x10\x00\x12\x1c\n\x18\x44OWNLOAD_PREFERENCE_BODY\x10\x01\x12 \n\x1c\x44OWNLOAD_PREFERENCE_REDIRECT\x10\x02*\x92\x01\n\x10UploadPreference\x12!\n\x1dUPLOAD_PREFERENCE_UNSPECIFIED\x10\x00\x12\x1a\n\x16UPLOAD_PREFERENCE_BODY\x10\x01\x12\x1e\n\x1aUPLOAD_PREFERENCE_REDIRECT\x10\x02\x12\x1f\n\x1bUPLOAD_PREFERENCE_MULTIPART\x10\x03*\\\n\x0cUploadMethod\x12\x1d\n\x19UPLOAD_METHOD_UNSPECIFIED\x10\x00\x12\x16\n\x12UPLOAD_METHOD_POST\x10\x01\x12\x15\n\x11UPLOAD_METHOD_PUT\x10\x02\x32\x82\r\n\x11\x46ileObjectService\x12\x8a\x01\n\tEnumerate\x12<.nvidia.omniverse.storage.fileobject.v1beta.EnumerateRequest\x1a=.nvidia.omniverse.storage.fileobject.v1beta.EnumerateResponse0\x01\x12y\n\x04Stat\x12\x37.nvidia.omniverse.storage.fileobject.v1beta.StatRequest\x1a\x38.nvidia.omniverse.storage.fileobject.v1beta.StatResponse\x12{\n\x04Read\x12\x37.nvidia.omniverse.storage.fileobject.v1beta.ReadRequest\x1a\x38.nvidia.omniverse.storage.fileobject.v1beta.ReadResponse0\x01\x12\x9c\x01\n\x0fReadFromAddress\x12\x42.nvidia.omniverse.storage.fileobject.v1beta.ReadFromAddressRequest\x1a\x43.nvidia.omniverse.storage.fileobject.v1beta.ReadFromAddressResponse0\x01\x12\xa3\x01\n\x12\x46\x65tchWriteTypeInfo\x12\x45.nvidia.omniverse.storage.fileobject.v1beta.FetchWriteTypeInfoRequest\x1a\x46.nvidia.omniverse.storage.fileobject.v1beta.FetchWriteTypeInfoResponse\x12\x80\x01\n\x05Write\x12\x38.nvidia.omniverse.storage.fileobject.v1beta.WriteRequest\x1a\x39.nvidia.omniverse.storage.fileobject.v1beta.WriteResponse(\x01\x30\x01\x12\xaf\x01\n\x16\x43ompleteRedirectUpload\x12I.nvidia.omniverse.storage.fileobject.v1beta.CompleteRedirectUploadRequest\x1aJ.nvidia.omniverse.storage.fileobject.v1beta.CompleteRedirectUploadResponse\x12\x8b\x01\n\nUploadPart\x12=.nvidia.omniverse.storage.fileobject.v1beta.UploadPartRequest\x1a>.nvidia.omniverse.storage.fileobject.v1beta.UploadPartResponse\x12\xb2\x01\n\x17\x43ompleteMultipartUpload\x12J.nvidia.omniverse.storage.fileobject.v1beta.CompleteMultipartUploadRequest\x1aK.nvidia.omniverse.storage.fileobject.v1beta.CompleteMultipartUploadResponse\x12\xa9\x01\n\x14\x41\x62ortMultipartUpload\x12G.nvidia.omniverse.storage.fileobject.v1beta.AbortMultipartUploadRequest\x1aH.nvidia.omniverse.storage.fileobject.v1beta.AbortMultipartUploadResponse\x12\x7f\n\x06\x44\x65lete\x12\x39.nvidia.omniverse.storage.fileobject.v1beta.DeleteRequest\x1a:.nvidia.omniverse.storage.fileobject.v1beta.DeleteResponseB\x89\x01\n.com.nvidia.omniverse.storage.fileobject.v1betaB\x16\x46ileobjectServiceProtoP\x01Z=pb.api.nvidia.com/omniverse/storage/fileobject/v1beta;storageb\x06proto3')
|
| 29 |
+
|
| 30 |
+
_globals = globals()
|
| 31 |
+
_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
|
| 32 |
+
_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'nvidia.omniverse.storage.fileobject.v1beta.fileobject_service_pb2', _globals)
|
| 33 |
+
if not _descriptor._USE_C_DESCRIPTORS:
|
| 34 |
+
_globals['DESCRIPTOR']._loaded_options = None
|
| 35 |
+
_globals['DESCRIPTOR']._serialized_options = b'\n.com.nvidia.omniverse.storage.fileobject.v1betaB\026FileobjectServiceProtoP\001Z=pb.api.nvidia.com/omniverse/storage/fileobject/v1beta;storage'
|
| 36 |
+
_globals['_DOWNLOADPREFERENCE']._serialized_start=4512
|
| 37 |
+
_globals['_DOWNLOADPREFERENCE']._serialized_end=4633
|
| 38 |
+
_globals['_UPLOADPREFERENCE']._serialized_start=4636
|
| 39 |
+
_globals['_UPLOADPREFERENCE']._serialized_end=4782
|
| 40 |
+
_globals['_UPLOADMETHOD']._serialized_start=4784
|
| 41 |
+
_globals['_UPLOADMETHOD']._serialized_end=4876
|
| 42 |
+
_globals['_ENUMERATEREQUEST']._serialized_start=176
|
| 43 |
+
_globals['_ENUMERATEREQUEST']._serialized_end=220
|
| 44 |
+
_globals['_ENUMERATERESPONSE']._serialized_start=222
|
| 45 |
+
_globals['_ENUMERATERESPONSE']._serialized_end=313
|
| 46 |
+
_globals['_STATREQUEST']._serialized_start=315
|
| 47 |
+
_globals['_STATREQUEST']._serialized_end=354
|
| 48 |
+
_globals['_STATRESPONSE']._serialized_start=356
|
| 49 |
+
_globals['_STATRESPONSE']._serialized_end=451
|
| 50 |
+
_globals['_READREQUEST']._serialized_start=454
|
| 51 |
+
_globals['_READREQUEST']._serialized_end=678
|
| 52 |
+
_globals['_READRESPONSE']._serialized_start=681
|
| 53 |
+
_globals['_READRESPONSE']._serialized_end=925
|
| 54 |
+
_globals['_READFROMADDRESSREQUEST']._serialized_start=928
|
| 55 |
+
_globals['_READFROMADDRESSREQUEST']._serialized_end=1100
|
| 56 |
+
_globals['_READFROMADDRESSRESPONSE']._serialized_start=1103
|
| 57 |
+
_globals['_READFROMADDRESSRESPONSE']._serialized_end=1367
|
| 58 |
+
_globals['_FETCHWRITETYPEINFOREQUEST']._serialized_start=1369
|
| 59 |
+
_globals['_FETCHWRITETYPEINFOREQUEST']._serialized_end=1434
|
| 60 |
+
_globals['_WRITETYPEFORSIZEINTERVAL']._serialized_start=1437
|
| 61 |
+
_globals['_WRITETYPEFORSIZEINTERVAL']._serialized_end=1626
|
| 62 |
+
_globals['_FETCHWRITETYPEINFORESPONSE']._serialized_start=1629
|
| 63 |
+
_globals['_FETCHWRITETYPEINFORESPONSE']._serialized_end=1757
|
| 64 |
+
_globals['_WRITEREQUEST']._serialized_start=1760
|
| 65 |
+
_globals['_WRITEREQUEST']._serialized_end=1943
|
| 66 |
+
_globals['_WRITEPARAMETERS']._serialized_start=1946
|
| 67 |
+
_globals['_WRITEPARAMETERS']._serialized_end=2257
|
| 68 |
+
_globals['_WRITEREDIRECTPROPERTIES']._serialized_start=2260
|
| 69 |
+
_globals['_WRITEREDIRECTPROPERTIES']._serialized_end=2501
|
| 70 |
+
_globals['_WRITECHUNKSACCEPTED']._serialized_start=2503
|
| 71 |
+
_globals['_WRITECHUNKSACCEPTED']._serialized_end=2524
|
| 72 |
+
_globals['_WRITERESPONSE']._serialized_start=2527
|
| 73 |
+
_globals['_WRITERESPONSE']._serialized_end=2944
|
| 74 |
+
_globals['_COMPLETEREDIRECTUPLOADREQUEST']._serialized_start=2947
|
| 75 |
+
_globals['_COMPLETEREDIRECTUPLOADREQUEST']._serialized_end=3096
|
| 76 |
+
_globals['_COMPLETEREDIRECTUPLOADRESPONSE']._serialized_start=3098
|
| 77 |
+
_globals['_COMPLETEREDIRECTUPLOADRESPONSE']._serialized_end=3211
|
| 78 |
+
_globals['_CREATEMULTIPARTUPLOADRESPONSE']._serialized_start=3214
|
| 79 |
+
_globals['_CREATEMULTIPARTUPLOADRESPONSE']._serialized_end=3552
|
| 80 |
+
_globals['_UPLOADPARTREQUEST']._serialized_start=3555
|
| 81 |
+
_globals['_UPLOADPARTREQUEST']._serialized_end=3692
|
| 82 |
+
_globals['_UPLOADPARTRESPONSE']._serialized_start=3694
|
| 83 |
+
_globals['_UPLOADPARTRESPONSE']._serialized_end=3813
|
| 84 |
+
_globals['_COMPLETEDUPLOADPART']._serialized_start=3815
|
| 85 |
+
_globals['_COMPLETEDUPLOADPART']._serialized_end=3926
|
| 86 |
+
_globals['_COMPLETEMULTIPARTUPLOADREQUEST']._serialized_start=3929
|
| 87 |
+
_globals['_COMPLETEMULTIPARTUPLOADREQUEST']._serialized_end=4098
|
| 88 |
+
_globals['_COMPLETEMULTIPARTUPLOADRESPONSE']._serialized_start=4100
|
| 89 |
+
_globals['_COMPLETEMULTIPARTUPLOADRESPONSE']._serialized_end=4214
|
| 90 |
+
_globals['_ABORTMULTIPARTUPLOADREQUEST']._serialized_start=4216
|
| 91 |
+
_globals['_ABORTMULTIPARTUPLOADREQUEST']._serialized_end=4302
|
| 92 |
+
_globals['_ABORTMULTIPARTUPLOADRESPONSE']._serialized_start=4304
|
| 93 |
+
_globals['_ABORTMULTIPARTUPLOADRESPONSE']._serialized_end=4334
|
| 94 |
+
_globals['_DELETEREQUEST']._serialized_start=4337
|
| 95 |
+
_globals['_DELETEREQUEST']._serialized_end=4492
|
| 96 |
+
_globals['_DELETERESPONSE']._serialized_start=4494
|
| 97 |
+
_globals['_DELETERESPONSE']._serialized_end=4510
|
| 98 |
+
_globals['_FILEOBJECTSERVICE']._serialized_start=4879
|
| 99 |
+
_globals['_FILEOBJECTSERVICE']._serialized_end=6545
|
| 100 |
+
# @@protoc_insertion_point(module_scope)
|
docker/hf-space/hf-storage-api/generated/nvidia/omniverse/storage/fileobject/v1beta/fileobject_service_pb2.pyi
ADDED
|
@@ -0,0 +1,262 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
from nvidia.omniverse.storage.fileobject.v1beta import fileobject_pb2 as _fileobject_pb2
|
| 2 |
+
from google.protobuf.internal import containers as _containers
|
| 3 |
+
from google.protobuf.internal import enum_type_wrapper as _enum_type_wrapper
|
| 4 |
+
from google.protobuf import descriptor as _descriptor
|
| 5 |
+
from google.protobuf import message as _message
|
| 6 |
+
from collections.abc import Iterable as _Iterable, Mapping as _Mapping
|
| 7 |
+
from typing import ClassVar as _ClassVar, Optional as _Optional, Union as _Union
|
| 8 |
+
|
| 9 |
+
DESCRIPTOR: _descriptor.FileDescriptor
|
| 10 |
+
|
| 11 |
+
class DownloadPreference(int, metaclass=_enum_type_wrapper.EnumTypeWrapper):
|
| 12 |
+
__slots__ = ()
|
| 13 |
+
DOWNLOAD_PREFERENCE_UNSPECIFIED: _ClassVar[DownloadPreference]
|
| 14 |
+
DOWNLOAD_PREFERENCE_BODY: _ClassVar[DownloadPreference]
|
| 15 |
+
DOWNLOAD_PREFERENCE_REDIRECT: _ClassVar[DownloadPreference]
|
| 16 |
+
|
| 17 |
+
class UploadPreference(int, metaclass=_enum_type_wrapper.EnumTypeWrapper):
|
| 18 |
+
__slots__ = ()
|
| 19 |
+
UPLOAD_PREFERENCE_UNSPECIFIED: _ClassVar[UploadPreference]
|
| 20 |
+
UPLOAD_PREFERENCE_BODY: _ClassVar[UploadPreference]
|
| 21 |
+
UPLOAD_PREFERENCE_REDIRECT: _ClassVar[UploadPreference]
|
| 22 |
+
UPLOAD_PREFERENCE_MULTIPART: _ClassVar[UploadPreference]
|
| 23 |
+
|
| 24 |
+
class UploadMethod(int, metaclass=_enum_type_wrapper.EnumTypeWrapper):
|
| 25 |
+
__slots__ = ()
|
| 26 |
+
UPLOAD_METHOD_UNSPECIFIED: _ClassVar[UploadMethod]
|
| 27 |
+
UPLOAD_METHOD_POST: _ClassVar[UploadMethod]
|
| 28 |
+
UPLOAD_METHOD_PUT: _ClassVar[UploadMethod]
|
| 29 |
+
DOWNLOAD_PREFERENCE_UNSPECIFIED: DownloadPreference
|
| 30 |
+
DOWNLOAD_PREFERENCE_BODY: DownloadPreference
|
| 31 |
+
DOWNLOAD_PREFERENCE_REDIRECT: DownloadPreference
|
| 32 |
+
UPLOAD_PREFERENCE_UNSPECIFIED: UploadPreference
|
| 33 |
+
UPLOAD_PREFERENCE_BODY: UploadPreference
|
| 34 |
+
UPLOAD_PREFERENCE_REDIRECT: UploadPreference
|
| 35 |
+
UPLOAD_PREFERENCE_MULTIPART: UploadPreference
|
| 36 |
+
UPLOAD_METHOD_UNSPECIFIED: UploadMethod
|
| 37 |
+
UPLOAD_METHOD_POST: UploadMethod
|
| 38 |
+
UPLOAD_METHOD_PUT: UploadMethod
|
| 39 |
+
|
| 40 |
+
class EnumerateRequest(_message.Message):
|
| 41 |
+
__slots__ = ("resource_address",)
|
| 42 |
+
RESOURCE_ADDRESS_FIELD_NUMBER: _ClassVar[int]
|
| 43 |
+
resource_address: str
|
| 44 |
+
def __init__(self, resource_address: _Optional[str] = ...) -> None: ...
|
| 45 |
+
|
| 46 |
+
class EnumerateResponse(_message.Message):
|
| 47 |
+
__slots__ = ("items",)
|
| 48 |
+
ITEMS_FIELD_NUMBER: _ClassVar[int]
|
| 49 |
+
items: _containers.RepeatedCompositeFieldContainer[_fileobject_pb2.AddressInfo]
|
| 50 |
+
def __init__(self, items: _Optional[_Iterable[_Union[_fileobject_pb2.AddressInfo, _Mapping]]] = ...) -> None: ...
|
| 51 |
+
|
| 52 |
+
class StatRequest(_message.Message):
|
| 53 |
+
__slots__ = ("resource_address",)
|
| 54 |
+
RESOURCE_ADDRESS_FIELD_NUMBER: _ClassVar[int]
|
| 55 |
+
resource_address: str
|
| 56 |
+
def __init__(self, resource_address: _Optional[str] = ...) -> None: ...
|
| 57 |
+
|
| 58 |
+
class StatResponse(_message.Message):
|
| 59 |
+
__slots__ = ("resource_info",)
|
| 60 |
+
RESOURCE_INFO_FIELD_NUMBER: _ClassVar[int]
|
| 61 |
+
resource_info: _fileobject_pb2.ResourceInfo
|
| 62 |
+
def __init__(self, resource_info: _Optional[_Union[_fileobject_pb2.ResourceInfo, _Mapping]] = ...) -> None: ...
|
| 63 |
+
|
| 64 |
+
class ReadRequest(_message.Message):
|
| 65 |
+
__slots__ = ("resource_identity", "download_preference")
|
| 66 |
+
RESOURCE_IDENTITY_FIELD_NUMBER: _ClassVar[int]
|
| 67 |
+
DOWNLOAD_PREFERENCE_FIELD_NUMBER: _ClassVar[int]
|
| 68 |
+
resource_identity: _fileobject_pb2.ResourceIdentity
|
| 69 |
+
download_preference: DownloadPreference
|
| 70 |
+
def __init__(self, resource_identity: _Optional[_Union[_fileobject_pb2.ResourceIdentity, _Mapping]] = ..., download_preference: _Optional[_Union[DownloadPreference, str]] = ...) -> None: ...
|
| 71 |
+
|
| 72 |
+
class ReadResponse(_message.Message):
|
| 73 |
+
__slots__ = ("metadata", "chunk", "redirect")
|
| 74 |
+
METADATA_FIELD_NUMBER: _ClassVar[int]
|
| 75 |
+
CHUNK_FIELD_NUMBER: _ClassVar[int]
|
| 76 |
+
REDIRECT_FIELD_NUMBER: _ClassVar[int]
|
| 77 |
+
metadata: _fileobject_pb2.Metadata
|
| 78 |
+
chunk: _fileobject_pb2.Chunk
|
| 79 |
+
redirect: _fileobject_pb2.Redirect
|
| 80 |
+
def __init__(self, metadata: _Optional[_Union[_fileobject_pb2.Metadata, _Mapping]] = ..., chunk: _Optional[_Union[_fileobject_pb2.Chunk, _Mapping]] = ..., redirect: _Optional[_Union[_fileobject_pb2.Redirect, _Mapping]] = ...) -> None: ...
|
| 81 |
+
|
| 82 |
+
class ReadFromAddressRequest(_message.Message):
|
| 83 |
+
__slots__ = ("resource_address", "download_preference")
|
| 84 |
+
RESOURCE_ADDRESS_FIELD_NUMBER: _ClassVar[int]
|
| 85 |
+
DOWNLOAD_PREFERENCE_FIELD_NUMBER: _ClassVar[int]
|
| 86 |
+
resource_address: str
|
| 87 |
+
download_preference: DownloadPreference
|
| 88 |
+
def __init__(self, resource_address: _Optional[str] = ..., download_preference: _Optional[_Union[DownloadPreference, str]] = ...) -> None: ...
|
| 89 |
+
|
| 90 |
+
class ReadFromAddressResponse(_message.Message):
|
| 91 |
+
__slots__ = ("resource_info", "chunk", "redirect")
|
| 92 |
+
RESOURCE_INFO_FIELD_NUMBER: _ClassVar[int]
|
| 93 |
+
CHUNK_FIELD_NUMBER: _ClassVar[int]
|
| 94 |
+
REDIRECT_FIELD_NUMBER: _ClassVar[int]
|
| 95 |
+
resource_info: _fileobject_pb2.ResourceInfo
|
| 96 |
+
chunk: _fileobject_pb2.Chunk
|
| 97 |
+
redirect: _fileobject_pb2.Redirect
|
| 98 |
+
def __init__(self, resource_info: _Optional[_Union[_fileobject_pb2.ResourceInfo, _Mapping]] = ..., chunk: _Optional[_Union[_fileobject_pb2.Chunk, _Mapping]] = ..., redirect: _Optional[_Union[_fileobject_pb2.Redirect, _Mapping]] = ...) -> None: ...
|
| 99 |
+
|
| 100 |
+
class FetchWriteTypeInfoRequest(_message.Message):
|
| 101 |
+
__slots__ = ("destination_resource_address",)
|
| 102 |
+
DESTINATION_RESOURCE_ADDRESS_FIELD_NUMBER: _ClassVar[int]
|
| 103 |
+
destination_resource_address: str
|
| 104 |
+
def __init__(self, destination_resource_address: _Optional[str] = ...) -> None: ...
|
| 105 |
+
|
| 106 |
+
class WriteTypeForSizeInterval(_message.Message):
|
| 107 |
+
__slots__ = ("minimum_data_object_size", "maximum_data_object_size", "preferred_upload_method")
|
| 108 |
+
MINIMUM_DATA_OBJECT_SIZE_FIELD_NUMBER: _ClassVar[int]
|
| 109 |
+
MAXIMUM_DATA_OBJECT_SIZE_FIELD_NUMBER: _ClassVar[int]
|
| 110 |
+
PREFERRED_UPLOAD_METHOD_FIELD_NUMBER: _ClassVar[int]
|
| 111 |
+
minimum_data_object_size: int
|
| 112 |
+
maximum_data_object_size: int
|
| 113 |
+
preferred_upload_method: UploadPreference
|
| 114 |
+
def __init__(self, minimum_data_object_size: _Optional[int] = ..., maximum_data_object_size: _Optional[int] = ..., preferred_upload_method: _Optional[_Union[UploadPreference, str]] = ...) -> None: ...
|
| 115 |
+
|
| 116 |
+
class FetchWriteTypeInfoResponse(_message.Message):
|
| 117 |
+
__slots__ = ("write_type_intervals",)
|
| 118 |
+
WRITE_TYPE_INTERVALS_FIELD_NUMBER: _ClassVar[int]
|
| 119 |
+
write_type_intervals: _containers.RepeatedCompositeFieldContainer[WriteTypeForSizeInterval]
|
| 120 |
+
def __init__(self, write_type_intervals: _Optional[_Iterable[_Union[WriteTypeForSizeInterval, _Mapping]]] = ...) -> None: ...
|
| 121 |
+
|
| 122 |
+
class WriteRequest(_message.Message):
|
| 123 |
+
__slots__ = ("params", "chunk")
|
| 124 |
+
PARAMS_FIELD_NUMBER: _ClassVar[int]
|
| 125 |
+
CHUNK_FIELD_NUMBER: _ClassVar[int]
|
| 126 |
+
params: WriteParameters
|
| 127 |
+
chunk: _fileobject_pb2.Chunk
|
| 128 |
+
def __init__(self, params: _Optional[_Union[WriteParameters, _Mapping]] = ..., chunk: _Optional[_Union[_fileobject_pb2.Chunk, _Mapping]] = ...) -> None: ...
|
| 129 |
+
|
| 130 |
+
class WriteParameters(_message.Message):
|
| 131 |
+
__slots__ = ("destination_resource_address", "previous_version", "data_object_size", "upload_preference")
|
| 132 |
+
DESTINATION_RESOURCE_ADDRESS_FIELD_NUMBER: _ClassVar[int]
|
| 133 |
+
PREVIOUS_VERSION_FIELD_NUMBER: _ClassVar[int]
|
| 134 |
+
DATA_OBJECT_SIZE_FIELD_NUMBER: _ClassVar[int]
|
| 135 |
+
UPLOAD_PREFERENCE_FIELD_NUMBER: _ClassVar[int]
|
| 136 |
+
destination_resource_address: str
|
| 137 |
+
previous_version: _fileobject_pb2.ResourceIdentity
|
| 138 |
+
data_object_size: int
|
| 139 |
+
upload_preference: UploadPreference
|
| 140 |
+
def __init__(self, destination_resource_address: _Optional[str] = ..., previous_version: _Optional[_Union[_fileobject_pb2.ResourceIdentity, _Mapping]] = ..., data_object_size: _Optional[int] = ..., upload_preference: _Optional[_Union[UploadPreference, str]] = ...) -> None: ...
|
| 141 |
+
|
| 142 |
+
class WriteRedirectProperties(_message.Message):
|
| 143 |
+
__slots__ = ("redirect_target_url", "method", "additional_headers", "completion_header_names")
|
| 144 |
+
REDIRECT_TARGET_URL_FIELD_NUMBER: _ClassVar[int]
|
| 145 |
+
METHOD_FIELD_NUMBER: _ClassVar[int]
|
| 146 |
+
ADDITIONAL_HEADERS_FIELD_NUMBER: _ClassVar[int]
|
| 147 |
+
COMPLETION_HEADER_NAMES_FIELD_NUMBER: _ClassVar[int]
|
| 148 |
+
redirect_target_url: str
|
| 149 |
+
method: UploadMethod
|
| 150 |
+
additional_headers: _containers.RepeatedCompositeFieldContainer[_fileobject_pb2.Header]
|
| 151 |
+
completion_header_names: _containers.RepeatedScalarFieldContainer[str]
|
| 152 |
+
def __init__(self, redirect_target_url: _Optional[str] = ..., method: _Optional[_Union[UploadMethod, str]] = ..., additional_headers: _Optional[_Iterable[_Union[_fileobject_pb2.Header, _Mapping]]] = ..., completion_header_names: _Optional[_Iterable[str]] = ...) -> None: ...
|
| 153 |
+
|
| 154 |
+
class WriteChunksAccepted(_message.Message):
|
| 155 |
+
__slots__ = ()
|
| 156 |
+
def __init__(self) -> None: ...
|
| 157 |
+
|
| 158 |
+
class WriteResponse(_message.Message):
|
| 159 |
+
__slots__ = ("write_chunks_accepted", "resource_info", "write_redirect", "multipart_upload")
|
| 160 |
+
WRITE_CHUNKS_ACCEPTED_FIELD_NUMBER: _ClassVar[int]
|
| 161 |
+
RESOURCE_INFO_FIELD_NUMBER: _ClassVar[int]
|
| 162 |
+
WRITE_REDIRECT_FIELD_NUMBER: _ClassVar[int]
|
| 163 |
+
MULTIPART_UPLOAD_FIELD_NUMBER: _ClassVar[int]
|
| 164 |
+
write_chunks_accepted: WriteChunksAccepted
|
| 165 |
+
resource_info: _fileobject_pb2.ResourceInfo
|
| 166 |
+
write_redirect: WriteRedirectProperties
|
| 167 |
+
multipart_upload: CreateMultipartUploadResponse
|
| 168 |
+
def __init__(self, write_chunks_accepted: _Optional[_Union[WriteChunksAccepted, _Mapping]] = ..., resource_info: _Optional[_Union[_fileobject_pb2.ResourceInfo, _Mapping]] = ..., write_redirect: _Optional[_Union[WriteRedirectProperties, _Mapping]] = ..., multipart_upload: _Optional[_Union[CreateMultipartUploadResponse, _Mapping]] = ...) -> None: ...
|
| 169 |
+
|
| 170 |
+
class CompleteRedirectUploadRequest(_message.Message):
|
| 171 |
+
__slots__ = ("destination_resource_address", "additional_headers")
|
| 172 |
+
DESTINATION_RESOURCE_ADDRESS_FIELD_NUMBER: _ClassVar[int]
|
| 173 |
+
ADDITIONAL_HEADERS_FIELD_NUMBER: _ClassVar[int]
|
| 174 |
+
destination_resource_address: str
|
| 175 |
+
additional_headers: _containers.RepeatedCompositeFieldContainer[_fileobject_pb2.Header]
|
| 176 |
+
def __init__(self, destination_resource_address: _Optional[str] = ..., additional_headers: _Optional[_Iterable[_Union[_fileobject_pb2.Header, _Mapping]]] = ...) -> None: ...
|
| 177 |
+
|
| 178 |
+
class CompleteRedirectUploadResponse(_message.Message):
|
| 179 |
+
__slots__ = ("resource_info",)
|
| 180 |
+
RESOURCE_INFO_FIELD_NUMBER: _ClassVar[int]
|
| 181 |
+
resource_info: _fileobject_pb2.ResourceInfo
|
| 182 |
+
def __init__(self, resource_info: _Optional[_Union[_fileobject_pb2.ResourceInfo, _Mapping]] = ...) -> None: ...
|
| 183 |
+
|
| 184 |
+
class CreateMultipartUploadResponse(_message.Message):
|
| 185 |
+
__slots__ = ("upload_id", "first_part_write_redirect", "maximum_parts_number", "minimum_size_per_part", "maximum_size_per_part")
|
| 186 |
+
UPLOAD_ID_FIELD_NUMBER: _ClassVar[int]
|
| 187 |
+
FIRST_PART_WRITE_REDIRECT_FIELD_NUMBER: _ClassVar[int]
|
| 188 |
+
MAXIMUM_PARTS_NUMBER_FIELD_NUMBER: _ClassVar[int]
|
| 189 |
+
MINIMUM_SIZE_PER_PART_FIELD_NUMBER: _ClassVar[int]
|
| 190 |
+
MAXIMUM_SIZE_PER_PART_FIELD_NUMBER: _ClassVar[int]
|
| 191 |
+
upload_id: str
|
| 192 |
+
first_part_write_redirect: WriteRedirectProperties
|
| 193 |
+
maximum_parts_number: int
|
| 194 |
+
minimum_size_per_part: int
|
| 195 |
+
maximum_size_per_part: int
|
| 196 |
+
def __init__(self, upload_id: _Optional[str] = ..., first_part_write_redirect: _Optional[_Union[WriteRedirectProperties, _Mapping]] = ..., maximum_parts_number: _Optional[int] = ..., minimum_size_per_part: _Optional[int] = ..., maximum_size_per_part: _Optional[int] = ...) -> None: ...
|
| 197 |
+
|
| 198 |
+
class UploadPartRequest(_message.Message):
|
| 199 |
+
__slots__ = ("upload_id", "destination_resource_address", "part_number", "part_count")
|
| 200 |
+
UPLOAD_ID_FIELD_NUMBER: _ClassVar[int]
|
| 201 |
+
DESTINATION_RESOURCE_ADDRESS_FIELD_NUMBER: _ClassVar[int]
|
| 202 |
+
PART_NUMBER_FIELD_NUMBER: _ClassVar[int]
|
| 203 |
+
PART_COUNT_FIELD_NUMBER: _ClassVar[int]
|
| 204 |
+
upload_id: str
|
| 205 |
+
destination_resource_address: str
|
| 206 |
+
part_number: int
|
| 207 |
+
part_count: int
|
| 208 |
+
def __init__(self, upload_id: _Optional[str] = ..., destination_resource_address: _Optional[str] = ..., part_number: _Optional[int] = ..., part_count: _Optional[int] = ...) -> None: ...
|
| 209 |
+
|
| 210 |
+
class UploadPartResponse(_message.Message):
|
| 211 |
+
__slots__ = ("part_write_redirects",)
|
| 212 |
+
PART_WRITE_REDIRECTS_FIELD_NUMBER: _ClassVar[int]
|
| 213 |
+
part_write_redirects: _containers.RepeatedCompositeFieldContainer[WriteRedirectProperties]
|
| 214 |
+
def __init__(self, part_write_redirects: _Optional[_Iterable[_Union[WriteRedirectProperties, _Mapping]]] = ...) -> None: ...
|
| 215 |
+
|
| 216 |
+
class CompletedUploadPart(_message.Message):
|
| 217 |
+
__slots__ = ("part_number", "headers")
|
| 218 |
+
PART_NUMBER_FIELD_NUMBER: _ClassVar[int]
|
| 219 |
+
HEADERS_FIELD_NUMBER: _ClassVar[int]
|
| 220 |
+
part_number: int
|
| 221 |
+
headers: _containers.RepeatedCompositeFieldContainer[_fileobject_pb2.Header]
|
| 222 |
+
def __init__(self, part_number: _Optional[int] = ..., headers: _Optional[_Iterable[_Union[_fileobject_pb2.Header, _Mapping]]] = ...) -> None: ...
|
| 223 |
+
|
| 224 |
+
class CompleteMultipartUploadRequest(_message.Message):
|
| 225 |
+
__slots__ = ("upload_id", "destination_resource_address", "parts")
|
| 226 |
+
UPLOAD_ID_FIELD_NUMBER: _ClassVar[int]
|
| 227 |
+
DESTINATION_RESOURCE_ADDRESS_FIELD_NUMBER: _ClassVar[int]
|
| 228 |
+
PARTS_FIELD_NUMBER: _ClassVar[int]
|
| 229 |
+
upload_id: str
|
| 230 |
+
destination_resource_address: str
|
| 231 |
+
parts: _containers.RepeatedCompositeFieldContainer[CompletedUploadPart]
|
| 232 |
+
def __init__(self, upload_id: _Optional[str] = ..., destination_resource_address: _Optional[str] = ..., parts: _Optional[_Iterable[_Union[CompletedUploadPart, _Mapping]]] = ...) -> None: ...
|
| 233 |
+
|
| 234 |
+
class CompleteMultipartUploadResponse(_message.Message):
|
| 235 |
+
__slots__ = ("resource_info",)
|
| 236 |
+
RESOURCE_INFO_FIELD_NUMBER: _ClassVar[int]
|
| 237 |
+
resource_info: _fileobject_pb2.ResourceInfo
|
| 238 |
+
def __init__(self, resource_info: _Optional[_Union[_fileobject_pb2.ResourceInfo, _Mapping]] = ...) -> None: ...
|
| 239 |
+
|
| 240 |
+
class AbortMultipartUploadRequest(_message.Message):
|
| 241 |
+
__slots__ = ("upload_id", "destination_resource_address")
|
| 242 |
+
UPLOAD_ID_FIELD_NUMBER: _ClassVar[int]
|
| 243 |
+
DESTINATION_RESOURCE_ADDRESS_FIELD_NUMBER: _ClassVar[int]
|
| 244 |
+
upload_id: str
|
| 245 |
+
destination_resource_address: str
|
| 246 |
+
def __init__(self, upload_id: _Optional[str] = ..., destination_resource_address: _Optional[str] = ...) -> None: ...
|
| 247 |
+
|
| 248 |
+
class AbortMultipartUploadResponse(_message.Message):
|
| 249 |
+
__slots__ = ()
|
| 250 |
+
def __init__(self) -> None: ...
|
| 251 |
+
|
| 252 |
+
class DeleteRequest(_message.Message):
|
| 253 |
+
__slots__ = ("resource_address", "previous_version")
|
| 254 |
+
RESOURCE_ADDRESS_FIELD_NUMBER: _ClassVar[int]
|
| 255 |
+
PREVIOUS_VERSION_FIELD_NUMBER: _ClassVar[int]
|
| 256 |
+
resource_address: str
|
| 257 |
+
previous_version: _fileobject_pb2.ResourceIdentity
|
| 258 |
+
def __init__(self, resource_address: _Optional[str] = ..., previous_version: _Optional[_Union[_fileobject_pb2.ResourceIdentity, _Mapping]] = ...) -> None: ...
|
| 259 |
+
|
| 260 |
+
class DeleteResponse(_message.Message):
|
| 261 |
+
__slots__ = ()
|
| 262 |
+
def __init__(self) -> None: ...
|
docker/hf-space/hf-storage-api/generated/nvidia/omniverse/storage/fileobject/v1beta/fileobject_service_pb2_grpc.py
ADDED
|
@@ -0,0 +1,527 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
|
| 2 |
+
"""Client and server classes corresponding to protobuf-defined services."""
|
| 3 |
+
import grpc
|
| 4 |
+
import warnings
|
| 5 |
+
|
| 6 |
+
from nvidia.omniverse.storage.fileobject.v1beta import fileobject_service_pb2 as nvidia_dot_omniverse_dot_storage_dot_fileobject_dot_v1beta_dot_fileobject__service__pb2
|
| 7 |
+
|
| 8 |
+
GRPC_GENERATED_VERSION = '1.80.0'
|
| 9 |
+
GRPC_VERSION = grpc.__version__
|
| 10 |
+
_version_not_supported = False
|
| 11 |
+
|
| 12 |
+
try:
|
| 13 |
+
from grpc._utilities import first_version_is_lower
|
| 14 |
+
_version_not_supported = first_version_is_lower(GRPC_VERSION, GRPC_GENERATED_VERSION)
|
| 15 |
+
except ImportError:
|
| 16 |
+
_version_not_supported = True
|
| 17 |
+
|
| 18 |
+
if _version_not_supported:
|
| 19 |
+
raise RuntimeError(
|
| 20 |
+
f'The grpc package installed is at version {GRPC_VERSION},'
|
| 21 |
+
+ ' but the generated code in nvidia/omniverse/storage/fileobject/v1beta/fileobject_service_pb2_grpc.py depends on'
|
| 22 |
+
+ f' grpcio>={GRPC_GENERATED_VERSION}.'
|
| 23 |
+
+ f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}'
|
| 24 |
+
+ f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.'
|
| 25 |
+
)
|
| 26 |
+
|
| 27 |
+
|
| 28 |
+
class FileObjectServiceStub(object):
|
| 29 |
+
"""Missing associated documentation comment in .proto file."""
|
| 30 |
+
|
| 31 |
+
def __init__(self, channel):
|
| 32 |
+
"""Constructor.
|
| 33 |
+
|
| 34 |
+
Args:
|
| 35 |
+
channel: A grpc.Channel.
|
| 36 |
+
"""
|
| 37 |
+
self.Enumerate = channel.unary_stream(
|
| 38 |
+
'/nvidia.omniverse.storage.fileobject.v1beta.FileObjectService/Enumerate',
|
| 39 |
+
request_serializer=nvidia_dot_omniverse_dot_storage_dot_fileobject_dot_v1beta_dot_fileobject__service__pb2.EnumerateRequest.SerializeToString,
|
| 40 |
+
response_deserializer=nvidia_dot_omniverse_dot_storage_dot_fileobject_dot_v1beta_dot_fileobject__service__pb2.EnumerateResponse.FromString,
|
| 41 |
+
_registered_method=True)
|
| 42 |
+
self.Stat = channel.unary_unary(
|
| 43 |
+
'/nvidia.omniverse.storage.fileobject.v1beta.FileObjectService/Stat',
|
| 44 |
+
request_serializer=nvidia_dot_omniverse_dot_storage_dot_fileobject_dot_v1beta_dot_fileobject__service__pb2.StatRequest.SerializeToString,
|
| 45 |
+
response_deserializer=nvidia_dot_omniverse_dot_storage_dot_fileobject_dot_v1beta_dot_fileobject__service__pb2.StatResponse.FromString,
|
| 46 |
+
_registered_method=True)
|
| 47 |
+
self.Read = channel.unary_stream(
|
| 48 |
+
'/nvidia.omniverse.storage.fileobject.v1beta.FileObjectService/Read',
|
| 49 |
+
request_serializer=nvidia_dot_omniverse_dot_storage_dot_fileobject_dot_v1beta_dot_fileobject__service__pb2.ReadRequest.SerializeToString,
|
| 50 |
+
response_deserializer=nvidia_dot_omniverse_dot_storage_dot_fileobject_dot_v1beta_dot_fileobject__service__pb2.ReadResponse.FromString,
|
| 51 |
+
_registered_method=True)
|
| 52 |
+
self.ReadFromAddress = channel.unary_stream(
|
| 53 |
+
'/nvidia.omniverse.storage.fileobject.v1beta.FileObjectService/ReadFromAddress',
|
| 54 |
+
request_serializer=nvidia_dot_omniverse_dot_storage_dot_fileobject_dot_v1beta_dot_fileobject__service__pb2.ReadFromAddressRequest.SerializeToString,
|
| 55 |
+
response_deserializer=nvidia_dot_omniverse_dot_storage_dot_fileobject_dot_v1beta_dot_fileobject__service__pb2.ReadFromAddressResponse.FromString,
|
| 56 |
+
_registered_method=True)
|
| 57 |
+
self.FetchWriteTypeInfo = channel.unary_unary(
|
| 58 |
+
'/nvidia.omniverse.storage.fileobject.v1beta.FileObjectService/FetchWriteTypeInfo',
|
| 59 |
+
request_serializer=nvidia_dot_omniverse_dot_storage_dot_fileobject_dot_v1beta_dot_fileobject__service__pb2.FetchWriteTypeInfoRequest.SerializeToString,
|
| 60 |
+
response_deserializer=nvidia_dot_omniverse_dot_storage_dot_fileobject_dot_v1beta_dot_fileobject__service__pb2.FetchWriteTypeInfoResponse.FromString,
|
| 61 |
+
_registered_method=True)
|
| 62 |
+
self.Write = channel.stream_stream(
|
| 63 |
+
'/nvidia.omniverse.storage.fileobject.v1beta.FileObjectService/Write',
|
| 64 |
+
request_serializer=nvidia_dot_omniverse_dot_storage_dot_fileobject_dot_v1beta_dot_fileobject__service__pb2.WriteRequest.SerializeToString,
|
| 65 |
+
response_deserializer=nvidia_dot_omniverse_dot_storage_dot_fileobject_dot_v1beta_dot_fileobject__service__pb2.WriteResponse.FromString,
|
| 66 |
+
_registered_method=True)
|
| 67 |
+
self.CompleteRedirectUpload = channel.unary_unary(
|
| 68 |
+
'/nvidia.omniverse.storage.fileobject.v1beta.FileObjectService/CompleteRedirectUpload',
|
| 69 |
+
request_serializer=nvidia_dot_omniverse_dot_storage_dot_fileobject_dot_v1beta_dot_fileobject__service__pb2.CompleteRedirectUploadRequest.SerializeToString,
|
| 70 |
+
response_deserializer=nvidia_dot_omniverse_dot_storage_dot_fileobject_dot_v1beta_dot_fileobject__service__pb2.CompleteRedirectUploadResponse.FromString,
|
| 71 |
+
_registered_method=True)
|
| 72 |
+
self.UploadPart = channel.unary_unary(
|
| 73 |
+
'/nvidia.omniverse.storage.fileobject.v1beta.FileObjectService/UploadPart',
|
| 74 |
+
request_serializer=nvidia_dot_omniverse_dot_storage_dot_fileobject_dot_v1beta_dot_fileobject__service__pb2.UploadPartRequest.SerializeToString,
|
| 75 |
+
response_deserializer=nvidia_dot_omniverse_dot_storage_dot_fileobject_dot_v1beta_dot_fileobject__service__pb2.UploadPartResponse.FromString,
|
| 76 |
+
_registered_method=True)
|
| 77 |
+
self.CompleteMultipartUpload = channel.unary_unary(
|
| 78 |
+
'/nvidia.omniverse.storage.fileobject.v1beta.FileObjectService/CompleteMultipartUpload',
|
| 79 |
+
request_serializer=nvidia_dot_omniverse_dot_storage_dot_fileobject_dot_v1beta_dot_fileobject__service__pb2.CompleteMultipartUploadRequest.SerializeToString,
|
| 80 |
+
response_deserializer=nvidia_dot_omniverse_dot_storage_dot_fileobject_dot_v1beta_dot_fileobject__service__pb2.CompleteMultipartUploadResponse.FromString,
|
| 81 |
+
_registered_method=True)
|
| 82 |
+
self.AbortMultipartUpload = channel.unary_unary(
|
| 83 |
+
'/nvidia.omniverse.storage.fileobject.v1beta.FileObjectService/AbortMultipartUpload',
|
| 84 |
+
request_serializer=nvidia_dot_omniverse_dot_storage_dot_fileobject_dot_v1beta_dot_fileobject__service__pb2.AbortMultipartUploadRequest.SerializeToString,
|
| 85 |
+
response_deserializer=nvidia_dot_omniverse_dot_storage_dot_fileobject_dot_v1beta_dot_fileobject__service__pb2.AbortMultipartUploadResponse.FromString,
|
| 86 |
+
_registered_method=True)
|
| 87 |
+
self.Delete = channel.unary_unary(
|
| 88 |
+
'/nvidia.omniverse.storage.fileobject.v1beta.FileObjectService/Delete',
|
| 89 |
+
request_serializer=nvidia_dot_omniverse_dot_storage_dot_fileobject_dot_v1beta_dot_fileobject__service__pb2.DeleteRequest.SerializeToString,
|
| 90 |
+
response_deserializer=nvidia_dot_omniverse_dot_storage_dot_fileobject_dot_v1beta_dot_fileobject__service__pb2.DeleteResponse.FromString,
|
| 91 |
+
_registered_method=True)
|
| 92 |
+
|
| 93 |
+
|
| 94 |
+
class FileObjectServiceServicer(object):
|
| 95 |
+
"""Missing associated documentation comment in .proto file."""
|
| 96 |
+
|
| 97 |
+
def Enumerate(self, request, context):
|
| 98 |
+
"""Missing associated documentation comment in .proto file."""
|
| 99 |
+
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
| 100 |
+
context.set_details('Method not implemented!')
|
| 101 |
+
raise NotImplementedError('Method not implemented!')
|
| 102 |
+
|
| 103 |
+
def Stat(self, request, context):
|
| 104 |
+
"""Missing associated documentation comment in .proto file."""
|
| 105 |
+
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
| 106 |
+
context.set_details('Method not implemented!')
|
| 107 |
+
raise NotImplementedError('Method not implemented!')
|
| 108 |
+
|
| 109 |
+
def Read(self, request, context):
|
| 110 |
+
"""Missing associated documentation comment in .proto file."""
|
| 111 |
+
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
| 112 |
+
context.set_details('Method not implemented!')
|
| 113 |
+
raise NotImplementedError('Method not implemented!')
|
| 114 |
+
|
| 115 |
+
def ReadFromAddress(self, request, context):
|
| 116 |
+
"""Missing associated documentation comment in .proto file."""
|
| 117 |
+
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
| 118 |
+
context.set_details('Method not implemented!')
|
| 119 |
+
raise NotImplementedError('Method not implemented!')
|
| 120 |
+
|
| 121 |
+
def FetchWriteTypeInfo(self, request, context):
|
| 122 |
+
"""Missing associated documentation comment in .proto file."""
|
| 123 |
+
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
| 124 |
+
context.set_details('Method not implemented!')
|
| 125 |
+
raise NotImplementedError('Method not implemented!')
|
| 126 |
+
|
| 127 |
+
def Write(self, request_iterator, context):
|
| 128 |
+
"""Missing associated documentation comment in .proto file."""
|
| 129 |
+
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
| 130 |
+
context.set_details('Method not implemented!')
|
| 131 |
+
raise NotImplementedError('Method not implemented!')
|
| 132 |
+
|
| 133 |
+
def CompleteRedirectUpload(self, request, context):
|
| 134 |
+
"""Missing associated documentation comment in .proto file."""
|
| 135 |
+
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
| 136 |
+
context.set_details('Method not implemented!')
|
| 137 |
+
raise NotImplementedError('Method not implemented!')
|
| 138 |
+
|
| 139 |
+
def UploadPart(self, request, context):
|
| 140 |
+
"""Missing associated documentation comment in .proto file."""
|
| 141 |
+
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
| 142 |
+
context.set_details('Method not implemented!')
|
| 143 |
+
raise NotImplementedError('Method not implemented!')
|
| 144 |
+
|
| 145 |
+
def CompleteMultipartUpload(self, request, context):
|
| 146 |
+
"""Missing associated documentation comment in .proto file."""
|
| 147 |
+
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
| 148 |
+
context.set_details('Method not implemented!')
|
| 149 |
+
raise NotImplementedError('Method not implemented!')
|
| 150 |
+
|
| 151 |
+
def AbortMultipartUpload(self, request, context):
|
| 152 |
+
"""Missing associated documentation comment in .proto file."""
|
| 153 |
+
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
| 154 |
+
context.set_details('Method not implemented!')
|
| 155 |
+
raise NotImplementedError('Method not implemented!')
|
| 156 |
+
|
| 157 |
+
def Delete(self, request, context):
|
| 158 |
+
"""Missing associated documentation comment in .proto file."""
|
| 159 |
+
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
| 160 |
+
context.set_details('Method not implemented!')
|
| 161 |
+
raise NotImplementedError('Method not implemented!')
|
| 162 |
+
|
| 163 |
+
|
| 164 |
+
def add_FileObjectServiceServicer_to_server(servicer, server):
|
| 165 |
+
rpc_method_handlers = {
|
| 166 |
+
'Enumerate': grpc.unary_stream_rpc_method_handler(
|
| 167 |
+
servicer.Enumerate,
|
| 168 |
+
request_deserializer=nvidia_dot_omniverse_dot_storage_dot_fileobject_dot_v1beta_dot_fileobject__service__pb2.EnumerateRequest.FromString,
|
| 169 |
+
response_serializer=nvidia_dot_omniverse_dot_storage_dot_fileobject_dot_v1beta_dot_fileobject__service__pb2.EnumerateResponse.SerializeToString,
|
| 170 |
+
),
|
| 171 |
+
'Stat': grpc.unary_unary_rpc_method_handler(
|
| 172 |
+
servicer.Stat,
|
| 173 |
+
request_deserializer=nvidia_dot_omniverse_dot_storage_dot_fileobject_dot_v1beta_dot_fileobject__service__pb2.StatRequest.FromString,
|
| 174 |
+
response_serializer=nvidia_dot_omniverse_dot_storage_dot_fileobject_dot_v1beta_dot_fileobject__service__pb2.StatResponse.SerializeToString,
|
| 175 |
+
),
|
| 176 |
+
'Read': grpc.unary_stream_rpc_method_handler(
|
| 177 |
+
servicer.Read,
|
| 178 |
+
request_deserializer=nvidia_dot_omniverse_dot_storage_dot_fileobject_dot_v1beta_dot_fileobject__service__pb2.ReadRequest.FromString,
|
| 179 |
+
response_serializer=nvidia_dot_omniverse_dot_storage_dot_fileobject_dot_v1beta_dot_fileobject__service__pb2.ReadResponse.SerializeToString,
|
| 180 |
+
),
|
| 181 |
+
'ReadFromAddress': grpc.unary_stream_rpc_method_handler(
|
| 182 |
+
servicer.ReadFromAddress,
|
| 183 |
+
request_deserializer=nvidia_dot_omniverse_dot_storage_dot_fileobject_dot_v1beta_dot_fileobject__service__pb2.ReadFromAddressRequest.FromString,
|
| 184 |
+
response_serializer=nvidia_dot_omniverse_dot_storage_dot_fileobject_dot_v1beta_dot_fileobject__service__pb2.ReadFromAddressResponse.SerializeToString,
|
| 185 |
+
),
|
| 186 |
+
'FetchWriteTypeInfo': grpc.unary_unary_rpc_method_handler(
|
| 187 |
+
servicer.FetchWriteTypeInfo,
|
| 188 |
+
request_deserializer=nvidia_dot_omniverse_dot_storage_dot_fileobject_dot_v1beta_dot_fileobject__service__pb2.FetchWriteTypeInfoRequest.FromString,
|
| 189 |
+
response_serializer=nvidia_dot_omniverse_dot_storage_dot_fileobject_dot_v1beta_dot_fileobject__service__pb2.FetchWriteTypeInfoResponse.SerializeToString,
|
| 190 |
+
),
|
| 191 |
+
'Write': grpc.stream_stream_rpc_method_handler(
|
| 192 |
+
servicer.Write,
|
| 193 |
+
request_deserializer=nvidia_dot_omniverse_dot_storage_dot_fileobject_dot_v1beta_dot_fileobject__service__pb2.WriteRequest.FromString,
|
| 194 |
+
response_serializer=nvidia_dot_omniverse_dot_storage_dot_fileobject_dot_v1beta_dot_fileobject__service__pb2.WriteResponse.SerializeToString,
|
| 195 |
+
),
|
| 196 |
+
'CompleteRedirectUpload': grpc.unary_unary_rpc_method_handler(
|
| 197 |
+
servicer.CompleteRedirectUpload,
|
| 198 |
+
request_deserializer=nvidia_dot_omniverse_dot_storage_dot_fileobject_dot_v1beta_dot_fileobject__service__pb2.CompleteRedirectUploadRequest.FromString,
|
| 199 |
+
response_serializer=nvidia_dot_omniverse_dot_storage_dot_fileobject_dot_v1beta_dot_fileobject__service__pb2.CompleteRedirectUploadResponse.SerializeToString,
|
| 200 |
+
),
|
| 201 |
+
'UploadPart': grpc.unary_unary_rpc_method_handler(
|
| 202 |
+
servicer.UploadPart,
|
| 203 |
+
request_deserializer=nvidia_dot_omniverse_dot_storage_dot_fileobject_dot_v1beta_dot_fileobject__service__pb2.UploadPartRequest.FromString,
|
| 204 |
+
response_serializer=nvidia_dot_omniverse_dot_storage_dot_fileobject_dot_v1beta_dot_fileobject__service__pb2.UploadPartResponse.SerializeToString,
|
| 205 |
+
),
|
| 206 |
+
'CompleteMultipartUpload': grpc.unary_unary_rpc_method_handler(
|
| 207 |
+
servicer.CompleteMultipartUpload,
|
| 208 |
+
request_deserializer=nvidia_dot_omniverse_dot_storage_dot_fileobject_dot_v1beta_dot_fileobject__service__pb2.CompleteMultipartUploadRequest.FromString,
|
| 209 |
+
response_serializer=nvidia_dot_omniverse_dot_storage_dot_fileobject_dot_v1beta_dot_fileobject__service__pb2.CompleteMultipartUploadResponse.SerializeToString,
|
| 210 |
+
),
|
| 211 |
+
'AbortMultipartUpload': grpc.unary_unary_rpc_method_handler(
|
| 212 |
+
servicer.AbortMultipartUpload,
|
| 213 |
+
request_deserializer=nvidia_dot_omniverse_dot_storage_dot_fileobject_dot_v1beta_dot_fileobject__service__pb2.AbortMultipartUploadRequest.FromString,
|
| 214 |
+
response_serializer=nvidia_dot_omniverse_dot_storage_dot_fileobject_dot_v1beta_dot_fileobject__service__pb2.AbortMultipartUploadResponse.SerializeToString,
|
| 215 |
+
),
|
| 216 |
+
'Delete': grpc.unary_unary_rpc_method_handler(
|
| 217 |
+
servicer.Delete,
|
| 218 |
+
request_deserializer=nvidia_dot_omniverse_dot_storage_dot_fileobject_dot_v1beta_dot_fileobject__service__pb2.DeleteRequest.FromString,
|
| 219 |
+
response_serializer=nvidia_dot_omniverse_dot_storage_dot_fileobject_dot_v1beta_dot_fileobject__service__pb2.DeleteResponse.SerializeToString,
|
| 220 |
+
),
|
| 221 |
+
}
|
| 222 |
+
generic_handler = grpc.method_handlers_generic_handler(
|
| 223 |
+
'nvidia.omniverse.storage.fileobject.v1beta.FileObjectService', rpc_method_handlers)
|
| 224 |
+
server.add_generic_rpc_handlers((generic_handler,))
|
| 225 |
+
server.add_registered_method_handlers('nvidia.omniverse.storage.fileobject.v1beta.FileObjectService', rpc_method_handlers)
|
| 226 |
+
|
| 227 |
+
|
| 228 |
+
# This class is part of an EXPERIMENTAL API.
|
| 229 |
+
class FileObjectService(object):
|
| 230 |
+
"""Missing associated documentation comment in .proto file."""
|
| 231 |
+
|
| 232 |
+
@staticmethod
|
| 233 |
+
def Enumerate(request,
|
| 234 |
+
target,
|
| 235 |
+
options=(),
|
| 236 |
+
channel_credentials=None,
|
| 237 |
+
call_credentials=None,
|
| 238 |
+
insecure=False,
|
| 239 |
+
compression=None,
|
| 240 |
+
wait_for_ready=None,
|
| 241 |
+
timeout=None,
|
| 242 |
+
metadata=None):
|
| 243 |
+
return grpc.experimental.unary_stream(
|
| 244 |
+
request,
|
| 245 |
+
target,
|
| 246 |
+
'/nvidia.omniverse.storage.fileobject.v1beta.FileObjectService/Enumerate',
|
| 247 |
+
nvidia_dot_omniverse_dot_storage_dot_fileobject_dot_v1beta_dot_fileobject__service__pb2.EnumerateRequest.SerializeToString,
|
| 248 |
+
nvidia_dot_omniverse_dot_storage_dot_fileobject_dot_v1beta_dot_fileobject__service__pb2.EnumerateResponse.FromString,
|
| 249 |
+
options,
|
| 250 |
+
channel_credentials,
|
| 251 |
+
insecure,
|
| 252 |
+
call_credentials,
|
| 253 |
+
compression,
|
| 254 |
+
wait_for_ready,
|
| 255 |
+
timeout,
|
| 256 |
+
metadata,
|
| 257 |
+
_registered_method=True)
|
| 258 |
+
|
| 259 |
+
@staticmethod
|
| 260 |
+
def Stat(request,
|
| 261 |
+
target,
|
| 262 |
+
options=(),
|
| 263 |
+
channel_credentials=None,
|
| 264 |
+
call_credentials=None,
|
| 265 |
+
insecure=False,
|
| 266 |
+
compression=None,
|
| 267 |
+
wait_for_ready=None,
|
| 268 |
+
timeout=None,
|
| 269 |
+
metadata=None):
|
| 270 |
+
return grpc.experimental.unary_unary(
|
| 271 |
+
request,
|
| 272 |
+
target,
|
| 273 |
+
'/nvidia.omniverse.storage.fileobject.v1beta.FileObjectService/Stat',
|
| 274 |
+
nvidia_dot_omniverse_dot_storage_dot_fileobject_dot_v1beta_dot_fileobject__service__pb2.StatRequest.SerializeToString,
|
| 275 |
+
nvidia_dot_omniverse_dot_storage_dot_fileobject_dot_v1beta_dot_fileobject__service__pb2.StatResponse.FromString,
|
| 276 |
+
options,
|
| 277 |
+
channel_credentials,
|
| 278 |
+
insecure,
|
| 279 |
+
call_credentials,
|
| 280 |
+
compression,
|
| 281 |
+
wait_for_ready,
|
| 282 |
+
timeout,
|
| 283 |
+
metadata,
|
| 284 |
+
_registered_method=True)
|
| 285 |
+
|
| 286 |
+
@staticmethod
|
| 287 |
+
def Read(request,
|
| 288 |
+
target,
|
| 289 |
+
options=(),
|
| 290 |
+
channel_credentials=None,
|
| 291 |
+
call_credentials=None,
|
| 292 |
+
insecure=False,
|
| 293 |
+
compression=None,
|
| 294 |
+
wait_for_ready=None,
|
| 295 |
+
timeout=None,
|
| 296 |
+
metadata=None):
|
| 297 |
+
return grpc.experimental.unary_stream(
|
| 298 |
+
request,
|
| 299 |
+
target,
|
| 300 |
+
'/nvidia.omniverse.storage.fileobject.v1beta.FileObjectService/Read',
|
| 301 |
+
nvidia_dot_omniverse_dot_storage_dot_fileobject_dot_v1beta_dot_fileobject__service__pb2.ReadRequest.SerializeToString,
|
| 302 |
+
nvidia_dot_omniverse_dot_storage_dot_fileobject_dot_v1beta_dot_fileobject__service__pb2.ReadResponse.FromString,
|
| 303 |
+
options,
|
| 304 |
+
channel_credentials,
|
| 305 |
+
insecure,
|
| 306 |
+
call_credentials,
|
| 307 |
+
compression,
|
| 308 |
+
wait_for_ready,
|
| 309 |
+
timeout,
|
| 310 |
+
metadata,
|
| 311 |
+
_registered_method=True)
|
| 312 |
+
|
| 313 |
+
@staticmethod
|
| 314 |
+
def ReadFromAddress(request,
|
| 315 |
+
target,
|
| 316 |
+
options=(),
|
| 317 |
+
channel_credentials=None,
|
| 318 |
+
call_credentials=None,
|
| 319 |
+
insecure=False,
|
| 320 |
+
compression=None,
|
| 321 |
+
wait_for_ready=None,
|
| 322 |
+
timeout=None,
|
| 323 |
+
metadata=None):
|
| 324 |
+
return grpc.experimental.unary_stream(
|
| 325 |
+
request,
|
| 326 |
+
target,
|
| 327 |
+
'/nvidia.omniverse.storage.fileobject.v1beta.FileObjectService/ReadFromAddress',
|
| 328 |
+
nvidia_dot_omniverse_dot_storage_dot_fileobject_dot_v1beta_dot_fileobject__service__pb2.ReadFromAddressRequest.SerializeToString,
|
| 329 |
+
nvidia_dot_omniverse_dot_storage_dot_fileobject_dot_v1beta_dot_fileobject__service__pb2.ReadFromAddressResponse.FromString,
|
| 330 |
+
options,
|
| 331 |
+
channel_credentials,
|
| 332 |
+
insecure,
|
| 333 |
+
call_credentials,
|
| 334 |
+
compression,
|
| 335 |
+
wait_for_ready,
|
| 336 |
+
timeout,
|
| 337 |
+
metadata,
|
| 338 |
+
_registered_method=True)
|
| 339 |
+
|
| 340 |
+
@staticmethod
|
| 341 |
+
def FetchWriteTypeInfo(request,
|
| 342 |
+
target,
|
| 343 |
+
options=(),
|
| 344 |
+
channel_credentials=None,
|
| 345 |
+
call_credentials=None,
|
| 346 |
+
insecure=False,
|
| 347 |
+
compression=None,
|
| 348 |
+
wait_for_ready=None,
|
| 349 |
+
timeout=None,
|
| 350 |
+
metadata=None):
|
| 351 |
+
return grpc.experimental.unary_unary(
|
| 352 |
+
request,
|
| 353 |
+
target,
|
| 354 |
+
'/nvidia.omniverse.storage.fileobject.v1beta.FileObjectService/FetchWriteTypeInfo',
|
| 355 |
+
nvidia_dot_omniverse_dot_storage_dot_fileobject_dot_v1beta_dot_fileobject__service__pb2.FetchWriteTypeInfoRequest.SerializeToString,
|
| 356 |
+
nvidia_dot_omniverse_dot_storage_dot_fileobject_dot_v1beta_dot_fileobject__service__pb2.FetchWriteTypeInfoResponse.FromString,
|
| 357 |
+
options,
|
| 358 |
+
channel_credentials,
|
| 359 |
+
insecure,
|
| 360 |
+
call_credentials,
|
| 361 |
+
compression,
|
| 362 |
+
wait_for_ready,
|
| 363 |
+
timeout,
|
| 364 |
+
metadata,
|
| 365 |
+
_registered_method=True)
|
| 366 |
+
|
| 367 |
+
@staticmethod
|
| 368 |
+
def Write(request_iterator,
|
| 369 |
+
target,
|
| 370 |
+
options=(),
|
| 371 |
+
channel_credentials=None,
|
| 372 |
+
call_credentials=None,
|
| 373 |
+
insecure=False,
|
| 374 |
+
compression=None,
|
| 375 |
+
wait_for_ready=None,
|
| 376 |
+
timeout=None,
|
| 377 |
+
metadata=None):
|
| 378 |
+
return grpc.experimental.stream_stream(
|
| 379 |
+
request_iterator,
|
| 380 |
+
target,
|
| 381 |
+
'/nvidia.omniverse.storage.fileobject.v1beta.FileObjectService/Write',
|
| 382 |
+
nvidia_dot_omniverse_dot_storage_dot_fileobject_dot_v1beta_dot_fileobject__service__pb2.WriteRequest.SerializeToString,
|
| 383 |
+
nvidia_dot_omniverse_dot_storage_dot_fileobject_dot_v1beta_dot_fileobject__service__pb2.WriteResponse.FromString,
|
| 384 |
+
options,
|
| 385 |
+
channel_credentials,
|
| 386 |
+
insecure,
|
| 387 |
+
call_credentials,
|
| 388 |
+
compression,
|
| 389 |
+
wait_for_ready,
|
| 390 |
+
timeout,
|
| 391 |
+
metadata,
|
| 392 |
+
_registered_method=True)
|
| 393 |
+
|
| 394 |
+
@staticmethod
|
| 395 |
+
def CompleteRedirectUpload(request,
|
| 396 |
+
target,
|
| 397 |
+
options=(),
|
| 398 |
+
channel_credentials=None,
|
| 399 |
+
call_credentials=None,
|
| 400 |
+
insecure=False,
|
| 401 |
+
compression=None,
|
| 402 |
+
wait_for_ready=None,
|
| 403 |
+
timeout=None,
|
| 404 |
+
metadata=None):
|
| 405 |
+
return grpc.experimental.unary_unary(
|
| 406 |
+
request,
|
| 407 |
+
target,
|
| 408 |
+
'/nvidia.omniverse.storage.fileobject.v1beta.FileObjectService/CompleteRedirectUpload',
|
| 409 |
+
nvidia_dot_omniverse_dot_storage_dot_fileobject_dot_v1beta_dot_fileobject__service__pb2.CompleteRedirectUploadRequest.SerializeToString,
|
| 410 |
+
nvidia_dot_omniverse_dot_storage_dot_fileobject_dot_v1beta_dot_fileobject__service__pb2.CompleteRedirectUploadResponse.FromString,
|
| 411 |
+
options,
|
| 412 |
+
channel_credentials,
|
| 413 |
+
insecure,
|
| 414 |
+
call_credentials,
|
| 415 |
+
compression,
|
| 416 |
+
wait_for_ready,
|
| 417 |
+
timeout,
|
| 418 |
+
metadata,
|
| 419 |
+
_registered_method=True)
|
| 420 |
+
|
| 421 |
+
@staticmethod
|
| 422 |
+
def UploadPart(request,
|
| 423 |
+
target,
|
| 424 |
+
options=(),
|
| 425 |
+
channel_credentials=None,
|
| 426 |
+
call_credentials=None,
|
| 427 |
+
insecure=False,
|
| 428 |
+
compression=None,
|
| 429 |
+
wait_for_ready=None,
|
| 430 |
+
timeout=None,
|
| 431 |
+
metadata=None):
|
| 432 |
+
return grpc.experimental.unary_unary(
|
| 433 |
+
request,
|
| 434 |
+
target,
|
| 435 |
+
'/nvidia.omniverse.storage.fileobject.v1beta.FileObjectService/UploadPart',
|
| 436 |
+
nvidia_dot_omniverse_dot_storage_dot_fileobject_dot_v1beta_dot_fileobject__service__pb2.UploadPartRequest.SerializeToString,
|
| 437 |
+
nvidia_dot_omniverse_dot_storage_dot_fileobject_dot_v1beta_dot_fileobject__service__pb2.UploadPartResponse.FromString,
|
| 438 |
+
options,
|
| 439 |
+
channel_credentials,
|
| 440 |
+
insecure,
|
| 441 |
+
call_credentials,
|
| 442 |
+
compression,
|
| 443 |
+
wait_for_ready,
|
| 444 |
+
timeout,
|
| 445 |
+
metadata,
|
| 446 |
+
_registered_method=True)
|
| 447 |
+
|
| 448 |
+
@staticmethod
|
| 449 |
+
def CompleteMultipartUpload(request,
|
| 450 |
+
target,
|
| 451 |
+
options=(),
|
| 452 |
+
channel_credentials=None,
|
| 453 |
+
call_credentials=None,
|
| 454 |
+
insecure=False,
|
| 455 |
+
compression=None,
|
| 456 |
+
wait_for_ready=None,
|
| 457 |
+
timeout=None,
|
| 458 |
+
metadata=None):
|
| 459 |
+
return grpc.experimental.unary_unary(
|
| 460 |
+
request,
|
| 461 |
+
target,
|
| 462 |
+
'/nvidia.omniverse.storage.fileobject.v1beta.FileObjectService/CompleteMultipartUpload',
|
| 463 |
+
nvidia_dot_omniverse_dot_storage_dot_fileobject_dot_v1beta_dot_fileobject__service__pb2.CompleteMultipartUploadRequest.SerializeToString,
|
| 464 |
+
nvidia_dot_omniverse_dot_storage_dot_fileobject_dot_v1beta_dot_fileobject__service__pb2.CompleteMultipartUploadResponse.FromString,
|
| 465 |
+
options,
|
| 466 |
+
channel_credentials,
|
| 467 |
+
insecure,
|
| 468 |
+
call_credentials,
|
| 469 |
+
compression,
|
| 470 |
+
wait_for_ready,
|
| 471 |
+
timeout,
|
| 472 |
+
metadata,
|
| 473 |
+
_registered_method=True)
|
| 474 |
+
|
| 475 |
+
@staticmethod
|
| 476 |
+
def AbortMultipartUpload(request,
|
| 477 |
+
target,
|
| 478 |
+
options=(),
|
| 479 |
+
channel_credentials=None,
|
| 480 |
+
call_credentials=None,
|
| 481 |
+
insecure=False,
|
| 482 |
+
compression=None,
|
| 483 |
+
wait_for_ready=None,
|
| 484 |
+
timeout=None,
|
| 485 |
+
metadata=None):
|
| 486 |
+
return grpc.experimental.unary_unary(
|
| 487 |
+
request,
|
| 488 |
+
target,
|
| 489 |
+
'/nvidia.omniverse.storage.fileobject.v1beta.FileObjectService/AbortMultipartUpload',
|
| 490 |
+
nvidia_dot_omniverse_dot_storage_dot_fileobject_dot_v1beta_dot_fileobject__service__pb2.AbortMultipartUploadRequest.SerializeToString,
|
| 491 |
+
nvidia_dot_omniverse_dot_storage_dot_fileobject_dot_v1beta_dot_fileobject__service__pb2.AbortMultipartUploadResponse.FromString,
|
| 492 |
+
options,
|
| 493 |
+
channel_credentials,
|
| 494 |
+
insecure,
|
| 495 |
+
call_credentials,
|
| 496 |
+
compression,
|
| 497 |
+
wait_for_ready,
|
| 498 |
+
timeout,
|
| 499 |
+
metadata,
|
| 500 |
+
_registered_method=True)
|
| 501 |
+
|
| 502 |
+
@staticmethod
|
| 503 |
+
def Delete(request,
|
| 504 |
+
target,
|
| 505 |
+
options=(),
|
| 506 |
+
channel_credentials=None,
|
| 507 |
+
call_credentials=None,
|
| 508 |
+
insecure=False,
|
| 509 |
+
compression=None,
|
| 510 |
+
wait_for_ready=None,
|
| 511 |
+
timeout=None,
|
| 512 |
+
metadata=None):
|
| 513 |
+
return grpc.experimental.unary_unary(
|
| 514 |
+
request,
|
| 515 |
+
target,
|
| 516 |
+
'/nvidia.omniverse.storage.fileobject.v1beta.FileObjectService/Delete',
|
| 517 |
+
nvidia_dot_omniverse_dot_storage_dot_fileobject_dot_v1beta_dot_fileobject__service__pb2.DeleteRequest.SerializeToString,
|
| 518 |
+
nvidia_dot_omniverse_dot_storage_dot_fileobject_dot_v1beta_dot_fileobject__service__pb2.DeleteResponse.FromString,
|
| 519 |
+
options,
|
| 520 |
+
channel_credentials,
|
| 521 |
+
insecure,
|
| 522 |
+
call_credentials,
|
| 523 |
+
compression,
|
| 524 |
+
wait_for_ready,
|
| 525 |
+
timeout,
|
| 526 |
+
metadata,
|
| 527 |
+
_registered_method=True)
|
docker/hf-space/hf-storage-api/generated/nvidia/omniverse/storage/metadata/v1alpha/metadata_pb2.py
ADDED
|
@@ -0,0 +1,56 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# -*- coding: utf-8 -*-
|
| 2 |
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
| 3 |
+
# NO CHECKED-IN PROTOBUF GENCODE
|
| 4 |
+
# source: nvidia/omniverse/storage/metadata/v1alpha/metadata.proto
|
| 5 |
+
# Protobuf Python Version: 6.31.1
|
| 6 |
+
"""Generated protocol buffer code."""
|
| 7 |
+
from google.protobuf import descriptor as _descriptor
|
| 8 |
+
from google.protobuf import descriptor_pool as _descriptor_pool
|
| 9 |
+
from google.protobuf import runtime_version as _runtime_version
|
| 10 |
+
from google.protobuf import symbol_database as _symbol_database
|
| 11 |
+
from google.protobuf.internal import builder as _builder
|
| 12 |
+
_runtime_version.ValidateProtobufRuntimeVersion(
|
| 13 |
+
_runtime_version.Domain.PUBLIC,
|
| 14 |
+
6,
|
| 15 |
+
31,
|
| 16 |
+
1,
|
| 17 |
+
'',
|
| 18 |
+
'nvidia/omniverse/storage/metadata/v1alpha/metadata.proto'
|
| 19 |
+
)
|
| 20 |
+
# @@protoc_insertion_point(imports)
|
| 21 |
+
|
| 22 |
+
_sym_db = _symbol_database.Default()
|
| 23 |
+
|
| 24 |
+
|
| 25 |
+
from google.protobuf import struct_pb2 as google_dot_protobuf_dot_struct__pb2
|
| 26 |
+
|
| 27 |
+
|
| 28 |
+
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n8nvidia/omniverse/storage/metadata/v1alpha/metadata.proto\x12)nvidia.omniverse.storage.metadata.v1alpha\x1a\x1cgoogle/protobuf/struct.proto\"=\n\x12GetMetadataRequest\x12\x0b\n\x03uri\x18\x01 \x01(\t\x12\x1a\n\x12user_metadata_keys\x18\x02 \x03(\t\"\xf1\x01\n\x13GetMetadataResponse\x12g\n\ruser_metadata\x18\x01 \x03(\x0b\x32P.nvidia.omniverse.storage.metadata.v1alpha.GetMetadataResponse.UserMetadataEntry\x1aq\n\x11UserMetadataEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12K\n\x05value\x18\x02 \x01(\x0b\x32<.nvidia.omniverse.storage.metadata.v1alpha.UserMetadataValue:\x02\x38\x01\"\x9c\x01\n\x15UpdateMetadataRequest\x12\x0b\n\x03uri\x18\x01 \x01(\t\x12\x19\n\x11user_metadata_key\x18\x02 \x01(\t\x12-\n\ruser_metadata\x18\x03 \x01(\x0b\x32\x16.google.protobuf.Value\x12\x1a\n\rexpected_etag\x18\x04 \x01(\tH\x00\x88\x01\x01\x42\x10\n\x0e_expected_etag\"&\n\x16UpdateMetadataResponse\x12\x0c\n\x04\x65tag\x18\x01 \x01(\t\"m\n\x15\x44\x65leteMetadataRequest\x12\x0b\n\x03uri\x18\x01 \x01(\t\x12\x19\n\x11user_metadata_key\x18\x02 \x01(\t\x12\x1a\n\rexpected_etag\x18\x03 \x01(\tH\x00\x88\x01\x01\x42\x10\n\x0e_expected_etag\"\x18\n\x16\x44\x65leteMetadataResponse\"H\n\x11UserMetadataValue\x12%\n\x05value\x18\x01 \x01(\x0b\x32\x16.google.protobuf.Value\x12\x0c\n\x04\x65tag\x18\x02 \x01(\t2\xd0\x03\n\x0fMetadataService\x12\x8c\x01\n\x0bGetMetadata\x12=.nvidia.omniverse.storage.metadata.v1alpha.GetMetadataRequest\x1a>.nvidia.omniverse.storage.metadata.v1alpha.GetMetadataResponse\x12\x95\x01\n\x0eUpdateMetadata\x12@.nvidia.omniverse.storage.metadata.v1alpha.UpdateMetadataRequest\x1a\x41.nvidia.omniverse.storage.metadata.v1alpha.UpdateMetadataResponse\x12\x95\x01\n\x0e\x44\x65leteMetadata\x12@.nvidia.omniverse.storage.metadata.v1alpha.DeleteMetadataRequest\x1a\x41.nvidia.omniverse.storage.metadata.v1alpha.DeleteMetadataResponseB~\n-com.nvidia.omniverse.storage.metadata.v1alphaB\rMetadataProtoP\x01Z<pb.api.nvidia.com/omniverse/storage/metadata/v1alpha;storageb\x06proto3')
|
| 29 |
+
|
| 30 |
+
_globals = globals()
|
| 31 |
+
_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
|
| 32 |
+
_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'nvidia.omniverse.storage.metadata.v1alpha.metadata_pb2', _globals)
|
| 33 |
+
if not _descriptor._USE_C_DESCRIPTORS:
|
| 34 |
+
_globals['DESCRIPTOR']._loaded_options = None
|
| 35 |
+
_globals['DESCRIPTOR']._serialized_options = b'\n-com.nvidia.omniverse.storage.metadata.v1alphaB\rMetadataProtoP\001Z<pb.api.nvidia.com/omniverse/storage/metadata/v1alpha;storage'
|
| 36 |
+
_globals['_GETMETADATARESPONSE_USERMETADATAENTRY']._loaded_options = None
|
| 37 |
+
_globals['_GETMETADATARESPONSE_USERMETADATAENTRY']._serialized_options = b'8\001'
|
| 38 |
+
_globals['_GETMETADATAREQUEST']._serialized_start=133
|
| 39 |
+
_globals['_GETMETADATAREQUEST']._serialized_end=194
|
| 40 |
+
_globals['_GETMETADATARESPONSE']._serialized_start=197
|
| 41 |
+
_globals['_GETMETADATARESPONSE']._serialized_end=438
|
| 42 |
+
_globals['_GETMETADATARESPONSE_USERMETADATAENTRY']._serialized_start=325
|
| 43 |
+
_globals['_GETMETADATARESPONSE_USERMETADATAENTRY']._serialized_end=438
|
| 44 |
+
_globals['_UPDATEMETADATAREQUEST']._serialized_start=441
|
| 45 |
+
_globals['_UPDATEMETADATAREQUEST']._serialized_end=597
|
| 46 |
+
_globals['_UPDATEMETADATARESPONSE']._serialized_start=599
|
| 47 |
+
_globals['_UPDATEMETADATARESPONSE']._serialized_end=637
|
| 48 |
+
_globals['_DELETEMETADATAREQUEST']._serialized_start=639
|
| 49 |
+
_globals['_DELETEMETADATAREQUEST']._serialized_end=748
|
| 50 |
+
_globals['_DELETEMETADATARESPONSE']._serialized_start=750
|
| 51 |
+
_globals['_DELETEMETADATARESPONSE']._serialized_end=774
|
| 52 |
+
_globals['_USERMETADATAVALUE']._serialized_start=776
|
| 53 |
+
_globals['_USERMETADATAVALUE']._serialized_end=848
|
| 54 |
+
_globals['_METADATASERVICE']._serialized_start=851
|
| 55 |
+
_globals['_METADATASERVICE']._serialized_end=1315
|
| 56 |
+
# @@protoc_insertion_point(module_scope)
|
docker/hf-space/hf-storage-api/generated/nvidia/omniverse/storage/metadata/v1alpha/metadata_pb2.pyi
ADDED
|
@@ -0,0 +1,69 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
from google.protobuf import struct_pb2 as _struct_pb2
|
| 2 |
+
from google.protobuf.internal import containers as _containers
|
| 3 |
+
from google.protobuf import descriptor as _descriptor
|
| 4 |
+
from google.protobuf import message as _message
|
| 5 |
+
from collections.abc import Iterable as _Iterable, Mapping as _Mapping
|
| 6 |
+
from typing import ClassVar as _ClassVar, Optional as _Optional, Union as _Union
|
| 7 |
+
|
| 8 |
+
DESCRIPTOR: _descriptor.FileDescriptor
|
| 9 |
+
|
| 10 |
+
class GetMetadataRequest(_message.Message):
|
| 11 |
+
__slots__ = ("uri", "user_metadata_keys")
|
| 12 |
+
URI_FIELD_NUMBER: _ClassVar[int]
|
| 13 |
+
USER_METADATA_KEYS_FIELD_NUMBER: _ClassVar[int]
|
| 14 |
+
uri: str
|
| 15 |
+
user_metadata_keys: _containers.RepeatedScalarFieldContainer[str]
|
| 16 |
+
def __init__(self, uri: _Optional[str] = ..., user_metadata_keys: _Optional[_Iterable[str]] = ...) -> None: ...
|
| 17 |
+
|
| 18 |
+
class GetMetadataResponse(_message.Message):
|
| 19 |
+
__slots__ = ("user_metadata",)
|
| 20 |
+
class UserMetadataEntry(_message.Message):
|
| 21 |
+
__slots__ = ("key", "value")
|
| 22 |
+
KEY_FIELD_NUMBER: _ClassVar[int]
|
| 23 |
+
VALUE_FIELD_NUMBER: _ClassVar[int]
|
| 24 |
+
key: str
|
| 25 |
+
value: UserMetadataValue
|
| 26 |
+
def __init__(self, key: _Optional[str] = ..., value: _Optional[_Union[UserMetadataValue, _Mapping]] = ...) -> None: ...
|
| 27 |
+
USER_METADATA_FIELD_NUMBER: _ClassVar[int]
|
| 28 |
+
user_metadata: _containers.MessageMap[str, UserMetadataValue]
|
| 29 |
+
def __init__(self, user_metadata: _Optional[_Mapping[str, UserMetadataValue]] = ...) -> None: ...
|
| 30 |
+
|
| 31 |
+
class UpdateMetadataRequest(_message.Message):
|
| 32 |
+
__slots__ = ("uri", "user_metadata_key", "user_metadata", "expected_etag")
|
| 33 |
+
URI_FIELD_NUMBER: _ClassVar[int]
|
| 34 |
+
USER_METADATA_KEY_FIELD_NUMBER: _ClassVar[int]
|
| 35 |
+
USER_METADATA_FIELD_NUMBER: _ClassVar[int]
|
| 36 |
+
EXPECTED_ETAG_FIELD_NUMBER: _ClassVar[int]
|
| 37 |
+
uri: str
|
| 38 |
+
user_metadata_key: str
|
| 39 |
+
user_metadata: _struct_pb2.Value
|
| 40 |
+
expected_etag: str
|
| 41 |
+
def __init__(self, uri: _Optional[str] = ..., user_metadata_key: _Optional[str] = ..., user_metadata: _Optional[_Union[_struct_pb2.Value, _Mapping]] = ..., expected_etag: _Optional[str] = ...) -> None: ...
|
| 42 |
+
|
| 43 |
+
class UpdateMetadataResponse(_message.Message):
|
| 44 |
+
__slots__ = ("etag",)
|
| 45 |
+
ETAG_FIELD_NUMBER: _ClassVar[int]
|
| 46 |
+
etag: str
|
| 47 |
+
def __init__(self, etag: _Optional[str] = ...) -> None: ...
|
| 48 |
+
|
| 49 |
+
class DeleteMetadataRequest(_message.Message):
|
| 50 |
+
__slots__ = ("uri", "user_metadata_key", "expected_etag")
|
| 51 |
+
URI_FIELD_NUMBER: _ClassVar[int]
|
| 52 |
+
USER_METADATA_KEY_FIELD_NUMBER: _ClassVar[int]
|
| 53 |
+
EXPECTED_ETAG_FIELD_NUMBER: _ClassVar[int]
|
| 54 |
+
uri: str
|
| 55 |
+
user_metadata_key: str
|
| 56 |
+
expected_etag: str
|
| 57 |
+
def __init__(self, uri: _Optional[str] = ..., user_metadata_key: _Optional[str] = ..., expected_etag: _Optional[str] = ...) -> None: ...
|
| 58 |
+
|
| 59 |
+
class DeleteMetadataResponse(_message.Message):
|
| 60 |
+
__slots__ = ()
|
| 61 |
+
def __init__(self) -> None: ...
|
| 62 |
+
|
| 63 |
+
class UserMetadataValue(_message.Message):
|
| 64 |
+
__slots__ = ("value", "etag")
|
| 65 |
+
VALUE_FIELD_NUMBER: _ClassVar[int]
|
| 66 |
+
ETAG_FIELD_NUMBER: _ClassVar[int]
|
| 67 |
+
value: _struct_pb2.Value
|
| 68 |
+
etag: str
|
| 69 |
+
def __init__(self, value: _Optional[_Union[_struct_pb2.Value, _Mapping]] = ..., etag: _Optional[str] = ...) -> None: ...
|
docker/hf-space/hf-storage-api/generated/nvidia/omniverse/storage/metadata/v1alpha/metadata_pb2_grpc.py
ADDED
|
@@ -0,0 +1,183 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
|
| 2 |
+
"""Client and server classes corresponding to protobuf-defined services."""
|
| 3 |
+
import grpc
|
| 4 |
+
import warnings
|
| 5 |
+
|
| 6 |
+
from nvidia.omniverse.storage.metadata.v1alpha import metadata_pb2 as nvidia_dot_omniverse_dot_storage_dot_metadata_dot_v1alpha_dot_metadata__pb2
|
| 7 |
+
|
| 8 |
+
GRPC_GENERATED_VERSION = '1.80.0'
|
| 9 |
+
GRPC_VERSION = grpc.__version__
|
| 10 |
+
_version_not_supported = False
|
| 11 |
+
|
| 12 |
+
try:
|
| 13 |
+
from grpc._utilities import first_version_is_lower
|
| 14 |
+
_version_not_supported = first_version_is_lower(GRPC_VERSION, GRPC_GENERATED_VERSION)
|
| 15 |
+
except ImportError:
|
| 16 |
+
_version_not_supported = True
|
| 17 |
+
|
| 18 |
+
if _version_not_supported:
|
| 19 |
+
raise RuntimeError(
|
| 20 |
+
f'The grpc package installed is at version {GRPC_VERSION},'
|
| 21 |
+
+ ' but the generated code in nvidia/omniverse/storage/metadata/v1alpha/metadata_pb2_grpc.py depends on'
|
| 22 |
+
+ f' grpcio>={GRPC_GENERATED_VERSION}.'
|
| 23 |
+
+ f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}'
|
| 24 |
+
+ f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.'
|
| 25 |
+
)
|
| 26 |
+
|
| 27 |
+
|
| 28 |
+
class MetadataServiceStub(object):
|
| 29 |
+
"""Missing associated documentation comment in .proto file."""
|
| 30 |
+
|
| 31 |
+
def __init__(self, channel):
|
| 32 |
+
"""Constructor.
|
| 33 |
+
|
| 34 |
+
Args:
|
| 35 |
+
channel: A grpc.Channel.
|
| 36 |
+
"""
|
| 37 |
+
self.GetMetadata = channel.unary_unary(
|
| 38 |
+
'/nvidia.omniverse.storage.metadata.v1alpha.MetadataService/GetMetadata',
|
| 39 |
+
request_serializer=nvidia_dot_omniverse_dot_storage_dot_metadata_dot_v1alpha_dot_metadata__pb2.GetMetadataRequest.SerializeToString,
|
| 40 |
+
response_deserializer=nvidia_dot_omniverse_dot_storage_dot_metadata_dot_v1alpha_dot_metadata__pb2.GetMetadataResponse.FromString,
|
| 41 |
+
_registered_method=True)
|
| 42 |
+
self.UpdateMetadata = channel.unary_unary(
|
| 43 |
+
'/nvidia.omniverse.storage.metadata.v1alpha.MetadataService/UpdateMetadata',
|
| 44 |
+
request_serializer=nvidia_dot_omniverse_dot_storage_dot_metadata_dot_v1alpha_dot_metadata__pb2.UpdateMetadataRequest.SerializeToString,
|
| 45 |
+
response_deserializer=nvidia_dot_omniverse_dot_storage_dot_metadata_dot_v1alpha_dot_metadata__pb2.UpdateMetadataResponse.FromString,
|
| 46 |
+
_registered_method=True)
|
| 47 |
+
self.DeleteMetadata = channel.unary_unary(
|
| 48 |
+
'/nvidia.omniverse.storage.metadata.v1alpha.MetadataService/DeleteMetadata',
|
| 49 |
+
request_serializer=nvidia_dot_omniverse_dot_storage_dot_metadata_dot_v1alpha_dot_metadata__pb2.DeleteMetadataRequest.SerializeToString,
|
| 50 |
+
response_deserializer=nvidia_dot_omniverse_dot_storage_dot_metadata_dot_v1alpha_dot_metadata__pb2.DeleteMetadataResponse.FromString,
|
| 51 |
+
_registered_method=True)
|
| 52 |
+
|
| 53 |
+
|
| 54 |
+
class MetadataServiceServicer(object):
|
| 55 |
+
"""Missing associated documentation comment in .proto file."""
|
| 56 |
+
|
| 57 |
+
def GetMetadata(self, request, context):
|
| 58 |
+
"""Missing associated documentation comment in .proto file."""
|
| 59 |
+
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
| 60 |
+
context.set_details('Method not implemented!')
|
| 61 |
+
raise NotImplementedError('Method not implemented!')
|
| 62 |
+
|
| 63 |
+
def UpdateMetadata(self, request, context):
|
| 64 |
+
"""Missing associated documentation comment in .proto file."""
|
| 65 |
+
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
| 66 |
+
context.set_details('Method not implemented!')
|
| 67 |
+
raise NotImplementedError('Method not implemented!')
|
| 68 |
+
|
| 69 |
+
def DeleteMetadata(self, request, context):
|
| 70 |
+
"""Missing associated documentation comment in .proto file."""
|
| 71 |
+
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
| 72 |
+
context.set_details('Method not implemented!')
|
| 73 |
+
raise NotImplementedError('Method not implemented!')
|
| 74 |
+
|
| 75 |
+
|
| 76 |
+
def add_MetadataServiceServicer_to_server(servicer, server):
|
| 77 |
+
rpc_method_handlers = {
|
| 78 |
+
'GetMetadata': grpc.unary_unary_rpc_method_handler(
|
| 79 |
+
servicer.GetMetadata,
|
| 80 |
+
request_deserializer=nvidia_dot_omniverse_dot_storage_dot_metadata_dot_v1alpha_dot_metadata__pb2.GetMetadataRequest.FromString,
|
| 81 |
+
response_serializer=nvidia_dot_omniverse_dot_storage_dot_metadata_dot_v1alpha_dot_metadata__pb2.GetMetadataResponse.SerializeToString,
|
| 82 |
+
),
|
| 83 |
+
'UpdateMetadata': grpc.unary_unary_rpc_method_handler(
|
| 84 |
+
servicer.UpdateMetadata,
|
| 85 |
+
request_deserializer=nvidia_dot_omniverse_dot_storage_dot_metadata_dot_v1alpha_dot_metadata__pb2.UpdateMetadataRequest.FromString,
|
| 86 |
+
response_serializer=nvidia_dot_omniverse_dot_storage_dot_metadata_dot_v1alpha_dot_metadata__pb2.UpdateMetadataResponse.SerializeToString,
|
| 87 |
+
),
|
| 88 |
+
'DeleteMetadata': grpc.unary_unary_rpc_method_handler(
|
| 89 |
+
servicer.DeleteMetadata,
|
| 90 |
+
request_deserializer=nvidia_dot_omniverse_dot_storage_dot_metadata_dot_v1alpha_dot_metadata__pb2.DeleteMetadataRequest.FromString,
|
| 91 |
+
response_serializer=nvidia_dot_omniverse_dot_storage_dot_metadata_dot_v1alpha_dot_metadata__pb2.DeleteMetadataResponse.SerializeToString,
|
| 92 |
+
),
|
| 93 |
+
}
|
| 94 |
+
generic_handler = grpc.method_handlers_generic_handler(
|
| 95 |
+
'nvidia.omniverse.storage.metadata.v1alpha.MetadataService', rpc_method_handlers)
|
| 96 |
+
server.add_generic_rpc_handlers((generic_handler,))
|
| 97 |
+
server.add_registered_method_handlers('nvidia.omniverse.storage.metadata.v1alpha.MetadataService', rpc_method_handlers)
|
| 98 |
+
|
| 99 |
+
|
| 100 |
+
# This class is part of an EXPERIMENTAL API.
|
| 101 |
+
class MetadataService(object):
|
| 102 |
+
"""Missing associated documentation comment in .proto file."""
|
| 103 |
+
|
| 104 |
+
@staticmethod
|
| 105 |
+
def GetMetadata(request,
|
| 106 |
+
target,
|
| 107 |
+
options=(),
|
| 108 |
+
channel_credentials=None,
|
| 109 |
+
call_credentials=None,
|
| 110 |
+
insecure=False,
|
| 111 |
+
compression=None,
|
| 112 |
+
wait_for_ready=None,
|
| 113 |
+
timeout=None,
|
| 114 |
+
metadata=None):
|
| 115 |
+
return grpc.experimental.unary_unary(
|
| 116 |
+
request,
|
| 117 |
+
target,
|
| 118 |
+
'/nvidia.omniverse.storage.metadata.v1alpha.MetadataService/GetMetadata',
|
| 119 |
+
nvidia_dot_omniverse_dot_storage_dot_metadata_dot_v1alpha_dot_metadata__pb2.GetMetadataRequest.SerializeToString,
|
| 120 |
+
nvidia_dot_omniverse_dot_storage_dot_metadata_dot_v1alpha_dot_metadata__pb2.GetMetadataResponse.FromString,
|
| 121 |
+
options,
|
| 122 |
+
channel_credentials,
|
| 123 |
+
insecure,
|
| 124 |
+
call_credentials,
|
| 125 |
+
compression,
|
| 126 |
+
wait_for_ready,
|
| 127 |
+
timeout,
|
| 128 |
+
metadata,
|
| 129 |
+
_registered_method=True)
|
| 130 |
+
|
| 131 |
+
@staticmethod
|
| 132 |
+
def UpdateMetadata(request,
|
| 133 |
+
target,
|
| 134 |
+
options=(),
|
| 135 |
+
channel_credentials=None,
|
| 136 |
+
call_credentials=None,
|
| 137 |
+
insecure=False,
|
| 138 |
+
compression=None,
|
| 139 |
+
wait_for_ready=None,
|
| 140 |
+
timeout=None,
|
| 141 |
+
metadata=None):
|
| 142 |
+
return grpc.experimental.unary_unary(
|
| 143 |
+
request,
|
| 144 |
+
target,
|
| 145 |
+
'/nvidia.omniverse.storage.metadata.v1alpha.MetadataService/UpdateMetadata',
|
| 146 |
+
nvidia_dot_omniverse_dot_storage_dot_metadata_dot_v1alpha_dot_metadata__pb2.UpdateMetadataRequest.SerializeToString,
|
| 147 |
+
nvidia_dot_omniverse_dot_storage_dot_metadata_dot_v1alpha_dot_metadata__pb2.UpdateMetadataResponse.FromString,
|
| 148 |
+
options,
|
| 149 |
+
channel_credentials,
|
| 150 |
+
insecure,
|
| 151 |
+
call_credentials,
|
| 152 |
+
compression,
|
| 153 |
+
wait_for_ready,
|
| 154 |
+
timeout,
|
| 155 |
+
metadata,
|
| 156 |
+
_registered_method=True)
|
| 157 |
+
|
| 158 |
+
@staticmethod
|
| 159 |
+
def DeleteMetadata(request,
|
| 160 |
+
target,
|
| 161 |
+
options=(),
|
| 162 |
+
channel_credentials=None,
|
| 163 |
+
call_credentials=None,
|
| 164 |
+
insecure=False,
|
| 165 |
+
compression=None,
|
| 166 |
+
wait_for_ready=None,
|
| 167 |
+
timeout=None,
|
| 168 |
+
metadata=None):
|
| 169 |
+
return grpc.experimental.unary_unary(
|
| 170 |
+
request,
|
| 171 |
+
target,
|
| 172 |
+
'/nvidia.omniverse.storage.metadata.v1alpha.MetadataService/DeleteMetadata',
|
| 173 |
+
nvidia_dot_omniverse_dot_storage_dot_metadata_dot_v1alpha_dot_metadata__pb2.DeleteMetadataRequest.SerializeToString,
|
| 174 |
+
nvidia_dot_omniverse_dot_storage_dot_metadata_dot_v1alpha_dot_metadata__pb2.DeleteMetadataResponse.FromString,
|
| 175 |
+
options,
|
| 176 |
+
channel_credentials,
|
| 177 |
+
insecure,
|
| 178 |
+
call_credentials,
|
| 179 |
+
compression,
|
| 180 |
+
wait_for_ready,
|
| 181 |
+
timeout,
|
| 182 |
+
metadata,
|
| 183 |
+
_registered_method=True)
|
docker/hf-space/hf-storage-api/generated/nvidia/omniverse/storage/versioning/v1alpha/versioning_pb2.py
ADDED
|
@@ -0,0 +1,46 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# -*- coding: utf-8 -*-
|
| 2 |
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
| 3 |
+
# NO CHECKED-IN PROTOBUF GENCODE
|
| 4 |
+
# source: nvidia/omniverse/storage/versioning/v1alpha/versioning.proto
|
| 5 |
+
# Protobuf Python Version: 6.31.1
|
| 6 |
+
"""Generated protocol buffer code."""
|
| 7 |
+
from google.protobuf import descriptor as _descriptor
|
| 8 |
+
from google.protobuf import descriptor_pool as _descriptor_pool
|
| 9 |
+
from google.protobuf import runtime_version as _runtime_version
|
| 10 |
+
from google.protobuf import symbol_database as _symbol_database
|
| 11 |
+
from google.protobuf.internal import builder as _builder
|
| 12 |
+
_runtime_version.ValidateProtobufRuntimeVersion(
|
| 13 |
+
_runtime_version.Domain.PUBLIC,
|
| 14 |
+
6,
|
| 15 |
+
31,
|
| 16 |
+
1,
|
| 17 |
+
'',
|
| 18 |
+
'nvidia/omniverse/storage/versioning/v1alpha/versioning.proto'
|
| 19 |
+
)
|
| 20 |
+
# @@protoc_insertion_point(imports)
|
| 21 |
+
|
| 22 |
+
_sym_db = _symbol_database.Default()
|
| 23 |
+
|
| 24 |
+
|
| 25 |
+
from nvidia.omniverse.storage.fileobject.v1alpha import fileobject_pb2 as nvidia_dot_omniverse_dot_storage_dot_fileobject_dot_v1alpha_dot_fileobject__pb2
|
| 26 |
+
|
| 27 |
+
|
| 28 |
+
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n<nvidia/omniverse/storage/versioning/v1alpha/versioning.proto\x12+nvidia.omniverse.storage.versioning.v1alpha\x1a<nvidia/omniverse/storage/fileobject/v1alpha/fileobject.proto\"4\n\x18\x45numerateVersionsRequest\x12\x18\n\x10resource_address\x18\x01 \x01(\t\"\xb8\x01\n\x19\x45numerateVersionsResponse\x12G\n\x05items\x18\x01 \x03(\x0b\x32\x38.nvidia.omniverse.storage.versioning.v1alpha.VersionInfo\x12R\n\x0eversions_order\x18\x02 \x01(\x0e\x32:.nvidia.omniverse.storage.versioning.v1alpha.VersionsOrder\"\xbd\x01\n\x0bVersionInfo\x12P\n\rresource_info\x18\x01 \x01(\x0b\x32\x39.nvidia.omniverse.storage.fileobject.v1alpha.ResourceInfo\x12\x18\n\x0bsorting_key\x18\x02 \x01(\tH\x00\x88\x01\x01\x12\x1d\n\x10resource_address\x18\x03 \x01(\tH\x01\x88\x01\x01\x42\x0e\n\x0c_sorting_keyB\x13\n\x11_resource_address*\x8c\x01\n\rVersionsOrder\x12\x1e\n\x1aVERSIONS_ORDER_UNSPECIFIED\x10\x00\x12\x1f\n\x1bVERSIONS_ORDER_NEWEST_FIRST\x10\x01\x12\x1f\n\x1bVERSIONS_ORDER_OLDEST_FIRST\x10\x02\x12\x19\n\x15VERSIONS_ORDER_BY_KEY\x10\x03\x32\xba\x01\n\x11VersioningService\x12\xa4\x01\n\x11\x45numerateVersions\x12\x45.nvidia.omniverse.storage.versioning.v1alpha.EnumerateVersionsRequest\x1a\x46.nvidia.omniverse.storage.versioning.v1alpha.EnumerateVersionsResponse0\x01\x42\x84\x01\n/com.nvidia.omniverse.storage.versioning.v1alphaB\x0fVersioningProtoP\x01Z>pb.api.nvidia.com/omniverse/storage/versioning/v1alpha;storageb\x06proto3')
|
| 29 |
+
|
| 30 |
+
_globals = globals()
|
| 31 |
+
_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
|
| 32 |
+
_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'nvidia.omniverse.storage.versioning.v1alpha.versioning_pb2', _globals)
|
| 33 |
+
if not _descriptor._USE_C_DESCRIPTORS:
|
| 34 |
+
_globals['DESCRIPTOR']._loaded_options = None
|
| 35 |
+
_globals['DESCRIPTOR']._serialized_options = b'\n/com.nvidia.omniverse.storage.versioning.v1alphaB\017VersioningProtoP\001Z>pb.api.nvidia.com/omniverse/storage/versioning/v1alpha;storage'
|
| 36 |
+
_globals['_VERSIONSORDER']._serialized_start=605
|
| 37 |
+
_globals['_VERSIONSORDER']._serialized_end=745
|
| 38 |
+
_globals['_ENUMERATEVERSIONSREQUEST']._serialized_start=171
|
| 39 |
+
_globals['_ENUMERATEVERSIONSREQUEST']._serialized_end=223
|
| 40 |
+
_globals['_ENUMERATEVERSIONSRESPONSE']._serialized_start=226
|
| 41 |
+
_globals['_ENUMERATEVERSIONSRESPONSE']._serialized_end=410
|
| 42 |
+
_globals['_VERSIONINFO']._serialized_start=413
|
| 43 |
+
_globals['_VERSIONINFO']._serialized_end=602
|
| 44 |
+
_globals['_VERSIONINGSERVICE']._serialized_start=748
|
| 45 |
+
_globals['_VERSIONINGSERVICE']._serialized_end=934
|
| 46 |
+
# @@protoc_insertion_point(module_scope)
|
docker/hf-space/hf-storage-api/generated/nvidia/omniverse/storage/versioning/v1alpha/versioning_pb2.pyi
ADDED
|
@@ -0,0 +1,44 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
from nvidia.omniverse.storage.fileobject.v1alpha import fileobject_pb2 as _fileobject_pb2
|
| 2 |
+
from google.protobuf.internal import containers as _containers
|
| 3 |
+
from google.protobuf.internal import enum_type_wrapper as _enum_type_wrapper
|
| 4 |
+
from google.protobuf import descriptor as _descriptor
|
| 5 |
+
from google.protobuf import message as _message
|
| 6 |
+
from collections.abc import Iterable as _Iterable, Mapping as _Mapping
|
| 7 |
+
from typing import ClassVar as _ClassVar, Optional as _Optional, Union as _Union
|
| 8 |
+
|
| 9 |
+
DESCRIPTOR: _descriptor.FileDescriptor
|
| 10 |
+
|
| 11 |
+
class VersionsOrder(int, metaclass=_enum_type_wrapper.EnumTypeWrapper):
|
| 12 |
+
__slots__ = ()
|
| 13 |
+
VERSIONS_ORDER_UNSPECIFIED: _ClassVar[VersionsOrder]
|
| 14 |
+
VERSIONS_ORDER_NEWEST_FIRST: _ClassVar[VersionsOrder]
|
| 15 |
+
VERSIONS_ORDER_OLDEST_FIRST: _ClassVar[VersionsOrder]
|
| 16 |
+
VERSIONS_ORDER_BY_KEY: _ClassVar[VersionsOrder]
|
| 17 |
+
VERSIONS_ORDER_UNSPECIFIED: VersionsOrder
|
| 18 |
+
VERSIONS_ORDER_NEWEST_FIRST: VersionsOrder
|
| 19 |
+
VERSIONS_ORDER_OLDEST_FIRST: VersionsOrder
|
| 20 |
+
VERSIONS_ORDER_BY_KEY: VersionsOrder
|
| 21 |
+
|
| 22 |
+
class EnumerateVersionsRequest(_message.Message):
|
| 23 |
+
__slots__ = ("resource_address",)
|
| 24 |
+
RESOURCE_ADDRESS_FIELD_NUMBER: _ClassVar[int]
|
| 25 |
+
resource_address: str
|
| 26 |
+
def __init__(self, resource_address: _Optional[str] = ...) -> None: ...
|
| 27 |
+
|
| 28 |
+
class EnumerateVersionsResponse(_message.Message):
|
| 29 |
+
__slots__ = ("items", "versions_order")
|
| 30 |
+
ITEMS_FIELD_NUMBER: _ClassVar[int]
|
| 31 |
+
VERSIONS_ORDER_FIELD_NUMBER: _ClassVar[int]
|
| 32 |
+
items: _containers.RepeatedCompositeFieldContainer[VersionInfo]
|
| 33 |
+
versions_order: VersionsOrder
|
| 34 |
+
def __init__(self, items: _Optional[_Iterable[_Union[VersionInfo, _Mapping]]] = ..., versions_order: _Optional[_Union[VersionsOrder, str]] = ...) -> None: ...
|
| 35 |
+
|
| 36 |
+
class VersionInfo(_message.Message):
|
| 37 |
+
__slots__ = ("resource_info", "sorting_key", "resource_address")
|
| 38 |
+
RESOURCE_INFO_FIELD_NUMBER: _ClassVar[int]
|
| 39 |
+
SORTING_KEY_FIELD_NUMBER: _ClassVar[int]
|
| 40 |
+
RESOURCE_ADDRESS_FIELD_NUMBER: _ClassVar[int]
|
| 41 |
+
resource_info: _fileobject_pb2.ResourceInfo
|
| 42 |
+
sorting_key: str
|
| 43 |
+
resource_address: str
|
| 44 |
+
def __init__(self, resource_info: _Optional[_Union[_fileobject_pb2.ResourceInfo, _Mapping]] = ..., sorting_key: _Optional[str] = ..., resource_address: _Optional[str] = ...) -> None: ...
|
docker/hf-space/hf-storage-api/generated/nvidia/omniverse/storage/versioning/v1alpha/versioning_pb2_grpc.py
ADDED
|
@@ -0,0 +1,97 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
|
| 2 |
+
"""Client and server classes corresponding to protobuf-defined services."""
|
| 3 |
+
import grpc
|
| 4 |
+
import warnings
|
| 5 |
+
|
| 6 |
+
from nvidia.omniverse.storage.versioning.v1alpha import versioning_pb2 as nvidia_dot_omniverse_dot_storage_dot_versioning_dot_v1alpha_dot_versioning__pb2
|
| 7 |
+
|
| 8 |
+
GRPC_GENERATED_VERSION = '1.80.0'
|
| 9 |
+
GRPC_VERSION = grpc.__version__
|
| 10 |
+
_version_not_supported = False
|
| 11 |
+
|
| 12 |
+
try:
|
| 13 |
+
from grpc._utilities import first_version_is_lower
|
| 14 |
+
_version_not_supported = first_version_is_lower(GRPC_VERSION, GRPC_GENERATED_VERSION)
|
| 15 |
+
except ImportError:
|
| 16 |
+
_version_not_supported = True
|
| 17 |
+
|
| 18 |
+
if _version_not_supported:
|
| 19 |
+
raise RuntimeError(
|
| 20 |
+
f'The grpc package installed is at version {GRPC_VERSION},'
|
| 21 |
+
+ ' but the generated code in nvidia/omniverse/storage/versioning/v1alpha/versioning_pb2_grpc.py depends on'
|
| 22 |
+
+ f' grpcio>={GRPC_GENERATED_VERSION}.'
|
| 23 |
+
+ f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}'
|
| 24 |
+
+ f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.'
|
| 25 |
+
)
|
| 26 |
+
|
| 27 |
+
|
| 28 |
+
class VersioningServiceStub(object):
|
| 29 |
+
"""Missing associated documentation comment in .proto file."""
|
| 30 |
+
|
| 31 |
+
def __init__(self, channel):
|
| 32 |
+
"""Constructor.
|
| 33 |
+
|
| 34 |
+
Args:
|
| 35 |
+
channel: A grpc.Channel.
|
| 36 |
+
"""
|
| 37 |
+
self.EnumerateVersions = channel.unary_stream(
|
| 38 |
+
'/nvidia.omniverse.storage.versioning.v1alpha.VersioningService/EnumerateVersions',
|
| 39 |
+
request_serializer=nvidia_dot_omniverse_dot_storage_dot_versioning_dot_v1alpha_dot_versioning__pb2.EnumerateVersionsRequest.SerializeToString,
|
| 40 |
+
response_deserializer=nvidia_dot_omniverse_dot_storage_dot_versioning_dot_v1alpha_dot_versioning__pb2.EnumerateVersionsResponse.FromString,
|
| 41 |
+
_registered_method=True)
|
| 42 |
+
|
| 43 |
+
|
| 44 |
+
class VersioningServiceServicer(object):
|
| 45 |
+
"""Missing associated documentation comment in .proto file."""
|
| 46 |
+
|
| 47 |
+
def EnumerateVersions(self, request, context):
|
| 48 |
+
"""Missing associated documentation comment in .proto file."""
|
| 49 |
+
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
| 50 |
+
context.set_details('Method not implemented!')
|
| 51 |
+
raise NotImplementedError('Method not implemented!')
|
| 52 |
+
|
| 53 |
+
|
| 54 |
+
def add_VersioningServiceServicer_to_server(servicer, server):
|
| 55 |
+
rpc_method_handlers = {
|
| 56 |
+
'EnumerateVersions': grpc.unary_stream_rpc_method_handler(
|
| 57 |
+
servicer.EnumerateVersions,
|
| 58 |
+
request_deserializer=nvidia_dot_omniverse_dot_storage_dot_versioning_dot_v1alpha_dot_versioning__pb2.EnumerateVersionsRequest.FromString,
|
| 59 |
+
response_serializer=nvidia_dot_omniverse_dot_storage_dot_versioning_dot_v1alpha_dot_versioning__pb2.EnumerateVersionsResponse.SerializeToString,
|
| 60 |
+
),
|
| 61 |
+
}
|
| 62 |
+
generic_handler = grpc.method_handlers_generic_handler(
|
| 63 |
+
'nvidia.omniverse.storage.versioning.v1alpha.VersioningService', rpc_method_handlers)
|
| 64 |
+
server.add_generic_rpc_handlers((generic_handler,))
|
| 65 |
+
server.add_registered_method_handlers('nvidia.omniverse.storage.versioning.v1alpha.VersioningService', rpc_method_handlers)
|
| 66 |
+
|
| 67 |
+
|
| 68 |
+
# This class is part of an EXPERIMENTAL API.
|
| 69 |
+
class VersioningService(object):
|
| 70 |
+
"""Missing associated documentation comment in .proto file."""
|
| 71 |
+
|
| 72 |
+
@staticmethod
|
| 73 |
+
def EnumerateVersions(request,
|
| 74 |
+
target,
|
| 75 |
+
options=(),
|
| 76 |
+
channel_credentials=None,
|
| 77 |
+
call_credentials=None,
|
| 78 |
+
insecure=False,
|
| 79 |
+
compression=None,
|
| 80 |
+
wait_for_ready=None,
|
| 81 |
+
timeout=None,
|
| 82 |
+
metadata=None):
|
| 83 |
+
return grpc.experimental.unary_stream(
|
| 84 |
+
request,
|
| 85 |
+
target,
|
| 86 |
+
'/nvidia.omniverse.storage.versioning.v1alpha.VersioningService/EnumerateVersions',
|
| 87 |
+
nvidia_dot_omniverse_dot_storage_dot_versioning_dot_v1alpha_dot_versioning__pb2.EnumerateVersionsRequest.SerializeToString,
|
| 88 |
+
nvidia_dot_omniverse_dot_storage_dot_versioning_dot_v1alpha_dot_versioning__pb2.EnumerateVersionsResponse.FromString,
|
| 89 |
+
options,
|
| 90 |
+
channel_credentials,
|
| 91 |
+
insecure,
|
| 92 |
+
call_credentials,
|
| 93 |
+
compression,
|
| 94 |
+
wait_for_ready,
|
| 95 |
+
timeout,
|
| 96 |
+
metadata,
|
| 97 |
+
_registered_method=True)
|
docker/hf-space/hf-storage-api/generated/nvidia/omniverse/storage/versioning/v1beta/versioning_pb2.py
ADDED
|
@@ -0,0 +1,46 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# -*- coding: utf-8 -*-
|
| 2 |
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
| 3 |
+
# NO CHECKED-IN PROTOBUF GENCODE
|
| 4 |
+
# source: nvidia/omniverse/storage/versioning/v1beta/versioning.proto
|
| 5 |
+
# Protobuf Python Version: 6.31.1
|
| 6 |
+
"""Generated protocol buffer code."""
|
| 7 |
+
from google.protobuf import descriptor as _descriptor
|
| 8 |
+
from google.protobuf import descriptor_pool as _descriptor_pool
|
| 9 |
+
from google.protobuf import runtime_version as _runtime_version
|
| 10 |
+
from google.protobuf import symbol_database as _symbol_database
|
| 11 |
+
from google.protobuf.internal import builder as _builder
|
| 12 |
+
_runtime_version.ValidateProtobufRuntimeVersion(
|
| 13 |
+
_runtime_version.Domain.PUBLIC,
|
| 14 |
+
6,
|
| 15 |
+
31,
|
| 16 |
+
1,
|
| 17 |
+
'',
|
| 18 |
+
'nvidia/omniverse/storage/versioning/v1beta/versioning.proto'
|
| 19 |
+
)
|
| 20 |
+
# @@protoc_insertion_point(imports)
|
| 21 |
+
|
| 22 |
+
_sym_db = _symbol_database.Default()
|
| 23 |
+
|
| 24 |
+
|
| 25 |
+
from nvidia.omniverse.storage.fileobject.v1beta import fileobject_pb2 as nvidia_dot_omniverse_dot_storage_dot_fileobject_dot_v1beta_dot_fileobject__pb2
|
| 26 |
+
|
| 27 |
+
|
| 28 |
+
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n;nvidia/omniverse/storage/versioning/v1beta/versioning.proto\x12*nvidia.omniverse.storage.versioning.v1beta\x1a;nvidia/omniverse/storage/fileobject/v1beta/fileobject.proto\"4\n\x18\x45numerateVersionsRequest\x12\x18\n\x10resource_address\x18\x01 \x01(\t\"\xb6\x01\n\x19\x45numerateVersionsResponse\x12\x46\n\x05items\x18\x01 \x03(\x0b\x32\x37.nvidia.omniverse.storage.versioning.v1beta.VersionInfo\x12Q\n\x0eversions_order\x18\x02 \x01(\x0e\x32\x39.nvidia.omniverse.storage.versioning.v1beta.VersionsOrder\"\x88\x01\n\x0bVersionInfo\x12O\n\rresource_info\x18\x01 \x01(\x0b\x32\x38.nvidia.omniverse.storage.fileobject.v1beta.ResourceInfo\x12\x18\n\x0bsorting_key\x18\x02 \x01(\tH\x00\x88\x01\x01\x42\x0e\n\x0c_sorting_key*\x8c\x01\n\rVersionsOrder\x12\x1e\n\x1aVERSIONS_ORDER_UNSPECIFIED\x10\x00\x12\x1f\n\x1bVERSIONS_ORDER_NEWEST_FIRST\x10\x01\x12\x1f\n\x1bVERSIONS_ORDER_OLDEST_FIRST\x10\x02\x12\x19\n\x15VERSIONS_ORDER_BY_KEY\x10\x03\x32\xb8\x01\n\x11VersioningService\x12\xa2\x01\n\x11\x45numerateVersions\x12\x44.nvidia.omniverse.storage.versioning.v1beta.EnumerateVersionsRequest\x1a\x45.nvidia.omniverse.storage.versioning.v1beta.EnumerateVersionsResponse0\x01\x42\x82\x01\n.com.nvidia.omniverse.storage.versioning.v1betaB\x0fVersioningProtoP\x01Z=pb.api.nvidia.com/omniverse/storage/versioning/v1beta;storageb\x06proto3')
|
| 29 |
+
|
| 30 |
+
_globals = globals()
|
| 31 |
+
_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
|
| 32 |
+
_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'nvidia.omniverse.storage.versioning.v1beta.versioning_pb2', _globals)
|
| 33 |
+
if not _descriptor._USE_C_DESCRIPTORS:
|
| 34 |
+
_globals['DESCRIPTOR']._loaded_options = None
|
| 35 |
+
_globals['DESCRIPTOR']._serialized_options = b'\n.com.nvidia.omniverse.storage.versioning.v1betaB\017VersioningProtoP\001Z=pb.api.nvidia.com/omniverse/storage/versioning/v1beta;storage'
|
| 36 |
+
_globals['_VERSIONSORDER']._serialized_start=547
|
| 37 |
+
_globals['_VERSIONSORDER']._serialized_end=687
|
| 38 |
+
_globals['_ENUMERATEVERSIONSREQUEST']._serialized_start=168
|
| 39 |
+
_globals['_ENUMERATEVERSIONSREQUEST']._serialized_end=220
|
| 40 |
+
_globals['_ENUMERATEVERSIONSRESPONSE']._serialized_start=223
|
| 41 |
+
_globals['_ENUMERATEVERSIONSRESPONSE']._serialized_end=405
|
| 42 |
+
_globals['_VERSIONINFO']._serialized_start=408
|
| 43 |
+
_globals['_VERSIONINFO']._serialized_end=544
|
| 44 |
+
_globals['_VERSIONINGSERVICE']._serialized_start=690
|
| 45 |
+
_globals['_VERSIONINGSERVICE']._serialized_end=874
|
| 46 |
+
# @@protoc_insertion_point(module_scope)
|
docker/hf-space/hf-storage-api/generated/nvidia/omniverse/storage/versioning/v1beta/versioning_pb2.pyi
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
from nvidia.omniverse.storage.fileobject.v1beta import fileobject_pb2 as _fileobject_pb2
|
| 2 |
+
from google.protobuf.internal import containers as _containers
|
| 3 |
+
from google.protobuf.internal import enum_type_wrapper as _enum_type_wrapper
|
| 4 |
+
from google.protobuf import descriptor as _descriptor
|
| 5 |
+
from google.protobuf import message as _message
|
| 6 |
+
from collections.abc import Iterable as _Iterable, Mapping as _Mapping
|
| 7 |
+
from typing import ClassVar as _ClassVar, Optional as _Optional, Union as _Union
|
| 8 |
+
|
| 9 |
+
DESCRIPTOR: _descriptor.FileDescriptor
|
| 10 |
+
|
| 11 |
+
class VersionsOrder(int, metaclass=_enum_type_wrapper.EnumTypeWrapper):
|
| 12 |
+
__slots__ = ()
|
| 13 |
+
VERSIONS_ORDER_UNSPECIFIED: _ClassVar[VersionsOrder]
|
| 14 |
+
VERSIONS_ORDER_NEWEST_FIRST: _ClassVar[VersionsOrder]
|
| 15 |
+
VERSIONS_ORDER_OLDEST_FIRST: _ClassVar[VersionsOrder]
|
| 16 |
+
VERSIONS_ORDER_BY_KEY: _ClassVar[VersionsOrder]
|
| 17 |
+
VERSIONS_ORDER_UNSPECIFIED: VersionsOrder
|
| 18 |
+
VERSIONS_ORDER_NEWEST_FIRST: VersionsOrder
|
| 19 |
+
VERSIONS_ORDER_OLDEST_FIRST: VersionsOrder
|
| 20 |
+
VERSIONS_ORDER_BY_KEY: VersionsOrder
|
| 21 |
+
|
| 22 |
+
class EnumerateVersionsRequest(_message.Message):
|
| 23 |
+
__slots__ = ("resource_address",)
|
| 24 |
+
RESOURCE_ADDRESS_FIELD_NUMBER: _ClassVar[int]
|
| 25 |
+
resource_address: str
|
| 26 |
+
def __init__(self, resource_address: _Optional[str] = ...) -> None: ...
|
| 27 |
+
|
| 28 |
+
class EnumerateVersionsResponse(_message.Message):
|
| 29 |
+
__slots__ = ("items", "versions_order")
|
| 30 |
+
ITEMS_FIELD_NUMBER: _ClassVar[int]
|
| 31 |
+
VERSIONS_ORDER_FIELD_NUMBER: _ClassVar[int]
|
| 32 |
+
items: _containers.RepeatedCompositeFieldContainer[VersionInfo]
|
| 33 |
+
versions_order: VersionsOrder
|
| 34 |
+
def __init__(self, items: _Optional[_Iterable[_Union[VersionInfo, _Mapping]]] = ..., versions_order: _Optional[_Union[VersionsOrder, str]] = ...) -> None: ...
|
| 35 |
+
|
| 36 |
+
class VersionInfo(_message.Message):
|
| 37 |
+
__slots__ = ("resource_info", "sorting_key")
|
| 38 |
+
RESOURCE_INFO_FIELD_NUMBER: _ClassVar[int]
|
| 39 |
+
SORTING_KEY_FIELD_NUMBER: _ClassVar[int]
|
| 40 |
+
resource_info: _fileobject_pb2.ResourceInfo
|
| 41 |
+
sorting_key: str
|
| 42 |
+
def __init__(self, resource_info: _Optional[_Union[_fileobject_pb2.ResourceInfo, _Mapping]] = ..., sorting_key: _Optional[str] = ...) -> None: ...
|
docker/hf-space/hf-storage-api/generated/nvidia/omniverse/storage/versioning/v1beta/versioning_pb2_grpc.py
ADDED
|
@@ -0,0 +1,97 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
|
| 2 |
+
"""Client and server classes corresponding to protobuf-defined services."""
|
| 3 |
+
import grpc
|
| 4 |
+
import warnings
|
| 5 |
+
|
| 6 |
+
from nvidia.omniverse.storage.versioning.v1beta import versioning_pb2 as nvidia_dot_omniverse_dot_storage_dot_versioning_dot_v1beta_dot_versioning__pb2
|
| 7 |
+
|
| 8 |
+
GRPC_GENERATED_VERSION = '1.80.0'
|
| 9 |
+
GRPC_VERSION = grpc.__version__
|
| 10 |
+
_version_not_supported = False
|
| 11 |
+
|
| 12 |
+
try:
|
| 13 |
+
from grpc._utilities import first_version_is_lower
|
| 14 |
+
_version_not_supported = first_version_is_lower(GRPC_VERSION, GRPC_GENERATED_VERSION)
|
| 15 |
+
except ImportError:
|
| 16 |
+
_version_not_supported = True
|
| 17 |
+
|
| 18 |
+
if _version_not_supported:
|
| 19 |
+
raise RuntimeError(
|
| 20 |
+
f'The grpc package installed is at version {GRPC_VERSION},'
|
| 21 |
+
+ ' but the generated code in nvidia/omniverse/storage/versioning/v1beta/versioning_pb2_grpc.py depends on'
|
| 22 |
+
+ f' grpcio>={GRPC_GENERATED_VERSION}.'
|
| 23 |
+
+ f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}'
|
| 24 |
+
+ f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.'
|
| 25 |
+
)
|
| 26 |
+
|
| 27 |
+
|
| 28 |
+
class VersioningServiceStub(object):
|
| 29 |
+
"""Missing associated documentation comment in .proto file."""
|
| 30 |
+
|
| 31 |
+
def __init__(self, channel):
|
| 32 |
+
"""Constructor.
|
| 33 |
+
|
| 34 |
+
Args:
|
| 35 |
+
channel: A grpc.Channel.
|
| 36 |
+
"""
|
| 37 |
+
self.EnumerateVersions = channel.unary_stream(
|
| 38 |
+
'/nvidia.omniverse.storage.versioning.v1beta.VersioningService/EnumerateVersions',
|
| 39 |
+
request_serializer=nvidia_dot_omniverse_dot_storage_dot_versioning_dot_v1beta_dot_versioning__pb2.EnumerateVersionsRequest.SerializeToString,
|
| 40 |
+
response_deserializer=nvidia_dot_omniverse_dot_storage_dot_versioning_dot_v1beta_dot_versioning__pb2.EnumerateVersionsResponse.FromString,
|
| 41 |
+
_registered_method=True)
|
| 42 |
+
|
| 43 |
+
|
| 44 |
+
class VersioningServiceServicer(object):
|
| 45 |
+
"""Missing associated documentation comment in .proto file."""
|
| 46 |
+
|
| 47 |
+
def EnumerateVersions(self, request, context):
|
| 48 |
+
"""Missing associated documentation comment in .proto file."""
|
| 49 |
+
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
| 50 |
+
context.set_details('Method not implemented!')
|
| 51 |
+
raise NotImplementedError('Method not implemented!')
|
| 52 |
+
|
| 53 |
+
|
| 54 |
+
def add_VersioningServiceServicer_to_server(servicer, server):
|
| 55 |
+
rpc_method_handlers = {
|
| 56 |
+
'EnumerateVersions': grpc.unary_stream_rpc_method_handler(
|
| 57 |
+
servicer.EnumerateVersions,
|
| 58 |
+
request_deserializer=nvidia_dot_omniverse_dot_storage_dot_versioning_dot_v1beta_dot_versioning__pb2.EnumerateVersionsRequest.FromString,
|
| 59 |
+
response_serializer=nvidia_dot_omniverse_dot_storage_dot_versioning_dot_v1beta_dot_versioning__pb2.EnumerateVersionsResponse.SerializeToString,
|
| 60 |
+
),
|
| 61 |
+
}
|
| 62 |
+
generic_handler = grpc.method_handlers_generic_handler(
|
| 63 |
+
'nvidia.omniverse.storage.versioning.v1beta.VersioningService', rpc_method_handlers)
|
| 64 |
+
server.add_generic_rpc_handlers((generic_handler,))
|
| 65 |
+
server.add_registered_method_handlers('nvidia.omniverse.storage.versioning.v1beta.VersioningService', rpc_method_handlers)
|
| 66 |
+
|
| 67 |
+
|
| 68 |
+
# This class is part of an EXPERIMENTAL API.
|
| 69 |
+
class VersioningService(object):
|
| 70 |
+
"""Missing associated documentation comment in .proto file."""
|
| 71 |
+
|
| 72 |
+
@staticmethod
|
| 73 |
+
def EnumerateVersions(request,
|
| 74 |
+
target,
|
| 75 |
+
options=(),
|
| 76 |
+
channel_credentials=None,
|
| 77 |
+
call_credentials=None,
|
| 78 |
+
insecure=False,
|
| 79 |
+
compression=None,
|
| 80 |
+
wait_for_ready=None,
|
| 81 |
+
timeout=None,
|
| 82 |
+
metadata=None):
|
| 83 |
+
return grpc.experimental.unary_stream(
|
| 84 |
+
request,
|
| 85 |
+
target,
|
| 86 |
+
'/nvidia.omniverse.storage.versioning.v1beta.VersioningService/EnumerateVersions',
|
| 87 |
+
nvidia_dot_omniverse_dot_storage_dot_versioning_dot_v1beta_dot_versioning__pb2.EnumerateVersionsRequest.SerializeToString,
|
| 88 |
+
nvidia_dot_omniverse_dot_storage_dot_versioning_dot_v1beta_dot_versioning__pb2.EnumerateVersionsResponse.FromString,
|
| 89 |
+
options,
|
| 90 |
+
channel_credentials,
|
| 91 |
+
insecure,
|
| 92 |
+
call_credentials,
|
| 93 |
+
compression,
|
| 94 |
+
wait_for_ready,
|
| 95 |
+
timeout,
|
| 96 |
+
metadata,
|
| 97 |
+
_registered_method=True)
|
docker/hf-space/hf-storage-api/hf_storage_api/__init__.py
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
|
| 2 |
+
# SPDX-License-Identifier: Apache-2.0
|
| 3 |
+
|
| 4 |
+
"""Read-only Omniverse Storage API gRPC server backed by HuggingFace datasets."""
|
| 5 |
+
|
| 6 |
+
__version__ = "0.1.0"
|
docker/hf-space/hf-storage-api/hf_storage_api/__main__.py
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
|
| 2 |
+
# SPDX-License-Identifier: Apache-2.0
|
| 3 |
+
|
| 4 |
+
"""``python -m hf_storage_api``."""
|
| 5 |
+
|
| 6 |
+
from __future__ import annotations
|
| 7 |
+
|
| 8 |
+
import asyncio
|
| 9 |
+
|
| 10 |
+
from .server import serve
|
| 11 |
+
|
| 12 |
+
|
| 13 |
+
def main() -> None:
|
| 14 |
+
asyncio.run(serve())
|
| 15 |
+
|
| 16 |
+
|
| 17 |
+
if __name__ == "__main__":
|
| 18 |
+
main()
|
docker/hf-space/hf-storage-api/hf_storage_api/addressing.py
ADDED
|
@@ -0,0 +1,159 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
|
| 2 |
+
# SPDX-License-Identifier: Apache-2.0
|
| 3 |
+
|
| 4 |
+
"""Addresses <-> (repo, path).
|
| 5 |
+
|
| 6 |
+
Emitted addresses are ``https://`` by default and mirror HuggingFace's own URL
|
| 7 |
+
layout, so a pinned address *is* the public URL rather than something that has to
|
| 8 |
+
be rewritten into one (plan §6.1). ``HF_ADAPTER_URI_SCHEME=hf`` restores the
|
| 9 |
+
synthetic ``hf://`` namespace.
|
| 10 |
+
|
| 11 |
+
Parse loose, emit strict (plan §2.4). The client does not normalise the root
|
| 12 |
+
before sending it: ``Enumerate`` receives ``STORAGE_API_BASE_URI`` verbatim
|
| 13 |
+
(typically with no trailing slash) while ``ListStat`` receives
|
| 14 |
+
``rstrip('/') + '/'``. Both must resolve to the same root. Everything this module
|
| 15 |
+
*emits*, on the other hand, obeys the rule the client keys off: folder addresses
|
| 16 |
+
end in ``/``, asset addresses do not (contract doc §3.3).
|
| 17 |
+
"""
|
| 18 |
+
|
| 19 |
+
from __future__ import annotations
|
| 20 |
+
|
| 21 |
+
from dataclasses import dataclass
|
| 22 |
+
from urllib.parse import unquote, urlsplit
|
| 23 |
+
|
| 24 |
+
# HF repo types and their URL infix. Datasets and spaces are namespaced in the
|
| 25 |
+
# URL; models sit at the bare root.
|
| 26 |
+
REPO_TYPE_PREFIX = {"dataset": "datasets", "space": "spaces", "model": ""}
|
| 27 |
+
|
| 28 |
+
# Accepted inbound regardless of which scheme we emit. `hf` stays here after the
|
| 29 |
+
# switch to `https` so an address minted by an earlier deployment — persisted in
|
| 30 |
+
# a USD Search index, or pasted into a Kit session — still resolves.
|
| 31 |
+
INBOUND_SCHEMES = frozenset({"hf", "https", "http"})
|
| 32 |
+
|
| 33 |
+
DEFAULT_SCHEME = "https"
|
| 34 |
+
|
| 35 |
+
|
| 36 |
+
@dataclass(frozen=True)
|
| 37 |
+
class Address:
|
| 38 |
+
"""A parsed address."""
|
| 39 |
+
|
| 40 |
+
host: str
|
| 41 |
+
repo_type: str
|
| 42 |
+
repo_id: str # "<owner>/<name>"
|
| 43 |
+
path: str # repo-relative, no leading slash; "" for the repo root
|
| 44 |
+
is_folder: bool # the address carried a trailing slash
|
| 45 |
+
revision: str | None = None # from a `/resolve/<rev>/` segment, when present
|
| 46 |
+
|
| 47 |
+
@property
|
| 48 |
+
def repo_key(self) -> str:
|
| 49 |
+
return f"{self.repo_type}:{self.repo_id}"
|
| 50 |
+
|
| 51 |
+
|
| 52 |
+
class AddressError(ValueError):
|
| 53 |
+
"""The address is not a well-formed address in our namespace."""
|
| 54 |
+
|
| 55 |
+
|
| 56 |
+
def parse(address: str, *, scheme: str = DEFAULT_SCHEME, revision_in_uri: bool = True) -> Address:
|
| 57 |
+
"""Parse a ``https://host/datasets/<owner>/<name>[/resolve/<rev>][/<path>]``.
|
| 58 |
+
|
| 59 |
+
Accepts a root with or without a trailing slash, and with or without the
|
| 60 |
+
``/resolve/<rev>/`` segment — parse loose, emit strict (plan §2.4). Raises
|
| 61 |
+
:class:`AddressError` for anything that is not addressable here; the caller
|
| 62 |
+
maps that to ``INVALID_ARGUMENT`` (plan §5.3).
|
| 63 |
+
|
| 64 |
+
``revision_in_uri=False`` turns the ``resolve`` segment back into an ordinary
|
| 65 |
+
path component, for the pathological repo with a top-level folder by that
|
| 66 |
+
name.
|
| 67 |
+
"""
|
| 68 |
+
if not address:
|
| 69 |
+
raise AddressError("empty address")
|
| 70 |
+
|
| 71 |
+
split = urlsplit(address)
|
| 72 |
+
# Every scheme in INBOUND_SCHEMES is accepted alongside the configured one.
|
| 73 |
+
# Emitted addresses mirror HuggingFace's URL layout exactly, so all of these
|
| 74 |
+
# forms name the same object — and a consumer handed a public URL (from
|
| 75 |
+
# metadata, or from a public-url rewrite) will hand it straight back to us
|
| 76 |
+
# expecting it to work. Parse loose, emit strict.
|
| 77 |
+
if split.scheme != scheme and split.scheme not in INBOUND_SCHEMES:
|
| 78 |
+
raise AddressError(f"expected scheme {scheme!r}, got {split.scheme!r} in {address!r}")
|
| 79 |
+
if not split.netloc:
|
| 80 |
+
raise AddressError(f"missing host in {address!r}")
|
| 81 |
+
|
| 82 |
+
is_folder = split.path.endswith("/")
|
| 83 |
+
# unquote so a percent-encoded address (STORAGE_API_APPLY_URL_QUOTE=true)
|
| 84 |
+
# compares equal to a plain one.
|
| 85 |
+
segments = [unquote(s) for s in split.path.split("/") if s]
|
| 86 |
+
|
| 87 |
+
repo_type = "model"
|
| 88 |
+
for rtype, prefix in REPO_TYPE_PREFIX.items():
|
| 89 |
+
if prefix and segments[:1] == [prefix]:
|
| 90 |
+
repo_type, segments = rtype, segments[1:]
|
| 91 |
+
break
|
| 92 |
+
|
| 93 |
+
if len(segments) < 2:
|
| 94 |
+
raise AddressError(f"address does not name a repo (<owner>/<name>): {address!r}")
|
| 95 |
+
|
| 96 |
+
repo_id = f"{segments[0]}/{segments[1]}"
|
| 97 |
+
rest = segments[2:]
|
| 98 |
+
|
| 99 |
+
# `<repo>/resolve/<rev>/<path>` mirrors HuggingFace's own URL layout, so an
|
| 100 |
+
# address can be turned into its public HTTPS form by swapping the scheme.
|
| 101 |
+
revision: str | None = None
|
| 102 |
+
if revision_in_uri and len(rest) >= 2 and rest[0] == "resolve":
|
| 103 |
+
revision, rest = rest[1], rest[2:]
|
| 104 |
+
|
| 105 |
+
return Address(
|
| 106 |
+
host=split.netloc,
|
| 107 |
+
repo_type=repo_type,
|
| 108 |
+
repo_id=repo_id,
|
| 109 |
+
path="/".join(rest),
|
| 110 |
+
is_folder=is_folder,
|
| 111 |
+
revision=revision,
|
| 112 |
+
)
|
| 113 |
+
|
| 114 |
+
|
| 115 |
+
def try_parse(address: str, *, scheme: str = DEFAULT_SCHEME, revision_in_uri: bool = True) -> Address | None:
|
| 116 |
+
try:
|
| 117 |
+
return parse(address, scheme=scheme, revision_in_uri=revision_in_uri)
|
| 118 |
+
except AddressError:
|
| 119 |
+
return None
|
| 120 |
+
|
| 121 |
+
|
| 122 |
+
def build(
|
| 123 |
+
*,
|
| 124 |
+
host: str,
|
| 125 |
+
repo_type: str,
|
| 126 |
+
repo_id: str,
|
| 127 |
+
path: str = "",
|
| 128 |
+
is_folder: bool = False,
|
| 129 |
+
scheme: str = DEFAULT_SCHEME,
|
| 130 |
+
revision: str | None = None,
|
| 131 |
+
) -> str:
|
| 132 |
+
"""Emit a canonical address. Folders end in ``/``; assets never do.
|
| 133 |
+
|
| 134 |
+
With the default ``https`` scheme and a ``revision``, the result is byte-identical
|
| 135 |
+
to HuggingFace's own resolve URL. *Without* a revision it is HTTPS-shaped but not
|
| 136 |
+
a fetchable HF URL — HF requires a ``/resolve/<rev>/`` or ``/blob/<rev>/`` segment.
|
| 137 |
+
It still round-trips through :func:`parse`, which is what this service needs of it;
|
| 138 |
+
see the plan's §6.1 on pairing ``https`` with ``URI_REVISION_MODE``.
|
| 139 |
+
"""
|
| 140 |
+
prefix = REPO_TYPE_PREFIX.get(repo_type, "")
|
| 141 |
+
ref = f"resolve/{revision}" if revision else ""
|
| 142 |
+
parts = [p for p in (prefix, repo_id, ref, path.strip("/")) if p]
|
| 143 |
+
out = f"{scheme}://{host}/" + "/".join(parts)
|
| 144 |
+
if is_folder and not out.endswith("/"):
|
| 145 |
+
out += "/"
|
| 146 |
+
return out
|
| 147 |
+
|
| 148 |
+
|
| 149 |
+
def is_within(path: str, folder: str) -> bool:
|
| 150 |
+
"""Is ``path`` the folder itself or something underneath it?
|
| 151 |
+
|
| 152 |
+
Boundary-aware: ``sm_box_a01`` does not contain ``sm_box_a01_extra/x.usd``.
|
| 153 |
+
This is the access-boundary predicate of plan §8.4, so it must not degrade to
|
| 154 |
+
a bare ``startswith``.
|
| 155 |
+
"""
|
| 156 |
+
folder = folder.strip("/")
|
| 157 |
+
if not folder:
|
| 158 |
+
return True
|
| 159 |
+
return path == folder or path.startswith(folder + "/")
|
docker/hf-space/hf-storage-api/hf_storage_api/auth.py
ADDED
|
@@ -0,0 +1,58 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
|
| 2 |
+
# SPDX-License-Identifier: Apache-2.0
|
| 3 |
+
|
| 4 |
+
"""Inbound gRPC auth (plan §6.4).
|
| 5 |
+
|
| 6 |
+
The client sends whatever ``get_grpc_request_metadata()`` produces — a bearer
|
| 7 |
+
token from ``STORAGE_API_TOKEN`` / ``_TOKEN_FILE`` / OpenID. Kit sends the same
|
| 8 |
+
header via ``OMNI_STORAGE_AUTHORIZATION``. We check a shared secret so the HF
|
| 9 |
+
token is not effectively public to anything that can reach the gRPC port.
|
| 10 |
+
|
| 11 |
+
Nothing is exempt except the health service — ``ListServices`` in particular
|
| 12 |
+
doubles as the client's ``check_connection()``, so exempting *that* would leave
|
| 13 |
+
an unauthenticated probe of what this server serves.
|
| 14 |
+
"""
|
| 15 |
+
|
| 16 |
+
from __future__ import annotations
|
| 17 |
+
|
| 18 |
+
import logging
|
| 19 |
+
import secrets
|
| 20 |
+
|
| 21 |
+
import grpc
|
| 22 |
+
|
| 23 |
+
from .health import METHOD_PREFIX as HEALTH_PREFIX
|
| 24 |
+
|
| 25 |
+
logger = logging.getLogger(__name__)
|
| 26 |
+
|
| 27 |
+
|
| 28 |
+
class BearerAuthInterceptor(grpc.aio.ServerInterceptor):
|
| 29 |
+
def __init__(self, expected_token: str | None) -> None:
|
| 30 |
+
self._expected = expected_token
|
| 31 |
+
|
| 32 |
+
async def intercept_service(self, continuation, handler_call_details):
|
| 33 |
+
if self._expected is None:
|
| 34 |
+
return await continuation(handler_call_details)
|
| 35 |
+
|
| 36 |
+
# The health service is the one exemption, and it is forced: a Kubernetes
|
| 37 |
+
# probe cannot present a bearer token. It discloses only SERVING /
|
| 38 |
+
# NOT_SERVING, never anything about the dataset.
|
| 39 |
+
if handler_call_details.method.startswith(HEALTH_PREFIX):
|
| 40 |
+
return await continuation(handler_call_details)
|
| 41 |
+
|
| 42 |
+
metadata = dict(handler_call_details.invocation_metadata or ())
|
| 43 |
+
header = metadata.get("authorization", "")
|
| 44 |
+
token = header[7:] if header.lower().startswith("bearer ") else header
|
| 45 |
+
|
| 46 |
+
# Constant-time compare: this is a shared secret, not a hash.
|
| 47 |
+
if token and secrets.compare_digest(token, self._expected):
|
| 48 |
+
return await continuation(handler_call_details)
|
| 49 |
+
|
| 50 |
+
logger.warning("rejected unauthenticated call to %s", handler_call_details.method)
|
| 51 |
+
return _abort_handler(grpc.StatusCode.UNAUTHENTICATED, "missing or invalid bearer token")
|
| 52 |
+
|
| 53 |
+
|
| 54 |
+
def _abort_handler(code: grpc.StatusCode, detail: str) -> grpc.RpcMethodHandler:
|
| 55 |
+
async def abort(request, context):
|
| 56 |
+
await context.abort(code, detail)
|
| 57 |
+
|
| 58 |
+
return grpc.unary_unary_rpc_method_handler(abort)
|
docker/hf-space/hf-storage-api/hf_storage_api/cache.py
ADDED
|
@@ -0,0 +1,172 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
|
| 2 |
+
# SPDX-License-Identifier: Apache-2.0
|
| 3 |
+
|
| 4 |
+
"""TTL + LRU cache with single-flight loading (plan §5.2).
|
| 5 |
+
|
| 6 |
+
Single-flight is not optional here. A crawl ``Enumerate``s and then ``Stat``s
|
| 7 |
+
every item, and a thumbnail probe fires up to four ``Stat``s per asset for
|
| 8 |
+
candidate ``.thumbs`` paths — all against the same folder, concurrently. Without
|
| 9 |
+
collapsing concurrent loads of one key onto a single upstream request, laziness
|
| 10 |
+
turns one preload into a burst of duplicates.
|
| 11 |
+
"""
|
| 12 |
+
|
| 13 |
+
from __future__ import annotations
|
| 14 |
+
|
| 15 |
+
import asyncio
|
| 16 |
+
import time
|
| 17 |
+
from collections import OrderedDict
|
| 18 |
+
from collections.abc import Awaitable, Callable, Hashable
|
| 19 |
+
from dataclasses import dataclass, field
|
| 20 |
+
from typing import Generic, TypeVar
|
| 21 |
+
|
| 22 |
+
K = TypeVar("K", bound=Hashable)
|
| 23 |
+
V = TypeVar("V")
|
| 24 |
+
|
| 25 |
+
|
| 26 |
+
class Missing:
|
| 27 |
+
"""A cached negative result.
|
| 28 |
+
|
| 29 |
+
Distinct from ``None`` so a miss can be cached and served without re-hitting
|
| 30 |
+
HuggingFace: the thumbnail probe generates a steady stream of legitimate
|
| 31 |
+
misses that would otherwise be upstream traffic every time.
|
| 32 |
+
"""
|
| 33 |
+
|
| 34 |
+
__slots__ = ()
|
| 35 |
+
|
| 36 |
+
def __bool__(self) -> bool:
|
| 37 |
+
return False
|
| 38 |
+
|
| 39 |
+
|
| 40 |
+
MISSING = Missing()
|
| 41 |
+
|
| 42 |
+
|
| 43 |
+
@dataclass
|
| 44 |
+
class CacheStats:
|
| 45 |
+
hits: int = 0
|
| 46 |
+
misses: int = 0
|
| 47 |
+
loads: int = 0
|
| 48 |
+
negative_hits: int = 0
|
| 49 |
+
evictions: int = 0
|
| 50 |
+
|
| 51 |
+
@property
|
| 52 |
+
def hit_rate(self) -> float:
|
| 53 |
+
total = self.hits + self.misses
|
| 54 |
+
return self.hits / total if total else 0.0
|
| 55 |
+
|
| 56 |
+
|
| 57 |
+
@dataclass
|
| 58 |
+
class _Entry(Generic[V]):
|
| 59 |
+
value: V | Missing
|
| 60 |
+
expires_at: float
|
| 61 |
+
|
| 62 |
+
|
| 63 |
+
class SingleFlightCache(Generic[K, V]):
|
| 64 |
+
"""Async cache: at most one in-flight load per key, TTL + LRU eviction."""
|
| 65 |
+
|
| 66 |
+
def __init__(
|
| 67 |
+
self,
|
| 68 |
+
*,
|
| 69 |
+
ttl: float,
|
| 70 |
+
negative_ttl: float,
|
| 71 |
+
max_size: int,
|
| 72 |
+
clock: Callable[[], float] = time.monotonic,
|
| 73 |
+
) -> None:
|
| 74 |
+
self._ttl = ttl
|
| 75 |
+
self._negative_ttl = negative_ttl
|
| 76 |
+
self._max_size = max_size
|
| 77 |
+
self._clock = clock
|
| 78 |
+
self._entries: OrderedDict[K, _Entry[V]] = OrderedDict()
|
| 79 |
+
self._inflight: dict[K, asyncio.Future[V | Missing]] = {}
|
| 80 |
+
self.stats = CacheStats()
|
| 81 |
+
|
| 82 |
+
def _get_live(self, key: K) -> _Entry[V] | None:
|
| 83 |
+
entry = self._entries.get(key)
|
| 84 |
+
if entry is None:
|
| 85 |
+
return None
|
| 86 |
+
if entry.expires_at <= self._clock():
|
| 87 |
+
del self._entries[key]
|
| 88 |
+
return None
|
| 89 |
+
self._entries.move_to_end(key)
|
| 90 |
+
return entry
|
| 91 |
+
|
| 92 |
+
def peek(self, key: K) -> V | Missing | None:
|
| 93 |
+
"""Return a cached value without loading. ``None`` means "not cached"."""
|
| 94 |
+
entry = self._get_live(key)
|
| 95 |
+
return entry.value if entry else None
|
| 96 |
+
|
| 97 |
+
def put(self, key: K, value: V | Missing) -> None:
|
| 98 |
+
ttl = self._negative_ttl if isinstance(value, Missing) else self._ttl
|
| 99 |
+
self._entries[key] = _Entry(value=value, expires_at=self._clock() + ttl)
|
| 100 |
+
self._entries.move_to_end(key)
|
| 101 |
+
while len(self._entries) > self._max_size:
|
| 102 |
+
self._entries.popitem(last=False)
|
| 103 |
+
self.stats.evictions += 1
|
| 104 |
+
|
| 105 |
+
async def get(self, key: K, loader: Callable[[], Awaitable[V | Missing]]) -> V | Missing:
|
| 106 |
+
"""Return the cached value, or load it — once, however many callers race."""
|
| 107 |
+
entry = self._get_live(key)
|
| 108 |
+
if entry is not None:
|
| 109 |
+
self.stats.hits += 1
|
| 110 |
+
if isinstance(entry.value, Missing):
|
| 111 |
+
self.stats.negative_hits += 1
|
| 112 |
+
return entry.value
|
| 113 |
+
|
| 114 |
+
self.stats.misses += 1
|
| 115 |
+
|
| 116 |
+
inflight = self._inflight.get(key)
|
| 117 |
+
if inflight is not None:
|
| 118 |
+
# Someone else is already loading this key: wait for their result
|
| 119 |
+
# rather than issuing a duplicate upstream request.
|
| 120 |
+
return await asyncio.shield(inflight)
|
| 121 |
+
|
| 122 |
+
future: asyncio.Future[V | Missing] = asyncio.get_running_loop().create_future()
|
| 123 |
+
self._inflight[key] = future
|
| 124 |
+
try:
|
| 125 |
+
self.stats.loads += 1
|
| 126 |
+
value = await loader()
|
| 127 |
+
except BaseException as exc:
|
| 128 |
+
# Failures are not cached — a transient 503 must not pin a miss for
|
| 129 |
+
# the whole TTL.
|
| 130 |
+
if not future.done():
|
| 131 |
+
future.set_exception(exc)
|
| 132 |
+
raise
|
| 133 |
+
else:
|
| 134 |
+
self.put(key, value)
|
| 135 |
+
if not future.done():
|
| 136 |
+
future.set_result(value)
|
| 137 |
+
return value
|
| 138 |
+
finally:
|
| 139 |
+
self._inflight.pop(key, None)
|
| 140 |
+
# Nobody may be awaiting a failed future; keep the loop quiet about it.
|
| 141 |
+
if future.done() and future.exception() is not None:
|
| 142 |
+
future.exception()
|
| 143 |
+
|
| 144 |
+
def clear(self) -> None:
|
| 145 |
+
self._entries.clear()
|
| 146 |
+
|
| 147 |
+
def __len__(self) -> int:
|
| 148 |
+
return len(self._entries)
|
| 149 |
+
|
| 150 |
+
|
| 151 |
+
@dataclass
|
| 152 |
+
class TokenBucket:
|
| 153 |
+
"""Simple rate limiter for upstream calls (plan §8.5)."""
|
| 154 |
+
|
| 155 |
+
rate: float
|
| 156 |
+
capacity: float
|
| 157 |
+
_tokens: float = field(default=0.0, init=False)
|
| 158 |
+
_updated: float = field(default=0.0, init=False)
|
| 159 |
+
|
| 160 |
+
def __post_init__(self) -> None:
|
| 161 |
+
self._tokens = self.capacity
|
| 162 |
+
self._updated = time.monotonic()
|
| 163 |
+
|
| 164 |
+
async def acquire(self) -> None:
|
| 165 |
+
while True:
|
| 166 |
+
now = time.monotonic()
|
| 167 |
+
self._tokens = min(self.capacity, self._tokens + (now - self._updated) * self.rate)
|
| 168 |
+
self._updated = now
|
| 169 |
+
if self._tokens >= 1:
|
| 170 |
+
self._tokens -= 1
|
| 171 |
+
return
|
| 172 |
+
await asyncio.sleep((1 - self._tokens) / self.rate)
|
docker/hf-space/hf-storage-api/hf_storage_api/catalog/__init__.py
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
|
| 2 |
+
# SPDX-License-Identifier: Apache-2.0
|
docker/hf-space/hf-storage-api/hf_storage_api/catalog/loader.py
ADDED
|
@@ -0,0 +1,282 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
|
| 2 |
+
# SPDX-License-Identifier: Apache-2.0
|
| 3 |
+
|
| 4 |
+
"""Catalog loading: ``file`` | ``url`` | ``discover`` (plan §6.3).
|
| 5 |
+
|
| 6 |
+
Reload is atomic — build off to the side, swap the reference. A failed refresh
|
| 7 |
+
logs and keeps serving the last good catalog: never fail a crawl because GitHub
|
| 8 |
+
blipped.
|
| 9 |
+
|
| 10 |
+
Every transport is polled, not just ``url``: a catalog file is mounted from a
|
| 11 |
+
ConfigMap or written by the catalog-sync sidecar, and both change under a running
|
| 12 |
+
process (sidecar plan §3).
|
| 13 |
+
"""
|
| 14 |
+
|
| 15 |
+
from __future__ import annotations
|
| 16 |
+
|
| 17 |
+
import asyncio
|
| 18 |
+
import hashlib
|
| 19 |
+
import logging
|
| 20 |
+
from pathlib import Path
|
| 21 |
+
|
| 22 |
+
import httpx
|
| 23 |
+
import yaml
|
| 24 |
+
|
| 25 |
+
from ..hf.client import HFClient
|
| 26 |
+
from ..settings import Settings
|
| 27 |
+
from .model import Catalog, LayoutConfig, RepoConfig
|
| 28 |
+
from .urllist import UrlListError, looks_like_url_list, normalize_asset_urls, parse_url_list
|
| 29 |
+
|
| 30 |
+
logger = logging.getLogger(__name__)
|
| 31 |
+
|
| 32 |
+
|
| 33 |
+
class CatalogError(Exception):
|
| 34 |
+
pass
|
| 35 |
+
|
| 36 |
+
|
| 37 |
+
def parse_catalog(raw: str) -> Catalog:
|
| 38 |
+
data = yaml.safe_load(raw)
|
| 39 |
+
if not isinstance(data, dict):
|
| 40 |
+
raise CatalogError("catalog must be a YAML mapping")
|
| 41 |
+
catalog = Catalog.model_validate(data)
|
| 42 |
+
try:
|
| 43 |
+
# `assets:` entries may be full HuggingFace URLs as well as folder names.
|
| 44 |
+
return normalize_asset_urls(catalog)
|
| 45 |
+
except UrlListError as exc:
|
| 46 |
+
raise CatalogError(str(exc)) from exc
|
| 47 |
+
|
| 48 |
+
|
| 49 |
+
def parse_text(text: str, *, fmt: str = "auto", layout: LayoutConfig | None = None) -> Catalog:
|
| 50 |
+
"""Parse catalog text, picking the format when asked to.
|
| 51 |
+
|
| 52 |
+
Transport (file/url) and format (yaml/url-list) are independent: a URL list
|
| 53 |
+
is just as likely to live in a GitHub repo as a YAML catalog is. Shared with
|
| 54 |
+
the catalog-sync sidecar so that what it accepts and what the service accepts
|
| 55 |
+
cannot drift apart.
|
| 56 |
+
"""
|
| 57 |
+
if fmt == "auto":
|
| 58 |
+
fmt = "url-list" if looks_like_url_list(text) else "yaml"
|
| 59 |
+
|
| 60 |
+
if fmt == "url-list":
|
| 61 |
+
try:
|
| 62 |
+
return parse_url_list(text, layout=layout)
|
| 63 |
+
except UrlListError as exc:
|
| 64 |
+
raise CatalogError(str(exc)) from exc
|
| 65 |
+
return parse_catalog(text)
|
| 66 |
+
|
| 67 |
+
|
| 68 |
+
class CatalogLoader:
|
| 69 |
+
"""Loads the catalog and keeps it fresh, holding the last good copy."""
|
| 70 |
+
|
| 71 |
+
def __init__(self, settings: Settings, hf: HFClient) -> None:
|
| 72 |
+
self._settings = settings
|
| 73 |
+
self._hf = hf
|
| 74 |
+
self._etag: str | None = None
|
| 75 |
+
self._last_good: Catalog | None = None
|
| 76 |
+
self._task: asyncio.Task | None = None
|
| 77 |
+
# What the catalog file looked like last time we read it: a cheap
|
| 78 |
+
# (mtime, size) gate in front of an authoritative content digest.
|
| 79 |
+
self._stat: tuple[int, int] | None = None
|
| 80 |
+
self._digest: str | None = None
|
| 81 |
+
|
| 82 |
+
@property
|
| 83 |
+
def current(self) -> Catalog | None:
|
| 84 |
+
return self._last_good
|
| 85 |
+
|
| 86 |
+
async def load(self) -> Catalog:
|
| 87 |
+
"""Load once. Raises on the first load; later failures keep the last good."""
|
| 88 |
+
try:
|
| 89 |
+
text = await self._fetch_text()
|
| 90 |
+
if text is None: # 304 Not Modified
|
| 91 |
+
return self._last_good # type: ignore[return-value]
|
| 92 |
+
catalog = self._parse(text)
|
| 93 |
+
except Exception as exc:
|
| 94 |
+
if self._last_good is None:
|
| 95 |
+
raise
|
| 96 |
+
logger.warning("catalog refresh failed (%s); keeping the last good copy", exc)
|
| 97 |
+
return self._last_good
|
| 98 |
+
|
| 99 |
+
if self._settings.catalog_source == "discover" or any(r.discover is not None for r in catalog.repos):
|
| 100 |
+
catalog = await self._discover(catalog)
|
| 101 |
+
|
| 102 |
+
validate_catalog(catalog)
|
| 103 |
+
self._last_good = catalog
|
| 104 |
+
logger.info(
|
| 105 |
+
"catalog loaded: %d repo(s), %d asset(s)",
|
| 106 |
+
len(catalog.repos),
|
| 107 |
+
sum(len(r.assets) for r in catalog.repos),
|
| 108 |
+
)
|
| 109 |
+
return catalog
|
| 110 |
+
|
| 111 |
+
async def _fetch_text(self) -> str | None:
|
| 112 |
+
"""Fetch the raw catalog. ``None`` means "unchanged since last time"."""
|
| 113 |
+
source = self._settings.catalog_source
|
| 114 |
+
if source in ("file", "discover"):
|
| 115 |
+
return self._read_file()
|
| 116 |
+
|
| 117 |
+
headers = {"If-None-Match": self._etag} if self._etag else {}
|
| 118 |
+
async with httpx.AsyncClient(timeout=self._settings.http_timeout) as client:
|
| 119 |
+
response = await client.get(self._settings.catalog_url or "", headers=headers)
|
| 120 |
+
if response.status_code == 304 and self._last_good is not None:
|
| 121 |
+
logger.debug("catalog unchanged (304)")
|
| 122 |
+
return None
|
| 123 |
+
response.raise_for_status()
|
| 124 |
+
self._etag = response.headers.get("ETag")
|
| 125 |
+
return response.text
|
| 126 |
+
|
| 127 |
+
def _read_file(self) -> str | None:
|
| 128 |
+
"""Read the catalog file, or ``None`` when its contents have not changed.
|
| 129 |
+
|
| 130 |
+
Two gates, because they answer different questions. ``stat()`` is what
|
| 131 |
+
makes polling free — it is the only syscall in the steady state. The
|
| 132 |
+
digest is what makes it *correct*: a ConfigMap resync and a sidecar
|
| 133 |
+
republishing an unchanged file both move the mtime without changing a
|
| 134 |
+
byte, and rebuilding the catalog for that is pure churn.
|
| 135 |
+
|
| 136 |
+
Both are updated before the content is parsed, deliberately: identical
|
| 137 |
+
bytes that failed to parse must not be retried every interval, or one
|
| 138 |
+
bad file becomes one log line per tick forever.
|
| 139 |
+
"""
|
| 140 |
+
path = self._settings.catalog_path
|
| 141 |
+
if path is None: # pragma: no cover - Settings validates this
|
| 142 |
+
raise CatalogError("catalog_path is unset")
|
| 143 |
+
path = Path(path)
|
| 144 |
+
|
| 145 |
+
info = path.stat()
|
| 146 |
+
stamp = (info.st_mtime_ns, info.st_size)
|
| 147 |
+
if self._last_good is not None and stamp == self._stat:
|
| 148 |
+
return None
|
| 149 |
+
self._stat = stamp
|
| 150 |
+
|
| 151 |
+
text = path.read_text(encoding="utf-8")
|
| 152 |
+
digest = hashlib.sha256(text.encode("utf-8")).hexdigest()
|
| 153 |
+
if self._last_good is not None and digest == self._digest:
|
| 154 |
+
logger.debug("catalog file touched but unchanged (%s)", path)
|
| 155 |
+
return None
|
| 156 |
+
self._digest = digest
|
| 157 |
+
return text
|
| 158 |
+
|
| 159 |
+
def _parse(self, text: str) -> Catalog:
|
| 160 |
+
return parse_text(
|
| 161 |
+
text,
|
| 162 |
+
fmt=self._settings.catalog_format,
|
| 163 |
+
layout=self._settings.layout_defaults(),
|
| 164 |
+
)
|
| 165 |
+
|
| 166 |
+
async def _discover(self, catalog: Catalog) -> Catalog:
|
| 167 |
+
"""Fill in ``assets`` by walking each repo for folders carrying the marker.
|
| 168 |
+
|
| 169 |
+
This is the one repo-wide read in the service, and it is a *catalog*
|
| 170 |
+
build rather than an asset preload: it keeps only folder names, never the
|
| 171 |
+
per-file entries, which stay lazy (plan §6.3).
|
| 172 |
+
"""
|
| 173 |
+
repos: list[RepoConfig] = []
|
| 174 |
+
for repo in catalog.repos:
|
| 175 |
+
if repo.assets or repo.discover is None:
|
| 176 |
+
repos.append(repo)
|
| 177 |
+
continue
|
| 178 |
+
layout = catalog.layout_for(repo)
|
| 179 |
+
entries = await self._hf.list_tree(
|
| 180 |
+
repo.repo_type,
|
| 181 |
+
repo.repo_id,
|
| 182 |
+
repo.revision,
|
| 183 |
+
repo.discover.root,
|
| 184 |
+
recursive=True,
|
| 185 |
+
token=repo.token,
|
| 186 |
+
)
|
| 187 |
+
if layout.catalog_kind == "wrapp":
|
| 188 |
+
# The marker's filename varies per asset (`.{folder}.wrapp`), and
|
| 189 |
+
# it lives in the *version* subfolder — so each version is
|
| 190 |
+
# discovered as its own asset, and multiple versions of one
|
| 191 |
+
# asset simply coexist as distinct catalog entries (plan §6.3).
|
| 192 |
+
suffix = repo.discover.marker or layout.marker_suffix
|
| 193 |
+
assets = sorted(
|
| 194 |
+
{
|
| 195 |
+
entry.path.rsplit("/", 1)[0]
|
| 196 |
+
for entry in entries
|
| 197 |
+
if entry.is_file and entry.path.endswith(suffix) and "/" in entry.path
|
| 198 |
+
}
|
| 199 |
+
)
|
| 200 |
+
else:
|
| 201 |
+
marker = repo.discover.marker or layout.marker
|
| 202 |
+
assets = sorted(
|
| 203 |
+
{
|
| 204 |
+
entry.path[: -(len(marker) + 1)]
|
| 205 |
+
for entry in entries
|
| 206 |
+
if entry.is_file and entry.path.endswith("/" + marker)
|
| 207 |
+
}
|
| 208 |
+
)
|
| 209 |
+
logger.info("discovered %d asset folder(s) in %s", len(assets), repo.repo_id)
|
| 210 |
+
repos.append(repo.model_copy(update={"assets": assets}))
|
| 211 |
+
return catalog.model_copy(update={"repos": repos})
|
| 212 |
+
|
| 213 |
+
async def start_refresh(self, on_reload) -> None:
|
| 214 |
+
"""Refresh on an interval, handing each *new* catalog to ``on_reload``.
|
| 215 |
+
|
| 216 |
+
Polled for every transport, including ``file``. A mounted catalog is not
|
| 217 |
+
a static one: a ConfigMap is updated in place and the catalog-sync
|
| 218 |
+
sidecar rewrites its target on a schedule. Before this, a rewritten file
|
| 219 |
+
was silently ignored until the pod restarted — the asset set stayed at
|
| 220 |
+
whatever it was at boot while everything upstream reported success.
|
| 221 |
+
|
| 222 |
+
``discover`` re-walks the repo only when the file that names the repos
|
| 223 |
+
changed. A repo-wide tree read on a timer is a much bigger promise than
|
| 224 |
+
this loop should make on its own (plan §5.2).
|
| 225 |
+
|
| 226 |
+
Polling rather than watching: ``stat()`` behaves the same on an
|
| 227 |
+
``emptyDir`` file replaced by ``os.replace``, on a ConfigMap's symlink
|
| 228 |
+
swap and on a developer's bind mount. Watch semantics differ across all
|
| 229 |
+
three.
|
| 230 |
+
"""
|
| 231 |
+
if self._settings.catalog_refresh_seconds <= 0:
|
| 232 |
+
logger.info("catalog refresh disabled")
|
| 233 |
+
return
|
| 234 |
+
|
| 235 |
+
async def loop() -> None:
|
| 236 |
+
current = self._last_good
|
| 237 |
+
while True:
|
| 238 |
+
await asyncio.sleep(self._settings.catalog_refresh_seconds)
|
| 239 |
+
try:
|
| 240 |
+
catalog = await self.load()
|
| 241 |
+
except Exception: # noqa: BLE001 - a refresh must never kill the server
|
| 242 |
+
logger.exception("catalog refresh failed")
|
| 243 |
+
continue
|
| 244 |
+
# `load` returns the *same object* when nothing changed, so this
|
| 245 |
+
# is an exact "is there new content" test rather than a guess.
|
| 246 |
+
if catalog is not current:
|
| 247 |
+
current = catalog
|
| 248 |
+
on_reload(catalog)
|
| 249 |
+
|
| 250 |
+
self._task = asyncio.create_task(loop())
|
| 251 |
+
|
| 252 |
+
async def stop(self) -> None:
|
| 253 |
+
if self._task is not None:
|
| 254 |
+
self._task.cancel()
|
| 255 |
+
try:
|
| 256 |
+
await self._task
|
| 257 |
+
except asyncio.CancelledError:
|
| 258 |
+
pass
|
| 259 |
+
self._task = None
|
| 260 |
+
|
| 261 |
+
|
| 262 |
+
def validate_catalog(catalog: Catalog) -> None:
|
| 263 |
+
"""Reject a catalog that would serve nothing, or serve it ambiguously.
|
| 264 |
+
|
| 265 |
+
Public because the catalog-sync sidecar gates on exactly this before it
|
| 266 |
+
publishes a file the service will later load: a check living in only one of
|
| 267 |
+
the two processes is a check the other one gets to disagree with, and the
|
| 268 |
+
disagreement surfaces as a crash-loop after the sidecar reported success.
|
| 269 |
+
"""
|
| 270 |
+
if not catalog.repos:
|
| 271 |
+
raise CatalogError("catalog lists no repos")
|
| 272 |
+
seen: set[str] = set()
|
| 273 |
+
for repo in catalog.repos:
|
| 274 |
+
if "/" not in repo.repo_id:
|
| 275 |
+
raise CatalogError(f"repo_id must be <owner>/<name>: {repo.repo_id!r}")
|
| 276 |
+
if repo.key in seen:
|
| 277 |
+
raise CatalogError(f"duplicate repo in catalog: {repo.repo_id!r}")
|
| 278 |
+
seen.add(repo.key)
|
| 279 |
+
if not repo.assets and repo.discover is None:
|
| 280 |
+
raise CatalogError(
|
| 281 |
+
f"repo {repo.repo_id!r} lists no assets and no discover block — it would serve nothing"
|
| 282 |
+
)
|
docker/hf-space/hf-storage-api/hf_storage_api/catalog/model.py
ADDED
|
@@ -0,0 +1,174 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
|
| 2 |
+
# SPDX-License-Identifier: Apache-2.0
|
| 3 |
+
|
| 4 |
+
"""The catalog: which repos, which asset folders, and how one folder is laid out.
|
| 5 |
+
|
| 6 |
+
The catalog is the only eagerly-loaded state (plan §5.2) and it is the access
|
| 7 |
+
boundary (§8.4): a path that is not inside one of its asset folders is
|
| 8 |
+
``NOT_FOUND``, decided without any HuggingFace call.
|
| 9 |
+
"""
|
| 10 |
+
|
| 11 |
+
from __future__ import annotations
|
| 12 |
+
|
| 13 |
+
from typing import Literal
|
| 14 |
+
|
| 15 |
+
from pydantic import BaseModel, Field, model_validator
|
| 16 |
+
|
| 17 |
+
DEFAULT_HOST = "huggingface.co"
|
| 18 |
+
|
| 19 |
+
# Defaults below are written for `catalog_kind="manifest"` (nvidia/simready-assets).
|
| 20 |
+
# `catalog_kind="wrapp"` (nvidia/srp-staging-controlled) and `catalog_kind=
|
| 21 |
+
# "package_entry"` (nvidia/SimReady-Internal) each swap in their own defaults for
|
| 22 |
+
# the fields they read differently — see `LayoutConfig._apply_kind_defaults`.
|
| 23 |
+
_MANIFEST_DEFAULTS = {
|
| 24 |
+
"manifest": "com.nvidia.simready.packaging.json",
|
| 25 |
+
"metadata": "{data_dir}/{asset_name}.json",
|
| 26 |
+
"content_fallback": "{data_dir}/{asset_name}.usd",
|
| 27 |
+
"thumbs_dir": "{data_dir}/.thumbs",
|
| 28 |
+
"marker": "com.nvidia.simready.packaging.json",
|
| 29 |
+
}
|
| 30 |
+
_WRAPP_DEFAULTS = {
|
| 31 |
+
"manifest": "metadata.json",
|
| 32 |
+
"metadata": "{stem}.json",
|
| 33 |
+
"content_fallback": "{stem}.usd",
|
| 34 |
+
"thumbs_dir": ".thumbs",
|
| 35 |
+
"marker": "com.nvidia.simready.packaging.json", # unused by `wrapp` (marker_suffix instead)
|
| 36 |
+
}
|
| 37 |
+
# `package_entry.json` plays double duty: it is both the discovery marker and the
|
| 38 |
+
# root-USD pointer (its `usd` field), the same way `.wrapp` is for `wrapp` — see
|
| 39 |
+
# `store.py:_resolve_root_usd`. `manifest`/`metadata` are repurposed for the
|
| 40 |
+
# two-tier `GetMetadata` merge (plan docs/plans/simready-internal-catalog-kind.md
|
| 41 |
+
# §2.3): `delivery.json` (validation status, lower priority) under `asset.json`
|
| 42 |
+
# (business metadata, higher priority) — both fixed filenames at the asset
|
| 43 |
+
# folder's root, so `data_dir` is unused by this kind.
|
| 44 |
+
_PACKAGE_ENTRY_DEFAULTS = {
|
| 45 |
+
"manifest": "delivery.json",
|
| 46 |
+
"metadata": "asset.json",
|
| 47 |
+
"content_fallback": "{data_dir}/{asset_name}.usd", # unused — see §2.2's fallback
|
| 48 |
+
"thumbs_dir": "{data_dir}/.thumbs", # unused — this kind uses `thumbnail` instead
|
| 49 |
+
"marker": "package_entry.json",
|
| 50 |
+
}
|
| 51 |
+
|
| 52 |
+
|
| 53 |
+
class LayoutConfig(BaseModel):
|
| 54 |
+
"""How to read one asset folder. Every path is relative to the asset folder
|
| 55 |
+
and every one of them is a fallback — a missing optional file is not an error
|
| 56 |
+
(plan §6.3).
|
| 57 |
+
|
| 58 |
+
``catalog_kind`` picks which HuggingFace layout convention this repo uses —
|
| 59 |
+
it is a *layout* switch, not to be confused with HF's own ``repo_type``
|
| 60 |
+
(dataset/model/space) on :class:`RepoConfig`:
|
| 61 |
+
|
| 62 |
+
- ``manifest`` (default) — nvidia/simready-assets. A fixed-name marker file
|
| 63 |
+
(``com.nvidia.simready.packaging.json``) per asset folder; the root USD
|
| 64 |
+
comes from an optional ``root_usd_index`` sidecar, else the naming
|
| 65 |
+
convention.
|
| 66 |
+
- ``wrapp`` — nvidia/srp-staging-controlled. Each *version* subfolder
|
| 67 |
+
(``<asset>/<YYYY.MM.DD_NN>/``) carries a ``.<name>.wrapp`` catalog
|
| 68 |
+
manifest, so a version is discovered as its own asset — multiple versions
|
| 69 |
+
of one asset coexist as distinct addresses, nothing extra required. The
|
| 70 |
+
root USD comes from ``output_manifest``'s ``output`` map instead of a
|
| 71 |
+
root-USD index file.
|
| 72 |
+
- ``package_entry`` — nvidia/SimReady-Internal. A fixed-name marker file
|
| 73 |
+
(``package_entry.json``) per asset folder whose own ``usd`` field *is* the
|
| 74 |
+
root-USD pointer — no separate index sidecar. Metadata is a fixed two-tier
|
| 75 |
+
merge (``delivery.json`` under ``asset.json``) instead of
|
| 76 |
+
``{data_dir}``-templated filenames, and the thumbnail is a fixed file
|
| 77 |
+
(``thumbnail.png``) at the asset folder's root rather than a
|
| 78 |
+
``.thumbs/<WxH>/`` convention — see ``thumbnail`` below.
|
| 79 |
+
"""
|
| 80 |
+
|
| 81 |
+
catalog_kind: Literal["manifest", "wrapp", "package_entry"] = "manifest"
|
| 82 |
+
manifest: str = _MANIFEST_DEFAULTS["manifest"]
|
| 83 |
+
root_usd_index: str = ".metadata/com.nvidia.simready.root_usds.json"
|
| 84 |
+
data_dir: str = "simready_usd"
|
| 85 |
+
metadata: str = _MANIFEST_DEFAULTS["metadata"]
|
| 86 |
+
content_fallback: str = _MANIFEST_DEFAULTS["content_fallback"]
|
| 87 |
+
thumbs_dir: str = _MANIFEST_DEFAULTS["thumbs_dir"]
|
| 88 |
+
marker: str = _MANIFEST_DEFAULTS["marker"]
|
| 89 |
+
# `wrapp` only: the wrapp filename varies per asset (`.{folder}.wrapp`), so
|
| 90 |
+
# discovery matches it by suffix instead of an exact name (plan §6.3).
|
| 91 |
+
marker_suffix: str = ".wrapp"
|
| 92 |
+
# `wrapp` only: fixed-name sidecar whose `output` map is `{stem: root_usd}`.
|
| 93 |
+
output_manifest: str = "metadata.json"
|
| 94 |
+
# `package_entry` only: a fixed file at the asset folder's root, in place of
|
| 95 |
+
# the nucleus `.thumbs/<WxH>/` convention `thumbs_dir` assumes. `None` for
|
| 96 |
+
# `manifest`/`wrapp`, which keep today's nucleus-only lookup.
|
| 97 |
+
thumbnail: str | None = None
|
| 98 |
+
|
| 99 |
+
@model_validator(mode="after")
|
| 100 |
+
def _apply_kind_defaults(self) -> LayoutConfig:
|
| 101 |
+
"""Swap in this ``catalog_kind``'s defaults for fields left unset by the
|
| 102 |
+
caller.
|
| 103 |
+
|
| 104 |
+
A field is "left unset" here if it still equals the ``manifest``-kind
|
| 105 |
+
default — the only signal available once pydantic has already applied
|
| 106 |
+
class-level defaults. An explicit override in the catalog always wins.
|
| 107 |
+
"""
|
| 108 |
+
defaults = {"wrapp": _WRAPP_DEFAULTS, "package_entry": _PACKAGE_ENTRY_DEFAULTS}.get(self.catalog_kind)
|
| 109 |
+
if defaults is None:
|
| 110 |
+
return self
|
| 111 |
+
for field, manifest_default in _MANIFEST_DEFAULTS.items():
|
| 112 |
+
if getattr(self, field) == manifest_default:
|
| 113 |
+
setattr(self, field, defaults[field])
|
| 114 |
+
if self.catalog_kind == "wrapp" and self.data_dir == "simready_usd":
|
| 115 |
+
self.data_dir = ""
|
| 116 |
+
if self.catalog_kind == "package_entry":
|
| 117 |
+
if self.data_dir == "simready_usd":
|
| 118 |
+
self.data_dir = ""
|
| 119 |
+
if self.thumbnail is None:
|
| 120 |
+
self.thumbnail = "thumbnail.png"
|
| 121 |
+
return self
|
| 122 |
+
|
| 123 |
+
def render(self, template: str, asset_name: str, *, stem: str | None = None) -> str:
|
| 124 |
+
"""Resolve ``{asset_name}`` / ``{data_dir}`` / ``{stem}`` for one asset.
|
| 125 |
+
|
| 126 |
+
``stem`` is the short per-asset name used in filenames under
|
| 127 |
+
``catalog_kind="wrapp"`` (e.g. ``sm_IV_pole_a01_01``), which differs
|
| 128 |
+
from ``asset_name`` — the full folder path used for addressing —
|
| 129 |
+
whenever that path carries a version segment. Defaults to
|
| 130 |
+
``asset_name`` for ``catalog_kind="manifest"``, where the two coincide.
|
| 131 |
+
"""
|
| 132 |
+
return template.format(
|
| 133 |
+
asset_name=asset_name, data_dir=self.data_dir, stem=stem if stem is not None else asset_name
|
| 134 |
+
)
|
| 135 |
+
|
| 136 |
+
|
| 137 |
+
class DiscoverConfig(BaseModel):
|
| 138 |
+
root: str = ""
|
| 139 |
+
marker: str | None = None
|
| 140 |
+
|
| 141 |
+
|
| 142 |
+
class RepoConfig(BaseModel):
|
| 143 |
+
repo_id: str
|
| 144 |
+
repo_type: str = "dataset"
|
| 145 |
+
revision: str = "main"
|
| 146 |
+
endpoint: str | None = None # overrides the catalog-level endpoint
|
| 147 |
+
token: str | None = None # overrides the service token, for cross-org catalogs
|
| 148 |
+
assets: list[str] = Field(default_factory=list)
|
| 149 |
+
discover: DiscoverConfig | None = None
|
| 150 |
+
layout: LayoutConfig | None = None # overrides the catalog-level layout
|
| 151 |
+
|
| 152 |
+
@property
|
| 153 |
+
def key(self) -> str:
|
| 154 |
+
return f"{self.repo_type}:{self.repo_id}"
|
| 155 |
+
|
| 156 |
+
|
| 157 |
+
class Catalog(BaseModel):
|
| 158 |
+
"""A parsed catalog. Immutable in practice: reloads build a new one and swap
|
| 159 |
+
the reference (plan §6.3)."""
|
| 160 |
+
|
| 161 |
+
endpoint: str = f"https://{DEFAULT_HOST}"
|
| 162 |
+
repos: list[RepoConfig] = Field(default_factory=list)
|
| 163 |
+
layout: LayoutConfig = Field(default_factory=LayoutConfig)
|
| 164 |
+
|
| 165 |
+
def layout_for(self, repo: RepoConfig) -> LayoutConfig:
|
| 166 |
+
return repo.layout or self.layout
|
| 167 |
+
|
| 168 |
+
def repo(self, repo_type: str, repo_id: str) -> RepoConfig | None:
|
| 169 |
+
key = f"{repo_type}:{repo_id}"
|
| 170 |
+
return next((r for r in self.repos if r.key == key), None)
|
| 171 |
+
|
| 172 |
+
def host(self, repo: RepoConfig) -> str:
|
| 173 |
+
endpoint = repo.endpoint or self.endpoint
|
| 174 |
+
return endpoint.split("://", 1)[-1].rstrip("/")
|
docker/hf-space/hf-storage-api/hf_storage_api/catalog/urllist.py
ADDED
|
@@ -0,0 +1,203 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
|
| 2 |
+
# SPDX-License-Identifier: Apache-2.0
|
| 3 |
+
|
| 4 |
+
"""Build a catalog from a plain list of HuggingFace file URLs.
|
| 5 |
+
|
| 6 |
+
This is the input format the original ask described — "the initial list of asset
|
| 7 |
+
URLs comes from a config file (alternatively fetched from a GitHub repo)" — and
|
| 8 |
+
it is strictly richer than the YAML catalog's ``assets:`` list, because each line
|
| 9 |
+
already encodes the repo, the repo type, the pinned revision *and* the asset
|
| 10 |
+
folder::
|
| 11 |
+
|
| 12 |
+
https://huggingface.co /datasets /nvidia/simready-assets /resolve/<sha> /<asset>/<manifest>
|
| 13 |
+
└─── endpoint ───┘ └─ type ─┘ └───── repo_id ─────┘ └─ revision ─┘ └── folder ──┘
|
| 14 |
+
|
| 15 |
+
So a whole :class:`~hf_storage_api.catalog.model.Catalog` is derivable from the
|
| 16 |
+
list, with no YAML at all.
|
| 17 |
+
|
| 18 |
+
**Each line must point at a file sitting at the asset folder's root** — the
|
| 19 |
+
manifest, in practice. The asset folder is that file's parent directory; a URL
|
| 20 |
+
pointing deeper (at the root USD, say) would yield the wrong folder, so those are
|
| 21 |
+
rejected rather than silently mis-parsed.
|
| 22 |
+
"""
|
| 23 |
+
|
| 24 |
+
from __future__ import annotations
|
| 25 |
+
|
| 26 |
+
import logging
|
| 27 |
+
import posixpath
|
| 28 |
+
from collections import OrderedDict
|
| 29 |
+
from urllib.parse import unquote, urlsplit
|
| 30 |
+
|
| 31 |
+
from .model import DEFAULT_HOST, Catalog, LayoutConfig, RepoConfig
|
| 32 |
+
|
| 33 |
+
logger = logging.getLogger(__name__)
|
| 34 |
+
|
| 35 |
+
# The web UI hands out /blob/ links and the API /resolve/ ones; both address the
|
| 36 |
+
# same file, so accept either rather than making someone hand-edit 18 URLs.
|
| 37 |
+
_REF_SEGMENTS = ("resolve", "blob", "raw")
|
| 38 |
+
|
| 39 |
+
_REPO_TYPE_BY_PREFIX = {"datasets": "dataset", "spaces": "space"}
|
| 40 |
+
|
| 41 |
+
_CONTENT_SUFFIXES = (".usd", ".usda", ".usdc", ".usdz")
|
| 42 |
+
|
| 43 |
+
|
| 44 |
+
class UrlListError(ValueError):
|
| 45 |
+
"""The list is not parseable as HuggingFace file URLs."""
|
| 46 |
+
|
| 47 |
+
|
| 48 |
+
def looks_like_url_list(text: str) -> bool:
|
| 49 |
+
"""Does this content look like a URL list rather than a YAML catalog?"""
|
| 50 |
+
for line in text.splitlines():
|
| 51 |
+
stripped = line.strip()
|
| 52 |
+
if not stripped or stripped.startswith("#"):
|
| 53 |
+
continue
|
| 54 |
+
return stripped.startswith(("http://", "https://"))
|
| 55 |
+
return False
|
| 56 |
+
|
| 57 |
+
|
| 58 |
+
def _parse_line(line: str) -> tuple[str, str, str, str, str, str]:
|
| 59 |
+
"""-> (endpoint, repo_type, repo_id, revision, folder, filename)."""
|
| 60 |
+
split = urlsplit(line)
|
| 61 |
+
if split.scheme not in ("http", "https") or not split.netloc:
|
| 62 |
+
raise UrlListError(f"not an absolute http(s) URL: {line!r}")
|
| 63 |
+
|
| 64 |
+
segments = [unquote(s) for s in split.path.split("/") if s]
|
| 65 |
+
|
| 66 |
+
repo_type = "model"
|
| 67 |
+
if segments and segments[0] in _REPO_TYPE_BY_PREFIX:
|
| 68 |
+
repo_type = _REPO_TYPE_BY_PREFIX[segments[0]]
|
| 69 |
+
segments = segments[1:]
|
| 70 |
+
|
| 71 |
+
# <owner>/<name>/<resolve|blob|raw>/<revision>/<path...>
|
| 72 |
+
if len(segments) < 5 or segments[2] not in _REF_SEGMENTS:
|
| 73 |
+
raise UrlListError(f"expected .../<owner>/<name>/resolve/<revision>/<path> in {line!r}")
|
| 74 |
+
|
| 75 |
+
repo_id = f"{segments[0]}/{segments[1]}"
|
| 76 |
+
revision = segments[3]
|
| 77 |
+
path = "/".join(segments[4:])
|
| 78 |
+
folder, filename = posixpath.split(path)
|
| 79 |
+
|
| 80 |
+
if not folder:
|
| 81 |
+
raise UrlListError(f"{line!r} points at a file in the repo root, so it names no asset folder")
|
| 82 |
+
if filename.lower().endswith(_CONTENT_SUFFIXES):
|
| 83 |
+
# Parent-of-a-USD is the data dir, not the asset folder — deriving from it
|
| 84 |
+
# would silently produce a catalog that serves the wrong subtree.
|
| 85 |
+
raise UrlListError(
|
| 86 |
+
f"{line!r} points at a USD file; the list must reference each asset's "
|
| 87 |
+
f"manifest at the asset-folder root, not its content"
|
| 88 |
+
)
|
| 89 |
+
|
| 90 |
+
return f"{split.scheme}://{split.netloc}", repo_type, repo_id, revision, folder, filename
|
| 91 |
+
|
| 92 |
+
|
| 93 |
+
def normalize_asset_urls(catalog: Catalog) -> Catalog:
|
| 94 |
+
"""Let a YAML ``assets:`` entry be a full HuggingFace URL, not just a folder.
|
| 95 |
+
|
| 96 |
+
The two catalog formats then accept the same lines, so a list of asset URLs
|
| 97 |
+
can be pasted straight into a YAML catalog when you also need something YAML
|
| 98 |
+
-only (a per-repo layout, a per-repo token). Without this, a pasted URL would
|
| 99 |
+
be taken as a literal folder name and every path under it would 404 at request
|
| 100 |
+
time rather than failing at load time.
|
| 101 |
+
"""
|
| 102 |
+
repos = []
|
| 103 |
+
for repo in catalog.repos:
|
| 104 |
+
if not any(a.startswith(("http://", "https://")) for a in repo.assets):
|
| 105 |
+
repos.append(repo)
|
| 106 |
+
continue
|
| 107 |
+
|
| 108 |
+
folders: list[str] = []
|
| 109 |
+
for entry in repo.assets:
|
| 110 |
+
if not entry.startswith(("http://", "https://")):
|
| 111 |
+
folders.append(entry)
|
| 112 |
+
continue
|
| 113 |
+
_, repo_type, repo_id, revision, folder, _ = _parse_line(entry)
|
| 114 |
+
if (repo_type, repo_id) != (repo.repo_type, repo.repo_id):
|
| 115 |
+
raise UrlListError(
|
| 116 |
+
f"{entry!r} addresses {repo_type} {repo_id!r}, but it is listed under "
|
| 117 |
+
f"{repo.repo_type} {repo.repo_id!r}"
|
| 118 |
+
)
|
| 119 |
+
if revision != repo.revision:
|
| 120 |
+
# Adopting it silently would make `revision:` a lie for the other
|
| 121 |
+
# entries; say which one to change.
|
| 122 |
+
raise UrlListError(
|
| 123 |
+
f"{entry!r} pins revision {revision!r}, but the repo is configured "
|
| 124 |
+
f"with revision {repo.revision!r} — set `revision: {revision}`"
|
| 125 |
+
)
|
| 126 |
+
folders.append(folder)
|
| 127 |
+
repos.append(repo.model_copy(update={"assets": folders}))
|
| 128 |
+
return catalog.model_copy(update={"repos": repos})
|
| 129 |
+
|
| 130 |
+
|
| 131 |
+
def parse_url_list(text: str, *, layout: LayoutConfig | None = None) -> Catalog:
|
| 132 |
+
"""Turn a newline-separated list of HF file URLs into a catalog.
|
| 133 |
+
|
| 134 |
+
Blank lines and ``#`` comments are ignored. Lines are grouped into one
|
| 135 |
+
:class:`RepoConfig` per (endpoint, repo type, repo id, revision).
|
| 136 |
+
"""
|
| 137 |
+
layout = layout or LayoutConfig()
|
| 138 |
+
grouped: OrderedDict[tuple[str, str, str, str], set[str]] = OrderedDict()
|
| 139 |
+
manifests: set[str] = set()
|
| 140 |
+
endpoints: set[str] = set()
|
| 141 |
+
|
| 142 |
+
for number, raw in enumerate(text.splitlines(), start=1):
|
| 143 |
+
line = raw.strip()
|
| 144 |
+
if not line or line.startswith("#"):
|
| 145 |
+
continue
|
| 146 |
+
try:
|
| 147 |
+
endpoint, repo_type, repo_id, revision, folder, filename = _parse_line(line)
|
| 148 |
+
except UrlListError as exc:
|
| 149 |
+
raise UrlListError(f"line {number}: {exc}") from exc
|
| 150 |
+
grouped.setdefault((endpoint, repo_type, repo_id, revision), set()).add(folder)
|
| 151 |
+
manifests.add(filename)
|
| 152 |
+
endpoints.add(endpoint)
|
| 153 |
+
|
| 154 |
+
if not grouped:
|
| 155 |
+
raise UrlListError("the URL list is empty")
|
| 156 |
+
|
| 157 |
+
# One repo at two revisions cannot be served under one URI namespace: the
|
| 158 |
+
# revision is configuration, not part of the address, so both would collide on
|
| 159 |
+
# the same base_key. The `@<rev>` escape hatch is plan §6.1 / checklist 4.4.
|
| 160 |
+
by_repo: dict[tuple[str, str, str], list[str]] = {}
|
| 161 |
+
for endpoint, repo_type, repo_id, revision in grouped:
|
| 162 |
+
by_repo.setdefault((endpoint, repo_type, repo_id), []).append(revision)
|
| 163 |
+
for (_, _, repo_id), revisions in by_repo.items():
|
| 164 |
+
if len(revisions) > 1:
|
| 165 |
+
raise UrlListError(
|
| 166 |
+
f"{repo_id} appears at {len(revisions)} revisions ({', '.join(sorted(revisions))}); "
|
| 167 |
+
f"one URI namespace can only serve one revision per repo"
|
| 168 |
+
)
|
| 169 |
+
|
| 170 |
+
# The list names the manifest, so it also tells us the layout's marker — but
|
| 171 |
+
# only adopt it when the list agrees with itself and differs from the default.
|
| 172 |
+
inferred: LayoutConfig | None = None
|
| 173 |
+
if len(manifests) == 1:
|
| 174 |
+
manifest = next(iter(manifests))
|
| 175 |
+
if manifest != layout.manifest:
|
| 176 |
+
inferred = layout.model_copy(update={"manifest": manifest, "marker": manifest})
|
| 177 |
+
logger.info("inferred layout.manifest=%s from the URL list", manifest)
|
| 178 |
+
elif len(manifests) > 1:
|
| 179 |
+
logger.warning(
|
| 180 |
+
"URL list references %d different filenames (%s); keeping the configured layout",
|
| 181 |
+
len(manifests),
|
| 182 |
+
", ".join(sorted(manifests)[:3]),
|
| 183 |
+
)
|
| 184 |
+
|
| 185 |
+
catalog_endpoint = next(iter(endpoints)) if len(endpoints) == 1 else f"https://{DEFAULT_HOST}"
|
| 186 |
+
repos = [
|
| 187 |
+
RepoConfig(
|
| 188 |
+
repo_id=repo_id,
|
| 189 |
+
repo_type=repo_type,
|
| 190 |
+
revision=revision,
|
| 191 |
+
# Only pin a per-repo endpoint when the list spans several hosts.
|
| 192 |
+
endpoint=endpoint if len(endpoints) > 1 else None,
|
| 193 |
+
assets=sorted(folders),
|
| 194 |
+
)
|
| 195 |
+
for (endpoint, repo_type, repo_id, revision), folders in grouped.items()
|
| 196 |
+
]
|
| 197 |
+
|
| 198 |
+
logger.info("URL list: %d repo(s), %d asset(s)", len(repos), sum(len(r.assets) for r in repos))
|
| 199 |
+
return Catalog(
|
| 200 |
+
endpoint=catalog_endpoint,
|
| 201 |
+
repos=repos,
|
| 202 |
+
layout=inferred or layout,
|
| 203 |
+
)
|
docker/hf-space/hf-storage-api/hf_storage_api/catalog_sync/__init__.py
ADDED
|
@@ -0,0 +1,47 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
|
| 2 |
+
# SPDX-License-Identifier: Apache-2.0
|
| 3 |
+
|
| 4 |
+
"""Fetch the asset list from where it is authored and publish it for the service.
|
| 5 |
+
|
| 6 |
+
A separate process — an init container and then a sidecar — sharing this image
|
| 7 |
+
with the server but nothing else. See ``docs/plans/github-catalog-sidecar.md``.
|
| 8 |
+
|
| 9 |
+
Two sources, one publish path:
|
| 10 |
+
|
| 11 |
+
* :mod:`.github` — the GitHub Contents API, which can list a directory and pin a
|
| 12 |
+
ref (sidecar plan §2.2);
|
| 13 |
+
* :mod:`.http_source` — any URL that serves the list, with an optional
|
| 14 |
+
credential. This is how GitLab is read, and it is deliberately generic: the
|
| 15 |
+
alternative was a second forge's pagination, media types and error codes in
|
| 16 |
+
here (sidecar plan §13).
|
| 17 |
+
|
| 18 |
+
Why a process rather than a fourth transport inside ``CatalogLoader``:
|
| 19 |
+
|
| 20 |
+
* the way asset URLs are sourced is the part expected to change, and a sidecar
|
| 21 |
+
absorbs that without touching the process that answers RPCs (sidecar plan
|
| 22 |
+
§8-A) — the second source above is that prediction coming true;
|
| 23 |
+
* it keeps the source credential out of the serving process;
|
| 24 |
+
* it gives somewhere to *validate before publishing*. The service's last-good
|
| 25 |
+
fallback covers a failed fetch; it does not cover a successful fetch of a bad
|
| 26 |
+
file, which becomes the access boundary the instant it lands (plan §8.4).
|
| 27 |
+
|
| 28 |
+
The validation is the service's own parser, imported rather than reimplemented:
|
| 29 |
+
a sidecar that accepts a file the server then rejects is a crash-loop reported
|
| 30 |
+
as a success.
|
| 31 |
+
"""
|
| 32 |
+
|
| 33 |
+
from .publish import CatalogRejected, Publication, publish, review
|
| 34 |
+
from .settings import CatalogSyncSettings
|
| 35 |
+
from .source import SourceAuthError, SourceError, SourceNotFound, SourceUnavailable
|
| 36 |
+
|
| 37 |
+
__all__ = [
|
| 38 |
+
"CatalogRejected",
|
| 39 |
+
"CatalogSyncSettings",
|
| 40 |
+
"Publication",
|
| 41 |
+
"SourceAuthError",
|
| 42 |
+
"SourceError",
|
| 43 |
+
"SourceNotFound",
|
| 44 |
+
"SourceUnavailable",
|
| 45 |
+
"publish",
|
| 46 |
+
"review",
|
| 47 |
+
]
|
docker/hf-space/hf-storage-api/hf_storage_api/catalog_sync/__main__.py
ADDED
|
@@ -0,0 +1,177 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
|
| 2 |
+
# SPDX-License-Identifier: Apache-2.0
|
| 3 |
+
|
| 4 |
+
"""Entry point for the catalog-sync init container and sidecar.
|
| 5 |
+
|
| 6 |
+
::
|
| 7 |
+
|
| 8 |
+
python -m hf_storage_api.catalog_sync --once # init container: fetch or fail
|
| 9 |
+
python -m hf_storage_api.catalog_sync # sidecar: fetch, then poll
|
| 10 |
+
|
| 11 |
+
The two differ only in what a failure means, and that asymmetry is deliberate
|
| 12 |
+
(sidecar plan §2.6). At startup there is no last-good file, so failing loudly is
|
| 13 |
+
the only honest option: a pod that comes up with no catalog serves ``NOT_FOUND``
|
| 14 |
+
for everything, which looks like a HuggingFace outage. Once a good file exists,
|
| 15 |
+
the plan's standing rule applies — never fail a crawl because the source blipped.
|
| 16 |
+
|
| 17 |
+
Which source is read is settings' business, not this module's: everything below
|
| 18 |
+
is written against ``fetch``/``describe``, so adding a third source does not
|
| 19 |
+
touch the publish path or the failure policy.
|
| 20 |
+
"""
|
| 21 |
+
|
| 22 |
+
from __future__ import annotations
|
| 23 |
+
|
| 24 |
+
import argparse
|
| 25 |
+
import asyncio
|
| 26 |
+
import logging
|
| 27 |
+
import signal
|
| 28 |
+
import sys
|
| 29 |
+
|
| 30 |
+
from ..catalog.loader import CatalogError
|
| 31 |
+
from .github import GitHubClient
|
| 32 |
+
from .http_source import HttpClient
|
| 33 |
+
from .publish import CatalogRejected, known_etags, publish, review
|
| 34 |
+
from .settings import CatalogSyncSettings
|
| 35 |
+
from .source import SourceError
|
| 36 |
+
|
| 37 |
+
logger = logging.getLogger("hf_storage_api.catalog_sync")
|
| 38 |
+
|
| 39 |
+
EXIT_OK = 0
|
| 40 |
+
EXIT_FETCH = 1 # could not read the source
|
| 41 |
+
EXIT_INVALID = 2 # read it, and it must not be served
|
| 42 |
+
|
| 43 |
+
|
| 44 |
+
async def sync_once(settings: CatalogSyncSettings, client: GitHubClient | HttpClient) -> bool:
|
| 45 |
+
"""One fetch/validate/publish pass. ``False`` means "nothing had changed"."""
|
| 46 |
+
target = settings.catalog_sync_target
|
| 47 |
+
sources = settings.sources
|
| 48 |
+
fetched = await client.fetch(sources, known=known_etags(target))
|
| 49 |
+
if fetched is None:
|
| 50 |
+
return False
|
| 51 |
+
|
| 52 |
+
catalog = review(
|
| 53 |
+
fetched.text,
|
| 54 |
+
allowed_repos=settings.allowed_repos,
|
| 55 |
+
min_assets=settings.catalog_min_assets,
|
| 56 |
+
)
|
| 57 |
+
published = publish(
|
| 58 |
+
fetched.text,
|
| 59 |
+
target,
|
| 60 |
+
catalog=catalog,
|
| 61 |
+
etags=fetched.etags,
|
| 62 |
+
source=client.describe(sources),
|
| 63 |
+
)
|
| 64 |
+
if not published.written:
|
| 65 |
+
return False
|
| 66 |
+
|
| 67 |
+
logger.info(
|
| 68 |
+
"published %d asset(s) across %s to %s from %s [%s]",
|
| 69 |
+
published.asset_count,
|
| 70 |
+
", ".join(published.repo_ids),
|
| 71 |
+
target,
|
| 72 |
+
client.source,
|
| 73 |
+
", ".join(f"{path}@{_stamp(etag)}" for path, etag in sorted(published.etags.items())),
|
| 74 |
+
)
|
| 75 |
+
return True
|
| 76 |
+
|
| 77 |
+
|
| 78 |
+
def _stamp(etag: str) -> str:
|
| 79 |
+
"""Which version was published, short enough to read in a log line.
|
| 80 |
+
|
| 81 |
+
On GitHub the etag *is* the git blob sha (sidecar plan §1.4), so this prints
|
| 82 |
+
one. Elsewhere it is whatever validator the server chose; it still answers
|
| 83 |
+
"did this change" when compared against `catalog.meta.json`.
|
| 84 |
+
"""
|
| 85 |
+
return etag.strip('W/"')[:12]
|
| 86 |
+
|
| 87 |
+
|
| 88 |
+
def build_client(settings: CatalogSyncSettings) -> GitHubClient | HttpClient:
|
| 89 |
+
"""The source named by the settings (sidecar plan §13)."""
|
| 90 |
+
if settings.source_kind == "http":
|
| 91 |
+
return HttpClient(
|
| 92 |
+
token=settings.resolve_token(),
|
| 93 |
+
auth=settings.catalog_http_auth,
|
| 94 |
+
timeout=settings.catalog_sync_timeout,
|
| 95 |
+
)
|
| 96 |
+
return GitHubClient(
|
| 97 |
+
api=settings.catalog_github_api,
|
| 98 |
+
repo=settings.catalog_github_repo,
|
| 99 |
+
ref=settings.catalog_github_ref,
|
| 100 |
+
token=settings.resolve_token(),
|
| 101 |
+
timeout=settings.catalog_sync_timeout,
|
| 102 |
+
)
|
| 103 |
+
|
| 104 |
+
|
| 105 |
+
async def run(settings: CatalogSyncSettings, *, once: bool) -> int:
|
| 106 |
+
client = build_client(settings)
|
| 107 |
+
stop = _stop_event()
|
| 108 |
+
try:
|
| 109 |
+
while True:
|
| 110 |
+
try:
|
| 111 |
+
if not await sync_once(settings, client):
|
| 112 |
+
logger.debug("no change")
|
| 113 |
+
except SourceError as exc:
|
| 114 |
+
if once:
|
| 115 |
+
logger.error("could not read the asset list: %s", exc)
|
| 116 |
+
return EXIT_FETCH
|
| 117 |
+
logger.warning("catalog sync failed (%s); keeping the published copy", exc)
|
| 118 |
+
except (CatalogError, CatalogRejected) as exc:
|
| 119 |
+
# Loud, and never fatal once something good is already published:
|
| 120 |
+
# the previous file keeps serving while someone fixes the source.
|
| 121 |
+
logger.error("refusing to publish the fetched list: %s", exc)
|
| 122 |
+
if once:
|
| 123 |
+
return EXIT_INVALID
|
| 124 |
+
|
| 125 |
+
if once:
|
| 126 |
+
return EXIT_OK
|
| 127 |
+
try:
|
| 128 |
+
await asyncio.wait_for(stop.wait(), timeout=settings.catalog_sync_interval)
|
| 129 |
+
except asyncio.TimeoutError:
|
| 130 |
+
continue
|
| 131 |
+
logger.info("stopping")
|
| 132 |
+
return EXIT_OK
|
| 133 |
+
finally:
|
| 134 |
+
await client.aclose()
|
| 135 |
+
|
| 136 |
+
|
| 137 |
+
def _stop_event() -> asyncio.Event:
|
| 138 |
+
"""SIGTERM ends the loop between passes rather than mid-publish."""
|
| 139 |
+
stop = asyncio.Event()
|
| 140 |
+
loop = asyncio.get_running_loop()
|
| 141 |
+
for sig in (signal.SIGINT, signal.SIGTERM):
|
| 142 |
+
try:
|
| 143 |
+
loop.add_signal_handler(sig, stop.set)
|
| 144 |
+
except NotImplementedError: # pragma: no cover - not POSIX
|
| 145 |
+
pass
|
| 146 |
+
return stop
|
| 147 |
+
|
| 148 |
+
|
| 149 |
+
def main(argv: list[str] | None = None) -> int:
|
| 150 |
+
parser = argparse.ArgumentParser(
|
| 151 |
+
prog="python -m hf_storage_api.catalog_sync",
|
| 152 |
+
description="Fetch the asset list from its source and publish it for the service to read.",
|
| 153 |
+
)
|
| 154 |
+
parser.add_argument(
|
| 155 |
+
"--once",
|
| 156 |
+
action="store_true",
|
| 157 |
+
help="fetch, validate, publish and exit — the init-container mode",
|
| 158 |
+
)
|
| 159 |
+
args = parser.parse_args(argv)
|
| 160 |
+
|
| 161 |
+
try:
|
| 162 |
+
settings = CatalogSyncSettings()
|
| 163 |
+
except ValueError as exc:
|
| 164 |
+
# A misconfigured sidecar must not look like an unreachable GitHub.
|
| 165 |
+
print(f"catalog-sync is misconfigured: {exc}", file=sys.stderr)
|
| 166 |
+
return EXIT_INVALID
|
| 167 |
+
|
| 168 |
+
logging.basicConfig(
|
| 169 |
+
level=settings.log_level.upper(),
|
| 170 |
+
format="%(asctime)s %(levelname)s %(name)s %(message)s",
|
| 171 |
+
)
|
| 172 |
+
once = args.once or settings.catalog_sync_interval <= 0
|
| 173 |
+
return asyncio.run(run(settings, once=once))
|
| 174 |
+
|
| 175 |
+
|
| 176 |
+
if __name__ == "__main__": # pragma: no cover
|
| 177 |
+
raise SystemExit(main())
|