metal-stack-api 0.2.5__tar.gz → 0.2.6__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {metal_stack_api-0.2.5 → metal_stack_api-0.2.6}/PKG-INFO +4 -4
- {metal_stack_api-0.2.5 → metal_stack_api-0.2.6}/metal_stack_api.egg-info/PKG-INFO +4 -4
- {metal_stack_api-0.2.5 → metal_stack_api-0.2.6}/metal_stack_api.egg-info/SOURCES.txt +6 -0
- metal_stack_api-0.2.6/metal_stack_api.egg-info/requires.txt +3 -0
- {metal_stack_api-0.2.5 → metal_stack_api-0.2.6}/metalstack/api/v2/predefined_rules_pb2.py +7 -1
- {metal_stack_api-0.2.5 → metal_stack_api-0.2.6}/metalstack/api/v2/predefined_rules_pb2.pyi +6 -0
- metal_stack_api-0.2.6/metalstack/api/v2/token_pb2.py +190 -0
- metal_stack_api-0.2.6/metalstack/client/tests/conftest.py +172 -0
- metal_stack_api-0.2.6/metalstack/client/tests/test_client.py +122 -0
- metal_stack_api-0.2.6/metalstack/client/tests/test_interceptor.py +173 -0
- metal_stack_api-0.2.6/metalstack/client/tests/test_ping.py +103 -0
- metal_stack_api-0.2.6/metalstack/client/tests/test_token_persistent.py +91 -0
- metal_stack_api-0.2.6/metalstack/infra/v2/__init__.py +0 -0
- {metal_stack_api-0.2.5 → metal_stack_api-0.2.6}/setup.py +4 -3
- metal_stack_api-0.2.5/metal_stack_api.egg-info/requires.txt +0 -2
- metal_stack_api-0.2.5/metalstack/api/v2/token_pb2.py +0 -186
- {metal_stack_api-0.2.5 → metal_stack_api-0.2.6}/README.md +0 -0
- {metal_stack_api-0.2.5 → metal_stack_api-0.2.6}/metal_stack_api.egg-info/dependency_links.txt +0 -0
- {metal_stack_api-0.2.5 → metal_stack_api-0.2.6}/metal_stack_api.egg-info/top_level.txt +0 -0
- {metal_stack_api-0.2.5 → metal_stack_api-0.2.6}/metalstack/__init__.py +0 -0
- {metal_stack_api-0.2.5 → metal_stack_api-0.2.6}/metalstack/admin/__init__.py +0 -0
- {metal_stack_api-0.2.5 → metal_stack_api-0.2.6}/metalstack/admin/v2/__init__.py +0 -0
- {metal_stack_api-0.2.5 → metal_stack_api-0.2.6}/metalstack/admin/v2/audit_connect.py +0 -0
- {metal_stack_api-0.2.5 → metal_stack_api-0.2.6}/metalstack/admin/v2/audit_pb2.py +0 -0
- {metal_stack_api-0.2.5 → metal_stack_api-0.2.6}/metalstack/admin/v2/audit_pb2.pyi +0 -0
- {metal_stack_api-0.2.5 → metal_stack_api-0.2.6}/metalstack/admin/v2/component_connect.py +0 -0
- {metal_stack_api-0.2.5 → metal_stack_api-0.2.6}/metalstack/admin/v2/component_pb2.py +0 -0
- {metal_stack_api-0.2.5 → metal_stack_api-0.2.6}/metalstack/admin/v2/component_pb2.pyi +0 -0
- {metal_stack_api-0.2.5 → metal_stack_api-0.2.6}/metalstack/admin/v2/filesystem_connect.py +0 -0
- {metal_stack_api-0.2.5 → metal_stack_api-0.2.6}/metalstack/admin/v2/filesystem_pb2.py +0 -0
- {metal_stack_api-0.2.5 → metal_stack_api-0.2.6}/metalstack/admin/v2/filesystem_pb2.pyi +0 -0
- {metal_stack_api-0.2.5 → metal_stack_api-0.2.6}/metalstack/admin/v2/image_connect.py +0 -0
- {metal_stack_api-0.2.5 → metal_stack_api-0.2.6}/metalstack/admin/v2/image_pb2.py +0 -0
- {metal_stack_api-0.2.5 → metal_stack_api-0.2.6}/metalstack/admin/v2/image_pb2.pyi +0 -0
- {metal_stack_api-0.2.5 → metal_stack_api-0.2.6}/metalstack/admin/v2/ip_connect.py +0 -0
- {metal_stack_api-0.2.5 → metal_stack_api-0.2.6}/metalstack/admin/v2/ip_pb2.py +0 -0
- {metal_stack_api-0.2.5 → metal_stack_api-0.2.6}/metalstack/admin/v2/ip_pb2.pyi +0 -0
- {metal_stack_api-0.2.5 → metal_stack_api-0.2.6}/metalstack/admin/v2/machine_connect.py +0 -0
- {metal_stack_api-0.2.5 → metal_stack_api-0.2.6}/metalstack/admin/v2/machine_pb2.py +0 -0
- {metal_stack_api-0.2.5 → metal_stack_api-0.2.6}/metalstack/admin/v2/machine_pb2.pyi +0 -0
- {metal_stack_api-0.2.5 → metal_stack_api-0.2.6}/metalstack/admin/v2/network_connect.py +0 -0
- {metal_stack_api-0.2.5 → metal_stack_api-0.2.6}/metalstack/admin/v2/network_pb2.py +0 -0
- {metal_stack_api-0.2.5 → metal_stack_api-0.2.6}/metalstack/admin/v2/network_pb2.pyi +0 -0
- {metal_stack_api-0.2.5 → metal_stack_api-0.2.6}/metalstack/admin/v2/partition_connect.py +0 -0
- {metal_stack_api-0.2.5 → metal_stack_api-0.2.6}/metalstack/admin/v2/partition_pb2.py +0 -0
- {metal_stack_api-0.2.5 → metal_stack_api-0.2.6}/metalstack/admin/v2/partition_pb2.pyi +0 -0
- {metal_stack_api-0.2.5 → metal_stack_api-0.2.6}/metalstack/admin/v2/project_connect.py +0 -0
- {metal_stack_api-0.2.5 → metal_stack_api-0.2.6}/metalstack/admin/v2/project_pb2.py +0 -0
- {metal_stack_api-0.2.5 → metal_stack_api-0.2.6}/metalstack/admin/v2/project_pb2.pyi +0 -0
- {metal_stack_api-0.2.5 → metal_stack_api-0.2.6}/metalstack/admin/v2/size_connect.py +0 -0
- {metal_stack_api-0.2.5 → metal_stack_api-0.2.6}/metalstack/admin/v2/size_imageconstraint_connect.py +0 -0
- {metal_stack_api-0.2.5 → metal_stack_api-0.2.6}/metalstack/admin/v2/size_imageconstraint_pb2.py +0 -0
- {metal_stack_api-0.2.5 → metal_stack_api-0.2.6}/metalstack/admin/v2/size_imageconstraint_pb2.pyi +0 -0
- {metal_stack_api-0.2.5 → metal_stack_api-0.2.6}/metalstack/admin/v2/size_pb2.py +0 -0
- {metal_stack_api-0.2.5 → metal_stack_api-0.2.6}/metalstack/admin/v2/size_pb2.pyi +0 -0
- {metal_stack_api-0.2.5 → metal_stack_api-0.2.6}/metalstack/admin/v2/size_reservation_connect.py +0 -0
- {metal_stack_api-0.2.5 → metal_stack_api-0.2.6}/metalstack/admin/v2/size_reservation_pb2.py +0 -0
- {metal_stack_api-0.2.5 → metal_stack_api-0.2.6}/metalstack/admin/v2/size_reservation_pb2.pyi +0 -0
- {metal_stack_api-0.2.5 → metal_stack_api-0.2.6}/metalstack/admin/v2/switch_connect.py +0 -0
- {metal_stack_api-0.2.5 → metal_stack_api-0.2.6}/metalstack/admin/v2/switch_pb2.py +0 -0
- {metal_stack_api-0.2.5 → metal_stack_api-0.2.6}/metalstack/admin/v2/switch_pb2.pyi +0 -0
- {metal_stack_api-0.2.5 → metal_stack_api-0.2.6}/metalstack/admin/v2/task_connect.py +0 -0
- {metal_stack_api-0.2.5 → metal_stack_api-0.2.6}/metalstack/admin/v2/task_pb2.py +0 -0
- {metal_stack_api-0.2.5 → metal_stack_api-0.2.6}/metalstack/admin/v2/task_pb2.pyi +0 -0
- {metal_stack_api-0.2.5 → metal_stack_api-0.2.6}/metalstack/admin/v2/tenant_connect.py +0 -0
- {metal_stack_api-0.2.5 → metal_stack_api-0.2.6}/metalstack/admin/v2/tenant_pb2.py +0 -0
- {metal_stack_api-0.2.5 → metal_stack_api-0.2.6}/metalstack/admin/v2/tenant_pb2.pyi +0 -0
- {metal_stack_api-0.2.5 → metal_stack_api-0.2.6}/metalstack/admin/v2/token_connect.py +0 -0
- {metal_stack_api-0.2.5 → metal_stack_api-0.2.6}/metalstack/admin/v2/token_pb2.py +0 -0
- {metal_stack_api-0.2.5 → metal_stack_api-0.2.6}/metalstack/admin/v2/token_pb2.pyi +0 -0
- {metal_stack_api-0.2.5 → metal_stack_api-0.2.6}/metalstack/admin/v2/vpn_connect.py +0 -0
- {metal_stack_api-0.2.5 → metal_stack_api-0.2.6}/metalstack/admin/v2/vpn_pb2.py +0 -0
- {metal_stack_api-0.2.5 → metal_stack_api-0.2.6}/metalstack/admin/v2/vpn_pb2.pyi +0 -0
- {metal_stack_api-0.2.5 → metal_stack_api-0.2.6}/metalstack/api/__init__.py +0 -0
- {metal_stack_api-0.2.5 → metal_stack_api-0.2.6}/metalstack/api/v2/__init__.py +0 -0
- {metal_stack_api-0.2.5 → metal_stack_api-0.2.6}/metalstack/api/v2/audit_connect.py +0 -0
- {metal_stack_api-0.2.5 → metal_stack_api-0.2.6}/metalstack/api/v2/audit_pb2.py +0 -0
- {metal_stack_api-0.2.5 → metal_stack_api-0.2.6}/metalstack/api/v2/audit_pb2.pyi +0 -0
- {metal_stack_api-0.2.5 → metal_stack_api-0.2.6}/metalstack/api/v2/common_pb2.py +0 -0
- {metal_stack_api-0.2.5 → metal_stack_api-0.2.6}/metalstack/api/v2/common_pb2.pyi +0 -0
- {metal_stack_api-0.2.5 → metal_stack_api-0.2.6}/metalstack/api/v2/component_pb2.py +0 -0
- {metal_stack_api-0.2.5 → metal_stack_api-0.2.6}/metalstack/api/v2/component_pb2.pyi +0 -0
- {metal_stack_api-0.2.5 → metal_stack_api-0.2.6}/metalstack/api/v2/filesystem_connect.py +0 -0
- {metal_stack_api-0.2.5 → metal_stack_api-0.2.6}/metalstack/api/v2/filesystem_pb2.py +0 -0
- {metal_stack_api-0.2.5 → metal_stack_api-0.2.6}/metalstack/api/v2/filesystem_pb2.pyi +0 -0
- {metal_stack_api-0.2.5 → metal_stack_api-0.2.6}/metalstack/api/v2/health_connect.py +0 -0
- {metal_stack_api-0.2.5 → metal_stack_api-0.2.6}/metalstack/api/v2/health_pb2.py +0 -0
- {metal_stack_api-0.2.5 → metal_stack_api-0.2.6}/metalstack/api/v2/health_pb2.pyi +0 -0
- {metal_stack_api-0.2.5 → metal_stack_api-0.2.6}/metalstack/api/v2/image_connect.py +0 -0
- {metal_stack_api-0.2.5 → metal_stack_api-0.2.6}/metalstack/api/v2/image_pb2.py +0 -0
- {metal_stack_api-0.2.5 → metal_stack_api-0.2.6}/metalstack/api/v2/image_pb2.pyi +0 -0
- {metal_stack_api-0.2.5 → metal_stack_api-0.2.6}/metalstack/api/v2/ip_connect.py +0 -0
- {metal_stack_api-0.2.5 → metal_stack_api-0.2.6}/metalstack/api/v2/ip_pb2.py +0 -0
- {metal_stack_api-0.2.5 → metal_stack_api-0.2.6}/metalstack/api/v2/ip_pb2.pyi +0 -0
- {metal_stack_api-0.2.5 → metal_stack_api-0.2.6}/metalstack/api/v2/machine_connect.py +0 -0
- {metal_stack_api-0.2.5 → metal_stack_api-0.2.6}/metalstack/api/v2/machine_pb2.py +0 -0
- {metal_stack_api-0.2.5 → metal_stack_api-0.2.6}/metalstack/api/v2/machine_pb2.pyi +0 -0
- {metal_stack_api-0.2.5 → metal_stack_api-0.2.6}/metalstack/api/v2/method_connect.py +0 -0
- {metal_stack_api-0.2.5 → metal_stack_api-0.2.6}/metalstack/api/v2/method_pb2.py +0 -0
- {metal_stack_api-0.2.5 → metal_stack_api-0.2.6}/metalstack/api/v2/method_pb2.pyi +0 -0
- {metal_stack_api-0.2.5 → metal_stack_api-0.2.6}/metalstack/api/v2/network_connect.py +0 -0
- {metal_stack_api-0.2.5 → metal_stack_api-0.2.6}/metalstack/api/v2/network_pb2.py +0 -0
- {metal_stack_api-0.2.5 → metal_stack_api-0.2.6}/metalstack/api/v2/network_pb2.pyi +0 -0
- {metal_stack_api-0.2.5 → metal_stack_api-0.2.6}/metalstack/api/v2/partition_connect.py +0 -0
- {metal_stack_api-0.2.5 → metal_stack_api-0.2.6}/metalstack/api/v2/partition_pb2.py +0 -0
- {metal_stack_api-0.2.5 → metal_stack_api-0.2.6}/metalstack/api/v2/partition_pb2.pyi +0 -0
- {metal_stack_api-0.2.5 → metal_stack_api-0.2.6}/metalstack/api/v2/project_connect.py +0 -0
- {metal_stack_api-0.2.5 → metal_stack_api-0.2.6}/metalstack/api/v2/project_pb2.py +0 -0
- {metal_stack_api-0.2.5 → metal_stack_api-0.2.6}/metalstack/api/v2/project_pb2.pyi +0 -0
- {metal_stack_api-0.2.5 → metal_stack_api-0.2.6}/metalstack/api/v2/size_connect.py +0 -0
- {metal_stack_api-0.2.5 → metal_stack_api-0.2.6}/metalstack/api/v2/size_imageconstraint_connect.py +0 -0
- {metal_stack_api-0.2.5 → metal_stack_api-0.2.6}/metalstack/api/v2/size_imageconstraint_pb2.py +0 -0
- {metal_stack_api-0.2.5 → metal_stack_api-0.2.6}/metalstack/api/v2/size_imageconstraint_pb2.pyi +0 -0
- {metal_stack_api-0.2.5 → metal_stack_api-0.2.6}/metalstack/api/v2/size_pb2.py +0 -0
- {metal_stack_api-0.2.5 → metal_stack_api-0.2.6}/metalstack/api/v2/size_pb2.pyi +0 -0
- {metal_stack_api-0.2.5 → metal_stack_api-0.2.6}/metalstack/api/v2/size_reservation_connect.py +0 -0
- {metal_stack_api-0.2.5 → metal_stack_api-0.2.6}/metalstack/api/v2/size_reservation_pb2.py +0 -0
- {metal_stack_api-0.2.5 → metal_stack_api-0.2.6}/metalstack/api/v2/size_reservation_pb2.pyi +0 -0
- {metal_stack_api-0.2.5 → metal_stack_api-0.2.6}/metalstack/api/v2/switch_pb2.py +0 -0
- {metal_stack_api-0.2.5 → metal_stack_api-0.2.6}/metalstack/api/v2/switch_pb2.pyi +0 -0
- {metal_stack_api-0.2.5 → metal_stack_api-0.2.6}/metalstack/api/v2/tenant_connect.py +0 -0
- {metal_stack_api-0.2.5 → metal_stack_api-0.2.6}/metalstack/api/v2/tenant_pb2.py +0 -0
- {metal_stack_api-0.2.5 → metal_stack_api-0.2.6}/metalstack/api/v2/tenant_pb2.pyi +0 -0
- {metal_stack_api-0.2.5 → metal_stack_api-0.2.6}/metalstack/api/v2/token_connect.py +0 -0
- {metal_stack_api-0.2.5 → metal_stack_api-0.2.6}/metalstack/api/v2/token_pb2.pyi +0 -0
- {metal_stack_api-0.2.5 → metal_stack_api-0.2.6}/metalstack/api/v2/user_connect.py +0 -0
- {metal_stack_api-0.2.5 → metal_stack_api-0.2.6}/metalstack/api/v2/user_pb2.py +0 -0
- {metal_stack_api-0.2.5 → metal_stack_api-0.2.6}/metalstack/api/v2/user_pb2.pyi +0 -0
- {metal_stack_api-0.2.5 → metal_stack_api-0.2.6}/metalstack/api/v2/version_connect.py +0 -0
- {metal_stack_api-0.2.5 → metal_stack_api-0.2.6}/metalstack/api/v2/version_pb2.py +0 -0
- {metal_stack_api-0.2.5 → metal_stack_api-0.2.6}/metalstack/api/v2/version_pb2.pyi +0 -0
- {metal_stack_api-0.2.5 → metal_stack_api-0.2.6}/metalstack/api/v2/vpn_pb2.py +0 -0
- {metal_stack_api-0.2.5 → metal_stack_api-0.2.6}/metalstack/api/v2/vpn_pb2.pyi +0 -0
- {metal_stack_api-0.2.5 → metal_stack_api-0.2.6}/metalstack/client/__init__.py +0 -0
- {metal_stack_api-0.2.5 → metal_stack_api-0.2.6}/metalstack/client/client.py +0 -0
- {metal_stack_api-0.2.5/metalstack/infra → metal_stack_api-0.2.6/metalstack/client/tests}/__init__.py +0 -0
- {metal_stack_api-0.2.5/metalstack/infra/v2 → metal_stack_api-0.2.6/metalstack/infra}/__init__.py +0 -0
- {metal_stack_api-0.2.5 → metal_stack_api-0.2.6}/metalstack/infra/v2/bmc_connect.py +0 -0
- {metal_stack_api-0.2.5 → metal_stack_api-0.2.6}/metalstack/infra/v2/bmc_pb2.py +0 -0
- {metal_stack_api-0.2.5 → metal_stack_api-0.2.6}/metalstack/infra/v2/bmc_pb2.pyi +0 -0
- {metal_stack_api-0.2.5 → metal_stack_api-0.2.6}/metalstack/infra/v2/boot_connect.py +0 -0
- {metal_stack_api-0.2.5 → metal_stack_api-0.2.6}/metalstack/infra/v2/boot_pb2.py +0 -0
- {metal_stack_api-0.2.5 → metal_stack_api-0.2.6}/metalstack/infra/v2/boot_pb2.pyi +0 -0
- {metal_stack_api-0.2.5 → metal_stack_api-0.2.6}/metalstack/infra/v2/component_connect.py +0 -0
- {metal_stack_api-0.2.5 → metal_stack_api-0.2.6}/metalstack/infra/v2/component_pb2.py +0 -0
- {metal_stack_api-0.2.5 → metal_stack_api-0.2.6}/metalstack/infra/v2/component_pb2.pyi +0 -0
- {metal_stack_api-0.2.5 → metal_stack_api-0.2.6}/metalstack/infra/v2/event_connect.py +0 -0
- {metal_stack_api-0.2.5 → metal_stack_api-0.2.6}/metalstack/infra/v2/event_pb2.py +0 -0
- {metal_stack_api-0.2.5 → metal_stack_api-0.2.6}/metalstack/infra/v2/event_pb2.pyi +0 -0
- {metal_stack_api-0.2.5 → metal_stack_api-0.2.6}/metalstack/infra/v2/switch_connect.py +0 -0
- {metal_stack_api-0.2.5 → metal_stack_api-0.2.6}/metalstack/infra/v2/switch_pb2.py +0 -0
- {metal_stack_api-0.2.5 → metal_stack_api-0.2.6}/metalstack/infra/v2/switch_pb2.pyi +0 -0
- {metal_stack_api-0.2.5 → metal_stack_api-0.2.6}/setup.cfg +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: metal-stack-api
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.6
|
|
4
4
|
Summary: Python API client for metal-stack api
|
|
5
5
|
Home-page: https://github.com/metal-stack/api
|
|
6
6
|
Author: metal-stack authors
|
|
@@ -10,10 +10,10 @@ Classifier: Intended Audience :: Developers
|
|
|
10
10
|
Classifier: Natural Language :: English
|
|
11
11
|
Classifier: Operating System :: POSIX
|
|
12
12
|
Classifier: Programming Language :: Python :: 3
|
|
13
|
-
Classifier: Programming Language :: Python :: 3.11
|
|
14
|
-
Classifier: Programming Language :: Python :: 3.12
|
|
15
13
|
Classifier: Programming Language :: Python :: 3.13
|
|
16
|
-
|
|
14
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
15
|
+
Requires-Dist: connectrpc==0.10.1
|
|
16
|
+
Requires-Dist: protobuf>=7.0
|
|
17
17
|
Requires-Dist: protovalidate>=1.2.0
|
|
18
18
|
Dynamic: author
|
|
19
19
|
Dynamic: classifier
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: metal-stack-api
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.6
|
|
4
4
|
Summary: Python API client for metal-stack api
|
|
5
5
|
Home-page: https://github.com/metal-stack/api
|
|
6
6
|
Author: metal-stack authors
|
|
@@ -10,10 +10,10 @@ Classifier: Intended Audience :: Developers
|
|
|
10
10
|
Classifier: Natural Language :: English
|
|
11
11
|
Classifier: Operating System :: POSIX
|
|
12
12
|
Classifier: Programming Language :: Python :: 3
|
|
13
|
-
Classifier: Programming Language :: Python :: 3.11
|
|
14
|
-
Classifier: Programming Language :: Python :: 3.12
|
|
15
13
|
Classifier: Programming Language :: Python :: 3.13
|
|
16
|
-
|
|
14
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
15
|
+
Requires-Dist: connectrpc==0.10.1
|
|
16
|
+
Requires-Dist: protobuf>=7.0
|
|
17
17
|
Requires-Dist: protovalidate>=1.2.0
|
|
18
18
|
Dynamic: author
|
|
19
19
|
Dynamic: classifier
|
|
@@ -124,6 +124,12 @@ metalstack/api/v2/vpn_pb2.py
|
|
|
124
124
|
metalstack/api/v2/vpn_pb2.pyi
|
|
125
125
|
metalstack/client/__init__.py
|
|
126
126
|
metalstack/client/client.py
|
|
127
|
+
metalstack/client/tests/__init__.py
|
|
128
|
+
metalstack/client/tests/conftest.py
|
|
129
|
+
metalstack/client/tests/test_client.py
|
|
130
|
+
metalstack/client/tests/test_interceptor.py
|
|
131
|
+
metalstack/client/tests/test_ping.py
|
|
132
|
+
metalstack/client/tests/test_token_persistent.py
|
|
127
133
|
metalstack/infra/__init__.py
|
|
128
134
|
metalstack/infra/v2/__init__.py
|
|
129
135
|
metalstack/infra/v2/bmc_connect.py
|
|
@@ -25,7 +25,7 @@ _sym_db = _symbol_database.Default()
|
|
|
25
25
|
from buf.validate import validate_pb2 as buf_dot_validate_dot_validate__pb2
|
|
26
26
|
|
|
27
27
|
|
|
28
|
-
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n(metalstack/api/v2/predefined_rules.proto\x12\x11metalstack.api.v2\x1a\x1b\x62uf/validate/validate.proto:\xb8\x01\n\nmacaddress\x12\x19.buf.validate.StringRules\x18\xb7\xe6\x95& \x01(\x08\x42z\xc2Hw\nu\n\x11string.macaddress\x12&this string must be a valid macaddress\x1a\x38this.matches(\'^([0-9A-Fa-f]{2}[:]){5}([0-9A-Fa-f]{2})$\')R\nmacaddress:\x99\x01\n\x07is_name\x12\x19.buf.validate.StringRules\x18\xb8\xe6\x95& \x01(\x08\x42\x62\xc2H_\n]\n\x0estring.is_name\x12#must be within 2 and 128 characters\x1a&this.size() >= 2 && this.size() <= 128R\x06isName:\x9a\x01\n\x0eis_description\x12\x19.buf.validate.StringRules\x18\xb9\xe6\x95& \x01(\x08\x42U\xc2HR\nP\n\x15string.is_description\x12#must be shorter than 256 characters\x1a\x12this.size() <= 256R\risDescription:\xa8\x01\n\x0cis_partition\x12\x19.buf.validate.StringRules\x18\xba\xe6\x95& \x01(\x08\x42g\xc2Hd\nb\n\x13string.is_partition\x12#must be within 2 and 128 characters\x1a&this.size() >= 2 && this.size() <= 128R\x0bisPartition:\x82\x01\n\tis_prefix\x12\x19.buf.validate.StringRules\x18\xbb\xe6\x95& \x01(\x08\x42G\xc2HD\nB\n\x0fstring.prefixes\x12\x1cgiven prefixes must be valid\x1a\x11this.isIpPrefix()R\x08isPrefix:m\n\x06is_uri\x12\x19.buf.validate.StringRules\x18\xbc\xe6\x95& \x01(\x08\x42\x38\xc2H5\n3\n\nstring.uri\x12\x17given uri must be valid\x1a\x0cthis.isUri()R\x05isUri:\xa7\x01\n\x11is_ip_or_hostname\x12\x19.buf.validate.StringRules\x18\xbd\xe6\x95& \x01(\x08\x42^\xc2H[\nY\n\rvalid_address\x12&must be a valid IP address or hostname\x1a this.isIp() || this.isHostname()R\x0eisIpOrHostname:\x9d\x01\n\x07trimmed\x12\x19.buf.validate.StringRules\x18\xbe\xe6\x95& \x01(\x08\x42\x65\xc2Hb\n`\n\x0estring.trimmed\x12+value must not start or end with whitespace\x1a!this.trim().size() == this.size()R\x07trimmed:\x99\x01\n\x07is_user\x12\x19.buf.validate.StringRules\x18\xbf\xe6\x95& \x01(\x08\x42\x62\xc2H_\n]\n\x0estring.is_user\x12#must be within 2 and 512 characters\x1a&this.size() >= 2 && this.size() <= 512R\x06isUser:\x9f\x01\n\tis_option\x12\x19.buf.validate.StringRules\x18\xc0\xe6\x95& \x01(\x08\x42\x64\xc2Ha\n_\n\x10string.is_option\x12#must be within 1 and 128 characters\x1a&this.size() >= 1 && this.size() <= 128R\x08isOption:\x98\x01\n\x06is_key\x12\x19.buf.validate.StringRules\x18\xc1\xe6\x95& \x01(\x08\x42\x63\xc2H`\n^\n\rstring.is_key\x12$must be within 1 and 8192 characters\x1a\'this.size() >= 1 && this.size() <= 8192R\x05isKey:\xb0\x01\n\x0fis_tenant_login\x12\x19.buf.validate.StringRules\x18\xc2\xe6\x95& \x01(\x08\x42j\xc2Hg\ne\n\x16string.is_tenant_login\x12#must be within 2 and 256 characters\x1a&this.size() >= 2 && this.size() <= 256R\risTenantLogin:\x8f\x01\n\x08prefixes\x12\x1b.buf.validate.RepeatedRules\x18\xc7\xb4\x96& \x01(\x08\x42S\xc2HP\nN\n\x11repeated.prefixes\x12\x1cgiven prefixes must be valid\x1a\x1bthis.all(m, m.isIpPrefix())R\x08prefixes:u\n\x03ips\x12\x1b.buf.validate.RepeatedRules\x18\xc8\xb4\x96& \x01(\x08\x42\x43\xc2H@\n>\n\x0crepeated.ips\x12\x17given ips must be valid\x1a\x15this.all(m, m.isIp())R\x03ips:\xe6\x01\n\x11\x61re_host_and_port\x12\x1b.buf.validate.RepeatedRules\x18\xc9\xb4\x96& \x01(\x08\x42\x9a\x01\xc2H\x96\x01\n\x93\x01\n\x1arepeated.are_host_and_port\x12Pgiven entries must all be in the form of <ip | host>:<port> but port is optional\x1a#this.all(m, m.isHostAndPort(false))R\x0e\x61reHostAndPort:\xba\x01\n\x0b\x61ll_trimmed\x12\x1b.buf.validate.RepeatedRules\x18\xca\xb4\x96& \x01(\x08\x42y\xc2Hv\nt\n\x14repeated.all_trimmed\x12\x32given values must not start or end with whitespace\x1a(this.all(m, m.trim().size() == m.size())R\nallTrimmed:\x84\x02\n\x17keys_and_values_trimmed\x12\x16.buf.validate.MapRules\x18\xd7\x82\x97& \x01(\x08\x42\xb1\x01\xc2H\xad\x01\n\xaa\x01\n\x1bmap.keys_and_values_trimmed\x12\x35keys and values must not start or end with whitespace\x1aTthis.all(k, k.trim().size() == k.size()) && this.all(v, v.trim().size() == v.size())R\x14keysAndValuesTrimmed:\xab\x01\n\x0ckeys_trimmed\x12\x16.buf.validate.MapRules\x18\xd8\x82\x97& \x01(\x08\x42m\xc2Hj\nh\n\x10map.keys_trimmed\x12*keys must not start or end with whitespace\x1a(this.all(k, k.trim().size() == k.size())R\
|
|
28
|
+
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n(metalstack/api/v2/predefined_rules.proto\x12\x11metalstack.api.v2\x1a\x1b\x62uf/validate/validate.proto:\xb8\x01\n\nmacaddress\x12\x19.buf.validate.StringRules\x18\xb7\xe6\x95& \x01(\x08\x42z\xc2Hw\nu\n\x11string.macaddress\x12&this string must be a valid macaddress\x1a\x38this.matches(\'^([0-9A-Fa-f]{2}[:]){5}([0-9A-Fa-f]{2})$\')R\nmacaddress:\x99\x01\n\x07is_name\x12\x19.buf.validate.StringRules\x18\xb8\xe6\x95& \x01(\x08\x42\x62\xc2H_\n]\n\x0estring.is_name\x12#must be within 2 and 128 characters\x1a&this.size() >= 2 && this.size() <= 128R\x06isName:\x9a\x01\n\x0eis_description\x12\x19.buf.validate.StringRules\x18\xb9\xe6\x95& \x01(\x08\x42U\xc2HR\nP\n\x15string.is_description\x12#must be shorter than 256 characters\x1a\x12this.size() <= 256R\risDescription:\xa8\x01\n\x0cis_partition\x12\x19.buf.validate.StringRules\x18\xba\xe6\x95& \x01(\x08\x42g\xc2Hd\nb\n\x13string.is_partition\x12#must be within 2 and 128 characters\x1a&this.size() >= 2 && this.size() <= 128R\x0bisPartition:\x82\x01\n\tis_prefix\x12\x19.buf.validate.StringRules\x18\xbb\xe6\x95& \x01(\x08\x42G\xc2HD\nB\n\x0fstring.prefixes\x12\x1cgiven prefixes must be valid\x1a\x11this.isIpPrefix()R\x08isPrefix:m\n\x06is_uri\x12\x19.buf.validate.StringRules\x18\xbc\xe6\x95& \x01(\x08\x42\x38\xc2H5\n3\n\nstring.uri\x12\x17given uri must be valid\x1a\x0cthis.isUri()R\x05isUri:\xa7\x01\n\x11is_ip_or_hostname\x12\x19.buf.validate.StringRules\x18\xbd\xe6\x95& \x01(\x08\x42^\xc2H[\nY\n\rvalid_address\x12&must be a valid IP address or hostname\x1a this.isIp() || this.isHostname()R\x0eisIpOrHostname:\x9d\x01\n\x07trimmed\x12\x19.buf.validate.StringRules\x18\xbe\xe6\x95& \x01(\x08\x42\x65\xc2Hb\n`\n\x0estring.trimmed\x12+value must not start or end with whitespace\x1a!this.trim().size() == this.size()R\x07trimmed:\x99\x01\n\x07is_user\x12\x19.buf.validate.StringRules\x18\xbf\xe6\x95& \x01(\x08\x42\x62\xc2H_\n]\n\x0estring.is_user\x12#must be within 2 and 512 characters\x1a&this.size() >= 2 && this.size() <= 512R\x06isUser:\x9f\x01\n\tis_option\x12\x19.buf.validate.StringRules\x18\xc0\xe6\x95& \x01(\x08\x42\x64\xc2Ha\n_\n\x10string.is_option\x12#must be within 1 and 128 characters\x1a&this.size() >= 1 && this.size() <= 128R\x08isOption:\x98\x01\n\x06is_key\x12\x19.buf.validate.StringRules\x18\xc1\xe6\x95& \x01(\x08\x42\x63\xc2H`\n^\n\rstring.is_key\x12$must be within 1 and 8192 characters\x1a\'this.size() >= 1 && this.size() <= 8192R\x05isKey:\xb0\x01\n\x0fis_tenant_login\x12\x19.buf.validate.StringRules\x18\xc2\xe6\x95& \x01(\x08\x42j\xc2Hg\ne\n\x16string.is_tenant_login\x12#must be within 2 and 256 characters\x1a&this.size() >= 2 && this.size() <= 256R\risTenantLogin:\x8f\x01\n\x08prefixes\x12\x1b.buf.validate.RepeatedRules\x18\xc7\xb4\x96& \x01(\x08\x42S\xc2HP\nN\n\x11repeated.prefixes\x12\x1cgiven prefixes must be valid\x1a\x1bthis.all(m, m.isIpPrefix())R\x08prefixes:u\n\x03ips\x12\x1b.buf.validate.RepeatedRules\x18\xc8\xb4\x96& \x01(\x08\x42\x43\xc2H@\n>\n\x0crepeated.ips\x12\x17given ips must be valid\x1a\x15this.all(m, m.isIp())R\x03ips:\xe6\x01\n\x11\x61re_host_and_port\x12\x1b.buf.validate.RepeatedRules\x18\xc9\xb4\x96& \x01(\x08\x42\x9a\x01\xc2H\x96\x01\n\x93\x01\n\x1arepeated.are_host_and_port\x12Pgiven entries must all be in the form of <ip | host>:<port> but port is optional\x1a#this.all(m, m.isHostAndPort(false))R\x0e\x61reHostAndPort:\xba\x01\n\x0b\x61ll_trimmed\x12\x1b.buf.validate.RepeatedRules\x18\xca\xb4\x96& \x01(\x08\x42y\xc2Hv\nt\n\x14repeated.all_trimmed\x12\x32given values must not start or end with whitespace\x1a(this.all(m, m.trim().size() == m.size())R\nallTrimmed:\x84\x02\n\x17keys_and_values_trimmed\x12\x16.buf.validate.MapRules\x18\xd7\x82\x97& \x01(\x08\x42\xb1\x01\xc2H\xad\x01\n\xaa\x01\n\x1bmap.keys_and_values_trimmed\x12\x35keys and values must not start or end with whitespace\x1aTthis.all(k, k.trim().size() == k.size()) && this.all(v, v.trim().size() == v.size())R\x14keysAndValuesTrimmed:\xab\x01\n\x0ckeys_trimmed\x12\x16.buf.validate.MapRules\x18\xd8\x82\x97& \x01(\x08\x42m\xc2Hj\nh\n\x10map.keys_trimmed\x12*keys must not start or end with whitespace\x1a(this.all(k, k.trim().size() == k.size())R\x0bkeysTrimmed:\x92\x02\n\x18project_roles_keys_valid\x12\x16.buf.validate.MapRules\x18\xd9\x82\x97& \x01(\x08\x42\xbd\x01\xc2H\xb9\x01\n\xb6\x01\n\x17project_roles.key.valid\x12&subject must be a \'*\', or a valid UUID\x1asthis.all(k, k == \'*\' || k.matches(\'^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$\'))R\x15projectRolesKeysValid:\xe8\x01\n\x17tenant_roles_keys_valid\x12\x16.buf.validate.MapRules\x18\xda\x82\x97& \x01(\x08\x42\x95\x01\xc2H\x91\x01\n\x8e\x01\n\x16tenant_roles.key.valid\x12\x33subject must be \'*\' or between 2 and 128 characters\x1a?this.all(k, k == \'*\' || this.size() >= 2 || this.size() <=128 )R\x14tenantRolesKeysValid:\xa9\x02\n\x18machine_roles_keys_valid\x12\x16.buf.validate.MapRules\x18\xdb\x82\x97& \x01(\x08\x42\xd4\x01\xc2H\xd0\x01\n\xcd\x01\n\x17machine_roles.key.valid\x12\x32subject must be empty string, \'*\', or a valid UUID\x1a~this.all(k, k == \'\' || k == \'*\' || k.matches(\'^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$\'))R\x15machineRolesKeysValidB\xca\x01\n\x15\x63om.metalstack.api.v2B\x14PredefinedRulesProtoP\x01Z5github.com/metal-stack/api/go/metalstack/api/v2;apiv2\xa2\x02\x03MAX\xaa\x02\x11Metalstack.Api.V2\xca\x02\x11Metalstack\\Api\\V2\xe2\x02\x1dMetalstack\\Api\\V2\\GPBMetadata\xea\x02\x13Metalstack::Api::V2')
|
|
29
29
|
|
|
30
30
|
_globals = globals()
|
|
31
31
|
_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
|
|
@@ -69,4 +69,10 @@ if not _descriptor._USE_C_DESCRIPTORS:
|
|
|
69
69
|
_globals['keys_and_values_trimmed']._serialized_options = b'\302H\255\001\n\252\001\n\033map.keys_and_values_trimmed\0225keys and values must not start or end with whitespace\032Tthis.all(k, k.trim().size() == k.size()) && this.all(v, v.trim().size() == v.size())'
|
|
70
70
|
_globals['keys_trimmed']._loaded_options = None
|
|
71
71
|
_globals['keys_trimmed']._serialized_options = b'\302Hj\nh\n\020map.keys_trimmed\022*keys must not start or end with whitespace\032(this.all(k, k.trim().size() == k.size())'
|
|
72
|
+
_globals['project_roles_keys_valid']._loaded_options = None
|
|
73
|
+
_globals['project_roles_keys_valid']._serialized_options = b'\302H\271\001\n\266\001\n\027project_roles.key.valid\022&subject must be a \'*\', or a valid UUID\032sthis.all(k, k == \'*\' || k.matches(\'^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$\'))'
|
|
74
|
+
_globals['tenant_roles_keys_valid']._loaded_options = None
|
|
75
|
+
_globals['tenant_roles_keys_valid']._serialized_options = b'\302H\221\001\n\216\001\n\026tenant_roles.key.valid\0223subject must be \'*\' or between 2 and 128 characters\032?this.all(k, k == \'*\' || this.size() >= 2 || this.size() <=128 )'
|
|
76
|
+
_globals['machine_roles_keys_valid']._loaded_options = None
|
|
77
|
+
_globals['machine_roles_keys_valid']._serialized_options = b'\302H\320\001\n\315\001\n\027machine_roles.key.valid\0222subject must be empty string, \'*\', or a valid UUID\032~this.all(k, k == \'\' || k == \'*\' || k.matches(\'^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$\'))'
|
|
72
78
|
# @@protoc_insertion_point(module_scope)
|
|
@@ -39,3 +39,9 @@ KEYS_AND_VALUES_TRIMMED_FIELD_NUMBER: _ClassVar[int]
|
|
|
39
39
|
keys_and_values_trimmed: _descriptor.FieldDescriptor
|
|
40
40
|
KEYS_TRIMMED_FIELD_NUMBER: _ClassVar[int]
|
|
41
41
|
keys_trimmed: _descriptor.FieldDescriptor
|
|
42
|
+
PROJECT_ROLES_KEYS_VALID_FIELD_NUMBER: _ClassVar[int]
|
|
43
|
+
project_roles_keys_valid: _descriptor.FieldDescriptor
|
|
44
|
+
TENANT_ROLES_KEYS_VALID_FIELD_NUMBER: _ClassVar[int]
|
|
45
|
+
tenant_roles_keys_valid: _descriptor.FieldDescriptor
|
|
46
|
+
MACHINE_ROLES_KEYS_VALID_FIELD_NUMBER: _ClassVar[int]
|
|
47
|
+
machine_roles_keys_valid: _descriptor.FieldDescriptor
|
|
@@ -0,0 +1,190 @@
|
|
|
1
|
+
# -*- coding: utf-8 -*-
|
|
2
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
|
3
|
+
# NO CHECKED-IN PROTOBUF GENCODE
|
|
4
|
+
# source: metalstack/api/v2/token.proto
|
|
5
|
+
# Protobuf Python Version: 7.35.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
|
+
7,
|
|
15
|
+
35,
|
|
16
|
+
1,
|
|
17
|
+
'',
|
|
18
|
+
'metalstack/api/v2/token.proto'
|
|
19
|
+
)
|
|
20
|
+
# @@protoc_insertion_point(imports)
|
|
21
|
+
|
|
22
|
+
_sym_db = _symbol_database.Default()
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
from buf.validate import validate_pb2 as buf_dot_validate_dot_validate__pb2
|
|
26
|
+
from google.protobuf import duration_pb2 as google_dot_protobuf_dot_duration__pb2
|
|
27
|
+
from google.protobuf import timestamp_pb2 as google_dot_protobuf_dot_timestamp__pb2
|
|
28
|
+
from metalstack.api.v2 import common_pb2 as metalstack_dot_api_dot_v2_dot_common__pb2
|
|
29
|
+
from metalstack.api.v2 import predefined_rules_pb2 as metalstack_dot_api_dot_v2_dot_predefined__rules__pb2
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1dmetalstack/api/v2/token.proto\x12\x11metalstack.api.v2\x1a\x1b\x62uf/validate/validate.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x1emetalstack/api/v2/common.proto\x1a(metalstack/api/v2/predefined_rules.proto\"\xc2\t\n\x05Token\x12\x1c\n\x04uuid\x18\x01 \x01(\tB\x08\xbaH\x05r\x03\xb0\x01\x01R\x04uuid\x12\x1f\n\x04user\x18\x02 \x01(\tB\x0b\xbaH\x08r\x06\xf8\xb3\xae\xb1\x02\x01R\x04user\x12+\n\x04meta\x18\x03 \x01(\x0b\x32\x17.metalstack.api.v2.MetaR\x04meta\x12-\n\x0b\x64\x65scription\x18\x04 \x01(\tB\x0b\xbaH\x08r\x06\xc8\xb3\xae\xb1\x02\x01R\x0b\x64\x65scription\x12P\n\x0bpermissions\x18\x05 \x03(\x0b\x32#.metalstack.api.v2.MethodPermissionB\t\xbaH\x06\x92\x01\x03\x10\xf4\x03R\x0bpermissions\x12\x34\n\x07\x65xpires\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\x07\x65xpires\x12\x37\n\tissued_at\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\x08issuedAt\x12\x45\n\ntoken_type\x18\x08 \x01(\x0e\x32\x1c.metalstack.api.v2.TokenTypeB\x08\xbaH\x05\x82\x01\x02\x10\x01R\ttokenType\x12j\n\rproject_roles\x18\t \x03(\x0b\x32*.metalstack.api.v2.Token.ProjectRolesEntryB\x19\xbaH\x16\x9a\x01\x13*\x05\x82\x01\x02\x10\x01\xc0\x95\xb8\xb1\x02\x01\xc8\x95\xb8\xb1\x02\x01R\x0cprojectRoles\x12g\n\x0ctenant_roles\x18\n \x03(\x0b\x32).metalstack.api.v2.Token.TenantRolesEntryB\x19\xbaH\x16\x9a\x01\x13*\x05\x82\x01\x02\x10\x01\xc0\x95\xb8\xb1\x02\x01\xd0\x95\xb8\xb1\x02\x01R\x0btenantRoles\x12J\n\nadmin_role\x18\x0b \x01(\x0e\x32\x1c.metalstack.api.v2.AdminRoleB\x08\xbaH\x05\x82\x01\x02\x10\x01H\x00R\tadminRole\x88\x01\x01\x12J\n\ninfra_role\x18\x0c \x01(\x0e\x32\x1c.metalstack.api.v2.InfraRoleB\x08\xbaH\x05\x82\x01\x02\x10\x01H\x01R\tinfraRole\x88\x01\x01\x12j\n\rmachine_roles\x18\r \x03(\x0b\x32*.metalstack.api.v2.Token.MachineRolesEntryB\x19\xbaH\x16\x9a\x01\x13*\x05\x82\x01\x02\x10\x01\xc0\x95\xb8\xb1\x02\x01\xd8\x95\xb8\xb1\x02\x01R\x0cmachineRoles\x1a_\n\x11ProjectRolesEntry\x12\x10\n\x03key\x18\x01 \x01(\tR\x03key\x12\x34\n\x05value\x18\x02 \x01(\x0e\x32\x1e.metalstack.api.v2.ProjectRoleR\x05value:\x02\x38\x01\x1a]\n\x10TenantRolesEntry\x12\x10\n\x03key\x18\x01 \x01(\tR\x03key\x12\x33\n\x05value\x18\x02 \x01(\x0e\x32\x1d.metalstack.api.v2.TenantRoleR\x05value:\x02\x38\x01\x1a_\n\x11MachineRolesEntry\x12\x10\n\x03key\x18\x01 \x01(\tR\x03key\x12\x34\n\x05value\x18\x02 \x01(\x0e\x32\x1e.metalstack.api.v2.MachineRoleR\x05value:\x02\x38\x01\x42\r\n\x0b_admin_roleB\r\n\x0b_infra_role\"\xeb\x08\n\x19TokenServiceCreateRequest\x12-\n\x0b\x64\x65scription\x18\x01 \x01(\tB\x0b\xbaH\x08r\x06\xc8\xb3\xae\xb1\x02\x01R\x0b\x64\x65scription\x12O\n\x0bpermissions\x18\x02 \x03(\x0b\x32#.metalstack.api.v2.MethodPermissionB\x08\xbaH\x05\x92\x01\x02\x10\x64R\x0bpermissions\x12G\n\x07\x65xpires\x18\x03 \x01(\x0b\x32\x19.google.protobuf.DurationB\x12\xbaH\x0f\xaa\x01\x0c\x1a\x05\x08\x81\xe7\x84\x0f\x32\x03\x08\xd8\x04R\x07\x65xpires\x12~\n\rproject_roles\x18\x04 \x03(\x0b\x32>.metalstack.api.v2.TokenServiceCreateRequest.ProjectRolesEntryB\x19\xbaH\x16\x9a\x01\x13*\x05\x82\x01\x02\x10\x01\xc0\x95\xb8\xb1\x02\x01\xc8\x95\xb8\xb1\x02\x01R\x0cprojectRoles\x12{\n\x0ctenant_roles\x18\x05 \x03(\x0b\x32=.metalstack.api.v2.TokenServiceCreateRequest.TenantRolesEntryB\x19\xbaH\x16\x9a\x01\x13*\x05\x82\x01\x02\x10\x01\xc0\x95\xb8\xb1\x02\x01\xd0\x95\xb8\xb1\x02\x01R\x0btenantRoles\x12J\n\nadmin_role\x18\x06 \x01(\x0e\x32\x1c.metalstack.api.v2.AdminRoleB\x08\xbaH\x05\x82\x01\x02\x10\x01H\x00R\tadminRole\x88\x01\x01\x12J\n\ninfra_role\x18\x07 \x01(\x0e\x32\x1c.metalstack.api.v2.InfraRoleB\x08\xbaH\x05\x82\x01\x02\x10\x01H\x01R\tinfraRole\x88\x01\x01\x12~\n\rmachine_roles\x18\x08 \x03(\x0b\x32>.metalstack.api.v2.TokenServiceCreateRequest.MachineRolesEntryB\x19\xbaH\x16\x9a\x01\x13*\x05\x82\x01\x02\x10\x01\xc0\x95\xb8\xb1\x02\x01\xd8\x95\xb8\xb1\x02\x01R\x0cmachineRoles\x12\x31\n\x06labels\x18\t \x01(\x0b\x32\x19.metalstack.api.v2.LabelsR\x06labels\x1a_\n\x11ProjectRolesEntry\x12\x10\n\x03key\x18\x01 \x01(\tR\x03key\x12\x34\n\x05value\x18\x02 \x01(\x0e\x32\x1e.metalstack.api.v2.ProjectRoleR\x05value:\x02\x38\x01\x1a]\n\x10TenantRolesEntry\x12\x10\n\x03key\x18\x01 \x01(\tR\x03key\x12\x33\n\x05value\x18\x02 \x01(\x0e\x32\x1d.metalstack.api.v2.TenantRoleR\x05value:\x02\x38\x01\x1a_\n\x11MachineRolesEntry\x12\x10\n\x03key\x18\x01 \x01(\tR\x03key\x12\x34\n\x05value\x18\x02 \x01(\x0e\x32\x1e.metalstack.api.v2.MachineRoleR\x05value:\x02\x38\x01\x42\r\n\x0b_admin_roleB\r\n\x0b_infra_role\"[\n\x10MethodPermission\x12\"\n\x07subject\x18\x01 \x01(\tB\x08\xbaH\x05r\x03\x18\x80\x02R\x07subject\x12#\n\x07methods\x18\x02 \x03(\tB\t\xbaH\x06\x92\x01\x03\x10\xf4\x03R\x07methods\"d\n\x1aTokenServiceCreateResponse\x12.\n\x05token\x18\x01 \x01(\x0b\x32\x18.metalstack.api.v2.TokenR\x05token\x12\x16\n\x06secret\x18\x02 \x01(\tR\x06secret\"N\n\x17TokenServiceListRequest\x12\x33\n\x05query\x18\x01 \x01(\x0b\x32\x1d.metalstack.api.v2.TokenQueryR\x05query\"L\n\x18TokenServiceListResponse\x12\x30\n\x06tokens\x18\x01 \x03(\x0b\x32\x18.metalstack.api.v2.TokenR\x06tokens\"9\n\x19TokenServiceRevokeRequest\x12\x1c\n\x04uuid\x18\x01 \x01(\tB\x08\xbaH\x05r\x03\xb0\x01\x01R\x04uuid\"\x1c\n\x1aTokenServiceRevokeResponse\"\x99\t\n\x19TokenServiceUpdateRequest\x12\x1c\n\x04uuid\x18\x01 \x01(\tB\x08\xbaH\x05r\x03\xb0\x01\x01R\x04uuid\x12\x46\n\x0bupdate_meta\x18\x02 \x01(\x0b\x32\x1d.metalstack.api.v2.UpdateMetaB\x06\xbaH\x03\xc8\x01\x00R\nupdateMeta\x12\x32\n\x0b\x64\x65scription\x18\x03 \x01(\tB\x0b\xbaH\x08r\x06\xc8\xb3\xae\xb1\x02\x01H\x00R\x0b\x64\x65scription\x88\x01\x01\x12\x45\n\x0bpermissions\x18\x04 \x03(\x0b\x32#.metalstack.api.v2.MethodPermissionR\x0bpermissions\x12~\n\rproject_roles\x18\x05 \x03(\x0b\x32>.metalstack.api.v2.TokenServiceUpdateRequest.ProjectRolesEntryB\x19\xbaH\x16\x9a\x01\x13*\x05\x82\x01\x02\x10\x01\xc0\x95\xb8\xb1\x02\x01\xc8\x95\xb8\xb1\x02\x01R\x0cprojectRoles\x12{\n\x0ctenant_roles\x18\x06 \x03(\x0b\x32=.metalstack.api.v2.TokenServiceUpdateRequest.TenantRolesEntryB\x19\xbaH\x16\x9a\x01\x13*\x05\x82\x01\x02\x10\x01\xc0\x95\xb8\xb1\x02\x01\xd0\x95\xb8\xb1\x02\x01R\x0btenantRoles\x12J\n\nadmin_role\x18\x07 \x01(\x0e\x32\x1c.metalstack.api.v2.AdminRoleB\x08\xbaH\x05\x82\x01\x02\x10\x01H\x01R\tadminRole\x88\x01\x01\x12J\n\ninfra_role\x18\x08 \x01(\x0e\x32\x1c.metalstack.api.v2.InfraRoleB\x08\xbaH\x05\x82\x01\x02\x10\x01H\x02R\tinfraRole\x88\x01\x01\x12~\n\rmachine_roles\x18\t \x03(\x0b\x32>.metalstack.api.v2.TokenServiceUpdateRequest.MachineRolesEntryB\x19\xbaH\x16\x9a\x01\x13*\x05\x82\x01\x02\x10\x01\xc0\x95\xb8\xb1\x02\x01\xd8\x95\xb8\xb1\x02\x01R\x0cmachineRoles\x12\x37\n\x06labels\x18\n \x01(\x0b\x32\x1f.metalstack.api.v2.UpdateLabelsR\x06labels\x1a_\n\x11ProjectRolesEntry\x12\x10\n\x03key\x18\x01 \x01(\tR\x03key\x12\x34\n\x05value\x18\x02 \x01(\x0e\x32\x1e.metalstack.api.v2.ProjectRoleR\x05value:\x02\x38\x01\x1a]\n\x10TenantRolesEntry\x12\x10\n\x03key\x18\x01 \x01(\tR\x03key\x12\x33\n\x05value\x18\x02 \x01(\x0e\x32\x1d.metalstack.api.v2.TenantRoleR\x05value:\x02\x38\x01\x1a_\n\x11MachineRolesEntry\x12\x10\n\x03key\x18\x01 \x01(\tR\x03key\x12\x34\n\x05value\x18\x02 \x01(\x0e\x32\x1e.metalstack.api.v2.MachineRoleR\x05value:\x02\x38\x01\x42\x0e\n\x0c_descriptionB\r\n\x0b_admin_roleB\r\n\x0b_infra_role\"L\n\x1aTokenServiceUpdateResponse\x12.\n\x05token\x18\x01 \x01(\x0b\x32\x18.metalstack.api.v2.TokenR\x05token\"6\n\x16TokenServiceGetRequest\x12\x1c\n\x04uuid\x18\x01 \x01(\tB\x08\xbaH\x05r\x03\xb0\x01\x01R\x04uuid\"I\n\x17TokenServiceGetResponse\x12.\n\x05token\x18\x01 \x01(\x0b\x32\x18.metalstack.api.v2.TokenR\x05token\"\x1c\n\x1aTokenServiceRefreshRequest\"e\n\x1bTokenServiceRefreshResponse\x12.\n\x05token\x18\x01 \x01(\x0b\x32\x18.metalstack.api.v2.TokenR\x05token\x12\x16\n\x06secret\x18\x02 \x01(\tR\x06secret\"\xc9\x02\n\nTokenQuery\x12!\n\x04uuid\x18\x01 \x01(\tB\x08\xbaH\x05r\x03\xb0\x01\x01H\x00R\x04uuid\x88\x01\x01\x12$\n\x04user\x18\x02 \x01(\tB\x0b\xbaH\x08r\x06\xf8\xb3\xae\xb1\x02\x01H\x01R\x04user\x88\x01\x01\x12\x32\n\x0b\x64\x65scription\x18\x03 \x01(\tB\x0b\xbaH\x08r\x06\xc8\xb3\xae\xb1\x02\x01H\x02R\x0b\x64\x65scription\x88\x01\x01\x12\x36\n\x06labels\x18\x04 \x01(\x0b\x32\x19.metalstack.api.v2.LabelsH\x03R\x06labels\x88\x01\x01\x12J\n\ntoken_type\x18\x05 \x01(\x0e\x32\x1c.metalstack.api.v2.TokenTypeB\x08\xbaH\x05\x82\x01\x02\x10\x01H\x04R\ttokenType\x88\x01\x01\x42\x07\n\x05_uuidB\x07\n\x05_userB\x0e\n\x0c_descriptionB\t\n\x07_labelsB\r\n\x0b_token_type*P\n\tTokenType\x12\x1a\n\x16TOKEN_TYPE_UNSPECIFIED\x10\x00\x12\x12\n\x0eTOKEN_TYPE_API\x10\x01\x12\x13\n\x0fTOKEN_TYPE_USER\x10\x02\x32\xa8\x05\n\x0cTokenService\x12\x66\n\x03Get\x12).metalstack.api.v2.TokenServiceGetRequest\x1a*.metalstack.api.v2.TokenServiceGetResponse\"\x08\xd8\xf3\x18\x02\xe0\xf3\x18\x01\x12o\n\x06\x43reate\x12,.metalstack.api.v2.TokenServiceCreateRequest\x1a-.metalstack.api.v2.TokenServiceCreateResponse\"\x08\xd8\xf3\x18\x02\xe0\xf3\x18\x01\x12o\n\x06Update\x12,.metalstack.api.v2.TokenServiceUpdateRequest\x1a-.metalstack.api.v2.TokenServiceUpdateResponse\"\x08\xd8\xf3\x18\x02\xe0\xf3\x18\x01\x12i\n\x04List\x12*.metalstack.api.v2.TokenServiceListRequest\x1a+.metalstack.api.v2.TokenServiceListResponse\"\x08\xd8\xf3\x18\x02\xe0\xf3\x18\x01\x12o\n\x06Revoke\x12,.metalstack.api.v2.TokenServiceRevokeRequest\x1a-.metalstack.api.v2.TokenServiceRevokeResponse\"\x08\xd8\xf3\x18\x02\xe0\xf3\x18\x01\x12r\n\x07Refresh\x12-.metalstack.api.v2.TokenServiceRefreshRequest\x1a..metalstack.api.v2.TokenServiceRefreshResponse\"\x08\xd8\xf3\x18\x02\xe0\xf3\x18\x01\x42\xc0\x01\n\x15\x63om.metalstack.api.v2B\nTokenProtoP\x01Z5github.com/metal-stack/api/go/metalstack/api/v2;apiv2\xa2\x02\x03MAX\xaa\x02\x11Metalstack.Api.V2\xca\x02\x11Metalstack\\Api\\V2\xe2\x02\x1dMetalstack\\Api\\V2\\GPBMetadata\xea\x02\x13Metalstack::Api::V2b\x06proto3')
|
|
33
|
+
|
|
34
|
+
_globals = globals()
|
|
35
|
+
_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
|
|
36
|
+
_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'metalstack.api.v2.token_pb2', _globals)
|
|
37
|
+
if not _descriptor._USE_C_DESCRIPTORS:
|
|
38
|
+
_globals['DESCRIPTOR']._loaded_options = None
|
|
39
|
+
_globals['DESCRIPTOR']._serialized_options = b'\n\025com.metalstack.api.v2B\nTokenProtoP\001Z5github.com/metal-stack/api/go/metalstack/api/v2;apiv2\242\002\003MAX\252\002\021Metalstack.Api.V2\312\002\021Metalstack\\Api\\V2\342\002\035Metalstack\\Api\\V2\\GPBMetadata\352\002\023Metalstack::Api::V2'
|
|
40
|
+
_globals['_TOKEN_PROJECTROLESENTRY']._loaded_options = None
|
|
41
|
+
_globals['_TOKEN_PROJECTROLESENTRY']._serialized_options = b'8\001'
|
|
42
|
+
_globals['_TOKEN_TENANTROLESENTRY']._loaded_options = None
|
|
43
|
+
_globals['_TOKEN_TENANTROLESENTRY']._serialized_options = b'8\001'
|
|
44
|
+
_globals['_TOKEN_MACHINEROLESENTRY']._loaded_options = None
|
|
45
|
+
_globals['_TOKEN_MACHINEROLESENTRY']._serialized_options = b'8\001'
|
|
46
|
+
_globals['_TOKEN'].fields_by_name['uuid']._loaded_options = None
|
|
47
|
+
_globals['_TOKEN'].fields_by_name['uuid']._serialized_options = b'\272H\005r\003\260\001\001'
|
|
48
|
+
_globals['_TOKEN'].fields_by_name['user']._loaded_options = None
|
|
49
|
+
_globals['_TOKEN'].fields_by_name['user']._serialized_options = b'\272H\010r\006\370\263\256\261\002\001'
|
|
50
|
+
_globals['_TOKEN'].fields_by_name['description']._loaded_options = None
|
|
51
|
+
_globals['_TOKEN'].fields_by_name['description']._serialized_options = b'\272H\010r\006\310\263\256\261\002\001'
|
|
52
|
+
_globals['_TOKEN'].fields_by_name['permissions']._loaded_options = None
|
|
53
|
+
_globals['_TOKEN'].fields_by_name['permissions']._serialized_options = b'\272H\006\222\001\003\020\364\003'
|
|
54
|
+
_globals['_TOKEN'].fields_by_name['token_type']._loaded_options = None
|
|
55
|
+
_globals['_TOKEN'].fields_by_name['token_type']._serialized_options = b'\272H\005\202\001\002\020\001'
|
|
56
|
+
_globals['_TOKEN'].fields_by_name['project_roles']._loaded_options = None
|
|
57
|
+
_globals['_TOKEN'].fields_by_name['project_roles']._serialized_options = b'\272H\026\232\001\023*\005\202\001\002\020\001\300\225\270\261\002\001\310\225\270\261\002\001'
|
|
58
|
+
_globals['_TOKEN'].fields_by_name['tenant_roles']._loaded_options = None
|
|
59
|
+
_globals['_TOKEN'].fields_by_name['tenant_roles']._serialized_options = b'\272H\026\232\001\023*\005\202\001\002\020\001\300\225\270\261\002\001\320\225\270\261\002\001'
|
|
60
|
+
_globals['_TOKEN'].fields_by_name['admin_role']._loaded_options = None
|
|
61
|
+
_globals['_TOKEN'].fields_by_name['admin_role']._serialized_options = b'\272H\005\202\001\002\020\001'
|
|
62
|
+
_globals['_TOKEN'].fields_by_name['infra_role']._loaded_options = None
|
|
63
|
+
_globals['_TOKEN'].fields_by_name['infra_role']._serialized_options = b'\272H\005\202\001\002\020\001'
|
|
64
|
+
_globals['_TOKEN'].fields_by_name['machine_roles']._loaded_options = None
|
|
65
|
+
_globals['_TOKEN'].fields_by_name['machine_roles']._serialized_options = b'\272H\026\232\001\023*\005\202\001\002\020\001\300\225\270\261\002\001\330\225\270\261\002\001'
|
|
66
|
+
_globals['_TOKENSERVICECREATEREQUEST_PROJECTROLESENTRY']._loaded_options = None
|
|
67
|
+
_globals['_TOKENSERVICECREATEREQUEST_PROJECTROLESENTRY']._serialized_options = b'8\001'
|
|
68
|
+
_globals['_TOKENSERVICECREATEREQUEST_TENANTROLESENTRY']._loaded_options = None
|
|
69
|
+
_globals['_TOKENSERVICECREATEREQUEST_TENANTROLESENTRY']._serialized_options = b'8\001'
|
|
70
|
+
_globals['_TOKENSERVICECREATEREQUEST_MACHINEROLESENTRY']._loaded_options = None
|
|
71
|
+
_globals['_TOKENSERVICECREATEREQUEST_MACHINEROLESENTRY']._serialized_options = b'8\001'
|
|
72
|
+
_globals['_TOKENSERVICECREATEREQUEST'].fields_by_name['description']._loaded_options = None
|
|
73
|
+
_globals['_TOKENSERVICECREATEREQUEST'].fields_by_name['description']._serialized_options = b'\272H\010r\006\310\263\256\261\002\001'
|
|
74
|
+
_globals['_TOKENSERVICECREATEREQUEST'].fields_by_name['permissions']._loaded_options = None
|
|
75
|
+
_globals['_TOKENSERVICECREATEREQUEST'].fields_by_name['permissions']._serialized_options = b'\272H\005\222\001\002\020d'
|
|
76
|
+
_globals['_TOKENSERVICECREATEREQUEST'].fields_by_name['expires']._loaded_options = None
|
|
77
|
+
_globals['_TOKENSERVICECREATEREQUEST'].fields_by_name['expires']._serialized_options = b'\272H\017\252\001\014\032\005\010\201\347\204\0172\003\010\330\004'
|
|
78
|
+
_globals['_TOKENSERVICECREATEREQUEST'].fields_by_name['project_roles']._loaded_options = None
|
|
79
|
+
_globals['_TOKENSERVICECREATEREQUEST'].fields_by_name['project_roles']._serialized_options = b'\272H\026\232\001\023*\005\202\001\002\020\001\300\225\270\261\002\001\310\225\270\261\002\001'
|
|
80
|
+
_globals['_TOKENSERVICECREATEREQUEST'].fields_by_name['tenant_roles']._loaded_options = None
|
|
81
|
+
_globals['_TOKENSERVICECREATEREQUEST'].fields_by_name['tenant_roles']._serialized_options = b'\272H\026\232\001\023*\005\202\001\002\020\001\300\225\270\261\002\001\320\225\270\261\002\001'
|
|
82
|
+
_globals['_TOKENSERVICECREATEREQUEST'].fields_by_name['admin_role']._loaded_options = None
|
|
83
|
+
_globals['_TOKENSERVICECREATEREQUEST'].fields_by_name['admin_role']._serialized_options = b'\272H\005\202\001\002\020\001'
|
|
84
|
+
_globals['_TOKENSERVICECREATEREQUEST'].fields_by_name['infra_role']._loaded_options = None
|
|
85
|
+
_globals['_TOKENSERVICECREATEREQUEST'].fields_by_name['infra_role']._serialized_options = b'\272H\005\202\001\002\020\001'
|
|
86
|
+
_globals['_TOKENSERVICECREATEREQUEST'].fields_by_name['machine_roles']._loaded_options = None
|
|
87
|
+
_globals['_TOKENSERVICECREATEREQUEST'].fields_by_name['machine_roles']._serialized_options = b'\272H\026\232\001\023*\005\202\001\002\020\001\300\225\270\261\002\001\330\225\270\261\002\001'
|
|
88
|
+
_globals['_METHODPERMISSION'].fields_by_name['subject']._loaded_options = None
|
|
89
|
+
_globals['_METHODPERMISSION'].fields_by_name['subject']._serialized_options = b'\272H\005r\003\030\200\002'
|
|
90
|
+
_globals['_METHODPERMISSION'].fields_by_name['methods']._loaded_options = None
|
|
91
|
+
_globals['_METHODPERMISSION'].fields_by_name['methods']._serialized_options = b'\272H\006\222\001\003\020\364\003'
|
|
92
|
+
_globals['_TOKENSERVICEREVOKEREQUEST'].fields_by_name['uuid']._loaded_options = None
|
|
93
|
+
_globals['_TOKENSERVICEREVOKEREQUEST'].fields_by_name['uuid']._serialized_options = b'\272H\005r\003\260\001\001'
|
|
94
|
+
_globals['_TOKENSERVICEUPDATEREQUEST_PROJECTROLESENTRY']._loaded_options = None
|
|
95
|
+
_globals['_TOKENSERVICEUPDATEREQUEST_PROJECTROLESENTRY']._serialized_options = b'8\001'
|
|
96
|
+
_globals['_TOKENSERVICEUPDATEREQUEST_TENANTROLESENTRY']._loaded_options = None
|
|
97
|
+
_globals['_TOKENSERVICEUPDATEREQUEST_TENANTROLESENTRY']._serialized_options = b'8\001'
|
|
98
|
+
_globals['_TOKENSERVICEUPDATEREQUEST_MACHINEROLESENTRY']._loaded_options = None
|
|
99
|
+
_globals['_TOKENSERVICEUPDATEREQUEST_MACHINEROLESENTRY']._serialized_options = b'8\001'
|
|
100
|
+
_globals['_TOKENSERVICEUPDATEREQUEST'].fields_by_name['uuid']._loaded_options = None
|
|
101
|
+
_globals['_TOKENSERVICEUPDATEREQUEST'].fields_by_name['uuid']._serialized_options = b'\272H\005r\003\260\001\001'
|
|
102
|
+
_globals['_TOKENSERVICEUPDATEREQUEST'].fields_by_name['update_meta']._loaded_options = None
|
|
103
|
+
_globals['_TOKENSERVICEUPDATEREQUEST'].fields_by_name['update_meta']._serialized_options = b'\272H\003\310\001\000'
|
|
104
|
+
_globals['_TOKENSERVICEUPDATEREQUEST'].fields_by_name['description']._loaded_options = None
|
|
105
|
+
_globals['_TOKENSERVICEUPDATEREQUEST'].fields_by_name['description']._serialized_options = b'\272H\010r\006\310\263\256\261\002\001'
|
|
106
|
+
_globals['_TOKENSERVICEUPDATEREQUEST'].fields_by_name['project_roles']._loaded_options = None
|
|
107
|
+
_globals['_TOKENSERVICEUPDATEREQUEST'].fields_by_name['project_roles']._serialized_options = b'\272H\026\232\001\023*\005\202\001\002\020\001\300\225\270\261\002\001\310\225\270\261\002\001'
|
|
108
|
+
_globals['_TOKENSERVICEUPDATEREQUEST'].fields_by_name['tenant_roles']._loaded_options = None
|
|
109
|
+
_globals['_TOKENSERVICEUPDATEREQUEST'].fields_by_name['tenant_roles']._serialized_options = b'\272H\026\232\001\023*\005\202\001\002\020\001\300\225\270\261\002\001\320\225\270\261\002\001'
|
|
110
|
+
_globals['_TOKENSERVICEUPDATEREQUEST'].fields_by_name['admin_role']._loaded_options = None
|
|
111
|
+
_globals['_TOKENSERVICEUPDATEREQUEST'].fields_by_name['admin_role']._serialized_options = b'\272H\005\202\001\002\020\001'
|
|
112
|
+
_globals['_TOKENSERVICEUPDATEREQUEST'].fields_by_name['infra_role']._loaded_options = None
|
|
113
|
+
_globals['_TOKENSERVICEUPDATEREQUEST'].fields_by_name['infra_role']._serialized_options = b'\272H\005\202\001\002\020\001'
|
|
114
|
+
_globals['_TOKENSERVICEUPDATEREQUEST'].fields_by_name['machine_roles']._loaded_options = None
|
|
115
|
+
_globals['_TOKENSERVICEUPDATEREQUEST'].fields_by_name['machine_roles']._serialized_options = b'\272H\026\232\001\023*\005\202\001\002\020\001\300\225\270\261\002\001\330\225\270\261\002\001'
|
|
116
|
+
_globals['_TOKENSERVICEGETREQUEST'].fields_by_name['uuid']._loaded_options = None
|
|
117
|
+
_globals['_TOKENSERVICEGETREQUEST'].fields_by_name['uuid']._serialized_options = b'\272H\005r\003\260\001\001'
|
|
118
|
+
_globals['_TOKENQUERY'].fields_by_name['uuid']._loaded_options = None
|
|
119
|
+
_globals['_TOKENQUERY'].fields_by_name['uuid']._serialized_options = b'\272H\005r\003\260\001\001'
|
|
120
|
+
_globals['_TOKENQUERY'].fields_by_name['user']._loaded_options = None
|
|
121
|
+
_globals['_TOKENQUERY'].fields_by_name['user']._serialized_options = b'\272H\010r\006\370\263\256\261\002\001'
|
|
122
|
+
_globals['_TOKENQUERY'].fields_by_name['description']._loaded_options = None
|
|
123
|
+
_globals['_TOKENQUERY'].fields_by_name['description']._serialized_options = b'\272H\010r\006\310\263\256\261\002\001'
|
|
124
|
+
_globals['_TOKENQUERY'].fields_by_name['token_type']._loaded_options = None
|
|
125
|
+
_globals['_TOKENQUERY'].fields_by_name['token_type']._serialized_options = b'\272H\005\202\001\002\020\001'
|
|
126
|
+
_globals['_TOKENSERVICE'].methods_by_name['Get']._loaded_options = None
|
|
127
|
+
_globals['_TOKENSERVICE'].methods_by_name['Get']._serialized_options = b'\330\363\030\002\340\363\030\001'
|
|
128
|
+
_globals['_TOKENSERVICE'].methods_by_name['Create']._loaded_options = None
|
|
129
|
+
_globals['_TOKENSERVICE'].methods_by_name['Create']._serialized_options = b'\330\363\030\002\340\363\030\001'
|
|
130
|
+
_globals['_TOKENSERVICE'].methods_by_name['Update']._loaded_options = None
|
|
131
|
+
_globals['_TOKENSERVICE'].methods_by_name['Update']._serialized_options = b'\330\363\030\002\340\363\030\001'
|
|
132
|
+
_globals['_TOKENSERVICE'].methods_by_name['List']._loaded_options = None
|
|
133
|
+
_globals['_TOKENSERVICE'].methods_by_name['List']._serialized_options = b'\330\363\030\002\340\363\030\001'
|
|
134
|
+
_globals['_TOKENSERVICE'].methods_by_name['Revoke']._loaded_options = None
|
|
135
|
+
_globals['_TOKENSERVICE'].methods_by_name['Revoke']._serialized_options = b'\330\363\030\002\340\363\030\001'
|
|
136
|
+
_globals['_TOKENSERVICE'].methods_by_name['Refresh']._loaded_options = None
|
|
137
|
+
_globals['_TOKENSERVICE'].methods_by_name['Refresh']._serialized_options = b'\330\363\030\002\340\363\030\001'
|
|
138
|
+
_globals['_TOKENTYPE']._serialized_start=4871
|
|
139
|
+
_globals['_TOKENTYPE']._serialized_end=4951
|
|
140
|
+
_globals['_TOKEN']._serialized_start=221
|
|
141
|
+
_globals['_TOKEN']._serialized_end=1439
|
|
142
|
+
_globals['_TOKEN_PROJECTROLESENTRY']._serialized_start=1122
|
|
143
|
+
_globals['_TOKEN_PROJECTROLESENTRY']._serialized_end=1217
|
|
144
|
+
_globals['_TOKEN_TENANTROLESENTRY']._serialized_start=1219
|
|
145
|
+
_globals['_TOKEN_TENANTROLESENTRY']._serialized_end=1312
|
|
146
|
+
_globals['_TOKEN_MACHINEROLESENTRY']._serialized_start=1314
|
|
147
|
+
_globals['_TOKEN_MACHINEROLESENTRY']._serialized_end=1409
|
|
148
|
+
_globals['_TOKENSERVICECREATEREQUEST']._serialized_start=1442
|
|
149
|
+
_globals['_TOKENSERVICECREATEREQUEST']._serialized_end=2573
|
|
150
|
+
_globals['_TOKENSERVICECREATEREQUEST_PROJECTROLESENTRY']._serialized_start=1122
|
|
151
|
+
_globals['_TOKENSERVICECREATEREQUEST_PROJECTROLESENTRY']._serialized_end=1217
|
|
152
|
+
_globals['_TOKENSERVICECREATEREQUEST_TENANTROLESENTRY']._serialized_start=1219
|
|
153
|
+
_globals['_TOKENSERVICECREATEREQUEST_TENANTROLESENTRY']._serialized_end=1312
|
|
154
|
+
_globals['_TOKENSERVICECREATEREQUEST_MACHINEROLESENTRY']._serialized_start=1314
|
|
155
|
+
_globals['_TOKENSERVICECREATEREQUEST_MACHINEROLESENTRY']._serialized_end=1409
|
|
156
|
+
_globals['_METHODPERMISSION']._serialized_start=2575
|
|
157
|
+
_globals['_METHODPERMISSION']._serialized_end=2666
|
|
158
|
+
_globals['_TOKENSERVICECREATERESPONSE']._serialized_start=2668
|
|
159
|
+
_globals['_TOKENSERVICECREATERESPONSE']._serialized_end=2768
|
|
160
|
+
_globals['_TOKENSERVICELISTREQUEST']._serialized_start=2770
|
|
161
|
+
_globals['_TOKENSERVICELISTREQUEST']._serialized_end=2848
|
|
162
|
+
_globals['_TOKENSERVICELISTRESPONSE']._serialized_start=2850
|
|
163
|
+
_globals['_TOKENSERVICELISTRESPONSE']._serialized_end=2926
|
|
164
|
+
_globals['_TOKENSERVICEREVOKEREQUEST']._serialized_start=2928
|
|
165
|
+
_globals['_TOKENSERVICEREVOKEREQUEST']._serialized_end=2985
|
|
166
|
+
_globals['_TOKENSERVICEREVOKERESPONSE']._serialized_start=2987
|
|
167
|
+
_globals['_TOKENSERVICEREVOKERESPONSE']._serialized_end=3015
|
|
168
|
+
_globals['_TOKENSERVICEUPDATEREQUEST']._serialized_start=3018
|
|
169
|
+
_globals['_TOKENSERVICEUPDATEREQUEST']._serialized_end=4195
|
|
170
|
+
_globals['_TOKENSERVICEUPDATEREQUEST_PROJECTROLESENTRY']._serialized_start=1122
|
|
171
|
+
_globals['_TOKENSERVICEUPDATEREQUEST_PROJECTROLESENTRY']._serialized_end=1217
|
|
172
|
+
_globals['_TOKENSERVICEUPDATEREQUEST_TENANTROLESENTRY']._serialized_start=1219
|
|
173
|
+
_globals['_TOKENSERVICEUPDATEREQUEST_TENANTROLESENTRY']._serialized_end=1312
|
|
174
|
+
_globals['_TOKENSERVICEUPDATEREQUEST_MACHINEROLESENTRY']._serialized_start=1314
|
|
175
|
+
_globals['_TOKENSERVICEUPDATEREQUEST_MACHINEROLESENTRY']._serialized_end=1409
|
|
176
|
+
_globals['_TOKENSERVICEUPDATERESPONSE']._serialized_start=4197
|
|
177
|
+
_globals['_TOKENSERVICEUPDATERESPONSE']._serialized_end=4273
|
|
178
|
+
_globals['_TOKENSERVICEGETREQUEST']._serialized_start=4275
|
|
179
|
+
_globals['_TOKENSERVICEGETREQUEST']._serialized_end=4329
|
|
180
|
+
_globals['_TOKENSERVICEGETRESPONSE']._serialized_start=4331
|
|
181
|
+
_globals['_TOKENSERVICEGETRESPONSE']._serialized_end=4404
|
|
182
|
+
_globals['_TOKENSERVICEREFRESHREQUEST']._serialized_start=4406
|
|
183
|
+
_globals['_TOKENSERVICEREFRESHREQUEST']._serialized_end=4434
|
|
184
|
+
_globals['_TOKENSERVICEREFRESHRESPONSE']._serialized_start=4436
|
|
185
|
+
_globals['_TOKENSERVICEREFRESHRESPONSE']._serialized_end=4537
|
|
186
|
+
_globals['_TOKENQUERY']._serialized_start=4540
|
|
187
|
+
_globals['_TOKENQUERY']._serialized_end=4869
|
|
188
|
+
_globals['_TOKENSERVICE']._serialized_start=4954
|
|
189
|
+
_globals['_TOKENSERVICE']._serialized_end=5634
|
|
190
|
+
# @@protoc_insertion_point(module_scope)
|
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
from collections.abc import Iterator
|
|
2
|
+
from typing import Any
|
|
3
|
+
|
|
4
|
+
import pyqwest
|
|
5
|
+
import pytest
|
|
6
|
+
from connectrpc.request import RequestContext
|
|
7
|
+
from pyqwest.testing import WSGITransport
|
|
8
|
+
|
|
9
|
+
from metalstack.api.v2 import ip_pb2
|
|
10
|
+
from metalstack.api.v2 import version_pb2
|
|
11
|
+
from metalstack.api.v2.ip_connect import (
|
|
12
|
+
IPServiceWSGIApplication,
|
|
13
|
+
)
|
|
14
|
+
from metalstack.api.v2.version_connect import (
|
|
15
|
+
VersionServiceWSGIApplication,
|
|
16
|
+
)
|
|
17
|
+
from metalstack.client.client import Client
|
|
18
|
+
from metalstack.infra.v2 import bmc_pb2
|
|
19
|
+
from metalstack.infra.v2 import component_pb2 as infra_component_pb2
|
|
20
|
+
from metalstack.infra.v2.bmc_connect import (
|
|
21
|
+
BMCServiceWSGIApplication,
|
|
22
|
+
)
|
|
23
|
+
from metalstack.infra.v2.component_connect import (
|
|
24
|
+
ComponentServiceWSGIApplication,
|
|
25
|
+
)
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
class MockVersionService:
|
|
29
|
+
def __init__(self, version: str = "1.0"):
|
|
30
|
+
self._version = version
|
|
31
|
+
|
|
32
|
+
def get(
|
|
33
|
+
self, request: version_pb2.VersionServiceGetRequest, ctx: RequestContext
|
|
34
|
+
) -> version_pb2.VersionServiceGetResponse:
|
|
35
|
+
return version_pb2.VersionServiceGetResponse(
|
|
36
|
+
version=version_pb2.Version(version=self._version)
|
|
37
|
+
)
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
class MockIPService:
|
|
41
|
+
def __init__(self):
|
|
42
|
+
self.received_auth: str | None = None
|
|
43
|
+
|
|
44
|
+
def get(
|
|
45
|
+
self, request: ip_pb2.IPServiceGetRequest, ctx: RequestContext
|
|
46
|
+
) -> ip_pb2.IPServiceGetResponse:
|
|
47
|
+
self.received_auth = ctx.request_headers().get("authorization")
|
|
48
|
+
return ip_pb2.IPServiceGetResponse(
|
|
49
|
+
ip=ip_pb2.IP(ip=request.ip, project=request.project)
|
|
50
|
+
)
|
|
51
|
+
|
|
52
|
+
def create(
|
|
53
|
+
self, request: ip_pb2.IPServiceCreateRequest, ctx: RequestContext
|
|
54
|
+
) -> ip_pb2.IPServiceCreateResponse:
|
|
55
|
+
return ip_pb2.IPServiceCreateResponse()
|
|
56
|
+
|
|
57
|
+
def update(
|
|
58
|
+
self, request: ip_pb2.IPServiceUpdateRequest, ctx: RequestContext
|
|
59
|
+
) -> ip_pb2.IPServiceUpdateResponse:
|
|
60
|
+
return ip_pb2.IPServiceUpdateResponse()
|
|
61
|
+
|
|
62
|
+
def list(
|
|
63
|
+
self, request: ip_pb2.IPServiceListRequest, ctx: RequestContext
|
|
64
|
+
) -> ip_pb2.IPServiceListResponse:
|
|
65
|
+
return ip_pb2.IPServiceListResponse()
|
|
66
|
+
|
|
67
|
+
def delete(
|
|
68
|
+
self, request: ip_pb2.IPServiceDeleteRequest, ctx: RequestContext
|
|
69
|
+
) -> ip_pb2.IPServiceDeleteResponse:
|
|
70
|
+
return ip_pb2.IPServiceDeleteResponse()
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
class MockBMCService:
|
|
74
|
+
def __init__(self):
|
|
75
|
+
self.received_auth: str | None = None
|
|
76
|
+
|
|
77
|
+
def update_b_m_c_info(
|
|
78
|
+
self, request: bmc_pb2.UpdateBMCInfoRequest, ctx: RequestContext
|
|
79
|
+
) -> bmc_pb2.UpdateBMCInfoResponse:
|
|
80
|
+
self.received_auth = ctx.request_headers().get("authorization")
|
|
81
|
+
return bmc_pb2.UpdateBMCInfoResponse()
|
|
82
|
+
|
|
83
|
+
def wait_for_b_m_c_command(
|
|
84
|
+
self, request: bmc_pb2.WaitForBMCCommandRequest, ctx: RequestContext
|
|
85
|
+
) -> Iterator[bmc_pb2.WaitForBMCCommandResponse]:
|
|
86
|
+
self.received_auth = ctx.request_headers().get("authorization")
|
|
87
|
+
yield bmc_pb2.WaitForBMCCommandResponse(uuid="test-uuid", command_id="cmd-1")
|
|
88
|
+
|
|
89
|
+
def b_m_c_command_done(
|
|
90
|
+
self, request: bmc_pb2.BMCCommandDoneRequest, ctx: RequestContext
|
|
91
|
+
) -> bmc_pb2.BMCCommandDoneResponse:
|
|
92
|
+
return bmc_pb2.BMCCommandDoneResponse()
|
|
93
|
+
|
|
94
|
+
|
|
95
|
+
class MockComponentService:
|
|
96
|
+
def __init__(self):
|
|
97
|
+
self.pings: list[infra_component_pb2.ComponentServicePingRequest] = []
|
|
98
|
+
|
|
99
|
+
def ping(
|
|
100
|
+
self,
|
|
101
|
+
request: infra_component_pb2.ComponentServicePingRequest,
|
|
102
|
+
ctx: RequestContext,
|
|
103
|
+
) -> infra_component_pb2.ComponentServicePingResponse:
|
|
104
|
+
self.pings.append(
|
|
105
|
+
infra_component_pb2.ComponentServicePingRequest(
|
|
106
|
+
type=request.type,
|
|
107
|
+
identifier=request.identifier,
|
|
108
|
+
started_at=request.started_at,
|
|
109
|
+
interval=request.interval,
|
|
110
|
+
version=request.version,
|
|
111
|
+
)
|
|
112
|
+
)
|
|
113
|
+
return infra_component_pb2.ComponentServicePingResponse()
|
|
114
|
+
|
|
115
|
+
|
|
116
|
+
def _build_combined_wsgi_app(services: dict[str, Any]):
|
|
117
|
+
"""Build a combined WSGI app that dispatches by path prefix."""
|
|
118
|
+
|
|
119
|
+
def application(environ, start_response):
|
|
120
|
+
path = environ.get("PATH_INFO", "/")
|
|
121
|
+
for prefix, app in services.items():
|
|
122
|
+
if path.startswith(prefix):
|
|
123
|
+
return app(environ, start_response)
|
|
124
|
+
from werkzeug.exceptions import NotFound
|
|
125
|
+
|
|
126
|
+
return NotFound()(environ, start_response)
|
|
127
|
+
|
|
128
|
+
return application
|
|
129
|
+
|
|
130
|
+
|
|
131
|
+
@pytest.fixture
|
|
132
|
+
def mock_version_service():
|
|
133
|
+
return MockVersionService()
|
|
134
|
+
|
|
135
|
+
|
|
136
|
+
@pytest.fixture
|
|
137
|
+
def mock_ip_service():
|
|
138
|
+
return MockIPService()
|
|
139
|
+
|
|
140
|
+
|
|
141
|
+
@pytest.fixture
|
|
142
|
+
def mock_bmc_service():
|
|
143
|
+
return MockBMCService()
|
|
144
|
+
|
|
145
|
+
|
|
146
|
+
@pytest.fixture
|
|
147
|
+
def mock_component_service():
|
|
148
|
+
return MockComponentService()
|
|
149
|
+
|
|
150
|
+
|
|
151
|
+
@pytest.fixture
|
|
152
|
+
def test_client(
|
|
153
|
+
mock_version_service,
|
|
154
|
+
mock_ip_service,
|
|
155
|
+
mock_bmc_service,
|
|
156
|
+
mock_component_service,
|
|
157
|
+
):
|
|
158
|
+
"""Create a Client with WSGI-backed transport for testing."""
|
|
159
|
+
services = {
|
|
160
|
+
"/metalstack.api.v2.VersionService": VersionServiceWSGIApplication(
|
|
161
|
+
mock_version_service
|
|
162
|
+
),
|
|
163
|
+
"/metalstack.api.v2.IPService": IPServiceWSGIApplication(mock_ip_service),
|
|
164
|
+
"/metalstack.infra.v2.BMCService": BMCServiceWSGIApplication(mock_bmc_service),
|
|
165
|
+
"/metalstack.infra.v2.ComponentService": ComponentServiceWSGIApplication(
|
|
166
|
+
mock_component_service
|
|
167
|
+
),
|
|
168
|
+
}
|
|
169
|
+
transport = WSGITransport(_build_combined_wsgi_app(services))
|
|
170
|
+
c = Client(baseurl="http://test", timeout=10)
|
|
171
|
+
c._client = pyqwest.SyncClient(transport=transport)
|
|
172
|
+
return c
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
"""Tests mirroring go/client/client_test.go.
|
|
2
|
+
|
|
3
|
+
Test_Client -> test_client_apiv2_version_get
|
|
4
|
+
Test_ClientInterceptors -> test_client_auth_header_unary, test_client_auth_header_streaming
|
|
5
|
+
"""
|
|
6
|
+
|
|
7
|
+
import pyqwest
|
|
8
|
+
import pytest
|
|
9
|
+
from pyqwest.testing import WSGITransport
|
|
10
|
+
|
|
11
|
+
from metalstack.api.v2 import ip_pb2
|
|
12
|
+
from metalstack.api.v2 import version_pb2
|
|
13
|
+
from metalstack.api.v2.ip_connect import (
|
|
14
|
+
IPServiceClientSync,
|
|
15
|
+
IPServiceWSGIApplication,
|
|
16
|
+
)
|
|
17
|
+
from metalstack.api.v2.version_connect import (
|
|
18
|
+
VersionServiceClientSync,
|
|
19
|
+
VersionServiceWSGIApplication,
|
|
20
|
+
)
|
|
21
|
+
from metalstack.client.client import Client
|
|
22
|
+
from metalstack.infra.v2 import bmc_pb2
|
|
23
|
+
from metalstack.infra.v2.bmc_connect import (
|
|
24
|
+
BMCServiceClientSync,
|
|
25
|
+
BMCServiceWSGIApplication,
|
|
26
|
+
)
|
|
27
|
+
from metalstack.infra.v2 import component_pb2 as infra_component_pb2
|
|
28
|
+
from metalstack.infra.v2.component_connect import (
|
|
29
|
+
ComponentServiceClientSync,
|
|
30
|
+
ComponentServiceWSGIApplication,
|
|
31
|
+
)
|
|
32
|
+
|
|
33
|
+
from .conftest import (
|
|
34
|
+
MockBMCService,
|
|
35
|
+
MockComponentService,
|
|
36
|
+
MockIPService,
|
|
37
|
+
MockVersionService,
|
|
38
|
+
_build_combined_wsgi_app,
|
|
39
|
+
)
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
class TestClient:
|
|
43
|
+
"""Mirrors Test_Client from client_test.go.
|
|
44
|
+
|
|
45
|
+
Tests client instantiation and basic RPC calls through the generated Client wrapper.
|
|
46
|
+
"""
|
|
47
|
+
|
|
48
|
+
def test_client_creates_service_groups(self, test_client):
|
|
49
|
+
"""Client exposes adminv2, apiv2, infrav2 service groups."""
|
|
50
|
+
assert test_client.apiv2() is not None
|
|
51
|
+
assert test_client.infrav2() is not None
|
|
52
|
+
|
|
53
|
+
def test_client_apiv2_version_get(self, test_client, mock_version_service):
|
|
54
|
+
"""Version.Get returns the expected version through the Client wrapper."""
|
|
55
|
+
resp = test_client.apiv2().version().get(
|
|
56
|
+
request=version_pb2.VersionServiceGetRequest()
|
|
57
|
+
)
|
|
58
|
+
assert resp is not None
|
|
59
|
+
assert resp.version.version == "1.0"
|
|
60
|
+
|
|
61
|
+
def test_client_apiv2_version_get_custom_version(self, mock_version_service):
|
|
62
|
+
"""Client can be configured with a custom version response."""
|
|
63
|
+
mock_version_service._version = "2.5.3"
|
|
64
|
+
vs = MockVersionService(version="2.5.3")
|
|
65
|
+
ips = MockIPService()
|
|
66
|
+
bmc = MockBMCService()
|
|
67
|
+
cs = MockComponentService()
|
|
68
|
+
|
|
69
|
+
services = {
|
|
70
|
+
"/metalstack.api.v2.VersionService": VersionServiceWSGIApplication(vs),
|
|
71
|
+
"/metalstack.api.v2.IPService": IPServiceWSGIApplication(ips),
|
|
72
|
+
"/metalstack.infra.v2.BMCService": BMCServiceWSGIApplication(bmc),
|
|
73
|
+
"/metalstack.infra.v2.ComponentService": ComponentServiceWSGIApplication(cs),
|
|
74
|
+
}
|
|
75
|
+
transport = WSGITransport(_build_combined_wsgi_app(services))
|
|
76
|
+
c = Client(baseurl="http://test", timeout=10)
|
|
77
|
+
c._client = pyqwest.SyncClient(transport=transport)
|
|
78
|
+
|
|
79
|
+
resp = c.apiv2().version().get(
|
|
80
|
+
request=version_pb2.VersionServiceGetRequest()
|
|
81
|
+
)
|
|
82
|
+
assert resp.version.version == "2.5.3"
|
|
83
|
+
|
|
84
|
+
|
|
85
|
+
class TestClientInterceptors:
|
|
86
|
+
"""Mirrors Test_ClientInterceptors from client_test.go.
|
|
87
|
+
|
|
88
|
+
Tests that auth headers are correctly passed for both unary and streaming calls.
|
|
89
|
+
"""
|
|
90
|
+
|
|
91
|
+
def test_client_auth_header_unary(self, test_client, mock_bmc_service):
|
|
92
|
+
"""Unary call has Authorization header set."""
|
|
93
|
+
token = "test-bearer-token"
|
|
94
|
+
resp = test_client.infrav2().bmc().update_b_m_c_info(
|
|
95
|
+
request=bmc_pb2.UpdateBMCInfoRequest(),
|
|
96
|
+
headers={"authorization": f"Bearer {token}"},
|
|
97
|
+
)
|
|
98
|
+
assert resp is not None
|
|
99
|
+
assert mock_bmc_service.received_auth == f"Bearer {token}"
|
|
100
|
+
|
|
101
|
+
def test_client_auth_header_streaming(self, test_client, mock_bmc_service):
|
|
102
|
+
"""Streaming call has Authorization header set."""
|
|
103
|
+
token = "test-stream-token"
|
|
104
|
+
stream = test_client.infrav2().bmc().wait_for_b_m_c_command(
|
|
105
|
+
request=bmc_pb2.WaitForBMCCommandRequest(),
|
|
106
|
+
headers={"authorization": f"Bearer {token}"},
|
|
107
|
+
)
|
|
108
|
+
assert stream is not None
|
|
109
|
+
for cmd in stream:
|
|
110
|
+
assert cmd.uuid == "test-uuid"
|
|
111
|
+
assert mock_bmc_service.received_auth == f"Bearer {token}"
|
|
112
|
+
|
|
113
|
+
def test_client_auth_header_ip_get(self, test_client, mock_ip_service):
|
|
114
|
+
"""IP Get call has Authorization header set."""
|
|
115
|
+
token = "ip-service-token"
|
|
116
|
+
resp = test_client.apiv2().ip().get(
|
|
117
|
+
request=ip_pb2.IPServiceGetRequest(ip="10.0.0.1"),
|
|
118
|
+
headers={"authorization": f"Bearer {token}"},
|
|
119
|
+
)
|
|
120
|
+
assert resp is not None
|
|
121
|
+
assert resp.ip.ip == "10.0.0.1"
|
|
122
|
+
assert mock_ip_service.received_auth == f"Bearer {token}"
|