Skip to content

Commit

Permalink
Merge pull request #105 from p-fruck/fix/generator
Browse files Browse the repository at this point in the history
Fix generator
  • Loading branch information
p-fruck authored Oct 14, 2022
2 parents bc2e755 + 713f6b1 commit ac35843
Show file tree
Hide file tree
Showing 130 changed files with 680 additions and 2,923 deletions.
7 changes: 2 additions & 5 deletions .github/workflows/auto-update.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,8 @@ jobs:
with:
ref: main

- name: "Install dependencies"
run: pip install -r requirements.txt

- name: "Build API client"
run: ./custom/build.sh
- name: "Rebuild project"
run: make

- name: "Commit and publish the changes"
uses: peter-evans/create-pull-request@v3
Expand Down
323 changes: 323 additions & 0 deletions .openapi-generator/FILES
Original file line number Diff line number Diff line change
Expand Up @@ -663,4 +663,327 @@ setup.cfg
setup.py
test-requirements.txt
test/__init__.py
test/test_add_on_response.py
test/test_additional_ip.py
test/test_api_permissions_response.py
test/test_assign_instance_firewall_response.py
test/test_assign_instance_firewall_response_links.py
test/test_assign_instance_private_network_response.py
test/test_assign_instance_private_network_response_links.py
test/test_assign_vip_response.py
test/test_assign_vip_response_links.py
test/test_assignment_audit_response.py
test/test_assignment_response.py
test/test_auto_scaling_type_request.py
test/test_auto_scaling_type_response.py
test/test_cancel_instance_response.py
test/test_cancel_instance_response_data.py
test/test_cancel_object_storage_response.py
test/test_cancel_object_storage_response_data.py
test/test_client_response.py
test/test_client_secret_response.py
test/test_create_assignment_response.py
test/test_create_assignment_response_links.py
test/test_create_custom_image_fail_response.py
test/test_create_custom_image_request.py
test/test_create_custom_image_response.py
test/test_create_custom_image_response_data.py
test/test_create_custom_image_response_links.py
test/test_create_firewall_request.py
test/test_create_firewall_response.py
test/test_create_firewall_response_links.py
test/test_create_instance_request.py
test/test_create_instance_response.py
test/test_create_instance_response_data.py
test/test_create_object_storage_request.py
test/test_create_object_storage_request_auto_scaling.py
test/test_create_object_storage_response.py
test/test_create_object_storage_response_data.py
test/test_create_object_storage_response_links.py
test/test_create_private_network_request.py
test/test_create_private_network_response.py
test/test_create_private_network_response_links.py
test/test_create_role_request.py
test/test_create_role_response.py
test/test_create_role_response_data.py
test/test_create_role_response_links.py
test/test_create_secret_request.py
test/test_create_secret_response.py
test/test_create_secret_response_links.py
test/test_create_snapshot_request.py
test/test_create_snapshot_response.py
test/test_create_snapshot_response_data.py
test/test_create_snapshot_response_links.py
test/test_create_tag_request.py
test/test_create_tag_response.py
test/test_create_tag_response_data.py
test/test_create_tag_response_links.py
test/test_create_ticket_request.py
test/test_create_ticket_response.py
test/test_create_ticket_response_data.py
test/test_create_ticket_response_links.py
test/test_create_user_request.py
test/test_create_user_response.py
test/test_create_user_response_data.py
test/test_create_user_response_links.py
test/test_credential_data.py
test/test_credential_response.py
test/test_credential_response_links.py
test/test_custom_images_stats_response.py
test/test_custom_images_stats_response_data.py
test/test_custom_images_stats_response_links.py
test/test_customer_address.py
test/test_customer_api.py
test/test_customer_email.py
test/test_customer_phone.py
test/test_customer_response.py
test/test_customer_type_business.py
test/test_customer_type_private.py
test/test_data_center_response.py
test/test_datacenter_capabilities.py
test/test_find_assignment_response.py
test/test_find_assignment_response_links.py
test/test_find_client_response.py
test/test_find_client_response_links.py
test/test_find_customer_response.py
test/test_find_customer_response_links.py
test/test_find_firewall_response.py
test/test_find_firewall_response_links.py
test/test_find_image_response.py
test/test_find_instance_response.py
test/test_find_instance_response_links.py
test/test_find_object_storage_response.py
test/test_find_private_network_response.py
test/test_find_role_response.py
test/test_find_secret_response.py
test/test_find_snapshot_response.py
test/test_find_tag_response.py
test/test_find_user_is_password_set_response.py
test/test_find_user_is_password_set_response_links.py
test/test_find_user_response.py
test/test_find_vip_response.py
test/test_find_vip_response_links.py
test/test_find_zerops_sign_in_response.py
test/test_find_zerops_user_response.py
test/test_firewall_audit_response.py
test/test_firewall_response.py
test/test_firewall_rule_request.py
test/test_firewall_rule_response.py
test/test_firewalling_upgrade_request.py
test/test_firewalls_api.py
test/test_firewalls_audits_api.py
test/test_generate_client_secret_response.py
test/test_generate_client_secret_response_links.py
test/test_image_audit_response.py
test/test_image_audit_response_data.py
test/test_image_audit_response_links.py
test/test_image_response.py
test/test_images_api.py
test/test_images_audits_api.py
test/test_instance_actions_api.py
test/test_instance_actions_audits_api.py
test/test_instance_assignment_self_links.py
test/test_instance_assignment_self_links1.py
test/test_instance_details.py
test/test_instance_response.py
test/test_instance_restart_action_response.py
test/test_instance_restart_action_response_data.py
test/test_instance_restart_action_response_links.py
test/test_instance_shutdown_action_response.py
test/test_instance_shutdown_action_response_data.py
test/test_instance_shutdown_action_response_links.py
test/test_instance_start_action_response.py
test/test_instance_start_action_response_data.py
test/test_instance_start_action_response_links.py
test/test_instance_status.py
test/test_instance_status_representation.py
test/test_instance_stop_action_response.py
test/test_instance_stop_action_response_data.py
test/test_instance_stop_action_response_links.py
test/test_instances.py
test/test_instances_actions_audit_response.py
test/test_instances_api.py
test/test_instances_audit_response.py
test/test_instances_audits_api.py
test/test_internal_api.py
test/test_invoice_response.py
test/test_invoices_api.py
test/test_ip_config.py
test/test_ip_config1.py
test/test_ip_config2.py
test/test_ip_v4.py
test/test_ip_v41.py
test/test_ip_v42.py
test/test_ip_v43.py
test/test_ip_v6.py
test/test_ledger_api.py
test/test_ledger_entry_response.py
test/test_links.py
test/test_list_api_permission_response.py
test/test_list_api_permission_response_links.py
test/test_list_assignment_audits_response.py
test/test_list_assignment_audits_response_links.py
test/test_list_assignment_response.py
test/test_list_assignment_response_links.py
test/test_list_data_center_response.py
test/test_list_data_center_response_links.py
test/test_list_firewall_audit_response.py
test/test_list_firewall_audit_response_links.py
test/test_list_firewall_response.py
test/test_list_firewall_response_data.py
test/test_list_firewall_response_links.py
test/test_list_image_response.py
test/test_list_image_response_data.py
test/test_list_image_response_links.py
test/test_list_instances_actions_audit_response.py
test/test_list_instances_actions_audit_response_links.py
test/test_list_instances_audit_response.py
test/test_list_instances_audit_response_links.py
test/test_list_instances_response.py
test/test_list_instances_response_data.py
test/test_list_instances_response_links.py
test/test_list_invoice_response.py
test/test_list_invoice_response_links.py
test/test_list_ledger_entries_reponse.py
test/test_list_ledger_entries_reponse_links.py
test/test_list_object_storage_audit_response.py
test/test_list_object_storage_audit_response_links.py
test/test_list_object_storage_response.py
test/test_list_object_storage_response_links.py
test/test_list_payment_method_response.py
test/test_list_payment_method_response1.py
test/test_list_payment_method_response1_links.py
test/test_list_payment_method_response_links.py
test/test_list_preset_rules_response.py
test/test_list_preset_rules_response_links.py
test/test_list_private_network_audit_response.py
test/test_list_private_network_audit_response_links.py
test/test_list_private_network_response.py
test/test_list_private_network_response_data.py
test/test_list_private_network_response_links.py
test/test_list_role_audit_response.py
test/test_list_role_audit_response_links.py
test/test_list_role_response.py
test/test_list_role_response_links.py
test/test_list_secret_audit_response.py
test/test_list_secret_audit_response_links.py
test/test_list_secret_response.py
test/test_list_secret_response_links.py
test/test_list_snapshot_response.py
test/test_list_snapshot_response_links.py
test/test_list_snapshots_audit_response.py
test/test_list_snapshots_audit_response_links.py
test/test_list_tag_audits_response.py
test/test_list_tag_audits_response_links.py
test/test_list_tag_response.py
test/test_list_tag_response_links.py
test/test_list_user_audit_response.py
test/test_list_user_audit_response_links.py
test/test_list_user_response.py
test/test_list_user_response_links.py
test/test_list_user_response_pagination.py
test/test_list_vip_response.py
test/test_list_vip_response_data.py
test/test_list_vip_response_links.py
test/test_object_storage_audit_response.py
test/test_object_storage_response.py
test/test_object_storage_response_auto_scaling.py
test/test_object_storages_api.py
test/test_object_storages_audits_api.py
test/test_object_storages_stats_response.py
test/test_object_storages_stats_response_data.py
test/test_object_storages_stats_response_links.py
test/test_pagination_meta.py
test/test_patch_firewall_request.py
test/test_patch_firewall_response.py
test/test_patch_instance_request.py
test/test_patch_instance_response.py
test/test_patch_instance_response_data.py
test/test_patch_instance_response_links.py
test/test_patch_private_network_request.py
test/test_patch_private_network_response.py
test/test_payment_method_response.py
test/test_payment_method_response1.py
test/test_payment_methods_api.py
test/test_permission_request.py
test/test_permission_response.py
test/test_preset_rules_api.py
test/test_preset_rules_response.py
test/test_private_ip_config.py
test/test_private_network_audit_response.py
test/test_private_network_response.py
test/test_private_networks_api.py
test/test_private_networks_audits_api.py
test/test_put_firewall_request.py
test/test_put_firewall_response.py
test/test_reinstall_instance_request.py
test/test_reinstall_instance_response.py
test/test_reinstall_instance_response_data.py
test/test_resource_permissions_response.py
test/test_role_audit_response.py
test/test_role_response.py
test/test_roles_api.py
test/test_roles_audits_api.py
test/test_rollback_snapshot_response.py
test/test_rules.py
test/test_rules_request.py
test/test_secret_audit_response.py
test/test_secret_response.py
test/test_secrets_api.py
test/test_secrets_audits_api.py
test/test_self_links.py
test/test_set_default_firewall_response.py
test/test_snapshot_response.py
test/test_snapshots_api.py
test/test_snapshots_audit_response.py
test/test_snapshots_audits_api.py
test/test_src_cidr.py
test/test_tag_assignment_self_links.py
test/test_tag_assignments_api.py
test/test_tag_assignments_audits_api.py
test/test_tag_audit_response.py
test/test_tag_response.py
test/test_tag_response1.py
test/test_tags_api.py
test/test_tags_audits_api.py
test/test_unassign_instance_firewall_response.py
test/test_unassign_instance_private_network_response.py
test/test_unassign_vip_response.py
test/test_update_custom_image_request.py
test/test_update_custom_image_response.py
test/test_update_custom_image_response_data.py
test/test_update_object_storage_response.py
test/test_update_object_storage_response_data.py
test/test_update_object_storage_response_data_auto_scaling.py
test/test_update_object_storage_response_links.py
test/test_update_role_request.py
test/test_update_role_response.py
test/test_update_role_response_links.py
test/test_update_secret_request.py
test/test_update_secret_response.py
test/test_update_secret_response_links.py
test/test_update_snapshot_request.py
test/test_update_snapshot_response.py
test/test_update_snapshot_response_links.py
test/test_update_tag_request.py
test/test_update_tag_response.py
test/test_update_tag_response_links.py
test/test_update_user_request.py
test/test_update_user_response.py
test/test_update_user_response_links.py
test/test_upgrade_auto_scaling_type.py
test/test_upgrade_instance_request.py
test/test_upgrade_instance_request_firewalling.py
test/test_upgrade_object_storage_request.py
test/test_upgrade_object_storage_request_auto_scaling.py
test/test_user_audit_response.py
test/test_user_is_password_set_response.py
test/test_user_response.py
test/test_users_api.py
test/test_users_audits_api.py
test/test_vip_api.py
test/test_vip_response.py
test/test_zerops_api.py
test/test_zerops_sign_in_response.py
test/test_zerops_user_response.py
tox.ini
15 changes: 15 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
.PHONY: all clean build install test

