From f1112e5a118cbcd1ada6aa67ebb5ac486e84dbbc Mon Sep 17 00:00:00 2001 From: Alexey Fetisov Date: Fri, 5 Jun 2026 17:30:36 +0300 Subject: [PATCH] v15.0.0 --- CHANGELOG.md | 179 +++++++++- README.md | 107 +++--- check.go | 2 +- client.go | 12 +- client_bvs.go | 10 +- 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 | 24 +- internal/validators/helper.go | 2 +- internal/validators/validator.go | 15 + legacy-client.go | 10 +- pkg/cloudapi/account.go | 2 +- pkg/cloudapi/account/account.go | 2 +- pkg/cloudapi/account/add_user.go | 2 +- pkg/cloudapi/account/audits.go | 2 +- pkg/cloudapi/account/delete.go | 2 +- pkg/cloudapi/account/delete_user.go | 2 +- pkg/cloudapi/account/disable_enable.go | 2 +- pkg/cloudapi/account/get.go | 2 +- .../account/get_consumed_account_units.go | 2 +- .../get_consumed_cloud_units_by_type.go | 2 +- .../account/get_reserved_account_units.go | 2 +- .../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 | 2 +- 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 | 2 +- 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 | 36 +- .../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 | 2 +- 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 | 38 ++- pkg/cloudapi/compute/cd_insert.go | 38 ++- pkg/cloudapi/compute/change_ip.go | 37 +- pkg/cloudapi/compute/change_link_state.go | 39 ++- pkg/cloudapi/compute/change_mac.go | 2 +- pkg/cloudapi/compute/change_mtu.go | 37 +- pkg/cloudapi/compute/change_secutity_group.go | 37 +- pkg/cloudapi/compute/clone.go | 39 ++- 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 | 37 +- .../compute/delete_cpu_alignment_profile.go | 39 +++ 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 | 37 +- pkg/cloudapi/compute/disk_add.go | 41 ++- pkg/cloudapi/compute/disk_attach.go | 41 ++- pkg/cloudapi/compute/disk_del.go | 37 +- pkg/cloudapi/compute/disk_detach.go | 37 +- pkg/cloudapi/compute/disk_migrate.go | 2 +- pkg/cloudapi/compute/disk_qos.go | 37 +- pkg/cloudapi/compute/disk_resize.go | 37 +- .../compute/disk_switch_to_replication.go | 37 +- pkg/cloudapi/compute/enable.go | 2 +- pkg/cloudapi/compute/filter.go | 6 +- pkg/cloudapi/compute/get.go | 2 +- pkg/cloudapi/compute/get_audits.go | 2 +- pkg/cloudapi/compute/get_console_url.go | 2 +- .../compute/get_cpu_alignment_profile.go | 46 +++ pkg/cloudapi/compute/get_custom_fields.go | 2 +- pkg/cloudapi/compute/get_log.go | 2 +- pkg/cloudapi/compute/guest_agent_disable.go | 37 +- pkg/cloudapi/compute/guest_agent_enable.go | 37 +- pkg/cloudapi/compute/guest_agent_execute.go | 37 +- .../compute/guest_agent_feature_get.go | 2 +- .../compute/guest_agent_feature_update.go | 37 +- pkg/cloudapi/compute/list.go | 2 +- pkg/cloudapi/compute/list_deleted.go | 2 +- pkg/cloudapi/compute/list_pci_device.go | 2 +- pkg/cloudapi/compute/list_vgpu.go | 2 +- pkg/cloudapi/compute/migrate_to_zone.go | 37 +- pkg/cloudapi/compute/models.go | 35 +- pkg/cloudapi/compute/move_to_rg.go | 37 +- pkg/cloudapi/compute/net_attach.go | 41 ++- pkg/cloudapi/compute/net_detach.go | 37 +- pkg/cloudapi/compute/pause.go | 37 +- pkg/cloudapi/compute/pfw_add.go | 37 +- pkg/cloudapi/compute/pfw_del.go | 37 +- pkg/cloudapi/compute/pfw_list.go | 2 +- pkg/cloudapi/compute/pin_to_node.go | 37 +- pkg/cloudapi/compute/power_cycle.go | 37 +- pkg/cloudapi/compute/reboot.go | 37 +- pkg/cloudapi/compute/redeploy.go | 37 +- pkg/cloudapi/compute/reset.go | 37 +- pkg/cloudapi/compute/resize.go | 37 +- pkg/cloudapi/compute/restore.go | 45 ++- pkg/cloudapi/compute/resume.go | 37 +- pkg/cloudapi/compute/serialize.go | 2 +- .../compute/set_cpu_alignment_profile.go | 43 +++ pkg/cloudapi/compute/set_custom_fields.go | 2 +- .../compute/shared_snapshot_merge_status.go | 2 +- pkg/cloudapi/compute/snapshot_create.go | 43 ++- pkg/cloudapi/compute/snapshot_delete.go | 2 +- pkg/cloudapi/compute/snapshot_list.go | 2 +- pkg/cloudapi/compute/snapshot_rollback.go | 41 ++- pkg/cloudapi/compute/snapshot_usage.go | 2 +- pkg/cloudapi/compute/start.go | 37 +- pkg/cloudapi/compute/stop.go | 37 +- 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 | 2 +- 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 | 2 +- pkg/cloudapi/disks/list_deleted.go | 2 +- pkg/cloudapi/disks/list_unattached.go | 2 +- pkg/cloudapi/disks/models.go | 18 +- 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/models.go | 3 + 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 | 7 +- 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 | 2 +- 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 | 2 +- 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 | 19 +- pkg/cloudapi/kvmx86/create_blank.go | 15 +- 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/serialize.go | 2 +- pkg/cloudapi/locatons.go | 2 +- 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/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 | 2 +- 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/models.go | 4 +- 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 | 2 +- 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 +- .../user/is_valid_invite_user_token.go | 2 +- 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 | 2 +- pkg/cloudapi/vgpu/serialize.go | 2 +- pkg/cloudapi/vgpu/vgpu.go | 2 +- pkg/cloudapi/vins.go | 2 +- pkg/cloudapi/vins/audits.go | 2 +- pkg/cloudapi/vins/create_in_account.go | 2 +- pkg/cloudapi/vins/create_in_rg.go | 2 +- 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/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 | 2 +- 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 | 2 +- pkg/cloudbroker/account/disable_accounts.go | 2 +- pkg/cloudbroker/account/enable.go | 2 +- 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 | 2 +- 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 | 2 +- .../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 | 36 +- .../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 | 2 +- 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 | 37 +- pkg/cloudbroker/compute/cd_insert.go | 37 +- pkg/cloudbroker/compute/change_ip.go | 37 +- pkg/cloudbroker/compute/change_link_state.go | 39 ++- pkg/cloudbroker/compute/change_mac.go | 2 +- pkg/cloudbroker/compute/change_mtu.go | 37 +- pkg/cloudbroker/compute/change_read_only.go | 2 +- .../compute/change_secutity_group.go | 37 +- .../compute/check_compute_placement.go | 2 +- pkg/cloudbroker/compute/clone.go | 39 ++- 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 | 2 +- pkg/cloudbroker/compute/computeci_unset.go | 2 +- pkg/cloudbroker/compute/create_template.go | 37 +- .../compute/create_template_from_blank.go | 2 +- pkg/cloudbroker/compute/delete.go | 37 +- .../compute/delete_cpu_alignment_profile.go | 39 +++ .../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 | 37 +- pkg/cloudbroker/compute/disk_add.go | 45 ++- pkg/cloudbroker/compute/disk_attach.go | 41 ++- pkg/cloudbroker/compute/disk_del.go | 37 +- pkg/cloudbroker/compute/disk_detach.go | 37 +- pkg/cloudbroker/compute/disk_migrate.go | 2 +- pkg/cloudbroker/compute/disk_qos.go | 37 +- pkg/cloudbroker/compute/disk_resize.go | 37 +- .../compute/disk_switch_to_replication.go | 37 +- pkg/cloudbroker/compute/enable.go | 2 +- pkg/cloudbroker/compute/filter.go | 6 +- pkg/cloudbroker/compute/get.go | 2 +- pkg/cloudbroker/compute/get_audits.go | 2 +- pkg/cloudbroker/compute/get_console_url.go | 2 +- .../compute/get_cpu_alignment_profile.go | 46 +++ pkg/cloudbroker/compute/get_custom_fields.go | 2 +- pkg/cloudbroker/compute/get_log.go | 2 +- .../compute/guest_agent_disable.go | 37 +- pkg/cloudbroker/compute/guest_agent_enable.go | 37 +- .../compute/guest_agent_execute.go | 37 +- .../compute/guest_agent_feature_get.go | 2 +- .../compute/guest_agent_feature_update.go | 37 +- pkg/cloudbroker/compute/list.go | 2 +- pkg/cloudbroker/compute/list_deleted.go | 2 +- pkg/cloudbroker/compute/list_pci_device.go | 2 +- pkg/cloudbroker/compute/list_vgpu.go | 2 +- pkg/cloudbroker/compute/mass_delete.go | 37 +- pkg/cloudbroker/compute/mass_reboot.go | 37 +- pkg/cloudbroker/compute/mass_start.go | 37 +- pkg/cloudbroker/compute/mass_stop.go | 37 +- pkg/cloudbroker/compute/migrate.go | 2 +- pkg/cloudbroker/compute/migrate_abort.go | 37 +- pkg/cloudbroker/compute/migrate_storage.go | 2 +- .../compute/migrate_storage_abort.go | 50 ++- .../compute/migrate_storage_clean_up.go | 50 ++- .../compute/migrate_storage_info.go | 2 +- .../compute/migrate_storage_list.go | 2 +- pkg/cloudbroker/compute/migrate_to_zone.go | 39 ++- pkg/cloudbroker/compute/models.go | 34 +- pkg/cloudbroker/compute/move_to_rg.go | 39 ++- pkg/cloudbroker/compute/net_attach.go | 41 ++- pkg/cloudbroker/compute/net_detach.go | 37 +- pkg/cloudbroker/compute/net_qos.go | 37 +- pkg/cloudbroker/compute/pause.go | 37 +- pkg/cloudbroker/compute/pfw_add.go | 37 +- pkg/cloudbroker/compute/pfw_del.go | 37 +- pkg/cloudbroker/compute/pfw_list.go | 2 +- pkg/cloudbroker/compute/pin_to_node.go | 37 +- pkg/cloudbroker/compute/power_cycle.go | 37 +- pkg/cloudbroker/compute/raise_down.go | 22 +- pkg/cloudbroker/compute/reboot.go | 37 +- pkg/cloudbroker/compute/redeploy.go | 37 +- pkg/cloudbroker/compute/reset.go | 37 +- pkg/cloudbroker/compute/resize.go | 37 +- pkg/cloudbroker/compute/restore.go | 37 +- pkg/cloudbroker/compute/resume.go | 37 +- pkg/cloudbroker/compute/serialize.go | 2 +- .../compute/set_cpu_alignment_profile.go | 43 +++ 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 | 41 ++- 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 | 45 ++- pkg/cloudbroker/compute/snapshot_usage.go | 2 +- pkg/cloudbroker/compute/start.go | 37 +- pkg/cloudbroker/compute/start_migration_in.go | 2 +- .../compute/start_migration_out.go | 4 +- pkg/cloudbroker/compute/stop.go | 37 +- 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 | 6 +- 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 | 2 +- pkg/cloudbroker/disks/list_deleted.go | 2 +- pkg/cloudbroker/disks/list_unattached.go | 2 +- pkg/cloudbroker/disks/migrate.go | 8 +- pkg/cloudbroker/disks/migrate_abort.go | 2 +- pkg/cloudbroker/disks/migrate_status.go | 2 +- pkg/cloudbroker/disks/models.go | 7 +- 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 | 6 +- 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 | 2 +- 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/models.go | 42 ++- 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 | 2 +- .../grid/set_cpu_allocation_parameter.go | 2 +- .../grid/set_cpu_allocation_ratio.go | 4 +- .../grid/set_cpu_allocation_ratio_for_vm.go | 4 +- .../grid/set_mem_allocation_ratio.go | 4 +- pkg/cloudbroker/grid/set_password_policy.go | 2 +- pkg/cloudbroker/group.go | 2 +- pkg/cloudbroker/group/get.go | 2 +- 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 | 2 +- pkg/cloudbroker/image/computeci_unset.go | 2 +- 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 | 12 +- 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 | 2 +- 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 | 2 +- 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 | 27 +- pkg/cloudbroker/kvmx86/create_blank.go | 19 +- pkg/cloudbroker/kvmx86/kvmx86.go | 2 +- pkg/cloudbroker/kvmx86/mass_create.go | 27 +- 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/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 | 46 +++ pkg/cloudbroker/node/get_pci_devices.go | 62 ++++ pkg/cloudbroker/node/get_ssh_identity.go | 2 +- pkg/cloudbroker/node/list.go | 2 +- pkg/cloudbroker/node/maintenance.go | 2 +- pkg/cloudbroker/node/models.go | 316 +++++++++++++++++- pkg/cloudbroker/node/node.go | 2 +- .../node/pci_device_driver_to_kernel.go | 45 +++ .../node/pci_device_driver_to_vfio.go | 50 +++ 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 | 22 +- pkg/cloudbroker/node/set_huge_pages.go | 2 +- .../node/set_mem_allocation_ratio.go | 22 +- 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/resmon.go | 2 +- pkg/cloudbroker/resmon/get_by_compute.go | 4 +- pkg/cloudbroker/resmon/get_by_computes.go | 4 +- pkg/cloudbroker/resmon/get_by_grid.go | 4 +- pkg/cloudbroker/resmon/get_by_node.go | 4 +- pkg/cloudbroker/resmon/get_by_nodes.go | 4 +- 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 | 2 +- pkg/cloudbroker/rg/create.go | 4 +- 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/models.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 | 4 +- 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 | 2 +- pkg/cloudbroker/sep/access_grant_to_pool.go | 2 +- pkg/cloudbroker/sep/access_revoke.go | 2 +- pkg/cloudbroker/sep/access_revoke_to_pool.go | 2 +- pkg/cloudbroker/sep/add_consumer_nodes.go | 2 +- pkg/cloudbroker/sep/add_pool.go | 4 +- 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 | 48 +++ 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 | 2 +- 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 | 7 +- 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 +- .../user/get_matching_usernames.go | 2 +- pkg/cloudbroker/user/list.go | 2 +- pkg/cloudbroker/user/models.go | 3 - 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 | 2 +- pkg/cloudbroker/vgpu/create.go | 2 +- pkg/cloudbroker/vgpu/deallocate.go | 2 +- pkg/cloudbroker/vgpu/destroy.go | 2 +- pkg/cloudbroker/vgpu/list.go | 2 +- pkg/cloudbroker/vgpu/serialize.go | 2 +- pkg/cloudbroker/vgpu/vgpu.go | 2 +- pkg/cloudbroker/vins.go | 2 +- pkg/cloudbroker/vins/audits.go | 2 +- pkg/cloudbroker/vins/create_in_account.go | 2 +- pkg/cloudbroker/vins/create_in_rg.go | 2 +- 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 | 51 +++ 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 | 38 +++ pkg/cloudbroker/zone/get.go | 2 +- .../zone/get_cpu_alignment_profile.go | 46 +++ pkg/cloudbroker/zone/list.go | 2 +- .../zone/list_cpu_alignment_profile.go | 45 +++ pkg/cloudbroker/zone/models.go | 66 ++++ pkg/cloudbroker/zone/node_autostart.go | 2 +- pkg/cloudbroker/zone/serialize.go | 2 +- .../zone/test_cpu_alignment_profile.go | 51 +++ pkg/cloudbroker/zone/update.go | 2 +- 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 | 8 +- 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 | 20 +- 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 | 6 +- 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 +- 1246 files changed, 6117 insertions(+), 1589 deletions(-) create mode 100644 pkg/cloudapi/compute/delete_cpu_alignment_profile.go create mode 100644 pkg/cloudapi/compute/get_cpu_alignment_profile.go create mode 100644 pkg/cloudapi/compute/set_cpu_alignment_profile.go create mode 100644 pkg/cloudbroker/compute/delete_cpu_alignment_profile.go create mode 100644 pkg/cloudbroker/compute/get_cpu_alignment_profile.go create mode 100644 pkg/cloudbroker/compute/set_cpu_alignment_profile.go create mode 100644 pkg/cloudbroker/node/get_network_info.go create mode 100644 pkg/cloudbroker/node/get_pci_devices.go create mode 100644 pkg/cloudbroker/node/pci_device_driver_to_kernel.go create mode 100644 pkg/cloudbroker/node/pci_device_driver_to_vfio.go create mode 100644 pkg/cloudbroker/sep/update.go create mode 100644 pkg/cloudbroker/zone/add_cpu_alignment_profile.go create mode 100644 pkg/cloudbroker/zone/delete_cpu_alignment_profile.go create mode 100644 pkg/cloudbroker/zone/get_cpu_alignment_profile.go create mode 100644 pkg/cloudbroker/zone/list_cpu_alignment_profile.go create mode 100644 pkg/cloudbroker/zone/test_cpu_alignment_profile.go diff --git a/CHANGELOG.md b/CHANGELOG.md index 8e14e3a..c6cc093 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,4 @@ -## Version 14.11.0 +## Version 15.0.0 Методы `Audits` в cloudapi/compute, cloudbroker/compute, cloudapi/account, cloudbroker/account, cloudapi/vins, cloudbroker/vins, cloudapi/rg и cloudbroker/rg стали deprecated и в следующих версиях будут удалены, вместо них необходимо использовать метод `List` в cloudapi/audit и cloudbroker/audit с соответствующими фильтрами Методы `AccessGrant`, `AccessGrantToPool`, `AccessRevoke`, `AccessRevokeToPool` в cloudbroker/sep стали deprecated и в следующих версиях будут удалены @@ -7,12 +7,176 @@ Все методы группы `.SDN()` находятся в альфа-версии. + +### Добавлено + +#### compute +| Идентификатор задачи | Описание | +| --- | --- | +| BGOS-864 | Методы `GetCPUAlignmentProfile`, `SetCPUAlignmentProfile` и `DeleteCPUAlignmentProfile` в cloudapi/compute и cloudbroker/compute | +| BGOS-864 | Структуры запросов `GetCPUAlignmentProfileRequest`, `SetCPUAlignmentProfileRequest` и `DeleteCPUAlignmentProfileRequest` в cloudapi/compute и cloudbroker/compute | +| BGOS-865 | Вычисляемое поле `CPUAlignmentProfile` в структуру ответа `RecordCompute` в cloudapi/compute и cloudbroker/compute | +| BGOS-865 | Вычисляемое поле `CPUAlignmentProfile` в структуру ответа `ItemCompute` в cloudapi/compute и cloudbroker/compute | +| BGOS-865 | Структура ответа `CPUAlignmentProfile` в cloudapi/compute и cloudbroker/compute | +| BGOS-872 | Опциональное поле `WithMemory` в структуру запроса `SnapshotCreateRequest` в cloudapi/compute и cloudbroker/compute | +| BGOS-872 | Опциональное поле `WithMemory` в структуру запроса `SnapshotRollbackRequest` в cloudapi/compute и cloudbroker/compute | +| BGOS-872 | Вычисляемые поля `MemoryDumpImage` и `Compute` в структуру ответа `ItemSnapshot` в cloudapi/compute и cloudbroker/compute | +| BGOS-872 | Методы `SnapshotCreateAsync`, `SnapshotRollbackAsync` и `AbortSharedSnapshotMergeAsync` в cloudapi/compute и cloudbroker/compute | +| BGOS-872 | Опциональное поле `NodeID` в структуру запроса `SnapshotRollbackRequest` в cloudbroker/compute | +| BGOS-877 | Опциональное поле `Clock` в структуру запроса `UpdateRequest` в cloudapi/compute и cloudbroker/compute | +| BGOS-877 | Вычисляемое поле `Clock` в структуры ответа `RecordCompute` и `ItemCompute` в cloudapi/compute| +| BGOS-877 | Вычисляемое поле `Clock` в структуры ответа `RecordCompute` и `InfoCompute` в cloudbroker/compute | +| BGOS-885 | Методы `CDEjectAsync`, `CDInsertAsync`, `ChangeIPAsync`, `ChangeLinkStateAsync`, `ChangeSecGroupsAsync`, `ChangeMTUAsync`, `CloneAsync`, `CreateTemplateAsync`, `DeleteAsync`, `DisableAsync`, `DiskAddAsync`, `DiskAttachAsync`, `DiskDelAsync`, `DiskDetachAsync`, `DiskQOSAsync`, `DiskResizeAsync`, `DiskSwitchToReplicationAsync`, `GuestAgentDisableAsync`, `GuestAgentEnableAsync`, `GuestAgentExecuteRequestAsync`, `GuestAgentFeatureUpdateAsync`, `MigrateToZoneAsync`, `MoveToRGAsync`, `NetAttachAsync`, `NetDetachAsync`, `PauseAsync`, `PFWAddAsync`, `PFWDelAsync`, `PinToNodeAsync`, `PowerCycleAsync`, `RebootAsync`, `RedeployAsync`, `ResetAsync`, `ResizeAsync`, `RestoreAsync`, `ResumeAsync`, `StartAsync`, `StopAsync`, `MassDeleteAsync`, `MassRebootAsync`, `MassStartAsync`, `MassStopAsync`, `MigrateAbortAsync`, `MigrateStorageAbortAsync`, `MigrateStorageCleanUpAsync`, `NetQOSAsync` и `RaiseDownAsync` в cloudbroker/compute | +| BGOS-885 | Методы `CDEjectAsync`, `CDInsertAsync`, `ChangeIPAsync`, `ChangeLinkStateAsync`, `ChangeMTUAsync`, `ChangeSecGroupsAsync`, `CloneAsync`, `DeleteAsync`, `DisableAsync`, `DiskAddAsync`, `DiskDelAsync`, `DiskAttachAsync`, `DiskDetachAsync`, `DiskQOSAsync`, `DiskResizeAsync`, `DiskSwitchToReplicationAsync`, `GuestAgentDisableAsync`, `GuestAgentEnableAsync`, `GuestAgentExecuteRequestAsync`, `GuestAgentFeatureUpdateAsync`, `MigrateToZoneAsync`, `MoveToRGAsync`, `NetAttachAsync`, `NetDetachAsync`, `PauseAsync`, `PFWAddAsync`, `PFWDelAsync`, `PinToNodeAsync`, `PowerCycleAsync`, `RebootAsync`, `RedeployAsync`, `ResetAsync`, `ResizeAsync`, `RestoreAsync`, `ResumeAsync`, `StartAsync` и `StopAsync` в cloudapi/compute | +| BGOS-894 | Опциональное поле `ReadOnly` в структуры запросов `DiskAddRequest` и `DiskAttachRequest` в cloudapi/compute и cloudbroker/compute | +| BGOS-894 | Опциональное поле `ReadOnly` в структуры ответа `InfoDisk` в cloudapi/compute и cloudbroker/compute | +| BGOS-894 | Опциональное поле `ReadOnly` в структуру ответа `ItemComputeDisk` в cloudapi/compute | +| BGOS-894 | Опциональное поле `ReadOnly` в структуру ответа `ItemDisk` в cloudbroker/compute | + +#### disks +| Идентификатор задачи | Описание | +| --- | --- | +| BGOS-895 | Вычисляемое поле `ComputesReadOnly` в структуру ответа `InfoDisk` в cloudbroker/disks | +| BGOS-895 | Вычисляемое поле `ComputesReadOnly` в структуры ответа `ItemDisk` и `RecordDisk` в cloudapi/disks | + +#### extnet +| Идентификатор
задачи | Описание | +| --- | --- | +| BGOS-876 | Вычисляемое поле `FreeIPs` в структуру ответа `ItemExtNet` в cloudapi/extnet | + +#### grid +| Идентификатор
задачи | Описание | +| --- | --- | +| BGOS-888 | Вычисляемые поля `CPUAllocationRatio`, `CPUAllocationRatioVM`, `CustomBackupPath`, `InterfaceGenerationScheme`, `MACAddressPrefix`, `NodeSelfStopTimerUptimeMonitor` и `NodeSelfStopUptimeMonitor` в структуру ответа `RecordSettingsGrid` в cloudbroker/grid | +| BGOS-888 | Вычисляемое поле `ZeroAccessEnabled` в структуру ответа `RecordGrid` в cloudbroker/grid | +| BGOS-888 | Вычисляемое поле `Policies` в структуру ответа `RecordResource` и структура ответа `PolicyUsage` в cloudbroker/grid | + +#### kvmx86 +| Идентификатор задачи | Описание | +| --- | --- | +| BGOS-865 | Опциональное поле `CPUAlignmentProfile` в структуры запросов `CreateRequest` и `CreateBlankRequest` в cloudapi/kvmx86 и cloudbroker/kvmx86 | +| BGOS-865 | Опциональное поле `CPUAlignmentProfile` в структуру запроса `MassCreateRequest` в cloudbroker/kvmx86 | +| BGOS-877 | Опциональное поле `Clock` в структуры запросов `CreateRequest` и `CreateBlankRequest` в cloudapi/kvmx86 и cloudbroker/kvmx86 | +| BGOS-877 | Опциональное поле `Clock` в структуру запроса `MassCreateRequest` в cloudbroker/kvmx86 | + +#### node +| Идентификатор
задачи | Описание | +| --- | --- | +| BGOS-866 | Вычисляемые поля `OneGAvailable`, `OneGFree`, `OneGReserved`, `OneGUsed`, `OneGDPDKReserved`, `TwoMAvailable`, `TwoMFree`, `TwoMReserved` и `TwoMUsed` в структуру ответа `ItemMemory` в cloudbroker/node | +| BGOS-879 | Методы `GetPCIDevices`, `PCIDeviceDriverToVFIO` и `PCIDeviceDriverToKernel` в cloudbroker/node | +| BGOS-879 | Структуры запросов `GetPCIDevicesRequest`, `PCIDeviceDriverToVFIORequest` и `PCIDeviceDriverToKernelRequest` в cloudbroker/node | +| BGOS-879 | Структуры ответов `RecordPCIDeviceDriver`, `ListPCIDevices` и `ItemPCIDevice` в cloudbroker/node | +| BGOS-880 | Вычисляемое поле `PCIDevices` в структуру ответа `ItemNode` в cloudbroker/node | +| BGOS-882 | Метод `GetNetworkInfo` и структура запроса `GetNetworkInfoRequest` в cloudbroker/node | +| BGOS-882 | Структуры ответа `RecordNodeNetworkInfo`, `SystemNetworkInfo`, `OVSNetworkInfo`, `LibvirtNetworkInfo` и `NetworkTopology` в cloudbroker/node | +| BGOS-890 | Структура ответа `ItemNode` для методов `SetCpuAllocationRatio` и `SetMemAllocationRatio` в cloudbroker/node | + +#### sep +| Идентификатор
задачи | Описание | +| --- | --- | +| BGOS-873 | Метод `Update` и структура запроса `UpdateRequest` в cloudbroker/sep | + +#### zone +| Идентификатор задачи | Описание | +| --- | --- | +| BGOS-862 | Метод `AddCPUAlignmentProfile` и структура запроса `AddCPUAlignmentProfileRequest` в cloudbroker/zone | +| BGOS-862 | Метод `DeleteCPUAlignmentProfile` и структура запроса `DeleteCPUAlignmentProfileRequest` в cloudbroker/zone | +| BGOS-862 | Метод `GetCPUAlignmentProfile` и структура запроса `GetCPUAlignmentProfileRequest` в cloudbroker/zone | +| BGOS-862 | Метод `ListCPUAlignmentProfile` и структура запроса `ListCPUAlignmentProfileRequest` в cloudbroker/zone | +| BGOS-862 | Метод `TestCPUAlignmentProfile` и структура запроса `TestCPUAlignmentProfileRequest` в cloudbroker/zone | +| BGOS-862 | Структуры ответов `ListCPUAlignmentProfiles`, `ItemCPUAlignmentProfile`, `TestCPUAlignmentProfileResult` и `CpuAlignmentProfileCandidate` в cloudbroker/zone | +| BGOS-863 | Вычисляемое поле `CpuAlignmentProfiles` в структуры ответа `RecordZone` и `ItemZone` и структура `CpuAlignmentProfile` в cloudapi/zone и cloudbroker/zone | + +#### SDN logicalports +| Идентификатор
задачи | Описание | +| --- | --- | +| BGOS-896 | Обязательное поле `ID` в структуру запроса `UpdateAddress` в sdn/logical_port | + +#### SDN netobjgroups +| Идентификатор
задачи | Описание | +| --- | --- | +| BGOS-884 | Опциональное поле `Type` в структуру запроса `ListRequest` в sdn/netobjgroups | + ### Изменено +#### account +| Идентификатор
задачи | Описание | +| --- | --- | +| BGOS-887 | Тип поля `CPUAllocationRatio` с `float64` на `uint64` в структуре ответа `RecordAccount` в cloudapi/account | +| BGOS-887 | Тип поля `CPUAllocationRatio` с `float64` на `uint64` в структуре ответа `InfoAccount` в cloudbroker/account | + #### compute | Идентификатор
задачи | Описание | | --- | --- | | BGOS-874 | Поле `StoragePolicyID` с обязательного на опциональное в структуре запроса `RedeployRequest` в cloudapi/compute и cloudbroker/compute | +| BGOS-870 | Тип поля `BLKDiscard` с `bool` на `string` и переименование в `Discard` в структуре ответа `ItemComputeDisk` в cloudapi/compute | +| BGOS-870 | Тип поля `BLKDiscard` с `bool` на `string` и переименование в `Discard` в структуре ответа `ItemDisk` в cloudbroker/compute| +| BGOS-870 | Тип поля `BLKDiscard` с `bool` на `string` и переименование в `Discard` в структуре запроса `DiskAddRequest` в cloudbroker/compute| +| BGOS-885 | Тип возвращаемого значения с `string` на `bool` в методе `Restore` в cloudapi/compute | +| BGOS-885 | Тип возвращаемого значения с `string` на `bool` в методе `MigrateStorageAbort` в cloudbroker/compute | +| BGOS-885 | Тип возвращаемого значения с `string` на `bool` в методе `MigrateStorageCleanUp` в cloudbroker/compute | +| BGOS-885 | Название метода с `Validate` на `MoveToRG` в cloudbroker/compute | +| BGOS-893 | Тип поля `SDNObjectGroupID` с `string` на `[]string` и переименование в `SDNObjectGroupIDs` в структуре запроса `NetAttachRequest` в cloudapi/compute и cloudbroker/compute | + + +#### disks +| Идентификатор
задачи | Описание | +| --- | --- | +| BGOS-870 | Тип поля `BLKDiscard` с `bool` на `string` и переименование в `Discard` в структурах ответа `RecordDisk`, `ItemDisk` и `ItemDiskUnattached` в cloudapi/disks | +| BGOS-870 | Тип поля `BLKDiscard` с `bool` на `string` и переименование в `Discard` в структуре ответа `InfoDisk` в cloudbroker/disks | +| BGOS-870 | Тип поля `BLKDiscard` с `bool` на `string` и переименование в `Discard` в структурах запросов `CreateRequest` и `UpdateRequest` в cloudbroker/disks | +| BGOS-881 | Поле `StoragePolicyID` c опционального на обязательное в структуре запроса `MigrateRequest` в cloudbroker/disks | + +#### grid +| Идентификатор
задачи | Описание | +| --- | --- | +| BGOS-888 | Тип поля `Ratio` с `float64` на `uint64` в структурах запросов `SetCPUAllocationRatioRequest`, `SetCPUAllocationRatioForVMRequest` и `SetMemAllocationRatioRequest` в cloudbroker/grid | + +#### image +| Идентификатор
задачи | Описание | +| --- | --- | +| BGOS-860 | Тип ответа метода `MultiImageExport` со `string` на `uint64` в cloudbroker/image | +| BGOS-869 | Тип вычисляемого поля `AccountID` с опционального на обязательный в структуре `CreateVirtualRequest` в cloudapi/image | +| BGOS-878 | Тип поля `TypeImage` в структуре запроса `ListRequest` с `string` на `[]string` в cloudbroker/image и cloudapi/image | + +#### kvmx86 +| Идентификатор
задачи | Описание | +| --- | --- | +| BGOS-870 | Тип поля `BLKDiscard` с `bool` на `string` и переименование в `Discard` в структуре ответа `DataDisk` в cloudbroker/kvmx86 | +| BGOS-870 | Тип поля `BootDiskBLKDiscard` с `bool` на `string` и переименование в `BootDiskDiscard` в структурах запросов `CreateRequest`, `CreateBlankRequest` и `MassCreateRequest` в cloudbroker/kvmx86 | +| BGOS-893 | Тип поля `SDNObjectGroupID` с `string` на `[]string` и переименование в `SDNObjectGroupIDs` в структуре `Interface` в cloudapi/kvmx86 и cloudbroker/kvmx86 | +| BGOS-893 | Тип поля `SDNObjectGroupID` с `string` на `[]string` и переименование в `SDNObjectGroupIDs` в структуре `InterfaceMassCreate` в cloudbroker/kvmx86 | + +#### node +| Идентификатор
задачи | Описание | +| --- | --- | +| BGOS-867 | Тип обязательного поля `Ratio` с `float64` на `uint64` в структурах запросов `SetMemAllocationRatioRequest` и `SetCpuAllocationRatioRequest` в cloudbroker/node | +| BGOS-889 | Тип поля `VCPU` с `float64` на `uint64` в структуре ответа `FreeResourcesInfo` в cloudbroker/node | +| BGOS-889 | Тип полей `CPUAllocationRatio` и `MemAllocationRatio` с `float64` на `uint64` в структурах ответа `RecordNode` и `ItemNode` в cloudbroker/node | + +#### resmon +| Идентификатор
задачи | Описание | +| --- | --- | +| BGOS-868 | Тип поля `EndTime` с обязательного на опциональное в структурах запроса `GetByNodeRequest`, `GetByNodesRequest` `GetByGRIDRequest`, `GetByComputeRequest` и `GetByComputesRequest` в cloudbroker/resmon | + +#### rg +| Идентификатор
задачи | Описание | +| --- | --- | +| BGOS-886 | Тип поля `CPUAllocationRatio` с `float64` на `uint64` в структурах ответа `RecordResourceGroup` и `ItemResourceGroup` в cloudapi/rg | +| BGOS-886 | Тип поля `CPUAllocationRatio` с `float64` на `uint64` в структуре ответа `ItemRG` в cloudbroker/rg | +| BGOS-886 | Тип поля `Ratio` с `float64` на `uint64` в структуре запроса `SetCPUAllocationRatioRequest` в cloudbroker/rg | + +#### user +| Идентификатор
задачи | Описание | +| --- | --- | +| BGOS-891 | Тип поля `Password` с опционального на обязательный в структуре запроса `CreateRequest` в cloudbroker/user | + +#### SDN logicalports +| Идентификатор
задачи | Описание | +| --- | --- | +| BGOS-896 | Тип полей `IsDiscovered` и `MAC` с опционального на обязательный в структурах запроса `UpdateAddress` и `AddAddress` в sdn/logical_port | +| BGOS-896 | Тип поля `IsDiscovered` с опционального на обязательный в структуре запроса `LogicalPortAddressRequest` в sdn/logical_port +| BGOS-896 | Тип полей `IsDiscovered`, `MAC` с `interface` на `bool` в структурах запроса `UpdateAddress`, `AddAddress`, `LogicalPortAddressRequest` в sdn/logical_port/update | ### Исправлено @@ -20,3 +184,16 @@ | Идентификатор
задачи | Описание | | --- | --- | | BGOS-871 | Тип поля `Config` в структуре запроса `wrapperUpdateRequest` с `[]string` на `string` в cloudbroker/vfpool | + +### Удалено + +#### grid +| Идентификатор
задачи | Описание | +| --- | --- | +| BGOS-888 | Вычисляемые поля `CKey` и `Meta` из структуры ответа `RecordGrid` в cloudbroker/grid | + +#### user +| Идентификатор
задачи | Описание | +| --- | --- | +| BGOS-861 | Значение по умолчанию опционального поля `Password` в структуре запроса `CreateRequest` в cloudbroker/user | +| BGOS-875 | Опциональное поле `Password` из структуры ответа `ItemUser` в cloudbroker/user | diff --git a/README.md b/README.md index e91f723..907d5f6 100644 --- a/README.md +++ b/README.md @@ -10,6 +10,7 @@ Dynamix SDK - это библиотека, написанная на языке - Версия 12.x.х Dynamix-SDK соответствует 4.4.0 версии платформы - Версия 13.x.х Dynamix-SDK соответствует 4.5.0 версии платформы - Версия 14.x.х Dynamix-SDK соответствует 4.6.0 версии платформы + - Версия 15.x.х Dynamix-SDK соответствует 4.7.0 версии платформы ## Оглавление @@ -84,7 +85,7 @@ Dynamix SDK - это библиотека, написанная на языке Выполните команду в терминале: ```bash -go get -u repository.basistech.ru/BASIS/dynamix-golang-sdk/v14 +go get -u repository.basistech.ru/BASIS/dynamix-golang-sdk/v15 ``` ## Список API @@ -211,7 +212,7 @@ go get -u repository.basistech.ru/BASIS/dynamix-golang-sdk/v14 ```go import ( - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v14/config" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/config" ) func main(){ @@ -236,7 +237,7 @@ func main(){ ```go import ( - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v14/config" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/config" ) func main() { @@ -281,8 +282,8 @@ sslSkipVerify: false package main import ( - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v14/config" - decort "repository.basistech.ru/BASIS/dynamix-golang-sdk/v14" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/config" + decort "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15" ) func main() { @@ -473,9 +474,9 @@ type CreateRequest struct { package main import ( - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v14/config" - decort "repository.basistech.ru/BASIS/dynamix-golang-sdk/v14" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v14/pkg/cloudapi/kvmx86" + "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" ) func main() { @@ -612,9 +613,9 @@ import ( "log" "fmt" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v14/config" - decort "repository.basistech.ru/BASIS/dynamix-golang-sdk/v14" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v14/pkg/cloudapi/kvmx86" + "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" ) func main() { @@ -662,9 +663,9 @@ import ( "log" "fmt" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v14/config" - decort "repository.basistech.ru/BASIS/dynamix-golang-sdk/v14" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v14/pkg/cloudapi/account" + "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" ) func main() { @@ -842,9 +843,9 @@ import ( "context" "log" - decort "repository.basistech.ru/BASIS/dynamix-golang-sdk/v14" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v14/config" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v14/pkg/cloudbroker/compute" + 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" ) func main() { @@ -900,9 +901,9 @@ import ( "log" "fmt" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v14/config" - decort "repository.basistech.ru/BASIS/dynamix-golang-sdk/v14" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v14/pkg/cloudapi/bservice" + "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" ) func main() { @@ -955,10 +956,10 @@ import ( "log" "fmt" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v14/config" - decort "repository.basistech.ru/BASIS/dynamix-golang-sdk/v14" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v14/pkg/cloudapi/tasks" - tasks_cb "repository.basistech.ru/BASIS/dynamix-golang-sdk/v14/pkg/cloudbroker/tasks" + "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" ) func main() { @@ -1038,7 +1039,7 @@ func main() { ```go import ( - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v14/config" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/config" ) func main(){ @@ -1062,7 +1063,7 @@ func main(){ ```go import ( - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v14/config" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/config" ) func main() { @@ -1103,8 +1104,8 @@ sslSkipVerify: true package main import ( - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v14/config" - decort "repository.basistech.ru/BASIS/dynamix-golang-sdk/v14" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/config" + decort "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15" ) func main() { @@ -1131,8 +1132,8 @@ package main import ( "fmt" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v14/config" - decort "repository.basistech.ru/BASIS/dynamix-golang-sdk/v14" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/config" + decort "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15" ) func main() { @@ -1214,7 +1215,7 @@ func main() { ```go import ( - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v14/config" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/config" ) func main(){ @@ -1242,7 +1243,7 @@ func main(){ ```go import ( - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v14/config" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/config" ) func main() { @@ -1259,7 +1260,7 @@ func main() { ```go import ( - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v14/config" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/config" ) func main() { @@ -1325,8 +1326,8 @@ func main() { package main import ( - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v14/config" - decort "repository.basistech.ru/BASIS/dynamix-golang-sdk/v14" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/config" + decort "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15" ) func main() { @@ -1359,8 +1360,8 @@ package main import ( "fmt" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v14/config" - decort "repository.basistech.ru/BASIS/dynamix-golang-sdk/v14" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/config" + decort "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15" ) func main() { @@ -1400,8 +1401,8 @@ package main import ( "fmt" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v14/config" - decort "repository.basistech.ru/BASIS/dynamix-golang-sdk/v14" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/config" + decort "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15" ) func main() { @@ -1439,8 +1440,8 @@ package main import ( "fmt" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v14/config" - decort "repository.basistech.ru/BASIS/dynamix-golang-sdk/v14" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/config" + decort "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15" ) func main() { @@ -1493,11 +1494,11 @@ import ( "log" "os" - decort "repository.basistech.ru/BASIS/dynamix-golang-sdk/v14" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v14/config" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v14/internal/constants" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v14/internal/validators" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v14/pkg/cloudbroker/kvmx86" + 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" ) func main() { @@ -1559,7 +1560,7 @@ func main() { ```go import ( - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v14/config" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/config" ) func main(){ @@ -1592,8 +1593,8 @@ func main(){ package main import ( - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v14/config" - decort "repository.basistech.ru/BASIS/dynamix-golang-sdk/v14" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/config" + decort "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15" ) func main() { @@ -1624,8 +1625,8 @@ package main import ( "fmt" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v14/config" - decort "repository.basistech.ru/BASIS/dynamix-golang-sdk/v14" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/config" + decort "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15" ) func main() { @@ -1677,7 +1678,7 @@ func main() { ```go import ( - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v14/config" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/config" ) func main(){ @@ -1710,7 +1711,7 @@ package unit_test import ( "testing" "go.uber.org/mock/gomock" - decortsdk "repository.basistech.ru/BASIS/dynamix-golang-sdk/v14" + decortsdk "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15" ) // Пример юнит тестирования на моках diff --git a/check.go b/check.go index 70d5cdb..fd469a3 100644 --- a/check.go +++ b/check.go @@ -8,7 +8,7 @@ import ( "net/http" "strings" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v14/internal/constants" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/constants" ) type CheckInfo struct { diff --git a/client.go b/client.go index 70f08db..eca0f2a 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/v14/config" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v14/internal/constants" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v14/internal/validators" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v14/pkg/cloudapi" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v14/pkg/cloudbroker" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v14/pkg/sdn" + "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" ) // DecortClient is HTTP-client for platform diff --git a/client_bvs.go b/client_bvs.go index e15272b..7cf01ca 100644 --- a/client_bvs.go +++ b/client_bvs.go @@ -14,11 +14,11 @@ import ( "time" "github.com/google/go-querystring/query" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v14/config" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v14/internal/constants" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v14/pkg/cloudapi" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v14/pkg/cloudbroker" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v14/pkg/sdn" + "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/pkg/cloudapi" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/pkg/cloudbroker" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/pkg/sdn" ) // BVSDecortClient is HTTP-client for platform diff --git a/client_mock.go b/client_mock.go index 6bbf3e9..be2327e 100644 --- a/client_mock.go +++ b/client_mock.go @@ -1,9 +1,9 @@ package decortsdk import ( - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v14/pkg/cloudapi" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v14/pkg/cloudbroker" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v14/pkg/sdn" + "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" ) type MockDecortClient struct { diff --git a/config/config.go b/config/config.go index 15942c6..6f85b5f 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // Configuration for creating request to platform diff --git a/config/config_bvs.go b/config/config_bvs.go index 7debb5e..dd7b8d2 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/v14/internal/serialization" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/serialization" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) type BVSConfig struct { diff --git a/config/legacy-config.go b/config/legacy-config.go index 9e75cb0..ba2ee8d 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // Legacy client configuration diff --git a/go.mod b/go.mod index d01c6ef..20af101 100644 --- a/go.mod +++ b/go.mod @@ -1,4 +1,4 @@ -module repository.basistech.ru/BASIS/dynamix-golang-sdk/v14 +module repository.basistech.ru/BASIS/dynamix-golang-sdk/v15 go 1.24.0 diff --git a/internal/constants/constants.go b/internal/constants/constants.go index c21520f..737c781 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.7.0": "-", "4.6.0": "-", "4.5.0": "-", "4.4.0": "-", diff --git a/internal/validators/custom.go b/internal/validators/custom.go index 26cbd71..bd663a0 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/v14/interfaces" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v14/internal/multierror" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/interfaces" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/multierror" ) // protoValidator is used to validate Proto fields. @@ -464,3 +464,23 @@ func sepTechStatusValidator(fe validator.FieldLevel) bool { return IsInSlice(fieldValue, sepTechStatusValues) } + +// pciDeviceHWPathValidator is used to validate PCI device hardware path fields (e.g. 0000:81:00.0) +func pciDeviceHWPathValidator(fe validator.FieldLevel) bool { + fieldValue := fe.Field().String() + + ok, _ := regexp.MatchString(`^[0-9a-fA-F]{4}:[0-9a-fA-F]{2}:[0-9a-fA-F]{2}\.[0-7]$`, fieldValue) + return ok +} + +// sepNameValidator is used to validate SEP name fields +func sepNameValidator(fe validator.FieldLevel) bool { + ok, _ := regexp.MatchString(`^[a-zA-Zа-яА-ЯёЁ0-9][a-zA-Zа-яА-ЯёЁ0-9_.\[\]()\-]*$`, fe.Field().String()) + return ok +} + +// sepDescriptionValidator is used to validate SEP description fields +func sepDescriptionValidator(fe validator.FieldLevel) bool { + ok, _ := regexp.MatchString(`^[a-zA-Zа-яА-ЯёЁ0-9_.\[\]()\-]*$`, fe.Field().String()) + return ok +} diff --git a/internal/validators/helper.go b/internal/validators/helper.go index ea86d47..2ac58a3 100644 --- a/internal/validators/helper.go +++ b/internal/validators/helper.go @@ -2,7 +2,7 @@ package validators import ( "errors" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v14/internal/multierror" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/multierror" "github.com/go-playground/validator/v10" ) diff --git a/internal/validators/validator.go b/internal/validators/validator.go index 38c26da..5ad2545 100644 --- a/internal/validators/validator.go +++ b/internal/validators/validator.go @@ -306,5 +306,20 @@ func registerAllValidators(validate *validator.Validate) error { return err } + err = validate.RegisterValidation("pciDeviceHWPath", pciDeviceHWPathValidator) + if err != nil { + return err + } + + err = validate.RegisterValidation("sepName", sepNameValidator) + if err != nil { + return err + } + + err = validate.RegisterValidation("sepDescription", sepDescriptionValidator) + if err != nil { + return err + } + return nil } diff --git a/legacy-client.go b/legacy-client.go index 4da246c..582d88a 100644 --- a/legacy-client.go +++ b/legacy-client.go @@ -14,11 +14,11 @@ import ( "time" "github.com/google/go-querystring/query" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v14/config" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v14/internal/constants" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v14/pkg/cloudapi" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v14/pkg/cloudbroker" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v14/pkg/sdn" + "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/pkg/cloudapi" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/pkg/cloudbroker" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/pkg/sdn" ) // LegacyDecortClient is Legacy HTTP-client for platform diff --git a/pkg/cloudapi/account.go b/pkg/cloudapi/account.go index 1ad5b24..48c1a2b 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/v14/pkg/cloudapi/account" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/pkg/cloudapi/account" ) // Accessing the Account method group diff --git a/pkg/cloudapi/account/account.go b/pkg/cloudapi/account/account.go index 8a052fe..4dbd5b1 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/v14/interfaces" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/interfaces" ) // Structure for creating request to account diff --git a/pkg/cloudapi/account/add_user.go b/pkg/cloudapi/account/add_user.go index b457e57..68ee6d6 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 index ca3ec48..aa5c18f 100644 --- a/pkg/cloudapi/account/audits.go +++ b/pkg/cloudapi/account/audits.go @@ -5,7 +5,7 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // AuditsRequest struct to give list of account audits diff --git a/pkg/cloudapi/account/delete.go b/pkg/cloudapi/account/delete.go index dba5a6d..58b5d6e 100644 --- a/pkg/cloudapi/account/delete.go +++ b/pkg/cloudapi/account/delete.go @@ -4,7 +4,7 @@ import ( "context" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // DeleteRequest struct to delete account diff --git a/pkg/cloudapi/account/delete_user.go b/pkg/cloudapi/account/delete_user.go index 999c64f..d8dedcd 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 index 807144f..b38aca0 100644 --- a/pkg/cloudapi/account/disable_enable.go +++ b/pkg/cloudapi/account/disable_enable.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // DisableEnableRequest struct to change status of account diff --git a/pkg/cloudapi/account/get.go b/pkg/cloudapi/account/get.go index 7a080fe..9ea6eda 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 d80ba5c..024e8f9 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 index 2c8757d..9442365 100644 --- a/pkg/cloudapi/account/get_consumed_cloud_units_by_type.go +++ b/pkg/cloudapi/account/get_consumed_cloud_units_by_type.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v14/internal/validators" + "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 diff --git a/pkg/cloudapi/account/get_reserved_account_units.go b/pkg/cloudapi/account/get_reserved_account_units.go index b9f1135..63d59d3 100644 --- a/pkg/cloudapi/account/get_reserved_account_units.go +++ b/pkg/cloudapi/account/get_reserved_account_units.go @@ -5,7 +5,7 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v14/internal/validators" + "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 diff --git a/pkg/cloudapi/account/get_resource_consumption.go b/pkg/cloudapi/account/get_resource_consumption.go index 2cccae7..1b13a49 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // GetResourceConsumptionRequest struct to get resource consumption diff --git a/pkg/cloudapi/account/list.go b/pkg/cloudapi/account/list.go index 799b662..3fbe1e1 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 7366a32..ff76cef 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 f782bdb..f9ba7ae 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 de60f19..1a4eb13 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 69aa677..2efe8d8 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 9ef940d..412f7ef 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 6dc8207..fa05d73 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 04bf0c6..823039f 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 1c548d7..0df8a28 100644 --- a/pkg/cloudapi/account/models.go +++ b/pkg/cloudapi/account/models.go @@ -252,7 +252,7 @@ type RecordAccount struct { CPUAllocationParameter string `json:"cpu_allocation_parameter"` // CPU allocation ratio - CPUAllocationRatio float64 `json:"cpu_allocation_ratio"` + CPUAllocationRatio uint64 `json:"cpu_allocation_ratio"` // Created by CreatedBy string `json:"createdBy"` diff --git a/pkg/cloudapi/account/restore.go b/pkg/cloudapi/account/restore.go index 7b5cc0f..0d2486e 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // RestoreRequest struct to restore a deleted account diff --git a/pkg/cloudapi/account/serialize.go b/pkg/cloudapi/account/serialize.go index 0d876d9..7122432 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/v14/internal/serialization" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 2f92c90..135146b 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // UpdateRequest struct to update account diff --git a/pkg/cloudapi/account/update_user.go b/pkg/cloudapi/account/update_user.go index 7457e20..c397b55 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // UpdateUserRequest struct to update user access rights diff --git a/pkg/cloudapi/audit.go b/pkg/cloudapi/audit.go index d6cea1a..99249b5 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/v14/pkg/cloudapi/audit" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/pkg/cloudapi/audit" ) // Accessing the Stack method group diff --git a/pkg/cloudapi/audit/audit.go b/pkg/cloudapi/audit/audit.go index 8f466e9..b08e2dd 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/v14/interfaces" +import "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 498adba..ece9d10 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // GetRequest struct to get information about account diff --git a/pkg/cloudapi/audit/list.go b/pkg/cloudapi/audit/list.go index fcdba83..ade0609 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // ListRequest struct to give list of account audits diff --git a/pkg/cloudapi/bservice.go b/pkg/cloudapi/bservice.go index e14c09d..5d340fb 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/v14/pkg/cloudapi/bservice" +import "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 52d3af1..951299a 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/v14/interfaces" +import "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 e8a92c3..9688c32 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // CreateRequest struct for BasicService diff --git a/pkg/cloudapi/bservice/delete.go b/pkg/cloudapi/bservice/delete.go index e0ee4ad..8473604 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // DeleteRequest struct to delete basic service diff --git a/pkg/cloudapi/bservice/disable.go b/pkg/cloudapi/bservice/disable.go index aabc095..d000e4d 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // DisableRequest struct for disable service diff --git a/pkg/cloudapi/bservice/enable.go b/pkg/cloudapi/bservice/enable.go index 62a9af4..2e685bd 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // EnableRequest struct to disable service diff --git a/pkg/cloudapi/bservice/get.go b/pkg/cloudapi/bservice/get.go index e1fa46e..83d55ab 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 27b4e2a..e5b8713 100644 --- a/pkg/cloudapi/bservice/group_add.go +++ b/pkg/cloudapi/bservice/group_add.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // GroupAddRequest struct to create new compute group within BasicService diff --git a/pkg/cloudapi/bservice/group_compute_remove.go b/pkg/cloudapi/bservice/group_compute_remove.go index 28d3c8d..397a8f5 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 5f58042..f600e44 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 d67a151..7d82e4a 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 476d0c6..07bf656 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 160a4cf..1fa5444 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 148e932..636e605 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 b235c2b..d50d9e1 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 9ff223f..4f93467 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 d8ebd49..ca282a3 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 07df71a..c229f83 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 7b3ee41..c2a5c52 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // GroupUpdateVINSRequest struct to update VINS settings diff --git a/pkg/cloudapi/bservice/list.go b/pkg/cloudapi/bservice/list.go index 38b2e18..072bb2a 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 b56eadc..3e67bed 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 b762328..09a3b35 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 27e2bb7..defc294 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // RestoreRequest struct to restore BasicService instance diff --git a/pkg/cloudapi/bservice/serialize.go b/pkg/cloudapi/bservice/serialize.go index 762c573..5b0a8fc 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/v14/internal/serialization" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 e7d5255..c9a388e 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // SnapshotCreateRequest struct to create snapshot diff --git a/pkg/cloudapi/bservice/snapshot_delete.go b/pkg/cloudapi/bservice/snapshot_delete.go index 0aba1a3..5d24663 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // SnapshotDeleteRequest struct to delete snapshot diff --git a/pkg/cloudapi/bservice/snapshot_list.go b/pkg/cloudapi/bservice/snapshot_list.go index 70c46fe..0833729 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 d377899..152dbc7 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // SnapshotRollbackRequest struct to rollback snapshot diff --git a/pkg/cloudapi/bservice/start.go b/pkg/cloudapi/bservice/start.go index f73fe09..5f45816 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // StartRequest struct to start service diff --git a/pkg/cloudapi/bservice/stop.go b/pkg/cloudapi/bservice/stop.go index 1bbc993..1b9fca9 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // StopRequest struct to stop service diff --git a/pkg/cloudapi/cloudapi.go b/pkg/cloudapi/cloudapi.go index b6a3bd9..cb3b66e 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/v14/interfaces" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/interfaces" ) // Structure for creating request to CloudAPI groups diff --git a/pkg/cloudapi/compute.go b/pkg/cloudapi/compute.go index 7979501..ed2e079 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/v14/pkg/cloudapi/compute" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 1f6271c..972f448 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // AbortSharedSnapshotMergeRequest struct to abort shared snapshots merge @@ -18,6 +18,11 @@ type AbortSharedSnapshotMergeRequest struct { Label string `url:"label" json:"label" validate:"required"` } +type wrapperAbortSharedSnapshotMergeRequest struct { + AbortSharedSnapshotMergeRequest + AsyncMode bool `url:"asyncMode"` +} + // AbortSharedSnapshotMerge shared snapshots merge abort func (c Compute) AbortSharedSnapshotMerge(ctx context.Context, req AbortSharedSnapshotMergeRequest) (string, error) { err := validators.ValidateRequest(req) @@ -25,9 +30,36 @@ func (c Compute) AbortSharedSnapshotMerge(ctx context.Context, req AbortSharedSn return "", validators.ValidationErrors(validators.GetErrors(err)) } + reqWrapped := wrapperAbortSharedSnapshotMergeRequest{ + AbortSharedSnapshotMergeRequest: req, + AsyncMode: false, + } + url := "/cloudapi/compute/abort_shared_snapshot_merge" - res, err := c.client.DecortApiCall(ctx, http.MethodPost, url, req) + res, err := c.client.DecortApiCall(ctx, http.MethodPost, url, reqWrapped) + if err != nil { + return "", err + } + + return string(res), nil +} + +// AbortSharedSnapshotMergeAsync shared snapshots merge abort in async mode +func (c Compute) AbortSharedSnapshotMergeAsync(ctx context.Context, req AbortSharedSnapshotMergeRequest) (string, error) { + err := validators.ValidateRequest(req) + if err != nil { + return "", validators.ValidationErrors(validators.GetErrors(err)) + } + + reqWrapped := wrapperAbortSharedSnapshotMergeRequest{ + AbortSharedSnapshotMergeRequest: req, + AsyncMode: true, + } + + url := "/cloudapi/compute/abort_shared_snapshot_merge" + + res, err := c.client.DecortApiCall(ctx, http.MethodPost, url, reqWrapped) if err != nil { return "", err } diff --git a/pkg/cloudapi/compute/affinity_group_check_start.go b/pkg/cloudapi/compute/affinity_group_check_start.go index d82bcff..04b3a23 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 0ca7077..3fa7213 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 7cef615..1f4cfbe 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 c4a0a80..06f6297 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 d16763a..fc38139 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 4873248..1772e94 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 ad93d4b..f878028 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 0bf0435..fce86dc 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 ac97171..6c2e288 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 c976e59..d691ec2 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 58ab29e..c29c774 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 bde53b4..6211890 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // AttachPCIDeviceRequest struct to attach PCI device diff --git a/pkg/cloudapi/compute/audits.go b/pkg/cloudapi/compute/audits.go index b514141..3e6c789 100644 --- a/pkg/cloudapi/compute/audits.go +++ b/pkg/cloudapi/compute/audits.go @@ -5,7 +5,7 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // AuditsRequest struct to get audit records diff --git a/pkg/cloudapi/compute/boot_disk_set.go b/pkg/cloudapi/compute/boot_disk_set.go index 2d5c3d1..8b4d729 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 d4ca40d..6bfb9a7 100644 --- a/pkg/cloudapi/compute/boot_order_get.go +++ b/pkg/cloudapi/compute/boot_order_get.go @@ -4,7 +4,7 @@ import ( "context" "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 046ad1c..bae4bba 100644 --- a/pkg/cloudapi/compute/boot_order_set.go +++ b/pkg/cloudapi/compute/boot_order_set.go @@ -4,7 +4,7 @@ import ( "context" "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 9f41396..b3a24e4 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // CDEjectRequest struct to eject CD image @@ -15,6 +15,12 @@ type CDEjectRequest struct { ComputeID uint64 `url:"computeId" json:"computeId" validate:"required"` } +type wrapperCDEjectRequest struct { + CDEjectRequest + + AsyncMode bool `url:"asyncMode"` +} + // CDEject eject CD image to compute's CD-ROM func (c Compute) CDEject(ctx context.Context, req CDEjectRequest) (bool, error) { err := validators.ValidateRequest(req) @@ -22,9 +28,14 @@ func (c Compute) CDEject(ctx context.Context, req CDEjectRequest) (bool, error) return false, validators.ValidationErrors(validators.GetErrors(err)) } + reqWrapped := wrapperCDEjectRequest{ + CDEjectRequest: req, + AsyncMode: false, + } + url := "/cloudapi/compute/cdEject" - res, err := c.client.DecortApiCall(ctx, http.MethodPost, url, req) + res, err := c.client.DecortApiCall(ctx, http.MethodPost, url, reqWrapped) if err != nil { return false, err } @@ -33,5 +44,28 @@ func (c Compute) CDEject(ctx context.Context, req CDEjectRequest) (bool, error) if err != nil { return false, err } + return result, nil } + +// CDEjectAsync ejects CD image to compute's CD-ROM with AsyncMode +func (c Compute) CDEjectAsync(ctx context.Context, req CDEjectRequest) (string, error) { + err := validators.ValidateRequest(req) + if err != nil { + return "", validators.ValidationErrors(validators.GetErrors(err)) + } + + reqWrapped := wrapperCDEjectRequest{ + CDEjectRequest: req, + AsyncMode: true, + } + + url := "/cloudapi/compute/cdEject" + + res, err := c.client.DecortApiCall(ctx, http.MethodPost, url, reqWrapped) + if err != nil { + return "", err + } + + return string(res), nil +} diff --git a/pkg/cloudapi/compute/cd_insert.go b/pkg/cloudapi/compute/cd_insert.go index 7b953e0..54919ad 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // CDInsertRequest struct to insert new CD image @@ -19,6 +19,12 @@ type CDInsertRequest struct { CDROMID uint64 `url:"cdromId" json:"cdromId" validate:"required"` } +type wrapperCDInsertRequest struct { + CDInsertRequest + + AsyncMode bool `url:"asyncMode"` +} + // CDInsert insert new CD image to compute's CD-ROM func (c Compute) CDInsert(ctx context.Context, req CDInsertRequest) (bool, error) { err := validators.ValidateRequest(req) @@ -26,9 +32,14 @@ func (c Compute) CDInsert(ctx context.Context, req CDInsertRequest) (bool, error return false, validators.ValidationErrors(validators.GetErrors(err)) } + reqWrapped := wrapperCDInsertRequest{ + CDInsertRequest: req, + AsyncMode: false, + } + url := "/cloudapi/compute/cdInsert" - res, err := c.client.DecortApiCall(ctx, http.MethodPost, url, req) + res, err := c.client.DecortApiCall(ctx, http.MethodPost, url, reqWrapped) if err != nil { return false, err } @@ -37,5 +48,28 @@ func (c Compute) CDInsert(ctx context.Context, req CDInsertRequest) (bool, error if err != nil { return false, err } + return result, nil } + +// CDInsertAsync inserts new CD image to compute's CD-ROM with AsyncMode +func (c Compute) CDInsertAsync(ctx context.Context, req CDInsertRequest) (string, error) { + err := validators.ValidateRequest(req) + if err != nil { + return "", validators.ValidationErrors(validators.GetErrors(err)) + } + + reqWrapped := wrapperCDInsertRequest{ + CDInsertRequest: req, + AsyncMode: true, + } + + url := "/cloudapi/compute/cdInsert" + + res, err := c.client.DecortApiCall(ctx, http.MethodPost, url, reqWrapped) + if err != nil { + return "", err + } + + return string(res), nil +} diff --git a/pkg/cloudapi/compute/change_ip.go b/pkg/cloudapi/compute/change_ip.go index 1aa8282..732ce82 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // ChangeIPRequest struct to change IP for network @@ -31,6 +31,12 @@ type ChangeIPRequest struct { IPAddr string `url:"ip_addr" json:"ip_addr" validate:"required"` } +type wrapperChangeIPRequest struct { + ChangeIPRequest + + AsyncMode bool `url:"asyncMode"` +} + // ChangeIP change reserved IP for compute instance func (c Compute) ChangeIP(ctx context.Context, req ChangeIPRequest) (bool, error) { err := validators.ValidateRequest(req) @@ -38,9 +44,14 @@ func (c Compute) ChangeIP(ctx context.Context, req ChangeIPRequest) (bool, error return false, validators.ValidationErrors(validators.GetErrors(err)) } + reqWrapped := wrapperChangeIPRequest{ + ChangeIPRequest: req, + AsyncMode: false, + } + url := "/cloudapi/compute/changeIp" - res, err := c.client.DecortApiCall(ctx, http.MethodPost, url, req) + res, err := c.client.DecortApiCall(ctx, http.MethodPost, url, reqWrapped) if err != nil { return false, err } @@ -52,3 +63,25 @@ func (c Compute) ChangeIP(ctx context.Context, req ChangeIPRequest) (bool, error return result, nil } + +// ChangeIPAsync change reserved IP for compute instance with AsyncMode +func (c Compute) ChangeIPAsync(ctx context.Context, req ChangeIPRequest) (string, error) { + err := validators.ValidateRequest(req) + if err != nil { + return "", validators.ValidationErrors(validators.GetErrors(err)) + } + + reqWrapped := wrapperChangeIPRequest{ + ChangeIPRequest: req, + AsyncMode: true, + } + + url := "/cloudapi/compute/changeIp" + + res, err := c.client.DecortApiCall(ctx, http.MethodPost, url, reqWrapped) + if err != nil { + return "", err + } + + return string(res), nil +} diff --git a/pkg/cloudapi/compute/change_link_state.go b/pkg/cloudapi/compute/change_link_state.go index eb414f8..62ee51a 100644 --- a/pkg/cloudapi/compute/change_link_state.go +++ b/pkg/cloudapi/compute/change_link_state.go @@ -3,8 +3,9 @@ package compute import ( "context" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v14/internal/validators" "strconv" + + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // ChangeLinkStateRequest struct to change link state @@ -23,6 +24,12 @@ type ChangeLinkStateRequest struct { State string `url:"state" json:"state" validate:"required,interfaceState"` } +type wrapperChangeLinkStateRequest struct { + ChangeLinkStateRequest + + AsyncMode bool `url:"asyncMode"` +} + // ChangeLinkState changes the status link virtual of compute func (c Compute) ChangeLinkState(ctx context.Context, req ChangeLinkStateRequest) (bool, error) { err := validators.ValidateRequest(req) @@ -30,9 +37,14 @@ func (c Compute) ChangeLinkState(ctx context.Context, req ChangeLinkStateRequest return false, validators.ValidationErrors(validators.GetErrors(err)) } + reqWrapped := wrapperChangeLinkStateRequest{ + ChangeLinkStateRequest: req, + AsyncMode: false, + } + url := "/cloudapi/compute/changeLinkState" - res, err := c.client.DecortApiCall(ctx, http.MethodPost, url, req) + res, err := c.client.DecortApiCall(ctx, http.MethodPost, url, reqWrapped) if err != nil { return false, err } @@ -41,5 +53,28 @@ func (c Compute) ChangeLinkState(ctx context.Context, req ChangeLinkStateRequest if err != nil { return false, err } + return result, nil } + +// ChangeLinkStateAsync changes the status link virtual of compute with AsyncMode +func (c Compute) ChangeLinkStateAsync(ctx context.Context, req ChangeLinkStateRequest) (string, error) { + err := validators.ValidateRequest(req) + if err != nil { + return "", validators.ValidationErrors(validators.GetErrors(err)) + } + + reqWrapped := wrapperChangeLinkStateRequest{ + ChangeLinkStateRequest: req, + AsyncMode: true, + } + + url := "/cloudapi/compute/changeLinkState" + + res, err := c.client.DecortApiCall(ctx, http.MethodPost, url, reqWrapped) + if err != nil { + return "", err + } + + return string(res), nil +} diff --git a/pkg/cloudapi/compute/change_mac.go b/pkg/cloudapi/compute/change_mac.go index f687e53..021bd14 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 c64d07b..fffba84 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // ChangeMTURequest struct to change MTU for a compute @@ -23,6 +23,12 @@ type ChangeMTURequest struct { MTU uint64 `url:"mtu" json:"mtu" validate:"required" validate:"omitempty,mtu"` } +type wrapperChangeMTURequest struct { + ChangeMTURequest + + AsyncMode bool `url:"asyncMode"` +} + // ChangeMTU change MTU for compute instance func (c Compute) ChangeMTU(ctx context.Context, req ChangeMTURequest) (bool, error) { err := validators.ValidateRequest(req) @@ -30,9 +36,14 @@ func (c Compute) ChangeMTU(ctx context.Context, req ChangeMTURequest) (bool, err return false, validators.ValidationErrors(validators.GetErrors(err)) } + reqWrapped := wrapperChangeMTURequest{ + ChangeMTURequest: req, + AsyncMode: false, + } + url := "/cloudapi/compute/change_mtu" - res, err := c.client.DecortApiCall(ctx, http.MethodPost, url, req) + res, err := c.client.DecortApiCall(ctx, http.MethodPost, url, reqWrapped) if err != nil { return false, err } @@ -44,3 +55,25 @@ func (c Compute) ChangeMTU(ctx context.Context, req ChangeMTURequest) (bool, err return result, nil } + +// ChangeMTUAsync change MTU for compute instance with AsyncMode +func (c Compute) ChangeMTUAsync(ctx context.Context, req ChangeMTURequest) (string, error) { + err := validators.ValidateRequest(req) + if err != nil { + return "", validators.ValidationErrors(validators.GetErrors(err)) + } + + reqWrapped := wrapperChangeMTURequest{ + ChangeMTURequest: req, + AsyncMode: true, + } + + url := "/cloudapi/compute/change_mtu" + + res, err := c.client.DecortApiCall(ctx, http.MethodPost, url, reqWrapped) + if err != nil { + return "", err + } + + return string(res), nil +} diff --git a/pkg/cloudapi/compute/change_secutity_group.go b/pkg/cloudapi/compute/change_secutity_group.go index f96dcdc..f8b3db6 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // ChangeSecGroupsRequest struct to change security groups for compute @@ -27,6 +27,12 @@ type ChangeSecGroupsRequest struct { EnableSecGroups interface{} `url:"enable_secgroups,omitempty" json:"enable_secgroups,omitempty" validate:"omitempty,isBool"` } +type wrapperChangeSecGroupsRequest struct { + ChangeSecGroupsRequest + + AsyncMode bool `url:"asyncMode"` +} + // ChangeSecGroups changes security groups for compute func (c Compute) ChangeSecGroups(ctx context.Context, req ChangeSecGroupsRequest) (bool, error) { err := validators.ValidateRequest(req) @@ -34,9 +40,14 @@ func (c Compute) ChangeSecGroups(ctx context.Context, req ChangeSecGroupsRequest return false, validators.ValidationErrors(validators.GetErrors(err)) } + reqWrapped := wrapperChangeSecGroupsRequest{ + ChangeSecGroupsRequest: req, + AsyncMode: false, + } + url := "/cloudapi/compute/change_security_groups" - res, err := c.client.DecortApiCall(ctx, http.MethodPost, url, req) + res, err := c.client.DecortApiCall(ctx, http.MethodPost, url, reqWrapped) if err != nil { return false, err } @@ -48,3 +59,25 @@ func (c Compute) ChangeSecGroups(ctx context.Context, req ChangeSecGroupsRequest return result, nil } + +// ChangeSecGroupsAsync changes security groups for compute with AsyncMode +func (c Compute) ChangeSecGroupsAsync(ctx context.Context, req ChangeSecGroupsRequest) (string, error) { + err := validators.ValidateRequest(req) + if err != nil { + return "", validators.ValidationErrors(validators.GetErrors(err)) + } + + reqWrapped := wrapperChangeSecGroupsRequest{ + ChangeSecGroupsRequest: req, + AsyncMode: true, + } + + url := "/cloudapi/compute/change_security_groups" + + res, err := c.client.DecortApiCall(ctx, http.MethodPost, url, reqWrapped) + if err != nil { + return "", err + } + + return string(res), nil +} diff --git a/pkg/cloudapi/compute/clone.go b/pkg/cloudapi/compute/clone.go index f5ff6cc..ad8f8a2 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/v14/internal/constants" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/constants" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // CloneRequest struct to clone compute instance @@ -44,6 +44,12 @@ type CloneRequest struct { SEPID uint64 `url:"sep_id" json:"sep_id"` } +type wrapperCloneRequest struct { + CloneRequest + + AsyncMode bool `url:"asyncMode" json:"asyncMode"` +} + // Clone clones compute instance func (c Compute) Clone(ctx context.Context, req CloneRequest) (string, error) { err := validators.ValidateRequest(req) @@ -51,9 +57,36 @@ func (c Compute) Clone(ctx context.Context, req CloneRequest) (string, error) { return "", validators.ValidationErrors(validators.GetErrors(err)) } + reqWrapped := wrapperCloneRequest{ + CloneRequest: req, + AsyncMode: false, + } + url := "/cloudapi/compute/clone" - res, err := c.client.DecortApiCallCtype(ctx, http.MethodPost, url, constants.MIMEJSON, req) + res, err := c.client.DecortApiCallCtype(ctx, http.MethodPost, url, constants.MIMEJSON, reqWrapped) + if err != nil { + return "", err + } + + return string(res), nil +} + +// CloneAsync clones compute instance with AsyncMode +func (c Compute) CloneAsync(ctx context.Context, req CloneRequest) (string, error) { + err := validators.ValidateRequest(req) + if err != nil { + return "", validators.ValidationErrors(validators.GetErrors(err)) + } + + reqWrapped := wrapperCloneRequest{ + CloneRequest: req, + AsyncMode: true, + } + + url := "/cloudapi/compute/clone" + + res, err := c.client.DecortApiCallCtype(ctx, http.MethodPost, url, constants.MIMEJSON, reqWrapped) if err != nil { return "", err } diff --git a/pkg/cloudapi/compute/clone_abort.go b/pkg/cloudapi/compute/clone_abort.go index 1dfa6f3..a282c1d 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/v14/internal/constants" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/constants" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 0e5c05a..d93c394 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 bc6b483..ebc61db 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/v14/interfaces" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/interfaces" ) // Structure for creating request to compute diff --git a/pkg/cloudapi/compute/create_template.go b/pkg/cloudapi/compute/create_template.go index 3f2bb1e..ca484e6 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 aa25320..6630204 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 e84a21a..419a3e2 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // DeleteRequest struct to delete compute @@ -23,6 +23,12 @@ type DeleteRequest struct { DetachDisks bool `url:"detachDisks,omitempty" json:"detachDisks,omitempty"` } +type wrapperDeleteRequest struct { + DeleteRequest + + AsyncMode bool `url:"asyncMode"` +} + // Delete deletes compute func (c Compute) Delete(ctx context.Context, req DeleteRequest) (bool, error) { err := validators.ValidateRequest(req) @@ -30,9 +36,14 @@ func (c Compute) Delete(ctx context.Context, req DeleteRequest) (bool, error) { return false, validators.ValidationErrors(validators.GetErrors(err)) } + reqWrapped := wrapperDeleteRequest{ + DeleteRequest: req, + AsyncMode: false, + } + url := "/cloudapi/compute/delete" - res, err := c.client.DecortApiCall(ctx, http.MethodPost, url, req) + res, err := c.client.DecortApiCall(ctx, http.MethodPost, url, reqWrapped) if err != nil { return false, err } @@ -44,3 +55,25 @@ func (c Compute) Delete(ctx context.Context, req DeleteRequest) (bool, error) { return result, nil } + +// DeleteAsync deletes compute with AsyncMode +func (c Compute) DeleteAsync(ctx context.Context, req DeleteRequest) (string, error) { + err := validators.ValidateRequest(req) + if err != nil { + return "", validators.ValidationErrors(validators.GetErrors(err)) + } + + reqWrapped := wrapperDeleteRequest{ + DeleteRequest: req, + AsyncMode: true, + } + + url := "/cloudapi/compute/delete" + + res, err := c.client.DecortApiCall(ctx, http.MethodPost, url, reqWrapped) + if err != nil { + return "", err + } + + return string(res), nil +} diff --git a/pkg/cloudapi/compute/delete_cpu_alignment_profile.go b/pkg/cloudapi/compute/delete_cpu_alignment_profile.go new file mode 100644 index 0000000..152fe97 --- /dev/null +++ b/pkg/cloudapi/compute/delete_cpu_alignment_profile.go @@ -0,0 +1,39 @@ +package compute + +import ( + "context" + "net/http" + "strconv" + + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/constants" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" +) + +// DeleteCPUAlignmentProfileRequest struct to delete CPU alignment profile for computes +type DeleteCPUAlignmentProfileRequest struct { + // IDs of the compute instances + // Required: true + ComputeIDs []uint64 `url:"compute_ids" json:"compute_ids" validate:"min=1"` +} + +// DeleteCPUAlignmentProfile deletes CPU alignment profile for computes +func (c Compute) DeleteCPUAlignmentProfile(ctx context.Context, req DeleteCPUAlignmentProfileRequest) (bool, error) { + err := validators.ValidateRequest(req) + if err != nil { + return false, validators.ValidationErrors(validators.GetErrors(err)) + } + + url := "/cloudapi/compute/delete_cpu_alignment_profile" + + res, err := c.client.DecortApiCallCtype(ctx, http.MethodPost, 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/compute/delete_custom_fields.go b/pkg/cloudapi/compute/delete_custom_fields.go index 49e57d5..bdbeada 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 8871e29..623c31d 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 b786106..7be3ed9 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // DetachPCIDeviceRequest struct to detach PCI device diff --git a/pkg/cloudapi/compute/disable.go b/pkg/cloudapi/compute/disable.go index 96ad967..883d987 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // DisableRequest struct to disable compute @@ -15,6 +15,12 @@ type DisableRequest struct { ComputeID uint64 `url:"computeId" json:"computeId" validate:"required"` } +type wrapperDisableRequest struct { + DisableRequest + + AsyncMode bool `url:"asyncMode"` +} + // Disable disables compute func (c Compute) Disable(ctx context.Context, req DisableRequest) (bool, error) { err := validators.ValidateRequest(req) @@ -22,9 +28,14 @@ func (c Compute) Disable(ctx context.Context, req DisableRequest) (bool, error) return false, validators.ValidationErrors(validators.GetErrors(err)) } + reqWrapped := wrapperDisableRequest{ + DisableRequest: req, + AsyncMode: false, + } + url := "/cloudapi/compute/disable" - res, err := c.client.DecortApiCall(ctx, http.MethodPost, url, req) + res, err := c.client.DecortApiCall(ctx, http.MethodPost, url, reqWrapped) if err != nil { return false, err } @@ -36,3 +47,25 @@ func (c Compute) Disable(ctx context.Context, req DisableRequest) (bool, error) return result, nil } + +// DisableAsync disables compute with AsyncMode +func (c Compute) DisableAsync(ctx context.Context, req DisableRequest) (string, error) { + err := validators.ValidateRequest(req) + if err != nil { + return "", validators.ValidationErrors(validators.GetErrors(err)) + } + + reqWrapped := wrapperDisableRequest{ + DisableRequest: req, + AsyncMode: true, + } + + url := "/cloudapi/compute/disable" + + res, err := c.client.DecortApiCall(ctx, http.MethodPost, url, reqWrapped) + if err != nil { + return "", err + } + + return string(res), nil +} diff --git a/pkg/cloudapi/compute/disk_add.go b/pkg/cloudapi/compute/disk_add.go index b3b42e5..0fd12ee 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // DiskAddRequest struct to create and attach disk to compute @@ -51,6 +51,16 @@ type DiskAddRequest struct { // Desired bus number (hex string, e.g. "0x03") // Required: false BusNumber string `url:"bus_number,omitempty" json:"bus_number,omitempty"` + + // Mount disk in read-only mode + // Required: false + ReadOnly bool `url:"read_only,omitempty" json:"read_only,omitempty"` +} + +type wrapperDiskAddRequest struct { + DiskAddRequest + + AsyncMode bool `url:"asyncMode"` } // DiskAdd creates new disk and attach to compute @@ -60,9 +70,14 @@ func (c Compute) DiskAdd(ctx context.Context, req DiskAddRequest) (uint64, error return 0, validators.ValidationErrors(validators.GetErrors(err)) } + reqWrapped := wrapperDiskAddRequest{ + DiskAddRequest: req, + AsyncMode: false, + } + url := "/cloudapi/compute/diskAdd" - res, err := c.client.DecortApiCall(ctx, http.MethodPost, url, req) + res, err := c.client.DecortApiCall(ctx, http.MethodPost, url, reqWrapped) if err != nil { return 0, err } @@ -74,3 +89,25 @@ func (c Compute) DiskAdd(ctx context.Context, req DiskAddRequest) (uint64, error return result, nil } + +// DiskAddAsync creates new disk and attach to compute with AsyncMode +func (c Compute) DiskAddAsync(ctx context.Context, req DiskAddRequest) (string, error) { + err := validators.ValidateRequest(req) + if err != nil { + return "", validators.ValidationErrors(validators.GetErrors(err)) + } + + reqWrapped := wrapperDiskAddRequest{ + DiskAddRequest: req, + AsyncMode: true, + } + + url := "/cloudapi/compute/diskAdd" + + res, err := c.client.DecortApiCall(ctx, http.MethodPost, url, reqWrapped) + if err != nil { + return "", err + } + + return string(res), nil +} diff --git a/pkg/cloudapi/compute/disk_attach.go b/pkg/cloudapi/compute/disk_attach.go index d53c2e2..9e776d6 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // DiskAttachRequest struct to attach disk to compute @@ -25,6 +25,16 @@ type DiskAttachRequest struct { // Desired bus number (hex string, e.g. "0x03") // Required: false BusNumber string `url:"bus_number,omitempty" json:"bus_number,omitempty"` + + // Mount disk in read-only mode + // Required: false + ReadOnly bool `url:"read_only,omitempty" json:"read_only,omitempty"` +} + +type wrapperDiskAttachRequest struct { + DiskAttachRequest + + AsyncMode bool `url:"asyncMode"` } // DiskAttach attach disk to compute @@ -34,9 +44,14 @@ func (c Compute) DiskAttach(ctx context.Context, req DiskAttachRequest) (bool, e return false, validators.ValidationErrors(validators.GetErrors(err)) } + reqWrapped := wrapperDiskAttachRequest{ + DiskAttachRequest: req, + AsyncMode: false, + } + url := "/cloudapi/compute/diskAttach" - res, err := c.client.DecortApiCall(ctx, http.MethodPost, url, req) + res, err := c.client.DecortApiCall(ctx, http.MethodPost, url, reqWrapped) if err != nil { return false, err } @@ -48,3 +63,25 @@ func (c Compute) DiskAttach(ctx context.Context, req DiskAttachRequest) (bool, e return result, nil } + +// DiskAttachAsync attaches disk to compute with AsyncMode +func (c Compute) DiskAttachAsync(ctx context.Context, req DiskAttachRequest) (string, error) { + err := validators.ValidateRequest(req) + if err != nil { + return "", validators.ValidationErrors(validators.GetErrors(err)) + } + + reqWrapped := wrapperDiskAttachRequest{ + DiskAttachRequest: req, + AsyncMode: true, + } + + url := "/cloudapi/compute/diskAttach" + + res, err := c.client.DecortApiCall(ctx, http.MethodPost, url, reqWrapped) + if err != nil { + return "", err + } + + return string(res), nil +} diff --git a/pkg/cloudapi/compute/disk_del.go b/pkg/cloudapi/compute/disk_del.go index 2c21c06..ab8c648 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // DiskDelRequest struct to detach and delete disk from compute @@ -23,6 +23,12 @@ type DiskDelRequest struct { Permanently bool `url:"permanently" json:"permanently"` } +type wrapperDiskDelRequest struct { + DiskDelRequest + + AsyncMode bool `url:"asyncMode"` +} + // DiskDel delete disk and detach from compute func (c Compute) DiskDel(ctx context.Context, req DiskDelRequest) (bool, error) { err := validators.ValidateRequest(req) @@ -30,9 +36,14 @@ func (c Compute) DiskDel(ctx context.Context, req DiskDelRequest) (bool, error) return false, validators.ValidationErrors(validators.GetErrors(err)) } + reqWrapped := wrapperDiskDelRequest{ + DiskDelRequest: req, + AsyncMode: false, + } + url := "/cloudapi/compute/diskDel" - res, err := c.client.DecortApiCall(ctx, http.MethodPost, url, req) + res, err := c.client.DecortApiCall(ctx, http.MethodPost, url, reqWrapped) if err != nil { return false, err } @@ -44,3 +55,25 @@ func (c Compute) DiskDel(ctx context.Context, req DiskDelRequest) (bool, error) return result, nil } + +// DiskDelAsync deletes disk and detaches from compute with AsyncMode +func (c Compute) DiskDelAsync(ctx context.Context, req DiskDelRequest) (string, error) { + err := validators.ValidateRequest(req) + if err != nil { + return "", validators.ValidationErrors(validators.GetErrors(err)) + } + + reqWrapped := wrapperDiskDelRequest{ + DiskDelRequest: req, + AsyncMode: true, + } + + url := "/cloudapi/compute/diskDel" + + res, err := c.client.DecortApiCall(ctx, http.MethodPost, url, reqWrapped) + if err != nil { + return "", err + } + + return string(res), nil +} diff --git a/pkg/cloudapi/compute/disk_detach.go b/pkg/cloudapi/compute/disk_detach.go index 5b3bfc6..7e0692b 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // DiskDetachRequest struct to detach disk from compute @@ -19,6 +19,12 @@ type DiskDetachRequest struct { DiskID uint64 `url:"diskId" json:"diskId" validate:"required"` } +type wrapperDiskDetachRequest struct { + DiskDetachRequest + + AsyncMode bool `url:"asyncMode"` +} + // DiskDetach detach disk from compute func (c Compute) DiskDetach(ctx context.Context, req DiskDetachRequest) (bool, error) { err := validators.ValidateRequest(req) @@ -26,9 +32,14 @@ func (c Compute) DiskDetach(ctx context.Context, req DiskDetachRequest) (bool, e return false, validators.ValidationErrors(validators.GetErrors(err)) } + reqWrapped := wrapperDiskDetachRequest{ + DiskDetachRequest: req, + AsyncMode: false, + } + url := "/cloudapi/compute/diskDetach" - res, err := c.client.DecortApiCall(ctx, http.MethodPost, url, req) + res, err := c.client.DecortApiCall(ctx, http.MethodPost, url, reqWrapped) if err != nil { return false, err } @@ -40,3 +51,25 @@ func (c Compute) DiskDetach(ctx context.Context, req DiskDetachRequest) (bool, e return result, nil } + +// DiskDetachAsync detaches disk from compute with AsyncMode +func (c Compute) DiskDetachAsync(ctx context.Context, req DiskDetachRequest) (string, error) { + err := validators.ValidateRequest(req) + if err != nil { + return "", validators.ValidationErrors(validators.GetErrors(err)) + } + + reqWrapped := wrapperDiskDetachRequest{ + DiskDetachRequest: req, + AsyncMode: true, + } + + url := "/cloudapi/compute/diskDetach" + + res, err := c.client.DecortApiCall(ctx, http.MethodPost, url, reqWrapped) + if err != nil { + return "", err + } + + return string(res), nil +} diff --git a/pkg/cloudapi/compute/disk_migrate.go b/pkg/cloudapi/compute/disk_migrate.go index 84e3acb..ca9200b 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 b36c9ef..bff89ed 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // DiskQOSRequest struct to change QoS of the disk @@ -23,6 +23,12 @@ type DiskQOSRequest struct { Limits string `url:"limits" json:"limits" validate:"required"` } +type wrapperDiskQOSRequest struct { + DiskQOSRequest + + AsyncMode bool `url:"asyncMode"` +} + // DiskQOS change QoS of the disk func (c Compute) DiskQOS(ctx context.Context, req DiskQOSRequest) (bool, error) { err := validators.ValidateRequest(req) @@ -30,9 +36,14 @@ func (c Compute) DiskQOS(ctx context.Context, req DiskQOSRequest) (bool, error) return false, validators.ValidationErrors(validators.GetErrors(err)) } + reqWrapped := wrapperDiskQOSRequest{ + DiskQOSRequest: req, + AsyncMode: false, + } + url := "/cloudapi/compute/diskQos" - res, err := c.client.DecortApiCall(ctx, http.MethodPost, url, req) + res, err := c.client.DecortApiCall(ctx, http.MethodPost, url, reqWrapped) if err != nil { return false, err } @@ -44,3 +55,25 @@ func (c Compute) DiskQOS(ctx context.Context, req DiskQOSRequest) (bool, error) return result, nil } + +// DiskQOSAsync changes QoS of the disk with AsyncMode +func (c Compute) DiskQOSAsync(ctx context.Context, req DiskQOSRequest) (string, error) { + err := validators.ValidateRequest(req) + if err != nil { + return "", validators.ValidationErrors(validators.GetErrors(err)) + } + + reqWrapped := wrapperDiskQOSRequest{ + DiskQOSRequest: req, + AsyncMode: true, + } + + url := "/cloudapi/compute/diskQos" + + res, err := c.client.DecortApiCall(ctx, http.MethodPost, url, reqWrapped) + if err != nil { + return "", err + } + + return string(res), nil +} diff --git a/pkg/cloudapi/compute/disk_resize.go b/pkg/cloudapi/compute/disk_resize.go index 455f0ef..b0b4bb6 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // DiskResizeRequest struct to change disk size @@ -23,6 +23,12 @@ type DiskResizeRequest struct { Size uint64 `url:"size" json:"size" validate:"required"` } +type wrapperDiskResizeRequest struct { + DiskResizeRequest + + AsyncMode bool `url:"asyncMode"` +} + // DiskResize change disk size func (c Compute) DiskResize(ctx context.Context, req DiskResizeRequest) (bool, error) { err := validators.ValidateRequest(req) @@ -30,9 +36,14 @@ func (c Compute) DiskResize(ctx context.Context, req DiskResizeRequest) (bool, e return false, validators.ValidationErrors(validators.GetErrors(err)) } + reqWrapped := wrapperDiskResizeRequest{ + DiskResizeRequest: req, + AsyncMode: false, + } + url := "/cloudapi/compute/diskResize" - res, err := c.client.DecortApiCall(ctx, http.MethodPost, url, req) + res, err := c.client.DecortApiCall(ctx, http.MethodPost, url, reqWrapped) if err != nil { return false, err } @@ -44,3 +55,25 @@ func (c Compute) DiskResize(ctx context.Context, req DiskResizeRequest) (bool, e return result, nil } + +// DiskResizeAsync changes disk size with AsyncMode +func (c Compute) DiskResizeAsync(ctx context.Context, req DiskResizeRequest) (string, error) { + err := validators.ValidateRequest(req) + if err != nil { + return "", validators.ValidationErrors(validators.GetErrors(err)) + } + + reqWrapped := wrapperDiskResizeRequest{ + DiskResizeRequest: req, + AsyncMode: true, + } + + url := "/cloudapi/compute/diskResize" + + res, err := c.client.DecortApiCall(ctx, http.MethodPost, url, reqWrapped) + if err != nil { + return "", err + } + + return string(res), nil +} diff --git a/pkg/cloudapi/compute/disk_switch_to_replication.go b/pkg/cloudapi/compute/disk_switch_to_replication.go index a8c7ad1..92d4ae3 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // DiskSwitchToReplicationRequest struct to switch disk to it's replication @@ -23,6 +23,12 @@ type DiskSwitchToReplicationRequest struct { StopReplication bool `url:"stopReplication" json:"stopReplication"` } +type wrapperDiskSwitchToReplicationRequest struct { + DiskSwitchToReplicationRequest + + AsyncMode bool `url:"asyncMode"` +} + // DiskSwitchToReplication switches disk to it's replication func (c Compute) DiskSwitchToReplication(ctx context.Context, req DiskSwitchToReplicationRequest) (bool, error) { err := validators.ValidateRequest(req) @@ -30,9 +36,14 @@ func (c Compute) DiskSwitchToReplication(ctx context.Context, req DiskSwitchToRe return false, validators.ValidationErrors(validators.GetErrors(err)) } + reqWrapped := wrapperDiskSwitchToReplicationRequest{ + DiskSwitchToReplicationRequest: req, + AsyncMode: false, + } + url := "/cloudapi/compute/diskSwitchToReplication" - res, err := c.client.DecortApiCall(ctx, http.MethodPost, url, req) + res, err := c.client.DecortApiCall(ctx, http.MethodPost, url, reqWrapped) if err != nil { return false, err } @@ -44,3 +55,25 @@ func (c Compute) DiskSwitchToReplication(ctx context.Context, req DiskSwitchToRe return result, nil } + +// DiskSwitchToReplicationAsync switches disk to it's replication with AsyncMode +func (c Compute) DiskSwitchToReplicationAsync(ctx context.Context, req DiskSwitchToReplicationRequest) (string, error) { + err := validators.ValidateRequest(req) + if err != nil { + return "", validators.ValidationErrors(validators.GetErrors(err)) + } + + reqWrapped := wrapperDiskSwitchToReplicationRequest{ + DiskSwitchToReplicationRequest: req, + AsyncMode: true, + } + + url := "/cloudapi/compute/diskSwitchToReplication" + + res, err := c.client.DecortApiCall(ctx, http.MethodPost, url, reqWrapped) + if err != nil { + return "", err + } + + return string(res), nil +} diff --git a/pkg/cloudapi/compute/enable.go b/pkg/cloudapi/compute/enable.go index f34cfb5..6e685a9 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // EnableRequest struct to enable compute diff --git a/pkg/cloudapi/compute/filter.go b/pkg/cloudapi/compute/filter.go index 5abaf05..316cae1 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/v14/interfaces" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v14/pkg/cloudapi/k8s" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v14/pkg/cloudapi/lb" + "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" ) // FilterByID returns ListComputes with specified ID. diff --git a/pkg/cloudapi/compute/get.go b/pkg/cloudapi/compute/get.go index 932fa2e..cae9c03 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 index b015bfc..55c5341 100644 --- a/pkg/cloudapi/compute/get_audits.go +++ b/pkg/cloudapi/compute/get_audits.go @@ -5,7 +5,7 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // GetAuditsRequest struct to get compute audits diff --git a/pkg/cloudapi/compute/get_console_url.go b/pkg/cloudapi/compute/get_console_url.go index ae42d53..6ccf18a 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 new file mode 100644 index 0000000..6f9ee3b --- /dev/null +++ b/pkg/cloudapi/compute/get_cpu_alignment_profile.go @@ -0,0 +1,46 @@ +package compute + +import ( + "context" + "encoding/json" + "net/http" + + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" +) + +// GetCPUAlignmentProfileRequest struct to get CPU alignment profile for compute +type GetCPUAlignmentProfileRequest struct { + // ID of the compute instance + // Required: true + ComputeID uint64 `url:"compute_id" json:"compute_id" validate:"required"` +} + +// GetCPUAlignmentProfile gets CPU alignment profile for compute +func (c Compute) GetCPUAlignmentProfile(ctx context.Context, req GetCPUAlignmentProfileRequest) (*CPUAlignmentProfile, error) { + res, err := c.GetCPUAlignmentProfileRaw(ctx, req) + if err != nil { + return nil, err + } + + info := CPUAlignmentProfile{} + + err = json.Unmarshal(res, &info) + if err != nil { + return nil, err + } + + return &info, nil +} + +// GetCPUAlignmentProfileRaw gets CPU alignment profile for compute as an array of bytes +func (c Compute) GetCPUAlignmentProfileRaw(ctx context.Context, req GetCPUAlignmentProfileRequest) ([]byte, error) { + err := validators.ValidateRequest(req) + if err != nil { + return nil, validators.ValidationErrors(validators.GetErrors(err)) + } + + url := "/cloudapi/compute/get_cpu_alignment_profile" + + res, err := c.client.DecortApiCall(ctx, http.MethodGet, url, req) + return res, err +} diff --git a/pkg/cloudapi/compute/get_custom_fields.go b/pkg/cloudapi/compute/get_custom_fields.go index 4cea803..38c4b96 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 3f3b850..c025477 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 735b285..121e090 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // GuestAgentDisableRequest struct to disable guest agent @@ -15,6 +15,12 @@ type GuestAgentDisableRequest struct { ComputeID uint64 `url:"compute_id" json:"compute_id" validate:"required"` } +type wrapperGuestAgentDisableRequest struct { + GuestAgentDisableRequest + + AsyncMode bool `url:"asyncMode"` +} + // Disable guest agent at a specific compute func (c Compute) GuestAgentDisable(ctx context.Context, req GuestAgentDisableRequest) (bool, error) { err := validators.ValidateRequest(req) @@ -22,9 +28,14 @@ func (c Compute) GuestAgentDisable(ctx context.Context, req GuestAgentDisableReq return false, validators.ValidationErrors(validators.GetErrors(err)) } + reqWrapped := wrapperGuestAgentDisableRequest{ + GuestAgentDisableRequest: req, + AsyncMode: false, + } + url := "/cloudapi/compute/guest_agent_disable" - res, err := c.client.DecortApiCall(ctx, http.MethodPost, url, req) + res, err := c.client.DecortApiCall(ctx, http.MethodPost, url, reqWrapped) if err != nil { return false, err } @@ -36,3 +47,25 @@ func (c Compute) GuestAgentDisable(ctx context.Context, req GuestAgentDisableReq return result, nil } + +// GuestAgentDisableAsync disables guest agent at a specific compute with AsyncMode +func (c Compute) GuestAgentDisableAsync(ctx context.Context, req GuestAgentDisableRequest) (string, error) { + err := validators.ValidateRequest(req) + if err != nil { + return "", validators.ValidationErrors(validators.GetErrors(err)) + } + + reqWrapped := wrapperGuestAgentDisableRequest{ + GuestAgentDisableRequest: req, + AsyncMode: true, + } + + url := "/cloudapi/compute/guest_agent_disable" + + res, err := c.client.DecortApiCall(ctx, http.MethodPost, url, reqWrapped) + if err != nil { + return "", err + } + + return string(res), nil +} diff --git a/pkg/cloudapi/compute/guest_agent_enable.go b/pkg/cloudapi/compute/guest_agent_enable.go index 617aa96..df91d1e 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // GuestAgentEnableRequest struct to enable guest agent @@ -15,6 +15,12 @@ type GuestAgentEnableRequest struct { ComputeID uint64 `url:"compute_id" json:"compute_id" validate:"required"` } +type wrapperGuestAgentEnableRequest struct { + GuestAgentEnableRequest + + AsyncMode bool `url:"asyncMode"` +} + // Enable guest agent at a specific compute func (c Compute) GuestAgentEnable(ctx context.Context, req GuestAgentEnableRequest) (bool, error) { err := validators.ValidateRequest(req) @@ -22,9 +28,14 @@ func (c Compute) GuestAgentEnable(ctx context.Context, req GuestAgentEnableReque return false, validators.ValidationErrors(validators.GetErrors(err)) } + reqWrapped := wrapperGuestAgentEnableRequest{ + GuestAgentEnableRequest: req, + AsyncMode: false, + } + url := "/cloudapi/compute/guest_agent_enable" - res, err := c.client.DecortApiCall(ctx, http.MethodPost, url, req) + res, err := c.client.DecortApiCall(ctx, http.MethodPost, url, reqWrapped) if err != nil { return false, err } @@ -36,3 +47,25 @@ func (c Compute) GuestAgentEnable(ctx context.Context, req GuestAgentEnableReque return result, nil } + +// GuestAgentEnableAsync enables guest agent at a specific compute with AsyncMode +func (c Compute) GuestAgentEnableAsync(ctx context.Context, req GuestAgentEnableRequest) (string, error) { + err := validators.ValidateRequest(req) + if err != nil { + return "", validators.ValidationErrors(validators.GetErrors(err)) + } + + reqWrapped := wrapperGuestAgentEnableRequest{ + GuestAgentEnableRequest: req, + AsyncMode: true, + } + + url := "/cloudapi/compute/guest_agent_enable" + + res, err := c.client.DecortApiCall(ctx, http.MethodPost, url, reqWrapped) + if err != nil { + return "", err + } + + return string(res), nil +} diff --git a/pkg/cloudapi/compute/guest_agent_execute.go b/pkg/cloudapi/compute/guest_agent_execute.go index 8cbcd56..7d4168a 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // GuestAgentExecuteRequest struct to execute command from user to agent @@ -23,6 +23,12 @@ type GuestAgentExecuteRequest struct { Arguments string `url:"arguments" json:"arguments" validate:"required"` } +type wrapperGuestAgentExecuteRequest struct { + GuestAgentExecuteRequest + + AsyncMode bool `url:"asyncMode"` +} + // Execute guest agent command func (c Compute) GuestAgentExecuteRequest(ctx context.Context, req GuestAgentExecuteRequest) (map[string]interface{}, error) { err := validators.ValidateRequest(req) @@ -30,9 +36,14 @@ func (c Compute) GuestAgentExecuteRequest(ctx context.Context, req GuestAgentExe return nil, validators.ValidationErrors(validators.GetErrors(err)) } + reqWrapped := wrapperGuestAgentExecuteRequest{ + GuestAgentExecuteRequest: req, + AsyncMode: false, + } + url := "/cloudapi/compute/guest_agent_execute" - res, err := c.client.DecortApiCall(ctx, http.MethodPost, url, req) + res, err := c.client.DecortApiCall(ctx, http.MethodPost, url, reqWrapped) if err != nil { return nil, err } @@ -46,3 +57,25 @@ func (c Compute) GuestAgentExecuteRequest(ctx context.Context, req GuestAgentExe return result, nil } + +// GuestAgentExecuteRequestAsync executes guest agent command with AsyncMode +func (c Compute) GuestAgentExecuteRequestAsync(ctx context.Context, req GuestAgentExecuteRequest) (string, error) { + err := validators.ValidateRequest(req) + if err != nil { + return "", validators.ValidationErrors(validators.GetErrors(err)) + } + + reqWrapped := wrapperGuestAgentExecuteRequest{ + GuestAgentExecuteRequest: req, + AsyncMode: true, + } + + url := "/cloudapi/compute/guest_agent_execute" + + res, err := c.client.DecortApiCall(ctx, http.MethodPost, url, reqWrapped) + if err != nil { + return "", err + } + + return string(res), nil +} diff --git a/pkg/cloudapi/compute/guest_agent_feature_get.go b/pkg/cloudapi/compute/guest_agent_feature_get.go index 861da45..093f232 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 d80733c..2a96e1b 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // GuestAgentFeatureUpdateRequest struct to feature update guest agent @@ -15,6 +15,12 @@ type GuestAgentFeatureUpdateRequest struct { ComputeID uint64 `url:"compute_id" json:"compute_id" validate:"required"` } +type wrapperGuestAgentFeatureUpdateRequest struct { + GuestAgentFeatureUpdateRequest + + AsyncMode bool `url:"asyncMode"` +} + // Feature update guest agent func (c Compute) GuestAgentFeatureUpdate(ctx context.Context, req GuestAgentFeatureUpdateRequest) (bool, error) { err := validators.ValidateRequest(req) @@ -22,9 +28,14 @@ func (c Compute) GuestAgentFeatureUpdate(ctx context.Context, req GuestAgentFeat return false, validators.ValidationErrors(validators.GetErrors(err)) } + reqWrapped := wrapperGuestAgentFeatureUpdateRequest{ + GuestAgentFeatureUpdateRequest: req, + AsyncMode: false, + } + url := "/cloudapi/compute/guest_agent_feature_update" - res, err := c.client.DecortApiCall(ctx, http.MethodPost, url, req) + res, err := c.client.DecortApiCall(ctx, http.MethodPost, url, reqWrapped) if err != nil { return false, err } @@ -36,3 +47,25 @@ func (c Compute) GuestAgentFeatureUpdate(ctx context.Context, req GuestAgentFeat return result, nil } + +// GuestAgentFeatureUpdateAsync feature updates guest agent with AsyncMode +func (c Compute) GuestAgentFeatureUpdateAsync(ctx context.Context, req GuestAgentFeatureUpdateRequest) (string, error) { + err := validators.ValidateRequest(req) + if err != nil { + return "", validators.ValidationErrors(validators.GetErrors(err)) + } + + reqWrapped := wrapperGuestAgentFeatureUpdateRequest{ + GuestAgentFeatureUpdateRequest: req, + AsyncMode: true, + } + + url := "/cloudapi/compute/guest_agent_feature_update" + + res, err := c.client.DecortApiCall(ctx, http.MethodPost, url, reqWrapped) + if err != nil { + return "", err + } + + return string(res), nil +} diff --git a/pkg/cloudapi/compute/list.go b/pkg/cloudapi/compute/list.go index ead22c7..eb96901 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 70c1f15..04c225d 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 253f16f..ffa65d9 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // ListPCIDeviceRequest struct to get list of PCI devices diff --git a/pkg/cloudapi/compute/list_vgpu.go b/pkg/cloudapi/compute/list_vgpu.go index ffdd5c8..7fac32f 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 350111a..d951825 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // MigrateToRGZone struct to move compute to another zone @@ -19,6 +19,12 @@ type MigrateToZoneRequest struct { ZoneID uint64 `url:"zoneId" json:"zoneId " validate:"required"` } +type wrapperMigrateToZoneRequest struct { + MigrateToZoneRequest + + AsyncMode bool `url:"asyncMode"` +} + // MoveToRG moves compute instance to new resource group func (c Compute) MigrateToZone(ctx context.Context, req MigrateToZoneRequest) (bool, error) { err := validators.ValidateRequest(req) @@ -26,9 +32,14 @@ func (c Compute) MigrateToZone(ctx context.Context, req MigrateToZoneRequest) (b return false, validators.ValidationErrors(validators.GetErrors(err)) } + reqWrapped := wrapperMigrateToZoneRequest{ + MigrateToZoneRequest: req, + AsyncMode: false, + } + url := "/cloudapi/compute/migrateToZone" - res, err := c.client.DecortApiCall(ctx, http.MethodPost, url, req) + res, err := c.client.DecortApiCall(ctx, http.MethodPost, url, reqWrapped) if err != nil { return false, err } @@ -40,3 +51,25 @@ func (c Compute) MigrateToZone(ctx context.Context, req MigrateToZoneRequest) (b return result, nil } + +// MigrateToZoneAsync moves compute to another zone with AsyncMode +func (c Compute) MigrateToZoneAsync(ctx context.Context, req MigrateToZoneRequest) (string, error) { + err := validators.ValidateRequest(req) + if err != nil { + return "", validators.ValidationErrors(validators.GetErrors(err)) + } + + reqWrapped := wrapperMigrateToZoneRequest{ + MigrateToZoneRequest: req, + AsyncMode: true, + } + + url := "/cloudapi/compute/migrateToZone" + + res, err := c.client.DecortApiCall(ctx, http.MethodPost, url, reqWrapped) + if err != nil { + return "", err + } + + return string(res), nil +} diff --git a/pkg/cloudapi/compute/models.go b/pkg/cloudapi/compute/models.go index 143434d..4bd21b9 100644 --- a/pkg/cloudapi/compute/models.go +++ b/pkg/cloudapi/compute/models.go @@ -83,6 +83,9 @@ type ListUsageSnapshots []ItemUsageSnapshot // Main information about snapshot type ItemSnapshot struct { + // Compute info + Compute RecordCompute `json:"compute"` + // List disk ID Disks []uint64 `json:"disks"` @@ -92,6 +95,9 @@ type ItemSnapshot struct { // Label Label string `json:"label"` + // Memory dump image ID + MemoryDumpImage uint64 `json:"memory_dump_image"` + // Timestamp Timestamp uint64 `json:"timestamp"` } @@ -356,6 +362,9 @@ type RecordCompute struct { // List clone IDs Clones []uint64 `json:"clones"` + // Clock + Clock string `json:"clock"` + // Compute CI ID ComputeCIID uint64 `json:"computeciId"` @@ -482,6 +491,9 @@ type RecordCompute struct { // PreferredCPU PreferredCPU []int64 `json:"preferredCpu"` + // CPU alignment profile + CPUAlignmentProfile CPUAlignmentProfile `json:"cpu_alignment_profile"` + // Qemu_quest QemuQuest QemuQuest `json:"qemu_guest"` @@ -552,6 +564,7 @@ type RecordCompute struct { // Required: false ZoneID uint64 `json:"zoneId"` } + type LoaderMetaIso struct { // Name DeviceName string `json:"devicename"` @@ -568,6 +581,12 @@ type QemuQuest struct { User string `json:"user"` } +type CPUAlignmentProfile struct { + Model string `json:"model"` + Name string `json:"name"` + Vendor string `json:"vendor"` +} + type VGPUItem struct { // ID ID uint64 `json:"id"` @@ -792,8 +811,8 @@ type ItemComputeDisk struct { // Account ID AccountID uint64 `json:"accountId"` - // BLK Discard - BLKDiscard bool `json:"blkdiscard"` + // Discard + Discard string `json:"discard"` // Block Size BlockSize string `json:"block_size"` @@ -938,6 +957,9 @@ type ItemComputeDisk struct { // UpdatedTime UpdatedTime uint64 `json:"updatedTime"` + + // Read-only + ReadOnly bool `json:"read_only"` } type ItemReplication struct { @@ -1079,6 +1101,9 @@ type ItemCompute struct { // Clone reference CloneReference uint64 `json:"cloneReference"` + // Clock + Clock string `json:"clock"` + // List clone IDs Clones []uint64 `json:"clones"` @@ -1184,6 +1209,9 @@ type ItemCompute struct { // Name of OS OSVersion string `json:"os_version"` + // CPU alignment profile + CPUAlignmentProfile CPUAlignmentProfile `json:"cpu_alignment_profile"` + // Qemu_quest QemuQuest QemuQuest `json:"qemu_guest"` @@ -1261,6 +1289,9 @@ type InfoDisk struct { // SEP ID SepID int64 `json:"sepId"` + + // Read-only + ReadOnly bool `json:"read_only"` } // List information about computes diff --git a/pkg/cloudapi/compute/move_to_rg.go b/pkg/cloudapi/compute/move_to_rg.go index 278f1c9..e9f320a 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // MoveToRGRequest struct to move compute to new resource group @@ -34,6 +34,12 @@ type MoveToRGRequest struct { ForceStop bool `url:"forceStop,omitempty" json:"forceStop,omitempty"` } +type wrapperMoveToRGRequest struct { + MoveToRGRequest + + AsyncMode bool `url:"asyncMode"` +} + // MoveToRG moves compute instance to new resource group func (c Compute) MoveToRG(ctx context.Context, req MoveToRGRequest) (bool, error) { err := validators.ValidateRequest(req) @@ -41,9 +47,14 @@ func (c Compute) MoveToRG(ctx context.Context, req MoveToRGRequest) (bool, error return false, validators.ValidationErrors(validators.GetErrors(err)) } + reqWrapped := wrapperMoveToRGRequest{ + MoveToRGRequest: req, + AsyncMode: false, + } + url := "/cloudapi/compute/moveToRg" - res, err := c.client.DecortApiCall(ctx, http.MethodPost, url, req) + res, err := c.client.DecortApiCall(ctx, http.MethodPost, url, reqWrapped) if err != nil { return false, err } @@ -55,3 +66,25 @@ func (c Compute) MoveToRG(ctx context.Context, req MoveToRGRequest) (bool, error return result, nil } + +// MoveToRGAsync moves compute instance to new resource group with AsyncMode +func (c Compute) MoveToRGAsync(ctx context.Context, req MoveToRGRequest) (string, error) { + err := validators.ValidateRequest(req) + if err != nil { + return "", validators.ValidationErrors(validators.GetErrors(err)) + } + + reqWrapped := wrapperMoveToRGRequest{ + MoveToRGRequest: req, + AsyncMode: true, + } + + url := "/cloudapi/compute/moveToRg" + + res, err := c.client.DecortApiCall(ctx, http.MethodPost, url, reqWrapped) + if err != nil { + return "", err + } + + return string(res), nil +} diff --git a/pkg/cloudapi/compute/net_attach.go b/pkg/cloudapi/compute/net_attach.go index 9d7f5fa..8b3d680 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // NetAttachRequest struct to attach network @@ -53,9 +53,9 @@ type NetAttachRequest struct { // Required: false SDNSegmentID string `url:"sdn_segment_id,omitempty" json:"sdn_segment_id,omitempty"` - // SDN Object Group ID + // SDN Object Group IDs // Required: false - SDNObjectGroupID string `url:"sdn_object_group_id,omitempty" json:"sdn_object_group_id,omitempty"` + SDNObjectGroupIDs []string `url:"sdn_object_group_ids,omitempty" json:"sdn_object_group_ids,omitempty"` // SDN Logical Port Display Name // Required: false @@ -83,6 +83,12 @@ type NetAttachRequest struct { Enabled interface{} `url:"enabled,omitempty" json:"enabled,omitempty" validate:"omitempty,isBool"` } +type wrapperNetAttachRequest struct { + NetAttachRequest + + AsyncMode bool `url:"asyncMode"` +} + // NetAttach attaches network to compute and gets info about network func (c Compute) NetAttach(ctx context.Context, req NetAttachRequest) (*RecordNetAttach, error) { err := validators.ValidateRequest(req) @@ -90,9 +96,14 @@ func (c Compute) NetAttach(ctx context.Context, req NetAttachRequest) (*RecordNe return nil, validators.ValidationErrors(validators.GetErrors(err)) } + reqWrapped := wrapperNetAttachRequest{ + NetAttachRequest: req, + AsyncMode: false, + } + url := "/cloudapi/compute/netAttach" - res, err := c.client.DecortApiCall(ctx, http.MethodPost, url, req) + res, err := c.client.DecortApiCall(ctx, http.MethodPost, url, reqWrapped) if err != nil { return nil, err } @@ -106,3 +117,25 @@ func (c Compute) NetAttach(ctx context.Context, req NetAttachRequest) (*RecordNe return &info, nil } + +// NetAttachAsync attaches network to compute with AsyncMode +func (c Compute) NetAttachAsync(ctx context.Context, req NetAttachRequest) (string, error) { + err := validators.ValidateRequest(req) + if err != nil { + return "", validators.ValidationErrors(validators.GetErrors(err)) + } + + reqWrapped := wrapperNetAttachRequest{ + NetAttachRequest: req, + AsyncMode: true, + } + + url := "/cloudapi/compute/netAttach" + + res, err := c.client.DecortApiCall(ctx, http.MethodPost, url, reqWrapped) + if err != nil { + return "", err + } + + return string(res), nil +} diff --git a/pkg/cloudapi/compute/net_detach.go b/pkg/cloudapi/compute/net_detach.go index 7171a8e..1401eb4 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // NetDetachRequest struct to detach network from compute @@ -23,6 +23,12 @@ type NetDetachRequest struct { MAC string `url:"mac,omitempty" json:"mac,omitempty"` } +type wrapperNetDetachRequest struct { + NetDetachRequest + + AsyncMode bool `url:"asyncMode"` +} + // NetDetach detaches network from compute func (c Compute) NetDetach(ctx context.Context, req NetDetachRequest) (bool, error) { err := validators.ValidateRequest(req) @@ -30,9 +36,14 @@ func (c Compute) NetDetach(ctx context.Context, req NetDetachRequest) (bool, err return false, validators.ValidationErrors(validators.GetErrors(err)) } + reqWrapped := wrapperNetDetachRequest{ + NetDetachRequest: req, + AsyncMode: false, + } + url := "/cloudapi/compute/netDetach" - res, err := c.client.DecortApiCall(ctx, http.MethodPost, url, req) + res, err := c.client.DecortApiCall(ctx, http.MethodPost, url, reqWrapped) if err != nil { return false, err } @@ -44,3 +55,25 @@ func (c Compute) NetDetach(ctx context.Context, req NetDetachRequest) (bool, err return result, nil } + +// NetDetachAsync detaches network from compute with AsyncMode +func (c Compute) NetDetachAsync(ctx context.Context, req NetDetachRequest) (string, error) { + err := validators.ValidateRequest(req) + if err != nil { + return "", validators.ValidationErrors(validators.GetErrors(err)) + } + + reqWrapped := wrapperNetDetachRequest{ + NetDetachRequest: req, + AsyncMode: true, + } + + url := "/cloudapi/compute/netDetach" + + res, err := c.client.DecortApiCall(ctx, http.MethodPost, url, reqWrapped) + if err != nil { + return "", err + } + + return string(res), nil +} diff --git a/pkg/cloudapi/compute/pause.go b/pkg/cloudapi/compute/pause.go index 6db4ed1..5d8b2e4 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // PauseRequest struct to pause compute @@ -15,6 +15,12 @@ type PauseRequest struct { ComputeID uint64 `url:"computeId" json:"computeId" validate:"required"` } +type wrapperPauseRequest struct { + PauseRequest + + AsyncMode bool `url:"asyncMode"` +} + // Pause pause compute func (c Compute) Pause(ctx context.Context, req PauseRequest) (bool, error) { err := validators.ValidateRequest(req) @@ -22,9 +28,14 @@ func (c Compute) Pause(ctx context.Context, req PauseRequest) (bool, error) { return false, validators.ValidationErrors(validators.GetErrors(err)) } + reqWrapped := wrapperPauseRequest{ + PauseRequest: req, + AsyncMode: false, + } + url := "/cloudapi/compute/pause" - res, err := c.client.DecortApiCall(ctx, http.MethodPost, url, req) + res, err := c.client.DecortApiCall(ctx, http.MethodPost, url, reqWrapped) if err != nil { return false, err } @@ -36,3 +47,25 @@ func (c Compute) Pause(ctx context.Context, req PauseRequest) (bool, error) { return result, nil } + +// PauseAsync pauses compute with AsyncMode +func (c Compute) PauseAsync(ctx context.Context, req PauseRequest) (string, error) { + err := validators.ValidateRequest(req) + if err != nil { + return "", validators.ValidationErrors(validators.GetErrors(err)) + } + + reqWrapped := wrapperPauseRequest{ + PauseRequest: req, + AsyncMode: true, + } + + url := "/cloudapi/compute/pause" + + res, err := c.client.DecortApiCall(ctx, http.MethodPost, url, reqWrapped) + if err != nil { + return "", err + } + + return string(res), nil +} diff --git a/pkg/cloudapi/compute/pfw_add.go b/pkg/cloudapi/compute/pfw_add.go index e8c92c0..ceb0b1b 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // PFWAddRequest struct to add port forward rule @@ -33,6 +33,12 @@ type PFWAddRequest struct { Proto string `url:"proto" json:"proto" validate:"proto"` } +type wrapperPFWAddRequest struct { + PFWAddRequest + + AsyncMode bool `url:"asyncMode"` +} + // PFWAdd add port forward rule func (c Compute) PFWAdd(ctx context.Context, req PFWAddRequest) (uint64, error) { err := validators.ValidateRequest(req) @@ -40,9 +46,14 @@ func (c Compute) PFWAdd(ctx context.Context, req PFWAddRequest) (uint64, error) return 0, validators.ValidationErrors(validators.GetErrors(err)) } + reqWrapped := wrapperPFWAddRequest{ + PFWAddRequest: req, + AsyncMode: false, + } + url := "/cloudapi/compute/pfwAdd" - res, err := c.client.DecortApiCall(ctx, http.MethodPost, url, req) + res, err := c.client.DecortApiCall(ctx, http.MethodPost, url, reqWrapped) if err != nil { return 0, err } @@ -54,3 +65,25 @@ func (c Compute) PFWAdd(ctx context.Context, req PFWAddRequest) (uint64, error) return result, nil } + +// PFWAddAsync adds port forward rule with AsyncMode +func (c Compute) PFWAddAsync(ctx context.Context, req PFWAddRequest) (string, error) { + err := validators.ValidateRequest(req) + if err != nil { + return "", validators.ValidationErrors(validators.GetErrors(err)) + } + + reqWrapped := wrapperPFWAddRequest{ + PFWAddRequest: req, + AsyncMode: true, + } + + url := "/cloudapi/compute/pfwAdd" + + res, err := c.client.DecortApiCall(ctx, http.MethodPost, url, reqWrapped) + if err != nil { + return "", err + } + + return string(res), nil +} diff --git a/pkg/cloudapi/compute/pfw_del.go b/pkg/cloudapi/compute/pfw_del.go index 9bf64eb..f4b6909 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // PFWDelRequest struct to delete port forward rule @@ -36,6 +36,12 @@ type PFWDelRequest struct { Proto string `url:"proto,omitempty" json:"proto,omitempty"` } +type wrapperPFWDelRequest struct { + PFWDelRequest + + AsyncMode bool `url:"asyncMode"` +} + // PFWDel deletes port forward rule func (c Compute) PFWDel(ctx context.Context, req PFWDelRequest) (bool, error) { err := validators.ValidateRequest(req) @@ -43,9 +49,14 @@ func (c Compute) PFWDel(ctx context.Context, req PFWDelRequest) (bool, error) { return false, validators.ValidationErrors(validators.GetErrors(err)) } + reqWrapped := wrapperPFWDelRequest{ + PFWDelRequest: req, + AsyncMode: false, + } + url := "/cloudapi/compute/pfwDel" - res, err := c.client.DecortApiCall(ctx, http.MethodPost, url, req) + res, err := c.client.DecortApiCall(ctx, http.MethodPost, url, reqWrapped) if err != nil { return false, err } @@ -57,3 +68,25 @@ func (c Compute) PFWDel(ctx context.Context, req PFWDelRequest) (bool, error) { return result, nil } + +// PFWDelAsync deletes port forward rule with AsyncMode +func (c Compute) PFWDelAsync(ctx context.Context, req PFWDelRequest) (string, error) { + err := validators.ValidateRequest(req) + if err != nil { + return "", validators.ValidationErrors(validators.GetErrors(err)) + } + + reqWrapped := wrapperPFWDelRequest{ + PFWDelRequest: req, + AsyncMode: true, + } + + url := "/cloudapi/compute/pfwDel" + + res, err := c.client.DecortApiCall(ctx, http.MethodPost, url, reqWrapped) + if err != nil { + return "", err + } + + return string(res), nil +} diff --git a/pkg/cloudapi/compute/pfw_list.go b/pkg/cloudapi/compute/pfw_list.go index 8574bbf..256e980 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 fd3afdb..faf4864 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // PinToNodeRequest struct to pin compute to node @@ -20,6 +20,12 @@ type PinToNodeRequest struct { AutoStart bool `url:"autoStart" json:"autoStart"` } +type wrapperPinToNodeRequest struct { + PinToNodeRequest + + AsyncMode bool `url:"asyncMode"` +} + // PinToNode pin compute to current node func (c Compute) PinToNode(ctx context.Context, req PinToNodeRequest) (bool, error) { err := validators.ValidateRequest(req) @@ -27,9 +33,14 @@ func (c Compute) PinToNode(ctx context.Context, req PinToNodeRequest) (bool, err return false, validators.ValidationErrors(validators.GetErrors(err)) } + reqWrapped := wrapperPinToNodeRequest{ + PinToNodeRequest: req, + AsyncMode: false, + } + url := "/cloudapi/compute/pin_to_node" - res, err := c.client.DecortApiCall(ctx, http.MethodPost, url, req) + res, err := c.client.DecortApiCall(ctx, http.MethodPost, url, reqWrapped) if err != nil { return false, err } @@ -41,3 +52,25 @@ func (c Compute) PinToNode(ctx context.Context, req PinToNodeRequest) (bool, err return result, nil } + +// PinToNodeAsync pins compute to current node with AsyncMode +func (c Compute) PinToNodeAsync(ctx context.Context, req PinToNodeRequest) (string, error) { + err := validators.ValidateRequest(req) + if err != nil { + return "", validators.ValidationErrors(validators.GetErrors(err)) + } + + reqWrapped := wrapperPinToNodeRequest{ + PinToNodeRequest: req, + AsyncMode: true, + } + + url := "/cloudapi/compute/pin_to_node" + + res, err := c.client.DecortApiCall(ctx, http.MethodPost, url, reqWrapped) + if err != nil { + return "", err + } + + return string(res), nil +} diff --git a/pkg/cloudapi/compute/power_cycle.go b/pkg/cloudapi/compute/power_cycle.go index 5ba8f77..da1cd71 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // PowerCycleRequest struct to force stop and start compute @@ -15,6 +15,12 @@ type PowerCycleRequest struct { ComputeID uint64 `url:"computeId" json:"computeId" validate:"required"` } +type wrapperPowerCycleRequest struct { + PowerCycleRequest + + AsyncMode bool `url:"asyncMode"` +} + // PowerCycle makes force stop and start compute func (c Compute) PowerCycle(ctx context.Context, req PowerCycleRequest) (bool, error) { err := validators.ValidateRequest(req) @@ -22,9 +28,14 @@ func (c Compute) PowerCycle(ctx context.Context, req PowerCycleRequest) (bool, e return false, validators.ValidationErrors(validators.GetErrors(err)) } + reqWrapped := wrapperPowerCycleRequest{ + PowerCycleRequest: req, + AsyncMode: false, + } + url := "/cloudapi/compute/powerCycle" - res, err := c.client.DecortApiCall(ctx, http.MethodPost, url, req) + res, err := c.client.DecortApiCall(ctx, http.MethodPost, url, reqWrapped) if err != nil { return false, err } @@ -36,3 +47,25 @@ func (c Compute) PowerCycle(ctx context.Context, req PowerCycleRequest) (bool, e return result, nil } + +// PowerCycleAsync makes force stop and start compute with AsyncMode +func (c Compute) PowerCycleAsync(ctx context.Context, req PowerCycleRequest) (string, error) { + err := validators.ValidateRequest(req) + if err != nil { + return "", validators.ValidationErrors(validators.GetErrors(err)) + } + + reqWrapped := wrapperPowerCycleRequest{ + PowerCycleRequest: req, + AsyncMode: true, + } + + url := "/cloudapi/compute/powerCycle" + + res, err := c.client.DecortApiCall(ctx, http.MethodPost, url, reqWrapped) + if err != nil { + return "", err + } + + return string(res), nil +} diff --git a/pkg/cloudapi/compute/reboot.go b/pkg/cloudapi/compute/reboot.go index 7c348f1..e69c390 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // RebootRequest struct to reboot compute @@ -15,6 +15,12 @@ type RebootRequest struct { ComputeID uint64 `url:"computeId" json:"computeId" validate:"required"` } +type wrapperRebootRequest struct { + RebootRequest + + AsyncMode bool `url:"asyncMode"` +} + // Reboot reboots compute func (c Compute) Reboot(ctx context.Context, req RebootRequest) (bool, error) { err := validators.ValidateRequest(req) @@ -22,9 +28,14 @@ func (c Compute) Reboot(ctx context.Context, req RebootRequest) (bool, error) { return false, validators.ValidationErrors(validators.GetErrors(err)) } + reqWrapped := wrapperRebootRequest{ + RebootRequest: req, + AsyncMode: false, + } + url := "/cloudapi/compute/reboot" - res, err := c.client.DecortApiCall(ctx, http.MethodPost, url, req) + res, err := c.client.DecortApiCall(ctx, http.MethodPost, url, reqWrapped) if err != nil { return false, err } @@ -36,3 +47,25 @@ func (c Compute) Reboot(ctx context.Context, req RebootRequest) (bool, error) { return result, nil } + +// RebootAsync reboots compute with AsyncMode +func (c Compute) RebootAsync(ctx context.Context, req RebootRequest) (string, error) { + err := validators.ValidateRequest(req) + if err != nil { + return "", validators.ValidationErrors(validators.GetErrors(err)) + } + + reqWrapped := wrapperRebootRequest{ + RebootRequest: req, + AsyncMode: true, + } + + url := "/cloudapi/compute/reboot" + + res, err := c.client.DecortApiCall(ctx, http.MethodPost, url, reqWrapped) + if err != nil { + return "", err + } + + return string(res), nil +} diff --git a/pkg/cloudapi/compute/redeploy.go b/pkg/cloudapi/compute/redeploy.go index 1d6d036..45783f2 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // RedeployRequest struct to redeploy @@ -44,6 +44,12 @@ type RedeployRequest struct { ForceStop bool `url:"forceStop,omitempty" json:"forceStop,omitempty"` } +type wrapperRedeployRequest struct { + RedeployRequest + + AsyncMode bool `url:"asyncMode"` +} + // Redeploy redeploys compute func (c Compute) Redeploy(ctx context.Context, req RedeployRequest) (bool, error) { err := validators.ValidateRequest(req) @@ -51,9 +57,14 @@ func (c Compute) Redeploy(ctx context.Context, req RedeployRequest) (bool, error return false, validators.ValidationErrors(validators.GetErrors(err)) } + reqWrapped := wrapperRedeployRequest{ + RedeployRequest: req, + AsyncMode: false, + } + url := "/cloudapi/compute/redeploy" - res, err := c.client.DecortApiCall(ctx, http.MethodPost, url, req) + res, err := c.client.DecortApiCall(ctx, http.MethodPost, url, reqWrapped) if err != nil { return false, err } @@ -65,3 +76,25 @@ func (c Compute) Redeploy(ctx context.Context, req RedeployRequest) (bool, error return result, nil } + +// RedeployAsync redeploys compute with AsyncMode +func (c Compute) RedeployAsync(ctx context.Context, req RedeployRequest) (string, error) { + err := validators.ValidateRequest(req) + if err != nil { + return "", validators.ValidationErrors(validators.GetErrors(err)) + } + + reqWrapped := wrapperRedeployRequest{ + RedeployRequest: req, + AsyncMode: true, + } + + url := "/cloudapi/compute/redeploy" + + res, err := c.client.DecortApiCall(ctx, http.MethodPost, url, reqWrapped) + if err != nil { + return "", err + } + + return string(res), nil +} diff --git a/pkg/cloudapi/compute/reset.go b/pkg/cloudapi/compute/reset.go index 259f8c3..059abe2 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // ResetRequest struct to reset compute @@ -15,6 +15,12 @@ type ResetRequest struct { ComputeID uint64 `url:"computeId" json:"computeId" validate:"required"` } +type wrapperResetRequest struct { + ResetRequest + + AsyncMode bool `url:"asyncMode"` +} + // Reset resets compute func (c Compute) Reset(ctx context.Context, req ResetRequest) (bool, error) { err := validators.ValidateRequest(req) @@ -22,9 +28,14 @@ func (c Compute) Reset(ctx context.Context, req ResetRequest) (bool, error) { return false, validators.ValidationErrors(validators.GetErrors(err)) } + reqWrapped := wrapperResetRequest{ + ResetRequest: req, + AsyncMode: false, + } + url := "/cloudapi/compute/reset" - res, err := c.client.DecortApiCall(ctx, http.MethodPost, url, req) + res, err := c.client.DecortApiCall(ctx, http.MethodPost, url, reqWrapped) if err != nil { return false, err } @@ -36,3 +47,25 @@ func (c Compute) Reset(ctx context.Context, req ResetRequest) (bool, error) { return result, nil } + +// ResetAsync resets compute with AsyncMode +func (c Compute) ResetAsync(ctx context.Context, req ResetRequest) (string, error) { + err := validators.ValidateRequest(req) + if err != nil { + return "", validators.ValidationErrors(validators.GetErrors(err)) + } + + reqWrapped := wrapperResetRequest{ + ResetRequest: req, + AsyncMode: true, + } + + url := "/cloudapi/compute/reset" + + res, err := c.client.DecortApiCall(ctx, http.MethodPost, url, reqWrapped) + if err != nil { + return "", err + } + + return string(res), nil +} diff --git a/pkg/cloudapi/compute/resize.go b/pkg/cloudapi/compute/resize.go index bf41ee2..3cf375e 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // ResizeRequest struct to resize compute @@ -43,6 +43,12 @@ func (r ResizeRequest) GetRAM() map[string]uint64 { return res } +type wrapperResizeRequest struct { + ResizeRequest + + AsyncMode bool `url:"asyncMode"` +} + // Resize resizes compute instance func (c Compute) Resize(ctx context.Context, req ResizeRequest) (bool, error) { err := validators.ValidateRequest(req) @@ -50,9 +56,14 @@ func (c Compute) Resize(ctx context.Context, req ResizeRequest) (bool, error) { return false, validators.ValidationErrors(validators.GetErrors(err)) } + reqWrapped := wrapperResizeRequest{ + ResizeRequest: req, + AsyncMode: false, + } + url := "/cloudapi/compute/resize" - res, err := c.client.DecortApiCall(ctx, http.MethodPost, url, req) + res, err := c.client.DecortApiCall(ctx, http.MethodPost, url, reqWrapped) if err != nil { return false, err } @@ -64,3 +75,25 @@ func (c Compute) Resize(ctx context.Context, req ResizeRequest) (bool, error) { return result, nil } + +// ResizeAsync resizes compute instance with AsyncMode +func (c Compute) ResizeAsync(ctx context.Context, req ResizeRequest) (string, error) { + err := validators.ValidateRequest(req) + if err != nil { + return "", validators.ValidationErrors(validators.GetErrors(err)) + } + + reqWrapped := wrapperResizeRequest{ + ResizeRequest: req, + AsyncMode: true, + } + + url := "/cloudapi/compute/resize" + + res, err := c.client.DecortApiCall(ctx, http.MethodPost, url, reqWrapped) + if err != nil { + return "", err + } + + return string(res), nil +} diff --git a/pkg/cloudapi/compute/restore.go b/pkg/cloudapi/compute/restore.go index e7eccb9..c32cdc1 100644 --- a/pkg/cloudapi/compute/restore.go +++ b/pkg/cloudapi/compute/restore.go @@ -3,8 +3,9 @@ package compute import ( "context" "net/http" + "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // RestoreRequest struct to restore compute @@ -14,16 +15,54 @@ type RestoreRequest struct { ComputeID uint64 `url:"computeId" json:"computeId" validate:"required"` } +type wrapperRestoreRequest struct { + RestoreRequest + + AsyncMode bool `url:"asyncMode"` +} + // Restore restores compute from recycle bin -func (c Compute) Restore(ctx context.Context, req RestoreRequest) (string, error) { +func (c Compute) Restore(ctx context.Context, req RestoreRequest) (bool, error) { + err := validators.ValidateRequest(req) + if err != nil { + return false, validators.ValidationErrors(validators.GetErrors(err)) + } + + reqWrapped := wrapperRestoreRequest{ + RestoreRequest: req, + AsyncMode: false, + } + + url := "/cloudapi/compute/restore" + + res, err := c.client.DecortApiCall(ctx, http.MethodPost, url, reqWrapped) + if err != nil { + return false, err + } + + result, err := strconv.ParseBool(string(res)) + if err != nil { + return false, err + } + + return result, nil +} + +// RestoreAsync restores compute from recycle bin with AsyncMode +func (c Compute) RestoreAsync(ctx context.Context, req RestoreRequest) (string, error) { err := validators.ValidateRequest(req) if err != nil { return "", validators.ValidationErrors(validators.GetErrors(err)) } + reqWrapped := wrapperRestoreRequest{ + RestoreRequest: req, + AsyncMode: true, + } + url := "/cloudapi/compute/restore" - res, err := c.client.DecortApiCall(ctx, http.MethodPost, url, req) + res, err := c.client.DecortApiCall(ctx, http.MethodPost, url, reqWrapped) if err != nil { return "", err } diff --git a/pkg/cloudapi/compute/resume.go b/pkg/cloudapi/compute/resume.go index 2d8d817..1d604e1 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // ResumeRequest struct to resume compute @@ -15,6 +15,12 @@ type ResumeRequest struct { ComputeID uint64 `url:"computeId" json:"computeId" validate:"required"` } +type wrapperResumeRequest struct { + ResumeRequest + + AsyncMode bool `url:"asyncMode"` +} + // Resume resume Compute from paused state func (c Compute) Resume(ctx context.Context, req ResumeRequest) (bool, error) { err := validators.ValidateRequest(req) @@ -22,9 +28,14 @@ func (c Compute) Resume(ctx context.Context, req ResumeRequest) (bool, error) { return false, validators.ValidationErrors(validators.GetErrors(err)) } + reqWrapped := wrapperResumeRequest{ + ResumeRequest: req, + AsyncMode: false, + } + url := "/cloudapi/compute/resume" - res, err := c.client.DecortApiCall(ctx, http.MethodPost, url, req) + res, err := c.client.DecortApiCall(ctx, http.MethodPost, url, reqWrapped) if err != nil { return false, err } @@ -36,3 +47,25 @@ func (c Compute) Resume(ctx context.Context, req ResumeRequest) (bool, error) { return result, nil } + +// ResumeAsync resumes Compute from paused state with AsyncMode +func (c Compute) ResumeAsync(ctx context.Context, req ResumeRequest) (string, error) { + err := validators.ValidateRequest(req) + if err != nil { + return "", validators.ValidationErrors(validators.GetErrors(err)) + } + + reqWrapped := wrapperResumeRequest{ + ResumeRequest: req, + AsyncMode: true, + } + + url := "/cloudapi/compute/resume" + + res, err := c.client.DecortApiCall(ctx, http.MethodPost, url, reqWrapped) + if err != nil { + return "", err + } + + return string(res), nil +} diff --git a/pkg/cloudapi/compute/serialize.go b/pkg/cloudapi/compute/serialize.go index 890fc2a..2dc1ff1 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/v14/internal/serialization" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 new file mode 100644 index 0000000..4d2e51c --- /dev/null +++ b/pkg/cloudapi/compute/set_cpu_alignment_profile.go @@ -0,0 +1,43 @@ +package compute + +import ( + "context" + "net/http" + "strconv" + + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/constants" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" +) + +// SetCPUAlignmentProfileRequest struct to set CPU alignment profile for computes +type SetCPUAlignmentProfileRequest struct { + // IDs of the compute instances + // Required: true + ComputeIDs []int64 `url:"compute_ids" json:"compute_ids" validate:"min=1"` + + // CPU alignment profile name + // Required: true + CPUAlignmentProfile string `url:"cpu_alignment_profile" json:"cpu_alignment_profile" validate:"required"` +} + +// SetCPUAlignmentProfile sets CPU alignment profile for computes +func (c Compute) SetCPUAlignmentProfile(ctx context.Context, req SetCPUAlignmentProfileRequest) (bool, error) { + err := validators.ValidateRequest(req) + if err != nil { + return false, validators.ValidationErrors(validators.GetErrors(err)) + } + + url := "/cloudapi/compute/set_cpu_alignment_profile" + + res, err := c.client.DecortApiCallCtype(ctx, http.MethodPost, 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/compute/set_custom_fields.go b/pkg/cloudapi/compute/set_custom_fields.go index d037331..cbfdb3e 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 e7ab9f7..df00521 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 fe60897..bf7ca5b 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // SnapshotCreateRequest struct to create snapshot @@ -20,18 +20,33 @@ type SnapshotCreateRequest struct { // Maximum length: 36 characters // Required: true Label string `url:"label" json:"label" validate:"required,max=36,excludesall=<>"` + + // Create snapshot with memory dump + // Required: false + // Default: false + WithMemory bool `url:"with_memory" json:"with_memory"` } -// SnapshotCreate create compute snapshot +type wrapperSnapshotCreateRequest struct { + SnapshotCreateRequest + AsyncMode bool `url:"asyncMode"` +} + +// SnapshotCreate creates compute snapshot func (c Compute) SnapshotCreate(ctx context.Context, req SnapshotCreateRequest) (string, error) { err := validators.ValidateRequest(req) if err != nil { return "", validators.ValidationErrors(validators.GetErrors(err)) } + reqWrapped := wrapperSnapshotCreateRequest{ + SnapshotCreateRequest: req, + AsyncMode: false, + } + url := "/cloudapi/compute/snapshotCreate" - res, err := c.client.DecortApiCall(ctx, http.MethodPost, url, req) + res, err := c.client.DecortApiCall(ctx, http.MethodPost, url, reqWrapped) if err != nil { return "", err } @@ -40,3 +55,25 @@ func (c Compute) SnapshotCreate(ctx context.Context, req SnapshotCreateRequest) return result, nil } + +// SnapshotCreateAsync creates compute snapshot in async mode +func (c Compute) SnapshotCreateAsync(ctx context.Context, req SnapshotCreateRequest) (string, error) { + err := validators.ValidateRequest(req) + if err != nil { + return "", validators.ValidationErrors(validators.GetErrors(err)) + } + + reqWrapped := wrapperSnapshotCreateRequest{ + SnapshotCreateRequest: req, + AsyncMode: true, + } + + url := "/cloudapi/compute/snapshotCreate" + + res, err := c.client.DecortApiCall(ctx, http.MethodPost, url, reqWrapped) + if err != nil { + return "", err + } + + return string(res), nil +} diff --git a/pkg/cloudapi/compute/snapshot_delete.go b/pkg/cloudapi/compute/snapshot_delete.go index e190612..d733081 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // SnapshotDeleteRequest struct to delete snapshot diff --git a/pkg/cloudapi/compute/snapshot_list.go b/pkg/cloudapi/compute/snapshot_list.go index c1c691f..efe9e40 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 9afb37d..63654be 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // SnapshotRollbackRequest struct for rollback @@ -17,6 +17,16 @@ type SnapshotRollbackRequest struct { // Text label of snapshot to rollback // Required: true Label string `url:"label" json:"label" validate:"required"` + + // Rollback with memory dump restore + // Required: false + // Default: true + WithMemory interface{} `url:"with_memory,omitempty" json:"with_memory,omitempty" validate:"omitempty,isBool"` +} + +type wrapperSnapshotRollbackRequest struct { + SnapshotRollbackRequest + AsyncMode bool `url:"asyncMode"` } // SnapshotRollback rollbacks specified compute snapshot @@ -26,9 +36,14 @@ func (c Compute) SnapshotRollback(ctx context.Context, req SnapshotRollbackReque return false, validators.ValidationErrors(validators.GetErrors(err)) } + reqWrapped := wrapperSnapshotRollbackRequest{ + SnapshotRollbackRequest: req, + AsyncMode: false, + } + url := "/cloudapi/compute/snapshotRollback" - res, err := c.client.DecortApiCall(ctx, http.MethodPost, url, req) + res, err := c.client.DecortApiCall(ctx, http.MethodPost, url, reqWrapped) if err != nil { return false, err } @@ -40,3 +55,25 @@ func (c Compute) SnapshotRollback(ctx context.Context, req SnapshotRollbackReque return result, nil } + +// SnapshotRollbackAsync rollbacks specified compute snapshot in async mode +func (c Compute) SnapshotRollbackAsync(ctx context.Context, req SnapshotRollbackRequest) (string, error) { + err := validators.ValidateRequest(req) + if err != nil { + return "", validators.ValidationErrors(validators.GetErrors(err)) + } + + reqWrapped := wrapperSnapshotRollbackRequest{ + SnapshotRollbackRequest: req, + AsyncMode: true, + } + + url := "/cloudapi/compute/snapshotRollback" + + res, err := c.client.DecortApiCall(ctx, http.MethodPost, url, reqWrapped) + if err != nil { + return "", err + } + + return string(res), nil +} diff --git a/pkg/cloudapi/compute/snapshot_usage.go b/pkg/cloudapi/compute/snapshot_usage.go index 12fd696..1ede991 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 bb6dfb6..19d74e4 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // StartRequest struct to start compute @@ -19,6 +19,12 @@ type StartRequest struct { AltBootID uint64 `url:"altBootId,omitempty" json:"altBootId,omitempty"` } +type wrapperStartRequest struct { + StartRequest + + AsyncMode bool `url:"asyncMode"` +} + // Start starts compute func (c Compute) Start(ctx context.Context, req StartRequest) (bool, error) { err := validators.ValidateRequest(req) @@ -26,9 +32,14 @@ func (c Compute) Start(ctx context.Context, req StartRequest) (bool, error) { return false, validators.ValidationErrors(validators.GetErrors(err)) } + reqWrapped := wrapperStartRequest{ + StartRequest: req, + AsyncMode: false, + } + url := "/cloudapi/compute/start" - res, err := c.client.DecortApiCall(ctx, http.MethodPost, url, req) + res, err := c.client.DecortApiCall(ctx, http.MethodPost, url, reqWrapped) if err != nil { return false, err } @@ -40,3 +51,25 @@ func (c Compute) Start(ctx context.Context, req StartRequest) (bool, error) { return result, nil } + +// StartAsync starts compute with AsyncMode +func (c Compute) StartAsync(ctx context.Context, req StartRequest) (string, error) { + err := validators.ValidateRequest(req) + if err != nil { + return "", validators.ValidationErrors(validators.GetErrors(err)) + } + + reqWrapped := wrapperStartRequest{ + StartRequest: req, + AsyncMode: true, + } + + url := "/cloudapi/compute/start" + + res, err := c.client.DecortApiCall(ctx, http.MethodPost, url, reqWrapped) + if err != nil { + return "", err + } + + return string(res), nil +} diff --git a/pkg/cloudapi/compute/stop.go b/pkg/cloudapi/compute/stop.go index 3fee9b1..f233c82 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // StopRequest struct to stop compute @@ -19,6 +19,12 @@ type StopRequest struct { Force bool `url:"force,omitempty" json:"force,omitempty"` } +type wrapperStopRequest struct { + StopRequest + + AsyncMode bool `url:"asyncMode"` +} + // Stop stops compute func (c Compute) Stop(ctx context.Context, req StopRequest) (bool, error) { err := validators.ValidateRequest(req) @@ -26,9 +32,14 @@ func (c Compute) Stop(ctx context.Context, req StopRequest) (bool, error) { return false, validators.ValidationErrors(validators.GetErrors(err)) } + reqWrapped := wrapperStopRequest{ + StopRequest: req, + AsyncMode: false, + } + url := "/cloudapi/compute/stop" - res, err := c.client.DecortApiCall(ctx, http.MethodPost, url, req) + res, err := c.client.DecortApiCall(ctx, http.MethodPost, url, reqWrapped) if err != nil { return false, err } @@ -40,3 +51,25 @@ func (c Compute) Stop(ctx context.Context, req StopRequest) (bool, error) { return result, nil } + +// StopAsync stops compute with AsyncMode +func (c Compute) StopAsync(ctx context.Context, req StopRequest) (string, error) { + err := validators.ValidateRequest(req) + if err != nil { + return "", validators.ValidationErrors(validators.GetErrors(err)) + } + + reqWrapped := wrapperStopRequest{ + StopRequest: req, + AsyncMode: true, + } + + url := "/cloudapi/compute/stop" + + res, err := c.client.DecortApiCall(ctx, http.MethodPost, url, reqWrapped) + if err != nil { + return "", err + } + + return string(res), nil +} diff --git a/pkg/cloudapi/compute/tag_add.go b/pkg/cloudapi/compute/tag_add.go index 7bcd278..b911211 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 a52aeaf..bfaeb36 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 b620f97..4af232d 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // UnpinFromNodeRequest struct for unpin from node diff --git a/pkg/cloudapi/compute/update.go b/pkg/cloudapi/compute/update.go index cd36e4e..71537a5 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // UpdateRequest struct to update compute @@ -69,6 +69,11 @@ type UpdateRequest struct { // The OS version that will be installed on the virtual machine // Required: false OSVersion string `url:"os_version,omitempty" json:"os_version,omitempty"` + + // Clock type for the VM + // Required: false + // Default: null + Clock string `url:"clock,omitempty" json:"clock,omitempty"` } // Update updates some properties of the compute diff --git a/pkg/cloudapi/compute/user_grant.go b/pkg/cloudapi/compute/user_grant.go index 5f156d3..a826fbc 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 4144e21..86f1ef3 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 e0269d9..a3588a8 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 d90e5fa..cc95bd7 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // UserUpdateRequest struct to update user access diff --git a/pkg/cloudapi/disks.go b/pkg/cloudapi/disks.go index f276163..c470dce 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/v14/pkg/cloudapi/disks" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 c2600db..648cc1a 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 a9e80e7..f249a38 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // CreateRequest struct to create disk diff --git a/pkg/cloudapi/disks/delete.go b/pkg/cloudapi/disks/delete.go index 0cd50d2..b3d345a 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // DeleteRequest to delete disk diff --git a/pkg/cloudapi/disks/delete_disks.go b/pkg/cloudapi/disks/delete_disks.go index 27130d0..4f18bf1 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // DisksDeleteRequest struct for multiple disks diff --git a/pkg/cloudapi/disks/disks.go b/pkg/cloudapi/disks/disks.go index 3c4e80c..93d7cfc 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/v14/interfaces" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/interfaces" ) // Structure for creating request to disks diff --git a/pkg/cloudapi/disks/filter.go b/pkg/cloudapi/disks/filter.go index 3e39b88..d69d858 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/v14/interfaces" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v14/pkg/cloudapi/k8s" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v14/pkg/cloudapi/lb" + "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" ) // 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 006e2a0..21b1528 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 9e6a3bb..7563b33 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // GetRequest struct to get information about disk diff --git a/pkg/cloudapi/disks/limitio.go b/pkg/cloudapi/disks/limitio.go index 4432a28..6c6a5d7 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // LimitIORequest struct for limit IO diff --git a/pkg/cloudapi/disks/list.go b/pkg/cloudapi/disks/list.go index c6a6442..9ccb9ef 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // ListRequest struct to get list of disks diff --git a/pkg/cloudapi/disks/list_deleted.go b/pkg/cloudapi/disks/list_deleted.go index 59753fe..67756ad 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 f078524..b145a55 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // ListUnattachedRequest struct to get list of unattached disk diff --git a/pkg/cloudapi/disks/models.go b/pkg/cloudapi/disks/models.go index 00fa370..cd2ab3e 100644 --- a/pkg/cloudapi/disks/models.go +++ b/pkg/cloudapi/disks/models.go @@ -11,8 +11,8 @@ type ItemDisk struct { // Account name AccountName string `json:"accountName"` - // BLK Discard - BLKDiscard bool `json:"blkdiscard"` + // Discard + Discard string `json:"discard"` // Block size of disk BlockSize string `json:"block_size"` @@ -20,6 +20,9 @@ type ItemDisk struct { // Computes Computes map[string]string `json:"computes"` + // Computes read only + ComputesReadOnly map[string]bool `json:"computes_read_only"` + //Created by CreatedBy string `json:"createdBy"` @@ -166,8 +169,8 @@ type ItemDiskUnattached struct { // Access Control List ACL map[string]interface{} `json:"acl"` - // BLK Discard - BLKDiscard bool `json:"blkdiscard"` + // Discard + Discard string `json:"discard"` // Block size of disk BlockSize string `json:"block_size"` @@ -399,8 +402,8 @@ type RecordDisk struct { // Account name AccountName string `json:"accountName"` - // BLK Discard - BLKDiscard bool `json:"blkdiscard"` + // Discard + Discard string `json:"discard"` // Block size of disk BlockSize string `json:"block_size"` @@ -408,6 +411,9 @@ type RecordDisk struct { // Computes Computes map[string]string `json:"computes"` + // Computes read only + ComputesReadOnly map[string]bool `json:"computes_read_only"` + // Created by CreatedBy string `json:"createdBy"` diff --git a/pkg/cloudapi/disks/rename.go b/pkg/cloudapi/disks/rename.go index 068eaaa..e651774 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // RenameRequest struct to rename disk diff --git a/pkg/cloudapi/disks/replicate.go b/pkg/cloudapi/disks/replicate.go index 645be1f..1b7c680 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 28fe89d..4da510c 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 f80d53e..41e92ee 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 715e004..cc34595 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 21c5bd8..b4e514a 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 46b1f7f..05f74bd 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 f6dcae3..79bea69 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 e1954af..fd01efa 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // ResizeRequest struct to resize disk diff --git a/pkg/cloudapi/disks/restore.go b/pkg/cloudapi/disks/restore.go index b758fc5..e5b1dc9 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 91e44b5..e03f578 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/v14/internal/serialization" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 4b3eb3a..de8dd1e 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 c488cc0..64d6c1e 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // SnapshotDeleteRequest struct to delete snapshot diff --git a/pkg/cloudapi/disks/snapshot_rollback.go b/pkg/cloudapi/disks/snapshot_rollback.go index 00dd808..38f8877 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // SnapshotRollbackRequest struct to rollback snapshot diff --git a/pkg/cloudapi/disks/unshare.go b/pkg/cloudapi/disks/unshare.go index 477dca4..6de363f 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // UnshareRequest struct to unshare data disk diff --git a/pkg/cloudapi/dpdknet.go b/pkg/cloudapi/dpdknet.go index d984406..b692a80 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/v14/pkg/cloudapi/dpdknet" +import "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 fefd604..84a4c3d 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/v14/interfaces" +import "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 d92f42e..9c99949 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 8ccc854..8435d75 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // ListRequest struct to get list of DPDK networks diff --git a/pkg/cloudapi/extnet.go b/pkg/cloudapi/extnet.go index 4964bbd..3b3ae5c 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/v14/pkg/cloudapi/extnet" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/pkg/cloudapi/extnet" ) // Accessing the ExtNet method group diff --git a/pkg/cloudapi/extnet/extnet.go b/pkg/cloudapi/extnet/extnet.go index 3eecf89..3f55702 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/v14/interfaces" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/interfaces" ) // Structure for creating request to extnet diff --git a/pkg/cloudapi/extnet/get.go b/pkg/cloudapi/extnet/get.go index 3595c53..4cf2759 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 a343228..466987b 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 0b1f6d6..9f57702 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 12fdc69..98b77ed 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // ListComputesRequest struct to get list computes diff --git a/pkg/cloudapi/extnet/models.go b/pkg/cloudapi/extnet/models.go index b7a7e9d..a525908 100644 --- a/pkg/cloudapi/extnet/models.go +++ b/pkg/cloudapi/extnet/models.go @@ -13,6 +13,9 @@ type ItemExtNet struct { // Status Status string `json:"status"` + + // Free IPs + FreeIPs uint64 `json:"freeIps"` } // Extend information about external network diff --git a/pkg/cloudapi/extnet/serialize.go b/pkg/cloudapi/extnet/serialize.go index 1e9826d..f15e175 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/v14/internal/serialization" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 a1b13fb..15bb040 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/v14/pkg/cloudapi/flipgroup" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 de84919..aaa8ab6 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 ade3577..492670c 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // ComputeRemoveRequest struct to remove compute instance diff --git a/pkg/cloudapi/flipgroup/create.go b/pkg/cloudapi/flipgroup/create.go index c019d60..fb21443 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // CreateRequest struct to create FLIPGroup diff --git a/pkg/cloudapi/flipgroup/delete.go b/pkg/cloudapi/flipgroup/delete.go index ffd81ba..fd11fee 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // DeleteRequest struct to delete FLIPGroup diff --git a/pkg/cloudapi/flipgroup/edit.go b/pkg/cloudapi/flipgroup/edit.go index 76330a7..2efea98 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // EditRequest struct to edit FLIPGroup diff --git a/pkg/cloudapi/flipgroup/flipgroup.go b/pkg/cloudapi/flipgroup/flipgroup.go index 54acd86..1cf2932 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/v14/interfaces" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/interfaces" ) // Structure for creating request to FLIPGroup diff --git a/pkg/cloudapi/flipgroup/get.go b/pkg/cloudapi/flipgroup/get.go index 3b123c2..16adc8d 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // GetRequest struct to get information about FLIPGroup diff --git a/pkg/cloudapi/flipgroup/list.go b/pkg/cloudapi/flipgroup/list.go index 431bbb3..6fcb031 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 925beb6..9f322bd 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/v14/internal/serialization" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 17922e0..2a91c4f 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/v14/pkg/cloudapi/image" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 4fe7f28..5bf1953 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) type ChangeStoragePolicyRequest struct { diff --git a/pkg/cloudapi/image/create.go b/pkg/cloudapi/image/create.go index 0267487..4a4a375 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // CreateRequest struct to create image diff --git a/pkg/cloudapi/image/create_virtual.go b/pkg/cloudapi/image/create_virtual.go index 886fc0b..fd49365 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // CreateVirtualRequest struct to create virtual image @@ -19,9 +19,8 @@ type CreateVirtualRequest struct { TargetID uint64 `url:"targetId" json:"targetId" validate:"required"` // AccountID to make the virtual image exclusive - // Required: false - // Default: 0 - AccountID uint64 `url:"accountId,omitempty" json:"accountId,omitempty"` + // Required: true + AccountID uint64 `url:"accountId" json:"accountId" validate:"required"` } // CreateVirtual creates virtual image diff --git a/pkg/cloudapi/image/delete.go b/pkg/cloudapi/image/delete.go index f735907..f15df58 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // DeleteRequest struct to delete image diff --git a/pkg/cloudapi/image/get.go b/pkg/cloudapi/image/get.go index 79a04a5..7d7bf64 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 a31213c..ab68fdf 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/v14/interfaces" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/interfaces" ) // Structure for creating request to image diff --git a/pkg/cloudapi/image/link.go b/pkg/cloudapi/image/link.go index c58aae5..31575dd 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 d76ee13..e154d70 100644 --- a/pkg/cloudapi/image/list.go +++ b/pkg/cloudapi/image/list.go @@ -5,7 +5,7 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // ListRequest struct to get list of available images @@ -28,7 +28,7 @@ type ListRequest struct { // Find by type // Required: false - TypeImage string `url:"typeImage,omitempty" json:"typeImage,omitempty"` + TypeImage []string `url:"typeImage,omitempty" json:"typeImage,omitempty"` // Find by image size // Required: false diff --git a/pkg/cloudapi/image/rename.go b/pkg/cloudapi/image/rename.go index ec8006b..f3efe2d 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // RenameRequest struct to rename image diff --git a/pkg/cloudapi/image/serialize.go b/pkg/cloudapi/image/serialize.go index 70cd14c..6c4bde6 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/v14/internal/serialization" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 2595568..2df3056 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/v14/pkg/cloudapi/k8ci" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/pkg/cloudapi/k8ci" ) // Accessing the K8CI method group diff --git a/pkg/cloudapi/k8ci/get.go b/pkg/cloudapi/k8ci/get.go index 35beb12..e0dd592 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // GetRequest struct to get information about K8CI diff --git a/pkg/cloudapi/k8ci/k8ci.go b/pkg/cloudapi/k8ci/k8ci.go index a118c1b..061f11b 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/v14/interfaces" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/interfaces" ) // Structure for creating request to K8CI diff --git a/pkg/cloudapi/k8ci/list.go b/pkg/cloudapi/k8ci/list.go index 25b1810..753b981 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 0b16e3d..9ae3351 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 7ae08c8..be1196a 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/v14/internal/serialization" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 a7c5cc0..8ee6618 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/v14/pkg/cloudapi/k8s" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/pkg/cloudapi/k8s" ) // Accessing the K8S method group diff --git a/pkg/cloudapi/k8s/create.go b/pkg/cloudapi/k8s/create.go index 8ad7319..d474a12 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // CreateRequest struct to create kubernetes cluster diff --git a/pkg/cloudapi/k8s/delete.go b/pkg/cloudapi/k8s/delete.go index ff7a219..a04b598 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 6ee907e..c75df1b 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 3586178..85f65b9 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 e54245f..a49ea05 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 20f4a25..b151a35 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 f179b45..6d6046b 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 cea2da8..ded9748 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 9ff8b38..071cf8c 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 f7a60fa..e449323 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 3043bd8..7e227cd 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 7a1a79e..387e18e 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 ada8b47..dd361bf 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/v14/interfaces" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/interfaces" ) // Structure for creating request to K8S diff --git a/pkg/cloudapi/k8s/list.go b/pkg/cloudapi/k8s/list.go index 1c3cd0f..5bb3ef6 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 bb020f2..b9d45b6 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 770af90..9eae30d 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 5da502a..69b2a94 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // RestoreRequest struct to restore kubernetes cluster diff --git a/pkg/cloudapi/k8s/serialize.go b/pkg/cloudapi/k8s/serialize.go index 3c0d87e..25e7b7f 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/v14/internal/serialization" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 fe7e862..d36648f 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // StartRequest struct to start kubernetes cluster diff --git a/pkg/cloudapi/k8s/stop.go b/pkg/cloudapi/k8s/stop.go index 62c967d..1c7b30f 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // StopRequest struct to stop kubernetes cluster diff --git a/pkg/cloudapi/k8s/update.go b/pkg/cloudapi/k8s/update.go index cfd0662..d096968 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 3c27566..8b1c084 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // UpdateWorkerNodesMetaDataRequest struct to add worker to a kubernetes cluster diff --git a/pkg/cloudapi/k8s/worker_add.go b/pkg/cloudapi/k8s/worker_add.go index 6dde7d4..5afa156 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 ee9e7a4..57b2c8a 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 c9545d1..96007bf 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 494e734..4814861 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 eeedcf7..20048f6 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 06249f7..631d532 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // WorkersGroupGetByNameRequest struct to get information about worker group diff --git a/pkg/cloudapi/kvmx86.go b/pkg/cloudapi/kvmx86.go index b719622..7f7dc0f 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/v14/pkg/cloudapi/kvmx86" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/pkg/cloudapi/kvmx86" ) // Accessing the KVMX86 method group diff --git a/pkg/cloudapi/kvmx86/create.go b/pkg/cloudapi/kvmx86/create.go index 74ca1bc..230e41a 100644 --- a/pkg/cloudapi/kvmx86/create.go +++ b/pkg/cloudapi/kvmx86/create.go @@ -6,7 +6,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) type Interface struct { @@ -48,9 +48,9 @@ type Interface struct { // Required: false SDNSegmentID string `url:"sdn_segment_id,omitempty" json:"sdn_segment_id,omitempty"` - // SDN Object Group ID + // SDN Object Group IDs // Required: false - SDNObjectGroupID string `url:"sdn_object_group_id,omitempty" json:"sdn_object_group_id,omitempty"` + SDNObjectGroupIDs []string `url:"sdn_object_group_ids,omitempty" json:"sdn_object_group_ids,omitempty"` // SDN Logical Port Display Name // Required: false @@ -218,6 +218,15 @@ type CreateRequest struct { // Zone ID // Required: false ZoneID uint64 `url:"zoneId,omitempty" json:"zoneId,omitempty"` + + // CPU alignment profile name + // Required: false + CPUAlignmentProfile string `url:"cpu_alignment_profile,omitempty" json:"cpu_alignment_profile,omitempty"` + + // Clock type for the VM + // Required: false + // Default: default + Clock string `url:"clock,omitempty" json:"clock,omitempty"` } // GetRAM returns RAM field values @@ -245,7 +254,7 @@ func (k KVMX86) Create(ctx context.Context, req CreateRequest) (uint64, error) { var interfaces []string - if req.Interfaces != nil && len(req.Interfaces) != 0 { + if len(req.Interfaces) != 0 { interfaces = make([]string, 0, len(req.Interfaces)) for i := range req.Interfaces { @@ -262,7 +271,7 @@ func (k KVMX86) Create(ctx context.Context, req CreateRequest) (uint64, error) { var dataDisks []string - if req.DataDisks != nil && len(req.DataDisks) != 0 { + if len(req.DataDisks) != 0 { dataDisks = make([]string, 0, len(req.DataDisks)) for i := range req.DataDisks { diff --git a/pkg/cloudapi/kvmx86/create_blank.go b/pkg/cloudapi/kvmx86/create_blank.go index c13caef..37073b7 100644 --- a/pkg/cloudapi/kvmx86/create_blank.go +++ b/pkg/cloudapi/kvmx86/create_blank.go @@ -6,7 +6,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // CreateBlankRequest struct to create KVM x86 VM from scratch @@ -115,6 +115,15 @@ type CreateBlankRequest struct { // The OS version that will be installed on the virtual machine // Required: false OSVersion string `url:"os_version,omitempty" json:"os_version,omitempty"` + + // CPU alignment profile name + // Required: false + CPUAlignmentProfile string `url:"cpu_alignment_profile,omitempty" json:"cpu_alignment_profile,omitempty"` + + // Clock type for the VM + // Required: false + // Default: default + Clock string `url:"clock,omitempty" json:"clock,omitempty"` } // GetRAM returns RAM field values @@ -142,7 +151,7 @@ func (k KVMX86) CreateBlank(ctx context.Context, req CreateBlankRequest) (uint64 var interfaces []string - if req.Interfaces != nil && len(req.Interfaces) != 0 { + if len(req.Interfaces) != 0 { interfaces = make([]string, 0, len(req.Interfaces)) for i := range req.Interfaces { @@ -159,7 +168,7 @@ func (k KVMX86) CreateBlank(ctx context.Context, req CreateBlankRequest) (uint64 var dataDisks []string - if req.DataDisks != nil && len(req.DataDisks) != 0 { + if len(req.DataDisks) != 0 { dataDisks = make([]string, 0, len(req.DataDisks)) for i := range req.DataDisks { diff --git a/pkg/cloudapi/kvmx86/kvmx86.go b/pkg/cloudapi/kvmx86/kvmx86.go index 88b96cb..bf84b46 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/v14/interfaces" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/interfaces" ) // Structure for creating request to KVMX86 diff --git a/pkg/cloudapi/lb.go b/pkg/cloudapi/lb.go index fc5bce0..e1029cd 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/v14/pkg/cloudapi/lb" +import "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 8c25953..fd1e061 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // BackendCreateRequest struct to create backend diff --git a/pkg/cloudapi/lb/backend_delete.go b/pkg/cloudapi/lb/backend_delete.go index 9cba721..6de223d 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 e1b6d21..5f3b955 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 2d3404d..b0c0ecb 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 08b0060..76a563b 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // BackendServerUpdateRequest struct to update server diff --git a/pkg/cloudapi/lb/backend_update.go b/pkg/cloudapi/lb/backend_update.go index 6f142af..463059e 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // BackendUpdateRequest struct to update backend diff --git a/pkg/cloudapi/lb/config_reset.go b/pkg/cloudapi/lb/config_reset.go index 5d8bddd..bf444c6 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // ConfigResetRequest struct for reset config diff --git a/pkg/cloudapi/lb/create.go b/pkg/cloudapi/lb/create.go index 39eda9f..7fd09b0 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // CreateRequest struct to create load balancer diff --git a/pkg/cloudapi/lb/delete.go b/pkg/cloudapi/lb/delete.go index 802dab8..d38e119 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 473f26a..f3b888d 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // DisableEnableRequest struct for disable/enable load balancer diff --git a/pkg/cloudapi/lb/filter.go b/pkg/cloudapi/lb/filter.go index 2a71cb0..936e67c 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/v14/interfaces" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v14/pkg/cloudapi/k8s" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/interfaces" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 e7c5c8f..88c7cb5 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 901bee9..9abc6d3 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 efb11e0..c155f58 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // FrontendBindUpdateRequest struct to update binding diff --git a/pkg/cloudapi/lb/frontend_create.go b/pkg/cloudapi/lb/frontend_create.go index eef0cdd..9cbfff9 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // FrontendCreateRequest struct to create frontend diff --git a/pkg/cloudapi/lb/frontend_delete.go b/pkg/cloudapi/lb/frontend_delete.go index 4276aee..2534a58 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // FrontendDeleteRequest struct to delete frontend diff --git a/pkg/cloudapi/lb/get.go b/pkg/cloudapi/lb/get.go index f31cc4d..9272a63 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 40d05d1..9c11131 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/v14/interfaces" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/interfaces" ) // Structure for creating request to load balancer diff --git a/pkg/cloudapi/lb/list.go b/pkg/cloudapi/lb/list.go index 1502fbe..ece596f 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 f2468e2..d1c5a4d 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 eef7f2d..2e55e0e 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 60e314b..8bce1d8 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 c27a5cb..606bae0 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // RestartRequest struct to restart load balancer diff --git a/pkg/cloudapi/lb/restore.go b/pkg/cloudapi/lb/restore.go index 4788032..27db835 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // RestoreRequest struct to restore load balancer diff --git a/pkg/cloudapi/lb/serialize.go b/pkg/cloudapi/lb/serialize.go index b98122a..de8b399 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/v14/internal/serialization" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 476b18d..f7eab2c 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // StartRequest struct to start load balancer diff --git a/pkg/cloudapi/lb/stop.go b/pkg/cloudapi/lb/stop.go index 370d088..7048e3e 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // StopRequest struct to stop load balancer diff --git a/pkg/cloudapi/lb/update.go b/pkg/cloudapi/lb/update.go index c00e6bb..404c390 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 1d8b1d2..52e01a8 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 5407c6d..0178ded 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // ListGetRequest struct to get list of locations diff --git a/pkg/cloudapi/locations/list.go b/pkg/cloudapi/locations/list.go index 90c1203..e51941e 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // ListRequest struct to get list of locations diff --git a/pkg/cloudapi/locations/locations.go b/pkg/cloudapi/locations/locations.go index 950c64f..663237f 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/v14/interfaces" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/interfaces" ) // Structure for creating request to locations diff --git a/pkg/cloudapi/locations/serialize.go b/pkg/cloudapi/locations/serialize.go index 124855b..94c3650 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/v14/internal/serialization" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 87fa1ff..1074d6c 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/v14/pkg/cloudapi/locations" +import "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/pkg/cloudapi/locations" // Accessing the Locations method group func (ca *CloudAPI) Locations() *locations.Locations { diff --git a/pkg/cloudapi/pcidevice.go b/pkg/cloudapi/pcidevice.go index 23f6e8b..f677f7c 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/v14/pkg/cloudapi/pcidevice" +import "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 55a9bd6..c707549 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 8a3a2e4..0d6f853 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/v14/interfaces" +import "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 dc801e5..46fcb09 100644 --- a/pkg/cloudapi/pcidevice/serialize.go +++ b/pkg/cloudapi/pcidevice/serialize.go @@ -2,7 +2,7 @@ package pcidevice import ( "encoding/json" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v14/internal/serialization" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 4084232..8570215 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/v14/pkg/cloudapi/prometheus" +import "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 29f8522..5f7e36b 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) type ComputeCPULoadRequest struct { diff --git a/pkg/cloudapi/prometheus/compute_memory_available.go b/pkg/cloudapi/prometheus/compute_memory_available.go index 6b4dce2..bb3f0f0 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) type ComputeMemoryAvailableRequest struct { diff --git a/pkg/cloudapi/prometheus/compute_memory_unused.go b/pkg/cloudapi/prometheus/compute_memory_unused.go index 57f304a..4a63037 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) type ComputeMemoryUnusedRequest struct { diff --git a/pkg/cloudapi/prometheus/compute_memory_usable.go b/pkg/cloudapi/prometheus/compute_memory_usable.go index f66bc49..4f537c8 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) type ComputeMemoryUsableRequest struct { diff --git a/pkg/cloudapi/prometheus/compute_memory_usage.go b/pkg/cloudapi/prometheus/compute_memory_usage.go index 1972230..8c359d1 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) type ComputeMemoryUsageRequest struct { diff --git a/pkg/cloudapi/prometheus/compute_memory_used.go b/pkg/cloudapi/prometheus/compute_memory_used.go index 5cbfb39..3d46c8d 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) type ComputeMemoryUsedRequest struct { diff --git a/pkg/cloudapi/prometheus/compute_read_bytes.go b/pkg/cloudapi/prometheus/compute_read_bytes.go index 3f2607e..1da9cd9 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) type ComputeReadBytesRequest struct { diff --git a/pkg/cloudapi/prometheus/compute_read_requests.go b/pkg/cloudapi/prometheus/compute_read_requests.go index 584f522..cf1735e 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) type ComputeReadRequestsRequest struct { diff --git a/pkg/cloudapi/prometheus/compute_receive_bytes.go b/pkg/cloudapi/prometheus/compute_receive_bytes.go index eff3f48..6705e3e 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) type ComputeReceiveBytesRequest struct { diff --git a/pkg/cloudapi/prometheus/compute_receive_packets.go b/pkg/cloudapi/prometheus/compute_receive_packets.go index e0c2908..b62d864 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) type ComputeReceivePacketsRequest struct { diff --git a/pkg/cloudapi/prometheus/compute_transmit_bytes.go b/pkg/cloudapi/prometheus/compute_transmit_bytes.go index 214b3e1..722ff5a 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) type ComputeTransmitBytesRequest struct { diff --git a/pkg/cloudapi/prometheus/compute_transmit_packets.go b/pkg/cloudapi/prometheus/compute_transmit_packets.go index 53acdd3..888c25c 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) type ComputeTransmitPacketsRequest struct { diff --git a/pkg/cloudapi/prometheus/compute_write_bytes.go b/pkg/cloudapi/prometheus/compute_write_bytes.go index f2ddf83..3c93d58 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) type ComputeWriteBytesRequest struct { diff --git a/pkg/cloudapi/prometheus/compute_write_requests.go b/pkg/cloudapi/prometheus/compute_write_requests.go index f7932d5..845a57c 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) type ComputeWriteRequestsRequest struct { diff --git a/pkg/cloudapi/prometheus/computes.go b/pkg/cloudapi/prometheus/computes.go index 7b0191c..95922e1 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) const ( diff --git a/pkg/cloudapi/prometheus/prometheus.go b/pkg/cloudapi/prometheus/prometheus.go index 749be47..66997b1 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/v14/interfaces" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/interfaces" ) type Prometheus struct { diff --git a/pkg/cloudapi/rg.go b/pkg/cloudapi/rg.go index a7946c5..e6061c0 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/v14/pkg/cloudapi/rg" +import "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 2d90fbb..c3c2226 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 6fd686c..6f06cc7 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 0aafb9b..d7bc59f 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 2ff29f5..d3e8ea2 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 1edb11d..f728e22 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 e79f886..b23c824 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 index 18b7102..89d46a8 100644 --- a/pkg/cloudapi/rg/audits.go +++ b/pkg/cloudapi/rg/audits.go @@ -5,7 +5,7 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // AuditsRequest struct to get audit diff --git a/pkg/cloudapi/rg/create.go b/pkg/cloudapi/rg/create.go index 1d0bfd8..8fc8d4a 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/v14/internal/constants" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/constants" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 e1b0d7d..cf41b75 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 3ab97f8..6338cd0 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // DeleteRequest struct to delete resource group diff --git a/pkg/cloudapi/rg/disable.go b/pkg/cloudapi/rg/disable.go index b778d4d..d940d02 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // DisableRequest struct to disable resource group diff --git a/pkg/cloudapi/rg/enable.go b/pkg/cloudapi/rg/enable.go index 2f24bbf..af39e61 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // EnableRequest struct to enable resource group diff --git a/pkg/cloudapi/rg/get.go b/pkg/cloudapi/rg/get.go index 6e3b307..2f3256a 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 d2f28c6..7882d5e 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 44a1b9e..186f741 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 29bba4d..19c11f0 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 b97a022..12510c9 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 3c299f3..6c114bf 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 6cc70a3..80b51d6 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 11ceb4a..419f104 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // ListVINSRequest struct to get list of VINSes diff --git a/pkg/cloudapi/rg/models.go b/pkg/cloudapi/rg/models.go index c6bca70..4988e95 100644 --- a/pkg/cloudapi/rg/models.go +++ b/pkg/cloudapi/rg/models.go @@ -81,7 +81,7 @@ type RecordResourceGroup struct { CPUAllocationParameter string `json:"cpu_allocation_parameter"` // CPU allocation ratio - CPUAllocationRatio float64 `json:"cpu_allocation_ratio"` + CPUAllocationRatio uint64 `json:"cpu_allocation_ratio"` // Created by CreatedBy string `json:"createdBy"` @@ -180,7 +180,7 @@ type ItemResourceGroup struct { CPUAllocationParameter string `json:"cpu_allocation_parameter"` // CPU allocation ratio - CPUAllocationRatio float64 `json:"cpu_allocation_ratio"` + CPUAllocationRatio uint64 `json:"cpu_allocation_ratio"` // Created by CreatedBy string `json:"createdBy"` diff --git a/pkg/cloudapi/rg/remove_def_net.go b/pkg/cloudapi/rg/remove_def_net.go index 7136b49..1ac6237 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // RemoveDefNetRequest struct to remove default network diff --git a/pkg/cloudapi/rg/restore.go b/pkg/cloudapi/rg/restore.go index 0d94c5d..610146f 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // RestoreRequest struct to restore resource group diff --git a/pkg/cloudapi/rg/rg.go b/pkg/cloudapi/rg/rg.go index 6348a21..5a1cda6 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/v14/interfaces" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/interfaces" ) // Structure for creating request to resource group diff --git a/pkg/cloudapi/rg/serialize.go b/pkg/cloudapi/rg/serialize.go index 254fc2a..9fe7f0c 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/v14/internal/serialization" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 affe913..d90c3c7 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // SetDefNetRequest struct to set default network diff --git a/pkg/cloudapi/rg/update.go b/pkg/cloudapi/rg/update.go index 777f4fe..92deec9 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/v14/internal/constants" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/constants" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // UpdateRequest struct to update resource group diff --git a/pkg/cloudapi/rg/usage.go b/pkg/cloudapi/rg/usage.go index cf9ad11..21df3dc 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 5eeb0f0..bd0c488 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/v14/internal/constants" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/constants" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) type CreateRequest struct { diff --git a/pkg/cloudapi/secgroup/create_rule.go b/pkg/cloudapi/secgroup/create_rule.go index 2c8ca6c..aabc7c6 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/v14/internal/constants" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/constants" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) type CreateRuleRequest struct { diff --git a/pkg/cloudapi/secgroup/delete.go b/pkg/cloudapi/secgroup/delete.go index d9cf146..8a413b4 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) type DeleteRequest struct { diff --git a/pkg/cloudapi/secgroup/delete_rule.go b/pkg/cloudapi/secgroup/delete_rule.go index 6f99047..5db2a02 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) type DeleteRuleRequest struct { diff --git a/pkg/cloudapi/secgroup/get.go b/pkg/cloudapi/secgroup/get.go index 6edeefb..2948236 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) type GetRequest struct { diff --git a/pkg/cloudapi/secgroup/list.go b/pkg/cloudapi/secgroup/list.go index a0de996..a56b936 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) type ListRequest struct { diff --git a/pkg/cloudapi/secgroup/security_group.go b/pkg/cloudapi/secgroup/security_group.go index 44489d4..ac90e5f 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/v14/interfaces" +import "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 b2980a4..b769f3e 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) type UpdateRequest struct { diff --git a/pkg/cloudapi/securitygroup.go b/pkg/cloudapi/securitygroup.go index 141c60d..6324383 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/v14/pkg/cloudapi/secgroup" + secgroup "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/pkg/cloudapi/secgroup" ) // Accessing the Security Group method group diff --git a/pkg/cloudapi/sep.go b/pkg/cloudapi/sep.go index b4f3cf2..0450927 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/v14/pkg/cloudapi/sep" +import "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 33c0281..f15c58d 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 2b7e603..d5a115d 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/v14/interfaces" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/interfaces" ) // Structure for creating request to storage endpoint provider diff --git a/pkg/cloudapi/sep/serialize.go b/pkg/cloudapi/sep/serialize.go index 3a6503a..b82ee1e 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/v14/internal/serialization" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 7779e14..42b2979 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/v14/pkg/cloudapi/stpolicy" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/pkg/cloudapi/stpolicy" ) // Accessing the Storage Policy method group diff --git a/pkg/cloudapi/stpolicy/get.go b/pkg/cloudapi/stpolicy/get.go index 9aebaf7..66bb92b 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) type GetRequest struct { diff --git a/pkg/cloudapi/stpolicy/list.go b/pkg/cloudapi/stpolicy/list.go index 5c312d8..d6ad325 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) type ListRequest struct { diff --git a/pkg/cloudapi/stpolicy/storage_policy.go b/pkg/cloudapi/stpolicy/storage_policy.go index 7694187..3d3f57a 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/v14/interfaces" +import "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/interfaces" // Structure for creating request to storage policy type StPolicy struct { diff --git a/pkg/cloudapi/tasks.go b/pkg/cloudapi/tasks.go index 75dc7b0..58b7f23 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/v14/pkg/cloudapi/tasks" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/pkg/cloudapi/tasks" ) // Accessing the Tasks method group diff --git a/pkg/cloudapi/tasks/get.go b/pkg/cloudapi/tasks/get.go index 229fd7f..397cd76 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // GetRequest struct to get information about task diff --git a/pkg/cloudapi/tasks/list.go b/pkg/cloudapi/tasks/list.go index f57b2db..5438805 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // ListRequest struct to get list of tasks diff --git a/pkg/cloudapi/tasks/tasks.go b/pkg/cloudapi/tasks/tasks.go index d29d955..4ad897b 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/v14/interfaces" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/interfaces" ) // Structure for creating request to tasks diff --git a/pkg/cloudapi/trunk.go b/pkg/cloudapi/trunk.go index 443fb22..4723581 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/v14/pkg/cloudapi/trunk" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/pkg/cloudapi/trunk" ) // Accessing the Trunk method group diff --git a/pkg/cloudapi/trunk/get.go b/pkg/cloudapi/trunk/get.go index e87317a..5627f58 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 87839c1..f9566d2 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // ListRequest struct to get list of trunks diff --git a/pkg/cloudapi/trunk/trunk.go b/pkg/cloudapi/trunk/trunk.go index 9fed1a4..d685657 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/v14/interfaces" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/interfaces" ) // Structure for creating request to trunk diff --git a/pkg/cloudapi/user.go b/pkg/cloudapi/user.go index bb7046e..23df7ec 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/v14/pkg/cloudapi/user" +import "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 6409405..28f5588 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // APIListRequest struct for getting API list. diff --git a/pkg/cloudapi/user/authenticate.go b/pkg/cloudapi/user/authenticate.go index 997e5de..6172f83 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // AuthenticateRequest struct to authenticate user. diff --git a/pkg/cloudapi/user/get.go b/pkg/cloudapi/user/get.go index ed1ae4b..8c1e7b7 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // GetRequest struct to get user details. diff --git a/pkg/cloudapi/user/is_valid_invite_user_token.go b/pkg/cloudapi/user/is_valid_invite_user_token.go index f7525d0..586cf5f 100644 --- a/pkg/cloudapi/user/is_valid_invite_user_token.go +++ b/pkg/cloudapi/user/is_valid_invite_user_token.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // GetRequest struct to check if the inviteusertoken and emailaddress pair are valid and matching. diff --git a/pkg/cloudapi/user/set_data.go b/pkg/cloudapi/user/set_data.go index 604eeea..c214b3f 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // SetDataRequest struct for setting extra user information. diff --git a/pkg/cloudapi/user/user.go b/pkg/cloudapi/user/user.go index 662365d..2056f48 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/v14/interfaces" +import "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/interfaces" // Structure for creating request to User type User struct { diff --git a/pkg/cloudapi/vfpool.go b/pkg/cloudapi/vfpool.go index fe29c09..ed2fc65 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/v14/pkg/cloudapi/vfpool" +import "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 5dc5975..4da9fe1 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 23cf687..f346a84 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 1214ce7..48d7f4f 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/v14/internal/serialization" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 48885fa..e0e05be 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/v14/interfaces" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/interfaces" ) // Structure for creating request to vfpool diff --git a/pkg/cloudapi/vgpu.go b/pkg/cloudapi/vgpu.go index f1fcdbc..0b50eb2 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/v14/pkg/cloudapi/vgpu" +import "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 4187f0b..50f7c93 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // ListRequest struct to get list of VGPU diff --git a/pkg/cloudapi/vgpu/serialize.go b/pkg/cloudapi/vgpu/serialize.go index cc444b2..3969185 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/v14/internal/serialization" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 8c3e81e..46be8af 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/v14/interfaces" +import "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/interfaces" // Structure for creating request to VGPU type VGPU struct { diff --git a/pkg/cloudapi/vins.go b/pkg/cloudapi/vins.go index 4d299a5..5f49261 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/v14/pkg/cloudapi/vins" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/pkg/cloudapi/vins" ) // Accessing the VINS method group diff --git a/pkg/cloudapi/vins/audits.go b/pkg/cloudapi/vins/audits.go index 0a967cb..7bae3ae 100644 --- a/pkg/cloudapi/vins/audits.go +++ b/pkg/cloudapi/vins/audits.go @@ -5,7 +5,7 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // AuditsRequest struct to get audits diff --git a/pkg/cloudapi/vins/create_in_account.go b/pkg/cloudapi/vins/create_in_account.go index 68d7033..6efd32e 100644 --- a/pkg/cloudapi/vins/create_in_account.go +++ b/pkg/cloudapi/vins/create_in_account.go @@ -6,7 +6,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) type Route struct { diff --git a/pkg/cloudapi/vins/create_in_rg.go b/pkg/cloudapi/vins/create_in_rg.go index c3364a6..ec6b14b 100644 --- a/pkg/cloudapi/vins/create_in_rg.go +++ b/pkg/cloudapi/vins/create_in_rg.go @@ -6,7 +6,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 5ec0e08..a611988 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // DeleteRequest struct to delete VINS diff --git a/pkg/cloudapi/vins/disable_enable.go b/pkg/cloudapi/vins/disable_enable.go index 5b19619..5c044d9 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 f3ebd10..7cce3a0 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 6ea25e9..0519191 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 4f068af..4a5e8ea 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 00998b7..108a432 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 7c7f1e0..f05c832 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 82e67f5..25cf1fc 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // IPListRequest struct for DHCP IP diff --git a/pkg/cloudapi/vins/ip_release.go b/pkg/cloudapi/vins/ip_release.go index e71c7f1..187710e 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // IPReleaseRequest struct for IP release diff --git a/pkg/cloudapi/vins/ip_reserve.go b/pkg/cloudapi/vins/ip_reserve.go index f903e7b..125fcb9 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // IPReserveRequest struct for IP reserve diff --git a/pkg/cloudapi/vins/list.go b/pkg/cloudapi/vins/list.go index a5660a7..f285cd8 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 114fa1e..2b72ded 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 86af90c..d6ed2e4 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // MigrateToZone struct to move VINS to another zone diff --git a/pkg/cloudapi/vins/nat_rule_add.go b/pkg/cloudapi/vins/nat_rule_add.go index b4935fc..a39b042 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 95fddf9..ca86632 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 b99aac8..a84ff89 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 3342c14..4ba67eb 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // RestoreRequest struct for restore diff --git a/pkg/cloudapi/vins/serialize.go b/pkg/cloudapi/vins/serialize.go index bc1bb43..fc3e615 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/v14/internal/serialization" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 bb45cf5..348cf14 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 cecf43f..3ce1438 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 2ae331f..c25e25f 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 b56042a..b42e408 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 93b3e06..42acc66 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // StaticRouteListRequest struct for static route list diff --git a/pkg/cloudapi/vins/vins.go b/pkg/cloudapi/vins/vins.go index b26c0a8..15f28f2 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/v14/interfaces" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/interfaces" ) // Structure for creating request to VINS diff --git a/pkg/cloudapi/vins/vnfdev_redeploy.go b/pkg/cloudapi/vins/vnfdev_redeploy.go index ced7c0d..7da58a7 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // VNFDevRedeployRequest struct for redeploy VNFDevs diff --git a/pkg/cloudapi/vins/vnfdev_restart.go b/pkg/cloudapi/vins/vnfdev_restart.go index 1c9547f..657ba2e 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // VNFDevRestartRequest struct for reboot VINSes primary VNF device diff --git a/pkg/cloudapi/zone.go b/pkg/cloudapi/zone.go index 67e0565..2897ced 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/v14/pkg/cloudapi/zone" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/pkg/cloudapi/zone" ) // Accessing the Zone method group diff --git a/pkg/cloudapi/zone/get.go b/pkg/cloudapi/zone/get.go index 717d861..83e0076 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 688333f..1a27644 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // ListRequest struct to get list of zones diff --git a/pkg/cloudapi/zone/models.go b/pkg/cloudapi/zone/models.go index 5d56fbd..bffd048 100644 --- a/pkg/cloudapi/zone/models.go +++ b/pkg/cloudapi/zone/models.go @@ -1,5 +1,17 @@ package zone +// CPU alignment profile +type CpuAlignmentProfile struct { + // Profile name + Name string `json:"name"` + + // Vendor + Vendor string `json:"vendor"` + + // Model + Model string `json:"model"` +} + type ListZones struct { // Entry count EntryCount uint64 `json:"entryCount"` @@ -96,6 +108,9 @@ type RecordZone struct { // Domain Domain string `json:"domain"` + + // CPU alignment profiles + CpuAlignmentProfiles []CpuAlignmentProfile `json:"cpu_alignment_profiles"` } // A zone item from a list @@ -165,4 +180,7 @@ type ItemZone struct { // Domain Domain string `json:"domain"` + + // CPU alignment profiles + CpuAlignmentProfiles []CpuAlignmentProfile `json:"cpu_alignment_profiles"` } diff --git a/pkg/cloudapi/zone/serialize.go b/pkg/cloudapi/zone/serialize.go index 304198d..8215a55 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/v14/internal/serialization" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 bf9af21..a15987f 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/v14/interfaces" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/interfaces" ) // Structure for creating request to zone diff --git a/pkg/cloudbroker/account.go b/pkg/cloudbroker/account.go index a6e78dd..d79d951 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/v14/pkg/cloudbroker/account" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/pkg/cloudbroker/account" ) // Accessing the Account method group diff --git a/pkg/cloudbroker/account/account.go b/pkg/cloudbroker/account/account.go index 84f4814..0c3c214 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/v14/interfaces" +import "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 04dc622..9548b8e 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 1bb27f3..5fa0190 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 2db6a67..c4e809e 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 index 003b815..5d45daf 100644 --- a/pkg/cloudbroker/account/audits.go +++ b/pkg/cloudbroker/account/audits.go @@ -5,7 +5,7 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // AuditsRequest struct to give list of account audits diff --git a/pkg/cloudbroker/account/create.go b/pkg/cloudbroker/account/create.go index 020f230..83434a9 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/v14/internal/constants" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/constants" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 b190450..b2444d9 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 7f7c5f4..6cc7356 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // DeleteRequest struct to delete account diff --git a/pkg/cloudbroker/account/delete_accounts.go b/pkg/cloudbroker/account/delete_accounts.go index 8db2e02..f3b99d0 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 949e16a..afe5fcf 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // DeleteUserRequest struct to revoke access to account diff --git a/pkg/cloudbroker/account/disable.go b/pkg/cloudbroker/account/disable.go index 2f71ffd..54b0a4f 100644 --- a/pkg/cloudbroker/account/disable.go +++ b/pkg/cloudbroker/account/disable.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // DisableRequest struct to disable account diff --git a/pkg/cloudbroker/account/disable_accounts.go b/pkg/cloudbroker/account/disable_accounts.go index f310cc6..8088cc2 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // DisableAccountsRequest struct to disable group of accounts diff --git a/pkg/cloudbroker/account/enable.go b/pkg/cloudbroker/account/enable.go index 26bbf70..74fde9a 100644 --- a/pkg/cloudbroker/account/enable.go +++ b/pkg/cloudbroker/account/enable.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // EnableRequest struct to enable account diff --git a/pkg/cloudbroker/account/enable_accounts.go b/pkg/cloudbroker/account/enable_accounts.go index c1e9a51..5a31418 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // EnableAccountsRequest to enable group of accounts diff --git a/pkg/cloudbroker/account/get.go b/pkg/cloudbroker/account/get.go index b6a0e89..6d37fb4 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 1b48f33..7fe1239 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 5ac5e81..bfe67e2 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // GrantAccessTemplatesRequest struct to share images with account diff --git a/pkg/cloudbroker/account/list.go b/pkg/cloudbroker/account/list.go index f52e129..b1141f1 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 f9f9e72..26b45a3 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 091db18..e9ce1f3 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 794ec4b..1eb6e8b 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 25dbcf6..c80e040 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 69ac896..d06001a 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 ff60947..7328663 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 1d862db..82fc0b3 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // ListVINSRequest struct to get list of VINS diff --git a/pkg/cloudbroker/account/models.go b/pkg/cloudbroker/account/models.go index 850cc76..e748623 100644 --- a/pkg/cloudbroker/account/models.go +++ b/pkg/cloudbroker/account/models.go @@ -165,7 +165,7 @@ type InfoAccount struct { CPUAllocationParameter string `json:"cpu_allocation_parameter"` // CPU allocation ratio - CPUAllocationRatio float64 `json:"cpu_allocation_ratio"` + CPUAllocationRatio uint64 `json:"cpu_allocation_ratio"` // Created by CreatedBy string `json:"createdBy"` diff --git a/pkg/cloudbroker/account/remove_zone.go b/pkg/cloudbroker/account/remove_zone.go index 124d707..7fc0cf5 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 f51fb61..dd1631f 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 3dfb53f..d88a6b1 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // RevokeAccessTemplatesRequest struct to unshare images with account diff --git a/pkg/cloudbroker/account/serialize.go b/pkg/cloudbroker/account/serialize.go index 9210491..6d8d0c2 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/v14/internal/serialization" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 527fe90..b9bf90d 100644 --- a/pkg/cloudbroker/account/set_cpu_allocation_parameter.go +++ b/pkg/cloudbroker/account/set_cpu_allocation_parameter.go @@ -3,7 +3,7 @@ package account import ( "context" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" "strconv" ) diff --git a/pkg/cloudbroker/account/set_cpu_allocation_ratio.go b/pkg/cloudbroker/account/set_cpu_allocation_ratio.go index a5d9044..d82187e 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // SetCPUAllocationRatioRequest struct for setting CPU allocation ratio diff --git a/pkg/cloudbroker/account/update.go b/pkg/cloudbroker/account/update.go index ee91890..2e561c6 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/v14/internal/constants" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/constants" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 cbb7529..5de7f6b 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 3d94052..ab73b90 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 6a8e064..5ebbbda 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // UpdateUserRequest struct to update user access rights diff --git a/pkg/cloudbroker/apiaccess.go b/pkg/cloudbroker/apiaccess.go index 78494d6..a9e73c5 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/v14/pkg/cloudbroker/apiaccess" +import "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 ac967cb..b5fb118 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // APIFindRequest struct for finding apiaccess groups. diff --git a/pkg/cloudbroker/apiaccess/apiaccess.go b/pkg/cloudbroker/apiaccess/apiaccess.go index 02d0ac8..2f20d59 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/v14/interfaces" +import "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 86d5cb0..cbf1435 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) type APIString string diff --git a/pkg/cloudbroker/apiaccess/apis_include.go b/pkg/cloudbroker/apiaccess/apis_include.go index 15f144c..7a2bb35 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 9137760..1ddf14b 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // CopyRequest Request for copying apiaccess group. diff --git a/pkg/cloudbroker/apiaccess/create.go b/pkg/cloudbroker/apiaccess/create.go index 6df8172..eb7d4b7 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // CreateRequest struct for creating apiaccess group. diff --git a/pkg/cloudbroker/apiaccess/delete.go b/pkg/cloudbroker/apiaccess/delete.go index fb93e68..3cc9816 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 f84d089..08faf2d 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // DescUpdateRequest struct for updating apiaccess group description. diff --git a/pkg/cloudbroker/apiaccess/get.go b/pkg/cloudbroker/apiaccess/get.go index 7578ad8..8897e53 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // GetRequest struct to get apiaccess group. diff --git a/pkg/cloudbroker/apiaccess/list.go b/pkg/cloudbroker/apiaccess/list.go index 4cb24eb..0f30a73 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 be3a09b..f0c53b5 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // SetDefaultRequest struct for setting default apiaccess group. diff --git a/pkg/cloudbroker/apiaccess/subtract.go b/pkg/cloudbroker/apiaccess/subtract.go index 57838eb..6ccff08 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // SubtractRequest struct for subtracting. diff --git a/pkg/cloudbroker/apiaccess/union.go b/pkg/cloudbroker/apiaccess/union.go index 9ace57e..2fb4048 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // UnionRequest struct for union. diff --git a/pkg/cloudbroker/apiaccess/update.go b/pkg/cloudbroker/apiaccess/update.go index 2ca807f..5974f0d 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 1acbb88..7925f29 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 9db3c41..bd32f04 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/v14/pkg/cloudbroker/audit" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/pkg/cloudbroker/audit" ) // Accessing the Audit method group diff --git a/pkg/cloudbroker/audit/audit.go b/pkg/cloudbroker/audit/audit.go index 8f466e9..b08e2dd 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/v14/interfaces" +import "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 cab477e..fa336e7 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 a00003f..e8e3690 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 96c8230..aa88325 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // ListRequest struct to give list of account audits diff --git a/pkg/cloudbroker/backup.go b/pkg/cloudbroker/backup.go index a4f0b5b..228d678 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/v14/pkg/cloudbroker/backup" +import "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 35ff550..17b8091 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/v14/interfaces" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 16dc4dc..da63829 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 7ae3e3e..ac5c6b6 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) type Disk struct { diff --git a/pkg/cloudbroker/backup/delete_disk_backup.go b/pkg/cloudbroker/backup/delete_disk_backup.go index 6fd9577..ee67b02 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 c74c8d6..cfffd60 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 27b6730..921b612 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 f8e5836..80fb87d 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) type BackupFile struct { diff --git a/pkg/cloudbroker/bservice.go b/pkg/cloudbroker/bservice.go index d99c250..591622f 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/v14/pkg/cloudbroker/bservice" +import "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 47daf3a..5080012 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/v14/interfaces" +import "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 5192b2b..4450816 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // CreateRequest struct for BasicService diff --git a/pkg/cloudbroker/bservice/delete.go b/pkg/cloudbroker/bservice/delete.go index bc0fb80..93c5ef0 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // DeleteRequest struct to delete basic service diff --git a/pkg/cloudbroker/bservice/disable.go b/pkg/cloudbroker/bservice/disable.go index 90fb352..5dd4532 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // DisableRequest struct for disable service diff --git a/pkg/cloudbroker/bservice/enable.go b/pkg/cloudbroker/bservice/enable.go index b595ba0..ed546fc 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // EnableRequest struct to disable service diff --git a/pkg/cloudbroker/bservice/get.go b/pkg/cloudbroker/bservice/get.go index c8afe7d..ae0d2d7 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 614700c..654f314 100644 --- a/pkg/cloudbroker/bservice/group_add.go +++ b/pkg/cloudbroker/bservice/group_add.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // GroupAddRequest struct to create new compute group within BasicService diff --git a/pkg/cloudbroker/bservice/group_compute_remove.go b/pkg/cloudbroker/bservice/group_compute_remove.go index 9e0be6e..240678d 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 9b3e14d..154cd2b 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 ac3f20b..3ac0f39 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 0af11dd..57b95f7 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 7dfa2ef..aa58045 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 7a9db8f..db260b6 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 02e3e17..6916b05 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 9b53c30..b90eaa7 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 b65afef..47c4a21 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 efca21b..35cd2e5 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 54c53a3..d860e6b 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // GroupUpdateVINSRequest struct to update VINS settings diff --git a/pkg/cloudbroker/bservice/list.go b/pkg/cloudbroker/bservice/list.go index d2eb227..834839b 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 f338ecb..677be6e 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 89a720e..56259cf 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 c73b522..422772a 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 7504a2c..163d27b 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // SnapshotCreateRequest struct to create snapshot diff --git a/pkg/cloudbroker/bservice/snapshot_delete.go b/pkg/cloudbroker/bservice/snapshot_delete.go index 286d45d..9c561f2 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // SnapshotDeleteRequest struct to delete snapshot diff --git a/pkg/cloudbroker/bservice/snapshot_list.go b/pkg/cloudbroker/bservice/snapshot_list.go index 3901d2d..20d12d7 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 828366c..176e289 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // SnapshotRollbackRequest struct to rollback snapshot diff --git a/pkg/cloudbroker/bservice/start.go b/pkg/cloudbroker/bservice/start.go index 2f7756b..454d5e4 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // StartRequest struct to start service diff --git a/pkg/cloudbroker/bservice/stop.go b/pkg/cloudbroker/bservice/stop.go index ccac36a..8fa4dad 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // StopRequest struct to stop service diff --git a/pkg/cloudbroker/cloudbroker.go b/pkg/cloudbroker/cloudbroker.go index 0e3e2dd..3e3fd81 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/v14/interfaces" +import "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/interfaces" // Structure for creating request to CloudBroker groups type CloudBroker struct { diff --git a/pkg/cloudbroker/compute.go b/pkg/cloudbroker/compute.go index 7f83f3f..76b4617 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/v14/pkg/cloudbroker/compute" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 2518293..ef881a9 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // AbortSharedSnapshotMergeRequest struct to abort shared snapshots merge @@ -18,6 +18,11 @@ type AbortSharedSnapshotMergeRequest struct { Label string `url:"label" json:"label" validate:"required"` } +type wrapperAbortSharedSnapshotMergeRequest struct { + AbortSharedSnapshotMergeRequest + AsyncMode bool `url:"asyncMode"` +} + // AbortSharedSnapshotMerge shared snapshots merge abort func (c Compute) AbortSharedSnapshotMerge(ctx context.Context, req AbortSharedSnapshotMergeRequest) (string, error) { err := validators.ValidateRequest(req) @@ -25,9 +30,36 @@ func (c Compute) AbortSharedSnapshotMerge(ctx context.Context, req AbortSharedSn return "", validators.ValidationErrors(validators.GetErrors(err)) } + reqWrapped := wrapperAbortSharedSnapshotMergeRequest{ + AbortSharedSnapshotMergeRequest: req, + AsyncMode: false, + } + url := "/cloudbroker/compute/abort_shared_snapshot_merge" - res, err := c.client.DecortApiCall(ctx, http.MethodPost, url, req) + res, err := c.client.DecortApiCall(ctx, http.MethodPost, url, reqWrapped) + if err != nil { + return "", err + } + + return string(res), nil +} + +// AbortSharedSnapshotMergeAsync shared snapshots merge abort in async mode +func (c Compute) AbortSharedSnapshotMergeAsync(ctx context.Context, req AbortSharedSnapshotMergeRequest) (string, error) { + err := validators.ValidateRequest(req) + if err != nil { + return "", validators.ValidationErrors(validators.GetErrors(err)) + } + + reqWrapped := wrapperAbortSharedSnapshotMergeRequest{ + AbortSharedSnapshotMergeRequest: req, + AsyncMode: true, + } + + url := "/cloudbroker/compute/abort_shared_snapshot_merge" + + res, err := c.client.DecortApiCall(ctx, http.MethodPost, url, reqWrapped) if err != nil { return "", err } diff --git a/pkg/cloudbroker/compute/affinity_group_check_start.go b/pkg/cloudbroker/compute/affinity_group_check_start.go index 37d461d..b5de728 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 74e39b8..517db4f 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 bcb5930..d7297d0 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 afd1dca..1355cc0 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 e3a030e..d71d7bb 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 0b9fe43..5cca6b7 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 c04dcee..036fdfa 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 db9410f..4255a3e 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 5ae73c3..89c2ccb 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 7052938..7d659a8 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 f0643c0..9e2a2e7 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 c5d155a..76635fd 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // AttachPCIDeviceRequest struct to attach PCI device diff --git a/pkg/cloudbroker/compute/audits.go b/pkg/cloudbroker/compute/audits.go index 664696b..a3e8ed1 100644 --- a/pkg/cloudbroker/compute/audits.go +++ b/pkg/cloudbroker/compute/audits.go @@ -5,7 +5,7 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // AuditsRequest struct to get audit records diff --git a/pkg/cloudbroker/compute/boot_disk_set.go b/pkg/cloudbroker/compute/boot_disk_set.go index 16e558c..47d1f4f 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 b27b136..ee9c1dd 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 0b71e2e..3c49bf0 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 7a51fbc..6454b20 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // CDEjectRequest struct to eject CD image @@ -15,6 +15,12 @@ type CDEjectRequest struct { ComputeID uint64 `url:"computeId" json:"computeId" validate:"required"` } +type wrapperCDEjectRequest struct { + CDEjectRequest + + AsyncMode bool `url:"asyncMode"` +} + // CDEject ejects CD image to compute's CD-ROM func (c Compute) CDEject(ctx context.Context, req CDEjectRequest) (bool, error) { err := validators.ValidateRequest(req) @@ -22,9 +28,14 @@ func (c Compute) CDEject(ctx context.Context, req CDEjectRequest) (bool, error) return false, validators.ValidationErrors(validators.GetErrors(err)) } + reqWrapped := wrapperCDEjectRequest{ + CDEjectRequest: req, + AsyncMode: false, + } + url := "/cloudbroker/compute/cdEject" - res, err := c.client.DecortApiCall(ctx, http.MethodPost, url, req) + res, err := c.client.DecortApiCall(ctx, http.MethodPost, url, reqWrapped) if err != nil { return false, err } @@ -36,3 +47,25 @@ func (c Compute) CDEject(ctx context.Context, req CDEjectRequest) (bool, error) return result, err } + +// CDEjectAsync ejects CD image to compute's CD-ROM with AsyncMode +func (c Compute) CDEjectAsync(ctx context.Context, req CDEjectRequest) (string, error) { + err := validators.ValidateRequest(req) + if err != nil { + return "", validators.ValidationErrors(validators.GetErrors(err)) + } + + reqWrapped := wrapperCDEjectRequest{ + CDEjectRequest: req, + AsyncMode: true, + } + + url := "/cloudbroker/compute/cdEject" + + res, err := c.client.DecortApiCall(ctx, http.MethodPost, url, reqWrapped) + if err != nil { + return "", err + } + + return string(res), nil +} diff --git a/pkg/cloudbroker/compute/cd_insert.go b/pkg/cloudbroker/compute/cd_insert.go index 1047aa4..0dfa948 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // CDInsertRequest struct to insert new CD image @@ -18,6 +18,12 @@ type CDInsertRequest struct { CDROMID uint64 `url:"cdromId" json:"cdromId" validate:"required"` } +type wrapperCDInsertRequest struct { + CDInsertRequest + + AsyncMode bool `url:"asyncMode"` +} + // CDInsert inserts new CD image to compute's CD-ROM func (c Compute) CDInsert(ctx context.Context, req CDInsertRequest) (bool, error) { err := validators.ValidateRequest(req) @@ -25,12 +31,39 @@ func (c Compute) CDInsert(ctx context.Context, req CDInsertRequest) (bool, error return false, validators.ValidationErrors(validators.GetErrors(err)) } + reqWrapped := wrapperCDInsertRequest{ + CDInsertRequest: req, + AsyncMode: false, + } + url := "/cloudbroker/compute/cdInsert" - _, err = c.client.DecortApiCall(ctx, http.MethodPost, url, req) + _, err = c.client.DecortApiCall(ctx, http.MethodPost, url, reqWrapped) if err != nil { return false, err } return true, nil } + +// CDInsertAsync inserts new CD image to compute's CD-ROM with AsyncMode +func (c Compute) CDInsertAsync(ctx context.Context, req CDInsertRequest) (string, error) { + err := validators.ValidateRequest(req) + if err != nil { + return "", validators.ValidationErrors(validators.GetErrors(err)) + } + + reqWrapped := wrapperCDInsertRequest{ + CDInsertRequest: req, + AsyncMode: true, + } + + url := "/cloudbroker/compute/cdInsert" + + res, err := c.client.DecortApiCall(ctx, http.MethodPost, url, reqWrapped) + if err != nil { + return "", err + } + + return string(res), nil +} diff --git a/pkg/cloudbroker/compute/change_ip.go b/pkg/cloudbroker/compute/change_ip.go index c8f3edd..ca687fe 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // ChangeIPRequest struct to change IP for network @@ -31,6 +31,12 @@ type ChangeIPRequest struct { IPAddr string `url:"ip_addr" json:"ip_addr" validate:"required"` } +type wrapperChangeIPRequest struct { + ChangeIPRequest + + AsyncMode bool `url:"asyncMode"` +} + // ChangeIP change reserved IP for compute instance func (c Compute) ChangeIP(ctx context.Context, req ChangeIPRequest) (bool, error) { err := validators.ValidateRequest(req) @@ -38,9 +44,14 @@ func (c Compute) ChangeIP(ctx context.Context, req ChangeIPRequest) (bool, error return false, validators.ValidationErrors(validators.GetErrors(err)) } + reqWrapped := wrapperChangeIPRequest{ + ChangeIPRequest: req, + AsyncMode: false, + } + url := "/cloudbroker/compute/changeIp" - res, err := c.client.DecortApiCall(ctx, http.MethodPost, url, req) + res, err := c.client.DecortApiCall(ctx, http.MethodPost, url, reqWrapped) if err != nil { return false, err } @@ -52,3 +63,25 @@ func (c Compute) ChangeIP(ctx context.Context, req ChangeIPRequest) (bool, error return result, nil } + +// ChangeIPAsync change reserved IP for compute instance with AsyncMode +func (c Compute) ChangeIPAsync(ctx context.Context, req ChangeIPRequest) (string, error) { + err := validators.ValidateRequest(req) + if err != nil { + return "", validators.ValidationErrors(validators.GetErrors(err)) + } + + reqWrapped := wrapperChangeIPRequest{ + ChangeIPRequest: req, + AsyncMode: true, + } + + url := "/cloudbroker/compute/changeIp" + + res, err := c.client.DecortApiCall(ctx, http.MethodPost, url, reqWrapped) + if err != nil { + return "", err + } + + return string(res), nil +} diff --git a/pkg/cloudbroker/compute/change_link_state.go b/pkg/cloudbroker/compute/change_link_state.go index 8f53cdd..43a1410 100644 --- a/pkg/cloudbroker/compute/change_link_state.go +++ b/pkg/cloudbroker/compute/change_link_state.go @@ -3,8 +3,9 @@ package compute import ( "context" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v14/internal/validators" "strconv" + + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // ChangeLinkStateRequest struct for changing link state @@ -23,6 +24,12 @@ type ChangeLinkStateRequest struct { State string `url:"state" json:"state" validate:"required,interfaceState"` } +type wrapperChangeLinkStateRequest struct { + ChangeLinkStateRequest + + AsyncMode bool `url:"asyncMode"` +} + // ChangeLinkState changes the status link virtual of compute func (c Compute) ChangeLinkState(ctx context.Context, req ChangeLinkStateRequest) (bool, error) { err := validators.ValidateRequest(req) @@ -30,9 +37,14 @@ func (c Compute) ChangeLinkState(ctx context.Context, req ChangeLinkStateRequest return false, validators.ValidationErrors(validators.GetErrors(err)) } + reqWrapped := wrapperChangeLinkStateRequest{ + ChangeLinkStateRequest: req, + AsyncMode: false, + } + url := "/cloudbroker/compute/changeLinkState" - res, err := c.client.DecortApiCall(ctx, http.MethodPost, url, req) + res, err := c.client.DecortApiCall(ctx, http.MethodPost, url, reqWrapped) if err != nil { return false, err } @@ -41,5 +53,28 @@ func (c Compute) ChangeLinkState(ctx context.Context, req ChangeLinkStateRequest if err != nil { return false, err } + return result, nil } + +// ChangeLinkStateAsync changes the status link virtual of compute with AsyncMode +func (c Compute) ChangeLinkStateAsync(ctx context.Context, req ChangeLinkStateRequest) (string, error) { + err := validators.ValidateRequest(req) + if err != nil { + return "", validators.ValidationErrors(validators.GetErrors(err)) + } + + reqWrapped := wrapperChangeLinkStateRequest{ + ChangeLinkStateRequest: req, + AsyncMode: true, + } + + url := "/cloudbroker/compute/changeLinkState" + + res, err := c.client.DecortApiCall(ctx, http.MethodPost, url, reqWrapped) + if err != nil { + return "", err + } + + return string(res), nil +} diff --git a/pkg/cloudbroker/compute/change_mac.go b/pkg/cloudbroker/compute/change_mac.go index caddfde..2ce71bc 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 7191ef8..07fc767 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // ChangeMTURequest struct to change MTU for a compute @@ -23,6 +23,12 @@ type ChangeMTURequest struct { MTU uint64 `url:"mtu" json:"mtu" validate:"required" validate:"omitempty,mtu"` } +type wrapperChangeMTURequest struct { + ChangeMTURequest + + AsyncMode bool `url:"asyncMode"` +} + // ChangeMTU change MTU for compute instance func (c Compute) ChangeMTU(ctx context.Context, req ChangeMTURequest) (bool, error) { err := validators.ValidateRequest(req) @@ -30,9 +36,14 @@ func (c Compute) ChangeMTU(ctx context.Context, req ChangeMTURequest) (bool, err return false, validators.ValidationErrors(validators.GetErrors(err)) } + reqWrapped := wrapperChangeMTURequest{ + ChangeMTURequest: req, + AsyncMode: false, + } + url := "/cloudbroker/compute/change_mtu" - res, err := c.client.DecortApiCall(ctx, http.MethodPost, url, req) + res, err := c.client.DecortApiCall(ctx, http.MethodPost, url, reqWrapped) if err != nil { return false, err } @@ -44,3 +55,25 @@ func (c Compute) ChangeMTU(ctx context.Context, req ChangeMTURequest) (bool, err return result, nil } + +// ChangeMTUAsync change MTU for compute instance with AsyncMode +func (c Compute) ChangeMTUAsync(ctx context.Context, req ChangeMTURequest) (string, error) { + err := validators.ValidateRequest(req) + if err != nil { + return "", validators.ValidationErrors(validators.GetErrors(err)) + } + + reqWrapped := wrapperChangeMTURequest{ + ChangeMTURequest: req, + AsyncMode: true, + } + + url := "/cloudbroker/compute/change_mtu" + + res, err := c.client.DecortApiCall(ctx, http.MethodPost, url, reqWrapped) + if err != nil { + return "", err + } + + return string(res), nil +} diff --git a/pkg/cloudbroker/compute/change_read_only.go b/pkg/cloudbroker/compute/change_read_only.go index 2333e58..262cdae 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 b4b073a..8fed54e 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // ChangeSecGroupsRequest struct to change security groups for compute @@ -27,6 +27,12 @@ type ChangeSecGroupsRequest struct { EnableSecGroups interface{} `url:"enable_secgroups,omitempty" json:"enable_secgroups,omitempty" validate:"omitempty,isBool"` } +type wrapperChangeSecGroupsRequest struct { + ChangeSecGroupsRequest + + AsyncMode bool `url:"asyncMode"` +} + // ChangeSecGroups changes security groups for compute func (c Compute) ChangeSecGroups(ctx context.Context, req ChangeSecGroupsRequest) (bool, error) { err := validators.ValidateRequest(req) @@ -34,9 +40,14 @@ func (c Compute) ChangeSecGroups(ctx context.Context, req ChangeSecGroupsRequest return false, validators.ValidationErrors(validators.GetErrors(err)) } + reqWrapped := wrapperChangeSecGroupsRequest{ + ChangeSecGroupsRequest: req, + AsyncMode: false, + } + url := "/cloudbroker/compute/change_security_groups" - res, err := c.client.DecortApiCall(ctx, http.MethodPost, url, req) + res, err := c.client.DecortApiCall(ctx, http.MethodPost, url, reqWrapped) if err != nil { return false, err } @@ -48,3 +59,25 @@ func (c Compute) ChangeSecGroups(ctx context.Context, req ChangeSecGroupsRequest return result, nil } + +// ChangeSecGroupsAsync changes security groups for compute with AsyncMode +func (c Compute) ChangeSecGroupsAsync(ctx context.Context, req ChangeSecGroupsRequest) (string, error) { + err := validators.ValidateRequest(req) + if err != nil { + return "", validators.ValidationErrors(validators.GetErrors(err)) + } + + reqWrapped := wrapperChangeSecGroupsRequest{ + ChangeSecGroupsRequest: req, + AsyncMode: true, + } + + url := "/cloudbroker/compute/change_security_groups" + + res, err := c.client.DecortApiCall(ctx, http.MethodPost, url, reqWrapped) + if err != nil { + return "", err + } + + return string(res), nil +} diff --git a/pkg/cloudbroker/compute/check_compute_placement.go b/pkg/cloudbroker/compute/check_compute_placement.go index 8fe4bc6..98aecdb 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // CheckComputePlacementRequest struct for check compute placement diff --git a/pkg/cloudbroker/compute/clone.go b/pkg/cloudbroker/compute/clone.go index 1efba1e..eeb47ea 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/v14/internal/constants" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/constants" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // CloneRequest struct to clone compute instance @@ -44,6 +44,12 @@ type CloneRequest struct { SEPID uint64 `url:"sep_id" json:"sep_id"` } +type wrapperCloneRequest struct { + CloneRequest + + AsyncMode bool `url:"asyncMode" json:"asyncMode"` +} + // Clone clones compute instance func (c Compute) Clone(ctx context.Context, req CloneRequest) (string, error) { err := validators.ValidateRequest(req) @@ -51,9 +57,36 @@ func (c Compute) Clone(ctx context.Context, req CloneRequest) (string, error) { return "", validators.ValidationErrors(validators.GetErrors(err)) } + reqWrapped := wrapperCloneRequest{ + CloneRequest: req, + AsyncMode: false, + } + url := "/cloudbroker/compute/clone" - res, err := c.client.DecortApiCallCtype(ctx, http.MethodPost, url, constants.MIMEJSON, req) + res, err := c.client.DecortApiCallCtype(ctx, http.MethodPost, url, constants.MIMEJSON, reqWrapped) + if err != nil { + return "", err + } + + return string(res), nil +} + +// CloneAsync clones compute instance with AsyncMode +func (c Compute) CloneAsync(ctx context.Context, req CloneRequest) (string, error) { + err := validators.ValidateRequest(req) + if err != nil { + return "", validators.ValidationErrors(validators.GetErrors(err)) + } + + reqWrapped := wrapperCloneRequest{ + CloneRequest: req, + AsyncMode: true, + } + + url := "/cloudbroker/compute/clone" + + res, err := c.client.DecortApiCallCtype(ctx, http.MethodPost, url, constants.MIMEJSON, reqWrapped) if err != nil { return "", err } diff --git a/pkg/cloudbroker/compute/clone_abort.go b/pkg/cloudbroker/compute/clone_abort.go index 0861541..de7ef29 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/v14/internal/constants" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/constants" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 8732ea1..6e13912 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 9b1ff8b..4e5a211 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/v14/interfaces" +import "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 index 87480bf..7465922 100644 --- a/pkg/cloudbroker/compute/computeci_set.go +++ b/pkg/cloudbroker/compute/computeci_set.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // ComputeCISetRequest struct to set compute CI diff --git a/pkg/cloudbroker/compute/computeci_unset.go b/pkg/cloudbroker/compute/computeci_unset.go index 20d536d..319f77a 100644 --- a/pkg/cloudbroker/compute/computeci_unset.go +++ b/pkg/cloudbroker/compute/computeci_unset.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // ComputeCIUnsetRequest struct to unset compute CI diff --git a/pkg/cloudbroker/compute/create_template.go b/pkg/cloudbroker/compute/create_template.go index 2cbfe69..9749181 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // CreateTemplateRequest struct to create template @@ -19,6 +19,12 @@ type CreateTemplateRequest struct { Name string `url:"name" json:"name" validate:"required"` } +type wrapperCreateTemplateRequest struct { + CreateTemplateRequest + + AsyncMode bool `url:"asyncMode"` +} + // CreateTemplate create template from compute instance func (c Compute) CreateTemplate(ctx context.Context, req CreateTemplateRequest) (string, error) { err := validators.ValidateRequest(req) @@ -26,9 +32,14 @@ func (c Compute) CreateTemplate(ctx context.Context, req CreateTemplateRequest) return "", validators.ValidationErrors(validators.GetErrors(err)) } + reqWrapped := wrapperCreateTemplateRequest{ + CreateTemplateRequest: req, + AsyncMode: false, + } + url := "/cloudbroker/compute/createTemplate" - res, err := c.client.DecortApiCall(ctx, http.MethodPost, url, req) + res, err := c.client.DecortApiCall(ctx, http.MethodPost, url, reqWrapped) if err != nil { return "", err } @@ -37,3 +48,25 @@ func (c Compute) CreateTemplate(ctx context.Context, req CreateTemplateRequest) return result, nil } + +// CreateTemplateAsync create template from compute instance with AsyncMode +func (c Compute) CreateTemplateAsync(ctx context.Context, req CreateTemplateRequest) (string, error) { + err := validators.ValidateRequest(req) + if err != nil { + return "", validators.ValidationErrors(validators.GetErrors(err)) + } + + reqWrapped := wrapperCreateTemplateRequest{ + CreateTemplateRequest: req, + AsyncMode: true, + } + + url := "/cloudbroker/compute/createTemplate" + + res, err := c.client.DecortApiCall(ctx, http.MethodPost, url, reqWrapped) + if err != nil { + return "", err + } + + return string(res), nil +} diff --git a/pkg/cloudbroker/compute/create_template_from_blank.go b/pkg/cloudbroker/compute/create_template_from_blank.go index 58e369d..1c40cbe 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 d2ce060..01afb29 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // DeleteRequest struct to delete compute @@ -23,6 +23,12 @@ type DeleteRequest struct { DetachDisks bool `url:"detachDisks,omitempty" json:"detachDisks,omitempty"` } +type wrapperDeleteRequest struct { + DeleteRequest + + AsyncMode bool `url:"asyncMode"` +} + // Delete deletes compute func (c Compute) Delete(ctx context.Context, req DeleteRequest) (bool, error) { err := validators.ValidateRequest(req) @@ -30,9 +36,14 @@ func (c Compute) Delete(ctx context.Context, req DeleteRequest) (bool, error) { return false, validators.ValidationErrors(validators.GetErrors(err)) } + reqWrapped := wrapperDeleteRequest{ + DeleteRequest: req, + AsyncMode: false, + } + url := "/cloudbroker/compute/delete" - res, err := c.client.DecortApiCall(ctx, http.MethodPost, url, req) + res, err := c.client.DecortApiCall(ctx, http.MethodPost, url, reqWrapped) if err != nil { return false, err } @@ -44,3 +55,25 @@ func (c Compute) Delete(ctx context.Context, req DeleteRequest) (bool, error) { return result, nil } + +// DeleteAsync deletes compute with AsyncMode +func (c Compute) DeleteAsync(ctx context.Context, req DeleteRequest) (string, error) { + err := validators.ValidateRequest(req) + if err != nil { + return "", validators.ValidationErrors(validators.GetErrors(err)) + } + + reqWrapped := wrapperDeleteRequest{ + DeleteRequest: req, + AsyncMode: true, + } + + url := "/cloudbroker/compute/delete" + + res, err := c.client.DecortApiCall(ctx, http.MethodPost, url, reqWrapped) + if err != nil { + return "", err + } + + return string(res), nil +} diff --git a/pkg/cloudbroker/compute/delete_cpu_alignment_profile.go b/pkg/cloudbroker/compute/delete_cpu_alignment_profile.go new file mode 100644 index 0000000..83c94b7 --- /dev/null +++ b/pkg/cloudbroker/compute/delete_cpu_alignment_profile.go @@ -0,0 +1,39 @@ +package compute + +import ( + "context" + "net/http" + "strconv" + + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/constants" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" +) + +// DeleteCPUAlignmentProfileRequest struct to delete CPU alignment profile for computes +type DeleteCPUAlignmentProfileRequest struct { + // IDs of the compute instances + // Required: true + ComputeIDs []uint64 `url:"compute_ids" json:"compute_ids" validate:"min=1"` +} + +// DeleteCPUAlignmentProfile deletes CPU alignment profile for computes +func (c Compute) DeleteCPUAlignmentProfile(ctx context.Context, req DeleteCPUAlignmentProfileRequest) (bool, error) { + err := validators.ValidateRequest(req) + if err != nil { + return false, validators.ValidationErrors(validators.GetErrors(err)) + } + + url := "/cloudbroker/compute/delete_cpu_alignment_profile" + + res, err := c.client.DecortApiCallCtype(ctx, http.MethodPost, 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/compute/delete_custom_fields.go b/pkg/cloudbroker/compute/delete_custom_fields.go index c3c6740..2dae444 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 cfda39f..4a3ef44 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 cf612e9..b3aa9ad 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // DetachPCIDeviceRequest struct to detach PCI device diff --git a/pkg/cloudbroker/compute/disable.go b/pkg/cloudbroker/compute/disable.go index 98c093d..afd62fa 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // DisableRequest struct to disable compute @@ -15,6 +15,12 @@ type DisableRequest struct { ComputeID uint64 `url:"computeId" json:"computeId" validate:"required"` } +type wrapperDisableRequest struct { + DisableRequest + + AsyncMode bool `url:"asyncMode"` +} + // Disable disables compute func (c Compute) Disable(ctx context.Context, req DisableRequest) (bool, error) { err := validators.ValidateRequest(req) @@ -22,9 +28,14 @@ func (c Compute) Disable(ctx context.Context, req DisableRequest) (bool, error) return false, validators.ValidationErrors(validators.GetErrors(err)) } + reqWrapped := wrapperDisableRequest{ + DisableRequest: req, + AsyncMode: false, + } + url := "/cloudbroker/compute/disable" - res, err := c.client.DecortApiCall(ctx, http.MethodPost, url, req) + res, err := c.client.DecortApiCall(ctx, http.MethodPost, url, reqWrapped) if err != nil { return false, err } @@ -36,3 +47,25 @@ func (c Compute) Disable(ctx context.Context, req DisableRequest) (bool, error) return result, nil } + +// DisableAsync disables compute with AsyncMode +func (c Compute) DisableAsync(ctx context.Context, req DisableRequest) (string, error) { + err := validators.ValidateRequest(req) + if err != nil { + return "", validators.ValidationErrors(validators.GetErrors(err)) + } + + reqWrapped := wrapperDisableRequest{ + DisableRequest: req, + AsyncMode: true, + } + + url := "/cloudbroker/compute/disable" + + res, err := c.client.DecortApiCall(ctx, http.MethodPost, url, reqWrapped) + if err != nil { + return "", err + } + + return string(res), nil +} diff --git a/pkg/cloudbroker/compute/disk_add.go b/pkg/cloudbroker/compute/disk_add.go index 61f817a..58c5481 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // DiskAddRequest struct to create and attach disk to compute @@ -56,9 +56,19 @@ type DiskAddRequest struct { // Required: false Cache string `url:"cache,omitempty" json:"cache,omitempty"` - // BLK Discard + // Discard // Required: false - BLKDiscard interface{} `url:"blkdiscard,omitempty" json:"blkdiscard,omitempty" validate:"omitempty,isBool"` + Discard string `url:"discard,omitempty" json:"discard,omitempty"` + + // Mount disk in read-only mode + // Required: false + ReadOnly bool `url:"read_only,omitempty" json:"read_only,omitempty"` +} + +type wrapperDiskAddRequest struct { + DiskAddRequest + + AsyncMode bool `url:"asyncMode"` } // DiskAdd creates new disk and attach to compute @@ -68,9 +78,14 @@ func (c Compute) DiskAdd(ctx context.Context, req DiskAddRequest) (uint64, error return 0, validators.ValidationErrors(validators.GetErrors(err)) } + reqWrapped := wrapperDiskAddRequest{ + DiskAddRequest: req, + AsyncMode: false, + } + url := "/cloudbroker/compute/diskAdd" - res, err := c.client.DecortApiCall(ctx, http.MethodPost, url, req) + res, err := c.client.DecortApiCall(ctx, http.MethodPost, url, reqWrapped) if err != nil { return 0, err } @@ -82,3 +97,25 @@ func (c Compute) DiskAdd(ctx context.Context, req DiskAddRequest) (uint64, error return result, nil } + +// DiskAddAsync creates new disk and attach to compute with AsyncMode +func (c Compute) DiskAddAsync(ctx context.Context, req DiskAddRequest) (string, error) { + err := validators.ValidateRequest(req) + if err != nil { + return "", validators.ValidationErrors(validators.GetErrors(err)) + } + + reqWrapped := wrapperDiskAddRequest{ + DiskAddRequest: req, + AsyncMode: true, + } + + url := "/cloudbroker/compute/diskAdd" + + res, err := c.client.DecortApiCall(ctx, http.MethodPost, url, reqWrapped) + if err != nil { + return "", err + } + + return string(res), nil +} diff --git a/pkg/cloudbroker/compute/disk_attach.go b/pkg/cloudbroker/compute/disk_attach.go index 056e378..f32dac7 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // DiskAttachRequest struct to attach disk to compute @@ -25,6 +25,16 @@ type DiskAttachRequest struct { // Desired bus number (hex string, e.g. "0x03") // Required: false BusNumber string `url:"bus_number,omitempty" json:"bus_number,omitempty"` + + // Mount disk in read-only mode + // Required: false + ReadOnly bool `url:"read_only,omitempty" json:"read_only,omitempty"` +} + +type wrapperDiskAttachRequest struct { + DiskAttachRequest + + AsyncMode bool `url:"asyncMode"` } // DiskAttach attach disk to compute @@ -34,9 +44,14 @@ func (c Compute) DiskAttach(ctx context.Context, req DiskAttachRequest) (bool, e return false, validators.ValidationErrors(validators.GetErrors(err)) } + reqWrapped := wrapperDiskAttachRequest{ + DiskAttachRequest: req, + AsyncMode: false, + } + url := "/cloudbroker/compute/diskAttach" - res, err := c.client.DecortApiCall(ctx, http.MethodPost, url, req) + res, err := c.client.DecortApiCall(ctx, http.MethodPost, url, reqWrapped) if err != nil { return false, err } @@ -48,3 +63,25 @@ func (c Compute) DiskAttach(ctx context.Context, req DiskAttachRequest) (bool, e return result, nil } + +// DiskAttachAsync attach disk to compute with AsyncMode +func (c Compute) DiskAttachAsync(ctx context.Context, req DiskAttachRequest) (string, error) { + err := validators.ValidateRequest(req) + if err != nil { + return "", validators.ValidationErrors(validators.GetErrors(err)) + } + + reqWrapped := wrapperDiskAttachRequest{ + DiskAttachRequest: req, + AsyncMode: true, + } + + url := "/cloudbroker/compute/diskAttach" + + res, err := c.client.DecortApiCall(ctx, http.MethodPost, url, reqWrapped) + if err != nil { + return "", err + } + + return string(res), nil +} diff --git a/pkg/cloudbroker/compute/disk_del.go b/pkg/cloudbroker/compute/disk_del.go index ddce380..b4717cb 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // DiskDelRequest struct to detach and delete disk from compute @@ -23,6 +23,12 @@ type DiskDelRequest struct { Permanently bool `url:"permanently" json:"permanently"` } +type wrapperDiskDelRequest struct { + DiskDelRequest + + AsyncMode bool `url:"asyncMode"` +} + // DiskDel deletes disk and detaches it from compute func (c Compute) DiskDel(ctx context.Context, req DiskDelRequest) (bool, error) { err := validators.ValidateRequest(req) @@ -30,9 +36,14 @@ func (c Compute) DiskDel(ctx context.Context, req DiskDelRequest) (bool, error) return false, validators.ValidationErrors(validators.GetErrors(err)) } + reqWrapped := wrapperDiskDelRequest{ + DiskDelRequest: req, + AsyncMode: false, + } + url := "/cloudbroker/compute/diskDel" - res, err := c.client.DecortApiCall(ctx, http.MethodPost, url, req) + res, err := c.client.DecortApiCall(ctx, http.MethodPost, url, reqWrapped) if err != nil { return false, err } @@ -44,3 +55,25 @@ func (c Compute) DiskDel(ctx context.Context, req DiskDelRequest) (bool, error) return result, nil } + +// DiskDelAsync deletes disk and detaches it from compute with AsyncMode +func (c Compute) DiskDelAsync(ctx context.Context, req DiskDelRequest) (string, error) { + err := validators.ValidateRequest(req) + if err != nil { + return "", validators.ValidationErrors(validators.GetErrors(err)) + } + + reqWrapped := wrapperDiskDelRequest{ + DiskDelRequest: req, + AsyncMode: true, + } + + url := "/cloudbroker/compute/diskDel" + + res, err := c.client.DecortApiCall(ctx, http.MethodPost, url, reqWrapped) + if err != nil { + return "", err + } + + return string(res), nil +} diff --git a/pkg/cloudbroker/compute/disk_detach.go b/pkg/cloudbroker/compute/disk_detach.go index de45e65..238354e 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // DiskDetachRequest struct to detach disk from compute @@ -19,6 +19,12 @@ type DiskDetachRequest struct { DiskID uint64 `url:"diskId" json:"diskId" validate:"required"` } +type wrapperDiskDetachRequest struct { + DiskDetachRequest + + AsyncMode bool `url:"asyncMode"` +} + // DiskDetach detaches disk from compute func (c Compute) DiskDetach(ctx context.Context, req DiskDetachRequest) (bool, error) { err := validators.ValidateRequest(req) @@ -26,9 +32,14 @@ func (c Compute) DiskDetach(ctx context.Context, req DiskDetachRequest) (bool, e return false, validators.ValidationErrors(validators.GetErrors(err)) } + reqWrapped := wrapperDiskDetachRequest{ + DiskDetachRequest: req, + AsyncMode: false, + } + url := "/cloudbroker/compute/diskDetach" - res, err := c.client.DecortApiCall(ctx, http.MethodPost, url, req) + res, err := c.client.DecortApiCall(ctx, http.MethodPost, url, reqWrapped) if err != nil { return false, err } @@ -40,3 +51,25 @@ func (c Compute) DiskDetach(ctx context.Context, req DiskDetachRequest) (bool, e return result, nil } + +// DiskDetachAsync detaches disk from compute with AsyncMode +func (c Compute) DiskDetachAsync(ctx context.Context, req DiskDetachRequest) (string, error) { + err := validators.ValidateRequest(req) + if err != nil { + return "", validators.ValidationErrors(validators.GetErrors(err)) + } + + reqWrapped := wrapperDiskDetachRequest{ + DiskDetachRequest: req, + AsyncMode: true, + } + + url := "/cloudbroker/compute/diskDetach" + + res, err := c.client.DecortApiCall(ctx, http.MethodPost, url, reqWrapped) + if err != nil { + return "", err + } + + return string(res), nil +} diff --git a/pkg/cloudbroker/compute/disk_migrate.go b/pkg/cloudbroker/compute/disk_migrate.go index 69da4da..5700bce 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 d6961a4..346688e 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // DiskQOSRequest struct to change QOS of the disk @@ -23,6 +23,12 @@ type DiskQOSRequest struct { Limits string `url:"limits" json:"limits" validate:"required"` } +type wrapperDiskQOSRequest struct { + DiskQOSRequest + + AsyncMode bool `url:"asyncMode"` +} + // DiskQOS changes QOS of the disk func (c Compute) DiskQOS(ctx context.Context, req DiskQOSRequest) (bool, error) { err := validators.ValidateRequest(req) @@ -30,9 +36,14 @@ func (c Compute) DiskQOS(ctx context.Context, req DiskQOSRequest) (bool, error) return false, validators.ValidationErrors(validators.GetErrors(err)) } + reqWrapped := wrapperDiskQOSRequest{ + DiskQOSRequest: req, + AsyncMode: false, + } + url := "/cloudbroker/compute/diskQos" - res, err := c.client.DecortApiCall(ctx, http.MethodPost, url, req) + res, err := c.client.DecortApiCall(ctx, http.MethodPost, url, reqWrapped) if err != nil { return false, err } @@ -44,3 +55,25 @@ func (c Compute) DiskQOS(ctx context.Context, req DiskQOSRequest) (bool, error) return result, nil } + +// DiskQOSAsync changes QOS of the disk with AsyncMode +func (c Compute) DiskQOSAsync(ctx context.Context, req DiskQOSRequest) (string, error) { + err := validators.ValidateRequest(req) + if err != nil { + return "", validators.ValidationErrors(validators.GetErrors(err)) + } + + reqWrapped := wrapperDiskQOSRequest{ + DiskQOSRequest: req, + AsyncMode: true, + } + + url := "/cloudbroker/compute/diskQos" + + res, err := c.client.DecortApiCall(ctx, http.MethodPost, url, reqWrapped) + if err != nil { + return "", err + } + + return string(res), nil +} diff --git a/pkg/cloudbroker/compute/disk_resize.go b/pkg/cloudbroker/compute/disk_resize.go index 13cab71..6315d29 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // DiskResizeRequest struct to change disk size @@ -23,6 +23,12 @@ type DiskResizeRequest struct { Size uint64 `url:"size" json:"size" validate:"required"` } +type wrapperDiskResizeRequest struct { + DiskResizeRequest + + AsyncMode bool `url:"asyncMode"` +} + // DiskResize changes disk size func (c Compute) DiskResize(ctx context.Context, req DiskResizeRequest) (bool, error) { err := validators.ValidateRequest(req) @@ -30,9 +36,14 @@ func (c Compute) DiskResize(ctx context.Context, req DiskResizeRequest) (bool, e return false, validators.ValidationErrors(validators.GetErrors(err)) } + reqWrapped := wrapperDiskResizeRequest{ + DiskResizeRequest: req, + AsyncMode: false, + } + url := "/cloudbroker/compute/diskResize" - res, err := c.client.DecortApiCall(ctx, http.MethodPost, url, req) + res, err := c.client.DecortApiCall(ctx, http.MethodPost, url, reqWrapped) if err != nil { return false, err } @@ -44,3 +55,25 @@ func (c Compute) DiskResize(ctx context.Context, req DiskResizeRequest) (bool, e return result, nil } + +// DiskResizeAsync changes disk size with AsyncMode +func (c Compute) DiskResizeAsync(ctx context.Context, req DiskResizeRequest) (string, error) { + err := validators.ValidateRequest(req) + if err != nil { + return "", validators.ValidationErrors(validators.GetErrors(err)) + } + + reqWrapped := wrapperDiskResizeRequest{ + DiskResizeRequest: req, + AsyncMode: true, + } + + url := "/cloudbroker/compute/diskResize" + + res, err := c.client.DecortApiCall(ctx, http.MethodPost, url, reqWrapped) + if err != nil { + return "", err + } + + return string(res), nil +} diff --git a/pkg/cloudbroker/compute/disk_switch_to_replication.go b/pkg/cloudbroker/compute/disk_switch_to_replication.go index f58964b..5c9a794 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // DiskSwitchToReplicationRequest struct to switch disk to it's replication @@ -23,6 +23,12 @@ type DiskSwitchToReplicationRequest struct { StopReplication bool `url:"stopReplication" json:"stopReplication"` } +type wrapperDiskSwitchToReplicationRequest struct { + DiskSwitchToReplicationRequest + + AsyncMode bool `url:"asyncMode"` +} + // DiskSwitchToReplication switches disk to it's replication func (c Compute) DiskSwitchToReplication(ctx context.Context, req DiskSwitchToReplicationRequest) (bool, error) { err := validators.ValidateRequest(req) @@ -30,9 +36,14 @@ func (c Compute) DiskSwitchToReplication(ctx context.Context, req DiskSwitchToRe return false, validators.ValidationErrors(validators.GetErrors(err)) } + reqWrapped := wrapperDiskSwitchToReplicationRequest{ + DiskSwitchToReplicationRequest: req, + AsyncMode: false, + } + url := "/cloudbroker/compute/diskSwitchToReplication" - res, err := c.client.DecortApiCall(ctx, http.MethodPost, url, req) + res, err := c.client.DecortApiCall(ctx, http.MethodPost, url, reqWrapped) if err != nil { return false, err } @@ -44,3 +55,25 @@ func (c Compute) DiskSwitchToReplication(ctx context.Context, req DiskSwitchToRe return result, nil } + +// DiskSwitchToReplicationAsync switches disk to it's replication with AsyncMode +func (c Compute) DiskSwitchToReplicationAsync(ctx context.Context, req DiskSwitchToReplicationRequest) (string, error) { + err := validators.ValidateRequest(req) + if err != nil { + return "", validators.ValidationErrors(validators.GetErrors(err)) + } + + reqWrapped := wrapperDiskSwitchToReplicationRequest{ + DiskSwitchToReplicationRequest: req, + AsyncMode: true, + } + + url := "/cloudbroker/compute/diskSwitchToReplication" + + res, err := c.client.DecortApiCall(ctx, http.MethodPost, url, reqWrapped) + if err != nil { + return "", err + } + + return string(res), nil +} diff --git a/pkg/cloudbroker/compute/enable.go b/pkg/cloudbroker/compute/enable.go index f9db5c8..b581308 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // EnableRequest struct to enable compute diff --git a/pkg/cloudbroker/compute/filter.go b/pkg/cloudbroker/compute/filter.go index f08a48f..440dc08 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/v14/interfaces" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v14/pkg/cloudbroker/k8s" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v14/pkg/cloudbroker/lb" + "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" ) // FilterByID returns ListComputes with specified ID. diff --git a/pkg/cloudbroker/compute/get.go b/pkg/cloudbroker/compute/get.go index 68a1591..c003a53 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // GetRequest to get information about compute diff --git a/pkg/cloudbroker/compute/get_audits.go b/pkg/cloudbroker/compute/get_audits.go index 6da8f11..dd8024e 100644 --- a/pkg/cloudbroker/compute/get_audits.go +++ b/pkg/cloudbroker/compute/get_audits.go @@ -5,7 +5,7 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // GetAuditsRequest struct to get compute audits diff --git a/pkg/cloudbroker/compute/get_console_url.go b/pkg/cloudbroker/compute/get_console_url.go index e39b519..1db27e2 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 new file mode 100644 index 0000000..538b327 --- /dev/null +++ b/pkg/cloudbroker/compute/get_cpu_alignment_profile.go @@ -0,0 +1,46 @@ +package compute + +import ( + "context" + "encoding/json" + "net/http" + + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" +) + +// GetCPUAlignmentProfileRequest struct to get CPU alignment profile for compute +type GetCPUAlignmentProfileRequest struct { + // ID of the compute instance + // Required: true + ComputeID uint64 `url:"compute_id" json:"compute_id" validate:"required"` +} + +// GetCPUAlignmentProfile gets CPU alignment profile for compute +func (c Compute) GetCPUAlignmentProfile(ctx context.Context, req GetCPUAlignmentProfileRequest) (*CPUAlignmentProfile, error) { + res, err := c.GetCPUAlignmentProfileRaw(ctx, req) + if err != nil { + return nil, err + } + + info := CPUAlignmentProfile{} + + err = json.Unmarshal(res, &info) + if err != nil { + return nil, err + } + + return &info, nil +} + +// GetCPUAlignmentProfileRaw gets CPU alignment profile for compute as an array of bytes +func (c Compute) GetCPUAlignmentProfileRaw(ctx context.Context, req GetCPUAlignmentProfileRequest) ([]byte, error) { + err := validators.ValidateRequest(req) + if err != nil { + return nil, validators.ValidationErrors(validators.GetErrors(err)) + } + + url := "/cloudbroker/compute/get_cpu_alignment_profile" + + res, err := c.client.DecortApiCall(ctx, http.MethodGet, url, req) + return res, err +} diff --git a/pkg/cloudbroker/compute/get_custom_fields.go b/pkg/cloudbroker/compute/get_custom_fields.go index 0570f68..30574d7 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 index dd72b2f..d7a2093 100644 --- a/pkg/cloudbroker/compute/get_log.go +++ b/pkg/cloudbroker/compute/get_log.go @@ -4,7 +4,7 @@ import ( "context" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // GetLogRequest struct to get compute logs diff --git a/pkg/cloudbroker/compute/guest_agent_disable.go b/pkg/cloudbroker/compute/guest_agent_disable.go index 84acfd9..3c04f7f 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // GuestAgentDisableRequest struct to disable guest agent @@ -15,6 +15,12 @@ type GuestAgentDisableRequest struct { ComputeID uint64 `url:"compute_id" json:"compute_id" validate:"required"` } +type wrapperGuestAgentDisableRequest struct { + GuestAgentDisableRequest + + AsyncMode bool `url:"asyncMode"` +} + // Disable guest agent at a specific compute func (c Compute) GuestAgentDisable(ctx context.Context, req GuestAgentDisableRequest) (bool, error) { err := validators.ValidateRequest(req) @@ -22,9 +28,14 @@ func (c Compute) GuestAgentDisable(ctx context.Context, req GuestAgentDisableReq return false, validators.ValidationErrors(validators.GetErrors(err)) } + reqWrapped := wrapperGuestAgentDisableRequest{ + GuestAgentDisableRequest: req, + AsyncMode: false, + } + url := "/cloudbroker/compute/guest_agent_disable" - res, err := c.client.DecortApiCall(ctx, http.MethodPost, url, req) + res, err := c.client.DecortApiCall(ctx, http.MethodPost, url, reqWrapped) if err != nil { return false, err } @@ -36,3 +47,25 @@ func (c Compute) GuestAgentDisable(ctx context.Context, req GuestAgentDisableReq return result, nil } + +// GuestAgentDisableAsync disables guest agent at a specific compute with AsyncMode +func (c Compute) GuestAgentDisableAsync(ctx context.Context, req GuestAgentDisableRequest) (string, error) { + err := validators.ValidateRequest(req) + if err != nil { + return "", validators.ValidationErrors(validators.GetErrors(err)) + } + + reqWrapped := wrapperGuestAgentDisableRequest{ + GuestAgentDisableRequest: req, + AsyncMode: true, + } + + url := "/cloudbroker/compute/guest_agent_disable" + + res, err := c.client.DecortApiCall(ctx, http.MethodPost, url, reqWrapped) + if err != nil { + return "", err + } + + return string(res), nil +} diff --git a/pkg/cloudbroker/compute/guest_agent_enable.go b/pkg/cloudbroker/compute/guest_agent_enable.go index 8b49d3f..7ed7e54 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // GuestAgentEnableRequest struct to enable guest agent @@ -15,6 +15,12 @@ type GuestAgentEnableRequest struct { ComputeID uint64 `url:"compute_id" json:"compute_id" validate:"required"` } +type wrapperGuestAgentEnableRequest struct { + GuestAgentEnableRequest + + AsyncMode bool `url:"asyncMode"` +} + // Enable guest agent at a specific compute func (c Compute) GuestAgentEnable(ctx context.Context, req GuestAgentEnableRequest) (bool, error) { err := validators.ValidateRequest(req) @@ -22,9 +28,14 @@ func (c Compute) GuestAgentEnable(ctx context.Context, req GuestAgentEnableReque return false, validators.ValidationErrors(validators.GetErrors(err)) } + reqWrapped := wrapperGuestAgentEnableRequest{ + GuestAgentEnableRequest: req, + AsyncMode: false, + } + url := "/cloudbroker/compute/guest_agent_enable" - res, err := c.client.DecortApiCall(ctx, http.MethodPost, url, req) + res, err := c.client.DecortApiCall(ctx, http.MethodPost, url, reqWrapped) if err != nil { return false, err } @@ -36,3 +47,25 @@ func (c Compute) GuestAgentEnable(ctx context.Context, req GuestAgentEnableReque return result, nil } + +// GuestAgentEnableAsync enables guest agent at a specific compute with AsyncMode +func (c Compute) GuestAgentEnableAsync(ctx context.Context, req GuestAgentEnableRequest) (string, error) { + err := validators.ValidateRequest(req) + if err != nil { + return "", validators.ValidationErrors(validators.GetErrors(err)) + } + + reqWrapped := wrapperGuestAgentEnableRequest{ + GuestAgentEnableRequest: req, + AsyncMode: true, + } + + url := "/cloudbroker/compute/guest_agent_enable" + + res, err := c.client.DecortApiCall(ctx, http.MethodPost, url, reqWrapped) + if err != nil { + return "", err + } + + return string(res), nil +} diff --git a/pkg/cloudbroker/compute/guest_agent_execute.go b/pkg/cloudbroker/compute/guest_agent_execute.go index 8273dcc..8bf2806 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // GuestAgentExecuteRequest struct to execute command from user to agent @@ -23,6 +23,12 @@ type GuestAgentExecuteRequest struct { Arguments string `url:"arguments" json:"arguments" validate:"required"` } +type wrapperGuestAgentExecuteRequest struct { + GuestAgentExecuteRequest + + AsyncMode bool `url:"asyncMode"` +} + // Execute guest agent command func (c Compute) GuestAgentExecuteRequest(ctx context.Context, req GuestAgentExecuteRequest) (map[string]interface{}, error) { err := validators.ValidateRequest(req) @@ -30,9 +36,14 @@ func (c Compute) GuestAgentExecuteRequest(ctx context.Context, req GuestAgentExe return nil, validators.ValidationErrors(validators.GetErrors(err)) } + reqWrapped := wrapperGuestAgentExecuteRequest{ + GuestAgentExecuteRequest: req, + AsyncMode: false, + } + url := "/cloudbroker/compute/guest_agent_execute" - res, err := c.client.DecortApiCall(ctx, http.MethodPost, url, req) + res, err := c.client.DecortApiCall(ctx, http.MethodPost, url, reqWrapped) if err != nil { return nil, err } @@ -46,3 +57,25 @@ func (c Compute) GuestAgentExecuteRequest(ctx context.Context, req GuestAgentExe return result, nil } + +// GuestAgentExecuteRequestAsync executes guest agent command with AsyncMode +func (c Compute) GuestAgentExecuteRequestAsync(ctx context.Context, req GuestAgentExecuteRequest) (string, error) { + err := validators.ValidateRequest(req) + if err != nil { + return "", validators.ValidationErrors(validators.GetErrors(err)) + } + + reqWrapped := wrapperGuestAgentExecuteRequest{ + GuestAgentExecuteRequest: req, + AsyncMode: true, + } + + url := "/cloudbroker/compute/guest_agent_execute" + + res, err := c.client.DecortApiCall(ctx, http.MethodPost, url, reqWrapped) + if err != nil { + return "", err + } + + return string(res), nil +} diff --git a/pkg/cloudbroker/compute/guest_agent_feature_get.go b/pkg/cloudbroker/compute/guest_agent_feature_get.go index 3f97dd5..9b89281 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 52579dd..670bc43 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // GuestAgentFeatureUpdateRequest struct to feature update guest agent @@ -15,6 +15,12 @@ type GuestAgentFeatureUpdateRequest struct { ComputeID uint64 `url:"compute_id" json:"compute_id" validate:"required"` } +type wrapperGuestAgentFeatureUpdateRequest struct { + GuestAgentFeatureUpdateRequest + + AsyncMode bool `url:"asyncMode"` +} + // Feature update guest agent func (c Compute) GuestAgentFeatureUpdate(ctx context.Context, req GuestAgentFeatureUpdateRequest) (bool, error) { err := validators.ValidateRequest(req) @@ -22,9 +28,14 @@ func (c Compute) GuestAgentFeatureUpdate(ctx context.Context, req GuestAgentFeat return false, validators.ValidationErrors(validators.GetErrors(err)) } + reqWrapped := wrapperGuestAgentFeatureUpdateRequest{ + GuestAgentFeatureUpdateRequest: req, + AsyncMode: false, + } + url := "/cloudbroker/compute/guest_agent_feature_update" - res, err := c.client.DecortApiCall(ctx, http.MethodPost, url, req) + res, err := c.client.DecortApiCall(ctx, http.MethodPost, url, reqWrapped) if err != nil { return false, err } @@ -36,3 +47,25 @@ func (c Compute) GuestAgentFeatureUpdate(ctx context.Context, req GuestAgentFeat return result, nil } + +// GuestAgentFeatureUpdateAsync feature updates guest agent with AsyncMode +func (c Compute) GuestAgentFeatureUpdateAsync(ctx context.Context, req GuestAgentFeatureUpdateRequest) (string, error) { + err := validators.ValidateRequest(req) + if err != nil { + return "", validators.ValidationErrors(validators.GetErrors(err)) + } + + reqWrapped := wrapperGuestAgentFeatureUpdateRequest{ + GuestAgentFeatureUpdateRequest: req, + AsyncMode: true, + } + + url := "/cloudbroker/compute/guest_agent_feature_update" + + res, err := c.client.DecortApiCall(ctx, http.MethodPost, url, reqWrapped) + if err != nil { + return "", err + } + + return string(res), nil +} diff --git a/pkg/cloudbroker/compute/list.go b/pkg/cloudbroker/compute/list.go index 714a1c3..b270cd3 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 d85a96d..638ac97 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 977e8e0..31a5f2b 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // ListPCIDeviceRequest struct to get list of PCI devices diff --git a/pkg/cloudbroker/compute/list_vgpu.go b/pkg/cloudbroker/compute/list_vgpu.go index 378ae81..9095a7b 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 0e2a6aa..3ea1ff4 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // MassDeleteRequest struct to delete several computes @@ -19,6 +19,12 @@ type MassDeleteRequest struct { Permanently bool `url:"permanently,omitempty" json:"permanently,omitempty"` } +type wrapperMassDeleteRequest struct { + MassDeleteRequest + + AsyncMode bool `url:"asyncMode"` +} + // MassDelete starts jobs to delete several computes func (c Compute) MassDelete(ctx context.Context, req MassDeleteRequest) (bool, error) { err := validators.ValidateRequest(req) @@ -26,9 +32,14 @@ func (c Compute) MassDelete(ctx context.Context, req MassDeleteRequest) (bool, e return false, validators.ValidationErrors(validators.GetErrors(err)) } + reqWrapped := wrapperMassDeleteRequest{ + MassDeleteRequest: req, + AsyncMode: false, + } + url := "/cloudbroker/compute/massDelete" - res, err := c.client.DecortApiCall(ctx, http.MethodPost, url, req) + res, err := c.client.DecortApiCall(ctx, http.MethodPost, url, reqWrapped) if err != nil { return false, err } @@ -40,3 +51,25 @@ func (c Compute) MassDelete(ctx context.Context, req MassDeleteRequest) (bool, e return result, nil } + +// MassDeleteAsync starts jobs to delete several computes with AsyncMode +func (c Compute) MassDeleteAsync(ctx context.Context, req MassDeleteRequest) (string, error) { + err := validators.ValidateRequest(req) + if err != nil { + return "", validators.ValidationErrors(validators.GetErrors(err)) + } + + reqWrapped := wrapperMassDeleteRequest{ + MassDeleteRequest: req, + AsyncMode: true, + } + + url := "/cloudbroker/compute/massDelete" + + res, err := c.client.DecortApiCall(ctx, http.MethodPost, url, reqWrapped) + if err != nil { + return "", err + } + + return string(res), nil +} diff --git a/pkg/cloudbroker/compute/mass_reboot.go b/pkg/cloudbroker/compute/mass_reboot.go index f5df3aa..dcbfa95 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // MassRebootRequest struct to reboot several computes @@ -15,6 +15,12 @@ type MassRebootRequest struct { ComputeIDs []uint64 `url:"computeIds" json:"computeIds" validate:"min=1"` } +type wrapperMassRebootRequest struct { + MassRebootRequest + + AsyncMode bool `url:"asyncMode"` +} + // MassReboot starts jobs to reboot several computes func (c Compute) MassReboot(ctx context.Context, req MassRebootRequest) (bool, error) { err := validators.ValidateRequest(req) @@ -22,9 +28,14 @@ func (c Compute) MassReboot(ctx context.Context, req MassRebootRequest) (bool, e return false, validators.ValidationErrors(validators.GetErrors(err)) } + reqWrapped := wrapperMassRebootRequest{ + MassRebootRequest: req, + AsyncMode: false, + } + url := "/cloudbroker/compute/massReboot" - res, err := c.client.DecortApiCall(ctx, http.MethodPost, url, req) + res, err := c.client.DecortApiCall(ctx, http.MethodPost, url, reqWrapped) if err != nil { return false, err } @@ -36,3 +47,25 @@ func (c Compute) MassReboot(ctx context.Context, req MassRebootRequest) (bool, e return result, nil } + +// MassRebootAsync starts jobs to reboot several computes with AsyncMode +func (c Compute) MassRebootAsync(ctx context.Context, req MassRebootRequest) (string, error) { + err := validators.ValidateRequest(req) + if err != nil { + return "", validators.ValidationErrors(validators.GetErrors(err)) + } + + reqWrapped := wrapperMassRebootRequest{ + MassRebootRequest: req, + AsyncMode: true, + } + + url := "/cloudbroker/compute/massReboot" + + res, err := c.client.DecortApiCall(ctx, http.MethodPost, url, reqWrapped) + if err != nil { + return "", err + } + + return string(res), nil +} diff --git a/pkg/cloudbroker/compute/mass_start.go b/pkg/cloudbroker/compute/mass_start.go index 7aa1b24..ea5bbba 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // MassStartRequest struct to start several computes @@ -15,6 +15,12 @@ type MassStartRequest struct { ComputeIDs []uint64 `url:"computeIds" json:"computeIds" validate:"min=1"` } +type wrapperMassStartRequest struct { + MassStartRequest + + AsyncMode bool `url:"asyncMode"` +} + // MassStart starts jobs to start several computes func (c Compute) MassStart(ctx context.Context, req MassStartRequest) (bool, error) { err := validators.ValidateRequest(req) @@ -22,9 +28,14 @@ func (c Compute) MassStart(ctx context.Context, req MassStartRequest) (bool, err return false, validators.ValidationErrors(validators.GetErrors(err)) } + reqWrapped := wrapperMassStartRequest{ + MassStartRequest: req, + AsyncMode: false, + } + url := "/cloudbroker/compute/massStart" - res, err := c.client.DecortApiCall(ctx, http.MethodPost, url, req) + res, err := c.client.DecortApiCall(ctx, http.MethodPost, url, reqWrapped) if err != nil { return false, err } @@ -36,3 +47,25 @@ func (c Compute) MassStart(ctx context.Context, req MassStartRequest) (bool, err return result, nil } + +// MassStartAsync starts jobs to start several computes with AsyncMode +func (c Compute) MassStartAsync(ctx context.Context, req MassStartRequest) (string, error) { + err := validators.ValidateRequest(req) + if err != nil { + return "", validators.ValidationErrors(validators.GetErrors(err)) + } + + reqWrapped := wrapperMassStartRequest{ + MassStartRequest: req, + AsyncMode: true, + } + + url := "/cloudbroker/compute/massStart" + + res, err := c.client.DecortApiCall(ctx, http.MethodPost, url, reqWrapped) + if err != nil { + return "", err + } + + return string(res), nil +} diff --git a/pkg/cloudbroker/compute/mass_stop.go b/pkg/cloudbroker/compute/mass_stop.go index dfd7aa8..6ca40da 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // MassStopRequest struct to stop several computes @@ -19,6 +19,12 @@ type MassStopRequest struct { Force bool `url:"force,omitempty" json:"force,omitempty"` } +type wrapperMassStopRequest struct { + MassStopRequest + + AsyncMode bool `url:"asyncMode"` +} + // MassStop starts jobs to stop several computes func (c Compute) MassStop(ctx context.Context, req MassStopRequest) (bool, error) { err := validators.ValidateRequest(req) @@ -26,9 +32,14 @@ func (c Compute) MassStop(ctx context.Context, req MassStopRequest) (bool, error return false, validators.ValidationErrors(validators.GetErrors(err)) } + reqWrapped := wrapperMassStopRequest{ + MassStopRequest: req, + AsyncMode: false, + } + url := "/cloudbroker/compute/massStop" - res, err := c.client.DecortApiCall(ctx, http.MethodPost, url, req) + res, err := c.client.DecortApiCall(ctx, http.MethodPost, url, reqWrapped) if err != nil { return false, err } @@ -40,3 +51,25 @@ func (c Compute) MassStop(ctx context.Context, req MassStopRequest) (bool, error return result, nil } + +// MassStopAsync starts jobs to stop several computes with AsyncMode +func (c Compute) MassStopAsync(ctx context.Context, req MassStopRequest) (string, error) { + err := validators.ValidateRequest(req) + if err != nil { + return "", validators.ValidationErrors(validators.GetErrors(err)) + } + + reqWrapped := wrapperMassStopRequest{ + MassStopRequest: req, + AsyncMode: true, + } + + url := "/cloudbroker/compute/massStop" + + res, err := c.client.DecortApiCall(ctx, http.MethodPost, url, reqWrapped) + if err != nil { + return "", err + } + + return string(res), nil +} diff --git a/pkg/cloudbroker/compute/migrate.go b/pkg/cloudbroker/compute/migrate.go index a941c7c..318cb8e 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // MigrateRequest struct to migrate compute diff --git a/pkg/cloudbroker/compute/migrate_abort.go b/pkg/cloudbroker/compute/migrate_abort.go index e5e4810..c1e527e 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // MigrateAbortRequest struct to abort migration @@ -15,6 +15,12 @@ type MigrateAbortRequest struct { ComputeID uint64 `url:"compute_id" json:"compute_id" validate:"required"` } +type wrapperMigrateAbortRequest struct { + MigrateAbortRequest + + AsyncMode bool `url:"asyncMode"` +} + // MigrateAbort aborts compute migration func (c Compute) MigrateAbort(ctx context.Context, req MigrateAbortRequest) (string, error) { err := validators.ValidateRequest(req) @@ -22,9 +28,14 @@ func (c Compute) MigrateAbort(ctx context.Context, req MigrateAbortRequest) (str return "", validators.ValidationErrors(validators.GetErrors(err)) } + reqWrapped := wrapperMigrateAbortRequest{ + MigrateAbortRequest: req, + AsyncMode: false, + } + url := "/cloudbroker/compute/migrate_abort" - res, err := c.client.DecortApiCall(ctx, http.MethodPost, url, req) + res, err := c.client.DecortApiCall(ctx, http.MethodPost, url, reqWrapped) if err != nil { return "", err } @@ -33,3 +44,25 @@ func (c Compute) MigrateAbort(ctx context.Context, req MigrateAbortRequest) (str return result, nil } + +// MigrateAbortAsync aborts compute migration with AsyncMode +func (c Compute) MigrateAbortAsync(ctx context.Context, req MigrateAbortRequest) (string, error) { + err := validators.ValidateRequest(req) + if err != nil { + return "", validators.ValidationErrors(validators.GetErrors(err)) + } + + reqWrapped := wrapperMigrateAbortRequest{ + MigrateAbortRequest: req, + AsyncMode: true, + } + + url := "/cloudbroker/compute/migrate_abort" + + res, err := c.client.DecortApiCall(ctx, http.MethodPost, url, reqWrapped) + if err != nil { + return "", err + } + + return string(res), nil +} diff --git a/pkg/cloudbroker/compute/migrate_storage.go b/pkg/cloudbroker/compute/migrate_storage.go index e0536df..cc0a92d 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 5dd381e..d99f73a 100644 --- a/pkg/cloudbroker/compute/migrate_storage_abort.go +++ b/pkg/cloudbroker/compute/migrate_storage_abort.go @@ -3,9 +3,9 @@ package compute import ( "context" "net/http" - "strings" + "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // MigrateStorageAbortRequest struct to abort migration @@ -20,21 +20,57 @@ type MigrateStorageAbortRequest struct { StatusCheck bool `url:"statusCheck" json:"statusCheck"` } +type wrapperMigrateStorageAbortRequest struct { + MigrateStorageAbortRequest + + AsyncMode bool `url:"asyncMode"` +} + // MigrateStorageAbort aborts complex compute migration job -func (c Compute) MigrateStorageAbort(ctx context.Context, req MigrateStorageAbortRequest) (string, error) { +func (c Compute) MigrateStorageAbort(ctx context.Context, req MigrateStorageAbortRequest) (bool, error) { + err := validators.ValidateRequest(req) + if err != nil { + return false, validators.ValidationErrors(validators.GetErrors(err)) + } + + reqWrapped := wrapperMigrateStorageAbortRequest{ + MigrateStorageAbortRequest: req, + AsyncMode: false, + } + + url := "/cloudbroker/compute/migrateStorageAbort" + + res, err := c.client.DecortApiCall(ctx, http.MethodPost, url, reqWrapped) + if err != nil { + return false, err + } + + result, err := strconv.ParseBool(string(res)) + if err != nil { + return false, err + } + + return result, nil +} + +// MigrateStorageAbortAsync aborts complex compute migration job with AsyncMode +func (c Compute) MigrateStorageAbortAsync(ctx context.Context, req MigrateStorageAbortRequest) (string, error) { err := validators.ValidateRequest(req) if err != nil { return "", validators.ValidationErrors(validators.GetErrors(err)) } + reqWrapped := wrapperMigrateStorageAbortRequest{ + MigrateStorageAbortRequest: req, + AsyncMode: true, + } + url := "/cloudbroker/compute/migrateStorageAbort" - res, err := c.client.DecortApiCall(ctx, http.MethodPost, url, req) + res, err := c.client.DecortApiCall(ctx, http.MethodPost, url, reqWrapped) if err != nil { return "", err } - result := strings.ReplaceAll(string(res), "\"", "") - - return result, nil + return string(res), nil } diff --git a/pkg/cloudbroker/compute/migrate_storage_clean_up.go b/pkg/cloudbroker/compute/migrate_storage_clean_up.go index a04db51..6b27565 100644 --- a/pkg/cloudbroker/compute/migrate_storage_clean_up.go +++ b/pkg/cloudbroker/compute/migrate_storage_clean_up.go @@ -3,9 +3,9 @@ package compute import ( "context" "net/http" - "strings" + "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // MigrateStorageCleanUpRequest struct to cleanup resources after finished migration @@ -15,23 +15,59 @@ type MigrateStorageCleanUpRequest struct { ComputeID uint64 `url:"computeId" json:"computeId" validate:"required"` } +type wrapperMigrateStorageCleanUpRequest struct { + MigrateStorageCleanUpRequest + + AsyncMode bool `url:"asyncMode"` +} + // MigrateStorageCleanUp cleanup resources after finished (success of failed) complex compute migration. // If the migration was successful, then old disks will be removed, else new (target) disks will be removed. // Do it wisely! -func (c Compute) MigrateStorageCleanUp(ctx context.Context, req MigrateStorageCleanUpRequest) (string, error) { +func (c Compute) MigrateStorageCleanUp(ctx context.Context, req MigrateStorageCleanUpRequest) (bool, error) { + err := validators.ValidateRequest(req) + if err != nil { + return false, validators.ValidationErrors(validators.GetErrors(err)) + } + + reqWrapped := wrapperMigrateStorageCleanUpRequest{ + MigrateStorageCleanUpRequest: req, + AsyncMode: false, + } + + url := "/cloudbroker/compute/migrateStorageCleanup" + + res, err := c.client.DecortApiCall(ctx, http.MethodPost, url, reqWrapped) + if err != nil { + return false, err + } + + result, err := strconv.ParseBool(string(res)) + if err != nil { + return false, err + } + + return result, nil +} + +// MigrateStorageCleanUpAsync cleanup resources after finished migration with AsyncMode +func (c Compute) MigrateStorageCleanUpAsync(ctx context.Context, req MigrateStorageCleanUpRequest) (string, error) { err := validators.ValidateRequest(req) if err != nil { return "", validators.ValidationErrors(validators.GetErrors(err)) } + reqWrapped := wrapperMigrateStorageCleanUpRequest{ + MigrateStorageCleanUpRequest: req, + AsyncMode: true, + } + url := "/cloudbroker/compute/migrateStorageCleanup" - res, err := c.client.DecortApiCall(ctx, http.MethodPost, url, req) + res, err := c.client.DecortApiCall(ctx, http.MethodPost, url, reqWrapped) if err != nil { return "", err } - result := strings.ReplaceAll(string(res), "\"", "") - - return result, nil + return string(res), nil } diff --git a/pkg/cloudbroker/compute/migrate_storage_info.go b/pkg/cloudbroker/compute/migrate_storage_info.go index e8610c8..cace350 100644 --- a/pkg/cloudbroker/compute/migrate_storage_info.go +++ b/pkg/cloudbroker/compute/migrate_storage_info.go @@ -5,7 +5,7 @@ import ( "net/http" "strings" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 976f8eb..f993bec 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 79bcf41..2c899c8 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // MigrateToZone struct to move compute to another zone @@ -19,16 +19,27 @@ type MigrateToZoneRequest struct { ZoneID uint64 `url:"zoneId" json:"zoneId" validate:"required"` } -// MoveToZone moves compute to new zone +type wrapperMigrateToZoneRequest struct { + MigrateToZoneRequest + + AsyncMode bool `url:"asyncMode"` +} + +// MigrateToZone moves compute to new zone func (c Compute) MigrateToZone(ctx context.Context, req MigrateToZoneRequest) (bool, error) { err := validators.ValidateRequest(req) if err != nil { return false, validators.ValidationErrors(validators.GetErrors(err)) } + reqWrapped := wrapperMigrateToZoneRequest{ + MigrateToZoneRequest: req, + AsyncMode: false, + } + url := "/cloudbroker/compute/migrateToZone" - res, err := c.client.DecortApiCall(ctx, http.MethodPost, url, req) + res, err := c.client.DecortApiCall(ctx, http.MethodPost, url, reqWrapped) if err != nil { return false, err } @@ -40,3 +51,25 @@ func (c Compute) MigrateToZone(ctx context.Context, req MigrateToZoneRequest) (b return result, nil } + +// MigrateToZoneAsync moves compute to new zone with AsyncMode +func (c Compute) MigrateToZoneAsync(ctx context.Context, req MigrateToZoneRequest) (string, error) { + err := validators.ValidateRequest(req) + if err != nil { + return "", validators.ValidationErrors(validators.GetErrors(err)) + } + + reqWrapped := wrapperMigrateToZoneRequest{ + MigrateToZoneRequest: req, + AsyncMode: true, + } + + url := "/cloudbroker/compute/migrateToZone" + + res, err := c.client.DecortApiCall(ctx, http.MethodPost, url, reqWrapped) + if err != nil { + return "", err + } + + return string(res), nil +} diff --git a/pkg/cloudbroker/compute/models.go b/pkg/cloudbroker/compute/models.go index a1ce1de..2d489d7 100644 --- a/pkg/cloudbroker/compute/models.go +++ b/pkg/cloudbroker/compute/models.go @@ -67,6 +67,9 @@ type ListACL []ItemACL // Main information about snapshot type ItemSnapshot struct { + // Compute info + Compute RecordCompute `json:"compute"` + // List of disk IDs Disks []uint64 `json:"disks"` @@ -76,6 +79,9 @@ type ItemSnapshot struct { // Label Label string `json:"label"` + // Memory dump image ID + MemoryDumpImage uint64 `json:"memory_dump_image"` + // Timestamp Timestamp uint64 `json:"timestamp"` } @@ -391,8 +397,8 @@ type ItemDisk struct { // Access Control List ACL ItemACL `json:"acl"` - // BLK Discard - BLKDiscard bool `json:"blkdiscard"` + // Discard + Discard string `json:"discard"` // Block Size BlockSize string `json:"block_size"` @@ -546,6 +552,9 @@ type ItemDisk struct { // UpdatedTime UpdatedTime uint64 `json:"updatedTime"` + + // Read-only + ReadOnly bool `json:"read_only"` } type ItemReplication struct { @@ -723,6 +732,9 @@ type InfoCompute struct { // Clone reference CloneReference uint64 `json:"cloneReference"` + // Clock + Clock string `json:"clock"` + // List clone IDs Clones []uint64 `json:"clones"` @@ -825,6 +837,9 @@ type InfoCompute struct { // PreferredCPU PreferredCPU []int64 `json:"preferredCpu"` + // CPU alignment profile + CPUAlignmentProfile CPUAlignmentProfile `json:"cpu_alignment_profile"` + // Qemu_quest QemuQuest QemuQuest `json:"qemu_guest"` @@ -912,6 +927,12 @@ type QemuQuest struct { User string `json:"user"` } +type CPUAlignmentProfile struct { + Model string `json:"model"` + Name string `json:"name"` + Vendor string `json:"vendor"` +} + // Information about libvirt settings type LibvirtSettings struct { // TX mode @@ -986,6 +1007,9 @@ type RecordCompute struct { // Clone reference CloneReference uint64 `json:"cloneReference"` + // Clock + Clock string `json:"clock"` + // List clone IDs Clones []uint64 `json:"clones"` @@ -1115,6 +1139,9 @@ type RecordCompute struct { // PreferredCPU PreferredCPU []int64 `json:"preferredCpu"` + // CPU alignment profile + CPUAlignmentProfile CPUAlignmentProfile `json:"cpu_alignment_profile"` + // Qemu_quest QemuQuest QemuQuest `json:"qemu_guest"` @@ -1307,6 +1334,9 @@ type InfoDisk struct { // SEP ID SepID int64 `json:"sepId"` + + // Read-only + ReadOnly bool `json:"read_only"` } // List computes diff --git a/pkg/cloudbroker/compute/move_to_rg.go b/pkg/cloudbroker/compute/move_to_rg.go index 2397784..ab618b3 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // MoveToRGRequest struct to move compute to new resource group @@ -34,16 +34,27 @@ type MoveToRGRequest struct { ForceStop bool `url:"forceStop,omitempty" json:"forceStop,omitempty"` } +type wrapperMoveToRGRequest struct { + MoveToRGRequest + + AsyncMode bool `url:"asyncMode"` +} + // MoveToRG moves compute instance to new resource group -func (c Compute) Validate(ctx context.Context, req MoveToRGRequest) (bool, error) { +func (c Compute) MoveToRG(ctx context.Context, req MoveToRGRequest) (bool, error) { err := validators.ValidateRequest(req) if err != nil { return false, validators.ValidationErrors(validators.GetErrors(err)) } + reqWrapped := wrapperMoveToRGRequest{ + MoveToRGRequest: req, + AsyncMode: false, + } + url := "/cloudbroker/compute/moveToRg" - res, err := c.client.DecortApiCall(ctx, http.MethodPost, url, req) + res, err := c.client.DecortApiCall(ctx, http.MethodPost, url, reqWrapped) if err != nil { return false, err } @@ -55,3 +66,25 @@ func (c Compute) Validate(ctx context.Context, req MoveToRGRequest) (bool, error return result, nil } + +// MoveToRGAsync moves compute instance to new resource group with AsyncMode +func (c Compute) MoveToRGAsync(ctx context.Context, req MoveToRGRequest) (string, error) { + err := validators.ValidateRequest(req) + if err != nil { + return "", validators.ValidationErrors(validators.GetErrors(err)) + } + + reqWrapped := wrapperMoveToRGRequest{ + MoveToRGRequest: req, + AsyncMode: true, + } + + url := "/cloudbroker/compute/moveToRg" + + res, err := c.client.DecortApiCall(ctx, http.MethodPost, url, reqWrapped) + if err != nil { + return "", err + } + + return string(res), nil +} diff --git a/pkg/cloudbroker/compute/net_attach.go b/pkg/cloudbroker/compute/net_attach.go index 3ba9e74..42ce426 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // NetAttachRequest struct to attach network @@ -53,9 +53,9 @@ type NetAttachRequest struct { // Required: false SDNSegmentID string `url:"sdn_segment_id,omitempty" json:"sdn_segment_id,omitempty"` - // SDN Object Group ID + // SDN Object Group IDs // Required: false - SDNObjectGroupID string `url:"sdn_object_group_id,omitempty" json:"sdn_object_group_id,omitempty"` + SDNObjectGroupIDs []string `url:"sdn_object_group_ids,omitempty" json:"sdn_object_group_ids,omitempty"` // SDN Logical Port Display Name // Required: false @@ -83,6 +83,12 @@ type NetAttachRequest struct { Enabled interface{} `url:"enabled,omitempty" json:"enabled,omitempty" validate:"omitempty,isBool"` } +type wrapperNetAttachRequest struct { + NetAttachRequest + + AsyncMode bool `url:"asyncMode"` +} + // NetAttach attaches network to compute and gets info about network func (c Compute) NetAttach(ctx context.Context, req NetAttachRequest) (*RecordNetAttach, error) { err := validators.ValidateRequest(req) @@ -90,9 +96,14 @@ func (c Compute) NetAttach(ctx context.Context, req NetAttachRequest) (*RecordNe return nil, validators.ValidationErrors(validators.GetErrors(err)) } + reqWrapped := wrapperNetAttachRequest{ + NetAttachRequest: req, + AsyncMode: false, + } + url := "/cloudbroker/compute/netAttach" - res, err := c.client.DecortApiCall(ctx, http.MethodPost, url, req) + res, err := c.client.DecortApiCall(ctx, http.MethodPost, url, reqWrapped) if err != nil { return nil, err } @@ -106,3 +117,25 @@ func (c Compute) NetAttach(ctx context.Context, req NetAttachRequest) (*RecordNe return &info, nil } + +// NetAttachAsync attaches network to compute with AsyncMode +func (c Compute) NetAttachAsync(ctx context.Context, req NetAttachRequest) (string, error) { + err := validators.ValidateRequest(req) + if err != nil { + return "", validators.ValidationErrors(validators.GetErrors(err)) + } + + reqWrapped := wrapperNetAttachRequest{ + NetAttachRequest: req, + AsyncMode: true, + } + + url := "/cloudbroker/compute/netAttach" + + res, err := c.client.DecortApiCall(ctx, http.MethodPost, url, reqWrapped) + if err != nil { + return "", err + } + + return string(res), nil +} diff --git a/pkg/cloudbroker/compute/net_detach.go b/pkg/cloudbroker/compute/net_detach.go index d3938f8..d06acec 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // NetDetachRequest struct to detach network from compute @@ -23,6 +23,12 @@ type NetDetachRequest struct { MAC string `url:"mac,omitempty" json:"mac,omitempty"` } +type wrapperNetDetachRequest struct { + NetDetachRequest + + AsyncMode bool `url:"asyncMode"` +} + // NetDetach detaches network from compute func (c Compute) NetDetach(ctx context.Context, req NetDetachRequest) (bool, error) { err := validators.ValidateRequest(req) @@ -30,9 +36,14 @@ func (c Compute) NetDetach(ctx context.Context, req NetDetachRequest) (bool, err return false, validators.ValidationErrors(validators.GetErrors(err)) } + reqWrapped := wrapperNetDetachRequest{ + NetDetachRequest: req, + AsyncMode: false, + } + url := "/cloudbroker/compute/netDetach" - res, err := c.client.DecortApiCall(ctx, http.MethodPost, url, req) + res, err := c.client.DecortApiCall(ctx, http.MethodPost, url, reqWrapped) if err != nil { return false, err } @@ -44,3 +55,25 @@ func (c Compute) NetDetach(ctx context.Context, req NetDetachRequest) (bool, err return result, nil } + +// NetDetachAsync detaches network from compute with AsyncMode +func (c Compute) NetDetachAsync(ctx context.Context, req NetDetachRequest) (string, error) { + err := validators.ValidateRequest(req) + if err != nil { + return "", validators.ValidationErrors(validators.GetErrors(err)) + } + + reqWrapped := wrapperNetDetachRequest{ + NetDetachRequest: req, + AsyncMode: true, + } + + url := "/cloudbroker/compute/netDetach" + + res, err := c.client.DecortApiCall(ctx, http.MethodPost, url, reqWrapped) + if err != nil { + return "", err + } + + return string(res), nil +} diff --git a/pkg/cloudbroker/compute/net_qos.go b/pkg/cloudbroker/compute/net_qos.go index 883c805..854ac5d 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // NetQOSRequest struct for update QOS @@ -38,6 +38,12 @@ type NetQOSRequest struct { EgressRate uint64 `url:"egress_rate,omitempty" json:"egress_rate,omitempty"` } +type wrapperNetQOSRequest struct { + NetQOSRequest + + AsyncMode bool `url:"asyncMode"` +} + // NetQOS updates compute interfaces QOS func (c Compute) NetQOS(ctx context.Context, req NetQOSRequest) (bool, error) { err := validators.ValidateRequest(req) @@ -45,9 +51,14 @@ func (c Compute) NetQOS(ctx context.Context, req NetQOSRequest) (bool, error) { return false, validators.ValidationErrors(validators.GetErrors(err)) } + reqWrapped := wrapperNetQOSRequest{ + NetQOSRequest: req, + AsyncMode: false, + } + url := "/cloudbroker/compute/netQos" - res, err := c.client.DecortApiCall(ctx, http.MethodPost, url, req) + res, err := c.client.DecortApiCall(ctx, http.MethodPost, url, reqWrapped) if err != nil { return false, err } @@ -59,3 +70,25 @@ func (c Compute) NetQOS(ctx context.Context, req NetQOSRequest) (bool, error) { return result, nil } + +// NetQOSAsync updates compute interfaces QOS with AsyncMode +func (c Compute) NetQOSAsync(ctx context.Context, req NetQOSRequest) (string, error) { + err := validators.ValidateRequest(req) + if err != nil { + return "", validators.ValidationErrors(validators.GetErrors(err)) + } + + reqWrapped := wrapperNetQOSRequest{ + NetQOSRequest: req, + AsyncMode: true, + } + + url := "/cloudbroker/compute/netQos" + + res, err := c.client.DecortApiCall(ctx, http.MethodPost, url, reqWrapped) + if err != nil { + return "", err + } + + return string(res), nil +} diff --git a/pkg/cloudbroker/compute/pause.go b/pkg/cloudbroker/compute/pause.go index 390176f..71d594b 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // PauseRequest struct to pause compute @@ -15,6 +15,12 @@ type PauseRequest struct { ComputeID uint64 `url:"computeId" json:"computeId" validate:"required"` } +type wrapperPauseRequest struct { + PauseRequest + + AsyncMode bool `url:"asyncMode"` +} + // Pause pause compute func (c Compute) Pause(ctx context.Context, req PauseRequest) (bool, error) { err := validators.ValidateRequest(req) @@ -22,9 +28,14 @@ func (c Compute) Pause(ctx context.Context, req PauseRequest) (bool, error) { return false, validators.ValidationErrors(validators.GetErrors(err)) } + reqWrapped := wrapperPauseRequest{ + PauseRequest: req, + AsyncMode: false, + } + url := "/cloudbroker/compute/pause" - res, err := c.client.DecortApiCall(ctx, http.MethodPost, url, req) + res, err := c.client.DecortApiCall(ctx, http.MethodPost, url, reqWrapped) if err != nil { return false, err } @@ -36,3 +47,25 @@ func (c Compute) Pause(ctx context.Context, req PauseRequest) (bool, error) { return result, nil } + +// PauseAsync pauses compute with AsyncMode +func (c Compute) PauseAsync(ctx context.Context, req PauseRequest) (string, error) { + err := validators.ValidateRequest(req) + if err != nil { + return "", validators.ValidationErrors(validators.GetErrors(err)) + } + + reqWrapped := wrapperPauseRequest{ + PauseRequest: req, + AsyncMode: true, + } + + url := "/cloudbroker/compute/pause" + + res, err := c.client.DecortApiCall(ctx, http.MethodPost, url, reqWrapped) + if err != nil { + return "", err + } + + return string(res), nil +} diff --git a/pkg/cloudbroker/compute/pfw_add.go b/pkg/cloudbroker/compute/pfw_add.go index 4a2fd50..0939e9b 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // PFWAddRequest struct to add port forward rule @@ -35,6 +35,12 @@ type PFWAddRequest struct { Proto string `url:"proto" json:"proto" validate:"proto"` } +type wrapperPFWAddRequest struct { + PFWAddRequest + + AsyncMode bool `url:"asyncMode"` +} + // PFWAdd adds port forward rule func (c Compute) PFWAdd(ctx context.Context, req PFWAddRequest) (uint64, error) { err := validators.ValidateRequest(req) @@ -42,9 +48,14 @@ func (c Compute) PFWAdd(ctx context.Context, req PFWAddRequest) (uint64, error) return 0, validators.ValidationErrors(validators.GetErrors(err)) } + reqWrapped := wrapperPFWAddRequest{ + PFWAddRequest: req, + AsyncMode: false, + } + url := "/cloudbroker/compute/pfwAdd" - res, err := c.client.DecortApiCall(ctx, http.MethodPost, url, req) + res, err := c.client.DecortApiCall(ctx, http.MethodPost, url, reqWrapped) if err != nil { return 0, err } @@ -56,3 +67,25 @@ func (c Compute) PFWAdd(ctx context.Context, req PFWAddRequest) (uint64, error) return result, nil } + +// PFWAddAsync adds port forward rule with AsyncMode +func (c Compute) PFWAddAsync(ctx context.Context, req PFWAddRequest) (string, error) { + err := validators.ValidateRequest(req) + if err != nil { + return "", validators.ValidationErrors(validators.GetErrors(err)) + } + + reqWrapped := wrapperPFWAddRequest{ + PFWAddRequest: req, + AsyncMode: true, + } + + url := "/cloudbroker/compute/pfwAdd" + + res, err := c.client.DecortApiCall(ctx, http.MethodPost, url, reqWrapped) + if err != nil { + return "", err + } + + return string(res), nil +} diff --git a/pkg/cloudbroker/compute/pfw_del.go b/pkg/cloudbroker/compute/pfw_del.go index d61a553..8578f77 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // PFWDelRequest struct to delete port forward rule @@ -38,6 +38,12 @@ type PFWDelRequest struct { Proto string `url:"proto,omitempty" json:"proto,omitempty" validate:"omitempty,proto"` } +type wrapperPFWDelRequest struct { + PFWDelRequest + + AsyncMode bool `url:"asyncMode"` +} + // PFWDel deletes port forward rule func (c Compute) PFWDel(ctx context.Context, req PFWDelRequest) (bool, error) { err := validators.ValidateRequest(req) @@ -45,9 +51,14 @@ func (c Compute) PFWDel(ctx context.Context, req PFWDelRequest) (bool, error) { return false, validators.ValidationErrors(validators.GetErrors(err)) } + reqWrapped := wrapperPFWDelRequest{ + PFWDelRequest: req, + AsyncMode: false, + } + url := "/cloudbroker/compute/pfwDel" - res, err := c.client.DecortApiCall(ctx, http.MethodPost, url, req) + res, err := c.client.DecortApiCall(ctx, http.MethodPost, url, reqWrapped) if err != nil { return false, err } @@ -59,3 +70,25 @@ func (c Compute) PFWDel(ctx context.Context, req PFWDelRequest) (bool, error) { return result, nil } + +// PFWDelAsync deletes port forward rule with AsyncMode +func (c Compute) PFWDelAsync(ctx context.Context, req PFWDelRequest) (string, error) { + err := validators.ValidateRequest(req) + if err != nil { + return "", validators.ValidationErrors(validators.GetErrors(err)) + } + + reqWrapped := wrapperPFWDelRequest{ + PFWDelRequest: req, + AsyncMode: true, + } + + url := "/cloudbroker/compute/pfwDel" + + res, err := c.client.DecortApiCall(ctx, http.MethodPost, url, reqWrapped) + if err != nil { + return "", err + } + + return string(res), nil +} diff --git a/pkg/cloudbroker/compute/pfw_list.go b/pkg/cloudbroker/compute/pfw_list.go index 0ca6c0e..997d5a7 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 c030141..2afc6c2 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // PinToNodeRequest struct to pin compute to node @@ -28,6 +28,12 @@ type PinToNodeRequest struct { AutoStart bool `url:"autoStart" json:"autoStart"` } +type wrapperPinToNodeRequest struct { + PinToNodeRequest + + AsyncMode bool `url:"asyncMode"` +} + // PinToNode pins compute to current node func (c Compute) PinToNode(ctx context.Context, req PinToNodeRequest) (uint64, error) { err := validators.ValidateRequest(req) @@ -35,9 +41,14 @@ func (c Compute) PinToNode(ctx context.Context, req PinToNodeRequest) (uint64, e return 0, validators.ValidationErrors(validators.GetErrors(err)) } + reqWrapped := wrapperPinToNodeRequest{ + PinToNodeRequest: req, + AsyncMode: false, + } + url := "/cloudbroker/compute/pin_to_node" - res, err := c.client.DecortApiCall(ctx, http.MethodPost, url, req) + res, err := c.client.DecortApiCall(ctx, http.MethodPost, url, reqWrapped) if err != nil { return 0, err } @@ -49,3 +60,25 @@ func (c Compute) PinToNode(ctx context.Context, req PinToNodeRequest) (uint64, e return result, nil } + +// PinToNodeAsync pins compute to current node with AsyncMode +func (c Compute) PinToNodeAsync(ctx context.Context, req PinToNodeRequest) (string, error) { + err := validators.ValidateRequest(req) + if err != nil { + return "", validators.ValidationErrors(validators.GetErrors(err)) + } + + reqWrapped := wrapperPinToNodeRequest{ + PinToNodeRequest: req, + AsyncMode: true, + } + + url := "/cloudbroker/compute/pin_to_node" + + res, err := c.client.DecortApiCall(ctx, http.MethodPost, url, reqWrapped) + if err != nil { + return "", err + } + + return string(res), nil +} diff --git a/pkg/cloudbroker/compute/power_cycle.go b/pkg/cloudbroker/compute/power_cycle.go index f7fb271..3d1a105 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // PowerCycleRequest struct to force stop and start compute @@ -15,6 +15,12 @@ type PowerCycleRequest struct { ComputeID uint64 `url:"computeId" json:"computeId" validate:"required"` } +type wrapperPowerCycleRequest struct { + PowerCycleRequest + + AsyncMode bool `url:"asyncMode"` +} + // PowerCycle makes force stop and start compute func (c Compute) PowerCycle(ctx context.Context, req PowerCycleRequest) (bool, error) { err := validators.ValidateRequest(req) @@ -22,9 +28,14 @@ func (c Compute) PowerCycle(ctx context.Context, req PowerCycleRequest) (bool, e return false, validators.ValidationErrors(validators.GetErrors(err)) } + reqWrapped := wrapperPowerCycleRequest{ + PowerCycleRequest: req, + AsyncMode: false, + } + url := "/cloudbroker/compute/powerCycle" - res, err := c.client.DecortApiCall(ctx, http.MethodPost, url, req) + res, err := c.client.DecortApiCall(ctx, http.MethodPost, url, reqWrapped) if err != nil { return false, err } @@ -36,3 +47,25 @@ func (c Compute) PowerCycle(ctx context.Context, req PowerCycleRequest) (bool, e return result, nil } + +// PowerCycleAsync makes force stop and start compute with AsyncMode +func (c Compute) PowerCycleAsync(ctx context.Context, req PowerCycleRequest) (string, error) { + err := validators.ValidateRequest(req) + if err != nil { + return "", validators.ValidationErrors(validators.GetErrors(err)) + } + + reqWrapped := wrapperPowerCycleRequest{ + PowerCycleRequest: req, + AsyncMode: true, + } + + url := "/cloudbroker/compute/powerCycle" + + res, err := c.client.DecortApiCall(ctx, http.MethodPost, url, reqWrapped) + if err != nil { + return "", err + } + + return string(res), nil +} diff --git a/pkg/cloudbroker/compute/raise_down.go b/pkg/cloudbroker/compute/raise_down.go index 53f1d78..fa300c7 100644 --- a/pkg/cloudbroker/compute/raise_down.go +++ b/pkg/cloudbroker/compute/raise_down.go @@ -6,11 +6,17 @@ import ( "strconv" ) +type wrapperRaiseDownRequest struct { + AsyncMode bool `url:"asyncMode"` +} + // RaiseDown starting all computes in "DOWN" tech status func (c Compute) RaiseDown(ctx context.Context) (bool, error) { + reqWrapped := wrapperRaiseDownRequest{AsyncMode: false} + url := "/cloudbroker/compute/raiseDown" - res, err := c.client.DecortApiCall(ctx, http.MethodPost, url, nil) + res, err := c.client.DecortApiCall(ctx, http.MethodPost, url, reqWrapped) if err != nil { return false, err } @@ -22,3 +28,17 @@ func (c Compute) RaiseDown(ctx context.Context) (bool, error) { return result, nil } + +// RaiseDownAsync starting all computes in "DOWN" tech status with AsyncMode +func (c Compute) RaiseDownAsync(ctx context.Context) (string, error) { + reqWrapped := wrapperRaiseDownRequest{AsyncMode: true} + + url := "/cloudbroker/compute/raiseDown" + + res, err := c.client.DecortApiCall(ctx, http.MethodPost, url, reqWrapped) + if err != nil { + return "", err + } + + return string(res), nil +} diff --git a/pkg/cloudbroker/compute/reboot.go b/pkg/cloudbroker/compute/reboot.go index bc6f897..a06ca0b 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // RebootRequest struct to reboot compute @@ -15,6 +15,12 @@ type RebootRequest struct { ComputeID uint64 `url:"computeId" json:"computeId" validate:"required"` } +type wrapperRebootRequest struct { + RebootRequest + + AsyncMode bool `url:"asyncMode"` +} + // Reboot reboots compute func (c Compute) Reboot(ctx context.Context, req RebootRequest) (bool, error) { err := validators.ValidateRequest(req) @@ -22,9 +28,14 @@ func (c Compute) Reboot(ctx context.Context, req RebootRequest) (bool, error) { return false, validators.ValidationErrors(validators.GetErrors(err)) } + reqWrapped := wrapperRebootRequest{ + RebootRequest: req, + AsyncMode: false, + } + url := "/cloudbroker/compute/reboot" - res, err := c.client.DecortApiCall(ctx, http.MethodPost, url, req) + res, err := c.client.DecortApiCall(ctx, http.MethodPost, url, reqWrapped) if err != nil { return false, err } @@ -36,3 +47,25 @@ func (c Compute) Reboot(ctx context.Context, req RebootRequest) (bool, error) { return result, nil } + +// RebootAsync reboots compute with AsyncMode +func (c Compute) RebootAsync(ctx context.Context, req RebootRequest) (string, error) { + err := validators.ValidateRequest(req) + if err != nil { + return "", validators.ValidationErrors(validators.GetErrors(err)) + } + + reqWrapped := wrapperRebootRequest{ + RebootRequest: req, + AsyncMode: true, + } + + url := "/cloudbroker/compute/reboot" + + res, err := c.client.DecortApiCall(ctx, http.MethodPost, url, reqWrapped) + if err != nil { + return "", err + } + + return string(res), nil +} diff --git a/pkg/cloudbroker/compute/redeploy.go b/pkg/cloudbroker/compute/redeploy.go index 7502dec..3953eac 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // RedeployRequest struct for redeploy @@ -47,6 +47,12 @@ type RedeployRequest struct { ForceStop bool `url:"forceStop,omitempty" json:"forceStop,omitempty"` } +type wrapperRedeployRequest struct { + RedeployRequest + + AsyncMode bool `url:"asyncMode"` +} + // Redeploy redeploys compute func (c Compute) Redeploy(ctx context.Context, req RedeployRequest) (bool, error) { err := validators.ValidateRequest(req) @@ -54,9 +60,14 @@ func (c Compute) Redeploy(ctx context.Context, req RedeployRequest) (bool, error return false, validators.ValidationErrors(validators.GetErrors(err)) } + reqWrapped := wrapperRedeployRequest{ + RedeployRequest: req, + AsyncMode: false, + } + url := "/cloudbroker/compute/redeploy" - res, err := c.client.DecortApiCall(ctx, http.MethodPost, url, req) + res, err := c.client.DecortApiCall(ctx, http.MethodPost, url, reqWrapped) if err != nil { return false, err } @@ -68,3 +79,25 @@ func (c Compute) Redeploy(ctx context.Context, req RedeployRequest) (bool, error return result, nil } + +// RedeployAsync redeploys compute with AsyncMode +func (c Compute) RedeployAsync(ctx context.Context, req RedeployRequest) (string, error) { + err := validators.ValidateRequest(req) + if err != nil { + return "", validators.ValidationErrors(validators.GetErrors(err)) + } + + reqWrapped := wrapperRedeployRequest{ + RedeployRequest: req, + AsyncMode: true, + } + + url := "/cloudbroker/compute/redeploy" + + res, err := c.client.DecortApiCall(ctx, http.MethodPost, url, reqWrapped) + if err != nil { + return "", err + } + + return string(res), nil +} diff --git a/pkg/cloudbroker/compute/reset.go b/pkg/cloudbroker/compute/reset.go index 220df78..305916f 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // ResetRequest struct to reset compute @@ -15,6 +15,12 @@ type ResetRequest struct { ComputeID uint64 `url:"computeId" json:"computeId" validate:"required"` } +type wrapperResetRequest struct { + ResetRequest + + AsyncMode bool `url:"asyncMode"` +} + // Reset resets compute func (c Compute) Reset(ctx context.Context, req ResetRequest) (bool, error) { err := validators.ValidateRequest(req) @@ -22,9 +28,14 @@ func (c Compute) Reset(ctx context.Context, req ResetRequest) (bool, error) { return false, validators.ValidationErrors(validators.GetErrors(err)) } + reqWrapped := wrapperResetRequest{ + ResetRequest: req, + AsyncMode: false, + } + url := "/cloudbroker/compute/reset" - res, err := c.client.DecortApiCall(ctx, http.MethodPost, url, req) + res, err := c.client.DecortApiCall(ctx, http.MethodPost, url, reqWrapped) if err != nil { return false, err } @@ -36,3 +47,25 @@ func (c Compute) Reset(ctx context.Context, req ResetRequest) (bool, error) { return result, nil } + +// ResetAsync resets compute with AsyncMode +func (c Compute) ResetAsync(ctx context.Context, req ResetRequest) (string, error) { + err := validators.ValidateRequest(req) + if err != nil { + return "", validators.ValidationErrors(validators.GetErrors(err)) + } + + reqWrapped := wrapperResetRequest{ + ResetRequest: req, + AsyncMode: true, + } + + url := "/cloudbroker/compute/reset" + + res, err := c.client.DecortApiCall(ctx, http.MethodPost, url, reqWrapped) + if err != nil { + return "", err + } + + return string(res), nil +} diff --git a/pkg/cloudbroker/compute/resize.go b/pkg/cloudbroker/compute/resize.go index 2fd14d9..1a5fa47 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // ResizeRequest struct to resize compute @@ -43,6 +43,12 @@ func (r ResizeRequest) GetRAM() map[string]uint64 { return res } +type wrapperResizeRequest struct { + ResizeRequest + + AsyncMode bool `url:"asyncMode"` +} + // Resize resizes compute instance func (c Compute) Resize(ctx context.Context, req ResizeRequest) (bool, error) { err := validators.ValidateRequest(req) @@ -50,9 +56,14 @@ func (c Compute) Resize(ctx context.Context, req ResizeRequest) (bool, error) { return false, validators.ValidationErrors(validators.GetErrors(err)) } + reqWrapped := wrapperResizeRequest{ + ResizeRequest: req, + AsyncMode: false, + } + url := "/cloudbroker/compute/resize" - res, err := c.client.DecortApiCall(ctx, http.MethodPost, url, req) + res, err := c.client.DecortApiCall(ctx, http.MethodPost, url, reqWrapped) if err != nil { return false, err } @@ -64,3 +75,25 @@ func (c Compute) Resize(ctx context.Context, req ResizeRequest) (bool, error) { return result, nil } + +// ResizeAsync resizes compute instance with AsyncMode +func (c Compute) ResizeAsync(ctx context.Context, req ResizeRequest) (string, error) { + err := validators.ValidateRequest(req) + if err != nil { + return "", validators.ValidationErrors(validators.GetErrors(err)) + } + + reqWrapped := wrapperResizeRequest{ + ResizeRequest: req, + AsyncMode: true, + } + + url := "/cloudbroker/compute/resize" + + res, err := c.client.DecortApiCall(ctx, http.MethodPost, url, reqWrapped) + if err != nil { + return "", err + } + + return string(res), nil +} diff --git a/pkg/cloudbroker/compute/restore.go b/pkg/cloudbroker/compute/restore.go index 51a7a2c..461eaca 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // RestoreRequest struct to restore compute @@ -15,6 +15,12 @@ type RestoreRequest struct { ComputeID uint64 `url:"computeId" json:"computeId" validate:"required"` } +type wrapperRestoreRequest struct { + RestoreRequest + + AsyncMode bool `url:"asyncMode"` +} + // Restore restores compute from recycle bin func (c Compute) Restore(ctx context.Context, req RestoreRequest) (bool, error) { err := validators.ValidateRequest(req) @@ -22,9 +28,14 @@ func (c Compute) Restore(ctx context.Context, req RestoreRequest) (bool, error) return false, validators.ValidationErrors(validators.GetErrors(err)) } + reqWrapped := wrapperRestoreRequest{ + RestoreRequest: req, + AsyncMode: false, + } + url := "/cloudbroker/compute/restore" - res, err := c.client.DecortApiCall(ctx, http.MethodPost, url, req) + res, err := c.client.DecortApiCall(ctx, http.MethodPost, url, reqWrapped) if err != nil { return false, err } @@ -36,3 +47,25 @@ func (c Compute) Restore(ctx context.Context, req RestoreRequest) (bool, error) return result, nil } + +// RestoreAsync restores compute from recycle bin with AsyncMode +func (c Compute) RestoreAsync(ctx context.Context, req RestoreRequest) (string, error) { + err := validators.ValidateRequest(req) + if err != nil { + return "", validators.ValidationErrors(validators.GetErrors(err)) + } + + reqWrapped := wrapperRestoreRequest{ + RestoreRequest: req, + AsyncMode: true, + } + + url := "/cloudbroker/compute/restore" + + res, err := c.client.DecortApiCall(ctx, http.MethodPost, url, reqWrapped) + if err != nil { + return "", err + } + + return string(res), nil +} diff --git a/pkg/cloudbroker/compute/resume.go b/pkg/cloudbroker/compute/resume.go index 34bfe4e..194994c 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // ResumeRequest struct to resume compute @@ -15,6 +15,12 @@ type ResumeRequest struct { ComputeID uint64 `url:"computeId" json:"computeId" validate:"required"` } +type wrapperResumeRequest struct { + ResumeRequest + + AsyncMode bool `url:"asyncMode"` +} + // Resume resumes Compute from paused state func (c Compute) Resume(ctx context.Context, req ResumeRequest) (bool, error) { err := validators.ValidateRequest(req) @@ -22,9 +28,14 @@ func (c Compute) Resume(ctx context.Context, req ResumeRequest) (bool, error) { return false, validators.ValidationErrors(validators.GetErrors(err)) } + reqWrapped := wrapperResumeRequest{ + ResumeRequest: req, + AsyncMode: false, + } + url := "/cloudbroker/compute/resume" - res, err := c.client.DecortApiCall(ctx, http.MethodPost, url, req) + res, err := c.client.DecortApiCall(ctx, http.MethodPost, url, reqWrapped) if err != nil { return false, err } @@ -36,3 +47,25 @@ func (c Compute) Resume(ctx context.Context, req ResumeRequest) (bool, error) { return result, nil } + +// ResumeAsync resumes Compute from paused state with AsyncMode +func (c Compute) ResumeAsync(ctx context.Context, req ResumeRequest) (string, error) { + err := validators.ValidateRequest(req) + if err != nil { + return "", validators.ValidationErrors(validators.GetErrors(err)) + } + + reqWrapped := wrapperResumeRequest{ + ResumeRequest: req, + AsyncMode: true, + } + + url := "/cloudbroker/compute/resume" + + res, err := c.client.DecortApiCall(ctx, http.MethodPost, url, reqWrapped) + if err != nil { + return "", err + } + + return string(res), nil +} diff --git a/pkg/cloudbroker/compute/serialize.go b/pkg/cloudbroker/compute/serialize.go index cb92d09..2eb4c22 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/v14/internal/serialization" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 new file mode 100644 index 0000000..36b0545 --- /dev/null +++ b/pkg/cloudbroker/compute/set_cpu_alignment_profile.go @@ -0,0 +1,43 @@ +package compute + +import ( + "context" + "net/http" + "strconv" + + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/constants" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" +) + +// SetCPUAlignmentProfileRequest struct to set CPU alignment profile for computes +type SetCPUAlignmentProfileRequest struct { + // IDs of the compute instances + // Required: true + ComputeIDs []int64 `url:"compute_ids" json:"compute_ids" validate:"min=1"` + + // CPU alignment profile name + // Required: true + CPUAlignmentProfile string `url:"cpu_alignment_profile" json:"cpu_alignment_profile" validate:"required"` +} + +// SetCPUAlignmentProfile sets CPU alignment profile for computes +func (c Compute) SetCPUAlignmentProfile(ctx context.Context, req SetCPUAlignmentProfileRequest) (bool, error) { + err := validators.ValidateRequest(req) + if err != nil { + return false, validators.ValidationErrors(validators.GetErrors(err)) + } + + url := "/cloudbroker/compute/set_cpu_alignment_profile" + + res, err := c.client.DecortApiCallCtype(ctx, http.MethodPost, 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/compute/set_custom_fields.go b/pkg/cloudbroker/compute/set_custom_fields.go index 67c4d0d..f930744 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 4f44937..f4e542a 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 39f10c0..31d443b 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 24532e9..ff00895 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // SnapshotCreateRequest struct to create snapshot @@ -20,6 +20,16 @@ type SnapshotCreateRequest struct { // Maximum length: 36 characters // Required: true Label string `url:"label" json:"label" validate:"required,max=36,excludesall=<>"` + + // Create snapshot with memory dump + // Required: false + // Default: false + WithMemory bool `url:"with_memory" json:"with_memory"` +} + +type wrapperSnapshotCreateRequest struct { + SnapshotCreateRequest + AsyncMode bool `url:"asyncMode"` } // SnapshotCreate creates compute snapshot @@ -29,9 +39,14 @@ func (c Compute) SnapshotCreate(ctx context.Context, req SnapshotCreateRequest) return "", validators.ValidationErrors(validators.GetErrors(err)) } + reqWrapped := wrapperSnapshotCreateRequest{ + SnapshotCreateRequest: req, + AsyncMode: false, + } + url := "/cloudbroker/compute/snapshotCreate" - res, err := c.client.DecortApiCall(ctx, http.MethodPost, url, req) + res, err := c.client.DecortApiCall(ctx, http.MethodPost, url, reqWrapped) if err != nil { return "", err } @@ -40,3 +55,25 @@ func (c Compute) SnapshotCreate(ctx context.Context, req SnapshotCreateRequest) return result, nil } + +// SnapshotCreateAsync creates compute snapshot in async mode +func (c Compute) SnapshotCreateAsync(ctx context.Context, req SnapshotCreateRequest) (string, error) { + err := validators.ValidateRequest(req) + if err != nil { + return "", validators.ValidationErrors(validators.GetErrors(err)) + } + + reqWrapped := wrapperSnapshotCreateRequest{ + SnapshotCreateRequest: req, + AsyncMode: true, + } + + url := "/cloudbroker/compute/snapshotCreate" + + res, err := c.client.DecortApiCall(ctx, http.MethodPost, url, reqWrapped) + if err != nil { + return "", err + } + + return string(res), nil +} diff --git a/pkg/cloudbroker/compute/snapshot_delete.go b/pkg/cloudbroker/compute/snapshot_delete.go index 48cca13..4a39402 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 a8cbc8a..ebb4155 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 87048e2..10d030e 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 0190fc4..cea878c 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // SnapshotRollbackRequest struct for rollback @@ -17,6 +17,20 @@ type SnapshotRollbackRequest struct { // Text label of snapshot to rollback // Required: true Label string `url:"label" json:"label" validate:"required"` + + // Rollback with memory dump restore + // Required: false + // Default: true + WithMemory interface{} `url:"with_memory,omitempty" json:"with_memory,omitempty" validate:"omitempty,isBool"` + + // ID of the node to rollback on + // Required: false + NodeID uint64 `url:"node_id,omitempty" json:"node_id,omitempty"` +} + +type wrapperSnapshotRollbackRequest struct { + SnapshotRollbackRequest + AsyncMode bool `url:"asyncMode"` } // SnapshotRollback rollbacks specified compute snapshot @@ -26,9 +40,14 @@ func (c Compute) SnapshotRollback(ctx context.Context, req SnapshotRollbackReque return false, validators.ValidationErrors(validators.GetErrors(err)) } + reqWrapped := wrapperSnapshotRollbackRequest{ + SnapshotRollbackRequest: req, + AsyncMode: false, + } + url := "/cloudbroker/compute/snapshotRollback" - res, err := c.client.DecortApiCall(ctx, http.MethodPost, url, req) + res, err := c.client.DecortApiCall(ctx, http.MethodPost, url, reqWrapped) if err != nil { return false, err } @@ -40,3 +59,25 @@ func (c Compute) SnapshotRollback(ctx context.Context, req SnapshotRollbackReque return result, nil } + +// SnapshotRollbackAsync rollbacks specified compute snapshot in async mode +func (c Compute) SnapshotRollbackAsync(ctx context.Context, req SnapshotRollbackRequest) (string, error) { + err := validators.ValidateRequest(req) + if err != nil { + return "", validators.ValidationErrors(validators.GetErrors(err)) + } + + reqWrapped := wrapperSnapshotRollbackRequest{ + SnapshotRollbackRequest: req, + AsyncMode: true, + } + + url := "/cloudbroker/compute/snapshotRollback" + + res, err := c.client.DecortApiCall(ctx, http.MethodPost, url, reqWrapped) + if err != nil { + return "", err + } + + return string(res), nil +} diff --git a/pkg/cloudbroker/compute/snapshot_usage.go b/pkg/cloudbroker/compute/snapshot_usage.go index 08cefa5..6a735ba 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 747a264..f1d38df 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // StartRequest struct to start compute @@ -23,6 +23,12 @@ type StartRequest struct { NodeID uint64 `url:"node_id,omitempty" json:"node_id,omitempty"` } +type wrapperStartRequest struct { + StartRequest + + AsyncMode bool `url:"asyncMode"` +} + // Start starts compute func (c Compute) Start(ctx context.Context, req StartRequest) (bool, error) { err := validators.ValidateRequest(req) @@ -30,9 +36,14 @@ func (c Compute) Start(ctx context.Context, req StartRequest) (bool, error) { return false, validators.ValidationErrors(validators.GetErrors(err)) } + reqWrapped := wrapperStartRequest{ + StartRequest: req, + AsyncMode: false, + } + url := "/cloudbroker/compute/start" - res, err := c.client.DecortApiCall(ctx, http.MethodPost, url, req) + res, err := c.client.DecortApiCall(ctx, http.MethodPost, url, reqWrapped) if err != nil { return false, err } @@ -44,3 +55,25 @@ func (c Compute) Start(ctx context.Context, req StartRequest) (bool, error) { return result, nil } + +// StartAsync starts compute with AsyncMode +func (c Compute) StartAsync(ctx context.Context, req StartRequest) (string, error) { + err := validators.ValidateRequest(req) + if err != nil { + return "", validators.ValidationErrors(validators.GetErrors(err)) + } + + reqWrapped := wrapperStartRequest{ + StartRequest: req, + AsyncMode: true, + } + + url := "/cloudbroker/compute/start" + + res, err := c.client.DecortApiCall(ctx, http.MethodPost, url, reqWrapped) + if err != nil { + return "", err + } + + return string(res), nil +} diff --git a/pkg/cloudbroker/compute/start_migration_in.go b/pkg/cloudbroker/compute/start_migration_in.go index 8d1d701..7b6e26f 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 4867a1d..7b0e54e 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/v14/internal/constants" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/constants" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 73c599d..377457c 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // StopRequest struct to stop compute @@ -19,6 +19,12 @@ type StopRequest struct { Force bool `url:"force,omitempty" json:"force,omitempty"` } +type wrapperStopRequest struct { + StopRequest + + AsyncMode bool `url:"asyncMode"` +} + // Stop stops compute func (c Compute) Stop(ctx context.Context, req StopRequest) (bool, error) { err := validators.ValidateRequest(req) @@ -26,9 +32,14 @@ func (c Compute) Stop(ctx context.Context, req StopRequest) (bool, error) { return false, validators.ValidationErrors(validators.GetErrors(err)) } + reqWrapped := wrapperStopRequest{ + StopRequest: req, + AsyncMode: false, + } + url := "/cloudbroker/compute/stop" - res, err := c.client.DecortApiCall(ctx, http.MethodPost, url, req) + res, err := c.client.DecortApiCall(ctx, http.MethodPost, url, reqWrapped) if err != nil { return false, err } @@ -40,3 +51,25 @@ func (c Compute) Stop(ctx context.Context, req StopRequest) (bool, error) { return result, nil } + +// StopAsync stops compute with AsyncMode +func (c Compute) StopAsync(ctx context.Context, req StopRequest) (string, error) { + err := validators.ValidateRequest(req) + if err != nil { + return "", validators.ValidationErrors(validators.GetErrors(err)) + } + + reqWrapped := wrapperStopRequest{ + StopRequest: req, + AsyncMode: true, + } + + url := "/cloudbroker/compute/stop" + + res, err := c.client.DecortApiCall(ctx, http.MethodPost, url, reqWrapped) + if err != nil { + return "", err + } + + return string(res), nil +} diff --git a/pkg/cloudbroker/compute/stop_migration_in.go b/pkg/cloudbroker/compute/stop_migration_in.go index 46166f6..a2481cb 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/v14/internal/constants" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/constants" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 724974d..4e16a8e 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/v14/internal/constants" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/constants" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 3f7339c..f896c51 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 ca5a37d..c2c0f23 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 704ec02..0f02806 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // UnpinFromNodeRequest struct to unpin from node diff --git a/pkg/cloudbroker/compute/update.go b/pkg/cloudbroker/compute/update.go index 7b5d949..1d64c8a 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // UpdateRequest struct to update compute @@ -73,6 +73,11 @@ type UpdateRequest struct { // Priority weight of the compute: higher value means higher priority and later migration // Required: false Weight uint64 `url:"weight,omitempty" json:"weight,omitempty"` + + // Clock type for the VM + // Required: false + // Default: null + Clock string `url:"clock,omitempty" json:"clock,omitempty"` } // Update updates some properties of the compute diff --git a/pkg/cloudbroker/compute/user_grant.go b/pkg/cloudbroker/compute/user_grant.go index 7972566..4afa965 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 45bd163..4570f23 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 256c6d5..6d86bf0 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 00f6233..130d234 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // UserUpdateRequest struct to update user access diff --git a/pkg/cloudbroker/disks.go b/pkg/cloudbroker/disks.go index de13db7..ad4014b 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/v14/pkg/cloudbroker/disks" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 468fd77..b231577 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 c6673df..29bca57 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // CreateRequest struct to create disk @@ -42,9 +42,9 @@ type CreateRequest struct { // Required: false Cache string `url:"cache,omitempty" json:"cache,omitempty"` - // BLK Discard + // Discard // Required: false - BLKDiscard interface{} `url:"blkdiscard,omitempty" json:"blkdiscard,omitempty" validate:"omitempty,isBool"` + Discard string `url:"discard,omitempty" json:"discard,omitempty"` } // Create creates a disk diff --git a/pkg/cloudbroker/disks/delete.go b/pkg/cloudbroker/disks/delete.go index 243ed3b..f5edad4 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // DeleteRequest struct to delete disk diff --git a/pkg/cloudbroker/disks/delete_disks.go b/pkg/cloudbroker/disks/delete_disks.go index 3ace586..32d2e1d 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // DeleteDisksRequest struct for multiple disks diff --git a/pkg/cloudbroker/disks/depresent.go b/pkg/cloudbroker/disks/depresent.go index 454bc0f..511d595 100644 --- a/pkg/cloudbroker/disks/depresent.go +++ b/pkg/cloudbroker/disks/depresent.go @@ -3,7 +3,7 @@ package disks import ( "context" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" "strconv" ) diff --git a/pkg/cloudbroker/disks/disks.go b/pkg/cloudbroker/disks/disks.go index 375a360..d7c3a50 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/v14/interfaces" +import "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 1cbd572..817dc1a 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/v14/interfaces" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v14/pkg/cloudbroker/k8s" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v14/pkg/cloudbroker/lb" + "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" ) // 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 52f6fef..1826b95 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 1533a16..f3a8515 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 9d06cae..3b13961 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // LimitIORequest struct for limit IO diff --git a/pkg/cloudbroker/disks/list.go b/pkg/cloudbroker/disks/list.go index ce8388e..e55deb7 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // ListRequest struct to get list/list_deleted of disks diff --git a/pkg/cloudbroker/disks/list_deleted.go b/pkg/cloudbroker/disks/list_deleted.go index 88d514f..858e5df 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 25c2a5f..d49fd98 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 db09cf9..ad3aeea 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // Migrate struct to move disk to another sep, pool and storage policy @@ -21,9 +21,9 @@ type MigrateRequest struct { // Required: true PoolName string `url:"pool_name" json:"pool_name" validate:"required"` - // ID if the storage policy - // Required: false - StoragePolicyID uint64 `url:"storage_policy_id,omitempty" json:"storage_policy_id,omitempty"` + // ID of the storage policy + // Required: true + StoragePolicyID uint64 `url:"storage_policy_id" json:"storage_policy_id" validate:"required"` } // Move moves disk to another sep, pool and storage policy diff --git a/pkg/cloudbroker/disks/migrate_abort.go b/pkg/cloudbroker/disks/migrate_abort.go index 2c9a440..af30e44 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // MigrateAbortRequest struct to abort migration diff --git a/pkg/cloudbroker/disks/migrate_status.go b/pkg/cloudbroker/disks/migrate_status.go index 89f804a..c17bc5b 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // GetMigrateStatusRequest struct to get information about disk migrate status diff --git a/pkg/cloudbroker/disks/models.go b/pkg/cloudbroker/disks/models.go index 59d25c0..1a4c973 100644 --- a/pkg/cloudbroker/disks/models.go +++ b/pkg/cloudbroker/disks/models.go @@ -53,8 +53,8 @@ type InfoDisk struct { // Access Control Control ACL map[string]interface{} `json:"acl"` - // BLK Discard - BLKDiscard bool `json:"blkdiscard"` + // Discard + Discard string `json:"discard"` // Block size of disk BlockSize string `json:"block_size"` @@ -65,6 +65,9 @@ type InfoDisk struct { // Computes Computes map[string]string `json:"computes"` + // Computes read only + ComputesReadOnly map[string]bool `json:"computes_read_only"` + // Created time CreatedTime uint64 `json:"createdTime"` diff --git a/pkg/cloudbroker/disks/present.go b/pkg/cloudbroker/disks/present.go index ff721a1..fe2149e 100644 --- a/pkg/cloudbroker/disks/present.go +++ b/pkg/cloudbroker/disks/present.go @@ -3,7 +3,7 @@ package disks import ( "context" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" "strconv" ) diff --git a/pkg/cloudbroker/disks/rename.go b/pkg/cloudbroker/disks/rename.go index c94db64..4685192 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // RenameRequest struct to rename disk diff --git a/pkg/cloudbroker/disks/replicate.go b/pkg/cloudbroker/disks/replicate.go index a5b4d81..ff4182a 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 c1b040a..b321284 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 9e01de4..7217ca1 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 63a541d..2bd1b7d 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 cd61f16..e403722 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 65b3639..ce80a4b 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 ef3b858..0af9e72 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 7ce57e2..7f745ae 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // ResizeRequest struct to resize disk diff --git a/pkg/cloudbroker/disks/restore.go b/pkg/cloudbroker/disks/restore.go index 456223e..10f1e5e 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 fae571b..3b5b569 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/v14/internal/serialization" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 20c8211..39eedb3 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 5c20936..d41e263 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // SnapshotDeleteRequest struct to delete snapshot diff --git a/pkg/cloudbroker/disks/snapshot_rollback.go b/pkg/cloudbroker/disks/snapshot_rollback.go index ac4389e..4f6ef73 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // SnapshotRollbackRequest struct to rollback snapshot diff --git a/pkg/cloudbroker/disks/unshare.go b/pkg/cloudbroker/disks/unshare.go index ac03628..63f918c 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // UnshareRequest struct to unshare data disk diff --git a/pkg/cloudbroker/disks/update.go b/pkg/cloudbroker/disks/update.go index a9cf9db..996a2b2 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // UpdateRequest struct to update disk @@ -18,9 +18,9 @@ type UpdateRequest struct { // Required: false Cache string `url:"cache,omitempty" json:"cache,omitempty"` - // BLK Discard + // Discard // Required: false - BLKDiscard interface{} `url:"blkdiscard,omitempty" json:"blkdiscard,omitempty" validate:"omitempty,isBool"` + Discard string `url:"discard,omitempty" json:"discard,omitempty"` // Block size of disk // Required: false diff --git a/pkg/cloudbroker/dpdk.go b/pkg/cloudbroker/dpdk.go index a2670ab..e5f5682 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/v14/pkg/cloudbroker/dpdknet" +import "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 b3a5f7c..666fb8c 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // CreateRequest struct to create DPDK network diff --git a/pkg/cloudbroker/dpdknet/delete.go b/pkg/cloudbroker/dpdknet/delete.go index 361194e..b63fa20 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // DeleteRequest struct to delete DPDK network diff --git a/pkg/cloudbroker/dpdknet/disable.go b/pkg/cloudbroker/dpdknet/disable.go index 854f354..b9d5633 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // DisableRequest struct to disable DPDK network diff --git a/pkg/cloudbroker/dpdknet/dpdk.go b/pkg/cloudbroker/dpdknet/dpdk.go index fefd604..84a4c3d 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/v14/interfaces" +import "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 04984bf..d5fccbc 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // EnableRequest struct to enable DPDK network diff --git a/pkg/cloudbroker/dpdknet/get.go b/pkg/cloudbroker/dpdknet/get.go index be2a885..ba7e17b 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 ea797cc..186730f 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 c5305f4..a44aebb 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // UpdateRequest struct to update DPDK network diff --git a/pkg/cloudbroker/extnet.go b/pkg/cloudbroker/extnet.go index 8d5e849..a271d79 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/v14/pkg/cloudbroker/extnet" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 23c269f..653e670 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // AccessAddRequest struct to grant access diff --git a/pkg/cloudbroker/extnet/access_remove.go b/pkg/cloudbroker/extnet/access_remove.go index b759cd1..c3445ee 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 a3d7bfb..fe1d3b3 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 ed6923d..e830233 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) type Route struct { diff --git a/pkg/cloudbroker/extnet/default_qos_update.go b/pkg/cloudbroker/extnet/default_qos_update.go index cb187a5..aca2942 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 0165c26..82009a2 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 349f4b9..8d4bb89 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // DestroyRequest struct for destroy diff --git a/pkg/cloudbroker/extnet/device_deploy.go b/pkg/cloudbroker/extnet/device_deploy.go index 42e3252..348048f 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 b28db8c..2e93cba 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // DeviceMigrateRequest struct for migrate VNF diff --git a/pkg/cloudbroker/extnet/device_remove.go b/pkg/cloudbroker/extnet/device_remove.go index 724d84b..60d1741 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 8681242..886490d 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // DeviceRestartRequest struct for restart VNF device diff --git a/pkg/cloudbroker/extnet/disable.go b/pkg/cloudbroker/extnet/disable.go index 39d39b8..5e1ee87 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 a244ef6..736d5e8 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // DNSApplyRequest struct to set new DNS diff --git a/pkg/cloudbroker/extnet/enable.go b/pkg/cloudbroker/extnet/enable.go index 36a5766..9062cc5 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // EnableRequest struct to enable external network diff --git a/pkg/cloudbroker/extnet/extnet.go b/pkg/cloudbroker/extnet/extnet.go index 565ca27..bdf6a73 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/v14/interfaces" +import "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 005d666..e68395e 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 ba3ee55..d0f5cc7 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 dc73ffb..02863a9 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 9a52875..f271b76 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 486a10d..d46d28a 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 f6ee813..c489db3 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // IPsIncludeRangeRequest struct to include range of IPs diff --git a/pkg/cloudbroker/extnet/list.go b/pkg/cloudbroker/extnet/list.go index c6576f9..5075ccc 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 1af67a5..91810f4 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 05ed2ac..d2d5f82 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // NTPApplyRequest struct for set new NTP diff --git a/pkg/cloudbroker/extnet/serialize.go b/pkg/cloudbroker/extnet/serialize.go index 3eb0396..764caa5 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/v14/internal/serialization" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 d8e97ba..6b9cda0 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 b6a7040..2f48def 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 437af43..145979d 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 90f71e1..5b367d5 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 02079f1..c59ea40 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 5ad83e0..c432600 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 0c90d69..41764db 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // StaticRouteListRequest struct for static route list diff --git a/pkg/cloudbroker/extnet/update.go b/pkg/cloudbroker/extnet/update.go index f06caf7..ec9d10f 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // UpdateRequest struct to update external network diff --git a/pkg/cloudbroker/flipgoup.go b/pkg/cloudbroker/flipgoup.go index cf83f82..e5aba73 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/v14/pkg/cloudbroker/flipgroup" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 409546c..89aa3e4 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 4fea0f6..d8b7168 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // ComputeRemoveRequest struct to remove compute instance diff --git a/pkg/cloudbroker/flipgroup/create.go b/pkg/cloudbroker/flipgroup/create.go index 9f55fdb..1e7cc9e 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // CreateRequest struct to create FLIPGroup diff --git a/pkg/cloudbroker/flipgroup/delete.go b/pkg/cloudbroker/flipgroup/delete.go index 5874ac1..88f847c 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // DeleteRequest struct to delete FLIPGroup diff --git a/pkg/cloudbroker/flipgroup/edit.go b/pkg/cloudbroker/flipgroup/edit.go index 157b943..d65886b 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // EditRequest struct to edit FLIPGroup diff --git a/pkg/cloudbroker/flipgroup/flipgroup.go b/pkg/cloudbroker/flipgroup/flipgroup.go index 48c4090..a5d8141 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/v14/interfaces" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/interfaces" ) // Structure for creating request to FLIPGroup diff --git a/pkg/cloudbroker/flipgroup/get.go b/pkg/cloudbroker/flipgroup/get.go index 2c31a05..b831436 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // GetRequest struct to get information about FLIPGroup diff --git a/pkg/cloudbroker/flipgroup/list.go b/pkg/cloudbroker/flipgroup/list.go index 31afff6..067475d 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 925beb6..9f322bd 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/v14/internal/serialization" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 56f225a..b63b38b 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/v14/pkg/cloudbroker/grid" +import "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 147516a..1c23aa0 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 ed3bd3c..a294f9e 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 index c243a9f..3a2e17c 100644 --- a/pkg/cloudbroker/grid/execute_maintenance_script.go +++ b/pkg/cloudbroker/grid/execute_maintenance_script.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // ExecuteMaintenanceScriptRequest struct to execute script diff --git a/pkg/cloudbroker/grid/get.go b/pkg/cloudbroker/grid/get.go index 9bea1ef..6013ec3 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 044391a..aac7dd5 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // GetBackupRequest struct to get backup diff --git a/pkg/cloudbroker/grid/get_diagnosis.go b/pkg/cloudbroker/grid/get_diagnosis.go index bf694cb..267ba57 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 42e9ab7..8a4094c 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 40030f5..1c7e3dc 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // GetSettingsRequest struct to get grid settings diff --git a/pkg/cloudbroker/grid/grid.go b/pkg/cloudbroker/grid/grid.go index e090c00..5b40e19 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/v14/interfaces" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/interfaces" ) // Structure for creating request to grid diff --git a/pkg/cloudbroker/grid/list.go b/pkg/cloudbroker/grid/list.go index cb5f800..d3b7fbc 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // ListRequest struct to get list of locations diff --git a/pkg/cloudbroker/grid/models.go b/pkg/cloudbroker/grid/models.go index 4a4d8ca..2c8642d 100644 --- a/pkg/cloudbroker/grid/models.go +++ b/pkg/cloudbroker/grid/models.go @@ -46,6 +46,9 @@ type RecordResource struct { // Number of GPU GPU uint64 `json:"gpu"` + // Policies + Policies map[string]PolicyUsage `json:"policies"` + // Number of RAM RAM uint64 `json:"ram"` @@ -62,14 +65,17 @@ type DiskUsage struct { DiskSizeMax float64 `json:"disksizemax"` } +// Policy usage details +type PolicyUsage struct { + // Disk usage + DiskUsage + + // SEPs + SEPs map[string]map[string]DiskUsage `json:"seps"` +} + // Detailed information about grid type RecordGrid struct { - // CKey - CKey string `json:"_ckey"` - - // Meta - Meta []interface{} `json:"_meta"` - // AuthBroker AuthBroker []interface{} `json:"authBroker"` @@ -97,6 +103,9 @@ type RecordGrid struct { // SDN support SDNSupport bool `json:"sdn_support"` + // Is Zero Access enabled + ZeroAccessEnabled bool `json:"zeroaccess_enabled"` + // Is BRO enabled BROEnabled bool `json:"bro_enabled"` } @@ -166,6 +175,15 @@ type RecordSettingsGrid struct { //Cleanup retention period CleanupRetentionPeriod uint64 `json:"cleanupRetentionPeriod"` + // CPU allocation ratio + CPUAllocationRatio uint64 `json:"cpu_allocation_ratio"` + + // CPU allocation ratio for VMs + CPUAllocationRatioVM uint64 `json:"cpu_allocation_ratio_vm"` + + // Custom backup path + CustomBackupPath []string `json:"custom_backup_path"` + //Docker registry DockerRegistry DockerRegistry `json:"docker_registry"` @@ -178,6 +196,9 @@ type RecordSettingsGrid struct { //Healthcheck notifications HealthcheckNotifications HealthcheckNotifications `json:"healthcheck_notifications"` + // Interface generation scheme + InterfaceGenerationScheme string `json:"interface_generation_scheme"` + //k8s cleanup enabled K8sCleanupEnabled bool `json:"k8s_cleanup_enabled"` @@ -187,12 +208,21 @@ type RecordSettingsGrid struct { //Location url LocationURL string `json:"location_url"` + // MAC address prefix + MACAddressPrefix string `json:"mac_address_prefix"` + //Net QOS NetQOS NetQOS `json:"net_qos"` //Networks Networks string `json:"networks"` + // Node self stop timer uptime monitor + NodeSelfStopTimerUptimeMonitor uint64 `json:"nodeSelfStopTimerUptimeMonitor"` + + // Node self stop uptime monitor + NodeSelfStopUptimeMonitor bool `json:"nodeSelfStopUptimeMonitor"` + //Prometheus Prometheus Prometheus `json:"prometheus"` diff --git a/pkg/cloudbroker/grid/purge_logs.go b/pkg/cloudbroker/grid/purge_logs.go index b465dc8..9824ea9 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 b559ad5..abc63b3 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 6d7c05f..c5a2413 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // RenameRequest struct to rename grid diff --git a/pkg/cloudbroker/grid/serialize.go b/pkg/cloudbroker/grid/serialize.go index 6da1cea..d43c7dc 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/v14/internal/serialization" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 index d3a7737..03d46ed 100644 --- a/pkg/cloudbroker/grid/services_restart.go +++ b/pkg/cloudbroker/grid/services_restart.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // ServicesRestartRequest struct to restart services diff --git a/pkg/cloudbroker/grid/set_cpu_allocation_parameter.go b/pkg/cloudbroker/grid/set_cpu_allocation_parameter.go index 73016e1..d035608 100644 --- a/pkg/cloudbroker/grid/set_cpu_allocation_parameter.go +++ b/pkg/cloudbroker/grid/set_cpu_allocation_parameter.go @@ -3,7 +3,7 @@ package grid import ( "context" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" "strconv" ) diff --git a/pkg/cloudbroker/grid/set_cpu_allocation_ratio.go b/pkg/cloudbroker/grid/set_cpu_allocation_ratio.go index 27c8b52..97cf75b 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // SetCPUAllocationRatioRequest struct to set allocation @@ -16,7 +16,7 @@ type SetCPUAllocationRatioRequest struct { // Allocation ratio // Required: true - Ratio float64 `url:"ratio" json:"ratio" validate:"required"` + Ratio uint64 `url:"ratio" json:"ratio" validate:"required"` } // SetCPUAllocationRatio sets CPU allocation ratio 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 d657c28..9196f22 100644 --- a/pkg/cloudbroker/grid/set_cpu_allocation_ratio_for_vm.go +++ b/pkg/cloudbroker/grid/set_cpu_allocation_ratio_for_vm.go @@ -3,7 +3,7 @@ package grid import ( "context" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" "strconv" ) @@ -15,7 +15,7 @@ type SetCPUAllocationRatioForVMRequest struct { // Default CPU allocation ratio for computes // Required: true - Ratio float64 `url:"ratio" json:"ratio" validate:"required"` + Ratio uint64 `url:"ratio" json:"ratio" validate:"required"` } // SetCPUAllocationRatioForVM sets 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 114caba..744cd03 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // SetMemAllocationRatioRequest struct to set memory allocation @@ -16,7 +16,7 @@ type SetMemAllocationRatioRequest struct { // Allocation ratio // Required: true - Ratio float64 `url:"ratio" json:"ratio" validate:"required"` + Ratio uint64 `url:"ratio" json:"ratio" validate:"required"` } // SetMemAllocationRatio sets memory allocation ratio diff --git a/pkg/cloudbroker/grid/set_password_policy.go b/pkg/cloudbroker/grid/set_password_policy.go index 9897c91..929b9a7 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // SetPasswordPolicyRequest struct to set password policy for a grid diff --git a/pkg/cloudbroker/group.go b/pkg/cloudbroker/group.go index 7181168..0c94473 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/v14/pkg/cloudbroker/group" +import "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 index 43b8363..167ddfc 100644 --- a/pkg/cloudbroker/group/get.go +++ b/pkg/cloudbroker/group/get.go @@ -5,7 +5,7 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // GetRequest struct to get details of the specified group. diff --git a/pkg/cloudbroker/group/group.go b/pkg/cloudbroker/group/group.go index c55898f..f2e91d6 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/v14/interfaces" +import "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 482a059..9ca5429 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // ListRequest struct to get list of group instances. diff --git a/pkg/cloudbroker/image.go b/pkg/cloudbroker/image.go index e1eb228..e65531f 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/v14/pkg/cloudbroker/image" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 87c92d6..eb585e3 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) type ChangeStoragePolicyRequest struct { diff --git a/pkg/cloudbroker/image/computeci_set.go b/pkg/cloudbroker/image/computeci_set.go index c839e8c..bd968a8 100644 --- a/pkg/cloudbroker/image/computeci_set.go +++ b/pkg/cloudbroker/image/computeci_set.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // ComputeCISetRequest struct to set compute CI diff --git a/pkg/cloudbroker/image/computeci_unset.go b/pkg/cloudbroker/image/computeci_unset.go index 56dac84..eb2d648 100644 --- a/pkg/cloudbroker/image/computeci_unset.go +++ b/pkg/cloudbroker/image/computeci_unset.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // ComputeCIUnsetRequest struct to unset compute CI diff --git a/pkg/cloudbroker/image/create_cdrom_image.go b/pkg/cloudbroker/image/create_cdrom_image.go index e0d8388..cd7a099 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 1ea9ad6..7c60599 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 f65d672..9ca92af 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/v14/internal/constants" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/constants" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 740af85..62b94c0 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // CreateVirtualRequest struct to create virtual image diff --git a/pkg/cloudbroker/image/delete.go b/pkg/cloudbroker/image/delete.go index 28ee0cb..ed79ef6 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 7d19bdd..f3d0455 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 57b0696..cd569ee 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // DeleteImagesRequest struct to delete images diff --git a/pkg/cloudbroker/image/disable.go b/pkg/cloudbroker/image/disable.go index 2e97af1..aff8625 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // DisableRequest struct to disable image diff --git a/pkg/cloudbroker/image/edit.go b/pkg/cloudbroker/image/edit.go index 4c4f5a7..359637a 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // EditRequest struct to edit image diff --git a/pkg/cloudbroker/image/enable.go b/pkg/cloudbroker/image/enable.go index 567e851..28f170e 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // EnableRequest struct to enable image diff --git a/pkg/cloudbroker/image/get.go b/pkg/cloudbroker/image/get.go index 5a1113a..056fda9 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 254c955..783175c 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // GrantAccessRequest struct to share image with accounts diff --git a/pkg/cloudbroker/image/image.go b/pkg/cloudbroker/image/image.go index 4cd9cff..6de0a48 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/v14/interfaces" +import "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 fb605be..107764c 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 66685f9..08f3974 100644 --- a/pkg/cloudbroker/image/list.go +++ b/pkg/cloudbroker/image/list.go @@ -5,7 +5,7 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // ListRequest struct to get list of available images @@ -28,7 +28,7 @@ type ListRequest struct { // Find by type // Required: false - TypeImage string `url:"typeImage,omitempty" json:"typeImage,omitempty"` + TypeImage []string `url:"typeImage,omitempty" json:"typeImage,omitempty"` // Find by image size // Required: false diff --git a/pkg/cloudbroker/image/multi_image_add_links.go b/pkg/cloudbroker/image/multi_image_add_links.go index 81c0811..f12a967 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/v14/internal/constants" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/constants" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 22534d2..9aef980 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/v14/internal/constants" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/constants" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 9f8b233..2af7ec6 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // MultiImageExportRequest struct to export multi image to a pool @@ -24,22 +24,22 @@ type MultiImageExportRequest struct { } // MultiImageExport copies a physical image from multi image to the specified pool -func (i Image) MultiImageExport(ctx context.Context, req MultiImageExportRequest) (bool, error) { +func (i Image) MultiImageExport(ctx context.Context, req MultiImageExportRequest) (uint64, error) { err := validators.ValidateRequest(req) if err != nil { - return false, validators.ValidationErrors(validators.GetErrors(err)) + return 0, validators.ValidationErrors(validators.GetErrors(err)) } url := "/cloudbroker/image/multi_image_export" res, err := i.client.DecortApiCall(ctx, http.MethodPost, url, req) if err != nil { - return false, err + return 0, err } - result, err := strconv.ParseBool(string(res)) + result, err := strconv.ParseUint(string(res), 10, 64) if err != nil { - return false, err + return 0, err } return result, nil diff --git a/pkg/cloudbroker/image/rename.go b/pkg/cloudbroker/image/rename.go index e6a8a34..a02e9d4 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // RenameRequest struct to rename image diff --git a/pkg/cloudbroker/image/revoke_access.go b/pkg/cloudbroker/image/revoke_access.go index 35a0817..0f79dd6 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // RevokeAccessRequest struct to unshare image with accounts diff --git a/pkg/cloudbroker/image/serialize.go b/pkg/cloudbroker/image/serialize.go index c291196..dc4710a 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/v14/internal/serialization" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 1b338db..5eb49ae 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // ShareRequest struct to share image diff --git a/pkg/cloudbroker/k8ci.go b/pkg/cloudbroker/k8ci.go index 9078d70..86b1e1b 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/v14/pkg/cloudbroker/k8ci" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 894bb87..a8dbe52 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 e5bc8e6..b15175f 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 92e807c..2872001 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // CreateRequest struct to create K8CI instance diff --git a/pkg/cloudbroker/k8ci/delete.go b/pkg/cloudbroker/k8ci/delete.go index 1d52809..ea4cc45 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // DeleteRequest struct to delete K8CI diff --git a/pkg/cloudbroker/k8ci/disable.go b/pkg/cloudbroker/k8ci/disable.go index 15a9b07..f0f197d 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // DisableRequest struct to disable K8CI diff --git a/pkg/cloudbroker/k8ci/enable.go b/pkg/cloudbroker/k8ci/enable.go index ea64061..1af5e2d 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // EnableRequest struct to enable K8CI diff --git a/pkg/cloudbroker/k8ci/get.go b/pkg/cloudbroker/k8ci/get.go index df6599a..108c91a 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // GetRequest struct to get information about K8CI diff --git a/pkg/cloudbroker/k8ci/k8ci.go b/pkg/cloudbroker/k8ci/k8ci.go index 6d36e21..81504d1 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/v14/interfaces" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/interfaces" ) // Structure for creating request to K8CI diff --git a/pkg/cloudbroker/k8ci/list.go b/pkg/cloudbroker/k8ci/list.go index fa51659..53b36a8 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 ebfb95b..a8c79be 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 266cbec..f14c105 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // RestoreRequest struct to restore K8CI diff --git a/pkg/cloudbroker/k8ci/serialize.go b/pkg/cloudbroker/k8ci/serialize.go index 7ae08c8..be1196a 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/v14/internal/serialization" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 a08f074..6153510 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/v14/pkg/cloudbroker/k8s" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/pkg/cloudbroker/k8s" ) // Accessing the K8S method group diff --git a/pkg/cloudbroker/k8s/create.go b/pkg/cloudbroker/k8s/create.go index 7cffc63..e15f26d 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // CreateRequest struct to create K8S diff --git a/pkg/cloudbroker/k8s/delete.go b/pkg/cloudbroker/k8s/delete.go index 7a76436..c5a635c 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 d41596d..8ab0ffd 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 c162ec9..f094932 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // DeleteWorkerFromGroupRequest struct to delete worker from group diff --git a/pkg/cloudbroker/k8s/disable.go b/pkg/cloudbroker/k8s/disable.go index 945503c..61db8b9 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // DisableRequest struct to disable kubernetes cluster diff --git a/pkg/cloudbroker/k8s/enable.go b/pkg/cloudbroker/k8s/enable.go index 05893fa..ec95a82 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 28fb1ae..a187114 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 ff781fc..1b66fd6 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 3af76cf..70f35aa 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 adca0b5..85c34e8 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 495c8b9..10cfc17 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 1c2417e..6b403c2 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 33d91ba..10fae0f 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 e7e23e8..d07d885 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/v14/interfaces" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/interfaces" ) // Structure for creating request to K8S diff --git a/pkg/cloudbroker/k8s/list.go b/pkg/cloudbroker/k8s/list.go index 790ab3d..8747767 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 6e227a7..07dfa70 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 2abde1f..5d96d97 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 6475d9e..0e1e26f 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // RestoreRequest struct to restore kubernetes cluster diff --git a/pkg/cloudbroker/k8s/serialize.go b/pkg/cloudbroker/k8s/serialize.go index c56ced0..129ae47 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/v14/internal/serialization" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 e912f15..a84da73 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // StartRequest struct to start kubernetes cluster diff --git a/pkg/cloudbroker/k8s/stop.go b/pkg/cloudbroker/k8s/stop.go index e0b9a96..8a4d3da 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // StopRequest struct to stop kubernetes cluster diff --git a/pkg/cloudbroker/k8s/update.go b/pkg/cloudbroker/k8s/update.go index c5b67b6..a1bccb1 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 5d503f8..51afa15 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // UpdateWorkerNodesMetaDataRequest struct to add worker to a kubernetes cluster diff --git a/pkg/cloudbroker/k8s/worker_add.go b/pkg/cloudbroker/k8s/worker_add.go index 1dbe94e..5fbd7b4 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 e6a6a0f..c02db8f 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 0f07fe3..774b285 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 58a039d..da4df0d 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 4ce95f9..690c1cf 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 b4dc464..7a62236 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // WorkersGroupGetByNameRequest struct to get information about worker group diff --git a/pkg/cloudbroker/kvmx86.go b/pkg/cloudbroker/kvmx86.go index 34907c0..a8d6fa8 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/v14/pkg/cloudbroker/kvmx86" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/pkg/cloudbroker/kvmx86" ) // Accessing the KVMX86 method group diff --git a/pkg/cloudbroker/kvmx86/create.go b/pkg/cloudbroker/kvmx86/create.go index aec8900..9ab6b4a 100644 --- a/pkg/cloudbroker/kvmx86/create.go +++ b/pkg/cloudbroker/kvmx86/create.go @@ -6,7 +6,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) type Interface struct { @@ -63,9 +63,9 @@ type Interface struct { // Required: false SDNSegmentID string `url:"sdn_segment_id,omitempty" json:"sdn_segment_id,omitempty"` - // SDN Object Group ID + // SDN Object Group IDs // Required: false - SDNObjectGroupID string `url:"sdn_object_group_id,omitempty" json:"sdn_object_group_id,omitempty"` + SDNObjectGroupIDs []string `url:"sdn_object_group_ids,omitempty" json:"sdn_object_group_ids,omitempty"` // SDN Logical Port Display Name // Required: false @@ -112,9 +112,9 @@ type DataDisk struct { // Required: false Cache string `url:"cache,omitempty" json:"cache,omitempty"` - // BLK Discard + // Discard // Required: false - BLKDiscard interface{} `url:"blkdiscard,omitempty" json:"blkdiscard,omitempty" validate:"omitempty,isBool"` + Discard string `url:"discard,omitempty" json:"discard,omitempty"` } // CreateRequest struct to create KVM x86 VM @@ -233,14 +233,23 @@ type CreateRequest struct { // Required: false BootDiskCache string `url:"boot_disk_cache,omitempty" json:"boot_disk_cache,omitempty"` - // Boot Disk BLK Discard + // Boot Disk Discard // Required: false - BootDiskBLKDiscard interface{} `url:"boot_disk_blkdiscard,omitempty" json:"boot_disk_blkdiscard,omitempty" validate:"omitempty,isBool"` + BootDiskDiscard string `url:"boot_disk_discard,omitempty" json:"boot_disk_discard,omitempty"` // Priority weight of the VM: higher value means higher priority and later migration // Required: false // Default: 1 Weight uint64 `url:"weight,omitempty" json:"weight,omitempty"` + + // CPU alignment profile name + // Required: false + CPUAlignmentProfile string `url:"cpu_alignment_profile,omitempty" json:"cpu_alignment_profile,omitempty"` + + // Clock type for the VM + // Required: false + // Default: default + Clock string `url:"clock,omitempty" json:"clock,omitempty"` } // GetRAM returns RAM field values @@ -268,7 +277,7 @@ func (k KVMX86) Create(ctx context.Context, req CreateRequest) (uint64, error) { var interfaces []string - if req.Interfaces != nil && len(req.Interfaces) != 0 { + if len(req.Interfaces) != 0 { interfaces = make([]string, 0, len(req.Interfaces)) for i := range req.Interfaces { @@ -285,7 +294,7 @@ func (k KVMX86) Create(ctx context.Context, req CreateRequest) (uint64, error) { var dataDisks []string - if req.DataDisks != nil && len(req.DataDisks) != 0 { + if len(req.DataDisks) != 0 { dataDisks = make([]string, 0, len(req.DataDisks)) for i := range req.DataDisks { diff --git a/pkg/cloudbroker/kvmx86/create_blank.go b/pkg/cloudbroker/kvmx86/create_blank.go index bf64207..341a44d 100644 --- a/pkg/cloudbroker/kvmx86/create_blank.go +++ b/pkg/cloudbroker/kvmx86/create_blank.go @@ -6,7 +6,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // CreateBlankRequest struct to create KVM x86 VM from scratch @@ -120,14 +120,23 @@ type CreateBlankRequest struct { // Required: false BootDiskCache string `url:"boot_disk_cache,omitempty" json:"boot_disk_cache,omitempty"` - // Boot Disk BLK Discard + // Boot Disk Discard // Required: false - BootDiskBLKDiscard interface{} `url:"boot_disk_blkdiscard" json:"boot_disk_blkdiscard" validate:"omitempty,isBool"` + BootDiskDiscard string `url:"boot_disk_discard,omitempty" json:"boot_disk_discard,omitempty"` // Priority weight of the VM: higher value means higher priority and later migration // Required: false // Default: 1 Weight uint64 `url:"weight,omitempty" json:"weight,omitempty"` + + // CPU alignment profile name + // Required: false + CPUAlignmentProfile string `url:"cpu_alignment_profile,omitempty" json:"cpu_alignment_profile,omitempty"` + + // Clock type for the VM + // Required: false + // Default: default + Clock string `url:"clock,omitempty" json:"clock,omitempty"` } // GetRAM returns RAM field values @@ -155,7 +164,7 @@ func (k KVMX86) CreateBlank(ctx context.Context, req CreateBlankRequest) (uint64 var interfaces []string - if req.Interfaces != nil && len(req.Interfaces) != 0 { + if len(req.Interfaces) != 0 { interfaces = make([]string, 0, len(req.Interfaces)) for i := range req.Interfaces { @@ -172,7 +181,7 @@ func (k KVMX86) CreateBlank(ctx context.Context, req CreateBlankRequest) (uint64 var dataDisks []string - if req.DataDisks != nil && len(req.DataDisks) != 0 { + if len(req.DataDisks) != 0 { dataDisks = make([]string, 0, len(req.DataDisks)) for i := range req.DataDisks { diff --git a/pkg/cloudbroker/kvmx86/kvmx86.go b/pkg/cloudbroker/kvmx86/kvmx86.go index 3a2d3e6..a96df84 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/v14/interfaces" +import "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 df5c11f..c782f83 100644 --- a/pkg/cloudbroker/kvmx86/mass_create.go +++ b/pkg/cloudbroker/kvmx86/mass_create.go @@ -5,7 +5,7 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) type InterfaceMassCreate struct { @@ -57,9 +57,9 @@ type InterfaceMassCreate struct { // Required: false SDNSegmentID string `url:"sdn_segment_id,omitempty" json:"sdn_segment_id,omitempty"` - // SDN Object Group ID + // SDN Object Group IDs // Required: false - SDNObjectGroupID string `url:"sdn_object_group_id,omitempty" json:"sdn_object_group_id,omitempty"` + SDNObjectGroupIDs []string `url:"sdn_object_group_ids,omitempty" json:"sdn_object_group_ids,omitempty"` // SDN Logical Port Display Name // Required: false @@ -158,14 +158,23 @@ type MassCreateRequest struct { // Required: false BootDiskCache string `url:"boot_disk_cache,omitempty" json:"boot_disk_cache,omitempty"` - // Boot Disk BLK Discard + // Boot Disk Discard // Required: false - BootDiskBLKDiscard interface{} `url:"boot_disk_blkdiscard" json:"boot_disk_blkdiscard" validate:"omitempty,isBool"` + BootDiskDiscard string `url:"boot_disk_discard,omitempty" json:"boot_disk_discard,omitempty"` // Priority weight of the VM: higher value means higher priority and later migration // Required: false // Default: 1 Weight uint64 `url:"weight,omitempty" json:"weight,omitempty"` + + // CPU alignment profile name + // Required: false + CPUAlignmentProfile string `url:"cpu_alignment_profile,omitempty" json:"cpu_alignment_profile,omitempty"` + + // Clock type for the VM + // Required: false + // Default: default + Clock string `url:"clock,omitempty" json:"clock,omitempty"` } type asyncWrapperMassCreateRequest struct { @@ -198,7 +207,7 @@ func (k KVMX86) MassCreate(ctx context.Context, req MassCreateRequest) ([]uint64 var interfaces []string - if req.Interfaces != nil && len(req.Interfaces) != 0 { + if len(req.Interfaces) != 0 { interfaces = make([]string, 0, len(req.Interfaces)) for i := range req.Interfaces { @@ -215,7 +224,7 @@ func (k KVMX86) MassCreate(ctx context.Context, req MassCreateRequest) ([]uint64 var dataDisks []string - if req.DataDisks != nil && len(req.DataDisks) != 0 { + if len(req.DataDisks) != 0 { dataDisks = make([]string, 0, len(req.DataDisks)) for i := range req.DataDisks { @@ -262,7 +271,7 @@ func (k KVMX86) MassCreateAsync(ctx context.Context, req MassCreateRequest) (str var interfaces []string - if req.Interfaces != nil && len(req.Interfaces) != 0 { + if len(req.Interfaces) != 0 { interfaces = make([]string, 0, len(req.Interfaces)) for i := range req.Interfaces { @@ -279,7 +288,7 @@ func (k KVMX86) MassCreateAsync(ctx context.Context, req MassCreateRequest) (str var dataDisks []string - if req.DataDisks != nil && len(req.DataDisks) != 0 { + if len(req.DataDisks) != 0 { dataDisks = make([]string, 0, len(req.DataDisks)) for i := range req.DataDisks { diff --git a/pkg/cloudbroker/lb.go b/pkg/cloudbroker/lb.go index b0ef8f2..d430f73 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/v14/pkg/cloudbroker/lb" +import "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 05b3963..8281e54 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // BackendCreateRequest struct to create backend diff --git a/pkg/cloudbroker/lb/backend_delete.go b/pkg/cloudbroker/lb/backend_delete.go index fb95a45..39a286c 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 25c0520..d424a9f 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 b29f517..e433855 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 2dcab18..1b8037e 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // BackendServerUpdateRequest struct to update server diff --git a/pkg/cloudbroker/lb/backend_update.go b/pkg/cloudbroker/lb/backend_update.go index a58d338..bbb7964 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // BackendUpdateRequest struct to update backend diff --git a/pkg/cloudbroker/lb/config_reset.go b/pkg/cloudbroker/lb/config_reset.go index 72a9f4d..bf60ff9 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // ConfigResetRequest struct to reset config diff --git a/pkg/cloudbroker/lb/create.go b/pkg/cloudbroker/lb/create.go index 128aea3..061d688 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // CreateRequest struct to create load balancer diff --git a/pkg/cloudbroker/lb/delete.go b/pkg/cloudbroker/lb/delete.go index c8bb99a..2a1d1e2 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // DeleteRequest struct to delete load balancer diff --git a/pkg/cloudbroker/lb/disable.go b/pkg/cloudbroker/lb/disable.go index 8fea560..db3c429 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // DisableRequest struct to disable load balancer diff --git a/pkg/cloudbroker/lb/enable.go b/pkg/cloudbroker/lb/enable.go index 6077a33..77ff85c 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // EnableRequest struct to enable load balancer diff --git a/pkg/cloudbroker/lb/filter.go b/pkg/cloudbroker/lb/filter.go index f39657e..9daab30 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/v14/interfaces" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v14/pkg/cloudbroker/k8s" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/interfaces" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 2c4c8b2..4bae9f2 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 41edfbd..a7e8a68 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 7e75219..53539f1 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // FrontendBindUpdateRequest struct for update binding diff --git a/pkg/cloudbroker/lb/frontend_create.go b/pkg/cloudbroker/lb/frontend_create.go index 7b7d8d1..21e0c3a 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // FrontendCreateRequest struct for create frontend diff --git a/pkg/cloudbroker/lb/frontend_delete.go b/pkg/cloudbroker/lb/frontend_delete.go index 9d5b3f3..804e6d0 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // FrontendDeleteRequest struct for delete frontend diff --git a/pkg/cloudbroker/lb/get.go b/pkg/cloudbroker/lb/get.go index 239d70b..b2e2ede 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 2fd1369..450217c 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/v14/interfaces" +import "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 a2056fc..273ed99 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 67b559c..0570f25 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 c61298f..d9a1b90 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 d033bd5..959fae7 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 a608805..9f7e85b 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // RestartRequest struct to restart load balancer diff --git a/pkg/cloudbroker/lb/restore.go b/pkg/cloudbroker/lb/restore.go index ca7647f..e109c3f 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // RestoreRequest struct to restore load balancer diff --git a/pkg/cloudbroker/lb/serialize.go b/pkg/cloudbroker/lb/serialize.go index 9e6f572..b121cc2 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/v14/internal/serialization" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 adebe0e..79fe11a 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // StartRequest struct to start load balancer diff --git a/pkg/cloudbroker/lb/stop.go b/pkg/cloudbroker/lb/stop.go index c6e1851..e6721d4 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // StopRequest struct to stop load balancer diff --git a/pkg/cloudbroker/lb/update.go b/pkg/cloudbroker/lb/update.go index 2072f32..52f4ddc 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 de61a79..b5a8d17 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // UpdateSysctParamsRequest struct to update sysct params for lb diff --git a/pkg/cloudbroker/node.go b/pkg/cloudbroker/node.go index 9a054ca..90109ac 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/v14/pkg/cloudbroker/node" +import "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 4dfa2ae..4af56d5 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 897c23e..99a829d 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 10f7d72..ab86971 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // AutoStartRequest struct to set node autostart diff --git a/pkg/cloudbroker/node/consumption.go b/pkg/cloudbroker/node/consumption.go index 4ba6ca9..cfe4a61 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 2449487..6302ba3 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 9e122bb..9f084be 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 0e6111c..b917e5d 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 d8233ca..a6c8ff5 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 fc4f122..41c6816 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 new file mode 100644 index 0000000..a150f3e --- /dev/null +++ b/pkg/cloudbroker/node/get_network_info.go @@ -0,0 +1,46 @@ +package node + +import ( + "context" + "encoding/json" + "net/http" + + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" +) + +// GetNetworkInfoRequest struct to get network information of a node +type GetNetworkInfoRequest struct { + // Node ID + // Required: true + NodeID uint64 `url:"node_id" json:"node_id" validate:"required"` +} + +// GetNetworkInfo gets network information of a node as a RecordNodeNetworkInfo struct +func (n Node) GetNetworkInfo(ctx context.Context, req GetNetworkInfoRequest) (*RecordNodeNetworkInfo, error) { + res, err := n.GetNetworkInfoRaw(ctx, req) + if err != nil { + return nil, err + } + + info := RecordNodeNetworkInfo{} + + err = json.Unmarshal(res, &info) + if err != nil { + return nil, err + } + + return &info, nil +} + +// GetNetworkInfoRaw gets network information of a node as an array of bytes +func (n Node) GetNetworkInfoRaw(ctx context.Context, req GetNetworkInfoRequest) ([]byte, error) { + err := validators.ValidateRequest(req) + if err != nil { + return nil, validators.ValidationErrors(validators.GetErrors(err)) + } + + url := "/cloudbroker/node/get_network_info" + + res, err := n.client.DecortApiCall(ctx, http.MethodGet, url, req) + return res, err +} diff --git a/pkg/cloudbroker/node/get_pci_devices.go b/pkg/cloudbroker/node/get_pci_devices.go new file mode 100644 index 0000000..5f17172 --- /dev/null +++ b/pkg/cloudbroker/node/get_pci_devices.go @@ -0,0 +1,62 @@ +package node + +import ( + "context" + "encoding/json" + "net/http" + + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" +) + +// GetPCIDevicesRequest struct to get list of PCI devices on a node +type GetPCIDevicesRequest struct { + // Node ID + // Required: true + NodeID uint64 `url:"nid" json:"nid" validate:"required"` + + // Search string + // Required: false + Search string `url:"search,omitempty" json:"search,omitempty"` + + // Sort by one of supported fields, format +|-(field) + // Required: false + SortBy string `url:"sort_by,omitempty" json:"sort_by,omitempty" validate:"omitempty,sortBy"` + + // Page number + // Required: false + Page uint64 `url:"page,omitempty" json:"page,omitempty"` + + // Page size + // Required: false + Size uint64 `url:"size,omitempty" json:"size,omitempty"` +} + +// GetPCIDevices gets list of PCI devices on a node as a ListPCIDevices struct +func (n Node) GetPCIDevices(ctx context.Context, req GetPCIDevicesRequest) (*ListPCIDevices, error) { + res, err := n.GetPCIDevicesRaw(ctx, req) + if err != nil { + return nil, err + } + + list := ListPCIDevices{} + + err = json.Unmarshal(res, &list) + if err != nil { + return nil, err + } + + return &list, nil +} + +// GetPCIDevicesRaw gets list of PCI devices on a node as an array of bytes +func (n Node) GetPCIDevicesRaw(ctx context.Context, req GetPCIDevicesRequest) ([]byte, error) { + err := validators.ValidateRequest(req) + if err != nil { + return nil, validators.ValidationErrors(validators.GetErrors(err)) + } + + url := "/cloudbroker/node/get_pci_devices" + + res, err := n.client.DecortApiCall(ctx, http.MethodGet, url, req) + return res, err +} diff --git a/pkg/cloudbroker/node/get_ssh_identity.go b/pkg/cloudbroker/node/get_ssh_identity.go index caeaa21..27e00b5 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // GetSSHIdentityRequest struct to get node ssh information diff --git a/pkg/cloudbroker/node/list.go b/pkg/cloudbroker/node/list.go index b909745..7b4d5f4 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // ListRequest struct to get list of nodes diff --git a/pkg/cloudbroker/node/maintenance.go b/pkg/cloudbroker/node/maintenance.go index 3c8dff1..86b9f8a 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 1185041..e35e502 100644 --- a/pkg/cloudbroker/node/models.go +++ b/pkg/cloudbroker/node/models.go @@ -9,7 +9,7 @@ type RecordNode struct { CpuInfo CpuInfo `json:"cpuInfo"` // CPU Allocation Ratio - CPUAllocationRatio float64 `json:"cpu_allocation_ratio"` + CPUAllocationRatio uint64 `json:"cpu_allocation_ratio"` // DPDK info DPDK DPDK `json:"dpdk"` @@ -27,7 +27,7 @@ type RecordNode struct { IsolatedCpus []interface{} `json:"isolatedCpus"` // MemAllocationRatio - MemAllocationRatio float64 `json:"mem_allocation_ratio"` + MemAllocationRatio uint64 `json:"mem_allocation_ratio"` // Name Name string `json:"name"` @@ -120,7 +120,7 @@ type FreeResourcesInfo struct { RAM float64 `json:"RAM"` // VCPU - VCPU float64 `json:"vCPUs"` + VCPU uint64 `json:"vCPUs"` } // Resources Info @@ -303,10 +303,10 @@ type ItemNode struct { OldCompatLVMID uint64 `json:"old_compat_lvm_id"` // CPU Allocation ratio - CPUAllocationRatio float64 `json:"cpu_allocation_ratio"` + CPUAllocationRatio uint64 `json:"cpu_allocation_ratio"` // MemAllocationRatio - MemAllocationRatio float64 `json:"mem_allocation_ratio"` + MemAllocationRatio uint64 `json:"mem_allocation_ratio"` // Packages Packages map[string]PackageInfo `json:"packages"` @@ -319,6 +319,9 @@ type ItemNode struct { // AutoStart Count AutoStartCount uint64 `json:"autostart_count"` + + // PCI devices attached to the node + PCIDevices []ItemPCIDevice `json:"pci_devices"` } type PackageInfo struct { @@ -350,9 +353,36 @@ type ItemMemory struct { // 1G OneG uint64 `json:"1G"` + // 1G available + OneGAvailable uint64 `json:"1G_available"` + + // 1G free + OneGFree uint64 `json:"1G_free"` + + // 1G reserved + OneGReserved uint64 `json:"1G_reserved"` + + // 1G used + OneGUsed uint64 `json:"1G_used"` + + // 1G DPDK reserved + OneGDPDKReserved uint64 `json:"1G_dpdk_reserved"` + // 2M TwoM uint64 `json:"2M"` + // 2M available + TwoMAvailable uint64 `json:"2M_available"` + + // 2M free + TwoMFree uint64 `json:"2M_free"` + + // 2M reserved + TwoMReserved uint64 `json:"2M_reserved"` + + // 2M used + TwoMUsed uint64 `json:"2M_used"` + // Total Total uint64 `json:"total"` } @@ -454,6 +484,54 @@ type Role struct { Time uint64 `json:"time"` } +// PCI device info +type ItemPCIDevice struct { + // Hardware path + HWPath string `json:"hw_path"` + + // Current driver + CurrentDriver string `json:"current_driver"` + + // NUMA node + NUMANode uint64 `json:"numa_node"` + + // Product ID + ProductID string `json:"product_id"` + + // Product name + ProductName string `json:"product_name"` + + // Vendor ID + VendorID string `json:"vendor_id"` + + // Vendor name + VendorName string `json:"vendor_name"` + + // IOMMU group + IOMMUGroup uint64 `json:"iommu_group"` +} + +// List of PCI devices +type ListPCIDevices struct { + // Data + Data []ItemPCIDevice `json:"data"` + + // Entry count + EntryCount uint64 `json:"entryCount"` +} + +// Response for PCI device driver binding actions +type RecordPCIDeviceDriver struct { + // Success + Success bool `json:"success"` + + // Message + Message string `json:"message"` + + // Result + Result interface{} `json:"result"` +} + // Information about SSH Identity type SSHIdentity struct { //Host name of the client @@ -465,3 +543,231 @@ type SSHIdentity struct { //Array of SSH public keys of the client PublicKeys []string `json:"public_keys"` } + +// Full network configuration of a node +type RecordNodeNetworkInfo struct { + // System-level information about all network interfaces on the node + SystemNetworksInfo map[string]SystemNetworkInfo `json:"system_networks_info"` + + // Raw OVS ports data + OVSNetworksInfo []OVSNetworkInfo `json:"ovs_networks_info"` + + // VM network interface connections + LibvirtNetworksInfo []LibvirtNetworkInfo `json:"libvirt_networks_info"` + + // Assembled network topology of the node + Topology NetworkTopology `json:"topology"` +} + +// System network interface +type SystemNetworkInfo struct { + // MTU value + MTU uint64 `json:"mtu"` + + // Interface link speed + Speed int64 `json:"speed"` + + // Linux bridge ID + BridgeID string `json:"bridge_id"` + + // Bridge port ID + BPortID string `json:"bport_id"` + + // MAC address + MAC string `json:"mac"` +} + +// OVS port information +type OVSNetworkInfo struct { + // Bridge name + BridgeName string `json:"bridge_name"` + + // Bridge tag + BridgeTag string `json:"bridge_tag"` + + // Interface UUID + InterfaceUUID string `json:"interface_uuid"` + + // Interface type + InterfaceType string `json:"interface_type"` + + // Interface name + InterfaceName string `json:"interface_name"` + + // Interface MTU value + InterfaceMTU uint64 `json:"interface_mtu"` + + // Interface IP address + InterfaceIP string `json:"interface_ip"` + + // Interface MAC address + InterfaceMAC string `json:"interface_mac"` + + // Interface peer name + InterfacePeer string `json:"interface_peer"` +} + +// VM network interface connection +type LibvirtNetworkInfo struct { + // VM name + VMName string `json:"vm_name"` + + // Host-side interface name used by the VM + Interface string `json:"interface"` + + // Interface type + InterfaceType string `json:"interface_type"` + + // Name of the bridge the VM interface is attached to + InterfaceSource string `json:"interface_source"` +} + +// Assembled network topology of the node +type NetworkTopology struct { + // Map of all network interfaces by name with their topology details and connections + Interfaces map[string]TopologyInterface `json:"interfaces"` +} + +// Interface and its role in the network topology +type TopologyInterface struct { + // Interface type + Type string `json:"type"` + + // Interface MTU value + MTU uint64 `json:"mtu"` + + // Interface link speed + Speed int64 `json:"speed"` + + // Connections to VMs and to bridges + Connections TopologyInterfaceConnections `json:"connections"` + + // VLANs associated with the interface + VLANs []string `json:"vlans"` + + // Linux bridge ID + BridgeID string `json:"bridge_id"` + + // Port configuration of this bridge + BridgeInfo *TopologyBridgeInfo `json:"bridge_info"` + + // Peer bridges connected to this bridge via patch ports + BridgeConnections []TopologyBridgeRef `json:"bridge_connections"` + + // Names of interfaces attached to this bridge as ports + ConnectedInterfaces []string `json:"connected_interfaces"` + + // Peer interface name + Peer string `json:"peer"` + + // OVS UUID + UUID string `json:"uuid"` +} + +// Lists what is connected to this interface +type TopologyInterfaceConnections struct { + // VMs connected to this interface + VMs []TopologyVMConnection `json:"vms"` + + // Bridges this interface is attached to + Bridges []TopologyBridgeAttachment `json:"bridges"` +} + +// VM connected to a bridge or interface +type TopologyVMConnection struct { + // VM name + Name string `json:"name"` + + // Host-side interface name + VMInterface string `json:"vm_interface"` + + // VM interface type + VMInterfaceType string `json:"vm_interface_type"` + + // Connection type + ConnectionType string `json:"connection_type"` + + // Via bridge + ViaBridge string `json:"via_bridge"` +} + +// How interface is attached to a bridge +type TopologyBridgeAttachment struct { + // Bridge name + Name string `json:"name"` + + // Bridge type + Type string `json:"type"` + + // Attachment method + Via string `json:"via"` + + // Port details + PortInfo *TopologyPortInfo `json:"port_info"` + + // Linux bridge port ID + BPortID string `json:"bport_id"` +} + +// Bridge port entry +type TopologyPortInfo struct { + // Port name + Name string `json:"name"` + + // Port type + Type string `json:"type"` + + // MTU value + MTU uint64 `json:"mtu"` + + // VLAN tag + VLAN string `json:"vlan"` + + // OVS UUID of the port + UUID string `json:"uuid"` +} + +// OVS bridge port configuration +type TopologyBridgeInfo struct { + // Bridge type + Type string `json:"type"` + + // List of ports on this bridge + Ports []TopologyBridgePort `json:"ports"` +} + +// Port on an OVS bridge +type TopologyBridgePort struct { + // Port name + Name string `json:"name"` + + // Port type + Type string `json:"type"` + + // MTU value + MTU uint64 `json:"mtu"` + + // VLAN tag + VLAN string `json:"vlan"` + + // UUID + UUID string `json:"uuid"` + + // IP address + IP string `json:"ip"` + + // MAC address + MAC string `json:"mac"` +} + +// Peer bridge connected via a patch port +type TopologyBridgeRef struct { + // Name of the peer bridge + Name string `json:"name"` + + // Name of the patch port used to connect to the peer bridge + Via string `json:"via"` + + // VLAN tag on the patch connection + VLAN string `json:"vlan"` +} diff --git a/pkg/cloudbroker/node/node.go b/pkg/cloudbroker/node/node.go index aa2c3e6..eea1847 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/v14/interfaces" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 new file mode 100644 index 0000000..5c0e12c --- /dev/null +++ b/pkg/cloudbroker/node/pci_device_driver_to_kernel.go @@ -0,0 +1,45 @@ +package node + +import ( + "context" + "encoding/json" + "net/http" + + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/constants" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" +) + +// PCIDeviceDriverToKernelRequest struct to bind PCI device driver to kernel +type PCIDeviceDriverToKernelRequest struct { + // Node ID + // Required: true + NodeID uint64 `url:"nid" json:"nid" validate:"required"` + + // Hardware path of the PCI device, e.g. 0000:81:00.0 + // Required: true + HWPath string `url:"hw_path" json:"hw_path" validate:"required,pciDeviceHWPath"` +} + +// PCIDeviceDriverToKernel binds PCI device driver to kernel +func (n Node) PCIDeviceDriverToKernel(ctx context.Context, req PCIDeviceDriverToKernelRequest) (*RecordPCIDeviceDriver, error) { + err := validators.ValidateRequest(req) + if err != nil { + return nil, validators.ValidationErrors(validators.GetErrors(err)) + } + + url := "/cloudbroker/node/pci_device_driver_to_kernel" + + res, err := n.client.DecortApiCallCtype(ctx, http.MethodPost, url, constants.MIMEJSON, req) + if err != nil { + return nil, err + } + + result := RecordPCIDeviceDriver{} + + err = json.Unmarshal(res, &result) + if err != nil { + return nil, err + } + + return &result, nil +} diff --git a/pkg/cloudbroker/node/pci_device_driver_to_vfio.go b/pkg/cloudbroker/node/pci_device_driver_to_vfio.go new file mode 100644 index 0000000..5466a22 --- /dev/null +++ b/pkg/cloudbroker/node/pci_device_driver_to_vfio.go @@ -0,0 +1,50 @@ +package node + +import ( + "context" + "encoding/json" + "net/http" + + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/constants" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" +) + +// PCIDeviceDriverToVFIORequest struct to bind PCI device driver to VFIO +type PCIDeviceDriverToVFIORequest struct { + // Node ID + // Required: true + NodeID uint64 `url:"nid" json:"nid" validate:"required"` + + // Hardware path of the PCI device, e.g. 0000:81:00.0 + // Required: true + HWPath string `url:"hw_path" json:"hw_path" validate:"required,pciDeviceHWPath"` + + // Driver binding mode + // Required: true + // Possible values: safe, unsafe + Mode string `url:"mode" json:"mode" validate:"required,oneof=safe unsafe"` +} + +// PCIDeviceDriverToVFIO binds PCI device driver to VFIO +func (n Node) PCIDeviceDriverToVFIO(ctx context.Context, req PCIDeviceDriverToVFIORequest) (*RecordPCIDeviceDriver, error) { + err := validators.ValidateRequest(req) + if err != nil { + return nil, validators.ValidationErrors(validators.GetErrors(err)) + } + + url := "/cloudbroker/node/pci_device_driver_to_vfio" + + res, err := n.client.DecortApiCallCtype(ctx, http.MethodPost, url, constants.MIMEJSON, req) + if err != nil { + return nil, err + } + + result := RecordPCIDeviceDriver{} + + err = json.Unmarshal(res, &result) + if err != nil { + return nil, err + } + + return &result, nil +} diff --git a/pkg/cloudbroker/node/restrict.go b/pkg/cloudbroker/node/restrict.go index 83fed5b..6a05bea 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 afdfc6b..709eccf 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/v14/internal/serialization" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 c47c7c4..27e211e 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 bf9aa67..8463023 100644 --- a/pkg/cloudbroker/node/set_cpu_allocation_ratio.go +++ b/pkg/cloudbroker/node/set_cpu_allocation_ratio.go @@ -2,9 +2,10 @@ package node import ( "context" + "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // SetCpuAllocationRatioRequest struct to set CPU allocation ratio @@ -15,22 +16,29 @@ type SetCpuAllocationRatioRequest struct { // Allocation ratio (zero or positive value) // Required: true - Ratio float64 `url:"ratio" json:"ratio" validate:"required"` + Ratio uint64 `url:"ratio" json:"ratio" validate:"required"` } // SetCpuAllocationRatio set CPU allocation ratio -func (i Node) SetCpuAllocationRatio(ctx context.Context, req SetCpuAllocationRatioRequest) error { +func (i Node) SetCpuAllocationRatio(ctx context.Context, req SetCpuAllocationRatioRequest) (*ItemNode, error) { err := validators.ValidateRequest(req) if err != nil { - return validators.ValidationErrors(validators.GetErrors(err)) + return nil, validators.ValidationErrors(validators.GetErrors(err)) } url := "/cloudbroker/node/set_cpu_allocation_ratio" - _, err = i.client.DecortApiCall(ctx, http.MethodPost, url, req) + res, err := i.client.DecortApiCall(ctx, http.MethodPost, url, req) if err != nil { - return err + return nil, err } - return nil + info := ItemNode{} + + err = json.Unmarshal(res, &info) + if err != nil { + return nil, err + } + + return &info, nil } diff --git a/pkg/cloudbroker/node/set_huge_pages.go b/pkg/cloudbroker/node/set_huge_pages.go index cb71767..d3a4b42 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 8e06d93..a7a076d 100644 --- a/pkg/cloudbroker/node/set_mem_allocation_ratio.go +++ b/pkg/cloudbroker/node/set_mem_allocation_ratio.go @@ -2,9 +2,10 @@ package node import ( "context" + "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // SetMemAllocationRatioRequest struct to set memory allocation ratio @@ -15,22 +16,29 @@ type SetMemAllocationRatioRequest struct { // Allocation ratio (zero or positive value) // Required: true - Ratio float64 `url:"ratio" json:"ratio" validate:"required"` + Ratio uint64 `url:"ratio" json:"ratio" validate:"required"` } // SetMemAllocationRatio set memory allocation ratio -func (i Node) SetMemAllocationRatio(ctx context.Context, req SetMemAllocationRatioRequest) error { +func (i Node) SetMemAllocationRatio(ctx context.Context, req SetMemAllocationRatioRequest) (*ItemNode, error) { err := validators.ValidateRequest(req) if err != nil { - return validators.ValidationErrors(validators.GetErrors(err)) + return nil, validators.ValidationErrors(validators.GetErrors(err)) } url := "/cloudbroker/node/set_mem_allocation_ratio" - _, err = i.client.DecortApiCall(ctx, http.MethodPost, url, req) + res, err := i.client.DecortApiCall(ctx, http.MethodPost, url, req) if err != nil { - return err + return nil, err } - return nil + info := ItemNode{} + + err = json.Unmarshal(res, &info) + if err != nil { + return nil, err + } + + return &info, nil } diff --git a/pkg/cloudbroker/node/set_sriov_status.go b/pkg/cloudbroker/node/set_sriov_status.go index b7b18cd..f936a9a 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 fa46833..9b4034b 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 29c2ad2..6c733d0 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/v14/internal/constants" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/constants" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) type VFParam struct { diff --git a/pkg/cloudbroker/node/update.go b/pkg/cloudbroker/node/update.go index c243aa0..972cdd3 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 e451ef5..2df6a1e 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // UpdateDescriptionRequest struct to update description of the node diff --git a/pkg/cloudbroker/pcidevice.go b/pkg/cloudbroker/pcidevice.go index 20066f1..97456ab 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/v14/pkg/cloudbroker/pcidevice" +import "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 de31599..bb3a8df 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // CreateRequest struct to creating PCI device diff --git a/pkg/cloudbroker/pcidevice/delete.go b/pkg/cloudbroker/pcidevice/delete.go index 67357ff..e2bb29e 100644 --- a/pkg/cloudbroker/pcidevice/delete.go +++ b/pkg/cloudbroker/pcidevice/delete.go @@ -3,7 +3,7 @@ package pcidevice import ( "context" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" "strconv" ) diff --git a/pkg/cloudbroker/pcidevice/disable.go b/pkg/cloudbroker/pcidevice/disable.go index c52993d..ecaa75a 100644 --- a/pkg/cloudbroker/pcidevice/disable.go +++ b/pkg/cloudbroker/pcidevice/disable.go @@ -3,7 +3,7 @@ package pcidevice import ( "context" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" "strconv" ) diff --git a/pkg/cloudbroker/pcidevice/enable.go b/pkg/cloudbroker/pcidevice/enable.go index cbab9b5..705ad37 100644 --- a/pkg/cloudbroker/pcidevice/enable.go +++ b/pkg/cloudbroker/pcidevice/enable.go @@ -3,7 +3,7 @@ package pcidevice import ( "context" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" "strconv" ) diff --git a/pkg/cloudbroker/pcidevice/list.go b/pkg/cloudbroker/pcidevice/list.go index c738c82..e353e3d 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 8a3a2e4..0d6f853 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/v14/interfaces" +import "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 dc801e5..46fcb09 100644 --- a/pkg/cloudbroker/pcidevice/serialize.go +++ b/pkg/cloudbroker/pcidevice/serialize.go @@ -2,7 +2,7 @@ package pcidevice import ( "encoding/json" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v14/internal/serialization" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 53c4b8f..90a3a8e 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/v14/pkg/cloudbroker/prometheus" +import "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 3a79ae3..dfb9d3e 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) type ComputeCPULoadRequest struct { diff --git a/pkg/cloudbroker/prometheus/compute_memory_available.go b/pkg/cloudbroker/prometheus/compute_memory_available.go index 15362ee..bcc8e73 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) type ComputeMemoryAvailableRequest struct { diff --git a/pkg/cloudbroker/prometheus/compute_memory_unused.go b/pkg/cloudbroker/prometheus/compute_memory_unused.go index 66ad393..74ca898 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) type ComputeMemoryUnusedRequest struct { diff --git a/pkg/cloudbroker/prometheus/compute_memory_usable.go b/pkg/cloudbroker/prometheus/compute_memory_usable.go index 1b9ac9e..17c0fab 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) type ComputeMemoryUsableRequest struct { diff --git a/pkg/cloudbroker/prometheus/compute_memory_usage.go b/pkg/cloudbroker/prometheus/compute_memory_usage.go index 5d319aa..6458e6e 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) type ComputeMemoryUsageRequest struct { diff --git a/pkg/cloudbroker/prometheus/compute_memory_used.go b/pkg/cloudbroker/prometheus/compute_memory_used.go index 3c5e39b..49e79f9 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) type ComputeMemoryUsedRequest struct { diff --git a/pkg/cloudbroker/prometheus/compute_read_bytes.go b/pkg/cloudbroker/prometheus/compute_read_bytes.go index 5ca6893..a7d5bff 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) type ComputeReadBytesRequest struct { diff --git a/pkg/cloudbroker/prometheus/compute_read_requests.go b/pkg/cloudbroker/prometheus/compute_read_requests.go index 89ff687..6e4c79f 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) type ComputeReadRequestsRequest struct { diff --git a/pkg/cloudbroker/prometheus/compute_receive_bytes.go b/pkg/cloudbroker/prometheus/compute_receive_bytes.go index fe3f20d..0add6f4 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) type ComputeReceiveBytesRequest struct { diff --git a/pkg/cloudbroker/prometheus/compute_receive_packets.go b/pkg/cloudbroker/prometheus/compute_receive_packets.go index 4252e21..543d2a5 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) type ComputeReceivePacketsRequest struct { diff --git a/pkg/cloudbroker/prometheus/compute_transmit_bytes.go b/pkg/cloudbroker/prometheus/compute_transmit_bytes.go index a578c6e..5d2b58d 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) type ComputeTransmitBytesRequest struct { diff --git a/pkg/cloudbroker/prometheus/compute_transmit_packets.go b/pkg/cloudbroker/prometheus/compute_transmit_packets.go index 4aacfbb..e45e651 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) type ComputeTransmitPacketsRequest struct { diff --git a/pkg/cloudbroker/prometheus/compute_write_bytes.go b/pkg/cloudbroker/prometheus/compute_write_bytes.go index 296cfde..8dc187c 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) type ComputeWriteBytesRequest struct { diff --git a/pkg/cloudbroker/prometheus/compute_write_requests.go b/pkg/cloudbroker/prometheus/compute_write_requests.go index 9be9c1a..5195ab5 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) type ComputeWriteRequestsRequest struct { diff --git a/pkg/cloudbroker/prometheus/computes.go b/pkg/cloudbroker/prometheus/computes.go index b16392d..66c05de 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) const ( diff --git a/pkg/cloudbroker/prometheus/prometheus.go b/pkg/cloudbroker/prometheus/prometheus.go index 35c36c4..490971a 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/v14/interfaces" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/interfaces" ) // Structure for creating request to prometheus diff --git a/pkg/cloudbroker/resmon.go b/pkg/cloudbroker/resmon.go index 69e2b34..57cc38b 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/v14/pkg/cloudbroker/resmon" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 2e6677c..097b460 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) type GetByComputeRequest struct { @@ -18,7 +18,7 @@ type GetByComputeRequest struct { StartTime uint64 `url:"starttime,omitempty" json:"starttime,omitempty"` // End of time period - unixtime - // Required: true + // Required: false EndTime uint64 `url:"endtime,omitempty" json:"endtime,omitempty"` } diff --git a/pkg/cloudbroker/resmon/get_by_computes.go b/pkg/cloudbroker/resmon/get_by_computes.go index 029d865..386ec4d 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) type GetByComputesRequest struct { @@ -14,7 +14,7 @@ type GetByComputesRequest struct { StartTime uint64 `url:"starttime,omitempty" json:"starttime,omitempty"` // End of time period - unixtime - // Required: true + // Required: false EndTime uint64 `url:"endtime,omitempty" json:"endtime,omitempty"` } diff --git a/pkg/cloudbroker/resmon/get_by_grid.go b/pkg/cloudbroker/resmon/get_by_grid.go index 322f0df..1e8f661 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) type GetByGRIDRequest struct { @@ -14,7 +14,7 @@ type GetByGRIDRequest struct { StartTime uint64 `url:"starttime,omitempty" json:"starttime,omitempty"` // End of time period - unixtime - // Required: true + // Required: false EndTime uint64 `url:"endtime,omitempty" json:"endtime,omitempty"` } diff --git a/pkg/cloudbroker/resmon/get_by_node.go b/pkg/cloudbroker/resmon/get_by_node.go index 7d2c97b..edde662 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) type GetByNodeRequest struct { @@ -18,7 +18,7 @@ type GetByNodeRequest struct { StartTime uint64 `url:"starttime,omitempty" json:"starttime,omitempty"` // End of time period - unixtime - // Required: true + // Required: false EndTime uint64 `url:"endtime,omitempty" json:"endtime,omitempty"` } diff --git a/pkg/cloudbroker/resmon/get_by_nodes.go b/pkg/cloudbroker/resmon/get_by_nodes.go index b77f624..130ff79 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) type GetByNodesRequest struct { @@ -14,7 +14,7 @@ type GetByNodesRequest struct { StartTime uint64 `url:"starttime,omitempty" json:"starttime,omitempty"` // End of time period - unixtime - // Required: true + // Required: false EndTime uint64 `url:"endtime,omitempty" json:"endtime,omitempty"` } diff --git a/pkg/cloudbroker/resmon/resmon.go b/pkg/cloudbroker/resmon/resmon.go index ede2017..3484bd1 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/v14/interfaces" +import "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/interfaces" // Structure for creating request to resource monitoring type Resmon struct { diff --git a/pkg/cloudbroker/rg.go b/pkg/cloudbroker/rg.go index e4f4f9b..9f8dc13 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/v14/pkg/cloudbroker/rg" +import "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 9c80b09..71f0843 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 0ed640b..00a7b67 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 410ba09..cf45851 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 d92711b..489fd2b 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 8fe3d50..dc134e4 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 541ff61..79de1e1 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 index 5e45725..6c1023a 100644 --- a/pkg/cloudbroker/rg/audits.go +++ b/pkg/cloudbroker/rg/audits.go @@ -5,7 +5,7 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // AuditsRequest struct to get audit diff --git a/pkg/cloudbroker/rg/create.go b/pkg/cloudbroker/rg/create.go index 3cf2397..6e1380f 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/v14/internal/constants" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/constants" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // CreateRequest struct to create resource group diff --git a/pkg/cloudbroker/rg/del_storage_policy.go b/pkg/cloudbroker/rg/del_storage_policy.go index 2d843e5..cefb13f 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 318c287..4b082ab 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // DeleteRequest struct to delete resource group diff --git a/pkg/cloudbroker/rg/disable.go b/pkg/cloudbroker/rg/disable.go index 9dc2e93..89eb175 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // DisableRequest struct to disable resource group diff --git a/pkg/cloudbroker/rg/enable.go b/pkg/cloudbroker/rg/enable.go index 7e9c33d..a1492ea 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // EnableRequest struct to enable resource group diff --git a/pkg/cloudbroker/rg/get.go b/pkg/cloudbroker/rg/get.go index 9884572..eb1f18a 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 810d4a5..05f7549 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 dd48a38..030ee4b 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 85b54b0..2e0db64 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 62af4a9..81a4397 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 468c269..16ca550 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 266439b..e772509 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 86455ff..6c0f2b1 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 baf16b5..d8d4111 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 77c6ef3..21dad05 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 15564d5..71a7a3a 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // MassEnableRequest struct to enable several resource groups diff --git a/pkg/cloudbroker/rg/models.go b/pkg/cloudbroker/rg/models.go index 3326d1d..241577f 100644 --- a/pkg/cloudbroker/rg/models.go +++ b/pkg/cloudbroker/rg/models.go @@ -152,7 +152,7 @@ type ItemRG struct { CPUAllocationParameter string `json:"cpu_allocation_parameter"` // CPU allocation ratio - CPUAllocationRatio float64 `json:"cpu_allocation_ratio"` + CPUAllocationRatio uint64 `json:"cpu_allocation_ratio"` // Created by CreatedBy string `json:"createdBy"` diff --git a/pkg/cloudbroker/rg/remove_def_net.go b/pkg/cloudbroker/rg/remove_def_net.go index c07ac35..3c5cf8f 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // RemoveDefNetRequest struct to remove default network diff --git a/pkg/cloudbroker/rg/restore.go b/pkg/cloudbroker/rg/restore.go index 6602aaa..57f59b9 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // RestoreRequest struct to restore resource group diff --git a/pkg/cloudbroker/rg/rg.go b/pkg/cloudbroker/rg/rg.go index f3d1527..4628e6f 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/v14/interfaces" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/interfaces" ) // Structure for creating request to resource group diff --git a/pkg/cloudbroker/rg/serialize.go b/pkg/cloudbroker/rg/serialize.go index c5945ff..19b7148 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/v14/internal/serialization" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 f61cd18..9676240 100644 --- a/pkg/cloudbroker/rg/set_cpu_allocation_parameter.go +++ b/pkg/cloudbroker/rg/set_cpu_allocation_parameter.go @@ -3,7 +3,7 @@ package rg import ( "context" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" "strconv" ) diff --git a/pkg/cloudbroker/rg/set_cpu_allocation_ratio.go b/pkg/cloudbroker/rg/set_cpu_allocation_ratio.go index 5c0160c..09dc8f9 100644 --- a/pkg/cloudbroker/rg/set_cpu_allocation_ratio.go +++ b/pkg/cloudbroker/rg/set_cpu_allocation_ratio.go @@ -3,7 +3,7 @@ package rg import ( "context" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" "strconv" ) @@ -15,7 +15,7 @@ type SetCPUAllocationRatioRequest struct { // CPU allocation ratio, i.e. one pCPU = ratio*vCPU // Required: true - Ratio float64 `url:"ratio" json:"ratio" validate:"required"` + Ratio uint64 `url:"ratio" json:"ratio" validate:"required"` } // SetCPUAllocationRatio sets CPU allocation ratio diff --git a/pkg/cloudbroker/rg/set_def_net.go b/pkg/cloudbroker/rg/set_def_net.go index 1d94d38..22e9a9a 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // SetDefNetRequest struct to set default network diff --git a/pkg/cloudbroker/rg/update.go b/pkg/cloudbroker/rg/update.go index 286de09..b856ff2 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/v14/internal/constants" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/constants" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 2ed4679..a41090d 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 841a263..76ba0ff 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 e2b0da3..597a1b4 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 58642dd..1c37f38 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/v14/internal/constants" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/constants" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) type CreateRequest struct { diff --git a/pkg/cloudbroker/secgroup/create_rule.go b/pkg/cloudbroker/secgroup/create_rule.go index b9cfaaa..fe8bc52 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/v14/internal/constants" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/constants" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) type CreateRuleRequest struct { diff --git a/pkg/cloudbroker/secgroup/delete.go b/pkg/cloudbroker/secgroup/delete.go index 2b3f173..02eaeff 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) type DeleteRequest struct { diff --git a/pkg/cloudbroker/secgroup/delete_rule.go b/pkg/cloudbroker/secgroup/delete_rule.go index 26547f7..6da23bd 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) type DeleteRuleRequest struct { diff --git a/pkg/cloudbroker/secgroup/get.go b/pkg/cloudbroker/secgroup/get.go index 8424dbb..882312c 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) type GetRequest struct { diff --git a/pkg/cloudbroker/secgroup/list.go b/pkg/cloudbroker/secgroup/list.go index 9fdd453..ab7ecac 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) type ListRequest struct { diff --git a/pkg/cloudbroker/secgroup/security_group.go b/pkg/cloudbroker/secgroup/security_group.go index 89df9f3..a5c3e21 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/v14/interfaces" +import "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 710f618..ca57bc7 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) type UpdateRequest struct { diff --git a/pkg/cloudbroker/securitygroup.go b/pkg/cloudbroker/securitygroup.go index 81c0979..295df54 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/v14/pkg/cloudbroker/secgroup" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/pkg/cloudbroker/secgroup" ) // Accessing the Security Group method group diff --git a/pkg/cloudbroker/sep.go b/pkg/cloudbroker/sep.go index 05df849..e8be9b6 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/v14/pkg/cloudbroker/sep" +import "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 index ab4eac6..a03f6c2 100644 --- a/pkg/cloudbroker/sep/access_grant.go +++ b/pkg/cloudbroker/sep/access_grant.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // AccessGrantRequest struct to grant access to SEP diff --git a/pkg/cloudbroker/sep/access_grant_to_pool.go b/pkg/cloudbroker/sep/access_grant_to_pool.go index f6878c0..7592759 100644 --- a/pkg/cloudbroker/sep/access_grant_to_pool.go +++ b/pkg/cloudbroker/sep/access_grant_to_pool.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // AccessGrantToPoolRequest struct to grant access to pool SEP diff --git a/pkg/cloudbroker/sep/access_revoke.go b/pkg/cloudbroker/sep/access_revoke.go index 601850b..73f7348 100644 --- a/pkg/cloudbroker/sep/access_revoke.go +++ b/pkg/cloudbroker/sep/access_revoke.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // AccessRevokeRequest struct to revoke access to SEP diff --git a/pkg/cloudbroker/sep/access_revoke_to_pool.go b/pkg/cloudbroker/sep/access_revoke_to_pool.go index 9d9d53c..e2baf88 100644 --- a/pkg/cloudbroker/sep/access_revoke_to_pool.go +++ b/pkg/cloudbroker/sep/access_revoke_to_pool.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // AccessRevokeToPoolRequest struct to revoke access to pool SEP diff --git a/pkg/cloudbroker/sep/add_consumer_nodes.go b/pkg/cloudbroker/sep/add_consumer_nodes.go index a8454be..cbf7034 100644 --- a/pkg/cloudbroker/sep/add_consumer_nodes.go +++ b/pkg/cloudbroker/sep/add_consumer_nodes.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 ad6cd3f..547730c 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // AddPoolRequest struct to add pool to storage endpoint (SEP) @@ -16,7 +16,7 @@ type AddPoolRequest struct { SEPID uint64 `url:"sep_id" json:"sep_id" validate:"required"` // Pool structure which contains fields such as "name", "usage_limit", "types", "system", "accessAccountIds", "accessResGroupIds". Added fields for other pool types: Des, Ovs - "uris" list of "ip, port". - // Dorado, Tatlin no additional fields required. Hitachi - "id", "snapshotable", "snapshot_pool_id", "minLdevId", "maxLdevId", "clone_technology". Shared - "description", "wwns", "allocate_type", "stripes", "metadata_size", "metadatatalun". Local - "description", "node_consumer", "block_disk". + // Dorado, Tatlin - "vdisk_discard". Hitachi - "id", "snapshotable", "snapshot_pool_id", "minLdevId", "maxLdevId", "clone_technology", "vdisk_discard". Shared - "description", "wwns", "allocate_type", "stripes", "metadata_size", "metadatatalun", "vdisk_discard" Local - "description", "node_consumer", "block_disk". // Required: true Pool string `url:"pool" json:"pool" validate:"required"` } diff --git a/pkg/cloudbroker/sep/add_provider_nodes.go b/pkg/cloudbroker/sep/add_provider_nodes.go index e1becd6..5447c91 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 cba3f3a..12be6eb 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 a9d07e0..b89295b 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // ConfigInsertRequest struct to insert config diff --git a/pkg/cloudbroker/sep/config_validate.go b/pkg/cloudbroker/sep/config_validate.go index e4241e1..fa3887c 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // ConfigValidateRequest struct to validate config diff --git a/pkg/cloudbroker/sep/consumption.go b/pkg/cloudbroker/sep/consumption.go index 1897965..539f1fb 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // ConsumptionRequest struct to get consumption info diff --git a/pkg/cloudbroker/sep/create.go b/pkg/cloudbroker/sep/create.go index 886bffa..e3728e5 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // CreateRequest struct to create SEP object diff --git a/pkg/cloudbroker/sep/decommission.go b/pkg/cloudbroker/sep/decommission.go index 46999bc..a6cbaac 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 a46469a..7a84bca 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 798505b..9423d8a 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 27380f9..c1a7a9c 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // DeleteRequest struct to delete SEP diff --git a/pkg/cloudbroker/sep/disable.go b/pkg/cloudbroker/sep/disable.go index 85afbfc..5b45025 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // DisableRequest struct to disable SEP diff --git a/pkg/cloudbroker/sep/disk_list.go b/pkg/cloudbroker/sep/disk_list.go index ae3a105..58a6377 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 cf06990..d570ae3 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // EnableRequest struct to enable SEP diff --git a/pkg/cloudbroker/sep/get.go b/pkg/cloudbroker/sep/get.go index 3535009..055ec5f 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 893f442..1650538 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 fd6f620..d6e29c1 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 c4ea7d4..268db6f 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // GetTemplateRequest struct to get template of SEP diff --git a/pkg/cloudbroker/sep/list.go b/pkg/cloudbroker/sep/list.go index ff87005..f019002 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 f160e05..954adc6 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 2b7e603..d5a115d 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/v14/interfaces" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/interfaces" ) // Structure for creating request to storage endpoint provider diff --git a/pkg/cloudbroker/sep/serialize.go b/pkg/cloudbroker/sep/serialize.go index b9e58b3..89c1c44 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/v14/internal/serialization" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 c13ac95..3863568 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 2dbff28..89a3f28 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // SharedLockStopRequest struct to stop shared locks diff --git a/pkg/cloudbroker/sep/update.go b/pkg/cloudbroker/sep/update.go new file mode 100644 index 0000000..1bb00e0 --- /dev/null +++ b/pkg/cloudbroker/sep/update.go @@ -0,0 +1,48 @@ +package sep + +import ( + "context" + "net/http" + "strconv" + + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" +) + +// UpdateRequest struct to update SEP object +type UpdateRequest struct { + // ID of SEP to update + // Required: true + SEPID uint64 `url:"sep_id" json:"sep_id" validate:"required,min=1"` + + // New SEP name + // Required: false + // Default: null + SEPName string `url:"name,omitempty" json:"name,omitempty" validate:"omitempty,min=1,max=256,sepName"` + + // New description + // Required: false + // Default: null + Description string `url:"description,omitempty" json:"description,omitempty" validate:"omitempty,max=4096,sepDescription"` +} + +// Update updates SEP object +func (s SEP) Update(ctx context.Context, req UpdateRequest) (bool, error) { + err := validators.ValidateRequest(req) + if err != nil { + return false, validators.ValidationErrors(validators.GetErrors(err)) + } + + url := "/cloudbroker/sep/update" + + 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/storage_policy.go b/pkg/cloudbroker/storage_policy.go index 17507ff..1edab13 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/v14/pkg/cloudbroker/stpolicy" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 ec201ca..30a6acd 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) type AddPoolRequest struct { diff --git a/pkg/cloudbroker/stpolicy/create.go b/pkg/cloudbroker/stpolicy/create.go index 295bcd8..8575910 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/v14/internal/constants" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/constants" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) type AccessSEPsPool struct { diff --git a/pkg/cloudbroker/stpolicy/delete.go b/pkg/cloudbroker/stpolicy/delete.go index 9760d70..748032a 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) type DeleteRequest struct { diff --git a/pkg/cloudbroker/stpolicy/delete_pool.go b/pkg/cloudbroker/stpolicy/delete_pool.go index a735261..1091e59 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) type DeletePoolRequest struct { diff --git a/pkg/cloudbroker/stpolicy/disable.go b/pkg/cloudbroker/stpolicy/disable.go index c809a15..09c4ffe 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) type DisableRequest struct { diff --git a/pkg/cloudbroker/stpolicy/enable.go b/pkg/cloudbroker/stpolicy/enable.go index bc5cd00..8672c98 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) type EnableRequest struct { diff --git a/pkg/cloudbroker/stpolicy/get.go b/pkg/cloudbroker/stpolicy/get.go index 97aed01..0645bae 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) type GetRequest struct { diff --git a/pkg/cloudbroker/stpolicy/list.go b/pkg/cloudbroker/stpolicy/list.go index d85aa32..0c3f011 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) type ListRequest struct { diff --git a/pkg/cloudbroker/stpolicy/storage_policy.go b/pkg/cloudbroker/stpolicy/storage_policy.go index 7694187..3d3f57a 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/v14/interfaces" +import "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 c15bf73..58d28c4 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/v14/internal/constants" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/constants" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) type UpdateRequest struct { diff --git a/pkg/cloudbroker/tasks.go b/pkg/cloudbroker/tasks.go index 1f16324..abc3ab5 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/v14/pkg/cloudbroker/tasks" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/pkg/cloudbroker/tasks" ) // Accessing the tasks method group diff --git a/pkg/cloudbroker/tasks/get.go b/pkg/cloudbroker/tasks/get.go index 6ec2e17..fa3fd19 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 fc27532..38e4c3a 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // ListRequest struct to get list of audits diff --git a/pkg/cloudbroker/tasks/tasks.go b/pkg/cloudbroker/tasks/tasks.go index fdaeecc..b0e5b2a 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/v14/interfaces" +import "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/interfaces" // Structure for creating request to tasks type Tasks struct { diff --git a/pkg/cloudbroker/trunk.go b/pkg/cloudbroker/trunk.go index 46d8537..e52389d 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/v14/pkg/cloudbroker/trunk" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 ca02c83..5883db1 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 75f48e7..ccb09db 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 aca2dd1..2e3e718 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // CreateRequest struct to create a trunk diff --git a/pkg/cloudbroker/trunk/destroy.go b/pkg/cloudbroker/trunk/destroy.go index 698059e..27de09b 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // DestroyRequest struct to destroy a trunk diff --git a/pkg/cloudbroker/trunk/disable.go b/pkg/cloudbroker/trunk/disable.go index 40c3d9a..e648988 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // DisableRequest struct to disable a trunk diff --git a/pkg/cloudbroker/trunk/enable.go b/pkg/cloudbroker/trunk/enable.go index 013445a..4ae5353 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // EnableRequest struct to enable a trunk diff --git a/pkg/cloudbroker/trunk/get.go b/pkg/cloudbroker/trunk/get.go index 7dbbe6a..6f12040 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 2d01a8c..419b96c 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // ListRequest struct to get list of trunks diff --git a/pkg/cloudbroker/trunk/trunk.go b/pkg/cloudbroker/trunk/trunk.go index 1c58feb..d0b4305 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/v14/interfaces" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/interfaces" ) // Structure for creating request to trunk diff --git a/pkg/cloudbroker/trunk/update.go b/pkg/cloudbroker/trunk/update.go index 0ba1abf..c1dcc70 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // UpdateRequest struct to update a trunk diff --git a/pkg/cloudbroker/user.go b/pkg/cloudbroker/user.go index ae58dfc..dce9e27 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/v14/pkg/cloudbroker/user" +import "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 2d39036..3f6a02c 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 bbe7cf3..cfa5fde 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 b4fa674..29ec9f2 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 c598bc9..1936a81 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 83bbcf2..63847c0 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // BlockRequest struct to block a user. diff --git a/pkg/cloudbroker/user/create.go b/pkg/cloudbroker/user/create.go index f3f119d..a53b4e7 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // CreateRequest struct for creating a user. @@ -18,9 +18,8 @@ type CreateRequest struct { EmailAddress string `url:"emailaddress" json:"emailaddress" validate:"required"` // Password of user - // Required: false - // Default: strongpassword - Password string `url:"password,omitempty" json:"password,omitempty"` + // Required: true + Password string `url:"password" json:"password" validate:"required"` // List of apiaccess groups this user belongs to. // Required: false diff --git a/pkg/cloudbroker/user/delete.go b/pkg/cloudbroker/user/delete.go index 9358466..4cfd967 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 4f9fc32..7c107a0 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 8ce6714..bd193ed 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 f1089cd..d811336 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // GetRequest struct to get user details. diff --git a/pkg/cloudbroker/user/get_matching_usernames.go b/pkg/cloudbroker/user/get_matching_usernames.go index aa9e922..ef00131 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 4488a9e..223a5f7 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // ListRequest struct to get all non deleted user instances. diff --git a/pkg/cloudbroker/user/models.go b/pkg/cloudbroker/user/models.go index 901be3a..78fde62 100644 --- a/pkg/cloudbroker/user/models.go +++ b/pkg/cloudbroker/user/models.go @@ -54,9 +54,6 @@ type ItemUser struct { // Mobile Mobile []interface{} `json:"mobile"` - // Password - Password string `json:"passwd"` - // Protected Protected bool `json:"protected"` diff --git a/pkg/cloudbroker/user/unblock.go b/pkg/cloudbroker/user/unblock.go index b08752c..9c0bcc9 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // UnblockRequest struct to block a user. diff --git a/pkg/cloudbroker/user/user.go b/pkg/cloudbroker/user/user.go index 662365d..2056f48 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/v14/interfaces" +import "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/interfaces" // Structure for creating request to User type User struct { diff --git a/pkg/cloudbroker/vfpool.go b/pkg/cloudbroker/vfpool.go index 1369327..70e2841 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/v14/pkg/cloudbroker/vfpool" +import "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 ba3c95e..6d4ecbf 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // CreateRequest struct to create vfpool device diff --git a/pkg/cloudbroker/vfpool/delete.go b/pkg/cloudbroker/vfpool/delete.go index 3297872..8cdafb5 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // DeleteRequest struct to delete vfpool device diff --git a/pkg/cloudbroker/vfpool/disable.go b/pkg/cloudbroker/vfpool/disable.go index 376ec2e..25794c4 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // DisableRequest struct to disable vfpool device diff --git a/pkg/cloudbroker/vfpool/enable.go b/pkg/cloudbroker/vfpool/enable.go index 54bea66..9beaccb 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // EnableRequest struct to enable vfpool device diff --git a/pkg/cloudbroker/vfpool/get.go b/pkg/cloudbroker/vfpool/get.go index 0af1bc9..180caa1 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 ef10cd0..fe25514 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 1214ce7..48d7f4f 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/v14/internal/serialization" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 f1eba13..11db664 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // UpdateRequest struct to update vfpool device diff --git a/pkg/cloudbroker/vfpool/vfpool.go b/pkg/cloudbroker/vfpool/vfpool.go index 48885fa..e0e05be 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/v14/interfaces" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/interfaces" ) // Structure for creating request to vfpool diff --git a/pkg/cloudbroker/vgpu.go b/pkg/cloudbroker/vgpu.go index 7640f97..fe2de0a 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/v14/pkg/cloudbroker/vgpu" +import "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 index 5a7259a..621231b 100644 --- a/pkg/cloudbroker/vgpu/allocate.go +++ b/pkg/cloudbroker/vgpu/allocate.go @@ -3,7 +3,7 @@ package vgpu import ( "context" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" "strconv" ) diff --git a/pkg/cloudbroker/vgpu/create.go b/pkg/cloudbroker/vgpu/create.go index 2eeb405..d1d3e0b 100644 --- a/pkg/cloudbroker/vgpu/create.go +++ b/pkg/cloudbroker/vgpu/create.go @@ -3,7 +3,7 @@ package vgpu import ( "context" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" "strconv" ) diff --git a/pkg/cloudbroker/vgpu/deallocate.go b/pkg/cloudbroker/vgpu/deallocate.go index ca95262..8ba9c25 100644 --- a/pkg/cloudbroker/vgpu/deallocate.go +++ b/pkg/cloudbroker/vgpu/deallocate.go @@ -3,7 +3,7 @@ package vgpu import ( "context" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" "strconv" ) diff --git a/pkg/cloudbroker/vgpu/destroy.go b/pkg/cloudbroker/vgpu/destroy.go index cf493ec..50bd40f 100644 --- a/pkg/cloudbroker/vgpu/destroy.go +++ b/pkg/cloudbroker/vgpu/destroy.go @@ -3,7 +3,7 @@ package vgpu import ( "context" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" "strconv" ) diff --git a/pkg/cloudbroker/vgpu/list.go b/pkg/cloudbroker/vgpu/list.go index 91751ff..ec498b9 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // ListRequest struct to get list of VGPU diff --git a/pkg/cloudbroker/vgpu/serialize.go b/pkg/cloudbroker/vgpu/serialize.go index cc444b2..3969185 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/v14/internal/serialization" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 8c3e81e..46be8af 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/v14/interfaces" +import "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/interfaces" // Structure for creating request to VGPU type VGPU struct { diff --git a/pkg/cloudbroker/vins.go b/pkg/cloudbroker/vins.go index 6e03225..cfdca30 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/v14/pkg/cloudbroker/vins" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/pkg/cloudbroker/vins" ) // Accessing the VINS method group diff --git a/pkg/cloudbroker/vins/audits.go b/pkg/cloudbroker/vins/audits.go index 11f5708..2639f78 100644 --- a/pkg/cloudbroker/vins/audits.go +++ b/pkg/cloudbroker/vins/audits.go @@ -5,7 +5,7 @@ import ( "encoding/json" "net/http" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // AuditsRequest struct to get audits diff --git a/pkg/cloudbroker/vins/create_in_account.go b/pkg/cloudbroker/vins/create_in_account.go index 4d01f4c..27db973 100644 --- a/pkg/cloudbroker/vins/create_in_account.go +++ b/pkg/cloudbroker/vins/create_in_account.go @@ -6,7 +6,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) type Route struct { diff --git a/pkg/cloudbroker/vins/create_in_rg.go b/pkg/cloudbroker/vins/create_in_rg.go index a9a2627..513475d 100644 --- a/pkg/cloudbroker/vins/create_in_rg.go +++ b/pkg/cloudbroker/vins/create_in_rg.go @@ -6,7 +6,7 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 b490fbf..f69777d 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // DefaultQOSUpdateRequest struct to update QOS diff --git a/pkg/cloudbroker/vins/delete.go b/pkg/cloudbroker/vins/delete.go index f4ea0a6..73fe83f 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // DeleteRequest struct to delete VINS diff --git a/pkg/cloudbroker/vins/disable.go b/pkg/cloudbroker/vins/disable.go index 4528a88..0e3444a 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // DisableRequest struct to disable VINS diff --git a/pkg/cloudbroker/vins/dns_apply.go b/pkg/cloudbroker/vins/dns_apply.go index 16d41fd..fefd662 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 9c7c935..3bfbf1c 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // EnableRequest struct to enable VINS diff --git a/pkg/cloudbroker/vins/extnet_connect.go b/pkg/cloudbroker/vins/extnet_connect.go index 3ccae44..71dcf7c 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 f7a38b3..820fc17 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 e7a7e63..93bb409 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 4cb50a3..910497f 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 62d4f93..d3ef4e9 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // IPListRequest struct for DHCP IP diff --git a/pkg/cloudbroker/vins/ip_release.go b/pkg/cloudbroker/vins/ip_release.go index 348a994..7c0268e 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // IPReleaseRequest struct for IP release diff --git a/pkg/cloudbroker/vins/ip_reserve.go b/pkg/cloudbroker/vins/ip_reserve.go index e896c5c..64c9c33 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // IPReserveRequest struct for IP reserve diff --git a/pkg/cloudbroker/vins/list.go b/pkg/cloudbroker/vins/list.go index 27ad0d1..40a7f4f 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 32d5fc6..4afb6ab 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 1fef2f6..90d44b9 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 cc9c0c6..1a7c6a9 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 955b370..2a87c8b 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 0231dc7..e791106 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 ea3c58f..e036af2 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 5b7204b..4c5d227 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 2170098..dba8add 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 129a8ee..ccbaa71 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 aca3e8f..e220457 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // RestoreRequest struct for restore diff --git a/pkg/cloudbroker/vins/serialize.go b/pkg/cloudbroker/vins/serialize.go index bc1bb43..fc3e615 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/v14/internal/serialization" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 10f1332..db205dd 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 4702aa5..ff95b64 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 02bf884..3348e19 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 db354d1..69ffec8 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 ecd5624..eb085bc 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // StaticRouteListRequest struct for static route list diff --git a/pkg/cloudbroker/vins/update.go b/pkg/cloudbroker/vins/update.go index dc8d490..94c85e4 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // UpdateRequest struct to update vins parameters diff --git a/pkg/cloudbroker/vins/vins.go b/pkg/cloudbroker/vins/vins.go index d3addd3..4a5e041 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/v14/interfaces" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/interfaces" ) // Structure for creating request to VINS diff --git a/pkg/cloudbroker/vins/vnfdev_redeploy.go b/pkg/cloudbroker/vins/vnfdev_redeploy.go index e3c99a5..2885540 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 219ec74..699b554 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 929371f..84e1b2d 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 b644c44..b311eb7 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 5e59000..ef2f311 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // VNFDevStopRequest struct to stop VNF devices diff --git a/pkg/cloudbroker/zone.go b/pkg/cloudbroker/zone.go index d336e54..151f4c1 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/v14/pkg/cloudbroker/zone" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 new file mode 100644 index 0000000..fb8d74c --- /dev/null +++ b/pkg/cloudbroker/zone/add_cpu_alignment_profile.go @@ -0,0 +1,51 @@ +package zone + +import ( + "context" + "encoding/json" + "net/http" + + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" +) + +// AddCPUAlignmentProfileRequest struct to add CPU alignment profile to zone +type AddCPUAlignmentProfileRequest struct { + // ID of zone + // Required: true + ZoneID uint64 `url:"zone_id" json:"zone_id" validate:"required"` + + // Hypervisor similarity in percentage + // Default: 70 + // Required: false + HypervisorSimilarityInPercentage uint64 `url:"hypervisor_similarity_in_percentage,omitempty" json:"hypervisor_similarity_in_percentage,omitempty"` +} + +// AddCPUAlignmentProfile adds CPU alignment profile to zone +func (e Zone) AddCPUAlignmentProfile(ctx context.Context, req AddCPUAlignmentProfileRequest) ([]CpuAlignmentProfile, error) { + res, err := e.AddCPUAlignmentProfileRaw(ctx, req) + if err != nil { + return nil, err + } + + var profiles []CpuAlignmentProfile + + err = json.Unmarshal(res, &profiles) + if err != nil { + return nil, err + } + + return profiles, nil +} + +// AddCPUAlignmentProfileRaw adds CPU alignment profile to zone and returns the result as an array of bytes +func (e Zone) AddCPUAlignmentProfileRaw(ctx context.Context, req AddCPUAlignmentProfileRequest) ([]byte, error) { + err := validators.ValidateRequest(req) + if err != nil { + return nil, validators.ValidationErrors(validators.GetErrors(err)) + } + + url := "/cloudbroker/zone/add_cpu_alignment_profile" + + res, err := e.client.DecortApiCall(ctx, http.MethodPost, url, req) + return res, err +} diff --git a/pkg/cloudbroker/zone/add_node.go b/pkg/cloudbroker/zone/add_node.go index 2554f23..2f5ea82 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // AddNodeRequest struct to add node to zone diff --git a/pkg/cloudbroker/zone/create.go b/pkg/cloudbroker/zone/create.go index 8d97d29..7b81f86 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // CreateRequest struct to create zone diff --git a/pkg/cloudbroker/zone/del_node.go b/pkg/cloudbroker/zone/del_node.go index 0d66646..7e9dfde 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // DelNodeRequest struct to remove node from zone diff --git a/pkg/cloudbroker/zone/delete.go b/pkg/cloudbroker/zone/delete.go index 2bf66fa..4d6519f 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 new file mode 100644 index 0000000..4e98455 --- /dev/null +++ b/pkg/cloudbroker/zone/delete_cpu_alignment_profile.go @@ -0,0 +1,38 @@ +package zone + +import ( + "context" + "net/http" + "strconv" + + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" +) + +// DeleteCPUAlignmentProfileRequest struct to delete CPU alignment profile from zone +type DeleteCPUAlignmentProfileRequest struct { + // ID of zone + // Required: true + ZoneID uint64 `url:"zone_id" json:"zone_id" validate:"required"` +} + +// DeleteCPUAlignmentProfile deletes CPU alignment profile from zone +func (e Zone) DeleteCPUAlignmentProfile(ctx context.Context, req DeleteCPUAlignmentProfileRequest) (bool, error) { + err := validators.ValidateRequest(req) + if err != nil { + return false, validators.ValidationErrors(validators.GetErrors(err)) + } + + url := "/cloudbroker/zone/delete_cpu_alignment_profile" + + res, err := e.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/zone/get.go b/pkg/cloudbroker/zone/get.go index 00b142e..2e11810 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 new file mode 100644 index 0000000..d0a4f57 --- /dev/null +++ b/pkg/cloudbroker/zone/get_cpu_alignment_profile.go @@ -0,0 +1,46 @@ +package zone + +import ( + "context" + "encoding/json" + "net/http" + + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" +) + +// GetCPUAlignmentProfileRequest struct to get CPU alignment profile of zone +type GetCPUAlignmentProfileRequest struct { + // ID of zone + // Required: true + ZoneID uint64 `url:"zone_id" json:"zone_id" validate:"required"` +} + +// GetCPUAlignmentProfile gets CPU alignment profile of zone +func (e Zone) GetCPUAlignmentProfile(ctx context.Context, req GetCPUAlignmentProfileRequest) ([]CpuAlignmentProfile, error) { + res, err := e.GetCPUAlignmentProfileRaw(ctx, req) + if err != nil { + return nil, err + } + + var profiles []CpuAlignmentProfile + + err = json.Unmarshal(res, &profiles) + if err != nil { + return nil, err + } + + return profiles, nil +} + +// GetCPUAlignmentProfileRaw gets CPU alignment profile of zone as an array of bytes +func (e Zone) GetCPUAlignmentProfileRaw(ctx context.Context, req GetCPUAlignmentProfileRequest) ([]byte, error) { + err := validators.ValidateRequest(req) + if err != nil { + return nil, validators.ValidationErrors(validators.GetErrors(err)) + } + + url := "/cloudbroker/zone/get_cpu_alignment_profile" + + res, err := e.client.DecortApiCall(ctx, http.MethodGet, url, req) + return res, err +} diff --git a/pkg/cloudbroker/zone/list.go b/pkg/cloudbroker/zone/list.go index d070c45..e7970a4 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 new file mode 100644 index 0000000..b711a7d --- /dev/null +++ b/pkg/cloudbroker/zone/list_cpu_alignment_profile.go @@ -0,0 +1,45 @@ +package zone + +import ( + "context" + "encoding/json" + "net/http" + + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" +) + +// ListCPUAlignmentProfileRequest struct to list CPU alignment profiles +type ListCPUAlignmentProfileRequest struct { + // ID of zone + // Required: false + ZoneID uint64 `url:"zone_id,omitempty" json:"zone_id,omitempty"` +} + +// ListCPUAlignmentProfile gets list of CPU alignment profiles +func (e Zone) ListCPUAlignmentProfile(ctx context.Context, req ListCPUAlignmentProfileRequest) (*ListCPUAlignmentProfiles, error) { + res, err := e.ListCPUAlignmentProfileRaw(ctx, req) + if err != nil { + return nil, err + } + + list := ListCPUAlignmentProfiles{} + + err = json.Unmarshal(res, &list) + if err != nil { + return nil, err + } + + return &list, nil +} + +// ListCPUAlignmentProfileRaw gets list of CPU alignment profiles as an array of bytes +func (e Zone) ListCPUAlignmentProfileRaw(ctx context.Context, req ListCPUAlignmentProfileRequest) ([]byte, error) { + if err := validators.ValidateRequest(req); err != nil { + return nil, validators.ValidationErrors(validators.GetErrors(err)) + } + + url := "/cloudbroker/zone/list_cpu_alignment_profile" + + res, err := e.client.DecortApiCall(ctx, http.MethodPost, url, req) + return res, err +} diff --git a/pkg/cloudbroker/zone/models.go b/pkg/cloudbroker/zone/models.go index d79ce39..306c608 100644 --- a/pkg/cloudbroker/zone/models.go +++ b/pkg/cloudbroker/zone/models.go @@ -1,5 +1,65 @@ package zone +// CPU alignment profile +type CpuAlignmentProfile struct { + // Profile name + Name string `json:"name"` + + // Vendor + Vendor string `json:"vendor"` + + // Model + Model string `json:"model"` +} + +// CPU alignment profile candidate +type CpuAlignmentProfileCandidate struct { + // Profile name + Name string `json:"name"` + + // Vendor + Vendor string `json:"vendor"` + + // Model + Model string `json:"model"` + + // Count + Count uint64 `json:"count"` + + // Percentage + Percentage uint64 `json:"percentage"` + + // Required count + RequiredCount uint64 `json:"required_count"` +} + +// Response for test_cpu_alignment_profile +type TestCPUAlignmentProfileResult struct { + // Profiles + Profiles []CpuAlignmentProfile `json:"profiles"` + + // Candidates + Candidates []CpuAlignmentProfileCandidate `json:"candidates"` +} + +// Item for list_cpu_alignment_profile response +type ItemCPUAlignmentProfile struct { + // Zone ID + ZoneID uint64 `json:"zoneId"` + + // CPU alignment profiles + CpuAlignmentProfiles []CpuAlignmentProfile `json:"cpu_alignment_profiles"` +} + +// Response for list_cpu_alignment_profile +type ListCPUAlignmentProfiles struct { + // Entry count + EntryCount uint64 `json:"entryCount"` + + // Data + Data []ItemCPUAlignmentProfile `json:"data"` +} + type ListZones struct { // Entry count EntryCount uint64 `json:"entryCount"` @@ -96,6 +156,9 @@ type RecordZone struct { // Domain Domain string `json:"domain"` + + // CPU alignment profiles + CpuAlignmentProfiles []CpuAlignmentProfile `json:"cpu_alignment_profiles"` } // A zone item from a list @@ -165,4 +228,7 @@ type ItemZone struct { // Domain Domain string `json:"domain"` + + // CPU alignment profiles + CpuAlignmentProfiles []CpuAlignmentProfile `json:"cpu_alignment_profiles"` } diff --git a/pkg/cloudbroker/zone/node_autostart.go b/pkg/cloudbroker/zone/node_autostart.go index 74196a3..aef0c2a 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 304198d..8215a55 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/v14/internal/serialization" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/serialization" ) // Serialize returns JSON-serialized []byte. Used as a wrapper over json.Marshal and json.MarshalIndent functions. diff --git a/pkg/cloudbroker/zone/test_cpu_alignment_profile.go b/pkg/cloudbroker/zone/test_cpu_alignment_profile.go new file mode 100644 index 0000000..ffe7205 --- /dev/null +++ b/pkg/cloudbroker/zone/test_cpu_alignment_profile.go @@ -0,0 +1,51 @@ +package zone + +import ( + "context" + "encoding/json" + "net/http" + + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" +) + +// TestCPUAlignmentProfileRequest struct to test CPU alignment profile for zone +type TestCPUAlignmentProfileRequest struct { + // ID of zone + // Required: true + ZoneID uint64 `url:"zone_id" json:"zone_id" validate:"required"` + + // Hypervisor similarity in percentage + // Default: 70 + // Required: false + HypervisorSimilarityInPercentage uint64 `url:"hypervisor_similarity_in_percentage,omitempty" json:"hypervisor_similarity_in_percentage,omitempty"` +} + +// TestCPUAlignmentProfile tests CPU alignment profile for zone +func (e Zone) TestCPUAlignmentProfile(ctx context.Context, req TestCPUAlignmentProfileRequest) (*TestCPUAlignmentProfileResult, error) { + res, err := e.TestCPUAlignmentProfileRaw(ctx, req) + if err != nil { + return nil, err + } + + result := TestCPUAlignmentProfileResult{} + + err = json.Unmarshal(res, &result) + if err != nil { + return nil, err + } + + return &result, nil +} + +// TestCPUAlignmentProfileRaw tests CPU alignment profile for zone and returns the result as an array of bytes +func (e Zone) TestCPUAlignmentProfileRaw(ctx context.Context, req TestCPUAlignmentProfileRequest) ([]byte, error) { + err := validators.ValidateRequest(req) + if err != nil { + return nil, validators.ValidationErrors(validators.GetErrors(err)) + } + + url := "/cloudbroker/zone/test_cpu_alignment_profile" + + res, err := e.client.DecortApiCall(ctx, http.MethodPost, url, req) + return res, err +} diff --git a/pkg/cloudbroker/zone/update.go b/pkg/cloudbroker/zone/update.go index 7b9c2d0..dba3911 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // UpdateRequest struct to update zone diff --git a/pkg/cloudbroker/zone/zone.go b/pkg/cloudbroker/zone/zone.go index bf9af21..a15987f 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/v14/interfaces" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/interfaces" ) // Structure for creating request to zone diff --git a/pkg/sdn/access_groups.go b/pkg/sdn/access_groups.go index 0403f7f..96aa026 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/v14/pkg/sdn/acsgroups" + ag "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 3a025f8..c46b008 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/v14/interfaces" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/interfaces" ) // Structure for creating request to access groups diff --git a/pkg/sdn/acsgroups/create.go b/pkg/sdn/acsgroups/create.go index 5a1981a..d630040 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/v14/internal/constants" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/constants" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // CreateRequest struct to create access group diff --git a/pkg/sdn/acsgroups/delete.go b/pkg/sdn/acsgroups/delete.go index 8721197..baae474 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/v14/internal/constants" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/constants" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // DeleteRequest struct to delete access group diff --git a/pkg/sdn/acsgroups/get.go b/pkg/sdn/acsgroups/get.go index a229799..a441e8f 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // GetGroupRequest struct to get an access group diff --git a/pkg/sdn/acsgroups/list.go b/pkg/sdn/acsgroups/list.go index 2309b79..afec1e9 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 ca9d51c..58f8e95 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/v14/internal/constants" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/constants" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 9ce3c40..a3eb700 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/v14/internal/constants" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/constants" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 d2b5e85..06b934c 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/v14/internal/constants" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/constants" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 550025c..3b25298 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 7042748..1318d20 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/v14/internal/constants" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/constants" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // UserUpdateRoleRequest struct to userUpdateRole access group diff --git a/pkg/sdn/address_pools.go b/pkg/sdn/address_pools.go index f077ba2..004f33a 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/v14/pkg/sdn/adrspools" + ap "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 00debe1..1bae017 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/v14/interfaces" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/interfaces" ) // Structure for creating request to address pools diff --git a/pkg/sdn/adrspools/create.go b/pkg/sdn/adrspools/create.go index 16bde41..32f7ce7 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/v14/internal/constants" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/constants" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // CreateRequest struct to create address pool diff --git a/pkg/sdn/adrspools/delete.go b/pkg/sdn/adrspools/delete.go index 26b52fa..eb20422 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/v14/internal/constants" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/constants" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // DeleteRequest struct to delete address pool diff --git a/pkg/sdn/adrspools/get.go b/pkg/sdn/adrspools/get.go index 2ebf18a..4194181 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 9080133..5d4920e 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 7f3ead3..e605298 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/v14/internal/serialization" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 262885e..7943571 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/v14/internal/constants" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/constants" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 dfb969e..5867402 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/v14/pkg/sdn/defsecpolicies" + dsp "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 343123a..5f62f8e 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/v14/interfaces" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/interfaces" ) // Structure for creating request to default security policies diff --git a/pkg/sdn/defsecpolicies/list.go b/pkg/sdn/defsecpolicies/list.go index 7fe74e8..1956103 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 cb14d61..3508599 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/v14/internal/serialization" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 8bb135c..34339d1 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/v14/internal/constants" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/constants" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // UpdateRequest struct to update default security policy diff --git a/pkg/sdn/extnet.go b/pkg/sdn/extnet.go index 1a15690..cc91dc2 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/v14/pkg/sdn/extnet" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/pkg/sdn/extnet" ) // Accessing the ExtNet method group diff --git a/pkg/sdn/extnet/create.go b/pkg/sdn/extnet/create.go index dba6437..db2655c 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/v14/internal/constants" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/constants" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // CreateRequest struct for creating account diff --git a/pkg/sdn/extnet/delete.go b/pkg/sdn/extnet/delete.go index 47b0ef4..13aff85 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/v14/internal/constants" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/constants" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // DeleteRequest struct for delete extnet diff --git a/pkg/sdn/extnet/extnet.go b/pkg/sdn/extnet/extnet.go index f15b261..64de75f 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/v14/interfaces" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/interfaces" ) // Structure for creating request to external networks diff --git a/pkg/sdn/extnet/get.go b/pkg/sdn/extnet/get.go index 14c963a..c509e5a 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 b816666..2ca4526 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 2d6e272..6a1d379 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/v14/internal/constants" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/constants" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 57db566..7a84b0c 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/v14/internal/constants" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/constants" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // PortUpdateRequest struct for update port to extnet diff --git a/pkg/sdn/extnet/update.go b/pkg/sdn/extnet/update.go index 9d732bc..ab38d12 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/v14/internal/constants" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/constants" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // UpdateRequest struct for update extnet diff --git a/pkg/sdn/flips.go b/pkg/sdn/flips.go index dae1c4b..8e899f1 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/v14/pkg/sdn/flips" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/pkg/sdn/flips" ) // Accessing the SDN method group diff --git a/pkg/sdn/flips/create.go b/pkg/sdn/flips/create.go index 41aa133..7c7aa3d 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/v14/internal/constants" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/constants" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) type CreateRequest struct { diff --git a/pkg/sdn/flips/delete.go b/pkg/sdn/flips/delete.go index 6172593..84c1ed0 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/v14/internal/constants" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/constants" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // DeleteRequest to delete a floating ip diff --git a/pkg/sdn/flips/flips.go b/pkg/sdn/flips/flips.go index c71cd0c..8381a55 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/v14/interfaces" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/interfaces" ) // Structure for creating request to floating IPs diff --git a/pkg/sdn/flips/get.go b/pkg/sdn/flips/get.go index c779703..282b853 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) type GetRequest struct { diff --git a/pkg/sdn/flips/list.go b/pkg/sdn/flips/list.go index 8eb06d4..20a5a31 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // List of floating ips diff --git a/pkg/sdn/flips/update.go b/pkg/sdn/flips/update.go index 95d82d7..0a53e2f 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/v14/internal/constants" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/constants" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // UpdateRequest struct to update a floating ip diff --git a/pkg/sdn/hypervisors.go b/pkg/sdn/hypervisors.go index 2b64688..557a97e 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/v14/pkg/sdn/hypervisors" + hv "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 04375c5..1adab19 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/v14/internal/constants" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/constants" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // ConnectNodeRequest to connect a node diff --git a/pkg/sdn/hypervisors/delete.go b/pkg/sdn/hypervisors/delete.go index 310b184..271b87d 100644 --- a/pkg/sdn/hypervisors/delete.go +++ b/pkg/sdn/hypervisors/delete.go @@ -5,8 +5,8 @@ import ( "net/http" "strconv" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v14/internal/constants" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/constants" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // DeleteRequest to delete a hypervisor diff --git a/pkg/sdn/hypervisors/get.go b/pkg/sdn/hypervisors/get.go index 62f645c..103e5cc 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // GetRequest struct to get information about hypervisor diff --git a/pkg/sdn/hypervisors/hypervisors.go b/pkg/sdn/hypervisors/hypervisors.go index bbcf4fa..6820737 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/v14/interfaces" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/interfaces" ) // Structure for creating request to hypervisors diff --git a/pkg/sdn/hypervisors/list.go b/pkg/sdn/hypervisors/list.go index 88bd552..50d09e9 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 e795086..288dc4e 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 432d37f..a6e6fa6 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/v14/pkg/sdn/logicalports" + lp "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/pkg/sdn/logicalports" ) // Accessing the SDN method group diff --git a/pkg/sdn/logicalports/create.go b/pkg/sdn/logicalports/create.go index 6852252..d136c5e 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/v14/internal/constants" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/constants" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // Label struct @@ -81,8 +81,8 @@ type LogicalPortAddressRequest struct { MAC string `url:"mac,omitempty" json:"mac,omitempty"` // Is discovered. True or False - // Required: false - IsDiscovered interface{} `url:"is_discovered,omitempty" json:"is_discovered,omitempty" validate:"omitempty,isBool"` + // Required: true + IsDiscovered bool `url:"is_discovered" json:"is_discovered" validate:"required"` } // Create creates a logical port diff --git a/pkg/sdn/logicalports/create_batch.go b/pkg/sdn/logicalports/create_batch.go index f33c0f9..cd53219 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/v14/internal/constants" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/constants" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) type CreateBatchLogicalPortAddress struct { diff --git a/pkg/sdn/logicalports/delete.go b/pkg/sdn/logicalports/delete.go index d6a7b51..bdbadcc 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/v14/internal/constants" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/constants" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 ee842dd..6ec0695 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/v14/internal/constants" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/constants" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) type PortsInfo struct { diff --git a/pkg/sdn/logicalports/exclude_firewall.go b/pkg/sdn/logicalports/exclude_firewall.go index 7d8d197..af6e27c 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/v14/internal/constants" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/constants" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) type LogicalPortsForExcludeFromFirewall struct { diff --git a/pkg/sdn/logicalports/get.go b/pkg/sdn/logicalports/get.go index 76c4510..286a46d 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 62fde84..f7f132c 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 53d4732..6ea910e 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 36e0bd3..875a176 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/v14/interfaces" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 5dbee7c..455b787 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/v14/internal/constants" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/constants" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // MigrateCancelRequest struct to cancel migrate diff --git a/pkg/sdn/logicalports/migrate_start.go b/pkg/sdn/logicalports/migrate_start.go index 0abd909..b437d38 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/v14/internal/constants" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/constants" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // MigrateStartRequest struct to start migrate diff --git a/pkg/sdn/logicalports/serialize.go b/pkg/sdn/logicalports/serialize.go index 4830399..c7a740c 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/v14/internal/serialization" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 3932912..ce59fae 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/v14/internal/constants" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/constants" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) type LogicalPortsForUnexcludeFromFirewall struct { diff --git a/pkg/sdn/logicalports/update.go b/pkg/sdn/logicalports/update.go index 2a0ad91..a97eb34 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/v14/internal/constants" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/constants" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // Label struct @@ -72,6 +72,10 @@ type UpdateRequest struct { // UpdateAddress struct representing update address type UpdateAddress struct { + // ID of the address + // Required: true + ID string `url:"id" json:"id" validate:"required"` + // IP address // Required: true IP string `url:"ip" json:"ip" validate:"required"` @@ -81,16 +85,16 @@ type UpdateAddress struct { IPType string `url:"ip_type" json:"ip_type" validate:"required,oneof=IPv4 IPv6"` // Is discovered. True or False - // Required: false - IsDiscovered interface{} `url:"is_discovered,omitempty" json:"is_discovered,omitempty" validate:"omitempty,isBool"` + // Required: true + IsDiscovered bool `url:"is_discovered" json:"is_discovered" validate:"required"` // Is primary. True or False // Required: true IsPrimary interface{} `url:"is_primary" json:"is_primary" validate:"required,isBool"` // MAC address - // Required: false - MAC string `url:"mac,omitempty" json:"mac,omitempty"` + // Required: true + MAC string `url:"mac" json:"mac" validate:"required"` } // AddAddress struct representing add address @@ -104,8 +108,8 @@ type AddAddress struct { IPType string `url:"ip_type" json:"ip_type" validate:"required,oneof=IPv4 IPv6"` // Is discovered. True or False - // Required: false - IsDiscovered interface{} `url:"is_discovered,omitempty" json:"is_discovered,omitempty" validate:"omitempty,isBool"` + // Required: true + IsDiscovered bool `url:"is_discovered" json:"is_discovered" validate:"required"` // Is primary. True or False // Required: true diff --git a/pkg/sdn/netobjgroups/attach_extnet_ports.go b/pkg/sdn/netobjgroups/attach_extnet_ports.go index 4d8b486..fc92263 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/v14/internal/constants" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/constants" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 63f2009..1b8b77e 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/v14/internal/constants" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/constants" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 20cdb55..39f8aee 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/v14/internal/constants" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/constants" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 1900cd8..adcea7c 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/v14/internal/constants" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/constants" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 998e5e5..7c34c32 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/v14/internal/constants" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/constants" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 486fa37..df74773 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/v14/internal/constants" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/constants" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 90c6773..32a4614 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/v14/internal/constants" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/constants" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 f7f545f..0dbd483 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/v14/internal/constants" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/constants" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 ddbf580..77ee4b3 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 482af46..4fa32c7 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // ListRequest struct to get a list of network object groups @@ -49,6 +49,10 @@ type ListRequest struct { // Sort order (asc/desc) // Required: false SortOrder string `url:"sort_order,omitempty" json:"sort_order,omitempty"` + + // Filter by type + // Required: false + Type string `url:"type,omitempty" json:"type,omitempty"` } // List of address pools diff --git a/pkg/sdn/netobjgroups/network_object_groups.go b/pkg/sdn/netobjgroups/network_object_groups.go index 6b4ce41..6d1c367 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/v14/interfaces" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/interfaces" ) // Structure for creating request to network object groups diff --git a/pkg/sdn/netobjgroups/update.go b/pkg/sdn/netobjgroups/update.go index 09aca98..02efe9e 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/v14/internal/constants" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/constants" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 ce3f5e7..abd8b40 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/v14/pkg/sdn/netobjgroups" + nog "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/pkg/sdn/netobjgroups" ) // Accessing the SDN method group diff --git a/pkg/sdn/routers.go b/pkg/sdn/routers.go index ef10c9a..9166da0 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/v14/pkg/sdn/routers" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/pkg/sdn/routers" ) // Accessing the SDN method group diff --git a/pkg/sdn/routers/create.go b/pkg/sdn/routers/create.go index c559da6..768d4a3 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/v14/internal/constants" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/constants" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // CreateRequest struct to create router diff --git a/pkg/sdn/routers/delete.go b/pkg/sdn/routers/delete.go index db709a3..a92fd71 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/v14/internal/constants" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/constants" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // DeleteRequest struct for delete router diff --git a/pkg/sdn/routers/gateaway_port.go b/pkg/sdn/routers/gateaway_port.go index 32c4389..42d66f4 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/v14/pkg/sdn/routers/gwport" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 3d420c1..8fd39b1 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 c4c891f..c08dd5b 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/v14/internal/constants" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/constants" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 38851f3..b37c835 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/v14/internal/constants" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/constants" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 a227b8a..0a1de8c 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/v14/interfaces" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 5d742ec..d6563c8 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 1e04ca8..f97e4ea 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 c0fedb6..dc7750c 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/v14/internal/constants" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/constants" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // UpdateRequest struct to update gateway port diff --git a/pkg/sdn/routers/list.go b/pkg/sdn/routers/list.go index 77cfc8b..e70ed9b 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 a0728ac..dacd680 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/v14/pkg/sdn/routers/policies" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 7e4b82b..e988959 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 8963f31..d783a34 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/v14/interfaces" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/interfaces" ) // Structure for creating request to routers policies diff --git a/pkg/sdn/routers/routers.go b/pkg/sdn/routers/routers.go index b3daa88..ce9e491 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/v14/interfaces" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/interfaces" ) // Structure for creating request to routers diff --git a/pkg/sdn/routers/serialize.go b/pkg/sdn/routers/serialize.go index e43a098..8a64a0b 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/v14/internal/serialization" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 4cfe9dd..06ebe54 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/v14/internal/constants" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/constants" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // UpdateRequest struct for update router diff --git a/pkg/sdn/sdn.go b/pkg/sdn/sdn.go index fe1d8fa..26d491f 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/v14/interfaces" +import "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 e39705a..64e7f52 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/v14/internal/constants" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/constants" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // CreateRequest struct to create security policy diff --git a/pkg/sdn/secpolicies/delete.go b/pkg/sdn/secpolicies/delete.go index 3e585bf..6bbdea3 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/v14/internal/constants" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/constants" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // DeleteRequest struct to delete security policy diff --git a/pkg/sdn/secpolicies/get.go b/pkg/sdn/secpolicies/get.go index 707e2f9..0501626 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 006c12b..c7a207b 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 a97761d..d212a88 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/v14/internal/constants" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/constants" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // DeleteRequest struct to move security policy diff --git a/pkg/sdn/secpolicies/rule.go b/pkg/sdn/secpolicies/rule.go index a096e0f..f75189b 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/v14/pkg/sdn/secpolicies/rule" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 608bc7c..7c30dde 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 275efbe..3fcff50 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 0b9094f..68a48e7 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/v14/interfaces" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 a7e0e44..9f30e9b 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/v14/internal/serialization" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 8b5b141..f00d239 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/v14/interfaces" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/interfaces" ) // Structure for creating request to security policies diff --git a/pkg/sdn/secpolicies/serialize.go b/pkg/sdn/secpolicies/serialize.go index a78983b..a5cc63d 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/v14/internal/serialization" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 beebf0c..ed1f8d6 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/v14/internal/constants" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/constants" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // UpdateRequest struct to update security policy diff --git a/pkg/sdn/security_policies.go b/pkg/sdn/security_policies.go index 258b0c8..b38680b 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/v14/pkg/sdn/secpolicies" + sp "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/pkg/sdn/secpolicies" ) // Accessing the SDN method group diff --git a/pkg/sdn/segments.go b/pkg/sdn/segments.go index f839d46..97be1f9 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/v14/pkg/sdn/segments" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/pkg/sdn/segments" ) // Accessing the Segments method group diff --git a/pkg/sdn/segments/create.go b/pkg/sdn/segments/create.go index dd82e4e..0366dfd 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/v14/internal/constants" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/constants" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // CreateRequest struct for creating segment diff --git a/pkg/sdn/segments/delete.go b/pkg/sdn/segments/delete.go index 9c1ea99..4ee0091 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/v14/internal/constants" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/constants" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // DeleteRequest struct for delete segment diff --git a/pkg/sdn/segments/get_faa.go b/pkg/sdn/segments/get_faa.go index faef035..8faa4cf 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/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/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 0707845..8f7dea6 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/v14/interfaces" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/interfaces" ) // Structure for creating request to segments diff --git a/pkg/sdn/segments/update.go b/pkg/sdn/segments/update.go index c7ea6d8..038aa23 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/v14/internal/constants" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v14/internal/validators" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/constants" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/internal/validators" ) // UpdateRequest struct for updating segment diff --git a/pkg/sdn/version.go b/pkg/sdn/version.go index 8b80dd2..e3c46e0 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/v14/pkg/sdn/version" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/pkg/sdn/version" ) // Accessing the SDN method group diff --git a/pkg/sdn/version/version.go b/pkg/sdn/version/version.go index a973cbc..e562791 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/v14/interfaces" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/interfaces" ) // Structure for creating request to version diff --git a/samples/client/client.go b/samples/client/client.go index 284b093..8048596 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/v14" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v14/pkg/cloudbroker/compute" + decortsdk "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15" + "repository.basistech.ru/BASIS/dynamix-golang-sdk/v15/pkg/cloudbroker/compute" ) type Migrator interface { diff --git a/samples/client/client_test.go b/samples/client/client_test.go index d9df664..f63a540 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/v14" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v14/pkg/cloudbroker/compute" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v14/samples/client" + 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" ) // Пример юнит тестирования на моках diff --git a/universal-client.go b/universal-client.go index 93f6169..c4ef413 100644 --- a/universal-client.go +++ b/universal-client.go @@ -4,10 +4,10 @@ import ( "fmt" "reflect" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v14/config" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v14/pkg/cloudapi" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v14/pkg/cloudbroker" - "repository.basistech.ru/BASIS/dynamix-golang-sdk/v14/pkg/sdn" + "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" ) type ClientInterface interface {