Skip to content

Commit 67c41d1

Browse files
committed
SDK Release v1.55.1-alpha
1 parent bbd2cb9 commit 67c41d1

33 files changed

Lines changed: 1133 additions & 14 deletions

‎README.md‎

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ To contribute, please raise an issue with a bug report, feature request, feedbac
88
This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
99

1010
- API version: 1.0
11-
- Package version: v1.54.7-alpha
11+
- Package version: v1.55.1-alpha
1212
- Generator version: 7.10.0
1313
- Build package: org.openapitools.codegen.languages.PythonClientCodegen
1414

@@ -309,6 +309,7 @@ Class | Method | HTTP request | Description
309309
*VirtualMachineApi* | [**restore_vm_from_hibernation**](docs/VirtualMachineApi.md#restore_vm_from_hibernation) | **GET** /core/virtual-machines/{vm_id}/hibernate-restore | Restore virtual machine from hibernation
310310
*VirtualMachineApi* | [**start_vm**](docs/VirtualMachineApi.md#start_vm) | **GET** /core/virtual-machines/{vm_id}/start | Start virtual machine
311311
*VirtualMachineApi* | [**stop_vm**](docs/VirtualMachineApi.md#stop_vm) | **GET** /core/virtual-machines/{vm_id}/stop | Stop virtual machine
312+
*VirtualMachineApi* | [**toggle_enhanced_metrics_for_avm**](docs/VirtualMachineApi.md#toggle_enhanced_metrics_for_avm) | **PATCH** /core/virtual-machines/{vm_id}/enhanced-metrics | Enable or disable Enhanced Metrics for a virtual machine
312313
*VirtualMachineEventsApi* | [**list_vm_events**](docs/VirtualMachineEventsApi.md#list_vm_events) | **GET** /core/virtual-machines/{vm_id}/events | List virtual machine events
313314
*VncUrlApi* | [**get_vncurl**](docs/VncUrlApi.md#get_vncurl) | **GET** /core/virtual-machines/{vm_id}/console/{job_id} | Get VNC Console Link
314315
*VncUrlApi* | [**request_vm_console**](docs/VncUrlApi.md#request_vm_console) | **GET** /core/virtual-machines/{vm_id}/request-console | Request Instance Console
@@ -479,6 +480,7 @@ Class | Method | HTTP request | Description
479480
- [ImportKeypairResponse](docs/ImportKeypairResponse.md)
480481
- [InfrahubResourceObjectResponseForCustomer](docs/InfrahubResourceObjectResponseForCustomer.md)
481482
- [Instance](docs/Instance.md)
483+
- [InstanceEnhancedMetricsFields](docs/InstanceEnhancedMetricsFields.md)
482484
- [InstanceEnvironmentFields](docs/InstanceEnvironmentFields.md)
483485
- [InstanceEvents](docs/InstanceEvents.md)
484486
- [InstanceEventsFields](docs/InstanceEventsFields.md)
@@ -650,6 +652,9 @@ Class | Method | HTTP request | Description
650652
- [UserConsentsResponse](docs/UserConsentsResponse.md)
651653
- [UserDefaultChoiceForUserFields](docs/UserDefaultChoiceForUserFields.md)
652654
- [UserDefaultChoicesForUserResponse](docs/UserDefaultChoicesForUserResponse.md)
655+
- [UserEnhancedMetricsPayload](docs/UserEnhancedMetricsPayload.md)
656+
- [UserEnhancedMetricsResponse](docs/UserEnhancedMetricsResponse.md)
657+
- [UserEnhancedMetricsResponseFields](docs/UserEnhancedMetricsResponseFields.md)
653658
- [UserInfoPostPayload](docs/UserInfoPostPayload.md)
654659
- [UserOrganizationsResponse](docs/UserOrganizationsResponse.md)
655660
- [UserPermissionFields](docs/UserPermissionFields.md)

‎docs/CreateInstancesPayload.md‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ Name | Type | Description | Notes
1010
**count** | **int** | The number of virtual machines to be created. |
1111
**create_bootable_volume** | **bool** | Indicates whether to create a bootable volume for the virtual machine. When set to `true`, a bootable volume will be created; the default value is `false`. | [optional]
1212
**enable_port_randomization** | **bool** | Indicates whether to enable port randomization.This setting is only effective if 'assign_floating_ip' is true. Defaults to true. | [optional] [default to True]
13+
**enhanced_monitoring_enabled** | **bool** | When true, the Hyperstack VM Agent is opted in for this VM and metrics ingestion is allowed by the prom-gateway. The agent must still be installed on the VM (typically via user_data cloud-init). | [optional] [default to False]
1314
**environment_name** | **str** | The name of the [environment](https://docs.hyperstack.cloud/docs/api-reference/core-resources/environments/) in which the virtual machine is to be created. |
1415
**flavor** | [**FlavorObjectFields**](FlavorObjectFields.md) | | [optional]
1516
**flavor_name** | **str** | The name of the GPU hardware configuration ([flavor](https://docs.hyperstack.cloud/docs/hardware/flavors)) for the virtual machines being created. |
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# InstanceEnhancedMetricsFields
2+
3+
4+
## Properties
5+
6+
Name | Type | Description | Notes
7+
------------ | ------------- | ------------- | -------------
8+
**enabled** | **bool** | | [optional]
9+
10+
## Example
11+
12+
```python
13+
from hyperstack.models.instance_enhanced_metrics_fields import InstanceEnhancedMetricsFields
14+
15+
# TODO update the JSON string below
16+
json = "{}"
17+
# create an instance of InstanceEnhancedMetricsFields from a JSON string
18+
instance_enhanced_metrics_fields_instance = InstanceEnhancedMetricsFields.from_json(json)
19+
# print the JSON string representation of the object
20+
print(InstanceEnhancedMetricsFields.to_json())
21+
22+
# convert the object into a dict
23+
instance_enhanced_metrics_fields_dict = instance_enhanced_metrics_fields_instance.to_dict()
24+
# create an instance of InstanceEnhancedMetricsFields from a dict
25+
instance_enhanced_metrics_fields_from_dict = InstanceEnhancedMetricsFields.from_dict(instance_enhanced_metrics_fields_dict)
26+
```
27+
[[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+
29+

‎docs/InstanceFields.md‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ Name | Type | Description | Notes
88
**callback_url** | **str** | | [optional]
99
**contract_id** | **int** | | [optional]
1010
**created_at** | **datetime** | | [optional]
11+
**enhanced_metrics** | [**InstanceEnhancedMetricsFields**](InstanceEnhancedMetricsFields.md) | | [optional]
1112
**environment** | [**InstanceEnvironmentFields**](InstanceEnvironmentFields.md) | | [optional]
1213
**features** | **object** | | [optional]
1314
**fixed_ip** | **str** | | [optional]

‎docs/UserEnhancedMetricsPayload.md‎

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# UserEnhancedMetricsPayload
2+
3+
4+
## Properties
5+
6+
Name | Type | Description | Notes
7+
------------ | ------------- | ------------- | -------------
8+
**enabled** | **bool** | Set to true to opt this VM into Enhanced Metrics, false to opt out. |
9+
10+
## Example
11+
12+
```python
13+
from hyperstack.models.user_enhanced_metrics_payload import UserEnhancedMetricsPayload
14+
15+
# TODO update the JSON string below
16+
json = "{}"
17+
# create an instance of UserEnhancedMetricsPayload from a JSON string
18+
user_enhanced_metrics_payload_instance = UserEnhancedMetricsPayload.from_json(json)
19+
# print the JSON string representation of the object
20+
print(UserEnhancedMetricsPayload.to_json())
21+
22+
# convert the object into a dict
23+
user_enhanced_metrics_payload_dict = user_enhanced_metrics_payload_instance.to_dict()
24+
# create an instance of UserEnhancedMetricsPayload from a dict
25+
user_enhanced_metrics_payload_from_dict = UserEnhancedMetricsPayload.from_dict(user_enhanced_metrics_payload_dict)
26+
```
27+
[[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+
29+
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# UserEnhancedMetricsResponse
2+
3+
4+
## Properties
5+
6+
Name | Type | Description | Notes
7+
------------ | ------------- | ------------- | -------------
8+
**install_command** | **str** | One-liner the user can run inside the VM to install the agent when enabling. Omitted when disabling. | [optional]
9+
**message** | **str** | | [optional]
10+
**metrics** | [**UserEnhancedMetricsResponseFields**](UserEnhancedMetricsResponseFields.md) | | [optional]
11+
**status** | **bool** | | [optional]
12+
13+
## Example
14+
15+
```python
16+
from hyperstack.models.user_enhanced_metrics_response import UserEnhancedMetricsResponse
17+
18+
# TODO update the JSON string below
19+
json = "{}"
20+
# create an instance of UserEnhancedMetricsResponse from a JSON string
21+
user_enhanced_metrics_response_instance = UserEnhancedMetricsResponse.from_json(json)
22+
# print the JSON string representation of the object
23+
print(UserEnhancedMetricsResponse.to_json())
24+
25+
# convert the object into a dict
26+
user_enhanced_metrics_response_dict = user_enhanced_metrics_response_instance.to_dict()
27+
# create an instance of UserEnhancedMetricsResponse from a dict
28+
user_enhanced_metrics_response_from_dict = UserEnhancedMetricsResponse.from_dict(user_enhanced_metrics_response_dict)
29+
```
30+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
31+
32+
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# UserEnhancedMetricsResponseFields
2+
3+
4+
## Properties
5+
6+
Name | Type | Description | Notes
7+
------------ | ------------- | ------------- | -------------
8+
**enabled** | **bool** | | [optional]
9+
10+
## Example
11+
12+
```python
13+
from hyperstack.models.user_enhanced_metrics_response_fields import UserEnhancedMetricsResponseFields
14+
15+
# TODO update the JSON string below
16+
json = "{}"
17+
# create an instance of UserEnhancedMetricsResponseFields from a JSON string
18+
user_enhanced_metrics_response_fields_instance = UserEnhancedMetricsResponseFields.from_json(json)
19+
# print the JSON string representation of the object
20+
print(UserEnhancedMetricsResponseFields.to_json())
21+
22+
# convert the object into a dict
23+
user_enhanced_metrics_response_fields_dict = user_enhanced_metrics_response_fields_instance.to_dict()
24+
# create an instance of UserEnhancedMetricsResponseFields from a dict
25+
user_enhanced_metrics_response_fields_from_dict = UserEnhancedMetricsResponseFields.from_dict(user_enhanced_metrics_response_fields_dict)
26+
```
27+
[[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+
29+

‎docs/VirtualMachineApi.md‎

Lines changed: 91 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ Method | HTTP request | Description
2424
[**restore_vm_from_hibernation**](VirtualMachineApi.md#restore_vm_from_hibernation) | **GET** /core/virtual-machines/{vm_id}/hibernate-restore | Restore virtual machine from hibernation
2525
[**start_vm**](VirtualMachineApi.md#start_vm) | **GET** /core/virtual-machines/{vm_id}/start | Start virtual machine
2626
[**stop_vm**](VirtualMachineApi.md#stop_vm) | **GET** /core/virtual-machines/{vm_id}/stop | Stop virtual machine
27+
[**toggle_enhanced_metrics_for_avm**](VirtualMachineApi.md#toggle_enhanced_metrics_for_avm) | **PATCH** /core/virtual-machines/{vm_id}/enhanced-metrics | Enable or disable Enhanced Metrics for a virtual machine
2728

2829

2930
# **add_vm_label**
@@ -1262,8 +1263,8 @@ configuration.api_key['apiKey'] = os.environ["API_KEY"]
12621263
with hyperstack.ApiClient(configuration) as api_client:
12631264
# Create an instance of the API class
12641265
api_instance = hyperstack.VirtualMachineApi(api_client)
1265-
page = 56 # int | (optional)
1266-
page_size = 56 # int | (optional)
1266+
page = 1 # int | (optional) (default to 1)
1267+
page_size = 10 # int | (optional) (default to 10)
12671268
search = 'search_example' # str | (optional)
12681269
environment = 'environment_example' # str | (optional)
12691270
exclude_firewalls = [56] # List[int] | Comma-separated list of Security Group IDs to ignore instances attached (optional)
@@ -1285,8 +1286,8 @@ with hyperstack.ApiClient(configuration) as api_client:
12851286

12861287
Name | Type | Description | Notes
12871288
------------- | ------------- | ------------- | -------------
1288-
**page** | **int**| | [optional]
1289-
**page_size** | **int**| | [optional]
1289+
**page** | **int**| | [optional] [default to 1]
1290+
**page_size** | **int**| | [optional] [default to 10]
12901291
**search** | **str**| | [optional]
12911292
**environment** | **str**| | [optional]
12921293
**exclude_firewalls** | [**List[int]**](int.md)| Comma-separated list of Security Group IDs to ignore instances attached | [optional]
@@ -1739,3 +1740,89 @@ Name | Type | Description | Notes
17391740

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

1743+
# **toggle_enhanced_metrics_for_avm**
1744+
> UserEnhancedMetricsResponse toggle_enhanced_metrics_for_avm(vm_id, payload)
1745+
1746+
Enable or disable Enhanced Metrics for a virtual machine
1747+
1748+
Enable or disable the Hyperstack VM Agent (Enhanced Metrics) for an existing virtual machine. The agent itself must be installed/removed manually inside the VM — the response includes the install command when enabling.
1749+
1750+
### Example
1751+
1752+
* Api Key Authentication (apiKey):
1753+
1754+
```python
1755+
import hyperstack
1756+
from hyperstack.models.user_enhanced_metrics_payload import UserEnhancedMetricsPayload
1757+
from hyperstack.models.user_enhanced_metrics_response import UserEnhancedMetricsResponse
1758+
from hyperstack.rest import ApiException
1759+
from pprint import pprint
1760+
1761+
# Defining the host is optional and defaults to https://infrahub-api.nexgencloud.com/v1
1762+
# See configuration.py for a list of all supported configuration parameters.
1763+
configuration = hyperstack.Configuration(
1764+
host = "https://infrahub-api.nexgencloud.com/v1"
1765+
)
1766+
1767+
# The client must configure the authentication and authorization parameters
1768+
# in accordance with the API server security policy.
1769+
# Examples for each auth method are provided below, use the example that
1770+
# satisfies your auth use case.
1771+
1772+
# Configure API key authorization: apiKey
1773+
configuration.api_key['apiKey'] = os.environ["API_KEY"]
1774+
1775+
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
1776+
# configuration.api_key_prefix['apiKey'] = 'Bearer'
1777+
1778+
# Enter a context with an instance of the API client
1779+
with hyperstack.ApiClient(configuration) as api_client:
1780+
# Create an instance of the API class
1781+
api_instance = hyperstack.VirtualMachineApi(api_client)
1782+
vm_id = 56 # int |
1783+
payload = hyperstack.UserEnhancedMetricsPayload() # UserEnhancedMetricsPayload |
1784+
1785+
try:
1786+
# Enable or disable Enhanced Metrics for a virtual machine
1787+
api_response = api_instance.toggle_enhanced_metrics_for_avm(vm_id, payload)
1788+
print("The response of VirtualMachineApi->toggle_enhanced_metrics_for_avm:\n")
1789+
pprint(api_response)
1790+
except Exception as e:
1791+
print("Exception when calling VirtualMachineApi->toggle_enhanced_metrics_for_avm: %s\n" % e)
1792+
```
1793+
1794+
1795+
1796+
### Parameters
1797+
1798+
1799+
Name | Type | Description | Notes
1800+
------------- | ------------- | ------------- | -------------
1801+
**vm_id** | **int**| |
1802+
**payload** | [**UserEnhancedMetricsPayload**](UserEnhancedMetricsPayload.md)| |
1803+
1804+
### Return type
1805+
1806+
[**UserEnhancedMetricsResponse**](UserEnhancedMetricsResponse.md)
1807+
1808+
### Authorization
1809+
1810+
[apiKey](../README.md#apiKey)
1811+
1812+
### HTTP request headers
1813+
1814+
- **Content-Type**: application/json
1815+
- **Accept**: application/json
1816+
1817+
### HTTP response details
1818+
1819+
| Status code | Description | Response headers |
1820+
|-------------|-------------|------------------|
1821+
**200** | Enhanced metrics updated. | - |
1822+
**400** | Bad Request | - |
1823+
**401** | Unauthorized | - |
1824+
**404** | Not Found | - |
1825+
**500** | Internal Server Error | - |
1826+
1827+
[[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)
1828+

‎hyperstack/__init__.py‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
""" # noqa: E501
1515

1616

17-
__version__ = "v1.54.7-alpha"
17+
__version__ = "v1.55.1-alpha"
1818

1919
# import apis into sdk package
2020
from .api.access_keys_api import AccessKeysApi
@@ -238,6 +238,7 @@
238238
from .models.import_keypair_response import ImportKeypairResponse
239239
from .models.infrahub_resource_object_response_for_customer import InfrahubResourceObjectResponseForCustomer
240240
from .models.instance import Instance
241+
from .models.instance_enhanced_metrics_fields import InstanceEnhancedMetricsFields
241242
from .models.instance_environment_fields import InstanceEnvironmentFields
242243
from .models.instance_events import InstanceEvents
243244
from .models.instance_events_fields import InstanceEventsFields
@@ -409,6 +410,9 @@
409410
from .models.user_consents_response import UserConsentsResponse
410411
from .models.user_default_choice_for_user_fields import UserDefaultChoiceForUserFields
411412
from .models.user_default_choices_for_user_response import UserDefaultChoicesForUserResponse
413+
from .models.user_enhanced_metrics_payload import UserEnhancedMetricsPayload
414+
from .models.user_enhanced_metrics_response import UserEnhancedMetricsResponse
415+
from .models.user_enhanced_metrics_response_fields import UserEnhancedMetricsResponseFields
412416
from .models.user_info_post_payload import UserInfoPostPayload
413417
from .models.user_organizations_response import UserOrganizationsResponse
414418
from .models.user_permission_fields import UserPermissionFields

‎hyperstack/__init__.py.bak‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
""" # noqa: E501
1515

1616

17-
__version__ = "v1.54.7-alpha"
17+
__version__ = "v1.55.1-alpha"
1818

1919
# import apis into sdk package
2020
from hyperstack.api.access_keys_api import AccessKeysApi
@@ -238,6 +238,7 @@ from hyperstack.models.import_keypair_payload import ImportKeypairPayload
238238
from hyperstack.models.import_keypair_response import ImportKeypairResponse
239239
from hyperstack.models.infrahub_resource_object_response_for_customer import InfrahubResourceObjectResponseForCustomer
240240
from hyperstack.models.instance import Instance
241+
from hyperstack.models.instance_enhanced_metrics_fields import InstanceEnhancedMetricsFields
241242
from hyperstack.models.instance_environment_fields import InstanceEnvironmentFields
242243
from hyperstack.models.instance_events import InstanceEvents
243244
from hyperstack.models.instance_events_fields import InstanceEventsFields
@@ -409,6 +410,9 @@ from hyperstack.models.user_consent_event import UserConsentEvent
409410
from hyperstack.models.user_consents_response import UserConsentsResponse
410411
from hyperstack.models.user_default_choice_for_user_fields import UserDefaultChoiceForUserFields
411412
from hyperstack.models.user_default_choices_for_user_response import UserDefaultChoicesForUserResponse
413+
from hyperstack.models.user_enhanced_metrics_payload import UserEnhancedMetricsPayload
414+
from hyperstack.models.user_enhanced_metrics_response import UserEnhancedMetricsResponse
415+
from hyperstack.models.user_enhanced_metrics_response_fields import UserEnhancedMetricsResponseFields
412416
from hyperstack.models.user_info_post_payload import UserInfoPostPayload
413417
from hyperstack.models.user_organizations_response import UserOrganizationsResponse
414418
from hyperstack.models.user_permission_fields import UserPermissionFields

0 commit comments

Comments
 (0)