diff --git a/README.md b/README.md index 2adaf2a..f7329b9 100644 --- a/README.md +++ b/README.md @@ -41,7 +41,7 @@ from garage_admin_sdk.apis import * from garage_admin_sdk.models import * configuration = garage_admin_sdk.Configuration( - host = "http://localhost:3903/v0", + host = "http://localhost:3903/v1", access_token = "s3cr3t" ) @@ -108,9 +108,9 @@ npm install --save git+https://git.deuxfleurs.fr/garage-sdk/garage-admin-sdk-js. A short example: ```javascript -const garage = require('garage_administration_api_v0garage_v0_8_0'); +const garage = require('garage_administration_api_v1garage_v0_9_0'); -const api = new garage.ApiClient("http://127.0.0.1:3903/v0"); +const api = new garage.ApiClient("http://127.0.0.1:3903/v1"); api.authentications['bearerAuth'].accessToken = "s3cr3t"; const [node, layout, key, bucket] = [ diff --git a/build.gradle b/build.gradle index 4114582..27f8048 100644 --- a/build.gradle +++ b/build.gradle @@ -16,7 +16,7 @@ task buildPythonClient(type: org.openapitools.generator.gradle.plugin.tasks.Gene gitRepoId = "garage-admin-sdk-python" configOptions = [ packageName: "garage_admin_sdk", - packageVersion: "0.8.0", + packageVersion: "0.9.0", projectName: "garage-admin-sdk-python" ] } @@ -30,7 +30,7 @@ task buildGoClient(type: org.openapitools.generator.gradle.plugin.tasks.Generate gitRepoId = "garage-admin-sdk-golang" configOptions = [ packageName: "garage", - packageVersion: "0.8.0" + packageVersion: "0.9.0" ] } @@ -46,7 +46,7 @@ task buildJavascriptClient(type: org.openapitools.generator.gradle.plugin.tasks. moduleName: "garage", npmName: "garage-admin-sdk-js", npmRepository: "@dxflrs/garage-admin-sdk-js", - packageVersion: "0.8.0", + packageVersion: "0.9.0", usePromises: "true", ] } diff --git a/example/python/configure_single_node.py b/example/python/configure_single_node.py index f9bb0d3..1a06b09 100644 --- a/example/python/configure_single_node.py +++ b/example/python/configure_single_node.py @@ -3,7 +3,7 @@ from garage_admin_sdk.apis import * from garage_admin_sdk.models import * configuration = garage_admin_sdk.Configuration( - host = "http://localhost:3903/v0", + host = "http://localhost:3903/v1", access_token = "s3cr3t" ) @@ -25,13 +25,14 @@ with garage_admin_sdk.ApiClient(configuration) as api_client: exit(1) print("it seems to be a fresh node, continuing the configuration") - layout.add_layout({ - status.node: NodeClusterInfo( + layout.add_layout([ + NodeRoleChange( + id = status.node, zone = "dc1", - capacity = 1, + capacity = 1000000000, tags = [ "dev" ], ) - }) + ]) print("added myself to the layout") current = layout.get_layout() @@ -63,7 +64,7 @@ with garage_admin_sdk.ApiClient(configuration) as api_client: print(f"key {kinfo.access_key_id} can now create buckets") # update key info - kinfo = keys.search_key("openapi") + kinfo = keys.search_key("openapi", show_secret_key=True) print(f"key permissions: {kinfo.permissions}") # ---- THE END --- diff --git a/example/python/requirements.txt b/example/python/requirements.txt index 3bd33b2..61267bb 100644 --- a/example/python/requirements.txt +++ b/example/python/requirements.txt @@ -1 +1 @@ -git+https://git.deuxfleurs.fr/garage-sdk/garage-admin-sdk-python@f48df53 +git+https://git.deuxfleurs.fr/garage-sdk/garage-admin-sdk-python@715450cfe6 diff --git a/example/python/short.py b/example/python/short.py index 9c82253..058175e 100644 --- a/example/python/short.py +++ b/example/python/short.py @@ -3,7 +3,7 @@ from garage_admin_sdk.apis import * from garage_admin_sdk.models import * configuration = garage_admin_sdk.Configuration( - host = "http://localhost:3903/v0", + host = "http://localhost:3903/v1", access_token = "s3cr3t" ) @@ -17,13 +17,14 @@ print(f"running garage {status.garage_version}, node_id {status.node}") # Change layout of this node current = layout.get_layout() -layout.add_layout({ - status.node: NodeClusterInfo( +layout.add_layout([ + NodeRoleChange( + id = status.node, zone = "dc1", - capacity = 1, + capacity = 1000000000, tags = [ "dev" ], ) -}) +]) layout.apply_layout(LayoutVersion( version = current.version + 1 ))