Skip to content

Commit c0a1625

Browse files
authored
Merge pull request szczad#1 from szczad/dev
Multiple changes
2 parents b8af961 + 8af7df6 commit c0a1625

13 files changed

Lines changed: 23 additions & 264 deletions

File tree

.openapi-generator/FILES

Lines changed: 0 additions & 242 deletions
Original file line numberDiff line numberDiff line change
@@ -503,246 +503,4 @@ setup.cfg
503503
setup.py
504504
test-requirements.txt
505505
test/__init__.py
506-
test/test_adminaddorganizationpayload.py
507-
test/test_admincreditpostpayload.py
508-
test/test_adminrechargehistoryfields.py
509-
test/test_adminrechargehistoryresponse.py
510-
test/test_adminthresholdpostpayload.py
511-
test/test_alive_api.py
512-
test/test_api_key.py
513-
test/test_api_key_api.py
514-
test/test_api_key_fields.py
515-
test/test_api_key_payload.py
516-
test/test_api_key_verify_fields.py
517-
test/test_api_key_verify_response.py
518-
test/test_api_keygeneration.py
519-
test/test_assign_rbac_role_payload.py
520-
test/test_assigning_member_role_api.py
521-
test/test_attach_callback_payload.py
522-
test/test_attach_callback_response.py
523-
test/test_attach_volume_fields.py
524-
test/test_attach_volumes.py
525-
test/test_attach_volumes_payload.py
526-
test/test_auth_api.py
527-
test/test_billing_api.py
528-
test/test_billing_response.py
529-
test/test_billingmetricesfields.py
530-
test/test_billingmetricesresponse.py
531-
test/test_callbacks_api.py
532-
test/test_cluster_resource.py
533-
test/test_compliance_api.py
534-
test/test_compliance_fields.py
535-
test/test_compliance_model_fields.py
536-
test/test_compliance_payload.py
537-
test/test_compliance_response.py
538-
test/test_container_overview_fields.py
539-
test/test_container_resource.py
540-
test/test_create_discount_response.py
541-
test/test_create_discounts_payload.py
542-
test/test_create_environment.py
543-
test/test_create_gpu.py
544-
test/test_create_instances_payload.py
545-
test/test_create_profile_payload.py
546-
test/test_create_profile_response.py
547-
test/test_create_security_rule_payload.py
548-
test/test_create_update_compliance_response.py
549-
test/test_create_volume_payload.py
550-
test/test_credit_api.py
551-
test/test_dashboard_api.py
552-
test/test_dashboard_info_response.py
553-
test/test_deployment_api.py
554-
test/test_deployment_fields.py
555-
test/test_deployment_fieldsforstartdeployments.py
556-
test/test_deployments.py
557-
test/test_detach_volumes.py
558-
test/test_detach_volumes_payload.py
559-
test/test_discount_detail_response.py
560-
test/test_discount_resource_fields.py
561-
test/test_environment.py
562-
test/test_environment_api.py
563-
test/test_environment_fields.py
564-
test/test_environment_fieldsfor_volume.py
565-
test/test_environments.py
566-
test/test_envrionment_resources.py
567-
test/test_error_response_model.py
568-
test/test_flavor_api.py
569-
test/test_flavor_fields.py
570-
test/test_flavor_item_get_response.py
571-
test/test_flavor_list_response.py
572-
test/test_flavor_object_fields.py
573-
test/test_flavor_payload.py
574-
test/test_flavor_resource.py
575-
test/test_flavor_response.py
576-
test/test_floating_ip_api.py
577-
test/test_future_node_model.py
578-
test/test_future_node_response_model.py
579-
test/test_future_node_stock_model.py
580-
test/test_future_node_update_model.py
581-
test/test_future_nodes_stock_model.py
582-
test/test_get_all_discount_for_all_organization_response.py
583-
test/test_get_token.py
584-
test/test_get_token_response.py
585-
test/test_getcreditandthresholdinfo.py
586-
test/test_getcreditandthresholdinfoinresponse.py
587-
test/test_gpu.py
588-
test/test_gpu_api.py
589-
test/test_gpu_fields.py
590-
test/test_gpu_list.py
591-
test/test_gpu_region_fields.py
592-
test/test_image_api.py
593-
test/test_image_fields.py
594-
test/test_image_get_response.py
595-
test/test_image_logos.py
596-
test/test_images.py
597-
test/test_import_keypair_payload.py
598-
test/test_import_keypair_response.py
599-
test/test_infrahub_resource_object_response.py
600-
test/test_insert_discount_plan_fields.py
601-
test/test_instance.py
602-
test/test_instance_admin_fields.py
603-
test/test_instance_environment_fields.py
604-
test/test_instance_events.py
605-
test/test_instance_events_fields.py
606-
test/test_instance_flavor_fields.py
607-
test/test_instance_image_fields.py
608-
test/test_instance_keypair_fields.py
609-
test/test_instance_overview_fields.py
610-
test/test_instance_resize_payload.py
611-
test/test_instance_resources.py
612-
test/test_instances.py
613-
test/test_internal_environment_fields.py
614-
test/test_internal_instance_fields.py
615-
test/test_internal_instance_flavor_fields.py
616-
test/test_internal_instance_image_fields.py
617-
test/test_internal_instance_keypair_fields.py
618-
test/test_internal_instances_response.py
619-
test/test_internal_security_rules_fields_for_instance.py
620-
test/test_internal_volume_attachment_fields.py
621-
test/test_internal_volume_fields.py
622-
test/test_internal_volumes_response.py
623-
test/test_invite.py
624-
test/test_invite_api.py
625-
test/test_invite_fields.py
626-
test/test_invite_user.py
627-
test/test_invites.py
628-
test/test_keypair_api.py
629-
test/test_keypair_fields.py
630-
test/test_keypairs.py
631-
test/test_lastdaycostfields.py
632-
test/test_lastdaycostresponse.py
633-
test/test_logo_get_response.py
634-
test/test_logout.py
635-
test/test_new_configurations_response.py
636-
test/test_new_model_response.py
637-
test/test_new_stock_response.py
638-
test/test_new_stock_retrive_response.py
639-
test/test_new_stock_update_response_model.py
640-
test/test_node_model.py
641-
test/test_node_payload_model.py
642-
test/test_node_power_usage_model.py
643-
test/test_node_response_model.py
644-
test/test_node_stock_payload_model.py
645-
test/test_node_stock_response_model.py
646-
test/test_node_stocks_payload.py
647-
test/test_organization_api.py
648-
test/test_organization_info_model.py
649-
test/test_organization_model.py
650-
test/test_organization_object_response.py
651-
test/test_organization_resource_list.py
652-
test/test_organization_resource_response.py
653-
test/test_organization_resources.py
654-
test/test_organization_response_model.py
655-
test/test_organization_user_model.py
656-
test/test_organizations_response_model.py
657-
test/test_overview_info.py
658-
test/test_payment_api.py
659-
test/test_payment_details_fields.py
660-
test/test_payment_details_response.py
661-
test/test_payment_initiate_fields.py
662-
test/test_payment_initiate_payload.py
663-
test/test_payment_initiate_response.py
664-
test/test_permission_api.py
665-
test/test_permission_fields.py
666-
test/test_permission_fieldsfor_user_permission.py
667-
test/test_permission_payload.py
668-
test/test_permission_response.py
669-
test/test_permissions.py
670-
test/test_permissionsfor_user_permission.py
671-
test/test_policies.py
672-
test/test_policy_api.py
673-
test/test_policy_fields.py
674-
test/test_policy_payload.py
675-
test/test_policy_permission_fields.py
676-
test/test_policy_response.py
677-
test/test_power_usage_model.py
678-
test/test_pricebook_api.py
679-
test/test_pricebook_model.py
680-
test/test_pricebook_resource_object_response.py
681-
test/test_profile_api.py
682-
test/test_profile_fields.py
683-
test/test_profile_list_response.py
684-
test/test_profile_object_fields.py
685-
test/test_rbac_role.py
686-
test/test_rbac_role_api.py
687-
test/test_rbac_role_fieldfor_organization.py
688-
test/test_rbac_role_fields.py
689-
test/test_rbac_role_payload.py
690-
test/test_rbac_roles.py
691-
test/test_refresh_token.py
692-
test/test_region_api.py
693-
test/test_region_fields.py
694-
test/test_region_payload.py
695-
test/test_region_response.py
696-
test/test_regions.py
697-
test/test_remove_member_response.py
698-
test/test_removemember.py
699-
test/test_request_console.py
700-
test/test_request_login_data_response.py
701-
test/test_request_login_response.py
702-
test/test_resource_payload.py
703-
test/test_response_model.py
704-
test/test_role_permission_fields.py
705-
test/test_role_policy_fields.py
706-
test/test_security_group_rule.py
707-
test/test_security_group_rule_fields.py
708-
test/test_security_rules_api.py
709-
test/test_security_rules_fieldsfor_instance.py
710-
test/test_security_rules_protocol_fields.py
711-
test/test_single_visibility_user_response.py
712-
test/test_start_deployment.py
713-
test/test_start_deployment_payload.py
714-
test/test_stock_api.py
715-
test/test_stock_visibility_user_list_response.py
716-
test/test_stock_visibility_user_payload.py
717-
test/test_success_response_model.py
718-
test/test_template.py
719-
test/test_template_api.py
720-
test/test_template_fields.py
721-
test/test_templates.py
722-
test/test_token_fields.py
723-
test/test_update_discounts_payload.py
724-
test/test_update_discounts_status_payload.py
725-
test/test_update_environment.py
726-
test/test_update_gpu.py
727-
test/test_update_keypair_name.py
728-
test/test_update_keypairnameresponse.py
729-
test/test_update_template.py
730-
test/test_user_fields.py
731-
test/test_user_info_response.py
732-
test/test_user_permission_api.py
733-
test/test_virtual_machine_api.py
734-
test/test_virtual_machine_events_api.py
735-
test/test_vnc_url_api.py
736-
test/test_vncurl.py
737-
test/test_vncurl_fields.py
738-
test/test_volume.py
739-
test/test_volume_api.py
740-
test/test_volume_attachment_api.py
741-
test/test_volume_attachment_fields.py
742-
test/test_volume_fields.py
743-
test/test_volume_fieldsfor_instance.py
744-
test/test_volume_overview_fields.py
745-
test/test_volume_resource.py
746-
test/test_volume_types.py
747-
test/test_volumes.py
748506
tox.ini

