diff --git a/.github/workflows/workflow-test.yml b/.github/workflows/workflow-test.yml index 3816fca..5550867 100644 --- a/.github/workflows/workflow-test.yml +++ b/.github/workflows/workflow-test.yml @@ -13,11 +13,13 @@ jobs: uses: actions/setup-python@v4 with: python-version: "3.x" + - name: Gen Swagger File + run: python3 tools/swaggerfix.py - name: Run Swagger Codegen uses: ./.github/actions/swagger-codegen with: output: out - input: swagger/public.swagger.json + input: fix.swagger.json action: generate - name: Copy files run: | diff --git a/.github/workflows/workflow.yml b/.github/workflows/workflow.yml index 3e0ada5..423c13b 100644 --- a/.github/workflows/workflow.yml +++ b/.github/workflows/workflow.yml @@ -13,11 +13,13 @@ jobs: uses: actions/setup-python@v4 with: python-version: "3.x" + - name: Gen Swagger File + run: python3 tools/swaggerfix.py - name: Run Swagger Codegen uses: ./.github/actions/swagger-codegen with: output: out - input: swagger/public.swagger.json + input: fix.swagger.json action: generate - name: Copy files run: | diff --git a/codegen.sh b/codegen.sh index 6bf9f11..5a02d7e 100755 --- a/codegen.sh +++ b/codegen.sh @@ -1,10 +1,13 @@ +python3 tools/swaggerfix.py + rm -rf src rm -rf swagger-codegen git clone https://github.com/swagger-api/swagger-codegen -cp swagger/public.swagger.json swagger-codegen +mv fix.swagger.json swagger-codegen + cd swagger-codegen ./run-in-docker.sh mvn package -./run-in-docker.sh generate -i public.swagger.json \ +./run-in-docker.sh generate -i fix.swagger.json \ -l python -o /gen/out -DpackageName=src.cudo_compute cd .. cp swagger-codegen/out/README.md docs diff --git a/docs/README.md b/docs/README.md index de368ff..0c914db 100644 --- a/docs/README.md +++ b/docs/README.md @@ -180,6 +180,10 @@ Class | Method | HTTP request | Description ## Documentation For Models + - [ActivateBody](docs/ActivateBody.md) + - [AddBillingAccountUserPermissionBody](docs/AddBillingAccountUserPermissionBody.md) + - [AddDataCenterUserPermissionBody](docs/AddDataCenterUserPermissionBody.md) + - [AddProjectUserPermissionBody](docs/AddProjectUserPermissionBody.md) - [Any](docs/Any.md) - [ApiKey](docs/ApiKey.md) - [AttachSecurityGroupResponse](docs/AttachSecurityGroupResponse.md) @@ -189,30 +193,22 @@ Class | Method | HTTP request | Description - [BillingAccountPaymentMethods](docs/BillingAccountPaymentMethods.md) - [BillingAccountSetupIntent](docs/BillingAccountSetupIntent.md) - [BillingAccountSpendRow](docs/BillingAccountSpendRow.md) - - [Body](docs/Body.md) - - [Body1](docs/Body1.md) - - [Body10](docs/Body10.md) - - [Body11](docs/Body11.md) - - [Body12](docs/Body12.md) - - [Body2](docs/Body2.md) - - [Body3](docs/Body3.md) - - [Body4](docs/Body4.md) - - [Body5](docs/Body5.md) - - [Body6](docs/Body6.md) - - [Body7](docs/Body7.md) - - [Body8](docs/Body8.md) - - [Body9](docs/Body9.md) - [Cluster](docs/Cluster.md) - [ConnectVMResponse](docs/ConnectVMResponse.md) - [CountHostsResponse](docs/CountHostsResponse.md) - [CountVMsResponse](docs/CountVMsResponse.md) - [CpuModelCategory](docs/CpuModelCategory.md) - [CreateBillingAccountRequest](docs/CreateBillingAccountRequest.md) + - [CreateDiskSnapshotBody](docs/CreateDiskSnapshotBody.md) - [CreateDiskSnapshotResponse](docs/CreateDiskSnapshotResponse.md) + - [CreateNetworkBody](docs/CreateNetworkBody.md) - [CreateNetworkResponse](docs/CreateNetworkResponse.md) + - [CreateObjectStorageUserBody](docs/CreateObjectStorageUserBody.md) - [CreatePrivateVMImageResponse](docs/CreatePrivateVMImageResponse.md) - [CreateSecurityGroupResponse](docs/CreateSecurityGroupResponse.md) + - [CreateStorageDiskBody](docs/CreateStorageDiskBody.md) - [CreateStorageDiskResponse](docs/CreateStorageDiskResponse.md) + - [CreateVMBody](docs/CreateVMBody.md) - [CreateVMRequestNIC](docs/CreateVMRequestNIC.md) - [CreateVMResponse](docs/CreateVMResponse.md) - [DataCenter](docs/DataCenter.md) @@ -300,6 +296,9 @@ Class | Method | HTTP request | Description - [RebootVMResponse](docs/RebootVMResponse.md) - [Region](docs/Region.md) - [RemoveBillingAccountPaymentMethodResponse](docs/RemoveBillingAccountPaymentMethodResponse.md) + - [RemoveBillingAccountUserPermissionBody](docs/RemoveBillingAccountUserPermissionBody.md) + - [RemoveDataCenterUserPermissionBody](docs/RemoveDataCenterUserPermissionBody.md) + - [RemoveProjectUserPermissionBody](docs/RemoveProjectUserPermissionBody.md) - [ResizeVMDiskResponse](docs/ResizeVMDiskResponse.md) - [ResizeVMResponse](docs/ResizeVMResponse.md) - [RevertDiskResponse](docs/RevertDiskResponse.md) @@ -322,6 +321,7 @@ Class | Method | HTTP request | Description - [TaxId](docs/TaxId.md) - [TerminateVMResponse](docs/TerminateVMResponse.md) - [Unit](docs/Unit.md) + - [UpdateBillingAccountBody](docs/UpdateBillingAccountBody.md) - [UpdatePrivateVMImageResponse](docs/UpdatePrivateVMImageResponse.md) - [UpdateSecurityGroupResponse](docs/UpdateSecurityGroupResponse.md) - [UpdateVMMetadataResponse](docs/UpdateVMMetadataResponse.md) diff --git a/docs/docs/APIKeysApi.md b/docs/docs/APIKeysApi.md index 2078938..d449911 100644 --- a/docs/docs/APIKeysApi.md +++ b/docs/docs/APIKeysApi.md @@ -58,7 +58,7 @@ No authorization required [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **generate_api_key** -> ApiKey generate_api_key(body) +> ApiKey generate_api_key(generate_api_key_body) Generate @@ -74,11 +74,11 @@ from pprint import pprint # create an instance of the API class api_instance = src.cudo_compute.APIKeysApi() -body = src.cudo_compute.GenerateApiKeyRequest() # GenerateApiKeyRequest | +generate_api_key_body = src.cudo_compute.GenerateApiKeyRequest() # GenerateApiKeyRequest | try: # Generate - api_response = api_instance.generate_api_key(body) + api_response = api_instance.generate_api_key(generate_api_key_body) pprint(api_response) except ApiException as e: print("Exception when calling APIKeysApi->generate_api_key: %s\n" % e) @@ -88,7 +88,7 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **body** | [**GenerateApiKeyRequest**](GenerateApiKeyRequest.md)| | + **generate_api_key_body** | [**GenerateApiKeyRequest**](GenerateApiKeyRequest.md)| | ### Return type diff --git a/docs/docs/Body9.md b/docs/docs/ActivateBody.md similarity index 95% rename from docs/docs/Body9.md rename to docs/docs/ActivateBody.md index f5a88f8..11d4dcb 100644 --- a/docs/docs/Body9.md +++ b/docs/docs/ActivateBody.md @@ -1,4 +1,4 @@ -# Body9 +# ActivateBody ## Properties Name | Type | Description | Notes diff --git a/docs/docs/Body1.md b/docs/docs/AddBillingAccountUserPermissionBody.md similarity index 91% rename from docs/docs/Body1.md rename to docs/docs/AddBillingAccountUserPermissionBody.md index 612e4b5..ec3d0d5 100644 --- a/docs/docs/Body1.md +++ b/docs/docs/AddBillingAccountUserPermissionBody.md @@ -1,4 +1,4 @@ -# Body1 +# AddBillingAccountUserPermissionBody ## Properties Name | Type | Description | Notes diff --git a/docs/docs/Body3.md b/docs/docs/AddDataCenterUserPermissionBody.md similarity index 92% rename from docs/docs/Body3.md rename to docs/docs/AddDataCenterUserPermissionBody.md index 411c499..b9a96eb 100644 --- a/docs/docs/Body3.md +++ b/docs/docs/AddDataCenterUserPermissionBody.md @@ -1,4 +1,4 @@ -# Body3 +# AddDataCenterUserPermissionBody ## Properties Name | Type | Description | Notes diff --git a/docs/docs/Body5.md b/docs/docs/AddProjectUserPermissionBody.md similarity index 93% rename from docs/docs/Body5.md rename to docs/docs/AddProjectUserPermissionBody.md index 795809b..6914fc9 100644 --- a/docs/docs/Body5.md +++ b/docs/docs/AddProjectUserPermissionBody.md @@ -1,4 +1,4 @@ -# Body5 +# AddProjectUserPermissionBody ## Properties Name | Type | Description | Notes diff --git a/docs/docs/BillingApi.md b/docs/docs/BillingApi.md index 094e7f9..c564b24 100644 --- a/docs/docs/BillingApi.md +++ b/docs/docs/BillingApi.md @@ -20,7 +20,7 @@ Method | HTTP request | Description # **create_billing_account** -> BillingAccount create_billing_account(body) +> BillingAccount create_billing_account(create_billing_account_body) Create a billing account @@ -34,11 +34,11 @@ from pprint import pprint # create an instance of the API class api_instance = src.cudo_compute.BillingApi() -body = src.cudo_compute.CreateBillingAccountRequest() # CreateBillingAccountRequest | +create_billing_account_body = src.cudo_compute.CreateBillingAccountRequest() # CreateBillingAccountRequest | try: # Create a billing account - api_response = api_instance.create_billing_account(body) + api_response = api_instance.create_billing_account(create_billing_account_body) pprint(api_response) except ApiException as e: print("Exception when calling BillingApi->create_billing_account: %s\n" % e) @@ -48,7 +48,7 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **body** | [**CreateBillingAccountRequest**](CreateBillingAccountRequest.md)| | + **create_billing_account_body** | [**CreateBillingAccountRequest**](CreateBillingAccountRequest.md)| | ### Return type @@ -584,7 +584,7 @@ No authorization required [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **update_billing_account** -> BillingAccount update_billing_account(billing_account_id, body) +> BillingAccount update_billing_account(billing_account_id, update_billing_account_body) Update billing account @@ -599,11 +599,11 @@ from pprint import pprint # create an instance of the API class api_instance = src.cudo_compute.BillingApi() billing_account_id = 'billing_account_id_example' # str | -body = src.cudo_compute.Body() # Body | +update_billing_account_body = src.cudo_compute.UpdateBillingAccountBody() # UpdateBillingAccountBody | try: # Update billing account - api_response = api_instance.update_billing_account(billing_account_id, body) + api_response = api_instance.update_billing_account(billing_account_id, update_billing_account_body) pprint(api_response) except ApiException as e: print("Exception when calling BillingApi->update_billing_account: %s\n" % e) @@ -614,7 +614,7 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **billing_account_id** | **str**| | - **body** | [**Body**](Body.md)| | + **update_billing_account_body** | [**UpdateBillingAccountBody**](UpdateBillingAccountBody.md)| | ### Return type diff --git a/docs/docs/Body7.md b/docs/docs/CreateDiskSnapshotBody.md similarity index 93% rename from docs/docs/Body7.md rename to docs/docs/CreateDiskSnapshotBody.md index 266db73..2dc139e 100644 --- a/docs/docs/Body7.md +++ b/docs/docs/CreateDiskSnapshotBody.md @@ -1,4 +1,4 @@ -# Body7 +# CreateDiskSnapshotBody ## Properties Name | Type | Description | Notes diff --git a/docs/docs/Body8.md b/docs/docs/CreateNetworkBody.md similarity index 95% rename from docs/docs/Body8.md rename to docs/docs/CreateNetworkBody.md index b15ce13..7b07b37 100644 --- a/docs/docs/Body8.md +++ b/docs/docs/CreateNetworkBody.md @@ -1,4 +1,4 @@ -# Body8 +# CreateNetworkBody ## Properties Name | Type | Description | Notes diff --git a/docs/docs/Body10.md b/docs/docs/CreateObjectStorageUserBody.md similarity index 91% rename from docs/docs/Body10.md rename to docs/docs/CreateObjectStorageUserBody.md index 5cac263..b12d10f 100644 --- a/docs/docs/Body10.md +++ b/docs/docs/CreateObjectStorageUserBody.md @@ -1,4 +1,4 @@ -# Body10 +# CreateObjectStorageUserBody ## Properties Name | Type | Description | Notes diff --git a/docs/docs/Body6.md b/docs/docs/CreateStorageDiskBody.md similarity index 93% rename from docs/docs/Body6.md rename to docs/docs/CreateStorageDiskBody.md index 4503646..c39f085 100644 --- a/docs/docs/Body6.md +++ b/docs/docs/CreateStorageDiskBody.md @@ -1,4 +1,4 @@ -# Body6 +# CreateStorageDiskBody ## Properties Name | Type | Description | Notes diff --git a/docs/docs/Body12.md b/docs/docs/CreateVMBody.md similarity index 98% rename from docs/docs/Body12.md rename to docs/docs/CreateVMBody.md index d70fa1b..ecff403 100644 --- a/docs/docs/Body12.md +++ b/docs/docs/CreateVMBody.md @@ -1,4 +1,4 @@ -# Body12 +# CreateVMBody ## Properties Name | Type | Description | Notes diff --git a/docs/docs/DisksApi.md b/docs/docs/DisksApi.md index 5e3abc1..a42eb5f 100644 --- a/docs/docs/DisksApi.md +++ b/docs/docs/DisksApi.md @@ -67,7 +67,7 @@ No authorization required [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **create_disk_snapshot** -> CreateDiskSnapshotResponse create_disk_snapshot(project_id, id, body) +> CreateDiskSnapshotResponse create_disk_snapshot(project_id, id, create_disk_snapshot_body) Create Disk Snapshot @@ -83,11 +83,11 @@ from pprint import pprint api_instance = src.cudo_compute.DisksApi() project_id = 'project_id_example' # str | id = 'id_example' # str | -body = src.cudo_compute.Body7() # Body7 | +create_disk_snapshot_body = src.cudo_compute.CreateDiskSnapshotBody() # CreateDiskSnapshotBody | try: # Create Disk Snapshot - api_response = api_instance.create_disk_snapshot(project_id, id, body) + api_response = api_instance.create_disk_snapshot(project_id, id, create_disk_snapshot_body) pprint(api_response) except ApiException as e: print("Exception when calling DisksApi->create_disk_snapshot: %s\n" % e) @@ -99,7 +99,7 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **project_id** | **str**| | **id** | **str**| | - **body** | [**Body7**](Body7.md)| | + **create_disk_snapshot_body** | [**CreateDiskSnapshotBody**](CreateDiskSnapshotBody.md)| | ### Return type @@ -117,7 +117,7 @@ No authorization required [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **create_storage_disk** -> CreateStorageDiskResponse create_storage_disk(project_id, body) +> CreateStorageDiskResponse create_storage_disk(project_id, create_storage_disk_body) Create storage disk @@ -132,11 +132,11 @@ from pprint import pprint # create an instance of the API class api_instance = src.cudo_compute.DisksApi() project_id = 'project_id_example' # str | -body = src.cudo_compute.Body6() # Body6 | +create_storage_disk_body = src.cudo_compute.CreateStorageDiskBody() # CreateStorageDiskBody | try: # Create storage disk - api_response = api_instance.create_storage_disk(project_id, body) + api_response = api_instance.create_storage_disk(project_id, create_storage_disk_body) pprint(api_response) except ApiException as e: print("Exception when calling DisksApi->create_storage_disk: %s\n" % e) @@ -147,7 +147,7 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **project_id** | **str**| | - **body** | [**Body6**](Body6.md)| | + **create_storage_disk_body** | [**CreateStorageDiskBody**](CreateStorageDiskBody.md)| | ### Return type diff --git a/docs/docs/NetworksApi.md b/docs/docs/NetworksApi.md index 1d66ca5..0db3b20 100644 --- a/docs/docs/NetworksApi.md +++ b/docs/docs/NetworksApi.md @@ -18,7 +18,7 @@ Method | HTTP request | Description # **create_network** -> CreateNetworkResponse create_network(project_id, body) +> CreateNetworkResponse create_network(project_id, create_network_body) Create network @@ -33,11 +33,11 @@ from pprint import pprint # create an instance of the API class api_instance = src.cudo_compute.NetworksApi() project_id = 'project_id_example' # str | -body = src.cudo_compute.Body8() # Body8 | +create_network_body = src.cudo_compute.CreateNetworkBody() # CreateNetworkBody | try: # Create network - api_response = api_instance.create_network(project_id, body) + api_response = api_instance.create_network(project_id, create_network_body) pprint(api_response) except ApiException as e: print("Exception when calling NetworksApi->create_network: %s\n" % e) @@ -48,7 +48,7 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **project_id** | **str**| | - **body** | [**Body8**](Body8.md)| | + **create_network_body** | [**CreateNetworkBody**](CreateNetworkBody.md)| | ### Return type diff --git a/docs/docs/ObjectStorageApi.md b/docs/docs/ObjectStorageApi.md index 8c1aa61..05ac69e 100644 --- a/docs/docs/ObjectStorageApi.md +++ b/docs/docs/ObjectStorageApi.md @@ -17,7 +17,7 @@ Method | HTTP request | Description # **activate** -> object activate(project_id, body) +> object activate(project_id, activate_body) Allow the use of S3 compatible storage in a project @@ -32,11 +32,11 @@ from pprint import pprint # create an instance of the API class api_instance = src.cudo_compute.ObjectStorageApi() project_id = 'project_id_example' # str | -body = src.cudo_compute.Body9() # Body9 | +activate_body = src.cudo_compute.ActivateBody() # ActivateBody | try: # Allow the use of S3 compatible storage in a project - api_response = api_instance.activate(project_id, body) + api_response = api_instance.activate(project_id, activate_body) pprint(api_response) except ApiException as e: print("Exception when calling ObjectStorageApi->activate: %s\n" % e) @@ -47,7 +47,7 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **project_id** | **str**| | - **body** | [**Body9**](Body9.md)| | + **activate_body** | [**ActivateBody**](ActivateBody.md)| | ### Return type @@ -65,7 +65,7 @@ No authorization required [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **create_object_storage_user** -> ObjectStorageUser create_object_storage_user(project_id, body) +> ObjectStorageUser create_object_storage_user(project_id, create_object_storage_user_body) Create user that stores keys for storage buckets @@ -80,11 +80,11 @@ from pprint import pprint # create an instance of the API class api_instance = src.cudo_compute.ObjectStorageApi() project_id = 'project_id_example' # str | -body = src.cudo_compute.Body10() # Body10 | +create_object_storage_user_body = src.cudo_compute.CreateObjectStorageUserBody() # CreateObjectStorageUserBody | try: # Create user that stores keys for storage buckets - api_response = api_instance.create_object_storage_user(project_id, body) + api_response = api_instance.create_object_storage_user(project_id, create_object_storage_user_body) pprint(api_response) except ApiException as e: print("Exception when calling ObjectStorageApi->create_object_storage_user: %s\n" % e) @@ -95,7 +95,7 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **project_id** | **str**| | - **body** | [**Body10**](Body10.md)| | + **create_object_storage_user_body** | [**CreateObjectStorageUserBody**](CreateObjectStorageUserBody.md)| | ### Return type @@ -211,7 +211,7 @@ No authorization required [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **generate_object_storage_key** -> ObjectStorageKey generate_object_storage_key(project_id, id, body) +> ObjectStorageKey generate_object_storage_key(project_id, id, generate_object_storage_key_body) Generate access key for storage buckets @@ -227,11 +227,11 @@ from pprint import pprint api_instance = src.cudo_compute.ObjectStorageApi() project_id = 'project_id_example' # str | id = 'id_example' # str | -body = NULL # object | +generate_object_storage_key_body = NULL # object | try: # Generate access key for storage buckets - api_response = api_instance.generate_object_storage_key(project_id, id, body) + api_response = api_instance.generate_object_storage_key(project_id, id, generate_object_storage_key_body) pprint(api_response) except ApiException as e: print("Exception when calling ObjectStorageApi->generate_object_storage_key: %s\n" % e) @@ -243,7 +243,7 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **project_id** | **str**| | **id** | **str**| | - **body** | **object**| | + **generate_object_storage_key_body** | **object**| | ### Return type diff --git a/docs/docs/PermissionsApi.md b/docs/docs/PermissionsApi.md index ead240e..d81d7b9 100644 --- a/docs/docs/PermissionsApi.md +++ b/docs/docs/PermissionsApi.md @@ -14,7 +14,7 @@ Method | HTTP request | Description # **add_billing_account_user_permission** -> object add_billing_account_user_permission(billing_account_id, body) +> object add_billing_account_user_permission(billing_account_id, add_billing_account_user_permission_body) Add billing account user @@ -29,11 +29,11 @@ from pprint import pprint # create an instance of the API class api_instance = src.cudo_compute.PermissionsApi() billing_account_id = 'billing_account_id_example' # str | -body = src.cudo_compute.Body1() # Body1 | +add_billing_account_user_permission_body = src.cudo_compute.AddBillingAccountUserPermissionBody() # AddBillingAccountUserPermissionBody | try: # Add billing account user - api_response = api_instance.add_billing_account_user_permission(billing_account_id, body) + api_response = api_instance.add_billing_account_user_permission(billing_account_id, add_billing_account_user_permission_body) pprint(api_response) except ApiException as e: print("Exception when calling PermissionsApi->add_billing_account_user_permission: %s\n" % e) @@ -44,7 +44,7 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **billing_account_id** | **str**| | - **body** | [**Body1**](Body1.md)| | + **add_billing_account_user_permission_body** | [**AddBillingAccountUserPermissionBody**](AddBillingAccountUserPermissionBody.md)| | ### Return type @@ -62,7 +62,7 @@ No authorization required [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **add_data_center_user_permission** -> object add_data_center_user_permission(data_center_id, body) +> object add_data_center_user_permission(data_center_id, add_data_center_user_permission_body) Add data center user @@ -77,11 +77,11 @@ from pprint import pprint # create an instance of the API class api_instance = src.cudo_compute.PermissionsApi() data_center_id = 'data_center_id_example' # str | -body = src.cudo_compute.Body3() # Body3 | +add_data_center_user_permission_body = src.cudo_compute.AddDataCenterUserPermissionBody() # AddDataCenterUserPermissionBody | try: # Add data center user - api_response = api_instance.add_data_center_user_permission(data_center_id, body) + api_response = api_instance.add_data_center_user_permission(data_center_id, add_data_center_user_permission_body) pprint(api_response) except ApiException as e: print("Exception when calling PermissionsApi->add_data_center_user_permission: %s\n" % e) @@ -92,7 +92,7 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **data_center_id** | **str**| | - **body** | [**Body3**](Body3.md)| | + **add_data_center_user_permission_body** | [**AddDataCenterUserPermissionBody**](AddDataCenterUserPermissionBody.md)| | ### Return type @@ -110,7 +110,7 @@ No authorization required [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **add_project_user_permission** -> object add_project_user_permission(project_id, body) +> object add_project_user_permission(project_id, add_project_user_permission_body) Add project user @@ -125,11 +125,11 @@ from pprint import pprint # create an instance of the API class api_instance = src.cudo_compute.PermissionsApi() project_id = 'project_id_example' # str | -body = src.cudo_compute.Body5() # Body5 | +add_project_user_permission_body = src.cudo_compute.AddProjectUserPermissionBody() # AddProjectUserPermissionBody | try: # Add project user - api_response = api_instance.add_project_user_permission(project_id, body) + api_response = api_instance.add_project_user_permission(project_id, add_project_user_permission_body) pprint(api_response) except ApiException as e: print("Exception when calling PermissionsApi->add_project_user_permission: %s\n" % e) @@ -140,7 +140,7 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **project_id** | **str**| | - **body** | [**Body5**](Body5.md)| | + **add_project_user_permission_body** | [**AddProjectUserPermissionBody**](AddProjectUserPermissionBody.md)| | ### Return type @@ -208,7 +208,7 @@ No authorization required [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **remove_billing_account_user_permission** -> object remove_billing_account_user_permission(billing_account_id, body) +> object remove_billing_account_user_permission(billing_account_id, remove_billing_account_user_permission_body) Remove billing account user @@ -223,11 +223,11 @@ from pprint import pprint # create an instance of the API class api_instance = src.cudo_compute.PermissionsApi() billing_account_id = 'billing_account_id_example' # str | -body = src.cudo_compute.Body2() # Body2 | +remove_billing_account_user_permission_body = src.cudo_compute.RemoveBillingAccountUserPermissionBody() # RemoveBillingAccountUserPermissionBody | try: # Remove billing account user - api_response = api_instance.remove_billing_account_user_permission(billing_account_id, body) + api_response = api_instance.remove_billing_account_user_permission(billing_account_id, remove_billing_account_user_permission_body) pprint(api_response) except ApiException as e: print("Exception when calling PermissionsApi->remove_billing_account_user_permission: %s\n" % e) @@ -238,7 +238,7 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **billing_account_id** | **str**| | - **body** | [**Body2**](Body2.md)| | + **remove_billing_account_user_permission_body** | [**RemoveBillingAccountUserPermissionBody**](RemoveBillingAccountUserPermissionBody.md)| | ### Return type @@ -256,7 +256,7 @@ No authorization required [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **remove_data_center_user_permission** -> object remove_data_center_user_permission(data_center_id, body) +> object remove_data_center_user_permission(data_center_id, remove_data_center_user_permission_body) Remove data center user @@ -271,11 +271,11 @@ from pprint import pprint # create an instance of the API class api_instance = src.cudo_compute.PermissionsApi() data_center_id = 'data_center_id_example' # str | -body = src.cudo_compute.Body4() # Body4 | +remove_data_center_user_permission_body = src.cudo_compute.RemoveDataCenterUserPermissionBody() # RemoveDataCenterUserPermissionBody | try: # Remove data center user - api_response = api_instance.remove_data_center_user_permission(data_center_id, body) + api_response = api_instance.remove_data_center_user_permission(data_center_id, remove_data_center_user_permission_body) pprint(api_response) except ApiException as e: print("Exception when calling PermissionsApi->remove_data_center_user_permission: %s\n" % e) @@ -286,7 +286,7 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **data_center_id** | **str**| | - **body** | [**Body4**](Body4.md)| | + **remove_data_center_user_permission_body** | [**RemoveDataCenterUserPermissionBody**](RemoveDataCenterUserPermissionBody.md)| | ### Return type @@ -304,7 +304,7 @@ No authorization required [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **remove_project_user_permission** -> object remove_project_user_permission(project_id, body) +> object remove_project_user_permission(project_id, remove_project_user_permission_body) Remove project user @@ -319,11 +319,11 @@ from pprint import pprint # create an instance of the API class api_instance = src.cudo_compute.PermissionsApi() project_id = 'project_id_example' # str | -body = src.cudo_compute.Body11() # Body11 | +remove_project_user_permission_body = src.cudo_compute.RemoveProjectUserPermissionBody() # RemoveProjectUserPermissionBody | try: # Remove project user - api_response = api_instance.remove_project_user_permission(project_id, body) + api_response = api_instance.remove_project_user_permission(project_id, remove_project_user_permission_body) pprint(api_response) except ApiException as e: print("Exception when calling PermissionsApi->remove_project_user_permission: %s\n" % e) @@ -334,7 +334,7 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **project_id** | **str**| | - **body** | [**Body11**](Body11.md)| | + **remove_project_user_permission_body** | [**RemoveProjectUserPermissionBody**](RemoveProjectUserPermissionBody.md)| | ### Return type diff --git a/docs/docs/Body2.md b/docs/docs/RemoveBillingAccountUserPermissionBody.md similarity index 91% rename from docs/docs/Body2.md rename to docs/docs/RemoveBillingAccountUserPermissionBody.md index 1680716..f428199 100644 --- a/docs/docs/Body2.md +++ b/docs/docs/RemoveBillingAccountUserPermissionBody.md @@ -1,4 +1,4 @@ -# Body2 +# RemoveBillingAccountUserPermissionBody ## Properties Name | Type | Description | Notes diff --git a/docs/docs/Body4.md b/docs/docs/RemoveDataCenterUserPermissionBody.md similarity index 92% rename from docs/docs/Body4.md rename to docs/docs/RemoveDataCenterUserPermissionBody.md index c59a3c5..79179cb 100644 --- a/docs/docs/Body4.md +++ b/docs/docs/RemoveDataCenterUserPermissionBody.md @@ -1,4 +1,4 @@ -# Body4 +# RemoveDataCenterUserPermissionBody ## Properties Name | Type | Description | Notes diff --git a/docs/docs/Body11.md b/docs/docs/RemoveProjectUserPermissionBody.md similarity index 92% rename from docs/docs/Body11.md rename to docs/docs/RemoveProjectUserPermissionBody.md index 7f4e303..d7472af 100644 --- a/docs/docs/Body11.md +++ b/docs/docs/RemoveProjectUserPermissionBody.md @@ -1,4 +1,4 @@ -# Body11 +# RemoveProjectUserPermissionBody ## Properties Name | Type | Description | Notes diff --git a/docs/docs/Body.md b/docs/docs/UpdateBillingAccountBody.md similarity index 94% rename from docs/docs/Body.md rename to docs/docs/UpdateBillingAccountBody.md index 799ce79..b068824 100644 --- a/docs/docs/Body.md +++ b/docs/docs/UpdateBillingAccountBody.md @@ -1,4 +1,4 @@ -# Body +# UpdateBillingAccountBody ## Properties Name | Type | Description | Notes diff --git a/docs/docs/VirtualMachinesApi.md b/docs/docs/VirtualMachinesApi.md index 4dbcf4b..56c5e36 100644 --- a/docs/docs/VirtualMachinesApi.md +++ b/docs/docs/VirtualMachinesApi.md @@ -229,7 +229,7 @@ No authorization required [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **create_vm** -> CreateVMResponse create_vm(project_id, body) +> CreateVMResponse create_vm(project_id, create_vm_body) Create virtual machine @@ -244,11 +244,11 @@ from pprint import pprint # create an instance of the API class api_instance = src.cudo_compute.VirtualMachinesApi() project_id = 'project_id_example' # str | -body = src.cudo_compute.Body12() # Body12 | +create_vm_body = src.cudo_compute.CreateVMBody() # CreateVMBody | try: # Create virtual machine - api_response = api_instance.create_vm(project_id, body) + api_response = api_instance.create_vm(project_id, create_vm_body) pprint(api_response) except ApiException as e: print("Exception when calling VirtualMachinesApi->create_vm: %s\n" % e) @@ -259,7 +259,7 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **project_id** | **str**| | - **body** | [**Body12**](Body12.md)| | + **create_vm_body** | [**CreateVMBody**](CreateVMBody.md)| | ### Return type diff --git a/docs/src/cudo_compute/__init__.py b/docs/src/cudo_compute/__init__.py index 58f57c9..572a03c 100644 --- a/docs/src/cudo_compute/__init__.py +++ b/docs/src/cudo_compute/__init__.py @@ -34,6 +34,10 @@ from src.cudo_compute.api_client import ApiClient from src.cudo_compute.configuration import Configuration # import models into sdk package +from src.cudo_compute.models.activate_body import ActivateBody +from src.cudo_compute.models.add_billing_account_user_permission_body import AddBillingAccountUserPermissionBody +from src.cudo_compute.models.add_data_center_user_permission_body import AddDataCenterUserPermissionBody +from src.cudo_compute.models.add_project_user_permission_body import AddProjectUserPermissionBody from src.cudo_compute.models.any import Any from src.cudo_compute.models.api_key import ApiKey from src.cudo_compute.models.attach_security_group_response import AttachSecurityGroupResponse @@ -43,30 +47,22 @@ from src.cudo_compute.models.billing_account_payment_methods import BillingAccountPaymentMethods from src.cudo_compute.models.billing_account_setup_intent import BillingAccountSetupIntent from src.cudo_compute.models.billing_account_spend_row import BillingAccountSpendRow -from src.cudo_compute.models.body import Body -from src.cudo_compute.models.body1 import Body1 -from src.cudo_compute.models.body10 import Body10 -from src.cudo_compute.models.body11 import Body11 -from src.cudo_compute.models.body12 import Body12 -from src.cudo_compute.models.body2 import Body2 -from src.cudo_compute.models.body3 import Body3 -from src.cudo_compute.models.body4 import Body4 -from src.cudo_compute.models.body5 import Body5 -from src.cudo_compute.models.body6 import Body6 -from src.cudo_compute.models.body7 import Body7 -from src.cudo_compute.models.body8 import Body8 -from src.cudo_compute.models.body9 import Body9 from src.cudo_compute.models.cluster import Cluster from src.cudo_compute.models.connect_vm_response import ConnectVMResponse from src.cudo_compute.models.count_hosts_response import CountHostsResponse from src.cudo_compute.models.count_vms_response import CountVMsResponse from src.cudo_compute.models.cpu_model_category import CpuModelCategory from src.cudo_compute.models.create_billing_account_request import CreateBillingAccountRequest +from src.cudo_compute.models.create_disk_snapshot_body import CreateDiskSnapshotBody from src.cudo_compute.models.create_disk_snapshot_response import CreateDiskSnapshotResponse +from src.cudo_compute.models.create_network_body import CreateNetworkBody from src.cudo_compute.models.create_network_response import CreateNetworkResponse +from src.cudo_compute.models.create_object_storage_user_body import CreateObjectStorageUserBody from src.cudo_compute.models.create_private_vm_image_response import CreatePrivateVMImageResponse from src.cudo_compute.models.create_security_group_response import CreateSecurityGroupResponse +from src.cudo_compute.models.create_storage_disk_body import CreateStorageDiskBody from src.cudo_compute.models.create_storage_disk_response import CreateStorageDiskResponse +from src.cudo_compute.models.create_vm_body import CreateVMBody from src.cudo_compute.models.create_vm_request_nic import CreateVMRequestNIC from src.cudo_compute.models.create_vm_response import CreateVMResponse from src.cudo_compute.models.data_center import DataCenter @@ -154,6 +150,9 @@ from src.cudo_compute.models.reboot_vm_response import RebootVMResponse from src.cudo_compute.models.region import Region from src.cudo_compute.models.remove_billing_account_payment_method_response import RemoveBillingAccountPaymentMethodResponse +from src.cudo_compute.models.remove_billing_account_user_permission_body import RemoveBillingAccountUserPermissionBody +from src.cudo_compute.models.remove_data_center_user_permission_body import RemoveDataCenterUserPermissionBody +from src.cudo_compute.models.remove_project_user_permission_body import RemoveProjectUserPermissionBody from src.cudo_compute.models.resize_vm_disk_response import ResizeVMDiskResponse from src.cudo_compute.models.resize_vm_response import ResizeVMResponse from src.cudo_compute.models.revert_disk_response import RevertDiskResponse @@ -176,6 +175,7 @@ from src.cudo_compute.models.tax_id import TaxId from src.cudo_compute.models.terminate_vm_response import TerminateVMResponse from src.cudo_compute.models.unit import Unit +from src.cudo_compute.models.update_billing_account_body import UpdateBillingAccountBody from src.cudo_compute.models.update_private_vm_image_response import UpdatePrivateVMImageResponse from src.cudo_compute.models.update_security_group_response import UpdateSecurityGroupResponse from src.cudo_compute.models.update_vm_metadata_response import UpdateVMMetadataResponse diff --git a/docs/src/cudo_compute/api/api_keys_api.py b/docs/src/cudo_compute/api/api_keys_api.py index 2658738..c33fce9 100644 --- a/docs/src/cudo_compute/api/api_keys_api.py +++ b/docs/src/cudo_compute/api/api_keys_api.py @@ -132,45 +132,45 @@ def delete_api_key_with_http_info(self, name, **kwargs): # noqa: E501 _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def generate_api_key(self, body, **kwargs): # noqa: E501 + def generate_api_key(self, generate_api_key_body, **kwargs): # noqa: E501 """Generate # noqa: E501 Creates a new API key for the requesting user. The API key is returned in the response, and this is the only time it can be viewed. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.generate_api_key(body, async_req=True) + >>> thread = api.generate_api_key(generate_api_key_body, async_req=True) >>> result = thread.get() :param async_req bool - :param GenerateApiKeyRequest body: (required) + :param GenerateApiKeyRequest generate_api_key_body: (required) :return: ApiKey If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): - return self.generate_api_key_with_http_info(body, **kwargs) # noqa: E501 + return self.generate_api_key_with_http_info(generate_api_key_body, **kwargs) # noqa: E501 else: - (data) = self.generate_api_key_with_http_info(body, **kwargs) # noqa: E501 + (data) = self.generate_api_key_with_http_info(generate_api_key_body, **kwargs) # noqa: E501 return data - def generate_api_key_with_http_info(self, body, **kwargs): # noqa: E501 + def generate_api_key_with_http_info(self, generate_api_key_body, **kwargs): # noqa: E501 """Generate # noqa: E501 Creates a new API key for the requesting user. The API key is returned in the response, and this is the only time it can be viewed. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.generate_api_key_with_http_info(body, async_req=True) + >>> thread = api.generate_api_key_with_http_info(generate_api_key_body, async_req=True) >>> result = thread.get() :param async_req bool - :param GenerateApiKeyRequest body: (required) + :param GenerateApiKeyRequest generate_api_key_body: (required) :return: ApiKey If the method is called asynchronously, returns the request thread. """ - all_params = ['body'] # noqa: E501 + all_params = ['generate_api_key_body'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -185,10 +185,10 @@ def generate_api_key_with_http_info(self, body, **kwargs): # noqa: E501 ) params[key] = val del params['kwargs'] - # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in params or - params['body'] is None): # noqa: E501 - raise ValueError("Missing the required parameter `body` when calling `generate_api_key`") # noqa: E501 + # verify the required parameter 'generate_api_key_body' is set + if self.api_client.client_side_validation and ('generate_api_key_body' not in params or + params['generate_api_key_body'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `generate_api_key_body` when calling `generate_api_key`") # noqa: E501 collection_formats = {} @@ -202,8 +202,8 @@ def generate_api_key_with_http_info(self, body, **kwargs): # noqa: E501 local_var_files = {} body_params = None - if 'body' in params: - body_params = params['body'] + if 'generate_api_key_body' in params: + body_params = params['generate_api_key_body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 diff --git a/docs/src/cudo_compute/api/billing_api.py b/docs/src/cudo_compute/api/billing_api.py index 682724f..4d3b947 100644 --- a/docs/src/cudo_compute/api/billing_api.py +++ b/docs/src/cudo_compute/api/billing_api.py @@ -33,43 +33,43 @@ def __init__(self, api_client=None): api_client = ApiClient() self.api_client = api_client - def create_billing_account(self, body, **kwargs): # noqa: E501 + def create_billing_account(self, create_billing_account_body, **kwargs): # noqa: E501 """Create a billing account # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.create_billing_account(body, async_req=True) + >>> thread = api.create_billing_account(create_billing_account_body, async_req=True) >>> result = thread.get() :param async_req bool - :param CreateBillingAccountRequest body: (required) + :param CreateBillingAccountRequest create_billing_account_body: (required) :return: BillingAccount If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): - return self.create_billing_account_with_http_info(body, **kwargs) # noqa: E501 + return self.create_billing_account_with_http_info(create_billing_account_body, **kwargs) # noqa: E501 else: - (data) = self.create_billing_account_with_http_info(body, **kwargs) # noqa: E501 + (data) = self.create_billing_account_with_http_info(create_billing_account_body, **kwargs) # noqa: E501 return data - def create_billing_account_with_http_info(self, body, **kwargs): # noqa: E501 + def create_billing_account_with_http_info(self, create_billing_account_body, **kwargs): # noqa: E501 """Create a billing account # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.create_billing_account_with_http_info(body, async_req=True) + >>> thread = api.create_billing_account_with_http_info(create_billing_account_body, async_req=True) >>> result = thread.get() :param async_req bool - :param CreateBillingAccountRequest body: (required) + :param CreateBillingAccountRequest create_billing_account_body: (required) :return: BillingAccount If the method is called asynchronously, returns the request thread. """ - all_params = ['body'] # noqa: E501 + all_params = ['create_billing_account_body'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -84,10 +84,10 @@ def create_billing_account_with_http_info(self, body, **kwargs): # noqa: E501 ) params[key] = val del params['kwargs'] - # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in params or - params['body'] is None): # noqa: E501 - raise ValueError("Missing the required parameter `body` when calling `create_billing_account`") # noqa: E501 + # verify the required parameter 'create_billing_account_body' is set + if self.api_client.client_side_validation and ('create_billing_account_body' not in params or + params['create_billing_account_body'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `create_billing_account_body` when calling `create_billing_account`") # noqa: E501 collection_formats = {} @@ -101,8 +101,8 @@ def create_billing_account_with_http_info(self, body, **kwargs): # noqa: E501 local_var_files = {} body_params = None - if 'body' in params: - body_params = params['body'] + if 'create_billing_account_body' in params: + body_params = params['create_billing_account_body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 @@ -1233,45 +1233,45 @@ def set_billing_account_default_payment_method_with_http_info(self, id, payment_ _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def update_billing_account(self, billing_account_id, body, **kwargs): # noqa: E501 + def update_billing_account(self, billing_account_id, update_billing_account_body, **kwargs): # noqa: E501 """Update billing account # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.update_billing_account(billing_account_id, body, async_req=True) + >>> thread = api.update_billing_account(billing_account_id, update_billing_account_body, async_req=True) >>> result = thread.get() :param async_req bool :param str billing_account_id: (required) - :param Body body: (required) + :param UpdateBillingAccountBody update_billing_account_body: (required) :return: BillingAccount If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): - return self.update_billing_account_with_http_info(billing_account_id, body, **kwargs) # noqa: E501 + return self.update_billing_account_with_http_info(billing_account_id, update_billing_account_body, **kwargs) # noqa: E501 else: - (data) = self.update_billing_account_with_http_info(billing_account_id, body, **kwargs) # noqa: E501 + (data) = self.update_billing_account_with_http_info(billing_account_id, update_billing_account_body, **kwargs) # noqa: E501 return data - def update_billing_account_with_http_info(self, billing_account_id, body, **kwargs): # noqa: E501 + def update_billing_account_with_http_info(self, billing_account_id, update_billing_account_body, **kwargs): # noqa: E501 """Update billing account # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.update_billing_account_with_http_info(billing_account_id, body, async_req=True) + >>> thread = api.update_billing_account_with_http_info(billing_account_id, update_billing_account_body, async_req=True) >>> result = thread.get() :param async_req bool :param str billing_account_id: (required) - :param Body body: (required) + :param UpdateBillingAccountBody update_billing_account_body: (required) :return: BillingAccount If the method is called asynchronously, returns the request thread. """ - all_params = ['billing_account_id', 'body'] # noqa: E501 + all_params = ['billing_account_id', 'update_billing_account_body'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -1290,10 +1290,10 @@ def update_billing_account_with_http_info(self, billing_account_id, body, **kwar if self.api_client.client_side_validation and ('billing_account_id' not in params or params['billing_account_id'] is None): # noqa: E501 raise ValueError("Missing the required parameter `billing_account_id` when calling `update_billing_account`") # noqa: E501 - # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in params or - params['body'] is None): # noqa: E501 - raise ValueError("Missing the required parameter `body` when calling `update_billing_account`") # noqa: E501 + # verify the required parameter 'update_billing_account_body' is set + if self.api_client.client_side_validation and ('update_billing_account_body' not in params or + params['update_billing_account_body'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `update_billing_account_body` when calling `update_billing_account`") # noqa: E501 collection_formats = {} @@ -1309,8 +1309,8 @@ def update_billing_account_with_http_info(self, billing_account_id, body, **kwar local_var_files = {} body_params = None - if 'body' in params: - body_params = params['body'] + if 'update_billing_account_body' in params: + body_params = params['update_billing_account_body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 diff --git a/docs/src/cudo_compute/api/disks_api.py b/docs/src/cudo_compute/api/disks_api.py index 9e48bc4..5962c89 100644 --- a/docs/src/cudo_compute/api/disks_api.py +++ b/docs/src/cudo_compute/api/disks_api.py @@ -142,47 +142,47 @@ def attach_storage_disk_with_http_info(self, project_id, id, **kwargs): # noqa: _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def create_disk_snapshot(self, project_id, id, body, **kwargs): # noqa: E501 + def create_disk_snapshot(self, project_id, id, create_disk_snapshot_body, **kwargs): # noqa: E501 """Create Disk Snapshot # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.create_disk_snapshot(project_id, id, body, async_req=True) + >>> thread = api.create_disk_snapshot(project_id, id, create_disk_snapshot_body, async_req=True) >>> result = thread.get() :param async_req bool :param str project_id: (required) :param str id: (required) - :param Body7 body: (required) + :param CreateDiskSnapshotBody create_disk_snapshot_body: (required) :return: CreateDiskSnapshotResponse If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): - return self.create_disk_snapshot_with_http_info(project_id, id, body, **kwargs) # noqa: E501 + return self.create_disk_snapshot_with_http_info(project_id, id, create_disk_snapshot_body, **kwargs) # noqa: E501 else: - (data) = self.create_disk_snapshot_with_http_info(project_id, id, body, **kwargs) # noqa: E501 + (data) = self.create_disk_snapshot_with_http_info(project_id, id, create_disk_snapshot_body, **kwargs) # noqa: E501 return data - def create_disk_snapshot_with_http_info(self, project_id, id, body, **kwargs): # noqa: E501 + def create_disk_snapshot_with_http_info(self, project_id, id, create_disk_snapshot_body, **kwargs): # noqa: E501 """Create Disk Snapshot # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.create_disk_snapshot_with_http_info(project_id, id, body, async_req=True) + >>> thread = api.create_disk_snapshot_with_http_info(project_id, id, create_disk_snapshot_body, async_req=True) >>> result = thread.get() :param async_req bool :param str project_id: (required) :param str id: (required) - :param Body7 body: (required) + :param CreateDiskSnapshotBody create_disk_snapshot_body: (required) :return: CreateDiskSnapshotResponse If the method is called asynchronously, returns the request thread. """ - all_params = ['project_id', 'id', 'body'] # noqa: E501 + all_params = ['project_id', 'id', 'create_disk_snapshot_body'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -205,10 +205,10 @@ def create_disk_snapshot_with_http_info(self, project_id, id, body, **kwargs): if self.api_client.client_side_validation and ('id' not in params or params['id'] is None): # noqa: E501 raise ValueError("Missing the required parameter `id` when calling `create_disk_snapshot`") # noqa: E501 - # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in params or - params['body'] is None): # noqa: E501 - raise ValueError("Missing the required parameter `body` when calling `create_disk_snapshot`") # noqa: E501 + # verify the required parameter 'create_disk_snapshot_body' is set + if self.api_client.client_side_validation and ('create_disk_snapshot_body' not in params or + params['create_disk_snapshot_body'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `create_disk_snapshot_body` when calling `create_disk_snapshot`") # noqa: E501 collection_formats = {} @@ -226,8 +226,8 @@ def create_disk_snapshot_with_http_info(self, project_id, id, body, **kwargs): local_var_files = {} body_params = None - if 'body' in params: - body_params = params['body'] + if 'create_disk_snapshot_body' in params: + body_params = params['create_disk_snapshot_body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 @@ -255,45 +255,45 @@ def create_disk_snapshot_with_http_info(self, project_id, id, body, **kwargs): _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def create_storage_disk(self, project_id, body, **kwargs): # noqa: E501 + def create_storage_disk(self, project_id, create_storage_disk_body, **kwargs): # noqa: E501 """Create storage disk # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.create_storage_disk(project_id, body, async_req=True) + >>> thread = api.create_storage_disk(project_id, create_storage_disk_body, async_req=True) >>> result = thread.get() :param async_req bool :param str project_id: (required) - :param Body6 body: (required) + :param CreateStorageDiskBody create_storage_disk_body: (required) :return: CreateStorageDiskResponse If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): - return self.create_storage_disk_with_http_info(project_id, body, **kwargs) # noqa: E501 + return self.create_storage_disk_with_http_info(project_id, create_storage_disk_body, **kwargs) # noqa: E501 else: - (data) = self.create_storage_disk_with_http_info(project_id, body, **kwargs) # noqa: E501 + (data) = self.create_storage_disk_with_http_info(project_id, create_storage_disk_body, **kwargs) # noqa: E501 return data - def create_storage_disk_with_http_info(self, project_id, body, **kwargs): # noqa: E501 + def create_storage_disk_with_http_info(self, project_id, create_storage_disk_body, **kwargs): # noqa: E501 """Create storage disk # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.create_storage_disk_with_http_info(project_id, body, async_req=True) + >>> thread = api.create_storage_disk_with_http_info(project_id, create_storage_disk_body, async_req=True) >>> result = thread.get() :param async_req bool :param str project_id: (required) - :param Body6 body: (required) + :param CreateStorageDiskBody create_storage_disk_body: (required) :return: CreateStorageDiskResponse If the method is called asynchronously, returns the request thread. """ - all_params = ['project_id', 'body'] # noqa: E501 + all_params = ['project_id', 'create_storage_disk_body'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -312,10 +312,10 @@ def create_storage_disk_with_http_info(self, project_id, body, **kwargs): # noq if self.api_client.client_side_validation and ('project_id' not in params or params['project_id'] is None): # noqa: E501 raise ValueError("Missing the required parameter `project_id` when calling `create_storage_disk`") # noqa: E501 - # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in params or - params['body'] is None): # noqa: E501 - raise ValueError("Missing the required parameter `body` when calling `create_storage_disk`") # noqa: E501 + # verify the required parameter 'create_storage_disk_body' is set + if self.api_client.client_side_validation and ('create_storage_disk_body' not in params or + params['create_storage_disk_body'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `create_storage_disk_body` when calling `create_storage_disk`") # noqa: E501 collection_formats = {} @@ -331,8 +331,8 @@ def create_storage_disk_with_http_info(self, project_id, body, **kwargs): # noq local_var_files = {} body_params = None - if 'body' in params: - body_params = params['body'] + if 'create_storage_disk_body' in params: + body_params = params['create_storage_disk_body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 diff --git a/docs/src/cudo_compute/api/networks_api.py b/docs/src/cudo_compute/api/networks_api.py index dfaae66..a7e7411 100644 --- a/docs/src/cudo_compute/api/networks_api.py +++ b/docs/src/cudo_compute/api/networks_api.py @@ -33,45 +33,45 @@ def __init__(self, api_client=None): api_client = ApiClient() self.api_client = api_client - def create_network(self, project_id, body, **kwargs): # noqa: E501 + def create_network(self, project_id, create_network_body, **kwargs): # noqa: E501 """Create network # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.create_network(project_id, body, async_req=True) + >>> thread = api.create_network(project_id, create_network_body, async_req=True) >>> result = thread.get() :param async_req bool :param str project_id: (required) - :param Body8 body: (required) + :param CreateNetworkBody create_network_body: (required) :return: CreateNetworkResponse If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): - return self.create_network_with_http_info(project_id, body, **kwargs) # noqa: E501 + return self.create_network_with_http_info(project_id, create_network_body, **kwargs) # noqa: E501 else: - (data) = self.create_network_with_http_info(project_id, body, **kwargs) # noqa: E501 + (data) = self.create_network_with_http_info(project_id, create_network_body, **kwargs) # noqa: E501 return data - def create_network_with_http_info(self, project_id, body, **kwargs): # noqa: E501 + def create_network_with_http_info(self, project_id, create_network_body, **kwargs): # noqa: E501 """Create network # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.create_network_with_http_info(project_id, body, async_req=True) + >>> thread = api.create_network_with_http_info(project_id, create_network_body, async_req=True) >>> result = thread.get() :param async_req bool :param str project_id: (required) - :param Body8 body: (required) + :param CreateNetworkBody create_network_body: (required) :return: CreateNetworkResponse If the method is called asynchronously, returns the request thread. """ - all_params = ['project_id', 'body'] # noqa: E501 + all_params = ['project_id', 'create_network_body'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -90,10 +90,10 @@ def create_network_with_http_info(self, project_id, body, **kwargs): # noqa: E5 if self.api_client.client_side_validation and ('project_id' not in params or params['project_id'] is None): # noqa: E501 raise ValueError("Missing the required parameter `project_id` when calling `create_network`") # noqa: E501 - # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in params or - params['body'] is None): # noqa: E501 - raise ValueError("Missing the required parameter `body` when calling `create_network`") # noqa: E501 + # verify the required parameter 'create_network_body' is set + if self.api_client.client_side_validation and ('create_network_body' not in params or + params['create_network_body'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `create_network_body` when calling `create_network`") # noqa: E501 collection_formats = {} @@ -109,8 +109,8 @@ def create_network_with_http_info(self, project_id, body, **kwargs): # noqa: E5 local_var_files = {} body_params = None - if 'body' in params: - body_params = params['body'] + if 'create_network_body' in params: + body_params = params['create_network_body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 diff --git a/docs/src/cudo_compute/api/object_storage_api.py b/docs/src/cudo_compute/api/object_storage_api.py index 71977a1..6da36b2 100644 --- a/docs/src/cudo_compute/api/object_storage_api.py +++ b/docs/src/cudo_compute/api/object_storage_api.py @@ -33,45 +33,45 @@ def __init__(self, api_client=None): api_client = ApiClient() self.api_client = api_client - def activate(self, project_id, body, **kwargs): # noqa: E501 + def activate(self, project_id, activate_body, **kwargs): # noqa: E501 """Allow the use of S3 compatible storage in a project # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.activate(project_id, body, async_req=True) + >>> thread = api.activate(project_id, activate_body, async_req=True) >>> result = thread.get() :param async_req bool :param str project_id: (required) - :param Body9 body: (required) + :param ActivateBody activate_body: (required) :return: object If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): - return self.activate_with_http_info(project_id, body, **kwargs) # noqa: E501 + return self.activate_with_http_info(project_id, activate_body, **kwargs) # noqa: E501 else: - (data) = self.activate_with_http_info(project_id, body, **kwargs) # noqa: E501 + (data) = self.activate_with_http_info(project_id, activate_body, **kwargs) # noqa: E501 return data - def activate_with_http_info(self, project_id, body, **kwargs): # noqa: E501 + def activate_with_http_info(self, project_id, activate_body, **kwargs): # noqa: E501 """Allow the use of S3 compatible storage in a project # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.activate_with_http_info(project_id, body, async_req=True) + >>> thread = api.activate_with_http_info(project_id, activate_body, async_req=True) >>> result = thread.get() :param async_req bool :param str project_id: (required) - :param Body9 body: (required) + :param ActivateBody activate_body: (required) :return: object If the method is called asynchronously, returns the request thread. """ - all_params = ['project_id', 'body'] # noqa: E501 + all_params = ['project_id', 'activate_body'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -90,10 +90,10 @@ def activate_with_http_info(self, project_id, body, **kwargs): # noqa: E501 if self.api_client.client_side_validation and ('project_id' not in params or params['project_id'] is None): # noqa: E501 raise ValueError("Missing the required parameter `project_id` when calling `activate`") # noqa: E501 - # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in params or - params['body'] is None): # noqa: E501 - raise ValueError("Missing the required parameter `body` when calling `activate`") # noqa: E501 + # verify the required parameter 'activate_body' is set + if self.api_client.client_side_validation and ('activate_body' not in params or + params['activate_body'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `activate_body` when calling `activate`") # noqa: E501 collection_formats = {} @@ -109,8 +109,8 @@ def activate_with_http_info(self, project_id, body, **kwargs): # noqa: E501 local_var_files = {} body_params = None - if 'body' in params: - body_params = params['body'] + if 'activate_body' in params: + body_params = params['activate_body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 @@ -138,45 +138,45 @@ def activate_with_http_info(self, project_id, body, **kwargs): # noqa: E501 _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def create_object_storage_user(self, project_id, body, **kwargs): # noqa: E501 + def create_object_storage_user(self, project_id, create_object_storage_user_body, **kwargs): # noqa: E501 """Create user that stores keys for storage buckets # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.create_object_storage_user(project_id, body, async_req=True) + >>> thread = api.create_object_storage_user(project_id, create_object_storage_user_body, async_req=True) >>> result = thread.get() :param async_req bool :param str project_id: (required) - :param Body10 body: (required) + :param CreateObjectStorageUserBody create_object_storage_user_body: (required) :return: ObjectStorageUser If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): - return self.create_object_storage_user_with_http_info(project_id, body, **kwargs) # noqa: E501 + return self.create_object_storage_user_with_http_info(project_id, create_object_storage_user_body, **kwargs) # noqa: E501 else: - (data) = self.create_object_storage_user_with_http_info(project_id, body, **kwargs) # noqa: E501 + (data) = self.create_object_storage_user_with_http_info(project_id, create_object_storage_user_body, **kwargs) # noqa: E501 return data - def create_object_storage_user_with_http_info(self, project_id, body, **kwargs): # noqa: E501 + def create_object_storage_user_with_http_info(self, project_id, create_object_storage_user_body, **kwargs): # noqa: E501 """Create user that stores keys for storage buckets # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.create_object_storage_user_with_http_info(project_id, body, async_req=True) + >>> thread = api.create_object_storage_user_with_http_info(project_id, create_object_storage_user_body, async_req=True) >>> result = thread.get() :param async_req bool :param str project_id: (required) - :param Body10 body: (required) + :param CreateObjectStorageUserBody create_object_storage_user_body: (required) :return: ObjectStorageUser If the method is called asynchronously, returns the request thread. """ - all_params = ['project_id', 'body'] # noqa: E501 + all_params = ['project_id', 'create_object_storage_user_body'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -195,10 +195,10 @@ def create_object_storage_user_with_http_info(self, project_id, body, **kwargs): if self.api_client.client_side_validation and ('project_id' not in params or params['project_id'] is None): # noqa: E501 raise ValueError("Missing the required parameter `project_id` when calling `create_object_storage_user`") # noqa: E501 - # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in params or - params['body'] is None): # noqa: E501 - raise ValueError("Missing the required parameter `body` when calling `create_object_storage_user`") # noqa: E501 + # verify the required parameter 'create_object_storage_user_body' is set + if self.api_client.client_side_validation and ('create_object_storage_user_body' not in params or + params['create_object_storage_user_body'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `create_object_storage_user_body` when calling `create_object_storage_user`") # noqa: E501 collection_formats = {} @@ -214,8 +214,8 @@ def create_object_storage_user_with_http_info(self, project_id, body, **kwargs): local_var_files = {} body_params = None - if 'body' in params: - body_params = params['body'] + if 'create_object_storage_user_body' in params: + body_params = params['create_object_storage_user_body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 @@ -457,47 +457,47 @@ def delete_object_storage_user_with_http_info(self, project_id, id, **kwargs): _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def generate_object_storage_key(self, project_id, id, body, **kwargs): # noqa: E501 + def generate_object_storage_key(self, project_id, id, generate_object_storage_key_body, **kwargs): # noqa: E501 """Generate access key for storage buckets # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.generate_object_storage_key(project_id, id, body, async_req=True) + >>> thread = api.generate_object_storage_key(project_id, id, generate_object_storage_key_body, async_req=True) >>> result = thread.get() :param async_req bool :param str project_id: (required) :param str id: (required) - :param object body: (required) + :param object generate_object_storage_key_body: (required) :return: ObjectStorageKey If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): - return self.generate_object_storage_key_with_http_info(project_id, id, body, **kwargs) # noqa: E501 + return self.generate_object_storage_key_with_http_info(project_id, id, generate_object_storage_key_body, **kwargs) # noqa: E501 else: - (data) = self.generate_object_storage_key_with_http_info(project_id, id, body, **kwargs) # noqa: E501 + (data) = self.generate_object_storage_key_with_http_info(project_id, id, generate_object_storage_key_body, **kwargs) # noqa: E501 return data - def generate_object_storage_key_with_http_info(self, project_id, id, body, **kwargs): # noqa: E501 + def generate_object_storage_key_with_http_info(self, project_id, id, generate_object_storage_key_body, **kwargs): # noqa: E501 """Generate access key for storage buckets # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.generate_object_storage_key_with_http_info(project_id, id, body, async_req=True) + >>> thread = api.generate_object_storage_key_with_http_info(project_id, id, generate_object_storage_key_body, async_req=True) >>> result = thread.get() :param async_req bool :param str project_id: (required) :param str id: (required) - :param object body: (required) + :param object generate_object_storage_key_body: (required) :return: ObjectStorageKey If the method is called asynchronously, returns the request thread. """ - all_params = ['project_id', 'id', 'body'] # noqa: E501 + all_params = ['project_id', 'id', 'generate_object_storage_key_body'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -520,10 +520,10 @@ def generate_object_storage_key_with_http_info(self, project_id, id, body, **kwa if self.api_client.client_side_validation and ('id' not in params or params['id'] is None): # noqa: E501 raise ValueError("Missing the required parameter `id` when calling `generate_object_storage_key`") # noqa: E501 - # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in params or - params['body'] is None): # noqa: E501 - raise ValueError("Missing the required parameter `body` when calling `generate_object_storage_key`") # noqa: E501 + # verify the required parameter 'generate_object_storage_key_body' is set + if self.api_client.client_side_validation and ('generate_object_storage_key_body' not in params or + params['generate_object_storage_key_body'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `generate_object_storage_key_body` when calling `generate_object_storage_key`") # noqa: E501 collection_formats = {} @@ -541,8 +541,8 @@ def generate_object_storage_key_with_http_info(self, project_id, id, body, **kwa local_var_files = {} body_params = None - if 'body' in params: - body_params = params['body'] + if 'generate_object_storage_key_body' in params: + body_params = params['generate_object_storage_key_body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 diff --git a/docs/src/cudo_compute/api/permissions_api.py b/docs/src/cudo_compute/api/permissions_api.py index 19d1477..983ba4b 100644 --- a/docs/src/cudo_compute/api/permissions_api.py +++ b/docs/src/cudo_compute/api/permissions_api.py @@ -33,45 +33,45 @@ def __init__(self, api_client=None): api_client = ApiClient() self.api_client = api_client - def add_billing_account_user_permission(self, billing_account_id, body, **kwargs): # noqa: E501 + def add_billing_account_user_permission(self, billing_account_id, add_billing_account_user_permission_body, **kwargs): # noqa: E501 """Add billing account user # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.add_billing_account_user_permission(billing_account_id, body, async_req=True) + >>> thread = api.add_billing_account_user_permission(billing_account_id, add_billing_account_user_permission_body, async_req=True) >>> result = thread.get() :param async_req bool :param str billing_account_id: (required) - :param Body1 body: (required) + :param AddBillingAccountUserPermissionBody add_billing_account_user_permission_body: (required) :return: object If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): - return self.add_billing_account_user_permission_with_http_info(billing_account_id, body, **kwargs) # noqa: E501 + return self.add_billing_account_user_permission_with_http_info(billing_account_id, add_billing_account_user_permission_body, **kwargs) # noqa: E501 else: - (data) = self.add_billing_account_user_permission_with_http_info(billing_account_id, body, **kwargs) # noqa: E501 + (data) = self.add_billing_account_user_permission_with_http_info(billing_account_id, add_billing_account_user_permission_body, **kwargs) # noqa: E501 return data - def add_billing_account_user_permission_with_http_info(self, billing_account_id, body, **kwargs): # noqa: E501 + def add_billing_account_user_permission_with_http_info(self, billing_account_id, add_billing_account_user_permission_body, **kwargs): # noqa: E501 """Add billing account user # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.add_billing_account_user_permission_with_http_info(billing_account_id, body, async_req=True) + >>> thread = api.add_billing_account_user_permission_with_http_info(billing_account_id, add_billing_account_user_permission_body, async_req=True) >>> result = thread.get() :param async_req bool :param str billing_account_id: (required) - :param Body1 body: (required) + :param AddBillingAccountUserPermissionBody add_billing_account_user_permission_body: (required) :return: object If the method is called asynchronously, returns the request thread. """ - all_params = ['billing_account_id', 'body'] # noqa: E501 + all_params = ['billing_account_id', 'add_billing_account_user_permission_body'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -90,10 +90,10 @@ def add_billing_account_user_permission_with_http_info(self, billing_account_id, if self.api_client.client_side_validation and ('billing_account_id' not in params or params['billing_account_id'] is None): # noqa: E501 raise ValueError("Missing the required parameter `billing_account_id` when calling `add_billing_account_user_permission`") # noqa: E501 - # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in params or - params['body'] is None): # noqa: E501 - raise ValueError("Missing the required parameter `body` when calling `add_billing_account_user_permission`") # noqa: E501 + # verify the required parameter 'add_billing_account_user_permission_body' is set + if self.api_client.client_side_validation and ('add_billing_account_user_permission_body' not in params or + params['add_billing_account_user_permission_body'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `add_billing_account_user_permission_body` when calling `add_billing_account_user_permission`") # noqa: E501 collection_formats = {} @@ -109,8 +109,8 @@ def add_billing_account_user_permission_with_http_info(self, billing_account_id, local_var_files = {} body_params = None - if 'body' in params: - body_params = params['body'] + if 'add_billing_account_user_permission_body' in params: + body_params = params['add_billing_account_user_permission_body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 @@ -138,45 +138,45 @@ def add_billing_account_user_permission_with_http_info(self, billing_account_id, _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def add_data_center_user_permission(self, data_center_id, body, **kwargs): # noqa: E501 + def add_data_center_user_permission(self, data_center_id, add_data_center_user_permission_body, **kwargs): # noqa: E501 """Add data center user # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.add_data_center_user_permission(data_center_id, body, async_req=True) + >>> thread = api.add_data_center_user_permission(data_center_id, add_data_center_user_permission_body, async_req=True) >>> result = thread.get() :param async_req bool :param str data_center_id: (required) - :param Body3 body: (required) + :param AddDataCenterUserPermissionBody add_data_center_user_permission_body: (required) :return: object If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): - return self.add_data_center_user_permission_with_http_info(data_center_id, body, **kwargs) # noqa: E501 + return self.add_data_center_user_permission_with_http_info(data_center_id, add_data_center_user_permission_body, **kwargs) # noqa: E501 else: - (data) = self.add_data_center_user_permission_with_http_info(data_center_id, body, **kwargs) # noqa: E501 + (data) = self.add_data_center_user_permission_with_http_info(data_center_id, add_data_center_user_permission_body, **kwargs) # noqa: E501 return data - def add_data_center_user_permission_with_http_info(self, data_center_id, body, **kwargs): # noqa: E501 + def add_data_center_user_permission_with_http_info(self, data_center_id, add_data_center_user_permission_body, **kwargs): # noqa: E501 """Add data center user # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.add_data_center_user_permission_with_http_info(data_center_id, body, async_req=True) + >>> thread = api.add_data_center_user_permission_with_http_info(data_center_id, add_data_center_user_permission_body, async_req=True) >>> result = thread.get() :param async_req bool :param str data_center_id: (required) - :param Body3 body: (required) + :param AddDataCenterUserPermissionBody add_data_center_user_permission_body: (required) :return: object If the method is called asynchronously, returns the request thread. """ - all_params = ['data_center_id', 'body'] # noqa: E501 + all_params = ['data_center_id', 'add_data_center_user_permission_body'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -195,10 +195,10 @@ def add_data_center_user_permission_with_http_info(self, data_center_id, body, * if self.api_client.client_side_validation and ('data_center_id' not in params or params['data_center_id'] is None): # noqa: E501 raise ValueError("Missing the required parameter `data_center_id` when calling `add_data_center_user_permission`") # noqa: E501 - # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in params or - params['body'] is None): # noqa: E501 - raise ValueError("Missing the required parameter `body` when calling `add_data_center_user_permission`") # noqa: E501 + # verify the required parameter 'add_data_center_user_permission_body' is set + if self.api_client.client_side_validation and ('add_data_center_user_permission_body' not in params or + params['add_data_center_user_permission_body'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `add_data_center_user_permission_body` when calling `add_data_center_user_permission`") # noqa: E501 collection_formats = {} @@ -214,8 +214,8 @@ def add_data_center_user_permission_with_http_info(self, data_center_id, body, * local_var_files = {} body_params = None - if 'body' in params: - body_params = params['body'] + if 'add_data_center_user_permission_body' in params: + body_params = params['add_data_center_user_permission_body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 @@ -243,45 +243,45 @@ def add_data_center_user_permission_with_http_info(self, data_center_id, body, * _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def add_project_user_permission(self, project_id, body, **kwargs): # noqa: E501 + def add_project_user_permission(self, project_id, add_project_user_permission_body, **kwargs): # noqa: E501 """Add project user # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.add_project_user_permission(project_id, body, async_req=True) + >>> thread = api.add_project_user_permission(project_id, add_project_user_permission_body, async_req=True) >>> result = thread.get() :param async_req bool :param str project_id: (required) - :param Body5 body: (required) + :param AddProjectUserPermissionBody add_project_user_permission_body: (required) :return: object If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): - return self.add_project_user_permission_with_http_info(project_id, body, **kwargs) # noqa: E501 + return self.add_project_user_permission_with_http_info(project_id, add_project_user_permission_body, **kwargs) # noqa: E501 else: - (data) = self.add_project_user_permission_with_http_info(project_id, body, **kwargs) # noqa: E501 + (data) = self.add_project_user_permission_with_http_info(project_id, add_project_user_permission_body, **kwargs) # noqa: E501 return data - def add_project_user_permission_with_http_info(self, project_id, body, **kwargs): # noqa: E501 + def add_project_user_permission_with_http_info(self, project_id, add_project_user_permission_body, **kwargs): # noqa: E501 """Add project user # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.add_project_user_permission_with_http_info(project_id, body, async_req=True) + >>> thread = api.add_project_user_permission_with_http_info(project_id, add_project_user_permission_body, async_req=True) >>> result = thread.get() :param async_req bool :param str project_id: (required) - :param Body5 body: (required) + :param AddProjectUserPermissionBody add_project_user_permission_body: (required) :return: object If the method is called asynchronously, returns the request thread. """ - all_params = ['project_id', 'body'] # noqa: E501 + all_params = ['project_id', 'add_project_user_permission_body'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -300,10 +300,10 @@ def add_project_user_permission_with_http_info(self, project_id, body, **kwargs) if self.api_client.client_side_validation and ('project_id' not in params or params['project_id'] is None): # noqa: E501 raise ValueError("Missing the required parameter `project_id` when calling `add_project_user_permission`") # noqa: E501 - # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in params or - params['body'] is None): # noqa: E501 - raise ValueError("Missing the required parameter `body` when calling `add_project_user_permission`") # noqa: E501 + # verify the required parameter 'add_project_user_permission_body' is set + if self.api_client.client_side_validation and ('add_project_user_permission_body' not in params or + params['add_project_user_permission_body'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `add_project_user_permission_body` when calling `add_project_user_permission`") # noqa: E501 collection_formats = {} @@ -319,8 +319,8 @@ def add_project_user_permission_with_http_info(self, project_id, body, **kwargs) local_var_files = {} body_params = None - if 'body' in params: - body_params = params['body'] + if 'add_project_user_permission_body' in params: + body_params = params['add_project_user_permission_body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 @@ -449,45 +449,45 @@ def list_user_permissions_with_http_info(self, **kwargs): # noqa: E501 _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def remove_billing_account_user_permission(self, billing_account_id, body, **kwargs): # noqa: E501 + def remove_billing_account_user_permission(self, billing_account_id, remove_billing_account_user_permission_body, **kwargs): # noqa: E501 """Remove billing account user # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.remove_billing_account_user_permission(billing_account_id, body, async_req=True) + >>> thread = api.remove_billing_account_user_permission(billing_account_id, remove_billing_account_user_permission_body, async_req=True) >>> result = thread.get() :param async_req bool :param str billing_account_id: (required) - :param Body2 body: (required) + :param RemoveBillingAccountUserPermissionBody remove_billing_account_user_permission_body: (required) :return: object If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): - return self.remove_billing_account_user_permission_with_http_info(billing_account_id, body, **kwargs) # noqa: E501 + return self.remove_billing_account_user_permission_with_http_info(billing_account_id, remove_billing_account_user_permission_body, **kwargs) # noqa: E501 else: - (data) = self.remove_billing_account_user_permission_with_http_info(billing_account_id, body, **kwargs) # noqa: E501 + (data) = self.remove_billing_account_user_permission_with_http_info(billing_account_id, remove_billing_account_user_permission_body, **kwargs) # noqa: E501 return data - def remove_billing_account_user_permission_with_http_info(self, billing_account_id, body, **kwargs): # noqa: E501 + def remove_billing_account_user_permission_with_http_info(self, billing_account_id, remove_billing_account_user_permission_body, **kwargs): # noqa: E501 """Remove billing account user # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.remove_billing_account_user_permission_with_http_info(billing_account_id, body, async_req=True) + >>> thread = api.remove_billing_account_user_permission_with_http_info(billing_account_id, remove_billing_account_user_permission_body, async_req=True) >>> result = thread.get() :param async_req bool :param str billing_account_id: (required) - :param Body2 body: (required) + :param RemoveBillingAccountUserPermissionBody remove_billing_account_user_permission_body: (required) :return: object If the method is called asynchronously, returns the request thread. """ - all_params = ['billing_account_id', 'body'] # noqa: E501 + all_params = ['billing_account_id', 'remove_billing_account_user_permission_body'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -506,10 +506,10 @@ def remove_billing_account_user_permission_with_http_info(self, billing_account_ if self.api_client.client_side_validation and ('billing_account_id' not in params or params['billing_account_id'] is None): # noqa: E501 raise ValueError("Missing the required parameter `billing_account_id` when calling `remove_billing_account_user_permission`") # noqa: E501 - # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in params or - params['body'] is None): # noqa: E501 - raise ValueError("Missing the required parameter `body` when calling `remove_billing_account_user_permission`") # noqa: E501 + # verify the required parameter 'remove_billing_account_user_permission_body' is set + if self.api_client.client_side_validation and ('remove_billing_account_user_permission_body' not in params or + params['remove_billing_account_user_permission_body'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `remove_billing_account_user_permission_body` when calling `remove_billing_account_user_permission`") # noqa: E501 collection_formats = {} @@ -525,8 +525,8 @@ def remove_billing_account_user_permission_with_http_info(self, billing_account_ local_var_files = {} body_params = None - if 'body' in params: - body_params = params['body'] + if 'remove_billing_account_user_permission_body' in params: + body_params = params['remove_billing_account_user_permission_body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 @@ -554,45 +554,45 @@ def remove_billing_account_user_permission_with_http_info(self, billing_account_ _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def remove_data_center_user_permission(self, data_center_id, body, **kwargs): # noqa: E501 + def remove_data_center_user_permission(self, data_center_id, remove_data_center_user_permission_body, **kwargs): # noqa: E501 """Remove data center user # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.remove_data_center_user_permission(data_center_id, body, async_req=True) + >>> thread = api.remove_data_center_user_permission(data_center_id, remove_data_center_user_permission_body, async_req=True) >>> result = thread.get() :param async_req bool :param str data_center_id: (required) - :param Body4 body: (required) + :param RemoveDataCenterUserPermissionBody remove_data_center_user_permission_body: (required) :return: object If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): - return self.remove_data_center_user_permission_with_http_info(data_center_id, body, **kwargs) # noqa: E501 + return self.remove_data_center_user_permission_with_http_info(data_center_id, remove_data_center_user_permission_body, **kwargs) # noqa: E501 else: - (data) = self.remove_data_center_user_permission_with_http_info(data_center_id, body, **kwargs) # noqa: E501 + (data) = self.remove_data_center_user_permission_with_http_info(data_center_id, remove_data_center_user_permission_body, **kwargs) # noqa: E501 return data - def remove_data_center_user_permission_with_http_info(self, data_center_id, body, **kwargs): # noqa: E501 + def remove_data_center_user_permission_with_http_info(self, data_center_id, remove_data_center_user_permission_body, **kwargs): # noqa: E501 """Remove data center user # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.remove_data_center_user_permission_with_http_info(data_center_id, body, async_req=True) + >>> thread = api.remove_data_center_user_permission_with_http_info(data_center_id, remove_data_center_user_permission_body, async_req=True) >>> result = thread.get() :param async_req bool :param str data_center_id: (required) - :param Body4 body: (required) + :param RemoveDataCenterUserPermissionBody remove_data_center_user_permission_body: (required) :return: object If the method is called asynchronously, returns the request thread. """ - all_params = ['data_center_id', 'body'] # noqa: E501 + all_params = ['data_center_id', 'remove_data_center_user_permission_body'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -611,10 +611,10 @@ def remove_data_center_user_permission_with_http_info(self, data_center_id, body if self.api_client.client_side_validation and ('data_center_id' not in params or params['data_center_id'] is None): # noqa: E501 raise ValueError("Missing the required parameter `data_center_id` when calling `remove_data_center_user_permission`") # noqa: E501 - # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in params or - params['body'] is None): # noqa: E501 - raise ValueError("Missing the required parameter `body` when calling `remove_data_center_user_permission`") # noqa: E501 + # verify the required parameter 'remove_data_center_user_permission_body' is set + if self.api_client.client_side_validation and ('remove_data_center_user_permission_body' not in params or + params['remove_data_center_user_permission_body'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `remove_data_center_user_permission_body` when calling `remove_data_center_user_permission`") # noqa: E501 collection_formats = {} @@ -630,8 +630,8 @@ def remove_data_center_user_permission_with_http_info(self, data_center_id, body local_var_files = {} body_params = None - if 'body' in params: - body_params = params['body'] + if 'remove_data_center_user_permission_body' in params: + body_params = params['remove_data_center_user_permission_body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 @@ -659,45 +659,45 @@ def remove_data_center_user_permission_with_http_info(self, data_center_id, body _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def remove_project_user_permission(self, project_id, body, **kwargs): # noqa: E501 + def remove_project_user_permission(self, project_id, remove_project_user_permission_body, **kwargs): # noqa: E501 """Remove project user # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.remove_project_user_permission(project_id, body, async_req=True) + >>> thread = api.remove_project_user_permission(project_id, remove_project_user_permission_body, async_req=True) >>> result = thread.get() :param async_req bool :param str project_id: (required) - :param Body11 body: (required) + :param RemoveProjectUserPermissionBody remove_project_user_permission_body: (required) :return: object If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): - return self.remove_project_user_permission_with_http_info(project_id, body, **kwargs) # noqa: E501 + return self.remove_project_user_permission_with_http_info(project_id, remove_project_user_permission_body, **kwargs) # noqa: E501 else: - (data) = self.remove_project_user_permission_with_http_info(project_id, body, **kwargs) # noqa: E501 + (data) = self.remove_project_user_permission_with_http_info(project_id, remove_project_user_permission_body, **kwargs) # noqa: E501 return data - def remove_project_user_permission_with_http_info(self, project_id, body, **kwargs): # noqa: E501 + def remove_project_user_permission_with_http_info(self, project_id, remove_project_user_permission_body, **kwargs): # noqa: E501 """Remove project user # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.remove_project_user_permission_with_http_info(project_id, body, async_req=True) + >>> thread = api.remove_project_user_permission_with_http_info(project_id, remove_project_user_permission_body, async_req=True) >>> result = thread.get() :param async_req bool :param str project_id: (required) - :param Body11 body: (required) + :param RemoveProjectUserPermissionBody remove_project_user_permission_body: (required) :return: object If the method is called asynchronously, returns the request thread. """ - all_params = ['project_id', 'body'] # noqa: E501 + all_params = ['project_id', 'remove_project_user_permission_body'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -716,10 +716,10 @@ def remove_project_user_permission_with_http_info(self, project_id, body, **kwar if self.api_client.client_side_validation and ('project_id' not in params or params['project_id'] is None): # noqa: E501 raise ValueError("Missing the required parameter `project_id` when calling `remove_project_user_permission`") # noqa: E501 - # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in params or - params['body'] is None): # noqa: E501 - raise ValueError("Missing the required parameter `body` when calling `remove_project_user_permission`") # noqa: E501 + # verify the required parameter 'remove_project_user_permission_body' is set + if self.api_client.client_side_validation and ('remove_project_user_permission_body' not in params or + params['remove_project_user_permission_body'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `remove_project_user_permission_body` when calling `remove_project_user_permission`") # noqa: E501 collection_formats = {} @@ -735,8 +735,8 @@ def remove_project_user_permission_with_http_info(self, project_id, body, **kwar local_var_files = {} body_params = None - if 'body' in params: - body_params = params['body'] + if 'remove_project_user_permission_body' in params: + body_params = params['remove_project_user_permission_body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 diff --git a/docs/src/cudo_compute/api/virtual_machines_api.py b/docs/src/cudo_compute/api/virtual_machines_api.py index 260cce0..1ec18df 100644 --- a/docs/src/cudo_compute/api/virtual_machines_api.py +++ b/docs/src/cudo_compute/api/virtual_machines_api.py @@ -465,45 +465,45 @@ def create_private_vm_image_with_http_info(self, project_id, vm_id, id, **kwargs _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def create_vm(self, project_id, body, **kwargs): # noqa: E501 + def create_vm(self, project_id, create_vm_body, **kwargs): # noqa: E501 """Create virtual machine # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.create_vm(project_id, body, async_req=True) + >>> thread = api.create_vm(project_id, create_vm_body, async_req=True) >>> result = thread.get() :param async_req bool :param str project_id: (required) - :param Body12 body: (required) + :param CreateVMBody create_vm_body: (required) :return: CreateVMResponse If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): - return self.create_vm_with_http_info(project_id, body, **kwargs) # noqa: E501 + return self.create_vm_with_http_info(project_id, create_vm_body, **kwargs) # noqa: E501 else: - (data) = self.create_vm_with_http_info(project_id, body, **kwargs) # noqa: E501 + (data) = self.create_vm_with_http_info(project_id, create_vm_body, **kwargs) # noqa: E501 return data - def create_vm_with_http_info(self, project_id, body, **kwargs): # noqa: E501 + def create_vm_with_http_info(self, project_id, create_vm_body, **kwargs): # noqa: E501 """Create virtual machine # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.create_vm_with_http_info(project_id, body, async_req=True) + >>> thread = api.create_vm_with_http_info(project_id, create_vm_body, async_req=True) >>> result = thread.get() :param async_req bool :param str project_id: (required) - :param Body12 body: (required) + :param CreateVMBody create_vm_body: (required) :return: CreateVMResponse If the method is called asynchronously, returns the request thread. """ - all_params = ['project_id', 'body'] # noqa: E501 + all_params = ['project_id', 'create_vm_body'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -522,10 +522,10 @@ def create_vm_with_http_info(self, project_id, body, **kwargs): # noqa: E501 if self.api_client.client_side_validation and ('project_id' not in params or params['project_id'] is None): # noqa: E501 raise ValueError("Missing the required parameter `project_id` when calling `create_vm`") # noqa: E501 - # verify the required parameter 'body' is set - if self.api_client.client_side_validation and ('body' not in params or - params['body'] is None): # noqa: E501 - raise ValueError("Missing the required parameter `body` when calling `create_vm`") # noqa: E501 + # verify the required parameter 'create_vm_body' is set + if self.api_client.client_side_validation and ('create_vm_body' not in params or + params['create_vm_body'] is None): # noqa: E501 + raise ValueError("Missing the required parameter `create_vm_body` when calling `create_vm`") # noqa: E501 collection_formats = {} @@ -541,8 +541,8 @@ def create_vm_with_http_info(self, project_id, body, **kwargs): # noqa: E501 local_var_files = {} body_params = None - if 'body' in params: - body_params = params['body'] + if 'create_vm_body' in params: + body_params = params['create_vm_body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 diff --git a/docs/src/cudo_compute/models/__init__.py b/docs/src/cudo_compute/models/__init__.py index 46d0b40..3920bd1 100644 --- a/docs/src/cudo_compute/models/__init__.py +++ b/docs/src/cudo_compute/models/__init__.py @@ -15,6 +15,10 @@ from __future__ import absolute_import # import models into model package +from src.cudo_compute.models.activate_body import ActivateBody +from src.cudo_compute.models.add_billing_account_user_permission_body import AddBillingAccountUserPermissionBody +from src.cudo_compute.models.add_data_center_user_permission_body import AddDataCenterUserPermissionBody +from src.cudo_compute.models.add_project_user_permission_body import AddProjectUserPermissionBody from src.cudo_compute.models.any import Any from src.cudo_compute.models.api_key import ApiKey from src.cudo_compute.models.attach_security_group_response import AttachSecurityGroupResponse @@ -24,30 +28,22 @@ from src.cudo_compute.models.billing_account_payment_methods import BillingAccountPaymentMethods from src.cudo_compute.models.billing_account_setup_intent import BillingAccountSetupIntent from src.cudo_compute.models.billing_account_spend_row import BillingAccountSpendRow -from src.cudo_compute.models.body import Body -from src.cudo_compute.models.body1 import Body1 -from src.cudo_compute.models.body10 import Body10 -from src.cudo_compute.models.body11 import Body11 -from src.cudo_compute.models.body12 import Body12 -from src.cudo_compute.models.body2 import Body2 -from src.cudo_compute.models.body3 import Body3 -from src.cudo_compute.models.body4 import Body4 -from src.cudo_compute.models.body5 import Body5 -from src.cudo_compute.models.body6 import Body6 -from src.cudo_compute.models.body7 import Body7 -from src.cudo_compute.models.body8 import Body8 -from src.cudo_compute.models.body9 import Body9 from src.cudo_compute.models.cluster import Cluster from src.cudo_compute.models.connect_vm_response import ConnectVMResponse from src.cudo_compute.models.count_hosts_response import CountHostsResponse from src.cudo_compute.models.count_vms_response import CountVMsResponse from src.cudo_compute.models.cpu_model_category import CpuModelCategory from src.cudo_compute.models.create_billing_account_request import CreateBillingAccountRequest +from src.cudo_compute.models.create_disk_snapshot_body import CreateDiskSnapshotBody from src.cudo_compute.models.create_disk_snapshot_response import CreateDiskSnapshotResponse +from src.cudo_compute.models.create_network_body import CreateNetworkBody from src.cudo_compute.models.create_network_response import CreateNetworkResponse +from src.cudo_compute.models.create_object_storage_user_body import CreateObjectStorageUserBody from src.cudo_compute.models.create_private_vm_image_response import CreatePrivateVMImageResponse from src.cudo_compute.models.create_security_group_response import CreateSecurityGroupResponse +from src.cudo_compute.models.create_storage_disk_body import CreateStorageDiskBody from src.cudo_compute.models.create_storage_disk_response import CreateStorageDiskResponse +from src.cudo_compute.models.create_vm_body import CreateVMBody from src.cudo_compute.models.create_vm_request_nic import CreateVMRequestNIC from src.cudo_compute.models.create_vm_response import CreateVMResponse from src.cudo_compute.models.data_center import DataCenter @@ -135,6 +131,9 @@ from src.cudo_compute.models.reboot_vm_response import RebootVMResponse from src.cudo_compute.models.region import Region from src.cudo_compute.models.remove_billing_account_payment_method_response import RemoveBillingAccountPaymentMethodResponse +from src.cudo_compute.models.remove_billing_account_user_permission_body import RemoveBillingAccountUserPermissionBody +from src.cudo_compute.models.remove_data_center_user_permission_body import RemoveDataCenterUserPermissionBody +from src.cudo_compute.models.remove_project_user_permission_body import RemoveProjectUserPermissionBody from src.cudo_compute.models.resize_vm_disk_response import ResizeVMDiskResponse from src.cudo_compute.models.resize_vm_response import ResizeVMResponse from src.cudo_compute.models.revert_disk_response import RevertDiskResponse @@ -157,6 +156,7 @@ from src.cudo_compute.models.tax_id import TaxId from src.cudo_compute.models.terminate_vm_response import TerminateVMResponse from src.cudo_compute.models.unit import Unit +from src.cudo_compute.models.update_billing_account_body import UpdateBillingAccountBody from src.cudo_compute.models.update_private_vm_image_response import UpdatePrivateVMImageResponse from src.cudo_compute.models.update_security_group_response import UpdateSecurityGroupResponse from src.cudo_compute.models.update_vm_metadata_response import UpdateVMMetadataResponse diff --git a/pyproject.toml b/pyproject.toml index 02b6f95..6f56d19 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "hatchling.build" [project] name = "cudo-compute" -version = "0.1.5" +version = "0.1.6" authors = [ { name = "Cudo Ventures", email = "dev@cudoventures.com" }, ] diff --git a/tools/swaggerfix.py b/tools/swaggerfix.py new file mode 100644 index 0000000..110b189 --- /dev/null +++ b/tools/swaggerfix.py @@ -0,0 +1,29 @@ +import json + +def find_instances(obj, key, value, path=[]): + instances = [] + if isinstance(obj, dict): + for k, v in obj.items(): + new_path = path + [k] + if k == key and v == value: + instances.append(new_path) + instances += find_instances(v, key, value, path=new_path) + elif isinstance(obj, list): + for i, v in enumerate(obj): + new_path = path + [i] + instances += find_instances(v, key, value, path=new_path) + return instances + + +file_path = 'swagger/public.swagger.json' +with open(file_path, 'r') as file: + json_data = json.load(file) + +instances = find_instances(json_data, "name", "body") + +# Print the paths of instances +for i in instances: + json_data[i[0]][i[1]][i[2]][i[3]][i[4]]["name"] = json_data[i[0]][i[1]][i[2]]["operationId"] + "Body" + +with open('fix.swagger.json', 'w') as file: + json.dump(json_data, file, indent=2)