Skip to content

Commit

Permalink
docs update
Browse files Browse the repository at this point in the history
  • Loading branch information
JungleCatSW committed Nov 24, 2023
1 parent 3a1a9d8 commit a346b00
Show file tree
Hide file tree
Showing 250 changed files with 34,865 additions and 4 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,6 @@ The code is generated by swagger codegen cli.
Most code is generated in github actions see .github/workflows the generated code is put into a /src/cudo_compute directory
The code gets modified and the helpers get copied in from /helpers.

``./codegen.sh`` generates src file with example client for local experimentation
``./codegen.sh`` generates docs directory with source code and documentation.

If you wish to customise how the API key or project is selected see the code in the helpers directory.
7 changes: 4 additions & 3 deletions codegen.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,11 @@ cd swagger-codegen
./run-in-docker.sh generate -i public.swagger.json \
-l python -o /gen/out -DpackageName=src.cudo_compute
cd ..
cp -r swagger-codegen/out/src src
#rm -rf swagger-codegen
cp -r swagger-codegen/out/docs docs
cp -r swagger-codegen/out/src/ docs
rm -rf swagger-codegen

cp helpers/* src/cudo_compute
cp helpers/* docs/src/cudo_compute
echo "import src.cudo_compute.auth_config as AuthConfig" >> src/cudo_compute/__init__.py
echo "import src.cudo_compute.cudo_client as CudoClient" >> src/cudo_compute/__init__.py

Expand Down
157 changes: 157 additions & 0 deletions docs/APIKeysApi.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,157 @@
# src.cudo_compute.APIKeysApi

All URIs are relative to *https://rest.compute.cudo.org*

Method | HTTP request | Description
------------- | ------------- | -------------
[**delete_api_key**](APIKeysApi.md#delete_api_key) | **DELETE** /v1/api-keys/{name} | Delete
[**generate_api_key**](APIKeysApi.md#generate_api_key) | **POST** /v1/api-keys | Generate
[**list_api_keys**](APIKeysApi.md#list_api_keys) | **GET** /v1/api-keys | List


# **delete_api_key**
> object delete_api_key(name)
Delete

Deletes an API key, revoking all access for requests that use the key.

### Example
```python
from __future__ import print_function
import time
import src.cudo_compute
from src.cudo_compute.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = src.cudo_compute.APIKeysApi()
name = 'name_example' # str |

try:
# Delete
api_response = api_instance.delete_api_key(name)
pprint(api_response)
except ApiException as e:
print("Exception when calling APIKeysApi->delete_api_key: %s\n" % e)
```

### Parameters

Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**name** | **str**| |

### Return type

**object**

### Authorization

No authorization required

### HTTP request headers

- **Content-Type**: application/json
- **Accept**: application/json

[[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)
Generate

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.

### Example
```python
from __future__ import print_function
import time
import src.cudo_compute
from src.cudo_compute.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = src.cudo_compute.APIKeysApi()
body = src.cudo_compute.GenerateApiKeyRequest() # GenerateApiKeyRequest |

try:
# Generate
api_response = api_instance.generate_api_key(body)
pprint(api_response)
except ApiException as e:
print("Exception when calling APIKeysApi->generate_api_key: %s\n" % e)
```

### Parameters

Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**body** | [**GenerateApiKeyRequest**](GenerateApiKeyRequest.md)| |

### Return type

[**ApiKey**](ApiKey.md)

### Authorization

No authorization required

### HTTP request headers

- **Content-Type**: application/json
- **Accept**: application/json

[[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)

# **list_api_keys**
> ListApiKeysResponse list_api_keys(page_number=page_number, page_size=page_size)
List

List the details of all API keys created by the requesting user. This does not include the API key itself which is only visible once when the API key is created.

### Example
```python
from __future__ import print_function
import time
import src.cudo_compute
from src.cudo_compute.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = src.cudo_compute.APIKeysApi()
page_number = 56 # int | (optional)
page_size = 56 # int | (optional)

try:
# List
api_response = api_instance.list_api_keys(page_number=page_number, page_size=page_size)
pprint(api_response)
except ApiException as e:
print("Exception when calling APIKeysApi->list_api_keys: %s\n" % e)
```

### Parameters

Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**page_number** | **int**| | [optional]
**page_size** | **int**| | [optional]

### Return type

[**ListApiKeysResponse**](ListApiKeysResponse.md)

### Authorization

No authorization required

### HTTP request headers

- **Content-Type**: application/json
- **Accept**: application/json

[[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)

10 changes: 10 additions & 0 deletions docs/Any.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Any

## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**type** | **str** | | [optional]

[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)


12 changes: 12 additions & 0 deletions docs/ApiKey.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# ApiKey

## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**create_time** | **datetime** | | [optional]
**id** | **str** | | [optional]
**key** | **str** | | [optional]

[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)


9 changes: 9 additions & 0 deletions docs/AttachStorageDiskResponse.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# AttachStorageDiskResponse

## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------

[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)


13 changes: 13 additions & 0 deletions docs/Body.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Body

## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**data_center_id** | **str** | | [optional]
**project_id** | **str** | | [optional]
**role** | [**Role**](Role.md) | |
**user_email** | **str** | |

[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)


13 changes: 13 additions & 0 deletions docs/Body1.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Body1

## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**data_center_id** | **str** | | [optional]
**project_id** | **str** | | [optional]
**role** | [**Role**](Role.md) | |
**user_id** | **str** | |

[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)


13 changes: 13 additions & 0 deletions docs/Body10.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Body10

## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**billing_account_id** | **str** | | [optional]
**data_center_id** | **str** | | [optional]
**role** | [**Role**](Role.md) | |
**user_id** | **str** | |

[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)


28 changes: 28 additions & 0 deletions docs/Body11.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Body11

## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**boot_disk** | [**Disk**](Disk.md) | | [optional]
**boot_disk_image_id** | **str** | |
**cpu_model** | **str** | | [optional]
**custom_ssh_keys** | **list[str]** | | [optional]
**data_center_id** | **str** | | [optional]
**gpu_model** | **str** | | [optional]
**gpus** | **int** | | [optional]
**machine_type** | **str** | | [optional]
**max_price_hr** | [**Decimal**](Decimal.md) | | [optional]
**memory_gib** | **int** | | [optional]
**metadata** | **dict(str, str)** | | [optional]
**nics** | [**list[CreateVMRequestNIC]**](CreateVMRequestNIC.md) | | [optional]
**password** | **str** | | [optional]
**security_group_ids** | **list[str]** | | [optional]
**ssh_key_source** | [**SshKeySource**](SshKeySource.md) | | [optional]
**start_script** | **str** | | [optional]
**storage_disk_ids** | **list[str]** | | [optional]
**vcpus** | **int** | | [optional]
**vm_id** | **str** | |

[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)


13 changes: 13 additions & 0 deletions docs/Body2.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Body2

## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**billing_account_id** | **str** | | [optional]
**project_id** | **str** | | [optional]
**role** | [**Role**](Role.md) | |
**user_email** | **str** | |

[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)


13 changes: 13 additions & 0 deletions docs/Body3.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Body3

## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**billing_account_id** | **str** | | [optional]
**project_id** | **str** | | [optional]
**role** | [**Role**](Role.md) | |
**user_id** | **str** | |

[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)


13 changes: 13 additions & 0 deletions docs/Body4.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Body4

## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**billing_account_id** | **str** | | [optional]
**data_center_id** | **str** | | [optional]
**role** | [**Role**](Role.md) | |
**user_email** | **str** | |

[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)


11 changes: 11 additions & 0 deletions docs/Body5.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Body5

## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**data_center_id** | **str** | | [optional]
**disk** | [**Disk**](Disk.md) | | [optional]

[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)


11 changes: 11 additions & 0 deletions docs/Body6.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Body6

## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**snapshot_id** | **str** | |
**vm_id** | **str** | |

[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)


14 changes: 14 additions & 0 deletions docs/Body7.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Body7

## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**cidr_prefix** | **str** | |
**data_center_id** | **str** | |
**id** | **str** | |
**network_id** | **str** | |
**vrouter_size** | [**VRouterSize**](VRouterSize.md) | | [optional]

[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)


10 changes: 10 additions & 0 deletions docs/Body8.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Body8

## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**data_center_id** | **str** | | [optional]

[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)


10 changes: 10 additions & 0 deletions docs/Body9.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Body9

## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**id** | **str** | | [optional]

[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)


Loading

0 comments on commit a346b00

Please sign in to comment.