Skip to content

Commit

Permalink
fixed examples
Browse files Browse the repository at this point in the history
  • Loading branch information
sanderegg committed Dec 2, 2024
1 parent 7789b59 commit 7490dd6
Showing 1 changed file with 14 additions and 18 deletions.
32 changes: 14 additions & 18 deletions packages/models-library/src/models_library/clusters.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,28 +112,17 @@ class Cluster(BaseCluster):
extra="allow",
json_schema_extra={
"examples": [
{
"id": DEFAULT_CLUSTER_ID,
"name": "The default cluster",
"type": ClusterTypeInModel.ON_PREMISE,
"owner": 1456,
"endpoint": "tcp://default-dask-scheduler:8786",
"authentication": {
"type": "simple",
"username": "someuser",
"password": "somepassword",
},
},
{
"id": 432,
"name": "My awesome cluster",
"type": ClusterTypeInModel.ON_PREMISE,
"owner": 12,
"endpoint": "https://registry.osparc-development.fake.dev",
"authentication": {
"type": "simple",
"username": "someuser",
"password": "somepassword",
"type": "tls",
"tls_ca_file": "/path/to/ca_file",
"tls_client_cert": "/path/to/cert_file",
"tls_client_key": "/path/to/key_file",
},
},
{
Expand All @@ -143,7 +132,12 @@ class Cluster(BaseCluster):
"type": ClusterTypeInModel.AWS,
"owner": 154,
"endpoint": "https://registry.osparc-development.fake.dev",
"authentication": {"type": "kerberos"},
"authentication": {
"type": "tls",
"tls_ca_file": "/path/to/ca_file",
"tls_client_cert": "/path/to/cert_file",
"tls_client_key": "/path/to/key_file",
},
"access_rights": {
154: CLUSTER_ADMIN_RIGHTS, # type: ignore[dict-item]
12: CLUSTER_MANAGER_RIGHTS, # type: ignore[dict-item]
Expand All @@ -158,8 +152,10 @@ class Cluster(BaseCluster):
"owner": 2321,
"endpoint": "https://registry.osparc-development.fake2.dev",
"authentication": {
"type": "jupyterhub",
"api_token": "some_fake_token",
"type": "tls",
"tls_ca_file": "/path/to/ca_file",
"tls_client_cert": "/path/to/cert_file",
"tls_client_key": "/path/to/key_file",
},
"access_rights": {
154: CLUSTER_ADMIN_RIGHTS, # type: ignore[dict-item]
Expand Down

0 comments on commit 7490dd6

Please sign in to comment.