all: clean build install test

clean:
./custom/clean.sh

build:
./custom/build.sh

install:
pip install -r requirements*.txt

test: # No functionality in unit-tests, they just validate that all files have valid syntax :)
python -m unittest
6 changes: 2 additions & 4 deletions custom/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ set -e
git_user_id=p-fruck
git_repo_id=python-contabo
proj_dir="$(readlink -f $(dirname $0))/.." # root directory of the project
generator_version=v6.1.0 # version of the openapi-generator-cli

function customize_readme() {
mv README.md README.md.gen
Expand Down Expand Up @@ -63,7 +64,7 @@ else
cmd="docker"
fi

generator_image=openapitools/openapi-generator-cli:latest-release
generator_image=openapitools/openapi-generator-cli:${generator_version}

# update local generator image
${cmd} pull ${generator_image}
Expand All @@ -87,9 +88,6 @@ find . -name "*.py" -exec sed -i '/^\s\+# Introduction .*$/d' {} \;
find . -name "*.py" -exec sed -i "s;contabo.intra;contabo.com;g" {} \;
find . -name "*.md" -exec sed -i "s;contabo.intra;contabo.com;g" {} \;

# No functionality in unit-tests, they just validate that all files have valid syntax :)
python -m unittest

customize_readme

customize_pypi_description
2 changes: 1 addition & 1 deletion custom/clean.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@

proj_dir="$(readlink -f $(dirname $0))/.." # root directory of the project

find "${proj_dir}" -maxdepth 1 ! -name LICENSE ! -name custom ! -name ".git*" ! -name ".*ignore" -exec rm -r {} \;
find "${proj_dir}" -maxdepth 1 ! -name Makefile ! -name LICENSE ! -name custom ! -name ".git*" ! -name ".*ignore" -exec rm -r {} \;
Loading

0 comments on commit ac35843

Please sign in to comment.