Makefile

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22

33
UID := $(shell id -u)
44
API_URL := https://infrahub-api-doc.nexgencloud.com/api.json
5-
PKG_NAME := hyperstack
6-
PKG_VERSION := 1.0.0
75

86
all: generate
97

@@ -19,8 +17,7 @@ generate: api.json
1917
--generator-name python \
2018
--input-spec "/local/api.json" \
2119
--output /local/ \
22-
--additional-properties packageName="$(PKG_NAME)" \
23-
--additional-properties packageVersion="$(PKG_VERSION)"
20+
--config /local/config.json
2421

2522
api.orig.json:
2623
curl "$(API_URL)" | jq . > api.orig.json

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ No description provided (generated by Openapi Generator https://github.com/opena
44
This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
55

66
- API version: 1.0
7-
- Package version: 1.0.0
7+
- Package version: 3.0.1
88
- Build package: org.openapitools.codegen.languages.PythonClientCodegen
99

1010
## Requirements.

api.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8398,7 +8398,7 @@
83988398
"message": {
83998399
"type": "string"
84008400
},
8401-
"data": {
8401+
"images": {
84028402
"type": "array",
84038403
"items": {
84048404
"$ref": "#/components/schemas/ImageGetResponse"

config.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"packageName": "hyperstack",
3+
"packageVersion": "3.0.1",
4+
"packageUrl": "https://github.com/szczad/hyperstack-api"
5+
}

docs/Images.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ Name | Type | Description | Notes
77
------------ | ------------- | ------------- | -------------
88
**status** | **bool** | | [optional]
99
**message** | **str** | | [optional]
10-
**data** | [**List[ImageGetResponse]**](ImageGetResponse.md) | | [optional]
10+
**images** | [**List[ImageGetResponse]**](ImageGetResponse.md) | | [optional]
1111

1212
## Example
1313

hyperstack/__init__.py

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

1616

17-
__version__ = "1.0.0"
17+
__version__ = "3.0.1"
1818

1919
# import apis into sdk package
2020
from hyperstack.api.pricebook_api import PricebookApi

hyperstack/api_client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ def __init__(
8686
self.default_headers[header_name] = header_value
8787
self.cookie = cookie
8888
# Set default User-Agent.
89-
self.user_agent = 'OpenAPI-Generator/1.0.0/python'
89+
self.user_agent = 'OpenAPI-Generator/3.0.1/python'
9090
self.client_side_validation = configuration.client_side_validation
9191

9292
def __enter__(self):

hyperstack/configuration.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -408,7 +408,7 @@ def to_debug_report(self):
408408
"OS: {env}\n"\
409409
"Python Version: {pyversion}\n"\
410410
"Version of the API: 1.0\n"\
411-
"SDK Package Version: 1.0.0".\
411+
"SDK Package Version: 3.0.1".\
412412
format(env=sys.platform, pyversion=sys.version)
413413

414414
def get_host_settings(self):

hyperstack/models/images.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@ class Images(BaseModel):
2929
""" # noqa: E501
3030
status: Optional[StrictBool] = None
3131
message: Optional[StrictStr] = None
32-
data: Optional[List[ImageGetResponse]] = None
33-
__properties: ClassVar[List[str]] = ["status", "message", "data"]
32+
images: Optional[List[ImageGetResponse]] = None
33+
__properties: ClassVar[List[str]] = ["status", "message", "images"]
3434

3535
model_config = {
3636
"populate_by_name": True,
@@ -71,13 +71,13 @@ def to_dict(self) -> Dict[str, Any]:
7171
exclude=excluded_fields,
7272
exclude_none=True,
7373
)
74-
# override the default output from pydantic by calling `to_dict()` of each item in data (list)
74+
# override the default output from pydantic by calling `to_dict()` of each item in images (list)
7575
_items = []
76-
if self.data:
77-
for _item in self.data:
76+
if self.images:
77+
for _item in self.images:
7878
if _item:
7979
_items.append(_item.to_dict())
80-
_dict['data'] = _items
80+
_dict['images'] = _items
8181
return _dict
8282

8383
@classmethod
@@ -92,7 +92,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
9292
_obj = cls.model_validate({
9393
"status": obj.get("status"),
9494
"message": obj.get("message"),
95-
"data": [ImageGetResponse.from_dict(_item) for _item in obj["data"]] if obj.get("data") is not None else None
95+
"images": [ImageGetResponse.from_dict(_item) for _item in obj["images"]] if obj.get("images") is not None else None
9696
})
9797
return _obj
9898

0 commit comments

Comments
 (0)