Skip to content

Commit 7490dd6

Browse files
committed
fixed examples
1 parent 7789b59 commit 7490dd6

File tree

1 file changed

+14
-18
lines changed

1 file changed

+14
-18
lines changed

packages/models-library/src/models_library/clusters.py

Lines changed: 14 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -112,28 +112,17 @@ class Cluster(BaseCluster):
112112
extra="allow",
113113
json_schema_extra={
114114
"examples": [
115-
{
116-
"id": DEFAULT_CLUSTER_ID,
117-
"name": "The default cluster",
118-
"type": ClusterTypeInModel.ON_PREMISE,
119-
"owner": 1456,
120-
"endpoint": "tcp://default-dask-scheduler:8786",
121-
"authentication": {
122-
"type": "simple",
123-
"username": "someuser",
124-
"password": "somepassword",
125-
},
126-
},
127115
{
128116
"id": 432,
129117
"name": "My awesome cluster",
130118
"type": ClusterTypeInModel.ON_PREMISE,
131119
"owner": 12,
132120
"endpoint": "https://registry.osparc-development.fake.dev",
133121
"authentication": {
134-
"type": "simple",
135-
"username": "someuser",
136-
"password": "somepassword",
122+
"type": "tls",
123+
"tls_ca_file": "/path/to/ca_file",
124+
"tls_client_cert": "/path/to/cert_file",
125+
"tls_client_key": "/path/to/key_file",
137126
},
138127
},
139128
{
@@ -143,7 +132,12 @@ class Cluster(BaseCluster):
143132
"type": ClusterTypeInModel.AWS,
144133
"owner": 154,
145134
"endpoint": "https://registry.osparc-development.fake.dev",
146-
"authentication": {"type": "kerberos"},
135+
"authentication": {
136+
"type": "tls",
137+
"tls_ca_file": "/path/to/ca_file",
138+
"tls_client_cert": "/path/to/cert_file",
139+
"tls_client_key": "/path/to/key_file",
140+
},
147141
"access_rights": {
148142
154: CLUSTER_ADMIN_RIGHTS, # type: ignore[dict-item]
149143
12: CLUSTER_MANAGER_RIGHTS, # type: ignore[dict-item]
@@ -158,8 +152,10 @@ class Cluster(BaseCluster):
158152
"owner": 2321,
159153
"endpoint": "https://registry.osparc-development.fake2.dev",
160154
"authentication": {
161-
"type": "jupyterhub",
162-
"api_token": "some_fake_token",
155+
"type": "tls",
156+
"tls_ca_file": "/path/to/ca_file",
157+
"tls_client_cert": "/path/to/cert_file",
158+
"tls_client_key": "/path/to/key_file",
163159
},
164160
"access_rights": {
165161
154: CLUSTER_ADMIN_RIGHTS, # type: ignore[dict-item]

0 commit comments

Comments
 (0)