Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump metal-api to version v0.26.0 #100

Merged
merged 2 commits into from
Jan 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
54 changes: 54 additions & 0 deletions docs/SizeApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ Method | HTTP request | Description
[**delete_size**](SizeApi.md#delete_size) | **DELETE** /v1/size/{id} | deletes an size and returns the deleted entity
[**find_size**](SizeApi.md#find_size) | **GET** /v1/size/{id} | get size by id
[**from_hardware**](SizeApi.md#from_hardware) | **POST** /v1/size/from-hardware | Searches all sizes for one to match the given hardwarespecs. If nothing is found, a list of entries is returned which describe the constraint which did not match
[**list_size_reservations**](SizeApi.md#list_size_reservations) | **POST** /v1/size/reservations | get all size reservations
[**list_sizes**](SizeApi.md#list_sizes) | **GET** /v1/size | get all sizes
[**suggest**](SizeApi.md#suggest) | **POST** /v1/size/suggest | from a given machine id returns the appropriate size
[**update_size**](SizeApi.md#update_size) | **POST** /v1/size | updates a size. if the size was changed since this one was read, a conflict is returned
Expand Down Expand Up @@ -241,6 +242,59 @@ Name | Type | Description | Notes

[[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_size_reservations**
> list[V1SizeReservationResponse] list_size_reservations()

get all size reservations

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

# Configure API key authorization: HMAC
configuration = metal_python.Configuration()
configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['Authorization'] = 'Bearer'
# Configure API key authorization: jwt
configuration = metal_python.Configuration()
configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['Authorization'] = 'Bearer'

# create an instance of the API class
api_instance = metal_python.SizeApi(metal_python.ApiClient(configuration))

try:
# get all size reservations
api_response = api_instance.list_size_reservations()
pprint(api_response)
except ApiException as e:
print("Exception when calling SizeApi->list_size_reservations: %s\n" % e)
```

### Parameters
This endpoint does not need any parameter.

### Return type

[**list[V1SizeReservationResponse]**](V1SizeReservationResponse.md)

### Authorization

[HMAC](../README.md#HMAC), [jwt](../README.md#jwt)

### 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_sizes**
> list[V1SizeResponse] list_sizes()

Expand Down
2 changes: 2 additions & 0 deletions docs/V1ServerCapacity.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,10 @@ Name | Type | Description | Notes
**free** | **int** | free servers with this size |
**other** | **int** | servers neither free, allocated or faulty with this size |
**othermachines** | **list[str]** | servers neither free, allocated or faulty with this size |
**reservations** | **int** | the amount of reservations for this size |
**size** | **str** | the size of the server |
**total** | **int** | total amount of servers with this size |
**usedreservations** | **int** | the amount of used reservations for this size |

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

Expand Down
2 changes: 2 additions & 0 deletions docs/V1SizeCreateRequest.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@ Name | Type | Description | Notes
**constraints** | [**list[V1SizeConstraint]**](V1SizeConstraint.md) | a list of constraints that defines this size |
**description** | **str** | a description for this entity | [optional]
**id** | **str** | the unique ID of this entity |
**labels** | **dict(str, str)** | free labels that you associate with this network. | [optional]
**name** | **str** | a readable name for this entity | [optional]
**reservations** | [**list[V1SizeReservation]**](V1SizeReservation.md) | reservations for this size, which are considered during machine allocation | [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)

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

## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**amount** | **int** | the amount of reserved machine allocations for this size |
**description** | **str** | a description for this reservation | [optional]
**partitionids** | **list[str]** | the partitions in which this size reservation is considered, the amount is valid for every partition |
**projectid** | **str** | the project for which this size reservation is considered |

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


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

## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**partitionid** | **str** | the partition id of this size reservation |
**projectallocations** | **int** | the amount of allocations of this project referenced by this size reservation |
**projectid** | **str** | the project id of this size reservation |
**projectname** | **str** | the project name of this size reservation |
**reservations** | **int** | the amount of reservations of this size reservation |
**sizeid** | **str** | the size id of this size reservation |
**tenant** | **str** | the tenant of this size reservation |
**usedreservations** | **int** | the used amount of reservations of this size reservation |

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


2 changes: 2 additions & 0 deletions docs/V1SizeResponse.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@ Name | Type | Description | Notes
**created** | **datetime** | the creation time of this entity | [optional]
**description** | **str** | a description for this entity | [optional]
**id** | **str** | the unique ID of this entity |
**labels** | **dict(str, str)** | free labels that you associate with this network. |
**name** | **str** | a readable name for this entity | [optional]
**reservations** | [**list[V1SizeReservation]**](V1SizeReservation.md) | reservations for this size, which are considered during machine allocation | [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)

Expand Down
2 changes: 2 additions & 0 deletions docs/V1SizeUpdateRequest.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@ Name | Type | Description | Notes
**constraints** | [**list[V1SizeConstraint]**](V1SizeConstraint.md) | a list of constraints that defines this size | [optional]
**description** | **str** | a description for this entity | [optional]
**id** | **str** | the unique ID of this entity |
**labels** | **dict(str, str)** | free labels that you associate with this network. | [optional]
**name** | **str** | a readable name for this entity | [optional]
**reservations** | [**list[V1SizeReservation]**](V1SizeReservation.md) | reservations for this size, which are considered during machine allocation | [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)

Expand Down
4 changes: 3 additions & 1 deletion metal_python/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

API to manage and control plane resources like machines, switches, operating system images, machine sizes, networks, IP addresses and more # noqa: E501

OpenAPI spec version: v0.25.1
OpenAPI spec version: v0.26.0

Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
Expand Down Expand Up @@ -153,6 +153,8 @@
from metal_python.models.v1_size_image_constraint_try_request import V1SizeImageConstraintTryRequest
from metal_python.models.v1_size_image_constraint_update_request import V1SizeImageConstraintUpdateRequest
from metal_python.models.v1_size_matching_log import V1SizeMatchingLog
from metal_python.models.v1_size_reservation import V1SizeReservation
from metal_python.models.v1_size_reservation_response import V1SizeReservationResponse
from metal_python.models.v1_size_response import V1SizeResponse
from metal_python.models.v1_size_suggest_request import V1SizeSuggestRequest
from metal_python.models.v1_size_update_request import V1SizeUpdateRequest
Expand Down
2 changes: 1 addition & 1 deletion metal_python/api/audit_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

API to manage and control plane resources like machines, switches, operating system images, machine sizes, networks, IP addresses and more # noqa: E501

OpenAPI spec version: v0.25.1
OpenAPI spec version: v0.26.0

Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
Expand Down
2 changes: 1 addition & 1 deletion metal_python/api/filesystemlayout_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

API to manage and control plane resources like machines, switches, operating system images, machine sizes, networks, IP addresses and more # noqa: E501

OpenAPI spec version: v0.25.1
OpenAPI spec version: v0.26.0

Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
Expand Down
2 changes: 1 addition & 1 deletion metal_python/api/firewall_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

API to manage and control plane resources like machines, switches, operating system images, machine sizes, networks, IP addresses and more # noqa: E501

OpenAPI spec version: v0.25.1
OpenAPI spec version: v0.26.0

Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
Expand Down
2 changes: 1 addition & 1 deletion metal_python/api/firmware_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

API to manage and control plane resources like machines, switches, operating system images, machine sizes, networks, IP addresses and more # noqa: E501

OpenAPI spec version: v0.25.1
OpenAPI spec version: v0.26.0

Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
Expand Down
2 changes: 1 addition & 1 deletion metal_python/api/health_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

API to manage and control plane resources like machines, switches, operating system images, machine sizes, networks, IP addresses and more # noqa: E501

OpenAPI spec version: v0.25.1
OpenAPI spec version: v0.26.0

Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
Expand Down
2 changes: 1 addition & 1 deletion metal_python/api/image_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

API to manage and control plane resources like machines, switches, operating system images, machine sizes, networks, IP addresses and more # noqa: E501

OpenAPI spec version: v0.25.1
OpenAPI spec version: v0.26.0

Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
Expand Down
2 changes: 1 addition & 1 deletion metal_python/api/ip_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

API to manage and control plane resources like machines, switches, operating system images, machine sizes, networks, IP addresses and more # noqa: E501

OpenAPI spec version: v0.25.1
OpenAPI spec version: v0.26.0

Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
Expand Down
2 changes: 1 addition & 1 deletion metal_python/api/machine_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

API to manage and control plane resources like machines, switches, operating system images, machine sizes, networks, IP addresses and more # noqa: E501

OpenAPI spec version: v0.25.1
OpenAPI spec version: v0.26.0

Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
Expand Down
2 changes: 1 addition & 1 deletion metal_python/api/network_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

API to manage and control plane resources like machines, switches, operating system images, machine sizes, networks, IP addresses and more # noqa: E501

OpenAPI spec version: v0.25.1
OpenAPI spec version: v0.26.0

Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
Expand Down
2 changes: 1 addition & 1 deletion metal_python/api/partition_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

API to manage and control plane resources like machines, switches, operating system images, machine sizes, networks, IP addresses and more # noqa: E501

OpenAPI spec version: v0.25.1
OpenAPI spec version: v0.26.0

Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
Expand Down
2 changes: 1 addition & 1 deletion metal_python/api/project_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

API to manage and control plane resources like machines, switches, operating system images, machine sizes, networks, IP addresses and more # noqa: E501

OpenAPI spec version: v0.25.1
OpenAPI spec version: v0.26.0

Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
Expand Down
91 changes: 90 additions & 1 deletion metal_python/api/size_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

API to manage and control plane resources like machines, switches, operating system images, machine sizes, networks, IP addresses and more # noqa: E501

OpenAPI spec version: v0.25.1
OpenAPI spec version: v0.26.0

Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
Expand Down Expand Up @@ -421,6 +421,95 @@ def from_hardware_with_http_info(self, body, **kwargs): # noqa: E501
_request_timeout=params.get('_request_timeout'),
collection_formats=collection_formats)

def list_size_reservations(self, **kwargs): # noqa: E501
"""get all size reservations # noqa: E501

This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.list_size_reservations(async_req=True)
>>> result = thread.get()

:param async_req bool
:return: list[V1SizeReservationResponse]
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('async_req'):
return self.list_size_reservations_with_http_info(**kwargs) # noqa: E501
else:
(data) = self.list_size_reservations_with_http_info(**kwargs) # noqa: E501
return data

def list_size_reservations_with_http_info(self, **kwargs): # noqa: E501
"""get all size reservations # noqa: E501

This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.list_size_reservations_with_http_info(async_req=True)
>>> result = thread.get()

:param async_req bool
:return: list[V1SizeReservationResponse]
If the method is called asynchronously,
returns the request thread.
"""

all_params = [] # noqa: E501
all_params.append('async_req')
all_params.append('_return_http_data_only')
all_params.append('_preload_content')
all_params.append('_request_timeout')

params = locals()
for key, val in six.iteritems(params['kwargs']):
if key not in all_params:
raise TypeError(
"Got an unexpected keyword argument '%s'"
" to method list_size_reservations" % key
)
params[key] = val
del params['kwargs']

collection_formats = {}

path_params = {}

query_params = []

header_params = {}

form_params = []
local_var_files = {}

body_params = None
# HTTP header `Accept`
header_params['Accept'] = self.api_client.select_header_accept(
['application/json']) # noqa: E501

# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
['application/json']) # noqa: E501

# Authentication setting
auth_settings = ['HMAC', 'jwt'] # noqa: E501

return self.api_client.call_api(
'/v1/size/reservations', 'POST',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type='list[V1SizeReservationResponse]', # noqa: E501
auth_settings=auth_settings,
async_req=params.get('async_req'),
_return_http_data_only=params.get('_return_http_data_only'),
_preload_content=params.get('_preload_content', True),
_request_timeout=params.get('_request_timeout'),
collection_formats=collection_formats)

def list_sizes(self, **kwargs): # noqa: E501
"""get all sizes # noqa: E501

Expand Down
2 changes: 1 addition & 1 deletion metal_python/api/sizeimageconstraint_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

API to manage and control plane resources like machines, switches, operating system images, machine sizes, networks, IP addresses and more # noqa: E501

OpenAPI spec version: v0.25.1
OpenAPI spec version: v0.26.0

Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
Expand Down
2 changes: 1 addition & 1 deletion metal_python/api/switch_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

API to manage and control plane resources like machines, switches, operating system images, machine sizes, networks, IP addresses and more # noqa: E501

OpenAPI spec version: v0.25.1
OpenAPI spec version: v0.26.0

Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
Expand Down
2 changes: 1 addition & 1 deletion metal_python/api/tenant_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

API to manage and control plane resources like machines, switches, operating system images, machine sizes, networks, IP addresses and more # noqa: E501

OpenAPI spec version: v0.25.1
OpenAPI spec version: v0.26.0

Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
Expand Down
2 changes: 1 addition & 1 deletion metal_python/api/user_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

API to manage and control plane resources like machines, switches, operating system images, machine sizes, networks, IP addresses and more # noqa: E501

OpenAPI spec version: v0.25.1
OpenAPI spec version: v0.26.0

Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
Expand Down
Loading