From 3c5157281ed813079a417743e1e6516dcc81b0c2 Mon Sep 17 00:00:00 2001 From: Arseniy Volkov Date: Fri, 21 Aug 2026 18:12:55 +0400 Subject: [PATCH] v16.0.0 --- CHANGELOG.md | 210 ++++++++++++++++-- README.md | 113 +++++----- check.go | 2 +- client.go | 12 +- client_bvs.go | 12 +- client_mock.go | 6 +- config/config.go | 2 +- config/config_bvs.go | 4 +- config/legacy-config.go | 2 +- go.mod | 2 +- internal/constants/constants.go | 1 + internal/validators/custom.go | 10 +- internal/validators/helper.go | 3 +- internal/validators/messages.go | 6 + internal/validators/validator.go | 5 + internal/validators/values.go | 4 +- legacy-client.go | 12 +- pkg/cloudapi/account.go | 2 +- pkg/cloudapi/account/account.go | 2 +- pkg/cloudapi/account/add_user.go | 2 +- pkg/cloudapi/account/audits.go | 40 ---- pkg/cloudapi/account/delete.go | 36 --- pkg/cloudapi/account/delete_user.go | 2 +- pkg/cloudapi/account/disable_enable.go | 60 ----- pkg/cloudapi/account/get.go | 2 +- .../account/get_consumed_account_units.go | 2 +- .../get_consumed_cloud_units_by_type.go | 51 ----- .../account/get_reserved_account_units.go | 47 ---- .../account/get_resource_consumption.go | 2 +- pkg/cloudapi/account/list.go | 2 +- pkg/cloudapi/account/list_computes.go | 2 +- pkg/cloudapi/account/list_deleted.go | 2 +- pkg/cloudapi/account/list_disks.go | 2 +- pkg/cloudapi/account/list_flipgroups.go | 2 +- pkg/cloudapi/account/list_rg.go | 2 +- pkg/cloudapi/account/list_templates.go | 2 +- pkg/cloudapi/account/list_vins.go | 2 +- pkg/cloudapi/account/models.go | 101 ++++++++- pkg/cloudapi/account/restore.go | 2 +- pkg/cloudapi/account/serialize.go | 2 +- pkg/cloudapi/account/update.go | 2 +- pkg/cloudapi/account/update_user.go | 2 +- pkg/cloudapi/audit.go | 2 +- pkg/cloudapi/audit/audit.go | 2 +- pkg/cloudapi/audit/get.go | 2 +- pkg/cloudapi/audit/list.go | 2 +- pkg/cloudapi/bservice.go | 2 +- pkg/cloudapi/bservice/bservice.go | 2 +- pkg/cloudapi/bservice/create.go | 2 +- pkg/cloudapi/bservice/delete.go | 2 +- pkg/cloudapi/bservice/disable.go | 2 +- pkg/cloudapi/bservice/enable.go | 2 +- pkg/cloudapi/bservice/get.go | 2 +- pkg/cloudapi/bservice/group_add.go | 9 +- pkg/cloudapi/bservice/group_compute_remove.go | 2 +- pkg/cloudapi/bservice/group_get.go | 2 +- pkg/cloudapi/bservice/group_parent_add.go | 2 +- pkg/cloudapi/bservice/group_parent_remove.go | 2 +- pkg/cloudapi/bservice/group_remove.go | 2 +- pkg/cloudapi/bservice/group_resize.go | 2 +- pkg/cloudapi/bservice/group_start.go | 2 +- pkg/cloudapi/bservice/group_stop.go | 2 +- pkg/cloudapi/bservice/group_update.go | 2 +- pkg/cloudapi/bservice/group_update_extnet.go | 2 +- pkg/cloudapi/bservice/group_update_vins.go | 2 +- pkg/cloudapi/bservice/list.go | 2 +- pkg/cloudapi/bservice/list_deleted.go | 2 +- pkg/cloudapi/bservice/migrate_to_zone.go | 2 +- pkg/cloudapi/bservice/restore.go | 2 +- pkg/cloudapi/bservice/serialize.go | 2 +- pkg/cloudapi/bservice/snapshot_create.go | 2 +- pkg/cloudapi/bservice/snapshot_delete.go | 2 +- pkg/cloudapi/bservice/snapshot_list.go | 2 +- pkg/cloudapi/bservice/snapshot_rollback.go | 2 +- pkg/cloudapi/bservice/start.go | 2 +- pkg/cloudapi/bservice/stop.go | 2 +- pkg/cloudapi/cloudapi.go | 2 +- pkg/cloudapi/compute.go | 2 +- .../compute/abort_shared_snapshot_merge.go | 2 +- .../compute/affinity_group_check_start.go | 2 +- pkg/cloudapi/compute/affinity_label_remove.go | 2 +- pkg/cloudapi/compute/affinity_label_set.go | 2 +- pkg/cloudapi/compute/affinity_relations.go | 2 +- pkg/cloudapi/compute/affinity_rule_add.go | 2 +- pkg/cloudapi/compute/affinity_rule_remove.go | 2 +- pkg/cloudapi/compute/affinity_rules_clear.go | 2 +- .../compute/anti_affinity_rule_add.go | 2 +- .../compute/anti_affinity_rule_remove.go | 2 +- .../compute/anti_affinity_rules_clear.go | 2 +- pkg/cloudapi/compute/attach_gpu.go | 2 +- pkg/cloudapi/compute/attach_pci_device.go | 2 +- pkg/cloudapi/compute/audits.go | 76 ------- pkg/cloudapi/compute/boot_disk_set.go | 2 +- pkg/cloudapi/compute/boot_order_get.go | 2 +- pkg/cloudapi/compute/boot_order_set.go | 2 +- pkg/cloudapi/compute/cd_eject.go | 2 +- pkg/cloudapi/compute/cd_insert.go | 2 +- pkg/cloudapi/compute/change_ip.go | 2 +- pkg/cloudapi/compute/change_link_state.go | 2 +- pkg/cloudapi/compute/change_mac.go | 2 +- pkg/cloudapi/compute/change_mtu.go | 2 +- pkg/cloudapi/compute/change_qos_policies.go | 84 +++++++ pkg/cloudapi/compute/change_secutity_group.go | 2 +- pkg/cloudapi/compute/clone.go | 4 +- pkg/cloudapi/compute/clone_abort.go | 4 +- pkg/cloudapi/compute/clone_status.go | 2 +- pkg/cloudapi/compute/compute.go | 2 +- pkg/cloudapi/compute/create_template.go | 2 +- .../compute/create_template_from_blank.go | 2 +- pkg/cloudapi/compute/delete.go | 2 +- .../compute/delete_cpu_alignment_profile.go | 4 +- pkg/cloudapi/compute/delete_custom_fields.go | 2 +- pkg/cloudapi/compute/detach_gpu.go | 2 +- pkg/cloudapi/compute/detach_pci_device.go | 2 +- pkg/cloudapi/compute/disable.go | 2 +- pkg/cloudapi/compute/disk_add.go | 2 +- pkg/cloudapi/compute/disk_attach.go | 2 +- pkg/cloudapi/compute/disk_del.go | 2 +- pkg/cloudapi/compute/disk_detach.go | 2 +- pkg/cloudapi/compute/disk_migrate.go | 2 +- pkg/cloudapi/compute/disk_qos.go | 2 +- pkg/cloudapi/compute/disk_resize.go | 2 +- .../compute/disk_switch_to_replication.go | 2 +- pkg/cloudapi/compute/enable.go | 2 +- pkg/cloudapi/compute/filter.go | 6 +- pkg/cloudapi/compute/get.go | 2 +- pkg/cloudapi/compute/get_audits.go | 40 ---- pkg/cloudapi/compute/get_console_url.go | 2 +- .../compute/get_cpu_alignment_profile.go | 2 +- pkg/cloudapi/compute/get_custom_fields.go | 2 +- pkg/cloudapi/compute/get_log.go | 2 +- pkg/cloudapi/compute/guest_agent_disable.go | 2 +- pkg/cloudapi/compute/guest_agent_enable.go | 2 +- pkg/cloudapi/compute/guest_agent_execute.go | 2 +- .../compute/guest_agent_feature_get.go | 2 +- .../compute/guest_agent_feature_update.go | 2 +- pkg/cloudapi/compute/list.go | 2 +- pkg/cloudapi/compute/list_deleted.go | 2 +- pkg/cloudapi/compute/list_pci_device.go | 6 +- pkg/cloudapi/compute/list_vgpu.go | 2 +- pkg/cloudapi/compute/migrate_to_zone.go | 2 +- pkg/cloudapi/compute/models.go | 142 ++++-------- pkg/cloudapi/compute/move_to_rg.go | 2 +- pkg/cloudapi/compute/net_attach.go | 6 +- pkg/cloudapi/compute/net_detach.go | 2 +- pkg/cloudapi/compute/pause.go | 2 +- pkg/cloudapi/compute/pfw_add.go | 2 +- pkg/cloudapi/compute/pfw_del.go | 2 +- pkg/cloudapi/compute/pfw_list.go | 2 +- pkg/cloudapi/compute/pin_to_node.go | 2 +- pkg/cloudapi/compute/power_cycle.go | 2 +- pkg/cloudapi/compute/reboot.go | 2 +- pkg/cloudapi/compute/redeploy.go | 2 +- pkg/cloudapi/compute/reset.go | 2 +- pkg/cloudapi/compute/resize.go | 2 +- pkg/cloudapi/compute/restore.go | 2 +- pkg/cloudapi/compute/resume.go | 2 +- pkg/cloudapi/compute/serialize.go | 2 +- .../compute/set_cpu_alignment_profile.go | 4 +- pkg/cloudapi/compute/set_custom_fields.go | 2 +- .../compute/shared_snapshot_merge_status.go | 2 +- pkg/cloudapi/compute/snapshot_create.go | 2 +- pkg/cloudapi/compute/snapshot_delete.go | 2 +- pkg/cloudapi/compute/snapshot_list.go | 2 +- pkg/cloudapi/compute/snapshot_rollback.go | 2 +- pkg/cloudapi/compute/snapshot_usage.go | 2 +- pkg/cloudapi/compute/start.go | 2 +- pkg/cloudapi/compute/stop.go | 2 +- pkg/cloudapi/compute/tag_add.go | 2 +- pkg/cloudapi/compute/tag_remove.go | 2 +- pkg/cloudapi/compute/unpin_from_node.go | 2 +- pkg/cloudapi/compute/update.go | 7 +- pkg/cloudapi/compute/user_grant.go | 2 +- pkg/cloudapi/compute/user_list.go | 2 +- pkg/cloudapi/compute/user_revoke.go | 2 +- pkg/cloudapi/compute/user_update.go | 2 +- pkg/cloudapi/disks.go | 2 +- .../disks/change_disk_storage_policy.go | 2 +- pkg/cloudapi/disks/create.go | 39 +++- pkg/cloudapi/disks/delete.go | 2 +- pkg/cloudapi/disks/delete_disks.go | 2 +- pkg/cloudapi/disks/disks.go | 2 +- pkg/cloudapi/disks/filter.go | 6 +- pkg/cloudapi/disks/from_platform_disk.go | 2 +- pkg/cloudapi/disks/get.go | 2 +- pkg/cloudapi/disks/limitio.go | 2 +- pkg/cloudapi/disks/list.go | 4 +- pkg/cloudapi/disks/list_deleted.go | 2 +- pkg/cloudapi/disks/list_unattached.go | 2 +- pkg/cloudapi/disks/rename.go | 2 +- pkg/cloudapi/disks/replicate.go | 2 +- pkg/cloudapi/disks/replication_resume.go | 2 +- pkg/cloudapi/disks/replication_reverse.go | 2 +- pkg/cloudapi/disks/replication_start.go | 2 +- pkg/cloudapi/disks/replication_status.go | 2 +- pkg/cloudapi/disks/replication_stop.go | 2 +- pkg/cloudapi/disks/replication_suspend.go | 2 +- pkg/cloudapi/disks/resize.go | 2 +- pkg/cloudapi/disks/restore.go | 2 +- pkg/cloudapi/disks/serialize.go | 2 +- pkg/cloudapi/disks/share.go | 2 +- pkg/cloudapi/disks/snapshot_delete.go | 2 +- pkg/cloudapi/disks/snapshot_rollback.go | 2 +- pkg/cloudapi/disks/unshare.go | 2 +- pkg/cloudapi/dpdknet.go | 2 +- pkg/cloudapi/dpdknet/dpdknet.go | 2 +- pkg/cloudapi/dpdknet/get.go | 2 +- pkg/cloudapi/dpdknet/list.go | 2 +- pkg/cloudapi/extnet.go | 2 +- pkg/cloudapi/extnet/extnet.go | 2 +- pkg/cloudapi/extnet/get.go | 2 +- pkg/cloudapi/extnet/get_reserved_ip.go | 2 +- pkg/cloudapi/extnet/list.go | 2 +- pkg/cloudapi/extnet/list_computes.go | 2 +- pkg/cloudapi/extnet/serialize.go | 2 +- pkg/cloudapi/flipgroup.go | 2 +- pkg/cloudapi/flipgroup/compute_add.go | 2 +- pkg/cloudapi/flipgroup/compute_remove.go | 2 +- pkg/cloudapi/flipgroup/create.go | 2 +- pkg/cloudapi/flipgroup/delete.go | 2 +- pkg/cloudapi/flipgroup/edit.go | 2 +- pkg/cloudapi/flipgroup/flipgroup.go | 2 +- pkg/cloudapi/flipgroup/get.go | 2 +- pkg/cloudapi/flipgroup/list.go | 2 +- pkg/cloudapi/flipgroup/serialize.go | 2 +- pkg/cloudapi/image.go | 2 +- pkg/cloudapi/image/change_storage_policy.go | 2 +- pkg/cloudapi/image/create.go | 2 +- pkg/cloudapi/image/create_virtual.go | 2 +- pkg/cloudapi/image/delete.go | 2 +- pkg/cloudapi/image/get.go | 2 +- pkg/cloudapi/image/image.go | 2 +- pkg/cloudapi/image/link.go | 2 +- pkg/cloudapi/image/list.go | 4 +- pkg/cloudapi/image/rename.go | 2 +- pkg/cloudapi/image/serialize.go | 2 +- pkg/cloudapi/k8ci.go | 2 +- pkg/cloudapi/k8ci/get.go | 2 +- pkg/cloudapi/k8ci/k8ci.go | 2 +- pkg/cloudapi/k8ci/list.go | 2 +- pkg/cloudapi/k8ci/list_deleted.go | 2 +- pkg/cloudapi/k8ci/serialize.go | 2 +- pkg/cloudapi/k8s.go | 2 +- pkg/cloudapi/k8s/create.go | 4 +- pkg/cloudapi/k8s/delete.go | 2 +- pkg/cloudapi/k8s/delete_master_from_group.go | 2 +- pkg/cloudapi/k8s/delete_worker_from_group.go | 2 +- pkg/cloudapi/k8s/disable_enable.go | 2 +- pkg/cloudapi/k8s/find_group_by_label.go | 2 +- pkg/cloudapi/k8s/get.go | 2 +- pkg/cloudapi/k8s/get_config.go | 2 +- pkg/cloudapi/k8s/get_node_annotations.go | 2 +- pkg/cloudapi/k8s/get_node_labels.go | 2 +- pkg/cloudapi/k8s/get_node_taints.go | 2 +- .../k8s/get_worker_nodes_meta_data.go | 2 +- pkg/cloudapi/k8s/k8s.go | 2 +- pkg/cloudapi/k8s/list.go | 2 +- pkg/cloudapi/k8s/list_deleted.go | 2 +- pkg/cloudapi/k8s/migrate_to_zone.go | 2 +- pkg/cloudapi/k8s/restore.go | 2 +- pkg/cloudapi/k8s/serialize.go | 2 +- pkg/cloudapi/k8s/start.go | 2 +- pkg/cloudapi/k8s/stop.go | 2 +- pkg/cloudapi/k8s/update.go | 2 +- .../k8s/update_worker_nodes_meta_data.go | 4 +- pkg/cloudapi/k8s/worker_add.go | 2 +- pkg/cloudapi/k8s/worker_reset.go | 2 +- pkg/cloudapi/k8s/worker_restart.go | 2 +- pkg/cloudapi/k8s/workers_group_add.go | 2 +- pkg/cloudapi/k8s/workers_group_delete.go | 2 +- pkg/cloudapi/k8s/workers_group_get_by_name.go | 2 +- pkg/cloudapi/kvmx86.go | 2 +- pkg/cloudapi/kvmx86/create.go | 62 +++++- pkg/cloudapi/kvmx86/create_blank.go | 9 +- pkg/cloudapi/kvmx86/kvmx86.go | 2 +- pkg/cloudapi/lb.go | 2 +- pkg/cloudapi/lb/backend_create.go | 2 +- pkg/cloudapi/lb/backend_delete.go | 2 +- pkg/cloudapi/lb/backend_server_add.go | 2 +- pkg/cloudapi/lb/backend_server_delete.go | 2 +- pkg/cloudapi/lb/backend_server_update.go | 2 +- pkg/cloudapi/lb/backend_update.go | 2 +- pkg/cloudapi/lb/config_reset.go | 2 +- pkg/cloudapi/lb/create.go | 2 +- pkg/cloudapi/lb/delete.go | 2 +- pkg/cloudapi/lb/disable_enable.go | 2 +- pkg/cloudapi/lb/filter.go | 4 +- pkg/cloudapi/lb/frontend_bind.go | 2 +- pkg/cloudapi/lb/frontend_bind_delete.go | 2 +- pkg/cloudapi/lb/frontend_bind_update.go | 2 +- pkg/cloudapi/lb/frontend_create.go | 2 +- pkg/cloudapi/lb/frontend_delete.go | 2 +- pkg/cloudapi/lb/get.go | 2 +- pkg/cloudapi/lb/lb.go | 2 +- pkg/cloudapi/lb/list.go | 2 +- pkg/cloudapi/lb/list_deleted.go | 2 +- pkg/cloudapi/lb/make_highly_available.go | 2 +- pkg/cloudapi/lb/migrate_to_zone.go | 2 +- pkg/cloudapi/lb/restart.go | 2 +- pkg/cloudapi/lb/restore.go | 2 +- pkg/cloudapi/lb/serialize.go | 2 +- pkg/cloudapi/lb/start.go | 2 +- pkg/cloudapi/lb/stop.go | 2 +- pkg/cloudapi/lb/update.go | 2 +- pkg/cloudapi/lb/update_sysctl_params.go | 2 +- pkg/cloudapi/locations/get_list.go | 2 +- pkg/cloudapi/locations/list.go | 2 +- pkg/cloudapi/locations/locations.go | 2 +- pkg/cloudapi/locations/models.go | 3 + pkg/cloudapi/locations/serialize.go | 2 +- pkg/cloudapi/locatons.go | 2 +- pkg/cloudapi/network_qos_policy.go | 10 + pkg/cloudapi/pcidevice.go | 2 +- pkg/cloudapi/pcidevice/list.go | 2 +- pkg/cloudapi/pcidevice/pcidevice.go | 2 +- pkg/cloudapi/pcidevice/serialize.go | 2 +- pkg/cloudapi/prometheus.go | 2 +- pkg/cloudapi/prometheus/compute_cpu_load.go | 2 +- .../prometheus/compute_memory_available.go | 2 +- .../prometheus/compute_memory_unused.go | 2 +- .../prometheus/compute_memory_usable.go | 2 +- .../prometheus/compute_memory_usage.go | 2 +- .../prometheus/compute_memory_used.go | 2 +- pkg/cloudapi/prometheus/compute_read_bytes.go | 2 +- .../prometheus/compute_read_requests.go | 2 +- .../prometheus/compute_receive_bytes.go | 2 +- .../prometheus/compute_receive_packets.go | 2 +- .../prometheus/compute_transmit_bytes.go | 2 +- .../prometheus/compute_transmit_packets.go | 2 +- .../prometheus/compute_write_bytes.go | 2 +- .../prometheus/compute_write_requests.go | 2 +- pkg/cloudapi/prometheus/computes.go | 2 +- pkg/cloudapi/prometheus/prometheus.go | 2 +- pkg/cloudapi/qospolicy/create.go | 46 ++++ pkg/cloudapi/qospolicy/create_rule.go | 93 ++++++++ pkg/cloudapi/qospolicy/delete.go | 37 +++ pkg/cloudapi/qospolicy/delete_rule.go | 41 ++++ pkg/cloudapi/qospolicy/filter.go | 89 ++++++++ pkg/cloudapi/qospolicy/filter_test.go | 97 ++++++++ pkg/cloudapi/qospolicy/get.go | 43 ++++ pkg/cloudapi/qospolicy/list.go | 89 ++++++++ pkg/cloudapi/qospolicy/models.go | 122 ++++++++++ pkg/cloudapi/qospolicy/qos_policy.go | 15 ++ pkg/cloudapi/qospolicy/sorting.go | 39 ++++ pkg/cloudapi/qospolicy/update.go | 52 +++++ pkg/cloudapi/rg.go | 2 +- pkg/cloudapi/rg/access_grant.go | 2 +- pkg/cloudapi/rg/access_revoke.go | 2 +- pkg/cloudapi/rg/add_storage_policy.go | 2 +- pkg/cloudapi/rg/affinity_group_computes.go | 2 +- pkg/cloudapi/rg/affinity_groups_get.go | 2 +- pkg/cloudapi/rg/affinity_groups_list.go | 2 +- pkg/cloudapi/rg/audits.go | 40 ---- pkg/cloudapi/rg/create.go | 4 +- pkg/cloudapi/rg/del_storage_policy.go | 2 +- pkg/cloudapi/rg/delete.go | 2 +- pkg/cloudapi/rg/disable.go | 2 +- pkg/cloudapi/rg/enable.go | 2 +- pkg/cloudapi/rg/get.go | 2 +- pkg/cloudapi/rg/get_resource_consumption.go | 2 +- pkg/cloudapi/rg/list.go | 2 +- pkg/cloudapi/rg/list_computes.go | 2 +- pkg/cloudapi/rg/list_deleted.go | 2 +- pkg/cloudapi/rg/list_lb.go | 2 +- pkg/cloudapi/rg/list_pfw.go | 2 +- pkg/cloudapi/rg/list_vins.go | 2 +- pkg/cloudapi/rg/remove_def_net.go | 2 +- pkg/cloudapi/rg/restore.go | 2 +- pkg/cloudapi/rg/rg.go | 2 +- pkg/cloudapi/rg/serialize.go | 2 +- pkg/cloudapi/rg/set_def_net.go | 2 +- pkg/cloudapi/rg/update.go | 4 +- pkg/cloudapi/rg/usage.go | 2 +- pkg/cloudapi/secgroup/create.go | 4 +- pkg/cloudapi/secgroup/create_rule.go | 4 +- pkg/cloudapi/secgroup/delete.go | 2 +- pkg/cloudapi/secgroup/delete_rule.go | 2 +- pkg/cloudapi/secgroup/get.go | 2 +- pkg/cloudapi/secgroup/list.go | 2 +- pkg/cloudapi/secgroup/security_group.go | 2 +- pkg/cloudapi/secgroup/update.go | 2 +- pkg/cloudapi/securitygroup.go | 2 +- pkg/cloudapi/sep.go | 2 +- .../sep/list_available_sep_and_pools.go | 2 +- pkg/cloudapi/sep/sep.go | 2 +- pkg/cloudapi/sep/serialize.go | 2 +- pkg/cloudapi/storage_policy.go | 2 +- pkg/cloudapi/stpolicy/get.go | 2 +- pkg/cloudapi/stpolicy/list.go | 2 +- pkg/cloudapi/stpolicy/storage_policy.go | 2 +- pkg/cloudapi/tasks.go | 2 +- pkg/cloudapi/tasks/get.go | 2 +- pkg/cloudapi/tasks/list.go | 10 +- pkg/cloudapi/tasks/models.go | 3 + pkg/cloudapi/tasks/tasks.go | 2 +- pkg/cloudapi/trunk.go | 2 +- pkg/cloudapi/trunk/get.go | 2 +- pkg/cloudapi/trunk/list.go | 2 +- pkg/cloudapi/trunk/trunk.go | 2 +- pkg/cloudapi/user.go | 2 +- pkg/cloudapi/user/api_list.go | 2 +- pkg/cloudapi/user/authenticate.go | 2 +- pkg/cloudapi/user/get.go | 2 +- pkg/cloudapi/user/get_audit.go | 61 ----- .../user/is_valid_invite_user_token.go | 44 ---- pkg/cloudapi/user/models.go | 48 ++-- pkg/cloudapi/user/set_data.go | 2 +- pkg/cloudapi/user/user.go | 2 +- pkg/cloudapi/vfpool.go | 2 +- pkg/cloudapi/vfpool/get.go | 2 +- pkg/cloudapi/vfpool/list.go | 2 +- pkg/cloudapi/vfpool/serialize.go | 2 +- pkg/cloudapi/vfpool/vfpool.go | 2 +- pkg/cloudapi/vgpu.go | 2 +- pkg/cloudapi/vgpu/list.go | 24 +- pkg/cloudapi/vgpu/models.go | 58 +++-- pkg/cloudapi/vgpu/serialize.go | 2 +- pkg/cloudapi/vgpu/vgpu.go | 2 +- pkg/cloudapi/vins.go | 2 +- pkg/cloudapi/vins/audits.go | 40 ---- pkg/cloudapi/vins/create_in_account.go | 4 +- pkg/cloudapi/vins/create_in_rg.go | 4 +- pkg/cloudapi/vins/delete.go | 2 +- pkg/cloudapi/vins/disable_enable.go | 2 +- pkg/cloudapi/vins/dns_apply.go | 2 +- pkg/cloudapi/vins/extnet_connect.go | 2 +- pkg/cloudapi/vins/extnet_disconnect.go | 2 +- pkg/cloudapi/vins/extnet_list.go | 2 +- pkg/cloudapi/vins/get.go | 2 +- pkg/cloudapi/vins/ip_list.go | 2 +- pkg/cloudapi/vins/ip_release.go | 2 +- pkg/cloudapi/vins/ip_reserve.go | 2 +- pkg/cloudapi/vins/list.go | 2 +- pkg/cloudapi/vins/list_deleted.go | 2 +- pkg/cloudapi/vins/migrate_to_zone.go | 2 +- pkg/cloudapi/vins/models.go | 3 + pkg/cloudapi/vins/nat_rule_add.go | 2 +- pkg/cloudapi/vins/nat_rule_del.go | 2 +- pkg/cloudapi/vins/nat_rule_list.go | 2 +- pkg/cloudapi/vins/restore.go | 2 +- pkg/cloudapi/vins/serialize.go | 2 +- .../vins/static_route_access_grant.go | 2 +- .../vins/static_route_access_revoke.go | 2 +- pkg/cloudapi/vins/static_route_add.go | 2 +- pkg/cloudapi/vins/static_route_del.go | 2 +- pkg/cloudapi/vins/static_route_list.go | 2 +- pkg/cloudapi/vins/vins.go | 2 +- pkg/cloudapi/vins/vnfdev_redeploy.go | 2 +- pkg/cloudapi/vins/vnfdev_restart.go | 2 +- pkg/cloudapi/zone.go | 2 +- pkg/cloudapi/zone/get.go | 2 +- pkg/cloudapi/zone/list.go | 2 +- pkg/cloudapi/zone/models.go | 18 ++ pkg/cloudapi/zone/serialize.go | 2 +- pkg/cloudapi/zone/zone.go | 2 +- pkg/cloudbroker/account.go | 2 +- pkg/cloudbroker/account/account.go | 2 +- pkg/cloudbroker/account/add_storage_policy.go | 2 +- pkg/cloudbroker/account/add_user.go | 2 +- pkg/cloudbroker/account/add_zone.go | 2 +- pkg/cloudbroker/account/audits.go | 40 ---- pkg/cloudbroker/account/create.go | 4 +- pkg/cloudbroker/account/del_storage_policy.go | 2 +- pkg/cloudbroker/account/delete.go | 2 +- pkg/cloudbroker/account/delete_accounts.go | 2 +- pkg/cloudbroker/account/delete_user.go | 2 +- pkg/cloudbroker/account/disable.go | 38 ---- pkg/cloudbroker/account/disable_accounts.go | 2 +- pkg/cloudbroker/account/enable.go | 38 ---- pkg/cloudbroker/account/enable_accounts.go | 2 +- pkg/cloudbroker/account/get.go | 2 +- .../account/get_resource_consumption.go | 2 +- .../account/grant_access_templates.go | 2 +- pkg/cloudbroker/account/list.go | 2 +- .../account/list_available_templates.go | 2 +- pkg/cloudbroker/account/list_computes.go | 2 +- pkg/cloudbroker/account/list_deleted.go | 2 +- pkg/cloudbroker/account/list_disks.go | 2 +- pkg/cloudbroker/account/list_flip_groups.go | 2 +- pkg/cloudbroker/account/list_rg.go | 2 +- pkg/cloudbroker/account/list_vins.go | 2 +- pkg/cloudbroker/account/models.go | 52 ++++- pkg/cloudbroker/account/remove_zone.go | 2 +- pkg/cloudbroker/account/restore.go | 2 +- .../account/revoke_access_templates.go | 2 +- pkg/cloudbroker/account/serialize.go | 2 +- .../account/set_cpu_allocation_parameter.go | 2 +- .../account/set_cpu_allocation_ratio.go | 2 +- pkg/cloudbroker/account/update.go | 4 +- .../account/update_compute_features.go | 2 +- .../account/update_resource_types.go | 2 +- pkg/cloudbroker/account/update_user.go | 2 +- pkg/cloudbroker/apiaccess.go | 2 +- pkg/cloudbroker/apiaccess/api_find.go | 2 +- pkg/cloudbroker/apiaccess/apiaccess.go | 2 +- pkg/cloudbroker/apiaccess/apis_exclude.go | 2 +- pkg/cloudbroker/apiaccess/apis_include.go | 2 +- pkg/cloudbroker/apiaccess/copy.go | 2 +- pkg/cloudbroker/apiaccess/create.go | 2 +- pkg/cloudbroker/apiaccess/delete.go | 2 +- pkg/cloudbroker/apiaccess/desc_update.go | 2 +- pkg/cloudbroker/apiaccess/get.go | 2 +- pkg/cloudbroker/apiaccess/list.go | 2 +- pkg/cloudbroker/apiaccess/set_default.go | 2 +- pkg/cloudbroker/apiaccess/subtract.go | 2 +- pkg/cloudbroker/apiaccess/union.go | 2 +- pkg/cloudbroker/apiaccess/update.go | 2 +- pkg/cloudbroker/apiaccess/user_list.go | 2 +- pkg/cloudbroker/audit.go | 2 +- pkg/cloudbroker/audit/audit.go | 2 +- pkg/cloudbroker/audit/get.go | 2 +- pkg/cloudbroker/audit/linked_jobs.go | 2 +- pkg/cloudbroker/audit/list.go | 2 +- pkg/cloudbroker/backup.go | 2 +- pkg/cloudbroker/backup/backup.go | 2 +- pkg/cloudbroker/backup/create_disk_backup.go | 2 +- pkg/cloudbroker/backup/create_disks_backup.go | 2 +- pkg/cloudbroker/backup/delete_disk_backup.go | 2 +- pkg/cloudbroker/backup/list_backup_paths.go | 2 +- .../backup/restore_disk_from_backup.go | 2 +- .../backup/restore_disks_from_backup.go | 2 +- pkg/cloudbroker/bservice.go | 2 +- pkg/cloudbroker/bservice/bservice.go | 2 +- pkg/cloudbroker/bservice/create.go | 2 +- pkg/cloudbroker/bservice/delete.go | 2 +- pkg/cloudbroker/bservice/disable.go | 2 +- pkg/cloudbroker/bservice/enable.go | 2 +- pkg/cloudbroker/bservice/get.go | 2 +- pkg/cloudbroker/bservice/group_add.go | 9 +- .../bservice/group_compute_remove.go | 2 +- pkg/cloudbroker/bservice/group_get.go | 2 +- .../bservice/group_parent_remove.go | 2 +- pkg/cloudbroker/bservice/group_parrent_add.go | 2 +- pkg/cloudbroker/bservice/group_remove.go | 2 +- pkg/cloudbroker/bservice/group_resize.go | 2 +- pkg/cloudbroker/bservice/group_start.go | 2 +- pkg/cloudbroker/bservice/group_stop.go | 2 +- pkg/cloudbroker/bservice/group_update.go | 2 +- .../bservice/group_update_extnet.go | 2 +- pkg/cloudbroker/bservice/group_update_vins.go | 2 +- pkg/cloudbroker/bservice/list.go | 2 +- pkg/cloudbroker/bservice/list_deleted.go | 2 +- pkg/cloudbroker/bservice/migrate_to_zone.go | 2 +- pkg/cloudbroker/bservice/restore.go | 2 +- pkg/cloudbroker/bservice/snapshot_create.go | 2 +- pkg/cloudbroker/bservice/snapshot_delete.go | 2 +- pkg/cloudbroker/bservice/snapshot_list.go | 2 +- pkg/cloudbroker/bservice/snapshot_rollback.go | 2 +- pkg/cloudbroker/bservice/start.go | 2 +- pkg/cloudbroker/bservice/stop.go | 2 +- pkg/cloudbroker/cloudbroker.go | 2 +- pkg/cloudbroker/compute.go | 2 +- .../compute/abort_shared_snapshot_merge.go | 2 +- .../compute/affinity_group_check_start.go | 2 +- .../compute/affinity_label_remove.go | 2 +- pkg/cloudbroker/compute/affinity_label_set.go | 2 +- pkg/cloudbroker/compute/affinity_relations.go | 2 +- pkg/cloudbroker/compute/affinity_rule_add.go | 2 +- .../compute/affinity_rule_remove.go | 2 +- .../compute/affinity_rules_clear.go | 2 +- .../compute/anti_affinity_rule_add.go | 2 +- .../compute/anti_affinity_rule_clear.go | 2 +- .../compute/anti_affinity_rule_remove.go | 2 +- pkg/cloudbroker/compute/attach_gpu.go | 2 +- pkg/cloudbroker/compute/attach_pci_device.go | 2 +- pkg/cloudbroker/compute/audits.go | 76 ------- pkg/cloudbroker/compute/boot_disk_set.go | 2 +- pkg/cloudbroker/compute/boot_order_get.go | 2 +- pkg/cloudbroker/compute/boot_order_set.go | 2 +- pkg/cloudbroker/compute/cd_eject.go | 2 +- pkg/cloudbroker/compute/cd_insert.go | 2 +- pkg/cloudbroker/compute/change_ip.go | 2 +- pkg/cloudbroker/compute/change_link_state.go | 2 +- pkg/cloudbroker/compute/change_mac.go | 2 +- pkg/cloudbroker/compute/change_mtu.go | 2 +- .../compute/change_qos_policies.go | 84 +++++++ pkg/cloudbroker/compute/change_read_only.go | 2 +- .../compute/change_secutity_group.go | 2 +- .../compute/check_compute_placement.go | 2 +- pkg/cloudbroker/compute/clone.go | 4 +- pkg/cloudbroker/compute/clone_abort.go | 4 +- pkg/cloudbroker/compute/clone_status.go | 2 +- pkg/cloudbroker/compute/compute.go | 2 +- pkg/cloudbroker/compute/computeci_set.go | 42 ---- pkg/cloudbroker/compute/computeci_unset.go | 38 ---- pkg/cloudbroker/compute/create_template.go | 2 +- .../compute/create_template_from_blank.go | 2 +- pkg/cloudbroker/compute/delete.go | 2 +- .../compute/delete_cpu_alignment_profile.go | 4 +- .../compute/delete_custom_fields.go | 2 +- pkg/cloudbroker/compute/detach_gpu.go | 2 +- pkg/cloudbroker/compute/detach_pci_device.go | 2 +- pkg/cloudbroker/compute/disable.go | 2 +- pkg/cloudbroker/compute/disk_add.go | 2 +- pkg/cloudbroker/compute/disk_attach.go | 2 +- pkg/cloudbroker/compute/disk_del.go | 2 +- pkg/cloudbroker/compute/disk_detach.go | 2 +- pkg/cloudbroker/compute/disk_migrate.go | 2 +- pkg/cloudbroker/compute/disk_qos.go | 2 +- pkg/cloudbroker/compute/disk_resize.go | 2 +- .../compute/disk_switch_to_replication.go | 2 +- pkg/cloudbroker/compute/enable.go | 2 +- pkg/cloudbroker/compute/filter.go | 6 +- pkg/cloudbroker/compute/get.go | 2 +- pkg/cloudbroker/compute/get_audits.go | 40 ---- pkg/cloudbroker/compute/get_console_url.go | 2 +- .../compute/get_cpu_alignment_profile.go | 2 +- pkg/cloudbroker/compute/get_custom_fields.go | 2 +- pkg/cloudbroker/compute/get_log.go | 36 --- .../compute/guest_agent_disable.go | 2 +- pkg/cloudbroker/compute/guest_agent_enable.go | 2 +- .../compute/guest_agent_execute.go | 2 +- .../compute/guest_agent_feature_get.go | 2 +- .../compute/guest_agent_feature_update.go | 2 +- pkg/cloudbroker/compute/list.go | 2 +- pkg/cloudbroker/compute/list_deleted.go | 2 +- pkg/cloudbroker/compute/list_pci_device.go | 6 +- pkg/cloudbroker/compute/list_vgpu.go | 2 +- pkg/cloudbroker/compute/mass_delete.go | 2 +- pkg/cloudbroker/compute/mass_reboot.go | 2 +- pkg/cloudbroker/compute/mass_start.go | 2 +- pkg/cloudbroker/compute/mass_stop.go | 2 +- pkg/cloudbroker/compute/migrate.go | 2 +- pkg/cloudbroker/compute/migrate_abort.go | 2 +- pkg/cloudbroker/compute/migrate_storage.go | 2 +- .../compute/migrate_storage_abort.go | 2 +- .../compute/migrate_storage_clean_up.go | 2 +- .../compute/migrate_storage_info.go | 2 +- .../compute/migrate_storage_list.go | 2 +- pkg/cloudbroker/compute/migrate_to_zone.go | 2 +- pkg/cloudbroker/compute/models.go | 142 ++++-------- pkg/cloudbroker/compute/move_to_rg.go | 2 +- pkg/cloudbroker/compute/net_attach.go | 6 +- pkg/cloudbroker/compute/net_detach.go | 2 +- pkg/cloudbroker/compute/net_qos.go | 2 +- pkg/cloudbroker/compute/pause.go | 2 +- pkg/cloudbroker/compute/pfw_add.go | 2 +- pkg/cloudbroker/compute/pfw_del.go | 2 +- pkg/cloudbroker/compute/pfw_list.go | 2 +- pkg/cloudbroker/compute/pin_to_node.go | 2 +- pkg/cloudbroker/compute/power_cycle.go | 2 +- pkg/cloudbroker/compute/reboot.go | 2 +- pkg/cloudbroker/compute/redeploy.go | 2 +- pkg/cloudbroker/compute/reset.go | 2 +- pkg/cloudbroker/compute/resize.go | 2 +- pkg/cloudbroker/compute/restore.go | 2 +- pkg/cloudbroker/compute/resume.go | 2 +- pkg/cloudbroker/compute/serialize.go | 2 +- .../compute/set_cpu_alignment_profile.go | 4 +- pkg/cloudbroker/compute/set_custom_fields.go | 2 +- pkg/cloudbroker/compute/set_net_config.go | 2 +- .../compute/shared_snapshot_merge_status.go | 2 +- pkg/cloudbroker/compute/snapshot_create.go | 2 +- pkg/cloudbroker/compute/snapshot_delete.go | 2 +- .../compute/snapshot_evict_disk.go | 2 +- pkg/cloudbroker/compute/snapshot_list.go | 2 +- pkg/cloudbroker/compute/snapshot_rollback.go | 2 +- pkg/cloudbroker/compute/snapshot_usage.go | 2 +- pkg/cloudbroker/compute/start.go | 2 +- pkg/cloudbroker/compute/start_migration_in.go | 2 +- .../compute/start_migration_out.go | 4 +- pkg/cloudbroker/compute/stop.go | 2 +- pkg/cloudbroker/compute/stop_migration_in.go | 4 +- pkg/cloudbroker/compute/stop_migration_out.go | 4 +- pkg/cloudbroker/compute/tag_add.go | 2 +- pkg/cloudbroker/compute/tag_remove.go | 2 +- pkg/cloudbroker/compute/unpin_from_node.go | 2 +- pkg/cloudbroker/compute/update.go | 7 +- pkg/cloudbroker/compute/user_grant.go | 2 +- pkg/cloudbroker/compute/user_list.go | 2 +- pkg/cloudbroker/compute/user_revoke.go | 2 +- pkg/cloudbroker/compute/user_update.go | 2 +- pkg/cloudbroker/disks.go | 2 +- .../disks/change_disk_storage_policy.go | 2 +- pkg/cloudbroker/disks/create.go | 37 ++- pkg/cloudbroker/disks/delete.go | 2 +- pkg/cloudbroker/disks/delete_disks.go | 2 +- pkg/cloudbroker/disks/depresent.go | 2 +- pkg/cloudbroker/disks/disks.go | 2 +- pkg/cloudbroker/disks/filter.go | 6 +- pkg/cloudbroker/disks/from_platform_disk.go | 2 +- pkg/cloudbroker/disks/get.go | 2 +- pkg/cloudbroker/disks/limit_io.go | 2 +- pkg/cloudbroker/disks/list.go | 4 +- pkg/cloudbroker/disks/list_deleted.go | 2 +- pkg/cloudbroker/disks/list_unattached.go | 2 +- pkg/cloudbroker/disks/migrate.go | 41 +++- pkg/cloudbroker/disks/migrate_abort.go | 2 +- pkg/cloudbroker/disks/migrate_status.go | 2 +- pkg/cloudbroker/disks/present.go | 2 +- pkg/cloudbroker/disks/rename.go | 2 +- pkg/cloudbroker/disks/replicate.go | 2 +- pkg/cloudbroker/disks/replication_resume.go | 2 +- pkg/cloudbroker/disks/replication_reverse.go | 2 +- pkg/cloudbroker/disks/replication_start.go | 2 +- pkg/cloudbroker/disks/replication_status.go | 2 +- pkg/cloudbroker/disks/replication_stop.go | 2 +- pkg/cloudbroker/disks/replication_suspend.go | 2 +- pkg/cloudbroker/disks/resize.go | 2 +- pkg/cloudbroker/disks/restore.go | 2 +- pkg/cloudbroker/disks/serialize.go | 2 +- pkg/cloudbroker/disks/share.go | 2 +- pkg/cloudbroker/disks/snapshot_delete.go | 2 +- pkg/cloudbroker/disks/snapshot_rollback.go | 2 +- pkg/cloudbroker/disks/unshare.go | 2 +- pkg/cloudbroker/disks/update.go | 2 +- pkg/cloudbroker/dpdk.go | 2 +- pkg/cloudbroker/dpdknet/create.go | 2 +- pkg/cloudbroker/dpdknet/delete.go | 2 +- pkg/cloudbroker/dpdknet/disable.go | 2 +- pkg/cloudbroker/dpdknet/dpdk.go | 2 +- pkg/cloudbroker/dpdknet/enable.go | 2 +- pkg/cloudbroker/dpdknet/get.go | 2 +- pkg/cloudbroker/dpdknet/list.go | 2 +- pkg/cloudbroker/dpdknet/update.go | 2 +- pkg/cloudbroker/extnet.go | 2 +- pkg/cloudbroker/extnet/access_add.go | 2 +- pkg/cloudbroker/extnet/access_remove.go | 2 +- pkg/cloudbroker/extnet/add_reserved_ip.go | 2 +- pkg/cloudbroker/extnet/create.go | 2 +- pkg/cloudbroker/extnet/default_qos_update.go | 2 +- pkg/cloudbroker/extnet/del_reserved_ip.go | 2 +- pkg/cloudbroker/extnet/destroy.go | 2 +- pkg/cloudbroker/extnet/device_deploy.go | 2 +- pkg/cloudbroker/extnet/device_migrate.go | 2 +- pkg/cloudbroker/extnet/device_remove.go | 2 +- pkg/cloudbroker/extnet/device_restart.go | 2 +- pkg/cloudbroker/extnet/disable.go | 2 +- pkg/cloudbroker/extnet/dns_apply.go | 2 +- pkg/cloudbroker/extnet/enable.go | 2 +- pkg/cloudbroker/extnet/extnet.go | 2 +- pkg/cloudbroker/extnet/get.go | 2 +- pkg/cloudbroker/extnet/get_reserved_ip.go | 2 +- pkg/cloudbroker/extnet/ips_exclude.go | 2 +- pkg/cloudbroker/extnet/ips_exclude_range.go | 2 +- pkg/cloudbroker/extnet/ips_include.go | 2 +- pkg/cloudbroker/extnet/ips_include_range.go | 2 +- pkg/cloudbroker/extnet/list.go | 2 +- pkg/cloudbroker/extnet/migrate_to_zone.go | 2 +- pkg/cloudbroker/extnet/ntp_apply.go | 2 +- pkg/cloudbroker/extnet/serialize.go | 2 +- pkg/cloudbroker/extnet/set_default.go | 2 +- .../extnet/set_highly_available.go | 2 +- .../extnet/static_route_access_grant.go | 2 +- .../extnet/static_route_access_revoke.go | 2 +- pkg/cloudbroker/extnet/static_route_add.go | 2 +- pkg/cloudbroker/extnet/static_route_del.go | 2 +- pkg/cloudbroker/extnet/static_route_list.go | 2 +- pkg/cloudbroker/extnet/update.go | 2 +- pkg/cloudbroker/flipgoup.go | 2 +- pkg/cloudbroker/flipgroup/compute_add.go | 2 +- pkg/cloudbroker/flipgroup/compute_remove.go | 2 +- pkg/cloudbroker/flipgroup/create.go | 2 +- pkg/cloudbroker/flipgroup/delete.go | 2 +- pkg/cloudbroker/flipgroup/edit.go | 2 +- pkg/cloudbroker/flipgroup/flipgroup.go | 2 +- pkg/cloudbroker/flipgroup/get.go | 2 +- pkg/cloudbroker/flipgroup/list.go | 2 +- pkg/cloudbroker/flipgroup/serialize.go | 2 +- pkg/cloudbroker/grid.go | 2 +- .../grid/add_custom_backup_path.go | 2 +- pkg/cloudbroker/grid/change_settings.go | 2 +- .../grid/execute_maintenance_script.go | 46 ---- pkg/cloudbroker/grid/get.go | 2 +- pkg/cloudbroker/grid/get_backup.go | 2 +- pkg/cloudbroker/grid/get_diagnosis.go | 2 +- .../grid/get_resource_consumption.go | 2 +- pkg/cloudbroker/grid/get_settings.go | 2 +- pkg/cloudbroker/grid/grid.go | 2 +- pkg/cloudbroker/grid/list.go | 2 +- pkg/cloudbroker/grid/list_emails.go | 37 --- pkg/cloudbroker/grid/models.go | 6 + pkg/cloudbroker/grid/purge_logs.go | 2 +- .../grid/remove_custom_backup_path.go | 2 +- pkg/cloudbroker/grid/rename.go | 2 +- pkg/cloudbroker/grid/serialize.go | 2 +- pkg/cloudbroker/grid/services_restart.go | 42 ---- .../grid/set_cpu_allocation_parameter.go | 2 +- .../grid/set_cpu_allocation_ratio.go | 2 +- .../grid/set_cpu_allocation_ratio_for_vm.go | 2 +- .../grid/set_mem_allocation_ratio.go | 2 +- pkg/cloudbroker/grid/set_password_policy.go | 2 +- pkg/cloudbroker/grid/set_resources_limit.go | 4 +- pkg/cloudbroker/group.go | 2 +- pkg/cloudbroker/group/get.go | 46 ---- pkg/cloudbroker/group/group.go | 2 +- pkg/cloudbroker/group/list.go | 2 +- pkg/cloudbroker/image.go | 2 +- .../image/change_storage_policy.go | 2 +- pkg/cloudbroker/image/computeci_set.go | 42 ---- pkg/cloudbroker/image/computeci_unset.go | 38 ---- pkg/cloudbroker/image/create_cdrom_image.go | 2 +- pkg/cloudbroker/image/create_image.go | 2 +- pkg/cloudbroker/image/create_multi_image.go | 4 +- pkg/cloudbroker/image/create_virtual.go | 2 +- pkg/cloudbroker/image/delete.go | 2 +- pkg/cloudbroker/image/delete_cdrom_image.go | 2 +- pkg/cloudbroker/image/delete_images.go | 2 +- pkg/cloudbroker/image/disable.go | 2 +- pkg/cloudbroker/image/edit.go | 2 +- pkg/cloudbroker/image/enable.go | 2 +- pkg/cloudbroker/image/get.go | 2 +- pkg/cloudbroker/image/grant_access.go | 2 +- pkg/cloudbroker/image/image.go | 2 +- pkg/cloudbroker/image/link.go | 2 +- pkg/cloudbroker/image/list.go | 4 +- .../image/multi_image_add_links.go | 4 +- .../image/multi_image_del_links.go | 4 +- pkg/cloudbroker/image/multi_image_export.go | 2 +- pkg/cloudbroker/image/rename.go | 2 +- pkg/cloudbroker/image/revoke_access.go | 2 +- pkg/cloudbroker/image/serialize.go | 2 +- pkg/cloudbroker/image/share.go | 2 +- pkg/cloudbroker/k8ci.go | 2 +- pkg/cloudbroker/k8ci/access_add.go | 2 +- pkg/cloudbroker/k8ci/access_remove.go | 2 +- pkg/cloudbroker/k8ci/create.go | 2 +- pkg/cloudbroker/k8ci/delete.go | 2 +- pkg/cloudbroker/k8ci/disable.go | 2 +- pkg/cloudbroker/k8ci/enable.go | 2 +- pkg/cloudbroker/k8ci/get.go | 2 +- pkg/cloudbroker/k8ci/k8ci.go | 2 +- pkg/cloudbroker/k8ci/list.go | 2 +- pkg/cloudbroker/k8ci/list_deleted.go | 2 +- pkg/cloudbroker/k8ci/restore.go | 2 +- pkg/cloudbroker/k8ci/serialize.go | 2 +- pkg/cloudbroker/k8s.go | 2 +- pkg/cloudbroker/k8s/create.go | 4 +- pkg/cloudbroker/k8s/delete.go | 2 +- .../k8s/delete_master_from_group.go | 2 +- .../k8s/delete_worker_from_group.go | 2 +- pkg/cloudbroker/k8s/disable.go | 2 +- pkg/cloudbroker/k8s/enable.go | 2 +- pkg/cloudbroker/k8s/find_group_by_label.go | 2 +- pkg/cloudbroker/k8s/get.go | 2 +- pkg/cloudbroker/k8s/get_config.go | 2 +- pkg/cloudbroker/k8s/get_node_annotations.go | 2 +- pkg/cloudbroker/k8s/get_node_labels.go | 2 +- pkg/cloudbroker/k8s/get_node_taints.go | 2 +- .../k8s/get_worker_nodes_meta_data.go | 2 +- pkg/cloudbroker/k8s/k8s.go | 2 +- pkg/cloudbroker/k8s/list.go | 2 +- pkg/cloudbroker/k8s/list_deleted.go | 2 +- pkg/cloudbroker/k8s/migrate_to_zone.go | 2 +- pkg/cloudbroker/k8s/restore.go | 2 +- pkg/cloudbroker/k8s/serialize.go | 2 +- pkg/cloudbroker/k8s/start.go | 2 +- pkg/cloudbroker/k8s/stop.go | 2 +- pkg/cloudbroker/k8s/update.go | 2 +- .../k8s/update_worker_nodes_meta_data.go | 4 +- pkg/cloudbroker/k8s/worker_add.go | 2 +- pkg/cloudbroker/k8s/worker_reset.go | 2 +- pkg/cloudbroker/k8s/worker_restart.go | 2 +- pkg/cloudbroker/k8s/workers_group_add.go | 2 +- pkg/cloudbroker/k8s/workers_group_delete.go | 2 +- .../k8s/workers_group_get_by_name.go | 2 +- pkg/cloudbroker/kvmx86.go | 2 +- pkg/cloudbroker/kvmx86/create.go | 62 +++++- pkg/cloudbroker/kvmx86/create_blank.go | 9 +- pkg/cloudbroker/kvmx86/kvmx86.go | 2 +- pkg/cloudbroker/kvmx86/mass_create.go | 13 +- pkg/cloudbroker/lb.go | 2 +- pkg/cloudbroker/lb/backend_create.go | 2 +- pkg/cloudbroker/lb/backend_delete.go | 2 +- pkg/cloudbroker/lb/backend_server_add.go | 2 +- pkg/cloudbroker/lb/backend_server_delete.go | 2 +- pkg/cloudbroker/lb/backend_server_update.go | 2 +- pkg/cloudbroker/lb/backend_update.go | 2 +- pkg/cloudbroker/lb/config_reset.go | 2 +- pkg/cloudbroker/lb/create.go | 2 +- pkg/cloudbroker/lb/delete.go | 2 +- pkg/cloudbroker/lb/disable.go | 2 +- pkg/cloudbroker/lb/enable.go | 2 +- pkg/cloudbroker/lb/filter.go | 4 +- pkg/cloudbroker/lb/frontend_bind.go | 2 +- pkg/cloudbroker/lb/frontend_bind_delete.go | 2 +- pkg/cloudbroker/lb/frontend_binding_update.go | 2 +- pkg/cloudbroker/lb/frontend_create.go | 2 +- pkg/cloudbroker/lb/frontend_delete.go | 2 +- pkg/cloudbroker/lb/get.go | 2 +- pkg/cloudbroker/lb/lb.go | 2 +- pkg/cloudbroker/lb/list.go | 2 +- pkg/cloudbroker/lb/list_deleted.go | 2 +- pkg/cloudbroker/lb/make_highly_available.go | 2 +- pkg/cloudbroker/lb/migrate_to_zone.go | 2 +- pkg/cloudbroker/lb/restart.go | 2 +- pkg/cloudbroker/lb/restore.go | 2 +- pkg/cloudbroker/lb/serialize.go | 2 +- pkg/cloudbroker/lb/start.go | 2 +- pkg/cloudbroker/lb/stop.go | 2 +- pkg/cloudbroker/lb/update.go | 2 +- pkg/cloudbroker/lb/update_sysctl_params.go | 2 +- pkg/cloudbroker/network_qos_policy.go | 10 + pkg/cloudbroker/node.go | 2 +- pkg/cloudbroker/node/add_ssh_identity.go | 2 +- pkg/cloudbroker/node/apply_ipmi_action.go | 2 +- pkg/cloudbroker/node/autostart.go | 2 +- pkg/cloudbroker/node/consumption.go | 2 +- pkg/cloudbroker/node/decommission.go | 2 +- pkg/cloudbroker/node/enable.go | 2 +- pkg/cloudbroker/node/enable_nodes.go | 2 +- pkg/cloudbroker/node/get.go | 2 +- .../node/get_logical_cores_count.go | 2 +- pkg/cloudbroker/node/get_network_info.go | 2 +- pkg/cloudbroker/node/get_pci_devices.go | 2 +- pkg/cloudbroker/node/get_ssh_identity.go | 2 +- pkg/cloudbroker/node/install.go | 2 +- pkg/cloudbroker/node/list.go | 2 +- pkg/cloudbroker/node/maintenance.go | 2 +- pkg/cloudbroker/node/models.go | 2 +- pkg/cloudbroker/node/node.go | 2 +- .../node/pci_device_driver_to_kernel.go | 4 +- .../node/pci_device_driver_to_vfio.go | 4 +- pkg/cloudbroker/node/restrict.go | 2 +- pkg/cloudbroker/node/serialize.go | 2 +- pkg/cloudbroker/node/set_core_isolation.go | 2 +- .../node/set_cpu_allocation_ratio.go | 2 +- pkg/cloudbroker/node/set_huge_pages.go | 2 +- .../node/set_mem_allocation_ratio.go | 2 +- pkg/cloudbroker/node/set_resources_limit.go | 4 +- pkg/cloudbroker/node/set_sriov_status.go | 2 +- pkg/cloudbroker/node/set_vfs_number.go | 2 +- pkg/cloudbroker/node/set_vfs_params.go | 4 +- pkg/cloudbroker/node/update.go | 2 +- pkg/cloudbroker/node/update_description.go | 2 +- pkg/cloudbroker/pcidevice.go | 2 +- pkg/cloudbroker/pcidevice/create.go | 2 +- pkg/cloudbroker/pcidevice/delete.go | 2 +- pkg/cloudbroker/pcidevice/disable.go | 2 +- pkg/cloudbroker/pcidevice/enable.go | 2 +- pkg/cloudbroker/pcidevice/list.go | 2 +- pkg/cloudbroker/pcidevice/pcidevice.go | 2 +- pkg/cloudbroker/pcidevice/serialize.go | 2 +- pkg/cloudbroker/prometheus.go | 2 +- .../prometheus/compute_cpu_load.go | 2 +- .../prometheus/compute_memory_available.go | 2 +- .../prometheus/compute_memory_unused.go | 2 +- .../prometheus/compute_memory_usable.go | 2 +- .../prometheus/compute_memory_usage.go | 2 +- .../prometheus/compute_memory_used.go | 2 +- .../prometheus/compute_read_bytes.go | 2 +- .../prometheus/compute_read_requests.go | 2 +- .../prometheus/compute_receive_bytes.go | 2 +- .../prometheus/compute_receive_packets.go | 2 +- .../prometheus/compute_transmit_bytes.go | 2 +- .../prometheus/compute_transmit_packets.go | 2 +- .../prometheus/compute_write_bytes.go | 2 +- .../prometheus/compute_write_requests.go | 2 +- pkg/cloudbroker/prometheus/computes.go | 2 +- pkg/cloudbroker/prometheus/prometheus.go | 2 +- pkg/cloudbroker/qospolicy/create.go | 46 ++++ pkg/cloudbroker/qospolicy/create_rule.go | 94 ++++++++ pkg/cloudbroker/qospolicy/delete.go | 37 +++ pkg/cloudbroker/qospolicy/delete_rule.go | 41 ++++ pkg/cloudbroker/qospolicy/filter.go | 89 ++++++++ pkg/cloudbroker/qospolicy/filter_test.go | 97 ++++++++ pkg/cloudbroker/qospolicy/get.go | 43 ++++ pkg/cloudbroker/qospolicy/list.go | 88 ++++++++ pkg/cloudbroker/qospolicy/models.go | 122 ++++++++++ pkg/cloudbroker/qospolicy/qos_policy.go | 15 ++ pkg/cloudbroker/qospolicy/sorting.go | 39 ++++ pkg/cloudbroker/qospolicy/update.go | 52 +++++ pkg/cloudbroker/resmon.go | 2 +- pkg/cloudbroker/resmon/get_by_compute.go | 2 +- pkg/cloudbroker/resmon/get_by_computes.go | 2 +- pkg/cloudbroker/resmon/get_by_grid.go | 2 +- pkg/cloudbroker/resmon/get_by_node.go | 2 +- pkg/cloudbroker/resmon/get_by_nodes.go | 2 +- pkg/cloudbroker/resmon/models.go | 11 +- pkg/cloudbroker/resmon/resmon.go | 2 +- pkg/cloudbroker/rg.go | 2 +- pkg/cloudbroker/rg/access_grant.go | 2 +- pkg/cloudbroker/rg/access_revoke.go | 2 +- pkg/cloudbroker/rg/add_storage_policy.go | 2 +- pkg/cloudbroker/rg/affinity_group_computes.go | 2 +- pkg/cloudbroker/rg/affinity_groups_get.go | 2 +- pkg/cloudbroker/rg/affinity_groups_list.go | 2 +- pkg/cloudbroker/rg/audits.go | 40 ---- pkg/cloudbroker/rg/create.go | 8 +- pkg/cloudbroker/rg/del_storage_policy.go | 2 +- pkg/cloudbroker/rg/delete.go | 2 +- pkg/cloudbroker/rg/disable.go | 2 +- pkg/cloudbroker/rg/enable.go | 2 +- pkg/cloudbroker/rg/get.go | 2 +- .../rg/get_resource_consumption.go | 2 +- pkg/cloudbroker/rg/list.go | 2 +- pkg/cloudbroker/rg/list_computes.go | 2 +- pkg/cloudbroker/rg/list_deleted.go | 2 +- pkg/cloudbroker/rg/list_lb.go | 2 +- pkg/cloudbroker/rg/list_pfw.go | 2 +- pkg/cloudbroker/rg/list_vins.go | 2 +- pkg/cloudbroker/rg/mass_delete.go | 2 +- pkg/cloudbroker/rg/mass_disable.go | 2 +- pkg/cloudbroker/rg/mass_enable.go | 2 +- pkg/cloudbroker/rg/remove_def_net.go | 2 +- pkg/cloudbroker/rg/restore.go | 2 +- pkg/cloudbroker/rg/rg.go | 2 +- pkg/cloudbroker/rg/serialize.go | 2 +- .../rg/set_cpu_allocation_parameter.go | 2 +- .../rg/set_cpu_allocation_ratio.go | 2 +- pkg/cloudbroker/rg/set_def_net.go | 2 +- pkg/cloudbroker/rg/update.go | 4 +- pkg/cloudbroker/rg/update_compute_features.go | 2 +- pkg/cloudbroker/rg/update_resource_types.go | 2 +- pkg/cloudbroker/rg/usage.go | 2 +- pkg/cloudbroker/secgroup/create.go | 4 +- pkg/cloudbroker/secgroup/create_rule.go | 4 +- pkg/cloudbroker/secgroup/delete.go | 2 +- pkg/cloudbroker/secgroup/delete_rule.go | 2 +- pkg/cloudbroker/secgroup/get.go | 2 +- pkg/cloudbroker/secgroup/list.go | 2 +- pkg/cloudbroker/secgroup/security_group.go | 2 +- pkg/cloudbroker/secgroup/update.go | 2 +- pkg/cloudbroker/securitygroup.go | 2 +- pkg/cloudbroker/sep.go | 2 +- pkg/cloudbroker/sep/access_grant.go | 43 ---- pkg/cloudbroker/sep/access_grant_to_pool.go | 50 ----- pkg/cloudbroker/sep/access_revoke.go | 42 ---- pkg/cloudbroker/sep/access_revoke_to_pool.go | 50 ----- pkg/cloudbroker/sep/add_consumer_nodes.go | 2 +- pkg/cloudbroker/sep/add_pool.go | 2 +- pkg/cloudbroker/sep/add_provider_nodes.go | 2 +- pkg/cloudbroker/sep/config_field_edit.go | 2 +- pkg/cloudbroker/sep/config_insert.go | 2 +- pkg/cloudbroker/sep/config_validate.go | 2 +- pkg/cloudbroker/sep/consumption.go | 2 +- pkg/cloudbroker/sep/create.go | 2 +- pkg/cloudbroker/sep/decommission.go | 2 +- pkg/cloudbroker/sep/del_consumer_nodes.go | 2 +- pkg/cloudbroker/sep/del_pool.go | 2 +- pkg/cloudbroker/sep/delete.go | 2 +- pkg/cloudbroker/sep/disable.go | 2 +- pkg/cloudbroker/sep/disk_list.go | 2 +- pkg/cloudbroker/sep/enable.go | 2 +- pkg/cloudbroker/sep/get.go | 2 +- pkg/cloudbroker/sep/get_config.go | 2 +- pkg/cloudbroker/sep/get_pool.go | 2 +- pkg/cloudbroker/sep/get_template.go | 2 +- pkg/cloudbroker/sep/list.go | 2 +- .../sep/list_available_sep_and_pools.go | 2 +- pkg/cloudbroker/sep/sep.go | 2 +- pkg/cloudbroker/sep/serialize.go | 2 +- pkg/cloudbroker/sep/shared_lock_start.go | 2 +- pkg/cloudbroker/sep/shared_lock_stop.go | 2 +- pkg/cloudbroker/sep/update.go | 2 +- pkg/cloudbroker/storage_policy.go | 2 +- pkg/cloudbroker/stpolicy/add_pool.go | 2 +- pkg/cloudbroker/stpolicy/create.go | 4 +- pkg/cloudbroker/stpolicy/delete.go | 2 +- pkg/cloudbroker/stpolicy/delete_pool.go | 2 +- pkg/cloudbroker/stpolicy/disable.go | 2 +- pkg/cloudbroker/stpolicy/enable.go | 2 +- pkg/cloudbroker/stpolicy/get.go | 2 +- pkg/cloudbroker/stpolicy/list.go | 2 +- pkg/cloudbroker/stpolicy/storage_policy.go | 2 +- pkg/cloudbroker/stpolicy/update.go | 4 +- pkg/cloudbroker/tasks.go | 2 +- pkg/cloudbroker/tasks/get.go | 2 +- pkg/cloudbroker/tasks/list.go | 10 +- pkg/cloudbroker/tasks/models.go | 3 + pkg/cloudbroker/tasks/tasks.go | 2 +- pkg/cloudbroker/trunk.go | 2 +- pkg/cloudbroker/trunk/access_grant.go | 2 +- pkg/cloudbroker/trunk/access_revoke.go | 2 +- pkg/cloudbroker/trunk/create.go | 2 +- pkg/cloudbroker/trunk/destroy.go | 2 +- pkg/cloudbroker/trunk/disable.go | 2 +- pkg/cloudbroker/trunk/enable.go | 2 +- pkg/cloudbroker/trunk/get.go | 2 +- pkg/cloudbroker/trunk/list.go | 2 +- pkg/cloudbroker/trunk/trunk.go | 2 +- pkg/cloudbroker/trunk/update.go | 2 +- pkg/cloudbroker/user.go | 2 +- pkg/cloudbroker/user/api_list.go | 2 +- pkg/cloudbroker/user/apiaccess_join.go | 2 +- pkg/cloudbroker/user/apiaccess_leave.go | 2 +- pkg/cloudbroker/user/apiaccess_list.go | 2 +- pkg/cloudbroker/user/block.go | 2 +- pkg/cloudbroker/user/create.go | 2 +- pkg/cloudbroker/user/delete.go | 2 +- pkg/cloudbroker/user/delete_by_guid.go | 2 +- pkg/cloudbroker/user/delete_users.go | 2 +- pkg/cloudbroker/user/get.go | 2 +- pkg/cloudbroker/user/get_audit.go | 62 ------ .../user/get_matching_usernames.go | 2 +- pkg/cloudbroker/user/list.go | 2 +- pkg/cloudbroker/user/unblock.go | 2 +- pkg/cloudbroker/user/user.go | 2 +- pkg/cloudbroker/vfpool.go | 2 +- pkg/cloudbroker/vfpool/create.go | 2 +- pkg/cloudbroker/vfpool/delete.go | 2 +- pkg/cloudbroker/vfpool/disable.go | 2 +- pkg/cloudbroker/vfpool/enable.go | 2 +- pkg/cloudbroker/vfpool/get.go | 2 +- pkg/cloudbroker/vfpool/list.go | 2 +- pkg/cloudbroker/vfpool/serialize.go | 2 +- pkg/cloudbroker/vfpool/update.go | 2 +- pkg/cloudbroker/vfpool/vfpool.go | 2 +- pkg/cloudbroker/vgpu.go | 2 +- pkg/cloudbroker/vgpu/allocate.go | 38 ---- pkg/cloudbroker/vgpu/create.go | 22 +- pkg/cloudbroker/vgpu/deallocate.go | 42 ---- pkg/cloudbroker/vgpu/destroy.go | 8 +- pkg/cloudbroker/vgpu/list.go | 26 +-- pkg/cloudbroker/vgpu/models.go | 55 +++-- pkg/cloudbroker/vgpu/serialize.go | 2 +- pkg/cloudbroker/vgpu/vgpu.go | 2 +- pkg/cloudbroker/vins.go | 2 +- pkg/cloudbroker/vins/audits.go | 40 ---- pkg/cloudbroker/vins/create_in_account.go | 4 +- pkg/cloudbroker/vins/create_in_rg.go | 4 +- pkg/cloudbroker/vins/default_qos_update.go | 2 +- pkg/cloudbroker/vins/delete.go | 2 +- pkg/cloudbroker/vins/disable.go | 2 +- pkg/cloudbroker/vins/dns_apply.go | 2 +- pkg/cloudbroker/vins/enable.go | 2 +- pkg/cloudbroker/vins/extnet_connect.go | 2 +- pkg/cloudbroker/vins/extnet_disconnect.go | 2 +- pkg/cloudbroker/vins/extnet_list.go | 2 +- pkg/cloudbroker/vins/get.go | 2 +- pkg/cloudbroker/vins/ip_list.go | 2 +- pkg/cloudbroker/vins/ip_release.go | 2 +- pkg/cloudbroker/vins/ip_reserve.go | 2 +- pkg/cloudbroker/vins/list.go | 2 +- pkg/cloudbroker/vins/list_deleted.go | 2 +- pkg/cloudbroker/vins/mass_delete.go | 2 +- pkg/cloudbroker/vins/mass_disable.go | 2 +- pkg/cloudbroker/vins/mass_enable.go | 2 +- pkg/cloudbroker/vins/migrate_to_zone.go | 2 +- pkg/cloudbroker/vins/nat_rule_add.go | 2 +- pkg/cloudbroker/vins/nat_rule_del.go | 2 +- pkg/cloudbroker/vins/nat_rule_list.go | 2 +- pkg/cloudbroker/vins/net_qos.go | 2 +- pkg/cloudbroker/vins/restore.go | 2 +- pkg/cloudbroker/vins/serialize.go | 2 +- .../vins/static_route_access_grant.go | 2 +- .../vins/static_route_access_revoke.go | 2 +- pkg/cloudbroker/vins/static_route_add.go | 2 +- pkg/cloudbroker/vins/static_route_del.go | 2 +- pkg/cloudbroker/vins/static_route_list.go | 2 +- pkg/cloudbroker/vins/update.go | 2 +- pkg/cloudbroker/vins/vins.go | 2 +- pkg/cloudbroker/vins/vnfdev_redeploy.go | 2 +- pkg/cloudbroker/vins/vnfdev_reset.go | 2 +- pkg/cloudbroker/vins/vnfdev_restart.go | 2 +- pkg/cloudbroker/vins/vnfdev_start.go | 2 +- pkg/cloudbroker/vins/vnfdev_stop.go | 2 +- pkg/cloudbroker/zone.go | 2 +- .../zone/add_cpu_alignment_profile.go | 2 +- pkg/cloudbroker/zone/add_node.go | 2 +- pkg/cloudbroker/zone/create.go | 2 +- pkg/cloudbroker/zone/del_node.go | 2 +- pkg/cloudbroker/zone/delete.go | 2 +- .../zone/delete_cpu_alignment_profile.go | 2 +- pkg/cloudbroker/zone/get.go | 2 +- .../zone/get_cpu_alignment_profile.go | 2 +- pkg/cloudbroker/zone/list.go | 2 +- .../zone/list_cpu_alignment_profile.go | 2 +- pkg/cloudbroker/zone/models.go | 18 ++ pkg/cloudbroker/zone/node_autostart.go | 2 +- pkg/cloudbroker/zone/serialize.go | 2 +- pkg/cloudbroker/zone/set_resources_limit.go | 4 +- .../zone/test_cpu_alignment_profile.go | 2 +- pkg/cloudbroker/zone/update.go | 2 +- .../zone/update_cpu_alignment_profile.go | 4 +- pkg/cloudbroker/zone/zone.go | 2 +- pkg/sdn/access_groups.go | 2 +- pkg/sdn/acsgroups/access_groups.go | 2 +- pkg/sdn/acsgroups/create.go | 4 +- pkg/sdn/acsgroups/delete.go | 4 +- pkg/sdn/acsgroups/get.go | 2 +- pkg/sdn/acsgroups/list.go | 2 +- pkg/sdn/acsgroups/update.go | 4 +- pkg/sdn/acsgroups/user_add.go | 4 +- pkg/sdn/acsgroups/user_delete.go | 4 +- pkg/sdn/acsgroups/user_list.go | 2 +- pkg/sdn/acsgroups/user_update_role.go | 4 +- pkg/sdn/address_pools.go | 2 +- pkg/sdn/adrspools/adress_pools.go | 2 +- pkg/sdn/adrspools/create.go | 4 +- pkg/sdn/adrspools/delete.go | 4 +- pkg/sdn/adrspools/get.go | 2 +- pkg/sdn/adrspools/list.go | 2 +- pkg/sdn/adrspools/serialize.go | 2 +- pkg/sdn/adrspools/update.go | 4 +- pkg/sdn/default_security_policies.go | 2 +- .../default_security_policies.go | 2 +- pkg/sdn/defsecpolicies/list.go | 2 +- pkg/sdn/defsecpolicies/serialize.go | 2 +- pkg/sdn/defsecpolicies/update.go | 4 +- pkg/sdn/extnet.go | 2 +- pkg/sdn/extnet/create.go | 4 +- pkg/sdn/extnet/delete.go | 4 +- pkg/sdn/extnet/extnet.go | 2 +- pkg/sdn/extnet/get.go | 2 +- pkg/sdn/extnet/list.go | 2 +- pkg/sdn/extnet/port_add.go | 4 +- pkg/sdn/extnet/port_update.go | 4 +- pkg/sdn/extnet/update.go | 4 +- pkg/sdn/flips.go | 2 +- pkg/sdn/flips/create.go | 4 +- pkg/sdn/flips/delete.go | 4 +- pkg/sdn/flips/flips.go | 2 +- pkg/sdn/flips/get.go | 2 +- pkg/sdn/flips/list.go | 2 +- pkg/sdn/flips/update.go | 4 +- pkg/sdn/hypervisors.go | 2 +- pkg/sdn/hypervisors/connect_node.go | 4 +- pkg/sdn/hypervisors/delete.go | 4 +- pkg/sdn/hypervisors/get.go | 2 +- pkg/sdn/hypervisors/hypervisors.go | 2 +- pkg/sdn/hypervisors/list.go | 2 +- pkg/sdn/hypervisors/update_display_name.go | 2 +- pkg/sdn/logical_ports.go | 2 +- pkg/sdn/logicalports/create.go | 4 +- pkg/sdn/logicalports/create_batch.go | 4 +- pkg/sdn/logicalports/delete.go | 4 +- pkg/sdn/logicalports/delete_batch.go | 4 +- pkg/sdn/logicalports/exclude_firewall.go | 4 +- pkg/sdn/logicalports/get.go | 2 +- .../logicalports/get_by_unique_identifier.go | 2 +- pkg/sdn/logicalports/list.go | 2 +- pkg/sdn/logicalports/logicalports.go | 2 +- pkg/sdn/logicalports/migrate_cancel.go | 4 +- pkg/sdn/logicalports/migrate_start.go | 4 +- pkg/sdn/logicalports/serialize.go | 2 +- pkg/sdn/logicalports/unexclude_firewall.go | 4 +- pkg/sdn/logicalports/update.go | 4 +- pkg/sdn/netobjgroups/attach_extnet_ports.go | 4 +- .../attach_l2_connection_ports.go | 4 +- pkg/sdn/netobjgroups/attach_logical_ports.go | 4 +- pkg/sdn/netobjgroups/create.go | 4 +- pkg/sdn/netobjgroups/delete.go | 4 +- .../detach_external_network_ports.go | 4 +- .../detach_l2_connection_ports.go | 4 +- pkg/sdn/netobjgroups/detach_logical_ports.go | 4 +- pkg/sdn/netobjgroups/get.go | 2 +- pkg/sdn/netobjgroups/list.go | 2 +- pkg/sdn/netobjgroups/network_object_groups.go | 2 +- pkg/sdn/netobjgroups/update.go | 4 +- pkg/sdn/network_object_groups.go | 2 +- pkg/sdn/routers.go | 2 +- pkg/sdn/routers/create.go | 4 +- pkg/sdn/routers/delete.go | 4 +- pkg/sdn/routers/gateaway_port.go | 2 +- pkg/sdn/routers/get.go | 2 +- pkg/sdn/routers/gwport/create.go | 4 +- pkg/sdn/routers/gwport/delete.go | 4 +- pkg/sdn/routers/gwport/gateaway_port.go | 2 +- pkg/sdn/routers/gwport/get.go | 2 +- pkg/sdn/routers/gwport/list.go | 2 +- pkg/sdn/routers/gwport/update.go | 4 +- pkg/sdn/routers/list.go | 2 +- pkg/sdn/routers/policies.go | 2 +- pkg/sdn/routers/policies/list.go | 2 +- pkg/sdn/routers/policies/policies.go | 2 +- pkg/sdn/routers/routers.go | 2 +- pkg/sdn/routers/serialize.go | 2 +- pkg/sdn/routers/update.go | 4 +- pkg/sdn/sdn.go | 2 +- pkg/sdn/secpolicies/create.go | 4 +- pkg/sdn/secpolicies/delete.go | 4 +- pkg/sdn/secpolicies/get.go | 2 +- pkg/sdn/secpolicies/list.go | 2 +- pkg/sdn/secpolicies/move.go | 4 +- pkg/sdn/secpolicies/rule.go | 2 +- pkg/sdn/secpolicies/rule/get.go | 2 +- pkg/sdn/secpolicies/rule/list.go | 2 +- pkg/sdn/secpolicies/rule/rule.go | 2 +- pkg/sdn/secpolicies/rule/serialize.go | 2 +- pkg/sdn/secpolicies/security_policies.go | 2 +- pkg/sdn/secpolicies/serialize.go | 2 +- pkg/sdn/secpolicies/update.go | 4 +- pkg/sdn/security_policies.go | 2 +- pkg/sdn/segments.go | 2 +- pkg/sdn/segments/create.go | 4 +- pkg/sdn/segments/delete.go | 4 +- pkg/sdn/segments/get_faa.go | 2 +- pkg/sdn/segments/segments.go | 2 +- pkg/sdn/segments/update.go | 4 +- pkg/sdn/version.go | 2 +- pkg/sdn/version/version.go | 2 +- samples/client/client.go | 4 +- samples/client/client_test.go | 6 +- universal-client.go | 8 +- 1285 files changed, 4016 insertions(+), 3302 deletions(-) delete mode 100644 pkg/cloudapi/account/audits.go delete mode 100644 pkg/cloudapi/account/delete.go delete mode 100644 pkg/cloudapi/account/disable_enable.go delete mode 100644 pkg/cloudapi/account/get_consumed_cloud_units_by_type.go delete mode 100644 pkg/cloudapi/account/get_reserved_account_units.go delete mode 100644 pkg/cloudapi/compute/audits.go create mode 100644 pkg/cloudapi/compute/change_qos_policies.go delete mode 100644 pkg/cloudapi/compute/get_audits.go create mode 100644 pkg/cloudapi/network_qos_policy.go create mode 100644 pkg/cloudapi/qospolicy/create.go create mode 100644 pkg/cloudapi/qospolicy/create_rule.go create mode 100644 pkg/cloudapi/qospolicy/delete.go create mode 100644 pkg/cloudapi/qospolicy/delete_rule.go create mode 100644 pkg/cloudapi/qospolicy/filter.go create mode 100644 pkg/cloudapi/qospolicy/filter_test.go create mode 100644 pkg/cloudapi/qospolicy/get.go create mode 100644 pkg/cloudapi/qospolicy/list.go create mode 100644 pkg/cloudapi/qospolicy/models.go create mode 100644 pkg/cloudapi/qospolicy/qos_policy.go create mode 100644 pkg/cloudapi/qospolicy/sorting.go create mode 100644 pkg/cloudapi/qospolicy/update.go delete mode 100644 pkg/cloudapi/rg/audits.go delete mode 100644 pkg/cloudapi/user/get_audit.go delete mode 100644 pkg/cloudapi/user/is_valid_invite_user_token.go delete mode 100644 pkg/cloudapi/vins/audits.go delete mode 100644 pkg/cloudbroker/account/audits.go delete mode 100644 pkg/cloudbroker/account/disable.go delete mode 100644 pkg/cloudbroker/account/enable.go delete mode 100644 pkg/cloudbroker/compute/audits.go create mode 100644 pkg/cloudbroker/compute/change_qos_policies.go delete mode 100644 pkg/cloudbroker/compute/computeci_set.go delete mode 100644 pkg/cloudbroker/compute/computeci_unset.go delete mode 100644 pkg/cloudbroker/compute/get_audits.go delete mode 100644 pkg/cloudbroker/compute/get_log.go delete mode 100644 pkg/cloudbroker/grid/execute_maintenance_script.go delete mode 100644 pkg/cloudbroker/grid/list_emails.go delete mode 100644 pkg/cloudbroker/grid/services_restart.go delete mode 100644 pkg/cloudbroker/group/get.go delete mode 100644 pkg/cloudbroker/image/computeci_set.go delete mode 100644 pkg/cloudbroker/image/computeci_unset.go create mode 100644 pkg/cloudbroker/network_qos_policy.go create mode 100644 pkg/cloudbroker/qospolicy/create.go create mode 100644 pkg/cloudbroker/qospolicy/create_rule.go create mode 100644 pkg/cloudbroker/qospolicy/delete.go create mode 100644 pkg/cloudbroker/qospolicy/delete_rule.go create mode 100644 pkg/cloudbroker/qospolicy/filter.go create mode 100644 pkg/cloudbroker/qospolicy/filter_test.go create mode 100644 pkg/cloudbroker/qospolicy/get.go create mode 100644 pkg/cloudbroker/qospolicy/list.go create mode 100644 pkg/cloudbroker/qospolicy/models.go create mode 100644 pkg/cloudbroker/qospolicy/qos_policy.go create mode 100644 pkg/cloudbroker/qospolicy/sorting.go create mode 100644 pkg/cloudbroker/qospolicy/update.go delete mode 100644 pkg/cloudbroker/rg/audits.go delete mode 100644 pkg/cloudbroker/sep/access_grant.go delete mode 100644 pkg/cloudbroker/sep/access_grant_to_pool.go delete mode 100644 pkg/cloudbroker/sep/access_revoke.go delete mode 100644 pkg/cloudbroker/sep/access_revoke_to_pool.go delete mode 100644 pkg/cloudbroker/user/get_audit.go delete mode 100644 pkg/cloudbroker/vgpu/allocate.go delete mode 100644 pkg/cloudbroker/vgpu/deallocate.go delete mode 100644 pkg/cloudbroker/vins/audits.go diff --git a/CHANGELOG.md b/CHANGELOG.md index e31c1cf5..c7218eb7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,35 +1,209 @@ -## Version 15.7.0 - -Методы `Audits` в cloudapi/compute, cloudbroker/compute, cloudapi/account, cloudbroker/account, cloudapi/vins, cloudbroker/vins, cloudapi/rg и cloudbroker/rg стали deprecated и будут удалены в версии 16.0, вместо них необходимо использовать метод `List` в cloudapi/audit и cloudbroker/audit с соответствующими фильтрами -Методы `AccessGrant`, `AccessGrantToPool`, `AccessRevoke`, `AccessRevokeToPool` в cloudbroker/sep стали deprecated и будут удалены в версии 16.0 -Методы `ComputeCISet`, `ComputeCIUnset`, `GetAudits` в cloudbroker/compute и `GetAudits` в cloudapi/compute стали deprecated и будут удалены в версии 16.0 -Методы `ComputeCISet`, `ComputeCIUnset` в cloudbroker/image стали deprecated и будут удалены в версии 16.0 -Методы `Delete`, `Disable`, `Enable`, `GetConsumedCloudUnitsByType`, `GetReservedAccountUnits` в cloudapi/account стали deprecated и будут удалены в версии 16.0 -Методы `Disable`, `Enable` в cloudbroker/account стали deprecated и будут удалены в версии 16.0 -Метод `IsValidInviteUserToken` в cloudapi/user стал deprecated и будет удален в версии 16.0 -Метод `GetLog` в cloudbroker/compute стал deprecated и будет удален в версии 16.0 -Методы `ExecuteMaintenanceScript`, `ListEmails`, `ServicesRestart` в cloudbroker/grid стали deprecated и будут удалены в версии 16.0 -Метод `Get` в cloudbroker/group стал deprecated и будет удален в версии 16.0 +## Version 16.0.0 +Метод `ConfigFieldEdit` в cloudbroker/sep стал deprecated и в следующих версиях будет удалён ### Добавлено +#### Общее +| Идентификатор задачи | Описание | +| --- | --- | +| BGOS-991 | Допустимые значения `vgpu` и `pcidevice` в валидатор возможностей гипервизора ComputeFeatures | + +#### account +| Идентификатор задачи | Описание | +| --- | --- | +| BGOS-986 | Вычисляемое поле `EnableDefaultGateway` в структуру ответа `ItemVINS` в cloudbroker/account и cloudapi/account | +| BGOS-989 | Вычисляемые поля `Starting`, `Stopping`, `Paused`, `Pausing`, `Merge`, `Migrating`, `MigratingIn`, `MigratingOut`, `Down`, `Scheduled`, `BackupStopped`, `BackupRunning`, `Snapcreate`, `Cloning` и `Rollback` в структуры ответа `Computes` и `RGComputes` в cloudapi/account | +| BGOS-989 | Вычисляемые поля `Starting`, `Stopping`, `Paused`, `Pausing`, `Merge`, `Migrating`, `MigratingIn`, `MigratingOut`, `Down`, `Scheduled`, `BackupStopped`, `BackupRunning`, `Snapcreate`, `Cloning` и `Rollback` в структуру ответа `Computes` в cloudbroker/account | + #### compute | Идентификатор задачи | Описание | | --- | --- | -| BGOS-966 | Вычисляемое поле `CPUSet` в структуру ответа `RecordMigrateStorageInfo` в cloudbroker/compute | -| BGOS-966 | Вычисляемое поля `Clock`, `CPUAlignmentProfile` и `Weight` в структуру `ShadowCompute` в cloudbroker/compute | -| BGOS-966 | Вычисляемое поле `EnableDefaultGateway` в структуру `ItemShadowComputeInterface` в cloudbroker/compute | +| BGOS-977 | Вычисляемое поле `ImageID` в структуру ответа `InfoDisk` в cloudbroker/compute и cloudapi/compute | +| BGOS-978 | Вычисляемое поле `WatchdogAction` в структуры ответа `RecordCompute` и `ItemCompute` в cloudapi/compute | +| BGOS-978 | Вычисляемое поле `WatchdogAction` в структуры ответа `RecordCompute` и `InfoCompute` в cloudbroker/compute | +| BGOS-979 | Опциональное поле `WatchdogAction` в структуру запроса `UpdateRequest` в cloudapi/compute и cloudbroker/compute | +| BGOS-994 | Вычисляемое поле `QoSPolicies` в структуру ответа `ItemVNFInterface` в cloudapi/compute | +| BGOS-994 | Вычисляемое поле `QoSPolicies` в структуру ответа `ItemInterface` в cloudbroker/compute | +| BGOS-994 | Опциональное поле `QoSPolicies` в структуру запроса `NetAttachRequest` в cloudapi/compute и cloudbroker/compute | +| BGOS-994 | Методы `ChangeQoSPolicies` и `ChangeQoSPoliciesAsync` в cloudbroker/compute и cloudapi/compute | +| BGOS-995 | Вычисляемые поля `ComputeID`, `BusNumber`, `DeviceReference`, `MdevUUID`, `ParentPCIAddress`, `ProfileReference` и `SplitMode` в структуру ответа `ItemVGPU` в cloudbroker/compute и cloudapi/compute | +| BGOS-999 | Вычисляемое поле `AccountIDs` в структуру ответа `ItemPCIDevice` в cloudbroker/compute и cloudapi/compute | + +#### disks +| Идентификатор задачи | Описание | +| --- | --- | +| BGOS-976 | Метод `CreateAsync` в cloudapi/disks | +| BGOS-976 | Методы `CreateAsync` и `MigrateAsync` в cloudbroker/disks | + +#### grid +| Идентификатор задачи | Описание | +| --- | --- | +| BGOS-1000 | Вычисляемые поля `ReservedCPU` и `ReservedRAM` в структуру ответа `RecordSettingsGrid` в cloudbroker/grid | + +#### kvmx86 +| Идентификатор задачи | Описание | +| --- | --- | +| BGOS-979 | Опциональное поле `WatchdogAction` в структуры запроса `CreateRequest` и `CreateBlankRequest` в cloudapi/kvmx86 | +| BGOS-979 | Опциональное поле `WatchdogAction` в структуры запроса `CreateRequest`, `CreateBlankRequest` и `MassCreateRequest` в cloudbroker/kvmx86 | +| BGOS-983 | Метод `CreateAsync` в cloudbroker/kvmx86 и cloudapi/kvmx86 | +| BGOS-984 | Опциональное поле `ReadOnly` в структуру запроса `DataDisk` в cloudbroker/kvmx86 и cloudapi/kvmx86 | +| BGOS-994 | Опциональное поле `QoSPolicies` в структуру запроса `Interface` в cloudbroker/kvmx86 и cloudapi/kvmx86 | +| BGOS-994 | Опциональное поле `QoSPolicies` в структуру запроса `InterfaceMassCreate` в cloudbroker/kvmx86 | + +#### locations +| Идентификатор задачи | Описание | +| --- | --- | +| BGOS-992 | Вычисляемое поле `Budget` в структуру ответа `ItemLocation` в cloudapi/locations | + +#### network qos policy +| Идентификатор задачи | Описание | +| --- | --- | +| BGOS-993 | Группа ручек `QoSPolicy` в cloudbroker/qospolicy и cloudapi/qospolicy | + +#### resmon +| Идентификатор задачи | Описание | +| --- | --- | +| BGOS-981 | Вычисляемое поле `TotalVCPUs` в структуру ответа `GetByNodePoint` в cloudbroker/resmon | + +#### rg +| Идентификатор задачи | Описание | +| --- | --- | +| BGOS-998 | Опциональное поле `IPCIDR` в структуру запроса `CreateRequest` в cloudbroker/rg | + +#### tasks +| Идентификатор задачи | Описание | +| --- | --- | +| BGOS-996 | Опицональные поля `CreatedTimeAt` и `CreatedTimeTo` в структуру запроса `ListRequest` в cloudapi/tasks и cloudbroker/tasks | +| BGOS-996 | Вычисляемое поле `CreatedTime` в структуру ответа `RecordAsyncTask` в cloudapi/tasks | +| BGOS-996 | Вычисляемое поле `CreatedTime` в структуру ответа `ItemTask` в cloudbroker/tasks | + +#### user +| Идентификатор задачи | Описание | +| --- | --- | +| BGOS-988 | Вычисляемые поля `Destroying`, `Confirmed` и `Deleted` в структуру ответа `Accounts` в cloudapi/user | +| BGOS-988 | Вычисляемые поля `Starting`, `Stopping`, `Paused`, `Pausing`, `Merge`, `Migrating`, `MigratingIn`, `MigratingOut`, `Down`, `Scheduled`, `BackupStopped`, `BackupRunning`, `Snapcreate`, `Cloning` и `Rollback` в структуру ответа `Computes` в cloudapi/user | +| BGOS-988 | Вычисляемые поля `Modeled`, `Created`, `Deleted`, `Deleting`, `Destroying`, `Disabling`, `Enabling` и `Restoring` в структуру ответа `RGs` в cloudapi/user | + +#### vins +| Идентификатор задачи | Описание | +| --- | --- | +| BGOS-986 | Вычисляемое поле `EnableDefaultGateway` в структуру ответа `ItemVINS` в cloudapi/vins | + +#### vgpu +| Идентификатор задачи | Описание | +| --- | --- | +| BGOS-980 | Опциональные поля `AccountIDs`, `MDEVType` и `PCIAddress` в структуру запроса `CreateRequest` в cloudbroker/vgpu | +| BGOS-980 | Опциональное поле `SplitMode` в структуру запроса `ListRequest` в cloudbroker/vgpu и cloudapi/vgpu | +| BGOS-980 | Вычисляемые поля `ComputeID`, `DeviceReference`, `MdevUUID`, `ParentPCIAddress`, `ProfileReference` и `SplitMode` в структуру ответа `ItemVGPU` в cloudbroker/vgpu и cloudapi/vgpu | +| BGOS-980 | Вычисляемое поле `BusNumber` в структуру ответа `ItemVGPU` в cloudbroker/vgpu | + +#### zone +| Идентификатор задачи | Описание | +| --- | --- | +| BGOS-997 | Вычисляемые поля `SDRS`, `SDRSMode` и `LoggingLevel` в структуры ответа `RecordZone` и `ItemZone` в cloudapi/zone и cloudbroker/zone | + + +### Изменено + +#### bservice +| Идентификатор задачи | Описание | +| --- | --- | +| BGOS-1003 | Тип опционального поля `UserData` в структуре запроса `GroupAddRequest` сo `string` на `interface{}` в cloudbroker/bservice и cloudapi/bservice | + +#### compute +| Идентификатор задачи | Описание | +| --- | --- | +| BGOS-995 | Название вычисляемого поля `AccountID` на `AccountIDs` и тип с `uint64` на `[]uint64` в структуре ответа `ItemVGPU` в cloudbroker/compute и cloudapi/compute | +| BGOS-995 | Тип вычисляемого поля `VGPUs` с `[]VGPUItem` на `[]ItemVGPU` в структурах ответов `RecordCompute` и `SnapRecordCompute` в cloudbroker/compute и cloudapi/compute | + +#### disks +| Идентификатор задачи | Описание | +| --- | --- | +| BGOS-987 | Тип опционального поля `Status` в структуре запроса `ListRequest` с `string` на `[]string` в cloudbroker/disks и cloudapi/disks | + +#### k8s +| Идентификатор задачи | Описание | +| --- | --- | +| BGOS-1002 | Тип опционального поля `UserData` в структурах запросов `CreateRequest` и `UpdateWorkerNodesMetaDataRequest` со `string` на `interface{}` в cloudbroker/k8s и cloudapi/k8s | #### node | Идентификатор задачи | Описание | | --- | --- | -| BGOS-968 | Вычисляемое поле `OVSDPDKCores` в структуру ответа `DPDK` в cloudbroker/node | +| BGOS-982 | Тип вычисляемого поля `Total` с `ResourcesInfo` на `FreeResourcesInfo` в структуре ответа `ConsumptionInfo` в cloudbroker/node | + +#### vgpu +| Идентификатор задачи | Описание | +| --- | --- | +| BGOS-980 | Тип опционального поля `ProfileID` в структуре запроса `CreateRequest` с `uint64` на `string` в cloudbroker/vgpu | +| BGOS-980 | Название вычисляемого поля `AccountID` на `AccountIDs` и тип с `uint64` на `[]uint64` в структуре ответа `ItemVGPU` в cloudbroker/vgpu и cloudapi/vgpu | +| BGOS-980 | Название опционального поля `NID` на `NodeID` в структуре запроса `ListRequest` в cloudbroker/vgpu и cloudapi/vgpu | + ### Удалено -#### node +#### account | Идентификатор задачи | Описание | | --- | --- | -| BGOS-968 | Вычисляемое поле `PMDCPU` из структуры ответа `DPDK` в cloudbroker/node | \ No newline at end of file +| BGOS-975 | Метод `Audits` из cloudapi/account и cloudbroker/account | +| BGOS-975 | Методы `Delete`, `Disable`, `Enable`, `GetConsumedCloudUnitsByType` и `GetReservedAccountUnits` из cloudapi/account | +| BGOS-975 | Методы `Disable` и `Enable` из cloudbroker/account | + +#### compute +| Идентификатор задачи | Описание | +| --- | --- | +| BGOS-975 | Метод `Audits` из cloudapi/compute и cloudbroker/compute | +| BGOS-975 | Методы `ComputeCISet`, `ComputeCIUnset`, `GetLog` и `GetAudits` из cloudbroker/compute | +| BGOS-975 | Метод `GetAudits` из cloudapi/compute | +| BGOS-995 | Вычисляемые поля `LastClaimedBy`, `Mode`, `ProfileID`, `RAM`, `ReferenceID`, `RGID`, `Type` и `VMID` из структуры `ItemVGPU` в cloudbroker/compute и cloudapi/compute | +| BGOS-995 | Cтруктура `VGPUItem` в cloudbroker/compute и cloudapi/compute | +| BGOS-999 | Вычисляемое поле `RGID` из структуры ответа `ItemPCIDevice` в cloudbroker/compute и cloudapi/compute | +| BGOS-999 | Опциональное поле `RGID` из структуры запроса `ListPCIDeviceRequest` в cloudbroker/compute и cloudapi/compute | + +#### grid +| Идентификатор задачи | Описание | +| --- | --- | +| BGOS-975 | Методы `ExecuteMaintenanceScript`, `ListEmails` и `ServicesRestart` из cloudbroker/grid | + +#### group +| Идентификатор задачи | Описание | +| --- | --- | +| BGOS-975 | Метод `Get` из cloudbroker/group | + +#### image +| Идентификатор задачи | Описание | +| --- | --- | +| BGOS-975 | Методы `ComputeCISet` и `ComputeCIUnset` из cloudbroker/image | + +#### rg +| Идентификатор задачи | Описание | +| --- | --- | +| BGOS-975 | Метод `Audits` из cloudapi/rg и cloudbroker/rg | + +#### sep +| Идентификатор задачи | Описание | +| --- | --- | +| BGOS-975 | Методы `AccessGrant`, `AccessGrantToPool`, `AccessRevoke` и `AccessRevokeToPool` из cloudbroker/sep | + +#### user +| Идентификатор задачи | Описание | +| --- | --- | +| BGOS-975 | Метод `IsValidInviteUserToken` из cloudapi/user | +| BGOS-975 | Метод `GetAudit` из cloudapi/user и cloudbroker/user | +| BGOS-988 | Структуры `CSs` и `VMs` из структуры ответа `BriefResources` из cloudapi/user | +| BGOS-988 | Вычисляемое поле `Enabled` из структур ответов `Accounts` и `RGs` из cloudapi/user | + +#### vins +| Идентификатор задачи | Описание | +| --- | --- | +| BGOS-975 | Метод `Audits` из cloudapi/vins и cloudbroker/vins | + +#### vgpu +| Идентификатор задачи | Описание | +| --- | --- | +| BGOS-980 | Опциональные поля `RGID` и `Allocate` из структуры запроса `CreateRequest` в cloudbroker/vgpu | +| BGOS-980 | Опциональные поле `Force` из структуры запроса `DestroyRequest` в cloudbroker/vgpu | +| BGOS-980 | Опциональные поля `Type`, `Mode` и `RGID` из структуры запроса `ListRequest` в cloudbroker/vgpu и cloudapi/vgpu | +| BGOS-980 | Вычисляемые поля `LastClaimedBy`, `Mode`, `ProfileID`, `RAM`, `ReferenceID`, `RGID`, `Type` и `VMID` из структуры ответа `ItemVGPU` в cloudbroker/vgpu и cloudapi/vgpu | +| BGOS-980 | Методы `Allocate` и `Deallocate` из cloudbroker/vgpu | \ No newline at end of file diff --git a/README.md b/README.md index 907d5f69..ba1a7cc0 100644 --- a/README.md +++ b/README.md @@ -11,6 +11,7 @@ Dynamix SDK - это библиотека, написанная на языке - Версия 13.x.х Dynamix-SDK соответствует 4.5.0 версии платформы - Версия 14.x.х Dynamix-SDK соответствует 4.6.0 версии платформы - Версия 15.x.х Dynamix-SDK соответствует 4.7.0 версии платформы + - Версия 16.x.х Dynamix-SDK соответствует 4.8.0 версии платформы ## Оглавление @@ -85,7 +86,7 @@ Dynamix SDK - это библиотека, написанная на языке Выполните команду в терминале: ```bash -go get -u repository.basistech.ru/BASIS/dynamix-golang-sdk/v15 +go get -u repository.basistech.ru/BASIS/dynamix-golang-sdk/v16 ``` ## Список API @@ -116,6 +117,7 @@ go get -u repository.basistech.ru/BASIS/dynamix-golang-sdk/v15 - `LB` - управление балансировщиками нагрузки; - `Locations` - получение информации о grid площадки; - `Prometheus` - получение статистики prometheus; +- `QoS Policy` - управление политиками качества обслуживания сети; - `RG` - управление ресурсными группами аккаунта; - `Security group` – управление группами безопасности; - `SEP` - управление storage endpoint (sep); @@ -152,6 +154,7 @@ go get -u repository.basistech.ru/BASIS/dynamix-golang-sdk/v15 - `Node` - управление нодами платформы; - `PCIDevice` - управление устройствами; - `Prometheus` - получение статистики prometheus; +- `QoS Policy` - управление политиками качества обслуживания сети; - `Resmon` - получение статистики resource monitoring; - `RG` - управление ресурсными группами аккаунта; - `Security group` – управление группами безопасности; @@ -212,7 +215,7 @@ go get -u repository.basistech.ru/BASIS/dynamix-golang-sdk/v15 ```go import ( - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/config" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/config" ) func main(){ @@ -237,7 +240,7 @@ func main(){ ```go import ( - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/config" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/config" ) func main() { @@ -282,8 +285,8 @@ sslSkipVerify: false package main import ( - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/config" - decort "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/config" + decort "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16" ) func main() { @@ -329,6 +332,7 @@ func main() { - `pkg/cloudapi/lb` - для `LB` - `pkg/cloudapi/locations` - для `Locations` - `pkg/cloudapi/prometheus` - для `Prometheus` + - `pkg/cloudapi/qospolicy` - для `QoS Policy` - `pkg/cloudapi/rg` - для `RG` - `pkg/cloudapi/secgroup` - для `Security group` - `pkg/cloudapi/sep` - для `SEP` @@ -360,6 +364,7 @@ func main() { - `pkg/cloudbroker/node` - для `Node` - `pkg/cloudbroker/pcidevice` - для `PCIDevice` - `pkg/cloudbroker/prometheus` - для `Prometheus` + - `pkg/cloudbroker/qospolicy` - для `QoS Policy` - `pkg/cloudbroker/resmon` - для `Resmon` - `pkg/cloudbroker/rg` - для `RG` - `pkg/cloudbroker/secgroup` - для `Security group` @@ -474,9 +479,9 @@ type CreateRequest struct { package main import ( - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/config" - decort "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/pkg/cloudapi/kvmx86" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/config" + decort "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/pkg/cloudapi/kvmx86" ) func main() { @@ -528,6 +533,7 @@ func main() { - `.LB()` - для работы с `LB` - `.Locations()` - для работы с `Locations` - `.Prometheus()` - для работы с `Prometheus` + - `.QoSPolicy()` - для работы с `QoS Policy` - `.RG()` - для работы с `RG` - `.SecurityGroup()` - для работы с `Security Group` - `.SEP()` - для работы с `SEP` @@ -561,6 +567,7 @@ func main() { - `.Node()` - для работы с `Node` - `.PCIDevice()` - для работы с `PCIDevice` - `.Prometheus()` - для работы с `Prometheus` + - `.QoSPolicy()` - для работы с `QoS Policy` - `.Resmon()` - для работы с `Resmon` - `.RG()` - для работы с `RG` - `.SecurityGroup()` - для работы с `Security Group` @@ -613,9 +620,9 @@ import ( "log" "fmt" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/config" - decort "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/pkg/cloudapi/kvmx86" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/config" + decort "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/pkg/cloudapi/kvmx86" ) func main() { @@ -663,9 +670,9 @@ import ( "log" "fmt" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/config" - decort "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/pkg/cloudapi/account" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/config" + decort "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/pkg/cloudapi/account" ) func main() { @@ -843,9 +850,9 @@ import ( "context" "log" - decort "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/config" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/pkg/cloudbroker/compute" + decort "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/config" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/pkg/cloudbroker/compute" ) func main() { @@ -901,9 +908,9 @@ import ( "log" "fmt" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/config" - decort "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/pkg/cloudapi/bservice" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/config" + decort "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/pkg/cloudapi/bservice" ) func main() { @@ -956,10 +963,10 @@ import ( "log" "fmt" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/config" - decort "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/pkg/cloudapi/tasks" - tasks_cb "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/pkg/cloudbroker/tasks" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/config" + decort "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/pkg/cloudapi/tasks" + tasks_cb "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/pkg/cloudbroker/tasks" ) func main() { @@ -1039,7 +1046,7 @@ func main() { ```go import ( - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/config" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/config" ) func main(){ @@ -1063,7 +1070,7 @@ func main(){ ```go import ( - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/config" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/config" ) func main() { @@ -1104,8 +1111,8 @@ sslSkipVerify: true package main import ( - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/config" - decort "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/config" + decort "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16" ) func main() { @@ -1132,8 +1139,8 @@ package main import ( "fmt" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/config" - decort "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/config" + decort "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16" ) func main() { @@ -1215,7 +1222,7 @@ func main() { ```go import ( - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/config" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/config" ) func main(){ @@ -1243,7 +1250,7 @@ func main(){ ```go import ( - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/config" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/config" ) func main() { @@ -1260,7 +1267,7 @@ func main() { ```go import ( - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/config" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/config" ) func main() { @@ -1326,8 +1333,8 @@ func main() { package main import ( - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/config" - decort "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/config" + decort "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16" ) func main() { @@ -1360,8 +1367,8 @@ package main import ( "fmt" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/config" - decort "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/config" + decort "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16" ) func main() { @@ -1401,8 +1408,8 @@ package main import ( "fmt" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/config" - decort "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/config" + decort "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16" ) func main() { @@ -1440,8 +1447,8 @@ package main import ( "fmt" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/config" - decort "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/config" + decort "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16" ) func main() { @@ -1494,11 +1501,11 @@ import ( "log" "os" - decort "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/config" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/constants" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/pkg/cloudbroker/kvmx86" + decort "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/config" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/constants" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/pkg/cloudbroker/kvmx86" ) func main() { @@ -1560,7 +1567,7 @@ func main() { ```go import ( - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/config" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/config" ) func main(){ @@ -1593,8 +1600,8 @@ func main(){ package main import ( - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/config" - decort "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/config" + decort "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16" ) func main() { @@ -1625,8 +1632,8 @@ package main import ( "fmt" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/config" - decort "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/config" + decort "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16" ) func main() { @@ -1678,7 +1685,7 @@ func main() { ```go import ( - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/config" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/config" ) func main(){ @@ -1711,7 +1718,7 @@ package unit_test import ( "testing" "go.uber.org/mock/gomock" - decortsdk "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15" + decortsdk "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16" ) // Пример юнит тестирования на моках diff --git a/check.go b/check.go index fd469a37..fce9e536 100644 --- a/check.go +++ b/check.go @@ -8,7 +8,7 @@ import ( "net/http" "strings" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/constants" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/constants" ) type CheckInfo struct { diff --git a/client.go b/client.go index fb2b91d3..6e167ee7 100644 --- a/client.go +++ b/client.go @@ -17,12 +17,12 @@ import ( "time" "github.com/google/go-querystring/query" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/config" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/constants" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/pkg/cloudapi" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/pkg/cloudbroker" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/pkg/sdn" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/config" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/constants" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/pkg/cloudapi" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/pkg/cloudbroker" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/pkg/sdn" ) // DecortClient is HTTP-client for platform diff --git a/client_bvs.go b/client_bvs.go index 7e3d6277..c33f3947 100644 --- a/client_bvs.go +++ b/client_bvs.go @@ -14,12 +14,12 @@ import ( "time" "github.com/google/go-querystring/query" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/config" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/constants" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/pkg/cloudapi" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/pkg/cloudbroker" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/pkg/sdn" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/config" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/constants" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/pkg/cloudapi" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/pkg/cloudbroker" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/pkg/sdn" ) // BVSDecortClient is HTTP-client for platform diff --git a/client_mock.go b/client_mock.go index be2327ef..9c6e6e2d 100644 --- a/client_mock.go +++ b/client_mock.go @@ -1,9 +1,9 @@ package decortsdk import ( - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/pkg/cloudapi" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/pkg/cloudbroker" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/pkg/sdn" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/pkg/cloudapi" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/pkg/cloudbroker" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/pkg/sdn" ) type MockDecortClient struct { diff --git a/config/config.go b/config/config.go index 6f85b5fd..213688cf 100644 --- a/config/config.go +++ b/config/config.go @@ -6,7 +6,7 @@ import ( "time" "gopkg.in/yaml.v3" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // Configuration for creating request to platform diff --git a/config/config_bvs.go b/config/config_bvs.go index dd7b8d23..658859b5 100644 --- a/config/config_bvs.go +++ b/config/config_bvs.go @@ -6,8 +6,8 @@ import ( "time" "gopkg.in/yaml.v3" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/serialization" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/serialization" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) type BVSConfig struct { diff --git a/config/legacy-config.go b/config/legacy-config.go index ba2ee8d5..4b4b8456 100644 --- a/config/legacy-config.go +++ b/config/legacy-config.go @@ -6,7 +6,7 @@ import ( "time" "gopkg.in/yaml.v3" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // Legacy client configuration diff --git a/go.mod b/go.mod index 20af101d..c37e94ac 100644 --- a/go.mod +++ b/go.mod @@ -1,4 +1,4 @@ -module repository.basistech.ru/BASIS/dynamix-golang-sdk/v15 +module repository.basistech.ru/BASIS/dynamix-golang-sdk/v16 go 1.24.0 diff --git a/internal/constants/constants.go b/internal/constants/constants.go index 737c7814..6350e6f4 100644 --- a/internal/constants/constants.go +++ b/internal/constants/constants.go @@ -28,6 +28,7 @@ var FileName = map[string]string{ var K8sValues = []string{"labels", "taints", "annotations, additionalSANs"} var VersionMap = map[string]string{ + "4.8.0": "-", "4.7.0": "-", "4.6.0": "-", "4.5.0": "-", diff --git a/internal/validators/custom.go b/internal/validators/custom.go index d281d0b7..e605884a 100644 --- a/internal/validators/custom.go +++ b/internal/validators/custom.go @@ -10,8 +10,8 @@ import ( "strings" "github.com/go-playground/validator/v10" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/interfaces" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/multierror" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/interfaces" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/multierror" ) // protoValidator is used to validate Proto fields. @@ -488,3 +488,9 @@ func sepDescriptionValidator(fe validator.FieldLevel) bool { ok, _ := regexp.MatchString(`^[a-zA-Zа-яА-ЯёЁ0-9_.\[\]()\-]*$`, fe.Field().String()) return ok } + +func watchdogActionValidator(fe validator.FieldLevel) bool { + fieldValue := fe.Field().String() + + return IsInSlice(fieldValue, watchdogActionVaues) +} diff --git a/internal/validators/helper.go b/internal/validators/helper.go index 2ac58a3f..a3b47306 100644 --- a/internal/validators/helper.go +++ b/internal/validators/helper.go @@ -2,7 +2,8 @@ package validators import ( "errors" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/multierror" + + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/multierror" "github.com/go-playground/validator/v10" ) diff --git a/internal/validators/messages.go b/internal/validators/messages.go index dca4fc49..6ba8e2aa 100644 --- a/internal/validators/messages.go +++ b/internal/validators/messages.go @@ -15,6 +15,10 @@ func errorMessage(fe validator.FieldError) string { // Common Validators case "required": return fmt.Sprintf("%s %s is required", prefix, fe.Field()) + case "required_without_all": + return fmt.Sprintf("%s at least one of the following must be specified: %s", + prefix, + joinValues(append([]string{fe.Field()}, strings.Fields(fe.Param())...))) case "gt": return fmt.Sprintf("%s %s can't be less or equal to zero", prefix, fe.Field()) case "min": @@ -25,6 +29,8 @@ func errorMessage(fe validator.FieldError) string { return fmt.Sprintf("%s %s: unexpected URL format", prefix, fe.Field()) case "email": return fmt.Sprintf("%s %s: unexpected E-Mail format", prefix, fe.Field()) + case "mac": + return fmt.Sprintf("%s %s: unexpected MAC address format", prefix, fe.Field()) case "isBool": return fmt.Sprintf("%s %s: must be bool type", prefix, fe.Field()) case "isString": diff --git a/internal/validators/validator.go b/internal/validators/validator.go index 47444d6e..ed23a737 100644 --- a/internal/validators/validator.go +++ b/internal/validators/validator.go @@ -326,5 +326,10 @@ func registerAllValidators(validate *validator.Validate) error { return err } + err = validate.RegisterValidation("watchdogAction", watchdogActionValidator) + if err != nil { + return err + } + return nil } diff --git a/internal/validators/values.go b/internal/validators/values.go index 17adc27b..18eb2f04 100644 --- a/internal/validators/values.go +++ b/internal/validators/values.go @@ -47,7 +47,7 @@ var ( vmActionValues = []string{"stop", "move"} - computeFeaturesValues = []string{"hugepages", "numa", "cpupin", "vfnic", "dpdk", "changemac", "trunk"} + computeFeaturesValues = []string{"hugepages", "numa", "cpupin", "vfnic", "dpdk", "changemac", "trunk", "vgpu", "pcidevice"} networkInterfaceNamingValues = []string{"eth", "ens"} @@ -80,6 +80,8 @@ var ( ipTypeValues = []string{"v4, v6"} sepTechStatusValues = []string{"ENABLED", "DISABLED"} + + watchdogActionVaues = []string{"reset", "shutdown", "poweroff", "pause", "none"} ) const ( diff --git a/legacy-client.go b/legacy-client.go index 58d4ffbc..8903a2ba 100644 --- a/legacy-client.go +++ b/legacy-client.go @@ -14,12 +14,12 @@ import ( "time" "github.com/google/go-querystring/query" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/config" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/constants" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/pkg/cloudapi" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/pkg/cloudbroker" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/pkg/sdn" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/config" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/constants" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/pkg/cloudapi" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/pkg/cloudbroker" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/pkg/sdn" ) // LegacyDecortClient is Legacy HTTP-client for platform diff --git a/pkg/cloudapi/account.go b/pkg/cloudapi/account.go index 48c1a2b6..a4288b06 100644 --- a/pkg/cloudapi/account.go +++ b/pkg/cloudapi/account.go @@ -1,7 +1,7 @@ package cloudapi import ( - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/pkg/cloudapi/account" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/pkg/cloudapi/account" ) // Accessing the Account method group diff --git a/pkg/cloudapi/account/account.go b/pkg/cloudapi/account/account.go index 4dbd5b1d..b4456f73 100644 --- a/pkg/cloudapi/account/account.go +++ b/pkg/cloudapi/account/account.go @@ -2,7 +2,7 @@ package account import ( - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/interfaces" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/interfaces" ) // Structure for creating request to account diff --git a/pkg/cloudapi/account/add_user.go b/pkg/cloudapi/account/add_user.go index 68ee6d6e..b67ec8cd 100644 --- a/pkg/cloudapi/account/add_user.go +++ b/pkg/cloudapi/account/add_user.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // AddUserRequest struct to add permission to access account for a user diff --git a/pkg/cloudapi/account/audits.go b/pkg/cloudapi/account/audits.go deleted file mode 100644 index aa5c18f1..00000000 --- a/pkg/cloudapi/account/audits.go +++ /dev/null @@ -1,40 +0,0 @@ -package account - -import ( - "context" - "encoding/json" - "net/http" - - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" -) - -// AuditsRequest struct to give list of account audits -type AuditsRequest struct { - // ID of the account - // Required: true - AccountID uint64 `url:"accountId" json:"accountId" validate:"required"` -} - -// Audits gets audit records for the specified account object -func (a Account) Audits(ctx context.Context, req AuditsRequest) (ListAudits, error) { - err := validators.ValidateRequest(req) - if err != nil { - return nil, validators.ValidationErrors(validators.GetErrors(err)) - } - - url := "/cloudapi/account/audits" - - res, err := a.client.DecortApiCall(ctx, http.MethodPost, url, req) - if err != nil { - return nil, err - } - - list := ListAudits{} - - err = json.Unmarshal(res, &list) - if err != nil { - return nil, err - } - - return list, nil -} diff --git a/pkg/cloudapi/account/delete.go b/pkg/cloudapi/account/delete.go deleted file mode 100644 index 58b5d6e2..00000000 --- a/pkg/cloudapi/account/delete.go +++ /dev/null @@ -1,36 +0,0 @@ -package account - -import ( - "context" - "net/http" - - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" -) - -// DeleteRequest struct to delete account -type DeleteRequest struct { - // ID of account to delete - // Required: true - AccountID uint64 `url:"accountId" json:"accountId" validate:"required"` - - // Whether to completely delete the account - // Required: false - Permanently bool `url:"permanently,omitempty" json:"permanently,omitempty"` -} - -// Delete completes delete an account from the system Returns true if account is deleted or was already deleted or never existed -func (a Account) Delete(ctx context.Context, req DeleteRequest) (string, error) { - err := validators.ValidateRequest(req) - if err != nil { - return "", validators.ValidationErrors(validators.GetErrors(err)) - } - - url := "/cloudapi/account/delete" - - result, err := a.client.DecortApiCall(ctx, http.MethodPost, url, req) - if err != nil { - return "", err - } - - return string(result), nil -} diff --git a/pkg/cloudapi/account/delete_user.go b/pkg/cloudapi/account/delete_user.go index d8dedcd5..e21e4380 100644 --- a/pkg/cloudapi/account/delete_user.go +++ b/pkg/cloudapi/account/delete_user.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // DeleteUserRequest struct to revoke access to account diff --git a/pkg/cloudapi/account/disable_enable.go b/pkg/cloudapi/account/disable_enable.go deleted file mode 100644 index b38aca03..00000000 --- a/pkg/cloudapi/account/disable_enable.go +++ /dev/null @@ -1,60 +0,0 @@ -package account - -import ( - "context" - "net/http" - "strconv" - - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" -) - -// DisableEnableRequest struct to change status of account -type DisableEnableRequest struct { - // ID of account - // Required: true - AccountID uint64 `url:"accountId" json:"accountId" validate:"required"` -} - -// Disable disables an account -func (a Account) Disable(ctx context.Context, req DisableEnableRequest) (bool, error) { - err := validators.ValidateRequest(req) - if err != nil { - return false, validators.ValidationErrors(validators.GetErrors(err)) - } - - url := "/cloudapi/account/disable" - - res, err := a.client.DecortApiCall(ctx, http.MethodPost, url, req) - if err != nil { - return false, err - } - - result, err := strconv.ParseBool(string(res)) - if err != nil { - return false, err - } - - return result, nil -} - -// Enable enables an account -func (a Account) Enable(ctx context.Context, req DisableEnableRequest) (bool, error) { - err := validators.ValidateRequest(req) - if err != nil { - return false, validators.ValidationErrors(validators.GetErrors(err)) - } - - url := "/cloudapi/account/enable" - - res, err := a.client.DecortApiCall(ctx, http.MethodPost, url, req) - if err != nil { - return false, err - } - - result, err := strconv.ParseBool(string(res)) - if err != nil { - return false, err - } - - return result, nil -} diff --git a/pkg/cloudapi/account/get.go b/pkg/cloudapi/account/get.go index 9ea6edac..87785a63 100644 --- a/pkg/cloudapi/account/get.go +++ b/pkg/cloudapi/account/get.go @@ -5,7 +5,7 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // GetRequest struct to get information about account diff --git a/pkg/cloudapi/account/get_consumed_account_units.go b/pkg/cloudapi/account/get_consumed_account_units.go index 024e8f92..7b74e6fd 100644 --- a/pkg/cloudapi/account/get_consumed_account_units.go +++ b/pkg/cloudapi/account/get_consumed_account_units.go @@ -5,7 +5,7 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // GetConsumedAccountUnitsRequest struct to calculate the currently consumed units for all cloudspaces and resource groups in the account diff --git a/pkg/cloudapi/account/get_consumed_cloud_units_by_type.go b/pkg/cloudapi/account/get_consumed_cloud_units_by_type.go deleted file mode 100644 index 94423651..00000000 --- a/pkg/cloudapi/account/get_consumed_cloud_units_by_type.go +++ /dev/null @@ -1,51 +0,0 @@ -package account - -import ( - "context" - "net/http" - "strconv" - - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" -) - -// GetConsumedCloudUnitsByTypeRequest struct to calculate the currently consumed cloud units of the specified type for all cloudspaces and resource groups in the account -type GetConsumedCloudUnitsByTypeRequest struct { - // ID an account - // Required: true - AccountID uint64 `url:"accountId" json:"accountId" validate:"required"` - - // Cloud unit resource type - // Required: true - CUType string `url:"cutype" json:"cutype" validate:"required,accountCUType"` -} - -// GetConsumedCloudUnitsByType calculates the currently consumed cloud units of the specified type for all cloudspaces -// and resource groups in the account. -// Possible types of cloud units are include: -// -// - CU_M: returns consumed memory in MB -// - CU_C: returns number of virtual cpu cores -// - CU_D: returns consumed virtual disk storage in GB -// - CU_DM: returns consumed max virtual disk storage in GB -// - CU_I: returns number of public IPs -// - gpu_units: return number of GPU units -func (a Account) GetConsumedCloudUnitsByType(ctx context.Context, req GetConsumedCloudUnitsByTypeRequest) (float64, error) { - err := validators.ValidateRequest(req) - if err != nil { - return 0, validators.ValidationErrors(validators.GetErrors(err)) - } - - url := "/cloudapi/account/getConsumedCloudUnitsByType" - - res, err := a.client.DecortApiCall(ctx, http.MethodPost, url, req) - if err != nil { - return 0, err - } - - result, err := strconv.ParseFloat(string(res), 64) - if err != nil { - return 0, err - } - - return result, nil -} diff --git a/pkg/cloudapi/account/get_reserved_account_units.go b/pkg/cloudapi/account/get_reserved_account_units.go deleted file mode 100644 index 63d59d31..00000000 --- a/pkg/cloudapi/account/get_reserved_account_units.go +++ /dev/null @@ -1,47 +0,0 @@ -package account - -import ( - "context" - "encoding/json" - "net/http" - - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" -) - -// GetReservedAccountUnitsRequest struct to calculate the reserved units for all cloudspaces and resource groups in the account -type GetReservedAccountUnitsRequest struct { - // ID an account - // Required: true - AccountID uint64 `url:"accountId" json:"accountId" validate:"required"` -} - -// GetReservedAccountUnits calculates the reserved units for all cloudspaces and resource groups in the account. -// Calculated cloud units are returned in a dict which includes: -// -// - CU_M: reserved memory in MB -// - CU_C: number of cpu cores -// - CU_D: reserved vdisk storage in GB -// - CU_DM: reserved max vdisk storage in GB -// - CU_I: number of public IPs -func (a Account) GetReservedAccountUnits(ctx context.Context, req GetReservedAccountUnitsRequest) (*ResourceLimits, error) { - err := validators.ValidateRequest(req) - if err != nil { - return nil, validators.ValidationErrors(validators.GetErrors(err)) - } - - url := "/cloudapi/account/getReservedAccountUnits" - - res, err := a.client.DecortApiCall(ctx, http.MethodPost, url, req) - if err != nil { - return nil, err - } - - info := ResourceLimits{} - - err = json.Unmarshal(res, &info) - if err != nil { - return nil, err - } - - return &info, nil -} diff --git a/pkg/cloudapi/account/get_resource_consumption.go b/pkg/cloudapi/account/get_resource_consumption.go index 1b13a49d..456e99e7 100644 --- a/pkg/cloudapi/account/get_resource_consumption.go +++ b/pkg/cloudapi/account/get_resource_consumption.go @@ -5,7 +5,7 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // GetResourceConsumptionRequest struct to get resource consumption diff --git a/pkg/cloudapi/account/list.go b/pkg/cloudapi/account/list.go index 3fbe1e10..afa3e7c2 100644 --- a/pkg/cloudapi/account/list.go +++ b/pkg/cloudapi/account/list.go @@ -5,7 +5,7 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // ListRequest struct to get list of accounts diff --git a/pkg/cloudapi/account/list_computes.go b/pkg/cloudapi/account/list_computes.go index ff76cef4..f2d24300 100644 --- a/pkg/cloudapi/account/list_computes.go +++ b/pkg/cloudapi/account/list_computes.go @@ -5,7 +5,7 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // ListComputesRequest struct to get a list of compute instances diff --git a/pkg/cloudapi/account/list_deleted.go b/pkg/cloudapi/account/list_deleted.go index f9ba7ae5..96bd8155 100644 --- a/pkg/cloudapi/account/list_deleted.go +++ b/pkg/cloudapi/account/list_deleted.go @@ -5,7 +5,7 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // ListDeletedRequest struct to get a list of deleted accounts diff --git a/pkg/cloudapi/account/list_disks.go b/pkg/cloudapi/account/list_disks.go index 1a4eb13a..2f6066e7 100644 --- a/pkg/cloudapi/account/list_disks.go +++ b/pkg/cloudapi/account/list_disks.go @@ -5,7 +5,7 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // ListDisksRequest struct to get a list of deleted disks diff --git a/pkg/cloudapi/account/list_flipgroups.go b/pkg/cloudapi/account/list_flipgroups.go index 2efe8d8e..a18fa40c 100644 --- a/pkg/cloudapi/account/list_flipgroups.go +++ b/pkg/cloudapi/account/list_flipgroups.go @@ -5,7 +5,7 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // ListFLIPGroupsRequest struct to get a list of FLIPGroups diff --git a/pkg/cloudapi/account/list_rg.go b/pkg/cloudapi/account/list_rg.go index 412f7ef4..6150e475 100644 --- a/pkg/cloudapi/account/list_rg.go +++ b/pkg/cloudapi/account/list_rg.go @@ -5,7 +5,7 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // ListRGRequest struct to get a list of resource groups diff --git a/pkg/cloudapi/account/list_templates.go b/pkg/cloudapi/account/list_templates.go index fa05d733..632ecd61 100644 --- a/pkg/cloudapi/account/list_templates.go +++ b/pkg/cloudapi/account/list_templates.go @@ -5,7 +5,7 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // ListTemplatesRequest struct to get a list of templates diff --git a/pkg/cloudapi/account/list_vins.go b/pkg/cloudapi/account/list_vins.go index 823039f0..05197026 100644 --- a/pkg/cloudapi/account/list_vins.go +++ b/pkg/cloudapi/account/list_vins.go @@ -5,7 +5,7 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // ListVINSRequest struct to get a list of VINS diff --git a/pkg/cloudapi/account/models.go b/pkg/cloudapi/account/models.go index 0df8a280..9f6c9d5b 100644 --- a/pkg/cloudapi/account/models.go +++ b/pkg/cloudapi/account/models.go @@ -203,11 +203,56 @@ type ListResourceConsumption struct { // Information about computes type Computes struct { + // Number of starting computes + Starting uint64 `json:"STARTING"` + // Number of started computes - Started uint64 `json:"started"` + Started uint64 `json:"STARTED"` + + // Number of stopping computes + Stopping uint64 `json:"STOPPING"` // Number of stopped computes - Stopped uint64 `json:"stopped"` + Stopped uint64 `json:"STOPPED"` + + // Number of paused computes + Paused uint64 `json:"PAUSED"` + + // Number of pausing computes + Pausing uint64 `json:"PAUSING"` + + // Number of merging computes + Merge uint64 `json:"MERGE"` + + // Number of migrating computes + Migrating uint64 `json:"MIGRATING"` + + // Number of computes migrating in + MigratingIn uint64 `json:"MIGRATING_IN"` + + // Number of computes migrating out + MigratingOut uint64 `json:"MIGRATING_OUT"` + + // Number of computes in down status + Down uint64 `json:"DOWN"` + + // Number of scheduled computes + Scheduled uint64 `json:"SCHEDULED"` + + // Number of computes with stopped backup + BackupStopped uint64 `json:"BACKUP_STOPPED"` + + // Number of computes with running backup + BackupRunning uint64 `json:"BACKUP_RUNNING"` + + // Number of computes creating a snapshot + Snapcreate uint64 `json:"SNAPCREATE"` + + // Number of cloning computes + Cloning uint64 `json:"CLONING"` + + // Number of computes being rolled back + Rollback uint64 `json:"ROLLBACK"` } // Information about machines @@ -455,6 +500,9 @@ type ItemVINS struct { // Deleted time DeletedTime uint64 `json:"deletedTime"` + // Enable Default Gateway + EnableDefaultGateway bool `json:"enable_default_gateway"` + // External IP ExternalIP string `json:"externalIP"` @@ -524,11 +572,56 @@ type ListAudits []ItemAudit // Information compute in resource group type RGComputes struct { + // Number of starting computes + Starting uint64 `json:"STARTING"` + // Number of started computes - Started uint64 `json:"Started"` + Started uint64 `json:"STARTED"` + + // Number of stopping computes + Stopping uint64 `json:"STOPPING"` // Number of stopped computes - Stopped uint64 `json:"Stopped"` + Stopped uint64 `json:"STOPPED"` + + // Number of paused computes + Paused uint64 `json:"PAUSED"` + + // Number of pausing computes + Pausing uint64 `json:"PAUSING"` + + // Number of merging computes + Merge uint64 `json:"MERGE"` + + // Number of migrating computes + Migrating uint64 `json:"MIGRATING"` + + // Number of computes migrating in + MigratingIn uint64 `json:"MIGRATING_IN"` + + // Number of computes migrating out + MigratingOut uint64 `json:"MIGRATING_OUT"` + + // Number of computes in down status + Down uint64 `json:"DOWN"` + + // Number of scheduled computes + Scheduled uint64 `json:"SCHEDULED"` + + // Number of computes with stopped backup + BackupStopped uint64 `json:"BACKUP_STOPPED"` + + // Number of computes with running backup + BackupRunning uint64 `json:"BACKUP_RUNNING"` + + // Number of computes creating a snapshot + Snapcreate uint64 `json:"SNAPCREATE"` + + // Number of cloning computes + Cloning uint64 `json:"CLONING"` + + // Number of computes being rolled back + Rollback uint64 `json:"ROLLBACK"` } // Resources of Resource group diff --git a/pkg/cloudapi/account/restore.go b/pkg/cloudapi/account/restore.go index 0d2486e3..3fb4198c 100644 --- a/pkg/cloudapi/account/restore.go +++ b/pkg/cloudapi/account/restore.go @@ -4,7 +4,7 @@ import ( "context" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // RestoreRequest struct to restore a deleted account diff --git a/pkg/cloudapi/account/serialize.go b/pkg/cloudapi/account/serialize.go index 71224321..7bd0f22c 100644 --- a/pkg/cloudapi/account/serialize.go +++ b/pkg/cloudapi/account/serialize.go @@ -3,7 +3,7 @@ package account import ( "encoding/json" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/serialization" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/serialization" ) // Serialize returns JSON-serialized []byte. Used as a wrapper over json.Marshal and json.MarshalIndent functions. diff --git a/pkg/cloudapi/account/update.go b/pkg/cloudapi/account/update.go index 135146b7..5bb59881 100644 --- a/pkg/cloudapi/account/update.go +++ b/pkg/cloudapi/account/update.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // UpdateRequest struct to update account diff --git a/pkg/cloudapi/account/update_user.go b/pkg/cloudapi/account/update_user.go index c397b55c..0fb25f4b 100644 --- a/pkg/cloudapi/account/update_user.go +++ b/pkg/cloudapi/account/update_user.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // UpdateUserRequest struct to update user access rights diff --git a/pkg/cloudapi/audit.go b/pkg/cloudapi/audit.go index 99249b55..b3ab0760 100644 --- a/pkg/cloudapi/audit.go +++ b/pkg/cloudapi/audit.go @@ -1,7 +1,7 @@ package cloudapi import ( - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/pkg/cloudapi/audit" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/pkg/cloudapi/audit" ) // Accessing the Stack method group diff --git a/pkg/cloudapi/audit/audit.go b/pkg/cloudapi/audit/audit.go index 01bea616..3f1fbf0e 100644 --- a/pkg/cloudapi/audit/audit.go +++ b/pkg/cloudapi/audit/audit.go @@ -1,6 +1,6 @@ package audit -import "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/interfaces" +import "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/interfaces" // Structure for creating request to audit type Audit struct { diff --git a/pkg/cloudapi/audit/get.go b/pkg/cloudapi/audit/get.go index ece9d10b..308835bf 100644 --- a/pkg/cloudapi/audit/get.go +++ b/pkg/cloudapi/audit/get.go @@ -5,7 +5,7 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // GetRequest struct to get information about account diff --git a/pkg/cloudapi/audit/list.go b/pkg/cloudapi/audit/list.go index ade06090..e35352d3 100644 --- a/pkg/cloudapi/audit/list.go +++ b/pkg/cloudapi/audit/list.go @@ -5,7 +5,7 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // ListRequest struct to give list of account audits diff --git a/pkg/cloudapi/bservice.go b/pkg/cloudapi/bservice.go index 5d340fbb..a9877938 100644 --- a/pkg/cloudapi/bservice.go +++ b/pkg/cloudapi/bservice.go @@ -1,6 +1,6 @@ package cloudapi -import "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/pkg/cloudapi/bservice" +import "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/pkg/cloudapi/bservice" // Accessing the BService method group func (ca *CloudAPI) BService() *bservice.BService { diff --git a/pkg/cloudapi/bservice/bservice.go b/pkg/cloudapi/bservice/bservice.go index 951299a5..5452b2c9 100644 --- a/pkg/cloudapi/bservice/bservice.go +++ b/pkg/cloudapi/bservice/bservice.go @@ -1,7 +1,7 @@ // API Actor for managing Compute Group. This actor is a final API for endusers to manage Compute Group package bservice -import "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/interfaces" +import "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/interfaces" // Structure for creating request to bservice type BService struct { diff --git a/pkg/cloudapi/bservice/create.go b/pkg/cloudapi/bservice/create.go index 9688c32b..9a35c737 100644 --- a/pkg/cloudapi/bservice/create.go +++ b/pkg/cloudapi/bservice/create.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // CreateRequest struct for BasicService diff --git a/pkg/cloudapi/bservice/delete.go b/pkg/cloudapi/bservice/delete.go index 84736042..c1747315 100644 --- a/pkg/cloudapi/bservice/delete.go +++ b/pkg/cloudapi/bservice/delete.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // DeleteRequest struct to delete basic service diff --git a/pkg/cloudapi/bservice/disable.go b/pkg/cloudapi/bservice/disable.go index d000e4de..e34446fa 100644 --- a/pkg/cloudapi/bservice/disable.go +++ b/pkg/cloudapi/bservice/disable.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // DisableRequest struct for disable service diff --git a/pkg/cloudapi/bservice/enable.go b/pkg/cloudapi/bservice/enable.go index 2e685bdf..cdb6de21 100644 --- a/pkg/cloudapi/bservice/enable.go +++ b/pkg/cloudapi/bservice/enable.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // EnableRequest struct to disable service diff --git a/pkg/cloudapi/bservice/get.go b/pkg/cloudapi/bservice/get.go index 83d55ab1..63da5145 100644 --- a/pkg/cloudapi/bservice/get.go +++ b/pkg/cloudapi/bservice/get.go @@ -5,7 +5,7 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // GetRequest struct to get detailed information about service diff --git a/pkg/cloudapi/bservice/group_add.go b/pkg/cloudapi/bservice/group_add.go index e5b87137..12affd0c 100644 --- a/pkg/cloudapi/bservice/group_add.go +++ b/pkg/cloudapi/bservice/group_add.go @@ -5,7 +5,8 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/constants" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // GroupAddRequest struct to create new compute group within BasicService @@ -62,9 +63,9 @@ type GroupAddRequest struct { // Required: false TimeoutStart uint64 `url:"timeoutStart,omitempty" json:"timeoutStart,omitempty"` - // Meta data for working group computes, format YAML "user_data": 1111 + // Meta data for working group computes, format yaml string or json object // Required: false - UserData string `url:"userData,omitempty" json:"userData,omitempty"` + UserData interface{} `url:"userData,omitempty" json:"userData,omitempty"` // Chipset "i440fx" or "Q35 // Default value : Q35 @@ -97,7 +98,7 @@ func (b BService) GroupAdd(ctx context.Context, req GroupAddRequest) (uint64, er url := "/cloudapi/bservice/groupAdd" - res, err := b.client.DecortApiCall(ctx, http.MethodPost, url, req) + res, err := b.client.DecortApiCallCtype(ctx, http.MethodPost, url, constants.MIMEJSON, req) if err != nil { return 0, err } diff --git a/pkg/cloudapi/bservice/group_compute_remove.go b/pkg/cloudapi/bservice/group_compute_remove.go index 397a8f50..e9b3c15c 100644 --- a/pkg/cloudapi/bservice/group_compute_remove.go +++ b/pkg/cloudapi/bservice/group_compute_remove.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // GroupComputeRemoveRequest struct to remove group compute diff --git a/pkg/cloudapi/bservice/group_get.go b/pkg/cloudapi/bservice/group_get.go index f600e445..2446b52e 100644 --- a/pkg/cloudapi/bservice/group_get.go +++ b/pkg/cloudapi/bservice/group_get.go @@ -5,7 +5,7 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // GroupGetRequest struct to get detailed information about Compute Group diff --git a/pkg/cloudapi/bservice/group_parent_add.go b/pkg/cloudapi/bservice/group_parent_add.go index 7d82e4a9..9726d608 100644 --- a/pkg/cloudapi/bservice/group_parent_add.go +++ b/pkg/cloudapi/bservice/group_parent_add.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // GroupParentAddRequest struct to add parent Compute Group relation to the specified Compute Group diff --git a/pkg/cloudapi/bservice/group_parent_remove.go b/pkg/cloudapi/bservice/group_parent_remove.go index 07bf656d..04119d53 100644 --- a/pkg/cloudapi/bservice/group_parent_remove.go +++ b/pkg/cloudapi/bservice/group_parent_remove.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // GroupParentRemoveRequest struct to remove parent Compute Group diff --git a/pkg/cloudapi/bservice/group_remove.go b/pkg/cloudapi/bservice/group_remove.go index 1fa54443..002733d1 100644 --- a/pkg/cloudapi/bservice/group_remove.go +++ b/pkg/cloudapi/bservice/group_remove.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // GroupRemoveRequest struct for destroy the specified Compute Group diff --git a/pkg/cloudapi/bservice/group_resize.go b/pkg/cloudapi/bservice/group_resize.go index 636e6053..fe23570b 100644 --- a/pkg/cloudapi/bservice/group_resize.go +++ b/pkg/cloudapi/bservice/group_resize.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // GroupResizeRequest struct to resize the group diff --git a/pkg/cloudapi/bservice/group_start.go b/pkg/cloudapi/bservice/group_start.go index d50d9e1a..71ef0a11 100644 --- a/pkg/cloudapi/bservice/group_start.go +++ b/pkg/cloudapi/bservice/group_start.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // GroupStartRequest struct to start the specified Compute Group diff --git a/pkg/cloudapi/bservice/group_stop.go b/pkg/cloudapi/bservice/group_stop.go index 4f934677..af7a19cc 100644 --- a/pkg/cloudapi/bservice/group_stop.go +++ b/pkg/cloudapi/bservice/group_stop.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // GroupStopRequest struct to stop the specified Compute Group diff --git a/pkg/cloudapi/bservice/group_update.go b/pkg/cloudapi/bservice/group_update.go index ca282a3d..056b7e89 100644 --- a/pkg/cloudapi/bservice/group_update.go +++ b/pkg/cloudapi/bservice/group_update.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // GroupUpdateRequest struct to update existing Compute group diff --git a/pkg/cloudapi/bservice/group_update_extnet.go b/pkg/cloudapi/bservice/group_update_extnet.go index c229f83a..c6434c00 100644 --- a/pkg/cloudapi/bservice/group_update_extnet.go +++ b/pkg/cloudapi/bservice/group_update_extnet.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // GroupUpdateExtNetRequest struct to update External Network settings diff --git a/pkg/cloudapi/bservice/group_update_vins.go b/pkg/cloudapi/bservice/group_update_vins.go index c2a5c522..f19338d2 100644 --- a/pkg/cloudapi/bservice/group_update_vins.go +++ b/pkg/cloudapi/bservice/group_update_vins.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // GroupUpdateVINSRequest struct to update VINS settings diff --git a/pkg/cloudapi/bservice/list.go b/pkg/cloudapi/bservice/list.go index 072bb2a0..8cbdd187 100644 --- a/pkg/cloudapi/bservice/list.go +++ b/pkg/cloudapi/bservice/list.go @@ -5,7 +5,7 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // ListRequest struct to get list of BasicService instances diff --git a/pkg/cloudapi/bservice/list_deleted.go b/pkg/cloudapi/bservice/list_deleted.go index 3e67bedb..af5ecdb8 100644 --- a/pkg/cloudapi/bservice/list_deleted.go +++ b/pkg/cloudapi/bservice/list_deleted.go @@ -5,7 +5,7 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // ListDeletedRequest struct to get list of deleted BasicService instances diff --git a/pkg/cloudapi/bservice/migrate_to_zone.go b/pkg/cloudapi/bservice/migrate_to_zone.go index 09a3b351..365973e3 100644 --- a/pkg/cloudapi/bservice/migrate_to_zone.go +++ b/pkg/cloudapi/bservice/migrate_to_zone.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // MigrateToZone struct to move basic service to another zone diff --git a/pkg/cloudapi/bservice/restore.go b/pkg/cloudapi/bservice/restore.go index defc2941..a7696acc 100644 --- a/pkg/cloudapi/bservice/restore.go +++ b/pkg/cloudapi/bservice/restore.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // RestoreRequest struct to restore BasicService instance diff --git a/pkg/cloudapi/bservice/serialize.go b/pkg/cloudapi/bservice/serialize.go index 5b0a8fc8..c86769c1 100644 --- a/pkg/cloudapi/bservice/serialize.go +++ b/pkg/cloudapi/bservice/serialize.go @@ -3,7 +3,7 @@ package bservice import ( "encoding/json" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/serialization" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/serialization" ) // Serialize returns JSON-serialized []byte. Used as a wrapper over json.Marshal and json.MarshalIndent functions. diff --git a/pkg/cloudapi/bservice/snapshot_create.go b/pkg/cloudapi/bservice/snapshot_create.go index c9a388e4..da1a45ca 100644 --- a/pkg/cloudapi/bservice/snapshot_create.go +++ b/pkg/cloudapi/bservice/snapshot_create.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // SnapshotCreateRequest struct to create snapshot diff --git a/pkg/cloudapi/bservice/snapshot_delete.go b/pkg/cloudapi/bservice/snapshot_delete.go index 5d246634..8f096a0b 100644 --- a/pkg/cloudapi/bservice/snapshot_delete.go +++ b/pkg/cloudapi/bservice/snapshot_delete.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // SnapshotDeleteRequest struct to delete snapshot diff --git a/pkg/cloudapi/bservice/snapshot_list.go b/pkg/cloudapi/bservice/snapshot_list.go index 0833729b..9f41f3df 100644 --- a/pkg/cloudapi/bservice/snapshot_list.go +++ b/pkg/cloudapi/bservice/snapshot_list.go @@ -5,7 +5,7 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // SnapshotListRequest struct to get list of existing snapshots diff --git a/pkg/cloudapi/bservice/snapshot_rollback.go b/pkg/cloudapi/bservice/snapshot_rollback.go index 152dbc70..5968c8ff 100644 --- a/pkg/cloudapi/bservice/snapshot_rollback.go +++ b/pkg/cloudapi/bservice/snapshot_rollback.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // SnapshotRollbackRequest struct to rollback snapshot diff --git a/pkg/cloudapi/bservice/start.go b/pkg/cloudapi/bservice/start.go index 5f458161..2d8f4561 100644 --- a/pkg/cloudapi/bservice/start.go +++ b/pkg/cloudapi/bservice/start.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // StartRequest struct to start service diff --git a/pkg/cloudapi/bservice/stop.go b/pkg/cloudapi/bservice/stop.go index 1b9fca91..72418706 100644 --- a/pkg/cloudapi/bservice/stop.go +++ b/pkg/cloudapi/bservice/stop.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // StopRequest struct to stop service diff --git a/pkg/cloudapi/cloudapi.go b/pkg/cloudapi/cloudapi.go index cb3b66ed..9e9f9f3b 100644 --- a/pkg/cloudapi/cloudapi.go +++ b/pkg/cloudapi/cloudapi.go @@ -2,7 +2,7 @@ package cloudapi import ( - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/interfaces" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/interfaces" ) // Structure for creating request to CloudAPI groups diff --git a/pkg/cloudapi/compute.go b/pkg/cloudapi/compute.go index ed2e079b..cf929d69 100644 --- a/pkg/cloudapi/compute.go +++ b/pkg/cloudapi/compute.go @@ -1,7 +1,7 @@ package cloudapi import ( - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/pkg/cloudapi/compute" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/pkg/cloudapi/compute" ) // Accessing the Compute method group diff --git a/pkg/cloudapi/compute/abort_shared_snapshot_merge.go b/pkg/cloudapi/compute/abort_shared_snapshot_merge.go index 972f4485..26780d9b 100644 --- a/pkg/cloudapi/compute/abort_shared_snapshot_merge.go +++ b/pkg/cloudapi/compute/abort_shared_snapshot_merge.go @@ -4,7 +4,7 @@ import ( "context" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // AbortSharedSnapshotMergeRequest struct to abort shared snapshots merge diff --git a/pkg/cloudapi/compute/affinity_group_check_start.go b/pkg/cloudapi/compute/affinity_group_check_start.go index 04b3a237..609abc0b 100644 --- a/pkg/cloudapi/compute/affinity_group_check_start.go +++ b/pkg/cloudapi/compute/affinity_group_check_start.go @@ -4,7 +4,7 @@ import ( "context" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // AffinityGroupCheckStartRequest struct to check all computes with current affinity label can start diff --git a/pkg/cloudapi/compute/affinity_label_remove.go b/pkg/cloudapi/compute/affinity_label_remove.go index 3fa72135..d19b6a43 100644 --- a/pkg/cloudapi/compute/affinity_label_remove.go +++ b/pkg/cloudapi/compute/affinity_label_remove.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // AffinityLabelRemoveRequest struct to clear affinity label for compute diff --git a/pkg/cloudapi/compute/affinity_label_set.go b/pkg/cloudapi/compute/affinity_label_set.go index 1f4cfbed..648474a4 100644 --- a/pkg/cloudapi/compute/affinity_label_set.go +++ b/pkg/cloudapi/compute/affinity_label_set.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // AffinityLabelSetRequest struct to set affinity label for compute diff --git a/pkg/cloudapi/compute/affinity_relations.go b/pkg/cloudapi/compute/affinity_relations.go index 06f62977..9ef0bf87 100644 --- a/pkg/cloudapi/compute/affinity_relations.go +++ b/pkg/cloudapi/compute/affinity_relations.go @@ -5,7 +5,7 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // AffinityRelationsRequest struct to get dict of computes diff --git a/pkg/cloudapi/compute/affinity_rule_add.go b/pkg/cloudapi/compute/affinity_rule_add.go index fc381396..f5336806 100644 --- a/pkg/cloudapi/compute/affinity_rule_add.go +++ b/pkg/cloudapi/compute/affinity_rule_add.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // AffinityRuleAddRequest struct to add affinity rule diff --git a/pkg/cloudapi/compute/affinity_rule_remove.go b/pkg/cloudapi/compute/affinity_rule_remove.go index 1772e94e..3cc9502e 100644 --- a/pkg/cloudapi/compute/affinity_rule_remove.go +++ b/pkg/cloudapi/compute/affinity_rule_remove.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // AffinityRuleRemoveRequest struct to remove affinity rule diff --git a/pkg/cloudapi/compute/affinity_rules_clear.go b/pkg/cloudapi/compute/affinity_rules_clear.go index f8780280..c641fcf4 100644 --- a/pkg/cloudapi/compute/affinity_rules_clear.go +++ b/pkg/cloudapi/compute/affinity_rules_clear.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // AffinityRulesClearRequest struct to clear affinity rules diff --git a/pkg/cloudapi/compute/anti_affinity_rule_add.go b/pkg/cloudapi/compute/anti_affinity_rule_add.go index fce86dcc..27ffe910 100644 --- a/pkg/cloudapi/compute/anti_affinity_rule_add.go +++ b/pkg/cloudapi/compute/anti_affinity_rule_add.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // AntiAffinityRuleAddRequest struct to add anti affinity rule diff --git a/pkg/cloudapi/compute/anti_affinity_rule_remove.go b/pkg/cloudapi/compute/anti_affinity_rule_remove.go index 6c2e2880..2d11c814 100644 --- a/pkg/cloudapi/compute/anti_affinity_rule_remove.go +++ b/pkg/cloudapi/compute/anti_affinity_rule_remove.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // AntiAffinityRuleRemoveRequest struct to remove anti affinity rule diff --git a/pkg/cloudapi/compute/anti_affinity_rules_clear.go b/pkg/cloudapi/compute/anti_affinity_rules_clear.go index d691ec27..ef5d007c 100644 --- a/pkg/cloudapi/compute/anti_affinity_rules_clear.go +++ b/pkg/cloudapi/compute/anti_affinity_rules_clear.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // AntiAffinityRulesClearRequest struct to clear anti affinity rules diff --git a/pkg/cloudapi/compute/attach_gpu.go b/pkg/cloudapi/compute/attach_gpu.go index c29c774c..fde9e712 100644 --- a/pkg/cloudapi/compute/attach_gpu.go +++ b/pkg/cloudapi/compute/attach_gpu.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // AttachGPURequest struct to attach GPU for compute diff --git a/pkg/cloudapi/compute/attach_pci_device.go b/pkg/cloudapi/compute/attach_pci_device.go index 62118908..1e301380 100644 --- a/pkg/cloudapi/compute/attach_pci_device.go +++ b/pkg/cloudapi/compute/attach_pci_device.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // AttachPCIDeviceRequest struct to attach PCI device diff --git a/pkg/cloudapi/compute/audits.go b/pkg/cloudapi/compute/audits.go deleted file mode 100644 index 3e6c7895..00000000 --- a/pkg/cloudapi/compute/audits.go +++ /dev/null @@ -1,76 +0,0 @@ -package compute - -import ( - "context" - "encoding/json" - "net/http" - - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" -) - -// AuditsRequest struct to get audit records -type AuditsRequest struct { - // ID of the compute - // Required: true - ComputeID uint64 `url:"compute_id" json:"compute_id" validate:"required"` - - // Find all audits after point in time - // Required: false - TimestampAT uint64 `url:"timestamp_at,omitempty" json:"timestamp_at,omitempty"` - - // Find all audits before point in time - // Required: false - TimestampTO uint64 `url:"timestamp_to,omitempty" json:"timestamp_to,omitempty"` - - // Find by user - // Required: false - User string `url:"user,omitempty" json:"user,omitempty"` - - // Find by api endpoints - // Required: false - Call string `url:"call,omitempty" json:"call,omitempty"` - - // Sort by one of supported fields, format ± - // Required: false - SortBy string `url:"sort_by,omitempty" json:"sort_by,omitempty"` - - // Page number - // Required: false - Page uint64 `url:"page,omitempty" json:"page,omitempty"` - - // Page size - // Required: false - Size uint64 `url:"size,omitempty" json:"size,omitempty"` - - // Find by HTTP min status code - // Required: false - MinStatusCode uint64 `url:"min_status_code,omitempty" json:"min_status_code,omitempty"` - - // Find by HTTP max status code - // Required: false - MaxStatusCode uint64 `url:"max_status_code,omitempty" json:"max_status_code,omitempty"` -} - -// Audits gets audit records for the specified compute object -func (c Compute) Audits(ctx context.Context, req AuditsRequest) (*ListAudits, error) { - err := validators.ValidateRequest(req) - if err != nil { - return nil, validators.ValidationErrors(validators.GetErrors(err)) - } - - url := "/cloudapi/compute/audits" - - res, err := c.client.DecortApiCall(ctx, http.MethodGet, url, req) - if err != nil { - return nil, err - } - - list := ListAudits{} - - err = json.Unmarshal(res, &list) - if err != nil { - return nil, err - } - - return &list, nil -} diff --git a/pkg/cloudapi/compute/boot_disk_set.go b/pkg/cloudapi/compute/boot_disk_set.go index 8b4d7299..a3da5909 100644 --- a/pkg/cloudapi/compute/boot_disk_set.go +++ b/pkg/cloudapi/compute/boot_disk_set.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // BootDiskSetRequest struct to set boot disk for compute diff --git a/pkg/cloudapi/compute/boot_order_get.go b/pkg/cloudapi/compute/boot_order_get.go index d7d060ce..58e4f344 100644 --- a/pkg/cloudapi/compute/boot_order_get.go +++ b/pkg/cloudapi/compute/boot_order_get.go @@ -5,7 +5,7 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // BootOrderGetRequest struct to get boot order diff --git a/pkg/cloudapi/compute/boot_order_set.go b/pkg/cloudapi/compute/boot_order_set.go index 38fd93b6..b455a007 100644 --- a/pkg/cloudapi/compute/boot_order_set.go +++ b/pkg/cloudapi/compute/boot_order_set.go @@ -5,7 +5,7 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // BootOrderSetRequest struct to set boot order diff --git a/pkg/cloudapi/compute/cd_eject.go b/pkg/cloudapi/compute/cd_eject.go index b3a24e4b..e0a227ea 100644 --- a/pkg/cloudapi/compute/cd_eject.go +++ b/pkg/cloudapi/compute/cd_eject.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // CDEjectRequest struct to eject CD image diff --git a/pkg/cloudapi/compute/cd_insert.go b/pkg/cloudapi/compute/cd_insert.go index 54919ad4..54052ee9 100644 --- a/pkg/cloudapi/compute/cd_insert.go +++ b/pkg/cloudapi/compute/cd_insert.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // CDInsertRequest struct to insert new CD image diff --git a/pkg/cloudapi/compute/change_ip.go b/pkg/cloudapi/compute/change_ip.go index 732ce820..5ceb71c1 100644 --- a/pkg/cloudapi/compute/change_ip.go +++ b/pkg/cloudapi/compute/change_ip.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // ChangeIPRequest struct to change IP for network diff --git a/pkg/cloudapi/compute/change_link_state.go b/pkg/cloudapi/compute/change_link_state.go index 62ee51a3..81468134 100644 --- a/pkg/cloudapi/compute/change_link_state.go +++ b/pkg/cloudapi/compute/change_link_state.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // ChangeLinkStateRequest struct to change link state diff --git a/pkg/cloudapi/compute/change_mac.go b/pkg/cloudapi/compute/change_mac.go index 021bd149..d83736e3 100644 --- a/pkg/cloudapi/compute/change_mac.go +++ b/pkg/cloudapi/compute/change_mac.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // ChangeMACRequest struct to change MAC for network diff --git a/pkg/cloudapi/compute/change_mtu.go b/pkg/cloudapi/compute/change_mtu.go index fffba842..475a8e47 100644 --- a/pkg/cloudapi/compute/change_mtu.go +++ b/pkg/cloudapi/compute/change_mtu.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // ChangeMTURequest struct to change MTU for a compute diff --git a/pkg/cloudapi/compute/change_qos_policies.go b/pkg/cloudapi/compute/change_qos_policies.go new file mode 100644 index 00000000..c084f65c --- /dev/null +++ b/pkg/cloudapi/compute/change_qos_policies.go @@ -0,0 +1,84 @@ +package compute + +import ( + "context" + "net/http" + "strconv" + + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/constants" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" +) + +type ChangeQoSPoliciesRequest struct { + // Compute ID + // Required: true + ComputeID uint64 `url:"compute_id" json:"compute_id" validate:"required"` + + // Interface IP or MAC address + // Required: true + Interface string `url:"interface" json:"interface" validate:"required"` + + // List of QoS Policy IDs to assign to this interface + // Required: false + QoSPolicyIDs []uint64 `url:"qos_policy_ids,omitempty" json:"qos_policy_ids,omitempty"` +} + +type wrapperChangeQoSPoliciesRequest struct { + ChangeQoSPoliciesRequest + + AsyncMode bool `url:"asyncMode"` +} + +// ChangeQoSPolicies change qos policies for compute +func (c Compute) ChangeQoSPolicies(ctx context.Context, req ChangeQoSPoliciesRequest) (bool, error) { + err := validators.ValidateRequest(req) + if err != nil { + return false, validators.ValidationErrors(validators.GetErrors(err)) + } + + reqWrapped := wrapperChangeQoSPoliciesRequest{ + ChangeQoSPoliciesRequest: req, + AsyncMode: false, + } + + url := "/cloudapi/compute/change_qos_policies" + + res, err := c.client.DecortApiCallCtype(ctx, http.MethodPost, url, constants.MIMEJSON, reqWrapped) + if err != nil { + return false, err + } + + result, err := strconv.ParseBool(string(res)) + if err != nil { + return false, err + } + + return result, nil +} + +// ChangeQoSPolicies change qos policies for compute with AsyncMode +func (c Compute) ChangeQoSPoliciesAsync(ctx context.Context, req ChangeQoSPoliciesRequest) (bool, error) { + err := validators.ValidateRequest(req) + if err != nil { + return false, validators.ValidationErrors(validators.GetErrors(err)) + } + + reqWrapped := wrapperChangeQoSPoliciesRequest{ + ChangeQoSPoliciesRequest: req, + AsyncMode: true, + } + + url := "/cloudapi/compute/change_qos_policies" + + res, err := c.client.DecortApiCallCtype(ctx, http.MethodPost, url, constants.MIMEJSON, reqWrapped) + if err != nil { + return false, err + } + + result, err := strconv.ParseBool(string(res)) + if err != nil { + return false, err + } + + return result, nil +} diff --git a/pkg/cloudapi/compute/change_secutity_group.go b/pkg/cloudapi/compute/change_secutity_group.go index f8b3db6f..2d2cab19 100644 --- a/pkg/cloudapi/compute/change_secutity_group.go +++ b/pkg/cloudapi/compute/change_secutity_group.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // ChangeSecGroupsRequest struct to change security groups for compute diff --git a/pkg/cloudapi/compute/clone.go b/pkg/cloudapi/compute/clone.go index ad8f8a2c..4ce3ed18 100644 --- a/pkg/cloudapi/compute/clone.go +++ b/pkg/cloudapi/compute/clone.go @@ -4,8 +4,8 @@ import ( "context" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/constants" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/constants" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // CloneRequest struct to clone compute instance diff --git a/pkg/cloudapi/compute/clone_abort.go b/pkg/cloudapi/compute/clone_abort.go index a282c1dd..7f62771d 100644 --- a/pkg/cloudapi/compute/clone_abort.go +++ b/pkg/cloudapi/compute/clone_abort.go @@ -5,8 +5,8 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/constants" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/constants" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // CloneAbortRequest struct to abort a compute clone diff --git a/pkg/cloudapi/compute/clone_status.go b/pkg/cloudapi/compute/clone_status.go index d93c394b..b2504391 100644 --- a/pkg/cloudapi/compute/clone_status.go +++ b/pkg/cloudapi/compute/clone_status.go @@ -5,7 +5,7 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // GetCloneStatusRequest struct to get information about compute clone status diff --git a/pkg/cloudapi/compute/compute.go b/pkg/cloudapi/compute/compute.go index ebc61db4..eb9f4b1e 100644 --- a/pkg/cloudapi/compute/compute.go +++ b/pkg/cloudapi/compute/compute.go @@ -2,7 +2,7 @@ package compute import ( - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/interfaces" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/interfaces" ) // Structure for creating request to compute diff --git a/pkg/cloudapi/compute/create_template.go b/pkg/cloudapi/compute/create_template.go index ca484e60..70bb4de4 100644 --- a/pkg/cloudapi/compute/create_template.go +++ b/pkg/cloudapi/compute/create_template.go @@ -5,7 +5,7 @@ import ( "net/http" "strings" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // CreateTemplateRequest struct to create template diff --git a/pkg/cloudapi/compute/create_template_from_blank.go b/pkg/cloudapi/compute/create_template_from_blank.go index 6630204f..f84eeada 100644 --- a/pkg/cloudapi/compute/create_template_from_blank.go +++ b/pkg/cloudapi/compute/create_template_from_blank.go @@ -6,7 +6,7 @@ import ( "strconv" "strings" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // CreateTemplateFromBlankRequest struct to create template from boot disk of current compute diff --git a/pkg/cloudapi/compute/delete.go b/pkg/cloudapi/compute/delete.go index 419a3e29..7d7e636a 100644 --- a/pkg/cloudapi/compute/delete.go +++ b/pkg/cloudapi/compute/delete.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // DeleteRequest struct to delete compute diff --git a/pkg/cloudapi/compute/delete_cpu_alignment_profile.go b/pkg/cloudapi/compute/delete_cpu_alignment_profile.go index 152fe970..9ccdd203 100644 --- a/pkg/cloudapi/compute/delete_cpu_alignment_profile.go +++ b/pkg/cloudapi/compute/delete_cpu_alignment_profile.go @@ -5,8 +5,8 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/constants" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/constants" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // DeleteCPUAlignmentProfileRequest struct to delete CPU alignment profile for computes diff --git a/pkg/cloudapi/compute/delete_custom_fields.go b/pkg/cloudapi/compute/delete_custom_fields.go index bdbeada6..10b62a94 100644 --- a/pkg/cloudapi/compute/delete_custom_fields.go +++ b/pkg/cloudapi/compute/delete_custom_fields.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // DeleteCustomFieldsRequest struct to delete compute's custom fields diff --git a/pkg/cloudapi/compute/detach_gpu.go b/pkg/cloudapi/compute/detach_gpu.go index 623c31d9..0ecf2a72 100644 --- a/pkg/cloudapi/compute/detach_gpu.go +++ b/pkg/cloudapi/compute/detach_gpu.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // DetachGPURequest struct to detach vgpu for compute diff --git a/pkg/cloudapi/compute/detach_pci_device.go b/pkg/cloudapi/compute/detach_pci_device.go index 7be3ed92..14ffb542 100644 --- a/pkg/cloudapi/compute/detach_pci_device.go +++ b/pkg/cloudapi/compute/detach_pci_device.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // DetachPCIDeviceRequest struct to detach PCI device diff --git a/pkg/cloudapi/compute/disable.go b/pkg/cloudapi/compute/disable.go index 883d987d..a9a462f3 100644 --- a/pkg/cloudapi/compute/disable.go +++ b/pkg/cloudapi/compute/disable.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // DisableRequest struct to disable compute diff --git a/pkg/cloudapi/compute/disk_add.go b/pkg/cloudapi/compute/disk_add.go index 0fd12eea..779ab223 100644 --- a/pkg/cloudapi/compute/disk_add.go +++ b/pkg/cloudapi/compute/disk_add.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // DiskAddRequest struct to create and attach disk to compute diff --git a/pkg/cloudapi/compute/disk_attach.go b/pkg/cloudapi/compute/disk_attach.go index 9e776d63..113c8cd4 100644 --- a/pkg/cloudapi/compute/disk_attach.go +++ b/pkg/cloudapi/compute/disk_attach.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // DiskAttachRequest struct to attach disk to compute diff --git a/pkg/cloudapi/compute/disk_del.go b/pkg/cloudapi/compute/disk_del.go index ab8c648d..35f4580a 100644 --- a/pkg/cloudapi/compute/disk_del.go +++ b/pkg/cloudapi/compute/disk_del.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // DiskDelRequest struct to detach and delete disk from compute diff --git a/pkg/cloudapi/compute/disk_detach.go b/pkg/cloudapi/compute/disk_detach.go index 7e0692b3..f216d1a6 100644 --- a/pkg/cloudapi/compute/disk_detach.go +++ b/pkg/cloudapi/compute/disk_detach.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // DiskDetachRequest struct to detach disk from compute diff --git a/pkg/cloudapi/compute/disk_migrate.go b/pkg/cloudapi/compute/disk_migrate.go index ca9200be..1da4dacb 100644 --- a/pkg/cloudapi/compute/disk_migrate.go +++ b/pkg/cloudapi/compute/disk_migrate.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // DiskMigrateRequest struct to migrate compute's disk to target disk diff --git a/pkg/cloudapi/compute/disk_qos.go b/pkg/cloudapi/compute/disk_qos.go index bff89eda..888d671e 100644 --- a/pkg/cloudapi/compute/disk_qos.go +++ b/pkg/cloudapi/compute/disk_qos.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // DiskQOSRequest struct to change QoS of the disk diff --git a/pkg/cloudapi/compute/disk_resize.go b/pkg/cloudapi/compute/disk_resize.go index b0b4bb65..2897478d 100644 --- a/pkg/cloudapi/compute/disk_resize.go +++ b/pkg/cloudapi/compute/disk_resize.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // DiskResizeRequest struct to change disk size diff --git a/pkg/cloudapi/compute/disk_switch_to_replication.go b/pkg/cloudapi/compute/disk_switch_to_replication.go index 92d4ae3c..4c03cc0d 100644 --- a/pkg/cloudapi/compute/disk_switch_to_replication.go +++ b/pkg/cloudapi/compute/disk_switch_to_replication.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // DiskSwitchToReplicationRequest struct to switch disk to it's replication diff --git a/pkg/cloudapi/compute/enable.go b/pkg/cloudapi/compute/enable.go index 6e685a9f..ce5752e4 100644 --- a/pkg/cloudapi/compute/enable.go +++ b/pkg/cloudapi/compute/enable.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // EnableRequest struct to enable compute diff --git a/pkg/cloudapi/compute/filter.go b/pkg/cloudapi/compute/filter.go index 316cae15..3851a85f 100644 --- a/pkg/cloudapi/compute/filter.go +++ b/pkg/cloudapi/compute/filter.go @@ -3,9 +3,9 @@ package compute import ( "context" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/interfaces" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/pkg/cloudapi/k8s" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/pkg/cloudapi/lb" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/interfaces" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/pkg/cloudapi/k8s" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/pkg/cloudapi/lb" ) // FilterByID returns ListComputes with specified ID. diff --git a/pkg/cloudapi/compute/get.go b/pkg/cloudapi/compute/get.go index cae9c030..1add6b04 100644 --- a/pkg/cloudapi/compute/get.go +++ b/pkg/cloudapi/compute/get.go @@ -5,7 +5,7 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // GetRequest struct to get information about compute diff --git a/pkg/cloudapi/compute/get_audits.go b/pkg/cloudapi/compute/get_audits.go deleted file mode 100644 index 55c53418..00000000 --- a/pkg/cloudapi/compute/get_audits.go +++ /dev/null @@ -1,40 +0,0 @@ -package compute - -import ( - "context" - "encoding/json" - "net/http" - - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" -) - -// GetAuditsRequest struct to get compute audits -type GetAuditsRequest struct { - // ID of compute instance - // Required: true - ComputeID uint64 `url:"computeId" json:"computeId" validate:"required"` -} - -// GetAudits gets compute audits -func (c Compute) GetAudits(ctx context.Context, req GetAuditsRequest) (ListShortAudits, error) { - err := validators.ValidateRequest(req) - if err != nil { - return nil, validators.ValidationErrors(validators.GetErrors(err)) - } - - url := "/cloudapi/compute/getAudits" - - res, err := c.client.DecortApiCall(ctx, http.MethodPost, url, req) - if err != nil { - return nil, err - } - - list := ListShortAudits{} - - err = json.Unmarshal(res, &list) - if err != nil { - return nil, err - } - - return list, nil -} diff --git a/pkg/cloudapi/compute/get_console_url.go b/pkg/cloudapi/compute/get_console_url.go index 6ccf18a5..2c9e9862 100644 --- a/pkg/cloudapi/compute/get_console_url.go +++ b/pkg/cloudapi/compute/get_console_url.go @@ -5,7 +5,7 @@ import ( "net/http" "strings" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // GetConsoleURLRequest struct to get console URL diff --git a/pkg/cloudapi/compute/get_cpu_alignment_profile.go b/pkg/cloudapi/compute/get_cpu_alignment_profile.go index 6f9ee3ba..5f9ad5b0 100644 --- a/pkg/cloudapi/compute/get_cpu_alignment_profile.go +++ b/pkg/cloudapi/compute/get_cpu_alignment_profile.go @@ -5,7 +5,7 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // GetCPUAlignmentProfileRequest struct to get CPU alignment profile for compute diff --git a/pkg/cloudapi/compute/get_custom_fields.go b/pkg/cloudapi/compute/get_custom_fields.go index 38c4b964..d10bbe27 100644 --- a/pkg/cloudapi/compute/get_custom_fields.go +++ b/pkg/cloudapi/compute/get_custom_fields.go @@ -5,7 +5,7 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // GetCustomFieldsRequest struct to get Compute's customFields diff --git a/pkg/cloudapi/compute/get_log.go b/pkg/cloudapi/compute/get_log.go index c0254779..ccbaddd8 100644 --- a/pkg/cloudapi/compute/get_log.go +++ b/pkg/cloudapi/compute/get_log.go @@ -4,7 +4,7 @@ import ( "context" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // GetLogRequest struct to get compute logs diff --git a/pkg/cloudapi/compute/guest_agent_disable.go b/pkg/cloudapi/compute/guest_agent_disable.go index 121e090f..1dcecbea 100644 --- a/pkg/cloudapi/compute/guest_agent_disable.go +++ b/pkg/cloudapi/compute/guest_agent_disable.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // GuestAgentDisableRequest struct to disable guest agent diff --git a/pkg/cloudapi/compute/guest_agent_enable.go b/pkg/cloudapi/compute/guest_agent_enable.go index df91d1e6..b045514c 100644 --- a/pkg/cloudapi/compute/guest_agent_enable.go +++ b/pkg/cloudapi/compute/guest_agent_enable.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // GuestAgentEnableRequest struct to enable guest agent diff --git a/pkg/cloudapi/compute/guest_agent_execute.go b/pkg/cloudapi/compute/guest_agent_execute.go index 7d4168a0..ba6132f2 100644 --- a/pkg/cloudapi/compute/guest_agent_execute.go +++ b/pkg/cloudapi/compute/guest_agent_execute.go @@ -5,7 +5,7 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // GuestAgentExecuteRequest struct to execute command from user to agent diff --git a/pkg/cloudapi/compute/guest_agent_feature_get.go b/pkg/cloudapi/compute/guest_agent_feature_get.go index 093f2323..3d2a9266 100644 --- a/pkg/cloudapi/compute/guest_agent_feature_get.go +++ b/pkg/cloudapi/compute/guest_agent_feature_get.go @@ -5,7 +5,7 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // GuestAgentFeatureGetRequest struct to feature get guest agent diff --git a/pkg/cloudapi/compute/guest_agent_feature_update.go b/pkg/cloudapi/compute/guest_agent_feature_update.go index 2a96e1bb..87b9dfe7 100644 --- a/pkg/cloudapi/compute/guest_agent_feature_update.go +++ b/pkg/cloudapi/compute/guest_agent_feature_update.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // GuestAgentFeatureUpdateRequest struct to feature update guest agent diff --git a/pkg/cloudapi/compute/list.go b/pkg/cloudapi/compute/list.go index eb96901d..05aaf8ac 100644 --- a/pkg/cloudapi/compute/list.go +++ b/pkg/cloudapi/compute/list.go @@ -5,7 +5,7 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // ListRequest struct to get list of available computes diff --git a/pkg/cloudapi/compute/list_deleted.go b/pkg/cloudapi/compute/list_deleted.go index 04c225df..4d5ae9ca 100644 --- a/pkg/cloudapi/compute/list_deleted.go +++ b/pkg/cloudapi/compute/list_deleted.go @@ -5,7 +5,7 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // ListDeletedRequest struct to get deleted computes list diff --git a/pkg/cloudapi/compute/list_pci_device.go b/pkg/cloudapi/compute/list_pci_device.go index ffa65d9f..31eed297 100644 --- a/pkg/cloudapi/compute/list_pci_device.go +++ b/pkg/cloudapi/compute/list_pci_device.go @@ -5,7 +5,7 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // ListPCIDeviceRequest struct to get list of PCI devices @@ -14,10 +14,6 @@ type ListPCIDeviceRequest struct { // Required: true ComputeID uint64 `url:"computeId" json:"computeId" validate:"required"` - // Find by resource group ID - // Required: false - RGID uint64 `url:"rgId,omitempty" json:"rgId,omitempty"` - // Find by device id // Required: false DevID uint64 `url:"devId,omitempty" json:"devId,omitempty"` diff --git a/pkg/cloudapi/compute/list_vgpu.go b/pkg/cloudapi/compute/list_vgpu.go index 7fac32f9..4f46bdca 100644 --- a/pkg/cloudapi/compute/list_vgpu.go +++ b/pkg/cloudapi/compute/list_vgpu.go @@ -5,7 +5,7 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // ListVGPURequest struct to get vGPU list diff --git a/pkg/cloudapi/compute/migrate_to_zone.go b/pkg/cloudapi/compute/migrate_to_zone.go index d9518255..27b72f4b 100644 --- a/pkg/cloudapi/compute/migrate_to_zone.go +++ b/pkg/cloudapi/compute/migrate_to_zone.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // MigrateToRGZone struct to move compute to another zone diff --git a/pkg/cloudapi/compute/models.go b/pkg/cloudapi/compute/models.go index 5ffb1133..ea7e3f0a 100644 --- a/pkg/cloudapi/compute/models.go +++ b/pkg/cloudapi/compute/models.go @@ -558,11 +558,14 @@ type RecordCompute struct { Userdata interface{} `json:"userdata"` // vGPUs list - VGPUs []VGPUItem `json:"vgpus"` + VGPUs []ItemVGPU `json:"vgpus"` // VNC password VNCPassword string `json:"vncPasswd"` + // Watchdog action + WatchdogAction string `json:"watchdog_action"` + // Weight Weight uint64 `json:"weight"` @@ -813,7 +816,7 @@ type SnapRecordCompute struct { Userdata interface{} `json:"userdata"` // vGPUs list - VGPUs []VGPUItem `json:"vgpus"` + VGPUs []ItemVGPU `json:"vgpus"` // VNC password VNCPassword string `json:"vncPasswd"` @@ -848,65 +851,6 @@ type CPUAlignmentProfile struct { Vendor string `json:"vendor"` } -type VGPUItem struct { - // ID - ID uint64 `json:"id"` - - // GID - GID uint64 `json:"gid"` - - // Type - Type string `json:"type"` - - // Mode - Mode string `json:"mode"` - - // Status - Status string `json:"status"` - - // ProfileID - ProfileID uint64 `json:"profileId"` - - // RAM - RAM uint64 `json:"ram"` - - // LastUpdateTime - LastUpdateTime uint64 `json:"lastUpdateTime"` - - // CreatedTime - CreatedTime uint64 `json:"createdTime"` - - // DeletedTime - DeletedTime uint64 `json:"deletedTime"` - - // VMID - VMID uint64 `json:"vmid"` - - // PGPuid - PGPuid uint64 `json:"pgpuid"` - - // ReferenceID - ReferenceID string `json:"referenceId"` - - // AccountID - AccountID uint64 `json:"accountId"` - - // RgID - RgID uint64 `json:"rgId"` - - // LastClaimedBy - LastClaimedBy uint64 `json:"lastClaimedBy"` - - // PCISlot - PCISlot uint64 `json:"pciSlot"` - - // BusNumber - BusNumber uint64 `json:"bus_number"` - - // GUID - GUID uint64 `json:"guid"` -} - // Information about libvirt settings type LibvirtSettings struct { // TX mode @@ -1038,6 +982,9 @@ type ItemVNFInterface struct { // QOS QOS QOS `json:"qos"` + // List of QoS Policy IDs + QoSPolicies []uint64 `json:"qos_policies"` + // List of security groups SecGroups []uint64 `json:"security_groups"` @@ -1551,6 +1498,9 @@ type ItemCompute struct { // VINS connected VINSConnected uint64 `json:"vinsConnected"` + // Watchdog action + WatchdogAction string `json:"watchdog_action"` + // Weight Weight uint64 `json:"weight"` @@ -1569,6 +1519,9 @@ type InfoDisk struct { // SEP ID SepID int64 `json:"sepId"` + // Image ID + ImageID uint64 `json:"imageId"` + // Read-only ReadOnly bool `json:"read_only"` } @@ -1593,59 +1546,56 @@ type ListVGPUs struct { // Main information about vgpu device type ItemVGPU struct { - // Account ID - AccountID uint64 `json:"accountId"` + // Account IDs + AccountIDs []uint64 `json:"account_ids"` - // Created Time - CreatedTime uint64 `json:"createdTime"` + // Bus number + BusNumber int `json:"bus_number"` - // Deleted Time - DeletedTime uint64 `json:"deletedTime"` + // ComputeID + ComputeID uint64 `json:"compute_id"` - // GID + // Created time + CreatedTime uint64 `json:"created_time"` + + // Deleted time + DeletedTime uint64 `json:"deleted_time"` + + // Device Reference + DeviceReference string `json:"device_reference"` + + //Grid ID GID uint64 `json:"gid"` // GUID GUID uint64 `json:"guid"` - // ID + // VGPU ID ID uint64 `json:"id"` - // Last Claimed By - LastClaimedBy uint64 `json:"lastClaimedBy"` + // Last Update time + LastUpdateTime uint64 `json:"last_update_time"` - // Last Update Time - LastUpdateTime uint64 `json:"lastUpdateTime"` + // Mdev UUID + MdevUUID string `json:"mdev_uuid"` - // Mode - Mode string `json:"mode"` + // Parent PCI Address + ParentPCIAddress string `json:"parent_pci_address"` // PCI Slot - PCISlot uint64 `json:"pciSlot"` + PCISlot uint64 `json:"pci_slot"` - // PGPUID - PGPUID uint64 `json:"pgpuid"` + // PGPU ID + PGPUID uint64 `json:"pgpu_id"` - // Profile ID - ProfileID uint64 `json:"profileId"` + // Profile Reference + ProfileReference string `json:"profile_reference"` - // RAM - RAM uint64 `json:"ram"` - - // Reference ID - ReferenceID string `json:"referenceId"` - - // RG ID - RGID uint64 `json:"rgId"` + // Split Mode + SplitMode string `json:"split_mode"` // Status Status string `json:"status"` - - // Type - Type string `json:"type"` - - // VM ID - VMID uint64 `json:"vmid"` } // Main information about PCI device @@ -1668,8 +1618,8 @@ type ItemPCIDevice struct { // Name Name string `json:"name"` - // Resource group ID - RGID uint64 `json:"rgId"` + // Account IDs + AccountIDs []uint64 `json:"account_ids"` // Node ID NodeID uint64 `json:"nodeId"` diff --git a/pkg/cloudapi/compute/move_to_rg.go b/pkg/cloudapi/compute/move_to_rg.go index e9f320ac..69834973 100644 --- a/pkg/cloudapi/compute/move_to_rg.go +++ b/pkg/cloudapi/compute/move_to_rg.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // MoveToRGRequest struct to move compute to new resource group diff --git a/pkg/cloudapi/compute/net_attach.go b/pkg/cloudapi/compute/net_attach.go index b9d0cd07..3ae5d27f 100644 --- a/pkg/cloudapi/compute/net_attach.go +++ b/pkg/cloudapi/compute/net_attach.go @@ -5,7 +5,7 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // NetAttachRequest struct to attach network @@ -86,6 +86,10 @@ type NetAttachRequest struct { // Required: false // Default: true EnableDefaultGateway interface{} `url:"enable_default_gateway,omitempty" json:"enable_default_gateway,omitempty" validate:"omitempty,isBool"` + + // List of QoS Policy IDs to apply to this interface (default: []), Allow used only with netType VINS, EXTNET and DPDK + // Required: false + QoSPolicies []uint64 `url:"qos_policies,omitempty" json:"qos_policies,omitempty"` } type wrapperNetAttachRequest struct { diff --git a/pkg/cloudapi/compute/net_detach.go b/pkg/cloudapi/compute/net_detach.go index 1401eb44..7192c25d 100644 --- a/pkg/cloudapi/compute/net_detach.go +++ b/pkg/cloudapi/compute/net_detach.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // NetDetachRequest struct to detach network from compute diff --git a/pkg/cloudapi/compute/pause.go b/pkg/cloudapi/compute/pause.go index 5d8b2e44..be5a1202 100644 --- a/pkg/cloudapi/compute/pause.go +++ b/pkg/cloudapi/compute/pause.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // PauseRequest struct to pause compute diff --git a/pkg/cloudapi/compute/pfw_add.go b/pkg/cloudapi/compute/pfw_add.go index ceb0b1bc..d0ae1e4c 100644 --- a/pkg/cloudapi/compute/pfw_add.go +++ b/pkg/cloudapi/compute/pfw_add.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // PFWAddRequest struct to add port forward rule diff --git a/pkg/cloudapi/compute/pfw_del.go b/pkg/cloudapi/compute/pfw_del.go index f4b6909f..cc055dbc 100644 --- a/pkg/cloudapi/compute/pfw_del.go +++ b/pkg/cloudapi/compute/pfw_del.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // PFWDelRequest struct to delete port forward rule diff --git a/pkg/cloudapi/compute/pfw_list.go b/pkg/cloudapi/compute/pfw_list.go index 256e980e..766908f1 100644 --- a/pkg/cloudapi/compute/pfw_list.go +++ b/pkg/cloudapi/compute/pfw_list.go @@ -5,7 +5,7 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // PFWListRequest struct to get list of port forwards diff --git a/pkg/cloudapi/compute/pin_to_node.go b/pkg/cloudapi/compute/pin_to_node.go index faf4864a..59a73597 100644 --- a/pkg/cloudapi/compute/pin_to_node.go +++ b/pkg/cloudapi/compute/pin_to_node.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // PinToNodeRequest struct to pin compute to node diff --git a/pkg/cloudapi/compute/power_cycle.go b/pkg/cloudapi/compute/power_cycle.go index da1cd716..4d73b8a2 100644 --- a/pkg/cloudapi/compute/power_cycle.go +++ b/pkg/cloudapi/compute/power_cycle.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // PowerCycleRequest struct to force stop and start compute diff --git a/pkg/cloudapi/compute/reboot.go b/pkg/cloudapi/compute/reboot.go index e69c390e..314930d1 100644 --- a/pkg/cloudapi/compute/reboot.go +++ b/pkg/cloudapi/compute/reboot.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // RebootRequest struct to reboot compute diff --git a/pkg/cloudapi/compute/redeploy.go b/pkg/cloudapi/compute/redeploy.go index 45783f2e..331e63ba 100644 --- a/pkg/cloudapi/compute/redeploy.go +++ b/pkg/cloudapi/compute/redeploy.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // RedeployRequest struct to redeploy diff --git a/pkg/cloudapi/compute/reset.go b/pkg/cloudapi/compute/reset.go index 059abe2e..b1b21ba1 100644 --- a/pkg/cloudapi/compute/reset.go +++ b/pkg/cloudapi/compute/reset.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // ResetRequest struct to reset compute diff --git a/pkg/cloudapi/compute/resize.go b/pkg/cloudapi/compute/resize.go index 3cf375ee..480ef402 100644 --- a/pkg/cloudapi/compute/resize.go +++ b/pkg/cloudapi/compute/resize.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // ResizeRequest struct to resize compute diff --git a/pkg/cloudapi/compute/restore.go b/pkg/cloudapi/compute/restore.go index c32cdc19..643b2116 100644 --- a/pkg/cloudapi/compute/restore.go +++ b/pkg/cloudapi/compute/restore.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // RestoreRequest struct to restore compute diff --git a/pkg/cloudapi/compute/resume.go b/pkg/cloudapi/compute/resume.go index 1d604e19..3525bbd6 100644 --- a/pkg/cloudapi/compute/resume.go +++ b/pkg/cloudapi/compute/resume.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // ResumeRequest struct to resume compute diff --git a/pkg/cloudapi/compute/serialize.go b/pkg/cloudapi/compute/serialize.go index 2dc1ff1f..d350686b 100644 --- a/pkg/cloudapi/compute/serialize.go +++ b/pkg/cloudapi/compute/serialize.go @@ -3,7 +3,7 @@ package compute import ( "encoding/json" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/serialization" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/serialization" ) // Serialize returns JSON-serialized []byte. Used as a wrapper over json.Marshal and json.MarshalIndent functions. diff --git a/pkg/cloudapi/compute/set_cpu_alignment_profile.go b/pkg/cloudapi/compute/set_cpu_alignment_profile.go index 4d2e51c2..47614831 100644 --- a/pkg/cloudapi/compute/set_cpu_alignment_profile.go +++ b/pkg/cloudapi/compute/set_cpu_alignment_profile.go @@ -5,8 +5,8 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/constants" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/constants" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // SetCPUAlignmentProfileRequest struct to set CPU alignment profile for computes diff --git a/pkg/cloudapi/compute/set_custom_fields.go b/pkg/cloudapi/compute/set_custom_fields.go index cbfdb3e3..9e31a1b2 100644 --- a/pkg/cloudapi/compute/set_custom_fields.go +++ b/pkg/cloudapi/compute/set_custom_fields.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // SetCustomFieldsRequest struct to set customFields values for the Compute diff --git a/pkg/cloudapi/compute/shared_snapshot_merge_status.go b/pkg/cloudapi/compute/shared_snapshot_merge_status.go index df00521e..4df704cd 100644 --- a/pkg/cloudapi/compute/shared_snapshot_merge_status.go +++ b/pkg/cloudapi/compute/shared_snapshot_merge_status.go @@ -4,7 +4,7 @@ import ( "context" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // SharedSnapshotMergeStatusRequest struct to get shared snapshot merge status diff --git a/pkg/cloudapi/compute/snapshot_create.go b/pkg/cloudapi/compute/snapshot_create.go index bf7ca5b9..7f545df0 100644 --- a/pkg/cloudapi/compute/snapshot_create.go +++ b/pkg/cloudapi/compute/snapshot_create.go @@ -5,7 +5,7 @@ import ( "net/http" "strings" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // SnapshotCreateRequest struct to create snapshot diff --git a/pkg/cloudapi/compute/snapshot_delete.go b/pkg/cloudapi/compute/snapshot_delete.go index d733081b..950ad808 100644 --- a/pkg/cloudapi/compute/snapshot_delete.go +++ b/pkg/cloudapi/compute/snapshot_delete.go @@ -4,7 +4,7 @@ import ( "context" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // SnapshotDeleteRequest struct to delete snapshot diff --git a/pkg/cloudapi/compute/snapshot_list.go b/pkg/cloudapi/compute/snapshot_list.go index efe9e404..c563dedc 100644 --- a/pkg/cloudapi/compute/snapshot_list.go +++ b/pkg/cloudapi/compute/snapshot_list.go @@ -5,7 +5,7 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // SnapshotListRequest struct to get list snapshots diff --git a/pkg/cloudapi/compute/snapshot_rollback.go b/pkg/cloudapi/compute/snapshot_rollback.go index 63654be6..97cd6b8b 100644 --- a/pkg/cloudapi/compute/snapshot_rollback.go +++ b/pkg/cloudapi/compute/snapshot_rollback.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // SnapshotRollbackRequest struct for rollback diff --git a/pkg/cloudapi/compute/snapshot_usage.go b/pkg/cloudapi/compute/snapshot_usage.go index 1ede9914..70ad1725 100644 --- a/pkg/cloudapi/compute/snapshot_usage.go +++ b/pkg/cloudapi/compute/snapshot_usage.go @@ -5,7 +5,7 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // SnapshotUsageRequest struct to get compute snapshot real size on storage diff --git a/pkg/cloudapi/compute/start.go b/pkg/cloudapi/compute/start.go index 19d74e45..62f937ed 100644 --- a/pkg/cloudapi/compute/start.go +++ b/pkg/cloudapi/compute/start.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // StartRequest struct to start compute diff --git a/pkg/cloudapi/compute/stop.go b/pkg/cloudapi/compute/stop.go index f233c822..3f329770 100644 --- a/pkg/cloudapi/compute/stop.go +++ b/pkg/cloudapi/compute/stop.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // StopRequest struct to stop compute diff --git a/pkg/cloudapi/compute/tag_add.go b/pkg/cloudapi/compute/tag_add.go index b9112111..899959b0 100644 --- a/pkg/cloudapi/compute/tag_add.go +++ b/pkg/cloudapi/compute/tag_add.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // TagAddRequest struct to add tag to compute diff --git a/pkg/cloudapi/compute/tag_remove.go b/pkg/cloudapi/compute/tag_remove.go index bfaeb369..b33909a1 100644 --- a/pkg/cloudapi/compute/tag_remove.go +++ b/pkg/cloudapi/compute/tag_remove.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // TagRemoveRequest struct to remove tag from compute diff --git a/pkg/cloudapi/compute/unpin_from_node.go b/pkg/cloudapi/compute/unpin_from_node.go index 4af232db..19192536 100644 --- a/pkg/cloudapi/compute/unpin_from_node.go +++ b/pkg/cloudapi/compute/unpin_from_node.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // UnpinFromNodeRequest struct for unpin from node diff --git a/pkg/cloudapi/compute/update.go b/pkg/cloudapi/compute/update.go index 71537a56..39a43467 100644 --- a/pkg/cloudapi/compute/update.go +++ b/pkg/cloudapi/compute/update.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // UpdateRequest struct to update compute @@ -74,6 +74,11 @@ type UpdateRequest struct { // Required: false // Default: null Clock string `url:"clock,omitempty" json:"clock,omitempty"` + + // Watchdog action + // Required: false + // Default: reset + WatchdogAction string `url:"watchdog_action,omitempty" json:"watchdog_action,omitempty" validate:"omitempty,watchdogAction"` } // Update updates some properties of the compute diff --git a/pkg/cloudapi/compute/user_grant.go b/pkg/cloudapi/compute/user_grant.go index a826fbcf..cf174912 100644 --- a/pkg/cloudapi/compute/user_grant.go +++ b/pkg/cloudapi/compute/user_grant.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // UserGrantRequest struct to grant access to compute diff --git a/pkg/cloudapi/compute/user_list.go b/pkg/cloudapi/compute/user_list.go index 86f1ef31..e7967afa 100644 --- a/pkg/cloudapi/compute/user_list.go +++ b/pkg/cloudapi/compute/user_list.go @@ -5,7 +5,7 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // UserListRequest struct to get list of users for compute diff --git a/pkg/cloudapi/compute/user_revoke.go b/pkg/cloudapi/compute/user_revoke.go index a3588a8f..68e692c3 100644 --- a/pkg/cloudapi/compute/user_revoke.go +++ b/pkg/cloudapi/compute/user_revoke.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // UserRevokeRequest struct to revoke user access diff --git a/pkg/cloudapi/compute/user_update.go b/pkg/cloudapi/compute/user_update.go index cc95bd76..ac535e21 100644 --- a/pkg/cloudapi/compute/user_update.go +++ b/pkg/cloudapi/compute/user_update.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // UserUpdateRequest struct to update user access diff --git a/pkg/cloudapi/disks.go b/pkg/cloudapi/disks.go index c470dcea..0018871a 100644 --- a/pkg/cloudapi/disks.go +++ b/pkg/cloudapi/disks.go @@ -1,7 +1,7 @@ package cloudapi import ( - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/pkg/cloudapi/disks" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/pkg/cloudapi/disks" ) // Accessing the Disks method group diff --git a/pkg/cloudapi/disks/change_disk_storage_policy.go b/pkg/cloudapi/disks/change_disk_storage_policy.go index 648cc1a2..1dc4935e 100644 --- a/pkg/cloudapi/disks/change_disk_storage_policy.go +++ b/pkg/cloudapi/disks/change_disk_storage_policy.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // ChangeDiskStoragePolicyRequest struct to change storage policy for disk diff --git a/pkg/cloudapi/disks/create.go b/pkg/cloudapi/disks/create.go index f249a38d..d067a812 100644 --- a/pkg/cloudapi/disks/create.go +++ b/pkg/cloudapi/disks/create.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // CreateRequest struct to create disk @@ -39,7 +39,13 @@ type CreateRequest struct { Pool string `url:"pool,omitempty" json:"pool,omitempty"` } -// Create creates a disk +type wrapperCreateRequest struct { + CreateRequest + + AsyncMode bool `url:"async_mode" json:"async_mode"` +} + +// Create creates a disk in sync mode func (d Disks) Create(ctx context.Context, req CreateRequest) (uint64, error) { err := validators.ValidateRequest(req) if err != nil { @@ -48,7 +54,12 @@ func (d Disks) Create(ctx context.Context, req CreateRequest) (uint64, error) { url := "/cloudapi/disks/create" - res, err := d.client.DecortApiCall(ctx, http.MethodPost, url, req) + wrappedReq := wrapperCreateRequest{ + CreateRequest: req, + AsyncMode: false, + } + + res, err := d.client.DecortApiCall(ctx, http.MethodPost, url, wrappedReq) if err != nil { return 0, err } @@ -60,3 +71,25 @@ func (d Disks) Create(ctx context.Context, req CreateRequest) (uint64, error) { return result, nil } + +// Create creates a disk in async mode +func (d Disks) CreateAsync(ctx context.Context, req CreateRequest) (string, error) { + err := validators.ValidateRequest(req) + if err != nil { + return "", validators.ValidationErrors(validators.GetErrors(err)) + } + + url := "/cloudapi/disks/create" + + wrappedReq := wrapperCreateRequest{ + CreateRequest: req, + AsyncMode: true, + } + + res, err := d.client.DecortApiCall(ctx, http.MethodPost, url, wrappedReq) + if err != nil { + return "", err + } + + return string(res), nil +} diff --git a/pkg/cloudapi/disks/delete.go b/pkg/cloudapi/disks/delete.go index b3d345a4..3d163516 100644 --- a/pkg/cloudapi/disks/delete.go +++ b/pkg/cloudapi/disks/delete.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // DeleteRequest to delete disk diff --git a/pkg/cloudapi/disks/delete_disks.go b/pkg/cloudapi/disks/delete_disks.go index 4f18bf11..e3b68aa0 100644 --- a/pkg/cloudapi/disks/delete_disks.go +++ b/pkg/cloudapi/disks/delete_disks.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // DisksDeleteRequest struct for multiple disks diff --git a/pkg/cloudapi/disks/disks.go b/pkg/cloudapi/disks/disks.go index 93d7cfc3..a7d46b56 100644 --- a/pkg/cloudapi/disks/disks.go +++ b/pkg/cloudapi/disks/disks.go @@ -2,7 +2,7 @@ package disks import ( - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/interfaces" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/interfaces" ) // Structure for creating request to disks diff --git a/pkg/cloudapi/disks/filter.go b/pkg/cloudapi/disks/filter.go index d69d8586..b770150f 100644 --- a/pkg/cloudapi/disks/filter.go +++ b/pkg/cloudapi/disks/filter.go @@ -4,9 +4,9 @@ import ( "context" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/interfaces" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/pkg/cloudapi/k8s" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/pkg/cloudapi/lb" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/interfaces" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/pkg/cloudapi/k8s" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/pkg/cloudapi/lb" ) // FilterByID returns ListDisks with specified ID. diff --git a/pkg/cloudapi/disks/from_platform_disk.go b/pkg/cloudapi/disks/from_platform_disk.go index 21b15285..3486cb41 100644 --- a/pkg/cloudapi/disks/from_platform_disk.go +++ b/pkg/cloudapi/disks/from_platform_disk.go @@ -6,7 +6,7 @@ import ( "strconv" "strings" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // FromPlatformDiskRequest struct to create template from platform disk diff --git a/pkg/cloudapi/disks/get.go b/pkg/cloudapi/disks/get.go index 7563b330..195b1dea 100644 --- a/pkg/cloudapi/disks/get.go +++ b/pkg/cloudapi/disks/get.go @@ -5,7 +5,7 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // GetRequest struct to get information about disk diff --git a/pkg/cloudapi/disks/limitio.go b/pkg/cloudapi/disks/limitio.go index 6c6a5d76..6c16864e 100644 --- a/pkg/cloudapi/disks/limitio.go +++ b/pkg/cloudapi/disks/limitio.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // LimitIORequest struct for limit IO diff --git a/pkg/cloudapi/disks/list.go b/pkg/cloudapi/disks/list.go index 9ccb9ef5..618477a8 100644 --- a/pkg/cloudapi/disks/list.go +++ b/pkg/cloudapi/disks/list.go @@ -5,7 +5,7 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // ListRequest struct to get list of disks @@ -28,7 +28,7 @@ type ListRequest struct { // Find by status // Required: false - Status string `url:"status,omitempty" json:"status,omitempty"` + Status []string `url:"status,omitempty" json:"status,omitempty"` // Find by shared, true or false // Required: false diff --git a/pkg/cloudapi/disks/list_deleted.go b/pkg/cloudapi/disks/list_deleted.go index 67756adc..e6350504 100644 --- a/pkg/cloudapi/disks/list_deleted.go +++ b/pkg/cloudapi/disks/list_deleted.go @@ -5,7 +5,7 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // ListDeletedRequest struct to get list of deleted disks diff --git a/pkg/cloudapi/disks/list_unattached.go b/pkg/cloudapi/disks/list_unattached.go index b145a55f..d2051f0f 100644 --- a/pkg/cloudapi/disks/list_unattached.go +++ b/pkg/cloudapi/disks/list_unattached.go @@ -5,7 +5,7 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // ListUnattachedRequest struct to get list of unattached disk diff --git a/pkg/cloudapi/disks/rename.go b/pkg/cloudapi/disks/rename.go index e6517748..2ee24f70 100644 --- a/pkg/cloudapi/disks/rename.go +++ b/pkg/cloudapi/disks/rename.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // RenameRequest struct to rename disk diff --git a/pkg/cloudapi/disks/replicate.go b/pkg/cloudapi/disks/replicate.go index 1b7c680e..b548a692 100644 --- a/pkg/cloudapi/disks/replicate.go +++ b/pkg/cloudapi/disks/replicate.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // ReplicateRequest struct to create an empty disk in chosen SEP and pool combination. diff --git a/pkg/cloudapi/disks/replication_resume.go b/pkg/cloudapi/disks/replication_resume.go index 4da510c7..de5c3c41 100644 --- a/pkg/cloudapi/disks/replication_resume.go +++ b/pkg/cloudapi/disks/replication_resume.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // ReplicationResume struct to resume suspended replication diff --git a/pkg/cloudapi/disks/replication_reverse.go b/pkg/cloudapi/disks/replication_reverse.go index 41e92eec..75c32a71 100644 --- a/pkg/cloudapi/disks/replication_reverse.go +++ b/pkg/cloudapi/disks/replication_reverse.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // ReplicationReverseRequest struct to change role between disks replications diff --git a/pkg/cloudapi/disks/replication_start.go b/pkg/cloudapi/disks/replication_start.go index cc345951..5407d259 100644 --- a/pkg/cloudapi/disks/replication_start.go +++ b/pkg/cloudapi/disks/replication_start.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // ReplicationStartRequest struct to starts replication between two chosen disks diff --git a/pkg/cloudapi/disks/replication_status.go b/pkg/cloudapi/disks/replication_status.go index b4e514a2..1277832f 100644 --- a/pkg/cloudapi/disks/replication_status.go +++ b/pkg/cloudapi/disks/replication_status.go @@ -4,7 +4,7 @@ import ( "context" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // ReplicationStatusRequest struct to get replication status diff --git a/pkg/cloudapi/disks/replication_stop.go b/pkg/cloudapi/disks/replication_stop.go index 05f74bde..2bc2efa6 100644 --- a/pkg/cloudapi/disks/replication_stop.go +++ b/pkg/cloudapi/disks/replication_stop.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // ReplicationStopRequest struct to remove replication between disks completely diff --git a/pkg/cloudapi/disks/replication_suspend.go b/pkg/cloudapi/disks/replication_suspend.go index 79bea69b..0a0f6314 100644 --- a/pkg/cloudapi/disks/replication_suspend.go +++ b/pkg/cloudapi/disks/replication_suspend.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // ReplicationSuspendRequest struct to pause replication with possibility to resume from pause moment diff --git a/pkg/cloudapi/disks/resize.go b/pkg/cloudapi/disks/resize.go index fd01efa0..8cd751f1 100644 --- a/pkg/cloudapi/disks/resize.go +++ b/pkg/cloudapi/disks/resize.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // ResizeRequest struct to resize disk diff --git a/pkg/cloudapi/disks/restore.go b/pkg/cloudapi/disks/restore.go index e5b1dc98..a43550f0 100644 --- a/pkg/cloudapi/disks/restore.go +++ b/pkg/cloudapi/disks/restore.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // RestoreRequest struct to restore a deleted unattached disk diff --git a/pkg/cloudapi/disks/serialize.go b/pkg/cloudapi/disks/serialize.go index e03f5785..9bf7a0c3 100644 --- a/pkg/cloudapi/disks/serialize.go +++ b/pkg/cloudapi/disks/serialize.go @@ -3,7 +3,7 @@ package disks import ( "encoding/json" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/serialization" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/serialization" ) // Serialize returns JSON-serialized []byte. Used as a wrapper over json.Marshal and json.MarshalIndent functions. diff --git a/pkg/cloudapi/disks/share.go b/pkg/cloudapi/disks/share.go index de8dd1e1..b3f4d2b4 100644 --- a/pkg/cloudapi/disks/share.go +++ b/pkg/cloudapi/disks/share.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // ShareRequest struct to share disk data diff --git a/pkg/cloudapi/disks/snapshot_delete.go b/pkg/cloudapi/disks/snapshot_delete.go index 64d6c1e7..60dac173 100644 --- a/pkg/cloudapi/disks/snapshot_delete.go +++ b/pkg/cloudapi/disks/snapshot_delete.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // SnapshotDeleteRequest struct to delete snapshot diff --git a/pkg/cloudapi/disks/snapshot_rollback.go b/pkg/cloudapi/disks/snapshot_rollback.go index 38f88775..a5fb4fdc 100644 --- a/pkg/cloudapi/disks/snapshot_rollback.go +++ b/pkg/cloudapi/disks/snapshot_rollback.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // SnapshotRollbackRequest struct to rollback snapshot diff --git a/pkg/cloudapi/disks/unshare.go b/pkg/cloudapi/disks/unshare.go index 6de363f7..c5fa01fa 100644 --- a/pkg/cloudapi/disks/unshare.go +++ b/pkg/cloudapi/disks/unshare.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // UnshareRequest struct to unshare data disk diff --git a/pkg/cloudapi/dpdknet.go b/pkg/cloudapi/dpdknet.go index b692a806..e78162a1 100644 --- a/pkg/cloudapi/dpdknet.go +++ b/pkg/cloudapi/dpdknet.go @@ -1,6 +1,6 @@ package cloudapi -import "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/pkg/cloudapi/dpdknet" +import "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/pkg/cloudapi/dpdknet" // Accessing the DPDKNet method group func (ca *CloudAPI) DPDKNet() *dpdknet.DPDKNet { diff --git a/pkg/cloudapi/dpdknet/dpdknet.go b/pkg/cloudapi/dpdknet/dpdknet.go index 84a4c3d6..5b2616c9 100644 --- a/pkg/cloudapi/dpdknet/dpdknet.go +++ b/pkg/cloudapi/dpdknet/dpdknet.go @@ -1,6 +1,6 @@ package dpdknet -import "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/interfaces" +import "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/interfaces" // Structure for creating request to DPDK network type DPDKNet struct { diff --git a/pkg/cloudapi/dpdknet/get.go b/pkg/cloudapi/dpdknet/get.go index 9c99949f..b45ea11f 100644 --- a/pkg/cloudapi/dpdknet/get.go +++ b/pkg/cloudapi/dpdknet/get.go @@ -5,7 +5,7 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // GetRequest struct to get information about DPDK network diff --git a/pkg/cloudapi/dpdknet/list.go b/pkg/cloudapi/dpdknet/list.go index 8435d75c..85c0b9b7 100644 --- a/pkg/cloudapi/dpdknet/list.go +++ b/pkg/cloudapi/dpdknet/list.go @@ -5,7 +5,7 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // ListRequest struct to get list of DPDK networks diff --git a/pkg/cloudapi/extnet.go b/pkg/cloudapi/extnet.go index 3b3ae5cb..c5f0c5c7 100644 --- a/pkg/cloudapi/extnet.go +++ b/pkg/cloudapi/extnet.go @@ -1,7 +1,7 @@ package cloudapi import ( - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/pkg/cloudapi/extnet" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/pkg/cloudapi/extnet" ) // Accessing the ExtNet method group diff --git a/pkg/cloudapi/extnet/extnet.go b/pkg/cloudapi/extnet/extnet.go index 3f55702c..d28bb807 100644 --- a/pkg/cloudapi/extnet/extnet.go +++ b/pkg/cloudapi/extnet/extnet.go @@ -2,7 +2,7 @@ package extnet import ( - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/interfaces" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/interfaces" ) // Structure for creating request to extnet diff --git a/pkg/cloudapi/extnet/get.go b/pkg/cloudapi/extnet/get.go index 4cf2759b..9517d68f 100644 --- a/pkg/cloudapi/extnet/get.go +++ b/pkg/cloudapi/extnet/get.go @@ -5,7 +5,7 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // GetRequest struct to get detailed information about external network diff --git a/pkg/cloudapi/extnet/get_reserved_ip.go b/pkg/cloudapi/extnet/get_reserved_ip.go index 466987bd..84f81127 100644 --- a/pkg/cloudapi/extnet/get_reserved_ip.go +++ b/pkg/cloudapi/extnet/get_reserved_ip.go @@ -5,7 +5,7 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // GetRequest struct to get information about reserved address or address poll diff --git a/pkg/cloudapi/extnet/list.go b/pkg/cloudapi/extnet/list.go index 9f577025..7062d88e 100644 --- a/pkg/cloudapi/extnet/list.go +++ b/pkg/cloudapi/extnet/list.go @@ -5,7 +5,7 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // ListRequest struct to get list of external network diff --git a/pkg/cloudapi/extnet/list_computes.go b/pkg/cloudapi/extnet/list_computes.go index 98b77ed5..9ef53d23 100644 --- a/pkg/cloudapi/extnet/list_computes.go +++ b/pkg/cloudapi/extnet/list_computes.go @@ -5,7 +5,7 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // ListComputesRequest struct to get list computes diff --git a/pkg/cloudapi/extnet/serialize.go b/pkg/cloudapi/extnet/serialize.go index f15e1752..e72f2ddc 100644 --- a/pkg/cloudapi/extnet/serialize.go +++ b/pkg/cloudapi/extnet/serialize.go @@ -3,7 +3,7 @@ package extnet import ( "encoding/json" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/serialization" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/serialization" ) // Serialize returns JSON-serialized []byte. Used as a wrapper over json.Marshal and json.MarshalIndent functions. diff --git a/pkg/cloudapi/flipgroup.go b/pkg/cloudapi/flipgroup.go index 15bb0402..382c0a94 100644 --- a/pkg/cloudapi/flipgroup.go +++ b/pkg/cloudapi/flipgroup.go @@ -1,7 +1,7 @@ package cloudapi import ( - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/pkg/cloudapi/flipgroup" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/pkg/cloudapi/flipgroup" ) // Accessing the FLIPGroup method group diff --git a/pkg/cloudapi/flipgroup/compute_add.go b/pkg/cloudapi/flipgroup/compute_add.go index aaa8ab60..95c3903b 100644 --- a/pkg/cloudapi/flipgroup/compute_add.go +++ b/pkg/cloudapi/flipgroup/compute_add.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // ComputeAddRequest struct to add compute instance diff --git a/pkg/cloudapi/flipgroup/compute_remove.go b/pkg/cloudapi/flipgroup/compute_remove.go index 492670ce..93789e35 100644 --- a/pkg/cloudapi/flipgroup/compute_remove.go +++ b/pkg/cloudapi/flipgroup/compute_remove.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // ComputeRemoveRequest struct to remove compute instance diff --git a/pkg/cloudapi/flipgroup/create.go b/pkg/cloudapi/flipgroup/create.go index fb214434..f0d6a626 100644 --- a/pkg/cloudapi/flipgroup/create.go +++ b/pkg/cloudapi/flipgroup/create.go @@ -5,7 +5,7 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // CreateRequest struct to create FLIPGroup diff --git a/pkg/cloudapi/flipgroup/delete.go b/pkg/cloudapi/flipgroup/delete.go index fd11fee3..2c91ab67 100644 --- a/pkg/cloudapi/flipgroup/delete.go +++ b/pkg/cloudapi/flipgroup/delete.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // DeleteRequest struct to delete FLIPGroup diff --git a/pkg/cloudapi/flipgroup/edit.go b/pkg/cloudapi/flipgroup/edit.go index 2efea98a..2c0165c2 100644 --- a/pkg/cloudapi/flipgroup/edit.go +++ b/pkg/cloudapi/flipgroup/edit.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // EditRequest struct to edit FLIPGroup diff --git a/pkg/cloudapi/flipgroup/flipgroup.go b/pkg/cloudapi/flipgroup/flipgroup.go index 1cf29321..97854f5b 100644 --- a/pkg/cloudapi/flipgroup/flipgroup.go +++ b/pkg/cloudapi/flipgroup/flipgroup.go @@ -2,7 +2,7 @@ package flipgroup import ( - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/interfaces" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/interfaces" ) // Structure for creating request to FLIPGroup diff --git a/pkg/cloudapi/flipgroup/get.go b/pkg/cloudapi/flipgroup/get.go index 16adc8d4..dbe6b4cf 100644 --- a/pkg/cloudapi/flipgroup/get.go +++ b/pkg/cloudapi/flipgroup/get.go @@ -5,7 +5,7 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // GetRequest struct to get information about FLIPGroup diff --git a/pkg/cloudapi/flipgroup/list.go b/pkg/cloudapi/flipgroup/list.go index 6fcb031c..aa84adf7 100644 --- a/pkg/cloudapi/flipgroup/list.go +++ b/pkg/cloudapi/flipgroup/list.go @@ -5,7 +5,7 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // ListRequest struct to get list of FLIPGroup available to the current user diff --git a/pkg/cloudapi/flipgroup/serialize.go b/pkg/cloudapi/flipgroup/serialize.go index 9f322bdf..57cb017b 100644 --- a/pkg/cloudapi/flipgroup/serialize.go +++ b/pkg/cloudapi/flipgroup/serialize.go @@ -3,7 +3,7 @@ package flipgroup import ( "encoding/json" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/serialization" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/serialization" ) // Serialize returns JSON-serialized []byte. Used as a wrapper over json.Marshal and json.MarshalIndent functions. diff --git a/pkg/cloudapi/image.go b/pkg/cloudapi/image.go index 2a91c4fd..205125e1 100644 --- a/pkg/cloudapi/image.go +++ b/pkg/cloudapi/image.go @@ -1,7 +1,7 @@ package cloudapi import ( - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/pkg/cloudapi/image" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/pkg/cloudapi/image" ) // Accessing the Image method group diff --git a/pkg/cloudapi/image/change_storage_policy.go b/pkg/cloudapi/image/change_storage_policy.go index 5bf1953a..330ece06 100644 --- a/pkg/cloudapi/image/change_storage_policy.go +++ b/pkg/cloudapi/image/change_storage_policy.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) type ChangeStoragePolicyRequest struct { diff --git a/pkg/cloudapi/image/create.go b/pkg/cloudapi/image/create.go index 4a4a375f..41827206 100644 --- a/pkg/cloudapi/image/create.go +++ b/pkg/cloudapi/image/create.go @@ -6,7 +6,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // CreateRequest struct to create image diff --git a/pkg/cloudapi/image/create_virtual.go b/pkg/cloudapi/image/create_virtual.go index fd493656..c898b453 100644 --- a/pkg/cloudapi/image/create_virtual.go +++ b/pkg/cloudapi/image/create_virtual.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // CreateVirtualRequest struct to create virtual image diff --git a/pkg/cloudapi/image/delete.go b/pkg/cloudapi/image/delete.go index f15df580..a52b909b 100644 --- a/pkg/cloudapi/image/delete.go +++ b/pkg/cloudapi/image/delete.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // DeleteRequest struct to delete image diff --git a/pkg/cloudapi/image/get.go b/pkg/cloudapi/image/get.go index 7d7bf643..ccfb2a64 100644 --- a/pkg/cloudapi/image/get.go +++ b/pkg/cloudapi/image/get.go @@ -5,7 +5,7 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // GetRequest struct to get detailed information about image diff --git a/pkg/cloudapi/image/image.go b/pkg/cloudapi/image/image.go index ab68fdfa..672d25d8 100644 --- a/pkg/cloudapi/image/image.go +++ b/pkg/cloudapi/image/image.go @@ -2,7 +2,7 @@ package image import ( - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/interfaces" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/interfaces" ) // Structure for creating request to image diff --git a/pkg/cloudapi/image/link.go b/pkg/cloudapi/image/link.go index 31575dd9..25ccff60 100644 --- a/pkg/cloudapi/image/link.go +++ b/pkg/cloudapi/image/link.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // LinkRequest struct to link virtual image to another image diff --git a/pkg/cloudapi/image/list.go b/pkg/cloudapi/image/list.go index af20d2b5..17564fab 100644 --- a/pkg/cloudapi/image/list.go +++ b/pkg/cloudapi/image/list.go @@ -5,8 +5,8 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/constants" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/constants" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // ListRequest struct to get list of available images diff --git a/pkg/cloudapi/image/rename.go b/pkg/cloudapi/image/rename.go index f3efe2d4..d2f5fd88 100644 --- a/pkg/cloudapi/image/rename.go +++ b/pkg/cloudapi/image/rename.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // RenameRequest struct to rename image diff --git a/pkg/cloudapi/image/serialize.go b/pkg/cloudapi/image/serialize.go index 6c4bde65..be6e2f3a 100644 --- a/pkg/cloudapi/image/serialize.go +++ b/pkg/cloudapi/image/serialize.go @@ -3,7 +3,7 @@ package image import ( "encoding/json" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/serialization" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/serialization" ) // Serialize returns JSON-serialized []byte. Used as a wrapper over json.Marshal and json.MarshalIndent functions. diff --git a/pkg/cloudapi/k8ci.go b/pkg/cloudapi/k8ci.go index 2df30560..d43a4169 100644 --- a/pkg/cloudapi/k8ci.go +++ b/pkg/cloudapi/k8ci.go @@ -1,7 +1,7 @@ package cloudapi import ( - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/pkg/cloudapi/k8ci" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/pkg/cloudapi/k8ci" ) // Accessing the K8CI method group diff --git a/pkg/cloudapi/k8ci/get.go b/pkg/cloudapi/k8ci/get.go index e0dd592f..7d14722e 100644 --- a/pkg/cloudapi/k8ci/get.go +++ b/pkg/cloudapi/k8ci/get.go @@ -5,7 +5,7 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // GetRequest struct to get information about K8CI diff --git a/pkg/cloudapi/k8ci/k8ci.go b/pkg/cloudapi/k8ci/k8ci.go index 061f11b1..b0fc9145 100644 --- a/pkg/cloudapi/k8ci/k8ci.go +++ b/pkg/cloudapi/k8ci/k8ci.go @@ -2,7 +2,7 @@ package k8ci import ( - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/interfaces" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/interfaces" ) // Structure for creating request to K8CI diff --git a/pkg/cloudapi/k8ci/list.go b/pkg/cloudapi/k8ci/list.go index 753b981d..4992ebf8 100644 --- a/pkg/cloudapi/k8ci/list.go +++ b/pkg/cloudapi/k8ci/list.go @@ -5,7 +5,7 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // ListRequest struct to get list of information about images diff --git a/pkg/cloudapi/k8ci/list_deleted.go b/pkg/cloudapi/k8ci/list_deleted.go index 9ae3351e..644ce6b1 100644 --- a/pkg/cloudapi/k8ci/list_deleted.go +++ b/pkg/cloudapi/k8ci/list_deleted.go @@ -5,7 +5,7 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // ListDeletedRequest struct to get list information about deleted k8ci items diff --git a/pkg/cloudapi/k8ci/serialize.go b/pkg/cloudapi/k8ci/serialize.go index be1196a7..c07301fb 100644 --- a/pkg/cloudapi/k8ci/serialize.go +++ b/pkg/cloudapi/k8ci/serialize.go @@ -3,7 +3,7 @@ package k8ci import ( "encoding/json" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/serialization" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/serialization" ) // Serialize returns JSON-serialized []byte. Used as a wrapper over json.Marshal and json.MarshalIndent functions. diff --git a/pkg/cloudapi/k8s.go b/pkg/cloudapi/k8s.go index 8ee66180..0acb1e31 100644 --- a/pkg/cloudapi/k8s.go +++ b/pkg/cloudapi/k8s.go @@ -1,7 +1,7 @@ package cloudapi import ( - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/pkg/cloudapi/k8s" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/pkg/cloudapi/k8s" ) // Accessing the K8S method group diff --git a/pkg/cloudapi/k8s/create.go b/pkg/cloudapi/k8s/create.go index d474a122..d2b8999f 100644 --- a/pkg/cloudapi/k8s/create.go +++ b/pkg/cloudapi/k8s/create.go @@ -5,7 +5,7 @@ import ( "net/http" "strings" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // CreateRequest struct to create kubernetes cluster @@ -157,7 +157,7 @@ type CreateRequest struct { // Meta data for working group computes, format YAML "user_data": 1111 // Required: false - UserData string `url:"userData,omitempty" json:"userData,omitempty"` + UserData interface{} `url:"userData,omitempty" json:"userData,omitempty"` // Use only selected ExtNet for infrastructure connections // Required: false diff --git a/pkg/cloudapi/k8s/delete.go b/pkg/cloudapi/k8s/delete.go index a04b5980..44534e7c 100644 --- a/pkg/cloudapi/k8s/delete.go +++ b/pkg/cloudapi/k8s/delete.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // DeleteRequest struct to delete kubernetes cluster diff --git a/pkg/cloudapi/k8s/delete_master_from_group.go b/pkg/cloudapi/k8s/delete_master_from_group.go index c75df1bb..a5b7bd3e 100644 --- a/pkg/cloudapi/k8s/delete_master_from_group.go +++ b/pkg/cloudapi/k8s/delete_master_from_group.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // DeleteMasterFromGroupRequest struct to delete master from group diff --git a/pkg/cloudapi/k8s/delete_worker_from_group.go b/pkg/cloudapi/k8s/delete_worker_from_group.go index 85f65b9e..b4351fbc 100644 --- a/pkg/cloudapi/k8s/delete_worker_from_group.go +++ b/pkg/cloudapi/k8s/delete_worker_from_group.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // DeleteWorkerFromGroupRequest struct to delete worker from group diff --git a/pkg/cloudapi/k8s/disable_enable.go b/pkg/cloudapi/k8s/disable_enable.go index a49ea056..0cedff2b 100644 --- a/pkg/cloudapi/k8s/disable_enable.go +++ b/pkg/cloudapi/k8s/disable_enable.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // DisableEnableRequest struct to disable/enable kubernetes cluster diff --git a/pkg/cloudapi/k8s/find_group_by_label.go b/pkg/cloudapi/k8s/find_group_by_label.go index b151a35b..674199f7 100644 --- a/pkg/cloudapi/k8s/find_group_by_label.go +++ b/pkg/cloudapi/k8s/find_group_by_label.go @@ -5,7 +5,7 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // FindGroupByLabelRequest struct to get information about group of kubernetes cluster diff --git a/pkg/cloudapi/k8s/get.go b/pkg/cloudapi/k8s/get.go index 6d6046b3..20479bd3 100644 --- a/pkg/cloudapi/k8s/get.go +++ b/pkg/cloudapi/k8s/get.go @@ -5,7 +5,7 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // GetRequest struct to get detailed information about kubernetes cluster diff --git a/pkg/cloudapi/k8s/get_config.go b/pkg/cloudapi/k8s/get_config.go index ded97484..5cda4e99 100644 --- a/pkg/cloudapi/k8s/get_config.go +++ b/pkg/cloudapi/k8s/get_config.go @@ -4,7 +4,7 @@ import ( "context" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // GetConfigRequest struct to get configuration of kubernetes cluster diff --git a/pkg/cloudapi/k8s/get_node_annotations.go b/pkg/cloudapi/k8s/get_node_annotations.go index 071cf8c7..abd48bfc 100644 --- a/pkg/cloudapi/k8s/get_node_annotations.go +++ b/pkg/cloudapi/k8s/get_node_annotations.go @@ -4,7 +4,7 @@ import ( "context" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // GetNodeAnnotationsRequest struct to get node annotations diff --git a/pkg/cloudapi/k8s/get_node_labels.go b/pkg/cloudapi/k8s/get_node_labels.go index e4493230..8eff1410 100644 --- a/pkg/cloudapi/k8s/get_node_labels.go +++ b/pkg/cloudapi/k8s/get_node_labels.go @@ -4,7 +4,7 @@ import ( "context" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // GetNodeLabelsRequest struct to get node labels diff --git a/pkg/cloudapi/k8s/get_node_taints.go b/pkg/cloudapi/k8s/get_node_taints.go index 7e227cd8..6083bbe6 100644 --- a/pkg/cloudapi/k8s/get_node_taints.go +++ b/pkg/cloudapi/k8s/get_node_taints.go @@ -4,7 +4,7 @@ import ( "context" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // GetNodeTaintsRequest struct to get node taints diff --git a/pkg/cloudapi/k8s/get_worker_nodes_meta_data.go b/pkg/cloudapi/k8s/get_worker_nodes_meta_data.go index 387e18e8..61280615 100644 --- a/pkg/cloudapi/k8s/get_worker_nodes_meta_data.go +++ b/pkg/cloudapi/k8s/get_worker_nodes_meta_data.go @@ -4,7 +4,7 @@ import ( "context" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // GetWorkerNodesMetaDataRequest struct to get worker group metadata by ID diff --git a/pkg/cloudapi/k8s/k8s.go b/pkg/cloudapi/k8s/k8s.go index dd361bf0..1b955741 100644 --- a/pkg/cloudapi/k8s/k8s.go +++ b/pkg/cloudapi/k8s/k8s.go @@ -2,7 +2,7 @@ package k8s import ( - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/interfaces" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/interfaces" ) // Structure for creating request to K8S diff --git a/pkg/cloudapi/k8s/list.go b/pkg/cloudapi/k8s/list.go index 5bb3ef6b..97de519f 100644 --- a/pkg/cloudapi/k8s/list.go +++ b/pkg/cloudapi/k8s/list.go @@ -5,7 +5,7 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // ListRequest struct to get list information K8S diff --git a/pkg/cloudapi/k8s/list_deleted.go b/pkg/cloudapi/k8s/list_deleted.go index b9d45b62..032a64b2 100644 --- a/pkg/cloudapi/k8s/list_deleted.go +++ b/pkg/cloudapi/k8s/list_deleted.go @@ -5,7 +5,7 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // ListDeletedRequest struct to get list of deleted kubernetes cluster diff --git a/pkg/cloudapi/k8s/migrate_to_zone.go b/pkg/cloudapi/k8s/migrate_to_zone.go index 9eae30d8..18a91aa5 100644 --- a/pkg/cloudapi/k8s/migrate_to_zone.go +++ b/pkg/cloudapi/k8s/migrate_to_zone.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // MigrateToZone struct to move k8s cluster to another zone diff --git a/pkg/cloudapi/k8s/restore.go b/pkg/cloudapi/k8s/restore.go index 69b2a94e..e6b88dc1 100644 --- a/pkg/cloudapi/k8s/restore.go +++ b/pkg/cloudapi/k8s/restore.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // RestoreRequest struct to restore kubernetes cluster diff --git a/pkg/cloudapi/k8s/serialize.go b/pkg/cloudapi/k8s/serialize.go index 25e7b7ff..849ad841 100644 --- a/pkg/cloudapi/k8s/serialize.go +++ b/pkg/cloudapi/k8s/serialize.go @@ -3,7 +3,7 @@ package k8s import ( "encoding/json" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/serialization" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/serialization" ) // Serialize returns JSON-serialized []byte. Used as a wrapper over json.Marshal and json.MarshalIndent functions. diff --git a/pkg/cloudapi/k8s/start.go b/pkg/cloudapi/k8s/start.go index d36648f1..804e5121 100644 --- a/pkg/cloudapi/k8s/start.go +++ b/pkg/cloudapi/k8s/start.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // StartRequest struct to start kubernetes cluster diff --git a/pkg/cloudapi/k8s/stop.go b/pkg/cloudapi/k8s/stop.go index 1c7b30fb..59cc01e8 100644 --- a/pkg/cloudapi/k8s/stop.go +++ b/pkg/cloudapi/k8s/stop.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // StopRequest struct to stop kubernetes cluster diff --git a/pkg/cloudapi/k8s/update.go b/pkg/cloudapi/k8s/update.go index d0969689..f5e40cf0 100644 --- a/pkg/cloudapi/k8s/update.go +++ b/pkg/cloudapi/k8s/update.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // UpdateRequest struct to update kubernetes cluster diff --git a/pkg/cloudapi/k8s/update_worker_nodes_meta_data.go b/pkg/cloudapi/k8s/update_worker_nodes_meta_data.go index 8b1c084e..8263b192 100644 --- a/pkg/cloudapi/k8s/update_worker_nodes_meta_data.go +++ b/pkg/cloudapi/k8s/update_worker_nodes_meta_data.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // UpdateWorkerNodesMetaDataRequest struct to add worker to a kubernetes cluster @@ -20,7 +20,7 @@ type UpdateWorkerNodesMetaDataRequest struct { // Meta data for working group computes, format YAML "user_data": 1111 // Required: true - UserData string `url:"userData" json:"userData" validate:"required"` + UserData interface{} `url:"userData" json:"userData" validate:"required"` } // UpdateWorkerNodesMetaData adds worker nodes to a kubernetes cluster diff --git a/pkg/cloudapi/k8s/worker_add.go b/pkg/cloudapi/k8s/worker_add.go index 5afa1565..79cfeaa9 100644 --- a/pkg/cloudapi/k8s/worker_add.go +++ b/pkg/cloudapi/k8s/worker_add.go @@ -5,7 +5,7 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // WorkerAddRequest struct to add worker to a kubernetes cluster diff --git a/pkg/cloudapi/k8s/worker_reset.go b/pkg/cloudapi/k8s/worker_reset.go index 57b2c8aa..48c9b57f 100644 --- a/pkg/cloudapi/k8s/worker_reset.go +++ b/pkg/cloudapi/k8s/worker_reset.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // WorkerResetRequest struct for hard reset kubernetes cluster diff --git a/pkg/cloudapi/k8s/worker_restart.go b/pkg/cloudapi/k8s/worker_restart.go index 96007bf2..5ce7be4e 100644 --- a/pkg/cloudapi/k8s/worker_restart.go +++ b/pkg/cloudapi/k8s/worker_restart.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // WorkerRestartRequest struct to restart worker node diff --git a/pkg/cloudapi/k8s/workers_group_add.go b/pkg/cloudapi/k8s/workers_group_add.go index 48148618..fef7c747 100644 --- a/pkg/cloudapi/k8s/workers_group_add.go +++ b/pkg/cloudapi/k8s/workers_group_add.go @@ -4,7 +4,7 @@ import ( "context" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // WorkersGroupAddRequest struct to add workers group diff --git a/pkg/cloudapi/k8s/workers_group_delete.go b/pkg/cloudapi/k8s/workers_group_delete.go index 20048f6c..1069809c 100644 --- a/pkg/cloudapi/k8s/workers_group_delete.go +++ b/pkg/cloudapi/k8s/workers_group_delete.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // WorkersGroupDeleteRequest struct to delete workers group diff --git a/pkg/cloudapi/k8s/workers_group_get_by_name.go b/pkg/cloudapi/k8s/workers_group_get_by_name.go index 631d532e..9f4f9976 100644 --- a/pkg/cloudapi/k8s/workers_group_get_by_name.go +++ b/pkg/cloudapi/k8s/workers_group_get_by_name.go @@ -5,7 +5,7 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // WorkersGroupGetByNameRequest struct to get information about worker group diff --git a/pkg/cloudapi/kvmx86.go b/pkg/cloudapi/kvmx86.go index 7f7dc0f7..0ea25da0 100644 --- a/pkg/cloudapi/kvmx86.go +++ b/pkg/cloudapi/kvmx86.go @@ -1,7 +1,7 @@ package cloudapi import ( - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/pkg/cloudapi/kvmx86" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/pkg/cloudapi/kvmx86" ) // Accessing the KVMX86 method group diff --git a/pkg/cloudapi/kvmx86/create.go b/pkg/cloudapi/kvmx86/create.go index 93ccbc00..3be5e6e2 100644 --- a/pkg/cloudapi/kvmx86/create.go +++ b/pkg/cloudapi/kvmx86/create.go @@ -2,11 +2,12 @@ package kvmx86 import ( "context" + "encoding/json" "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/constants" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/constants" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) type Interface struct { @@ -81,6 +82,10 @@ type Interface struct { // Default: true // Required: false EnableDefaultGateway interface{} `url:"enable_default_gateway,omitempty" json:"enable_default_gateway,omitempty" validate:"omitempty,isBool"` + + // List of QoS Policy IDs to apply to this interface (default: []), Allow used only with netType VINS, EXTNET and DPDK + // Required: false + QoSPolicies []uint64 `url:"qos_policies,omitempty" json:"qos_policies,omitempty"` } // DataDisk detailed struct for DataDisks field in CreateRequest and CreateBlankRequest @@ -114,6 +119,11 @@ type DataDisk struct { // Specify image id for create disk from template // Required: false ImageID uint64 `url:"imageId,omitempty" json:"imageId,omitempty"` + + // Attach disk in read-only mode + // Required: false + // Default: false + ReadOnly bool `url:"read_only,omitempty" json:"read_only,omitempty"` } // CreateRequest struct to create KVM x86 VM @@ -199,12 +209,12 @@ type CreateRequest struct { // loose (use NUMA affinity if possible) // Required: false // Default: none - NumaAffinity string `url:"numaAffinity,omitempty" json:"numaAffinity,omitempty" validate:"omitempty,numaAffinity"` + NumaAffinity string `url:"numa_affinity,omitempty" json:"numa_affinity,omitempty" validate:"omitempty,numaAffinity"` // Run VM on dedicated CPUs. To use this feature, the system must be pre-configured by allocating CPUs on the physical node // Required: false // Default: false - CPUPin bool `url:"cpupin" json:"cpupin"` + CPUPin bool `url:"cpu_pin" json:"cpu_pin"` // Type of the emulated system, Q35 or i440fx // Required: false @@ -214,7 +224,7 @@ type CreateRequest struct { // Use Huge Pages to allocate RAM of the virtual machine. The system must be pre-configured by allocating Huge Pages on the physical node // Required: false // Default: false - HPBacked bool `url:"hpBacked" json:"hpBacked"` + HPBacked bool `url:"hp_backed" json:"hp_backed"` // Recommended isolated CPUs. Field is ignored if compute.cpupin=False or compute.pinned=False // Required: false @@ -232,6 +242,11 @@ type CreateRequest struct { // Required: false // Default: default Clock string `url:"clock,omitempty" json:"clock,omitempty"` + + // Watchdog action + // Required: false + // Default: reset + WatchdogAction string `url:"watchdog_action,omitempty" json:"watchdog_action,omitempty" validate:"omitempty,watchdogAction"` } // GetRAM returns RAM field values @@ -243,6 +258,11 @@ func (r CreateRequest) GetRAM() map[string]uint64 { return res } +type wrapperCreateRequest struct { + CreateRequest + AsyncMode bool `json:"asyncMode"` +} + // Create creates KVM x86 VM based on specified OS image func (k KVMX86) Create(ctx context.Context, req CreateRequest) (uint64, error) { err := validators.ValidateRequest(req) @@ -252,10 +272,40 @@ func (k KVMX86) Create(ctx context.Context, req CreateRequest) (uint64, error) { url := "/cloudapi/kvmx86/create" - res, err := k.client.DecortApiCallCtype(ctx, http.MethodPost, url, constants.MIMEJSON, req) + res, err := k.client.DecortApiCallCtype(ctx, http.MethodPost, url, constants.MIMEJSON, wrapperCreateRequest{ + CreateRequest: req, + AsyncMode: false, + }) if err != nil { return 0, err } return strconv.ParseUint(string(res), 10, 64) } + +// CreateAsync creates KVM x86 VM based on specified OS image in async mode +func (k KVMX86) CreateAsync(ctx context.Context, req CreateRequest) (string, error) { + err := validators.ValidateRequest(req) + if err != nil { + return "", validators.ValidationErrors(validators.GetErrors(err)) + } + + url := "/cloudapi/kvmx86/create" + + res, err := k.client.DecortApiCallCtype(ctx, http.MethodPost, url, constants.MIMEJSON, wrapperCreateRequest{ + CreateRequest: req, + AsyncMode: true, + }) + if err != nil { + return "", err + } + + var taskID string + + err = json.Unmarshal(res, &taskID) + if err != nil { + return "", err + } + + return taskID, nil +} diff --git a/pkg/cloudapi/kvmx86/create_blank.go b/pkg/cloudapi/kvmx86/create_blank.go index dc4e8447..8458447a 100644 --- a/pkg/cloudapi/kvmx86/create_blank.go +++ b/pkg/cloudapi/kvmx86/create_blank.go @@ -5,8 +5,8 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/constants" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/constants" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // CreateBlankRequest struct to create KVM x86 VM from scratch @@ -124,6 +124,11 @@ type CreateBlankRequest struct { // Required: false // Default: default Clock string `url:"clock,omitempty" json:"clock,omitempty"` + + // Watchdog action + // Required: false + // Default: reset + WatchdogAction string `url:"watchdog_action,omitempty" json:"watchdog_action,omitempty" validate:"omitempty,watchdogAction"` } // GetRAM returns RAM field values diff --git a/pkg/cloudapi/kvmx86/kvmx86.go b/pkg/cloudapi/kvmx86/kvmx86.go index bf84b46d..afa0ae29 100644 --- a/pkg/cloudapi/kvmx86/kvmx86.go +++ b/pkg/cloudapi/kvmx86/kvmx86.go @@ -2,7 +2,7 @@ package kvmx86 import ( - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/interfaces" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/interfaces" ) // Structure for creating request to KVMX86 diff --git a/pkg/cloudapi/lb.go b/pkg/cloudapi/lb.go index e1029cdc..4203c488 100644 --- a/pkg/cloudapi/lb.go +++ b/pkg/cloudapi/lb.go @@ -1,6 +1,6 @@ package cloudapi -import "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/pkg/cloudapi/lb" +import "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/pkg/cloudapi/lb" // Accessing the LB method group func (ca *CloudAPI) LB() *lb.LB { diff --git a/pkg/cloudapi/lb/backend_create.go b/pkg/cloudapi/lb/backend_create.go index fd1e0614..86edc564 100644 --- a/pkg/cloudapi/lb/backend_create.go +++ b/pkg/cloudapi/lb/backend_create.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // BackendCreateRequest struct to create backend diff --git a/pkg/cloudapi/lb/backend_delete.go b/pkg/cloudapi/lb/backend_delete.go index 6de223d3..0ee84f08 100644 --- a/pkg/cloudapi/lb/backend_delete.go +++ b/pkg/cloudapi/lb/backend_delete.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // BackendDeleteRequest struct to delete backend diff --git a/pkg/cloudapi/lb/backend_server_add.go b/pkg/cloudapi/lb/backend_server_add.go index 5f3b9558..ee5a3596 100644 --- a/pkg/cloudapi/lb/backend_server_add.go +++ b/pkg/cloudapi/lb/backend_server_add.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // BackendServerAddRequest struct to add server definition to the backend diff --git a/pkg/cloudapi/lb/backend_server_delete.go b/pkg/cloudapi/lb/backend_server_delete.go index b0c0ecbf..200105f7 100644 --- a/pkg/cloudapi/lb/backend_server_delete.go +++ b/pkg/cloudapi/lb/backend_server_delete.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // BackendServerDeleteRequest struct to delete server definition diff --git a/pkg/cloudapi/lb/backend_server_update.go b/pkg/cloudapi/lb/backend_server_update.go index 76a563b7..17c2a2f2 100644 --- a/pkg/cloudapi/lb/backend_server_update.go +++ b/pkg/cloudapi/lb/backend_server_update.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // BackendServerUpdateRequest struct to update server diff --git a/pkg/cloudapi/lb/backend_update.go b/pkg/cloudapi/lb/backend_update.go index 463059ec..14622ec1 100644 --- a/pkg/cloudapi/lb/backend_update.go +++ b/pkg/cloudapi/lb/backend_update.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // BackendUpdateRequest struct to update backend diff --git a/pkg/cloudapi/lb/config_reset.go b/pkg/cloudapi/lb/config_reset.go index bf444c6d..28ea28d5 100644 --- a/pkg/cloudapi/lb/config_reset.go +++ b/pkg/cloudapi/lb/config_reset.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // ConfigResetRequest struct for reset config diff --git a/pkg/cloudapi/lb/create.go b/pkg/cloudapi/lb/create.go index 7fd09b09..23ab47d2 100644 --- a/pkg/cloudapi/lb/create.go +++ b/pkg/cloudapi/lb/create.go @@ -7,7 +7,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // CreateRequest struct to create load balancer diff --git a/pkg/cloudapi/lb/delete.go b/pkg/cloudapi/lb/delete.go index d38e1194..5a01d956 100644 --- a/pkg/cloudapi/lb/delete.go +++ b/pkg/cloudapi/lb/delete.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // DeleteRequest struct to delete load balancer diff --git a/pkg/cloudapi/lb/disable_enable.go b/pkg/cloudapi/lb/disable_enable.go index f3b888d3..fa7bdae0 100644 --- a/pkg/cloudapi/lb/disable_enable.go +++ b/pkg/cloudapi/lb/disable_enable.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // DisableEnableRequest struct for disable/enable load balancer diff --git a/pkg/cloudapi/lb/filter.go b/pkg/cloudapi/lb/filter.go index 936e67ce..349240b2 100644 --- a/pkg/cloudapi/lb/filter.go +++ b/pkg/cloudapi/lb/filter.go @@ -3,8 +3,8 @@ package lb import ( "context" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/interfaces" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/pkg/cloudapi/k8s" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/interfaces" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/pkg/cloudapi/k8s" ) // FilterByID returns ListLB with specified ID. diff --git a/pkg/cloudapi/lb/frontend_bind.go b/pkg/cloudapi/lb/frontend_bind.go index 88c7cb5d..839c45b0 100644 --- a/pkg/cloudapi/lb/frontend_bind.go +++ b/pkg/cloudapi/lb/frontend_bind.go @@ -5,7 +5,7 @@ import ( "net/http" "strings" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // FrontendBindRequest struct for frontend bind diff --git a/pkg/cloudapi/lb/frontend_bind_delete.go b/pkg/cloudapi/lb/frontend_bind_delete.go index 9abc6d34..854245a5 100644 --- a/pkg/cloudapi/lb/frontend_bind_delete.go +++ b/pkg/cloudapi/lb/frontend_bind_delete.go @@ -5,7 +5,7 @@ import ( "net/http" "strings" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // FrontendBindDeleteRequest struct to delete bind diff --git a/pkg/cloudapi/lb/frontend_bind_update.go b/pkg/cloudapi/lb/frontend_bind_update.go index c155f58e..0b0e1536 100644 --- a/pkg/cloudapi/lb/frontend_bind_update.go +++ b/pkg/cloudapi/lb/frontend_bind_update.go @@ -5,7 +5,7 @@ import ( "net/http" "strings" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // FrontendBindUpdateRequest struct to update binding diff --git a/pkg/cloudapi/lb/frontend_create.go b/pkg/cloudapi/lb/frontend_create.go index 9cbfff90..35c891ed 100644 --- a/pkg/cloudapi/lb/frontend_create.go +++ b/pkg/cloudapi/lb/frontend_create.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // FrontendCreateRequest struct to create frontend diff --git a/pkg/cloudapi/lb/frontend_delete.go b/pkg/cloudapi/lb/frontend_delete.go index 2534a58d..5f7acfff 100644 --- a/pkg/cloudapi/lb/frontend_delete.go +++ b/pkg/cloudapi/lb/frontend_delete.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // FrontendDeleteRequest struct to delete frontend diff --git a/pkg/cloudapi/lb/get.go b/pkg/cloudapi/lb/get.go index 9272a638..4d3dcbf9 100644 --- a/pkg/cloudapi/lb/get.go +++ b/pkg/cloudapi/lb/get.go @@ -5,7 +5,7 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // GetRequest struct to get detailed information about load balancer diff --git a/pkg/cloudapi/lb/lb.go b/pkg/cloudapi/lb/lb.go index 9c111319..90c7784c 100644 --- a/pkg/cloudapi/lb/lb.go +++ b/pkg/cloudapi/lb/lb.go @@ -2,7 +2,7 @@ package lb import ( - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/interfaces" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/interfaces" ) // Structure for creating request to load balancer diff --git a/pkg/cloudapi/lb/list.go b/pkg/cloudapi/lb/list.go index ece596fb..f416a528 100644 --- a/pkg/cloudapi/lb/list.go +++ b/pkg/cloudapi/lb/list.go @@ -5,7 +5,7 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // ListRequest struct to get list of load balancers diff --git a/pkg/cloudapi/lb/list_deleted.go b/pkg/cloudapi/lb/list_deleted.go index d1c5a4db..2526b1c3 100644 --- a/pkg/cloudapi/lb/list_deleted.go +++ b/pkg/cloudapi/lb/list_deleted.go @@ -5,7 +5,7 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // ListDeletedRequest struct to get list of deleted load balancers diff --git a/pkg/cloudapi/lb/make_highly_available.go b/pkg/cloudapi/lb/make_highly_available.go index 2e55e0e6..aa4502d6 100644 --- a/pkg/cloudapi/lb/make_highly_available.go +++ b/pkg/cloudapi/lb/make_highly_available.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // HighlyAvailableRequest struct to make Load Balancer Highly available diff --git a/pkg/cloudapi/lb/migrate_to_zone.go b/pkg/cloudapi/lb/migrate_to_zone.go index 8bce1d80..bfa46ad4 100644 --- a/pkg/cloudapi/lb/migrate_to_zone.go +++ b/pkg/cloudapi/lb/migrate_to_zone.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // MigrateToZone struct to move lb to another zone diff --git a/pkg/cloudapi/lb/restart.go b/pkg/cloudapi/lb/restart.go index 606bae02..a0f740cf 100644 --- a/pkg/cloudapi/lb/restart.go +++ b/pkg/cloudapi/lb/restart.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // RestartRequest struct to restart load balancer diff --git a/pkg/cloudapi/lb/restore.go b/pkg/cloudapi/lb/restore.go index 27db835e..c2881ccc 100644 --- a/pkg/cloudapi/lb/restore.go +++ b/pkg/cloudapi/lb/restore.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // RestoreRequest struct to restore load balancer diff --git a/pkg/cloudapi/lb/serialize.go b/pkg/cloudapi/lb/serialize.go index de8b399d..de3e0846 100644 --- a/pkg/cloudapi/lb/serialize.go +++ b/pkg/cloudapi/lb/serialize.go @@ -3,7 +3,7 @@ package lb import ( "encoding/json" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/serialization" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/serialization" ) // Serialize returns JSON-serialized []byte. Used as a wrapper over json.Marshal and json.MarshalIndent functions. diff --git a/pkg/cloudapi/lb/start.go b/pkg/cloudapi/lb/start.go index f7eab2c9..fa14918c 100644 --- a/pkg/cloudapi/lb/start.go +++ b/pkg/cloudapi/lb/start.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // StartRequest struct to start load balancer diff --git a/pkg/cloudapi/lb/stop.go b/pkg/cloudapi/lb/stop.go index 7048e3e5..bc047523 100644 --- a/pkg/cloudapi/lb/stop.go +++ b/pkg/cloudapi/lb/stop.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // StopRequest struct to stop load balancer diff --git a/pkg/cloudapi/lb/update.go b/pkg/cloudapi/lb/update.go index 404c3901..88a90951 100644 --- a/pkg/cloudapi/lb/update.go +++ b/pkg/cloudapi/lb/update.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // UpdateRequest struct to update load balancer diff --git a/pkg/cloudapi/lb/update_sysctl_params.go b/pkg/cloudapi/lb/update_sysctl_params.go index 52e01a8c..892ff4a3 100644 --- a/pkg/cloudapi/lb/update_sysctl_params.go +++ b/pkg/cloudapi/lb/update_sysctl_params.go @@ -6,7 +6,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // UpdateSysctParamsRequest struct to update sysct params for lb diff --git a/pkg/cloudapi/locations/get_list.go b/pkg/cloudapi/locations/get_list.go index 0178ded1..14c499ab 100644 --- a/pkg/cloudapi/locations/get_list.go +++ b/pkg/cloudapi/locations/get_list.go @@ -5,7 +5,7 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // ListGetRequest struct to get list of locations diff --git a/pkg/cloudapi/locations/list.go b/pkg/cloudapi/locations/list.go index e51941ea..5c775893 100644 --- a/pkg/cloudapi/locations/list.go +++ b/pkg/cloudapi/locations/list.go @@ -5,7 +5,7 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // ListRequest struct to get list of locations diff --git a/pkg/cloudapi/locations/locations.go b/pkg/cloudapi/locations/locations.go index 663237fb..e3e1f132 100644 --- a/pkg/cloudapi/locations/locations.go +++ b/pkg/cloudapi/locations/locations.go @@ -2,7 +2,7 @@ package locations import ( - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/interfaces" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/interfaces" ) // Structure for creating request to locations diff --git a/pkg/cloudapi/locations/models.go b/pkg/cloudapi/locations/models.go index 16db21ed..a83b5b2c 100644 --- a/pkg/cloudapi/locations/models.go +++ b/pkg/cloudapi/locations/models.go @@ -5,6 +5,9 @@ type ItemLocation struct { // AuthBroker AuthBroker []string `json:"authBroker"` + // Budget + Budget bool `json:"budget"` + // Grid ID GID uint64 `json:"gid"` diff --git a/pkg/cloudapi/locations/serialize.go b/pkg/cloudapi/locations/serialize.go index 94c3650f..7436a186 100644 --- a/pkg/cloudapi/locations/serialize.go +++ b/pkg/cloudapi/locations/serialize.go @@ -3,7 +3,7 @@ package locations import ( "encoding/json" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/serialization" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/serialization" ) // Serialize returns JSON-serialized []byte. Used as a wrapper over json.Marshal and json.MarshalIndent functions. diff --git a/pkg/cloudapi/locatons.go b/pkg/cloudapi/locatons.go index 1074d6cb..41193d3a 100644 --- a/pkg/cloudapi/locatons.go +++ b/pkg/cloudapi/locatons.go @@ -1,6 +1,6 @@ package cloudapi -import "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/pkg/cloudapi/locations" +import "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/pkg/cloudapi/locations" // Accessing the Locations method group func (ca *CloudAPI) Locations() *locations.Locations { diff --git a/pkg/cloudapi/network_qos_policy.go b/pkg/cloudapi/network_qos_policy.go new file mode 100644 index 00000000..f126de31 --- /dev/null +++ b/pkg/cloudapi/network_qos_policy.go @@ -0,0 +1,10 @@ +package cloudapi + +import ( + qospolicy "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/pkg/cloudapi/qospolicy" +) + +// Accessing the QoS Policy method group +func (ca *CloudAPI) QoSPolicy() *qospolicy.QoSPolicy { + return qospolicy.New(ca.client) +} diff --git a/pkg/cloudapi/pcidevice.go b/pkg/cloudapi/pcidevice.go index f677f7ca..c994e665 100644 --- a/pkg/cloudapi/pcidevice.go +++ b/pkg/cloudapi/pcidevice.go @@ -1,6 +1,6 @@ package cloudapi -import "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/pkg/cloudapi/pcidevice" +import "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/pkg/cloudapi/pcidevice" // Accessing the PCI Device method group func (ca *CloudAPI) PCIDevice() *pcidevice.PCIDevice { diff --git a/pkg/cloudapi/pcidevice/list.go b/pkg/cloudapi/pcidevice/list.go index c707549d..e25a7510 100644 --- a/pkg/cloudapi/pcidevice/list.go +++ b/pkg/cloudapi/pcidevice/list.go @@ -5,7 +5,7 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // ListRequest struct to get list of pci devices diff --git a/pkg/cloudapi/pcidevice/pcidevice.go b/pkg/cloudapi/pcidevice/pcidevice.go index 0d6f853f..6e001ddc 100644 --- a/pkg/cloudapi/pcidevice/pcidevice.go +++ b/pkg/cloudapi/pcidevice/pcidevice.go @@ -1,6 +1,6 @@ package pcidevice -import "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/interfaces" +import "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/interfaces" // Structure for creating request to PCI device type PCIDevice struct { diff --git a/pkg/cloudapi/pcidevice/serialize.go b/pkg/cloudapi/pcidevice/serialize.go index 062bd2ed..008cbbc1 100644 --- a/pkg/cloudapi/pcidevice/serialize.go +++ b/pkg/cloudapi/pcidevice/serialize.go @@ -3,7 +3,7 @@ package pcidevice import ( "encoding/json" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/serialization" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/serialization" ) // Serialize returns JSON-serialized []byte. Used as a wrapper over json.Marshal and json.MarshalIndent functions. diff --git a/pkg/cloudapi/prometheus.go b/pkg/cloudapi/prometheus.go index 85702157..cc6dcd0e 100644 --- a/pkg/cloudapi/prometheus.go +++ b/pkg/cloudapi/prometheus.go @@ -1,6 +1,6 @@ package cloudapi -import "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/pkg/cloudapi/prometheus" +import "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/pkg/cloudapi/prometheus" // Accessing the Resmon method group func (ca *CloudAPI) Prometheus() *prometheus.Prometheus { diff --git a/pkg/cloudapi/prometheus/compute_cpu_load.go b/pkg/cloudapi/prometheus/compute_cpu_load.go index 5f7e36bc..b6bae888 100644 --- a/pkg/cloudapi/prometheus/compute_cpu_load.go +++ b/pkg/cloudapi/prometheus/compute_cpu_load.go @@ -5,7 +5,7 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) type ComputeCPULoadRequest struct { diff --git a/pkg/cloudapi/prometheus/compute_memory_available.go b/pkg/cloudapi/prometheus/compute_memory_available.go index bb3f0f05..7f43b0d2 100644 --- a/pkg/cloudapi/prometheus/compute_memory_available.go +++ b/pkg/cloudapi/prometheus/compute_memory_available.go @@ -5,7 +5,7 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) type ComputeMemoryAvailableRequest struct { diff --git a/pkg/cloudapi/prometheus/compute_memory_unused.go b/pkg/cloudapi/prometheus/compute_memory_unused.go index 4a630378..f9acd54e 100644 --- a/pkg/cloudapi/prometheus/compute_memory_unused.go +++ b/pkg/cloudapi/prometheus/compute_memory_unused.go @@ -5,7 +5,7 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) type ComputeMemoryUnusedRequest struct { diff --git a/pkg/cloudapi/prometheus/compute_memory_usable.go b/pkg/cloudapi/prometheus/compute_memory_usable.go index 4f537c80..0816dd56 100644 --- a/pkg/cloudapi/prometheus/compute_memory_usable.go +++ b/pkg/cloudapi/prometheus/compute_memory_usable.go @@ -5,7 +5,7 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) type ComputeMemoryUsableRequest struct { diff --git a/pkg/cloudapi/prometheus/compute_memory_usage.go b/pkg/cloudapi/prometheus/compute_memory_usage.go index 8c359d11..83b0ff5e 100644 --- a/pkg/cloudapi/prometheus/compute_memory_usage.go +++ b/pkg/cloudapi/prometheus/compute_memory_usage.go @@ -5,7 +5,7 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) type ComputeMemoryUsageRequest struct { diff --git a/pkg/cloudapi/prometheus/compute_memory_used.go b/pkg/cloudapi/prometheus/compute_memory_used.go index 3d46c8d4..b43fffc4 100644 --- a/pkg/cloudapi/prometheus/compute_memory_used.go +++ b/pkg/cloudapi/prometheus/compute_memory_used.go @@ -5,7 +5,7 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) type ComputeMemoryUsedRequest struct { diff --git a/pkg/cloudapi/prometheus/compute_read_bytes.go b/pkg/cloudapi/prometheus/compute_read_bytes.go index 1da9cd9a..2089c515 100644 --- a/pkg/cloudapi/prometheus/compute_read_bytes.go +++ b/pkg/cloudapi/prometheus/compute_read_bytes.go @@ -5,7 +5,7 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) type ComputeReadBytesRequest struct { diff --git a/pkg/cloudapi/prometheus/compute_read_requests.go b/pkg/cloudapi/prometheus/compute_read_requests.go index cf1735e6..e52883f5 100644 --- a/pkg/cloudapi/prometheus/compute_read_requests.go +++ b/pkg/cloudapi/prometheus/compute_read_requests.go @@ -5,7 +5,7 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) type ComputeReadRequestsRequest struct { diff --git a/pkg/cloudapi/prometheus/compute_receive_bytes.go b/pkg/cloudapi/prometheus/compute_receive_bytes.go index 6705e3e9..3c4b6494 100644 --- a/pkg/cloudapi/prometheus/compute_receive_bytes.go +++ b/pkg/cloudapi/prometheus/compute_receive_bytes.go @@ -5,7 +5,7 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) type ComputeReceiveBytesRequest struct { diff --git a/pkg/cloudapi/prometheus/compute_receive_packets.go b/pkg/cloudapi/prometheus/compute_receive_packets.go index b62d8646..a40e1638 100644 --- a/pkg/cloudapi/prometheus/compute_receive_packets.go +++ b/pkg/cloudapi/prometheus/compute_receive_packets.go @@ -5,7 +5,7 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) type ComputeReceivePacketsRequest struct { diff --git a/pkg/cloudapi/prometheus/compute_transmit_bytes.go b/pkg/cloudapi/prometheus/compute_transmit_bytes.go index 722ff5ae..44b0396f 100644 --- a/pkg/cloudapi/prometheus/compute_transmit_bytes.go +++ b/pkg/cloudapi/prometheus/compute_transmit_bytes.go @@ -5,7 +5,7 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) type ComputeTransmitBytesRequest struct { diff --git a/pkg/cloudapi/prometheus/compute_transmit_packets.go b/pkg/cloudapi/prometheus/compute_transmit_packets.go index 888c25ce..0f2c08f4 100644 --- a/pkg/cloudapi/prometheus/compute_transmit_packets.go +++ b/pkg/cloudapi/prometheus/compute_transmit_packets.go @@ -5,7 +5,7 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) type ComputeTransmitPacketsRequest struct { diff --git a/pkg/cloudapi/prometheus/compute_write_bytes.go b/pkg/cloudapi/prometheus/compute_write_bytes.go index 3c93d589..a7dde671 100644 --- a/pkg/cloudapi/prometheus/compute_write_bytes.go +++ b/pkg/cloudapi/prometheus/compute_write_bytes.go @@ -5,7 +5,7 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) type ComputeWriteBytesRequest struct { diff --git a/pkg/cloudapi/prometheus/compute_write_requests.go b/pkg/cloudapi/prometheus/compute_write_requests.go index 845a57cb..71a0710a 100644 --- a/pkg/cloudapi/prometheus/compute_write_requests.go +++ b/pkg/cloudapi/prometheus/compute_write_requests.go @@ -5,7 +5,7 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) type ComputeWriteRequestsRequest struct { diff --git a/pkg/cloudapi/prometheus/computes.go b/pkg/cloudapi/prometheus/computes.go index 95922e12..3051d59f 100644 --- a/pkg/cloudapi/prometheus/computes.go +++ b/pkg/cloudapi/prometheus/computes.go @@ -5,7 +5,7 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) const ( diff --git a/pkg/cloudapi/prometheus/prometheus.go b/pkg/cloudapi/prometheus/prometheus.go index 66997b11..2d1affdc 100644 --- a/pkg/cloudapi/prometheus/prometheus.go +++ b/pkg/cloudapi/prometheus/prometheus.go @@ -1,7 +1,7 @@ package prometheus import ( - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/interfaces" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/interfaces" ) type Prometheus struct { diff --git a/pkg/cloudapi/qospolicy/create.go b/pkg/cloudapi/qospolicy/create.go new file mode 100644 index 00000000..82589930 --- /dev/null +++ b/pkg/cloudapi/qospolicy/create.go @@ -0,0 +1,46 @@ +package qospolicy + +import ( + "context" + "net/http" + "strconv" + + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/constants" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" +) + +type CreateRequest struct { + // Account ID that owns QoS policy + // Required: true + AccountID uint64 `url:"account_id" json:"account_id" validate:"required"` + + // QoS policy name + // Required: true + Name string `url:"name" json:"name" validate:"required"` + + // QoS policy description + // Required: false + Description string `url:"description,omitempty" json:"description,omitempty"` +} + +// Create creates a new QoS policy +func (qp QoSPolicy) Create(ctx context.Context, req CreateRequest) (uint64, error) { + err := validators.ValidateRequest(req) + if err != nil { + return 0, validators.ValidationErrors(validators.GetErrors(err)) + } + + url := "/cloudapi/network_qos_policy/create" + + res, err := qp.client.DecortApiCallCtype(ctx, http.MethodPost, url, constants.MIMEJSON, req) + if err != nil { + return 0, err + } + + result, err := strconv.ParseUint(string(res), 10, 64) + if err != nil { + return 0, err + } + + return result, nil +} diff --git a/pkg/cloudapi/qospolicy/create_rule.go b/pkg/cloudapi/qospolicy/create_rule.go new file mode 100644 index 00000000..671345e2 --- /dev/null +++ b/pkg/cloudapi/qospolicy/create_rule.go @@ -0,0 +1,93 @@ +package qospolicy + +import ( + "context" + "net/http" + "strconv" + + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/constants" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" +) + +type CreateRuleRequest struct { + // ID of the parent QoS policy this rule belongs to + // Required: true + QoSPolicyID uint64 `url:"qos_policy_id" json:"qos_policy_id" validate:"required"` + + // QoS policy rule description + // Default: "" + // Required: false + Description string `url:"description,omitempty" json:"description,omitempty"` + + // Rule priority in OVS (higher number = higher priority) + // Possible values: [0, 65535] + // Required: true + Priority *uint64 `url:"priority" json:"priority" validate:"required,min=0,max=65535"` + + // Traffic direction + // Required: true + Direction string `url:"direction" json:"direction" validate:"required,oneof=outbound"` + + // IP protocol to match + // Possible values: tcp, udp, icmp + // Required: true + Protocol string `url:"protocol" json:"protocol" validate:"required,oneof=tcp udp icmp"` + + // Priority Code Point. L2 marking + // Possible values: [0, 7] + // Required: false + PCPTag *uint64 `url:"pcp_tag,omitempty" json:"pcp_tag,omitempty" validate:"required_without_all=DSCPValue,omitempty,min=0,max=7"` + + // DSCP value (0-63). L3 marking + // Possible values: [0, 63] + // Required: false + DSCPValue *uint64 `url:"dscp_value,omitempty" json:"dscp_value,omitempty" validate:"required_without_all=PCPTag,omitempty,min=0,max=63"` + + // Source IP address for traffic filtering + // Required: false + SrcIP string `url:"src_ip,omitempty" json:"src_ip,omitempty"` + + // Destination IP address for traffic filtering + // Required: false + DstIP string `url:"dst_ip,omitempty" json:"dst_ip,omitempty"` + + // Source MAC address for traffic filtering + // Required: false + SrcMAC string `url:"src_mac,omitempty" json:"src_mac,omitempty" validate:"omitempty,mac"` + + // Destination MAC address for traffic filtering + // Required: false + DstMAC string `url:"dst_mac,omitempty" json:"dst_mac,omitempty" validate:"omitempty,mac"` + + // Source port for traffic filtering (TCP/UDP only) + // Possible values: [1, 65535] + // Required: false + SrcPort uint64 `url:"src_port,omitempty" json:"src_port,omitempty" validate:"omitempty,min=1,max=65535"` + + // Destination port for traffic filtering (TCP/UDP only) + // Possible values: [1, 65535] + // Required: false + DstPort uint64 `url:"dst_port,omitempty" json:"dst_port,omitempty" validate:"omitempty,min=1,max=65535"` +} + +// CreateRule creates a new rule for a QoS policy +func (qp QoSPolicy) CreateRule(ctx context.Context, req CreateRuleRequest) (uint64, error) { + err := validators.ValidateRequest(req) + if err != nil { + return 0, validators.ValidationErrors(validators.GetErrors(err)) + } + + url := "/cloudapi/network_qos_policy/create_rule" + + res, err := qp.client.DecortApiCallCtype(ctx, http.MethodPost, url, constants.MIMEJSON, req) + if err != nil { + return 0, err + } + + result, err := strconv.ParseUint(string(res), 10, 64) + if err != nil { + return 0, err + } + + return result, nil +} diff --git a/pkg/cloudapi/qospolicy/delete.go b/pkg/cloudapi/qospolicy/delete.go new file mode 100644 index 00000000..0c39b476 --- /dev/null +++ b/pkg/cloudapi/qospolicy/delete.go @@ -0,0 +1,37 @@ +package qospolicy + +import ( + "context" + "net/http" + "strconv" + + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/constants" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" +) + +type DeleteRequest struct { + // QoS policy ID + // Required: true + QoSPolicyID uint64 `url:"qos_policy_id" json:"qos_policy_id" validate:"required"` +} + +func (qp QoSPolicy) Delete(ctx context.Context, req DeleteRequest) (bool, error) { + err := validators.ValidateRequest(req) + if err != nil { + return false, validators.ValidationErrors(validators.GetErrors(err)) + } + + url := "/cloudapi/network_qos_policy/delete" + + res, err := qp.client.DecortApiCallCtype(ctx, http.MethodDelete, url, constants.MIMEJSON, req) + if err != nil { + return false, err + } + + result, err := strconv.ParseBool(string(res)) + if err != nil { + return false, err + } + + return result, nil +} diff --git a/pkg/cloudapi/qospolicy/delete_rule.go b/pkg/cloudapi/qospolicy/delete_rule.go new file mode 100644 index 00000000..f15ef9c9 --- /dev/null +++ b/pkg/cloudapi/qospolicy/delete_rule.go @@ -0,0 +1,41 @@ +package qospolicy + +import ( + "context" + "net/http" + "strconv" + + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/constants" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" +) + +type DeleteRuleRequest struct { + // ID of the QoS policy + // Required: true + QoSPolicyID uint64 `url:"qos_policy_id" json:"qos_policy_id" validate:"required"` + + // ID of the rule to delete + // Required: true + RuleID uint64 `url:"rule_id" json:"rule_id" validate:"required"` +} + +func (qp QoSPolicy) DeleteRule(ctx context.Context, req DeleteRuleRequest) (bool, error) { + err := validators.ValidateRequest(req) + if err != nil { + return false, validators.ValidationErrors(validators.GetErrors(err)) + } + + url := "/cloudapi/network_qos_policy/delete_rule" + + res, err := qp.client.DecortApiCallCtype(ctx, http.MethodDelete, url, constants.MIMEJSON, req) + if err != nil { + return false, err + } + + result, err := strconv.ParseBool(string(res)) + if err != nil { + return false, err + } + + return result, nil +} diff --git a/pkg/cloudapi/qospolicy/filter.go b/pkg/cloudapi/qospolicy/filter.go new file mode 100644 index 00000000..ec368d88 --- /dev/null +++ b/pkg/cloudapi/qospolicy/filter.go @@ -0,0 +1,89 @@ +package qospolicy + +// FilterByID returns ListQoSPolicies with specified ID +func (lqp ListQoSPolicies) FilterByID(id uint64) ListQoSPolicies { + predicate := func(iqp ItemQoSPolicy) bool { + return iqp.ID == id + } + + return lqp.FilterFunc(predicate) +} + +// FilterByName returns ListQoSPolicies with specified Name +func (lqp ListQoSPolicies) FilterByName(name string) ListQoSPolicies { + predicate := func(iqp ItemQoSPolicy) bool { + return iqp.Name == name + } + + return lqp.FilterFunc(predicate) +} + +// FilterByAccountID returns ListQoSPolicies with specified AccountID +func (lqp ListQoSPolicies) FilterByAccountID(accountID uint64) ListQoSPolicies { + predicate := func(iqp ItemQoSPolicy) bool { + return iqp.AccountID == accountID + } + + return lqp.FilterFunc(predicate) +} + +// FilterByStatus returns ListQoSPolicies with specified Status +func (lqp ListQoSPolicies) FilterByStatus(status string) ListQoSPolicies { + predicate := func(iqp ItemQoSPolicy) bool { + return iqp.Status == status + } + + return lqp.FilterFunc(predicate) +} + +// FilterByDescription returns ListQoSPolicies with specified Description +func (lqp ListQoSPolicies) FilterByDescription(description string) ListQoSPolicies { + predicate := func(iqp ItemQoSPolicy) bool { + return iqp.Description == description + } + + return lqp.FilterFunc(predicate) +} + +// FilterByCreatedBy returns ListQoSPolicies with specified CreatedBy +func (lqp ListQoSPolicies) FilterByCreatedBy(createdBy string) ListQoSPolicies { + predicate := func(iqp ItemQoSPolicy) bool { + return iqp.CreatedBy == createdBy + } + + return lqp.FilterFunc(predicate) +} + +// FilterByUpdatedBy returns ListQoSPolicies with specified UpdatedBy +func (lqp ListQoSPolicies) FilterByUpdatedBy(updatedBy string) ListQoSPolicies { + predicate := func(iqp ItemQoSPolicy) bool { + return iqp.UpdatedBy == updatedBy + } + + return lqp.FilterFunc(predicate) +} + +// FilterFunc allows filtering ListQoSPolicies based on a user-specified predicate +func (lqp ListQoSPolicies) FilterFunc(predicate func(ItemQoSPolicy) bool) ListQoSPolicies { + var result ListQoSPolicies + + for _, item := range lqp.Data { + if predicate(item) { + result.Data = append(result.Data, item) + } + } + + result.EntryCount = uint64(len(result.Data)) + + return result +} + +// FindOne returns first found ListQoSPolicies +// If none was found, returns an empty struct +func (lqp ListQoSPolicies) FindOne() ItemQoSPolicy { + if len(lqp.Data) == 0 { + return ItemQoSPolicy{} + } + + return lqp.Data[0] +} diff --git a/pkg/cloudapi/qospolicy/filter_test.go b/pkg/cloudapi/qospolicy/filter_test.go new file mode 100644 index 00000000..cf5ef727 --- /dev/null +++ b/pkg/cloudapi/qospolicy/filter_test.go @@ -0,0 +1,97 @@ +package qospolicy + +import "testing" + +var qosPolicies = ListQoSPolicies{ + Data: []ItemQoSPolicy{ + { + ID: 1, + AccountID: 1, + Name: "qos1", + Description: "some desc", + Status: "ENABLED", + CreatedBy: "user", + }, + { + ID: 3, + AccountID: 3, + Name: "qos3", + Description: "some desc", + Status: "ENABLED", + CreatedBy: "anotheruser", + }, + { + ID: 5, + AccountID: 3, + Name: "qos5", + Description: "some other desc", + Status: "DISABLED", + CreatedBy: "anotheruser", + UpdatedBy: "user", + }, + }, + EntryCount: 3, +} + +func TestFilterByID(t *testing.T) { + actual := qosPolicies.FilterByID(1).FindOne() + if actual.ID != 1 { + t.Fatal("expected ID 1, found: ", actual.ID) + } +} + +func TestFilterByName(t *testing.T) { + actual := qosPolicies.FilterByName("qos3").FindOne() + if actual.Name != "qos3" { + t.Fatal("expected Name qos3, found: ", actual.Name) + } +} + +func TestFilterByDescription(t *testing.T) { + actual := qosPolicies.FilterByDescription("some desc") + + if len(actual.Data) != 2 { + t.Fatal("expected 2 found, actual: ", len(actual.Data)) + } + + for _, item := range actual.Data { + if item.Description != "some desc" { + t.Fatal("expected Description 'some desc', found: ", item.Description) + } + } +} + +func TestFilterByAccountID(t *testing.T) { + actual := qosPolicies.FilterByAccountID(1).FindOne() + if actual.AccountID != 1 { + t.Fatal("expected AccountID 1, found: ", actual.AccountID) + } +} + +func TestFilterByStatus(t *testing.T) { + actual := qosPolicies.FilterByStatus("DISABLED").FindOne() + if actual.Status != "DISABLED" { + t.Fatal("expected Status DISABLED, found: ", actual.Status) + } +} + +func TestFilterByCreatedBy(t *testing.T) { + actual := qosPolicies.FilterByCreatedBy("anotheruser") + + if len(actual.Data) != 2 { + t.Fatal("expected 2 found, actual: ", len(actual.Data)) + } + + for _, item := range actual.Data { + if item.CreatedBy != "anotheruser" { + t.Fatal("expected CreatedBy 'anotheruser', found: ", item.CreatedBy) + } + } +} + +func TestFilterByUpdatedBy(t *testing.T) { + actual := qosPolicies.FilterByUpdatedBy("user").FindOne() + if actual.UpdatedBy != "user" { + t.Fatal("expected UpdatedBy 'user', found: ", actual.UpdatedBy) + } +} diff --git a/pkg/cloudapi/qospolicy/get.go b/pkg/cloudapi/qospolicy/get.go new file mode 100644 index 00000000..e31a01ee --- /dev/null +++ b/pkg/cloudapi/qospolicy/get.go @@ -0,0 +1,43 @@ +package qospolicy + +import ( + "context" + "encoding/json" + "net/http" + + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" +) + +type GetRequest struct { + // QoS policy ID + // Required: true + QoSPolicyID uint64 `url:"qos_policy_id" json:"qos_policy_id" validate:"required"` +} + +func (qp QoSPolicy) Get(ctx context.Context, req GetRequest) (*RecordQoSPolicy, error) { + res, err := qp.GetRaw(ctx, req) + if err != nil { + return nil, err + } + + info := RecordQoSPolicy{} + + err = json.Unmarshal(res, &info) + if err != nil { + return nil, err + } + + return &info, nil +} + +func (qp QoSPolicy) GetRaw(ctx context.Context, req GetRequest) ([]byte, error) { + err := validators.ValidateRequest(req) + if err != nil { + return nil, validators.ValidationErrors(validators.GetErrors(err)) + } + + url := "/cloudapi/network_qos_policy/get" + + res, err := qp.client.DecortApiCall(ctx, http.MethodGet, url, req) + return res, err +} diff --git a/pkg/cloudapi/qospolicy/list.go b/pkg/cloudapi/qospolicy/list.go new file mode 100644 index 00000000..a71f56bb --- /dev/null +++ b/pkg/cloudapi/qospolicy/list.go @@ -0,0 +1,89 @@ +package qospolicy + +import ( + "context" + "encoding/json" + "net/http" + + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" +) + +type ListRequest struct { + // Page number + // Required: false + Page uint64 `url:"page,omitempty" json:"page,omitempty"` + + // Page size + // Required: false + Size uint64 `url:"size,omitempty" json:"size,omitempty"` + + // Find QoS policy by id + // Required: false + ByID uint64 `url:"by_id,omitempty" json:"by_id,omitempty"` + + // Find by account id + // Required: false + AccountID uint64 `url:"account_id,omitempty" json:"account_id,omitempty"` + + // Find by QoS policy name + // Required: false + Name string `url:"name,omitempty" json:"name,omitempty"` + + // Find by QoS policy description + // Required: false + Description string `url:"description,omitempty" json:"description,omitempty"` + + // Find by QoS policy status + // Possible values: ENABLED, DISABLED, DESTROYED + // Required: false + Status string `url:"status,omitempty" json:"status,omitempty"` + + // Find by created after time (unix timestamp) + // Required: false + CreatedMin uint64 `url:"created_min,omitempty" json:"created_min,omitempty"` + + // Find by created before time (unix timestamp) + // Required: false + CreatedMax uint64 `url:"created_max,omitempty" json:"created_max,omitempty"` + + // Find by updated after time (unix timestamp) + // Required: false + UpdatedMin uint64 `url:"updated_min,omitempty" json:"updated_min,omitempty"` + + // Find by updated before time (unix timestamp) + // Required: false + UpdatedMax uint64 `url:"updated_max,omitempty" json:"updated_max,omitempty"` + + // Sort by one of supported fields, format ± + // Required: false + SortBy string `url:"sort_by,omitempty" json:"sort_by,omitempty"` +} + +// List gets list of QoS policies as a ListQosPolicies struct +func (qp QoSPolicy) List(ctx context.Context, req ListRequest) (*ListQoSPolicies, error) { + res, err := qp.ListRaw(ctx, req) + if err != nil { + return nil, err + } + + list := ListQoSPolicies{} + + err = json.Unmarshal(res, &list) + if err != nil { + return nil, err + } + + return &list, nil +} + +// ListRaw gets list of QoS policies as an array of bytes +func (qp QoSPolicy) ListRaw(ctx context.Context, req ListRequest) ([]byte, error) { + if err := validators.ValidateRequest(req); err != nil { + return nil, validators.ValidationErrors(validators.GetErrors(err)) + } + + url := "/cloudapi/network_qos_policy/list" + + res, err := qp.client.DecortApiCall(ctx, http.MethodGet, url, req) + return res, err +} diff --git a/pkg/cloudapi/qospolicy/models.go b/pkg/cloudapi/qospolicy/models.go new file mode 100644 index 00000000..fc17c8f4 --- /dev/null +++ b/pkg/cloudapi/qospolicy/models.go @@ -0,0 +1,122 @@ +package qospolicy + +type ListQoSPolicies struct { + // List + Data []ItemQoSPolicy `json:"data"` + + // Entry count + EntryCount uint64 `json:"entryCount"` +} + +type ItemQoSPolicy struct { + // ID of the QoS policy + ID uint64 `json:"id"` + + // GUID + GUID uint64 `json:"guid"` + + // Account ID that owns the QoS policy + AccountID uint64 `json:"account_id"` + + // Name of the QoS policy + Name string `json:"name"` + + // Description of the QoS policy + Description string `json:"description"` + + // Status of the QoS policy + Status string `json:"status"` + + // Created at (unix timestamp) + CreatedAt uint64 `json:"created_at"` + + // Updated at (unix timestamp) + UpdatedAt uint64 `json:"updated_at"` + + // Created by + CreatedBy string `json:"created_by"` + + // Updated by + UpdatedBy string `json:"updated_by"` + + // List of rules + Rules Rules `json:"rules"` +} + +type RecordQoSPolicy struct { + // ID of the QoS policy + ID uint64 `json:"id"` + + // GUID + GUID uint64 `json:"guid"` + + // Account ID that owns the QoS policy + AccountID uint64 `json:"account_id"` + + // Name of the QoS policy + Name string `json:"name"` + + // Description of the QoS policy + Description string `json:"description"` + + // Status of the QoS policy + Status string `json:"status"` + + // Created at (unix timestamp) + CreatedAt uint64 `json:"created_at"` + + // Updated at (unix timestamp) + UpdatedAt uint64 `json:"updated_at"` + + // Created by + CreatedBy string `json:"created_by"` + + // Updated by + UpdatedBy string `json:"updated_by"` + + // List of rules + Rules Rules `json:"rules"` +} + +type Rules []Rule + +type Rule struct { + // ID of the rule + ID uint64 `json:"id"` + + // Description of the rule + Description string `json:"description"` + + // Rule priority in OVS (higher number = higher priority) + Priority uint64 `json:"priority"` + + // Traffic direction + Direction string `json:"direction"` + + // IP protocol + Protocol string `json:"protocol"` + + // Priority Code Point (0-7). L2 marking + PCPTag uint64 `json:"pcp_tag"` + + // DSCP value (0-63). L3 marking + DSCPValue uint64 `json:"dscp_value"` + + // Source IP address + SrcIP string `json:"src_ip"` + + // Destination IP address + DstIP string `json:"dst_ip"` + + // Source MAC address + SrcMAC string `json:"src_mac"` + + // Destination MAC address + DstMAC string `json:"dst_mac"` + + // Source port + SrcPort uint64 `json:"src_port"` + + // Destination port + DstPort uint64 `json:"dst_port"` +} diff --git a/pkg/cloudapi/qospolicy/qos_policy.go b/pkg/cloudapi/qospolicy/qos_policy.go new file mode 100644 index 00000000..ca8cd604 --- /dev/null +++ b/pkg/cloudapi/qospolicy/qos_policy.go @@ -0,0 +1,15 @@ +package qospolicy + +import "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/interfaces" + +// Structure for creating request to QoS policy +type QoSPolicy struct { + client interfaces.Caller +} + +// Builder for QoS policy endpoint +func New(client interfaces.Caller) *QoSPolicy { + return &QoSPolicy{ + client: client, + } +} diff --git a/pkg/cloudapi/qospolicy/sorting.go b/pkg/cloudapi/qospolicy/sorting.go new file mode 100644 index 00000000..aa890491 --- /dev/null +++ b/pkg/cloudapi/qospolicy/sorting.go @@ -0,0 +1,39 @@ +package qospolicy + +import "sort" + +// SortByCreatedAt sorts ListQosPolicies by the CreatedAt field in ascending order +// If inverse param is set to true, the order is reversed +func (lqp ListQoSPolicies) SortByCreatedAt(inverse bool) ListQoSPolicies { + if len(lqp.Data) < 2 { + return lqp + } + + sort.Slice(lqp.Data, func(i, j int) bool { + if inverse { + return lqp.Data[i].CreatedAt > lqp.Data[j].CreatedAt + } + + return lqp.Data[i].CreatedAt < lqp.Data[j].CreatedAt + }) + + return lqp +} + +// SortByUpdatedAt sorts ListQosPolicies by the UpdatedAt field in ascending order +// If inverse param is set to true, the order is reversed +func (lqp ListQoSPolicies) SortByUpdatedAt(inverse bool) ListQoSPolicies { + if len(lqp.Data) < 2 { + return lqp + } + + sort.Slice(lqp.Data, func(i, j int) bool { + if inverse { + return lqp.Data[i].UpdatedAt > lqp.Data[j].UpdatedAt + } + + return lqp.Data[i].UpdatedAt < lqp.Data[j].UpdatedAt + }) + + return lqp +} diff --git a/pkg/cloudapi/qospolicy/update.go b/pkg/cloudapi/qospolicy/update.go new file mode 100644 index 00000000..52373ad1 --- /dev/null +++ b/pkg/cloudapi/qospolicy/update.go @@ -0,0 +1,52 @@ +package qospolicy + +import ( + "context" + "encoding/json" + "net/http" + + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/constants" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" +) + +type UpdateRequest struct { + // QoS policy ID + // Required: true + QoSPolicyID uint64 `url:"qos_policy_id" json:"qos_policy_id" validate:"required"` + + // New QoS policy name + // Required: false + Name string `url:"name,omitempty" json:"name,omitempty"` + + // New QoS policy description + // Required: false + Description string `url:"description,omitempty" json:"description,omitempty"` +} + +func (qp QoSPolicy) Update(ctx context.Context, req UpdateRequest) (*RecordQoSPolicy, error) { + res, err := qp.UpdateRaw(ctx, req) + if err != nil { + return nil, err + } + + info := RecordQoSPolicy{} + + err = json.Unmarshal(res, &info) + if err != nil { + return nil, err + } + + return &info, nil +} + +func (qp QoSPolicy) UpdateRaw(ctx context.Context, req UpdateRequest) ([]byte, error) { + err := validators.ValidateRequest(req) + if err != nil { + return nil, validators.ValidationErrors(validators.GetErrors(err)) + } + + url := "/cloudapi/network_qos_policy/update" + + res, err := qp.client.DecortApiCallCtype(ctx, http.MethodPost, url, constants.MIMEJSON, req) + return res, err +} diff --git a/pkg/cloudapi/rg.go b/pkg/cloudapi/rg.go index e6061c06..8deb8726 100644 --- a/pkg/cloudapi/rg.go +++ b/pkg/cloudapi/rg.go @@ -1,6 +1,6 @@ package cloudapi -import "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/pkg/cloudapi/rg" +import "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/pkg/cloudapi/rg" // Accessing the RG method group func (ca *CloudAPI) RG() *rg.RG { diff --git a/pkg/cloudapi/rg/access_grant.go b/pkg/cloudapi/rg/access_grant.go index c3c22265..82d362c4 100644 --- a/pkg/cloudapi/rg/access_grant.go +++ b/pkg/cloudapi/rg/access_grant.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // AccessGrantRequest struct to grant access to resource group diff --git a/pkg/cloudapi/rg/access_revoke.go b/pkg/cloudapi/rg/access_revoke.go index 6f06cc7e..b5c459d2 100644 --- a/pkg/cloudapi/rg/access_revoke.go +++ b/pkg/cloudapi/rg/access_revoke.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // AccessRevokeRequest struct to revoke access diff --git a/pkg/cloudapi/rg/add_storage_policy.go b/pkg/cloudapi/rg/add_storage_policy.go index d7bc59fb..88f25bdd 100644 --- a/pkg/cloudapi/rg/add_storage_policy.go +++ b/pkg/cloudapi/rg/add_storage_policy.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // AddStoragePolicyRequest struct for adding storage policy to the resource group diff --git a/pkg/cloudapi/rg/affinity_group_computes.go b/pkg/cloudapi/rg/affinity_group_computes.go index d3e8ea25..ac1c5126 100644 --- a/pkg/cloudapi/rg/affinity_group_computes.go +++ b/pkg/cloudapi/rg/affinity_group_computes.go @@ -5,7 +5,7 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // AffinityGroupComputesRequest struct to get list of all computes with their relationships diff --git a/pkg/cloudapi/rg/affinity_groups_get.go b/pkg/cloudapi/rg/affinity_groups_get.go index f728e22c..c2740d2c 100644 --- a/pkg/cloudapi/rg/affinity_groups_get.go +++ b/pkg/cloudapi/rg/affinity_groups_get.go @@ -5,7 +5,7 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // AffinityGroupsGetRequest struct to get list computes from affinity group diff --git a/pkg/cloudapi/rg/affinity_groups_list.go b/pkg/cloudapi/rg/affinity_groups_list.go index b23c8249..d0e8dd87 100644 --- a/pkg/cloudapi/rg/affinity_groups_list.go +++ b/pkg/cloudapi/rg/affinity_groups_list.go @@ -5,7 +5,7 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // AffinityGroupsListRequest struct to get list of affinity groups from resource group diff --git a/pkg/cloudapi/rg/audits.go b/pkg/cloudapi/rg/audits.go deleted file mode 100644 index 89d46a85..00000000 --- a/pkg/cloudapi/rg/audits.go +++ /dev/null @@ -1,40 +0,0 @@ -package rg - -import ( - "context" - "encoding/json" - "net/http" - - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" -) - -// AuditsRequest struct to get audit -type AuditsRequest struct { - // Resource group ID - // Required: true - RGID uint64 `url:"rgId" json:"rgId" validate:"required"` -} - -// Audits gets audit records for the specified resource group object -func (r RG) Audits(ctx context.Context, req AuditsRequest) (ListAudits, error) { - err := validators.ValidateRequest(req) - if err != nil { - return nil, validators.ValidationErrors(validators.GetErrors(err)) - } - - url := "/cloudapi/rg/audits" - - res, err := r.client.DecortApiCall(ctx, http.MethodPost, url, req) - if err != nil { - return nil, err - } - - list := ListAudits{} - - err = json.Unmarshal(res, &list) - if err != nil { - return nil, err - } - - return list, nil -} diff --git a/pkg/cloudapi/rg/create.go b/pkg/cloudapi/rg/create.go index 72d60fa5..4d0221d3 100644 --- a/pkg/cloudapi/rg/create.go +++ b/pkg/cloudapi/rg/create.go @@ -5,8 +5,8 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/constants" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/constants" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // CreateRequest struct to create resource group diff --git a/pkg/cloudapi/rg/del_storage_policy.go b/pkg/cloudapi/rg/del_storage_policy.go index cf41b75f..d5a8c61d 100644 --- a/pkg/cloudapi/rg/del_storage_policy.go +++ b/pkg/cloudapi/rg/del_storage_policy.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // DelStoragePolicyRequest struct for deleting storage policy to the resource group diff --git a/pkg/cloudapi/rg/delete.go b/pkg/cloudapi/rg/delete.go index 6338cd04..63c9ceb8 100644 --- a/pkg/cloudapi/rg/delete.go +++ b/pkg/cloudapi/rg/delete.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // DeleteRequest struct to delete resource group diff --git a/pkg/cloudapi/rg/disable.go b/pkg/cloudapi/rg/disable.go index d940d024..f7af7b1c 100644 --- a/pkg/cloudapi/rg/disable.go +++ b/pkg/cloudapi/rg/disable.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // DisableRequest struct to disable resource group diff --git a/pkg/cloudapi/rg/enable.go b/pkg/cloudapi/rg/enable.go index af39e61d..615a59ca 100644 --- a/pkg/cloudapi/rg/enable.go +++ b/pkg/cloudapi/rg/enable.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // EnableRequest struct to enable resource group diff --git a/pkg/cloudapi/rg/get.go b/pkg/cloudapi/rg/get.go index 2f3256a4..fe88b130 100644 --- a/pkg/cloudapi/rg/get.go +++ b/pkg/cloudapi/rg/get.go @@ -5,7 +5,7 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // GetRequest struct to get detailed information about resource group diff --git a/pkg/cloudapi/rg/get_resource_consumption.go b/pkg/cloudapi/rg/get_resource_consumption.go index 7882d5e8..aaa5c5ac 100644 --- a/pkg/cloudapi/rg/get_resource_consumption.go +++ b/pkg/cloudapi/rg/get_resource_consumption.go @@ -5,7 +5,7 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // GetResourceConsumptionRequest struct to get detailed information about resource consumption for ResGroup diff --git a/pkg/cloudapi/rg/list.go b/pkg/cloudapi/rg/list.go index 186f7419..bbcf38ee 100644 --- a/pkg/cloudapi/rg/list.go +++ b/pkg/cloudapi/rg/list.go @@ -5,7 +5,7 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // ListRequest struct to get list of resource groups diff --git a/pkg/cloudapi/rg/list_computes.go b/pkg/cloudapi/rg/list_computes.go index 19c11f03..65aa7e08 100644 --- a/pkg/cloudapi/rg/list_computes.go +++ b/pkg/cloudapi/rg/list_computes.go @@ -5,7 +5,7 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // ListComputesRequest struct to get list of computes diff --git a/pkg/cloudapi/rg/list_deleted.go b/pkg/cloudapi/rg/list_deleted.go index 12510c90..9e4940ec 100644 --- a/pkg/cloudapi/rg/list_deleted.go +++ b/pkg/cloudapi/rg/list_deleted.go @@ -5,7 +5,7 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // ListDeletedRequest struct to get list deleted resource groups diff --git a/pkg/cloudapi/rg/list_lb.go b/pkg/cloudapi/rg/list_lb.go index 6c114bff..98c56d2e 100644 --- a/pkg/cloudapi/rg/list_lb.go +++ b/pkg/cloudapi/rg/list_lb.go @@ -5,7 +5,7 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // ListLBRequest struct to get list of load balancers diff --git a/pkg/cloudapi/rg/list_pfw.go b/pkg/cloudapi/rg/list_pfw.go index 80b51d6e..c2d3b278 100644 --- a/pkg/cloudapi/rg/list_pfw.go +++ b/pkg/cloudapi/rg/list_pfw.go @@ -5,7 +5,7 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // ListPFWRequest struct to get list of port forward rules diff --git a/pkg/cloudapi/rg/list_vins.go b/pkg/cloudapi/rg/list_vins.go index 419f1040..21ae31eb 100644 --- a/pkg/cloudapi/rg/list_vins.go +++ b/pkg/cloudapi/rg/list_vins.go @@ -5,7 +5,7 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // ListVINSRequest struct to get list of VINSes diff --git a/pkg/cloudapi/rg/remove_def_net.go b/pkg/cloudapi/rg/remove_def_net.go index 1ac6237d..3574d22a 100644 --- a/pkg/cloudapi/rg/remove_def_net.go +++ b/pkg/cloudapi/rg/remove_def_net.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // RemoveDefNetRequest struct to remove default network diff --git a/pkg/cloudapi/rg/restore.go b/pkg/cloudapi/rg/restore.go index 610146ff..97910ee6 100644 --- a/pkg/cloudapi/rg/restore.go +++ b/pkg/cloudapi/rg/restore.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // RestoreRequest struct to restore resource group diff --git a/pkg/cloudapi/rg/rg.go b/pkg/cloudapi/rg/rg.go index 5a1cda64..bb12a322 100644 --- a/pkg/cloudapi/rg/rg.go +++ b/pkg/cloudapi/rg/rg.go @@ -2,7 +2,7 @@ package rg import ( - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/interfaces" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/interfaces" ) // Structure for creating request to resource group diff --git a/pkg/cloudapi/rg/serialize.go b/pkg/cloudapi/rg/serialize.go index 9fe7f0c2..19374b21 100644 --- a/pkg/cloudapi/rg/serialize.go +++ b/pkg/cloudapi/rg/serialize.go @@ -3,7 +3,7 @@ package rg import ( "encoding/json" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/serialization" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/serialization" ) // Serialize returns JSON-serialized []byte. Used as a wrapper over json.Marshal and json.MarshalIndent functions. diff --git a/pkg/cloudapi/rg/set_def_net.go b/pkg/cloudapi/rg/set_def_net.go index d90c3c7b..6a981fcf 100644 --- a/pkg/cloudapi/rg/set_def_net.go +++ b/pkg/cloudapi/rg/set_def_net.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // SetDefNetRequest struct to set default network diff --git a/pkg/cloudapi/rg/update.go b/pkg/cloudapi/rg/update.go index 92deec9e..abda4a7f 100644 --- a/pkg/cloudapi/rg/update.go +++ b/pkg/cloudapi/rg/update.go @@ -5,8 +5,8 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/constants" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/constants" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // UpdateRequest struct to update resource group diff --git a/pkg/cloudapi/rg/usage.go b/pkg/cloudapi/rg/usage.go index 21df3dc2..f6c5b327 100644 --- a/pkg/cloudapi/rg/usage.go +++ b/pkg/cloudapi/rg/usage.go @@ -5,7 +5,7 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // UsageRequest struct to get report of resource usage diff --git a/pkg/cloudapi/secgroup/create.go b/pkg/cloudapi/secgroup/create.go index bd0c4888..362c760b 100644 --- a/pkg/cloudapi/secgroup/create.go +++ b/pkg/cloudapi/secgroup/create.go @@ -5,8 +5,8 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/constants" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/constants" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) type CreateRequest struct { diff --git a/pkg/cloudapi/secgroup/create_rule.go b/pkg/cloudapi/secgroup/create_rule.go index aabc7c62..d2404583 100644 --- a/pkg/cloudapi/secgroup/create_rule.go +++ b/pkg/cloudapi/secgroup/create_rule.go @@ -5,8 +5,8 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/constants" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/constants" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) type CreateRuleRequest struct { diff --git a/pkg/cloudapi/secgroup/delete.go b/pkg/cloudapi/secgroup/delete.go index 8a413b4d..b02ba678 100644 --- a/pkg/cloudapi/secgroup/delete.go +++ b/pkg/cloudapi/secgroup/delete.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) type DeleteRequest struct { diff --git a/pkg/cloudapi/secgroup/delete_rule.go b/pkg/cloudapi/secgroup/delete_rule.go index 5db2a02e..8afa8285 100644 --- a/pkg/cloudapi/secgroup/delete_rule.go +++ b/pkg/cloudapi/secgroup/delete_rule.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) type DeleteRuleRequest struct { diff --git a/pkg/cloudapi/secgroup/get.go b/pkg/cloudapi/secgroup/get.go index 29482362..9fcdef42 100644 --- a/pkg/cloudapi/secgroup/get.go +++ b/pkg/cloudapi/secgroup/get.go @@ -5,7 +5,7 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) type GetRequest struct { diff --git a/pkg/cloudapi/secgroup/list.go b/pkg/cloudapi/secgroup/list.go index a56b936b..d53927fb 100644 --- a/pkg/cloudapi/secgroup/list.go +++ b/pkg/cloudapi/secgroup/list.go @@ -5,7 +5,7 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) type ListRequest struct { diff --git a/pkg/cloudapi/secgroup/security_group.go b/pkg/cloudapi/secgroup/security_group.go index ac90e5ff..0de0e2a6 100644 --- a/pkg/cloudapi/secgroup/security_group.go +++ b/pkg/cloudapi/secgroup/security_group.go @@ -1,6 +1,6 @@ package secgroup -import "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/interfaces" +import "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/interfaces" // Structure for creating request to storage policy type SecurityGroup struct { diff --git a/pkg/cloudapi/secgroup/update.go b/pkg/cloudapi/secgroup/update.go index b769f3e3..3a28eedd 100644 --- a/pkg/cloudapi/secgroup/update.go +++ b/pkg/cloudapi/secgroup/update.go @@ -5,7 +5,7 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) type UpdateRequest struct { diff --git a/pkg/cloudapi/securitygroup.go b/pkg/cloudapi/securitygroup.go index 63243830..ac9fa5ce 100644 --- a/pkg/cloudapi/securitygroup.go +++ b/pkg/cloudapi/securitygroup.go @@ -1,7 +1,7 @@ package cloudapi import ( - secgroup "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/pkg/cloudapi/secgroup" + secgroup "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/pkg/cloudapi/secgroup" ) // Accessing the Security Group method group diff --git a/pkg/cloudapi/sep.go b/pkg/cloudapi/sep.go index 04509279..6d62ee26 100644 --- a/pkg/cloudapi/sep.go +++ b/pkg/cloudapi/sep.go @@ -1,6 +1,6 @@ package cloudapi -import "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/pkg/cloudapi/sep" +import "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/pkg/cloudapi/sep" // Accessing the SEP method group func (cb *CloudAPI) SEP() *sep.SEP { diff --git a/pkg/cloudapi/sep/list_available_sep_and_pools.go b/pkg/cloudapi/sep/list_available_sep_and_pools.go index f15c58d1..78f7d375 100644 --- a/pkg/cloudapi/sep/list_available_sep_and_pools.go +++ b/pkg/cloudapi/sep/list_available_sep_and_pools.go @@ -5,7 +5,7 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // ListAvailableSEPAndPoolsRequest struct to get dict with entry count and list of dict with SEPs and pools details accessible by the Account and RG diff --git a/pkg/cloudapi/sep/sep.go b/pkg/cloudapi/sep/sep.go index d5a115d7..6a9b16d8 100644 --- a/pkg/cloudapi/sep/sep.go +++ b/pkg/cloudapi/sep/sep.go @@ -2,7 +2,7 @@ package sep import ( - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/interfaces" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/interfaces" ) // Structure for creating request to storage endpoint provider diff --git a/pkg/cloudapi/sep/serialize.go b/pkg/cloudapi/sep/serialize.go index b82ee1e5..41138547 100644 --- a/pkg/cloudapi/sep/serialize.go +++ b/pkg/cloudapi/sep/serialize.go @@ -3,7 +3,7 @@ package sep import ( "encoding/json" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/serialization" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/serialization" ) // Serialize returns JSON-serialized []byte. Used as a wrapper over json.Marshal and json.MarshalIndent functions. diff --git a/pkg/cloudapi/storage_policy.go b/pkg/cloudapi/storage_policy.go index 42b29790..a4c99940 100644 --- a/pkg/cloudapi/storage_policy.go +++ b/pkg/cloudapi/storage_policy.go @@ -1,7 +1,7 @@ package cloudapi import ( - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/pkg/cloudapi/stpolicy" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/pkg/cloudapi/stpolicy" ) // Accessing the Storage Policy method group diff --git a/pkg/cloudapi/stpolicy/get.go b/pkg/cloudapi/stpolicy/get.go index 66bb92b5..cccbc48b 100644 --- a/pkg/cloudapi/stpolicy/get.go +++ b/pkg/cloudapi/stpolicy/get.go @@ -5,7 +5,7 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) type GetRequest struct { diff --git a/pkg/cloudapi/stpolicy/list.go b/pkg/cloudapi/stpolicy/list.go index d6ad325d..154773eb 100644 --- a/pkg/cloudapi/stpolicy/list.go +++ b/pkg/cloudapi/stpolicy/list.go @@ -5,7 +5,7 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) type ListRequest struct { diff --git a/pkg/cloudapi/stpolicy/storage_policy.go b/pkg/cloudapi/stpolicy/storage_policy.go index 3d3f57a8..4fe191b9 100644 --- a/pkg/cloudapi/stpolicy/storage_policy.go +++ b/pkg/cloudapi/stpolicy/storage_policy.go @@ -1,6 +1,6 @@ package stpolicy -import "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/interfaces" +import "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/interfaces" // Structure for creating request to storage policy type StPolicy struct { diff --git a/pkg/cloudapi/tasks.go b/pkg/cloudapi/tasks.go index 58b7f23b..02679d5c 100644 --- a/pkg/cloudapi/tasks.go +++ b/pkg/cloudapi/tasks.go @@ -1,7 +1,7 @@ package cloudapi import ( - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/pkg/cloudapi/tasks" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/pkg/cloudapi/tasks" ) // Accessing the Tasks method group diff --git a/pkg/cloudapi/tasks/get.go b/pkg/cloudapi/tasks/get.go index 397cd767..4a26eddb 100644 --- a/pkg/cloudapi/tasks/get.go +++ b/pkg/cloudapi/tasks/get.go @@ -5,7 +5,7 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // GetRequest struct to get information about task diff --git a/pkg/cloudapi/tasks/list.go b/pkg/cloudapi/tasks/list.go index 54388059..d50e0542 100644 --- a/pkg/cloudapi/tasks/list.go +++ b/pkg/cloudapi/tasks/list.go @@ -5,7 +5,7 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // ListRequest struct to get list of tasks @@ -38,6 +38,14 @@ type ListRequest struct { // Required: false UpdateTimeTo uint64 `url:"updateTimeTo,omitempty" json:"updateTimeTo,omitempty"` + // Find all tasks created after point in time (unixtime) + // Required: false + CreatedTimeAt uint64 `url:"createdTimeAt,omitempty" json:"createdTimeAt,omitempty"` + + // Find all tasks created before point in time (unixtime) + // Required: false + CreatedTimeTo uint64 `url:"createdTimeTo,omitempty" json:"createdTimeTo,omitempty"` + // Page number // Default: 0 // Default: 0 diff --git a/pkg/cloudapi/tasks/models.go b/pkg/cloudapi/tasks/models.go index 0680d415..ee5e5b7d 100644 --- a/pkg/cloudapi/tasks/models.go +++ b/pkg/cloudapi/tasks/models.go @@ -41,6 +41,9 @@ type RecordAsyncTask struct { // Updated time UpdatedTime uint64 `json:"updatedTime"` + + // Time of creation + CreatedTime uint64 `json:"createdTime"` } // Detailed information about task diff --git a/pkg/cloudapi/tasks/tasks.go b/pkg/cloudapi/tasks/tasks.go index 4ad897b1..64ae75c0 100644 --- a/pkg/cloudapi/tasks/tasks.go +++ b/pkg/cloudapi/tasks/tasks.go @@ -2,7 +2,7 @@ package tasks import ( - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/interfaces" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/interfaces" ) // Structure for creating request to tasks diff --git a/pkg/cloudapi/trunk.go b/pkg/cloudapi/trunk.go index 47235817..72a18e5e 100644 --- a/pkg/cloudapi/trunk.go +++ b/pkg/cloudapi/trunk.go @@ -1,7 +1,7 @@ package cloudapi import ( - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/pkg/cloudapi/trunk" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/pkg/cloudapi/trunk" ) // Accessing the Trunk method group diff --git a/pkg/cloudapi/trunk/get.go b/pkg/cloudapi/trunk/get.go index 5627f587..900d3a74 100644 --- a/pkg/cloudapi/trunk/get.go +++ b/pkg/cloudapi/trunk/get.go @@ -5,7 +5,7 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // GetRequest struct to get information about a trunk diff --git a/pkg/cloudapi/trunk/list.go b/pkg/cloudapi/trunk/list.go index f9566d23..635cacc8 100644 --- a/pkg/cloudapi/trunk/list.go +++ b/pkg/cloudapi/trunk/list.go @@ -5,7 +5,7 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // ListRequest struct to get list of trunks diff --git a/pkg/cloudapi/trunk/trunk.go b/pkg/cloudapi/trunk/trunk.go index d685657e..6037cc3e 100644 --- a/pkg/cloudapi/trunk/trunk.go +++ b/pkg/cloudapi/trunk/trunk.go @@ -2,7 +2,7 @@ package trunk import ( - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/interfaces" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/interfaces" ) // Structure for creating request to trunk diff --git a/pkg/cloudapi/user.go b/pkg/cloudapi/user.go index 23df7ec6..5b5d5e5c 100644 --- a/pkg/cloudapi/user.go +++ b/pkg/cloudapi/user.go @@ -1,6 +1,6 @@ package cloudapi -import "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/pkg/cloudapi/user" +import "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/pkg/cloudapi/user" func (ca *CloudAPI) User() *user.User { return user.New(ca.client) diff --git a/pkg/cloudapi/user/api_list.go b/pkg/cloudapi/user/api_list.go index 28f55889..fed96310 100644 --- a/pkg/cloudapi/user/api_list.go +++ b/pkg/cloudapi/user/api_list.go @@ -5,7 +5,7 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // APIListRequest struct for getting API list. diff --git a/pkg/cloudapi/user/authenticate.go b/pkg/cloudapi/user/authenticate.go index 6172f835..ec92c0bd 100644 --- a/pkg/cloudapi/user/authenticate.go +++ b/pkg/cloudapi/user/authenticate.go @@ -4,7 +4,7 @@ import ( "context" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // AuthenticateRequest struct to authenticate user. diff --git a/pkg/cloudapi/user/get.go b/pkg/cloudapi/user/get.go index 8c1e7b77..22201fc5 100644 --- a/pkg/cloudapi/user/get.go +++ b/pkg/cloudapi/user/get.go @@ -5,7 +5,7 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // GetRequest struct to get user details. diff --git a/pkg/cloudapi/user/get_audit.go b/pkg/cloudapi/user/get_audit.go deleted file mode 100644 index 3253c885..00000000 --- a/pkg/cloudapi/user/get_audit.go +++ /dev/null @@ -1,61 +0,0 @@ -package user - -import ( - "context" - "encoding/json" - "net/http" -) - -// GetAuditRequest struct for getting user's audits. -type GetAuditRequest struct { - // Find by api call. - // Required: false - Call string `url:"call,omitempty" json:"call,omitempty"` - - // Find all audits after point in time (unixtime) - // Required: false - TimestampAt uint64 `url:"timestampAt,omitempty" json:"timestampAt,omitempty"` - - // Find all audits before point in time (unixtime) - // Required: false - TimestampTo uint64 `url:"timestampTo,omitempty" json:"timestampTo,omitempty"` - - // find by HTTP max status code - // Required: false - MaxStatusCode uint64 `url:"maxStatusCode,omitempty" json:"maxStatusCode,omitempty"` - - // find by HTTP min status code - // Required: false - MinStatusCode uint64 `url:"minStatusCode,omitempty" json:"minStatusCode,omitempty"` - - // Sort by one of supported fields, format +|-(field) - // Required: false - SortBy string `url:"sortBy,omitempty" json:"sortBy,omitempty" validate:"omitempty,sortBy"` - - // Page number. - // Required: false - Page uint64 `url:"page,omitempty" json:"page,omitempty"` - - // Page size, maximum - 100. - // Required: false - Size uint64 `url:"size,omitempty" json:"size,omitempty"` -} - -// GetAudit gets user's audits. -func (u User) GetAudit(ctx context.Context, req GetAuditRequest) (ListAudits, error) { - url := "/cloudapi/user/getAudit" - - res, err := u.client.DecortApiCall(ctx, http.MethodPost, url, req) - if err != nil { - return ListAudits{}, err - } - - list := ListAudits{} - - err = json.Unmarshal(res, &list) - if err != nil { - return ListAudits{}, err - } - - return list, nil -} diff --git a/pkg/cloudapi/user/is_valid_invite_user_token.go b/pkg/cloudapi/user/is_valid_invite_user_token.go deleted file mode 100644 index 586cf5f7..00000000 --- a/pkg/cloudapi/user/is_valid_invite_user_token.go +++ /dev/null @@ -1,44 +0,0 @@ -package user - -import ( - "context" - "net/http" - "strconv" - - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" -) - -// GetRequest struct to check if the inviteusertoken and emailaddress pair are valid and matching. -type IsValidInviteUserTokenRequest struct { - // InviteUserToken - // The token that was previously sent to the invited user email - // Required: true - InviteUserToken string `url:"inviteusertoken" json:"inviteusertoken" validate:"required"` - - // EmailAddress - // Email address for the user - // Required: true - EmailAddress string `url:"emailaddress" json:"emailaddress" validate:"required"` -} - -// IsValidInviteUserToken checks if the inviteusertoken and emailaddress pair are valid and matching. -func (u User) IsValidInviteUserToken(ctx context.Context, req IsValidInviteUserTokenRequest) (bool, error) { - err := validators.ValidateRequest(req) - if err != nil { - return false, validators.ValidationErrors(validators.GetErrors(err)) - } - - url := "/cloudapi/user/isValidInviteUserToken" - - res, err := u.client.DecortApiCall(ctx, http.MethodPost, url, req) - if err != nil { - return false, err - } - - result, err := strconv.ParseBool(string(res)) - if err != nil { - return false, err - } - - return result, nil -} diff --git a/pkg/cloudapi/user/models.go b/pkg/cloudapi/user/models.go index d9c982c2..1b337f18 100644 --- a/pkg/cloudapi/user/models.go +++ b/pkg/cloudapi/user/models.go @@ -78,35 +78,47 @@ func (s *StatusCode) UnmarshalJSON(b []byte) error { type BriefResources struct { Accounts Accounts `json:"Accounts,omitempty"` - CSs CSs `json:"CSs,omitempty"` Computes Computes `json:"Computes,omitempty"` RGs RGs `json:"RGs,omitempty"` - VMs VMs `json:"VMs,omitempty"` } type Accounts struct { - Disabled uint64 `json:"DISABLED,omitempty"` - Enabled uint64 `json:"ENABLED,omitempty"` -} - -type CSs struct { - Disabled uint64 `json:"DISABLED,omitempty"` - Enabled uint64 `json:"ENABLED,omitempty"` + Destroying uint64 `json:"DESTROYING,omitempty"` + Confirmed uint64 `json:"CONFIRMED,omitempty"` + Disabled uint64 `json:"DISABLED,omitempty"` + Deleted uint64 `json:"DELETED,omitempty"` } type Computes struct { - Started uint64 `json:"Started,omitempty"` - Stopped uint64 `json:"Stopped,omitempty"` + Starting uint64 `json:"STARTING,omitempty"` + Started uint64 `json:"STARTED,omitempty"` + Stopping uint64 `json:"STOPPING,omitempty"` + Stopped uint64 `json:"STOPPED,omitempty"` + Paused uint64 `json:"PAUSED,omitempty"` + Pausing uint64 `json:"PAUSING,omitempty"` + Merge uint64 `json:"MERGE,omitempty"` + Migrating uint64 `json:"MIGRATING,omitempty"` + MigratingIn uint64 `json:"MIGRATING_IN,omitempty"` + MigratingOut uint64 `json:"MIGRATING_OUT,omitempty"` + Down uint64 `json:"DOWN,omitempty"` + Scheduled uint64 `json:"SCHEDULED,omitempty"` + BackupStopped uint64 `json:"BACKUP_STOPPED,omitempty"` + BackupRunning uint64 `json:"BACKUP_RUNNING,omitempty"` + SnapСreate uint64 `json:"SNAPCREATE,omitempty"` + Cloning uint64 `json:"CLONING,omitempty"` + Rollback uint64 `json:"ROLLBACK,omitempty"` } type RGs struct { - Disabled uint64 `json:"DISABLED,omitempty"` - Enabled uint64 `json:"ENABLED,omitempty"` -} - -type VMs struct { - Halted uint64 `json:"Halted,omitempty"` - Running uint64 `json:"Running,omitempty"` + Modeled uint64 `json:"MODELED,omitempty"` + Created uint64 `json:"CREATED,omitempty"` + Deleted uint64 `json:"DELETED,omitempty"` + Deleting uint64 `json:"DELETING,omitempty"` + Destroying uint64 `json:"DESTROYING,omitempty"` + Disabled uint64 `json:"DISABLED,omitempty"` + Disabling uint64 `json:"DISABLING,omitempty"` + Enabling uint64 `json:"ENABLING,omitempty"` + Restoring uint64 `json:"RESTORING,omitempty"` } type APIsEndpoints struct { diff --git a/pkg/cloudapi/user/set_data.go b/pkg/cloudapi/user/set_data.go index c214b3f5..d7db516b 100644 --- a/pkg/cloudapi/user/set_data.go +++ b/pkg/cloudapi/user/set_data.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // SetDataRequest struct for setting extra user information. diff --git a/pkg/cloudapi/user/user.go b/pkg/cloudapi/user/user.go index 2056f482..074c6f26 100644 --- a/pkg/cloudapi/user/user.go +++ b/pkg/cloudapi/user/user.go @@ -1,6 +1,6 @@ package user -import "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/interfaces" +import "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/interfaces" // Structure for creating request to User type User struct { diff --git a/pkg/cloudapi/vfpool.go b/pkg/cloudapi/vfpool.go index ed2fc652..344101c1 100644 --- a/pkg/cloudapi/vfpool.go +++ b/pkg/cloudapi/vfpool.go @@ -1,6 +1,6 @@ package cloudapi -import "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/pkg/cloudapi/vfpool" +import "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/pkg/cloudapi/vfpool" // Accessing the VFPool method group func (ca *CloudAPI) VFPool() *vfpool.VFPool { diff --git a/pkg/cloudapi/vfpool/get.go b/pkg/cloudapi/vfpool/get.go index 4da9fe12..1a2c5d22 100644 --- a/pkg/cloudapi/vfpool/get.go +++ b/pkg/cloudapi/vfpool/get.go @@ -5,7 +5,7 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // GetRequest struct to get detailed information about vfpool device diff --git a/pkg/cloudapi/vfpool/list.go b/pkg/cloudapi/vfpool/list.go index f346a84f..b7b7d343 100644 --- a/pkg/cloudapi/vfpool/list.go +++ b/pkg/cloudapi/vfpool/list.go @@ -5,7 +5,7 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // ListRequest struct to get list of vfpool devices diff --git a/pkg/cloudapi/vfpool/serialize.go b/pkg/cloudapi/vfpool/serialize.go index 48d7f4f2..ad14085b 100644 --- a/pkg/cloudapi/vfpool/serialize.go +++ b/pkg/cloudapi/vfpool/serialize.go @@ -3,7 +3,7 @@ package vfpool import ( "encoding/json" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/serialization" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/serialization" ) // Serialize returns JSON-serialized []byte. Used as a wrapper over json.Marshal and json.MarshalIndent functions. diff --git a/pkg/cloudapi/vfpool/vfpool.go b/pkg/cloudapi/vfpool/vfpool.go index e0e05bea..db5a992b 100644 --- a/pkg/cloudapi/vfpool/vfpool.go +++ b/pkg/cloudapi/vfpool/vfpool.go @@ -2,7 +2,7 @@ package vfpool import ( - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/interfaces" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/interfaces" ) // Structure for creating request to vfpool diff --git a/pkg/cloudapi/vgpu.go b/pkg/cloudapi/vgpu.go index 0b50eb2e..0b795cab 100644 --- a/pkg/cloudapi/vgpu.go +++ b/pkg/cloudapi/vgpu.go @@ -1,6 +1,6 @@ package cloudapi -import "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/pkg/cloudapi/vgpu" +import "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/pkg/cloudapi/vgpu" // Accessing the VGPU method group func (ca *CloudAPI) VGPU() *vgpu.VGPU { diff --git a/pkg/cloudapi/vgpu/list.go b/pkg/cloudapi/vgpu/list.go index 50f7c930..7470877e 100644 --- a/pkg/cloudapi/vgpu/list.go +++ b/pkg/cloudapi/vgpu/list.go @@ -5,7 +5,7 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // ListRequest struct to get list of VGPU @@ -18,33 +18,29 @@ type ListRequest struct { // Required: false Status string `url:"status,omitempty" json:"status,omitempty"` - // Find by vgpu type + // Find by mode // Required: false - Type string `url:"type,omitempty" json:"type,omitempty"` + SplitMode string `url:"split_mode,omitempty" json:"split_mode,omitempty"` - // Find by vgpu mode + // Find by id node // Required: false - Mode string `url:"mode,omitempty" json:"mode,omitempty"` - - // Find by id resgroup - // Required: false - RGID uint64 `url:"rgId,omitempty" json:"rgId,omitempty"` + NodeID uint64 `url:"node_id,omitempty" json:"node_id,omitempty"` // Find by account id // Required: false - AccountID uint64 `url:"accountId,omitempty" json:"accountId,omitempty"` + AccountID uint64 `url:"account_id,omitempty" json:"account_id,omitempty"` // Find by compute id // Required: false - ComputeID uint64 `url:"computeId,omitempty" json:"computeId,omitempty"` + ComputeID uint64 `url:"compute_id,omitempty" json:"compute_id,omitempty"` // Find by pgpu id // Required: false - PGPUID uint64 `url:"pgpuId,omitempty" json:"pgpuId,omitempty"` + PGPUID uint64 `url:"pgpu_id,omitempty" json:"pgpu_id,omitempty"` // Sort by one of supported fields, format +|-(field) // Required: false - SortBy string `url:"sortBy,omitempty" json:"sortBy,omitempty" validate:"omitempty,sortBy"` + SortBy string `url:"sort_by,omitempty" json:"sort_by,omitempty" validate:"omitempty,sortBy"` // Page number // Required: false @@ -83,6 +79,6 @@ func (v VGPU) ListRaw(ctx context.Context, req ListRequest) ([]byte, error) { url := "/cloudapi/vgpu/list" - res, err := v.client.DecortApiCall(ctx, http.MethodPost, url, req) + res, err := v.client.DecortApiCall(ctx, http.MethodGet, url, req) return res, err } diff --git a/pkg/cloudapi/vgpu/models.go b/pkg/cloudapi/vgpu/models.go index 696f4bf2..8c96a9fb 100644 --- a/pkg/cloudapi/vgpu/models.go +++ b/pkg/cloudapi/vgpu/models.go @@ -1,14 +1,23 @@ package vgpu type ItemVGPU struct { - // Account ID - AccountID uint64 `json:"accountId"` + // Account IDs + AccountIDs []uint64 `json:"account_ids"` + + // Bus number + BusNumber int `json:"bus_number"` + + // ComputeID + ComputeID uint64 `json:"compute_id"` // Created time - CreatedTime uint64 `json:"createdTime"` + CreatedTime uint64 `json:"created_time"` // Deleted time - DeletedTime uint64 `json:"deletedTime"` + DeletedTime uint64 `json:"deleted_time"` + + // Device Reference + DeviceReference string `json:"device_reference"` //Grid ID GID uint64 `json:"gid"` @@ -19,44 +28,29 @@ type ItemVGPU struct { // VGPU ID ID uint64 `json:"id"` - // Last claimed by - LastClaimedBy uint64 `json:"lastClaimedBy"` + // Last Update time + LastUpdateTime uint64 `json:"last_update_time"` - // Last update time - LastUpdateTime uint64 `json:"lastUpdateTime"` + // Mdev UUID + MdevUUID string `json:"mdev_uuid"` - // Mode - Mode string `json:"mode"` - - // Bus number - BusNumber int `json:"bus_number"` + // Parent PCI Address + ParentPCIAddress string `json:"parent_pci_address"` // PCI Slot - PCISlot int `json:"pciSlot"` + PCISlot uint64 `json:"pci_slot"` - // PGPUID - PGPUID uint64 `json:"pgpuid"` + // PGPU ID + PGPUID uint64 `json:"pgpu_id"` - // Profile ID - ProfileID uint64 `json:"profileId"` + // Profile Reference + ProfileReference string `json:"profile_reference"` - // RAM - RAM uint64 `json:"ram"` - - // Reference ID - ReferenceID string `json:"referenceId"` - - // RGID - RGID uint64 `json:"rgId"` + // Split Mode + SplitMode string `json:"split_mode"` // Status Status string `json:"status"` - - // Type - Type string `json:"type"` - - // VMID - VMID uint64 `json:"vmid"` } // List of VGPU diff --git a/pkg/cloudapi/vgpu/serialize.go b/pkg/cloudapi/vgpu/serialize.go index 39691853..c31cba21 100644 --- a/pkg/cloudapi/vgpu/serialize.go +++ b/pkg/cloudapi/vgpu/serialize.go @@ -3,7 +3,7 @@ package vgpu import ( "encoding/json" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/serialization" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/serialization" ) // Serialize returns JSON-serialized []byte. Used as a wrapper over json.Marshal and json.MarshalIndent functions. diff --git a/pkg/cloudapi/vgpu/vgpu.go b/pkg/cloudapi/vgpu/vgpu.go index 46be8afe..0822fa31 100644 --- a/pkg/cloudapi/vgpu/vgpu.go +++ b/pkg/cloudapi/vgpu/vgpu.go @@ -1,6 +1,6 @@ package vgpu -import "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/interfaces" +import "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/interfaces" // Structure for creating request to VGPU type VGPU struct { diff --git a/pkg/cloudapi/vins.go b/pkg/cloudapi/vins.go index 5f49261e..1f4f4954 100644 --- a/pkg/cloudapi/vins.go +++ b/pkg/cloudapi/vins.go @@ -1,7 +1,7 @@ package cloudapi import ( - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/pkg/cloudapi/vins" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/pkg/cloudapi/vins" ) // Accessing the VINS method group diff --git a/pkg/cloudapi/vins/audits.go b/pkg/cloudapi/vins/audits.go deleted file mode 100644 index 7bae3ae1..00000000 --- a/pkg/cloudapi/vins/audits.go +++ /dev/null @@ -1,40 +0,0 @@ -package vins - -import ( - "context" - "encoding/json" - "net/http" - - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" -) - -// AuditsRequest struct to get audits -type AuditsRequest struct { - // ID of the VINS - // Required: true - VINSID uint64 `url:"vinsId" json:"vinsId" validate:"required"` -} - -// Audits gets audit records for the specified VINS object -func (v VINS) Audits(ctx context.Context, req AuditsRequest) (ListAudits, error) { - err := validators.ValidateRequest(req) - if err != nil { - return nil, validators.ValidationErrors(validators.GetErrors(err)) - } - - url := "/cloudapi/vins/audits" - - res, err := v.client.DecortApiCall(ctx, http.MethodPost, url, req) - if err != nil { - return nil, err - } - - list := ListAudits{} - - err = json.Unmarshal(res, &list) - if err != nil { - return nil, err - } - - return list, nil -} diff --git a/pkg/cloudapi/vins/create_in_account.go b/pkg/cloudapi/vins/create_in_account.go index 4fc10fd9..7e4d1f47 100644 --- a/pkg/cloudapi/vins/create_in_account.go +++ b/pkg/cloudapi/vins/create_in_account.go @@ -5,8 +5,8 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/constants" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/constants" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) type Route struct { diff --git a/pkg/cloudapi/vins/create_in_rg.go b/pkg/cloudapi/vins/create_in_rg.go index b59b0379..31236fb1 100644 --- a/pkg/cloudapi/vins/create_in_rg.go +++ b/pkg/cloudapi/vins/create_in_rg.go @@ -5,8 +5,8 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/constants" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/constants" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // CreateInRGRequest struct to create VINS in resource group diff --git a/pkg/cloudapi/vins/delete.go b/pkg/cloudapi/vins/delete.go index a6119886..03cc1186 100644 --- a/pkg/cloudapi/vins/delete.go +++ b/pkg/cloudapi/vins/delete.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // DeleteRequest struct to delete VINS diff --git a/pkg/cloudapi/vins/disable_enable.go b/pkg/cloudapi/vins/disable_enable.go index 5c044d93..31b15868 100644 --- a/pkg/cloudapi/vins/disable_enable.go +++ b/pkg/cloudapi/vins/disable_enable.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // DisableEnableRequest struct to disable/enable VINS diff --git a/pkg/cloudapi/vins/dns_apply.go b/pkg/cloudapi/vins/dns_apply.go index 7cce3a03..e00508f1 100644 --- a/pkg/cloudapi/vins/dns_apply.go +++ b/pkg/cloudapi/vins/dns_apply.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // DNSApplyRequest struct to apply new DNS list in VINS diff --git a/pkg/cloudapi/vins/extnet_connect.go b/pkg/cloudapi/vins/extnet_connect.go index 05191914..583333bf 100644 --- a/pkg/cloudapi/vins/extnet_connect.go +++ b/pkg/cloudapi/vins/extnet_connect.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // ExtNetConnectRequest struct to connect to external network diff --git a/pkg/cloudapi/vins/extnet_disconnect.go b/pkg/cloudapi/vins/extnet_disconnect.go index 4a5e8ea0..8c8dceca 100644 --- a/pkg/cloudapi/vins/extnet_disconnect.go +++ b/pkg/cloudapi/vins/extnet_disconnect.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // ExtNetDisconnectRequest struct to disconnect VINS from external network diff --git a/pkg/cloudapi/vins/extnet_list.go b/pkg/cloudapi/vins/extnet_list.go index 108a4326..4f3e9d57 100644 --- a/pkg/cloudapi/vins/extnet_list.go +++ b/pkg/cloudapi/vins/extnet_list.go @@ -5,7 +5,7 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // ExtNetListRequest struct to get list of VINS external network connections diff --git a/pkg/cloudapi/vins/get.go b/pkg/cloudapi/vins/get.go index f05c8324..e232d688 100644 --- a/pkg/cloudapi/vins/get.go +++ b/pkg/cloudapi/vins/get.go @@ -5,7 +5,7 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // GetRequest struct to get information about VINS diff --git a/pkg/cloudapi/vins/ip_list.go b/pkg/cloudapi/vins/ip_list.go index 25cf1fc4..1cd04cc4 100644 --- a/pkg/cloudapi/vins/ip_list.go +++ b/pkg/cloudapi/vins/ip_list.go @@ -5,7 +5,7 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // IPListRequest struct for DHCP IP diff --git a/pkg/cloudapi/vins/ip_release.go b/pkg/cloudapi/vins/ip_release.go index 187710eb..4d099e44 100644 --- a/pkg/cloudapi/vins/ip_release.go +++ b/pkg/cloudapi/vins/ip_release.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // IPReleaseRequest struct for IP release diff --git a/pkg/cloudapi/vins/ip_reserve.go b/pkg/cloudapi/vins/ip_reserve.go index 125fcb9f..b0ee970f 100644 --- a/pkg/cloudapi/vins/ip_reserve.go +++ b/pkg/cloudapi/vins/ip_reserve.go @@ -4,7 +4,7 @@ import ( "context" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // IPReserveRequest struct for IP reserve diff --git a/pkg/cloudapi/vins/list.go b/pkg/cloudapi/vins/list.go index f285cd8c..c6eabcab 100644 --- a/pkg/cloudapi/vins/list.go +++ b/pkg/cloudapi/vins/list.go @@ -5,7 +5,7 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // ListRequest struct to get list of VINSes diff --git a/pkg/cloudapi/vins/list_deleted.go b/pkg/cloudapi/vins/list_deleted.go index 2b72ded9..372e430c 100644 --- a/pkg/cloudapi/vins/list_deleted.go +++ b/pkg/cloudapi/vins/list_deleted.go @@ -5,7 +5,7 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // ListDeletedRequest struct to get list of deleted VINSes diff --git a/pkg/cloudapi/vins/migrate_to_zone.go b/pkg/cloudapi/vins/migrate_to_zone.go index d6ed2e47..babbb532 100644 --- a/pkg/cloudapi/vins/migrate_to_zone.go +++ b/pkg/cloudapi/vins/migrate_to_zone.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // MigrateToZone struct to move VINS to another zone diff --git a/pkg/cloudapi/vins/models.go b/pkg/cloudapi/vins/models.go index 86851c19..5f6bf89a 100644 --- a/pkg/cloudapi/vins/models.go +++ b/pkg/cloudapi/vins/models.go @@ -20,6 +20,9 @@ type ItemVINS struct { // Deleted time DeletedTime uint64 `json:"deletedTime"` + // Enable Default Gateway + EnableDefaultGateway bool `json:"enable_default_gateway"` + // External IP ExternalIP string `json:"externalIP"` diff --git a/pkg/cloudapi/vins/nat_rule_add.go b/pkg/cloudapi/vins/nat_rule_add.go index a39b0420..4beb5b0c 100644 --- a/pkg/cloudapi/vins/nat_rule_add.go +++ b/pkg/cloudapi/vins/nat_rule_add.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // NATRuleAddRequest struct to create NAT rules diff --git a/pkg/cloudapi/vins/nat_rule_del.go b/pkg/cloudapi/vins/nat_rule_del.go index ca86632f..657f38c9 100644 --- a/pkg/cloudapi/vins/nat_rule_del.go +++ b/pkg/cloudapi/vins/nat_rule_del.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // NATRuleDelRequest struct to delete NAT rule diff --git a/pkg/cloudapi/vins/nat_rule_list.go b/pkg/cloudapi/vins/nat_rule_list.go index a84ff896..358de3ab 100644 --- a/pkg/cloudapi/vins/nat_rule_list.go +++ b/pkg/cloudapi/vins/nat_rule_list.go @@ -5,7 +5,7 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // NATRuleListRequest struct to get list of NAT rules diff --git a/pkg/cloudapi/vins/restore.go b/pkg/cloudapi/vins/restore.go index 4ba67eb2..ccba88af 100644 --- a/pkg/cloudapi/vins/restore.go +++ b/pkg/cloudapi/vins/restore.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // RestoreRequest struct for restore diff --git a/pkg/cloudapi/vins/serialize.go b/pkg/cloudapi/vins/serialize.go index fc3e6154..ea03d518 100644 --- a/pkg/cloudapi/vins/serialize.go +++ b/pkg/cloudapi/vins/serialize.go @@ -3,7 +3,7 @@ package vins import ( "encoding/json" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/serialization" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/serialization" ) // Serialize returns JSON-serialized []byte. Used as a wrapper over json.Marshal and json.MarshalIndent functions. diff --git a/pkg/cloudapi/vins/static_route_access_grant.go b/pkg/cloudapi/vins/static_route_access_grant.go index 348cf146..e05fe4f1 100644 --- a/pkg/cloudapi/vins/static_route_access_grant.go +++ b/pkg/cloudapi/vins/static_route_access_grant.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // StaticRouteAccessGrantRequest struct to grant access to static route to Compute/ViNS diff --git a/pkg/cloudapi/vins/static_route_access_revoke.go b/pkg/cloudapi/vins/static_route_access_revoke.go index 3ce1438e..2a1bd3af 100644 --- a/pkg/cloudapi/vins/static_route_access_revoke.go +++ b/pkg/cloudapi/vins/static_route_access_revoke.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // StaticRouteAccessRevokeRequest struct to revoke access to static route to Compute/ViNS diff --git a/pkg/cloudapi/vins/static_route_add.go b/pkg/cloudapi/vins/static_route_add.go index c25e25fd..e0208a08 100644 --- a/pkg/cloudapi/vins/static_route_add.go +++ b/pkg/cloudapi/vins/static_route_add.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // StaticRouteAddRequest struct to add static route diff --git a/pkg/cloudapi/vins/static_route_del.go b/pkg/cloudapi/vins/static_route_del.go index b42e4082..501f472f 100644 --- a/pkg/cloudapi/vins/static_route_del.go +++ b/pkg/cloudapi/vins/static_route_del.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // StaticRouteDelRequest struct to remove static route from ViNS diff --git a/pkg/cloudapi/vins/static_route_list.go b/pkg/cloudapi/vins/static_route_list.go index 42acc665..54f2ece4 100644 --- a/pkg/cloudapi/vins/static_route_list.go +++ b/pkg/cloudapi/vins/static_route_list.go @@ -5,7 +5,7 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // StaticRouteListRequest struct for static route list diff --git a/pkg/cloudapi/vins/vins.go b/pkg/cloudapi/vins/vins.go index 15f28f25..370c090e 100644 --- a/pkg/cloudapi/vins/vins.go +++ b/pkg/cloudapi/vins/vins.go @@ -2,7 +2,7 @@ package vins import ( - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/interfaces" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/interfaces" ) // Structure for creating request to VINS diff --git a/pkg/cloudapi/vins/vnfdev_redeploy.go b/pkg/cloudapi/vins/vnfdev_redeploy.go index 7da58a75..01ab0a51 100644 --- a/pkg/cloudapi/vins/vnfdev_redeploy.go +++ b/pkg/cloudapi/vins/vnfdev_redeploy.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // VNFDevRedeployRequest struct for redeploy VNFDevs diff --git a/pkg/cloudapi/vins/vnfdev_restart.go b/pkg/cloudapi/vins/vnfdev_restart.go index 657ba2eb..6ab46f1b 100644 --- a/pkg/cloudapi/vins/vnfdev_restart.go +++ b/pkg/cloudapi/vins/vnfdev_restart.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // VNFDevRestartRequest struct for reboot VINSes primary VNF device diff --git a/pkg/cloudapi/zone.go b/pkg/cloudapi/zone.go index 2897ceda..8992e0b8 100644 --- a/pkg/cloudapi/zone.go +++ b/pkg/cloudapi/zone.go @@ -1,7 +1,7 @@ package cloudapi import ( - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/pkg/cloudapi/zone" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/pkg/cloudapi/zone" ) // Accessing the Zone method group diff --git a/pkg/cloudapi/zone/get.go b/pkg/cloudapi/zone/get.go index 83e0076c..7e65bb75 100644 --- a/pkg/cloudapi/zone/get.go +++ b/pkg/cloudapi/zone/get.go @@ -5,7 +5,7 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // GetRequest struct to get detailed information about zone diff --git a/pkg/cloudapi/zone/list.go b/pkg/cloudapi/zone/list.go index 1a27644c..a719aa11 100644 --- a/pkg/cloudapi/zone/list.go +++ b/pkg/cloudapi/zone/list.go @@ -5,7 +5,7 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // ListRequest struct to get list of zones diff --git a/pkg/cloudapi/zone/models.go b/pkg/cloudapi/zone/models.go index 34eda0ff..62fbc2d1 100644 --- a/pkg/cloudapi/zone/models.go +++ b/pkg/cloudapi/zone/models.go @@ -117,6 +117,15 @@ type RecordZone struct { // Reserved RAM ReservedRAM uint64 `json:"reserved_ram"` + + // Storage Distributed Resource Scheduler + SDRS bool `json:"sdrs"` + + // Mode of SDRS + SDRSMode string `json:"sdrs_mode"` + + // Minimal level of logs + LoggingLevel string `json:"logging_level"` } // A zone item from a list @@ -195,4 +204,13 @@ type ItemZone struct { // Reserved RAM ReservedRAM uint64 `json:"reserved_ram"` + + // Storage Distributed Resource Scheduler + SDRS bool `json:"sdrs"` + + // Mode of SDRS + SDRSMode string `json:"sdrs_mode"` + + // Minimal level of logs + LoggingLevel string `json:"logging_level"` } diff --git a/pkg/cloudapi/zone/serialize.go b/pkg/cloudapi/zone/serialize.go index 8215a557..70725656 100644 --- a/pkg/cloudapi/zone/serialize.go +++ b/pkg/cloudapi/zone/serialize.go @@ -3,7 +3,7 @@ package zone import ( "encoding/json" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/serialization" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/serialization" ) // Serialize returns JSON-serialized []byte. Used as a wrapper over json.Marshal and json.MarshalIndent functions. diff --git a/pkg/cloudapi/zone/zone.go b/pkg/cloudapi/zone/zone.go index a15987f9..9f4afdf0 100644 --- a/pkg/cloudapi/zone/zone.go +++ b/pkg/cloudapi/zone/zone.go @@ -2,7 +2,7 @@ package zone import ( - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/interfaces" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/interfaces" ) // Structure for creating request to zone diff --git a/pkg/cloudbroker/account.go b/pkg/cloudbroker/account.go index d79d9514..87521afa 100644 --- a/pkg/cloudbroker/account.go +++ b/pkg/cloudbroker/account.go @@ -1,7 +1,7 @@ package cloudbroker import ( - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/pkg/cloudbroker/account" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/pkg/cloudbroker/account" ) // Accessing the Account method group diff --git a/pkg/cloudbroker/account/account.go b/pkg/cloudbroker/account/account.go index 0c3c2141..a394cf6a 100644 --- a/pkg/cloudbroker/account/account.go +++ b/pkg/cloudbroker/account/account.go @@ -1,7 +1,7 @@ // API Actor API for managing account package account -import "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/interfaces" +import "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/interfaces" // Structure for creating request to account type Account struct { diff --git a/pkg/cloudbroker/account/add_storage_policy.go b/pkg/cloudbroker/account/add_storage_policy.go index 9548b8ea..0d7141c2 100644 --- a/pkg/cloudbroker/account/add_storage_policy.go +++ b/pkg/cloudbroker/account/add_storage_policy.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // AddStoragePolicyRequest struct for adding storage policy to the account diff --git a/pkg/cloudbroker/account/add_user.go b/pkg/cloudbroker/account/add_user.go index 5fa0190a..c1f5489c 100644 --- a/pkg/cloudbroker/account/add_user.go +++ b/pkg/cloudbroker/account/add_user.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // AddUserRequest struct for adding permission to access to account for a user diff --git a/pkg/cloudbroker/account/add_zone.go b/pkg/cloudbroker/account/add_zone.go index c4e809eb..82aa9a60 100644 --- a/pkg/cloudbroker/account/add_zone.go +++ b/pkg/cloudbroker/account/add_zone.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // AddZoneRequest struct for adding zone to account for a user diff --git a/pkg/cloudbroker/account/audits.go b/pkg/cloudbroker/account/audits.go deleted file mode 100644 index 5d45daf8..00000000 --- a/pkg/cloudbroker/account/audits.go +++ /dev/null @@ -1,40 +0,0 @@ -package account - -import ( - "context" - "encoding/json" - "net/http" - - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" -) - -// AuditsRequest struct to give list of account audits -type AuditsRequest struct { - // ID of the account - // Required: true - AccountID uint64 `url:"accountId" json:"accountId" validate:"required"` -} - -// Audits gets audit records for the specified account object -func (a Account) Audits(ctx context.Context, req AuditsRequest) (ListAudits, error) { - err := validators.ValidateRequest(req) - if err != nil { - return nil, validators.ValidationErrors(validators.GetErrors(err)) - } - - url := "/cloudbroker/account/audits" - - res, err := a.client.DecortApiCall(ctx, http.MethodPost, url, req) - if err != nil { - return nil, err - } - - list := ListAudits{} - - err = json.Unmarshal(res, &list) - if err != nil { - return nil, err - } - - return list, nil -} diff --git a/pkg/cloudbroker/account/create.go b/pkg/cloudbroker/account/create.go index 83434a9c..23284ab1 100644 --- a/pkg/cloudbroker/account/create.go +++ b/pkg/cloudbroker/account/create.go @@ -5,8 +5,8 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/constants" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/constants" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // CreateRequest struct for creating account diff --git a/pkg/cloudbroker/account/del_storage_policy.go b/pkg/cloudbroker/account/del_storage_policy.go index b2444d9d..f140c5c8 100644 --- a/pkg/cloudbroker/account/del_storage_policy.go +++ b/pkg/cloudbroker/account/del_storage_policy.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // DelStoragePolicyRequest struct for deleting storage policy to the account diff --git a/pkg/cloudbroker/account/delete.go b/pkg/cloudbroker/account/delete.go index 6cc73567..7ce4759c 100644 --- a/pkg/cloudbroker/account/delete.go +++ b/pkg/cloudbroker/account/delete.go @@ -4,7 +4,7 @@ import ( "context" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // DeleteRequest struct to delete account diff --git a/pkg/cloudbroker/account/delete_accounts.go b/pkg/cloudbroker/account/delete_accounts.go index f3b99d0b..b1fb5650 100644 --- a/pkg/cloudbroker/account/delete_accounts.go +++ b/pkg/cloudbroker/account/delete_accounts.go @@ -4,7 +4,7 @@ import ( "context" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // DeleteAccountsRequest struct to delete group of accounts diff --git a/pkg/cloudbroker/account/delete_user.go b/pkg/cloudbroker/account/delete_user.go index afe5fcf0..a8b46eed 100644 --- a/pkg/cloudbroker/account/delete_user.go +++ b/pkg/cloudbroker/account/delete_user.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // DeleteUserRequest struct to revoke access to account diff --git a/pkg/cloudbroker/account/disable.go b/pkg/cloudbroker/account/disable.go deleted file mode 100644 index 54b0a4f2..00000000 --- a/pkg/cloudbroker/account/disable.go +++ /dev/null @@ -1,38 +0,0 @@ -package account - -import ( - "context" - "net/http" - "strconv" - - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" -) - -// DisableRequest struct to disable account -type DisableRequest struct { - // ID of account - // Required: true - AccountID uint64 `url:"accountId" json:"accountId" validate:"required"` -} - -// Disable disables an account -func (a Account) Disable(ctx context.Context, req DisableRequest) (bool, error) { - err := validators.ValidateRequest(req) - if err != nil { - return false, validators.ValidationErrors(validators.GetErrors(err)) - } - - url := "/cloudbroker/account/disable" - - res, err := a.client.DecortApiCall(ctx, http.MethodPost, url, req) - if err != nil { - return false, err - } - - result, err := strconv.ParseBool(string(res)) - if err != nil { - return false, err - } - - return result, nil -} diff --git a/pkg/cloudbroker/account/disable_accounts.go b/pkg/cloudbroker/account/disable_accounts.go index 8088cc2c..7d8ed533 100644 --- a/pkg/cloudbroker/account/disable_accounts.go +++ b/pkg/cloudbroker/account/disable_accounts.go @@ -4,7 +4,7 @@ import ( "context" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // DisableAccountsRequest struct to disable group of accounts diff --git a/pkg/cloudbroker/account/enable.go b/pkg/cloudbroker/account/enable.go deleted file mode 100644 index 74fde9ae..00000000 --- a/pkg/cloudbroker/account/enable.go +++ /dev/null @@ -1,38 +0,0 @@ -package account - -import ( - "context" - "net/http" - "strconv" - - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" -) - -// EnableRequest struct to enable account -type EnableRequest struct { - // ID of account - // Required: true - AccountID uint64 `url:"accountId" json:"accountId" validate:"required"` -} - -// Enable enables an account -func (a Account) Enable(ctx context.Context, req EnableRequest) (bool, error) { - err := validators.ValidateRequest(req) - if err != nil { - return false, validators.ValidationErrors(validators.GetErrors(err)) - } - - url := "/cloudbroker/account/enable" - - res, err := a.client.DecortApiCall(ctx, http.MethodPost, url, req) - if err != nil { - return false, err - } - - result, err := strconv.ParseBool(string(res)) - if err != nil { - return false, err - } - - return result, nil -} diff --git a/pkg/cloudbroker/account/enable_accounts.go b/pkg/cloudbroker/account/enable_accounts.go index 5a314185..91b0c4ac 100644 --- a/pkg/cloudbroker/account/enable_accounts.go +++ b/pkg/cloudbroker/account/enable_accounts.go @@ -4,7 +4,7 @@ import ( "context" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // EnableAccountsRequest to enable group of accounts diff --git a/pkg/cloudbroker/account/get.go b/pkg/cloudbroker/account/get.go index 6d37fb48..0bbf9f9e 100644 --- a/pkg/cloudbroker/account/get.go +++ b/pkg/cloudbroker/account/get.go @@ -5,7 +5,7 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // GetRequest struct to get information about account diff --git a/pkg/cloudbroker/account/get_resource_consumption.go b/pkg/cloudbroker/account/get_resource_consumption.go index 7fe1239c..2bfb4f18 100644 --- a/pkg/cloudbroker/account/get_resource_consumption.go +++ b/pkg/cloudbroker/account/get_resource_consumption.go @@ -5,7 +5,7 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // GetResourceConsumptionRequest struct for getting resource consumption diff --git a/pkg/cloudbroker/account/grant_access_templates.go b/pkg/cloudbroker/account/grant_access_templates.go index bfe67e28..5eafeacc 100644 --- a/pkg/cloudbroker/account/grant_access_templates.go +++ b/pkg/cloudbroker/account/grant_access_templates.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // GrantAccessTemplatesRequest struct to share images with account diff --git a/pkg/cloudbroker/account/list.go b/pkg/cloudbroker/account/list.go index b1141f12..83297e9e 100644 --- a/pkg/cloudbroker/account/list.go +++ b/pkg/cloudbroker/account/list.go @@ -5,7 +5,7 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // ListRequest struct to get list of accounts diff --git a/pkg/cloudbroker/account/list_available_templates.go b/pkg/cloudbroker/account/list_available_templates.go index 26b45a32..7e183bd5 100644 --- a/pkg/cloudbroker/account/list_available_templates.go +++ b/pkg/cloudbroker/account/list_available_templates.go @@ -5,7 +5,7 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // ListAvailableTemplatesRequest struct to list templates who sharedWith include accountId diff --git a/pkg/cloudbroker/account/list_computes.go b/pkg/cloudbroker/account/list_computes.go index e9ce1f35..db009fe9 100644 --- a/pkg/cloudbroker/account/list_computes.go +++ b/pkg/cloudbroker/account/list_computes.go @@ -5,7 +5,7 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // ListComputesRequest struct to a get list of compute instances diff --git a/pkg/cloudbroker/account/list_deleted.go b/pkg/cloudbroker/account/list_deleted.go index 1eb6e8b7..6a96033f 100644 --- a/pkg/cloudbroker/account/list_deleted.go +++ b/pkg/cloudbroker/account/list_deleted.go @@ -5,7 +5,7 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // ListDeletedRequest struct to get list of deleted accounts diff --git a/pkg/cloudbroker/account/list_disks.go b/pkg/cloudbroker/account/list_disks.go index c80e040f..813bf927 100644 --- a/pkg/cloudbroker/account/list_disks.go +++ b/pkg/cloudbroker/account/list_disks.go @@ -5,7 +5,7 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // ListDisksRequest struct to get list of deleted disks diff --git a/pkg/cloudbroker/account/list_flip_groups.go b/pkg/cloudbroker/account/list_flip_groups.go index d06001a1..4aa6b322 100644 --- a/pkg/cloudbroker/account/list_flip_groups.go +++ b/pkg/cloudbroker/account/list_flip_groups.go @@ -5,7 +5,7 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // ListFLIPGroupsRequest struct to get list of FLIPGroups diff --git a/pkg/cloudbroker/account/list_rg.go b/pkg/cloudbroker/account/list_rg.go index 73286639..270f4f42 100644 --- a/pkg/cloudbroker/account/list_rg.go +++ b/pkg/cloudbroker/account/list_rg.go @@ -5,7 +5,7 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // ListRGRequest struct to get list of resource groups diff --git a/pkg/cloudbroker/account/list_vins.go b/pkg/cloudbroker/account/list_vins.go index 82fc0b36..248bfee6 100644 --- a/pkg/cloudbroker/account/list_vins.go +++ b/pkg/cloudbroker/account/list_vins.go @@ -5,7 +5,7 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // ListVINSRequest struct to get list of VINS diff --git a/pkg/cloudbroker/account/models.go b/pkg/cloudbroker/account/models.go index e7486239..0c6e0268 100644 --- a/pkg/cloudbroker/account/models.go +++ b/pkg/cloudbroker/account/models.go @@ -456,11 +456,56 @@ type ItemFLIPGroup struct { // Computes info type Computes struct { + // Starting + Starting uint64 `json:"STARTING"` + // Started - Started uint64 `json:"Started"` + Started uint64 `json:"STARTED"` + + // Stopping + Stopping uint64 `json:"STOPPING"` // Stopped - Stopped uint64 `json:"Stopped"` + Stopped uint64 `json:"STOPPED"` + + // Paused + Paused uint64 `json:"PAUSED"` + + // Pausing + Pausing uint64 `json:"PAUSING"` + + // Merge + Merge uint64 `json:"MERGE"` + + // Migrating + Migrating uint64 `json:"MIGRATING"` + + // Migrating in + MigratingIn uint64 `json:"MIGRATING_IN"` + + // Migrating out + MigratingOut uint64 `json:"MIGRATING_OUT"` + + // Down + Down uint64 `json:"DOWN"` + + // Scheduled + Scheduled uint64 `json:"SCHEDULED"` + + // Backup stopped + BackupStopped uint64 `json:"BACKUP_STOPPED"` + + // Backup running + BackupRunning uint64 `json:"BACKUP_RUNNING"` + + // Snapcreate + Snapcreate uint64 `json:"SNAPCREATE"` + + // Cloning + Cloning uint64 `json:"CLONING"` + + // Rollback + Rollback uint64 `json:"ROLLBACK"` } // Limits @@ -579,6 +624,9 @@ type ItemVINS struct { // Deleted time DeletedTime uint64 `json:"deletedTime"` + // Enable Default Gateway + EnableDefaultGateway bool `json:"enable_default_gateway"` + // External IP ExternalIP string `json:"externalIP"` diff --git a/pkg/cloudbroker/account/remove_zone.go b/pkg/cloudbroker/account/remove_zone.go index 7fc0cf59..0f5bc1cc 100644 --- a/pkg/cloudbroker/account/remove_zone.go +++ b/pkg/cloudbroker/account/remove_zone.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // RemoveZoneRequest struct for removing zone from account for a user diff --git a/pkg/cloudbroker/account/restore.go b/pkg/cloudbroker/account/restore.go index dd1631f0..d4fce98b 100644 --- a/pkg/cloudbroker/account/restore.go +++ b/pkg/cloudbroker/account/restore.go @@ -4,7 +4,7 @@ import ( "context" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // RestoreRequest struct to restore a deleted account diff --git a/pkg/cloudbroker/account/revoke_access_templates.go b/pkg/cloudbroker/account/revoke_access_templates.go index d88a6b1c..7142a2e9 100644 --- a/pkg/cloudbroker/account/revoke_access_templates.go +++ b/pkg/cloudbroker/account/revoke_access_templates.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // RevokeAccessTemplatesRequest struct to unshare images with account diff --git a/pkg/cloudbroker/account/serialize.go b/pkg/cloudbroker/account/serialize.go index 6d8d0c23..3efb356d 100644 --- a/pkg/cloudbroker/account/serialize.go +++ b/pkg/cloudbroker/account/serialize.go @@ -3,7 +3,7 @@ package account import ( "encoding/json" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/serialization" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/serialization" ) // Serialize returns JSON-serialized []byte. Used as a wrapper over json.Marshal and json.MarshalIndent functions. diff --git a/pkg/cloudbroker/account/set_cpu_allocation_parameter.go b/pkg/cloudbroker/account/set_cpu_allocation_parameter.go index f22efb95..7da75e82 100644 --- a/pkg/cloudbroker/account/set_cpu_allocation_parameter.go +++ b/pkg/cloudbroker/account/set_cpu_allocation_parameter.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // SetCPUAllocationParameterRequest struct for setting CPU allocation parameter diff --git a/pkg/cloudbroker/account/set_cpu_allocation_ratio.go b/pkg/cloudbroker/account/set_cpu_allocation_ratio.go index 58cb3dab..894d8fed 100644 --- a/pkg/cloudbroker/account/set_cpu_allocation_ratio.go +++ b/pkg/cloudbroker/account/set_cpu_allocation_ratio.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // SetCPUAllocationRatioRequest struct for setting CPU allocation ratio diff --git a/pkg/cloudbroker/account/update.go b/pkg/cloudbroker/account/update.go index 2e561c69..25529422 100644 --- a/pkg/cloudbroker/account/update.go +++ b/pkg/cloudbroker/account/update.go @@ -5,8 +5,8 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/constants" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/constants" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // UpdateRequest struct to update account diff --git a/pkg/cloudbroker/account/update_compute_features.go b/pkg/cloudbroker/account/update_compute_features.go index 5de7f6b5..afb94733 100644 --- a/pkg/cloudbroker/account/update_compute_features.go +++ b/pkg/cloudbroker/account/update_compute_features.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // UpdateComputeFeaturesRequest struct to update advanced compute features diff --git a/pkg/cloudbroker/account/update_resource_types.go b/pkg/cloudbroker/account/update_resource_types.go index ab73b90b..09c7842d 100644 --- a/pkg/cloudbroker/account/update_resource_types.go +++ b/pkg/cloudbroker/account/update_resource_types.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // UpdateResourceTypesRequest struct to update resource types in account diff --git a/pkg/cloudbroker/account/update_user.go b/pkg/cloudbroker/account/update_user.go index 5ebbbdaf..2d007543 100644 --- a/pkg/cloudbroker/account/update_user.go +++ b/pkg/cloudbroker/account/update_user.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // UpdateUserRequest struct to update user access rights diff --git a/pkg/cloudbroker/apiaccess.go b/pkg/cloudbroker/apiaccess.go index a9e73c56..fa5da155 100644 --- a/pkg/cloudbroker/apiaccess.go +++ b/pkg/cloudbroker/apiaccess.go @@ -1,6 +1,6 @@ package cloudbroker -import "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/pkg/cloudbroker/apiaccess" +import "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/pkg/cloudbroker/apiaccess" // Accessing the APIAccess method group func (cb *CloudBroker) APIAccess() *apiaccess.APIAccess { diff --git a/pkg/cloudbroker/apiaccess/api_find.go b/pkg/cloudbroker/apiaccess/api_find.go index b5fb1181..4726b5dc 100644 --- a/pkg/cloudbroker/apiaccess/api_find.go +++ b/pkg/cloudbroker/apiaccess/api_find.go @@ -5,7 +5,7 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // APIFindRequest struct for finding apiaccess groups. diff --git a/pkg/cloudbroker/apiaccess/apiaccess.go b/pkg/cloudbroker/apiaccess/apiaccess.go index 2f20d591..9e96ee53 100644 --- a/pkg/cloudbroker/apiaccess/apiaccess.go +++ b/pkg/cloudbroker/apiaccess/apiaccess.go @@ -1,6 +1,6 @@ package apiaccess -import "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/interfaces" +import "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/interfaces" // Structure for creating request to APIAccess type APIAccess struct { diff --git a/pkg/cloudbroker/apiaccess/apis_exclude.go b/pkg/cloudbroker/apiaccess/apis_exclude.go index cbf14358..41edc91d 100644 --- a/pkg/cloudbroker/apiaccess/apis_exclude.go +++ b/pkg/cloudbroker/apiaccess/apis_exclude.go @@ -6,7 +6,7 @@ import ( "fmt" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) type APIString string diff --git a/pkg/cloudbroker/apiaccess/apis_include.go b/pkg/cloudbroker/apiaccess/apis_include.go index 7a2bb358..ab4d45ce 100644 --- a/pkg/cloudbroker/apiaccess/apis_include.go +++ b/pkg/cloudbroker/apiaccess/apis_include.go @@ -5,7 +5,7 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // APIsIncludeRequest struct for adding api to access group. diff --git a/pkg/cloudbroker/apiaccess/copy.go b/pkg/cloudbroker/apiaccess/copy.go index 1ddf14b8..98506cb2 100644 --- a/pkg/cloudbroker/apiaccess/copy.go +++ b/pkg/cloudbroker/apiaccess/copy.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // CopyRequest Request for copying apiaccess group. diff --git a/pkg/cloudbroker/apiaccess/create.go b/pkg/cloudbroker/apiaccess/create.go index eb7d4b75..677c5fe1 100644 --- a/pkg/cloudbroker/apiaccess/create.go +++ b/pkg/cloudbroker/apiaccess/create.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // CreateRequest struct for creating apiaccess group. diff --git a/pkg/cloudbroker/apiaccess/delete.go b/pkg/cloudbroker/apiaccess/delete.go index 3cc98161..a5d7875e 100644 --- a/pkg/cloudbroker/apiaccess/delete.go +++ b/pkg/cloudbroker/apiaccess/delete.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // DeleteRequest struct for deleting apiaccess group. diff --git a/pkg/cloudbroker/apiaccess/desc_update.go b/pkg/cloudbroker/apiaccess/desc_update.go index 08faf2dd..2b2d58eb 100644 --- a/pkg/cloudbroker/apiaccess/desc_update.go +++ b/pkg/cloudbroker/apiaccess/desc_update.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // DescUpdateRequest struct for updating apiaccess group description. diff --git a/pkg/cloudbroker/apiaccess/get.go b/pkg/cloudbroker/apiaccess/get.go index 8897e533..ceae6fc5 100644 --- a/pkg/cloudbroker/apiaccess/get.go +++ b/pkg/cloudbroker/apiaccess/get.go @@ -5,7 +5,7 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // GetRequest struct to get apiaccess group. diff --git a/pkg/cloudbroker/apiaccess/list.go b/pkg/cloudbroker/apiaccess/list.go index 0f30a73c..51805cd5 100644 --- a/pkg/cloudbroker/apiaccess/list.go +++ b/pkg/cloudbroker/apiaccess/list.go @@ -5,7 +5,7 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // ListRequest struct to get list of all non deleted apiaccess instances. diff --git a/pkg/cloudbroker/apiaccess/set_default.go b/pkg/cloudbroker/apiaccess/set_default.go index f0c53b5c..a5fe7b25 100644 --- a/pkg/cloudbroker/apiaccess/set_default.go +++ b/pkg/cloudbroker/apiaccess/set_default.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // SetDefaultRequest struct for setting default apiaccess group. diff --git a/pkg/cloudbroker/apiaccess/subtract.go b/pkg/cloudbroker/apiaccess/subtract.go index 6ccff089..a0fae8f4 100644 --- a/pkg/cloudbroker/apiaccess/subtract.go +++ b/pkg/cloudbroker/apiaccess/subtract.go @@ -6,7 +6,7 @@ import ( "context" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // SubtractRequest struct for subtracting. diff --git a/pkg/cloudbroker/apiaccess/union.go b/pkg/cloudbroker/apiaccess/union.go index 2fb40480..e759c5f2 100644 --- a/pkg/cloudbroker/apiaccess/union.go +++ b/pkg/cloudbroker/apiaccess/union.go @@ -5,7 +5,7 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // UnionRequest struct for union. diff --git a/pkg/cloudbroker/apiaccess/update.go b/pkg/cloudbroker/apiaccess/update.go index 5974f0db..606fad79 100644 --- a/pkg/cloudbroker/apiaccess/update.go +++ b/pkg/cloudbroker/apiaccess/update.go @@ -6,7 +6,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // UpdateRequest struct for updating apis of apiaccess group. diff --git a/pkg/cloudbroker/apiaccess/user_list.go b/pkg/cloudbroker/apiaccess/user_list.go index 7925f29e..44ce7923 100644 --- a/pkg/cloudbroker/apiaccess/user_list.go +++ b/pkg/cloudbroker/apiaccess/user_list.go @@ -5,7 +5,7 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // UserListRequest struct for getting a list of users currently included in the specified group. diff --git a/pkg/cloudbroker/audit.go b/pkg/cloudbroker/audit.go index bd32f047..6eb2308b 100644 --- a/pkg/cloudbroker/audit.go +++ b/pkg/cloudbroker/audit.go @@ -1,7 +1,7 @@ package cloudbroker import ( - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/pkg/cloudbroker/audit" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/pkg/cloudbroker/audit" ) // Accessing the Audit method group diff --git a/pkg/cloudbroker/audit/audit.go b/pkg/cloudbroker/audit/audit.go index 01bea616..3f1fbf0e 100644 --- a/pkg/cloudbroker/audit/audit.go +++ b/pkg/cloudbroker/audit/audit.go @@ -1,6 +1,6 @@ package audit -import "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/interfaces" +import "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/interfaces" // Structure for creating request to audit type Audit struct { diff --git a/pkg/cloudbroker/audit/get.go b/pkg/cloudbroker/audit/get.go index fa336e74..1d6db47c 100644 --- a/pkg/cloudbroker/audit/get.go +++ b/pkg/cloudbroker/audit/get.go @@ -5,7 +5,7 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // GetRequest struct to get information about account diff --git a/pkg/cloudbroker/audit/linked_jobs.go b/pkg/cloudbroker/audit/linked_jobs.go index e8e36904..16b8fc33 100644 --- a/pkg/cloudbroker/audit/linked_jobs.go +++ b/pkg/cloudbroker/audit/linked_jobs.go @@ -5,7 +5,7 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // LinkedJobsRequest struct to get information about jobs linked with Audit diff --git a/pkg/cloudbroker/audit/list.go b/pkg/cloudbroker/audit/list.go index aa88325f..97fae9f3 100644 --- a/pkg/cloudbroker/audit/list.go +++ b/pkg/cloudbroker/audit/list.go @@ -5,7 +5,7 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // ListRequest struct to give list of account audits diff --git a/pkg/cloudbroker/backup.go b/pkg/cloudbroker/backup.go index 228d6788..66fe2de9 100644 --- a/pkg/cloudbroker/backup.go +++ b/pkg/cloudbroker/backup.go @@ -1,6 +1,6 @@ package cloudbroker -import "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/pkg/cloudbroker/backup" +import "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/pkg/cloudbroker/backup" // Accessing the Backup method group func (cb *CloudBroker) Backup() *backup.Backup { diff --git a/pkg/cloudbroker/backup/backup.go b/pkg/cloudbroker/backup/backup.go index 17b80918..850e215a 100644 --- a/pkg/cloudbroker/backup/backup.go +++ b/pkg/cloudbroker/backup/backup.go @@ -1,7 +1,7 @@ package backup import ( - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/interfaces" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/interfaces" ) // Structure for creating request to backup diff --git a/pkg/cloudbroker/backup/create_disk_backup.go b/pkg/cloudbroker/backup/create_disk_backup.go index da638293..25da2ec2 100644 --- a/pkg/cloudbroker/backup/create_disk_backup.go +++ b/pkg/cloudbroker/backup/create_disk_backup.go @@ -6,7 +6,7 @@ import ( "net/http" "strings" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // CreateDiskBackupRequest struct for creating disk backup diff --git a/pkg/cloudbroker/backup/create_disks_backup.go b/pkg/cloudbroker/backup/create_disks_backup.go index ac5c6b6e..e0545038 100644 --- a/pkg/cloudbroker/backup/create_disks_backup.go +++ b/pkg/cloudbroker/backup/create_disks_backup.go @@ -6,7 +6,7 @@ import ( "net/http" "strings" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) type Disk struct { diff --git a/pkg/cloudbroker/backup/delete_disk_backup.go b/pkg/cloudbroker/backup/delete_disk_backup.go index ee67b021..d95693a9 100644 --- a/pkg/cloudbroker/backup/delete_disk_backup.go +++ b/pkg/cloudbroker/backup/delete_disk_backup.go @@ -6,7 +6,7 @@ import ( "strconv" "strings" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // DeleteDiskBackupRequest struct for deleting disk backup diff --git a/pkg/cloudbroker/backup/list_backup_paths.go b/pkg/cloudbroker/backup/list_backup_paths.go index cfffd60e..e4db2aa2 100644 --- a/pkg/cloudbroker/backup/list_backup_paths.go +++ b/pkg/cloudbroker/backup/list_backup_paths.go @@ -5,7 +5,7 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // ListBackupPathsRequest struct for getting list of backup paths diff --git a/pkg/cloudbroker/backup/restore_disk_from_backup.go b/pkg/cloudbroker/backup/restore_disk_from_backup.go index 921b6123..d79d9e45 100644 --- a/pkg/cloudbroker/backup/restore_disk_from_backup.go +++ b/pkg/cloudbroker/backup/restore_disk_from_backup.go @@ -6,7 +6,7 @@ import ( "net/http" "strings" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // RestoreDiskFromBackupRequest struct for restoring disk from backup diff --git a/pkg/cloudbroker/backup/restore_disks_from_backup.go b/pkg/cloudbroker/backup/restore_disks_from_backup.go index 80fb87d3..b18aa4fe 100644 --- a/pkg/cloudbroker/backup/restore_disks_from_backup.go +++ b/pkg/cloudbroker/backup/restore_disks_from_backup.go @@ -6,7 +6,7 @@ import ( "net/http" "strings" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) type BackupFile struct { diff --git a/pkg/cloudbroker/bservice.go b/pkg/cloudbroker/bservice.go index 591622f9..f4665806 100644 --- a/pkg/cloudbroker/bservice.go +++ b/pkg/cloudbroker/bservice.go @@ -1,6 +1,6 @@ package cloudbroker -import "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/pkg/cloudbroker/bservice" +import "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/pkg/cloudbroker/bservice" // Accessing the BService method group func (ca *CloudBroker) BService() *bservice.BService { diff --git a/pkg/cloudbroker/bservice/bservice.go b/pkg/cloudbroker/bservice/bservice.go index 5080012b..2a020734 100644 --- a/pkg/cloudbroker/bservice/bservice.go +++ b/pkg/cloudbroker/bservice/bservice.go @@ -1,6 +1,6 @@ package bservice -import "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/interfaces" +import "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/interfaces" // Structure for creating request to bservice type BService struct { diff --git a/pkg/cloudbroker/bservice/create.go b/pkg/cloudbroker/bservice/create.go index 44508163..df31b89a 100644 --- a/pkg/cloudbroker/bservice/create.go +++ b/pkg/cloudbroker/bservice/create.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // CreateRequest struct for BasicService diff --git a/pkg/cloudbroker/bservice/delete.go b/pkg/cloudbroker/bservice/delete.go index 93c5ef07..1928fc55 100644 --- a/pkg/cloudbroker/bservice/delete.go +++ b/pkg/cloudbroker/bservice/delete.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // DeleteRequest struct to delete basic service diff --git a/pkg/cloudbroker/bservice/disable.go b/pkg/cloudbroker/bservice/disable.go index 5dd45321..76411133 100644 --- a/pkg/cloudbroker/bservice/disable.go +++ b/pkg/cloudbroker/bservice/disable.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // DisableRequest struct for disable service diff --git a/pkg/cloudbroker/bservice/enable.go b/pkg/cloudbroker/bservice/enable.go index ed546fc1..fd44c4ca 100644 --- a/pkg/cloudbroker/bservice/enable.go +++ b/pkg/cloudbroker/bservice/enable.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // EnableRequest struct to disable service diff --git a/pkg/cloudbroker/bservice/get.go b/pkg/cloudbroker/bservice/get.go index ae0d2d71..65ffb1d6 100644 --- a/pkg/cloudbroker/bservice/get.go +++ b/pkg/cloudbroker/bservice/get.go @@ -5,7 +5,7 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // GetRequest struct to get detailed information about service diff --git a/pkg/cloudbroker/bservice/group_add.go b/pkg/cloudbroker/bservice/group_add.go index 654f3142..7747586d 100644 --- a/pkg/cloudbroker/bservice/group_add.go +++ b/pkg/cloudbroker/bservice/group_add.go @@ -5,7 +5,8 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/constants" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // GroupAddRequest struct to create new compute group within BasicService @@ -62,9 +63,9 @@ type GroupAddRequest struct { // Required: false TimeoutStart uint64 `url:"timeoutStart,omitempty" json:"timeoutStart,omitempty"` - // Meta data for working group computes, format YAML "user_data": 1111 + // Meta data for working group computes, format yaml string or json object // Required: false - UserData string `url:"userData,omitempty" json:"userData,omitempty"` + UserData interface{} `url:"userData,omitempty" json:"userData,omitempty"` // Chipset "i440fx" or "Q35 // Default value : Q35 @@ -97,7 +98,7 @@ func (b BService) GroupAdd(ctx context.Context, req GroupAddRequest) (uint64, er url := "/cloudbroker/bservice/groupAdd" - res, err := b.client.DecortApiCall(ctx, http.MethodPost, url, req) + res, err := b.client.DecortApiCallCtype(ctx, http.MethodPost, url, constants.MIMEJSON, req) if err != nil { return 0, err } diff --git a/pkg/cloudbroker/bservice/group_compute_remove.go b/pkg/cloudbroker/bservice/group_compute_remove.go index 240678de..c24478b6 100644 --- a/pkg/cloudbroker/bservice/group_compute_remove.go +++ b/pkg/cloudbroker/bservice/group_compute_remove.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // GroupComputeRemoveRequest struct to remove group compute diff --git a/pkg/cloudbroker/bservice/group_get.go b/pkg/cloudbroker/bservice/group_get.go index 154cd2b6..6ad46661 100644 --- a/pkg/cloudbroker/bservice/group_get.go +++ b/pkg/cloudbroker/bservice/group_get.go @@ -5,7 +5,7 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // GroupGetRequest struct to get detailed information about Compute Group diff --git a/pkg/cloudbroker/bservice/group_parent_remove.go b/pkg/cloudbroker/bservice/group_parent_remove.go index 3ac0f390..322c6edd 100644 --- a/pkg/cloudbroker/bservice/group_parent_remove.go +++ b/pkg/cloudbroker/bservice/group_parent_remove.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // GroupParentRemoveRequest struct to remove parent Compute Group diff --git a/pkg/cloudbroker/bservice/group_parrent_add.go b/pkg/cloudbroker/bservice/group_parrent_add.go index 57b95f7b..c3801244 100644 --- a/pkg/cloudbroker/bservice/group_parrent_add.go +++ b/pkg/cloudbroker/bservice/group_parrent_add.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // GroupParentAddRequest struct to add parent Compute Group relation to the specified Compute Group diff --git a/pkg/cloudbroker/bservice/group_remove.go b/pkg/cloudbroker/bservice/group_remove.go index aa580457..ea75ba00 100644 --- a/pkg/cloudbroker/bservice/group_remove.go +++ b/pkg/cloudbroker/bservice/group_remove.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // GroupRemoveRequest struct for destroy the specified Compute Group diff --git a/pkg/cloudbroker/bservice/group_resize.go b/pkg/cloudbroker/bservice/group_resize.go index db260b68..32e08873 100644 --- a/pkg/cloudbroker/bservice/group_resize.go +++ b/pkg/cloudbroker/bservice/group_resize.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // GroupResizeRequest struct to resize the group diff --git a/pkg/cloudbroker/bservice/group_start.go b/pkg/cloudbroker/bservice/group_start.go index 6916b053..c58e8dae 100644 --- a/pkg/cloudbroker/bservice/group_start.go +++ b/pkg/cloudbroker/bservice/group_start.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // GroupStartRequest struct to start the specified Compute Group diff --git a/pkg/cloudbroker/bservice/group_stop.go b/pkg/cloudbroker/bservice/group_stop.go index b90eaa7d..1051ef9a 100644 --- a/pkg/cloudbroker/bservice/group_stop.go +++ b/pkg/cloudbroker/bservice/group_stop.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // GroupStopRequest struct to stop the specified Compute Group diff --git a/pkg/cloudbroker/bservice/group_update.go b/pkg/cloudbroker/bservice/group_update.go index 47c4a211..af9f4d39 100644 --- a/pkg/cloudbroker/bservice/group_update.go +++ b/pkg/cloudbroker/bservice/group_update.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // GroupUpdateRequest struct to update existing Compute group diff --git a/pkg/cloudbroker/bservice/group_update_extnet.go b/pkg/cloudbroker/bservice/group_update_extnet.go index 35cd2e5a..6d61f512 100644 --- a/pkg/cloudbroker/bservice/group_update_extnet.go +++ b/pkg/cloudbroker/bservice/group_update_extnet.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // GroupUpdateExtNetRequest struct to update External Network settings diff --git a/pkg/cloudbroker/bservice/group_update_vins.go b/pkg/cloudbroker/bservice/group_update_vins.go index d860e6ba..75b9c7cf 100644 --- a/pkg/cloudbroker/bservice/group_update_vins.go +++ b/pkg/cloudbroker/bservice/group_update_vins.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // GroupUpdateVINSRequest struct to update VINS settings diff --git a/pkg/cloudbroker/bservice/list.go b/pkg/cloudbroker/bservice/list.go index 834839bb..6e61e3f7 100644 --- a/pkg/cloudbroker/bservice/list.go +++ b/pkg/cloudbroker/bservice/list.go @@ -5,7 +5,7 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // ListRequest struct to get list of BasicService instances diff --git a/pkg/cloudbroker/bservice/list_deleted.go b/pkg/cloudbroker/bservice/list_deleted.go index 677be6e7..3b85293a 100644 --- a/pkg/cloudbroker/bservice/list_deleted.go +++ b/pkg/cloudbroker/bservice/list_deleted.go @@ -5,7 +5,7 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // ListDeletedRequest struct to get list of deleted BasicService instances diff --git a/pkg/cloudbroker/bservice/migrate_to_zone.go b/pkg/cloudbroker/bservice/migrate_to_zone.go index 56259cfe..cadcb709 100644 --- a/pkg/cloudbroker/bservice/migrate_to_zone.go +++ b/pkg/cloudbroker/bservice/migrate_to_zone.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // MigrateToZone struct to move basic service to another zone diff --git a/pkg/cloudbroker/bservice/restore.go b/pkg/cloudbroker/bservice/restore.go index 422772a0..1f192dd8 100644 --- a/pkg/cloudbroker/bservice/restore.go +++ b/pkg/cloudbroker/bservice/restore.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // RestoreRequest struct to restore BasicService instance diff --git a/pkg/cloudbroker/bservice/snapshot_create.go b/pkg/cloudbroker/bservice/snapshot_create.go index 163d27bb..0aa9391c 100644 --- a/pkg/cloudbroker/bservice/snapshot_create.go +++ b/pkg/cloudbroker/bservice/snapshot_create.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // SnapshotCreateRequest struct to create snapshot diff --git a/pkg/cloudbroker/bservice/snapshot_delete.go b/pkg/cloudbroker/bservice/snapshot_delete.go index 9c561f26..2ea09398 100644 --- a/pkg/cloudbroker/bservice/snapshot_delete.go +++ b/pkg/cloudbroker/bservice/snapshot_delete.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // SnapshotDeleteRequest struct to delete snapshot diff --git a/pkg/cloudbroker/bservice/snapshot_list.go b/pkg/cloudbroker/bservice/snapshot_list.go index 20d12d79..66ebef44 100644 --- a/pkg/cloudbroker/bservice/snapshot_list.go +++ b/pkg/cloudbroker/bservice/snapshot_list.go @@ -5,7 +5,7 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // SnapshotListRequest struct to get list of existing snapshots diff --git a/pkg/cloudbroker/bservice/snapshot_rollback.go b/pkg/cloudbroker/bservice/snapshot_rollback.go index 176e289f..ea29d313 100644 --- a/pkg/cloudbroker/bservice/snapshot_rollback.go +++ b/pkg/cloudbroker/bservice/snapshot_rollback.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // SnapshotRollbackRequest struct to rollback snapshot diff --git a/pkg/cloudbroker/bservice/start.go b/pkg/cloudbroker/bservice/start.go index 454d5e44..fc866936 100644 --- a/pkg/cloudbroker/bservice/start.go +++ b/pkg/cloudbroker/bservice/start.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // StartRequest struct to start service diff --git a/pkg/cloudbroker/bservice/stop.go b/pkg/cloudbroker/bservice/stop.go index 8fa4dad2..68bd549a 100644 --- a/pkg/cloudbroker/bservice/stop.go +++ b/pkg/cloudbroker/bservice/stop.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // StopRequest struct to stop service diff --git a/pkg/cloudbroker/cloudbroker.go b/pkg/cloudbroker/cloudbroker.go index 3e3fd810..4e83dc52 100644 --- a/pkg/cloudbroker/cloudbroker.go +++ b/pkg/cloudbroker/cloudbroker.go @@ -1,7 +1,7 @@ // List of method groups for the admin package cloudbroker -import "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/interfaces" +import "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/interfaces" // Structure for creating request to CloudBroker groups type CloudBroker struct { diff --git a/pkg/cloudbroker/compute.go b/pkg/cloudbroker/compute.go index 76b46174..a8596b70 100644 --- a/pkg/cloudbroker/compute.go +++ b/pkg/cloudbroker/compute.go @@ -1,7 +1,7 @@ package cloudbroker import ( - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/pkg/cloudbroker/compute" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/pkg/cloudbroker/compute" ) // Accessing the Compute method group diff --git a/pkg/cloudbroker/compute/abort_shared_snapshot_merge.go b/pkg/cloudbroker/compute/abort_shared_snapshot_merge.go index ef881a9a..ed1a58ca 100644 --- a/pkg/cloudbroker/compute/abort_shared_snapshot_merge.go +++ b/pkg/cloudbroker/compute/abort_shared_snapshot_merge.go @@ -4,7 +4,7 @@ import ( "context" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // AbortSharedSnapshotMergeRequest struct to abort shared snapshots merge diff --git a/pkg/cloudbroker/compute/affinity_group_check_start.go b/pkg/cloudbroker/compute/affinity_group_check_start.go index b5de728c..cff6da62 100644 --- a/pkg/cloudbroker/compute/affinity_group_check_start.go +++ b/pkg/cloudbroker/compute/affinity_group_check_start.go @@ -4,7 +4,7 @@ import ( "context" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // AffinityGroupCheckStartRequest struct to check all computes with current affinity label can start diff --git a/pkg/cloudbroker/compute/affinity_label_remove.go b/pkg/cloudbroker/compute/affinity_label_remove.go index 517db4f2..424510e5 100644 --- a/pkg/cloudbroker/compute/affinity_label_remove.go +++ b/pkg/cloudbroker/compute/affinity_label_remove.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // AffinityLabelRemoveRequest struct for clear affinity label for compute diff --git a/pkg/cloudbroker/compute/affinity_label_set.go b/pkg/cloudbroker/compute/affinity_label_set.go index d7297d03..771bdc26 100644 --- a/pkg/cloudbroker/compute/affinity_label_set.go +++ b/pkg/cloudbroker/compute/affinity_label_set.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // AffinityLabelSetRequest struct to set affinity label for compute diff --git a/pkg/cloudbroker/compute/affinity_relations.go b/pkg/cloudbroker/compute/affinity_relations.go index 1355cc0a..57ff0ec7 100644 --- a/pkg/cloudbroker/compute/affinity_relations.go +++ b/pkg/cloudbroker/compute/affinity_relations.go @@ -5,7 +5,7 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // AffinityRelationsRequest struct to get dict of computes diff --git a/pkg/cloudbroker/compute/affinity_rule_add.go b/pkg/cloudbroker/compute/affinity_rule_add.go index d71d7bb5..d8affb19 100644 --- a/pkg/cloudbroker/compute/affinity_rule_add.go +++ b/pkg/cloudbroker/compute/affinity_rule_add.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // AffinityRuleAddRequest struct to add affinity rule diff --git a/pkg/cloudbroker/compute/affinity_rule_remove.go b/pkg/cloudbroker/compute/affinity_rule_remove.go index 5cca6b7c..a87f2364 100644 --- a/pkg/cloudbroker/compute/affinity_rule_remove.go +++ b/pkg/cloudbroker/compute/affinity_rule_remove.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // AffinityRuleRemoveRequest struct to remove affinity rule diff --git a/pkg/cloudbroker/compute/affinity_rules_clear.go b/pkg/cloudbroker/compute/affinity_rules_clear.go index 036fdfa5..083229f9 100644 --- a/pkg/cloudbroker/compute/affinity_rules_clear.go +++ b/pkg/cloudbroker/compute/affinity_rules_clear.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // AffinityRulesClearRequest struct to clear affinity rules diff --git a/pkg/cloudbroker/compute/anti_affinity_rule_add.go b/pkg/cloudbroker/compute/anti_affinity_rule_add.go index 4255a3e6..64aaf9a7 100644 --- a/pkg/cloudbroker/compute/anti_affinity_rule_add.go +++ b/pkg/cloudbroker/compute/anti_affinity_rule_add.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // AntiAffinityRuleAddRequest struct to add anti affinity rule diff --git a/pkg/cloudbroker/compute/anti_affinity_rule_clear.go b/pkg/cloudbroker/compute/anti_affinity_rule_clear.go index 89c2ccb8..812b3f8e 100644 --- a/pkg/cloudbroker/compute/anti_affinity_rule_clear.go +++ b/pkg/cloudbroker/compute/anti_affinity_rule_clear.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // AntiAffinityRulesClearRequest struct to clear anti affinity rules diff --git a/pkg/cloudbroker/compute/anti_affinity_rule_remove.go b/pkg/cloudbroker/compute/anti_affinity_rule_remove.go index 7d659a82..15e15329 100644 --- a/pkg/cloudbroker/compute/anti_affinity_rule_remove.go +++ b/pkg/cloudbroker/compute/anti_affinity_rule_remove.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // AntiAffinityRuleRemoveRequest struct to remove anti affinity rule diff --git a/pkg/cloudbroker/compute/attach_gpu.go b/pkg/cloudbroker/compute/attach_gpu.go index 9e2a2e76..4c91fede 100644 --- a/pkg/cloudbroker/compute/attach_gpu.go +++ b/pkg/cloudbroker/compute/attach_gpu.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // AttachGPURequest struct to attach GPU for compute diff --git a/pkg/cloudbroker/compute/attach_pci_device.go b/pkg/cloudbroker/compute/attach_pci_device.go index 76635fd3..287010d7 100644 --- a/pkg/cloudbroker/compute/attach_pci_device.go +++ b/pkg/cloudbroker/compute/attach_pci_device.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // AttachPCIDeviceRequest struct to attach PCI device diff --git a/pkg/cloudbroker/compute/audits.go b/pkg/cloudbroker/compute/audits.go deleted file mode 100644 index a3e8ed1d..00000000 --- a/pkg/cloudbroker/compute/audits.go +++ /dev/null @@ -1,76 +0,0 @@ -package compute - -import ( - "context" - "encoding/json" - "net/http" - - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" -) - -// AuditsRequest struct to get audit records -type AuditsRequest struct { - // ID of the compute - // Required: true - ComputeID uint64 `url:"compute_id" json:"compute_id" validate:"required"` - - // Find all audits after point in time - // Required: false - TimestampAT uint64 `url:"timestamp_at,omitempty" json:"timestamp_at,omitempty"` - - // Find all audits before point in time - // Required: false - TimestampTO uint64 `url:"timestamp_to,omitempty" json:"timestamp_to,omitempty"` - - // Find by user - // Required: false - User string `url:"user,omitempty" json:"user,omitempty"` - - // Find by api endpoints - // Required: false - Call string `url:"call,omitempty" json:"call,omitempty"` - - // Sort by one of supported fields, format ± - // Required: false - SortBy string `url:"sort_by,omitempty" json:"sort_by,omitempty"` - - // Page number - // Required: false - Page uint64 `url:"page,omitempty" json:"page,omitempty"` - - // Page size - // Required: false - Size uint64 `url:"size,omitempty" json:"size,omitempty"` - - // Find by HTTP min status code - // Required: false - MinStatusCode uint64 `url:"min_status_code,omitempty" json:"min_status_code,omitempty"` - - // Find by HTTP max status code - // Required: false - MaxStatusCode uint64 `url:"max_status_code,omitempty" json:"max_status_code,omitempty"` -} - -// Audits gets audit records for the specified compute object -func (c Compute) Audits(ctx context.Context, req AuditsRequest) (*ListDetailedAudits, error) { - err := validators.ValidateRequest(req) - if err != nil { - return nil, validators.ValidationErrors(validators.GetErrors(err)) - } - - url := "/cloudbroker/compute/audits" - - res, err := c.client.DecortApiCall(ctx, http.MethodGet, url, req) - if err != nil { - return nil, err - } - - list := ListDetailedAudits{} - - err = json.Unmarshal(res, &list) - if err != nil { - return nil, err - } - - return &list, nil -} diff --git a/pkg/cloudbroker/compute/boot_disk_set.go b/pkg/cloudbroker/compute/boot_disk_set.go index 47d1f4fa..8987dbd1 100644 --- a/pkg/cloudbroker/compute/boot_disk_set.go +++ b/pkg/cloudbroker/compute/boot_disk_set.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // BootDiskSetRequest struct to set boot disk for compute diff --git a/pkg/cloudbroker/compute/boot_order_get.go b/pkg/cloudbroker/compute/boot_order_get.go index ee9c1ddb..609990c8 100644 --- a/pkg/cloudbroker/compute/boot_order_get.go +++ b/pkg/cloudbroker/compute/boot_order_get.go @@ -5,7 +5,7 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // BootOrderGetRequest struct to get boot order diff --git a/pkg/cloudbroker/compute/boot_order_set.go b/pkg/cloudbroker/compute/boot_order_set.go index 3c49bf0e..6fa8d076 100644 --- a/pkg/cloudbroker/compute/boot_order_set.go +++ b/pkg/cloudbroker/compute/boot_order_set.go @@ -5,7 +5,7 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // BootOrderSetRequest struct to set boot order diff --git a/pkg/cloudbroker/compute/cd_eject.go b/pkg/cloudbroker/compute/cd_eject.go index 6454b203..dd0ed172 100644 --- a/pkg/cloudbroker/compute/cd_eject.go +++ b/pkg/cloudbroker/compute/cd_eject.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // CDEjectRequest struct to eject CD image diff --git a/pkg/cloudbroker/compute/cd_insert.go b/pkg/cloudbroker/compute/cd_insert.go index 0dfa9483..751b63d2 100644 --- a/pkg/cloudbroker/compute/cd_insert.go +++ b/pkg/cloudbroker/compute/cd_insert.go @@ -4,7 +4,7 @@ import ( "context" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // CDInsertRequest struct to insert new CD image diff --git a/pkg/cloudbroker/compute/change_ip.go b/pkg/cloudbroker/compute/change_ip.go index ca687fe7..c751fc05 100644 --- a/pkg/cloudbroker/compute/change_ip.go +++ b/pkg/cloudbroker/compute/change_ip.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // ChangeIPRequest struct to change IP for network diff --git a/pkg/cloudbroker/compute/change_link_state.go b/pkg/cloudbroker/compute/change_link_state.go index 43a14101..615995cc 100644 --- a/pkg/cloudbroker/compute/change_link_state.go +++ b/pkg/cloudbroker/compute/change_link_state.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // ChangeLinkStateRequest struct for changing link state diff --git a/pkg/cloudbroker/compute/change_mac.go b/pkg/cloudbroker/compute/change_mac.go index 2ce71bc9..4e3a357c 100644 --- a/pkg/cloudbroker/compute/change_mac.go +++ b/pkg/cloudbroker/compute/change_mac.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // ChangeMACRequest struct to change MAC for network diff --git a/pkg/cloudbroker/compute/change_mtu.go b/pkg/cloudbroker/compute/change_mtu.go index 07fc767a..945758d0 100644 --- a/pkg/cloudbroker/compute/change_mtu.go +++ b/pkg/cloudbroker/compute/change_mtu.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // ChangeMTURequest struct to change MTU for a compute diff --git a/pkg/cloudbroker/compute/change_qos_policies.go b/pkg/cloudbroker/compute/change_qos_policies.go new file mode 100644 index 00000000..1390143d --- /dev/null +++ b/pkg/cloudbroker/compute/change_qos_policies.go @@ -0,0 +1,84 @@ +package compute + +import ( + "context" + "net/http" + "strconv" + + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/constants" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" +) + +type ChangeQoSPoliciesRequest struct { + // Compute ID + // Required: true + ComputeID uint64 `url:"compute_id" json:"compute_id" validate:"required"` + + // Interface IP or MAC address + // Required: true + Interface string `url:"interface" json:"interface" validate:"required"` + + // List of QoS Policy IDs to assign to this interface + // Required: false + QoSPolicyIDs []uint64 `url:"qos_policy_ids,omitempty" json:"qos_policy_ids,omitempty"` +} + +type wrapperChangeQoSPoliciesRequest struct { + ChangeQoSPoliciesRequest + + AsyncMode bool `url:"asyncMode"` +} + +// ChangeQoSPolicies change qos policies for compute +func (c Compute) ChangeQoSPolicies(ctx context.Context, req ChangeQoSPoliciesRequest) (bool, error) { + err := validators.ValidateRequest(req) + if err != nil { + return false, validators.ValidationErrors(validators.GetErrors(err)) + } + + reqWrapped := wrapperChangeQoSPoliciesRequest{ + ChangeQoSPoliciesRequest: req, + AsyncMode: false, + } + + url := "/cloudbroker/compute/change_qos_policies" + + res, err := c.client.DecortApiCallCtype(ctx, http.MethodPost, url, constants.MIMEJSON, reqWrapped) + if err != nil { + return false, err + } + + result, err := strconv.ParseBool(string(res)) + if err != nil { + return false, err + } + + return result, nil +} + +// ChangeQoSPolicies change qos policies for compute with AsyncMode +func (c Compute) ChangeQoSPoliciesAsync(ctx context.Context, req ChangeQoSPoliciesRequest) (bool, error) { + err := validators.ValidateRequest(req) + if err != nil { + return false, validators.ValidationErrors(validators.GetErrors(err)) + } + + reqWrapped := wrapperChangeQoSPoliciesRequest{ + ChangeQoSPoliciesRequest: req, + AsyncMode: true, + } + + url := "/cloudbroker/compute/change_qos_policies" + + res, err := c.client.DecortApiCallCtype(ctx, http.MethodPost, url, constants.MIMEJSON, reqWrapped) + if err != nil { + return false, err + } + + result, err := strconv.ParseBool(string(res)) + if err != nil { + return false, err + } + + return result, nil +} diff --git a/pkg/cloudbroker/compute/change_read_only.go b/pkg/cloudbroker/compute/change_read_only.go index 262cdae5..51b3d5ea 100644 --- a/pkg/cloudbroker/compute/change_read_only.go +++ b/pkg/cloudbroker/compute/change_read_only.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // ChangeReadOnlyRequest defines parameters for toggling read-only mode. diff --git a/pkg/cloudbroker/compute/change_secutity_group.go b/pkg/cloudbroker/compute/change_secutity_group.go index 8fed54e4..9a83a2ee 100644 --- a/pkg/cloudbroker/compute/change_secutity_group.go +++ b/pkg/cloudbroker/compute/change_secutity_group.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // ChangeSecGroupsRequest struct to change security groups for compute diff --git a/pkg/cloudbroker/compute/check_compute_placement.go b/pkg/cloudbroker/compute/check_compute_placement.go index 98aecdbb..2fa978fa 100644 --- a/pkg/cloudbroker/compute/check_compute_placement.go +++ b/pkg/cloudbroker/compute/check_compute_placement.go @@ -5,7 +5,7 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // CheckComputePlacementRequest struct for check compute placement diff --git a/pkg/cloudbroker/compute/clone.go b/pkg/cloudbroker/compute/clone.go index eeb47ead..973f52cb 100644 --- a/pkg/cloudbroker/compute/clone.go +++ b/pkg/cloudbroker/compute/clone.go @@ -4,8 +4,8 @@ import ( "context" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/constants" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/constants" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // CloneRequest struct to clone compute instance diff --git a/pkg/cloudbroker/compute/clone_abort.go b/pkg/cloudbroker/compute/clone_abort.go index de7ef29d..1ea01872 100644 --- a/pkg/cloudbroker/compute/clone_abort.go +++ b/pkg/cloudbroker/compute/clone_abort.go @@ -5,8 +5,8 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/constants" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/constants" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // CloneAbortRequest struct to abort a compute clone diff --git a/pkg/cloudbroker/compute/clone_status.go b/pkg/cloudbroker/compute/clone_status.go index 6e139129..f5404701 100644 --- a/pkg/cloudbroker/compute/clone_status.go +++ b/pkg/cloudbroker/compute/clone_status.go @@ -5,7 +5,7 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // GetCloneStatusRequest struct to get information about compute clone status diff --git a/pkg/cloudbroker/compute/compute.go b/pkg/cloudbroker/compute/compute.go index 4e5a211a..58d6a91b 100644 --- a/pkg/cloudbroker/compute/compute.go +++ b/pkg/cloudbroker/compute/compute.go @@ -1,7 +1,7 @@ // API Actor for managing Compute. This actor is a final API for admin to manage Compute package compute -import "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/interfaces" +import "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/interfaces" // Structure for creating request to compute type Compute struct { diff --git a/pkg/cloudbroker/compute/computeci_set.go b/pkg/cloudbroker/compute/computeci_set.go deleted file mode 100644 index 74659226..00000000 --- a/pkg/cloudbroker/compute/computeci_set.go +++ /dev/null @@ -1,42 +0,0 @@ -package compute - -import ( - "context" - "net/http" - "strconv" - - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" -) - -// ComputeCISetRequest struct to set compute CI -type ComputeCISetRequest struct { - // ID of compute instance - // Required: true - ComputeID uint64 `url:"computeId" json:"computeId" validate:"required"` - - // ID of the Compute CI - // Required: true - ComputeCIID uint64 `url:"computeciId" json:"computeciId" validate:"required"` -} - -// ComputeCISet sets compute CI ID for compute -func (c Compute) ComputeCISet(ctx context.Context, req ComputeCISetRequest) (bool, error) { - err := validators.ValidateRequest(req) - if err != nil { - return false, validators.ValidationErrors(validators.GetErrors(err)) - } - - url := "/cloudbroker/compute/computeciSet" - - res, err := c.client.DecortApiCall(ctx, http.MethodPost, url, req) - if err != nil { - return false, err - } - - result, err := strconv.ParseBool(string(res)) - if err != nil { - return false, err - } - - return result, nil -} diff --git a/pkg/cloudbroker/compute/computeci_unset.go b/pkg/cloudbroker/compute/computeci_unset.go deleted file mode 100644 index 319f77a9..00000000 --- a/pkg/cloudbroker/compute/computeci_unset.go +++ /dev/null @@ -1,38 +0,0 @@ -package compute - -import ( - "context" - "net/http" - "strconv" - - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" -) - -// ComputeCIUnsetRequest struct to unset compute CI -type ComputeCIUnsetRequest struct { - // ID of compute instance - // Required: true - ComputeID uint64 `url:"computeId" json:"computeId" validate:"required"` -} - -// ComputeCIUnset unsets compute CI ID from compute -func (c Compute) ComputeCIUnset(ctx context.Context, req ComputeCIUnsetRequest) (bool, error) { - err := validators.ValidateRequest(req) - if err != nil { - return false, validators.ValidationErrors(validators.GetErrors(err)) - } - - url := "/cloudbroker/compute/computeciUnset" - - res, err := c.client.DecortApiCall(ctx, http.MethodPost, url, req) - if err != nil { - return false, err - } - - result, err := strconv.ParseBool(string(res)) - if err != nil { - return false, err - } - - return result, nil -} diff --git a/pkg/cloudbroker/compute/create_template.go b/pkg/cloudbroker/compute/create_template.go index 97491812..8fc6100f 100644 --- a/pkg/cloudbroker/compute/create_template.go +++ b/pkg/cloudbroker/compute/create_template.go @@ -5,7 +5,7 @@ import ( "net/http" "strings" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // CreateTemplateRequest struct to create template diff --git a/pkg/cloudbroker/compute/create_template_from_blank.go b/pkg/cloudbroker/compute/create_template_from_blank.go index 1c40cbe6..d9a0bcd5 100644 --- a/pkg/cloudbroker/compute/create_template_from_blank.go +++ b/pkg/cloudbroker/compute/create_template_from_blank.go @@ -6,7 +6,7 @@ import ( "strconv" "strings" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // CreateTemplateFromBlankRequest struct to create template from boot disk of current compute diff --git a/pkg/cloudbroker/compute/delete.go b/pkg/cloudbroker/compute/delete.go index 01afb29d..10bd0f79 100644 --- a/pkg/cloudbroker/compute/delete.go +++ b/pkg/cloudbroker/compute/delete.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // DeleteRequest struct to delete compute diff --git a/pkg/cloudbroker/compute/delete_cpu_alignment_profile.go b/pkg/cloudbroker/compute/delete_cpu_alignment_profile.go index 83c94b73..ea001f43 100644 --- a/pkg/cloudbroker/compute/delete_cpu_alignment_profile.go +++ b/pkg/cloudbroker/compute/delete_cpu_alignment_profile.go @@ -5,8 +5,8 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/constants" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/constants" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // DeleteCPUAlignmentProfileRequest struct to delete CPU alignment profile for computes diff --git a/pkg/cloudbroker/compute/delete_custom_fields.go b/pkg/cloudbroker/compute/delete_custom_fields.go index 2dae444a..edacc6ac 100644 --- a/pkg/cloudbroker/compute/delete_custom_fields.go +++ b/pkg/cloudbroker/compute/delete_custom_fields.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // DeleteCustomFieldsRequest struct to delete compute's custom fields diff --git a/pkg/cloudbroker/compute/detach_gpu.go b/pkg/cloudbroker/compute/detach_gpu.go index 4a3ef44a..35fa4948 100644 --- a/pkg/cloudbroker/compute/detach_gpu.go +++ b/pkg/cloudbroker/compute/detach_gpu.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // DetachGPURequest struct to detach VGPU for compute diff --git a/pkg/cloudbroker/compute/detach_pci_device.go b/pkg/cloudbroker/compute/detach_pci_device.go index b3aa9ad7..29c0e66d 100644 --- a/pkg/cloudbroker/compute/detach_pci_device.go +++ b/pkg/cloudbroker/compute/detach_pci_device.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // DetachPCIDeviceRequest struct to detach PCI device diff --git a/pkg/cloudbroker/compute/disable.go b/pkg/cloudbroker/compute/disable.go index afd62fa6..e34c9aac 100644 --- a/pkg/cloudbroker/compute/disable.go +++ b/pkg/cloudbroker/compute/disable.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // DisableRequest struct to disable compute diff --git a/pkg/cloudbroker/compute/disk_add.go b/pkg/cloudbroker/compute/disk_add.go index 58c54813..974b2794 100644 --- a/pkg/cloudbroker/compute/disk_add.go +++ b/pkg/cloudbroker/compute/disk_add.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // DiskAddRequest struct to create and attach disk to compute diff --git a/pkg/cloudbroker/compute/disk_attach.go b/pkg/cloudbroker/compute/disk_attach.go index f32dac78..922bde78 100644 --- a/pkg/cloudbroker/compute/disk_attach.go +++ b/pkg/cloudbroker/compute/disk_attach.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // DiskAttachRequest struct to attach disk to compute diff --git a/pkg/cloudbroker/compute/disk_del.go b/pkg/cloudbroker/compute/disk_del.go index b4717cba..357994ed 100644 --- a/pkg/cloudbroker/compute/disk_del.go +++ b/pkg/cloudbroker/compute/disk_del.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // DiskDelRequest struct to detach and delete disk from compute diff --git a/pkg/cloudbroker/compute/disk_detach.go b/pkg/cloudbroker/compute/disk_detach.go index 238354e6..c3d77081 100644 --- a/pkg/cloudbroker/compute/disk_detach.go +++ b/pkg/cloudbroker/compute/disk_detach.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // DiskDetachRequest struct to detach disk from compute diff --git a/pkg/cloudbroker/compute/disk_migrate.go b/pkg/cloudbroker/compute/disk_migrate.go index 5700bce1..78a27584 100644 --- a/pkg/cloudbroker/compute/disk_migrate.go +++ b/pkg/cloudbroker/compute/disk_migrate.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // DiskMigrateRequest struct to migrate compute's disk to target disk diff --git a/pkg/cloudbroker/compute/disk_qos.go b/pkg/cloudbroker/compute/disk_qos.go index 346688eb..29d619a8 100644 --- a/pkg/cloudbroker/compute/disk_qos.go +++ b/pkg/cloudbroker/compute/disk_qos.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // DiskQOSRequest struct to change QOS of the disk diff --git a/pkg/cloudbroker/compute/disk_resize.go b/pkg/cloudbroker/compute/disk_resize.go index 6315d29f..6069ec44 100644 --- a/pkg/cloudbroker/compute/disk_resize.go +++ b/pkg/cloudbroker/compute/disk_resize.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // DiskResizeRequest struct to change disk size diff --git a/pkg/cloudbroker/compute/disk_switch_to_replication.go b/pkg/cloudbroker/compute/disk_switch_to_replication.go index 5c9a7949..af4629d9 100644 --- a/pkg/cloudbroker/compute/disk_switch_to_replication.go +++ b/pkg/cloudbroker/compute/disk_switch_to_replication.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // DiskSwitchToReplicationRequest struct to switch disk to it's replication diff --git a/pkg/cloudbroker/compute/enable.go b/pkg/cloudbroker/compute/enable.go index b581308e..24f33be0 100644 --- a/pkg/cloudbroker/compute/enable.go +++ b/pkg/cloudbroker/compute/enable.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // EnableRequest struct to enable compute diff --git a/pkg/cloudbroker/compute/filter.go b/pkg/cloudbroker/compute/filter.go index 440dc081..0219cff3 100644 --- a/pkg/cloudbroker/compute/filter.go +++ b/pkg/cloudbroker/compute/filter.go @@ -3,9 +3,9 @@ package compute import ( "context" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/interfaces" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/pkg/cloudbroker/k8s" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/pkg/cloudbroker/lb" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/interfaces" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/pkg/cloudbroker/k8s" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/pkg/cloudbroker/lb" ) // FilterByID returns ListComputes with specified ID. diff --git a/pkg/cloudbroker/compute/get.go b/pkg/cloudbroker/compute/get.go index c003a53a..598a1570 100644 --- a/pkg/cloudbroker/compute/get.go +++ b/pkg/cloudbroker/compute/get.go @@ -5,7 +5,7 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // GetRequest to get information about compute diff --git a/pkg/cloudbroker/compute/get_audits.go b/pkg/cloudbroker/compute/get_audits.go deleted file mode 100644 index dd8024e0..00000000 --- a/pkg/cloudbroker/compute/get_audits.go +++ /dev/null @@ -1,40 +0,0 @@ -package compute - -import ( - "context" - "encoding/json" - "net/http" - - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" -) - -// GetAuditsRequest struct to get compute audits -type GetAuditsRequest struct { - // ID of compute instance - // Required: true - ComputeID uint64 `url:"computeId" json:"computeId" validate:"required"` -} - -// GetAudits gets compute audits -func (c Compute) GetAudits(ctx context.Context, req GetAuditsRequest) (ListAudits, error) { - err := validators.ValidateRequest(req) - if err != nil { - return nil, validators.ValidationErrors(validators.GetErrors(err)) - } - - url := "/cloudbroker/compute/getAudits" - - res, err := c.client.DecortApiCall(ctx, http.MethodPost, url, req) - if err != nil { - return nil, err - } - - list := ListAudits{} - - err = json.Unmarshal(res, &list) - if err != nil { - return nil, err - } - - return list, nil -} diff --git a/pkg/cloudbroker/compute/get_console_url.go b/pkg/cloudbroker/compute/get_console_url.go index 1db27e23..6978263a 100644 --- a/pkg/cloudbroker/compute/get_console_url.go +++ b/pkg/cloudbroker/compute/get_console_url.go @@ -5,7 +5,7 @@ import ( "net/http" "strings" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // GetConsoleURLRequest struct to get console URL diff --git a/pkg/cloudbroker/compute/get_cpu_alignment_profile.go b/pkg/cloudbroker/compute/get_cpu_alignment_profile.go index 538b3275..75b0803c 100644 --- a/pkg/cloudbroker/compute/get_cpu_alignment_profile.go +++ b/pkg/cloudbroker/compute/get_cpu_alignment_profile.go @@ -5,7 +5,7 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // GetCPUAlignmentProfileRequest struct to get CPU alignment profile for compute diff --git a/pkg/cloudbroker/compute/get_custom_fields.go b/pkg/cloudbroker/compute/get_custom_fields.go index 30574d76..41d589ef 100644 --- a/pkg/cloudbroker/compute/get_custom_fields.go +++ b/pkg/cloudbroker/compute/get_custom_fields.go @@ -5,7 +5,7 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // GetCustomFieldsRequest struct to get Compute's customFields diff --git a/pkg/cloudbroker/compute/get_log.go b/pkg/cloudbroker/compute/get_log.go deleted file mode 100644 index d7a2093a..00000000 --- a/pkg/cloudbroker/compute/get_log.go +++ /dev/null @@ -1,36 +0,0 @@ -package compute - -import ( - "context" - "net/http" - - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" -) - -// GetLogRequest struct to get compute logs -type GetLogRequest struct { - // ID of compute instance to get log for - // Required: true - ComputeID uint64 `url:"computeId" json:"computeId" validate:"required"` - - // Path to log file - // Required: true - Path string `url:"path" json:"path" validate:"required"` -} - -// GetLog gets compute's log file by path -func (c Compute) GetLog(ctx context.Context, req GetLogRequest) (string, error) { - err := validators.ValidateRequest(req) - if err != nil { - return "", validators.ValidationErrors(validators.GetErrors(err)) - } - - url := "/cloudbroker/compute/getLog" - - res, err := c.client.DecortApiCall(ctx, http.MethodGet, url, req) - if err != nil { - return "", err - } - - return string(res), nil -} diff --git a/pkg/cloudbroker/compute/guest_agent_disable.go b/pkg/cloudbroker/compute/guest_agent_disable.go index 3c04f7f5..2f629b30 100644 --- a/pkg/cloudbroker/compute/guest_agent_disable.go +++ b/pkg/cloudbroker/compute/guest_agent_disable.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // GuestAgentDisableRequest struct to disable guest agent diff --git a/pkg/cloudbroker/compute/guest_agent_enable.go b/pkg/cloudbroker/compute/guest_agent_enable.go index 7ed7e544..9b77d654 100644 --- a/pkg/cloudbroker/compute/guest_agent_enable.go +++ b/pkg/cloudbroker/compute/guest_agent_enable.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // GuestAgentEnableRequest struct to enable guest agent diff --git a/pkg/cloudbroker/compute/guest_agent_execute.go b/pkg/cloudbroker/compute/guest_agent_execute.go index 8bf28063..3d613771 100644 --- a/pkg/cloudbroker/compute/guest_agent_execute.go +++ b/pkg/cloudbroker/compute/guest_agent_execute.go @@ -5,7 +5,7 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // GuestAgentExecuteRequest struct to execute command from user to agent diff --git a/pkg/cloudbroker/compute/guest_agent_feature_get.go b/pkg/cloudbroker/compute/guest_agent_feature_get.go index 9b89281e..63b1471a 100644 --- a/pkg/cloudbroker/compute/guest_agent_feature_get.go +++ b/pkg/cloudbroker/compute/guest_agent_feature_get.go @@ -5,7 +5,7 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // GuestAgentFeatureGetRequest struct to feature get guest agent diff --git a/pkg/cloudbroker/compute/guest_agent_feature_update.go b/pkg/cloudbroker/compute/guest_agent_feature_update.go index 670bc43c..f6e0af73 100644 --- a/pkg/cloudbroker/compute/guest_agent_feature_update.go +++ b/pkg/cloudbroker/compute/guest_agent_feature_update.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // GuestAgentFeatureUpdateRequest struct to feature update guest agent diff --git a/pkg/cloudbroker/compute/list.go b/pkg/cloudbroker/compute/list.go index b270cd34..ee8c173e 100644 --- a/pkg/cloudbroker/compute/list.go +++ b/pkg/cloudbroker/compute/list.go @@ -5,7 +5,7 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // ListRequest struct to get list of available computes diff --git a/pkg/cloudbroker/compute/list_deleted.go b/pkg/cloudbroker/compute/list_deleted.go index 638ac97f..0a96e5c5 100644 --- a/pkg/cloudbroker/compute/list_deleted.go +++ b/pkg/cloudbroker/compute/list_deleted.go @@ -5,7 +5,7 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // ListDeletedRequest struct to get deleted computes list diff --git a/pkg/cloudbroker/compute/list_pci_device.go b/pkg/cloudbroker/compute/list_pci_device.go index 31a5f2be..07160e7e 100644 --- a/pkg/cloudbroker/compute/list_pci_device.go +++ b/pkg/cloudbroker/compute/list_pci_device.go @@ -5,7 +5,7 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // ListPCIDeviceRequest struct to get list of PCI devices @@ -14,10 +14,6 @@ type ListPCIDeviceRequest struct { // Required: true ComputeID uint64 `url:"computeId" json:"computeId" validate:"required"` - // Find by resource group ID - // Required: false - RGID uint64 `url:"rgId,omitempty" json:"rgId,omitempty"` - // Find by device id // Required: false DevID uint64 `url:"devId,omitempty" json:"devId,omitempty"` diff --git a/pkg/cloudbroker/compute/list_vgpu.go b/pkg/cloudbroker/compute/list_vgpu.go index 9095a7bd..843e4e9f 100644 --- a/pkg/cloudbroker/compute/list_vgpu.go +++ b/pkg/cloudbroker/compute/list_vgpu.go @@ -5,7 +5,7 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // ListVGPURequest struct to get list of GPU for compute diff --git a/pkg/cloudbroker/compute/mass_delete.go b/pkg/cloudbroker/compute/mass_delete.go index 3ea1ff41..4b3dccaf 100644 --- a/pkg/cloudbroker/compute/mass_delete.go +++ b/pkg/cloudbroker/compute/mass_delete.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // MassDeleteRequest struct to delete several computes diff --git a/pkg/cloudbroker/compute/mass_reboot.go b/pkg/cloudbroker/compute/mass_reboot.go index dcbfa958..cafeffeb 100644 --- a/pkg/cloudbroker/compute/mass_reboot.go +++ b/pkg/cloudbroker/compute/mass_reboot.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // MassRebootRequest struct to reboot several computes diff --git a/pkg/cloudbroker/compute/mass_start.go b/pkg/cloudbroker/compute/mass_start.go index ea5bbba0..e91a5d03 100644 --- a/pkg/cloudbroker/compute/mass_start.go +++ b/pkg/cloudbroker/compute/mass_start.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // MassStartRequest struct to start several computes diff --git a/pkg/cloudbroker/compute/mass_stop.go b/pkg/cloudbroker/compute/mass_stop.go index 6ca40daf..1677a671 100644 --- a/pkg/cloudbroker/compute/mass_stop.go +++ b/pkg/cloudbroker/compute/mass_stop.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // MassStopRequest struct to stop several computes diff --git a/pkg/cloudbroker/compute/migrate.go b/pkg/cloudbroker/compute/migrate.go index 8b6477be..6032eadb 100644 --- a/pkg/cloudbroker/compute/migrate.go +++ b/pkg/cloudbroker/compute/migrate.go @@ -6,7 +6,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // MigrateRequest struct to migrate compute diff --git a/pkg/cloudbroker/compute/migrate_abort.go b/pkg/cloudbroker/compute/migrate_abort.go index c1e527e1..1a705802 100644 --- a/pkg/cloudbroker/compute/migrate_abort.go +++ b/pkg/cloudbroker/compute/migrate_abort.go @@ -5,7 +5,7 @@ import ( "net/http" "strings" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // MigrateAbortRequest struct to abort migration diff --git a/pkg/cloudbroker/compute/migrate_storage.go b/pkg/cloudbroker/compute/migrate_storage.go index cc0a92df..275e7354 100644 --- a/pkg/cloudbroker/compute/migrate_storage.go +++ b/pkg/cloudbroker/compute/migrate_storage.go @@ -5,7 +5,7 @@ import ( "net/http" "strings" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // MigrateStorageRequest struct for migration diff --git a/pkg/cloudbroker/compute/migrate_storage_abort.go b/pkg/cloudbroker/compute/migrate_storage_abort.go index d99f73aa..de435393 100644 --- a/pkg/cloudbroker/compute/migrate_storage_abort.go +++ b/pkg/cloudbroker/compute/migrate_storage_abort.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // MigrateStorageAbortRequest struct to abort migration diff --git a/pkg/cloudbroker/compute/migrate_storage_clean_up.go b/pkg/cloudbroker/compute/migrate_storage_clean_up.go index 6b275658..124c5131 100644 --- a/pkg/cloudbroker/compute/migrate_storage_clean_up.go +++ b/pkg/cloudbroker/compute/migrate_storage_clean_up.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // MigrateStorageCleanUpRequest struct to cleanup resources after finished migration diff --git a/pkg/cloudbroker/compute/migrate_storage_info.go b/pkg/cloudbroker/compute/migrate_storage_info.go index 31933535..7d0f7559 100644 --- a/pkg/cloudbroker/compute/migrate_storage_info.go +++ b/pkg/cloudbroker/compute/migrate_storage_info.go @@ -5,7 +5,7 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // MigrateStorageInfoRequest struct to get info about migration diff --git a/pkg/cloudbroker/compute/migrate_storage_list.go b/pkg/cloudbroker/compute/migrate_storage_list.go index f993bec9..7651a0b5 100644 --- a/pkg/cloudbroker/compute/migrate_storage_list.go +++ b/pkg/cloudbroker/compute/migrate_storage_list.go @@ -5,7 +5,7 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // MigrateStorageListRequest struct to get list of jobs diff --git a/pkg/cloudbroker/compute/migrate_to_zone.go b/pkg/cloudbroker/compute/migrate_to_zone.go index 2c899c86..9bb83e0e 100644 --- a/pkg/cloudbroker/compute/migrate_to_zone.go +++ b/pkg/cloudbroker/compute/migrate_to_zone.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // MigrateToZone struct to move compute to another zone diff --git a/pkg/cloudbroker/compute/models.go b/pkg/cloudbroker/compute/models.go index ee06ece9..d4c04099 100644 --- a/pkg/cloudbroker/compute/models.go +++ b/pkg/cloudbroker/compute/models.go @@ -651,6 +651,9 @@ type ItemInterface struct { // QOS QOS QOS `json:"qos"` + // List of QoS Policy IDs + QoSPolicies []uint64 `json:"qos_policies"` + // List of security groups SecGroups []uint64 `json:"security_groups"` @@ -924,6 +927,9 @@ type InfoCompute struct { // VINS connected VINSConnected uint64 `json:"vinsConnected"` + // Watchdog action + WatchdogAction string `json:"watchdog_action"` + // Weight Weight uint64 `json:"weight"` @@ -1224,11 +1230,14 @@ type RecordCompute struct { Userdata interface{} `json:"userdata"` // List VGPU - VGPUs []VGPUItem `json:"vgpus"` + VGPUs []ItemVGPU `json:"vgpus"` // VNC password VNCPassword string `json:"vncPasswd"` + // Watchdog action + WatchdogAction string `json:"watchdog_action"` + // Weight Weight uint64 `json:"weight"` @@ -1491,7 +1500,7 @@ type SnapRecordCompute struct { Userdata interface{} `json:"userdata"` // List VGPU - VGPUs []VGPUItem `json:"vgpus"` + VGPUs []ItemVGPU `json:"vgpus"` // VNC password VNCPassword string `json:"vncPasswd"` @@ -1511,65 +1520,6 @@ type LoaderMetaIso struct { Path string `json:"path"` } -type VGPUItem struct { - // ID - ID uint64 `json:"id"` - - // GID - GID uint64 `json:"gid"` - - // Type - Type string `json:"type"` - - // Mode - Mode string `json:"mode"` - - // Status - Status string `json:"status"` - - // ProfileID - ProfileID uint64 `json:"profileId"` - - // RAM - RAM uint64 `json:"ram"` - - // LastUpdateTime - LastUpdateTime uint64 `json:"lastUpdateTime"` - - // CreatedTime - CreatedTime uint64 `json:"createdTime"` - - // DeletedTime - DeletedTime uint64 `json:"deletedTime"` - - // VMID - VMID uint64 `json:"vmid"` - - // PGPuid - PGPuid uint64 `json:"pgpuid"` - - // ReferenceID - ReferenceID string `json:"referenceId"` - - // AccountID - AccountID uint64 `json:"accountId"` - - // RgID - RgID uint64 `json:"rgId"` - - // LastClaimedBy - LastClaimedBy uint64 `json:"lastClaimedBy"` - - // PCISlot - PCISlot uint64 `json:"pciSlot"` - - // BusNumber - BusNumber uint64 `json:"bus_number"` - - // GUID - GUID uint64 `json:"guid"` -} - // Information about of disk IDs type ListInfoDisks []InfoDisk @@ -1614,6 +1564,9 @@ type InfoDisk struct { // SEP ID SepID int64 `json:"sepId"` + // Image ID + ImageID uint64 `json:"imageId"` + // Read-only ReadOnly bool `json:"read_only"` } @@ -1674,8 +1627,8 @@ type ItemPCIDevice struct { // Name Name string `json:"name"` - // Resource group ID - RGID uint64 `json:"rgId"` + // Account IDs + AccountIDs []uint64 `json:"account_ids"` // Node ID NodeID uint64 `json:"nodeId"` @@ -1707,59 +1660,56 @@ type ListVGPUs struct { // Main information about vgpu device type ItemVGPU struct { - // Account ID - AccountID uint64 `json:"accountId"` + // Account IDs + AccountIDs []uint64 `json:"account_ids"` - // Created Time - CreatedTime uint64 `json:"createdTime"` + // Bus number + BusNumber int `json:"bus_number"` - // Deleted Time - DeletedTime uint64 `json:"deletedTime"` + // ComputeID + ComputeID uint64 `json:"compute_id"` - // GID + // Created time + CreatedTime uint64 `json:"created_time"` + + // Deleted time + DeletedTime uint64 `json:"deleted_time"` + + // Device Reference + DeviceReference string `json:"device_reference"` + + //Grid ID GID uint64 `json:"gid"` // GUID GUID uint64 `json:"guid"` - // ID + // VGPU ID ID uint64 `json:"id"` - // Last Claimed By - LastClaimedBy uint64 `json:"lastClaimedBy"` + // Last Update time + LastUpdateTime uint64 `json:"last_update_time"` - // Last Update Time - LastUpdateTime uint64 `json:"lastUpdateTime"` + // Mdev UUID + MdevUUID string `json:"mdev_uuid"` - // Mode - Mode string `json:"mode"` + // Parent PCI Address + ParentPCIAddress string `json:"parent_pci_address"` // PCI Slot - PCISlot uint64 `json:"pciSlot"` + PCISlot uint64 `json:"pci_slot"` - // PGPUID - PGPUID uint64 `json:"pgpuid"` + // PGPU ID + PGPUID uint64 `json:"pgpu_id"` - // Profile ID - ProfileID uint64 `json:"profileId"` + // Profile Reference + ProfileReference string `json:"profile_reference"` - // RAM - RAM uint64 `json:"ram"` - - // Reference ID - ReferenceID string `json:"referenceId"` - - // RG ID - RGID uint64 `json:"rgId"` + // Split Mode + SplitMode string `json:"split_mode"` // Status Status string `json:"status"` - - // Type - Type string `json:"type"` - - // VM ID - VMID uint64 `json:"vmid"` } type ListMigrateStorage struct { diff --git a/pkg/cloudbroker/compute/move_to_rg.go b/pkg/cloudbroker/compute/move_to_rg.go index ab618b32..dab6bd15 100644 --- a/pkg/cloudbroker/compute/move_to_rg.go +++ b/pkg/cloudbroker/compute/move_to_rg.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // MoveToRGRequest struct to move compute to new resource group diff --git a/pkg/cloudbroker/compute/net_attach.go b/pkg/cloudbroker/compute/net_attach.go index 6dd4375c..b1b87fce 100644 --- a/pkg/cloudbroker/compute/net_attach.go +++ b/pkg/cloudbroker/compute/net_attach.go @@ -5,7 +5,7 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // NetAttachRequest struct to attach network @@ -86,6 +86,10 @@ type NetAttachRequest struct { // Required: false // Default: true EnableDefaultGateway interface{} `url:"enable_default_gateway,omitempty" json:"enable_default_gateway,omitempty" validate:"omitempty,isBool"` + + // List of QoS Policy IDs to apply to this interface (default: []), Allow used only with netType VINS, EXTNET and DPDK + // Required: false + QoSPolicies []uint64 `url:"qos_policies,omitempty" json:"qos_policies,omitempty"` } type wrapperNetAttachRequest struct { diff --git a/pkg/cloudbroker/compute/net_detach.go b/pkg/cloudbroker/compute/net_detach.go index d06acec9..489af2bf 100644 --- a/pkg/cloudbroker/compute/net_detach.go +++ b/pkg/cloudbroker/compute/net_detach.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // NetDetachRequest struct to detach network from compute diff --git a/pkg/cloudbroker/compute/net_qos.go b/pkg/cloudbroker/compute/net_qos.go index 854ac5dc..e4cab7be 100644 --- a/pkg/cloudbroker/compute/net_qos.go +++ b/pkg/cloudbroker/compute/net_qos.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // NetQOSRequest struct for update QOS diff --git a/pkg/cloudbroker/compute/pause.go b/pkg/cloudbroker/compute/pause.go index 71d594b5..c5fadafd 100644 --- a/pkg/cloudbroker/compute/pause.go +++ b/pkg/cloudbroker/compute/pause.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // PauseRequest struct to pause compute diff --git a/pkg/cloudbroker/compute/pfw_add.go b/pkg/cloudbroker/compute/pfw_add.go index 0939e9bc..c71c1313 100644 --- a/pkg/cloudbroker/compute/pfw_add.go +++ b/pkg/cloudbroker/compute/pfw_add.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // PFWAddRequest struct to add port forward rule diff --git a/pkg/cloudbroker/compute/pfw_del.go b/pkg/cloudbroker/compute/pfw_del.go index 8578f77e..bc82b094 100644 --- a/pkg/cloudbroker/compute/pfw_del.go +++ b/pkg/cloudbroker/compute/pfw_del.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // PFWDelRequest struct to delete port forward rule diff --git a/pkg/cloudbroker/compute/pfw_list.go b/pkg/cloudbroker/compute/pfw_list.go index 997d5a7a..dfdd98f7 100644 --- a/pkg/cloudbroker/compute/pfw_list.go +++ b/pkg/cloudbroker/compute/pfw_list.go @@ -5,7 +5,7 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // PFWListRequest struct to get list of port forwards diff --git a/pkg/cloudbroker/compute/pin_to_node.go b/pkg/cloudbroker/compute/pin_to_node.go index 2afc6c28..b598b798 100644 --- a/pkg/cloudbroker/compute/pin_to_node.go +++ b/pkg/cloudbroker/compute/pin_to_node.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // PinToNodeRequest struct to pin compute to node diff --git a/pkg/cloudbroker/compute/power_cycle.go b/pkg/cloudbroker/compute/power_cycle.go index 3d1a105b..8ec4501f 100644 --- a/pkg/cloudbroker/compute/power_cycle.go +++ b/pkg/cloudbroker/compute/power_cycle.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // PowerCycleRequest struct to force stop and start compute diff --git a/pkg/cloudbroker/compute/reboot.go b/pkg/cloudbroker/compute/reboot.go index a06ca0b3..3d3042e3 100644 --- a/pkg/cloudbroker/compute/reboot.go +++ b/pkg/cloudbroker/compute/reboot.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // RebootRequest struct to reboot compute diff --git a/pkg/cloudbroker/compute/redeploy.go b/pkg/cloudbroker/compute/redeploy.go index 3953eac8..ee352367 100644 --- a/pkg/cloudbroker/compute/redeploy.go +++ b/pkg/cloudbroker/compute/redeploy.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // RedeployRequest struct for redeploy diff --git a/pkg/cloudbroker/compute/reset.go b/pkg/cloudbroker/compute/reset.go index 305916f0..b5170e34 100644 --- a/pkg/cloudbroker/compute/reset.go +++ b/pkg/cloudbroker/compute/reset.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // ResetRequest struct to reset compute diff --git a/pkg/cloudbroker/compute/resize.go b/pkg/cloudbroker/compute/resize.go index 1a5fa473..3a7056fe 100644 --- a/pkg/cloudbroker/compute/resize.go +++ b/pkg/cloudbroker/compute/resize.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // ResizeRequest struct to resize compute diff --git a/pkg/cloudbroker/compute/restore.go b/pkg/cloudbroker/compute/restore.go index 461eaca5..9fff5f2f 100644 --- a/pkg/cloudbroker/compute/restore.go +++ b/pkg/cloudbroker/compute/restore.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // RestoreRequest struct to restore compute diff --git a/pkg/cloudbroker/compute/resume.go b/pkg/cloudbroker/compute/resume.go index 194994c0..58035f0b 100644 --- a/pkg/cloudbroker/compute/resume.go +++ b/pkg/cloudbroker/compute/resume.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // ResumeRequest struct to resume compute diff --git a/pkg/cloudbroker/compute/serialize.go b/pkg/cloudbroker/compute/serialize.go index 2eb4c22c..fc85211f 100644 --- a/pkg/cloudbroker/compute/serialize.go +++ b/pkg/cloudbroker/compute/serialize.go @@ -3,7 +3,7 @@ package compute import ( "encoding/json" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/serialization" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/serialization" ) // Serialize returns JSON-serialized []byte. Used as a wrapper over json.Marshal and json.MarshalIndent functions. diff --git a/pkg/cloudbroker/compute/set_cpu_alignment_profile.go b/pkg/cloudbroker/compute/set_cpu_alignment_profile.go index 36b0545b..473e8104 100644 --- a/pkg/cloudbroker/compute/set_cpu_alignment_profile.go +++ b/pkg/cloudbroker/compute/set_cpu_alignment_profile.go @@ -5,8 +5,8 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/constants" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/constants" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // SetCPUAlignmentProfileRequest struct to set CPU alignment profile for computes diff --git a/pkg/cloudbroker/compute/set_custom_fields.go b/pkg/cloudbroker/compute/set_custom_fields.go index f9307441..f7e85937 100644 --- a/pkg/cloudbroker/compute/set_custom_fields.go +++ b/pkg/cloudbroker/compute/set_custom_fields.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // SetCustomFieldsRequest struct for setting customFields values for the Compute diff --git a/pkg/cloudbroker/compute/set_net_config.go b/pkg/cloudbroker/compute/set_net_config.go index f4e542aa..71b2f023 100644 --- a/pkg/cloudbroker/compute/set_net_config.go +++ b/pkg/cloudbroker/compute/set_net_config.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // SetNetConfigRequest struct to Configure libvirt virtio interface parameters diff --git a/pkg/cloudbroker/compute/shared_snapshot_merge_status.go b/pkg/cloudbroker/compute/shared_snapshot_merge_status.go index 31d443b3..20319871 100644 --- a/pkg/cloudbroker/compute/shared_snapshot_merge_status.go +++ b/pkg/cloudbroker/compute/shared_snapshot_merge_status.go @@ -4,7 +4,7 @@ import ( "context" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // SharedSnapshotMergeStatusRequest struct to get shared snapshot merge status diff --git a/pkg/cloudbroker/compute/snapshot_create.go b/pkg/cloudbroker/compute/snapshot_create.go index ff00895c..aef82950 100644 --- a/pkg/cloudbroker/compute/snapshot_create.go +++ b/pkg/cloudbroker/compute/snapshot_create.go @@ -5,7 +5,7 @@ import ( "net/http" "strings" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // SnapshotCreateRequest struct to create snapshot diff --git a/pkg/cloudbroker/compute/snapshot_delete.go b/pkg/cloudbroker/compute/snapshot_delete.go index 4a394027..beea9754 100644 --- a/pkg/cloudbroker/compute/snapshot_delete.go +++ b/pkg/cloudbroker/compute/snapshot_delete.go @@ -4,7 +4,7 @@ import ( "context" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // SnapshotDeleteRequest struct to delete snapshot diff --git a/pkg/cloudbroker/compute/snapshot_evict_disk.go b/pkg/cloudbroker/compute/snapshot_evict_disk.go index ebb41558..000066d0 100644 --- a/pkg/cloudbroker/compute/snapshot_evict_disk.go +++ b/pkg/cloudbroker/compute/snapshot_evict_disk.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // SnapshotEvictDiskRequest struct to evict specified disk diff --git a/pkg/cloudbroker/compute/snapshot_list.go b/pkg/cloudbroker/compute/snapshot_list.go index 10d030ea..76bf7e8d 100644 --- a/pkg/cloudbroker/compute/snapshot_list.go +++ b/pkg/cloudbroker/compute/snapshot_list.go @@ -5,7 +5,7 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // SnapshotListRequest struct to get list of snapshots diff --git a/pkg/cloudbroker/compute/snapshot_rollback.go b/pkg/cloudbroker/compute/snapshot_rollback.go index cea878c2..3a02e1e3 100644 --- a/pkg/cloudbroker/compute/snapshot_rollback.go +++ b/pkg/cloudbroker/compute/snapshot_rollback.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // SnapshotRollbackRequest struct for rollback diff --git a/pkg/cloudbroker/compute/snapshot_usage.go b/pkg/cloudbroker/compute/snapshot_usage.go index 6a735ba3..b9bef0d5 100644 --- a/pkg/cloudbroker/compute/snapshot_usage.go +++ b/pkg/cloudbroker/compute/snapshot_usage.go @@ -5,7 +5,7 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // SnapshotUsageRequest struct tto get compute snapshot real size on storage diff --git a/pkg/cloudbroker/compute/start.go b/pkg/cloudbroker/compute/start.go index f1d38df2..f9951083 100644 --- a/pkg/cloudbroker/compute/start.go +++ b/pkg/cloudbroker/compute/start.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // StartRequest struct to start compute diff --git a/pkg/cloudbroker/compute/start_migration_in.go b/pkg/cloudbroker/compute/start_migration_in.go index 7b6e26fe..a6480608 100644 --- a/pkg/cloudbroker/compute/start_migration_in.go +++ b/pkg/cloudbroker/compute/start_migration_in.go @@ -4,7 +4,7 @@ import ( "context" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // StartMigrationINRequest struct to start compute for external migration in diff --git a/pkg/cloudbroker/compute/start_migration_out.go b/pkg/cloudbroker/compute/start_migration_out.go index 7b0e54e3..a578c1b3 100644 --- a/pkg/cloudbroker/compute/start_migration_out.go +++ b/pkg/cloudbroker/compute/start_migration_out.go @@ -4,8 +4,8 @@ import ( "context" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/constants" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/constants" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // StartMigrationOutRequest struct to start compute for external migration out diff --git a/pkg/cloudbroker/compute/stop.go b/pkg/cloudbroker/compute/stop.go index 377457c0..5bf3b7cf 100644 --- a/pkg/cloudbroker/compute/stop.go +++ b/pkg/cloudbroker/compute/stop.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // StopRequest struct to stop compute diff --git a/pkg/cloudbroker/compute/stop_migration_in.go b/pkg/cloudbroker/compute/stop_migration_in.go index 29bcdb1a..94b24f2f 100644 --- a/pkg/cloudbroker/compute/stop_migration_in.go +++ b/pkg/cloudbroker/compute/stop_migration_in.go @@ -4,8 +4,8 @@ import ( "context" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/constants" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/constants" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // OSUsers struct contains OS user data for Guest OS. diff --git a/pkg/cloudbroker/compute/stop_migration_out.go b/pkg/cloudbroker/compute/stop_migration_out.go index 4e16a8e3..f742b2ac 100644 --- a/pkg/cloudbroker/compute/stop_migration_out.go +++ b/pkg/cloudbroker/compute/stop_migration_out.go @@ -4,8 +4,8 @@ import ( "context" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/constants" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/constants" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // StopMigrationOutRequest struct to stop compute for external migration out diff --git a/pkg/cloudbroker/compute/tag_add.go b/pkg/cloudbroker/compute/tag_add.go index f896c51f..21c4ba48 100644 --- a/pkg/cloudbroker/compute/tag_add.go +++ b/pkg/cloudbroker/compute/tag_add.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // TagAddRequest struct to add tag to compute diff --git a/pkg/cloudbroker/compute/tag_remove.go b/pkg/cloudbroker/compute/tag_remove.go index c2c0f23a..04528044 100644 --- a/pkg/cloudbroker/compute/tag_remove.go +++ b/pkg/cloudbroker/compute/tag_remove.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // TagRemoveRequest struct to remove tag from compute diff --git a/pkg/cloudbroker/compute/unpin_from_node.go b/pkg/cloudbroker/compute/unpin_from_node.go index 0f028062..ecaf9434 100644 --- a/pkg/cloudbroker/compute/unpin_from_node.go +++ b/pkg/cloudbroker/compute/unpin_from_node.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // UnpinFromNodeRequest struct to unpin from node diff --git a/pkg/cloudbroker/compute/update.go b/pkg/cloudbroker/compute/update.go index 1d64c8ae..c54ebf98 100644 --- a/pkg/cloudbroker/compute/update.go +++ b/pkg/cloudbroker/compute/update.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // UpdateRequest struct to update compute @@ -78,6 +78,11 @@ type UpdateRequest struct { // Required: false // Default: null Clock string `url:"clock,omitempty" json:"clock,omitempty"` + + // Watchdog action + // Required: false + // Default: reset + WatchdogAction string `url:"watchdog_action,omitempty" json:"watchdog_action,omitempty" validate:"omitempty,watchdogAction"` } // Update updates some properties of the compute diff --git a/pkg/cloudbroker/compute/user_grant.go b/pkg/cloudbroker/compute/user_grant.go index 4afa9653..5017bfd8 100644 --- a/pkg/cloudbroker/compute/user_grant.go +++ b/pkg/cloudbroker/compute/user_grant.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // UserGrantRequest struct to grant access to compute diff --git a/pkg/cloudbroker/compute/user_list.go b/pkg/cloudbroker/compute/user_list.go index 4570f23b..13b9a9ad 100644 --- a/pkg/cloudbroker/compute/user_list.go +++ b/pkg/cloudbroker/compute/user_list.go @@ -5,7 +5,7 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // UserListRequest struct to get list of users for compute diff --git a/pkg/cloudbroker/compute/user_revoke.go b/pkg/cloudbroker/compute/user_revoke.go index 6d86bf08..23c6a03b 100644 --- a/pkg/cloudbroker/compute/user_revoke.go +++ b/pkg/cloudbroker/compute/user_revoke.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // UserRevokeRequest struct to revoke user access diff --git a/pkg/cloudbroker/compute/user_update.go b/pkg/cloudbroker/compute/user_update.go index 130d2346..6bbae18b 100644 --- a/pkg/cloudbroker/compute/user_update.go +++ b/pkg/cloudbroker/compute/user_update.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // UserUpdateRequest struct to update user access diff --git a/pkg/cloudbroker/disks.go b/pkg/cloudbroker/disks.go index ad4014b1..2828472e 100644 --- a/pkg/cloudbroker/disks.go +++ b/pkg/cloudbroker/disks.go @@ -1,7 +1,7 @@ package cloudbroker import ( - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/pkg/cloudbroker/disks" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/pkg/cloudbroker/disks" ) // Accessing the Disks method group diff --git a/pkg/cloudbroker/disks/change_disk_storage_policy.go b/pkg/cloudbroker/disks/change_disk_storage_policy.go index b2315770..b2c8a973 100644 --- a/pkg/cloudbroker/disks/change_disk_storage_policy.go +++ b/pkg/cloudbroker/disks/change_disk_storage_policy.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // ChangeDiskStoragePolicyRequest struct to change storage policy for disk diff --git a/pkg/cloudbroker/disks/create.go b/pkg/cloudbroker/disks/create.go index 29bca578..64dd231e 100644 --- a/pkg/cloudbroker/disks/create.go +++ b/pkg/cloudbroker/disks/create.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // CreateRequest struct to create disk @@ -47,6 +47,12 @@ type CreateRequest struct { Discard string `url:"discard,omitempty" json:"discard,omitempty"` } +type wrapperCreateRequest struct { + CreateRequest + + AsyncMode bool `url:"async_mode" json:"async_mode"` +} + // Create creates a disk func (d Disks) Create(ctx context.Context, req CreateRequest) (uint64, error) { err := validators.ValidateRequest(req) @@ -56,7 +62,12 @@ func (d Disks) Create(ctx context.Context, req CreateRequest) (uint64, error) { url := "/cloudbroker/disks/create" - res, err := d.client.DecortApiCall(ctx, http.MethodPost, url, req) + wrappedReq := wrapperCreateRequest{ + CreateRequest: req, + AsyncMode: false, + } + + res, err := d.client.DecortApiCall(ctx, http.MethodPost, url, wrappedReq) if err != nil { return 0, err } @@ -68,3 +79,25 @@ func (d Disks) Create(ctx context.Context, req CreateRequest) (uint64, error) { return result, nil } + +// Create creates a disk in async mode +func (d Disks) CreateAsync(ctx context.Context, req CreateRequest) (string, error) { + err := validators.ValidateRequest(req) + if err != nil { + return "", validators.ValidationErrors(validators.GetErrors(err)) + } + + url := "/cloudbroker/disks/create" + + wrappedReq := wrapperCreateRequest{ + CreateRequest: req, + AsyncMode: true, + } + + res, err := d.client.DecortApiCall(ctx, http.MethodPost, url, wrappedReq) + if err != nil { + return "", err + } + + return string(res), nil +} diff --git a/pkg/cloudbroker/disks/delete.go b/pkg/cloudbroker/disks/delete.go index f5edad4b..f7f50514 100644 --- a/pkg/cloudbroker/disks/delete.go +++ b/pkg/cloudbroker/disks/delete.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // DeleteRequest struct to delete disk diff --git a/pkg/cloudbroker/disks/delete_disks.go b/pkg/cloudbroker/disks/delete_disks.go index 32d2e1de..350c573e 100644 --- a/pkg/cloudbroker/disks/delete_disks.go +++ b/pkg/cloudbroker/disks/delete_disks.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // DeleteDisksRequest struct for multiple disks diff --git a/pkg/cloudbroker/disks/depresent.go b/pkg/cloudbroker/disks/depresent.go index feb04d2a..879e4778 100644 --- a/pkg/cloudbroker/disks/depresent.go +++ b/pkg/cloudbroker/disks/depresent.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // DepresentRequest struct to depresent disk from node diff --git a/pkg/cloudbroker/disks/disks.go b/pkg/cloudbroker/disks/disks.go index d7c3a502..d951ef13 100644 --- a/pkg/cloudbroker/disks/disks.go +++ b/pkg/cloudbroker/disks/disks.go @@ -1,7 +1,7 @@ // API Actor for managing Disk. This actor is a final API for admin to manage Disk package disks -import "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/interfaces" +import "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/interfaces" // Structure for creating request to disks type Disks struct { diff --git a/pkg/cloudbroker/disks/filter.go b/pkg/cloudbroker/disks/filter.go index 817dc1a1..dfcfc95b 100644 --- a/pkg/cloudbroker/disks/filter.go +++ b/pkg/cloudbroker/disks/filter.go @@ -4,9 +4,9 @@ import ( "context" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/interfaces" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/pkg/cloudbroker/k8s" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/pkg/cloudbroker/lb" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/interfaces" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/pkg/cloudbroker/k8s" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/pkg/cloudbroker/lb" ) // FilterByID returns ListDisks with specified ID. diff --git a/pkg/cloudbroker/disks/from_platform_disk.go b/pkg/cloudbroker/disks/from_platform_disk.go index 1826b955..3ad6c62d 100644 --- a/pkg/cloudbroker/disks/from_platform_disk.go +++ b/pkg/cloudbroker/disks/from_platform_disk.go @@ -6,7 +6,7 @@ import ( "strconv" "strings" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // FromPlatformDiskRequest struct to create template from platform disk diff --git a/pkg/cloudbroker/disks/get.go b/pkg/cloudbroker/disks/get.go index f3a85157..f847e90b 100644 --- a/pkg/cloudbroker/disks/get.go +++ b/pkg/cloudbroker/disks/get.go @@ -5,7 +5,7 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // GetRequest struct to get information about disk diff --git a/pkg/cloudbroker/disks/limit_io.go b/pkg/cloudbroker/disks/limit_io.go index 3b139615..3aa7e21e 100644 --- a/pkg/cloudbroker/disks/limit_io.go +++ b/pkg/cloudbroker/disks/limit_io.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // LimitIORequest struct for limit IO diff --git a/pkg/cloudbroker/disks/list.go b/pkg/cloudbroker/disks/list.go index e55deb7d..3a24a836 100644 --- a/pkg/cloudbroker/disks/list.go +++ b/pkg/cloudbroker/disks/list.go @@ -5,7 +5,7 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // ListRequest struct to get list/list_deleted of disks @@ -28,7 +28,7 @@ type ListRequest struct { // Find by status // Required: false - Status string `url:"status,omitempty" json:"status,omitempty"` + Status []string `url:"status,omitempty" json:"status,omitempty"` // Find by shared, true or false // Required: false diff --git a/pkg/cloudbroker/disks/list_deleted.go b/pkg/cloudbroker/disks/list_deleted.go index 858e5dfc..705f0fbe 100644 --- a/pkg/cloudbroker/disks/list_deleted.go +++ b/pkg/cloudbroker/disks/list_deleted.go @@ -5,7 +5,7 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // ListDeletedRequest struct to get list of deleted disks diff --git a/pkg/cloudbroker/disks/list_unattached.go b/pkg/cloudbroker/disks/list_unattached.go index d49fd98f..8af4ddbb 100644 --- a/pkg/cloudbroker/disks/list_unattached.go +++ b/pkg/cloudbroker/disks/list_unattached.go @@ -5,7 +5,7 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // ListUnattachedRequest struct to get list of unattached disk diff --git a/pkg/cloudbroker/disks/migrate.go b/pkg/cloudbroker/disks/migrate.go index ad3aeead..46f7e40c 100644 --- a/pkg/cloudbroker/disks/migrate.go +++ b/pkg/cloudbroker/disks/migrate.go @@ -4,7 +4,7 @@ import ( "context" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // Migrate struct to move disk to another sep, pool and storage policy @@ -26,16 +26,51 @@ type MigrateRequest struct { StoragePolicyID uint64 `url:"storage_policy_id" json:"storage_policy_id" validate:"required"` } -// Move moves disk to another sep, pool and storage policy +type wrapperMigrateRequest struct { + MigrateRequest + + AsyncMode bool `url:"async_mode" json:"async_mode"` +} + +// Move moves disk to another sep, pool and storage policy in sync mode func (c Disks) Migrate(ctx context.Context, req MigrateRequest) (string, error) { err := validators.ValidateRequest(req) if err != nil { return "", validators.ValidationErrors(validators.GetErrors(err)) } + wrappedReq := wrapperMigrateRequest{ + MigrateRequest: req, + AsyncMode: false, + } + url := "/cloudbroker/disks/migrate" - res, err := c.client.DecortApiCall(ctx, http.MethodPost, url, req) + res, err := c.client.DecortApiCall(ctx, http.MethodPost, url, wrappedReq) + if err != nil { + return "", err + } + + result := string(res) + + return result, nil +} + +// Move moves disk to another sep, pool and storage policy in async mode +func (c Disks) MigrateAsync(ctx context.Context, req MigrateRequest) (string, error) { + err := validators.ValidateRequest(req) + if err != nil { + return "", validators.ValidationErrors(validators.GetErrors(err)) + } + + wrappedReq := wrapperMigrateRequest{ + MigrateRequest: req, + AsyncMode: true, + } + + url := "/cloudbroker/disks/migrate" + + res, err := c.client.DecortApiCall(ctx, http.MethodPost, url, wrappedReq) if err != nil { return "", err } diff --git a/pkg/cloudbroker/disks/migrate_abort.go b/pkg/cloudbroker/disks/migrate_abort.go index af30e44f..d7a260ba 100644 --- a/pkg/cloudbroker/disks/migrate_abort.go +++ b/pkg/cloudbroker/disks/migrate_abort.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // MigrateAbortRequest struct to abort migration diff --git a/pkg/cloudbroker/disks/migrate_status.go b/pkg/cloudbroker/disks/migrate_status.go index c17bc5bd..46b99e06 100644 --- a/pkg/cloudbroker/disks/migrate_status.go +++ b/pkg/cloudbroker/disks/migrate_status.go @@ -5,7 +5,7 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // GetMigrateStatusRequest struct to get information about disk migrate status diff --git a/pkg/cloudbroker/disks/present.go b/pkg/cloudbroker/disks/present.go index d9cd2ea2..769b11c9 100644 --- a/pkg/cloudbroker/disks/present.go +++ b/pkg/cloudbroker/disks/present.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // PresentRequest struct to present disk to node diff --git a/pkg/cloudbroker/disks/rename.go b/pkg/cloudbroker/disks/rename.go index 46851923..8f4b5d8b 100644 --- a/pkg/cloudbroker/disks/rename.go +++ b/pkg/cloudbroker/disks/rename.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // RenameRequest struct to rename disk diff --git a/pkg/cloudbroker/disks/replicate.go b/pkg/cloudbroker/disks/replicate.go index ff4182ac..fb3ca5e8 100644 --- a/pkg/cloudbroker/disks/replicate.go +++ b/pkg/cloudbroker/disks/replicate.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // ReplicateRequest struct to create an empty disk in chosen SEP and pool combination. diff --git a/pkg/cloudbroker/disks/replication_resume.go b/pkg/cloudbroker/disks/replication_resume.go index b321284c..cb065346 100644 --- a/pkg/cloudbroker/disks/replication_resume.go +++ b/pkg/cloudbroker/disks/replication_resume.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // ReplicationResume struct to resume suspended replication diff --git a/pkg/cloudbroker/disks/replication_reverse.go b/pkg/cloudbroker/disks/replication_reverse.go index 7217ca17..0257b1d8 100644 --- a/pkg/cloudbroker/disks/replication_reverse.go +++ b/pkg/cloudbroker/disks/replication_reverse.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // ReplicationReverseRequest struct to change role between disks replications diff --git a/pkg/cloudbroker/disks/replication_start.go b/pkg/cloudbroker/disks/replication_start.go index 2bd1b7da..252d0685 100644 --- a/pkg/cloudbroker/disks/replication_start.go +++ b/pkg/cloudbroker/disks/replication_start.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // ReplicationStartRequest struct to starts replication between two chosen disks diff --git a/pkg/cloudbroker/disks/replication_status.go b/pkg/cloudbroker/disks/replication_status.go index e4037221..cabbcf34 100644 --- a/pkg/cloudbroker/disks/replication_status.go +++ b/pkg/cloudbroker/disks/replication_status.go @@ -4,7 +4,7 @@ import ( "context" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // ReplicationStatusRequest struct to get replication status diff --git a/pkg/cloudbroker/disks/replication_stop.go b/pkg/cloudbroker/disks/replication_stop.go index ce80a4b2..753c80ca 100644 --- a/pkg/cloudbroker/disks/replication_stop.go +++ b/pkg/cloudbroker/disks/replication_stop.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // ReplicationStopRequest struct to remove replication between disks completely diff --git a/pkg/cloudbroker/disks/replication_suspend.go b/pkg/cloudbroker/disks/replication_suspend.go index 0af9e720..bffc28de 100644 --- a/pkg/cloudbroker/disks/replication_suspend.go +++ b/pkg/cloudbroker/disks/replication_suspend.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // ReplicationSuspendRequest struct to pause replication with possibility to resume from pause moment diff --git a/pkg/cloudbroker/disks/resize.go b/pkg/cloudbroker/disks/resize.go index 7f745ae4..4f93fd39 100644 --- a/pkg/cloudbroker/disks/resize.go +++ b/pkg/cloudbroker/disks/resize.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // ResizeRequest struct to resize disk diff --git a/pkg/cloudbroker/disks/restore.go b/pkg/cloudbroker/disks/restore.go index 10f1e5ea..d8063c3c 100644 --- a/pkg/cloudbroker/disks/restore.go +++ b/pkg/cloudbroker/disks/restore.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // RestoreRequest struct to restore a deleted unattached disk diff --git a/pkg/cloudbroker/disks/serialize.go b/pkg/cloudbroker/disks/serialize.go index 3b5b5692..b1117397 100644 --- a/pkg/cloudbroker/disks/serialize.go +++ b/pkg/cloudbroker/disks/serialize.go @@ -3,7 +3,7 @@ package disks import ( "encoding/json" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/serialization" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/serialization" ) // Serialize returns JSON-serialized []byte. Used as a wrapper over json.Marshal and json.MarshalIndent functions. diff --git a/pkg/cloudbroker/disks/share.go b/pkg/cloudbroker/disks/share.go index 39eedb3e..eed472c8 100644 --- a/pkg/cloudbroker/disks/share.go +++ b/pkg/cloudbroker/disks/share.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // ShareRequest struct to share data disk diff --git a/pkg/cloudbroker/disks/snapshot_delete.go b/pkg/cloudbroker/disks/snapshot_delete.go index d41e2634..8049d9cc 100644 --- a/pkg/cloudbroker/disks/snapshot_delete.go +++ b/pkg/cloudbroker/disks/snapshot_delete.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // SnapshotDeleteRequest struct to delete snapshot diff --git a/pkg/cloudbroker/disks/snapshot_rollback.go b/pkg/cloudbroker/disks/snapshot_rollback.go index 4f6ef736..a61857d3 100644 --- a/pkg/cloudbroker/disks/snapshot_rollback.go +++ b/pkg/cloudbroker/disks/snapshot_rollback.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // SnapshotRollbackRequest struct to rollback snapshot diff --git a/pkg/cloudbroker/disks/unshare.go b/pkg/cloudbroker/disks/unshare.go index 63f918ca..2813449b 100644 --- a/pkg/cloudbroker/disks/unshare.go +++ b/pkg/cloudbroker/disks/unshare.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // UnshareRequest struct to unshare data disk diff --git a/pkg/cloudbroker/disks/update.go b/pkg/cloudbroker/disks/update.go index 996a2b23..c5f63799 100644 --- a/pkg/cloudbroker/disks/update.go +++ b/pkg/cloudbroker/disks/update.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // UpdateRequest struct to update disk diff --git a/pkg/cloudbroker/dpdk.go b/pkg/cloudbroker/dpdk.go index e5f56828..59c3cdf1 100644 --- a/pkg/cloudbroker/dpdk.go +++ b/pkg/cloudbroker/dpdk.go @@ -1,6 +1,6 @@ package cloudbroker -import "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/pkg/cloudbroker/dpdknet" +import "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/pkg/cloudbroker/dpdknet" // Accessing the DPDK method group func (ca *CloudBroker) DPDKNet() *dpdknet.DPDKNet { diff --git a/pkg/cloudbroker/dpdknet/create.go b/pkg/cloudbroker/dpdknet/create.go index 666fb8ce..e3ec36cd 100644 --- a/pkg/cloudbroker/dpdknet/create.go +++ b/pkg/cloudbroker/dpdknet/create.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // CreateRequest struct to create DPDK network diff --git a/pkg/cloudbroker/dpdknet/delete.go b/pkg/cloudbroker/dpdknet/delete.go index b63fa20e..0b73fb12 100644 --- a/pkg/cloudbroker/dpdknet/delete.go +++ b/pkg/cloudbroker/dpdknet/delete.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // DeleteRequest struct to delete DPDK network diff --git a/pkg/cloudbroker/dpdknet/disable.go b/pkg/cloudbroker/dpdknet/disable.go index b9d56336..0b853a97 100644 --- a/pkg/cloudbroker/dpdknet/disable.go +++ b/pkg/cloudbroker/dpdknet/disable.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // DisableRequest struct to disable DPDK network diff --git a/pkg/cloudbroker/dpdknet/dpdk.go b/pkg/cloudbroker/dpdknet/dpdk.go index 84a4c3d6..5b2616c9 100644 --- a/pkg/cloudbroker/dpdknet/dpdk.go +++ b/pkg/cloudbroker/dpdknet/dpdk.go @@ -1,6 +1,6 @@ package dpdknet -import "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/interfaces" +import "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/interfaces" // Structure for creating request to DPDK network type DPDKNet struct { diff --git a/pkg/cloudbroker/dpdknet/enable.go b/pkg/cloudbroker/dpdknet/enable.go index d5fccbc9..55a46956 100644 --- a/pkg/cloudbroker/dpdknet/enable.go +++ b/pkg/cloudbroker/dpdknet/enable.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // EnableRequest struct to enable DPDK network diff --git a/pkg/cloudbroker/dpdknet/get.go b/pkg/cloudbroker/dpdknet/get.go index ba7e17ba..f6d92b80 100644 --- a/pkg/cloudbroker/dpdknet/get.go +++ b/pkg/cloudbroker/dpdknet/get.go @@ -5,7 +5,7 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // GetRequest struct to get information about DPDK network diff --git a/pkg/cloudbroker/dpdknet/list.go b/pkg/cloudbroker/dpdknet/list.go index 186730fe..08b36f0a 100644 --- a/pkg/cloudbroker/dpdknet/list.go +++ b/pkg/cloudbroker/dpdknet/list.go @@ -5,7 +5,7 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // ListRequest struct to get list of DPDK networks diff --git a/pkg/cloudbroker/dpdknet/update.go b/pkg/cloudbroker/dpdknet/update.go index a44aebbe..8ce4d8e2 100644 --- a/pkg/cloudbroker/dpdknet/update.go +++ b/pkg/cloudbroker/dpdknet/update.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // UpdateRequest struct to update DPDK network diff --git a/pkg/cloudbroker/extnet.go b/pkg/cloudbroker/extnet.go index a271d790..414fd9c3 100644 --- a/pkg/cloudbroker/extnet.go +++ b/pkg/cloudbroker/extnet.go @@ -1,7 +1,7 @@ package cloudbroker import ( - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/pkg/cloudbroker/extnet" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/pkg/cloudbroker/extnet" ) // Accessing the ExtNet method group diff --git a/pkg/cloudbroker/extnet/access_add.go b/pkg/cloudbroker/extnet/access_add.go index 653e6701..28d3fe0e 100644 --- a/pkg/cloudbroker/extnet/access_add.go +++ b/pkg/cloudbroker/extnet/access_add.go @@ -5,7 +5,7 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // AccessAddRequest struct to grant access diff --git a/pkg/cloudbroker/extnet/access_remove.go b/pkg/cloudbroker/extnet/access_remove.go index c3445ee6..361dfd64 100644 --- a/pkg/cloudbroker/extnet/access_remove.go +++ b/pkg/cloudbroker/extnet/access_remove.go @@ -5,7 +5,7 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // AccessRemoveRequest struct to remove access diff --git a/pkg/cloudbroker/extnet/add_reserved_ip.go b/pkg/cloudbroker/extnet/add_reserved_ip.go index fe1d3b3e..77f96f4c 100644 --- a/pkg/cloudbroker/extnet/add_reserved_ip.go +++ b/pkg/cloudbroker/extnet/add_reserved_ip.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // AddReserveIPRequest struct to reserved address or address poll diff --git a/pkg/cloudbroker/extnet/create.go b/pkg/cloudbroker/extnet/create.go index e8302332..cbac34b1 100644 --- a/pkg/cloudbroker/extnet/create.go +++ b/pkg/cloudbroker/extnet/create.go @@ -6,7 +6,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) type Route struct { diff --git a/pkg/cloudbroker/extnet/default_qos_update.go b/pkg/cloudbroker/extnet/default_qos_update.go index aca29427..7ae06a9e 100644 --- a/pkg/cloudbroker/extnet/default_qos_update.go +++ b/pkg/cloudbroker/extnet/default_qos_update.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // DefaultQOSUpdateRequest struct for update QOS diff --git a/pkg/cloudbroker/extnet/del_reserved_ip.go b/pkg/cloudbroker/extnet/del_reserved_ip.go index 82009a2b..7489b145 100644 --- a/pkg/cloudbroker/extnet/del_reserved_ip.go +++ b/pkg/cloudbroker/extnet/del_reserved_ip.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // DelReserveIPRequest struct to delete reserved address or address poll diff --git a/pkg/cloudbroker/extnet/destroy.go b/pkg/cloudbroker/extnet/destroy.go index 8d4bb897..132ae930 100644 --- a/pkg/cloudbroker/extnet/destroy.go +++ b/pkg/cloudbroker/extnet/destroy.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // DestroyRequest struct for destroy diff --git a/pkg/cloudbroker/extnet/device_deploy.go b/pkg/cloudbroker/extnet/device_deploy.go index 348048fa..0ede4d3d 100644 --- a/pkg/cloudbroker/extnet/device_deploy.go +++ b/pkg/cloudbroker/extnet/device_deploy.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // DeviceDeployRequest struct to deploy network device diff --git a/pkg/cloudbroker/extnet/device_migrate.go b/pkg/cloudbroker/extnet/device_migrate.go index 2e93cbac..04032204 100644 --- a/pkg/cloudbroker/extnet/device_migrate.go +++ b/pkg/cloudbroker/extnet/device_migrate.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // DeviceMigrateRequest struct for migrate VNF diff --git a/pkg/cloudbroker/extnet/device_remove.go b/pkg/cloudbroker/extnet/device_remove.go index 60d1741e..e6ce4f6e 100644 --- a/pkg/cloudbroker/extnet/device_remove.go +++ b/pkg/cloudbroker/extnet/device_remove.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // DeviceRemoveRequest struct to remove network device diff --git a/pkg/cloudbroker/extnet/device_restart.go b/pkg/cloudbroker/extnet/device_restart.go index 886490dd..58ed4318 100644 --- a/pkg/cloudbroker/extnet/device_restart.go +++ b/pkg/cloudbroker/extnet/device_restart.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // DeviceRestartRequest struct for restart VNF device diff --git a/pkg/cloudbroker/extnet/disable.go b/pkg/cloudbroker/extnet/disable.go index 5e1ee87c..c677767f 100644 --- a/pkg/cloudbroker/extnet/disable.go +++ b/pkg/cloudbroker/extnet/disable.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // DisableRequest struct to disable external network diff --git a/pkg/cloudbroker/extnet/dns_apply.go b/pkg/cloudbroker/extnet/dns_apply.go index 736d5e8c..4c0abc06 100644 --- a/pkg/cloudbroker/extnet/dns_apply.go +++ b/pkg/cloudbroker/extnet/dns_apply.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // DNSApplyRequest struct to set new DNS diff --git a/pkg/cloudbroker/extnet/enable.go b/pkg/cloudbroker/extnet/enable.go index 9062cc50..e13261f1 100644 --- a/pkg/cloudbroker/extnet/enable.go +++ b/pkg/cloudbroker/extnet/enable.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // EnableRequest struct to enable external network diff --git a/pkg/cloudbroker/extnet/extnet.go b/pkg/cloudbroker/extnet/extnet.go index bdf6a735..29d02838 100644 --- a/pkg/cloudbroker/extnet/extnet.go +++ b/pkg/cloudbroker/extnet/extnet.go @@ -1,7 +1,7 @@ // API Actor for configure and use external networks package extnet -import "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/interfaces" +import "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/interfaces" // Structure for creating request to extnet type ExtNet struct { diff --git a/pkg/cloudbroker/extnet/get.go b/pkg/cloudbroker/extnet/get.go index e68395e2..6f3e9b60 100644 --- a/pkg/cloudbroker/extnet/get.go +++ b/pkg/cloudbroker/extnet/get.go @@ -5,7 +5,7 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // GetRequest struct to get information about external network diff --git a/pkg/cloudbroker/extnet/get_reserved_ip.go b/pkg/cloudbroker/extnet/get_reserved_ip.go index d0f5cc73..6ca89ace 100644 --- a/pkg/cloudbroker/extnet/get_reserved_ip.go +++ b/pkg/cloudbroker/extnet/get_reserved_ip.go @@ -5,7 +5,7 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // GetRequest struct to get information about reserved address or address poll diff --git a/pkg/cloudbroker/extnet/ips_exclude.go b/pkg/cloudbroker/extnet/ips_exclude.go index 02863a96..3a6af2af 100644 --- a/pkg/cloudbroker/extnet/ips_exclude.go +++ b/pkg/cloudbroker/extnet/ips_exclude.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // IPsExcludeRequest struct to exclude list of IPs diff --git a/pkg/cloudbroker/extnet/ips_exclude_range.go b/pkg/cloudbroker/extnet/ips_exclude_range.go index f271b76c..7964f56f 100644 --- a/pkg/cloudbroker/extnet/ips_exclude_range.go +++ b/pkg/cloudbroker/extnet/ips_exclude_range.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // IPsExcludeRangeRequest struct to exclude range of IPs diff --git a/pkg/cloudbroker/extnet/ips_include.go b/pkg/cloudbroker/extnet/ips_include.go index d46d28a0..7e0a674d 100644 --- a/pkg/cloudbroker/extnet/ips_include.go +++ b/pkg/cloudbroker/extnet/ips_include.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // IPsIncludeRequest struct to include list of IPs diff --git a/pkg/cloudbroker/extnet/ips_include_range.go b/pkg/cloudbroker/extnet/ips_include_range.go index c489db36..b9189fd2 100644 --- a/pkg/cloudbroker/extnet/ips_include_range.go +++ b/pkg/cloudbroker/extnet/ips_include_range.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // IPsIncludeRangeRequest struct to include range of IPs diff --git a/pkg/cloudbroker/extnet/list.go b/pkg/cloudbroker/extnet/list.go index 5075ccc1..0ed6eb6d 100644 --- a/pkg/cloudbroker/extnet/list.go +++ b/pkg/cloudbroker/extnet/list.go @@ -5,7 +5,7 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // ListRequest struct to get list of external network diff --git a/pkg/cloudbroker/extnet/migrate_to_zone.go b/pkg/cloudbroker/extnet/migrate_to_zone.go index 91810f4b..db815c38 100644 --- a/pkg/cloudbroker/extnet/migrate_to_zone.go +++ b/pkg/cloudbroker/extnet/migrate_to_zone.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // MigrateToZone struct to move extnet to another zone diff --git a/pkg/cloudbroker/extnet/ntp_apply.go b/pkg/cloudbroker/extnet/ntp_apply.go index d2d5f82b..3c5ae7ff 100644 --- a/pkg/cloudbroker/extnet/ntp_apply.go +++ b/pkg/cloudbroker/extnet/ntp_apply.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // NTPApplyRequest struct for set new NTP diff --git a/pkg/cloudbroker/extnet/serialize.go b/pkg/cloudbroker/extnet/serialize.go index 764caa57..5704d0fc 100644 --- a/pkg/cloudbroker/extnet/serialize.go +++ b/pkg/cloudbroker/extnet/serialize.go @@ -3,7 +3,7 @@ package extnet import ( "encoding/json" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/serialization" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/serialization" ) // Serialize returns JSON-serialized []byte. Used as a wrapper over json.Marshal and json.MarshalIndent functions. diff --git a/pkg/cloudbroker/extnet/set_default.go b/pkg/cloudbroker/extnet/set_default.go index 6b9cda02..9fd36758 100644 --- a/pkg/cloudbroker/extnet/set_default.go +++ b/pkg/cloudbroker/extnet/set_default.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // SetDefaultRequest struct to set external network as default diff --git a/pkg/cloudbroker/extnet/set_highly_available.go b/pkg/cloudbroker/extnet/set_highly_available.go index 2f48def9..3e899762 100644 --- a/pkg/cloudbroker/extnet/set_highly_available.go +++ b/pkg/cloudbroker/extnet/set_highly_available.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // SetHAModeRequest struct to set HA mode for external network diff --git a/pkg/cloudbroker/extnet/static_route_access_grant.go b/pkg/cloudbroker/extnet/static_route_access_grant.go index 145979d1..f320509f 100644 --- a/pkg/cloudbroker/extnet/static_route_access_grant.go +++ b/pkg/cloudbroker/extnet/static_route_access_grant.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // StaticRouteAccessGrantRequest struct to grant access to static route to Compute/ViNS diff --git a/pkg/cloudbroker/extnet/static_route_access_revoke.go b/pkg/cloudbroker/extnet/static_route_access_revoke.go index 5b367d5d..9122e82a 100644 --- a/pkg/cloudbroker/extnet/static_route_access_revoke.go +++ b/pkg/cloudbroker/extnet/static_route_access_revoke.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // StaticRouteAccessRevokeRequest struct to revoke access to static route to Compute/ViNS diff --git a/pkg/cloudbroker/extnet/static_route_add.go b/pkg/cloudbroker/extnet/static_route_add.go index c59ea407..485d4288 100644 --- a/pkg/cloudbroker/extnet/static_route_add.go +++ b/pkg/cloudbroker/extnet/static_route_add.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // StaticRouteAddRequest struct to add static route diff --git a/pkg/cloudbroker/extnet/static_route_del.go b/pkg/cloudbroker/extnet/static_route_del.go index c4326002..7de1fb3b 100644 --- a/pkg/cloudbroker/extnet/static_route_del.go +++ b/pkg/cloudbroker/extnet/static_route_del.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // StaticRouteDelRequest struct to remove static route from ViNS diff --git a/pkg/cloudbroker/extnet/static_route_list.go b/pkg/cloudbroker/extnet/static_route_list.go index 41764db6..049a9420 100644 --- a/pkg/cloudbroker/extnet/static_route_list.go +++ b/pkg/cloudbroker/extnet/static_route_list.go @@ -5,7 +5,7 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // StaticRouteListRequest struct for static route list diff --git a/pkg/cloudbroker/extnet/update.go b/pkg/cloudbroker/extnet/update.go index ec9d10ff..3402a35b 100644 --- a/pkg/cloudbroker/extnet/update.go +++ b/pkg/cloudbroker/extnet/update.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // UpdateRequest struct to update external network diff --git a/pkg/cloudbroker/flipgoup.go b/pkg/cloudbroker/flipgoup.go index e5aba737..f3e60d7c 100644 --- a/pkg/cloudbroker/flipgoup.go +++ b/pkg/cloudbroker/flipgoup.go @@ -1,7 +1,7 @@ package cloudbroker import ( - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/pkg/cloudbroker/flipgroup" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/pkg/cloudbroker/flipgroup" ) // Accessing the FLIPGroup method group diff --git a/pkg/cloudbroker/flipgroup/compute_add.go b/pkg/cloudbroker/flipgroup/compute_add.go index 89aa3e4f..1ceb651c 100644 --- a/pkg/cloudbroker/flipgroup/compute_add.go +++ b/pkg/cloudbroker/flipgroup/compute_add.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // ComputeAddRequest struct to add compute instance diff --git a/pkg/cloudbroker/flipgroup/compute_remove.go b/pkg/cloudbroker/flipgroup/compute_remove.go index d8b71684..016ecd17 100644 --- a/pkg/cloudbroker/flipgroup/compute_remove.go +++ b/pkg/cloudbroker/flipgroup/compute_remove.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // ComputeRemoveRequest struct to remove compute instance diff --git a/pkg/cloudbroker/flipgroup/create.go b/pkg/cloudbroker/flipgroup/create.go index 1e7cc9e5..af171f49 100644 --- a/pkg/cloudbroker/flipgroup/create.go +++ b/pkg/cloudbroker/flipgroup/create.go @@ -5,7 +5,7 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // CreateRequest struct to create FLIPGroup diff --git a/pkg/cloudbroker/flipgroup/delete.go b/pkg/cloudbroker/flipgroup/delete.go index 88f847c5..f91d6959 100644 --- a/pkg/cloudbroker/flipgroup/delete.go +++ b/pkg/cloudbroker/flipgroup/delete.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // DeleteRequest struct to delete FLIPGroup diff --git a/pkg/cloudbroker/flipgroup/edit.go b/pkg/cloudbroker/flipgroup/edit.go index d65886b3..2d849327 100644 --- a/pkg/cloudbroker/flipgroup/edit.go +++ b/pkg/cloudbroker/flipgroup/edit.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // EditRequest struct to edit FLIPGroup diff --git a/pkg/cloudbroker/flipgroup/flipgroup.go b/pkg/cloudbroker/flipgroup/flipgroup.go index a5d81411..b301f6fa 100644 --- a/pkg/cloudbroker/flipgroup/flipgroup.go +++ b/pkg/cloudbroker/flipgroup/flipgroup.go @@ -2,7 +2,7 @@ package flipgroup import ( - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/interfaces" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/interfaces" ) // Structure for creating request to FLIPGroup diff --git a/pkg/cloudbroker/flipgroup/get.go b/pkg/cloudbroker/flipgroup/get.go index b831436d..49bc1c6e 100644 --- a/pkg/cloudbroker/flipgroup/get.go +++ b/pkg/cloudbroker/flipgroup/get.go @@ -5,7 +5,7 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // GetRequest struct to get information about FLIPGroup diff --git a/pkg/cloudbroker/flipgroup/list.go b/pkg/cloudbroker/flipgroup/list.go index 067475d2..d27f9d40 100644 --- a/pkg/cloudbroker/flipgroup/list.go +++ b/pkg/cloudbroker/flipgroup/list.go @@ -5,7 +5,7 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // ListRequest struct to get list of FLIPGroup available to the current user diff --git a/pkg/cloudbroker/flipgroup/serialize.go b/pkg/cloudbroker/flipgroup/serialize.go index 9f322bdf..57cb017b 100644 --- a/pkg/cloudbroker/flipgroup/serialize.go +++ b/pkg/cloudbroker/flipgroup/serialize.go @@ -3,7 +3,7 @@ package flipgroup import ( "encoding/json" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/serialization" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/serialization" ) // Serialize returns JSON-serialized []byte. Used as a wrapper over json.Marshal and json.MarshalIndent functions. diff --git a/pkg/cloudbroker/grid.go b/pkg/cloudbroker/grid.go index b63b38b3..7af410b2 100644 --- a/pkg/cloudbroker/grid.go +++ b/pkg/cloudbroker/grid.go @@ -1,6 +1,6 @@ package cloudbroker -import "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/pkg/cloudbroker/grid" +import "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/pkg/cloudbroker/grid" // Accessing the Grid method group func (cb *CloudBroker) Grid() *grid.Grid { diff --git a/pkg/cloudbroker/grid/add_custom_backup_path.go b/pkg/cloudbroker/grid/add_custom_backup_path.go index 1c23aa02..c76a8a68 100644 --- a/pkg/cloudbroker/grid/add_custom_backup_path.go +++ b/pkg/cloudbroker/grid/add_custom_backup_path.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // AddCustomBackupPathRequest struct to add new path to the list of custom backup paths diff --git a/pkg/cloudbroker/grid/change_settings.go b/pkg/cloudbroker/grid/change_settings.go index a294f9ec..dfa06566 100644 --- a/pkg/cloudbroker/grid/change_settings.go +++ b/pkg/cloudbroker/grid/change_settings.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // ChangeSettingsRequest struct to change grid settings diff --git a/pkg/cloudbroker/grid/execute_maintenance_script.go b/pkg/cloudbroker/grid/execute_maintenance_script.go deleted file mode 100644 index 3a2e17cc..00000000 --- a/pkg/cloudbroker/grid/execute_maintenance_script.go +++ /dev/null @@ -1,46 +0,0 @@ -package grid - -import ( - "context" - "net/http" - "strconv" - - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" -) - -// ExecuteMaintenanceScriptRequest struct to execute script -type ExecuteMaintenanceScriptRequest struct { - // Grid (platform) ID - // Required: true - GID uint64 `url:"gid" json:"gid" validate:"required"` - - // Type of nodes you want to apply the action on - // Required: true - NodesType string `url:"nodestype" json:"nodestype" validate:"required"` - - // The script you want to run - // Required: true - Script string `url:"script" json:"script" validate:"required"` -} - -// ExecuteMaintenanceScript executes maintenance script -func (g Grid) ExecuteMaintenanceScript(ctx context.Context, req ExecuteMaintenanceScriptRequest) (bool, error) { - err := validators.ValidateRequest(req) - if err != nil { - return false, validators.ValidationErrors(validators.GetErrors(err)) - } - - url := "/cloudbroker/grid/executeMaintenanceScript" - - res, err := g.client.DecortApiCall(ctx, http.MethodPost, url, req) - if err != nil { - return false, err - } - - result, err := strconv.ParseBool(string(res)) - if err != nil { - return false, err - } - - return result, nil -} diff --git a/pkg/cloudbroker/grid/get.go b/pkg/cloudbroker/grid/get.go index 6013ec3d..36e8978a 100644 --- a/pkg/cloudbroker/grid/get.go +++ b/pkg/cloudbroker/grid/get.go @@ -5,7 +5,7 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // GetRequest struct to get grid details diff --git a/pkg/cloudbroker/grid/get_backup.go b/pkg/cloudbroker/grid/get_backup.go index aac7dd59..6099d7c9 100644 --- a/pkg/cloudbroker/grid/get_backup.go +++ b/pkg/cloudbroker/grid/get_backup.go @@ -4,7 +4,7 @@ import ( "context" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // GetBackupRequest struct to get backup diff --git a/pkg/cloudbroker/grid/get_diagnosis.go b/pkg/cloudbroker/grid/get_diagnosis.go index 267ba575..1db90aa0 100644 --- a/pkg/cloudbroker/grid/get_diagnosis.go +++ b/pkg/cloudbroker/grid/get_diagnosis.go @@ -4,7 +4,7 @@ import ( "context" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // GetDiagnosisRequest struct to get platform snapshot with additional diagnosis diff --git a/pkg/cloudbroker/grid/get_resource_consumption.go b/pkg/cloudbroker/grid/get_resource_consumption.go index 8a4094c8..e6132a23 100644 --- a/pkg/cloudbroker/grid/get_resource_consumption.go +++ b/pkg/cloudbroker/grid/get_resource_consumption.go @@ -5,7 +5,7 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // GetResourceConsumptionRequest struct to get resource consumption diff --git a/pkg/cloudbroker/grid/get_settings.go b/pkg/cloudbroker/grid/get_settings.go index 1c7e3dcf..09f100bf 100644 --- a/pkg/cloudbroker/grid/get_settings.go +++ b/pkg/cloudbroker/grid/get_settings.go @@ -5,7 +5,7 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // GetSettingsRequest struct to get grid settings diff --git a/pkg/cloudbroker/grid/grid.go b/pkg/cloudbroker/grid/grid.go index 5b40e195..534e5461 100644 --- a/pkg/cloudbroker/grid/grid.go +++ b/pkg/cloudbroker/grid/grid.go @@ -2,7 +2,7 @@ package grid import ( - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/interfaces" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/interfaces" ) // Structure for creating request to grid diff --git a/pkg/cloudbroker/grid/list.go b/pkg/cloudbroker/grid/list.go index d3b7fbcd..108fbfbc 100644 --- a/pkg/cloudbroker/grid/list.go +++ b/pkg/cloudbroker/grid/list.go @@ -5,7 +5,7 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // ListRequest struct to get list of locations diff --git a/pkg/cloudbroker/grid/list_emails.go b/pkg/cloudbroker/grid/list_emails.go deleted file mode 100644 index a1f253b3..00000000 --- a/pkg/cloudbroker/grid/list_emails.go +++ /dev/null @@ -1,37 +0,0 @@ -package grid - -import ( - "context" - "encoding/json" - "net/http" -) - -// ListEmailsRequest struct for getting list of email addresses of users -type ListEmailsRequest struct { - // Page number - // Required: false - Page uint64 `url:"page,omitempty" json:"page,omitempty"` - - // Page size - // Required: false - Size uint64 `url:"size,omitempty" json:"size,omitempty"` -} - -// ListEmails returns list of email addresses of users -func (g Grid) ListEmails(ctx context.Context, req ListEmailsRequest) (*ListEmails, error) { - url := "/cloudbroker/grid/listEmails" - - res, err := g.client.DecortApiCall(ctx, http.MethodPost, url, req) - if err != nil { - return nil, err - } - - list := ListEmails{} - - err = json.Unmarshal(res, &list) - if err != nil { - return nil, err - } - - return &list, nil -} diff --git a/pkg/cloudbroker/grid/models.go b/pkg/cloudbroker/grid/models.go index 727c2c0a..83cd8085 100644 --- a/pkg/cloudbroker/grid/models.go +++ b/pkg/cloudbroker/grid/models.go @@ -226,6 +226,12 @@ type RecordSettingsGrid struct { //Prometheus Prometheus Prometheus `json:"prometheus"` + //Reserved CPU + ReservedCPU uint64 `json:"reserved_cpu"` + + //Reserved RAM + ReservedRAM uint64 `json:"reserved_ram"` + //Vins max prereservation num VinsMaxPreReservationsNum int `json:"vinsMaxPreReservationsNum"` diff --git a/pkg/cloudbroker/grid/purge_logs.go b/pkg/cloudbroker/grid/purge_logs.go index 9824ea9a..61b1b58a 100644 --- a/pkg/cloudbroker/grid/purge_logs.go +++ b/pkg/cloudbroker/grid/purge_logs.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // PurgeLogsRequest struct to purge logs diff --git a/pkg/cloudbroker/grid/remove_custom_backup_path.go b/pkg/cloudbroker/grid/remove_custom_backup_path.go index abc63b34..50fd722d 100644 --- a/pkg/cloudbroker/grid/remove_custom_backup_path.go +++ b/pkg/cloudbroker/grid/remove_custom_backup_path.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // RemoveCustomBackupPathRequest struct to remove path from the list of custom backup paths diff --git a/pkg/cloudbroker/grid/rename.go b/pkg/cloudbroker/grid/rename.go index c5a24138..3c7f81ae 100644 --- a/pkg/cloudbroker/grid/rename.go +++ b/pkg/cloudbroker/grid/rename.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // RenameRequest struct to rename grid diff --git a/pkg/cloudbroker/grid/serialize.go b/pkg/cloudbroker/grid/serialize.go index d43c7dc0..8970b1ef 100644 --- a/pkg/cloudbroker/grid/serialize.go +++ b/pkg/cloudbroker/grid/serialize.go @@ -3,7 +3,7 @@ package grid import ( "encoding/json" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/serialization" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/serialization" ) // Serialize returns JSON-serialized []byte. Used as a wrapper over json.Marshal and json.MarshalIndent functions. diff --git a/pkg/cloudbroker/grid/services_restart.go b/pkg/cloudbroker/grid/services_restart.go deleted file mode 100644 index 03d46ed4..00000000 --- a/pkg/cloudbroker/grid/services_restart.go +++ /dev/null @@ -1,42 +0,0 @@ -package grid - -import ( - "context" - "net/http" - "strconv" - - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" -) - -// ServicesRestartRequest struct to restart services -type ServicesRestartRequest struct { - // Grid (platform) ID - // Required: true - GID uint64 `url:"gid" json:"gid" validate:"required"` - - // Node ID - // Required: true - NID uint64 `url:"nid" json:"nid" validate:"required"` -} - -// ServicesRestart restarts decort services on the node -func (g Grid) ServicesRestart(ctx context.Context, req ServicesRestartRequest) (bool, error) { - err := validators.ValidateRequest(req) - if err != nil { - return false, validators.ValidationErrors(validators.GetErrors(err)) - } - - url := "/cloudbroker/grid/servicesRestart" - - res, err := g.client.DecortApiCall(ctx, http.MethodPost, url, req) - if err != nil { - return false, err - } - - result, err := strconv.ParseBool(string(res)) - if err != nil { - return false, err - } - - return result, nil -} diff --git a/pkg/cloudbroker/grid/set_cpu_allocation_parameter.go b/pkg/cloudbroker/grid/set_cpu_allocation_parameter.go index 45e478f7..51ce2669 100644 --- a/pkg/cloudbroker/grid/set_cpu_allocation_parameter.go +++ b/pkg/cloudbroker/grid/set_cpu_allocation_parameter.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // SetCPUAllocationParameterRequest for setting CPU allocation parameter diff --git a/pkg/cloudbroker/grid/set_cpu_allocation_ratio.go b/pkg/cloudbroker/grid/set_cpu_allocation_ratio.go index 97cf75b1..a61511de 100644 --- a/pkg/cloudbroker/grid/set_cpu_allocation_ratio.go +++ b/pkg/cloudbroker/grid/set_cpu_allocation_ratio.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // SetCPUAllocationRatioRequest struct to set allocation diff --git a/pkg/cloudbroker/grid/set_cpu_allocation_ratio_for_vm.go b/pkg/cloudbroker/grid/set_cpu_allocation_ratio_for_vm.go index 1fbf3691..f483ab8e 100644 --- a/pkg/cloudbroker/grid/set_cpu_allocation_ratio_for_vm.go +++ b/pkg/cloudbroker/grid/set_cpu_allocation_ratio_for_vm.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // SetCPUAllocationRatioForVMRequest for setting CPU allocation ratio for computes diff --git a/pkg/cloudbroker/grid/set_mem_allocation_ratio.go b/pkg/cloudbroker/grid/set_mem_allocation_ratio.go index 744cd037..9d88c76a 100644 --- a/pkg/cloudbroker/grid/set_mem_allocation_ratio.go +++ b/pkg/cloudbroker/grid/set_mem_allocation_ratio.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // SetMemAllocationRatioRequest struct to set memory allocation diff --git a/pkg/cloudbroker/grid/set_password_policy.go b/pkg/cloudbroker/grid/set_password_policy.go index 929b9a74..c9af6869 100644 --- a/pkg/cloudbroker/grid/set_password_policy.go +++ b/pkg/cloudbroker/grid/set_password_policy.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // SetPasswordPolicyRequest struct to set password policy for a grid diff --git a/pkg/cloudbroker/grid/set_resources_limit.go b/pkg/cloudbroker/grid/set_resources_limit.go index 546e3605..22b1e106 100644 --- a/pkg/cloudbroker/grid/set_resources_limit.go +++ b/pkg/cloudbroker/grid/set_resources_limit.go @@ -5,8 +5,8 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/constants" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/constants" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // SetResourcesLimitRequest struct to set resources limit diff --git a/pkg/cloudbroker/group.go b/pkg/cloudbroker/group.go index 0c944739..50fdf942 100644 --- a/pkg/cloudbroker/group.go +++ b/pkg/cloudbroker/group.go @@ -1,6 +1,6 @@ package cloudbroker -import "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/pkg/cloudbroker/group" +import "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/pkg/cloudbroker/group" // Accessing the Group method group func (cb *CloudBroker) Group() *group.Group { diff --git a/pkg/cloudbroker/group/get.go b/pkg/cloudbroker/group/get.go deleted file mode 100644 index 167ddfc3..00000000 --- a/pkg/cloudbroker/group/get.go +++ /dev/null @@ -1,46 +0,0 @@ -package group - -import ( - "context" - "encoding/json" - "net/http" - - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" -) - -// GetRequest struct to get details of the specified group. -type GetRequest struct { - // Group ID - // Required: true - GroupID string `url:"groupId" json:"groupId" validate:"required"` -} - -// Get gets details of the specified group as an ItemGroup struct -func (g Group) Get(ctx context.Context, req GetRequest) (*ItemGroup, error) { - res, err := g.GetRaw(ctx, req) - if err != nil { - return nil, err - } - - info := ItemGroup{} - - err = json.Unmarshal(res, &info) - if err != nil { - return nil, err - } - - return &info, nil -} - -// GetRaw gets details of the specified group as an array of bytes -func (g Group) GetRaw(ctx context.Context, req GetRequest) ([]byte, error) { - err := validators.ValidateRequest(req) - if err != nil { - return nil, validators.ValidationErrors(validators.GetErrors(err)) - } - - url := "/cloudbroker/group/get" - - res, err := g.client.DecortApiCall(ctx, http.MethodPost, url, req) - return res, err -} diff --git a/pkg/cloudbroker/group/group.go b/pkg/cloudbroker/group/group.go index f2e91d68..0db8af9f 100644 --- a/pkg/cloudbroker/group/group.go +++ b/pkg/cloudbroker/group/group.go @@ -1,6 +1,6 @@ package group -import "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/interfaces" +import "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/interfaces" // Structure for creating request to group type Group struct { diff --git a/pkg/cloudbroker/group/list.go b/pkg/cloudbroker/group/list.go index 9ca54299..b6a05660 100644 --- a/pkg/cloudbroker/group/list.go +++ b/pkg/cloudbroker/group/list.go @@ -5,7 +5,7 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // ListRequest struct to get list of group instances. diff --git a/pkg/cloudbroker/image.go b/pkg/cloudbroker/image.go index e65531ff..48abd6a5 100644 --- a/pkg/cloudbroker/image.go +++ b/pkg/cloudbroker/image.go @@ -1,7 +1,7 @@ package cloudbroker import ( - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/pkg/cloudbroker/image" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/pkg/cloudbroker/image" ) // Accessing the Image method group diff --git a/pkg/cloudbroker/image/change_storage_policy.go b/pkg/cloudbroker/image/change_storage_policy.go index eb585e3f..95ee539e 100644 --- a/pkg/cloudbroker/image/change_storage_policy.go +++ b/pkg/cloudbroker/image/change_storage_policy.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) type ChangeStoragePolicyRequest struct { diff --git a/pkg/cloudbroker/image/computeci_set.go b/pkg/cloudbroker/image/computeci_set.go deleted file mode 100644 index bd968a89..00000000 --- a/pkg/cloudbroker/image/computeci_set.go +++ /dev/null @@ -1,42 +0,0 @@ -package image - -import ( - "context" - "net/http" - "strconv" - - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" -) - -// ComputeCISetRequest struct to set compute CI -type ComputeCISetRequest struct { - // ID of the image - // Required: true - ImageID uint64 `url:"imageId" json:"imageId" validate:"required"` - - // ID of the compute CI - // Required: true - ComputeCIID uint64 `url:"computeciId" json:"computeciId" validate:"required"` -} - -// ComputeCISet sets compute CI ID for image -func (i Image) ComputeCISet(ctx context.Context, req ComputeCISetRequest) (bool, error) { - err := validators.ValidateRequest(req) - if err != nil { - return false, validators.ValidationErrors(validators.GetErrors(err)) - } - - url := "/cloudbroker/image/computeciSet" - - res, err := i.client.DecortApiCall(ctx, http.MethodPost, url, req) - if err != nil { - return false, err - } - - result, err := strconv.ParseBool(string(res)) - if err != nil { - return false, err - } - - return result, nil -} diff --git a/pkg/cloudbroker/image/computeci_unset.go b/pkg/cloudbroker/image/computeci_unset.go deleted file mode 100644 index eb2d6483..00000000 --- a/pkg/cloudbroker/image/computeci_unset.go +++ /dev/null @@ -1,38 +0,0 @@ -package image - -import ( - "context" - "net/http" - "strconv" - - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" -) - -// ComputeCIUnsetRequest struct to unset compute CI -type ComputeCIUnsetRequest struct { - // ID of the image - // Required: true - ImageID uint64 `url:"imageId" json:"imageId" validate:"required"` -} - -// ComputeCIUnset unsets compute CI ID from image -func (i Image) ComputeCIUnset(ctx context.Context, req ComputeCIUnsetRequest) (bool, error) { - err := validators.ValidateRequest(req) - if err != nil { - return false, validators.ValidationErrors(validators.GetErrors(err)) - } - - url := "/cloudbroker/image/computeciUnset" - - res, err := i.client.DecortApiCall(ctx, http.MethodPost, url, req) - if err != nil { - return false, err - } - - result, err := strconv.ParseBool(string(res)) - if err != nil { - return false, err - } - - return result, nil -} diff --git a/pkg/cloudbroker/image/create_cdrom_image.go b/pkg/cloudbroker/image/create_cdrom_image.go index cd7a0999..adad34a4 100644 --- a/pkg/cloudbroker/image/create_cdrom_image.go +++ b/pkg/cloudbroker/image/create_cdrom_image.go @@ -6,7 +6,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // CreateCDROMImageRequest struct to create CD-ROM image diff --git a/pkg/cloudbroker/image/create_image.go b/pkg/cloudbroker/image/create_image.go index 7c605993..b4ec0ca1 100644 --- a/pkg/cloudbroker/image/create_image.go +++ b/pkg/cloudbroker/image/create_image.go @@ -6,7 +6,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // CreateRequest struct to create image diff --git a/pkg/cloudbroker/image/create_multi_image.go b/pkg/cloudbroker/image/create_multi_image.go index 9ca92af1..69421910 100644 --- a/pkg/cloudbroker/image/create_multi_image.go +++ b/pkg/cloudbroker/image/create_multi_image.go @@ -5,8 +5,8 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/constants" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/constants" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // CreateMultiImageRequest struct to create multi image diff --git a/pkg/cloudbroker/image/create_virtual.go b/pkg/cloudbroker/image/create_virtual.go index 62b94c07..103138a1 100644 --- a/pkg/cloudbroker/image/create_virtual.go +++ b/pkg/cloudbroker/image/create_virtual.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // CreateVirtualRequest struct to create virtual image diff --git a/pkg/cloudbroker/image/delete.go b/pkg/cloudbroker/image/delete.go index ed79ef61..7f82248b 100644 --- a/pkg/cloudbroker/image/delete.go +++ b/pkg/cloudbroker/image/delete.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // DeleteRequest struct to delete image diff --git a/pkg/cloudbroker/image/delete_cdrom_image.go b/pkg/cloudbroker/image/delete_cdrom_image.go index f3d0455b..6e7707f7 100644 --- a/pkg/cloudbroker/image/delete_cdrom_image.go +++ b/pkg/cloudbroker/image/delete_cdrom_image.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // DeleteCDROMImageRequest struct to delete CD-ROM image diff --git a/pkg/cloudbroker/image/delete_images.go b/pkg/cloudbroker/image/delete_images.go index cd569eee..6fba97fa 100644 --- a/pkg/cloudbroker/image/delete_images.go +++ b/pkg/cloudbroker/image/delete_images.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // DeleteImagesRequest struct to delete images diff --git a/pkg/cloudbroker/image/disable.go b/pkg/cloudbroker/image/disable.go index aff8625f..041e25a4 100644 --- a/pkg/cloudbroker/image/disable.go +++ b/pkg/cloudbroker/image/disable.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // DisableRequest struct to disable image diff --git a/pkg/cloudbroker/image/edit.go b/pkg/cloudbroker/image/edit.go index 359637aa..44509351 100644 --- a/pkg/cloudbroker/image/edit.go +++ b/pkg/cloudbroker/image/edit.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // EditRequest struct to edit image diff --git a/pkg/cloudbroker/image/enable.go b/pkg/cloudbroker/image/enable.go index 28f170e4..c1fa4c98 100644 --- a/pkg/cloudbroker/image/enable.go +++ b/pkg/cloudbroker/image/enable.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // EnableRequest struct to enable image diff --git a/pkg/cloudbroker/image/get.go b/pkg/cloudbroker/image/get.go index 056fda9d..505f62da 100644 --- a/pkg/cloudbroker/image/get.go +++ b/pkg/cloudbroker/image/get.go @@ -5,7 +5,7 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // GetRequest struct to get image details diff --git a/pkg/cloudbroker/image/grant_access.go b/pkg/cloudbroker/image/grant_access.go index 783175c4..1434d846 100644 --- a/pkg/cloudbroker/image/grant_access.go +++ b/pkg/cloudbroker/image/grant_access.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // GrantAccessRequest struct to share image with accounts diff --git a/pkg/cloudbroker/image/image.go b/pkg/cloudbroker/image/image.go index 6de0a482..069c634e 100644 --- a/pkg/cloudbroker/image/image.go +++ b/pkg/cloudbroker/image/image.go @@ -1,7 +1,7 @@ // Lists all the images. A image is a template which can be used to deploy machines package image -import "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/interfaces" +import "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/interfaces" // Structure for creating request to image type Image struct { diff --git a/pkg/cloudbroker/image/link.go b/pkg/cloudbroker/image/link.go index 107764c6..bac8ba19 100644 --- a/pkg/cloudbroker/image/link.go +++ b/pkg/cloudbroker/image/link.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // LinkRequest struct to link virtual image to another image diff --git a/pkg/cloudbroker/image/list.go b/pkg/cloudbroker/image/list.go index 4aeb13c9..afc32267 100644 --- a/pkg/cloudbroker/image/list.go +++ b/pkg/cloudbroker/image/list.go @@ -5,8 +5,8 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/constants" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/constants" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // ListRequest struct to get list of available images diff --git a/pkg/cloudbroker/image/multi_image_add_links.go b/pkg/cloudbroker/image/multi_image_add_links.go index f12a967d..91ec71a6 100644 --- a/pkg/cloudbroker/image/multi_image_add_links.go +++ b/pkg/cloudbroker/image/multi_image_add_links.go @@ -5,8 +5,8 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/constants" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/constants" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // MultiImageAddLinksRequest struct to add links to multi image diff --git a/pkg/cloudbroker/image/multi_image_del_links.go b/pkg/cloudbroker/image/multi_image_del_links.go index 9aef9808..d2cea6d3 100644 --- a/pkg/cloudbroker/image/multi_image_del_links.go +++ b/pkg/cloudbroker/image/multi_image_del_links.go @@ -5,8 +5,8 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/constants" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/constants" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // MultiImageDelLinksRequest struct to delete links from multi image diff --git a/pkg/cloudbroker/image/multi_image_export.go b/pkg/cloudbroker/image/multi_image_export.go index 2af7ec6f..eb7515e3 100644 --- a/pkg/cloudbroker/image/multi_image_export.go +++ b/pkg/cloudbroker/image/multi_image_export.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // MultiImageExportRequest struct to export multi image to a pool diff --git a/pkg/cloudbroker/image/rename.go b/pkg/cloudbroker/image/rename.go index a02e9d4b..a93cffcd 100644 --- a/pkg/cloudbroker/image/rename.go +++ b/pkg/cloudbroker/image/rename.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // RenameRequest struct to rename image diff --git a/pkg/cloudbroker/image/revoke_access.go b/pkg/cloudbroker/image/revoke_access.go index 0f79dd63..0e5986b8 100644 --- a/pkg/cloudbroker/image/revoke_access.go +++ b/pkg/cloudbroker/image/revoke_access.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // RevokeAccessRequest struct to unshare image with accounts diff --git a/pkg/cloudbroker/image/serialize.go b/pkg/cloudbroker/image/serialize.go index dc4710ad..54f2ecb7 100644 --- a/pkg/cloudbroker/image/serialize.go +++ b/pkg/cloudbroker/image/serialize.go @@ -3,7 +3,7 @@ package image import ( "encoding/json" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/serialization" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/serialization" ) // Serialize returns JSON-serialized []byte. Used as a wrapper over json.Marshal and json.MarshalIndent functions. diff --git a/pkg/cloudbroker/image/share.go b/pkg/cloudbroker/image/share.go index 5eb49ae2..b427f65d 100644 --- a/pkg/cloudbroker/image/share.go +++ b/pkg/cloudbroker/image/share.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // ShareRequest struct to share image diff --git a/pkg/cloudbroker/k8ci.go b/pkg/cloudbroker/k8ci.go index 86b1e1b8..6bb20474 100644 --- a/pkg/cloudbroker/k8ci.go +++ b/pkg/cloudbroker/k8ci.go @@ -1,7 +1,7 @@ package cloudbroker import ( - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/pkg/cloudbroker/k8ci" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/pkg/cloudbroker/k8ci" ) // Accessing the K8CI method group diff --git a/pkg/cloudbroker/k8ci/access_add.go b/pkg/cloudbroker/k8ci/access_add.go index 85704db2..810bdbbf 100644 --- a/pkg/cloudbroker/k8ci/access_add.go +++ b/pkg/cloudbroker/k8ci/access_add.go @@ -4,7 +4,7 @@ import ( "context" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // AccessAddRequest struct for adding permission to access to account for a k8ci diff --git a/pkg/cloudbroker/k8ci/access_remove.go b/pkg/cloudbroker/k8ci/access_remove.go index bf3782af..d811f6ca 100644 --- a/pkg/cloudbroker/k8ci/access_remove.go +++ b/pkg/cloudbroker/k8ci/access_remove.go @@ -4,7 +4,7 @@ import ( "context" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // AccessRemoveRequest struct for removing permission to access to account for a k8ci diff --git a/pkg/cloudbroker/k8ci/create.go b/pkg/cloudbroker/k8ci/create.go index 28720011..04c58e01 100644 --- a/pkg/cloudbroker/k8ci/create.go +++ b/pkg/cloudbroker/k8ci/create.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // CreateRequest struct to create K8CI instance diff --git a/pkg/cloudbroker/k8ci/delete.go b/pkg/cloudbroker/k8ci/delete.go index ea4cc458..3fe771af 100644 --- a/pkg/cloudbroker/k8ci/delete.go +++ b/pkg/cloudbroker/k8ci/delete.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // DeleteRequest struct to delete K8CI diff --git a/pkg/cloudbroker/k8ci/disable.go b/pkg/cloudbroker/k8ci/disable.go index f0f197d5..acbe6344 100644 --- a/pkg/cloudbroker/k8ci/disable.go +++ b/pkg/cloudbroker/k8ci/disable.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // DisableRequest struct to disable K8CI diff --git a/pkg/cloudbroker/k8ci/enable.go b/pkg/cloudbroker/k8ci/enable.go index 1af5e2de..f83a1cc1 100644 --- a/pkg/cloudbroker/k8ci/enable.go +++ b/pkg/cloudbroker/k8ci/enable.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // EnableRequest struct to enable K8CI diff --git a/pkg/cloudbroker/k8ci/get.go b/pkg/cloudbroker/k8ci/get.go index 108c91ad..874c671b 100644 --- a/pkg/cloudbroker/k8ci/get.go +++ b/pkg/cloudbroker/k8ci/get.go @@ -5,7 +5,7 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // GetRequest struct to get information about K8CI diff --git a/pkg/cloudbroker/k8ci/k8ci.go b/pkg/cloudbroker/k8ci/k8ci.go index 81504d1e..7b2437ec 100644 --- a/pkg/cloudbroker/k8ci/k8ci.go +++ b/pkg/cloudbroker/k8ci/k8ci.go @@ -2,7 +2,7 @@ package k8ci import ( - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/interfaces" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/interfaces" ) // Structure for creating request to K8CI diff --git a/pkg/cloudbroker/k8ci/list.go b/pkg/cloudbroker/k8ci/list.go index 53b36a80..672ed471 100644 --- a/pkg/cloudbroker/k8ci/list.go +++ b/pkg/cloudbroker/k8ci/list.go @@ -5,7 +5,7 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // ListRequest struct to get list information about images diff --git a/pkg/cloudbroker/k8ci/list_deleted.go b/pkg/cloudbroker/k8ci/list_deleted.go index a8c79be7..bcfb544a 100644 --- a/pkg/cloudbroker/k8ci/list_deleted.go +++ b/pkg/cloudbroker/k8ci/list_deleted.go @@ -5,7 +5,7 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // ListDeletedRequest struct to get list information about deleted k8ci items diff --git a/pkg/cloudbroker/k8ci/restore.go b/pkg/cloudbroker/k8ci/restore.go index f14c1052..84dfcf34 100644 --- a/pkg/cloudbroker/k8ci/restore.go +++ b/pkg/cloudbroker/k8ci/restore.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // RestoreRequest struct to restore K8CI diff --git a/pkg/cloudbroker/k8ci/serialize.go b/pkg/cloudbroker/k8ci/serialize.go index be1196a7..c07301fb 100644 --- a/pkg/cloudbroker/k8ci/serialize.go +++ b/pkg/cloudbroker/k8ci/serialize.go @@ -3,7 +3,7 @@ package k8ci import ( "encoding/json" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/serialization" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/serialization" ) // Serialize returns JSON-serialized []byte. Used as a wrapper over json.Marshal and json.MarshalIndent functions. diff --git a/pkg/cloudbroker/k8s.go b/pkg/cloudbroker/k8s.go index 61535106..ed268cd0 100644 --- a/pkg/cloudbroker/k8s.go +++ b/pkg/cloudbroker/k8s.go @@ -1,7 +1,7 @@ package cloudbroker import ( - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/pkg/cloudbroker/k8s" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/pkg/cloudbroker/k8s" ) // Accessing the K8S method group diff --git a/pkg/cloudbroker/k8s/create.go b/pkg/cloudbroker/k8s/create.go index e15f26d4..b012c23e 100644 --- a/pkg/cloudbroker/k8s/create.go +++ b/pkg/cloudbroker/k8s/create.go @@ -5,7 +5,7 @@ import ( "net/http" "strings" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // CreateRequest struct to create K8S @@ -159,7 +159,7 @@ type CreateRequest struct { // Meta data for working group computes, format YAML "user_data": 1111 // Required: false - UserData string `url:"userData,omitempty" json:"userData,omitempty"` + UserData interface{} `url:"userData,omitempty" json:"userData,omitempty"` // Use only selected ExtNet for infrastructure connections // Required: false diff --git a/pkg/cloudbroker/k8s/delete.go b/pkg/cloudbroker/k8s/delete.go index c5a635c3..37302c85 100644 --- a/pkg/cloudbroker/k8s/delete.go +++ b/pkg/cloudbroker/k8s/delete.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // DeleteRequest struct to delete kubernetes cluster diff --git a/pkg/cloudbroker/k8s/delete_master_from_group.go b/pkg/cloudbroker/k8s/delete_master_from_group.go index 8ab0ffdc..6af7dd51 100644 --- a/pkg/cloudbroker/k8s/delete_master_from_group.go +++ b/pkg/cloudbroker/k8s/delete_master_from_group.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // DeleteMasterFromGroupRequest struct to delete master from group diff --git a/pkg/cloudbroker/k8s/delete_worker_from_group.go b/pkg/cloudbroker/k8s/delete_worker_from_group.go index f094932e..eac7ad36 100644 --- a/pkg/cloudbroker/k8s/delete_worker_from_group.go +++ b/pkg/cloudbroker/k8s/delete_worker_from_group.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // DeleteWorkerFromGroupRequest struct to delete worker from group diff --git a/pkg/cloudbroker/k8s/disable.go b/pkg/cloudbroker/k8s/disable.go index 61db8b9a..4ba812e2 100644 --- a/pkg/cloudbroker/k8s/disable.go +++ b/pkg/cloudbroker/k8s/disable.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // DisableRequest struct to disable kubernetes cluster diff --git a/pkg/cloudbroker/k8s/enable.go b/pkg/cloudbroker/k8s/enable.go index ec95a826..696d334d 100644 --- a/pkg/cloudbroker/k8s/enable.go +++ b/pkg/cloudbroker/k8s/enable.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // EnableRequest struct to enable kubernetes cluster diff --git a/pkg/cloudbroker/k8s/find_group_by_label.go b/pkg/cloudbroker/k8s/find_group_by_label.go index a187114b..326cf08d 100644 --- a/pkg/cloudbroker/k8s/find_group_by_label.go +++ b/pkg/cloudbroker/k8s/find_group_by_label.go @@ -5,7 +5,7 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // FindGroupByLabelRequest struct for get information about group of kubernetes cluster diff --git a/pkg/cloudbroker/k8s/get.go b/pkg/cloudbroker/k8s/get.go index 1b66fd67..a99cc62c 100644 --- a/pkg/cloudbroker/k8s/get.go +++ b/pkg/cloudbroker/k8s/get.go @@ -5,7 +5,7 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // GetRequest struct to get detailed information about kubernetes cluster diff --git a/pkg/cloudbroker/k8s/get_config.go b/pkg/cloudbroker/k8s/get_config.go index 70f35aaf..1cd8723b 100644 --- a/pkg/cloudbroker/k8s/get_config.go +++ b/pkg/cloudbroker/k8s/get_config.go @@ -5,7 +5,7 @@ import ( "net/http" "strings" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // GetConfigRequest struct to get configuration of kubernetes cluster diff --git a/pkg/cloudbroker/k8s/get_node_annotations.go b/pkg/cloudbroker/k8s/get_node_annotations.go index 85c34e8a..8c120226 100644 --- a/pkg/cloudbroker/k8s/get_node_annotations.go +++ b/pkg/cloudbroker/k8s/get_node_annotations.go @@ -5,7 +5,7 @@ import ( "net/http" "strings" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // GetNodeAnnotationsRequest struct to get node annotations diff --git a/pkg/cloudbroker/k8s/get_node_labels.go b/pkg/cloudbroker/k8s/get_node_labels.go index 10cfc170..fa5af95e 100644 --- a/pkg/cloudbroker/k8s/get_node_labels.go +++ b/pkg/cloudbroker/k8s/get_node_labels.go @@ -5,7 +5,7 @@ import ( "net/http" "strings" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // GetNodeLabelsRequest struct to get worker node labels diff --git a/pkg/cloudbroker/k8s/get_node_taints.go b/pkg/cloudbroker/k8s/get_node_taints.go index 6b403c21..156daa4d 100644 --- a/pkg/cloudbroker/k8s/get_node_taints.go +++ b/pkg/cloudbroker/k8s/get_node_taints.go @@ -5,7 +5,7 @@ import ( "net/http" "strings" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // GetNodeTaintsRequest struct to get node taints diff --git a/pkg/cloudbroker/k8s/get_worker_nodes_meta_data.go b/pkg/cloudbroker/k8s/get_worker_nodes_meta_data.go index 10fae0f4..593afb5e 100644 --- a/pkg/cloudbroker/k8s/get_worker_nodes_meta_data.go +++ b/pkg/cloudbroker/k8s/get_worker_nodes_meta_data.go @@ -4,7 +4,7 @@ import ( "context" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // GetWorkerNodesMetaDataRequest struct to get worker group metadata by ID diff --git a/pkg/cloudbroker/k8s/k8s.go b/pkg/cloudbroker/k8s/k8s.go index d07d8851..f635b3a9 100644 --- a/pkg/cloudbroker/k8s/k8s.go +++ b/pkg/cloudbroker/k8s/k8s.go @@ -2,7 +2,7 @@ package k8s import ( - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/interfaces" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/interfaces" ) // Structure for creating request to K8S diff --git a/pkg/cloudbroker/k8s/list.go b/pkg/cloudbroker/k8s/list.go index 8747767c..2b0b0c7c 100644 --- a/pkg/cloudbroker/k8s/list.go +++ b/pkg/cloudbroker/k8s/list.go @@ -5,7 +5,7 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // ListRequest struct to get list information K8S diff --git a/pkg/cloudbroker/k8s/list_deleted.go b/pkg/cloudbroker/k8s/list_deleted.go index 07dfa70f..c3dc5da5 100644 --- a/pkg/cloudbroker/k8s/list_deleted.go +++ b/pkg/cloudbroker/k8s/list_deleted.go @@ -5,7 +5,7 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // ListDeletedRequest struct to get list of deleted kubernetes cluster diff --git a/pkg/cloudbroker/k8s/migrate_to_zone.go b/pkg/cloudbroker/k8s/migrate_to_zone.go index 5d96d973..0bab84b1 100644 --- a/pkg/cloudbroker/k8s/migrate_to_zone.go +++ b/pkg/cloudbroker/k8s/migrate_to_zone.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // MigrateToZone struct to move k8s cluster to another zone diff --git a/pkg/cloudbroker/k8s/restore.go b/pkg/cloudbroker/k8s/restore.go index 0e1e26f6..4ef45830 100644 --- a/pkg/cloudbroker/k8s/restore.go +++ b/pkg/cloudbroker/k8s/restore.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // RestoreRequest struct to restore kubernetes cluster diff --git a/pkg/cloudbroker/k8s/serialize.go b/pkg/cloudbroker/k8s/serialize.go index 129ae472..4d3ce9f8 100644 --- a/pkg/cloudbroker/k8s/serialize.go +++ b/pkg/cloudbroker/k8s/serialize.go @@ -3,7 +3,7 @@ package k8s import ( "encoding/json" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/serialization" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/serialization" ) // Serialize returns JSON-serialized []byte. Used as a wrapper over json.Marshal and json.MarshalIndent functions. diff --git a/pkg/cloudbroker/k8s/start.go b/pkg/cloudbroker/k8s/start.go index a84da735..4e985e00 100644 --- a/pkg/cloudbroker/k8s/start.go +++ b/pkg/cloudbroker/k8s/start.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // StartRequest struct to start kubernetes cluster diff --git a/pkg/cloudbroker/k8s/stop.go b/pkg/cloudbroker/k8s/stop.go index 8a4d3daf..f158d4aa 100644 --- a/pkg/cloudbroker/k8s/stop.go +++ b/pkg/cloudbroker/k8s/stop.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // StopRequest struct to stop kubernetes cluster diff --git a/pkg/cloudbroker/k8s/update.go b/pkg/cloudbroker/k8s/update.go index a1bccb17..b5fc650a 100644 --- a/pkg/cloudbroker/k8s/update.go +++ b/pkg/cloudbroker/k8s/update.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // UpdateRequest struct to update kubernetes cluster diff --git a/pkg/cloudbroker/k8s/update_worker_nodes_meta_data.go b/pkg/cloudbroker/k8s/update_worker_nodes_meta_data.go index 51afa15e..f83cf4d0 100644 --- a/pkg/cloudbroker/k8s/update_worker_nodes_meta_data.go +++ b/pkg/cloudbroker/k8s/update_worker_nodes_meta_data.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // UpdateWorkerNodesMetaDataRequest struct to add worker to a kubernetes cluster @@ -20,7 +20,7 @@ type UpdateWorkerNodesMetaDataRequest struct { // Meta data for working group computes, format YAML "user_data": 1111 // Required: true - UserData string `url:"userData" json:"userData" validate:"required"` + UserData interface{} `url:"userData" json:"userData" validate:"required"` } // UpdateWorkerNodesMetaData adds worker nodes to a kubernetes cluster diff --git a/pkg/cloudbroker/k8s/worker_add.go b/pkg/cloudbroker/k8s/worker_add.go index 5fbd7b4b..1d7a2db6 100644 --- a/pkg/cloudbroker/k8s/worker_add.go +++ b/pkg/cloudbroker/k8s/worker_add.go @@ -5,7 +5,7 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // WorkerAddRequest struct to add worker to a kubernetes cluster diff --git a/pkg/cloudbroker/k8s/worker_reset.go b/pkg/cloudbroker/k8s/worker_reset.go index c02db8f3..52b026d6 100644 --- a/pkg/cloudbroker/k8s/worker_reset.go +++ b/pkg/cloudbroker/k8s/worker_reset.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // WorkerResetRequest struct for hard reset kubernetes cluster diff --git a/pkg/cloudbroker/k8s/worker_restart.go b/pkg/cloudbroker/k8s/worker_restart.go index 774b2854..5ecc5959 100644 --- a/pkg/cloudbroker/k8s/worker_restart.go +++ b/pkg/cloudbroker/k8s/worker_restart.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // WorkerRestartRequest struct to restart worker node diff --git a/pkg/cloudbroker/k8s/workers_group_add.go b/pkg/cloudbroker/k8s/workers_group_add.go index da4df0d9..5bee2991 100644 --- a/pkg/cloudbroker/k8s/workers_group_add.go +++ b/pkg/cloudbroker/k8s/workers_group_add.go @@ -5,7 +5,7 @@ import ( "net/http" "strings" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // WorkersGroupAddRequest struct to add workers group diff --git a/pkg/cloudbroker/k8s/workers_group_delete.go b/pkg/cloudbroker/k8s/workers_group_delete.go index 690c1cfb..e1288bdb 100644 --- a/pkg/cloudbroker/k8s/workers_group_delete.go +++ b/pkg/cloudbroker/k8s/workers_group_delete.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // WorkersGroupDeleteRequest struct to delete workers group diff --git a/pkg/cloudbroker/k8s/workers_group_get_by_name.go b/pkg/cloudbroker/k8s/workers_group_get_by_name.go index 7a62236f..fcb16059 100644 --- a/pkg/cloudbroker/k8s/workers_group_get_by_name.go +++ b/pkg/cloudbroker/k8s/workers_group_get_by_name.go @@ -5,7 +5,7 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // WorkersGroupGetByNameRequest struct to get information about worker group diff --git a/pkg/cloudbroker/kvmx86.go b/pkg/cloudbroker/kvmx86.go index a8d6fa83..40bde45d 100644 --- a/pkg/cloudbroker/kvmx86.go +++ b/pkg/cloudbroker/kvmx86.go @@ -1,7 +1,7 @@ package cloudbroker import ( - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/pkg/cloudbroker/kvmx86" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/pkg/cloudbroker/kvmx86" ) // Accessing the KVMX86 method group diff --git a/pkg/cloudbroker/kvmx86/create.go b/pkg/cloudbroker/kvmx86/create.go index 26846e1b..c403d104 100644 --- a/pkg/cloudbroker/kvmx86/create.go +++ b/pkg/cloudbroker/kvmx86/create.go @@ -2,11 +2,12 @@ package kvmx86 import ( "context" + "encoding/json" "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/constants" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/constants" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) type Interface struct { @@ -79,6 +80,10 @@ type Interface struct { // SDN Logical Port Description // Required: false SDNLogicalPortDescription string `url:"sdn_logical_port_description,omitempty" json:"sdn_logical_port_description,omitempty"` + + // List of QoS Policy IDs to apply to this interface (default: []), Allow used only with netType VINS, EXTNET and DPDK + // Required: false + QoSPolicies []uint64 `url:"qos_policies,omitempty" json:"qos_policies,omitempty"` } // DataDisk detailed struct for DataDisks field in CreateRequest, CreateBlankRequest and MassCreateRequest @@ -120,6 +125,11 @@ type DataDisk struct { // Discard // Required: false Discard string `url:"discard,omitempty" json:"discard,omitempty"` + + // Attach disk in read-only mode + // Required: false + // Default: false + ReadOnly bool `url:"read_only,omitempty" json:"read_only,omitempty"` } // CreateRequest struct to create KVM x86 VM @@ -209,12 +219,12 @@ type CreateRequest struct { // loose (use NUMA affinity if possible) // Required: false // Default: none - NumaAffinity string `url:"numaAffinity,omitempty" json:"numaAffinity,omitempty" validate:"omitempty,numaAffinity"` + NumaAffinity string `url:"numa_affinity,omitempty" json:"numa_affinity,omitempty" validate:"omitempty,numaAffinity"` // Run VM on dedicated CPUs. To use this feature, the system must be pre-configured by allocating CPUs on the physical node // Required: false // Default: false - CPUPin bool `url:"cpupin" json:"cpupin"` + CPUPin bool `url:"cpu_pin" json:"cpu_pin"` // Type of the emulated system, Q35 or i440fx // Required: false @@ -224,7 +234,7 @@ type CreateRequest struct { // Use Huge Pages to allocate RAM of the virtual machine. The system must be pre-configured by allocating Huge Pages on the physical node // Required: false // Default: false - HPBacked bool `url:"hpBacked" json:"hpBacked"` + HPBacked bool `url:"hp_backed" json:"hp_backed"` // Recommended isolated CPUs. Field is ignored if compute.cpupin=False or compute.pinned=False // Required: false @@ -255,6 +265,11 @@ type CreateRequest struct { // Required: false // Default: default Clock string `url:"clock,omitempty" json:"clock,omitempty"` + + // Watchdog action + // Required: false + // Default: reset + WatchdogAction string `url:"watchdog_action,omitempty" json:"watchdog_action,omitempty" validate:"omitempty,watchdogAction"` } // GetRAM returns RAM field values @@ -266,6 +281,11 @@ func (r CreateRequest) GetRAM() map[string]uint64 { return res } +type wrapperCreateRequest struct { + CreateRequest + AsyncMode bool `json:"asyncMode"` +} + // Create creates KVM PowerPC VM based on specified OS image func (k KVMX86) Create(ctx context.Context, req CreateRequest) (uint64, error) { err := validators.ValidateRequest(req) @@ -275,10 +295,40 @@ func (k KVMX86) Create(ctx context.Context, req CreateRequest) (uint64, error) { url := "/cloudbroker/kvmx86/create" - res, err := k.client.DecortApiCallCtype(ctx, http.MethodPost, url, constants.MIMEJSON, req) + res, err := k.client.DecortApiCallCtype(ctx, http.MethodPost, url, constants.MIMEJSON, wrapperCreateRequest{ + CreateRequest: req, + AsyncMode: false, + }) if err != nil { return 0, err } return strconv.ParseUint(string(res), 10, 64) } + +// CreateAsync creates KVM x86 VM based on specified OS image in async mode +func (k KVMX86) CreateAsync(ctx context.Context, req CreateRequest) (string, error) { + err := validators.ValidateRequest(req) + if err != nil { + return "", validators.ValidationErrors(validators.GetErrors(err)) + } + + url := "/cloudbroker/kvmx86/create" + + res, err := k.client.DecortApiCallCtype(ctx, http.MethodPost, url, constants.MIMEJSON, wrapperCreateRequest{ + CreateRequest: req, + AsyncMode: true, + }) + if err != nil { + return "", err + } + + var taskID string + + err = json.Unmarshal(res, &taskID) + if err != nil { + return "", err + } + + return taskID, nil +} diff --git a/pkg/cloudbroker/kvmx86/create_blank.go b/pkg/cloudbroker/kvmx86/create_blank.go index 6d2d33db..73bd3585 100644 --- a/pkg/cloudbroker/kvmx86/create_blank.go +++ b/pkg/cloudbroker/kvmx86/create_blank.go @@ -5,8 +5,8 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/constants" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/constants" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // CreateBlankRequest struct to create KVM x86 VM from scratch @@ -137,6 +137,11 @@ type CreateBlankRequest struct { // Required: false // Default: default Clock string `url:"clock,omitempty" json:"clock,omitempty"` + + // Watchdog action + // Required: false + // Default: reset + WatchdogAction string `url:"watchdog_action,omitempty" json:"watchdog_action,omitempty" validate:"omitempty,watchdogAction"` } // GetRAM returns RAM field values diff --git a/pkg/cloudbroker/kvmx86/kvmx86.go b/pkg/cloudbroker/kvmx86/kvmx86.go index a96df840..1cb389ec 100644 --- a/pkg/cloudbroker/kvmx86/kvmx86.go +++ b/pkg/cloudbroker/kvmx86/kvmx86.go @@ -1,7 +1,7 @@ // API to manage KVM x86 compute instances (x86 VMs) package kvmx86 -import "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/interfaces" +import "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/interfaces" // Structure for creating request to KVMX86 type KVMX86 struct { diff --git a/pkg/cloudbroker/kvmx86/mass_create.go b/pkg/cloudbroker/kvmx86/mass_create.go index 3cf0cc91..10a21a14 100644 --- a/pkg/cloudbroker/kvmx86/mass_create.go +++ b/pkg/cloudbroker/kvmx86/mass_create.go @@ -7,8 +7,8 @@ import ( "fmt" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/constants" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/constants" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) type InterfaceMassCreate struct { @@ -76,6 +76,10 @@ type InterfaceMassCreate struct { // SDN Logical Port Description // Required: false SDNLogicalPortDescription string `url:"sdn_logical_port_description,omitempty" json:"sdn_logical_port_description,omitempty"` + + // List of QoS Policy IDs to apply to this interface (default: []), Allow used only with netType VINS, EXTNET and DPDK + // Required: false + QoSPolicies []uint64 `url:"qos_policies,omitempty" json:"qos_policies,omitempty"` } // MassCreateRequest struct to mass create KVM x86 @@ -183,6 +187,11 @@ type MassCreateRequest struct { // Required: false // Default: default Clock string `url:"clock,omitempty" json:"clock,omitempty"` + + // Watchdog action + // Required: false + // Default: reset + WatchdogAction string `url:"watchdog_action,omitempty" json:"watchdog_action,omitempty" validate:"omitempty,watchdogAction"` } // GetRAM returns RAM field values diff --git a/pkg/cloudbroker/lb.go b/pkg/cloudbroker/lb.go index d430f734..ff25ae59 100644 --- a/pkg/cloudbroker/lb.go +++ b/pkg/cloudbroker/lb.go @@ -1,6 +1,6 @@ package cloudbroker -import "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/pkg/cloudbroker/lb" +import "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/pkg/cloudbroker/lb" // Accessing the LB method group func (cb *CloudBroker) LB() *lb.LB { diff --git a/pkg/cloudbroker/lb/backend_create.go b/pkg/cloudbroker/lb/backend_create.go index 8281e545..53527b8a 100644 --- a/pkg/cloudbroker/lb/backend_create.go +++ b/pkg/cloudbroker/lb/backend_create.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // BackendCreateRequest struct to create backend diff --git a/pkg/cloudbroker/lb/backend_delete.go b/pkg/cloudbroker/lb/backend_delete.go index 39a286cc..9dd45472 100644 --- a/pkg/cloudbroker/lb/backend_delete.go +++ b/pkg/cloudbroker/lb/backend_delete.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // BackendDeleteRequest struct to delete backend diff --git a/pkg/cloudbroker/lb/backend_server_add.go b/pkg/cloudbroker/lb/backend_server_add.go index d424a9f6..c3b659f3 100644 --- a/pkg/cloudbroker/lb/backend_server_add.go +++ b/pkg/cloudbroker/lb/backend_server_add.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // BackendServerAddRequest struct to add server definition to the backend diff --git a/pkg/cloudbroker/lb/backend_server_delete.go b/pkg/cloudbroker/lb/backend_server_delete.go index e433855d..51103694 100644 --- a/pkg/cloudbroker/lb/backend_server_delete.go +++ b/pkg/cloudbroker/lb/backend_server_delete.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // BackendServerDeleteRequest struct to delete server definition diff --git a/pkg/cloudbroker/lb/backend_server_update.go b/pkg/cloudbroker/lb/backend_server_update.go index 1b8037ed..abb551da 100644 --- a/pkg/cloudbroker/lb/backend_server_update.go +++ b/pkg/cloudbroker/lb/backend_server_update.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // BackendServerUpdateRequest struct to update server diff --git a/pkg/cloudbroker/lb/backend_update.go b/pkg/cloudbroker/lb/backend_update.go index bbb79647..0638c93a 100644 --- a/pkg/cloudbroker/lb/backend_update.go +++ b/pkg/cloudbroker/lb/backend_update.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // BackendUpdateRequest struct to update backend diff --git a/pkg/cloudbroker/lb/config_reset.go b/pkg/cloudbroker/lb/config_reset.go index bf60ff97..7fa9cfba 100644 --- a/pkg/cloudbroker/lb/config_reset.go +++ b/pkg/cloudbroker/lb/config_reset.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // ConfigResetRequest struct to reset config diff --git a/pkg/cloudbroker/lb/create.go b/pkg/cloudbroker/lb/create.go index 061d688c..957acc80 100644 --- a/pkg/cloudbroker/lb/create.go +++ b/pkg/cloudbroker/lb/create.go @@ -7,7 +7,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // CreateRequest struct to create load balancer diff --git a/pkg/cloudbroker/lb/delete.go b/pkg/cloudbroker/lb/delete.go index 2a1d1e23..1167e992 100644 --- a/pkg/cloudbroker/lb/delete.go +++ b/pkg/cloudbroker/lb/delete.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // DeleteRequest struct to delete load balancer diff --git a/pkg/cloudbroker/lb/disable.go b/pkg/cloudbroker/lb/disable.go index db3c429d..c4a131f7 100644 --- a/pkg/cloudbroker/lb/disable.go +++ b/pkg/cloudbroker/lb/disable.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // DisableRequest struct to disable load balancer diff --git a/pkg/cloudbroker/lb/enable.go b/pkg/cloudbroker/lb/enable.go index 77ff85cd..6f53b1b1 100644 --- a/pkg/cloudbroker/lb/enable.go +++ b/pkg/cloudbroker/lb/enable.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // EnableRequest struct to enable load balancer diff --git a/pkg/cloudbroker/lb/filter.go b/pkg/cloudbroker/lb/filter.go index 9daab30a..b2c00cb3 100644 --- a/pkg/cloudbroker/lb/filter.go +++ b/pkg/cloudbroker/lb/filter.go @@ -3,8 +3,8 @@ package lb import ( "context" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/interfaces" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/pkg/cloudbroker/k8s" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/interfaces" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/pkg/cloudbroker/k8s" ) // FilterByID returns ListLB with specified ID. diff --git a/pkg/cloudbroker/lb/frontend_bind.go b/pkg/cloudbroker/lb/frontend_bind.go index 4bae9f29..c09ec832 100644 --- a/pkg/cloudbroker/lb/frontend_bind.go +++ b/pkg/cloudbroker/lb/frontend_bind.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // FrontendBindRequest struct for frontend bind diff --git a/pkg/cloudbroker/lb/frontend_bind_delete.go b/pkg/cloudbroker/lb/frontend_bind_delete.go index a7e8a681..6cf6d197 100644 --- a/pkg/cloudbroker/lb/frontend_bind_delete.go +++ b/pkg/cloudbroker/lb/frontend_bind_delete.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // FrontendBindDeleteRequest struct to delete bind diff --git a/pkg/cloudbroker/lb/frontend_binding_update.go b/pkg/cloudbroker/lb/frontend_binding_update.go index 53539f12..6b9277d4 100644 --- a/pkg/cloudbroker/lb/frontend_binding_update.go +++ b/pkg/cloudbroker/lb/frontend_binding_update.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // FrontendBindUpdateRequest struct for update binding diff --git a/pkg/cloudbroker/lb/frontend_create.go b/pkg/cloudbroker/lb/frontend_create.go index 21e0c3aa..89dde0da 100644 --- a/pkg/cloudbroker/lb/frontend_create.go +++ b/pkg/cloudbroker/lb/frontend_create.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // FrontendCreateRequest struct for create frontend diff --git a/pkg/cloudbroker/lb/frontend_delete.go b/pkg/cloudbroker/lb/frontend_delete.go index 804e6d01..8bd8f355 100644 --- a/pkg/cloudbroker/lb/frontend_delete.go +++ b/pkg/cloudbroker/lb/frontend_delete.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // FrontendDeleteRequest struct for delete frontend diff --git a/pkg/cloudbroker/lb/get.go b/pkg/cloudbroker/lb/get.go index b2e2ede9..c5c5b9f1 100644 --- a/pkg/cloudbroker/lb/get.go +++ b/pkg/cloudbroker/lb/get.go @@ -5,7 +5,7 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // GetRequest struct to get detailed information about load balancer diff --git a/pkg/cloudbroker/lb/lb.go b/pkg/cloudbroker/lb/lb.go index 450217c9..556b32b4 100644 --- a/pkg/cloudbroker/lb/lb.go +++ b/pkg/cloudbroker/lb/lb.go @@ -1,7 +1,7 @@ // API to manage load balancer instance package lb -import "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/interfaces" +import "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/interfaces" // Structure for creating request to load balancer type LB struct { diff --git a/pkg/cloudbroker/lb/list.go b/pkg/cloudbroker/lb/list.go index 273ed99e..0dee55a0 100644 --- a/pkg/cloudbroker/lb/list.go +++ b/pkg/cloudbroker/lb/list.go @@ -5,7 +5,7 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // ListRequest struct to get list of load balancers diff --git a/pkg/cloudbroker/lb/list_deleted.go b/pkg/cloudbroker/lb/list_deleted.go index 0570f25d..44a130b1 100644 --- a/pkg/cloudbroker/lb/list_deleted.go +++ b/pkg/cloudbroker/lb/list_deleted.go @@ -5,7 +5,7 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // ListDeletedRequest struct to get list of deleted load balancers diff --git a/pkg/cloudbroker/lb/make_highly_available.go b/pkg/cloudbroker/lb/make_highly_available.go index d9a1b900..f919a31e 100644 --- a/pkg/cloudbroker/lb/make_highly_available.go +++ b/pkg/cloudbroker/lb/make_highly_available.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // HighlyAvailableRequest struct to make Load Balancer Highly available diff --git a/pkg/cloudbroker/lb/migrate_to_zone.go b/pkg/cloudbroker/lb/migrate_to_zone.go index 959fae7c..9adcd8f3 100644 --- a/pkg/cloudbroker/lb/migrate_to_zone.go +++ b/pkg/cloudbroker/lb/migrate_to_zone.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // MigrateToZone struct to move lb to another zone diff --git a/pkg/cloudbroker/lb/restart.go b/pkg/cloudbroker/lb/restart.go index 9f7e85b5..1c7da26d 100644 --- a/pkg/cloudbroker/lb/restart.go +++ b/pkg/cloudbroker/lb/restart.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // RestartRequest struct to restart load balancer diff --git a/pkg/cloudbroker/lb/restore.go b/pkg/cloudbroker/lb/restore.go index e109c3f6..f00aebcc 100644 --- a/pkg/cloudbroker/lb/restore.go +++ b/pkg/cloudbroker/lb/restore.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // RestoreRequest struct to restore load balancer diff --git a/pkg/cloudbroker/lb/serialize.go b/pkg/cloudbroker/lb/serialize.go index b121cc22..c1ab9d8a 100644 --- a/pkg/cloudbroker/lb/serialize.go +++ b/pkg/cloudbroker/lb/serialize.go @@ -3,7 +3,7 @@ package lb import ( "encoding/json" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/serialization" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/serialization" ) // Serialize returns JSON-serialized []byte. Used as a wrapper over json.Marshal and json.MarshalIndent functions. diff --git a/pkg/cloudbroker/lb/start.go b/pkg/cloudbroker/lb/start.go index 79fe11a5..214b66fd 100644 --- a/pkg/cloudbroker/lb/start.go +++ b/pkg/cloudbroker/lb/start.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // StartRequest struct to start load balancer diff --git a/pkg/cloudbroker/lb/stop.go b/pkg/cloudbroker/lb/stop.go index e6721d4f..39c799e1 100644 --- a/pkg/cloudbroker/lb/stop.go +++ b/pkg/cloudbroker/lb/stop.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // StopRequest struct to stop load balancer diff --git a/pkg/cloudbroker/lb/update.go b/pkg/cloudbroker/lb/update.go index 52f4ddc0..1bf4b0f6 100644 --- a/pkg/cloudbroker/lb/update.go +++ b/pkg/cloudbroker/lb/update.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // UpdateRequest struct to update load balancer diff --git a/pkg/cloudbroker/lb/update_sysctl_params.go b/pkg/cloudbroker/lb/update_sysctl_params.go index b5a8d17c..5ce9bc97 100644 --- a/pkg/cloudbroker/lb/update_sysctl_params.go +++ b/pkg/cloudbroker/lb/update_sysctl_params.go @@ -6,7 +6,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // UpdateSysctParamsRequest struct to update sysct params for lb diff --git a/pkg/cloudbroker/network_qos_policy.go b/pkg/cloudbroker/network_qos_policy.go new file mode 100644 index 00000000..c4522cd5 --- /dev/null +++ b/pkg/cloudbroker/network_qos_policy.go @@ -0,0 +1,10 @@ +package cloudbroker + +import ( + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/pkg/cloudbroker/qospolicy" +) + +// Accessing the QoS Policy method group +func (cb *CloudBroker) QoSPolicy() *qospolicy.QoSPolicy { + return qospolicy.New(cb.client) +} diff --git a/pkg/cloudbroker/node.go b/pkg/cloudbroker/node.go index 90109ac7..e3c27d7b 100644 --- a/pkg/cloudbroker/node.go +++ b/pkg/cloudbroker/node.go @@ -1,6 +1,6 @@ package cloudbroker -import "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/pkg/cloudbroker/node" +import "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/pkg/cloudbroker/node" // Accessing the Node method group func (cb *CloudBroker) Node() *node.Node { diff --git a/pkg/cloudbroker/node/add_ssh_identity.go b/pkg/cloudbroker/node/add_ssh_identity.go index 4af56d5d..aae55673 100644 --- a/pkg/cloudbroker/node/add_ssh_identity.go +++ b/pkg/cloudbroker/node/add_ssh_identity.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // AddSSHIdentityRequest struct to add node ssh information diff --git a/pkg/cloudbroker/node/apply_ipmi_action.go b/pkg/cloudbroker/node/apply_ipmi_action.go index 99a829dd..ec7f5adf 100644 --- a/pkg/cloudbroker/node/apply_ipmi_action.go +++ b/pkg/cloudbroker/node/apply_ipmi_action.go @@ -4,7 +4,7 @@ import ( "context" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // ApplyIpmiActionRequest struct to apply ipmi action on node diff --git a/pkg/cloudbroker/node/autostart.go b/pkg/cloudbroker/node/autostart.go index ab869715..f3a3143f 100644 --- a/pkg/cloudbroker/node/autostart.go +++ b/pkg/cloudbroker/node/autostart.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // AutoStartRequest struct to set node autostart diff --git a/pkg/cloudbroker/node/consumption.go b/pkg/cloudbroker/node/consumption.go index cfe4a610..f795e33e 100644 --- a/pkg/cloudbroker/node/consumption.go +++ b/pkg/cloudbroker/node/consumption.go @@ -5,7 +5,7 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // ConsumptionRequest struct to get node summary by resources and consumption diff --git a/pkg/cloudbroker/node/decommission.go b/pkg/cloudbroker/node/decommission.go index 6302ba37..b2d53ca1 100644 --- a/pkg/cloudbroker/node/decommission.go +++ b/pkg/cloudbroker/node/decommission.go @@ -4,7 +4,7 @@ import ( "context" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // DecommissionRequest struct to set node status to DECOMMISSIONED diff --git a/pkg/cloudbroker/node/enable.go b/pkg/cloudbroker/node/enable.go index 9f084be2..b2614369 100644 --- a/pkg/cloudbroker/node/enable.go +++ b/pkg/cloudbroker/node/enable.go @@ -4,7 +4,7 @@ import ( "context" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // EnableRequest struct to enable node from maintenance status to enabled diff --git a/pkg/cloudbroker/node/enable_nodes.go b/pkg/cloudbroker/node/enable_nodes.go index b917e5da..a1cf43f1 100644 --- a/pkg/cloudbroker/node/enable_nodes.go +++ b/pkg/cloudbroker/node/enable_nodes.go @@ -4,7 +4,7 @@ import ( "context" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // EnableNodesRequest struct to enable nodes from maintenance status to enabled diff --git a/pkg/cloudbroker/node/get.go b/pkg/cloudbroker/node/get.go index a6c8ff59..fc1ea28c 100644 --- a/pkg/cloudbroker/node/get.go +++ b/pkg/cloudbroker/node/get.go @@ -5,7 +5,7 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // GetRequest struct to get detailed information about node diff --git a/pkg/cloudbroker/node/get_logical_cores_count.go b/pkg/cloudbroker/node/get_logical_cores_count.go index 41c6816b..ccef2a07 100644 --- a/pkg/cloudbroker/node/get_logical_cores_count.go +++ b/pkg/cloudbroker/node/get_logical_cores_count.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // GetLogicalCoresCountRequest struct to get logical cores count by node diff --git a/pkg/cloudbroker/node/get_network_info.go b/pkg/cloudbroker/node/get_network_info.go index a150f3e8..acaa2432 100644 --- a/pkg/cloudbroker/node/get_network_info.go +++ b/pkg/cloudbroker/node/get_network_info.go @@ -5,7 +5,7 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // GetNetworkInfoRequest struct to get network information of a node diff --git a/pkg/cloudbroker/node/get_pci_devices.go b/pkg/cloudbroker/node/get_pci_devices.go index 5f171723..2d0fcc0e 100644 --- a/pkg/cloudbroker/node/get_pci_devices.go +++ b/pkg/cloudbroker/node/get_pci_devices.go @@ -5,7 +5,7 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // GetPCIDevicesRequest struct to get list of PCI devices on a node diff --git a/pkg/cloudbroker/node/get_ssh_identity.go b/pkg/cloudbroker/node/get_ssh_identity.go index 27e00b50..3d383b17 100644 --- a/pkg/cloudbroker/node/get_ssh_identity.go +++ b/pkg/cloudbroker/node/get_ssh_identity.go @@ -5,7 +5,7 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // GetSSHIdentityRequest struct to get node ssh information diff --git a/pkg/cloudbroker/node/install.go b/pkg/cloudbroker/node/install.go index d82bce7b..0bd2912b 100644 --- a/pkg/cloudbroker/node/install.go +++ b/pkg/cloudbroker/node/install.go @@ -4,7 +4,7 @@ import ( "context" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // InstallRequest struct to install a node diff --git a/pkg/cloudbroker/node/list.go b/pkg/cloudbroker/node/list.go index 7b4d5f40..b532af03 100644 --- a/pkg/cloudbroker/node/list.go +++ b/pkg/cloudbroker/node/list.go @@ -5,7 +5,7 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // ListRequest struct to get list of nodes diff --git a/pkg/cloudbroker/node/maintenance.go b/pkg/cloudbroker/node/maintenance.go index 86b9f8ae..e5d39249 100644 --- a/pkg/cloudbroker/node/maintenance.go +++ b/pkg/cloudbroker/node/maintenance.go @@ -4,7 +4,7 @@ import ( "context" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // MaintenanceRequest struct to place node in maintenance state diff --git a/pkg/cloudbroker/node/models.go b/pkg/cloudbroker/node/models.go index 3ac495e8..e96fc212 100644 --- a/pkg/cloudbroker/node/models.go +++ b/pkg/cloudbroker/node/models.go @@ -117,7 +117,7 @@ type ConsumptionInfo struct { Reserved ResourcesInfo `json:"reserved"` // Total resources - Total ResourcesInfo `json:"total"` + Total FreeResourcesInfo `json:"total"` } // Free Resources Info diff --git a/pkg/cloudbroker/node/node.go b/pkg/cloudbroker/node/node.go index eea1847b..27eb1e9e 100644 --- a/pkg/cloudbroker/node/node.go +++ b/pkg/cloudbroker/node/node.go @@ -2,7 +2,7 @@ package node import ( - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/interfaces" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/interfaces" ) // Structure for creating request to node diff --git a/pkg/cloudbroker/node/pci_device_driver_to_kernel.go b/pkg/cloudbroker/node/pci_device_driver_to_kernel.go index 5c0e12cb..2c5470d2 100644 --- a/pkg/cloudbroker/node/pci_device_driver_to_kernel.go +++ b/pkg/cloudbroker/node/pci_device_driver_to_kernel.go @@ -5,8 +5,8 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/constants" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/constants" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // PCIDeviceDriverToKernelRequest struct to bind PCI device driver to kernel diff --git a/pkg/cloudbroker/node/pci_device_driver_to_vfio.go b/pkg/cloudbroker/node/pci_device_driver_to_vfio.go index 5466a226..90a000cc 100644 --- a/pkg/cloudbroker/node/pci_device_driver_to_vfio.go +++ b/pkg/cloudbroker/node/pci_device_driver_to_vfio.go @@ -5,8 +5,8 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/constants" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/constants" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // PCIDeviceDriverToVFIORequest struct to bind PCI device driver to VFIO diff --git a/pkg/cloudbroker/node/restrict.go b/pkg/cloudbroker/node/restrict.go index 6a05bea2..d6327a59 100644 --- a/pkg/cloudbroker/node/restrict.go +++ b/pkg/cloudbroker/node/restrict.go @@ -4,7 +4,7 @@ import ( "context" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // RestrictRequest struct to set node status to 'RESTRICTED' diff --git a/pkg/cloudbroker/node/serialize.go b/pkg/cloudbroker/node/serialize.go index 709eccfd..9cc182f5 100644 --- a/pkg/cloudbroker/node/serialize.go +++ b/pkg/cloudbroker/node/serialize.go @@ -3,7 +3,7 @@ package node import ( "encoding/json" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/serialization" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/serialization" ) // Serialize returns JSON-serialized []byte. Used as a wrapper over json.Marshal and json.MarshalIndent functions. diff --git a/pkg/cloudbroker/node/set_core_isolation.go b/pkg/cloudbroker/node/set_core_isolation.go index 27e211e7..270455a8 100644 --- a/pkg/cloudbroker/node/set_core_isolation.go +++ b/pkg/cloudbroker/node/set_core_isolation.go @@ -4,7 +4,7 @@ import ( "context" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // SetCoreIsolationRequest struct to isolate selected cores on node boot diff --git a/pkg/cloudbroker/node/set_cpu_allocation_ratio.go b/pkg/cloudbroker/node/set_cpu_allocation_ratio.go index 8463023c..f77703d4 100644 --- a/pkg/cloudbroker/node/set_cpu_allocation_ratio.go +++ b/pkg/cloudbroker/node/set_cpu_allocation_ratio.go @@ -5,7 +5,7 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // SetCpuAllocationRatioRequest struct to set CPU allocation ratio diff --git a/pkg/cloudbroker/node/set_huge_pages.go b/pkg/cloudbroker/node/set_huge_pages.go index d3a4b421..bef7cc02 100644 --- a/pkg/cloudbroker/node/set_huge_pages.go +++ b/pkg/cloudbroker/node/set_huge_pages.go @@ -4,7 +4,7 @@ import ( "context" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // SetHugePagesRequest struct to set on-boot Huge Pages configuration diff --git a/pkg/cloudbroker/node/set_mem_allocation_ratio.go b/pkg/cloudbroker/node/set_mem_allocation_ratio.go index a7a076d9..64693829 100644 --- a/pkg/cloudbroker/node/set_mem_allocation_ratio.go +++ b/pkg/cloudbroker/node/set_mem_allocation_ratio.go @@ -5,7 +5,7 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // SetMemAllocationRatioRequest struct to set memory allocation ratio diff --git a/pkg/cloudbroker/node/set_resources_limit.go b/pkg/cloudbroker/node/set_resources_limit.go index 367ae83d..d600bafc 100644 --- a/pkg/cloudbroker/node/set_resources_limit.go +++ b/pkg/cloudbroker/node/set_resources_limit.go @@ -5,8 +5,8 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/constants" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/constants" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // SetResourcesLimitRequest struct to set resources limit for node diff --git a/pkg/cloudbroker/node/set_sriov_status.go b/pkg/cloudbroker/node/set_sriov_status.go index f936a9ad..04976279 100644 --- a/pkg/cloudbroker/node/set_sriov_status.go +++ b/pkg/cloudbroker/node/set_sriov_status.go @@ -4,7 +4,7 @@ import ( "context" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // SetSRIOVStatusRequest struct to set Single-root input/output virtualization kernel config on node diff --git a/pkg/cloudbroker/node/set_vfs_number.go b/pkg/cloudbroker/node/set_vfs_number.go index 9b4034b4..7feb10d1 100644 --- a/pkg/cloudbroker/node/set_vfs_number.go +++ b/pkg/cloudbroker/node/set_vfs_number.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // SetVFsNumberRequest struct to set number of VFs for individual NIC on node diff --git a/pkg/cloudbroker/node/set_vfs_params.go b/pkg/cloudbroker/node/set_vfs_params.go index 6c733d09..50c158e9 100644 --- a/pkg/cloudbroker/node/set_vfs_params.go +++ b/pkg/cloudbroker/node/set_vfs_params.go @@ -5,8 +5,8 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/constants" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/constants" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) type VFParam struct { diff --git a/pkg/cloudbroker/node/update.go b/pkg/cloudbroker/node/update.go index 972cdd3f..48aaf263 100644 --- a/pkg/cloudbroker/node/update.go +++ b/pkg/cloudbroker/node/update.go @@ -4,7 +4,7 @@ import ( "context" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // UpdateRequest struct to update node for actual version diff --git a/pkg/cloudbroker/node/update_description.go b/pkg/cloudbroker/node/update_description.go index 2df6a1ef..abf09100 100644 --- a/pkg/cloudbroker/node/update_description.go +++ b/pkg/cloudbroker/node/update_description.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // UpdateDescriptionRequest struct to update description of the node diff --git a/pkg/cloudbroker/pcidevice.go b/pkg/cloudbroker/pcidevice.go index 97456aba..01735dec 100644 --- a/pkg/cloudbroker/pcidevice.go +++ b/pkg/cloudbroker/pcidevice.go @@ -1,6 +1,6 @@ package cloudbroker -import "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/pkg/cloudbroker/pcidevice" +import "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/pkg/cloudbroker/pcidevice" // Accessing the PCI Device method group func (cb *CloudBroker) PCIDevice() *pcidevice.PCIDevice { diff --git a/pkg/cloudbroker/pcidevice/create.go b/pkg/cloudbroker/pcidevice/create.go index bb3a8df9..b02a13e9 100644 --- a/pkg/cloudbroker/pcidevice/create.go +++ b/pkg/cloudbroker/pcidevice/create.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // CreateRequest struct to creating PCI device diff --git a/pkg/cloudbroker/pcidevice/delete.go b/pkg/cloudbroker/pcidevice/delete.go index 941f204e..13cccd4d 100644 --- a/pkg/cloudbroker/pcidevice/delete.go +++ b/pkg/cloudbroker/pcidevice/delete.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // DeleteRequest struct to deleting PCI device diff --git a/pkg/cloudbroker/pcidevice/disable.go b/pkg/cloudbroker/pcidevice/disable.go index a806a851..cc80e18d 100644 --- a/pkg/cloudbroker/pcidevice/disable.go +++ b/pkg/cloudbroker/pcidevice/disable.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // DisableRequest struct for disabling PCI device diff --git a/pkg/cloudbroker/pcidevice/enable.go b/pkg/cloudbroker/pcidevice/enable.go index 7a8bbf3e..893e7c88 100644 --- a/pkg/cloudbroker/pcidevice/enable.go +++ b/pkg/cloudbroker/pcidevice/enable.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // EnableRequest struct for enabling PCI device diff --git a/pkg/cloudbroker/pcidevice/list.go b/pkg/cloudbroker/pcidevice/list.go index e353e3d2..7613b292 100644 --- a/pkg/cloudbroker/pcidevice/list.go +++ b/pkg/cloudbroker/pcidevice/list.go @@ -5,7 +5,7 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // ListRequest struct to get list of pci devices diff --git a/pkg/cloudbroker/pcidevice/pcidevice.go b/pkg/cloudbroker/pcidevice/pcidevice.go index 0d6f853f..6e001ddc 100644 --- a/pkg/cloudbroker/pcidevice/pcidevice.go +++ b/pkg/cloudbroker/pcidevice/pcidevice.go @@ -1,6 +1,6 @@ package pcidevice -import "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/interfaces" +import "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/interfaces" // Structure for creating request to PCI device type PCIDevice struct { diff --git a/pkg/cloudbroker/pcidevice/serialize.go b/pkg/cloudbroker/pcidevice/serialize.go index 062bd2ed..008cbbc1 100644 --- a/pkg/cloudbroker/pcidevice/serialize.go +++ b/pkg/cloudbroker/pcidevice/serialize.go @@ -3,7 +3,7 @@ package pcidevice import ( "encoding/json" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/serialization" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/serialization" ) // Serialize returns JSON-serialized []byte. Used as a wrapper over json.Marshal and json.MarshalIndent functions. diff --git a/pkg/cloudbroker/prometheus.go b/pkg/cloudbroker/prometheus.go index 90a3a8e2..a8b41db4 100644 --- a/pkg/cloudbroker/prometheus.go +++ b/pkg/cloudbroker/prometheus.go @@ -1,6 +1,6 @@ package cloudbroker -import "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/pkg/cloudbroker/prometheus" +import "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/pkg/cloudbroker/prometheus" // Accessing the Prometheus method group func (cb *CloudBroker) Prometheus() *prometheus.Prometheus { diff --git a/pkg/cloudbroker/prometheus/compute_cpu_load.go b/pkg/cloudbroker/prometheus/compute_cpu_load.go index dfb9d3e1..8c094a5b 100644 --- a/pkg/cloudbroker/prometheus/compute_cpu_load.go +++ b/pkg/cloudbroker/prometheus/compute_cpu_load.go @@ -5,7 +5,7 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) type ComputeCPULoadRequest struct { diff --git a/pkg/cloudbroker/prometheus/compute_memory_available.go b/pkg/cloudbroker/prometheus/compute_memory_available.go index bcc8e735..60d10ebe 100644 --- a/pkg/cloudbroker/prometheus/compute_memory_available.go +++ b/pkg/cloudbroker/prometheus/compute_memory_available.go @@ -5,7 +5,7 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) type ComputeMemoryAvailableRequest struct { diff --git a/pkg/cloudbroker/prometheus/compute_memory_unused.go b/pkg/cloudbroker/prometheus/compute_memory_unused.go index 74ca898a..f88f0885 100644 --- a/pkg/cloudbroker/prometheus/compute_memory_unused.go +++ b/pkg/cloudbroker/prometheus/compute_memory_unused.go @@ -5,7 +5,7 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) type ComputeMemoryUnusedRequest struct { diff --git a/pkg/cloudbroker/prometheus/compute_memory_usable.go b/pkg/cloudbroker/prometheus/compute_memory_usable.go index 17c0faba..617d261e 100644 --- a/pkg/cloudbroker/prometheus/compute_memory_usable.go +++ b/pkg/cloudbroker/prometheus/compute_memory_usable.go @@ -5,7 +5,7 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) type ComputeMemoryUsableRequest struct { diff --git a/pkg/cloudbroker/prometheus/compute_memory_usage.go b/pkg/cloudbroker/prometheus/compute_memory_usage.go index 6458e6ee..74b29a99 100644 --- a/pkg/cloudbroker/prometheus/compute_memory_usage.go +++ b/pkg/cloudbroker/prometheus/compute_memory_usage.go @@ -5,7 +5,7 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) type ComputeMemoryUsageRequest struct { diff --git a/pkg/cloudbroker/prometheus/compute_memory_used.go b/pkg/cloudbroker/prometheus/compute_memory_used.go index 49e79f9d..133b567d 100644 --- a/pkg/cloudbroker/prometheus/compute_memory_used.go +++ b/pkg/cloudbroker/prometheus/compute_memory_used.go @@ -5,7 +5,7 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) type ComputeMemoryUsedRequest struct { diff --git a/pkg/cloudbroker/prometheus/compute_read_bytes.go b/pkg/cloudbroker/prometheus/compute_read_bytes.go index a7d5bfff..94812186 100644 --- a/pkg/cloudbroker/prometheus/compute_read_bytes.go +++ b/pkg/cloudbroker/prometheus/compute_read_bytes.go @@ -5,7 +5,7 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) type ComputeReadBytesRequest struct { diff --git a/pkg/cloudbroker/prometheus/compute_read_requests.go b/pkg/cloudbroker/prometheus/compute_read_requests.go index 6e4c79f4..8e44aedc 100644 --- a/pkg/cloudbroker/prometheus/compute_read_requests.go +++ b/pkg/cloudbroker/prometheus/compute_read_requests.go @@ -5,7 +5,7 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) type ComputeReadRequestsRequest struct { diff --git a/pkg/cloudbroker/prometheus/compute_receive_bytes.go b/pkg/cloudbroker/prometheus/compute_receive_bytes.go index 0add6f4b..6389234f 100644 --- a/pkg/cloudbroker/prometheus/compute_receive_bytes.go +++ b/pkg/cloudbroker/prometheus/compute_receive_bytes.go @@ -5,7 +5,7 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) type ComputeReceiveBytesRequest struct { diff --git a/pkg/cloudbroker/prometheus/compute_receive_packets.go b/pkg/cloudbroker/prometheus/compute_receive_packets.go index 543d2a5a..8c7685ed 100644 --- a/pkg/cloudbroker/prometheus/compute_receive_packets.go +++ b/pkg/cloudbroker/prometheus/compute_receive_packets.go @@ -5,7 +5,7 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) type ComputeReceivePacketsRequest struct { diff --git a/pkg/cloudbroker/prometheus/compute_transmit_bytes.go b/pkg/cloudbroker/prometheus/compute_transmit_bytes.go index 5d2b58da..72b484e7 100644 --- a/pkg/cloudbroker/prometheus/compute_transmit_bytes.go +++ b/pkg/cloudbroker/prometheus/compute_transmit_bytes.go @@ -5,7 +5,7 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) type ComputeTransmitBytesRequest struct { diff --git a/pkg/cloudbroker/prometheus/compute_transmit_packets.go b/pkg/cloudbroker/prometheus/compute_transmit_packets.go index e45e6511..03a1d3a7 100644 --- a/pkg/cloudbroker/prometheus/compute_transmit_packets.go +++ b/pkg/cloudbroker/prometheus/compute_transmit_packets.go @@ -5,7 +5,7 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) type ComputeTransmitPacketsRequest struct { diff --git a/pkg/cloudbroker/prometheus/compute_write_bytes.go b/pkg/cloudbroker/prometheus/compute_write_bytes.go index 8dc187c8..99e8e4ec 100644 --- a/pkg/cloudbroker/prometheus/compute_write_bytes.go +++ b/pkg/cloudbroker/prometheus/compute_write_bytes.go @@ -5,7 +5,7 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) type ComputeWriteBytesRequest struct { diff --git a/pkg/cloudbroker/prometheus/compute_write_requests.go b/pkg/cloudbroker/prometheus/compute_write_requests.go index 5195ab52..4b30affb 100644 --- a/pkg/cloudbroker/prometheus/compute_write_requests.go +++ b/pkg/cloudbroker/prometheus/compute_write_requests.go @@ -5,7 +5,7 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) type ComputeWriteRequestsRequest struct { diff --git a/pkg/cloudbroker/prometheus/computes.go b/pkg/cloudbroker/prometheus/computes.go index 66c05de6..b0230b9c 100644 --- a/pkg/cloudbroker/prometheus/computes.go +++ b/pkg/cloudbroker/prometheus/computes.go @@ -5,7 +5,7 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) const ( diff --git a/pkg/cloudbroker/prometheus/prometheus.go b/pkg/cloudbroker/prometheus/prometheus.go index 490971ab..698af0de 100644 --- a/pkg/cloudbroker/prometheus/prometheus.go +++ b/pkg/cloudbroker/prometheus/prometheus.go @@ -1,7 +1,7 @@ package prometheus import ( - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/interfaces" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/interfaces" ) // Structure for creating request to prometheus diff --git a/pkg/cloudbroker/qospolicy/create.go b/pkg/cloudbroker/qospolicy/create.go new file mode 100644 index 00000000..3f6ea292 --- /dev/null +++ b/pkg/cloudbroker/qospolicy/create.go @@ -0,0 +1,46 @@ +package qospolicy + +import ( + "context" + "net/http" + "strconv" + + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/constants" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" +) + +type CreateRequest struct { + // Account ID that owns QoS policy + // Required: true + AccountID uint64 `url:"account_id" json:"account_id" validate:"required"` + + // QoS policy name + // Required: true + Name string `url:"name" json:"name" validate:"required"` + + // QoS policy description + // Required: false + Description string `url:"description,omitempty" json:"description,omitempty"` +} + +// Create creates a new QoS policy +func (qp QoSPolicy) Create(ctx context.Context, req CreateRequest) (uint64, error) { + err := validators.ValidateRequest(req) + if err != nil { + return 0, validators.ValidationErrors(validators.GetErrors(err)) + } + + url := "/cloudbroker/network_qos_policy/create" + + res, err := qp.client.DecortApiCallCtype(ctx, http.MethodPost, url, constants.MIMEJSON, req) + if err != nil { + return 0, err + } + + result, err := strconv.ParseUint(string(res), 10, 64) + if err != nil { + return 0, err + } + + return result, nil +} diff --git a/pkg/cloudbroker/qospolicy/create_rule.go b/pkg/cloudbroker/qospolicy/create_rule.go new file mode 100644 index 00000000..108ad496 --- /dev/null +++ b/pkg/cloudbroker/qospolicy/create_rule.go @@ -0,0 +1,94 @@ +package qospolicy + +import ( + "context" + "net/http" + "strconv" + + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/constants" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" +) + +type CreateRuleRequest struct { + // ID of the parent QoS policy this rule belongs to + // Required: true + QoSPolicyID uint64 `url:"qos_policy_id" json:"qos_policy_id" validate:"required"` + + // QoS policy rule description + // Default: "" + // Required: false + Description string `url:"description,omitempty" json:"description,omitempty"` + + // Rule priority in OVS (higher number = higher priority) + // Possible values: [0, 65535] + // Required: true + Priority *uint64 `url:"priority" json:"priority" validate:"required,min=0,max=65535"` + + // Traffic direction + // Possible values: outbound + // Required: true + Direction string `url:"direction" json:"direction" validate:"required,oneof=outbound"` + + // IP protocol to match + // Possible values: tcp, udp, icmp + // Required: true + Protocol string `url:"protocol" json:"protocol" validate:"required,oneof=tcp udp icmp"` + + // Priority Code Point. L2 marking + // Possible values: [0, 7] + // Required: false + PCPTag *uint64 `url:"pcp_tag,omitempty" json:"pcp_tag,omitempty" validate:"required_without_all=DSCPValue,omitempty,min=0,max=7"` + + // DSCP value (0-63). L3 marking + // Possible values: [0, 63] + // Required: false + DSCPValue *uint64 `url:"dscp_value,omitempty" json:"dscp_value,omitempty" validate:"required_without_all=PCPTag,omitempty,min=0,max=63"` + + // Source IP address for traffic filtering + // Required: false + SrcIP string `url:"src_ip,omitempty" json:"src_ip,omitempty"` + + // Destination IP address for traffic filtering + // Required: false + DstIP string `url:"dst_ip,omitempty" json:"dst_ip,omitempty"` + + // Source MAC address for traffic filtering + // Required: false + SrcMAC string `url:"src_mac,omitempty" json:"src_mac,omitempty" validate:"omitempty,mac"` + + // Destination MAC address for traffic filtering + // Required: false + DstMAC string `url:"dst_mac,omitempty" json:"dst_mac,omitempty" validate:"omitempty,mac"` + + // Source port for traffic filtering (TCP/UDP only) + // Possible values: [1, 65535] + // Required: false + SrcPort uint64 `url:"src_port,omitempty" json:"src_port,omitempty" validate:"omitempty,min=1,max=65535"` + + // Destination port for traffic filtering (TCP/UDP only) + // Possible values: [1, 65535] + // Required: false + DstPort uint64 `url:"dst_port,omitempty" json:"dst_port,omitempty" validate:"omitempty,min=1,max=65535"` +} + +// CreateRule creates a new rule for a QoS policy +func (qp QoSPolicy) CreateRule(ctx context.Context, req CreateRuleRequest) (uint64, error) { + err := validators.ValidateRequest(req) + if err != nil { + return 0, validators.ValidationErrors(validators.GetErrors(err)) + } + + url := "/cloudbroker/network_qos_policy/create_rule" + + res, err := qp.client.DecortApiCallCtype(ctx, http.MethodPost, url, constants.MIMEJSON, req) + if err != nil { + return 0, err + } + + result, err := strconv.ParseUint(string(res), 10, 64) + if err != nil { + return 0, err + } + + return result, nil +} diff --git a/pkg/cloudbroker/qospolicy/delete.go b/pkg/cloudbroker/qospolicy/delete.go new file mode 100644 index 00000000..de5ce6aa --- /dev/null +++ b/pkg/cloudbroker/qospolicy/delete.go @@ -0,0 +1,37 @@ +package qospolicy + +import ( + "context" + "net/http" + "strconv" + + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/constants" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" +) + +type DeleteRequest struct { + // QoS policy ID + // Required: true + QoSPolicyID uint64 `url:"qos_policy_id" json:"qos_policy_id" validate:"required"` +} + +func (qp QoSPolicy) Delete(ctx context.Context, req DeleteRequest) (bool, error) { + err := validators.ValidateRequest(req) + if err != nil { + return false, validators.ValidationErrors(validators.GetErrors(err)) + } + + url := "/cloudbroker/network_qos_policy/delete" + + res, err := qp.client.DecortApiCallCtype(ctx, http.MethodDelete, url, constants.MIMEJSON, req) + if err != nil { + return false, err + } + + result, err := strconv.ParseBool(string(res)) + if err != nil { + return false, err + } + + return result, nil +} diff --git a/pkg/cloudbroker/qospolicy/delete_rule.go b/pkg/cloudbroker/qospolicy/delete_rule.go new file mode 100644 index 00000000..f1fbc4b6 --- /dev/null +++ b/pkg/cloudbroker/qospolicy/delete_rule.go @@ -0,0 +1,41 @@ +package qospolicy + +import ( + "context" + "net/http" + "strconv" + + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/constants" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" +) + +type DeleteRuleRequest struct { + // ID of the QoS policy + // Required: true + QoSPolicyID uint64 `url:"qos_policy_id" json:"qos_policy_id" validate:"required"` + + // ID of the rule to delete + // Required: true + RuleID uint64 `url:"rule_id" json:"rule_id" validate:"required"` +} + +func (qp QoSPolicy) DeleteRule(ctx context.Context, req DeleteRuleRequest) (bool, error) { + err := validators.ValidateRequest(req) + if err != nil { + return false, validators.ValidationErrors(validators.GetErrors(err)) + } + + url := "/cloudbroker/network_qos_policy/delete_rule" + + res, err := qp.client.DecortApiCallCtype(ctx, http.MethodDelete, url, constants.MIMEJSON, req) + if err != nil { + return false, err + } + + result, err := strconv.ParseBool(string(res)) + if err != nil { + return false, err + } + + return result, nil +} diff --git a/pkg/cloudbroker/qospolicy/filter.go b/pkg/cloudbroker/qospolicy/filter.go new file mode 100644 index 00000000..60a0cdd9 --- /dev/null +++ b/pkg/cloudbroker/qospolicy/filter.go @@ -0,0 +1,89 @@ +package qospolicy + +// FilterByID returns ListQoSPolicies with specified ID +func (lqp ListQoSPolicies) FilterByID(id uint64) ListQoSPolicies { + predicate := func(iqp ItemQoSPolicy) bool { + return iqp.ID == id + } + + return lqp.FilterFunc(predicate) +} + +// FilterByName returns ListQoSPolicies with specified Name +func (lqp ListQoSPolicies) FilterByName(name string) ListQoSPolicies { + predicate := func(iqp ItemQoSPolicy) bool { + return iqp.Name == name + } + + return lqp.FilterFunc(predicate) +} + +// FilterByAccountID returns ListQoSPolicies with specified AccountID +func (lqp ListQoSPolicies) FilterByAccountID(accountID uint64) ListQoSPolicies { + predicate := func(iqp ItemQoSPolicy) bool { + return iqp.AccountID == accountID + } + + return lqp.FilterFunc(predicate) +} + +// FilterByStatus returns ListQoSPolicies with specified Status +func (lqp ListQoSPolicies) FilterByStatus(status string) ListQoSPolicies { + predicate := func(iqp ItemQoSPolicy) bool { + return iqp.Status == status + } + + return lqp.FilterFunc(predicate) +} + +// FilterByDescription returns ListQoSPolicies with specified Description +func (lqp ListQoSPolicies) FilterByDescription(description string) ListQoSPolicies { + predicate := func(iqp ItemQoSPolicy) bool { + return iqp.Description == description + } + + return lqp.FilterFunc(predicate) +} + +// FilterByCreatedBy returns ListQoSPolicies with specified CreatedBy +func (lqp ListQoSPolicies) FilterByCreatedBy(createdBy string) ListQoSPolicies { + predicate := func(iqp ItemQoSPolicy) bool { + return iqp.CreatedBy == createdBy + } + + return lqp.FilterFunc(predicate) +} + +// FilterByUpdatedBy returns ListQoSPolicies with specified UpdatedBy +func (lqp ListQoSPolicies) FilterByUpdatedBy(updatedBy string) ListQoSPolicies { + predicate := func(iqp ItemQoSPolicy) bool { + return iqp.UpdatedBy == updatedBy + } + + return lqp.FilterFunc(predicate) +} + +// FilterFunc allows filtering ListQoSPolicies based on a user-specified predicate +func (lqp ListQoSPolicies) FilterFunc(predicate func(ItemQoSPolicy) bool) ListQoSPolicies { + var result ListQoSPolicies + + for _, item := range lqp.Data { + if predicate(item) { + result.Data = append(result.Data, item) + } + } + + result.EntryCount = uint64(len(result.Data)) + + return result +} + +// FindOne returns first found ItemQoSPolicy +// If none was found, returns an empty struct +func (lqp ListQoSPolicies) FindOne() ItemQoSPolicy { + if len(lqp.Data) == 0 { + return ItemQoSPolicy{} + } + + return lqp.Data[0] +} diff --git a/pkg/cloudbroker/qospolicy/filter_test.go b/pkg/cloudbroker/qospolicy/filter_test.go new file mode 100644 index 00000000..cf5ef727 --- /dev/null +++ b/pkg/cloudbroker/qospolicy/filter_test.go @@ -0,0 +1,97 @@ +package qospolicy + +import "testing" + +var qosPolicies = ListQoSPolicies{ + Data: []ItemQoSPolicy{ + { + ID: 1, + AccountID: 1, + Name: "qos1", + Description: "some desc", + Status: "ENABLED", + CreatedBy: "user", + }, + { + ID: 3, + AccountID: 3, + Name: "qos3", + Description: "some desc", + Status: "ENABLED", + CreatedBy: "anotheruser", + }, + { + ID: 5, + AccountID: 3, + Name: "qos5", + Description: "some other desc", + Status: "DISABLED", + CreatedBy: "anotheruser", + UpdatedBy: "user", + }, + }, + EntryCount: 3, +} + +func TestFilterByID(t *testing.T) { + actual := qosPolicies.FilterByID(1).FindOne() + if actual.ID != 1 { + t.Fatal("expected ID 1, found: ", actual.ID) + } +} + +func TestFilterByName(t *testing.T) { + actual := qosPolicies.FilterByName("qos3").FindOne() + if actual.Name != "qos3" { + t.Fatal("expected Name qos3, found: ", actual.Name) + } +} + +func TestFilterByDescription(t *testing.T) { + actual := qosPolicies.FilterByDescription("some desc") + + if len(actual.Data) != 2 { + t.Fatal("expected 2 found, actual: ", len(actual.Data)) + } + + for _, item := range actual.Data { + if item.Description != "some desc" { + t.Fatal("expected Description 'some desc', found: ", item.Description) + } + } +} + +func TestFilterByAccountID(t *testing.T) { + actual := qosPolicies.FilterByAccountID(1).FindOne() + if actual.AccountID != 1 { + t.Fatal("expected AccountID 1, found: ", actual.AccountID) + } +} + +func TestFilterByStatus(t *testing.T) { + actual := qosPolicies.FilterByStatus("DISABLED").FindOne() + if actual.Status != "DISABLED" { + t.Fatal("expected Status DISABLED, found: ", actual.Status) + } +} + +func TestFilterByCreatedBy(t *testing.T) { + actual := qosPolicies.FilterByCreatedBy("anotheruser") + + if len(actual.Data) != 2 { + t.Fatal("expected 2 found, actual: ", len(actual.Data)) + } + + for _, item := range actual.Data { + if item.CreatedBy != "anotheruser" { + t.Fatal("expected CreatedBy 'anotheruser', found: ", item.CreatedBy) + } + } +} + +func TestFilterByUpdatedBy(t *testing.T) { + actual := qosPolicies.FilterByUpdatedBy("user").FindOne() + if actual.UpdatedBy != "user" { + t.Fatal("expected UpdatedBy 'user', found: ", actual.UpdatedBy) + } +} diff --git a/pkg/cloudbroker/qospolicy/get.go b/pkg/cloudbroker/qospolicy/get.go new file mode 100644 index 00000000..a8116307 --- /dev/null +++ b/pkg/cloudbroker/qospolicy/get.go @@ -0,0 +1,43 @@ +package qospolicy + +import ( + "context" + "encoding/json" + "net/http" + + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" +) + +type GetRequest struct { + // QoS policy ID + // Required: true + QoSPolicyID uint64 `url:"qos_policy_id" json:"qos_policy_id" validate:"required"` +} + +func (qp QoSPolicy) Get(ctx context.Context, req GetRequest) (*RecordQoSPolicy, error) { + res, err := qp.GetRaw(ctx, req) + if err != nil { + return nil, err + } + + info := RecordQoSPolicy{} + + err = json.Unmarshal(res, &info) + if err != nil { + return nil, err + } + + return &info, nil +} + +func (qp QoSPolicy) GetRaw(ctx context.Context, req GetRequest) ([]byte, error) { + err := validators.ValidateRequest(req) + if err != nil { + return nil, validators.ValidationErrors(validators.GetErrors(err)) + } + + url := "/cloudbroker/network_qos_policy/get" + + res, err := qp.client.DecortApiCall(ctx, http.MethodGet, url, req) + return res, err +} diff --git a/pkg/cloudbroker/qospolicy/list.go b/pkg/cloudbroker/qospolicy/list.go new file mode 100644 index 00000000..8d648ed3 --- /dev/null +++ b/pkg/cloudbroker/qospolicy/list.go @@ -0,0 +1,88 @@ +package qospolicy + +import ( + "context" + "encoding/json" + "net/http" + + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" +) + +type ListRequest struct { + // Page number + // Required: false + Page uint64 `url:"page,omitempty" json:"page,omitempty"` + + // Page size + // Required: false + Size uint64 `url:"size,omitempty" json:"size,omitempty"` + + // Find QoS policy by id + // Required: false + ByID uint64 `url:"by_id,omitempty" json:"by_id,omitempty"` + + // Find by account id + // Required: false + AccountID uint64 `url:"account_id,omitempty" json:"account_id,omitempty"` + + // Find by QoS policy name + // Required: false + Name string `url:"name,omitempty" json:"name,omitempty"` + + // Find by QoS policy description + // Required: false + Description string `url:"description,omitempty" json:"description,omitempty"` + + // Find by QoS policy status + // Required: false + Status string `url:"status,omitempty" json:"status,omitempty"` + + // Find by created after time (unix timestamp) + // Required: false + CreatedMin uint64 `url:"created_min,omitempty" json:"created_min,omitempty"` + + // Find by created before time (unix timestamp) + // Required: false + CreatedMax uint64 `url:"created_max,omitempty" json:"created_max,omitempty"` + + // Find by updated after time (unix timestamp) + // Required: false + UpdatedMin uint64 `url:"updated_min,omitempty" json:"updated_min,omitempty"` + + // Find by updated before time (unix timestamp) + // Required: false + UpdatedMax uint64 `url:"updated_max,omitempty" json:"updated_max,omitempty"` + + // Sort by one of supported fields, format ± + // Required: false + SortBy string `url:"sort_by,omitempty" json:"sort_by,omitempty"` +} + +// List gets list of QoS policies as a ListQoSPolicies struct +func (qp QoSPolicy) List(ctx context.Context, req ListRequest) (*ListQoSPolicies, error) { + res, err := qp.ListRaw(ctx, req) + if err != nil { + return nil, err + } + + list := ListQoSPolicies{} + + err = json.Unmarshal(res, &list) + if err != nil { + return nil, err + } + + return &list, nil +} + +// ListRaw gets list of QoS policies as an array of bytes +func (qp QoSPolicy) ListRaw(ctx context.Context, req ListRequest) ([]byte, error) { + if err := validators.ValidateRequest(req); err != nil { + return nil, validators.ValidationErrors(validators.GetErrors(err)) + } + + url := "/cloudbroker/network_qos_policy/list" + + res, err := qp.client.DecortApiCall(ctx, http.MethodGet, url, req) + return res, err +} diff --git a/pkg/cloudbroker/qospolicy/models.go b/pkg/cloudbroker/qospolicy/models.go new file mode 100644 index 00000000..fc17c8f4 --- /dev/null +++ b/pkg/cloudbroker/qospolicy/models.go @@ -0,0 +1,122 @@ +package qospolicy + +type ListQoSPolicies struct { + // List + Data []ItemQoSPolicy `json:"data"` + + // Entry count + EntryCount uint64 `json:"entryCount"` +} + +type ItemQoSPolicy struct { + // ID of the QoS policy + ID uint64 `json:"id"` + + // GUID + GUID uint64 `json:"guid"` + + // Account ID that owns the QoS policy + AccountID uint64 `json:"account_id"` + + // Name of the QoS policy + Name string `json:"name"` + + // Description of the QoS policy + Description string `json:"description"` + + // Status of the QoS policy + Status string `json:"status"` + + // Created at (unix timestamp) + CreatedAt uint64 `json:"created_at"` + + // Updated at (unix timestamp) + UpdatedAt uint64 `json:"updated_at"` + + // Created by + CreatedBy string `json:"created_by"` + + // Updated by + UpdatedBy string `json:"updated_by"` + + // List of rules + Rules Rules `json:"rules"` +} + +type RecordQoSPolicy struct { + // ID of the QoS policy + ID uint64 `json:"id"` + + // GUID + GUID uint64 `json:"guid"` + + // Account ID that owns the QoS policy + AccountID uint64 `json:"account_id"` + + // Name of the QoS policy + Name string `json:"name"` + + // Description of the QoS policy + Description string `json:"description"` + + // Status of the QoS policy + Status string `json:"status"` + + // Created at (unix timestamp) + CreatedAt uint64 `json:"created_at"` + + // Updated at (unix timestamp) + UpdatedAt uint64 `json:"updated_at"` + + // Created by + CreatedBy string `json:"created_by"` + + // Updated by + UpdatedBy string `json:"updated_by"` + + // List of rules + Rules Rules `json:"rules"` +} + +type Rules []Rule + +type Rule struct { + // ID of the rule + ID uint64 `json:"id"` + + // Description of the rule + Description string `json:"description"` + + // Rule priority in OVS (higher number = higher priority) + Priority uint64 `json:"priority"` + + // Traffic direction + Direction string `json:"direction"` + + // IP protocol + Protocol string `json:"protocol"` + + // Priority Code Point (0-7). L2 marking + PCPTag uint64 `json:"pcp_tag"` + + // DSCP value (0-63). L3 marking + DSCPValue uint64 `json:"dscp_value"` + + // Source IP address + SrcIP string `json:"src_ip"` + + // Destination IP address + DstIP string `json:"dst_ip"` + + // Source MAC address + SrcMAC string `json:"src_mac"` + + // Destination MAC address + DstMAC string `json:"dst_mac"` + + // Source port + SrcPort uint64 `json:"src_port"` + + // Destination port + DstPort uint64 `json:"dst_port"` +} diff --git a/pkg/cloudbroker/qospolicy/qos_policy.go b/pkg/cloudbroker/qospolicy/qos_policy.go new file mode 100644 index 00000000..ca8cd604 --- /dev/null +++ b/pkg/cloudbroker/qospolicy/qos_policy.go @@ -0,0 +1,15 @@ +package qospolicy + +import "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/interfaces" + +// Structure for creating request to QoS policy +type QoSPolicy struct { + client interfaces.Caller +} + +// Builder for QoS policy endpoint +func New(client interfaces.Caller) *QoSPolicy { + return &QoSPolicy{ + client: client, + } +} diff --git a/pkg/cloudbroker/qospolicy/sorting.go b/pkg/cloudbroker/qospolicy/sorting.go new file mode 100644 index 00000000..5109dea5 --- /dev/null +++ b/pkg/cloudbroker/qospolicy/sorting.go @@ -0,0 +1,39 @@ +package qospolicy + +import "sort" + +// SortByCreatedAt sorts ListQoSPolicies by the CreatedAt field in ascending order +// If inverse param is set to true, the order is reversed +func (lqp ListQoSPolicies) SortByCreatedAt(inverse bool) ListQoSPolicies { + if len(lqp.Data) < 2 { + return lqp + } + + sort.Slice(lqp.Data, func(i, j int) bool { + if inverse { + return lqp.Data[i].CreatedAt > lqp.Data[j].CreatedAt + } + + return lqp.Data[i].CreatedAt < lqp.Data[j].CreatedAt + }) + + return lqp +} + +// SortByUpdatedAt sorts ListQoSPolicies by the UpdatedAt field in ascending order +// If inverse param is set to true, the order is reversed +func (lqp ListQoSPolicies) SortByUpdatedAt(inverse bool) ListQoSPolicies { + if len(lqp.Data) < 2 { + return lqp + } + + sort.Slice(lqp.Data, func(i, j int) bool { + if inverse { + return lqp.Data[i].UpdatedAt > lqp.Data[j].UpdatedAt + } + + return lqp.Data[i].UpdatedAt < lqp.Data[j].UpdatedAt + }) + + return lqp +} diff --git a/pkg/cloudbroker/qospolicy/update.go b/pkg/cloudbroker/qospolicy/update.go new file mode 100644 index 00000000..a7adfd2b --- /dev/null +++ b/pkg/cloudbroker/qospolicy/update.go @@ -0,0 +1,52 @@ +package qospolicy + +import ( + "context" + "encoding/json" + "net/http" + + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/constants" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" +) + +type UpdateRequest struct { + // QoS policy ID + // Required: true + QoSPolicyID uint64 `url:"qos_policy_id" json:"qos_policy_id" validate:"required"` + + // New QoS policy name + // Required: false + Name string `url:"name,omitempty" json:"name,omitempty"` + + // New QoS policy description + // Required: false + Description string `url:"description,omitempty" json:"description,omitempty"` +} + +func (qp QoSPolicy) Update(ctx context.Context, req UpdateRequest) (*RecordQoSPolicy, error) { + res, err := qp.UpdateRaw(ctx, req) + if err != nil { + return nil, err + } + + info := RecordQoSPolicy{} + + err = json.Unmarshal(res, &info) + if err != nil { + return nil, err + } + + return &info, nil +} + +func (qp QoSPolicy) UpdateRaw(ctx context.Context, req UpdateRequest) ([]byte, error) { + err := validators.ValidateRequest(req) + if err != nil { + return nil, validators.ValidationErrors(validators.GetErrors(err)) + } + + url := "/cloudbroker/network_qos_policy/update" + + res, err := qp.client.DecortApiCallCtype(ctx, http.MethodPost, url, constants.MIMEJSON, req) + return res, err +} diff --git a/pkg/cloudbroker/resmon.go b/pkg/cloudbroker/resmon.go index 57cc38ba..3cbf1f11 100644 --- a/pkg/cloudbroker/resmon.go +++ b/pkg/cloudbroker/resmon.go @@ -1,7 +1,7 @@ package cloudbroker import ( - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/pkg/cloudbroker/resmon" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/pkg/cloudbroker/resmon" ) // Accessing the Resmon method group diff --git a/pkg/cloudbroker/resmon/get_by_compute.go b/pkg/cloudbroker/resmon/get_by_compute.go index 097b4603..594bc66f 100644 --- a/pkg/cloudbroker/resmon/get_by_compute.go +++ b/pkg/cloudbroker/resmon/get_by_compute.go @@ -5,7 +5,7 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) type GetByComputeRequest struct { diff --git a/pkg/cloudbroker/resmon/get_by_computes.go b/pkg/cloudbroker/resmon/get_by_computes.go index 386ec4da..c7952088 100644 --- a/pkg/cloudbroker/resmon/get_by_computes.go +++ b/pkg/cloudbroker/resmon/get_by_computes.go @@ -5,7 +5,7 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) type GetByComputesRequest struct { diff --git a/pkg/cloudbroker/resmon/get_by_grid.go b/pkg/cloudbroker/resmon/get_by_grid.go index 1e8f661f..3970130d 100644 --- a/pkg/cloudbroker/resmon/get_by_grid.go +++ b/pkg/cloudbroker/resmon/get_by_grid.go @@ -5,7 +5,7 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) type GetByGRIDRequest struct { diff --git a/pkg/cloudbroker/resmon/get_by_node.go b/pkg/cloudbroker/resmon/get_by_node.go index f81a54f7..ed639629 100644 --- a/pkg/cloudbroker/resmon/get_by_node.go +++ b/pkg/cloudbroker/resmon/get_by_node.go @@ -5,7 +5,7 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) type GetByNodeRequest struct { diff --git a/pkg/cloudbroker/resmon/get_by_nodes.go b/pkg/cloudbroker/resmon/get_by_nodes.go index 130ff79d..253b8b1e 100644 --- a/pkg/cloudbroker/resmon/get_by_nodes.go +++ b/pkg/cloudbroker/resmon/get_by_nodes.go @@ -5,7 +5,7 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) type GetByNodesRequest struct { diff --git a/pkg/cloudbroker/resmon/models.go b/pkg/cloudbroker/resmon/models.go index d6de1a54..ae4f5063 100644 --- a/pkg/cloudbroker/resmon/models.go +++ b/pkg/cloudbroker/resmon/models.go @@ -63,11 +63,12 @@ type ItemStorage struct { type GetByNodeData []GetByNodePoint type GetByNodePoint struct { - Usage NodeUsage `json:"usage"` - CPUInfo CPUinfoByNode `json:"cpuInfo"` - Name string `json:"name"` - ID uint64 `json:"id"` - UID string `json:"uid"` + Usage NodeUsage `json:"usage"` + CPUInfo CPUinfoByNode `json:"cpuInfo"` + Name string `json:"name"` + ID uint64 `json:"id"` + UID string `json:"uid"` + TotalVCPUs uint64 `json:"total_vcpus"` } type NodeUsage struct { diff --git a/pkg/cloudbroker/resmon/resmon.go b/pkg/cloudbroker/resmon/resmon.go index 3484bd1e..63976cbe 100644 --- a/pkg/cloudbroker/resmon/resmon.go +++ b/pkg/cloudbroker/resmon/resmon.go @@ -1,6 +1,6 @@ package resmon -import "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/interfaces" +import "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/interfaces" // Structure for creating request to resource monitoring type Resmon struct { diff --git a/pkg/cloudbroker/rg.go b/pkg/cloudbroker/rg.go index 9f8dc132..80e090ce 100644 --- a/pkg/cloudbroker/rg.go +++ b/pkg/cloudbroker/rg.go @@ -1,6 +1,6 @@ package cloudbroker -import "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/pkg/cloudbroker/rg" +import "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/pkg/cloudbroker/rg" // Accessing the RG method group func (cb *CloudBroker) RG() *rg.RG { diff --git a/pkg/cloudbroker/rg/access_grant.go b/pkg/cloudbroker/rg/access_grant.go index 71f0843d..1b1ebf05 100644 --- a/pkg/cloudbroker/rg/access_grant.go +++ b/pkg/cloudbroker/rg/access_grant.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // AccessGrantRequest struct to grant access to resource group diff --git a/pkg/cloudbroker/rg/access_revoke.go b/pkg/cloudbroker/rg/access_revoke.go index 00a7b670..343f59b3 100644 --- a/pkg/cloudbroker/rg/access_revoke.go +++ b/pkg/cloudbroker/rg/access_revoke.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // AccessRevokeRequest struct to revoke access diff --git a/pkg/cloudbroker/rg/add_storage_policy.go b/pkg/cloudbroker/rg/add_storage_policy.go index cf458511..5d29f77b 100644 --- a/pkg/cloudbroker/rg/add_storage_policy.go +++ b/pkg/cloudbroker/rg/add_storage_policy.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // AddStoragePolicyRequest struct for adding storage policy to the resource group diff --git a/pkg/cloudbroker/rg/affinity_group_computes.go b/pkg/cloudbroker/rg/affinity_group_computes.go index 489fd2bf..07373d97 100644 --- a/pkg/cloudbroker/rg/affinity_group_computes.go +++ b/pkg/cloudbroker/rg/affinity_group_computes.go @@ -5,7 +5,7 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // AffinityGroupComputesRequest struct to get list of all computes with their relationships diff --git a/pkg/cloudbroker/rg/affinity_groups_get.go b/pkg/cloudbroker/rg/affinity_groups_get.go index dc134e4d..1252f5a6 100644 --- a/pkg/cloudbroker/rg/affinity_groups_get.go +++ b/pkg/cloudbroker/rg/affinity_groups_get.go @@ -5,7 +5,7 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // AffinityGroupsGetRequest struct to get list of computes from affinity group diff --git a/pkg/cloudbroker/rg/affinity_groups_list.go b/pkg/cloudbroker/rg/affinity_groups_list.go index 79de1e10..768372ab 100644 --- a/pkg/cloudbroker/rg/affinity_groups_list.go +++ b/pkg/cloudbroker/rg/affinity_groups_list.go @@ -5,7 +5,7 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // AffinityGroupsListRequest struct to get list of affinity groups from resource group diff --git a/pkg/cloudbroker/rg/audits.go b/pkg/cloudbroker/rg/audits.go deleted file mode 100644 index 6c1023ae..00000000 --- a/pkg/cloudbroker/rg/audits.go +++ /dev/null @@ -1,40 +0,0 @@ -package rg - -import ( - "context" - "encoding/json" - "net/http" - - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" -) - -// AuditsRequest struct to get audit -type AuditsRequest struct { - // Resource group ID - // Required: true - RGID uint64 `url:"rgId" json:"rgId" validate:"required"` -} - -// Audits gets audit records for the specified resource group object -func (r RG) Audits(ctx context.Context, req AuditsRequest) (ListAudits, error) { - err := validators.ValidateRequest(req) - if err != nil { - return nil, validators.ValidationErrors(validators.GetErrors(err)) - } - - url := "/cloudbroker/rg/audits" - - res, err := r.client.DecortApiCall(ctx, http.MethodPost, url, req) - if err != nil { - return nil, err - } - - list := ListAudits{} - - err = json.Unmarshal(res, &list) - if err != nil { - return nil, err - } - - return list, nil -} diff --git a/pkg/cloudbroker/rg/create.go b/pkg/cloudbroker/rg/create.go index 949c3a4e..1d4e2624 100644 --- a/pkg/cloudbroker/rg/create.go +++ b/pkg/cloudbroker/rg/create.go @@ -5,8 +5,8 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/constants" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/constants" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // CreateRequest struct to create resource group @@ -61,6 +61,10 @@ type CreateRequest struct { // Required: false Description string `url:"desc,omitempty" json:"desc,omitempty"` + // Private network IP CIDR if default network PRIVATE + // Required: false + IPCIDR string `url:"ipcidr,omitempty" json:"ipcidr,omitempty"` + // External network ID // Required: false ExtNetID uint64 `url:"extNetId,omitempty" json:"extNetId,omitempty"` diff --git a/pkg/cloudbroker/rg/del_storage_policy.go b/pkg/cloudbroker/rg/del_storage_policy.go index cefb13fd..aa0d63ec 100644 --- a/pkg/cloudbroker/rg/del_storage_policy.go +++ b/pkg/cloudbroker/rg/del_storage_policy.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // DelStoragePolicyRequest struct for deleting storage policy to the resource group diff --git a/pkg/cloudbroker/rg/delete.go b/pkg/cloudbroker/rg/delete.go index 4b082abc..3550e442 100644 --- a/pkg/cloudbroker/rg/delete.go +++ b/pkg/cloudbroker/rg/delete.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // DeleteRequest struct to delete resource group diff --git a/pkg/cloudbroker/rg/disable.go b/pkg/cloudbroker/rg/disable.go index 89eb1753..14e7c4b5 100644 --- a/pkg/cloudbroker/rg/disable.go +++ b/pkg/cloudbroker/rg/disable.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // DisableRequest struct to disable resource group diff --git a/pkg/cloudbroker/rg/enable.go b/pkg/cloudbroker/rg/enable.go index a1492ea3..0766b5c6 100644 --- a/pkg/cloudbroker/rg/enable.go +++ b/pkg/cloudbroker/rg/enable.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // EnableRequest struct to enable resource group diff --git a/pkg/cloudbroker/rg/get.go b/pkg/cloudbroker/rg/get.go index eb1f18a2..b81d1b32 100644 --- a/pkg/cloudbroker/rg/get.go +++ b/pkg/cloudbroker/rg/get.go @@ -5,7 +5,7 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // GetRequest struct to get detailed information about resource group diff --git a/pkg/cloudbroker/rg/get_resource_consumption.go b/pkg/cloudbroker/rg/get_resource_consumption.go index 05f7549e..62d01ccc 100644 --- a/pkg/cloudbroker/rg/get_resource_consumption.go +++ b/pkg/cloudbroker/rg/get_resource_consumption.go @@ -5,7 +5,7 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // GetResourceConsumptionRequest struct to get detailed information about resource consumption for ResGroup diff --git a/pkg/cloudbroker/rg/list.go b/pkg/cloudbroker/rg/list.go index 030ee4b9..66057d16 100644 --- a/pkg/cloudbroker/rg/list.go +++ b/pkg/cloudbroker/rg/list.go @@ -5,7 +5,7 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // ListRequest struct to get list of resource groups diff --git a/pkg/cloudbroker/rg/list_computes.go b/pkg/cloudbroker/rg/list_computes.go index 2e0db648..3fa9afef 100644 --- a/pkg/cloudbroker/rg/list_computes.go +++ b/pkg/cloudbroker/rg/list_computes.go @@ -5,7 +5,7 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // ListComputesRequest struct to get list of computes diff --git a/pkg/cloudbroker/rg/list_deleted.go b/pkg/cloudbroker/rg/list_deleted.go index 81a43974..d428c527 100644 --- a/pkg/cloudbroker/rg/list_deleted.go +++ b/pkg/cloudbroker/rg/list_deleted.go @@ -5,7 +5,7 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // ListDeletedRequest struct to get list of deleted resource groups diff --git a/pkg/cloudbroker/rg/list_lb.go b/pkg/cloudbroker/rg/list_lb.go index 16ca5501..08b94590 100644 --- a/pkg/cloudbroker/rg/list_lb.go +++ b/pkg/cloudbroker/rg/list_lb.go @@ -5,7 +5,7 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // ListLBRequest struct to get list of load balancers diff --git a/pkg/cloudbroker/rg/list_pfw.go b/pkg/cloudbroker/rg/list_pfw.go index e7725093..1211721d 100644 --- a/pkg/cloudbroker/rg/list_pfw.go +++ b/pkg/cloudbroker/rg/list_pfw.go @@ -5,7 +5,7 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // ListPFWRequest struct to get list of port forward rules diff --git a/pkg/cloudbroker/rg/list_vins.go b/pkg/cloudbroker/rg/list_vins.go index 6c0f2b10..a54ad69f 100644 --- a/pkg/cloudbroker/rg/list_vins.go +++ b/pkg/cloudbroker/rg/list_vins.go @@ -5,7 +5,7 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // ListVINSRequest struct to get list of VINSes diff --git a/pkg/cloudbroker/rg/mass_delete.go b/pkg/cloudbroker/rg/mass_delete.go index d8d4111f..1e03dd08 100644 --- a/pkg/cloudbroker/rg/mass_delete.go +++ b/pkg/cloudbroker/rg/mass_delete.go @@ -4,7 +4,7 @@ import ( "context" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // MassDeleteRequest struct to delete several resource groups diff --git a/pkg/cloudbroker/rg/mass_disable.go b/pkg/cloudbroker/rg/mass_disable.go index 21dad05e..15581d4b 100644 --- a/pkg/cloudbroker/rg/mass_disable.go +++ b/pkg/cloudbroker/rg/mass_disable.go @@ -4,7 +4,7 @@ import ( "context" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // MassDisableRequest struct to disable several resource groups diff --git a/pkg/cloudbroker/rg/mass_enable.go b/pkg/cloudbroker/rg/mass_enable.go index 71a7a3a8..e9566eff 100644 --- a/pkg/cloudbroker/rg/mass_enable.go +++ b/pkg/cloudbroker/rg/mass_enable.go @@ -4,7 +4,7 @@ import ( "context" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // MassEnableRequest struct to enable several resource groups diff --git a/pkg/cloudbroker/rg/remove_def_net.go b/pkg/cloudbroker/rg/remove_def_net.go index 3c5cf8f2..188fc6e7 100644 --- a/pkg/cloudbroker/rg/remove_def_net.go +++ b/pkg/cloudbroker/rg/remove_def_net.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // RemoveDefNetRequest struct to remove default network diff --git a/pkg/cloudbroker/rg/restore.go b/pkg/cloudbroker/rg/restore.go index 57f59b97..47948ce2 100644 --- a/pkg/cloudbroker/rg/restore.go +++ b/pkg/cloudbroker/rg/restore.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // RestoreRequest struct to restore resource group diff --git a/pkg/cloudbroker/rg/rg.go b/pkg/cloudbroker/rg/rg.go index 4628e6f4..8ad06112 100644 --- a/pkg/cloudbroker/rg/rg.go +++ b/pkg/cloudbroker/rg/rg.go @@ -2,7 +2,7 @@ package rg import ( - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/interfaces" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/interfaces" ) // Structure for creating request to resource group diff --git a/pkg/cloudbroker/rg/serialize.go b/pkg/cloudbroker/rg/serialize.go index 19b7148b..06daa0af 100644 --- a/pkg/cloudbroker/rg/serialize.go +++ b/pkg/cloudbroker/rg/serialize.go @@ -3,7 +3,7 @@ package rg import ( "encoding/json" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/serialization" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/serialization" ) // Serialize returns JSON-serialized []byte. Used as a wrapper over json.Marshal and json.MarshalIndent functions. diff --git a/pkg/cloudbroker/rg/set_cpu_allocation_parameter.go b/pkg/cloudbroker/rg/set_cpu_allocation_parameter.go index f44395e3..f4abf62f 100644 --- a/pkg/cloudbroker/rg/set_cpu_allocation_parameter.go +++ b/pkg/cloudbroker/rg/set_cpu_allocation_parameter.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // SetCPUAllocationParameterRequest struct for setting CPU allocation parameter diff --git a/pkg/cloudbroker/rg/set_cpu_allocation_ratio.go b/pkg/cloudbroker/rg/set_cpu_allocation_ratio.go index cd102a11..074b7bd8 100644 --- a/pkg/cloudbroker/rg/set_cpu_allocation_ratio.go +++ b/pkg/cloudbroker/rg/set_cpu_allocation_ratio.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // SetCPUAllocationRatioRequest struct for setting CPU allocation ratio diff --git a/pkg/cloudbroker/rg/set_def_net.go b/pkg/cloudbroker/rg/set_def_net.go index 22e9a9a0..eb02a370 100644 --- a/pkg/cloudbroker/rg/set_def_net.go +++ b/pkg/cloudbroker/rg/set_def_net.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // SetDefNetRequest struct to set default network diff --git a/pkg/cloudbroker/rg/update.go b/pkg/cloudbroker/rg/update.go index b856ff27..a2c48e0c 100644 --- a/pkg/cloudbroker/rg/update.go +++ b/pkg/cloudbroker/rg/update.go @@ -5,8 +5,8 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/constants" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/constants" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // UpdateRequest struct to update resource group diff --git a/pkg/cloudbroker/rg/update_compute_features.go b/pkg/cloudbroker/rg/update_compute_features.go index a41090d1..00219b14 100644 --- a/pkg/cloudbroker/rg/update_compute_features.go +++ b/pkg/cloudbroker/rg/update_compute_features.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // UpdateComputeFeaturesRequest struct to update advanced compute features diff --git a/pkg/cloudbroker/rg/update_resource_types.go b/pkg/cloudbroker/rg/update_resource_types.go index 76ba0ffd..6a413440 100644 --- a/pkg/cloudbroker/rg/update_resource_types.go +++ b/pkg/cloudbroker/rg/update_resource_types.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // UpdateResourceTypesRequest struct to update resource types in account diff --git a/pkg/cloudbroker/rg/usage.go b/pkg/cloudbroker/rg/usage.go index 597a1b47..33dd900c 100644 --- a/pkg/cloudbroker/rg/usage.go +++ b/pkg/cloudbroker/rg/usage.go @@ -5,7 +5,7 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // UsageRequest struct to get report of resource usage diff --git a/pkg/cloudbroker/secgroup/create.go b/pkg/cloudbroker/secgroup/create.go index 1c37f387..d964e8f3 100644 --- a/pkg/cloudbroker/secgroup/create.go +++ b/pkg/cloudbroker/secgroup/create.go @@ -5,8 +5,8 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/constants" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/constants" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) type CreateRequest struct { diff --git a/pkg/cloudbroker/secgroup/create_rule.go b/pkg/cloudbroker/secgroup/create_rule.go index fe8bc52d..4670a640 100644 --- a/pkg/cloudbroker/secgroup/create_rule.go +++ b/pkg/cloudbroker/secgroup/create_rule.go @@ -5,8 +5,8 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/constants" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/constants" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) type CreateRuleRequest struct { diff --git a/pkg/cloudbroker/secgroup/delete.go b/pkg/cloudbroker/secgroup/delete.go index 02eaefff..58d293b1 100644 --- a/pkg/cloudbroker/secgroup/delete.go +++ b/pkg/cloudbroker/secgroup/delete.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) type DeleteRequest struct { diff --git a/pkg/cloudbroker/secgroup/delete_rule.go b/pkg/cloudbroker/secgroup/delete_rule.go index 6da23bdf..d96f5e6a 100644 --- a/pkg/cloudbroker/secgroup/delete_rule.go +++ b/pkg/cloudbroker/secgroup/delete_rule.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) type DeleteRuleRequest struct { diff --git a/pkg/cloudbroker/secgroup/get.go b/pkg/cloudbroker/secgroup/get.go index 882312cf..3bce6fe7 100644 --- a/pkg/cloudbroker/secgroup/get.go +++ b/pkg/cloudbroker/secgroup/get.go @@ -5,7 +5,7 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) type GetRequest struct { diff --git a/pkg/cloudbroker/secgroup/list.go b/pkg/cloudbroker/secgroup/list.go index ab7ecace..ce19c87b 100644 --- a/pkg/cloudbroker/secgroup/list.go +++ b/pkg/cloudbroker/secgroup/list.go @@ -5,7 +5,7 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) type ListRequest struct { diff --git a/pkg/cloudbroker/secgroup/security_group.go b/pkg/cloudbroker/secgroup/security_group.go index a5c3e219..5939587b 100644 --- a/pkg/cloudbroker/secgroup/security_group.go +++ b/pkg/cloudbroker/secgroup/security_group.go @@ -1,6 +1,6 @@ package secgroup -import "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/interfaces" +import "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/interfaces" // Structure for creating request to storage policy type SecurityGroup struct { diff --git a/pkg/cloudbroker/secgroup/update.go b/pkg/cloudbroker/secgroup/update.go index ca57bc79..23633922 100644 --- a/pkg/cloudbroker/secgroup/update.go +++ b/pkg/cloudbroker/secgroup/update.go @@ -5,7 +5,7 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) type UpdateRequest struct { diff --git a/pkg/cloudbroker/securitygroup.go b/pkg/cloudbroker/securitygroup.go index 295df544..c9ad8e2e 100644 --- a/pkg/cloudbroker/securitygroup.go +++ b/pkg/cloudbroker/securitygroup.go @@ -1,7 +1,7 @@ package cloudbroker import ( - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/pkg/cloudbroker/secgroup" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/pkg/cloudbroker/secgroup" ) // Accessing the Security Group method group diff --git a/pkg/cloudbroker/sep.go b/pkg/cloudbroker/sep.go index e8be9b6a..6850c98f 100644 --- a/pkg/cloudbroker/sep.go +++ b/pkg/cloudbroker/sep.go @@ -1,6 +1,6 @@ package cloudbroker -import "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/pkg/cloudbroker/sep" +import "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/pkg/cloudbroker/sep" // Accessing the SEP method group func (cb *CloudBroker) SEP() *sep.SEP { diff --git a/pkg/cloudbroker/sep/access_grant.go b/pkg/cloudbroker/sep/access_grant.go deleted file mode 100644 index a03f6c2d..00000000 --- a/pkg/cloudbroker/sep/access_grant.go +++ /dev/null @@ -1,43 +0,0 @@ -package sep - -import ( - "context" - "net/http" - "strconv" - - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" -) - -// AccessGrantRequest struct to grant access to SEP -type AccessGrantRequest struct { - // Storage endpoint provider ID - // Required: true - SEPID uint64 `url:"sep_id" json:"sep_id" validate:"required"` - - // Account ID to grant access to the specified SEP. If 0, - // the SEP will be available for all accounts with no exceptions - // Required: true - AccountID uint64 `url:"account_id" json:"account_id" validate:"required"` -} - -// AccessGrant grants access to SEP -func (s SEP) AccessGrant(ctx context.Context, req AccessGrantRequest) (bool, error) { - err := validators.ValidateRequest(req) - if err != nil { - return false, validators.ValidationErrors(validators.GetErrors(err)) - } - - url := "/cloudbroker/sep/accessGrant" - - res, err := s.client.DecortApiCall(ctx, http.MethodPost, url, req) - if err != nil { - return false, err - } - - result, err := strconv.ParseBool(string(res)) - if err != nil { - return false, err - } - - return result, nil -} diff --git a/pkg/cloudbroker/sep/access_grant_to_pool.go b/pkg/cloudbroker/sep/access_grant_to_pool.go deleted file mode 100644 index 75927594..00000000 --- a/pkg/cloudbroker/sep/access_grant_to_pool.go +++ /dev/null @@ -1,50 +0,0 @@ -package sep - -import ( - "context" - "net/http" - "strconv" - - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" -) - -// AccessGrantToPoolRequest struct to grant access to pool SEP -type AccessGrantToPoolRequest struct { - // Storage endpoint provider ID - // Required: true - SEPID uint64 `url:"sep_id" json:"sep_id" validate:"required"` - - // Pool name - // Required: true - PoolName string `url:"pool_name" json:"pool_name" validate:"required"` - - // Account ID to grant access to the specified pool SEP - // Required: false - AccountID uint64 `url:"account_id,omitempty" json:"account_id,omitempty"` - - // Resource group to grant access to the specified pool SEP - // Required: false - RGID uint64 `url:"resgroup_id,omitempty" json:"resgroup_id,omitempty"` -} - -// AccessGrantToPool grants access to pool SEP -func (s SEP) AccessGrantToPool(ctx context.Context, req AccessGrantToPoolRequest) (bool, error) { - err := validators.ValidateRequest(req) - if err != nil { - return false, validators.ValidationErrors(validators.GetErrors(err)) - } - - url := "/cloudbroker/sep/accessGrantToPool" - - res, err := s.client.DecortApiCall(ctx, http.MethodPost, url, req) - if err != nil { - return false, err - } - - result, err := strconv.ParseBool(string(res)) - if err != nil { - return false, err - } - - return result, nil -} diff --git a/pkg/cloudbroker/sep/access_revoke.go b/pkg/cloudbroker/sep/access_revoke.go deleted file mode 100644 index 73f73485..00000000 --- a/pkg/cloudbroker/sep/access_revoke.go +++ /dev/null @@ -1,42 +0,0 @@ -package sep - -import ( - "context" - "net/http" - "strconv" - - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" -) - -// AccessRevokeRequest struct to revoke access to SEP -type AccessRevokeRequest struct { - // Storage endpoint provider ID - // Required: true - SEPID uint64 `url:"sep_id" json:"sep_id" validate:"required"` - - // Account ID to revoke access to the specified SEP - // Required: true - AccountID uint64 `url:"account_id" json:"account_id" validate:"required"` -} - -// AccessRevoke revokes access to SEP -func (s SEP) AccessRevoke(ctx context.Context, req AccessRevokeRequest) (bool, error) { - err := validators.ValidateRequest(req) - if err != nil { - return false, validators.ValidationErrors(validators.GetErrors(err)) - } - - url := "/cloudbroker/sep/accessRevoke" - - res, err := s.client.DecortApiCall(ctx, http.MethodPost, url, req) - if err != nil { - return false, err - } - - result, err := strconv.ParseBool(string(res)) - if err != nil { - return false, err - } - - return result, nil -} diff --git a/pkg/cloudbroker/sep/access_revoke_to_pool.go b/pkg/cloudbroker/sep/access_revoke_to_pool.go deleted file mode 100644 index e2baf882..00000000 --- a/pkg/cloudbroker/sep/access_revoke_to_pool.go +++ /dev/null @@ -1,50 +0,0 @@ -package sep - -import ( - "context" - "net/http" - "strconv" - - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" -) - -// AccessRevokeToPoolRequest struct to revoke access to pool SEP -type AccessRevokeToPoolRequest struct { - // Storage endpoint provider ID - // Required: true - SEPID uint64 `url:"sep_id" json:"sep_id" validate:"required"` - - // Pool name - // Required: true - PoolName string `url:"pool_name" json:"pool_name" validate:"required"` - - // Account ID to grant access to the specified pool SEP - // Required: false - AccountID uint64 `url:"account_id,omitempty" json:"account_id,omitempty"` - - // Resource group ID to grant access to the specified pool SEP - // Required: false - RGID uint64 `url:"resgroup_id,omitempty" json:"resgroup_id,omitempty"` -} - -// AccessRevokeToPool revokes access to pool SEP -func (s SEP) AccessRevokeToPool(ctx context.Context, req AccessRevokeToPoolRequest) (bool, error) { - err := validators.ValidateRequest(req) - if err != nil { - return false, validators.ValidationErrors(validators.GetErrors(err)) - } - - url := "/cloudbroker/sep/accessRevokeToPool" - - res, err := s.client.DecortApiCall(ctx, http.MethodPost, url, req) - if err != nil { - return false, err - } - - result, err := strconv.ParseBool(string(res)) - if err != nil { - return false, err - } - - return result, nil -} diff --git a/pkg/cloudbroker/sep/add_consumer_nodes.go b/pkg/cloudbroker/sep/add_consumer_nodes.go index 72ef2273..8f1457e6 100644 --- a/pkg/cloudbroker/sep/add_consumer_nodes.go +++ b/pkg/cloudbroker/sep/add_consumer_nodes.go @@ -5,7 +5,7 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // AddConsumerNodesRequest struct to add consumer nodes diff --git a/pkg/cloudbroker/sep/add_pool.go b/pkg/cloudbroker/sep/add_pool.go index 547730ca..0efda745 100644 --- a/pkg/cloudbroker/sep/add_pool.go +++ b/pkg/cloudbroker/sep/add_pool.go @@ -6,7 +6,7 @@ import ( "strconv" "strings" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // AddPoolRequest struct to add pool to storage endpoint (SEP) diff --git a/pkg/cloudbroker/sep/add_provider_nodes.go b/pkg/cloudbroker/sep/add_provider_nodes.go index 5447c91d..830c2917 100644 --- a/pkg/cloudbroker/sep/add_provider_nodes.go +++ b/pkg/cloudbroker/sep/add_provider_nodes.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // AddProviderNodesRequest struct to add provider nodes diff --git a/pkg/cloudbroker/sep/config_field_edit.go b/pkg/cloudbroker/sep/config_field_edit.go index 12be6eb2..5adef66b 100644 --- a/pkg/cloudbroker/sep/config_field_edit.go +++ b/pkg/cloudbroker/sep/config_field_edit.go @@ -5,7 +5,7 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // ConfigFieldEditRequest struct to edit config fields diff --git a/pkg/cloudbroker/sep/config_insert.go b/pkg/cloudbroker/sep/config_insert.go index b89295b6..30d742ba 100644 --- a/pkg/cloudbroker/sep/config_insert.go +++ b/pkg/cloudbroker/sep/config_insert.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // ConfigInsertRequest struct to insert config diff --git a/pkg/cloudbroker/sep/config_validate.go b/pkg/cloudbroker/sep/config_validate.go index fa3887c4..04cddc64 100644 --- a/pkg/cloudbroker/sep/config_validate.go +++ b/pkg/cloudbroker/sep/config_validate.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // ConfigValidateRequest struct to validate config diff --git a/pkg/cloudbroker/sep/consumption.go b/pkg/cloudbroker/sep/consumption.go index a218ccb1..c636b450 100644 --- a/pkg/cloudbroker/sep/consumption.go +++ b/pkg/cloudbroker/sep/consumption.go @@ -5,7 +5,7 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // ConsumptionRequest struct to get consumption info diff --git a/pkg/cloudbroker/sep/create.go b/pkg/cloudbroker/sep/create.go index e3728e5f..e6e39706 100644 --- a/pkg/cloudbroker/sep/create.go +++ b/pkg/cloudbroker/sep/create.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // CreateRequest struct to create SEP object diff --git a/pkg/cloudbroker/sep/decommission.go b/pkg/cloudbroker/sep/decommission.go index a6cbaaca..e3dd29d3 100644 --- a/pkg/cloudbroker/sep/decommission.go +++ b/pkg/cloudbroker/sep/decommission.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // DecommissionRequest struct for decommission diff --git a/pkg/cloudbroker/sep/del_consumer_nodes.go b/pkg/cloudbroker/sep/del_consumer_nodes.go index 7a84bca8..4afab1e1 100644 --- a/pkg/cloudbroker/sep/del_consumer_nodes.go +++ b/pkg/cloudbroker/sep/del_consumer_nodes.go @@ -5,7 +5,7 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // DelConsumerNodesRequest struct to exclude consumer nodes diff --git a/pkg/cloudbroker/sep/del_pool.go b/pkg/cloudbroker/sep/del_pool.go index 9423d8a1..bb380968 100644 --- a/pkg/cloudbroker/sep/del_pool.go +++ b/pkg/cloudbroker/sep/del_pool.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // DelPoolRequest struct to delete pool from storage endpoint (SEP) diff --git a/pkg/cloudbroker/sep/delete.go b/pkg/cloudbroker/sep/delete.go index c1a7a9c8..f1b8c25e 100644 --- a/pkg/cloudbroker/sep/delete.go +++ b/pkg/cloudbroker/sep/delete.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // DeleteRequest struct to delete SEP diff --git a/pkg/cloudbroker/sep/disable.go b/pkg/cloudbroker/sep/disable.go index 5b450256..34f27461 100644 --- a/pkg/cloudbroker/sep/disable.go +++ b/pkg/cloudbroker/sep/disable.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // DisableRequest struct to disable SEP diff --git a/pkg/cloudbroker/sep/disk_list.go b/pkg/cloudbroker/sep/disk_list.go index 58a6377c..b242a021 100644 --- a/pkg/cloudbroker/sep/disk_list.go +++ b/pkg/cloudbroker/sep/disk_list.go @@ -5,7 +5,7 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // DiskListRequest struct to get list of disk IDs diff --git a/pkg/cloudbroker/sep/enable.go b/pkg/cloudbroker/sep/enable.go index d570ae34..8df1cc32 100644 --- a/pkg/cloudbroker/sep/enable.go +++ b/pkg/cloudbroker/sep/enable.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // EnableRequest struct to enable SEP diff --git a/pkg/cloudbroker/sep/get.go b/pkg/cloudbroker/sep/get.go index 055ec5f1..135d8ba6 100644 --- a/pkg/cloudbroker/sep/get.go +++ b/pkg/cloudbroker/sep/get.go @@ -5,7 +5,7 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // GetRequest struct to get SEP parameters diff --git a/pkg/cloudbroker/sep/get_config.go b/pkg/cloudbroker/sep/get_config.go index 16505384..23fd7d81 100644 --- a/pkg/cloudbroker/sep/get_config.go +++ b/pkg/cloudbroker/sep/get_config.go @@ -5,7 +5,7 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // GetConfigRequest struct to get SEP config diff --git a/pkg/cloudbroker/sep/get_pool.go b/pkg/cloudbroker/sep/get_pool.go index d6e29c1c..dbd2a105 100644 --- a/pkg/cloudbroker/sep/get_pool.go +++ b/pkg/cloudbroker/sep/get_pool.go @@ -5,7 +5,7 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // GetPoolRequest struct to get SEP pool config by name diff --git a/pkg/cloudbroker/sep/get_template.go b/pkg/cloudbroker/sep/get_template.go index 268db6f5..15421c99 100644 --- a/pkg/cloudbroker/sep/get_template.go +++ b/pkg/cloudbroker/sep/get_template.go @@ -4,7 +4,7 @@ import ( "context" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // GetTemplateRequest struct to get template of SEP diff --git a/pkg/cloudbroker/sep/list.go b/pkg/cloudbroker/sep/list.go index f0190024..b339658a 100644 --- a/pkg/cloudbroker/sep/list.go +++ b/pkg/cloudbroker/sep/list.go @@ -5,7 +5,7 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // ListRequest struct to get list of SEPs diff --git a/pkg/cloudbroker/sep/list_available_sep_and_pools.go b/pkg/cloudbroker/sep/list_available_sep_and_pools.go index 954adc60..f1a45e86 100644 --- a/pkg/cloudbroker/sep/list_available_sep_and_pools.go +++ b/pkg/cloudbroker/sep/list_available_sep_and_pools.go @@ -5,7 +5,7 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // ListAvailableSEPAndPoolsRequest struct to get dict with entry count and list of dict with SEPs and pools details accessible by the Account and RG diff --git a/pkg/cloudbroker/sep/sep.go b/pkg/cloudbroker/sep/sep.go index d5a115d7..6a9b16d8 100644 --- a/pkg/cloudbroker/sep/sep.go +++ b/pkg/cloudbroker/sep/sep.go @@ -2,7 +2,7 @@ package sep import ( - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/interfaces" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/interfaces" ) // Structure for creating request to storage endpoint provider diff --git a/pkg/cloudbroker/sep/serialize.go b/pkg/cloudbroker/sep/serialize.go index 89c1c441..dc424e99 100644 --- a/pkg/cloudbroker/sep/serialize.go +++ b/pkg/cloudbroker/sep/serialize.go @@ -3,7 +3,7 @@ package sep import ( "encoding/json" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/serialization" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/serialization" ) // Serialize returns JSON-serialized []byte. Used as a wrapper over json.Marshal and json.MarshalIndent functions. diff --git a/pkg/cloudbroker/sep/shared_lock_start.go b/pkg/cloudbroker/sep/shared_lock_start.go index 3863568a..5d17dca4 100644 --- a/pkg/cloudbroker/sep/shared_lock_start.go +++ b/pkg/cloudbroker/sep/shared_lock_start.go @@ -6,7 +6,7 @@ import ( "strconv" "strings" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // SharedLockStartRequest struct to start shared locks diff --git a/pkg/cloudbroker/sep/shared_lock_stop.go b/pkg/cloudbroker/sep/shared_lock_stop.go index 89a3f280..55958d5d 100644 --- a/pkg/cloudbroker/sep/shared_lock_stop.go +++ b/pkg/cloudbroker/sep/shared_lock_stop.go @@ -6,7 +6,7 @@ import ( "strconv" "strings" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // SharedLockStopRequest struct to stop shared locks diff --git a/pkg/cloudbroker/sep/update.go b/pkg/cloudbroker/sep/update.go index 1bb00e07..ccfb1d29 100644 --- a/pkg/cloudbroker/sep/update.go +++ b/pkg/cloudbroker/sep/update.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // UpdateRequest struct to update SEP object diff --git a/pkg/cloudbroker/storage_policy.go b/pkg/cloudbroker/storage_policy.go index 1edab132..130fffcb 100644 --- a/pkg/cloudbroker/storage_policy.go +++ b/pkg/cloudbroker/storage_policy.go @@ -1,7 +1,7 @@ package cloudbroker import ( - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/pkg/cloudbroker/stpolicy" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/pkg/cloudbroker/stpolicy" ) // Accessing the Storage Policy method group diff --git a/pkg/cloudbroker/stpolicy/add_pool.go b/pkg/cloudbroker/stpolicy/add_pool.go index 30a6acd5..e573f739 100644 --- a/pkg/cloudbroker/stpolicy/add_pool.go +++ b/pkg/cloudbroker/stpolicy/add_pool.go @@ -5,7 +5,7 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) type AddPoolRequest struct { diff --git a/pkg/cloudbroker/stpolicy/create.go b/pkg/cloudbroker/stpolicy/create.go index 85759106..dffdf417 100644 --- a/pkg/cloudbroker/stpolicy/create.go +++ b/pkg/cloudbroker/stpolicy/create.go @@ -5,8 +5,8 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/constants" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/constants" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) type AccessSEPsPool struct { diff --git a/pkg/cloudbroker/stpolicy/delete.go b/pkg/cloudbroker/stpolicy/delete.go index 748032a6..2bd13d72 100644 --- a/pkg/cloudbroker/stpolicy/delete.go +++ b/pkg/cloudbroker/stpolicy/delete.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) type DeleteRequest struct { diff --git a/pkg/cloudbroker/stpolicy/delete_pool.go b/pkg/cloudbroker/stpolicy/delete_pool.go index 1091e597..4faefdfc 100644 --- a/pkg/cloudbroker/stpolicy/delete_pool.go +++ b/pkg/cloudbroker/stpolicy/delete_pool.go @@ -5,7 +5,7 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) type DeletePoolRequest struct { diff --git a/pkg/cloudbroker/stpolicy/disable.go b/pkg/cloudbroker/stpolicy/disable.go index 09c4ffe0..0c8ef148 100644 --- a/pkg/cloudbroker/stpolicy/disable.go +++ b/pkg/cloudbroker/stpolicy/disable.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) type DisableRequest struct { diff --git a/pkg/cloudbroker/stpolicy/enable.go b/pkg/cloudbroker/stpolicy/enable.go index 8672c982..becae4b2 100644 --- a/pkg/cloudbroker/stpolicy/enable.go +++ b/pkg/cloudbroker/stpolicy/enable.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) type EnableRequest struct { diff --git a/pkg/cloudbroker/stpolicy/get.go b/pkg/cloudbroker/stpolicy/get.go index 0645bae3..f0f6c8f1 100644 --- a/pkg/cloudbroker/stpolicy/get.go +++ b/pkg/cloudbroker/stpolicy/get.go @@ -5,7 +5,7 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) type GetRequest struct { diff --git a/pkg/cloudbroker/stpolicy/list.go b/pkg/cloudbroker/stpolicy/list.go index 0c3f0113..e2b3ae5d 100644 --- a/pkg/cloudbroker/stpolicy/list.go +++ b/pkg/cloudbroker/stpolicy/list.go @@ -5,7 +5,7 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) type ListRequest struct { diff --git a/pkg/cloudbroker/stpolicy/storage_policy.go b/pkg/cloudbroker/stpolicy/storage_policy.go index 3d3f57a8..4fe191b9 100644 --- a/pkg/cloudbroker/stpolicy/storage_policy.go +++ b/pkg/cloudbroker/stpolicy/storage_policy.go @@ -1,6 +1,6 @@ package stpolicy -import "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/interfaces" +import "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/interfaces" // Structure for creating request to storage policy type StPolicy struct { diff --git a/pkg/cloudbroker/stpolicy/update.go b/pkg/cloudbroker/stpolicy/update.go index 58d28c40..b221eba8 100644 --- a/pkg/cloudbroker/stpolicy/update.go +++ b/pkg/cloudbroker/stpolicy/update.go @@ -5,8 +5,8 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/constants" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/constants" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) type UpdateRequest struct { diff --git a/pkg/cloudbroker/tasks.go b/pkg/cloudbroker/tasks.go index abc3ab5f..5149933a 100644 --- a/pkg/cloudbroker/tasks.go +++ b/pkg/cloudbroker/tasks.go @@ -1,7 +1,7 @@ package cloudbroker import ( - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/pkg/cloudbroker/tasks" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/pkg/cloudbroker/tasks" ) // Accessing the tasks method group diff --git a/pkg/cloudbroker/tasks/get.go b/pkg/cloudbroker/tasks/get.go index fa3fd196..96732add 100644 --- a/pkg/cloudbroker/tasks/get.go +++ b/pkg/cloudbroker/tasks/get.go @@ -5,7 +5,7 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // GetRequest struct to get background API task status and result diff --git a/pkg/cloudbroker/tasks/list.go b/pkg/cloudbroker/tasks/list.go index 38e4c3a5..20ca8e36 100644 --- a/pkg/cloudbroker/tasks/list.go +++ b/pkg/cloudbroker/tasks/list.go @@ -5,7 +5,7 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // ListRequest struct to get list of audits @@ -38,6 +38,14 @@ type ListRequest struct { // Required: false UpdateTimeTo uint64 `url:"updateTimeTo,omitempty" json:"updateTimeTo,omitempty"` + // Find all tasks created after point in time (unixtime) + // Required: false + CreatedTimeAt uint64 `url:"createdTimeAt,omitempty" json:"createdTimeAt,omitempty"` + + // Find all tasks created after before in time (unixtime) + // Required: false + CreatedTimeTo uint64 `url:"createdTimeTo,omitempty" json:"createdTimeTo,omitempty"` + // Page number // Default: 0 // Default: 0 diff --git a/pkg/cloudbroker/tasks/models.go b/pkg/cloudbroker/tasks/models.go index 43b7c17d..94696f95 100644 --- a/pkg/cloudbroker/tasks/models.go +++ b/pkg/cloudbroker/tasks/models.go @@ -48,6 +48,9 @@ type ItemTask struct { // Updated time UpdatedTime uint64 `json:"updatedTime"` + + // Time of creation + CreatedTime uint64 `json:"createdTime"` } // List of tasks diff --git a/pkg/cloudbroker/tasks/tasks.go b/pkg/cloudbroker/tasks/tasks.go index b0e5b2aa..ed574848 100644 --- a/pkg/cloudbroker/tasks/tasks.go +++ b/pkg/cloudbroker/tasks/tasks.go @@ -1,7 +1,7 @@ // User API tasks interface package tasks -import "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/interfaces" +import "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/interfaces" // Structure for creating request to tasks type Tasks struct { diff --git a/pkg/cloudbroker/trunk.go b/pkg/cloudbroker/trunk.go index e52389d6..c00bd927 100644 --- a/pkg/cloudbroker/trunk.go +++ b/pkg/cloudbroker/trunk.go @@ -1,7 +1,7 @@ package cloudbroker import ( - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/pkg/cloudbroker/trunk" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/pkg/cloudbroker/trunk" ) // Accessing the Trunk method group diff --git a/pkg/cloudbroker/trunk/access_grant.go b/pkg/cloudbroker/trunk/access_grant.go index 5883db1d..efc44ce3 100644 --- a/pkg/cloudbroker/trunk/access_grant.go +++ b/pkg/cloudbroker/trunk/access_grant.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // AccessGrant struct to grant access to a trunk to some accounts diff --git a/pkg/cloudbroker/trunk/access_revoke.go b/pkg/cloudbroker/trunk/access_revoke.go index ccb09db9..5fac5b33 100644 --- a/pkg/cloudbroker/trunk/access_revoke.go +++ b/pkg/cloudbroker/trunk/access_revoke.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // AccessRevoke struct to grant access to a trunk to some accounts diff --git a/pkg/cloudbroker/trunk/create.go b/pkg/cloudbroker/trunk/create.go index 2e3e718d..294f7239 100644 --- a/pkg/cloudbroker/trunk/create.go +++ b/pkg/cloudbroker/trunk/create.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // CreateRequest struct to create a trunk diff --git a/pkg/cloudbroker/trunk/destroy.go b/pkg/cloudbroker/trunk/destroy.go index 27de09b7..6487a3ca 100644 --- a/pkg/cloudbroker/trunk/destroy.go +++ b/pkg/cloudbroker/trunk/destroy.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // DestroyRequest struct to destroy a trunk diff --git a/pkg/cloudbroker/trunk/disable.go b/pkg/cloudbroker/trunk/disable.go index e6489886..13ebf5ff 100644 --- a/pkg/cloudbroker/trunk/disable.go +++ b/pkg/cloudbroker/trunk/disable.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // DisableRequest struct to disable a trunk diff --git a/pkg/cloudbroker/trunk/enable.go b/pkg/cloudbroker/trunk/enable.go index 4ae5353e..c611a09b 100644 --- a/pkg/cloudbroker/trunk/enable.go +++ b/pkg/cloudbroker/trunk/enable.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // EnableRequest struct to enable a trunk diff --git a/pkg/cloudbroker/trunk/get.go b/pkg/cloudbroker/trunk/get.go index 6f120406..a3dc42ec 100644 --- a/pkg/cloudbroker/trunk/get.go +++ b/pkg/cloudbroker/trunk/get.go @@ -5,7 +5,7 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // GetRequest struct to get information about a trunk diff --git a/pkg/cloudbroker/trunk/list.go b/pkg/cloudbroker/trunk/list.go index 419b96c3..8c93ee2a 100644 --- a/pkg/cloudbroker/trunk/list.go +++ b/pkg/cloudbroker/trunk/list.go @@ -5,7 +5,7 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // ListRequest struct to get list of trunks diff --git a/pkg/cloudbroker/trunk/trunk.go b/pkg/cloudbroker/trunk/trunk.go index d0b43055..c6331373 100644 --- a/pkg/cloudbroker/trunk/trunk.go +++ b/pkg/cloudbroker/trunk/trunk.go @@ -1,7 +1,7 @@ package trunk import ( - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/interfaces" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/interfaces" ) // Structure for creating request to trunk diff --git a/pkg/cloudbroker/trunk/update.go b/pkg/cloudbroker/trunk/update.go index c1dcc707..38449f00 100644 --- a/pkg/cloudbroker/trunk/update.go +++ b/pkg/cloudbroker/trunk/update.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // UpdateRequest struct to update a trunk diff --git a/pkg/cloudbroker/user.go b/pkg/cloudbroker/user.go index dce9e278..45fe5c0c 100644 --- a/pkg/cloudbroker/user.go +++ b/pkg/cloudbroker/user.go @@ -1,6 +1,6 @@ package cloudbroker -import "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/pkg/cloudbroker/user" +import "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/pkg/cloudbroker/user" func (cb *CloudBroker) User() *user.User { return user.New(cb.client) diff --git a/pkg/cloudbroker/user/api_list.go b/pkg/cloudbroker/user/api_list.go index 3f6a02c2..773c147f 100644 --- a/pkg/cloudbroker/user/api_list.go +++ b/pkg/cloudbroker/user/api_list.go @@ -5,7 +5,7 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // APIListRequest struct for getting API list. diff --git a/pkg/cloudbroker/user/apiaccess_join.go b/pkg/cloudbroker/user/apiaccess_join.go index cfa5fdec..9797a692 100644 --- a/pkg/cloudbroker/user/apiaccess_join.go +++ b/pkg/cloudbroker/user/apiaccess_join.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // APIAccessJoinRequest struct for joining user into apiaccess group. diff --git a/pkg/cloudbroker/user/apiaccess_leave.go b/pkg/cloudbroker/user/apiaccess_leave.go index 29ec9f27..9ed98e9c 100644 --- a/pkg/cloudbroker/user/apiaccess_leave.go +++ b/pkg/cloudbroker/user/apiaccess_leave.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // APIAccessLeaveRequest struct for leaving user from apiaccess group. diff --git a/pkg/cloudbroker/user/apiaccess_list.go b/pkg/cloudbroker/user/apiaccess_list.go index 1936a81d..7eeb70d1 100644 --- a/pkg/cloudbroker/user/apiaccess_list.go +++ b/pkg/cloudbroker/user/apiaccess_list.go @@ -5,7 +5,7 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // APIAccessListRequest struct for showing list of dicts with information about diff --git a/pkg/cloudbroker/user/block.go b/pkg/cloudbroker/user/block.go index 63847c0e..ab1ea236 100644 --- a/pkg/cloudbroker/user/block.go +++ b/pkg/cloudbroker/user/block.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // BlockRequest struct to block a user. diff --git a/pkg/cloudbroker/user/create.go b/pkg/cloudbroker/user/create.go index a53b4e71..dfe58d2e 100644 --- a/pkg/cloudbroker/user/create.go +++ b/pkg/cloudbroker/user/create.go @@ -4,7 +4,7 @@ import ( "context" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // CreateRequest struct for creating a user. diff --git a/pkg/cloudbroker/user/delete.go b/pkg/cloudbroker/user/delete.go index 4cfd9675..b25362ba 100644 --- a/pkg/cloudbroker/user/delete.go +++ b/pkg/cloudbroker/user/delete.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // DeleteRequest struct for deleting a user. diff --git a/pkg/cloudbroker/user/delete_by_guid.go b/pkg/cloudbroker/user/delete_by_guid.go index 7c107a03..1a4662b1 100644 --- a/pkg/cloudbroker/user/delete_by_guid.go +++ b/pkg/cloudbroker/user/delete_by_guid.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // DeleteByGUIDRequest struct for deleting a user using user's GUID. diff --git a/pkg/cloudbroker/user/delete_users.go b/pkg/cloudbroker/user/delete_users.go index bd193ed0..26c38834 100644 --- a/pkg/cloudbroker/user/delete_users.go +++ b/pkg/cloudbroker/user/delete_users.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // DeleteUsersRequest struct for bulk delete a list of users. diff --git a/pkg/cloudbroker/user/get.go b/pkg/cloudbroker/user/get.go index d8113361..4a67943f 100644 --- a/pkg/cloudbroker/user/get.go +++ b/pkg/cloudbroker/user/get.go @@ -5,7 +5,7 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // GetRequest struct to get user details. diff --git a/pkg/cloudbroker/user/get_audit.go b/pkg/cloudbroker/user/get_audit.go deleted file mode 100644 index b7c6b2ba..00000000 --- a/pkg/cloudbroker/user/get_audit.go +++ /dev/null @@ -1,62 +0,0 @@ -package user - -import ( - "context" - "encoding/json" - "net/http" -) - -// GetAuditRequest struct for getting user's audits. -type GetAuditRequest struct { - // Name of user (get audits for current user if set to empty). - // Required: false - Username string `url:"username,omitempty" json:"username,omitempty"` - - // Find by api call. - // Required: false - Call string `url:"call,omitempty" json:"call,omitempty"` - - // Find by HTTP status code - // Required: false - StatusCode uint64 `url:"statuscode,omitempty" json:"statuscode,omitempty"` - - // Find all audits after point in time (unixtime) - // Required: false - TimestampAt uint64 `url:"timestampAt,omitempty" json:"timestampAt,omitempty"` - - // Find all audits before point in time (unixtime) - // Required: false - TimestampTo uint64 `url:"timestampTo,omitempty" json:"timestampTo,omitempty"` - - // Sort by a field, format +|-(field) - // Default: -timestamp - // Required: false - SortBy string `url:"sortBy,omitempty" json:"sortBy,omitempty" validate:"omitempty,sortBy"` - - // Page number. - // Required: false - Page uint64 `url:"page,omitempty" json:"page,omitempty"` - - // Page size, maximum - 100. - // Required: false - Size uint64 `url:"size,omitempty" json:"size,omitempty"` -} - -// GetAudit gets user's audits. -func (u User) GetAudit(ctx context.Context, req GetAuditRequest) (ListAudits, error) { - url := "/cloudbroker/user/getAudit" - - res, err := u.client.DecortApiCall(ctx, http.MethodPost, url, req) - if err != nil { - return ListAudits{}, err - } - - list := ListAudits{} - - err = json.Unmarshal(res, &list) - if err != nil { - return ListAudits{}, err - } - - return list, nil -} diff --git a/pkg/cloudbroker/user/get_matching_usernames.go b/pkg/cloudbroker/user/get_matching_usernames.go index ef00131d..c4e3b173 100644 --- a/pkg/cloudbroker/user/get_matching_usernames.go +++ b/pkg/cloudbroker/user/get_matching_usernames.go @@ -5,7 +5,7 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // GetMatchingUsernamesRequest struct for getting a list of the matching usernames for a given string. diff --git a/pkg/cloudbroker/user/list.go b/pkg/cloudbroker/user/list.go index 223a5f71..1787c10e 100644 --- a/pkg/cloudbroker/user/list.go +++ b/pkg/cloudbroker/user/list.go @@ -5,7 +5,7 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // ListRequest struct to get all non deleted user instances. diff --git a/pkg/cloudbroker/user/unblock.go b/pkg/cloudbroker/user/unblock.go index 9c0bcc9c..51c31588 100644 --- a/pkg/cloudbroker/user/unblock.go +++ b/pkg/cloudbroker/user/unblock.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // UnblockRequest struct to block a user. diff --git a/pkg/cloudbroker/user/user.go b/pkg/cloudbroker/user/user.go index 2056f482..074c6f26 100644 --- a/pkg/cloudbroker/user/user.go +++ b/pkg/cloudbroker/user/user.go @@ -1,6 +1,6 @@ package user -import "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/interfaces" +import "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/interfaces" // Structure for creating request to User type User struct { diff --git a/pkg/cloudbroker/vfpool.go b/pkg/cloudbroker/vfpool.go index 70e2841f..a7de8c51 100644 --- a/pkg/cloudbroker/vfpool.go +++ b/pkg/cloudbroker/vfpool.go @@ -1,6 +1,6 @@ package cloudbroker -import "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/pkg/cloudbroker/vfpool" +import "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/pkg/cloudbroker/vfpool" // Accessing the VFPool method group func (cb *CloudBroker) VFPool() *vfpool.VFPool { diff --git a/pkg/cloudbroker/vfpool/create.go b/pkg/cloudbroker/vfpool/create.go index 6d4ecbf5..ff963dff 100644 --- a/pkg/cloudbroker/vfpool/create.go +++ b/pkg/cloudbroker/vfpool/create.go @@ -6,7 +6,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // CreateRequest struct to create vfpool device diff --git a/pkg/cloudbroker/vfpool/delete.go b/pkg/cloudbroker/vfpool/delete.go index 8cdafb5f..9faa8f86 100644 --- a/pkg/cloudbroker/vfpool/delete.go +++ b/pkg/cloudbroker/vfpool/delete.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // DeleteRequest struct to delete vfpool device diff --git a/pkg/cloudbroker/vfpool/disable.go b/pkg/cloudbroker/vfpool/disable.go index 25794c4f..57c1de97 100644 --- a/pkg/cloudbroker/vfpool/disable.go +++ b/pkg/cloudbroker/vfpool/disable.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // DisableRequest struct to disable vfpool device diff --git a/pkg/cloudbroker/vfpool/enable.go b/pkg/cloudbroker/vfpool/enable.go index 9beaccb5..4cd21e58 100644 --- a/pkg/cloudbroker/vfpool/enable.go +++ b/pkg/cloudbroker/vfpool/enable.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // EnableRequest struct to enable vfpool device diff --git a/pkg/cloudbroker/vfpool/get.go b/pkg/cloudbroker/vfpool/get.go index 180caa15..ccc1d1f6 100644 --- a/pkg/cloudbroker/vfpool/get.go +++ b/pkg/cloudbroker/vfpool/get.go @@ -5,7 +5,7 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // GetRequest struct to get detailed information about vfpool device diff --git a/pkg/cloudbroker/vfpool/list.go b/pkg/cloudbroker/vfpool/list.go index fe25514a..cf601d6e 100644 --- a/pkg/cloudbroker/vfpool/list.go +++ b/pkg/cloudbroker/vfpool/list.go @@ -5,7 +5,7 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // ListRequest struct to get list of vfpool devices diff --git a/pkg/cloudbroker/vfpool/serialize.go b/pkg/cloudbroker/vfpool/serialize.go index 48d7f4f2..ad14085b 100644 --- a/pkg/cloudbroker/vfpool/serialize.go +++ b/pkg/cloudbroker/vfpool/serialize.go @@ -3,7 +3,7 @@ package vfpool import ( "encoding/json" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/serialization" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/serialization" ) // Serialize returns JSON-serialized []byte. Used as a wrapper over json.Marshal and json.MarshalIndent functions. diff --git a/pkg/cloudbroker/vfpool/update.go b/pkg/cloudbroker/vfpool/update.go index 11db664a..cc3b1087 100644 --- a/pkg/cloudbroker/vfpool/update.go +++ b/pkg/cloudbroker/vfpool/update.go @@ -6,7 +6,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // UpdateRequest struct to update vfpool device diff --git a/pkg/cloudbroker/vfpool/vfpool.go b/pkg/cloudbroker/vfpool/vfpool.go index e0e05bea..db5a992b 100644 --- a/pkg/cloudbroker/vfpool/vfpool.go +++ b/pkg/cloudbroker/vfpool/vfpool.go @@ -2,7 +2,7 @@ package vfpool import ( - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/interfaces" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/interfaces" ) // Structure for creating request to vfpool diff --git a/pkg/cloudbroker/vgpu.go b/pkg/cloudbroker/vgpu.go index fe2de0af..df17e310 100644 --- a/pkg/cloudbroker/vgpu.go +++ b/pkg/cloudbroker/vgpu.go @@ -1,6 +1,6 @@ package cloudbroker -import "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/pkg/cloudbroker/vgpu" +import "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/pkg/cloudbroker/vgpu" // Accessing the VGPU method group func (cb *CloudBroker) VGPU() *vgpu.VGPU { diff --git a/pkg/cloudbroker/vgpu/allocate.go b/pkg/cloudbroker/vgpu/allocate.go deleted file mode 100644 index 751b5cc4..00000000 --- a/pkg/cloudbroker/vgpu/allocate.go +++ /dev/null @@ -1,38 +0,0 @@ -package vgpu - -import ( - "context" - "net/http" - "strconv" - - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" -) - -// AllocateRequest struct for allocating VGPU -type AllocateRequest struct { - // Virtual GPU ID - // Required: true - VGPUID uint64 `url:"vgpuId" json:"vgpuId" validate:"required"` -} - -// Allocate allocates GPU -func (v VGPU) Allocate(ctx context.Context, req AllocateRequest) (bool, error) { - err := validators.ValidateRequest(req) - if err != nil { - return false, validators.ValidationErrors(validators.GetErrors(err)) - } - - url := "/cloudbroker/vgpu/allocate" - - res, err := v.client.DecortApiCall(ctx, http.MethodPost, url, req) - if err != nil { - return false, err - } - - result, err := strconv.ParseBool(string(res)) - if err != nil { - return false, err - } - - return result, nil -} diff --git a/pkg/cloudbroker/vgpu/create.go b/pkg/cloudbroker/vgpu/create.go index a33c9898..95aa70a5 100644 --- a/pkg/cloudbroker/vgpu/create.go +++ b/pkg/cloudbroker/vgpu/create.go @@ -5,26 +5,30 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // CreateRequest struct for creating VGPU type CreateRequest struct { // ID of pGPU // Required: true - PGPUID uint64 `url:"pgpuId" json:"pgpuId" validate:"required"` - - // ID of the target resource group. - // Required: true - RGID uint64 `url:"rgId" json:"rgId" validate:"required"` + PGPUID uint64 `url:"pgpu_id" json:"pgpu_id" validate:"required"` // Virtual profile id // Required: false - ProfileID uint64 `url:"profileId,omitempty" json:"profileId,omitempty"` + ProfileID string `url:"profile_id,omitempty" json:"profile_id,omitempty"` - // Allocate vgpu after creation + // MDEV Type // Required: false - Allocate bool `url:"allocate,omitempty" json:"allocate,omitempty"` + MDEVType string `url:"mdev_type,omitempty" json:"mdev_type,omitempty"` + + // PCI Address + // Required: false + PCIAddress string `url:"pci_address,omitempty" json:"pci_address,omitempty"` + + // Account IDs + // Required: false + AccountIDs []uint64 `url:"account_ids,omitempty" json:"account_ids,omitempty"` } // Create creates VGPU diff --git a/pkg/cloudbroker/vgpu/deallocate.go b/pkg/cloudbroker/vgpu/deallocate.go deleted file mode 100644 index 1c917b50..00000000 --- a/pkg/cloudbroker/vgpu/deallocate.go +++ /dev/null @@ -1,42 +0,0 @@ -package vgpu - -import ( - "context" - "net/http" - "strconv" - - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" -) - -// DeallocateRequest struct for deallocating VGPU -type DeallocateRequest struct { - // Virtual GPU ID - // Required: true - VGPUID uint64 `url:"vgpuId" json:"vgpuId" validate:"required"` - - // Force delete (detach from compute) - // Required: false - Force bool `url:"force,omitempty" json:"force,omitempty"` -} - -// Deallocate releases GPU resources -func (v VGPU) Deallocate(ctx context.Context, req DeallocateRequest) (bool, error) { - err := validators.ValidateRequest(req) - if err != nil { - return false, validators.ValidationErrors(validators.GetErrors(err)) - } - - url := "/cloudbroker/vgpu/deallocate" - - res, err := v.client.DecortApiCall(ctx, http.MethodPost, url, req) - if err != nil { - return false, err - } - - result, err := strconv.ParseBool(string(res)) - if err != nil { - return false, err - } - - return result, nil -} diff --git a/pkg/cloudbroker/vgpu/destroy.go b/pkg/cloudbroker/vgpu/destroy.go index e3a972ad..2fd2cd12 100644 --- a/pkg/cloudbroker/vgpu/destroy.go +++ b/pkg/cloudbroker/vgpu/destroy.go @@ -5,18 +5,14 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // DestroyRequest struct for destroying VGPU type DestroyRequest struct { // Virtual GPU ID // Required: true - VGPUID uint64 `url:"vgpuId" json:"vgpuId" validate:"required"` - - // Force delete (deallocate and detach from compute) - // Required: false - Force bool `url:"force,omitempty" json:"force,omitempty"` + VGPUID uint64 `url:"vgpu_id" json:"vgpu_id" validate:"required"` } // Destroy destroys VGPU diff --git a/pkg/cloudbroker/vgpu/list.go b/pkg/cloudbroker/vgpu/list.go index ec498b9b..d00c0c1e 100644 --- a/pkg/cloudbroker/vgpu/list.go +++ b/pkg/cloudbroker/vgpu/list.go @@ -5,7 +5,7 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // ListRequest struct to get list of VGPU @@ -18,37 +18,29 @@ type ListRequest struct { // Required: false Status string `url:"status,omitempty" json:"status,omitempty"` - // Find by vgpu type + // Find by mode // Required: false - Type string `url:"type,omitempty" json:"type,omitempty"` - - // Find by vgpu mode - // Required: false - Mode string `url:"mode,omitempty" json:"mode,omitempty"` - - // Find by id resgroup - // Required: false - RGID uint64 `url:"rgId,omitempty" json:"rgId,omitempty"` + SplitMode string `url:"split_mode,omitempty" json:"split_mode,omitempty"` // Find by id node // Required: false - NID uint64 `url:"nid,omitempty" json:"nid,omitempty"` + NodeID uint64 `url:"node_id,omitempty" json:"node_id,omitempty"` // Find by account id // Required: false - AccountID uint64 `url:"accountId,omitempty" json:"accountId,omitempty"` + AccountID uint64 `url:"account_id,omitempty" json:"account_id,omitempty"` // Find by compute id // Required: false - ComputeID uint64 `url:"computeId,omitempty" json:"computeId,omitempty"` + ComputeID uint64 `url:"compute_id,omitempty" json:"compute_id,omitempty"` // Find by pgpu id // Required: false - PGPUID uint64 `url:"pgpuId,omitempty" json:"pgpuId,omitempty"` + PGPUID uint64 `url:"pgpu_id,omitempty" json:"pgpu_id,omitempty"` // Sort by one of supported fields, format +|-(field) // Required: false - SortBy string `url:"sortBy,omitempty" json:"sortBy,omitempty" validate:"omitempty,sortBy"` + SortBy string `url:"sort_by,omitempty" json:"sort_by,omitempty" validate:"omitempty,sortBy"` // Page number // Required: false @@ -87,6 +79,6 @@ func (v VGPU) ListRaw(ctx context.Context, req ListRequest) ([]byte, error) { url := "/cloudbroker/vgpu/list" - res, err := v.client.DecortApiCall(ctx, http.MethodPost, url, req) + res, err := v.client.DecortApiCall(ctx, http.MethodGet, url, req) return res, err } diff --git a/pkg/cloudbroker/vgpu/models.go b/pkg/cloudbroker/vgpu/models.go index c7fa6954..27ab6b17 100644 --- a/pkg/cloudbroker/vgpu/models.go +++ b/pkg/cloudbroker/vgpu/models.go @@ -7,14 +7,23 @@ type ItemVGPU struct { // Meta Meta []interface{} `json:"_meta"` - // Account ID - AccountID uint64 `json:"accountId"` + // Account IDs + AccountIDs []uint64 `json:"account_ids"` + + // Bus number + BusNumber int `json:"bus_number"` + + // ComputeID + ComputeID uint64 `json:"compute_id"` // Created time - CreatedTime uint64 `json:"createdTime"` + CreatedTime uint64 `json:"created_time"` // Deleted time - DeletedTime uint64 `json:"deletedTime"` + DeletedTime uint64 `json:"deleted_time"` + + // Device Reference + DeviceReference string `json:"device_reference"` //Grid ID GID uint64 `json:"gid"` @@ -25,41 +34,29 @@ type ItemVGPU struct { // VGPU ID ID uint64 `json:"id"` - // Last claimed by - LastClaimedBy uint64 `json:"lastClaimedBy"` + // Last Update time + LastUpdateTime uint64 `json:"last_update_time"` - // Last update time - LastUpdateTime uint64 `json:"lastUpdateTime"` + // Mdev UUID + MdevUUID string `json:"mdev_uuid"` - // Mode - Mode string `json:"mode"` + // Parent PCI Address + ParentPCIAddress string `json:"parent_pci_address"` // PCI Slot - PCISlot interface{} `json:"pciSlot"` + PCISlot uint64 `json:"pci_slot"` - // PGPUID - PGPUID uint64 `json:"pgpuid"` + // PGPU ID + PGPUID uint64 `json:"pgpu_id"` - // Profile ID - ProfileID interface{} `json:"profileId"` + // Profile Reference + ProfileReference string `json:"profile_reference"` - // RAM - RAM uint64 `json:"ram"` - - // Reference ID - ReferenceID interface{} `json:"referenceId"` - - // RGID - RGID uint64 `json:"rgId"` + // Split Mode + SplitMode string `json:"split_mode"` // Status Status string `json:"status"` - - // Type - Type string `json:"type"` - - // VMID - VMID uint64 `json:"vmid"` } // List of VGPU diff --git a/pkg/cloudbroker/vgpu/serialize.go b/pkg/cloudbroker/vgpu/serialize.go index 39691853..c31cba21 100644 --- a/pkg/cloudbroker/vgpu/serialize.go +++ b/pkg/cloudbroker/vgpu/serialize.go @@ -3,7 +3,7 @@ package vgpu import ( "encoding/json" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/serialization" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/serialization" ) // Serialize returns JSON-serialized []byte. Used as a wrapper over json.Marshal and json.MarshalIndent functions. diff --git a/pkg/cloudbroker/vgpu/vgpu.go b/pkg/cloudbroker/vgpu/vgpu.go index 46be8afe..0822fa31 100644 --- a/pkg/cloudbroker/vgpu/vgpu.go +++ b/pkg/cloudbroker/vgpu/vgpu.go @@ -1,6 +1,6 @@ package vgpu -import "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/interfaces" +import "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/interfaces" // Structure for creating request to VGPU type VGPU struct { diff --git a/pkg/cloudbroker/vins.go b/pkg/cloudbroker/vins.go index cfdca309..c82b30d8 100644 --- a/pkg/cloudbroker/vins.go +++ b/pkg/cloudbroker/vins.go @@ -1,7 +1,7 @@ package cloudbroker import ( - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/pkg/cloudbroker/vins" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/pkg/cloudbroker/vins" ) // Accessing the VINS method group diff --git a/pkg/cloudbroker/vins/audits.go b/pkg/cloudbroker/vins/audits.go deleted file mode 100644 index 2639f783..00000000 --- a/pkg/cloudbroker/vins/audits.go +++ /dev/null @@ -1,40 +0,0 @@ -package vins - -import ( - "context" - "encoding/json" - "net/http" - - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" -) - -// AuditsRequest struct to get audits -type AuditsRequest struct { - // ID of the VINS - // Required: true - VINSID uint64 `url:"vinsId" json:"vinsId" validate:"required"` -} - -// Audits gets audit records for the specified VINS object -func (v VINS) Audits(ctx context.Context, req AuditsRequest) (ListAudits, error) { - err := validators.ValidateRequest(req) - if err != nil { - return nil, validators.ValidationErrors(validators.GetErrors(err)) - } - - url := "/cloudbroker/vins/audits" - - res, err := v.client.DecortApiCall(ctx, http.MethodPost, url, req) - if err != nil { - return nil, err - } - - list := ListAudits{} - - err = json.Unmarshal(res, &list) - if err != nil { - return nil, err - } - - return list, nil -} diff --git a/pkg/cloudbroker/vins/create_in_account.go b/pkg/cloudbroker/vins/create_in_account.go index 6bed17da..9a1083b1 100644 --- a/pkg/cloudbroker/vins/create_in_account.go +++ b/pkg/cloudbroker/vins/create_in_account.go @@ -5,8 +5,8 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/constants" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/constants" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) type Route struct { diff --git a/pkg/cloudbroker/vins/create_in_rg.go b/pkg/cloudbroker/vins/create_in_rg.go index 5c7394c6..9b12deb8 100644 --- a/pkg/cloudbroker/vins/create_in_rg.go +++ b/pkg/cloudbroker/vins/create_in_rg.go @@ -5,8 +5,8 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/constants" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/constants" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // CreateInRGRequest struct to create VINS in resource group diff --git a/pkg/cloudbroker/vins/default_qos_update.go b/pkg/cloudbroker/vins/default_qos_update.go index f69777d8..977eeeb9 100644 --- a/pkg/cloudbroker/vins/default_qos_update.go +++ b/pkg/cloudbroker/vins/default_qos_update.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // DefaultQOSUpdateRequest struct to update QOS diff --git a/pkg/cloudbroker/vins/delete.go b/pkg/cloudbroker/vins/delete.go index 73fe83f8..91f6eab3 100644 --- a/pkg/cloudbroker/vins/delete.go +++ b/pkg/cloudbroker/vins/delete.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // DeleteRequest struct to delete VINS diff --git a/pkg/cloudbroker/vins/disable.go b/pkg/cloudbroker/vins/disable.go index 0e3444a4..803b3925 100644 --- a/pkg/cloudbroker/vins/disable.go +++ b/pkg/cloudbroker/vins/disable.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // DisableRequest struct to disable VINS diff --git a/pkg/cloudbroker/vins/dns_apply.go b/pkg/cloudbroker/vins/dns_apply.go index fefd662e..3ffcb175 100644 --- a/pkg/cloudbroker/vins/dns_apply.go +++ b/pkg/cloudbroker/vins/dns_apply.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // DNSApplyRequest struct to apply new DNS list in VINS diff --git a/pkg/cloudbroker/vins/enable.go b/pkg/cloudbroker/vins/enable.go index 3bfbf1c5..7354a184 100644 --- a/pkg/cloudbroker/vins/enable.go +++ b/pkg/cloudbroker/vins/enable.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // EnableRequest struct to enable VINS diff --git a/pkg/cloudbroker/vins/extnet_connect.go b/pkg/cloudbroker/vins/extnet_connect.go index 71dcf7c2..4b313cf7 100644 --- a/pkg/cloudbroker/vins/extnet_connect.go +++ b/pkg/cloudbroker/vins/extnet_connect.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // ExtNetConnectRequest struct to connect external network diff --git a/pkg/cloudbroker/vins/extnet_disconnect.go b/pkg/cloudbroker/vins/extnet_disconnect.go index 820fc17d..255b03bb 100644 --- a/pkg/cloudbroker/vins/extnet_disconnect.go +++ b/pkg/cloudbroker/vins/extnet_disconnect.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // ExtNetDisconnectRequest struct to disconnect VINS from external network diff --git a/pkg/cloudbroker/vins/extnet_list.go b/pkg/cloudbroker/vins/extnet_list.go index 93bb4099..59242b96 100644 --- a/pkg/cloudbroker/vins/extnet_list.go +++ b/pkg/cloudbroker/vins/extnet_list.go @@ -5,7 +5,7 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // ExtNetListRequest struct to get list of VINS external network connections diff --git a/pkg/cloudbroker/vins/get.go b/pkg/cloudbroker/vins/get.go index 910497fb..abcfd648 100644 --- a/pkg/cloudbroker/vins/get.go +++ b/pkg/cloudbroker/vins/get.go @@ -5,7 +5,7 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // GetRequest struct to get information about VINS diff --git a/pkg/cloudbroker/vins/ip_list.go b/pkg/cloudbroker/vins/ip_list.go index d3ef4e9a..7ca7c16d 100644 --- a/pkg/cloudbroker/vins/ip_list.go +++ b/pkg/cloudbroker/vins/ip_list.go @@ -5,7 +5,7 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // IPListRequest struct for DHCP IP diff --git a/pkg/cloudbroker/vins/ip_release.go b/pkg/cloudbroker/vins/ip_release.go index 7c0268e8..a010ea04 100644 --- a/pkg/cloudbroker/vins/ip_release.go +++ b/pkg/cloudbroker/vins/ip_release.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // IPReleaseRequest struct for IP release diff --git a/pkg/cloudbroker/vins/ip_reserve.go b/pkg/cloudbroker/vins/ip_reserve.go index 64c9c335..057bf4de 100644 --- a/pkg/cloudbroker/vins/ip_reserve.go +++ b/pkg/cloudbroker/vins/ip_reserve.go @@ -5,7 +5,7 @@ import ( "net/http" "strings" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // IPReserveRequest struct for IP reserve diff --git a/pkg/cloudbroker/vins/list.go b/pkg/cloudbroker/vins/list.go index 40a7f4f4..3006b4f5 100644 --- a/pkg/cloudbroker/vins/list.go +++ b/pkg/cloudbroker/vins/list.go @@ -5,7 +5,7 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // ListRequest struct to get list of VINSes diff --git a/pkg/cloudbroker/vins/list_deleted.go b/pkg/cloudbroker/vins/list_deleted.go index 4afb6ab7..f2af946b 100644 --- a/pkg/cloudbroker/vins/list_deleted.go +++ b/pkg/cloudbroker/vins/list_deleted.go @@ -5,7 +5,7 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // ListDeletedRequest struct to get list of deleted VINSes diff --git a/pkg/cloudbroker/vins/mass_delete.go b/pkg/cloudbroker/vins/mass_delete.go index 90d44b9b..23cd5731 100644 --- a/pkg/cloudbroker/vins/mass_delete.go +++ b/pkg/cloudbroker/vins/mass_delete.go @@ -4,7 +4,7 @@ import ( "context" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // MassDeleteRequest struct to delete several VINSes diff --git a/pkg/cloudbroker/vins/mass_disable.go b/pkg/cloudbroker/vins/mass_disable.go index 1a7c6a91..950e8c06 100644 --- a/pkg/cloudbroker/vins/mass_disable.go +++ b/pkg/cloudbroker/vins/mass_disable.go @@ -4,7 +4,7 @@ import ( "context" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // MassDisableRequest struct to disable several VINSes diff --git a/pkg/cloudbroker/vins/mass_enable.go b/pkg/cloudbroker/vins/mass_enable.go index 2a87c8bb..d70edb5d 100644 --- a/pkg/cloudbroker/vins/mass_enable.go +++ b/pkg/cloudbroker/vins/mass_enable.go @@ -4,7 +4,7 @@ import ( "context" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // MassEnableRequest struct to enable several VINSes diff --git a/pkg/cloudbroker/vins/migrate_to_zone.go b/pkg/cloudbroker/vins/migrate_to_zone.go index e7911062..478b9534 100644 --- a/pkg/cloudbroker/vins/migrate_to_zone.go +++ b/pkg/cloudbroker/vins/migrate_to_zone.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // MigrateToZone struct to move VINS to another zone diff --git a/pkg/cloudbroker/vins/nat_rule_add.go b/pkg/cloudbroker/vins/nat_rule_add.go index e036af22..a54a2b9d 100644 --- a/pkg/cloudbroker/vins/nat_rule_add.go +++ b/pkg/cloudbroker/vins/nat_rule_add.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // NATRuleAddRequest struct to create NAT rules diff --git a/pkg/cloudbroker/vins/nat_rule_del.go b/pkg/cloudbroker/vins/nat_rule_del.go index 4c5d227c..42d9c6ad 100644 --- a/pkg/cloudbroker/vins/nat_rule_del.go +++ b/pkg/cloudbroker/vins/nat_rule_del.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // NATRuleDelRequest struct to delete NAT rule diff --git a/pkg/cloudbroker/vins/nat_rule_list.go b/pkg/cloudbroker/vins/nat_rule_list.go index dba8add2..80b03579 100644 --- a/pkg/cloudbroker/vins/nat_rule_list.go +++ b/pkg/cloudbroker/vins/nat_rule_list.go @@ -5,7 +5,7 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // NATRuleListRequest struct to get list of NAT rules diff --git a/pkg/cloudbroker/vins/net_qos.go b/pkg/cloudbroker/vins/net_qos.go index ccbaa711..72df2c71 100644 --- a/pkg/cloudbroker/vins/net_qos.go +++ b/pkg/cloudbroker/vins/net_qos.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // NetQOSRequest struct to update all VINS interfaces QOS diff --git a/pkg/cloudbroker/vins/restore.go b/pkg/cloudbroker/vins/restore.go index e220457c..ec42d006 100644 --- a/pkg/cloudbroker/vins/restore.go +++ b/pkg/cloudbroker/vins/restore.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // RestoreRequest struct for restore diff --git a/pkg/cloudbroker/vins/serialize.go b/pkg/cloudbroker/vins/serialize.go index fc3e6154..ea03d518 100644 --- a/pkg/cloudbroker/vins/serialize.go +++ b/pkg/cloudbroker/vins/serialize.go @@ -3,7 +3,7 @@ package vins import ( "encoding/json" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/serialization" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/serialization" ) // Serialize returns JSON-serialized []byte. Used as a wrapper over json.Marshal and json.MarshalIndent functions. diff --git a/pkg/cloudbroker/vins/static_route_access_grant.go b/pkg/cloudbroker/vins/static_route_access_grant.go index db205ddc..dd5c4719 100644 --- a/pkg/cloudbroker/vins/static_route_access_grant.go +++ b/pkg/cloudbroker/vins/static_route_access_grant.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // StaticRouteAccessGrantRequest struct to grant access to static route to Compute/ViNS diff --git a/pkg/cloudbroker/vins/static_route_access_revoke.go b/pkg/cloudbroker/vins/static_route_access_revoke.go index ff95b642..152f56a7 100644 --- a/pkg/cloudbroker/vins/static_route_access_revoke.go +++ b/pkg/cloudbroker/vins/static_route_access_revoke.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // StaticRouteAccessRevokeRequest struct to revoke access to static route to Compute/ViNS diff --git a/pkg/cloudbroker/vins/static_route_add.go b/pkg/cloudbroker/vins/static_route_add.go index 3348e196..9057acb7 100644 --- a/pkg/cloudbroker/vins/static_route_add.go +++ b/pkg/cloudbroker/vins/static_route_add.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // StaticRouteAddRequest struct to add static route diff --git a/pkg/cloudbroker/vins/static_route_del.go b/pkg/cloudbroker/vins/static_route_del.go index 69ffec84..e68f6ade 100644 --- a/pkg/cloudbroker/vins/static_route_del.go +++ b/pkg/cloudbroker/vins/static_route_del.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // StaticRouteDelRequest struct to remove static route from ViNS diff --git a/pkg/cloudbroker/vins/static_route_list.go b/pkg/cloudbroker/vins/static_route_list.go index eb085bc5..5dfc61e4 100644 --- a/pkg/cloudbroker/vins/static_route_list.go +++ b/pkg/cloudbroker/vins/static_route_list.go @@ -5,7 +5,7 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // StaticRouteListRequest struct for static route list diff --git a/pkg/cloudbroker/vins/update.go b/pkg/cloudbroker/vins/update.go index 7571347c..bcfe1938 100644 --- a/pkg/cloudbroker/vins/update.go +++ b/pkg/cloudbroker/vins/update.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // UpdateRequest struct to update vins parameters diff --git a/pkg/cloudbroker/vins/vins.go b/pkg/cloudbroker/vins/vins.go index 4a5e041d..a0b7e47e 100644 --- a/pkg/cloudbroker/vins/vins.go +++ b/pkg/cloudbroker/vins/vins.go @@ -2,7 +2,7 @@ package vins import ( - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/interfaces" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/interfaces" ) // Structure for creating request to VINS diff --git a/pkg/cloudbroker/vins/vnfdev_redeploy.go b/pkg/cloudbroker/vins/vnfdev_redeploy.go index 28855408..856798a5 100644 --- a/pkg/cloudbroker/vins/vnfdev_redeploy.go +++ b/pkg/cloudbroker/vins/vnfdev_redeploy.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // VNFDevRedeployRequest struct to redeploy VNF devices diff --git a/pkg/cloudbroker/vins/vnfdev_reset.go b/pkg/cloudbroker/vins/vnfdev_reset.go index 699b5540..efa03f66 100644 --- a/pkg/cloudbroker/vins/vnfdev_reset.go +++ b/pkg/cloudbroker/vins/vnfdev_reset.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // VNFDevResetRequest struct to reset VNF device diff --git a/pkg/cloudbroker/vins/vnfdev_restart.go b/pkg/cloudbroker/vins/vnfdev_restart.go index 84e1b2de..1e93d715 100644 --- a/pkg/cloudbroker/vins/vnfdev_restart.go +++ b/pkg/cloudbroker/vins/vnfdev_restart.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // VNFDevRestartRequest struct to reboot VINSes primary VNF device diff --git a/pkg/cloudbroker/vins/vnfdev_start.go b/pkg/cloudbroker/vins/vnfdev_start.go index b311eb7c..0b2bfdbf 100644 --- a/pkg/cloudbroker/vins/vnfdev_start.go +++ b/pkg/cloudbroker/vins/vnfdev_start.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // VNFDevStartRequest struct to start VNF devices diff --git a/pkg/cloudbroker/vins/vnfdev_stop.go b/pkg/cloudbroker/vins/vnfdev_stop.go index ef2f3119..42ccc69a 100644 --- a/pkg/cloudbroker/vins/vnfdev_stop.go +++ b/pkg/cloudbroker/vins/vnfdev_stop.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // VNFDevStopRequest struct to stop VNF devices diff --git a/pkg/cloudbroker/zone.go b/pkg/cloudbroker/zone.go index 151f4c1d..d6926d40 100644 --- a/pkg/cloudbroker/zone.go +++ b/pkg/cloudbroker/zone.go @@ -1,7 +1,7 @@ package cloudbroker import ( - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/pkg/cloudbroker/zone" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/pkg/cloudbroker/zone" ) // Accessing the Zone method group diff --git a/pkg/cloudbroker/zone/add_cpu_alignment_profile.go b/pkg/cloudbroker/zone/add_cpu_alignment_profile.go index fb8d74c6..7d193eb3 100644 --- a/pkg/cloudbroker/zone/add_cpu_alignment_profile.go +++ b/pkg/cloudbroker/zone/add_cpu_alignment_profile.go @@ -5,7 +5,7 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // AddCPUAlignmentProfileRequest struct to add CPU alignment profile to zone diff --git a/pkg/cloudbroker/zone/add_node.go b/pkg/cloudbroker/zone/add_node.go index 2f5ea825..311ce7c6 100644 --- a/pkg/cloudbroker/zone/add_node.go +++ b/pkg/cloudbroker/zone/add_node.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // AddNodeRequest struct to add node to zone diff --git a/pkg/cloudbroker/zone/create.go b/pkg/cloudbroker/zone/create.go index 7b81f865..56420eb1 100644 --- a/pkg/cloudbroker/zone/create.go +++ b/pkg/cloudbroker/zone/create.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // CreateRequest struct to create zone diff --git a/pkg/cloudbroker/zone/del_node.go b/pkg/cloudbroker/zone/del_node.go index 7e9dfde7..47b13d57 100644 --- a/pkg/cloudbroker/zone/del_node.go +++ b/pkg/cloudbroker/zone/del_node.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // DelNodeRequest struct to remove node from zone diff --git a/pkg/cloudbroker/zone/delete.go b/pkg/cloudbroker/zone/delete.go index 4d6519f8..80d23b9c 100644 --- a/pkg/cloudbroker/zone/delete.go +++ b/pkg/cloudbroker/zone/delete.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // DeleteRequest struct to delete zone diff --git a/pkg/cloudbroker/zone/delete_cpu_alignment_profile.go b/pkg/cloudbroker/zone/delete_cpu_alignment_profile.go index 4e984556..1a448241 100644 --- a/pkg/cloudbroker/zone/delete_cpu_alignment_profile.go +++ b/pkg/cloudbroker/zone/delete_cpu_alignment_profile.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // DeleteCPUAlignmentProfileRequest struct to delete CPU alignment profile from zone diff --git a/pkg/cloudbroker/zone/get.go b/pkg/cloudbroker/zone/get.go index 2e118108..9883bbcb 100644 --- a/pkg/cloudbroker/zone/get.go +++ b/pkg/cloudbroker/zone/get.go @@ -5,7 +5,7 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // GetRequest struct to get detailed information about zone diff --git a/pkg/cloudbroker/zone/get_cpu_alignment_profile.go b/pkg/cloudbroker/zone/get_cpu_alignment_profile.go index d0a4f579..8aaac89c 100644 --- a/pkg/cloudbroker/zone/get_cpu_alignment_profile.go +++ b/pkg/cloudbroker/zone/get_cpu_alignment_profile.go @@ -5,7 +5,7 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // GetCPUAlignmentProfileRequest struct to get CPU alignment profile of zone diff --git a/pkg/cloudbroker/zone/list.go b/pkg/cloudbroker/zone/list.go index e7970a49..a0fb4420 100644 --- a/pkg/cloudbroker/zone/list.go +++ b/pkg/cloudbroker/zone/list.go @@ -5,7 +5,7 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // ListRequest struct to get list of zones diff --git a/pkg/cloudbroker/zone/list_cpu_alignment_profile.go b/pkg/cloudbroker/zone/list_cpu_alignment_profile.go index b711a7df..3f2850ee 100644 --- a/pkg/cloudbroker/zone/list_cpu_alignment_profile.go +++ b/pkg/cloudbroker/zone/list_cpu_alignment_profile.go @@ -5,7 +5,7 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // ListCPUAlignmentProfileRequest struct to list CPU alignment profiles diff --git a/pkg/cloudbroker/zone/models.go b/pkg/cloudbroker/zone/models.go index 61e83a0f..b3e6d999 100644 --- a/pkg/cloudbroker/zone/models.go +++ b/pkg/cloudbroker/zone/models.go @@ -183,6 +183,15 @@ type RecordZone struct { // Reserved RAM ReservedRAM uint64 `json:"reserved_ram"` + + // Storage Distributed Resource Scheduler + SDRS bool `json:"sdrs"` + + // Mode of SDRS + SDRSMode string `json:"sdrs_mode"` + + // Minimal level of logs + LoggingLevel string `json:"logging_level"` } // A zone item from a list @@ -261,4 +270,13 @@ type ItemZone struct { // Reserved RAM ReservedRAM uint64 `json:"reserved_ram"` + + // Storage Distributed Resource Scheduler + SDRS bool `json:"sdrs"` + + // Mode of SDRS + SDRSMode string `json:"sdrs_mode"` + + // Minimal level of logs + LoggingLevel string `json:"logging_level"` } diff --git a/pkg/cloudbroker/zone/node_autostart.go b/pkg/cloudbroker/zone/node_autostart.go index aef0c2a0..0dd1a443 100644 --- a/pkg/cloudbroker/zone/node_autostart.go +++ b/pkg/cloudbroker/zone/node_autostart.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // NodeAutoStartRequest struct to set node autostart in zone diff --git a/pkg/cloudbroker/zone/serialize.go b/pkg/cloudbroker/zone/serialize.go index 8215a557..70725656 100644 --- a/pkg/cloudbroker/zone/serialize.go +++ b/pkg/cloudbroker/zone/serialize.go @@ -3,7 +3,7 @@ package zone import ( "encoding/json" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/serialization" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/serialization" ) // Serialize returns JSON-serialized []byte. Used as a wrapper over json.Marshal and json.MarshalIndent functions. diff --git a/pkg/cloudbroker/zone/set_resources_limit.go b/pkg/cloudbroker/zone/set_resources_limit.go index 1cc410cf..6ca17d03 100644 --- a/pkg/cloudbroker/zone/set_resources_limit.go +++ b/pkg/cloudbroker/zone/set_resources_limit.go @@ -5,8 +5,8 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/constants" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/constants" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // SetResourcesLimitRequest struct to set resources limit diff --git a/pkg/cloudbroker/zone/test_cpu_alignment_profile.go b/pkg/cloudbroker/zone/test_cpu_alignment_profile.go index ffe72056..4a4bf2fb 100644 --- a/pkg/cloudbroker/zone/test_cpu_alignment_profile.go +++ b/pkg/cloudbroker/zone/test_cpu_alignment_profile.go @@ -5,7 +5,7 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // TestCPUAlignmentProfileRequest struct to test CPU alignment profile for zone diff --git a/pkg/cloudbroker/zone/update.go b/pkg/cloudbroker/zone/update.go index dba3911d..335cc97b 100644 --- a/pkg/cloudbroker/zone/update.go +++ b/pkg/cloudbroker/zone/update.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // UpdateRequest struct to update zone diff --git a/pkg/cloudbroker/zone/update_cpu_alignment_profile.go b/pkg/cloudbroker/zone/update_cpu_alignment_profile.go index d623cd19..e7377b89 100644 --- a/pkg/cloudbroker/zone/update_cpu_alignment_profile.go +++ b/pkg/cloudbroker/zone/update_cpu_alignment_profile.go @@ -5,8 +5,8 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/constants" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/constants" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // UpdateCPUAlignmentProfileRequest struct to update CPU alignment profile of zone diff --git a/pkg/cloudbroker/zone/zone.go b/pkg/cloudbroker/zone/zone.go index a15987f9..9f4afdf0 100644 --- a/pkg/cloudbroker/zone/zone.go +++ b/pkg/cloudbroker/zone/zone.go @@ -2,7 +2,7 @@ package zone import ( - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/interfaces" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/interfaces" ) // Structure for creating request to zone diff --git a/pkg/sdn/access_groups.go b/pkg/sdn/access_groups.go index 96aa026a..8d795ceb 100644 --- a/pkg/sdn/access_groups.go +++ b/pkg/sdn/access_groups.go @@ -1,7 +1,7 @@ package sdn import ( - ag "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/pkg/sdn/acsgroups" + ag "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/pkg/sdn/acsgroups" ) // Accessing the SDN method group diff --git a/pkg/sdn/acsgroups/access_groups.go b/pkg/sdn/acsgroups/access_groups.go index c46b008c..4addeeec 100644 --- a/pkg/sdn/acsgroups/access_groups.go +++ b/pkg/sdn/acsgroups/access_groups.go @@ -2,7 +2,7 @@ package acsgroups import ( - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/interfaces" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/interfaces" ) // Structure for creating request to access groups diff --git a/pkg/sdn/acsgroups/create.go b/pkg/sdn/acsgroups/create.go index d630040f..c8c6dd60 100644 --- a/pkg/sdn/acsgroups/create.go +++ b/pkg/sdn/acsgroups/create.go @@ -5,8 +5,8 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/constants" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/constants" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // CreateRequest struct to create access group diff --git a/pkg/sdn/acsgroups/delete.go b/pkg/sdn/acsgroups/delete.go index baae4742..d3164ff8 100644 --- a/pkg/sdn/acsgroups/delete.go +++ b/pkg/sdn/acsgroups/delete.go @@ -4,8 +4,8 @@ import ( "context" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/constants" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/constants" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // DeleteRequest struct to delete access group diff --git a/pkg/sdn/acsgroups/get.go b/pkg/sdn/acsgroups/get.go index a441e8f2..a37d66d9 100644 --- a/pkg/sdn/acsgroups/get.go +++ b/pkg/sdn/acsgroups/get.go @@ -5,7 +5,7 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // GetGroupRequest struct to get an access group diff --git a/pkg/sdn/acsgroups/list.go b/pkg/sdn/acsgroups/list.go index afec1e9a..5d1f1085 100644 --- a/pkg/sdn/acsgroups/list.go +++ b/pkg/sdn/acsgroups/list.go @@ -5,7 +5,7 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // ListGroupsRequest struct to get a list of access groups diff --git a/pkg/sdn/acsgroups/update.go b/pkg/sdn/acsgroups/update.go index 58f8e952..ab9d0870 100644 --- a/pkg/sdn/acsgroups/update.go +++ b/pkg/sdn/acsgroups/update.go @@ -5,8 +5,8 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/constants" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/constants" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // UpdateRequest struct to update access group diff --git a/pkg/sdn/acsgroups/user_add.go b/pkg/sdn/acsgroups/user_add.go index a3eb7002..9b7dbf9a 100644 --- a/pkg/sdn/acsgroups/user_add.go +++ b/pkg/sdn/acsgroups/user_add.go @@ -4,8 +4,8 @@ import ( "context" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/constants" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/constants" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // UserAddRequest struct to userAdd access group diff --git a/pkg/sdn/acsgroups/user_delete.go b/pkg/sdn/acsgroups/user_delete.go index 06b934ce..a7c27858 100644 --- a/pkg/sdn/acsgroups/user_delete.go +++ b/pkg/sdn/acsgroups/user_delete.go @@ -4,8 +4,8 @@ import ( "context" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/constants" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/constants" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // UserDeleteRequest struct to userDelete access group diff --git a/pkg/sdn/acsgroups/user_list.go b/pkg/sdn/acsgroups/user_list.go index 3b252980..45e47f53 100644 --- a/pkg/sdn/acsgroups/user_list.go +++ b/pkg/sdn/acsgroups/user_list.go @@ -5,7 +5,7 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // UsersListRequest struct to get a list of users diff --git a/pkg/sdn/acsgroups/user_update_role.go b/pkg/sdn/acsgroups/user_update_role.go index 1318d203..dc6eee45 100644 --- a/pkg/sdn/acsgroups/user_update_role.go +++ b/pkg/sdn/acsgroups/user_update_role.go @@ -4,8 +4,8 @@ import ( "context" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/constants" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/constants" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // UserUpdateRoleRequest struct to userUpdateRole access group diff --git a/pkg/sdn/address_pools.go b/pkg/sdn/address_pools.go index 004f33a7..de220e91 100644 --- a/pkg/sdn/address_pools.go +++ b/pkg/sdn/address_pools.go @@ -1,7 +1,7 @@ package sdn import ( - ap "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/pkg/sdn/adrspools" + ap "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/pkg/sdn/adrspools" ) // Accessing the SDN method group diff --git a/pkg/sdn/adrspools/adress_pools.go b/pkg/sdn/adrspools/adress_pools.go index 1bae0175..5a19994c 100644 --- a/pkg/sdn/adrspools/adress_pools.go +++ b/pkg/sdn/adrspools/adress_pools.go @@ -2,7 +2,7 @@ package adrspools import ( - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/interfaces" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/interfaces" ) // Structure for creating request to address pools diff --git a/pkg/sdn/adrspools/create.go b/pkg/sdn/adrspools/create.go index 32f7ce70..9d8650c5 100644 --- a/pkg/sdn/adrspools/create.go +++ b/pkg/sdn/adrspools/create.go @@ -5,8 +5,8 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/constants" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/constants" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // CreateRequest struct to create address pool diff --git a/pkg/sdn/adrspools/delete.go b/pkg/sdn/adrspools/delete.go index eb20422d..0cffcfa7 100644 --- a/pkg/sdn/adrspools/delete.go +++ b/pkg/sdn/adrspools/delete.go @@ -5,8 +5,8 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/constants" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/constants" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // DeleteRequest struct to delete address pool diff --git a/pkg/sdn/adrspools/get.go b/pkg/sdn/adrspools/get.go index 4194181b..5e8334da 100644 --- a/pkg/sdn/adrspools/get.go +++ b/pkg/sdn/adrspools/get.go @@ -5,7 +5,7 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // GetRequest struct to get information about address group diff --git a/pkg/sdn/adrspools/list.go b/pkg/sdn/adrspools/list.go index 5d4920e5..0a6a103c 100644 --- a/pkg/sdn/adrspools/list.go +++ b/pkg/sdn/adrspools/list.go @@ -5,7 +5,7 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // ListAddressPoolsRequest struct to get a list of a groups diff --git a/pkg/sdn/adrspools/serialize.go b/pkg/sdn/adrspools/serialize.go index e6052981..4808976f 100644 --- a/pkg/sdn/adrspools/serialize.go +++ b/pkg/sdn/adrspools/serialize.go @@ -3,7 +3,7 @@ package adrspools import ( "encoding/json" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/serialization" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/serialization" ) // Serialize returns JSON-serialized []byte. Used as a wrapper over json.Marshal and json.MarshalIndent functions. diff --git a/pkg/sdn/adrspools/update.go b/pkg/sdn/adrspools/update.go index 79435711..4b40781e 100644 --- a/pkg/sdn/adrspools/update.go +++ b/pkg/sdn/adrspools/update.go @@ -5,8 +5,8 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/constants" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/constants" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // UpdateRequest struct to update address pool diff --git a/pkg/sdn/default_security_policies.go b/pkg/sdn/default_security_policies.go index 58674029..f4a0797a 100644 --- a/pkg/sdn/default_security_policies.go +++ b/pkg/sdn/default_security_policies.go @@ -1,7 +1,7 @@ package sdn import ( - dsp "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/pkg/sdn/defsecpolicies" + dsp "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/pkg/sdn/defsecpolicies" ) // Accessing the SDN method group diff --git a/pkg/sdn/defsecpolicies/default_security_policies.go b/pkg/sdn/defsecpolicies/default_security_policies.go index 5f62f8e1..dcf7f12c 100644 --- a/pkg/sdn/defsecpolicies/default_security_policies.go +++ b/pkg/sdn/defsecpolicies/default_security_policies.go @@ -2,7 +2,7 @@ package defsecpolicies import ( - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/interfaces" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/interfaces" ) // Structure for creating request to default security policies diff --git a/pkg/sdn/defsecpolicies/list.go b/pkg/sdn/defsecpolicies/list.go index 1956103a..ffe3b7d9 100644 --- a/pkg/sdn/defsecpolicies/list.go +++ b/pkg/sdn/defsecpolicies/list.go @@ -5,7 +5,7 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // ListRequest struct to get a list of default security group diff --git a/pkg/sdn/defsecpolicies/serialize.go b/pkg/sdn/defsecpolicies/serialize.go index 35085996..fab790cd 100644 --- a/pkg/sdn/defsecpolicies/serialize.go +++ b/pkg/sdn/defsecpolicies/serialize.go @@ -3,7 +3,7 @@ package defsecpolicies import ( "encoding/json" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/serialization" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/serialization" ) // Serialize returns JSON-serialized []byte. Used as a wrapper over json.Marshal and json.MarshalIndent functions. diff --git a/pkg/sdn/defsecpolicies/update.go b/pkg/sdn/defsecpolicies/update.go index 34339d1d..5d330c5b 100644 --- a/pkg/sdn/defsecpolicies/update.go +++ b/pkg/sdn/defsecpolicies/update.go @@ -5,8 +5,8 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/constants" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/constants" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // UpdateRequest struct to update default security policy diff --git a/pkg/sdn/extnet.go b/pkg/sdn/extnet.go index cc91dc2b..cbfa9a16 100644 --- a/pkg/sdn/extnet.go +++ b/pkg/sdn/extnet.go @@ -1,7 +1,7 @@ package sdn import ( - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/pkg/sdn/extnet" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/pkg/sdn/extnet" ) // Accessing the ExtNet method group diff --git a/pkg/sdn/extnet/create.go b/pkg/sdn/extnet/create.go index db2655c4..56f3e2a9 100644 --- a/pkg/sdn/extnet/create.go +++ b/pkg/sdn/extnet/create.go @@ -6,8 +6,8 @@ import ( "net/http" "time" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/constants" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/constants" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // CreateRequest struct for creating account diff --git a/pkg/sdn/extnet/delete.go b/pkg/sdn/extnet/delete.go index 13aff85f..89a9f278 100644 --- a/pkg/sdn/extnet/delete.go +++ b/pkg/sdn/extnet/delete.go @@ -4,8 +4,8 @@ import ( "context" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/constants" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/constants" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // DeleteRequest struct for delete extnet diff --git a/pkg/sdn/extnet/extnet.go b/pkg/sdn/extnet/extnet.go index 64de75fd..b89dea80 100644 --- a/pkg/sdn/extnet/extnet.go +++ b/pkg/sdn/extnet/extnet.go @@ -2,7 +2,7 @@ package extnet import ( - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/interfaces" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/interfaces" ) // Structure for creating request to external networks diff --git a/pkg/sdn/extnet/get.go b/pkg/sdn/extnet/get.go index c509e5a9..dfb1e003 100644 --- a/pkg/sdn/extnet/get.go +++ b/pkg/sdn/extnet/get.go @@ -5,7 +5,7 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // GetRequest struct to get information about external network diff --git a/pkg/sdn/extnet/list.go b/pkg/sdn/extnet/list.go index 2ca45269..e8889ed2 100644 --- a/pkg/sdn/extnet/list.go +++ b/pkg/sdn/extnet/list.go @@ -5,7 +5,7 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // ListRequest struct to get a list of external networks diff --git a/pkg/sdn/extnet/port_add.go b/pkg/sdn/extnet/port_add.go index 6a1d3793..0d361e5b 100644 --- a/pkg/sdn/extnet/port_add.go +++ b/pkg/sdn/extnet/port_add.go @@ -5,8 +5,8 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/constants" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/constants" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // PortAddRequest struct for add port to extnet diff --git a/pkg/sdn/extnet/port_update.go b/pkg/sdn/extnet/port_update.go index 7a84b0c4..8d003922 100644 --- a/pkg/sdn/extnet/port_update.go +++ b/pkg/sdn/extnet/port_update.go @@ -5,8 +5,8 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/constants" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/constants" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // PortUpdateRequest struct for update port to extnet diff --git a/pkg/sdn/extnet/update.go b/pkg/sdn/extnet/update.go index ab38d122..a6c7b942 100644 --- a/pkg/sdn/extnet/update.go +++ b/pkg/sdn/extnet/update.go @@ -5,8 +5,8 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/constants" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/constants" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // UpdateRequest struct for update extnet diff --git a/pkg/sdn/flips.go b/pkg/sdn/flips.go index 8e899f1f..07021b69 100644 --- a/pkg/sdn/flips.go +++ b/pkg/sdn/flips.go @@ -1,7 +1,7 @@ package sdn import ( - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/pkg/sdn/flips" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/pkg/sdn/flips" ) // Accessing the SDN method group diff --git a/pkg/sdn/flips/create.go b/pkg/sdn/flips/create.go index 7c7aa3d9..735f00af 100644 --- a/pkg/sdn/flips/create.go +++ b/pkg/sdn/flips/create.go @@ -5,8 +5,8 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/constants" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/constants" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) type CreateRequest struct { diff --git a/pkg/sdn/flips/delete.go b/pkg/sdn/flips/delete.go index 84c1ed03..d2afb9dc 100644 --- a/pkg/sdn/flips/delete.go +++ b/pkg/sdn/flips/delete.go @@ -5,8 +5,8 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/constants" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/constants" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // DeleteRequest to delete a floating ip diff --git a/pkg/sdn/flips/flips.go b/pkg/sdn/flips/flips.go index 8381a551..b1482fac 100644 --- a/pkg/sdn/flips/flips.go +++ b/pkg/sdn/flips/flips.go @@ -2,7 +2,7 @@ package flips import ( - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/interfaces" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/interfaces" ) // Structure for creating request to floating IPs diff --git a/pkg/sdn/flips/get.go b/pkg/sdn/flips/get.go index 282b8533..d19845ca 100644 --- a/pkg/sdn/flips/get.go +++ b/pkg/sdn/flips/get.go @@ -5,7 +5,7 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) type GetRequest struct { diff --git a/pkg/sdn/flips/list.go b/pkg/sdn/flips/list.go index 20a5a31e..f4aa5e41 100644 --- a/pkg/sdn/flips/list.go +++ b/pkg/sdn/flips/list.go @@ -5,7 +5,7 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // List of floating ips diff --git a/pkg/sdn/flips/update.go b/pkg/sdn/flips/update.go index 0a53e2f3..414afd5e 100644 --- a/pkg/sdn/flips/update.go +++ b/pkg/sdn/flips/update.go @@ -5,8 +5,8 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/constants" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/constants" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // UpdateRequest struct to update a floating ip diff --git a/pkg/sdn/hypervisors.go b/pkg/sdn/hypervisors.go index 557a97e9..0cd5f84e 100644 --- a/pkg/sdn/hypervisors.go +++ b/pkg/sdn/hypervisors.go @@ -1,7 +1,7 @@ package sdn import ( - hv "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/pkg/sdn/hypervisors" + hv "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/pkg/sdn/hypervisors" ) // Accessing the SDN method group diff --git a/pkg/sdn/hypervisors/connect_node.go b/pkg/sdn/hypervisors/connect_node.go index 1adab195..35e5dd56 100644 --- a/pkg/sdn/hypervisors/connect_node.go +++ b/pkg/sdn/hypervisors/connect_node.go @@ -4,8 +4,8 @@ import ( "context" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/constants" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/constants" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // ConnectNodeRequest to connect a node diff --git a/pkg/sdn/hypervisors/delete.go b/pkg/sdn/hypervisors/delete.go index 4f25d1d1..7de6d956 100644 --- a/pkg/sdn/hypervisors/delete.go +++ b/pkg/sdn/hypervisors/delete.go @@ -5,8 +5,8 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/constants" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/constants" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // DeleteRequest to delete a hypervisor diff --git a/pkg/sdn/hypervisors/get.go b/pkg/sdn/hypervisors/get.go index 103e5cc2..fcc25ecf 100644 --- a/pkg/sdn/hypervisors/get.go +++ b/pkg/sdn/hypervisors/get.go @@ -5,7 +5,7 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // GetRequest struct to get information about hypervisor diff --git a/pkg/sdn/hypervisors/hypervisors.go b/pkg/sdn/hypervisors/hypervisors.go index 6820737d..c102f112 100644 --- a/pkg/sdn/hypervisors/hypervisors.go +++ b/pkg/sdn/hypervisors/hypervisors.go @@ -1,7 +1,7 @@ package hypervisors import ( - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/interfaces" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/interfaces" ) // Structure for creating request to hypervisors diff --git a/pkg/sdn/hypervisors/list.go b/pkg/sdn/hypervisors/list.go index 50d09e99..0d43b700 100644 --- a/pkg/sdn/hypervisors/list.go +++ b/pkg/sdn/hypervisors/list.go @@ -5,7 +5,7 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // ListRequest struct to get a list of hypervisors diff --git a/pkg/sdn/hypervisors/update_display_name.go b/pkg/sdn/hypervisors/update_display_name.go index 288dc4e2..98dc9092 100644 --- a/pkg/sdn/hypervisors/update_display_name.go +++ b/pkg/sdn/hypervisors/update_display_name.go @@ -5,7 +5,7 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // UpdateDisplayNameRequest struct to update display name for a hypervisor diff --git a/pkg/sdn/logical_ports.go b/pkg/sdn/logical_ports.go index a6e6fa6d..cea635cc 100644 --- a/pkg/sdn/logical_ports.go +++ b/pkg/sdn/logical_ports.go @@ -1,7 +1,7 @@ package sdn import ( - lp "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/pkg/sdn/logicalports" + lp "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/pkg/sdn/logicalports" ) // Accessing the SDN method group diff --git a/pkg/sdn/logicalports/create.go b/pkg/sdn/logicalports/create.go index 0982ef5a..b9b016a2 100644 --- a/pkg/sdn/logicalports/create.go +++ b/pkg/sdn/logicalports/create.go @@ -5,8 +5,8 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/constants" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/constants" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // Label struct diff --git a/pkg/sdn/logicalports/create_batch.go b/pkg/sdn/logicalports/create_batch.go index cd532198..12ec8fcd 100644 --- a/pkg/sdn/logicalports/create_batch.go +++ b/pkg/sdn/logicalports/create_batch.go @@ -4,8 +4,8 @@ import ( "context" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/constants" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/constants" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) type CreateBatchLogicalPortAddress struct { diff --git a/pkg/sdn/logicalports/delete.go b/pkg/sdn/logicalports/delete.go index bdbadcc2..ef7f3ef1 100644 --- a/pkg/sdn/logicalports/delete.go +++ b/pkg/sdn/logicalports/delete.go @@ -4,8 +4,8 @@ import ( "context" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/constants" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/constants" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // DeleteRequest struct to delete logical port diff --git a/pkg/sdn/logicalports/delete_batch.go b/pkg/sdn/logicalports/delete_batch.go index 6ec06956..77829037 100644 --- a/pkg/sdn/logicalports/delete_batch.go +++ b/pkg/sdn/logicalports/delete_batch.go @@ -4,8 +4,8 @@ import ( "context" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/constants" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/constants" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) type PortsInfo struct { diff --git a/pkg/sdn/logicalports/exclude_firewall.go b/pkg/sdn/logicalports/exclude_firewall.go index af6e27c1..5a0469de 100644 --- a/pkg/sdn/logicalports/exclude_firewall.go +++ b/pkg/sdn/logicalports/exclude_firewall.go @@ -5,8 +5,8 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/constants" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/constants" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) type LogicalPortsForExcludeFromFirewall struct { diff --git a/pkg/sdn/logicalports/get.go b/pkg/sdn/logicalports/get.go index 286a46d6..3fd17afc 100644 --- a/pkg/sdn/logicalports/get.go +++ b/pkg/sdn/logicalports/get.go @@ -5,7 +5,7 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // GetRequest struct to get information about logical port diff --git a/pkg/sdn/logicalports/get_by_unique_identifier.go b/pkg/sdn/logicalports/get_by_unique_identifier.go index f7f132c8..52efdc08 100644 --- a/pkg/sdn/logicalports/get_by_unique_identifier.go +++ b/pkg/sdn/logicalports/get_by_unique_identifier.go @@ -5,7 +5,7 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // GetByUniqueIdentifierRequest struct to get information about logical port diff --git a/pkg/sdn/logicalports/list.go b/pkg/sdn/logicalports/list.go index 6ea910e7..1c3c77ab 100644 --- a/pkg/sdn/logicalports/list.go +++ b/pkg/sdn/logicalports/list.go @@ -5,7 +5,7 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // ListRequest struct to get a list of logical ports diff --git a/pkg/sdn/logicalports/logicalports.go b/pkg/sdn/logicalports/logicalports.go index 875a1763..c14c716a 100644 --- a/pkg/sdn/logicalports/logicalports.go +++ b/pkg/sdn/logicalports/logicalports.go @@ -2,7 +2,7 @@ package logicalports import ( - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/interfaces" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/interfaces" ) // Structure for creating request to logical ports diff --git a/pkg/sdn/logicalports/migrate_cancel.go b/pkg/sdn/logicalports/migrate_cancel.go index 455b7877..55cf2e2f 100644 --- a/pkg/sdn/logicalports/migrate_cancel.go +++ b/pkg/sdn/logicalports/migrate_cancel.go @@ -5,8 +5,8 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/constants" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/constants" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // MigrateCancelRequest struct to cancel migrate diff --git a/pkg/sdn/logicalports/migrate_start.go b/pkg/sdn/logicalports/migrate_start.go index b437d386..8a291a7d 100644 --- a/pkg/sdn/logicalports/migrate_start.go +++ b/pkg/sdn/logicalports/migrate_start.go @@ -5,8 +5,8 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/constants" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/constants" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // MigrateStartRequest struct to start migrate diff --git a/pkg/sdn/logicalports/serialize.go b/pkg/sdn/logicalports/serialize.go index c7a740c2..c4827d6f 100644 --- a/pkg/sdn/logicalports/serialize.go +++ b/pkg/sdn/logicalports/serialize.go @@ -3,7 +3,7 @@ package logicalports import ( "encoding/json" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/serialization" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/serialization" ) // Serialize returns JSON-serialized []byte. Used as a wrapper over json.Marshal and json.MarshalIndent functions. diff --git a/pkg/sdn/logicalports/unexclude_firewall.go b/pkg/sdn/logicalports/unexclude_firewall.go index ce59fae2..91335e33 100644 --- a/pkg/sdn/logicalports/unexclude_firewall.go +++ b/pkg/sdn/logicalports/unexclude_firewall.go @@ -5,8 +5,8 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/constants" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/constants" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) type LogicalPortsForUnexcludeFromFirewall struct { diff --git a/pkg/sdn/logicalports/update.go b/pkg/sdn/logicalports/update.go index 446aeefb..a9459323 100644 --- a/pkg/sdn/logicalports/update.go +++ b/pkg/sdn/logicalports/update.go @@ -5,8 +5,8 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/constants" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/constants" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // Label struct diff --git a/pkg/sdn/netobjgroups/attach_extnet_ports.go b/pkg/sdn/netobjgroups/attach_extnet_ports.go index fc922635..7ed5c907 100644 --- a/pkg/sdn/netobjgroups/attach_extnet_ports.go +++ b/pkg/sdn/netobjgroups/attach_extnet_ports.go @@ -5,8 +5,8 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/constants" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/constants" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // AttachExtNetPortsRequest struct to attach external network ports to a network object group diff --git a/pkg/sdn/netobjgroups/attach_l2_connection_ports.go b/pkg/sdn/netobjgroups/attach_l2_connection_ports.go index 1b8b77e7..35215918 100644 --- a/pkg/sdn/netobjgroups/attach_l2_connection_ports.go +++ b/pkg/sdn/netobjgroups/attach_l2_connection_ports.go @@ -5,8 +5,8 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/constants" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/constants" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // AttachL2ConnectionPortsRequest struct to attach l2 ports to a network object group diff --git a/pkg/sdn/netobjgroups/attach_logical_ports.go b/pkg/sdn/netobjgroups/attach_logical_ports.go index 39f8aee4..d87eb307 100644 --- a/pkg/sdn/netobjgroups/attach_logical_ports.go +++ b/pkg/sdn/netobjgroups/attach_logical_ports.go @@ -5,8 +5,8 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/constants" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/constants" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // AttachLogicalPortsRequest struct to attach logical ports to a network object group diff --git a/pkg/sdn/netobjgroups/create.go b/pkg/sdn/netobjgroups/create.go index adcea7c7..044a0a0b 100644 --- a/pkg/sdn/netobjgroups/create.go +++ b/pkg/sdn/netobjgroups/create.go @@ -5,8 +5,8 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/constants" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/constants" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // CreateRequest struct to create a network object group diff --git a/pkg/sdn/netobjgroups/delete.go b/pkg/sdn/netobjgroups/delete.go index 7c34c324..1382902f 100644 --- a/pkg/sdn/netobjgroups/delete.go +++ b/pkg/sdn/netobjgroups/delete.go @@ -5,8 +5,8 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/constants" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/constants" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // DeleteRequest to delete a network object group diff --git a/pkg/sdn/netobjgroups/detach_external_network_ports.go b/pkg/sdn/netobjgroups/detach_external_network_ports.go index df747731..00115105 100644 --- a/pkg/sdn/netobjgroups/detach_external_network_ports.go +++ b/pkg/sdn/netobjgroups/detach_external_network_ports.go @@ -5,8 +5,8 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/constants" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/constants" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // DetachExtNetPortsRequest struct to detach an external network port from a network object group diff --git a/pkg/sdn/netobjgroups/detach_l2_connection_ports.go b/pkg/sdn/netobjgroups/detach_l2_connection_ports.go index 32a4614d..48cf4941 100644 --- a/pkg/sdn/netobjgroups/detach_l2_connection_ports.go +++ b/pkg/sdn/netobjgroups/detach_l2_connection_ports.go @@ -5,8 +5,8 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/constants" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/constants" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // DetachL2ConnectionPortsRequest struct to detach an l2 port from a network object group diff --git a/pkg/sdn/netobjgroups/detach_logical_ports.go b/pkg/sdn/netobjgroups/detach_logical_ports.go index 0dbd4836..6a9f060c 100644 --- a/pkg/sdn/netobjgroups/detach_logical_ports.go +++ b/pkg/sdn/netobjgroups/detach_logical_ports.go @@ -5,8 +5,8 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/constants" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/constants" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // DetachLogicalPortsRequest struct to detach logical ports from a network object group diff --git a/pkg/sdn/netobjgroups/get.go b/pkg/sdn/netobjgroups/get.go index 77ee4b30..ce0615fb 100644 --- a/pkg/sdn/netobjgroups/get.go +++ b/pkg/sdn/netobjgroups/get.go @@ -5,7 +5,7 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // GetRequest struct to get info about a network object group diff --git a/pkg/sdn/netobjgroups/list.go b/pkg/sdn/netobjgroups/list.go index 4fa32c78..7931ac45 100644 --- a/pkg/sdn/netobjgroups/list.go +++ b/pkg/sdn/netobjgroups/list.go @@ -5,7 +5,7 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // ListRequest struct to get a list of network object groups diff --git a/pkg/sdn/netobjgroups/network_object_groups.go b/pkg/sdn/netobjgroups/network_object_groups.go index 6d1c367f..a24602e6 100644 --- a/pkg/sdn/netobjgroups/network_object_groups.go +++ b/pkg/sdn/netobjgroups/network_object_groups.go @@ -2,7 +2,7 @@ package netobjgroups import ( - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/interfaces" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/interfaces" ) // Structure for creating request to network object groups diff --git a/pkg/sdn/netobjgroups/update.go b/pkg/sdn/netobjgroups/update.go index 02efe9ec..9b819944 100644 --- a/pkg/sdn/netobjgroups/update.go +++ b/pkg/sdn/netobjgroups/update.go @@ -5,8 +5,8 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/constants" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/constants" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // UpdateRequest struct to update a network object group diff --git a/pkg/sdn/network_object_groups.go b/pkg/sdn/network_object_groups.go index abd8b408..6cb0edce 100644 --- a/pkg/sdn/network_object_groups.go +++ b/pkg/sdn/network_object_groups.go @@ -1,7 +1,7 @@ package sdn import ( - nog "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/pkg/sdn/netobjgroups" + nog "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/pkg/sdn/netobjgroups" ) // Accessing the SDN method group diff --git a/pkg/sdn/routers.go b/pkg/sdn/routers.go index 9166da04..898b6264 100644 --- a/pkg/sdn/routers.go +++ b/pkg/sdn/routers.go @@ -1,7 +1,7 @@ package sdn import ( - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/pkg/sdn/routers" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/pkg/sdn/routers" ) // Accessing the SDN method group diff --git a/pkg/sdn/routers/create.go b/pkg/sdn/routers/create.go index 768d4a34..ed44507f 100644 --- a/pkg/sdn/routers/create.go +++ b/pkg/sdn/routers/create.go @@ -5,8 +5,8 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/constants" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/constants" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // CreateRequest struct to create router diff --git a/pkg/sdn/routers/delete.go b/pkg/sdn/routers/delete.go index a92fd71e..21106bbe 100644 --- a/pkg/sdn/routers/delete.go +++ b/pkg/sdn/routers/delete.go @@ -4,8 +4,8 @@ import ( "context" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/constants" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/constants" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // DeleteRequest struct for delete router diff --git a/pkg/sdn/routers/gateaway_port.go b/pkg/sdn/routers/gateaway_port.go index 42d66f45..1cd18a20 100644 --- a/pkg/sdn/routers/gateaway_port.go +++ b/pkg/sdn/routers/gateaway_port.go @@ -1,7 +1,7 @@ package routers import ( - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/pkg/sdn/routers/gwport" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/pkg/sdn/routers/gwport" ) // Accessing the routers gateway port method group diff --git a/pkg/sdn/routers/get.go b/pkg/sdn/routers/get.go index 8fd39b15..d9805fe8 100644 --- a/pkg/sdn/routers/get.go +++ b/pkg/sdn/routers/get.go @@ -5,7 +5,7 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // GetRequest struct to get information about router diff --git a/pkg/sdn/routers/gwport/create.go b/pkg/sdn/routers/gwport/create.go index c08dd5bb..bb4f8814 100644 --- a/pkg/sdn/routers/gwport/create.go +++ b/pkg/sdn/routers/gwport/create.go @@ -5,8 +5,8 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/constants" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/constants" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // CreateRequest struct to create gateway port diff --git a/pkg/sdn/routers/gwport/delete.go b/pkg/sdn/routers/gwport/delete.go index b37c835c..421260a0 100644 --- a/pkg/sdn/routers/gwport/delete.go +++ b/pkg/sdn/routers/gwport/delete.go @@ -4,8 +4,8 @@ import ( "context" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/constants" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/constants" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // DeleteRequest struct for delete router diff --git a/pkg/sdn/routers/gwport/gateaway_port.go b/pkg/sdn/routers/gwport/gateaway_port.go index 0a1de8c5..d012071d 100644 --- a/pkg/sdn/routers/gwport/gateaway_port.go +++ b/pkg/sdn/routers/gwport/gateaway_port.go @@ -3,7 +3,7 @@ package gwport // API Actor API for managing SDN routers gateway port import ( - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/interfaces" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/interfaces" ) // Structure for creating request to routers gateway port diff --git a/pkg/sdn/routers/gwport/get.go b/pkg/sdn/routers/gwport/get.go index d6563c89..b2ee7c7a 100644 --- a/pkg/sdn/routers/gwport/get.go +++ b/pkg/sdn/routers/gwport/get.go @@ -5,7 +5,7 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // GetRequest struct to get information about gateway port diff --git a/pkg/sdn/routers/gwport/list.go b/pkg/sdn/routers/gwport/list.go index f97e4eae..6ad01acf 100644 --- a/pkg/sdn/routers/gwport/list.go +++ b/pkg/sdn/routers/gwport/list.go @@ -5,7 +5,7 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // ListRequest struct to get list of gateway ports diff --git a/pkg/sdn/routers/gwport/update.go b/pkg/sdn/routers/gwport/update.go index dc7750c1..834aba3b 100644 --- a/pkg/sdn/routers/gwport/update.go +++ b/pkg/sdn/routers/gwport/update.go @@ -5,8 +5,8 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/constants" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/constants" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // UpdateRequest struct to update gateway port diff --git a/pkg/sdn/routers/list.go b/pkg/sdn/routers/list.go index e70ed9bc..f26c9d4d 100644 --- a/pkg/sdn/routers/list.go +++ b/pkg/sdn/routers/list.go @@ -5,7 +5,7 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // ListRequest struct to get a list of routers diff --git a/pkg/sdn/routers/policies.go b/pkg/sdn/routers/policies.go index dacd680b..d4521de1 100644 --- a/pkg/sdn/routers/policies.go +++ b/pkg/sdn/routers/policies.go @@ -1,7 +1,7 @@ package routers import ( - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/pkg/sdn/routers/policies" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/pkg/sdn/routers/policies" ) // Accessing the routers policies method group diff --git a/pkg/sdn/routers/policies/list.go b/pkg/sdn/routers/policies/list.go index e9889599..0c6ceb3f 100644 --- a/pkg/sdn/routers/policies/list.go +++ b/pkg/sdn/routers/policies/list.go @@ -5,7 +5,7 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // ListRequest struct to get a list of policies diff --git a/pkg/sdn/routers/policies/policies.go b/pkg/sdn/routers/policies/policies.go index d783a34a..65eb2ea1 100644 --- a/pkg/sdn/routers/policies/policies.go +++ b/pkg/sdn/routers/policies/policies.go @@ -2,7 +2,7 @@ package policies import ( - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/interfaces" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/interfaces" ) // Structure for creating request to routers policies diff --git a/pkg/sdn/routers/routers.go b/pkg/sdn/routers/routers.go index ce9e491d..e7e8e449 100644 --- a/pkg/sdn/routers/routers.go +++ b/pkg/sdn/routers/routers.go @@ -2,7 +2,7 @@ package routers import ( - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/interfaces" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/interfaces" ) // Structure for creating request to routers diff --git a/pkg/sdn/routers/serialize.go b/pkg/sdn/routers/serialize.go index 8a64a0b2..44067dee 100644 --- a/pkg/sdn/routers/serialize.go +++ b/pkg/sdn/routers/serialize.go @@ -3,7 +3,7 @@ package routers import ( "encoding/json" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/serialization" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/serialization" ) // Serialize returns JSON-serialized []byte. Used as a wrapper over json.Marshal and json.MarshalIndent functions. diff --git a/pkg/sdn/routers/update.go b/pkg/sdn/routers/update.go index 06ebe54a..35554730 100644 --- a/pkg/sdn/routers/update.go +++ b/pkg/sdn/routers/update.go @@ -5,8 +5,8 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/constants" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/constants" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // UpdateRequest struct for update router diff --git a/pkg/sdn/sdn.go b/pkg/sdn/sdn.go index 26d491ff..7ac927ef 100644 --- a/pkg/sdn/sdn.go +++ b/pkg/sdn/sdn.go @@ -1,7 +1,7 @@ // List of method groups for the SDN package sdn -import "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/interfaces" +import "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/interfaces" // Structure for creating request to SDN groups type SDN struct { diff --git a/pkg/sdn/secpolicies/create.go b/pkg/sdn/secpolicies/create.go index 64e7f52a..3f931ac4 100644 --- a/pkg/sdn/secpolicies/create.go +++ b/pkg/sdn/secpolicies/create.go @@ -5,8 +5,8 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/constants" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/constants" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // CreateRequest struct to create security policy diff --git a/pkg/sdn/secpolicies/delete.go b/pkg/sdn/secpolicies/delete.go index 6bbdea3e..d141570e 100644 --- a/pkg/sdn/secpolicies/delete.go +++ b/pkg/sdn/secpolicies/delete.go @@ -4,8 +4,8 @@ import ( "context" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/constants" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/constants" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // DeleteRequest struct to delete security policy diff --git a/pkg/sdn/secpolicies/get.go b/pkg/sdn/secpolicies/get.go index 0501626f..5549e733 100644 --- a/pkg/sdn/secpolicies/get.go +++ b/pkg/sdn/secpolicies/get.go @@ -5,7 +5,7 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // GetRequest struct to get information about security policy diff --git a/pkg/sdn/secpolicies/list.go b/pkg/sdn/secpolicies/list.go index c7a207be..de03fc21 100644 --- a/pkg/sdn/secpolicies/list.go +++ b/pkg/sdn/secpolicies/list.go @@ -5,7 +5,7 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // ListRequest struct to get a list of security group diff --git a/pkg/sdn/secpolicies/move.go b/pkg/sdn/secpolicies/move.go index d212a88f..a7bfcf45 100644 --- a/pkg/sdn/secpolicies/move.go +++ b/pkg/sdn/secpolicies/move.go @@ -5,8 +5,8 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/constants" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/constants" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // DeleteRequest struct to move security policy diff --git a/pkg/sdn/secpolicies/rule.go b/pkg/sdn/secpolicies/rule.go index f75189bb..21026967 100644 --- a/pkg/sdn/secpolicies/rule.go +++ b/pkg/sdn/secpolicies/rule.go @@ -1,7 +1,7 @@ package secpolicies import ( - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/pkg/sdn/secpolicies/rule" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/pkg/sdn/secpolicies/rule" ) // Accessing the security policies rule method group diff --git a/pkg/sdn/secpolicies/rule/get.go b/pkg/sdn/secpolicies/rule/get.go index 7c30dde4..aa3d3054 100644 --- a/pkg/sdn/secpolicies/rule/get.go +++ b/pkg/sdn/secpolicies/rule/get.go @@ -5,7 +5,7 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // GetRequest struct to get a security rules diff --git a/pkg/sdn/secpolicies/rule/list.go b/pkg/sdn/secpolicies/rule/list.go index 3fcff503..ab69a819 100644 --- a/pkg/sdn/secpolicies/rule/list.go +++ b/pkg/sdn/secpolicies/rule/list.go @@ -5,7 +5,7 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // ListRequest struct to get a list of security rules diff --git a/pkg/sdn/secpolicies/rule/rule.go b/pkg/sdn/secpolicies/rule/rule.go index 68a48e70..ef064f2c 100644 --- a/pkg/sdn/secpolicies/rule/rule.go +++ b/pkg/sdn/secpolicies/rule/rule.go @@ -2,7 +2,7 @@ package rule import ( - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/interfaces" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/interfaces" ) // Structure for creating request to security policies rule diff --git a/pkg/sdn/secpolicies/rule/serialize.go b/pkg/sdn/secpolicies/rule/serialize.go index 9f30e9bc..54087539 100644 --- a/pkg/sdn/secpolicies/rule/serialize.go +++ b/pkg/sdn/secpolicies/rule/serialize.go @@ -3,7 +3,7 @@ package rule import ( "encoding/json" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/serialization" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/serialization" ) // Serialize returns JSON-serialized []byte. Used as a wrapper over json.Marshal and json.MarshalIndent functions. diff --git a/pkg/sdn/secpolicies/security_policies.go b/pkg/sdn/secpolicies/security_policies.go index f00d239d..a78bc67a 100644 --- a/pkg/sdn/secpolicies/security_policies.go +++ b/pkg/sdn/secpolicies/security_policies.go @@ -2,7 +2,7 @@ package secpolicies import ( - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/interfaces" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/interfaces" ) // Structure for creating request to security policies diff --git a/pkg/sdn/secpolicies/serialize.go b/pkg/sdn/secpolicies/serialize.go index a5cc63dc..ecc400eb 100644 --- a/pkg/sdn/secpolicies/serialize.go +++ b/pkg/sdn/secpolicies/serialize.go @@ -3,7 +3,7 @@ package secpolicies import ( "encoding/json" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/serialization" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/serialization" ) // Serialize returns JSON-serialized []byte. Used as a wrapper over json.Marshal and json.MarshalIndent functions. diff --git a/pkg/sdn/secpolicies/update.go b/pkg/sdn/secpolicies/update.go index ed1f8d62..973e6be3 100644 --- a/pkg/sdn/secpolicies/update.go +++ b/pkg/sdn/secpolicies/update.go @@ -5,8 +5,8 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/constants" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/constants" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // UpdateRequest struct to update security policy diff --git a/pkg/sdn/security_policies.go b/pkg/sdn/security_policies.go index b38680b1..5d952b75 100644 --- a/pkg/sdn/security_policies.go +++ b/pkg/sdn/security_policies.go @@ -1,7 +1,7 @@ package sdn import ( - sp "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/pkg/sdn/secpolicies" + sp "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/pkg/sdn/secpolicies" ) // Accessing the SDN method group diff --git a/pkg/sdn/segments.go b/pkg/sdn/segments.go index 97be1f97..1af54ce6 100644 --- a/pkg/sdn/segments.go +++ b/pkg/sdn/segments.go @@ -1,7 +1,7 @@ package sdn import ( - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/pkg/sdn/segments" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/pkg/sdn/segments" ) // Accessing the Segments method group diff --git a/pkg/sdn/segments/create.go b/pkg/sdn/segments/create.go index 0366dfd6..a82176c0 100644 --- a/pkg/sdn/segments/create.go +++ b/pkg/sdn/segments/create.go @@ -5,8 +5,8 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/constants" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/constants" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // CreateRequest struct for creating segment diff --git a/pkg/sdn/segments/delete.go b/pkg/sdn/segments/delete.go index 4ee0091d..96de320c 100644 --- a/pkg/sdn/segments/delete.go +++ b/pkg/sdn/segments/delete.go @@ -4,8 +4,8 @@ import ( "context" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/constants" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/constants" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // DeleteRequest struct for delete segment diff --git a/pkg/sdn/segments/get_faa.go b/pkg/sdn/segments/get_faa.go index 8faa4cfd..2ee07868 100644 --- a/pkg/sdn/segments/get_faa.go +++ b/pkg/sdn/segments/get_faa.go @@ -5,7 +5,7 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // GetFAARequest struct to get the floating/anycast IP address of a segment diff --git a/pkg/sdn/segments/segments.go b/pkg/sdn/segments/segments.go index 8f7dea68..c3d7b8ca 100644 --- a/pkg/sdn/segments/segments.go +++ b/pkg/sdn/segments/segments.go @@ -2,7 +2,7 @@ package segments import ( - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/interfaces" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/interfaces" ) // Structure for creating request to segments diff --git a/pkg/sdn/segments/update.go b/pkg/sdn/segments/update.go index 038aa236..51da7093 100644 --- a/pkg/sdn/segments/update.go +++ b/pkg/sdn/segments/update.go @@ -5,8 +5,8 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/constants" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/constants" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/internal/validators" ) // UpdateRequest struct for updating segment diff --git a/pkg/sdn/version.go b/pkg/sdn/version.go index e3c46e0c..8d5303b5 100644 --- a/pkg/sdn/version.go +++ b/pkg/sdn/version.go @@ -1,7 +1,7 @@ package sdn import ( - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/pkg/sdn/version" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/pkg/sdn/version" ) // Accessing the SDN method group diff --git a/pkg/sdn/version/version.go b/pkg/sdn/version/version.go index e5627917..88e2f6f0 100644 --- a/pkg/sdn/version/version.go +++ b/pkg/sdn/version/version.go @@ -2,7 +2,7 @@ package version import ( - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/interfaces" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/interfaces" ) // Structure for creating request to version diff --git a/samples/client/client.go b/samples/client/client.go index b7eadee5..54bb0ade 100644 --- a/samples/client/client.go +++ b/samples/client/client.go @@ -6,8 +6,8 @@ import ( "errors" - decortsdk "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/pkg/cloudbroker/compute" + decortsdk "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/pkg/cloudbroker/compute" ) type Migrator interface { diff --git a/samples/client/client_test.go b/samples/client/client_test.go index f63a5405..0a6cb00f 100644 --- a/samples/client/client_test.go +++ b/samples/client/client_test.go @@ -8,9 +8,9 @@ import ( "github.com/stretchr/testify/assert" "go.uber.org/mock/gomock" - decortsdk "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/pkg/cloudbroker/compute" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/samples/client" + decortsdk "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/pkg/cloudbroker/compute" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/samples/client" ) // Пример юнит тестирования на моках diff --git a/universal-client.go b/universal-client.go index c4ef413b..99914f81 100644 --- a/universal-client.go +++ b/universal-client.go @@ -4,10 +4,10 @@ import ( "fmt" "reflect" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/config" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/pkg/cloudapi" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/pkg/cloudbroker" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/pkg/sdn" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/config" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/pkg/cloudapi" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/pkg/cloudbroker" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v16/pkg/sdn" ) type ClientInterface interface {