From 42800ac4fe867911b15bc3fb2aba36935367fc97 Mon Sep 17 00:00:00 2001 From: stSolo Date: Wed, 1 Mar 2023 19:05:53 +0300 Subject: [PATCH] v1.2.0 --- CHANGELOG.md | 53 ++----------- README.md | 73 +++++++++++++++++- config/legacy-config.go | 33 +++++++++ internal/client/http-client.go | 2 +- internal/client/legacy-http-client.go | 32 ++++++++ internal/client/legacy-transport.go | 68 +++++++++++++++++ internal/client/transport.go | 4 +- legacy-client.go | 74 +++++++++++++++++++ pkg/cloudapi/account/add_user.go | 6 +- pkg/cloudapi/account/audits.go | 2 +- pkg/cloudapi/account/create.go | 20 ++--- pkg/cloudapi/account/delete.go | 4 +- pkg/cloudapi/account/delete_user.go | 6 +- 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 | 4 +- pkg/cloudapi/account/get_consumption.go | 6 +- .../account/get_reserved_account_units.go | 2 +- pkg/cloudapi/account/list.go | 4 +- pkg/cloudapi/account/list_computes.go | 2 +- pkg/cloudapi/account/list_deleted.go | 4 +- 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 | 4 +- pkg/cloudapi/account/list_vins.go | 2 +- pkg/cloudapi/account/restore.go | 2 +- pkg/cloudapi/account/update.go | 18 ++--- pkg/cloudapi/account/update_user.go | 6 +- pkg/cloudapi/bservice/create.go | 8 +- pkg/cloudapi/bservice/delete.go | 4 +- pkg/cloudapi/bservice/disable.go | 2 +- pkg/cloudapi/bservice/enable.go | 2 +- pkg/cloudapi/bservice/get.go | 2 +- pkg/cloudapi/bservice/group_add.go | 28 +++---- pkg/cloudapi/bservice/group_compute_remove.go | 6 +- pkg/cloudapi/bservice/group_get.go | 4 +- pkg/cloudapi/bservice/group_parent_add.go | 6 +- pkg/cloudapi/bservice/group_parent_remove.go | 6 +- pkg/cloudapi/bservice/group_remove.go | 4 +- pkg/cloudapi/bservice/group_resize.go | 8 +- pkg/cloudapi/bservice/group_start.go | 4 +- pkg/cloudapi/bservice/group_stop.go | 6 +- pkg/cloudapi/bservice/group_update.go | 16 ++-- pkg/cloudapi/bservice/group_update_extnet.go | 6 +- pkg/cloudapi/bservice/group_update_vins.go | 6 +- pkg/cloudapi/bservice/list.go | 8 +- pkg/cloudapi/bservice/restore.go | 2 +- pkg/cloudapi/bservice/snapshot_create.go | 4 +- pkg/cloudapi/bservice/snapshot_delete.go | 4 +- pkg/cloudapi/bservice/snapshot_list.go | 2 +- pkg/cloudapi/bservice/snapshot_rollback.go | 4 +- pkg/cloudapi/bservice/start.go | 2 +- pkg/cloudapi/bservice/stop.go | 2 +- .../compute/affinity_group_check_start.go | 4 +- pkg/cloudapi/compute/affinity_label_remove.go | 2 +- pkg/cloudapi/compute/affinity_label_set.go | 4 +- pkg/cloudapi/compute/affinity_relations.go | 2 +- pkg/cloudapi/compute/affinity_rule_add.go | 12 +-- pkg/cloudapi/compute/affinity_rule_remove.go | 12 +-- pkg/cloudapi/compute/affinity_rules_clear.go | 2 +- .../compute/anti_affinity_rule_add.go | 12 +-- .../compute/anti_affinity_rule_remove.go | 12 +-- .../compute/anti_affinity_rules_clear.go | 2 +- pkg/cloudapi/compute/attach_gpu.go | 4 +- pkg/cloudapi/compute/attach_pci_device.go | 4 +- pkg/cloudapi/compute/audits.go | 2 +- pkg/cloudapi/compute/cd_eject.go | 2 +- pkg/cloudapi/compute/cd_insert.go | 4 +- pkg/cloudapi/compute/clone.go | 8 +- pkg/cloudapi/compute/create_template.go | 4 +- pkg/cloudapi/compute/delete.go | 6 +- pkg/cloudapi/compute/detach_gpu.go | 4 +- pkg/cloudapi/compute/detach_pci_device.go | 4 +- pkg/cloudapi/compute/disable.go | 2 +- pkg/cloudapi/compute/disk_add.go | 16 ++-- pkg/cloudapi/compute/disk_attach.go | 4 +- pkg/cloudapi/compute/disk_del.go | 6 +- pkg/cloudapi/compute/disk_detach.go | 4 +- pkg/cloudapi/compute/disk_qos.go | 6 +- pkg/cloudapi/compute/disk_resize.go | 6 +- pkg/cloudapi/compute/enable.go | 2 +- pkg/cloudapi/compute/get.go | 2 +- pkg/cloudapi/compute/get_audits.go | 2 +- pkg/cloudapi/compute/get_console_url.go | 2 +- pkg/cloudapi/compute/get_log.go | 4 +- pkg/cloudapi/compute/list.go | 6 +- pkg/cloudapi/compute/list_deleted.go | 4 +- pkg/cloudapi/compute/list_pci_device.go | 2 +- pkg/cloudapi/compute/list_vgpu.go | 2 +- pkg/cloudapi/compute/move_to_rg.go | 10 +-- pkg/cloudapi/compute/net_attach.go | 8 +- pkg/cloudapi/compute/net_detach.go | 6 +- pkg/cloudapi/compute/pause.go | 2 +- pkg/cloudapi/compute/pfw_add.go | 10 +-- pkg/cloudapi/compute/pfw_del.go | 12 +-- pkg/cloudapi/compute/pfw_list.go | 2 +- pkg/cloudapi/compute/pin_to_stack.go | 2 +- pkg/cloudapi/compute/power_cycle.go | 2 +- pkg/cloudapi/compute/reboot.go | 2 +- pkg/cloudapi/compute/redeploy.go | 12 +-- pkg/cloudapi/compute/reset.go | 2 +- pkg/cloudapi/compute/resize.go | 8 +- pkg/cloudapi/compute/restore.go | 2 +- pkg/cloudapi/compute/resume.go | 2 +- pkg/cloudapi/compute/snapshot_create.go | 4 +- pkg/cloudapi/compute/snapshot_delete.go | 4 +- pkg/cloudapi/compute/snapshot_list.go | 2 +- pkg/cloudapi/compute/snapshot_rollback.go | 4 +- pkg/cloudapi/compute/snapshot_usage.go | 4 +- pkg/cloudapi/compute/start.go | 4 +- pkg/cloudapi/compute/stop.go | 4 +- pkg/cloudapi/compute/tag_add.go | 6 +- pkg/cloudapi/compute/tag_remove.go | 4 +- pkg/cloudapi/compute/unpin_from_stack.go | 2 +- pkg/cloudapi/compute/update.go | 6 +- pkg/cloudapi/compute/user_grant.go | 6 +- pkg/cloudapi/compute/user_list.go | 2 +- pkg/cloudapi/compute/user_revoke.go | 4 +- pkg/cloudapi/compute/user_update.go | 6 +- pkg/cloudapi/computeci/get.go | 2 +- pkg/cloudapi/computeci/list.go | 6 +- pkg/cloudapi/disks/create.go | 20 ++--- pkg/cloudapi/disks/delete.go | 8 +- pkg/cloudapi/disks/delete_disks.go | 6 +- pkg/cloudapi/disks/get.go | 2 +- pkg/cloudapi/disks/limitio.go | 30 ++++---- pkg/cloudapi/disks/list.go | 8 +- pkg/cloudapi/disks/list_types.go | 2 +- pkg/cloudapi/disks/list_unattached.go | 2 +- pkg/cloudapi/disks/rename.go | 4 +- pkg/cloudapi/disks/resize.go | 4 +- pkg/cloudapi/disks/restore.go | 4 +- pkg/cloudapi/disks/search.go | 6 +- pkg/cloudapi/disks/share.go | 2 +- pkg/cloudapi/disks/snapshot_delete.go | 4 +- pkg/cloudapi/disks/snapshot_rollback.go | 6 +- pkg/cloudapi/disks/unshare.go | 2 +- pkg/cloudapi/extnet/get.go | 2 +- pkg/cloudapi/extnet/list.go | 6 +- pkg/cloudapi/extnet/list_computes.go | 2 +- pkg/cloudapi/flipgroup/compute_add.go | 4 +- pkg/cloudapi/flipgroup/compute_remove.go | 4 +- pkg/cloudapi/flipgroup/create.go | 14 ++-- pkg/cloudapi/flipgroup/delete.go | 2 +- pkg/cloudapi/flipgroup/edit.go | 6 +- pkg/cloudapi/flipgroup/get.go | 2 +- pkg/cloudapi/flipgroup/list.go | 4 +- pkg/cloudapi/image/create.go | 30 ++++---- pkg/cloudapi/image/create_virtual.go | 4 +- pkg/cloudapi/image/delete.go | 4 +- pkg/cloudapi/image/get.go | 4 +- pkg/cloudapi/image/link.go | 4 +- pkg/cloudapi/image/list.go | 6 +- pkg/cloudapi/image/rename.go | 4 +- pkg/cloudapi/k8ci/get.go | 2 +- pkg/cloudapi/k8ci/list.go | 6 +- pkg/cloudapi/k8ci/list_deleted.go | 4 +- pkg/cloudapi/k8s/create.go | 44 +++++------ pkg/cloudapi/k8s/delete.go | 4 +- pkg/cloudapi/k8s/delete_master_from_group.go | 6 +- pkg/cloudapi/k8s/delete_worker_from_group.go | 6 +- pkg/cloudapi/k8s/disable_enable.go | 2 +- pkg/cloudapi/k8s/find_group_by_label.go | 6 +- pkg/cloudapi/k8s/get.go | 2 +- pkg/cloudapi/k8s/get_config.go | 2 +- pkg/cloudapi/k8s/get_node_annotations.go | 4 +- pkg/cloudapi/k8s/get_node_labels.go | 4 +- pkg/cloudapi/k8s/get_node_taints.go | 4 +- pkg/cloudapi/k8s/list.go | 6 +- pkg/cloudapi/k8s/list_deleted.go | 4 +- pkg/cloudapi/k8s/restore.go | 2 +- pkg/cloudapi/k8s/start.go | 2 +- pkg/cloudapi/k8s/stop.go | 2 +- pkg/cloudapi/k8s/update.go | 6 +- pkg/cloudapi/k8s/worker_add.go | 6 +- pkg/cloudapi/k8s/worker_reset.go | 6 +- pkg/cloudapi/k8s/worker_restart.go | 6 +- pkg/cloudapi/k8s/workers_group_add.go | 22 +++--- pkg/cloudapi/k8s/workers_group_delete.go | 4 +- pkg/cloudapi/k8s/workers_group_get_by_name.go | 4 +- pkg/cloudapi/kvmppc/create.go | 32 ++++---- pkg/cloudapi/kvmppc/create_blank.go | 22 +++--- pkg/cloudapi/kvmx86/create.go | 32 ++++---- pkg/cloudapi/kvmx86/create_blank.go | 22 +++--- pkg/cloudapi/lb/backend_create.go | 22 +++--- pkg/cloudapi/lb/backend_delete.go | 4 +- pkg/cloudapi/lb/backend_server_add.go | 28 +++---- pkg/cloudapi/lb/backend_server_delete.go | 6 +- pkg/cloudapi/lb/backend_server_update.go | 28 +++---- pkg/cloudapi/lb/backend_update.go | 22 +++--- pkg/cloudapi/lb/config_reset.go | 2 +- pkg/cloudapi/lb/create.go | 12 +-- pkg/cloudapi/lb/delete.go | 4 +- pkg/cloudapi/lb/disable_enable.go | 2 +- pkg/cloudapi/lb/frontend_bind.go | 10 +-- pkg/cloudapi/lb/frontend_bind_delete.go | 6 +- pkg/cloudapi/lb/frontend_bind_update.go | 10 +-- pkg/cloudapi/lb/frontend_create.go | 6 +- pkg/cloudapi/lb/frontend_delete.go | 4 +- pkg/cloudapi/lb/get.go | 2 +- pkg/cloudapi/lb/list.go | 6 +- pkg/cloudapi/lb/list_deleted.go | 4 +- pkg/cloudapi/lb/restart.go | 2 +- pkg/cloudapi/lb/restore.go | 2 +- pkg/cloudapi/lb/start.go | 2 +- pkg/cloudapi/lb/stop.go | 2 +- pkg/cloudapi/lb/update.go | 4 +- pkg/cloudapi/locations/list.go | 4 +- pkg/cloudapi/rg/access_grant.go | 8 +- pkg/cloudapi/rg/access_revoke.go | 6 +- pkg/cloudapi/rg/affinity_group_computes.go | 4 +- pkg/cloudapi/rg/affinity_groups_get.go | 4 +- pkg/cloudapi/rg/affinity_groups_list.go | 2 +- pkg/cloudapi/rg/audits.go | 2 +- pkg/cloudapi/rg/create.go | 32 ++++---- pkg/cloudapi/rg/delete.go | 8 +- pkg/cloudapi/rg/disable.go | 4 +- pkg/cloudapi/rg/enable.go | 4 +- pkg/cloudapi/rg/get.go | 4 +- pkg/cloudapi/rg/list.go | 6 +- pkg/cloudapi/rg/list_computes.go | 4 +- pkg/cloudapi/rg/list_deleted.go | 4 +- pkg/cloudapi/rg/list_lb.go | 2 +- pkg/cloudapi/rg/list_pfw.go | 2 +- pkg/cloudapi/rg/list_vins.go | 4 +- pkg/cloudapi/rg/restore.go | 4 +- pkg/cloudapi/rg/set_def_net.go | 8 +- pkg/cloudapi/rg/update.go | 20 ++--- pkg/cloudapi/rg/usage.go | 4 +- pkg/cloudapi/sizes/list.go | 8 +- pkg/cloudapi/tasks/get.go | 2 +- pkg/cloudapi/tasks/list.go | 4 +- pkg/cloudapi/vins/audits.go | 2 +- pkg/cloudapi/vins/create_in_account.go | 12 +-- pkg/cloudapi/vins/create_in_rg.go | 14 ++-- pkg/cloudapi/vins/delete.go | 6 +- pkg/cloudapi/vins/disable_enable.go | 2 +- pkg/cloudapi/vins/extnet_connect.go | 6 +- 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 | 6 +- pkg/cloudapi/vins/ip_reserve.go | 10 +-- pkg/cloudapi/vins/list.go | 6 +- pkg/cloudapi/vins/list_deleted.go | 4 +- pkg/cloudapi/vins/nat_rule_add.go | 12 +-- pkg/cloudapi/vins/nat_rule_del.go | 4 +- pkg/cloudapi/vins/nat_rule_list.go | 2 +- pkg/cloudapi/vins/restore.go | 2 +- pkg/cloudapi/vins/search.go | 8 +- pkg/cloudapi/vins/vnfdev_redeploy.go | 2 +- pkg/cloudapi/vins/vnfdev_restart.go | 2 +- pkg/cloudbroker/account/add_user.go | 6 +- pkg/cloudbroker/account/audits.go | 2 +- pkg/cloudbroker/account/create.go | 22 +++--- pkg/cloudbroker/account/delete.go | 6 +- pkg/cloudbroker/account/delete_accounts.go | 6 +- pkg/cloudbroker/account/delete_user.go | 6 +- pkg/cloudbroker/account/disable.go | 4 +- pkg/cloudbroker/account/disable_accounts.go | 2 +- pkg/cloudbroker/account/enable.go | 4 +- pkg/cloudbroker/account/enable_accounts.go | 2 +- pkg/cloudbroker/account/get.go | 2 +- pkg/cloudbroker/account/list.go | 4 +- pkg/cloudbroker/account/list_computes.go | 2 +- pkg/cloudbroker/account/list_deleted.go | 4 +- 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/restore.go | 4 +- pkg/cloudbroker/account/update.go | 24 +++--- .../account/update_resource_types.go | 4 +- pkg/cloudbroker/account/update_user.go | 6 +- .../compute/affinity_group_check_start.go | 4 +- .../compute/affinity_label_remove.go | 2 +- pkg/cloudbroker/compute/affinity_label_set.go | 4 +- pkg/cloudbroker/compute/affinity_relations.go | 4 +- pkg/cloudbroker/compute/affinity_rule_add.go | 12 +-- .../compute/affinity_rule_remove.go | 12 +-- .../compute/affinity_rules_clear.go | 2 +- .../compute/anti_affinity_rule_add.go | 12 +-- .../compute/anti_affinity_rule_clear.go | 2 +- .../compute/anti_affinity_rule_remove.go | 12 +-- pkg/cloudbroker/compute/attach_gpu.go | 4 +- pkg/cloudbroker/compute/attach_pci_device.go | 4 +- pkg/cloudbroker/compute/audits.go | 2 +- pkg/cloudbroker/compute/boot_order_get.go | 2 +- pkg/cloudbroker/compute/boot_order_set.go | 4 +- pkg/cloudbroker/compute/cd_eject.go | 4 +- pkg/cloudbroker/compute/cd_insert.go | 6 +- pkg/cloudbroker/compute/clone.go | 10 +-- pkg/cloudbroker/compute/computeci_set.go | 4 +- pkg/cloudbroker/compute/computeci_unset.go | 2 +- pkg/cloudbroker/compute/create_template.go | 6 +- pkg/cloudbroker/compute/delete.go | 8 +- pkg/cloudbroker/compute/detach_gpu.go | 4 +- pkg/cloudbroker/compute/detach_pci_device.go | 4 +- pkg/cloudbroker/compute/disable.go | 4 +- pkg/cloudbroker/compute/disk_add.go | 16 ++-- pkg/cloudbroker/compute/disk_attach.go | 6 +- pkg/cloudbroker/compute/disk_del.go | 8 +- pkg/cloudbroker/compute/disk_detach.go | 6 +- pkg/cloudbroker/compute/disk_qos.go | 6 +- pkg/cloudbroker/compute/disk_resize.go | 8 +- pkg/cloudbroker/compute/enable.go | 4 +- pkg/cloudbroker/compute/get.go | 4 +- pkg/cloudbroker/compute/get_audits.go | 4 +- pkg/cloudbroker/compute/get_console_url.go | 2 +- pkg/cloudbroker/compute/get_log.go | 4 +- pkg/cloudbroker/compute/list.go | 6 +- pkg/cloudbroker/compute/list_deleted.go | 4 +- pkg/cloudbroker/compute/list_gpu.go | 4 +- pkg/cloudbroker/compute/list_pci_device.go | 2 +- pkg/cloudbroker/compute/mass_delete.go | 6 +- pkg/cloudbroker/compute/mass_reboot.go | 4 +- .../compute/mass_repair_boot_fs.go | 4 +- pkg/cloudbroker/compute/mass_start.go | 4 +- pkg/cloudbroker/compute/mass_stop.go | 6 +- pkg/cloudbroker/compute/migrate.go | 8 +- pkg/cloudbroker/compute/migrate_storage.go | 10 +-- .../compute/migrate_storage_abort.go | 2 +- .../compute/migrate_storage_clean_up.go | 2 +- .../compute/migrate_storage_info.go | 2 +- pkg/cloudbroker/compute/move_to_rg.go | 10 +-- pkg/cloudbroker/compute/net_attach.go | 10 +-- pkg/cloudbroker/compute/net_detach.go | 8 +- pkg/cloudbroker/compute/net_qos.go | 12 +-- pkg/cloudbroker/compute/pause.go | 4 +- pkg/cloudbroker/compute/pfw_add.go | 12 +-- pkg/cloudbroker/compute/pfw_del.go | 14 ++-- pkg/cloudbroker/compute/pfw_list.go | 4 +- pkg/cloudbroker/compute/pin_to_stack.go | 6 +- pkg/cloudbroker/compute/power_cycle.go | 2 +- pkg/cloudbroker/compute/reboot.go | 4 +- pkg/cloudbroker/compute/redeploy.go | 14 ++-- pkg/cloudbroker/compute/registration.go | 4 +- pkg/cloudbroker/compute/repair_boot_fs.go | 4 +- pkg/cloudbroker/compute/reset.go | 4 +- pkg/cloudbroker/compute/resize.go | 10 +-- pkg/cloudbroker/compute/restore.go | 4 +- pkg/cloudbroker/compute/resume.go | 4 +- pkg/cloudbroker/compute/snapshot_create.go | 4 +- pkg/cloudbroker/compute/snapshot_delete.go | 4 +- .../compute/snapshot_evict_disk.go | 4 +- pkg/cloudbroker/compute/snapshot_list.go | 2 +- pkg/cloudbroker/compute/snapshot_rollback.go | 4 +- pkg/cloudbroker/compute/snapshot_usage.go | 4 +- pkg/cloudbroker/compute/start.go | 8 +- pkg/cloudbroker/compute/stop.go | 6 +- pkg/cloudbroker/compute/tag_add.go | 6 +- pkg/cloudbroker/compute/tag_remove.go | 4 +- pkg/cloudbroker/compute/unpin_from_stack.go | 2 +- pkg/cloudbroker/compute/update.go | 8 +- pkg/cloudbroker/compute/user_grant.go | 6 +- pkg/cloudbroker/compute/user_list.go | 2 +- pkg/cloudbroker/compute/user_revoke.go | 4 +- pkg/cloudbroker/compute/user_update.go | 6 +- pkg/cloudbroker/disks/create.go | 20 ++--- pkg/cloudbroker/disks/delete.go | 8 +- pkg/cloudbroker/disks/delete_disks.go | 6 +- pkg/cloudbroker/disks/get.go | 2 +- pkg/cloudbroker/disks/limit_io.go | 30 ++++---- pkg/cloudbroker/disks/list.go | 8 +- pkg/cloudbroker/disks/list_deleted.go | 8 +- pkg/cloudbroker/disks/list_types.go | 2 +- pkg/cloudbroker/disks/list_unattached.go | 6 +- pkg/cloudbroker/disks/rename.go | 4 +- pkg/cloudbroker/disks/resize.go | 4 +- pkg/cloudbroker/disks/restore.go | 4 +- pkg/cloudbroker/disks/search.go | 10 +-- pkg/cloudbroker/disks/share.go | 2 +- pkg/cloudbroker/disks/snapshot_delete.go | 4 +- pkg/cloudbroker/disks/snapshot_rollback.go | 6 +- pkg/cloudbroker/disks/unshare.go | 2 +- pkg/cloudbroker/extnet/access_add.go | 4 +- pkg/cloudbroker/extnet/access_remove.go | 4 +- pkg/cloudbroker/extnet/create.go | 30 ++++---- pkg/cloudbroker/extnet/default_qos_update.go | 8 +- pkg/cloudbroker/extnet/destroy.go | 2 +- pkg/cloudbroker/extnet/device_deploy.go | 2 +- pkg/cloudbroker/extnet/device_migrate.go | 4 +- 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 | 4 +- pkg/cloudbroker/extnet/enable.go | 2 +- pkg/cloudbroker/extnet/get.go | 2 +- pkg/cloudbroker/extnet/ips_exclude.go | 4 +- pkg/cloudbroker/extnet/ips_exclude_range.go | 6 +- pkg/cloudbroker/extnet/ips_include.go | 4 +- pkg/cloudbroker/extnet/ips_include_range.go | 6 +- pkg/cloudbroker/extnet/list.go | 6 +- pkg/cloudbroker/extnet/ntp_apply.go | 4 +- pkg/cloudbroker/extnet/set_default.go | 2 +- pkg/cloudbroker/extnet/update.go | 6 +- pkg/cloudbroker/grid/add.go | 6 +- pkg/cloudbroker/grid/change_settings.go | 4 +- pkg/cloudbroker/grid/check_vms.go | 2 +- pkg/cloudbroker/grid/create_system_space.go | 16 ++-- .../grid/execute_maintenance_script.go | 6 +- pkg/cloudbroker/grid/get.go | 2 +- pkg/cloudbroker/grid/get_backup.go | 2 +- pkg/cloudbroker/grid/get_diagnosis.go | 2 +- pkg/cloudbroker/grid/list.go | 4 +- pkg/cloudbroker/grid/purge_logs.go | 4 +- pkg/cloudbroker/grid/rename.go | 4 +- pkg/cloudbroker/grid/services_restart.go | 4 +- .../grid/set_cpu_allocation_ratio.go | 4 +- .../grid/set_mem_allocation_ratio.go | 4 +- pkg/cloudbroker/image/computeci_set.go | 4 +- pkg/cloudbroker/image/computeci_unset.go | 2 +- pkg/cloudbroker/image/create_cdrom_image.go | 20 ++--- pkg/cloudbroker/image/create_image.go | 32 ++++---- pkg/cloudbroker/image/create_virtual.go | 4 +- pkg/cloudbroker/image/delete.go | 6 +- pkg/cloudbroker/image/delete_cdrom_image.go | 4 +- pkg/cloudbroker/image/delete_images.go | 6 +- pkg/cloudbroker/image/disable.go | 2 +- pkg/cloudbroker/image/edit.go | 14 ++-- pkg/cloudbroker/image/enable.go | 2 +- pkg/cloudbroker/image/get.go | 2 +- pkg/cloudbroker/image/link.go | 4 +- pkg/cloudbroker/image/list.go | 8 +- pkg/cloudbroker/image/list_stacks.go | 6 +- pkg/cloudbroker/image/rename.go | 4 +- pkg/cloudbroker/image/share.go | 4 +- pkg/cloudbroker/image/sync_create_image.go | 32 ++++---- pkg/cloudbroker/image/update_nodes.go | 4 +- pkg/cloudbroker/k8ci/create.go | 22 +++--- pkg/cloudbroker/k8ci/delete.go | 4 +- pkg/cloudbroker/k8ci/disable.go | 2 +- pkg/cloudbroker/k8ci/enable.go | 2 +- pkg/cloudbroker/k8ci/get.go | 2 +- pkg/cloudbroker/k8ci/list.go | 6 +- pkg/cloudbroker/k8ci/list_deleted.go | 4 +- pkg/cloudbroker/k8ci/restore.go | 2 +- pkg/cloudbroker/k8s/create.go | 44 +++++------ pkg/cloudbroker/k8s/delete.go | 4 +- .../k8s/delete_master_from_group.go | 6 +- .../k8s/delete_worker_from_group.go | 6 +- pkg/cloudbroker/k8s/disable.go | 2 +- pkg/cloudbroker/k8s/enable.go | 2 +- pkg/cloudbroker/k8s/find_group_by_label.go | 6 +- pkg/cloudbroker/k8s/get.go | 2 +- pkg/cloudbroker/k8s/get_config.go | 2 +- pkg/cloudbroker/k8s/get_node_annotations.go | 4 +- pkg/cloudbroker/k8s/get_node_labels.go | 4 +- pkg/cloudbroker/k8s/get_node_taints.go | 4 +- pkg/cloudbroker/k8s/list.go | 6 +- pkg/cloudbroker/k8s/list_deleted.go | 4 +- pkg/cloudbroker/k8s/restore.go | 2 +- pkg/cloudbroker/k8s/start.go | 2 +- pkg/cloudbroker/k8s/stop.go | 2 +- pkg/cloudbroker/k8s/update.go | 6 +- pkg/cloudbroker/k8s/worker_add.go | 6 +- pkg/cloudbroker/k8s/worker_reset.go | 6 +- pkg/cloudbroker/k8s/worker_restart.go | 6 +- pkg/cloudbroker/k8s/workers_group_add.go | 22 +++--- pkg/cloudbroker/k8s/workers_group_delete.go | 4 +- .../k8s/workers_group_get_by_name.go | 4 +- pkg/cloudbroker/kvmppc/create.go | 36 ++++----- pkg/cloudbroker/kvmppc/create_blank.go | 22 +++--- pkg/cloudbroker/kvmppc/mass_create.go | 30 ++++---- pkg/cloudbroker/kvmx86/create.go | 36 ++++----- pkg/cloudbroker/kvmx86/create_blank.go | 22 +++--- pkg/cloudbroker/kvmx86/mass_create.go | 32 ++++---- pkg/cloudbroker/lb/backend_create.go | 22 +++--- pkg/cloudbroker/lb/backend_delete.go | 4 +- pkg/cloudbroker/lb/backend_server_add.go | 28 +++---- pkg/cloudbroker/lb/backend_server_delete.go | 6 +- pkg/cloudbroker/lb/backend_server_update.go | 28 +++---- pkg/cloudbroker/lb/backend_update.go | 22 +++--- pkg/cloudbroker/lb/config_reset.go | 2 +- pkg/cloudbroker/lb/create.go | 14 ++-- pkg/cloudbroker/lb/delete.go | 4 +- pkg/cloudbroker/lb/disable.go | 2 +- pkg/cloudbroker/lb/enable.go | 2 +- pkg/cloudbroker/lb/frontend_bind.go | 10 +-- pkg/cloudbroker/lb/frontend_bind_delete.go | 6 +- pkg/cloudbroker/lb/frontend_binding_update.go | 10 +-- pkg/cloudbroker/lb/frontend_create.go | 6 +- pkg/cloudbroker/lb/frontend_delete.go | 4 +- pkg/cloudbroker/lb/get.go | 2 +- pkg/cloudbroker/lb/list.go | 6 +- pkg/cloudbroker/lb/list_deleted.go | 4 +- pkg/cloudbroker/lb/restart.go | 2 +- pkg/cloudbroker/lb/restore.go | 2 +- pkg/cloudbroker/lb/start.go | 2 +- pkg/cloudbroker/lb/stop.go | 2 +- pkg/cloudbroker/lb/update.go | 4 +- pkg/cloudbroker/rg/access_grant.go | 8 +- pkg/cloudbroker/rg/access_revoke.go | 6 +- pkg/cloudbroker/rg/affinity_group_computes.go | 4 +- pkg/cloudbroker/rg/affinity_groups_get.go | 4 +- pkg/cloudbroker/rg/affinity_groups_list.go | 2 +- pkg/cloudbroker/rg/audits.go | 2 +- pkg/cloudbroker/rg/create.go | 34 ++++----- pkg/cloudbroker/rg/delete.go | 8 +- pkg/cloudbroker/rg/disable.go | 4 +- pkg/cloudbroker/rg/enable.go | 4 +- pkg/cloudbroker/rg/get.go | 4 +- pkg/cloudbroker/rg/list.go | 6 +- pkg/cloudbroker/rg/list_computes.go | 4 +- pkg/cloudbroker/rg/list_deleted.go | 4 +- pkg/cloudbroker/rg/list_lb.go | 2 +- pkg/cloudbroker/rg/list_pfw.go | 2 +- pkg/cloudbroker/rg/list_vins.go | 4 +- pkg/cloudbroker/rg/mass_delete.go | 8 +- pkg/cloudbroker/rg/mass_disable.go | 4 +- pkg/cloudbroker/rg/mass_enable.go | 4 +- pkg/cloudbroker/rg/restore.go | 4 +- pkg/cloudbroker/rg/set_def_net.go | 8 +- pkg/cloudbroker/rg/update.go | 22 +++--- pkg/cloudbroker/rg/update_resource_types.go | 4 +- pkg/cloudbroker/rg/usage.go | 4 +- pkg/cloudbroker/sep/access_grant.go | 4 +- pkg/cloudbroker/sep/access_grant_to_pool.go | 8 +- pkg/cloudbroker/sep/access_revoke.go | 4 +- pkg/cloudbroker/sep/access_revoke_to_pool.go | 8 +- pkg/cloudbroker/sep/add_consumer_nodes.go | 4 +- pkg/cloudbroker/sep/add_provider_nodes.go | 4 +- pkg/cloudbroker/sep/config_field_edit.go | 8 +- pkg/cloudbroker/sep/config_insert.go | 4 +- pkg/cloudbroker/sep/config_validate.go | 4 +- pkg/cloudbroker/sep/consumption.go | 2 +- pkg/cloudbroker/sep/create.go | 16 ++-- pkg/cloudbroker/sep/decommission.go | 4 +- pkg/cloudbroker/sep/del_consumer_nodes.go | 4 +- pkg/cloudbroker/sep/delete.go | 2 +- pkg/cloudbroker/sep/disable.go | 2 +- pkg/cloudbroker/sep/disk_list.go | 4 +- 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 | 4 +- pkg/cloudbroker/sep/list.go | 4 +- pkg/cloudbroker/sep/update_capacity_limit.go | 2 +- pkg/cloudbroker/tasks/get.go | 2 +- pkg/cloudbroker/tasks/list.go | 4 +- pkg/cloudbroker/vins/audits.go | 2 +- pkg/cloudbroker/vins/create_in_account.go | 14 ++-- pkg/cloudbroker/vins/create_in_rg.go | 16 ++-- pkg/cloudbroker/vins/default_qos_update.go | 8 +- pkg/cloudbroker/vins/delete.go | 8 +- pkg/cloudbroker/vins/disable.go | 4 +- pkg/cloudbroker/vins/enable.go | 4 +- pkg/cloudbroker/vins/extnet_connect.go | 8 +- pkg/cloudbroker/vins/extnet_disconnect.go | 4 +- pkg/cloudbroker/vins/extnet_list.go | 4 +- pkg/cloudbroker/vins/get.go | 4 +- pkg/cloudbroker/vins/ip_list.go | 2 +- pkg/cloudbroker/vins/ip_release.go | 6 +- pkg/cloudbroker/vins/ip_reserve.go | 12 +-- pkg/cloudbroker/vins/list.go | 4 +- pkg/cloudbroker/vins/list_deleted.go | 4 +- pkg/cloudbroker/vins/mass_delete.go | 8 +- pkg/cloudbroker/vins/mass_disable.go | 4 +- pkg/cloudbroker/vins/mass_enable.go | 4 +- pkg/cloudbroker/vins/nat_rule_add.go | 14 ++-- pkg/cloudbroker/vins/nat_rule_del.go | 6 +- pkg/cloudbroker/vins/nat_rule_list.go | 4 +- pkg/cloudbroker/vins/net_qos.go | 8 +- pkg/cloudbroker/vins/restore.go | 4 +- pkg/cloudbroker/vins/search.go | 10 +-- pkg/cloudbroker/vins/vnfdev_redeploy.go | 4 +- pkg/cloudbroker/vins/vnfdev_reset.go | 4 +- pkg/cloudbroker/vins/vnfdev_restart.go | 4 +- pkg/cloudbroker/vins/vnfdev_start.go | 4 +- pkg/cloudbroker/vins/vnfdev_stop.go | 4 +- 573 files changed, 2077 insertions(+), 1844 deletions(-) create mode 100644 config/legacy-config.go create mode 100644 internal/client/legacy-http-client.go create mode 100644 internal/client/legacy-transport.go create mode 100644 legacy-client.go diff --git a/CHANGELOG.md b/CHANGELOG.md index bb1ac9e..b500526 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,54 +1,11 @@ -## Version 1.1.2 - -### Feature - -#### Cloudbroker - -- Disks - - Add share method - - Add unshare method +## Version 1.2.0 ### Bug fixes -#### CloudAPI +#### Client -- Account/Create - - Change the MaxMemoryCapacity field type to int64 - - Change the MaxVDiskCapacity field type to int64 - - Change the MaxCPUCapacity field type to int64 - - Change the MaxNetworkPeerTransfer field type to int64 - - Change the MaxNumPublicIP field type to int64 - - Change the GPUUnits field type to int64 - - Change url to cloudapi -- Account/Models - - Change the DiskSize field type to float64 - - Change the DiskSizeMax field type to uint64 -- RG/Create - - Change the MaxMemoryCapacity field type to int64 - - Change the MaxVDiskCapacity field type to int64 - - Change the MaxCPUCapacity field type to int64 - - Change the MaxNumPublicIP field type to int64 -- RG/Models - - Change the DiskSize field type to float64 - - Change the DiskSizeMax field type to uint64 +- Added legacy client authorization support -#### Cloudbroker +#### All -- Account/Create - - Change the MaxMemoryCapacity field type to int64 - - Change the MaxVDiskCapacity field type to int64 - - Change the MaxCPUCapacity field type to int64 - - Change the MaxNetworkPeerTransfer field type to int64 - - Change the MaxNumPublicIP field type to int64 - - Change the GPUUnits field type to int64 -- Account/Models - - Change the DiskSize field type to float64 - - Change the DiskSizeMax field type to uint64 -- RG/Create - - Change the MaxMemoryCapacity field type to int64 - - Change the MaxVDiskCapacity field type to int64 - - Change the MaxCPUCapacity field type to int64 - - Change the MaxNumPublicIP field type to int64 -- RG/Models - - Change the DiskSize field type to float64 - - Change the DiskSizeMax field type to uint64 +- Add json tags for requests diff --git a/README.md b/README.md index b262a54..1e7b15c 100644 --- a/README.md +++ b/README.md @@ -3,8 +3,10 @@ Decort SDK - это библиотека, написанная на языке GO, позволяющая взаимодействовать с API облачной платформы **DECORT**. Библиотека содеражит в себе структуры и методы, необходимые для отправки запросов. Decort SDK имеет встроенный http-клиент и поддерживает разные способы авторизации на платформе. Библиотека так же содержит в себе модели ответов от платформы. ## Версии - - Версия 1.0.0 Decort-SDK соответствует 3.8.4 версии платформы - - Версия 1.1.0 Decort-SDK соответствует 3.8.5 версии платформы + + - Версия 1.0.x Decort-SDK соответствует 3.8.4 версии платформы + - Версия 1.1.x Decort-SDK соответствует 3.8.5 версии платформы + - Версия 1.2.x Decort-SDK соответствует 3.8.5 версии платформы ## Оглавление @@ -17,6 +19,11 @@ Decort SDK - это библиотека, написанная на языке G - [Создание клиента](#создание-клиента) - [Создание структуры запроса](#cоздание-структуры-запроса) - [Выполнение запроса](#выполнение-запроса) +- [Работа с legacy клиентом](#работа-с-legacy-клиентом) + - [Настройка конфигурации legacy клиента](#настройка-конфигурации-legacy-клиента) + - [Создание legacy клиента](#создание-legacy-клиента) + - [Создание структуры запроса](#cоздание-структуры-запроса) + - [Выполнение запроса](#выполнение-запроса) ## Установка @@ -429,3 +436,65 @@ func main() { fmt.Println(res) } ``` + +## Работа с legacy клиентом + +Работа с legacy клиентом применяется для пользователей, которые не используют для авторизации decs3o. + +### Настройка конфигурации legacy клиента + +Сначала, необходимо создать переменную конфигурации клиента. Конфигурация состоит как из обязательных, так и необязательных полей. + +| Поле | Тип | Обязательный | Описание | +| ------------- | ------ | ------------ | ------------------------------------------------------------------ | +| Username | string | Да | username legacy пользователя | +| Password | string | Да | пароль legacy пользователя | +| DecortURL | string | Да | URL адрес платформы, с которой будет осуществляться взаимодействие | +| Retries | uint | Нет | Кол-во неудачных попыток выполнения запроса, по умолчанию - 5 | +| SSLSkipVerify | bool | Нет | Пропуск проверки подлинности сертификата, по умолчанию - true | +| Token | string | Нет | JWT токен | + +Пример кода: + +```go +import ( + "github.com/rudecs/decort-sdk/config" +) +func main(){ + // Настройка конфигурации + legacyCfg := config.LegacyConfig{ + Username: "", + Password: "", + DecortURL: "https://mr4.digitalenergy.online", + Retries: 5, + } +} +``` + +### Создание legacy клиента + +Создание клиента происходит с помощью функции-строителя `NewLegacy` из основного пакета `decort-sdk`, для избежания проблем с именами, пакету можно присвоить алиас `decort`. Функция принимает конфигурацию, возвращает структуру `DecortClient`, с помощью которой можно взаимодействовать с платформой. + +### Пример + +```go +package main + +import ( + "github.com/rudecs/decort-sdk/config" + decort "github.com/rudecs/decort-sdk" +) + +func main() { + // Настройка конфигурации + legacyCfg := config.LegacyConfig{ + Username: "", + Password: "", + DecortURL: "https://mr4.digitalenergy.online", + Retries: 5, + } + + // Создание клиента + legacyClient := decort.NewLegacy(cfg) +} +``` diff --git a/config/legacy-config.go b/config/legacy-config.go new file mode 100644 index 0000000..7052cab --- /dev/null +++ b/config/legacy-config.go @@ -0,0 +1,33 @@ +package config + +// Legacy client configuration +type LegacyConfig struct { + // ServiceAccount username + // Required: true + // Example : "osh_mikoev" + Username string + + // ServiceAccount password + // Required: true + // Example: "[1o>hYkjnJr)HI78q7t&#%8Lm" + Password string + + // Platform token + // Required: false + // Example: "158e76424b0d4810b6086hgbhj928fc4a6bc06e" + Token string + + // Address of the platform on which the actions are planned + // Required: true + // Example: "https://mr4.digitalenergy.online" + DecortURL string + + // Amount platform request attempts + // Default value: 5 + // Required: false + Retries uint64 + + // Skip verify, true by default + // Required: false + SSLSkipVerify bool +} diff --git a/internal/client/http-client.go b/internal/client/http-client.go index d427bdc..855a49e 100644 --- a/internal/client/http-client.go +++ b/internal/client/http-client.go @@ -29,7 +29,7 @@ func NewHttpClient(cfg config.Config) *http.Client { retries: cfg.Retries, clientID: cfg.AppID, clientSecret: cfg.AppSecret, - SSOURL: cfg.SSOURL, + ssoURL: cfg.SSOURL, token: cfg.Token, expiryTime: expiredTime, //TLSClientConfig: &tls.Config{InsecureSkipVerify: true}, diff --git a/internal/client/legacy-http-client.go b/internal/client/legacy-http-client.go new file mode 100644 index 0000000..9514b0a --- /dev/null +++ b/internal/client/legacy-http-client.go @@ -0,0 +1,32 @@ +package client + +import ( + "crypto/tls" + "net/http" + "time" + + "github.com/rudecs/decort-sdk/config" +) + +// NewLegacyHttpClient creates legacy HTTP Client +func NewLegacyHttpClient(cfg config.LegacyConfig) *http.Client { + transCfg := &http.Transport{ + TLSClientConfig: &tls.Config{ + //nolint:gosec + InsecureSkipVerify: cfg.SSLSkipVerify, + }, + } + + return &http.Client{ + Transport: &transportLegacy{ + base: transCfg, + username: cfg.Username, + password: cfg.Password, + retries: cfg.Retries, + token: cfg.Token, + decortURL: cfg.DecortURL, + }, + + Timeout: 5 * time.Minute, + } +} diff --git a/internal/client/legacy-transport.go b/internal/client/legacy-transport.go new file mode 100644 index 0000000..e28029a --- /dev/null +++ b/internal/client/legacy-transport.go @@ -0,0 +1,68 @@ +package client + +import ( + "fmt" + "io" + "net/http" + "strings" + "time" +) + +type transportLegacy struct { + base http.RoundTripper + username string + password string + retries uint64 + token string + decortURL string +} + +func (t *transportLegacy) RoundTrip(request *http.Request) (*http.Response, error) { + if t.token == "" { + body := fmt.Sprintf("username=%s&password=%s", t.username, t.password) + bodyReader := strings.NewReader(body) + + req, _ := http.NewRequestWithContext(request.Context(), "POST", t.decortURL+"/restmachine/cloudapi/user/authenticate", bodyReader) + req.Header.Add("Content-Type", "application/x-www-form-urlencoded") + + resp, err := t.base.RoundTrip(req) + if err != nil { + return nil, fmt.Errorf("unable to get token: %w", err) + } + + tokenBytes, _ := io.ReadAll(resp.Body) + resp.Body.Close() + + if resp.StatusCode != 200 { + return nil, fmt.Errorf("unable to get token: %s", tokenBytes) + } + + token := string(tokenBytes) + t.token = token + } + + tokenValue := fmt.Sprintf("authkey=%s", t.token) + tokenReader := strings.NewReader(tokenValue) + + req, _ := http.NewRequestWithContext(request.Context(), request.Method, request.URL.String(), tokenReader) + + req.Header.Add("Content-Type", "application/x-www-form-urlencoded") + req.Header.Set("Accept", "application/json") + + var resp *http.Response + var err error + for i := uint64(0); i < t.retries; i++ { + resp, err = t.base.RoundTrip(req) + if err == nil { + if resp.StatusCode == 200 { + return resp, nil + } + respBytes, _ := io.ReadAll(resp.Body) + err = fmt.Errorf("%s", respBytes) + resp.Body.Close() + } + + time.Sleep(time.Second * 5) + } + return nil, fmt.Errorf("could not execute request: %w", err) +} diff --git a/internal/client/transport.go b/internal/client/transport.go index 9c470ae..e820a90 100644 --- a/internal/client/transport.go +++ b/internal/client/transport.go @@ -14,7 +14,7 @@ type transport struct { clientID string clientSecret string token string - SSOURL string + ssoURL string expiryTime time.Time } @@ -23,7 +23,7 @@ func (t *transport) RoundTrip(req *http.Request) (*http.Response, error) { body := fmt.Sprintf("grant_type=client_credentials&client_id=%s&client_secret=%s&response_type=id_token", t.clientID, t.clientSecret) bodyReader := strings.NewReader(body) - req, _ := http.NewRequestWithContext(req.Context(), "POST", t.SSOURL+"/v1/oauth/access_token", bodyReader) + req, _ := http.NewRequestWithContext(req.Context(), "POST", t.ssoURL+"/v1/oauth/access_token", bodyReader) req.Header.Add("Content-Type", "application/x-www-form-urlencoded") resp, err := t.base.RoundTrip(req) diff --git a/legacy-client.go b/legacy-client.go new file mode 100644 index 0000000..c15b1f8 --- /dev/null +++ b/legacy-client.go @@ -0,0 +1,74 @@ +package decortsdk + +import ( + "context" + "errors" + "io" + "net/http" + "strings" + + "github.com/google/go-querystring/query" + "github.com/rudecs/decort-sdk/config" + "github.com/rudecs/decort-sdk/internal/client" + "github.com/rudecs/decort-sdk/pkg/cloudapi" + "github.com/rudecs/decort-sdk/pkg/cloudbroker" +) + +// Legacy HTTP-client for platform +type LegacyDecortClient struct { + decortURL string + client *http.Client +} + +// Legacy client builder +func NewLegacy(cfg config.LegacyConfig) *LegacyDecortClient { + if cfg.Retries == 0 { + cfg.Retries = 5 + } + + return &LegacyDecortClient{ + decortURL: cfg.DecortURL, + client: client.NewLegacyHttpClient(cfg), + } +} + +// CloudAPI builder +func (ldc *LegacyDecortClient) CloudAPI() *cloudapi.CloudAPI { + return cloudapi.New(ldc) +} + +// CloudBroker builder +func (ldc *LegacyDecortClient) CloudBroker() *cloudbroker.CloudBroker { + return cloudbroker.New(ldc) +} + +// DecortApiCall method for sending requests to the platform +func (ldc *LegacyDecortClient) DecortApiCall(ctx context.Context, method, url string, params interface{}) ([]byte, error) { + values, err := query.Values(params) + if err != nil { + return nil, err + } + + body := strings.NewReader(values.Encode()) + req, err := http.NewRequestWithContext(ctx, method, ldc.decortURL+"/restmachine"+url, body) + if err != nil { + return nil, err + } + + resp, err := ldc.client.Do(req) + if err != nil { + return nil, err + } + defer resp.Body.Close() + + respBytes, err := io.ReadAll(resp.Body) + if err != nil { + return nil, err + } + + if resp.StatusCode != 200 { + return nil, errors.New(string(respBytes)) + } + + return respBytes, nil +} diff --git a/pkg/cloudapi/account/add_user.go b/pkg/cloudapi/account/add_user.go index 5a2663d..bb1179d 100644 --- a/pkg/cloudapi/account/add_user.go +++ b/pkg/cloudapi/account/add_user.go @@ -13,18 +13,18 @@ import ( type AddUserRequest struct { // ID of account to add to // Required: true - AccountID uint64 `url:"accountId"` + AccountID uint64 `url:"accountId" json:"accountId"` // Name of the user to be given rights // Required: true - UserID string `url:"userId"` + UserID string `url:"userId" json:"userId"` // Account permission types: // - 'R' for read only access // - 'RCX' for Write // - 'ARCXDU' for Admin // Required: true - AccessType string `url:"accesstype"` + AccessType string `url:"accesstype" json:"accesstype"` } func (arq AddUserRequest) validate() error { diff --git a/pkg/cloudapi/account/audits.go b/pkg/cloudapi/account/audits.go index 63353c6..a928a6b 100644 --- a/pkg/cloudapi/account/audits.go +++ b/pkg/cloudapi/account/audits.go @@ -11,7 +11,7 @@ import ( type AuditsRequest struct { // ID of the account // Required: true - AccountID uint64 `url:"accountId"` + AccountID uint64 `url:"accountId" json:"accountId"` } func (arq AuditsRequest) validate() error { diff --git a/pkg/cloudapi/account/create.go b/pkg/cloudapi/account/create.go index 69b8221..0e5be15 100644 --- a/pkg/cloudapi/account/create.go +++ b/pkg/cloudapi/account/create.go @@ -11,43 +11,43 @@ import ( type CreateRequest struct { // Display name // Required: true - Name string `url:"name"` + Name string `url:"name" json:"name"` // Name of the account // Required: true - Username string `url:"username"` + Username string `url:"username" json:"username"` // Email // Required: false - EmailAddress string `url:"emailaddress,omitempty"` + EmailAddress string `url:"emailaddress,omitempty" json:"emailaddress,omitempty"` // Max size of memory in MB // Required: false - MaxMemoryCapacity int64 `url:"maxMemoryCapacity,omitempty"` + MaxMemoryCapacity int64 `url:"maxMemoryCapacity,omitempty" json:"maxMemoryCapacity,omitempty"` // Max size of aggregated vdisks in GB // Required: false - MaxVDiskCapacity int64 `url:"maxVDiskCapacity,omitempty"` + MaxVDiskCapacity int64 `url:"maxVDiskCapacity,omitempty" json:"maxVDiskCapacity,omitempty"` // Max number of CPU cores // Required: false - MaxCPUCapacity int64 `url:"maxCPUCapacity,omitempty"` + MaxCPUCapacity int64 `url:"maxCPUCapacity,omitempty" json:"maxCPUCapacity,omitempty"` // Max sent/received network transfer peering // Required: false - MaxNetworkPeerTransfer int64 `url:"maxNetworkPeerTransfer,omitempty"` + MaxNetworkPeerTransfer int64 `url:"maxNetworkPeerTransfer,omitempty" json:"maxNetworkPeerTransfer,omitempty"` // Max number of assigned public IPs // Required: false - MaxNumPublicIP int64 `url:"maxNumPublicIP,omitempty"` + MaxNumPublicIP int64 `url:"maxNumPublicIP,omitempty" json:"maxNumPublicIP,omitempty"` // If true send emails when a user is granted access to resources // Required: false - SendAccessEmails bool `url:"sendAccessEmails,omitempty"` + SendAccessEmails bool `url:"sendAccessEmails,omitempty" json:"sendAccessEmails,omitempty"` // Limit (positive) or disable (0) GPU resources // Required: false - GPUUnits int64 `url:"gpu_units,omitempty"` + GPUUnits int64 `url:"gpu_units,omitempty" json:"gpu_units,omitempty"` } func (arq CreateRequest) validate() error { diff --git a/pkg/cloudapi/account/delete.go b/pkg/cloudapi/account/delete.go index 3ebcdfd..60077d5 100644 --- a/pkg/cloudapi/account/delete.go +++ b/pkg/cloudapi/account/delete.go @@ -10,11 +10,11 @@ import ( type DeleteRequest struct { // ID of account to delete // Required: true - AccountID uint64 `url:"accountId"` + AccountID uint64 `url:"accountId" json:"accountId"` // Whether to completely delete the account // Required: false - Permanently bool `url:"permanently,omitempty"` + Permanently bool `url:"permanently,omitempty" json:"permanently,omitempty"` } func (arq DeleteRequest) validate() error { diff --git a/pkg/cloudapi/account/delete_user.go b/pkg/cloudapi/account/delete_user.go index 1f356ea..28aac0c 100644 --- a/pkg/cloudapi/account/delete_user.go +++ b/pkg/cloudapi/account/delete_user.go @@ -11,15 +11,15 @@ import ( type DeleteUserRequest struct { // ID of the account // Required: true - AccountID uint64 `url:"accountId"` + AccountID uint64 `url:"accountId" json:"accountId"` // ID or emailaddress of the user to remove // Required: true - UserID string `url:"userId"` + UserID string `url:"userId" json:"userId"` // Recursively revoke access rights from owned cloudspaces and vmachines // Required: false - RecursiveDelete bool `url:"recursivedelete,omitempty"` + RecursiveDelete bool `url:"recursivedelete,omitempty" json:"recursivedelete,omitempty"` } func (arq DeleteUserRequest) validate() error { diff --git a/pkg/cloudapi/account/disable_enable.go b/pkg/cloudapi/account/disable_enable.go index 5f46eeb..8f25e49 100644 --- a/pkg/cloudapi/account/disable_enable.go +++ b/pkg/cloudapi/account/disable_enable.go @@ -11,7 +11,7 @@ import ( type DisabelEnableRequest struct { // ID of account // Required: true - AccountID uint64 `url:"accountId"` + AccountID uint64 `url:"accountId" json:"accountId"` } func (arq DisabelEnableRequest) validate() error { diff --git a/pkg/cloudapi/account/get.go b/pkg/cloudapi/account/get.go index dc99d8e..07abe4d 100644 --- a/pkg/cloudapi/account/get.go +++ b/pkg/cloudapi/account/get.go @@ -11,7 +11,7 @@ import ( type GetRequest struct { // ID an account // Required: true - AccountID uint64 `url:"accountId"` + AccountID uint64 `url:"accountId" json:"accountId"` } func (arq GetRequest) validate() error { diff --git a/pkg/cloudapi/account/get_consumed_account_units.go b/pkg/cloudapi/account/get_consumed_account_units.go index 412797f..a6ed700 100644 --- a/pkg/cloudapi/account/get_consumed_account_units.go +++ b/pkg/cloudapi/account/get_consumed_account_units.go @@ -11,7 +11,7 @@ import ( type GetConsumedAccountUnitsRequest struct { // ID an account // Required: true - AccountID uint64 `url:"accountId"` + AccountID uint64 `url:"accountId" json:"accountId"` } func (arq GetConsumedAccountUnitsRequest) validate() error { 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 c7862fc..0707128 100644 --- a/pkg/cloudapi/account/get_consumed_cloud_units_by_type.go +++ b/pkg/cloudapi/account/get_consumed_cloud_units_by_type.go @@ -13,11 +13,11 @@ import ( type GetConsumedCloudUnitsByTypeRequest struct { // ID an account // Required: true - AccountID uint64 `url:"accountId"` + AccountID uint64 `url:"accountId" json:"accountId"` // Cloud unit resource type // Required: true - CUType string `url:"cutype"` + CUType string `url:"cutype" json:"cutype"` } func (arq GetConsumedCloudUnitsByTypeRequest) validate() error { diff --git a/pkg/cloudapi/account/get_consumption.go b/pkg/cloudapi/account/get_consumption.go index 7f4c5b0..8092eab 100644 --- a/pkg/cloudapi/account/get_consumption.go +++ b/pkg/cloudapi/account/get_consumption.go @@ -10,15 +10,15 @@ import ( type GetConsumtionRequest struct { // ID an account // Required: true - AccountID uint64 `url:"accountId"` + AccountID uint64 `url:"accountId" json:"accountId"` // Epoch represents the start time // Required: true - Start uint64 `url:"start"` + Start uint64 `url:"start" json:"start"` // Epoch represents the end time // Required: true - End uint64 `url:"end"` + End uint64 `url:"end" json:"end"` } func (arq GetConsumtionRequest) validate() error { diff --git a/pkg/cloudapi/account/get_reserved_account_units.go b/pkg/cloudapi/account/get_reserved_account_units.go index 9e7a45e..037e032 100644 --- a/pkg/cloudapi/account/get_reserved_account_units.go +++ b/pkg/cloudapi/account/get_reserved_account_units.go @@ -11,7 +11,7 @@ import ( type GetReservedAccountUnitsRequest struct { // ID an account // Required: true - AccountID uint64 `url:"accountId"` + AccountID uint64 `url:"accountId" json:"accountId"` } func (arq GetReservedAccountUnitsRequest) validate() error { diff --git a/pkg/cloudapi/account/list.go b/pkg/cloudapi/account/list.go index 4f8caeb..6c59b20 100644 --- a/pkg/cloudapi/account/list.go +++ b/pkg/cloudapi/account/list.go @@ -10,11 +10,11 @@ import ( type ListRequest struct { // Page number // Required: false - Page uint64 `url:"page"` + Page uint64 `url:"page" json:"page"` // Page size // Required: false - Size uint64 `url:"size"` + Size uint64 `url:"size" json:"size"` } // List gets list all accounts the user has access to diff --git a/pkg/cloudapi/account/list_computes.go b/pkg/cloudapi/account/list_computes.go index 6a05d8e..7bf91fd 100644 --- a/pkg/cloudapi/account/list_computes.go +++ b/pkg/cloudapi/account/list_computes.go @@ -11,7 +11,7 @@ import ( type ListComputesRequest struct { // ID an account // Required: true - AccountID uint64 `url:"accountId"` + AccountID uint64 `url:"accountId" json:"accountId"` } func (arq ListComputesRequest) validate() error { diff --git a/pkg/cloudapi/account/list_deleted.go b/pkg/cloudapi/account/list_deleted.go index c9717b3..313e343 100644 --- a/pkg/cloudapi/account/list_deleted.go +++ b/pkg/cloudapi/account/list_deleted.go @@ -10,11 +10,11 @@ import ( type ListDeletedRequest struct { // Page number // Required: false - Page uint64 `url:"page"` + Page uint64 `url:"page" json:"page"` // Page size // Required: false - Size uint64 `url:"size"` + Size uint64 `url:"size" json:"size"` } // ListDeleted gets list all deleted accounts the user has access to diff --git a/pkg/cloudapi/account/list_disks.go b/pkg/cloudapi/account/list_disks.go index 681efa9..b4b487a 100644 --- a/pkg/cloudapi/account/list_disks.go +++ b/pkg/cloudapi/account/list_disks.go @@ -11,7 +11,7 @@ import ( type ListDisksRequest struct { // ID an account // Required: true - AccountID uint64 `url:"accountId"` + AccountID uint64 `url:"accountId" json:"accountId"` } func (arq ListDisksRequest) validate() error { diff --git a/pkg/cloudapi/account/list_flipgroups.go b/pkg/cloudapi/account/list_flipgroups.go index 6425f42..93c64b6 100644 --- a/pkg/cloudapi/account/list_flipgroups.go +++ b/pkg/cloudapi/account/list_flipgroups.go @@ -11,7 +11,7 @@ import ( type ListFLIPGroupsRequest struct { // ID an account // Required: true - AccountID uint64 `url:"accountId"` + AccountID uint64 `url:"accountId" json:"accountId"` } func (arq ListFLIPGroupsRequest) validate() error { diff --git a/pkg/cloudapi/account/list_rg.go b/pkg/cloudapi/account/list_rg.go index 3679195..c8dacfb 100644 --- a/pkg/cloudapi/account/list_rg.go +++ b/pkg/cloudapi/account/list_rg.go @@ -11,7 +11,7 @@ import ( type ListRGRequest struct { // ID an account // Required: true - AccountID uint64 `url:"accountId"` + AccountID uint64 `url:"accountId" json:"accountId"` } func (arq ListRGRequest) validate() error { diff --git a/pkg/cloudapi/account/list_templates.go b/pkg/cloudapi/account/list_templates.go index 50cf63d..c7090b6 100644 --- a/pkg/cloudapi/account/list_templates.go +++ b/pkg/cloudapi/account/list_templates.go @@ -11,11 +11,11 @@ import ( type ListTemplatesRequest struct { // ID an account // Required: true - AccountID uint64 `url:"accountId"` + AccountID uint64 `url:"accountId" json:"accountId"` // Include deleted images // Required: false - IncludeDeleted bool `url:"includedeleted"` + IncludeDeleted bool `url:"includedeleted" json:"includedeleted"` } func (arq ListTemplatesRequest) validate() error { diff --git a/pkg/cloudapi/account/list_vins.go b/pkg/cloudapi/account/list_vins.go index d39dde9..3e51b72 100644 --- a/pkg/cloudapi/account/list_vins.go +++ b/pkg/cloudapi/account/list_vins.go @@ -11,7 +11,7 @@ import ( type ListVINSRequest struct { // ID an account // Required: true - AccountID uint64 `url:"accountId"` + AccountID uint64 `url:"accountId" json:"accountId"` } func (arq ListVINSRequest) validate() error { diff --git a/pkg/cloudapi/account/restore.go b/pkg/cloudapi/account/restore.go index cea9954..24dfe8d 100644 --- a/pkg/cloudapi/account/restore.go +++ b/pkg/cloudapi/account/restore.go @@ -11,7 +11,7 @@ import ( type RestoreRequest struct { // ID an account // Required: true - AccountID uint64 `url:"accountId"` + AccountID uint64 `url:"accountId" json:"accountId"` } func (arq RestoreRequest) validate() error { diff --git a/pkg/cloudapi/account/update.go b/pkg/cloudapi/account/update.go index ea45d02..95c1c0d 100644 --- a/pkg/cloudapi/account/update.go +++ b/pkg/cloudapi/account/update.go @@ -11,39 +11,39 @@ import ( type UpdateRequest struct { // ID an account // Required: true - AccountID uint64 `url:"accountId"` + AccountID uint64 `url:"accountId" json:"accountId"` // Name of the account // Required: false - Name string `url:"name,omitempty"` + Name string `url:"name,omitempty" json:"name,omitempty"` // Max size of memory in MB // Required: false - MaxMemoryCapacity uint64 `url:"maxMemoryCapacity,omitempty"` + MaxMemoryCapacity uint64 `url:"maxMemoryCapacity,omitempty" json:"maxMemoryCapacity,omitempty"` // Max size of aggregated vdisks in GB // Required: false - MaxVDiskCapacity uint64 `url:"maxVDiskCapacity,omitempty"` + MaxVDiskCapacity uint64 `url:"maxVDiskCapacity,omitempty" json:"maxVDiskCapacity,omitempty"` // Max number of CPU cores // Required: false - MaxCPUCapacity uint64 `url:"maxCPUCapacity,omitempty"` + MaxCPUCapacity uint64 `url:"maxCPUCapacity,omitempty" json:"maxCPUCapacity,omitempty"` // Max sent/received network transfer peering // Required: false - MaxNetworkPeerTransfer uint64 `url:"maxNetworkPeerTransfer,omitempty"` + MaxNetworkPeerTransfer uint64 `url:"maxNetworkPeerTransfer,omitempty" json:"maxNetworkPeerTransfer,omitempty"` // Max number of assigned public IPs // Required: false - MaxNumPublicIP uint64 `url:"maxNumPublicIP,omitempty"` + MaxNumPublicIP uint64 `url:"maxNumPublicIP,omitempty" json:"maxNumPublicIP,omitempty"` // If true send emails when a user is granted access to resources // Required: false - SendAccessEmails bool `url:"sendAccessEmails,omitempty"` + SendAccessEmails bool `url:"sendAccessEmails,omitempty" json:"sendAccessEmails,omitempty"` // Limit (positive) or disable (0) GPU resources // Required: false - GPUUnits uint64 `url:"gpu_units,omitempty"` + GPUUnits uint64 `url:"gpu_units,omitempty" json:"gpu_units,omitempty"` } func (arq UpdateRequest) validate() error { diff --git a/pkg/cloudapi/account/update_user.go b/pkg/cloudapi/account/update_user.go index 1b07d79..720d8b3 100644 --- a/pkg/cloudapi/account/update_user.go +++ b/pkg/cloudapi/account/update_user.go @@ -13,18 +13,18 @@ import ( type UpdateUserRequest struct { // ID of the account // Required: true - AccountID uint64 `url:"accountId"` + AccountID uint64 `url:"accountId" json:"accountId"` // Userid/Email for registered users or emailaddress for unregistered users // Required: true - UserID string `url:"userId"` + UserID string `url:"userId" json:"userId"` // Account permission types: // - 'R' for read only access // - 'RCX' for Write // - 'ARCXDU' for Admin // Required: true - AccessType string `url:"accesstype"` + AccessType string `url:"accesstype" json:"accesstype"` } func (arq UpdateUserRequest) validate() error { diff --git a/pkg/cloudapi/bservice/create.go b/pkg/cloudapi/bservice/create.go index 0ae8188..a8c3823 100644 --- a/pkg/cloudapi/bservice/create.go +++ b/pkg/cloudapi/bservice/create.go @@ -11,19 +11,19 @@ import ( type CreateRequest struct { // Name of the service // Required: true - Name string `url:"name"` + Name string `url:"name" json:"name"` // ID of the Resource Group where this service will be placed // Required: true - RGID uint64 `url:"rgId"` + RGID uint64 `url:"rgId" json:"rgId"` // Name of the user to deploy SSH key for. Pass empty string if no SSH key deployment is required // Required: false - SSHUser string `url:"sshUser,omitempty"` + SSHUser string `url:"sshUser,omitempty" json:"sshUser,omitempty"` // SSH key to deploy for the specified user. Same key will be deployed to all computes of the service // Required: false - SSHKey string `url:"sshKey,omitempty"` + SSHKey string `url:"sshKey,omitempty" json:"sshKey,omitempty"` } func (bsrq CreateRequest) validate() error { diff --git a/pkg/cloudapi/bservice/delete.go b/pkg/cloudapi/bservice/delete.go index bf872dd..ab03493 100644 --- a/pkg/cloudapi/bservice/delete.go +++ b/pkg/cloudapi/bservice/delete.go @@ -11,11 +11,11 @@ import ( type DeleteRequest struct { // ID of the BasicService to be delete // Required: true - ServiceID uint64 `url:"serviceId"` + ServiceID uint64 `url:"serviceId" json:"serviceId"` // If set to False, Basic service will be deleted to recycle bin. Otherwise destroyed immediately // Required: true - Permanently bool `url:"permanently,omitempty"` + Permanently bool `url:"permanently,omitempty" json:"permanently,omitempty"` } func (bsrq DeleteRequest) validate() error { diff --git a/pkg/cloudapi/bservice/disable.go b/pkg/cloudapi/bservice/disable.go index d19095a..ff1979b 100644 --- a/pkg/cloudapi/bservice/disable.go +++ b/pkg/cloudapi/bservice/disable.go @@ -11,7 +11,7 @@ import ( type DisableRequest struct { // ID of the service to disable // Required: true - ServiceID uint64 `url:"serviceId"` + ServiceID uint64 `url:"serviceId" json:"serviceId"` } func (bsrq DisableRequest) validate() error { diff --git a/pkg/cloudapi/bservice/enable.go b/pkg/cloudapi/bservice/enable.go index 9e664aa..a1fa632 100644 --- a/pkg/cloudapi/bservice/enable.go +++ b/pkg/cloudapi/bservice/enable.go @@ -11,7 +11,7 @@ import ( type EnableRequest struct { // ID of the service to enable // Required: true - ServiceID uint64 `url:"serviceId"` + ServiceID uint64 `url:"serviceId" json:"serviceId"` } func (bsrq EnableRequest) validate() error { diff --git a/pkg/cloudapi/bservice/get.go b/pkg/cloudapi/bservice/get.go index 03bfb98..73611c0 100644 --- a/pkg/cloudapi/bservice/get.go +++ b/pkg/cloudapi/bservice/get.go @@ -11,7 +11,7 @@ import ( type GetRequest struct { // ID of the service to query information // Required: true - ServiceID uint64 `url:"serviceId"` + ServiceID uint64 `url:"serviceId" json:"serviceId"` } func (bsrq GetRequest) validate() error { diff --git a/pkg/cloudapi/bservice/group_add.go b/pkg/cloudapi/bservice/group_add.go index cd03f2f..69d7f41 100644 --- a/pkg/cloudapi/bservice/group_add.go +++ b/pkg/cloudapi/bservice/group_add.go @@ -11,62 +11,62 @@ import ( type GroupAddRequest struct { // ID of the Basic Service to add a group to // Required: true - ServiceID uint64 `url:"serviceId"` + ServiceID uint64 `url:"serviceId" json:"serviceId"` // Name of the Compute Group to add // Required: true - Name string `url:"name"` + Name string `url:"name" json:"name"` // Computes number. Defines how many computes must be there in the group // Required: true - Count uint64 `url:"count"` + Count uint64 `url:"count" json:"count"` // Compute CPU number. All computes in the group have the same CPU count // Required: true - CPU uint64 `url:"cpu"` + CPU uint64 `url:"cpu" json:"cpu"` // Compute RAM volume in MB. All computes in the group have the same RAM volume // Required: true - RAM uint64 `url:"ram"` + RAM uint64 `url:"ram" json:"ram"` // Compute boot disk size in GB // Required: true - Disk uint64 `url:"disk"` + Disk uint64 `url:"disk" json:"disk"` // OS image ID to create computes from // Required: true - ImageID uint64 `url:"imageId"` + ImageID uint64 `url:"imageId" json:"imageId"` // Compute driver // should be one of: // - KVM_X86 // - KVM_PPC // Required: true - Driver string `url:"driver"` + Driver string `url:"driver" json:"driver"` // Storage endpoint provider ID // Required: false - SEPID uint64 `url:"sepId,omitempty"` + SEPID uint64 `url:"sepId,omitempty" json:"sepId,omitempty"` // Pool to use if sepId is set, can be also empty if needed to be chosen by system // Required: false - SEPPool string `url:"sepPool,omitempty"` + SEPPool string `url:"sepPool,omitempty" json:"sepPool,omitempty"` // Group role tag. Can be empty string, does not have to be unique // Required: false - Role string `url:"role,omitempty"` + Role string `url:"role,omitempty" json:"role,omitempty"` // List of ViNSes to connect computes to // Required: false - VINSes []uint64 `url:"vinses,omitempty"` + VINSes []uint64 `url:"vinses,omitempty" json:"vinses,omitempty"` // List of external networks to connect computes to // Required: false - ExtNets []uint64 `url:"extnets,omitempty"` + ExtNets []uint64 `url:"extnets,omitempty" json:"extnets,omitempty"` // Time of Compute Group readiness // Required: false - TimeoutStart uint64 `url:"timeoutStart"` + TimeoutStart uint64 `url:"timeoutStart" json:"timeoutStart"` } func (bsrq GroupAddRequest) validate() error { diff --git a/pkg/cloudapi/bservice/group_compute_remove.go b/pkg/cloudapi/bservice/group_compute_remove.go index 90e11c5..d3b16a4 100644 --- a/pkg/cloudapi/bservice/group_compute_remove.go +++ b/pkg/cloudapi/bservice/group_compute_remove.go @@ -11,15 +11,15 @@ import ( type GroupComputeRemoveRequest struct { // ID of the Basic Service // Required: true - ServiceID uint64 `url:"serviceId"` + ServiceID uint64 `url:"serviceId" json:"serviceId"` // ID of the Compute GROUP // Required: true - CompGroupID uint64 `url:"compgroupId"` + CompGroupID uint64 `url:"compgroupId" json:"compgroupId"` // ID of the Compute // Required: true - ComputeID uint64 `url:"computeId"` + ComputeID uint64 `url:"computeId" json:"computeId"` } func (bsrq GroupComputeRemoveRequest) validate() error { diff --git a/pkg/cloudapi/bservice/group_get.go b/pkg/cloudapi/bservice/group_get.go index 44f7c3f..cf80b6c 100644 --- a/pkg/cloudapi/bservice/group_get.go +++ b/pkg/cloudapi/bservice/group_get.go @@ -11,11 +11,11 @@ import ( type GroupGetRequest struct { // ID of the Basic Service of Compute Group // Required: true - ServiceID uint64 `url:"serviceId"` + ServiceID uint64 `url:"serviceId" json:"serviceId"` // ID of the Compute Group // Required: true - CompGroupID uint64 `url:"compgroupId"` + CompGroupID uint64 `url:"compgroupId" json:"compgroupId"` } func (bsrq GroupGetRequest) validate() error { diff --git a/pkg/cloudapi/bservice/group_parent_add.go b/pkg/cloudapi/bservice/group_parent_add.go index 3597c47..4fbead0 100644 --- a/pkg/cloudapi/bservice/group_parent_add.go +++ b/pkg/cloudapi/bservice/group_parent_add.go @@ -12,15 +12,15 @@ import ( type GroupParentAddRequest struct { // ID of the Basic Service of Compute Group // Required: true - ServiceID uint64 `url:"serviceId"` + ServiceID uint64 `url:"serviceId" json:"serviceId"` // ID of the Compute Group // Required: true - CompGroupID uint64 `url:"compgroupId"` + CompGroupID uint64 `url:"compgroupId" json:"compgroupId"` // ID of the parent Compute Group to register with the current Compute Group // Required: true - ParentID uint64 `url:"parentId"` + ParentID uint64 `url:"parentId" json:"parentId"` } func (bsrq GroupParentAddRequest) validate() error { diff --git a/pkg/cloudapi/bservice/group_parent_remove.go b/pkg/cloudapi/bservice/group_parent_remove.go index 1a398a8..8989310 100644 --- a/pkg/cloudapi/bservice/group_parent_remove.go +++ b/pkg/cloudapi/bservice/group_parent_remove.go @@ -12,16 +12,16 @@ import ( type GroupParentRemoveRequest struct { // ID of the Basic Service of Compute Group // Required: true - ServiceID uint64 `url:"serviceId"` + ServiceID uint64 `url:"serviceId" json:"serviceId"` // ID of the Compute Group // Required: true - CompGroupID uint64 `url:"compgroupId"` + CompGroupID uint64 `url:"compgroupId" json:"compgroupId"` // ID of the parent Compute Group // to remove from the current Compute Group // Required: true - ParentID uint64 `url:"parentId"` + ParentID uint64 `url:"parentId" json:"parentId"` } func (bsrq GroupParentRemoveRequest) validate() error { diff --git a/pkg/cloudapi/bservice/group_remove.go b/pkg/cloudapi/bservice/group_remove.go index 63f2c11..2944f78 100644 --- a/pkg/cloudapi/bservice/group_remove.go +++ b/pkg/cloudapi/bservice/group_remove.go @@ -11,11 +11,11 @@ import ( type GroupRemoveRequest struct { // ID of the Basic Service of Compute Group // Required: true - ServiceID uint64 `url:"serviceId"` + ServiceID uint64 `url:"serviceId" json:"serviceId"` // ID of the Compute Group // Required: true - CompGroupID uint64 `url:"compgroupId"` + CompGroupID uint64 `url:"compgroupId" json:"compgroupId"` } func (bsrq GroupRemoveRequest) validate() error { diff --git a/pkg/cloudapi/bservice/group_resize.go b/pkg/cloudapi/bservice/group_resize.go index 39c7b34..a62e017 100644 --- a/pkg/cloudapi/bservice/group_resize.go +++ b/pkg/cloudapi/bservice/group_resize.go @@ -13,22 +13,22 @@ import ( type GroupResizeRequest struct { // ID of the Basic Service of Compute Group // Required: true - ServiceID uint64 `url:"serviceId"` + ServiceID uint64 `url:"serviceId" json:"serviceId"` // ID of the Compute Group to resize // Required: true - CompGroupID uint64 `url:"compgroupId"` + CompGroupID uint64 `url:"compgroupId" json:"compgroupId"` // Either delta or absolute value of computes // Required: true - Count int64 `url:"count"` + Count int64 `url:"count" json:"count"` // Either delta or absolute value of computes // Should be one of: // - ABSOLUTE // - RELATIVE // Required: true - Mode string `url:"mode"` + Mode string `url:"mode" json:"mode"` } func (bsrq GroupResizeRequest) validate() error { diff --git a/pkg/cloudapi/bservice/group_start.go b/pkg/cloudapi/bservice/group_start.go index d075e7e..bb1714f 100644 --- a/pkg/cloudapi/bservice/group_start.go +++ b/pkg/cloudapi/bservice/group_start.go @@ -11,11 +11,11 @@ import ( type GroupStartRequest struct { // ID of the Basic Service of Compute Group // Required: true - ServiceID uint64 `url:"serviceId"` + ServiceID uint64 `url:"serviceId" json:"serviceId"` // ID of the Compute Group to start // Required: true - CompGroupID uint64 `url:"compgroupId"` + CompGroupID uint64 `url:"compgroupId" json:"compgroupId"` } func (bsrq GroupStartRequest) validate() error { diff --git a/pkg/cloudapi/bservice/group_stop.go b/pkg/cloudapi/bservice/group_stop.go index 57f1f98..7917e12 100644 --- a/pkg/cloudapi/bservice/group_stop.go +++ b/pkg/cloudapi/bservice/group_stop.go @@ -11,15 +11,15 @@ import ( type GroupStopRequest struct { // ID of the Basic Service of Compute Group // Required: true - ServiceID uint64 `url:"serviceId"` + ServiceID uint64 `url:"serviceId" json:"serviceId"` // ID of the Compute Group to stop // Required: true - CompGroupID uint64 `url:"compgroupId"` + CompGroupID uint64 `url:"compgroupId" json:"compgroupId"` // Force stop Compute Group // Required: true - Force bool `url:"force,omitempty"` + Force bool `url:"force,omitempty" json:"force,omitempty"` } func (bsrq GroupStopRequest) validate() error { diff --git a/pkg/cloudapi/bservice/group_update.go b/pkg/cloudapi/bservice/group_update.go index 76b2e4f..c64640b 100644 --- a/pkg/cloudapi/bservice/group_update.go +++ b/pkg/cloudapi/bservice/group_update.go @@ -11,35 +11,35 @@ import ( type GroupUpdateRequest struct { // ID of the Basic Service of Compute Group // Required: true - ServiceID uint64 `url:"serviceId"` + ServiceID uint64 `url:"serviceId" json:"serviceId"` // ID of the Compute Group // Required: true - CompGroupID uint64 `url:"compgroupId"` + CompGroupID uint64 `url:"compgroupId" json:"compgroupId"` // Specify non-empty string to update Compute Group name // Required: false - Name string `url:"name,omitempty"` + Name string `url:"name,omitempty" json:"name,omitempty"` // Specify non-empty string to update group role // Required: false - Role string `url:"role,omitempty"` + Role string `url:"role,omitempty" json:"role,omitempty"` // Specify positive value to set new compute CPU count // Required: false - CPU uint64 `url:"cpu,omitempty"` + CPU uint64 `url:"cpu,omitempty" json:"cpu,omitempty"` // Specify positive value to set new compute RAM volume in MB // Required: false - RAM uint64 `url:"ram,omitempty"` + RAM uint64 `url:"ram,omitempty" json:"ram,omitempty"` // Specify new compute boot disk size in GB // Required: false - Disk uint64 `url:"disk,omitempty"` + Disk uint64 `url:"disk,omitempty" json:"disk,omitempty"` // Force resize Compute Group // Required: false - Force bool `url:"force,omitempty"` + Force bool `url:"force,omitempty" json:"force,omitempty"` } func (bsrq GroupUpdateRequest) validate() error { diff --git a/pkg/cloudapi/bservice/group_update_extnet.go b/pkg/cloudapi/bservice/group_update_extnet.go index 77e0c64..a67f085 100644 --- a/pkg/cloudapi/bservice/group_update_extnet.go +++ b/pkg/cloudapi/bservice/group_update_extnet.go @@ -11,15 +11,15 @@ import ( type GroupUpdateExtNetRequest struct { // ID of the Basic Service of Compute Group // Required: true - ServiceID uint64 `url:"serviceId"` + ServiceID uint64 `url:"serviceId" json:"serviceId"` // ID of the Compute Group // Required: true - CompGroupID uint64 `url:"compgroupId"` + CompGroupID uint64 `url:"compgroupId" json:"compgroupId"` // List of Extnets to connect computes // Required: false - ExtNets []uint64 `url:"extnets,omitempty"` + ExtNets []uint64 `url:"extnets,omitempty" json:"extnets,omitempty"` } func (bsrq GroupUpdateExtNetRequest) validate() error { diff --git a/pkg/cloudapi/bservice/group_update_vins.go b/pkg/cloudapi/bservice/group_update_vins.go index d6f1a6a..369be29 100644 --- a/pkg/cloudapi/bservice/group_update_vins.go +++ b/pkg/cloudapi/bservice/group_update_vins.go @@ -11,15 +11,15 @@ import ( type GroupUpdateVINSRequest struct { // ID of the Basic Service of Compute Group // Required: true - ServiceID uint64 `url:"serviceId"` + ServiceID uint64 `url:"serviceId" json:"serviceId"` // ID of the Compute Group // Required: true - CompGroupID uint64 `url:"compgroupId"` + CompGroupID uint64 `url:"compgroupId" json:"compgroupId"` // List of ViNSes to connect computes // Required: false - VINSes []uint64 `url:"vinses,omitempty"` + VINSes []uint64 `url:"vinses,omitempty" json:"vinses,omitempty"` } func (bsrq GroupUpdateVINSRequest) validate() error { diff --git a/pkg/cloudapi/bservice/list.go b/pkg/cloudapi/bservice/list.go index 8323ddf..9f8bd17 100644 --- a/pkg/cloudapi/bservice/list.go +++ b/pkg/cloudapi/bservice/list.go @@ -10,19 +10,19 @@ import ( type ListRequest struct { // ID of the account to query for BasicService instances // Required: false - AccountID uint64 `url:"accountId,omitempty"` + AccountID uint64 `url:"accountId,omitempty" json:"accountId,omitempty"` // ID of the resource group to query for BasicService instances // Required: false - RGID uint64 `url:"rgId,omitempty"` + RGID uint64 `url:"rgId,omitempty" json:"rgId,omitempty"` // Page number // Required: false - Page uint64 `url:"page,omitempty"` + Page uint64 `url:"page,omitempty" json:"page,omitempty"` // Page size // Required: false - Size uint64 `url:"size,omitempty"` + Size uint64 `url:"size,omitempty" json:"size,omitempty"` } // List gets list BasicService instances associated with the specified Resource Group diff --git a/pkg/cloudapi/bservice/restore.go b/pkg/cloudapi/bservice/restore.go index eedd6f3..62b4d80 100644 --- a/pkg/cloudapi/bservice/restore.go +++ b/pkg/cloudapi/bservice/restore.go @@ -11,7 +11,7 @@ import ( type RestoreRequest struct { // ID of the BasicService to be restored // Required: true - ServiceID uint64 `url:"serviceId"` + ServiceID uint64 `url:"serviceId" json:"serviceId"` } func (bsrq RestoreRequest) validate() error { diff --git a/pkg/cloudapi/bservice/snapshot_create.go b/pkg/cloudapi/bservice/snapshot_create.go index 58b291e..526ce2d 100644 --- a/pkg/cloudapi/bservice/snapshot_create.go +++ b/pkg/cloudapi/bservice/snapshot_create.go @@ -11,11 +11,11 @@ import ( type SnapshotCreateRequest struct { // ID of the Basic Service // Required: true - ServiceID uint64 `url:"serviceId"` + ServiceID uint64 `url:"serviceId" json:"serviceId"` // Label of the snapshot // Required: true - Label string `url:"label"` + Label string `url:"label" json:"label"` } func (bsrq SnapshotCreateRequest) validate() error { diff --git a/pkg/cloudapi/bservice/snapshot_delete.go b/pkg/cloudapi/bservice/snapshot_delete.go index 1a335c8..b1d6b7f 100644 --- a/pkg/cloudapi/bservice/snapshot_delete.go +++ b/pkg/cloudapi/bservice/snapshot_delete.go @@ -11,11 +11,11 @@ import ( type SnapshotDeleteRequest struct { // ID of the Basic Service // Required: true - ServiceID uint64 `url:"serviceId"` + ServiceID uint64 `url:"serviceId" json:"serviceId"` // Label of the snapshot // Required: true - Label string `url:"label"` + Label string `url:"label" json:"label"` } func (bsrq SnapshotDeleteRequest) validate() error { diff --git a/pkg/cloudapi/bservice/snapshot_list.go b/pkg/cloudapi/bservice/snapshot_list.go index 6d77009..0c1e75d 100644 --- a/pkg/cloudapi/bservice/snapshot_list.go +++ b/pkg/cloudapi/bservice/snapshot_list.go @@ -11,7 +11,7 @@ import ( type SnapshotListRequest struct { // ID of the Basic Service // Required: true - ServiceID uint64 `url:"serviceId"` + ServiceID uint64 `url:"serviceId" json:"serviceId"` } func (bsrq SnapshotListRequest) validate() error { diff --git a/pkg/cloudapi/bservice/snapshot_rollback.go b/pkg/cloudapi/bservice/snapshot_rollback.go index 7202521..96b0cdb 100644 --- a/pkg/cloudapi/bservice/snapshot_rollback.go +++ b/pkg/cloudapi/bservice/snapshot_rollback.go @@ -11,11 +11,11 @@ import ( type SnapshotRollbackRequest struct { // ID of the Basic Service // Required: true - ServiceID uint64 `url:"serviceId"` + ServiceID uint64 `url:"serviceId" json:"serviceId"` // Label of the snapshot // Required: true - Label string `url:"label"` + Label string `url:"label" json:"label"` } func (bsrq SnapshotRollbackRequest) validate() error { diff --git a/pkg/cloudapi/bservice/start.go b/pkg/cloudapi/bservice/start.go index 5bab844..d551839 100644 --- a/pkg/cloudapi/bservice/start.go +++ b/pkg/cloudapi/bservice/start.go @@ -11,7 +11,7 @@ import ( type StartRequest struct { // ID of the service to start // Required: true - ServiceID uint64 `url:"serviceId"` + ServiceID uint64 `url:"serviceId" json:"serviceId"` } func (bsrq StartRequest) validate() error { diff --git a/pkg/cloudapi/bservice/stop.go b/pkg/cloudapi/bservice/stop.go index b4e456e..5f5dd20 100644 --- a/pkg/cloudapi/bservice/stop.go +++ b/pkg/cloudapi/bservice/stop.go @@ -11,7 +11,7 @@ import ( type StopRequest struct { // ID of the service to stop // Required: true - ServiceID uint64 `url:"serviceId"` + ServiceID uint64 `url:"serviceId" json:"serviceId"` } func (bsrq StopRequest) validate() error { diff --git a/pkg/cloudapi/compute/affinity_group_check_start.go b/pkg/cloudapi/compute/affinity_group_check_start.go index 9aaf0c7..d8f6fa2 100644 --- a/pkg/cloudapi/compute/affinity_group_check_start.go +++ b/pkg/cloudapi/compute/affinity_group_check_start.go @@ -10,11 +10,11 @@ import ( type AffinityGroupCheckStartRequest struct { // ID of the resource group // Required: true - RGID uint64 `url:"rgId"` + RGID uint64 `url:"rgId" json:"rgId"` // Affinity group label // Required: true - AffinityLabel string `url:"affinityLabel"` + AffinityLabel string `url:"affinityLabel" json:"affinityLabel"` } func (crq AffinityGroupCheckStartRequest) validate() error { diff --git a/pkg/cloudapi/compute/affinity_label_remove.go b/pkg/cloudapi/compute/affinity_label_remove.go index b39061c..ad6db3a 100644 --- a/pkg/cloudapi/compute/affinity_label_remove.go +++ b/pkg/cloudapi/compute/affinity_label_remove.go @@ -11,7 +11,7 @@ import ( type AffinityLabelRemoveRequest struct { // ID of the compute instance // Required: true - ComputeID uint64 `url:"computeId"` + ComputeID uint64 `url:"computeId" json:"computeId"` } func (crq AffinityLabelRemoveRequest) validate() error { diff --git a/pkg/cloudapi/compute/affinity_label_set.go b/pkg/cloudapi/compute/affinity_label_set.go index 6ec4b2e..2ab6cec 100644 --- a/pkg/cloudapi/compute/affinity_label_set.go +++ b/pkg/cloudapi/compute/affinity_label_set.go @@ -11,11 +11,11 @@ import ( type AffinityLabelSetRequest struct { // ID of the compute instance // Required: true - ComputeID uint64 `url:"computeId"` + ComputeID uint64 `url:"computeId" json:"computeId"` // Affinity group label // Required: true - AffinityLabel string `url:"affinityLabel"` + AffinityLabel string `url:"affinityLabel" json:"affinityLabel"` } func (crq AffinityLabelSetRequest) validate() error { diff --git a/pkg/cloudapi/compute/affinity_relations.go b/pkg/cloudapi/compute/affinity_relations.go index 5e1fba1..f1ae0db 100644 --- a/pkg/cloudapi/compute/affinity_relations.go +++ b/pkg/cloudapi/compute/affinity_relations.go @@ -11,7 +11,7 @@ import ( type AffinityRelationsRequest struct { // ID of the compute instance // Required: true - ComputeID uint64 `url:"computeId"` + ComputeID uint64 `url:"computeId" json:"computeId"` } func (crq AffinityRelationsRequest) validate() error { diff --git a/pkg/cloudapi/compute/affinity_rule_add.go b/pkg/cloudapi/compute/affinity_rule_add.go index 9cd8b7d..e064537 100644 --- a/pkg/cloudapi/compute/affinity_rule_add.go +++ b/pkg/cloudapi/compute/affinity_rule_add.go @@ -13,18 +13,18 @@ import ( type AffinityRuleAddRequest struct { // ID of the compute instance // Required: true - ComputeID uint64 `url:"computeId"` + ComputeID uint64 `url:"computeId" json:"computeId"` // Compute or node, for whom rule applies // Required: true - Topology string `url:"topology"` + Topology string `url:"topology" json:"topology"` // The degree of 'strictness' of this rule // Should be one of: // - RECOMMENDED // - REQUIRED // Required: true - Policy string `url:"policy"` + Policy string `url:"policy" json:"policy"` // The comparison mode is 'value', recorded by the specified 'key' // Should be one of: @@ -32,15 +32,15 @@ type AffinityRuleAddRequest struct { // - EN // - ANY // Required: true - Mode string `url:"mode"` + Mode string `url:"mode" json:"mode"` // Key that are taken into account when analyzing this rule will be identified // Required: true - Key string `url:"key"` + Key string `url:"key" json:"key"` // Value that must match the key to be taken into account when analyzing this rule // Required: true - Value string `url:"value"` + Value string `url:"value" json:"value"` } func (crq AffinityRuleAddRequest) validate() error { diff --git a/pkg/cloudapi/compute/affinity_rule_remove.go b/pkg/cloudapi/compute/affinity_rule_remove.go index bfba83d..60d519b 100644 --- a/pkg/cloudapi/compute/affinity_rule_remove.go +++ b/pkg/cloudapi/compute/affinity_rule_remove.go @@ -13,18 +13,18 @@ import ( type AffinityRuleRemoveRequest struct { // ID of the compute instance // Required: true - ComputeID uint64 `url:"computeId"` + ComputeID uint64 `url:"computeId" json:"computeId"` // Compute or node, for whom rule applies // Required: true - Topology string `url:"topology"` + Topology string `url:"topology" json:"topology"` // The degree of 'strictness' of this rule // Should be one of: // - RECOMMENDED // - REQUIRED // Required: true - Policy string `url:"policy"` + Policy string `url:"policy" json:"policy"` // The comparison mode is 'value', recorded by the specified 'key' // Should be one of: @@ -32,15 +32,15 @@ type AffinityRuleRemoveRequest struct { // - EN // - ANY // Required: true - Mode string `url:"mode"` + Mode string `url:"mode" json:"mode"` // Key that are taken into account when analyzing this rule will be identified // Required: true - Key string `url:"key"` + Key string `url:"key" json:"key"` // Value that must match the key to be taken into account when analyzing this rule // Required: true - Value string `url:"value"` + Value string `url:"value" json:"value"` } func (crq AffinityRuleRemoveRequest) validate() error { diff --git a/pkg/cloudapi/compute/affinity_rules_clear.go b/pkg/cloudapi/compute/affinity_rules_clear.go index 2f33efc..9bfba9e 100644 --- a/pkg/cloudapi/compute/affinity_rules_clear.go +++ b/pkg/cloudapi/compute/affinity_rules_clear.go @@ -11,7 +11,7 @@ import ( type AffinityRulesClearRequest struct { // ID of the compute instance // Required: true - ComputeID uint64 `url:"computeId"` + ComputeID uint64 `url:"computeId" json:"computeId"` } func (crq AffinityRulesClearRequest) validate() error { diff --git a/pkg/cloudapi/compute/anti_affinity_rule_add.go b/pkg/cloudapi/compute/anti_affinity_rule_add.go index 7e90088..7013e5f 100644 --- a/pkg/cloudapi/compute/anti_affinity_rule_add.go +++ b/pkg/cloudapi/compute/anti_affinity_rule_add.go @@ -13,18 +13,18 @@ import ( type AntiAffinityRuleAddRequest struct { // ID of the compute instance // Required: true - ComputeID uint64 `url:"computeId"` + ComputeID uint64 `url:"computeId" json:"computeId"` // Compute or node, for whom rule applies // Required: true - Topology string `url:"topology"` + Topology string `url:"topology" json:"topology"` // The degree of 'strictness' of this rule // Should be one of: // - RECOMMENDED // - REQUIRED // Required: true - Policy string `url:"policy"` + Policy string `url:"policy" json:"policy"` // The comparison mode is 'value', recorded by the specified 'key' // Should be one of: @@ -32,15 +32,15 @@ type AntiAffinityRuleAddRequest struct { // - EN // - ANY // Required: true - Mode string `url:"mode"` + Mode string `url:"mode" json:"mode"` // Key that are taken into account when analyzing this rule will be identified // Required: true - Key string `url:"key"` + Key string `url:"key" json:"key"` // Value that must match the key to be taken into account when analyzing this rule // Required: true - Value string `url:"value"` + Value string `url:"value" json:"value"` } func (crq AntiAffinityRuleAddRequest) validate() error { diff --git a/pkg/cloudapi/compute/anti_affinity_rule_remove.go b/pkg/cloudapi/compute/anti_affinity_rule_remove.go index 45ac7a5..fc352fa 100644 --- a/pkg/cloudapi/compute/anti_affinity_rule_remove.go +++ b/pkg/cloudapi/compute/anti_affinity_rule_remove.go @@ -13,18 +13,18 @@ import ( type AntiAffinityRuleRemoveRequest struct { // ID of the compute instance // Required: true - ComputeID uint64 `url:"computeId"` + ComputeID uint64 `url:"computeId" json:"computeId"` // Compute or node, for whom rule applies // Required: true - Topology string `url:"topology"` + Topology string `url:"topology" json:"topology"` // The degree of 'strictness' of this rule // Should be one of: // - RECOMMENDED // - REQUIRED // Required: true - Policy string `url:"policy"` + Policy string `url:"policy" json:"policy"` // The comparison mode is 'value', recorded by the specified 'key' // Should be one of: @@ -32,15 +32,15 @@ type AntiAffinityRuleRemoveRequest struct { // - EN // - ANY // Required: true - Mode string `url:"mode"` + Mode string `url:"mode" json:"mode"` // Key that are taken into account when analyzing this rule will be identified // Required: true - Key string `url:"key"` + Key string `url:"key" json:"key"` // Value that must match the key to be taken into account when analyzing this rule // Required: true - Value string `url:"value"` + Value string `url:"value" json:"value"` } func (crq AntiAffinityRuleRemoveRequest) validate() error { diff --git a/pkg/cloudapi/compute/anti_affinity_rules_clear.go b/pkg/cloudapi/compute/anti_affinity_rules_clear.go index b495b33..80283cd 100644 --- a/pkg/cloudapi/compute/anti_affinity_rules_clear.go +++ b/pkg/cloudapi/compute/anti_affinity_rules_clear.go @@ -11,7 +11,7 @@ import ( type AntiAffinityRulesClearRequest struct { // ID of the compute instance // Required: true - ComputeID uint64 `url:"computeId"` + ComputeID uint64 `url:"computeId" json:"computeId"` } func (crq AntiAffinityRulesClearRequest) validate() error { diff --git a/pkg/cloudapi/compute/attach_gpu.go b/pkg/cloudapi/compute/attach_gpu.go index 36c7ec1..449e6bc 100644 --- a/pkg/cloudapi/compute/attach_gpu.go +++ b/pkg/cloudapi/compute/attach_gpu.go @@ -11,11 +11,11 @@ import ( type AttachGPURequest struct { // Identifier compute // Required: true - ComputeID uint64 `url:"computeId"` + ComputeID uint64 `url:"computeId" json:"computeId"` // Identifier vGPU // Required: true - VGPUID uint64 `url:"vgpuId"` + VGPUID uint64 `url:"vgpuId" json:"vgpuId"` } func (crq AttachGPURequest) validate() error { diff --git a/pkg/cloudapi/compute/attach_pci_device.go b/pkg/cloudapi/compute/attach_pci_device.go index bf9ae23..421335f 100644 --- a/pkg/cloudapi/compute/attach_pci_device.go +++ b/pkg/cloudapi/compute/attach_pci_device.go @@ -11,11 +11,11 @@ import ( type AttachPCIDeviceRequest struct { // Identifier compute // Required: true - ComputeID uint64 `url:"computeId"` + ComputeID uint64 `url:"computeId" json:"computeId"` // PCI device ID // Required: true - DeviceID uint64 `url:"deviceId"` + DeviceID uint64 `url:"deviceId" json:"deviceId"` } func (crq AttachPCIDeviceRequest) validate() error { diff --git a/pkg/cloudapi/compute/audits.go b/pkg/cloudapi/compute/audits.go index 1087b15..408327e 100644 --- a/pkg/cloudapi/compute/audits.go +++ b/pkg/cloudapi/compute/audits.go @@ -11,7 +11,7 @@ import ( type AuditsRequest struct { // ID of the compute // Required: true - ComputeID uint64 `url:"computeId"` + ComputeID uint64 `url:"computeId" json:"computeId"` } func (crq AuditsRequest) validate() error { diff --git a/pkg/cloudapi/compute/cd_eject.go b/pkg/cloudapi/compute/cd_eject.go index 212ef1e..31186b0 100644 --- a/pkg/cloudapi/compute/cd_eject.go +++ b/pkg/cloudapi/compute/cd_eject.go @@ -11,7 +11,7 @@ import ( type CDEjectRequest struct { // ID of compute instance // Required: true - ComputeID uint64 `url:"computeId"` + ComputeID uint64 `url:"computeId" json:"computeId"` } func (crq CDEjectRequest) validate() error { diff --git a/pkg/cloudapi/compute/cd_insert.go b/pkg/cloudapi/compute/cd_insert.go index 30a9bf9..93756bd 100644 --- a/pkg/cloudapi/compute/cd_insert.go +++ b/pkg/cloudapi/compute/cd_insert.go @@ -11,11 +11,11 @@ import ( type CDInsertRequest struct { // ID of compute instance // Required: true - ComputeID uint64 `url:"computeId"` + ComputeID uint64 `url:"computeId" json:"computeId"` // ID of CD-ROM image // Required: true - CDROMID uint64 `url:"cdromId"` + CDROMID uint64 `url:"cdromId" json:"cdromId"` } func (crq CDInsertRequest) validate() error { diff --git a/pkg/cloudapi/compute/clone.go b/pkg/cloudapi/compute/clone.go index e113c7a..4b0d8aa 100644 --- a/pkg/cloudapi/compute/clone.go +++ b/pkg/cloudapi/compute/clone.go @@ -11,19 +11,19 @@ import ( type CloneRequest struct { // ID of compute instance // Required: true - ComputeID uint64 `url:"computeId"` + ComputeID uint64 `url:"computeId" json:"computeId"` // Name of the clone // Required: true - Name string `url:"name"` + Name string `url:"name" json:"name"` // Timestamp of the parent's snapshot to create clone from // Required: false - SnapshotTimestamp uint64 `url:"snapshotTimestamp"` + SnapshotTimestamp uint64 `url:"snapshotTimestamp" json:"snapshotTimestamp"` // Name of the parent's snapshot to create clone from // Required: false - SnapshotName string `url:"snapshotName"` + SnapshotName string `url:"snapshotName" json:"snapshotName"` } func (crq CloneRequest) validate() error { diff --git a/pkg/cloudapi/compute/create_template.go b/pkg/cloudapi/compute/create_template.go index 5a6e437..3c43951 100644 --- a/pkg/cloudapi/compute/create_template.go +++ b/pkg/cloudapi/compute/create_template.go @@ -12,11 +12,11 @@ import ( type CreateTemplateRequest struct { // ID of the compute to create template from // Required: true - ComputeID uint64 `url:"computeId"` + ComputeID uint64 `url:"computeId" json:"computeId"` // Name to assign to the template being created // Required: true - Name string `url:"name"` + Name string `url:"name" json:"name"` // Async API call // For async call use CreateTemplateAsync diff --git a/pkg/cloudapi/compute/delete.go b/pkg/cloudapi/compute/delete.go index 47d1452..7e94e84 100644 --- a/pkg/cloudapi/compute/delete.go +++ b/pkg/cloudapi/compute/delete.go @@ -11,15 +11,15 @@ import ( type DeleteRequest struct { // ID of compute instance // Required: true - ComputeID uint64 `url:"computeId"` + ComputeID uint64 `url:"computeId" json:"computeId"` // Delete permanently // Required: false - Permanently bool `url:"permanently,omitempty"` + Permanently bool `url:"permanently,omitempty" json:"permanently,omitempty"` // Set True if you want to detach data disks (if any) from the compute before its deletion // Required: false - DetachDisks bool `url:"detachDisks,omitempty"` + DetachDisks bool `url:"detachDisks,omitempty" json:"detachDisks,omitempty"` } func (crq DeleteRequest) validate() error { diff --git a/pkg/cloudapi/compute/detach_gpu.go b/pkg/cloudapi/compute/detach_gpu.go index 79c973e..f5a161e 100644 --- a/pkg/cloudapi/compute/detach_gpu.go +++ b/pkg/cloudapi/compute/detach_gpu.go @@ -11,11 +11,11 @@ import ( type DetachGPURequest struct { // Identifier compute // Required: true - ComputeID uint64 `url:"computeId"` + ComputeID uint64 `url:"computeId" json:"computeId"` // Identifier virtual GPU // Required: false - VGPUID int64 `url:"vgpuId,omitempty"` + VGPUID int64 `url:"vgpuId,omitempty" json:"vgpuId,omitempty"` } func (crq DetachGPURequest) validate() error { diff --git a/pkg/cloudapi/compute/detach_pci_device.go b/pkg/cloudapi/compute/detach_pci_device.go index 5e3322e..37201b9 100644 --- a/pkg/cloudapi/compute/detach_pci_device.go +++ b/pkg/cloudapi/compute/detach_pci_device.go @@ -11,11 +11,11 @@ import ( type DetachPCIDeviceRequest struct { // Identifier compute // Required: true - ComputeID uint64 `url:"computeId"` + ComputeID uint64 `url:"computeId" json:"computeId"` // Pci device ID // Required: true - DeviceID uint64 `url:"deviceId"` + DeviceID uint64 `url:"deviceId" json:"deviceId"` } func (crq DetachPCIDeviceRequest) validate() error { diff --git a/pkg/cloudapi/compute/disable.go b/pkg/cloudapi/compute/disable.go index 75bc25b..d6af32a 100644 --- a/pkg/cloudapi/compute/disable.go +++ b/pkg/cloudapi/compute/disable.go @@ -11,7 +11,7 @@ import ( type DisableRequest struct { // ID of compute instance // Required: true - ComputeID uint64 `url:"computeId"` + ComputeID uint64 `url:"computeId" json:"computeId"` } func (crq DisableRequest) validate() error { diff --git a/pkg/cloudapi/compute/disk_add.go b/pkg/cloudapi/compute/disk_add.go index 91457e8..60e7ae4 100644 --- a/pkg/cloudapi/compute/disk_add.go +++ b/pkg/cloudapi/compute/disk_add.go @@ -11,40 +11,40 @@ import ( type DiskAddRequest struct { // ID of compute instance // Required: true - ComputeID uint64 `url:"computeId"` + ComputeID uint64 `url:"computeId" json:"computeId"` // Name for disk // Required: true - DiskName string `url:"diskName"` + DiskName string `url:"diskName" json:"diskName"` // Disk size in GB // Required: true - Size uint64 `url:"size"` + Size uint64 `url:"size" json:"size"` // Type of the disk // Should be one of: // - D // - B // Required: false - DiskType string `url:"diskType,omitempty"` + DiskType string `url:"diskType,omitempty" json:"diskType,omitempty"` // Storage endpoint provider ID // By default the same with boot disk // Required: false - SepID uint64 `url:"sepId,omitempty"` + SepID uint64 `url:"sepId,omitempty" json:"sepId,omitempty"` // Pool name // By default will be chosen automatically // Required: false - Pool string `url:"pool,omitempty"` + Pool string `url:"pool,omitempty" json:"pool,omitempty"` // Optional description // Required: false - Description string `url:"desc,omitempty"` + Description string `url:"desc,omitempty" json:"desc,omitempty"` // Specify image id for create disk from template // Required: false - ImageID uint64 `url:"imageId,omitempty"` + ImageID uint64 `url:"imageId,omitempty" json:"imageId,omitempty"` } func (crq DiskAddRequest) validate() error { diff --git a/pkg/cloudapi/compute/disk_attach.go b/pkg/cloudapi/compute/disk_attach.go index 68d1eeb..7f5df46 100644 --- a/pkg/cloudapi/compute/disk_attach.go +++ b/pkg/cloudapi/compute/disk_attach.go @@ -11,11 +11,11 @@ import ( type DiskAttachRequest struct { // ID of compute instance // Required: true - ComputeID uint64 `url:"computeId"` + ComputeID uint64 `url:"computeId" json:"computeId"` // ID of the disk to attach // Required: true - DiskID uint64 `url:"diskId"` + DiskID uint64 `url:"diskId" json:"diskId"` } func (crq DiskAttachRequest) validate() error { diff --git a/pkg/cloudapi/compute/disk_del.go b/pkg/cloudapi/compute/disk_del.go index 586b369..aada288 100644 --- a/pkg/cloudapi/compute/disk_del.go +++ b/pkg/cloudapi/compute/disk_del.go @@ -11,15 +11,15 @@ import ( type DiskDelRequest struct { // ID of compute instance // Required: true - ComputeID uint64 `url:"computeId"` + ComputeID uint64 `url:"computeId" json:"computeId"` // ID of disk instance // Required: true - DiskID uint64 `url:"diskId"` + DiskID uint64 `url:"diskId" json:"diskId"` // False if disk is to be deleted to recycle bin // Required: true - Permanently bool `url:"permanently"` + Permanently bool `url:"permanently" json:"permanently"` } func (crq DiskDelRequest) validate() error { diff --git a/pkg/cloudapi/compute/disk_detach.go b/pkg/cloudapi/compute/disk_detach.go index 0abc99f..017cb60 100644 --- a/pkg/cloudapi/compute/disk_detach.go +++ b/pkg/cloudapi/compute/disk_detach.go @@ -11,11 +11,11 @@ import ( type DiskDetachRequest struct { // ID of compute instance // Required: true - ComputeID uint64 `url:"computeId"` + ComputeID uint64 `url:"computeId" json:"computeId"` // ID of the disk to detach // Required: true - DiskID uint64 `url:"diskId"` + DiskID uint64 `url:"diskId" json:"diskId"` } func (crq DiskDetachRequest) validate() error { diff --git a/pkg/cloudapi/compute/disk_qos.go b/pkg/cloudapi/compute/disk_qos.go index fc1a7e0..c2fdb99 100644 --- a/pkg/cloudapi/compute/disk_qos.go +++ b/pkg/cloudapi/compute/disk_qos.go @@ -11,15 +11,15 @@ import ( type DiskQOSRequest struct { // ID of compute instance // Required: true - ComputeID uint64 `url:"computeId"` + ComputeID uint64 `url:"computeId" json:"computeId"` // ID of the disk to apply limits // Required: true - DiskID uint64 `url:"diskId"` + DiskID uint64 `url:"diskId" json:"diskId"` // Limit IO for a certain disk total and read/write options are not allowed to be combined // Required: true - Limits string `url:"limits"` + Limits string `url:"limits" json:"limits"` } func (crq DiskQOSRequest) validate() error { diff --git a/pkg/cloudapi/compute/disk_resize.go b/pkg/cloudapi/compute/disk_resize.go index 33bf49a..f249a74 100644 --- a/pkg/cloudapi/compute/disk_resize.go +++ b/pkg/cloudapi/compute/disk_resize.go @@ -11,15 +11,15 @@ import ( type DiskResizeRequest struct { // ID of compute instance // Required: true - ComputeID uint64 `url:"computeId"` + ComputeID uint64 `url:"computeId" json:"computeId"` // ID of the disk to resize // Required: true - DiskID uint64 `url:"diskId"` + DiskID uint64 `url:"diskId" json:"diskId"` // New disk size // Required: true - Size uint64 `url:"size"` + Size uint64 `url:"size" json:"size"` } func (crq DiskResizeRequest) validate() error { diff --git a/pkg/cloudapi/compute/enable.go b/pkg/cloudapi/compute/enable.go index 5aa14f8..d731466 100644 --- a/pkg/cloudapi/compute/enable.go +++ b/pkg/cloudapi/compute/enable.go @@ -11,7 +11,7 @@ import ( type EnableRequest struct { // ID of compute instance // Required: true - ComputeID uint64 `url:"computeId"` + ComputeID uint64 `url:"computeId" json:"computeId"` } func (crq EnableRequest) validate() error { diff --git a/pkg/cloudapi/compute/get.go b/pkg/cloudapi/compute/get.go index fd70b86..3165118 100644 --- a/pkg/cloudapi/compute/get.go +++ b/pkg/cloudapi/compute/get.go @@ -11,7 +11,7 @@ import ( type GetRequest struct { // ID of compute instance // Required: true - ComputeID uint64 `url:"computeId"` + ComputeID uint64 `url:"computeId" json:"computeId"` } func (crq GetRequest) validate() error { diff --git a/pkg/cloudapi/compute/get_audits.go b/pkg/cloudapi/compute/get_audits.go index 849472d..ce953cd 100644 --- a/pkg/cloudapi/compute/get_audits.go +++ b/pkg/cloudapi/compute/get_audits.go @@ -11,7 +11,7 @@ import ( type GetAuditsRequest struct { // ID of compute instance // Required: true - ComputeID uint64 `url:"computeId"` + ComputeID uint64 `url:"computeId" json:"computeId"` } func (crq GetAuditsRequest) validate() error { diff --git a/pkg/cloudapi/compute/get_console_url.go b/pkg/cloudapi/compute/get_console_url.go index 31c340f..9e27b05 100644 --- a/pkg/cloudapi/compute/get_console_url.go +++ b/pkg/cloudapi/compute/get_console_url.go @@ -11,7 +11,7 @@ import ( type GetConsoleURLRequest struct { // ID of compute instance to get console for // Required: true - ComputeID uint64 `url:"computeId"` + ComputeID uint64 `url:"computeId" json:"computeId"` } func (crq GetConsoleURLRequest) validate() error { diff --git a/pkg/cloudapi/compute/get_log.go b/pkg/cloudapi/compute/get_log.go index 0df1b89..6f04c3e 100644 --- a/pkg/cloudapi/compute/get_log.go +++ b/pkg/cloudapi/compute/get_log.go @@ -10,11 +10,11 @@ import ( type GetLogRequest struct { // ID of compute instance to get log for // Required: true - ComputeID uint64 `url:"computeId"` + ComputeID uint64 `url:"computeId" json:"computeId"` // Path to log file // Required: true - Path string `url:"path"` + Path string `url:"path" json:"path"` } func (crq GetLogRequest) validate() error { diff --git a/pkg/cloudapi/compute/list.go b/pkg/cloudapi/compute/list.go index 1d55179..a5b2918 100644 --- a/pkg/cloudapi/compute/list.go +++ b/pkg/cloudapi/compute/list.go @@ -10,15 +10,15 @@ import ( type ListRequest struct { // Include deleted computes // Required: false - IncludeDeleted bool `url:"includedeleted,omitempty"` + IncludeDeleted bool `url:"includedeleted,omitempty" json:"includedeleted,omitempty"` // Page number // Required: false - Page uint64 `url:"page,omitempty"` + Page uint64 `url:"page,omitempty" json:"page,omitempty"` // Page size // Required: false - Size uint64 `url:"size,omitempty"` + Size uint64 `url:"size,omitempty" json:"size,omitempty"` } // List gets list of the available computes. diff --git a/pkg/cloudapi/compute/list_deleted.go b/pkg/cloudapi/compute/list_deleted.go index d94f706..7a90f37 100644 --- a/pkg/cloudapi/compute/list_deleted.go +++ b/pkg/cloudapi/compute/list_deleted.go @@ -10,11 +10,11 @@ import ( type ListDeletedRequest struct { // Page number // Required: false - Page uint64 `url:"page,omitempty"` + Page uint64 `url:"page,omitempty" json:"page,omitempty"` // Page size // Required: false - Size uint64 `url:"size,omitempty"` + Size uint64 `url:"size,omitempty" json:"size,omitempty"` } // ListDeleted gets list all deleted computes diff --git a/pkg/cloudapi/compute/list_pci_device.go b/pkg/cloudapi/compute/list_pci_device.go index 6398666..3eb47bd 100644 --- a/pkg/cloudapi/compute/list_pci_device.go +++ b/pkg/cloudapi/compute/list_pci_device.go @@ -11,7 +11,7 @@ import ( type ListPCIDeviceRequest struct { // Identifier compute // Required: true - ComputeID uint64 `url:"computeId"` + ComputeID uint64 `url:"computeId" json:"computeId"` } func (crq ListPCIDeviceRequest) validate() error { diff --git a/pkg/cloudapi/compute/list_vgpu.go b/pkg/cloudapi/compute/list_vgpu.go index c1bad07..8c1f65b 100644 --- a/pkg/cloudapi/compute/list_vgpu.go +++ b/pkg/cloudapi/compute/list_vgpu.go @@ -11,7 +11,7 @@ import ( type ListVGPURequest struct { // Identifier compute // Required: true - ComputeID uint64 `url:"computeId"` + ComputeID uint64 `url:"computeId" json:"computeId"` } func (crq ListVGPURequest) validate() error { diff --git a/pkg/cloudapi/compute/move_to_rg.go b/pkg/cloudapi/compute/move_to_rg.go index 7fb1bfc..c273c55 100644 --- a/pkg/cloudapi/compute/move_to_rg.go +++ b/pkg/cloudapi/compute/move_to_rg.go @@ -11,26 +11,26 @@ import ( type MoveToRGRequest struct { // ID of the compute instance to move // Required: true - ComputeID uint64 `url:"computeId"` + ComputeID uint64 `url:"computeId" json:"computeId"` // ID of the target resource group // Required: true - RGID uint64 `url:"rgId"` + RGID uint64 `url:"rgId" json:"rgId"` // New name for the compute upon successful move, // if name change required. // Pass empty string if no name change necessary // Required: false - Name string `url:"name,omitempty"` + Name string `url:"name,omitempty" json:"name,omitempty"` // Should the compute be restarted upon successful move // Required: false - Autostart bool `url:"autostart,omitempty"` + Autostart bool `url:"autostart,omitempty" json:"autostart,omitempty"` // By default moving compute in a running state is not allowed. // Set this flag to True to force stop running compute instance prior to move. // Required: false - ForceStop bool `url:"forceStop,omitempty"` + ForceStop bool `url:"forceStop,omitempty" json:"forceStop,omitempty"` } func (crq MoveToRGRequest) validate() error { diff --git a/pkg/cloudapi/compute/net_attach.go b/pkg/cloudapi/compute/net_attach.go index 69bc7a3..638dbd5 100644 --- a/pkg/cloudapi/compute/net_attach.go +++ b/pkg/cloudapi/compute/net_attach.go @@ -13,23 +13,23 @@ import ( type NetAttachRequest struct { // ID of compute instance // Required: true - ComputeID uint64 `url:"computeId"` + ComputeID uint64 `url:"computeId" json:"computeId"` // Network type // 'EXTNET' for connect to external network directly // and 'VINS' for connect to ViNS // Required: true - NetType string `url:"netType"` + NetType string `url:"netType" json:"netType"` // Network ID for connect to // For EXTNET - external network ID // For VINS - VINS ID // Required: true - NetID uint64 `url:"netId"` + NetID uint64 `url:"netId" json:"netId"` // Directly required IP address for new network interface // Required: true - IPAddr string `url:"ipAddr,omitempty"` + IPAddr string `url:"ipAddr,omitempty" json:"ipAddr,omitempty"` } func (crq NetAttachRequest) validate() error { diff --git a/pkg/cloudapi/compute/net_detach.go b/pkg/cloudapi/compute/net_detach.go index bd8363a..9367b37 100644 --- a/pkg/cloudapi/compute/net_detach.go +++ b/pkg/cloudapi/compute/net_detach.go @@ -11,15 +11,15 @@ import ( type NetDetachRequest struct { // ID of compute instance // Required: true - ComputeID uint64 `url:"computeId"` + ComputeID uint64 `url:"computeId" json:"computeId"` // IP of the network interface // Required: false - IPAddr string `url:"ipAddr,omitempty"` + IPAddr string `url:"ipAddr,omitempty" json:"ipAddr,omitempty"` // MAC of the network interface // Required: false - MAC string `url:"mac,omitempty"` + MAC string `url:"mac,omitempty" json:"mac,omitempty"` } func (crq NetDetachRequest) validate() error { diff --git a/pkg/cloudapi/compute/pause.go b/pkg/cloudapi/compute/pause.go index b9633f8..82e5513 100644 --- a/pkg/cloudapi/compute/pause.go +++ b/pkg/cloudapi/compute/pause.go @@ -11,7 +11,7 @@ import ( type PauseRequest struct { // ID of compute instance // Required: true - ComputeID uint64 `url:"computeId"` + ComputeID uint64 `url:"computeId" json:"computeId"` } func (crq PauseRequest) validate() error { diff --git a/pkg/cloudapi/compute/pfw_add.go b/pkg/cloudapi/compute/pfw_add.go index 25326d0..79de205 100644 --- a/pkg/cloudapi/compute/pfw_add.go +++ b/pkg/cloudapi/compute/pfw_add.go @@ -13,24 +13,24 @@ import ( type PFWAddRequest struct { // ID of compute instance // Required: true - ComputeID uint64 `url:"computeId"` + ComputeID uint64 `url:"computeId" json:"computeId"` // External start port number for the rule // Required: true - PublicPortStart uint64 `url:"publicPortStart"` + PublicPortStart uint64 `url:"publicPortStart" json:"publicPortStart"` // End port number (inclusive) for the ranged rule // Required: false - PublicPortEnd uint64 `url:"publicPortEnd,omitempty"` + PublicPortEnd uint64 `url:"publicPortEnd,omitempty" json:"publicPortEnd,omitempty"` // Internal base port number // Required: true - LocalBasePort uint64 `url:"localBasePort"` + LocalBasePort uint64 `url:"localBasePort" json:"localBasePort"` // Network protocol // either "tcp" or "udp" // Required: true - Proto string `url:"proto"` + Proto string `url:"proto" json:"proto"` } func (crq PFWAddRequest) validate() error { diff --git a/pkg/cloudapi/compute/pfw_del.go b/pkg/cloudapi/compute/pfw_del.go index c4d3dc8..ba28086 100644 --- a/pkg/cloudapi/compute/pfw_del.go +++ b/pkg/cloudapi/compute/pfw_del.go @@ -11,28 +11,28 @@ import ( type PFWDelRequest struct { // ID of compute instance // Required: true - ComputeID uint64 `url:"computeId"` + ComputeID uint64 `url:"computeId" json:"computeId"` // ID of the rule to delete. If specified, all other arguments will be ignored // Required: false - PFWID uint64 `url:"ruleId,omitempty"` + PFWID uint64 `url:"ruleId,omitempty" json:"ruleId,omitempty"` // External start port number for the rule // Required: false - PublicPortStart uint64 `url:"publicPortStart,omitempty"` + PublicPortStart uint64 `url:"publicPortStart,omitempty" json:"publicPortStart,omitempty"` // End port number (inclusive) for the ranged rule // Required: false - PublicPortEnd uint64 `url:"publicPortEnd,omitempty"` + PublicPortEnd uint64 `url:"publicPortEnd,omitempty" json:"publicPortEnd,omitempty"` // Internal base port number // Required: false - LocalBasePort uint64 `url:"localBasePort,omitempty"` + LocalBasePort uint64 `url:"localBasePort,omitempty" json:"localBasePort,omitempty"` // Network protocol // either "tcp" or "udp" // Required: false - Proto string `url:"proto,omitempty"` + Proto string `url:"proto,omitempty" json:"proto,omitempty"` } func (crq PFWDelRequest) validate() error { diff --git a/pkg/cloudapi/compute/pfw_list.go b/pkg/cloudapi/compute/pfw_list.go index 545d639..805730f 100644 --- a/pkg/cloudapi/compute/pfw_list.go +++ b/pkg/cloudapi/compute/pfw_list.go @@ -11,7 +11,7 @@ import ( type PFWListRequest struct { // ID of compute instance // Required: true - ComputeID uint64 `url:"computeId"` + ComputeID uint64 `url:"computeId" json:"computeId"` } func (crq PFWListRequest) validate() error { diff --git a/pkg/cloudapi/compute/pin_to_stack.go b/pkg/cloudapi/compute/pin_to_stack.go index de19a03..b776b6c 100644 --- a/pkg/cloudapi/compute/pin_to_stack.go +++ b/pkg/cloudapi/compute/pin_to_stack.go @@ -11,7 +11,7 @@ import ( type PinToStackRequest struct { // ID of the compute instance // Required: true - ComputeID uint64 `url:"computeId"` + ComputeID uint64 `url:"computeId" json:"computeId"` } func (crq PinToStackRequest) validate() error { diff --git a/pkg/cloudapi/compute/power_cycle.go b/pkg/cloudapi/compute/power_cycle.go index 341ed87..110a791 100644 --- a/pkg/cloudapi/compute/power_cycle.go +++ b/pkg/cloudapi/compute/power_cycle.go @@ -11,7 +11,7 @@ import ( type PowerCycleRequest struct { // ID of compute instance // Required: true - ComputeID uint64 `url:"computeId"` + ComputeID uint64 `url:"computeId" json:"computeId"` } func (crq PowerCycleRequest) validate() error { diff --git a/pkg/cloudapi/compute/reboot.go b/pkg/cloudapi/compute/reboot.go index d81fea9..e32d301 100644 --- a/pkg/cloudapi/compute/reboot.go +++ b/pkg/cloudapi/compute/reboot.go @@ -11,7 +11,7 @@ import ( type RebootRequest struct { // ID of compute instance // Required: true - ComputeID uint64 `url:"computeId"` + ComputeID uint64 `url:"computeId" json:"computeId"` } func (crq RebootRequest) validate() error { diff --git a/pkg/cloudapi/compute/redeploy.go b/pkg/cloudapi/compute/redeploy.go index ab071b5..3da1b3d 100644 --- a/pkg/cloudapi/compute/redeploy.go +++ b/pkg/cloudapi/compute/redeploy.go @@ -11,28 +11,28 @@ import ( type RedeployRequest struct { // ID of compute instance // Required: true - ComputeID uint64 `url:"computeId"` + ComputeID uint64 `url:"computeId" json:"computeId"` // ID of the new OS image, if image change is required // Required: false - ImageID uint64 `url:"imageId,omitempty"` + ImageID uint64 `url:"imageId,omitempty" json:"imageId,omitempty"` // new size for the boot disk in GB, if boot disk size change is required // Required: false - DiskSize uint64 `url:"diskSize,omitempty"` + DiskSize uint64 `url:"diskSize,omitempty" json:"diskSize,omitempty"` // How to handle data disks connected to this compute instance, // KEEP, DETACH, DESTROY // Required: false - DataDisks string `url:"dataDisks,omitempty"` + DataDisks string `url:"dataDisks,omitempty" json:"dataDisks,omitempty"` // Should the compute be restarted upon successful redeploy // Required: false - AutoStart bool `url:"autoStart,omitempty"` + AutoStart bool `url:"autoStart,omitempty" json:"autoStart,omitempty"` // Set this flag to True to force stop running compute instance and redeploy next // Required: false - ForceStop bool `url:"forceStop,omitempty"` + ForceStop bool `url:"forceStop,omitempty" json:"forceStop,omitempty"` } func (crq RedeployRequest) validate() error { diff --git a/pkg/cloudapi/compute/reset.go b/pkg/cloudapi/compute/reset.go index 05f797f..90cf023 100644 --- a/pkg/cloudapi/compute/reset.go +++ b/pkg/cloudapi/compute/reset.go @@ -11,7 +11,7 @@ import ( type ResetRequest struct { // ID of compute instance // Required: true - ComputeID uint64 `url:"computeId"` + ComputeID uint64 `url:"computeId" json:"computeId"` } func (crq ResetRequest) validate() error { diff --git a/pkg/cloudapi/compute/resize.go b/pkg/cloudapi/compute/resize.go index a514852..7b82d12 100644 --- a/pkg/cloudapi/compute/resize.go +++ b/pkg/cloudapi/compute/resize.go @@ -11,21 +11,21 @@ import ( type ResizeRequest struct { // ID of compute instance // Required: true - ComputeID uint64 `url:"computeId"` + ComputeID uint64 `url:"computeId" json:"computeId"` // New CPU count. // Pass 0 if no change to CPU count is required // Required: false - Force bool `url:"force,omitempty"` + Force bool `url:"force,omitempty" json:"force,omitempty"` // New RAM volume in MB. // Pass 0 if no change to RAM volume is required // Required: false - CPU uint64 `url:"cpu,omitempty"` + CPU uint64 `url:"cpu,omitempty" json:"cpu,omitempty"` // Force compute resize // Required: false - RAM uint64 `url:"ram,omitempty"` + RAM uint64 `url:"ram,omitempty" json:"ram,omitempty"` } func (crq ResizeRequest) validate() error { diff --git a/pkg/cloudapi/compute/restore.go b/pkg/cloudapi/compute/restore.go index 2f7c534..47dd2e0 100644 --- a/pkg/cloudapi/compute/restore.go +++ b/pkg/cloudapi/compute/restore.go @@ -10,7 +10,7 @@ import ( type RestoreRequest struct { // ID of compute instance // Required: true - ComputeID uint64 `url:"computeId"` + ComputeID uint64 `url:"computeId" json:"computeId"` } func (crq RestoreRequest) validate() error { diff --git a/pkg/cloudapi/compute/resume.go b/pkg/cloudapi/compute/resume.go index 6bf5dcc..2a34a36 100644 --- a/pkg/cloudapi/compute/resume.go +++ b/pkg/cloudapi/compute/resume.go @@ -11,7 +11,7 @@ import ( type ResumeRequest struct { // ID of compute instance // Required: true - ComputeID uint64 `url:"computeId"` + ComputeID uint64 `url:"computeId" json:"computeId"` } func (crq ResumeRequest) validate() error { diff --git a/pkg/cloudapi/compute/snapshot_create.go b/pkg/cloudapi/compute/snapshot_create.go index 7cddb37..693b9fb 100644 --- a/pkg/cloudapi/compute/snapshot_create.go +++ b/pkg/cloudapi/compute/snapshot_create.go @@ -11,12 +11,12 @@ import ( type SnapshotCreateRequest struct { // ID of the compute instance to create snapshot for // Required: true - ComputeID uint64 `url:"computeId"` + ComputeID uint64 `url:"computeId" json:"computeId"` // Text label for snapshot. // Must be unique among this compute snapshots // Required: true - Label string `url:"label"` + Label string `url:"label" json:"label"` } func (crq SnapshotCreateRequest) validate() error { diff --git a/pkg/cloudapi/compute/snapshot_delete.go b/pkg/cloudapi/compute/snapshot_delete.go index 6d744c4..733b273 100644 --- a/pkg/cloudapi/compute/snapshot_delete.go +++ b/pkg/cloudapi/compute/snapshot_delete.go @@ -11,11 +11,11 @@ import ( type SnapshotDeleteRequest struct { // ID of the compute instance // Required: true - ComputeID uint64 `url:"computeId"` + ComputeID uint64 `url:"computeId" json:"computeId"` // Text label of snapshot to delete // Required: true - Label string `url:"label"` + Label string `url:"label" json:"label"` } func (crq SnapshotDeleteRequest) validate() error { diff --git a/pkg/cloudapi/compute/snapshot_list.go b/pkg/cloudapi/compute/snapshot_list.go index 9dd7dcc..b759e3f 100644 --- a/pkg/cloudapi/compute/snapshot_list.go +++ b/pkg/cloudapi/compute/snapshot_list.go @@ -11,7 +11,7 @@ import ( type SnapshotListRequest struct { // ID of the compute instance // Required: true - ComputeID uint64 `url:"computeId"` + ComputeID uint64 `url:"computeId" json:"computeId"` } func (crq SnapshotListRequest) validate() error { diff --git a/pkg/cloudapi/compute/snapshot_rollback.go b/pkg/cloudapi/compute/snapshot_rollback.go index e25d0a9..e51700d 100644 --- a/pkg/cloudapi/compute/snapshot_rollback.go +++ b/pkg/cloudapi/compute/snapshot_rollback.go @@ -11,11 +11,11 @@ import ( type SnapshotRollbackRequest struct { // ID of the compute instance // Required: true - ComputeID uint64 `url:"computeId"` + ComputeID uint64 `url:"computeId" json:"computeId"` // Text label of snapshot to rollback // Required: true - Label string `url:"label"` + Label string `url:"label" json:"label"` } func (crq SnapshotRollbackRequest) validate() error { diff --git a/pkg/cloudapi/compute/snapshot_usage.go b/pkg/cloudapi/compute/snapshot_usage.go index 91248bd..c31f999 100644 --- a/pkg/cloudapi/compute/snapshot_usage.go +++ b/pkg/cloudapi/compute/snapshot_usage.go @@ -11,12 +11,12 @@ import ( type SnapshotUsageRequest struct { // ID of the compute instance // Required: true - ComputeID uint64 `url:"computeId"` + ComputeID uint64 `url:"computeId" json:"computeId"` // Specify to show usage exact for this snapshot. // Leave empty for get usage for all compute snapshots // Required: false - Label string `url:"label,omitempty"` + Label string `url:"label,omitempty" json:"label,omitempty"` } func (crq SnapshotUsageRequest) validate() error { diff --git a/pkg/cloudapi/compute/start.go b/pkg/cloudapi/compute/start.go index a307064..9f87d4e 100644 --- a/pkg/cloudapi/compute/start.go +++ b/pkg/cloudapi/compute/start.go @@ -11,11 +11,11 @@ import ( type StartRequest struct { // ID of compute instance // Required: true - ComputeID uint64 `url:"computeId"` + ComputeID uint64 `url:"computeId" json:"computeId"` // ID of CD-ROM live image to boot // Required: false - AltBootID uint64 `url:"altBootId,omitempty"` + AltBootID uint64 `url:"altBootId,omitempty" json:"altBootId,omitempty"` } func (crq StartRequest) validate() error { diff --git a/pkg/cloudapi/compute/stop.go b/pkg/cloudapi/compute/stop.go index 5147f1a..f9b5f0f 100644 --- a/pkg/cloudapi/compute/stop.go +++ b/pkg/cloudapi/compute/stop.go @@ -11,11 +11,11 @@ import ( type StopRequest struct { // ID of compute instance // Required: true - ComputeID uint64 `url:"computeId"` + ComputeID uint64 `url:"computeId" json:"computeId"` // Force stop compute // Required: false - Force bool `url:"force,omitempty"` + Force bool `url:"force,omitempty" json:"force,omitempty"` } func (crq StopRequest) validate() error { diff --git a/pkg/cloudapi/compute/tag_add.go b/pkg/cloudapi/compute/tag_add.go index 245d4ce..03677c6 100644 --- a/pkg/cloudapi/compute/tag_add.go +++ b/pkg/cloudapi/compute/tag_add.go @@ -11,15 +11,15 @@ import ( type TagAddRequest struct { // ID of the compute instance // Required: true - ComputeID uint64 `url:"computeId"` + ComputeID uint64 `url:"computeId" json:"computeId"` // Tag key // Required: true - Key string `url:"key"` + Key string `url:"key" json:"key"` // Tag value // Required: true - Value string `url:"value"` + Value string `url:"value" json:"value"` } func (crq TagAddRequest) validate() error { diff --git a/pkg/cloudapi/compute/tag_remove.go b/pkg/cloudapi/compute/tag_remove.go index f3f09ef..1643809 100644 --- a/pkg/cloudapi/compute/tag_remove.go +++ b/pkg/cloudapi/compute/tag_remove.go @@ -11,11 +11,11 @@ import ( type TagRemoveRequest struct { // ID of the compute instance // Required: true - ComputeID uint64 `url:"computeId"` + ComputeID uint64 `url:"computeId" json:"computeId"` // Tag key // Required: true - Key string `url:"key"` + Key string `url:"key" json:"key"` } func (crq TagRemoveRequest) validate() error { diff --git a/pkg/cloudapi/compute/unpin_from_stack.go b/pkg/cloudapi/compute/unpin_from_stack.go index bcae4fc..c60b1ba 100644 --- a/pkg/cloudapi/compute/unpin_from_stack.go +++ b/pkg/cloudapi/compute/unpin_from_stack.go @@ -11,7 +11,7 @@ import ( type UnpinFromStackRequest struct { // ID of the compute instance // Required: true - ComputeID uint64 `url:"computeId"` + ComputeID uint64 `url:"computeId" json:"computeId"` } func (crq UnpinFromStackRequest) validate() error { diff --git a/pkg/cloudapi/compute/update.go b/pkg/cloudapi/compute/update.go index 2051fa7..1ea6b33 100644 --- a/pkg/cloudapi/compute/update.go +++ b/pkg/cloudapi/compute/update.go @@ -11,15 +11,15 @@ import ( type UpdateRequest struct { // ID of the compute // Required: true - ComputeID uint64 `url:"computeId"` + ComputeID uint64 `url:"computeId" json:"computeId"` // New name // Required: false - Name string `url:"name,omitempty"` + Name string `url:"name,omitempty" json:"name,omitempty"` // New description // Required: false - Description string `url:"desc,omitempty"` + Description string `url:"desc,omitempty" json:"desc,omitempty"` } func (crq UpdateRequest) validate() error { diff --git a/pkg/cloudapi/compute/user_grant.go b/pkg/cloudapi/compute/user_grant.go index 735788a..7cf43e3 100644 --- a/pkg/cloudapi/compute/user_grant.go +++ b/pkg/cloudapi/compute/user_grant.go @@ -13,11 +13,11 @@ import ( type UserGrantRequest struct { // ID of the compute instance // Required: true - ComputeID uint64 `url:"computeId"` + ComputeID uint64 `url:"computeId" json:"computeId"` // Name of the user to add // Required: true - Username string `url:"userName"` + Username string `url:"userName" json:"userName"` // Access type // Should be one of: @@ -25,7 +25,7 @@ type UserGrantRequest struct { // - 'RCX' for Write // - 'ARCXDU' for Admin // Required: true - AccessType string `url:"accesstype"` + AccessType string `url:"accesstype" json:"accesstype"` } func (crq UserGrantRequest) validate() error { diff --git a/pkg/cloudapi/compute/user_list.go b/pkg/cloudapi/compute/user_list.go index f417ce6..a97cedc 100644 --- a/pkg/cloudapi/compute/user_list.go +++ b/pkg/cloudapi/compute/user_list.go @@ -11,7 +11,7 @@ import ( type UserListRequest struct { // ID of the compute instance // Required: true - ComputeID uint64 `url:"computeId"` + ComputeID uint64 `url:"computeId" json:"computeId"` } func (crq UserListRequest) validate() error { diff --git a/pkg/cloudapi/compute/user_revoke.go b/pkg/cloudapi/compute/user_revoke.go index 1425635..39d46cd 100644 --- a/pkg/cloudapi/compute/user_revoke.go +++ b/pkg/cloudapi/compute/user_revoke.go @@ -11,11 +11,11 @@ import ( type UserRevokeRequest struct { // ID of the compute instance // Required: true - ComputeID uint64 `url:"computeId"` + ComputeID uint64 `url:"computeId" json:"computeId"` // Name of the user to remove // Required: true - Username string `url:"userName"` + Username string `url:"userName" json:"userName"` } func (crq UserRevokeRequest) validate() error { diff --git a/pkg/cloudapi/compute/user_update.go b/pkg/cloudapi/compute/user_update.go index a210aa3..9046223 100644 --- a/pkg/cloudapi/compute/user_update.go +++ b/pkg/cloudapi/compute/user_update.go @@ -13,11 +13,11 @@ import ( type UserUpdateRequest struct { // ID of the compute instance // Required: true - ComputeID uint64 `url:"computeId"` + ComputeID uint64 `url:"computeId" json:"computeId"` // Name of the user to update // Required: true - Username string `url:"userName"` + Username string `url:"userName" json:"userName"` // Access type // Should be one of: @@ -25,7 +25,7 @@ type UserUpdateRequest struct { // - 'RCX' for Write // - 'ARCXDU' for Admin // Required: true - AccessType string `url:"accesstype"` + AccessType string `url:"accesstype" json:"accesstype"` } func (crq UserUpdateRequest) validate() error { diff --git a/pkg/cloudapi/computeci/get.go b/pkg/cloudapi/computeci/get.go index 7ec69ad..668e480 100644 --- a/pkg/cloudapi/computeci/get.go +++ b/pkg/cloudapi/computeci/get.go @@ -11,7 +11,7 @@ import ( type GetRequest struct { // ID of the Compute CI // Required: true - ComputeCIID uint64 `url:"computeciId"` + ComputeCIID uint64 `url:"computeciId" json:"computeciId"` } func (krq GetRequest) validate() error { diff --git a/pkg/cloudapi/computeci/list.go b/pkg/cloudapi/computeci/list.go index 1b85f30..e248803 100644 --- a/pkg/cloudapi/computeci/list.go +++ b/pkg/cloudapi/computeci/list.go @@ -10,15 +10,15 @@ import ( type ListRequest struct { // If true list deleted instances as well // Required: false - IncludeDeleted bool `url:"includeDeleted,omitempty"` + IncludeDeleted bool `url:"includeDeleted,omitempty" json:"includeDeleted,omitempty"` // Page number // Required: false - Page uint64 `url:"page,omitempty"` + Page uint64 `url:"page,omitempty" json:"page,omitempty"` // Page size // Required: false - Size uint64 `url:"size,omitempty"` + Size uint64 `url:"size,omitempty" json:"size,omitempty"` } // List gets list of computeci instances diff --git a/pkg/cloudapi/disks/create.go b/pkg/cloudapi/disks/create.go index fd69850..827d317 100644 --- a/pkg/cloudapi/disks/create.go +++ b/pkg/cloudapi/disks/create.go @@ -13,46 +13,46 @@ import ( type CreateRequest struct { // ID of the account // Required: true - AccountID uint64 `url:"accountId"` + AccountID uint64 `url:"accountId" json:"accountId"` // ID of the grid (platform) // Required: true - GID uint64 `url:"gid"` + GID uint64 `url:"gid" json:"gid"` // Name of disk // Required: true - Name string `url:"name"` + Name string `url:"name" json:"name"` // Description of disk // Required: false - Description string `url:"description,omitempty"` + Description string `url:"description,omitempty" json:"description,omitempty"` // Size in GB, default is 0 // Required: false - Size uint64 `url:"size,omitempty"` + Size uint64 `url:"size,omitempty" json:"size,omitempty"` // Type of disk // - B=Boot // - D=Data // - T=Temp // Required: true - Type string `url:"type"` + Type string `url:"type" json:"type"` // Size in GB default is 0 // Required: false - SSDSize uint64 `url:"ssdSize,omitempty"` + SSDSize uint64 `url:"ssdSize,omitempty" json:"ssdSize,omitempty"` // Max IOPS disk can perform defaults to 2000 // Required: false - IOPS uint64 `url:"iops,omitempty"` + IOPS uint64 `url:"iops,omitempty" json:"iops,omitempty"` // Storage endpoint provider ID to create disk // Required: false - SEPID uint64 `url:"sep_id,omitempty"` + SEPID uint64 `url:"sep_id,omitempty" json:"sep_id,omitempty"` // Pool name to create disk // Required: false - Pool string `url:"pool,omitempty"` + Pool string `url:"pool,omitempty" json:"pool,omitempty"` } func (drq CreateRequest) validate() error { diff --git a/pkg/cloudapi/disks/delete.go b/pkg/cloudapi/disks/delete.go index 7ec618b..446c1f5 100644 --- a/pkg/cloudapi/disks/delete.go +++ b/pkg/cloudapi/disks/delete.go @@ -11,19 +11,19 @@ import ( type DeleteRequest struct { // ID of disk to delete // Required: true - DiskID uint64 `url:"diskId"` + DiskID uint64 `url:"diskId" json:"diskId"` // Detach disk from machine first // Required: false - Detach bool `url:"detach,omitempty"` + Detach bool `url:"detach,omitempty" json:"detach,omitempty"` // Whether to completely delete the disk, works only with non attached disks // Required: false - Permanently bool `url:"permanently,omitempty"` + Permanently bool `url:"permanently,omitempty" json:"permanently,omitempty"` // Reason to delete // Required: false - Reason string `url:"reason,omitempty"` + Reason string `url:"reason,omitempty" json:"reason,omitempty"` } func (d DeleteRequest) validate() error { diff --git a/pkg/cloudapi/disks/delete_disks.go b/pkg/cloudapi/disks/delete_disks.go index c5b646a..72e2c3f 100644 --- a/pkg/cloudapi/disks/delete_disks.go +++ b/pkg/cloudapi/disks/delete_disks.go @@ -11,15 +11,15 @@ import ( type DisksDeleteRequest struct { // List of disk ids to delete // Required: true - DisksIDs []uint64 `url:"diskIds"` + DisksIDs []uint64 `url:"diskIds" json:"diskIds"` // Reason for deleting the disks // Required: true - Reason string `url:"reason"` + Reason string `url:"reason" json:"reason"` // Whether to completely delete the disks, works only with non attached disks // Required: false - Permanently bool `url:"permanently,omitempty"` + Permanently bool `url:"permanently,omitempty" json:"permanently,omitempty"` } func (drq DisksDeleteRequest) validate() error { diff --git a/pkg/cloudapi/disks/get.go b/pkg/cloudapi/disks/get.go index a36dccc..b4a1ae5 100644 --- a/pkg/cloudapi/disks/get.go +++ b/pkg/cloudapi/disks/get.go @@ -11,7 +11,7 @@ import ( type GetRequest struct { // ID of the disk // Required: true - DiskID uint64 `url:"diskId"` + DiskID uint64 `url:"diskId" json:"diskId"` } func (drq GetRequest) validate() error { diff --git a/pkg/cloudapi/disks/limitio.go b/pkg/cloudapi/disks/limitio.go index 9e48c83..eaeb4f3 100644 --- a/pkg/cloudapi/disks/limitio.go +++ b/pkg/cloudapi/disks/limitio.go @@ -11,63 +11,63 @@ import ( type LimitIORequest struct { // ID of the disk to limit // Required: true - DiskID uint64 `url:"diskId"` + DiskID uint64 `url:"diskId" json:"diskId"` // Alias for total_iops_sec for backwards compatibility // Required: false - IOPS uint64 `url:"iops,omitempty"` + IOPS uint64 `url:"iops,omitempty" json:"iops,omitempty"` // TotalBytesSec // Required: false - TotalBytesSec uint64 `url:"total_bytes_sec,omitempty"` + TotalBytesSec uint64 `url:"total_bytes_sec,omitempty" json:"total_bytes_sec,omitempty"` // ReadBytesSec // Required: false - ReadBytesSec uint64 `url:"read_bytes_sec,omitempty"` + ReadBytesSec uint64 `url:"read_bytes_sec,omitempty" json:"read_bytes_sec,omitempty"` // WriteBytesSec // Required: false - WriteBytesSec uint64 `url:"write_bytes_sec,omitempty"` + WriteBytesSec uint64 `url:"write_bytes_sec,omitempty" json:"write_bytes_sec,omitempty"` // TotalIOPSSec // Required: false - TotalIOPSSec uint64 `url:"total_iops_sec,omitempty"` + TotalIOPSSec uint64 `url:"total_iops_sec,omitempty" json:"total_iops_sec,omitempty"` // ReadIOPSSec // Required: false - ReadIOPSSec uint64 `url:"read_iops_sec,omitempty"` + ReadIOPSSec uint64 `url:"read_iops_sec,omitempty" json:"read_iops_sec,omitempty"` // WriteIOPSSec // Required: false - WriteIOPSSec uint64 `url:"write_iops_sec,omitempty"` + WriteIOPSSec uint64 `url:"write_iops_sec,omitempty" json:"write_iops_sec,omitempty"` // TotalBytesSecMax // Required: false - TotalBytesSecMax uint64 `url:"total_bytes_sec_max,omitempty"` + TotalBytesSecMax uint64 `url:"total_bytes_sec_max,omitempty" json:"total_bytes_sec_max,omitempty"` // ReadBytesSecMax // Required: false - ReadBytesSecMax uint64 `url:"read_bytes_sec_max,omitempty"` + ReadBytesSecMax uint64 `url:"read_bytes_sec_max,omitempty" json:"read_bytes_sec_max,omitempty"` // WriteBytesSecMax // Required: false - WriteBytesSecMax uint64 `url:"write_bytes_sec_max,omitempty"` + WriteBytesSecMax uint64 `url:"write_bytes_sec_max,omitempty" json:"write_bytes_sec_max,omitempty"` // TotalIOPSSecMax // Required: false - TotalIOPSSecMax uint64 `url:"total_iops_sec_max,omitempty"` + TotalIOPSSecMax uint64 `url:"total_iops_sec_max,omitempty" json:"total_iops_sec_max,omitempty"` // ReadIOPSSecMax // Required: false - ReadIOPSSecMax uint64 `url:"read_iops_sec_max,omitempty"` + ReadIOPSSecMax uint64 `url:"read_iops_sec_max,omitempty" json:"read_iops_sec_max,omitempty"` // WriteIOPSSecMax // Required: false - WriteIOPSSecMax uint64 `url:"write_iops_sec_max,omitempty"` + WriteIOPSSecMax uint64 `url:"write_iops_sec_max,omitempty" json:"write_iops_sec_max,omitempty"` // SizeIOPSSec // Required: false - SizeIOPSSec uint64 `url:"size_iops_sec,omitempty"` + SizeIOPSSec uint64 `url:"size_iops_sec,omitempty" json:"size_iops_sec,omitempty"` } func (drq LimitIORequest) validate() error { diff --git a/pkg/cloudapi/disks/list.go b/pkg/cloudapi/disks/list.go index 5c21c8e..d2b274b 100644 --- a/pkg/cloudapi/disks/list.go +++ b/pkg/cloudapi/disks/list.go @@ -10,19 +10,19 @@ import ( type ListRequest struct { // ID of the account the disks belong to // Required: false - AccountID uint64 `url:"accountId,omitempty"` + AccountID uint64 `url:"accountId,omitempty" json:"accountId,omitempty"` // Type of the disks // Required: false - Type string `url:"type,omitempty"` + Type string `url:"type,omitempty" json:"type,omitempty"` // Page number // Required: false - Page uint64 `url:"page,omitempty"` + Page uint64 `url:"page,omitempty" json:"page,omitempty"` // Page size // Required: false - Size uint64 `url:"size,omitempty"` + Size uint64 `url:"size,omitempty" json:"size,omitempty"` } // List gets list the created disks belonging to an account diff --git a/pkg/cloudapi/disks/list_types.go b/pkg/cloudapi/disks/list_types.go index b49c13a..7c03a50 100644 --- a/pkg/cloudapi/disks/list_types.go +++ b/pkg/cloudapi/disks/list_types.go @@ -10,7 +10,7 @@ import ( type ListTypesRequest struct { // Show detailed disk types by seps // Required: false - Detailed bool `url:"detailed"` + Detailed bool `url:"detailed" json:"detailed"` } // ListTypes gets list defined disk types diff --git a/pkg/cloudapi/disks/list_unattached.go b/pkg/cloudapi/disks/list_unattached.go index e37e393..accb6be 100644 --- a/pkg/cloudapi/disks/list_unattached.go +++ b/pkg/cloudapi/disks/list_unattached.go @@ -10,7 +10,7 @@ import ( type ListUnattachedRequest struct { // ID of the account // Required: false - AccountID uint64 `url:"accountId,omitempty"` + AccountID uint64 `url:"accountId,omitempty" json:"accountId,omitempty"` } // ListUnattached gets list of unattached disks diff --git a/pkg/cloudapi/disks/rename.go b/pkg/cloudapi/disks/rename.go index 298dded..9dd0881 100644 --- a/pkg/cloudapi/disks/rename.go +++ b/pkg/cloudapi/disks/rename.go @@ -11,11 +11,11 @@ import ( type RenameRequest struct { // ID of the disk to rename // Required: true - DiskID uint64 `url:"diskId"` + DiskID uint64 `url:"diskId" json:"diskId"` // New name of disk // Required: true - Name string `url:"name"` + Name string `url:"name" json:"name"` } func (drq RenameRequest) validate() error { diff --git a/pkg/cloudapi/disks/resize.go b/pkg/cloudapi/disks/resize.go index 87560b8..c800c1b 100644 --- a/pkg/cloudapi/disks/resize.go +++ b/pkg/cloudapi/disks/resize.go @@ -11,11 +11,11 @@ import ( type ResizeRequest struct { // ID of the disk to resize // Required: true - DiskID uint64 `url:"diskId"` + DiskID uint64 `url:"diskId" json:"diskId"` // New size of the disk in GB // Required: true - Size uint64 `url:"size"` + Size uint64 `url:"size" json:"size"` } func (drq ResizeRequest) validate() error { diff --git a/pkg/cloudapi/disks/restore.go b/pkg/cloudapi/disks/restore.go index df4380b..3f0cb3e 100644 --- a/pkg/cloudapi/disks/restore.go +++ b/pkg/cloudapi/disks/restore.go @@ -11,11 +11,11 @@ import ( type RestoreRequest struct { // ID of the disk to restore // Required: true - DiskID uint64 `url:"diskId"` + DiskID uint64 `url:"diskId" json:"diskId"` // Reason for restoring the disk // Required: true - Reason string `url:"reason"` + Reason string `url:"reason" json:"reason"` } func (drq RestoreRequest) validate() error { diff --git a/pkg/cloudapi/disks/search.go b/pkg/cloudapi/disks/search.go index d33bb28..d5b61de 100644 --- a/pkg/cloudapi/disks/search.go +++ b/pkg/cloudapi/disks/search.go @@ -10,14 +10,14 @@ import ( type SearchRequest struct { // ID of the account to search for the Disk // Required: false - AccountID uint64 `url:"accountId,omitempty"` + AccountID uint64 `url:"accountId,omitempty" json:"accountId,omitempty"` // Name of the Disk to search for // Required: false - Name string `url:"name,omitempty"` + Name string `url:"name,omitempty" json:"name,omitempty"` // If false, then disks having one of the statuses are not listed // Required: false - ShowAll bool `url:"show_all,omitempty"` + ShowAll bool `url:"show_all,omitempty" json:"show_all,omitempty"` } // Search search disks diff --git a/pkg/cloudapi/disks/share.go b/pkg/cloudapi/disks/share.go index 35fa0ee..9f8e7e5 100644 --- a/pkg/cloudapi/disks/share.go +++ b/pkg/cloudapi/disks/share.go @@ -11,7 +11,7 @@ import ( type ShareRequest struct { // ID of the disk to share // Required: true - DiskID uint64 `url:"diskId"` + DiskID uint64 `url:"diskId" json:"diskId"` } func (drq ShareRequest) validate() error { diff --git a/pkg/cloudapi/disks/snapshot_delete.go b/pkg/cloudapi/disks/snapshot_delete.go index 3848c2e..7b49e48 100644 --- a/pkg/cloudapi/disks/snapshot_delete.go +++ b/pkg/cloudapi/disks/snapshot_delete.go @@ -11,11 +11,11 @@ import ( type SnapshotDeleteRequest struct { // ID of disk to delete // Required: true - DiskID uint64 `url:"diskId"` + DiskID uint64 `url:"diskId" json:"diskId"` // Label of the snapshot to delete // Required: false - Label string `url:"label"` + Label string `url:"label" json:"label"` } func (drq SnapshotDeleteRequest) validate() error { diff --git a/pkg/cloudapi/disks/snapshot_rollback.go b/pkg/cloudapi/disks/snapshot_rollback.go index 5c415fb..98765f9 100644 --- a/pkg/cloudapi/disks/snapshot_rollback.go +++ b/pkg/cloudapi/disks/snapshot_rollback.go @@ -11,15 +11,15 @@ import ( type SnapshotRollbackRequest struct { // ID of the disk // Required: true - DiskID uint64 `url:"diskId"` + DiskID uint64 `url:"diskId" json:"diskId"` // Label of the snapshot to rollback // Required: true - Label string `url:"label"` + Label string `url:"label" json:"label"` // Timestamp of the snapshot to rollback // Required: true - TimeStamp uint64 `url:"timestamp"` + TimeStamp uint64 `url:"timestamp" json:"timestamp"` } func (drq SnapshotRollbackRequest) validate() error { diff --git a/pkg/cloudapi/disks/unshare.go b/pkg/cloudapi/disks/unshare.go index 5eb4a36..c306a2b 100644 --- a/pkg/cloudapi/disks/unshare.go +++ b/pkg/cloudapi/disks/unshare.go @@ -11,7 +11,7 @@ import ( type UnshareRequest struct { // ID of the disk to unshare // Required: true - DiskID uint64 `url:"diskId"` + DiskID uint64 `url:"diskId" json:"diskId"` } func (drq UnshareRequest) validate() error { diff --git a/pkg/cloudapi/extnet/get.go b/pkg/cloudapi/extnet/get.go index bcc7b5a..d49cd02 100644 --- a/pkg/cloudapi/extnet/get.go +++ b/pkg/cloudapi/extnet/get.go @@ -11,7 +11,7 @@ import ( type GetRequest struct { // ID of external network // Required: true - NetID uint64 `url:"net_id"` + NetID uint64 `url:"net_id" json:"net_id"` } func (erq GetRequest) validate() error { diff --git a/pkg/cloudapi/extnet/list.go b/pkg/cloudapi/extnet/list.go index ff6f542..92ab4d2 100644 --- a/pkg/cloudapi/extnet/list.go +++ b/pkg/cloudapi/extnet/list.go @@ -10,15 +10,15 @@ import ( type ListRequest struct { // Filter by account ID // Required: false - AccountID uint64 `url:"accountId,omitempty"` + AccountID uint64 `url:"accountId,omitempty" json:"accountId,omitempty"` // Page number // Required: false - Page uint64 `url:"page,omitempty"` + Page uint64 `url:"page,omitempty" json:"page,omitempty"` // Page size // Required: false - Size uint64 `url:"size,omitempty"` + Size uint64 `url:"size,omitempty" json:"size,omitempty"` } // List gets list all available external networks diff --git a/pkg/cloudapi/extnet/list_computes.go b/pkg/cloudapi/extnet/list_computes.go index 2660a5f..4ce2e6f 100644 --- a/pkg/cloudapi/extnet/list_computes.go +++ b/pkg/cloudapi/extnet/list_computes.go @@ -11,7 +11,7 @@ import ( type ListComputesRequest struct { // Filter by account ID // Required: true - AccountID uint64 `url:"accountId"` + AccountID uint64 `url:"accountId" json:"accountId"` } func (erq ListComputesRequest) validate() error { diff --git a/pkg/cloudapi/flipgroup/compute_add.go b/pkg/cloudapi/flipgroup/compute_add.go index 0ea12e6..000f207 100644 --- a/pkg/cloudapi/flipgroup/compute_add.go +++ b/pkg/cloudapi/flipgroup/compute_add.go @@ -11,11 +11,11 @@ import ( type ComputeAddRequest struct { // ID of the Floating IP group to add compute instance to // Required: true - FLIPGroupID uint64 `url:"flipgroupId"` + FLIPGroupID uint64 `url:"flipgroupId" json:"flipgroupId"` // ID of the compute instance to add to this group // Required: true - ComputeID uint64 `url:"computeId"` + ComputeID uint64 `url:"computeId" json:"computeId"` } func (frq ComputeAddRequest) validate() error { diff --git a/pkg/cloudapi/flipgroup/compute_remove.go b/pkg/cloudapi/flipgroup/compute_remove.go index 12637b0..233ddd2 100644 --- a/pkg/cloudapi/flipgroup/compute_remove.go +++ b/pkg/cloudapi/flipgroup/compute_remove.go @@ -11,11 +11,11 @@ import ( type ComputeRemoveRequest struct { // ID of the Floating IP group to remove compute instance from // Required: true - FLIPGroupID uint64 `url:"flipgroupId"` + FLIPGroupID uint64 `url:"flipgroupId" json:"flipgroupId"` // ID of the compute instance to remove // Required: true - ComputeID uint64 `url:"computeId"` + ComputeID uint64 `url:"computeId" json:"computeId"` } func (frq ComputeRemoveRequest) validate() error { diff --git a/pkg/cloudapi/flipgroup/create.go b/pkg/cloudapi/flipgroup/create.go index 8efa419..99ceec9 100644 --- a/pkg/cloudapi/flipgroup/create.go +++ b/pkg/cloudapi/flipgroup/create.go @@ -13,36 +13,36 @@ import ( type CreateRequest struct { // Account ID // Required: true - AccountID uint64 `url:"accountId"` + AccountID uint64 `url:"accountId" json:"accountId"` // FLIPGroup name // Required: true - Name string `url:"name"` + Name string `url:"name" json:"name"` // Network type // Should be one of: // - EXTNET // - VINS // Required: true - NetType string `url:"netType"` + NetType string `url:"netType" json:"netType"` // ID of external network or VINS // Required: true - NetID uint64 `url:"netId"` + NetID uint64 `url:"netId" json:"netId"` // Type of client // - 'compute' // - 'vins' (will be later) // Required: true - ClientType string `url:"clientType"` + ClientType string `url:"clientType" json:"clientType"` // IP address to associate with this group. If empty, the platform will autoselect IP address // Required: false - IP string `url:"ip,omitempty"` + IP string `url:"ip,omitempty" json:"ip,omitempty"` // Text description of this FLIPGorup instance // Required: false - Description string `url:"desc,omitempty"` + Description string `url:"desc,omitempty" json:"desc,omitempty"` } func (frq CreateRequest) validate() error { diff --git a/pkg/cloudapi/flipgroup/delete.go b/pkg/cloudapi/flipgroup/delete.go index a4e5253..d96fe82 100644 --- a/pkg/cloudapi/flipgroup/delete.go +++ b/pkg/cloudapi/flipgroup/delete.go @@ -11,7 +11,7 @@ import ( type DeleteRequest struct { // FLIPGroup ID // Required: true - FLIPGroupID uint64 `url:"flipgroupId"` + FLIPGroupID uint64 `url:"flipgroupId" json:"flipgroupId"` } func (frq DeleteRequest) validate() error { diff --git a/pkg/cloudapi/flipgroup/edit.go b/pkg/cloudapi/flipgroup/edit.go index 19dc426..c4bd911 100644 --- a/pkg/cloudapi/flipgroup/edit.go +++ b/pkg/cloudapi/flipgroup/edit.go @@ -11,15 +11,15 @@ import ( type EditRequest struct { // FLIPGroup ID // Required: true - FLIPGroupID uint64 `url:"flipgroupId"` + FLIPGroupID uint64 `url:"flipgroupId" json:"flipgroupId"` // FLIPGroup name // Required: true - Name string `url:"name,omitempty"` + Name string `url:"name,omitempty" json:"name,omitempty"` // FLIPGroup description // Required: true - Description string `url:"desc,omitempty"` + Description string `url:"desc,omitempty" json:"desc,omitempty"` } func (frq EditRequest) validate() error { diff --git a/pkg/cloudapi/flipgroup/get.go b/pkg/cloudapi/flipgroup/get.go index 332f6b5..9b5b051 100644 --- a/pkg/cloudapi/flipgroup/get.go +++ b/pkg/cloudapi/flipgroup/get.go @@ -11,7 +11,7 @@ import ( type GetRequest struct { // FLIPGroup ID // Required: true - FLIPGroupID uint64 `url:"flipgroupId"` + FLIPGroupID uint64 `url:"flipgroupId" json:"flipgroupId"` } func (frq GetRequest) validate() error { diff --git a/pkg/cloudapi/flipgroup/list.go b/pkg/cloudapi/flipgroup/list.go index cf5fa04..efbb6e4 100644 --- a/pkg/cloudapi/flipgroup/list.go +++ b/pkg/cloudapi/flipgroup/list.go @@ -10,11 +10,11 @@ import ( type ListRequest struct { // Page number // Required: false - Page uint64 `url:"page,omitempty"` + Page uint64 `url:"page,omitempty" json:"page,omitempty"` // Page size // Required: false - Size uint64 `url:"size,omitempty"` + Size uint64 `url:"size,omitempty" json:"size,omitempty"` } // List gets list FLIPGroup managed cluster instances available to the current user diff --git a/pkg/cloudapi/image/create.go b/pkg/cloudapi/image/create.go index bca6c80..073bbbd 100644 --- a/pkg/cloudapi/image/create.go +++ b/pkg/cloudapi/image/create.go @@ -13,19 +13,19 @@ import ( type CreateRequest struct { // Name of the rescue disk // Required: true - Name string `url:"name"` + Name string `url:"name" json:"name"` // URL where to download media from // Required: true - URL string `url:"url"` + URL string `url:"url" json:"url"` // Grid (platform) ID where this template should be create in // Required: true - GID uint64 `url:"gid"` + GID uint64 `url:"gid" json:"gid"` // Boot type of image bios or UEFI // Required: true - BootType string `url:"boottype"` + BootType string `url:"boottype" json:"boottype"` // Image type // Should be: @@ -33,51 +33,51 @@ type CreateRequest struct { // - windows // - or other // Required: true - ImageType string `url:"imagetype"` + ImageType string `url:"imagetype" json:"imagetype"` // Does this machine supports hot resize // Required: false - HotResize bool `url:"hotresize,omitempty"` + HotResize bool `url:"hotresize,omitempty" json:"hotresize,omitempty"` // Optional username for the image // Required: false - Username string `url:"username,omitempty"` + Username string `url:"username,omitempty" json:"username,omitempty"` // Optional password for the image // Required: false - Password string `url:"password,omitempty"` + Password string `url:"password,omitempty" json:"password,omitempty"` // Account ID to make the image exclusive // Required: false - AccountID uint64 `url:"accountId,omitempty"` + AccountID uint64 `url:"accountId,omitempty" json:"accountId,omitempty"` // Username for upload binary media // Required: false - UsernameDL string `url:"usernameDL,omitempty"` + UsernameDL string `url:"usernameDL,omitempty" json:"usernameDL,omitempty"` // Password for upload binary media // Required: false - PasswordDL string `url:"passwordDL,omitempty"` + PasswordDL string `url:"passwordDL,omitempty" json:"passwordDL,omitempty"` // Storage endpoint provider ID // Required: false - SEPID uint64 `url:"sepId,omitempty"` + SEPID uint64 `url:"sepId,omitempty" json:"sepId,omitempty"` // Pool for image create // Required: false - Pool string `url:"poolName,omitempty"` + Pool string `url:"poolName,omitempty" json:"poolName,omitempty"` // Binary architecture of this image // Should be: // - X86_64 // - PPC64_LE // Required: false - Architecture string `url:"architecture,omitempty"` + Architecture string `url:"architecture,omitempty" json:"architecture,omitempty"` // List of types of compute suitable for image // Example: [ "KVM_X86" ] // Required: true - Drivers []string `url:"drivers"` + Drivers []string `url:"drivers" json:"drivers"` } func (irq CreateRequest) validate() error { diff --git a/pkg/cloudapi/image/create_virtual.go b/pkg/cloudapi/image/create_virtual.go index e11d01f..a77c929 100644 --- a/pkg/cloudapi/image/create_virtual.go +++ b/pkg/cloudapi/image/create_virtual.go @@ -11,11 +11,11 @@ import ( type CreateVirtualRequest struct { // Name of the virtual image to create // Required: true - Name string `url:"name"` + Name string `url:"name" json:"name"` // ID of real image to link this virtual image to upon creation // Required: true - TargetID uint64 `url:"targetId"` + TargetID uint64 `url:"targetId" json:"targetId"` } func (irq CreateVirtualRequest) validate() error { diff --git a/pkg/cloudapi/image/delete.go b/pkg/cloudapi/image/delete.go index 71ce748..c604791 100644 --- a/pkg/cloudapi/image/delete.go +++ b/pkg/cloudapi/image/delete.go @@ -11,11 +11,11 @@ import ( type DeleteRequest struct { // ID of the image to delete // Required: true - ImageID uint64 `url:"imageId"` + ImageID uint64 `url:"imageId" json:"imageId"` // Whether to completely delete the image // Required: false - Permanently bool `url:"permanently,omitempty"` + Permanently bool `url:"permanently,omitempty" json:"permanently,omitempty"` } func (irq DeleteRequest) validate() error { diff --git a/pkg/cloudapi/image/get.go b/pkg/cloudapi/image/get.go index 80852b4..958ddb2 100644 --- a/pkg/cloudapi/image/get.go +++ b/pkg/cloudapi/image/get.go @@ -11,11 +11,11 @@ import ( type GetRequest struct { // ID of image to get // Required: true - ImageID uint64 `url:"imageId"` + ImageID uint64 `url:"imageId" json:"imageId"` // If set to False returns only images in status CREATED // Required: false - ShowAll bool `url:"show_all,omitempty"` + ShowAll bool `url:"show_all,omitempty" json:"show_all,omitempty"` } func (irq GetRequest) validate() error { diff --git a/pkg/cloudapi/image/link.go b/pkg/cloudapi/image/link.go index 45edb6b..4362a6c 100644 --- a/pkg/cloudapi/image/link.go +++ b/pkg/cloudapi/image/link.go @@ -11,11 +11,11 @@ import ( type LinkRequest struct { // ID of the virtual image // Required: true - ImageID uint64 `url:"imageId"` + ImageID uint64 `url:"imageId" json:"imageId"` // ID of real image to link this virtual image to // Required: true - TargetID uint64 `url:"targetId"` + TargetID uint64 `url:"targetId" json:"targetId"` } func (irq LinkRequest) validate() error { diff --git a/pkg/cloudapi/image/list.go b/pkg/cloudapi/image/list.go index 8833c7c..d5601c5 100644 --- a/pkg/cloudapi/image/list.go +++ b/pkg/cloudapi/image/list.go @@ -10,15 +10,15 @@ import ( type ListRequest struct { // Optional account ID to include account images // Required: false - AccountID uint64 `json:"accountId,omitempty"` + AccountID uint64 `url:"accountId,omitempty" json:"accountId,omitempty"` // Page number // Required: false - Page uint64 `json:"page,omitempty"` + Page uint64 `url:"page,omitempty" json:"page,omitempty"` // Page size // Required: false - Size uint64 `json:"size,omitempty"` + Size uint64 `url:"size,omitempty" json:"size,omitempty"` } // List gets list available images, optionally filtering by account ID diff --git a/pkg/cloudapi/image/rename.go b/pkg/cloudapi/image/rename.go index f45d8c7..220a61e 100644 --- a/pkg/cloudapi/image/rename.go +++ b/pkg/cloudapi/image/rename.go @@ -11,11 +11,11 @@ import ( type RenameRequest struct { // ID of the virtual image to rename // Required: true - ImageID uint64 `url:"imageId"` + ImageID uint64 `url:"imageId" json:"imageId"` // New name // Required: true - Name string `url:"name"` + Name string `url:"name" json:"name"` } func (irq RenameRequest) validate() error { diff --git a/pkg/cloudapi/k8ci/get.go b/pkg/cloudapi/k8ci/get.go index d2be55f..8f53090 100644 --- a/pkg/cloudapi/k8ci/get.go +++ b/pkg/cloudapi/k8ci/get.go @@ -11,7 +11,7 @@ import ( type GetRequest struct { // ID of the K8 catalog item to get // Required: true - K8CIID uint64 `url:"k8ciId"` + K8CIID uint64 `url:"k8ciId" json:"k8ciId"` } func (krq GetRequest) validate() error { diff --git a/pkg/cloudapi/k8ci/list.go b/pkg/cloudapi/k8ci/list.go index 4596929..ba77e13 100644 --- a/pkg/cloudapi/k8ci/list.go +++ b/pkg/cloudapi/k8ci/list.go @@ -10,15 +10,15 @@ import ( type ListRequest struct { // List disabled items as well // Required: false - IncludeDisabled bool `url:"includeDisabled,omitempty"` + IncludeDisabled bool `url:"includeDisabled,omitempty" json:"includeDisabled,omitempty"` // Page number // Required: false - Page uint64 `url:"page,omitempty"` + Page uint64 `url:"page,omitempty" json:"page,omitempty"` // Page size // Required: false - Size uint64 `url:"size,omitempty"` + Size uint64 `url:"size,omitempty" json:"size,omitempty"` } // List gets list all k8ci catalog items available to the current user diff --git a/pkg/cloudapi/k8ci/list_deleted.go b/pkg/cloudapi/k8ci/list_deleted.go index e0981ab..1f1ee76 100644 --- a/pkg/cloudapi/k8ci/list_deleted.go +++ b/pkg/cloudapi/k8ci/list_deleted.go @@ -10,11 +10,11 @@ import ( type ListDeletedRequest struct { // Page number // Required: false - Page uint64 `url:"page,omitempty"` + Page uint64 `url:"page,omitempty" json:"page,omitempty"` // Page size // Required: false - Size uint64 `url:"size,omitempty"` + Size uint64 `url:"size,omitempty" json:"size,omitempty"` } // ListDeleted gets list all deleted k8ci catalog items available to the current user diff --git a/pkg/cloudapi/k8s/create.go b/pkg/cloudapi/k8s/create.go index 0843b3d..56fddda 100644 --- a/pkg/cloudapi/k8s/create.go +++ b/pkg/cloudapi/k8s/create.go @@ -11,95 +11,95 @@ import ( type CreateRequest struct { // Name of Kubernetes cluster // Required: true - Name string `url:"name"` + Name string `url:"name" json:"name"` // Resource Group ID for cluster placement // Required: true - RGID uint64 `url:"rgId"` + RGID uint64 `url:"rgId" json:"rgId"` // ID of Kubernetes catalog item (k8sci) for cluster // Required: true - K8SCIID uint64 `url:"k8ciId"` + K8SCIID uint64 `url:"k8ciId" json:"k8ciId"` // Name for first worker group created with cluster // Required: true - WorkerGroupName string `url:"workerGroupName"` + WorkerGroupName string `url:"workerGroupName" json:"workerGroupName"` // ID of SEP to create boot disks for master nodes. Uses images SEP ID if not set // Required: false - MasterSEPID uint64 `url:"masterSepId,omitempty"` + MasterSEPID uint64 `url:"masterSepId,omitempty" json:"masterSepId,omitempty"` // Pool to use if master SEP ID is set, can be also empty if needed to be chosen by system // Required: false - MasterSEPPool string `url:"masterSepPool,omitempty"` + MasterSEPPool string `url:"masterSepPool,omitempty" json:"masterSepPool,omitempty"` // ID of SEP to create boot disks for default worker nodes group. Uses images SEP ID if not set // Required: false - WorkerSEPID uint64 `url:"workerSepId,omitempty"` + WorkerSEPID uint64 `url:"workerSepId,omitempty" json:"workerSepId,omitempty"` // Pool to use if worker SEP ID is set, can be also empty if needed to be chosen by system // Required: false - WorkerSEPPool string `url:"workerSepPool,omitempty"` + WorkerSEPPool string `url:"workerSepPool,omitempty" json:"workerSepPool,omitempty"` // List of strings with labels for default worker group // i.e: ["label1=value1", "label2=value2"] // Required: false - Labels []string `url:"labels,omitempty"` + Labels []string `url:"labels,omitempty" json:"labels,omitempty"` // List of strings with taints for default worker group // i.e: ["key1=value1:NoSchedule", "key2=value2:NoExecute"] // Required: false - Taints []string `url:"taints,omitempty"` + Taints []string `url:"taints,omitempty" json:"taints,omitempty"` // List of strings with annotations for worker group // i.e: ["key1=value1", "key2=value2"] // Required: false - Annotations []string `url:"annotations,omitempty"` + Annotations []string `url:"annotations,omitempty" json:"annotations,omitempty"` // Number of master nodes to create // Required: false - MasterNum uint `url:"masterNum,omitempty"` + MasterNum uint `url:"masterNum,omitempty" json:"masterNum,omitempty"` // Master node CPU count // Required: false - MasterCPU uint `url:"masterCpu,omitempty"` + MasterCPU uint `url:"masterCpu,omitempty" json:"masterCpu,omitempty"` // Master node RAM volume in MB // Required: false - MasterRAM uint `url:"masterRam,omitempty"` + MasterRAM uint `url:"masterRam,omitempty" json:"masterRam,omitempty"` // Master node boot disk size in GB If 0 is specified, size is defined by the OS image size // Required: false - MasterDisk uint `url:"masterDisk,omitempty"` + MasterDisk uint `url:"masterDisk,omitempty" json:"masterDisk,omitempty"` // Number of worker nodes to create in default worker group // Required: false - WorkerNum uint `url:"workerNum,omitempty"` + WorkerNum uint `url:"workerNum,omitempty" json:"workerNum,omitempty"` // Worker node CPU count // Required: false - WorkerCPU uint `url:"workerCpu,omitempty"` + WorkerCPU uint `url:"workerCpu,omitempty" json:"workerCpu,omitempty"` // Worker node RAM volume in MB // Required: false - WorkerRAM uint `url:"workerRam,omitempty"` + WorkerRAM uint `url:"workerRam,omitempty" json:"workerRam,omitempty"` // Worker node boot disk size in GB. If 0 is specified, size is defined by the OS image size // Required: false - WorkerDisk uint `url:"workerDisk,omitempty"` + WorkerDisk uint `url:"workerDisk,omitempty" json:"workerDisk,omitempty"` // ID of the external network to connect load balancer and cluster ViNS. If 0 is specified, external network selects automatically to // Required: false - ExtNetID uint64 `url:"extnetId,omitempty"` + ExtNetID uint64 `url:"extnetId,omitempty" json:"extnetId,omitempty"` // Create Kubernetes cluster with masters nodes behind load balancer if true. // Otherwise give all cluster nodes direct external addresses from selected ExtNet // Required: false - WithLB bool `url:"withLB,omitempty"` + WithLB bool `url:"withLB,omitempty" json:"withLB,omitempty"` // Text description of this Kubernetes cluster // Required: false - Description string `url:"desc, omitempty"` + Description string `url:"desc,omitempty" json:"desc,omitempty"` } func (krq CreateRequest) validate() error { diff --git a/pkg/cloudapi/k8s/delete.go b/pkg/cloudapi/k8s/delete.go index 691a8af..f0e8c8f 100644 --- a/pkg/cloudapi/k8s/delete.go +++ b/pkg/cloudapi/k8s/delete.go @@ -11,12 +11,12 @@ import ( type DeleteRequest struct { // Kubernetes cluster ID // Required: true - K8SID uint64 `url:"k8sId"` + K8SID uint64 `url:"k8sId" json:"k8sId"` // True if cluster is destroyed permanently. // Otherwise it can be restored from Recycle Bin // Required: true - Permanently bool `url:"permanently"` + Permanently bool `url:"permanently" json:"permanently"` } func (krq DeleteRequest) validate() error { diff --git a/pkg/cloudapi/k8s/delete_master_from_group.go b/pkg/cloudapi/k8s/delete_master_from_group.go index 9df0b4d..111ccd9 100644 --- a/pkg/cloudapi/k8s/delete_master_from_group.go +++ b/pkg/cloudapi/k8s/delete_master_from_group.go @@ -11,15 +11,15 @@ import ( type DeleteMasterFromGroupRequest struct { // Kubernetes cluster ID // Required: true - K8SID uint64 `url:"k8sId"` + K8SID uint64 `url:"k8sId" json:"k8sId"` // ID of the masters compute group // Required: true - MasterGroupID uint64 `url:"masterGroupId"` + MasterGroupID uint64 `url:"masterGroupId" json:"masterGroupId"` // List of Compute IDs of master nodes to delete // Required: true - MasterIDs []string `url:"masterIds"` + MasterIDs []string `url:"masterIds" json:"masterIds"` } func (krq DeleteMasterFromGroupRequest) validate() error { diff --git a/pkg/cloudapi/k8s/delete_worker_from_group.go b/pkg/cloudapi/k8s/delete_worker_from_group.go index e6f3efb..e49b46b 100644 --- a/pkg/cloudapi/k8s/delete_worker_from_group.go +++ b/pkg/cloudapi/k8s/delete_worker_from_group.go @@ -11,15 +11,15 @@ import ( type DeleteWorkerFromGroupRequest struct { // Kubernetes cluster ID // Required: true - K8SID uint64 `url:"k8sId"` + K8SID uint64 `url:"k8sId" json:"k8sId"` // ID of the workers compute group // Required: true - WorkersGroupID uint64 `url:"workersGroupId"` + WorkersGroupID uint64 `url:"workersGroupId" json:"workersGroupId"` // Compute ID of worker node to delete // Required: true - WorkerID uint64 `url:"workerId"` + WorkerID uint64 `url:"workerId" json:"workerId"` } func (krq DeleteWorkerFromGroupRequest) validate() error { diff --git a/pkg/cloudapi/k8s/disable_enable.go b/pkg/cloudapi/k8s/disable_enable.go index f74cdb2..9bf7c96 100644 --- a/pkg/cloudapi/k8s/disable_enable.go +++ b/pkg/cloudapi/k8s/disable_enable.go @@ -11,7 +11,7 @@ import ( type DisabelEnableRequest struct { // Kubernetes cluster ID // Required: true - K8SID uint64 `url:"k8sId"` + K8SID uint64 `url:"k8sId" json:"k8sId"` } func (krq DisabelEnableRequest) validate() error { diff --git a/pkg/cloudapi/k8s/find_group_by_label.go b/pkg/cloudapi/k8s/find_group_by_label.go index 90bc818..c4efe9b 100644 --- a/pkg/cloudapi/k8s/find_group_by_label.go +++ b/pkg/cloudapi/k8s/find_group_by_label.go @@ -11,16 +11,16 @@ import ( type FindGroupByLabelRequest struct { // Kubernetes cluster ID // Required: true - K8SID uint64 `url:"k8sId"` + K8SID uint64 `url:"k8sId" json:"k8sId"` // List of labels to search // Required: true - Labels []string `url:"labels"` + Labels []string `url:"labels" json:"labels"` // If true and more than one label provided, select only groups that have all provided labels. // If false - groups that have at least one label // Required: true - Strict bool `url:"strict"` + Strict bool `url:"strict" json:"strict"` } func (krq FindGroupByLabelRequest) validate() error { diff --git a/pkg/cloudapi/k8s/get.go b/pkg/cloudapi/k8s/get.go index 882ab88..239ca9f 100644 --- a/pkg/cloudapi/k8s/get.go +++ b/pkg/cloudapi/k8s/get.go @@ -11,7 +11,7 @@ import ( type GetRequest struct { // Kubernetes cluster ID // Required: true - K8SID uint64 `url:"k8sId"` + K8SID uint64 `url:"k8sId" json:"k8sId"` } func (krq GetRequest) validate() error { diff --git a/pkg/cloudapi/k8s/get_config.go b/pkg/cloudapi/k8s/get_config.go index 24739b4..9c0d987 100644 --- a/pkg/cloudapi/k8s/get_config.go +++ b/pkg/cloudapi/k8s/get_config.go @@ -10,7 +10,7 @@ import ( type GetConfigRequest struct { // Kubernetes cluster ID // Required: true - K8SID uint64 `url:"k8sId"` + K8SID uint64 `url:"k8sId" json:"k8sId"` } func (krq GetConfigRequest) validate() error { diff --git a/pkg/cloudapi/k8s/get_node_annotations.go b/pkg/cloudapi/k8s/get_node_annotations.go index 8d557f7..51659c2 100644 --- a/pkg/cloudapi/k8s/get_node_annotations.go +++ b/pkg/cloudapi/k8s/get_node_annotations.go @@ -10,11 +10,11 @@ import ( type GetNodeAnnotationsRequest struct { // Kubernetes cluster ID // Required: true - K8SID uint64 `url:"k8sId"` + K8SID uint64 `url:"k8sId" json:"k8sId"` // Node ID // Required: true - NodeID uint64 `url:"nodeId"` + NodeID uint64 `url:"nodeId" json:"nodeId"` } func (krq GetNodeAnnotationsRequest) validate() error { diff --git a/pkg/cloudapi/k8s/get_node_labels.go b/pkg/cloudapi/k8s/get_node_labels.go index 4862ab2..423c962 100644 --- a/pkg/cloudapi/k8s/get_node_labels.go +++ b/pkg/cloudapi/k8s/get_node_labels.go @@ -10,11 +10,11 @@ import ( type GetNodeLabelsRequest struct { // Kubernetes cluster ID // Required: true - K8SID uint64 `url:"k8sId"` + K8SID uint64 `url:"k8sId" json:"k8sId"` // Node ID // Required: false - NodeID uint64 `url:"nodeId"` + NodeID uint64 `url:"nodeId" json:"nodeId"` } func (krq GetNodeLabelsRequest) validate() error { diff --git a/pkg/cloudapi/k8s/get_node_taints.go b/pkg/cloudapi/k8s/get_node_taints.go index 8d4a678..780c249 100644 --- a/pkg/cloudapi/k8s/get_node_taints.go +++ b/pkg/cloudapi/k8s/get_node_taints.go @@ -10,11 +10,11 @@ import ( type GetNodeTaintsRequest struct { // Kubernetes cluster ID // Required: true - K8SID uint64 `url:"k8sId"` + K8SID uint64 `url:"k8sId" json:"k8sId"` // Node ID // Required: false - NodeID uint64 `url:"nodeId"` + NodeID uint64 `url:"nodeId" json:"nodeId"` } func (krq GetNodeTaintsRequest) validate() error { diff --git a/pkg/cloudapi/k8s/list.go b/pkg/cloudapi/k8s/list.go index f78d7a7..ea7689a 100644 --- a/pkg/cloudapi/k8s/list.go +++ b/pkg/cloudapi/k8s/list.go @@ -10,15 +10,15 @@ import ( type ListRequest struct { // Include deleted clusters in result // Required: false - IncludeDeleted bool `url:"includedeleted,omitempty"` + IncludeDeleted bool `url:"includedeleted,omitempty" json:"includedeleted,omitempty"` // Page number // Required: false - Page uint64 `url:"page,omitempty"` + Page uint64 `url:"page,omitempty" json:"page,omitempty"` // Page size // Required: false - Size uint64 `url:"size,omitempty"` + Size uint64 `url:"size,omitempty" json:"size,omitempty"` } // List gets list all kubernetes clusters the user has access to diff --git a/pkg/cloudapi/k8s/list_deleted.go b/pkg/cloudapi/k8s/list_deleted.go index 594401c..4914977 100644 --- a/pkg/cloudapi/k8s/list_deleted.go +++ b/pkg/cloudapi/k8s/list_deleted.go @@ -10,11 +10,11 @@ import ( type ListDeletedRequest struct { // Page number // Required: false - Page uint64 `url:"page,omitempty"` + Page uint64 `url:"page,omitempty" json:"page,omitempty"` // Page size // Required: false - Size uint64 `url:"size,omitempty"` + Size uint64 `url:"size,omitempty" json:"size,omitempty"` } // ListDeleted gets all deleted kubernetes clusters the user has access to diff --git a/pkg/cloudapi/k8s/restore.go b/pkg/cloudapi/k8s/restore.go index 3ee848e..cf52a8e 100644 --- a/pkg/cloudapi/k8s/restore.go +++ b/pkg/cloudapi/k8s/restore.go @@ -11,7 +11,7 @@ import ( type RestoreRequest struct { // Kubernetes cluster ID // Required: true - K8SID uint64 `url:"k8sId"` + K8SID uint64 `url:"k8sId" json:"k8sId"` } func (krq RestoreRequest) validate() error { diff --git a/pkg/cloudapi/k8s/start.go b/pkg/cloudapi/k8s/start.go index 4021113..8c33dca 100644 --- a/pkg/cloudapi/k8s/start.go +++ b/pkg/cloudapi/k8s/start.go @@ -11,7 +11,7 @@ import ( type StartRequest struct { // Kubernetes cluster ID // Required: true - K8SID uint64 `url:"k8sId"` + K8SID uint64 `url:"k8sId" json:"k8sId"` } func (krq StartRequest) validate() error { diff --git a/pkg/cloudapi/k8s/stop.go b/pkg/cloudapi/k8s/stop.go index 8f79558..6ecdf97 100644 --- a/pkg/cloudapi/k8s/stop.go +++ b/pkg/cloudapi/k8s/stop.go @@ -11,7 +11,7 @@ import ( type StopRequest struct { // Kubernetes cluster ID // Required: true - K8SID uint64 `url:"k8sId"` + K8SID uint64 `url:"k8sId" json:"k8sId"` } func (krq StopRequest) validate() error { diff --git a/pkg/cloudapi/k8s/update.go b/pkg/cloudapi/k8s/update.go index 7eb2106..49e15fa 100644 --- a/pkg/cloudapi/k8s/update.go +++ b/pkg/cloudapi/k8s/update.go @@ -11,17 +11,17 @@ import ( type UpdateRequest struct { // Kubernetes cluster ID // Required: true - K8SID uint64 `url:"k8sId"` + K8SID uint64 `url:"k8sId" json:"k8sId"` // New name to set. // If empty string is passed, name is not updated // Required: false - Name string `url:"name,omitempty"` + Name string `url:"name,omitempty" json:"name,omitempty"` // New description to set. // If empty string is passed, description is not updated // Required: false - Description string `url:"desc,omitempty"` + Description string `url:"desc,omitempty" json:"desc,omitempty"` } func (krq UpdateRequest) validate() error { diff --git a/pkg/cloudapi/k8s/worker_add.go b/pkg/cloudapi/k8s/worker_add.go index 2c99c5b..1442c78 100644 --- a/pkg/cloudapi/k8s/worker_add.go +++ b/pkg/cloudapi/k8s/worker_add.go @@ -11,15 +11,15 @@ import ( type WorkerAddRequest struct { // Kubernetes cluster ID // Required: true - K8SID uint64 `url:"k8sId"` + K8SID uint64 `url:"k8sId" json:"k8sId"` // ID of the workers compute group // Required: true - WorkersGroupID uint64 `url:"workersGroupId"` + WorkersGroupID uint64 `url:"workersGroupId" json:"workersGroupId"` // How many worker nodes to add // Required: true - Num uint64 `url:"num"` + Num uint64 `url:"num" json:"num"` } func (krq WorkerAddRequest) validate() error { diff --git a/pkg/cloudapi/k8s/worker_reset.go b/pkg/cloudapi/k8s/worker_reset.go index ccc0902..cfcbe42 100644 --- a/pkg/cloudapi/k8s/worker_reset.go +++ b/pkg/cloudapi/k8s/worker_reset.go @@ -11,15 +11,15 @@ import ( type WorkerResetRequest struct { // Kubernetes cluster ID // Required: true - K8SID uint64 `url:"k8sId"` + K8SID uint64 `url:"k8sId" json:"k8sId"` // ID of the workers compute group // Required: true - WorkersGroupID uint64 `url:"workersGroupId"` + WorkersGroupID uint64 `url:"workersGroupId" json:"workersGroupId"` // Compute ID of worker node to reset // Required: true - WorkerID uint64 `url:"workerId"` + WorkerID uint64 `url:"workerId" json:"workerId"` } func (krq WorkerResetRequest) validate() error { diff --git a/pkg/cloudapi/k8s/worker_restart.go b/pkg/cloudapi/k8s/worker_restart.go index 5249d42..65e423c 100644 --- a/pkg/cloudapi/k8s/worker_restart.go +++ b/pkg/cloudapi/k8s/worker_restart.go @@ -11,15 +11,15 @@ import ( type WorkerRestartRequest struct { // Kubernetes cluster ID // Required: true - K8SID uint64 `url:"k8sId"` + K8SID uint64 `url:"k8sId" json:"k8sId"` // ID of the workers compute group // Required: true - WorkersGroupID uint64 `url:"workersGroupId"` + WorkersGroupID uint64 `url:"workersGroupId" json:"workersGroupId"` // Compute ID of worker node to restart // Required: true - WorkerID uint64 `url:"workerId"` + WorkerID uint64 `url:"workerId" json:"workerId"` } func (krq WorkerRestartRequest) validate() error { diff --git a/pkg/cloudapi/k8s/workers_group_add.go b/pkg/cloudapi/k8s/workers_group_add.go index 60d1328..6ca7a59 100644 --- a/pkg/cloudapi/k8s/workers_group_add.go +++ b/pkg/cloudapi/k8s/workers_group_add.go @@ -11,50 +11,50 @@ import ( type WorkersGroupAddRequest struct { // Kubernetes cluster ID // Required: true - K8SID uint64 `url:"k8sId"` + K8SID uint64 `url:"k8sId" json:"k8sId"` // Worker group name // Required: true - Name string `url:"name"` + Name string `url:"name" json:"name"` // ID of SEP to create boot disks for default worker nodes group. Uses images SEP ID if not set // Required: false - WorkerSEPID uint64 `url:"workerSepId,omitempty"` + WorkerSEPID uint64 `url:"workerSepId,omitempty" json:"workerSepId,omitempty"` // Pool to use if worker SEP ID is set, can be also empty if needed to be chosen by system // Required: false - WorkerSEPPool string `url:"workerSepPool,omitempty"` + WorkerSEPPool string `url:"workerSepPool,omitempty" json:"workerSepPool,omitempty"` // List of strings with labels for worker group // i.e: ["label1=value1", "label2=value2"] // Required: false - Labels []string `url:"labels,omitempty"` + Labels []string `url:"labels,omitempty" json:"labels,omitempty"` // List of strings with taints for worker group // i.e: ["key1=value1:NoSchedule", "key2=value2:NoExecute"] // Required: false - Taints []string `url:"taints,omitempty"` + Taints []string `url:"taints,omitempty" json:"taints,omitempty"` // List of strings with annotations for worker group // i.e: ["key1=value1", "key2=value2"] // Required: false - Annotations []string `url:"annotations,omitempty"` + Annotations []string `url:"annotations,omitempty" json:"annotations,omitempty"` // Number of worker nodes to create // Required: false - WorkerNum uint64 `url:"workerNum,omitempty"` + WorkerNum uint64 `url:"workerNum,omitempty" json:"workerNum,omitempty"` // Worker node CPU count // Required: false - WorkerCPU uint64 `url:"workerCpu,omitempty"` + WorkerCPU uint64 `url:"workerCpu,omitempty" json:"workerCpu,omitempty"` // Worker node RAM volume in MB // Required: false - WorkerRAM uint64 `url:"workerRam,omitempty"` + WorkerRAM uint64 `url:"workerRam,omitempty" json:"workerRam,omitempty"` // Worker node boot disk size in GB If 0 is specified, size is defined by the OS image size // Required: false - WorkerDisk uint64 `url:"workerDisk,omitempty"` + WorkerDisk uint64 `url:"workerDisk,omitempty" json:"workerDisk,omitempty"` } func (krq WorkersGroupAddRequest) validate() error { diff --git a/pkg/cloudapi/k8s/workers_group_delete.go b/pkg/cloudapi/k8s/workers_group_delete.go index d56e10e..bd02bd9 100644 --- a/pkg/cloudapi/k8s/workers_group_delete.go +++ b/pkg/cloudapi/k8s/workers_group_delete.go @@ -11,11 +11,11 @@ import ( type WorkersGroupDeleteRequest struct { // Kubernetes cluster ID // Required: true - K8SID uint64 `url:"k8sId"` + K8SID uint64 `url:"k8sId" json:"k8sId"` // Worker group ID // Required: true - WorkersGroupID uint64 `url:"workersGroupId"` + WorkersGroupID uint64 `url:"workersGroupId" json:"workersGroupId"` } func (krq WorkersGroupDeleteRequest) validate() error { diff --git a/pkg/cloudapi/k8s/workers_group_get_by_name.go b/pkg/cloudapi/k8s/workers_group_get_by_name.go index 5fbf4d5..d220555 100644 --- a/pkg/cloudapi/k8s/workers_group_get_by_name.go +++ b/pkg/cloudapi/k8s/workers_group_get_by_name.go @@ -11,11 +11,11 @@ import ( type WorkersGroupGetByNameRequest struct { // Kubernetes cluster ID // Required: true - K8SID uint64 `url:"k8sId"` + K8SID uint64 `url:"k8sId" json:"k8sId"` // Worker group name // Required: true - GroupName string `url:"groupName"` + GroupName string `url:"groupName" json:"groupName"` } func (krq WorkersGroupGetByNameRequest) validate() error { diff --git a/pkg/cloudapi/kvmppc/create.go b/pkg/cloudapi/kvmppc/create.go index f06083c..9500bbe 100644 --- a/pkg/cloudapi/kvmppc/create.go +++ b/pkg/cloudapi/kvmppc/create.go @@ -11,38 +11,38 @@ import ( type CreateRequest struct { // ID of the resource group, which will own this VM // Required: true - RGID uint64 `url:"rgId"` + RGID uint64 `url:"rgId" json:"rgId"` // Name of this VM. // Must be unique among all VMs (including those in DELETED state) in target resource group // Required: true - Name string `url:"name"` + Name string `url:"name" json:"name"` // Number CPUs to allocate to this VM // Required: true - CPU uint64 `url:"cpu"` + CPU uint64 `url:"cpu" json:"cpu"` // Volume of RAM in MB to allocate to this VM // Required: true - RAM uint64 `url:"ram"` + RAM uint64 `url:"ram" json:"ram"` // ID of the OS image to base this VM on; // Could be boot disk image or CD-ROM image // Required: true - ImageID uint64 `url:"imageId"` + ImageID uint64 `url:"imageId" json:"imageId"` // Size of the boot disk in GB // Required: false - BootDisk uint64 `url:"bootDisk,omitempty"` + BootDisk uint64 `url:"bootDisk,omitempty" json:"bootDisk,omitempty"` // ID of SEP to create boot disk on. // Uses images SEP ID if not set // Required: false - SEPID uint64 `url:"sepId,omitempty"` + SEPID uint64 `url:"sepId,omitempty" json:"sepId,omitempty"` // Pool to use if sepId is set, can be also empty if needed to be chosen by system // Required: false - Pool string `url:"pool,omitempty"` + Pool string `url:"pool,omitempty" json:"pool,omitempty"` // Network type // Should be one of: @@ -50,38 +50,38 @@ type CreateRequest struct { // - EXTNET // - NONE // Required: false - NetType string `url:"netType,omitempty"` + NetType string `url:"netType,omitempty" json:"netType,omitempty"` // Network ID for connect to, // for EXTNET - external network ID, // for ViNS - ViNS ID, // when netType is not "NONE" // Required: false - NetID uint64 `url:"netId,omitempty"` + NetID uint64 `url:"netId,omitempty" json:"netId,omitempty"` // IP address to assign to this VM when connecting to the specified network // Required: false - IPAddr string `url:"ipAddr,omitempty"` + IPAddr string `url:"ipAddr,omitempty" json:"ipAddr,omitempty"` // Input data for cloud-init facility // Required: false - Userdata string `url:"userdata,omitempty"` + Userdata string `url:"userdata,omitempty" json:"userdata,omitempty"` // Text description of this VM // Required: false - Description string `url:"desc,omitempty"` + Description string `url:"desc,omitempty" json:"desc,omitempty"` // Start VM upon success // Required: false - Start bool `url:"start,omitempty"` + Start bool `url:"start,omitempty" json:"start,omitempty"` // System name // Required: false - IS string `url:"IS,omitempty"` + IS string `url:"IS,omitempty" json:"IS,omitempty"` // Compute purpose // Required: false - IPAType string `url:"ipaType,omitempty"` + IPAType string `url:"ipaType,omitempty" json:"ipaType,omitempty"` } func (krq CreateRequest) validate() error { diff --git a/pkg/cloudapi/kvmppc/create_blank.go b/pkg/cloudapi/kvmppc/create_blank.go index 2a1dcdd..95e3d72 100644 --- a/pkg/cloudapi/kvmppc/create_blank.go +++ b/pkg/cloudapi/kvmppc/create_blank.go @@ -11,33 +11,33 @@ import ( type CreateBlankRequest struct { // ID of the resource group, which will own this VM // Required: true - RGID uint64 `url:"rgId"` + RGID uint64 `url:"rgId" json:"rgId"` // Name of this VM. // Must be unique among all VMs (including those in DELETED state) in target resource group // Required: true - Name string `url:"name"` + Name string `url:"name" json:"name"` // Number CPUs to allocate to this VM // Required: true - CPU uint64 `url:"cpu"` + CPU uint64 `url:"cpu" json:"cpu"` // Volume of RAM in MB to allocate to this VM // Required: true - RAM uint64 `url:"ram"` + RAM uint64 `url:"ram" json:"ram"` // Size of the boot disk in GB // Required: true - BootDisk uint64 `url:"bootDisk"` + BootDisk uint64 `url:"bootDisk" json:"bootDisk"` // ID of SEP to create boot disk on. // Uses images SEP ID if not set // Required: true - SEPID uint64 `url:"sepId"` + SEPID uint64 `url:"sepId" json:"sepId"` // Pool to use if SEP ID is set, can be also empty if needed to be chosen by system // Required: true - Pool string `url:"pool"` + Pool string `url:"pool" json:"pool"` // Network type // Should be one of: @@ -45,22 +45,22 @@ type CreateBlankRequest struct { // - EXTNET // - NONE // Required: false - NetType string `url:"netType,omitempty"` + NetType string `url:"netType,omitempty" json:"netType,omitempty"` // Network ID for connect to, // for EXTNET - external network ID, // for VINS - VINS ID, // when network type is not "NONE" // Required: false - NetID uint64 `url:"netId,omitempty"` + NetID uint64 `url:"netId,omitempty" json:"netId,omitempty"` // IP address to assign to this VM when connecting to the specified network // Required: false - IPAddr string `url:"ipAddr,omitempty"` + IPAddr string `url:"ipAddr,omitempty" json:"ipAddr,omitempty"` // Text description of this VM // Required: false - Description string `url:"desc,omitempty"` + Description string `url:"desc,omitempty" json:"desc,omitempty"` } func (krq CreateBlankRequest) validate() error { diff --git a/pkg/cloudapi/kvmx86/create.go b/pkg/cloudapi/kvmx86/create.go index af4a362..42d2c3f 100644 --- a/pkg/cloudapi/kvmx86/create.go +++ b/pkg/cloudapi/kvmx86/create.go @@ -11,38 +11,38 @@ import ( type CreateRequest struct { // ID of the resource group, which will own this VM // Required: true - RGID uint64 `url:"rgId"` + RGID uint64 `url:"rgId" json:"rgId"` // Name of this VM. // Must be unique among all VMs (including those in DELETED state) in target resource group // Required: true - Name string `url:"name"` + Name string `url:"name" json:"name"` // Number CPUs to allocate to this VM // Required: true - CPU uint64 `url:"cpu"` + CPU uint64 `url:"cpu" json:"cpu"` // Volume of RAM in MB to allocate to this VM // Required: true - RAM uint64 `url:"ram"` + RAM uint64 `url:"ram" json:"ram"` // ID of the OS image to base this VM on; // Could be boot disk image or CD-ROM image // Required: true - ImageID uint64 `url:"imageId"` + ImageID uint64 `url:"imageId" json:"imageId"` // Size of the boot disk in GB // Required: false - BootDisk uint64 `url:"bootDisk,omitempty"` + BootDisk uint64 `url:"bootDisk,omitempty" json:"bootDisk,omitempty"` // ID of SEP to create boot disk on. // Uses images SEP ID if not set // Required: false - SepID uint64 `url:"sepId,omitempty"` + SepID uint64 `url:"sepId,omitempty" json:"sepId,omitempty"` // Pool to use if sepId is set, can be also empty if needed to be chosen by system // Required: false - Pool string `url:"pool,omitempty"` + Pool string `url:"pool,omitempty" json:"pool,omitempty"` // Network type // Should be one of: @@ -50,38 +50,38 @@ type CreateRequest struct { // - EXTNET // - NONE // Required: false - NetType string `url:"netType,omitempty"` + NetType string `url:"netType,omitempty" json:"netType,omitempty"` // Network ID for connect to, // for EXTNET - external network ID, // for VINS - VINS ID, // when network type is not "NONE" // Required: false - NetID uint64 `url:"netId,omitempty"` + NetID uint64 `url:"netId,omitempty" json:"netId,omitempty"` // IP address to assign to this VM when connecting to the specified network // Required: false - IPAddr string `url:"ipAddr,omitempty"` + IPAddr string `url:"ipAddr,omitempty" json:"ipAddr,omitempty"` // Input data for cloud-init facility // Required: false - Userdata string `url:"userdata,omitempty"` + Userdata string `url:"userdata,omitempty" json:"userdata,omitempty"` // Text description of this VM // Required: false - Description string `url:"desc,omitempty"` + Description string `url:"desc,omitempty" json:"desc,omitempty"` // Start VM upon success // Required: false - Start bool `url:"start,omitempty"` + Start bool `url:"start,omitempty" json:"start,omitempty"` // System name // Required: false - IS string `url:"IS,omitempty"` + IS string `url:"IS,omitempty" json:"IS,omitempty"` // Compute purpose // Required: false - IPAType string `url:"ipaType,omitempty"` + IPAType string `url:"ipaType,omitempty" json:"ipaType,omitempty"` } func (krq CreateRequest) validate() error { diff --git a/pkg/cloudapi/kvmx86/create_blank.go b/pkg/cloudapi/kvmx86/create_blank.go index 0ee097d..b8dff6b 100644 --- a/pkg/cloudapi/kvmx86/create_blank.go +++ b/pkg/cloudapi/kvmx86/create_blank.go @@ -11,33 +11,33 @@ import ( type CreateBlankRequest struct { // ID of the resource group, which will own this VM // Required: true - RGID uint64 `url:"rgId"` + RGID uint64 `url:"rgId" json:"rgId"` // Name of this VM. // Must be unique among all VMs (including those in DELETED state) in target resource group // Required: true - Name string `url:"name"` + Name string `url:"name" json:"name"` // Number CPUs to allocate to this VM // Required: true - CPU uint64 `url:"cpu"` + CPU uint64 `url:"cpu" json:"cpu"` // Volume of RAM in MB to allocate to this VM // Required: true - RAM uint64 `url:"ram"` + RAM uint64 `url:"ram" json:"ram"` // Size of the boot disk in GB // Required: true - BootDisk uint64 `url:"bootDisk"` + BootDisk uint64 `url:"bootDisk" json:"bootDisk"` // ID of SEP to create boot disk on. // Uses images SEP ID if not set // Required: true - SEPID uint64 `url:"sepId"` + SEPID uint64 `url:"sepId" json:"sepId"` // Pool to use if sepId is set, can be also empty if needed to be chosen by system // Required: true - Pool string `url:"pool"` + Pool string `url:"pool" json:"pool"` // Network type // Should be one of: @@ -45,22 +45,22 @@ type CreateBlankRequest struct { // - EXTNET // - NONE // Required: false - NetType string `url:"netType,omitempty"` + NetType string `url:"netType,omitempty" json:"netType,omitempty"` // Network ID for connect to, // for EXTNET - external network ID, // for VINS - VINS ID, // when network type is not "NONE" // Required: false - NetID uint64 `url:"netId,omitempty"` + NetID uint64 `url:"netId,omitempty" json:"netId,omitempty"` // IP address to assign to this VM when connecting to the specified network // Required: false - IPAddr string `url:"ipAddr,omitempty"` + IPAddr string `url:"ipAddr,omitempty" json:"ipAddr,omitempty"` // Text description of this VM // Required: false - Description string `url:"desc,omitempty"` + Description string `url:"desc,omitempty" json:"desc,omitempty"` } func (krq CreateBlankRequest) validate() error { diff --git a/pkg/cloudapi/lb/backend_create.go b/pkg/cloudapi/lb/backend_create.go index 491134b..c39349e 100644 --- a/pkg/cloudapi/lb/backend_create.go +++ b/pkg/cloudapi/lb/backend_create.go @@ -11,11 +11,11 @@ import ( type BackendCreateRequest struct { // ID of the load balancer instance to backendCreate // Required: true - LBID uint64 `url:"lbId"` + LBID uint64 `url:"lbId" json:"lbId"` // Must be unique among all backends of this load balancer - name of the new backend to create // Required: true - BackendName string `url:"backendName"` + BackendName string `url:"backendName" json:"backendName"` // Algorithm // Should be one of: @@ -23,47 +23,47 @@ type BackendCreateRequest struct { // - static-rr // - leastconn // Required: false - Algorithm string `url:"algorithm,omitempty"` + Algorithm string `url:"algorithm,omitempty" json:"algorithm,omitempty"` // Interval in milliseconds between two consecutive availability // checks of the server that is considered available // Required: false - Inter uint64 `url:"inter,omitempty"` + Inter uint64 `url:"inter,omitempty" json:"inter,omitempty"` // Interval in milliseconds between two consecutive checks to // restore the availability of a server that is currently considered unavailable // Required: false - DownInter uint64 `url:"downinter,omitempty"` + DownInter uint64 `url:"downinter,omitempty" json:"downinter,omitempty"` // Number of checks that the server must pass in order to get the available status // and be included in the balancing scheme again // Required: false - Rise uint64 `url:"rise,omitempty"` + Rise uint64 `url:"rise,omitempty" json:"rise,omitempty"` // Number of consecutive failed availability checks, // after which the previously considered available server receives the status of // unavailable and is temporarily excluded from the balancing scheme // Required: false - Fall uint64 `url:"fall,omitempty"` + Fall uint64 `url:"fall,omitempty" json:"fall,omitempty"` // Interval in milliseconds from the moment the server receives the available status, // after which the number of actually allowed connections to this server will be returned to 100% of the set limit // Required: false - SlowStart uint64 `url:"slowstart,omitempty"` + SlowStart uint64 `url:"slowstart,omitempty" json:"slowstart,omitempty"` // Limit of simultaneous connections to the server. When this limit is reached, // the server is temporarily excluded from the balancing scheme // Required: false - MaxConn uint64 `url:"maxconn,omitempty"` + MaxConn uint64 `url:"maxconn,omitempty" json:"maxconn,omitempty"` // Limit of connections waiting in the queue. // When this limit is reached, all subsequent connections will be forwarded to other servers // Required: false - MaxQueue uint64 `url:"maxqueue,omitempty"` + MaxQueue uint64 `url:"maxqueue,omitempty" json:"maxqueue,omitempty"` // Server weight for use in weight balancing algorithms // Required: false - Weight uint64 `url:"weight,omitempty"` + Weight uint64 `url:"weight,omitempty" json:"weight,omitempty"` } func (lbrq BackendCreateRequest) validate() error { diff --git a/pkg/cloudapi/lb/backend_delete.go b/pkg/cloudapi/lb/backend_delete.go index c3dd483..3a53a42 100644 --- a/pkg/cloudapi/lb/backend_delete.go +++ b/pkg/cloudapi/lb/backend_delete.go @@ -11,11 +11,11 @@ import ( type BackendDeleteRequest struct { // ID of the load balancer instance to BackendDelete // Required: true - LBID uint64 `url:"lbId"` + LBID uint64 `url:"lbId" json:"lbId"` // Cannot be emtpy string - name of the backend to delete // Required: true - BackendName string `url:"backendName"` + BackendName string `url:"backendName" json:"backendName"` } func (lbrq BackendDeleteRequest) validate() error { diff --git a/pkg/cloudapi/lb/backend_server_add.go b/pkg/cloudapi/lb/backend_server_add.go index 7e7df41..ea39da6 100644 --- a/pkg/cloudapi/lb/backend_server_add.go +++ b/pkg/cloudapi/lb/backend_server_add.go @@ -11,64 +11,64 @@ import ( type BackendServerAddRequest struct { // ID of the load balancer instance to BackendServerAdd // Required: true - LBID uint64 `url:"lbId"` + LBID uint64 `url:"lbId" json:"lbId"` // Must match one of the existing backens - name of the backend to add servers to // Required: true - BackendName string `url:"backendName"` + BackendName string `url:"backendName" json:"backendName"` // Must be unique among all servers defined for this backend - name of the server definition to add // Required: true - ServerName string `url:"serverName"` + ServerName string `url:"serverName" json:"serverName"` // IP address of the server // Required: true - Address string `url:"address"` + Address string `url:"address" json:"address"` // Port number on the server // Required: true - Port uint64 `url:"port"` + Port uint64 `url:"port" json:"port"` // Set to disabled if this server should be used regardless of its state // Required: false - Check string `url:"check,omitempty"` + Check string `url:"check,omitempty" json:"check,omitempty"` // Interval in milliseconds between two consecutive availability checks of the server that is considered available // Required: false - Inter uint64 `url:"inter,omitempty"` + Inter uint64 `url:"inter,omitempty" json:"inter,omitempty"` // Interval in milliseconds between two consecutive checks to restore // the availability of a server that is currently considered unavailable // Required: false - DownInter uint64 `url:"downinter,omitempty"` + DownInter uint64 `url:"downinter,omitempty" json:"downinter,omitempty"` // Number of checks that the server must pass in order to get // the available status and be included in the balancing scheme again // Required: false - Rise uint64 `url:"rise,omitempty"` + Rise uint64 `url:"rise,omitempty" json:"rise,omitempty"` // Number of consecutive failed availability checks, // after which the previously considered available server receives the status of unavailable and // is temporarily excluded from the balancing scheme // Required: false - Fall uint64 `url:"fall,omitempty"` + Fall uint64 `url:"fall,omitempty" json:"fall,omitempty"` // Interval in milliseconds from the moment the server receives the available status, // after which the number of actually allowed connections to this server will be returned to 100% of the set limit // Required: false - SlowStart uint64 `url:"slowstart,omitempty"` + SlowStart uint64 `url:"slowstart,omitempty" json:"slowstart,omitempty"` // Limit of simultaneous connections to the server. When this limit is reached, the server is temporarily excluded from the balancing scheme // Required: false - MaxConn uint64 `url:"maxconn,omitempty"` + MaxConn uint64 `url:"maxconn,omitempty" json:"maxconn,omitempty"` // Limit of connections waiting in the queue. When this limit is reached, all subsequent connections will be forwarded to other servers // Required: false - MaxQueue uint64 `url:"maxqueue,omitempty"` + MaxQueue uint64 `url:"maxqueue,omitempty" json:"maxqueue,omitempty"` // Server weight for use in weight balancing algorithms // Required: false - Weight uint64 `url:"weight,omitempty"` + Weight uint64 `url:"weight,omitempty" json:"weight,omitempty"` } func (lbrq BackendServerAddRequest) validate() error { diff --git a/pkg/cloudapi/lb/backend_server_delete.go b/pkg/cloudapi/lb/backend_server_delete.go index 6edd9d0..c96c2cc 100644 --- a/pkg/cloudapi/lb/backend_server_delete.go +++ b/pkg/cloudapi/lb/backend_server_delete.go @@ -11,15 +11,15 @@ import ( type BackendServerDeleteRequest struct { // ID of the load balancer instance to BackendServerDelete // Required: true - LBID uint64 `url:"lbId"` + LBID uint64 `url:"lbId" json:"lbId"` // Must match one of the existing backens - name of the backend to add servers to // Required: true - BackendName string `url:"backendName"` + BackendName string `url:"backendName" json:"backendName"` // Must be unique among all servers defined for this backend - name of the server definition to add // Required: true - ServerName string `url:"serverName"` + ServerName string `url:"serverName" json:"serverName"` } func (lbrq BackendServerDeleteRequest) validate() error { diff --git a/pkg/cloudapi/lb/backend_server_update.go b/pkg/cloudapi/lb/backend_server_update.go index d003d2d..c08a500 100644 --- a/pkg/cloudapi/lb/backend_server_update.go +++ b/pkg/cloudapi/lb/backend_server_update.go @@ -11,64 +11,64 @@ import ( type BackendServerUpdateRequest struct { // ID of the load balancer instance to BackendServerAdd // Required: true - LBID uint64 `url:"lbId"` + LBID uint64 `url:"lbId" json:"lbId"` // Must match one of the existing backens - name of the backend to add servers to // Required: true - BackendName string `url:"backendName"` + BackendName string `url:"backendName" json:"backendName"` // Must be unique among all servers defined for this backend - name of the server definition to add // Required: true - ServerName string `url:"serverName"` + ServerName string `url:"serverName" json:"serverName"` // IP address of the server // Required: true - Address string `url:"address"` + Address string `url:"address" json:"address"` // Port number on the server // Required: true - Port uint64 `url:"port"` + Port uint64 `url:"port" json:"port"` // Set to disabled if this server should be used regardless of its state // Required: false - Check string `url:"check,omitempty"` + Check string `url:"check,omitempty" json:"check,omitempty"` // Interval in milliseconds between two consecutive availability checks of the server that is considered available // Required: false - Inter uint64 `url:"inter,omitempty"` + Inter uint64 `url:"inter,omitempty" json:"inter,omitempty"` // Interval in milliseconds between two consecutive checks to restore // the availability of a server that is currently considered unavailable // Required: false - DownInter uint64 `url:"downinter,omitempty"` + DownInter uint64 `url:"downinter,omitempty" json:"downinter,omitempty"` // Number of checks that the server must pass in order to get // the available status and be included in the balancing scheme again // Required: false - Rise uint64 `url:"rise,omitempty"` + Rise uint64 `url:"rise,omitempty" json:"rise,omitempty"` // Number of consecutive failed availability checks, // after which the previously considered available server receives the status of unavailable and // is temporarily excluded from the balancing scheme // Required: false - Fall uint64 `url:"fall,omitempty"` + Fall uint64 `url:"fall,omitempty" json:"fall,omitempty"` // Interval in milliseconds from the moment the server receives the available status, // after which the number of actually allowed connections to this server will be returned to 100% of the set limit // Required: false - SlowStart uint64 `url:"slowstart,omitempty"` + SlowStart uint64 `url:"slowstart,omitempty" json:"slowstart,omitempty"` // Limit of simultaneous connections to the server. When this limit is reached, the server is temporarily excluded from the balancing scheme // Required: false - MaxConn uint64 `url:"maxconn,omitempty"` + MaxConn uint64 `url:"maxconn,omitempty" json:"maxconn,omitempty"` // Limit of connections waiting in the queue. When this limit is reached, all subsequent connections will be forwarded to other servers // Required: false - MaxQueue uint64 `url:"maxqueue,omitempty"` + MaxQueue uint64 `url:"maxqueue,omitempty" json:"maxqueue,omitempty"` // Server weight for use in weight balancing algorithms // Required: false - Weight uint64 `url:"weight,omitempty"` + Weight uint64 `url:"weight,omitempty" json:"weight,omitempty"` } func (lbrq BackendServerUpdateRequest) validate() error { diff --git a/pkg/cloudapi/lb/backend_update.go b/pkg/cloudapi/lb/backend_update.go index 0af4073..6ad5592 100644 --- a/pkg/cloudapi/lb/backend_update.go +++ b/pkg/cloudapi/lb/backend_update.go @@ -11,11 +11,11 @@ import ( type BackendUpdateRequest struct { // ID of the load balancer instance to backendCreate // Required: true - LBID uint64 `url:"lbId"` + LBID uint64 `url:"lbId" json:"lbId"` // Must be unique among all backends of this load balancer - name of the new backend to create // Required: true - BackendName string `url:"backendName"` + BackendName string `url:"backendName" json:"backendName"` // Algorithm // Should be one of: @@ -23,47 +23,47 @@ type BackendUpdateRequest struct { // - static-rr // - leastconn // Required: false - Algorithm string `url:"algorithm,omitempty"` + Algorithm string `url:"algorithm,omitempty" json:"algorithm,omitempty"` // Interval in milliseconds between two consecutive availability // checks of the server that is considered available // Required: false - Inter uint64 `url:"inter,omitempty"` + Inter uint64 `url:"inter,omitempty" json:"inter,omitempty"` // Interval in milliseconds between two consecutive checks to // restore the availability of a server that is currently considered unavailable // Required: false - DownInter uint64 `url:"downinter,omitempty"` + DownInter uint64 `url:"downinter,omitempty" json:"downinter,omitempty"` // Number of checks that the server must pass in order to get the available status // and be included in the balancing scheme again // Required: false - Rise uint64 `url:"rise,omitempty"` + Rise uint64 `url:"rise,omitempty" json:"rise,omitempty"` // Number of consecutive failed availability checks, // after which the previously considered available server receives the status of // unavailable and is temporarily excluded from the balancing scheme // Required: false - Fall uint64 `url:"fall,omitempty"` + Fall uint64 `url:"fall,omitempty" json:"fall,omitempty"` // Interval in milliseconds from the moment the server receives the available status, // after which the number of actually allowed connections to this server will be returned to 100% of the set limit // Required: false - SlowStart uint64 `url:"slowstart,omitempty"` + SlowStart uint64 `url:"slowstart,omitempty" json:"slowstart,omitempty"` // Limit of simultaneous connections to the server. When this limit is reached, // the server is temporarily excluded from the balancing scheme // Required: false - MaxConn uint64 `url:"maxconn,omitempty"` + MaxConn uint64 `url:"maxconn,omitempty" json:"maxconn,omitempty"` // Limit of connections waiting in the queue. // When this limit is reached, all subsequent connections will be forwarded to other servers // Required: false - MaxQueue uint64 `url:"maxqueue,omitempty"` + MaxQueue uint64 `url:"maxqueue,omitempty" json:"maxqueue,omitempty"` // Server weight for use in weight balancing algorithms // Required: false - Weight uint64 `url:"weight,omitempty"` + Weight uint64 `url:"weight,omitempty" json:"weight,omitempty"` } func (lbrq BackendUpdateRequest) validate() error { diff --git a/pkg/cloudapi/lb/config_reset.go b/pkg/cloudapi/lb/config_reset.go index b1a024f..5b718dc 100644 --- a/pkg/cloudapi/lb/config_reset.go +++ b/pkg/cloudapi/lb/config_reset.go @@ -11,7 +11,7 @@ import ( type ConfigResetRequest struct { // ID of the load balancer instance to ConfigReset // Required: true - LBID uint64 `url:"lbId"` + LBID uint64 `url:"lbId" json:"lbId"` } func (lbrq ConfigResetRequest) validate() error { diff --git a/pkg/cloudapi/lb/create.go b/pkg/cloudapi/lb/create.go index a760c54..4baad6e 100644 --- a/pkg/cloudapi/lb/create.go +++ b/pkg/cloudapi/lb/create.go @@ -11,28 +11,28 @@ import ( type CreateRequest struct { // ID of the resource group where this load balancer instance will be located // Required: true - RGID uint64 `url:"rgId"` + RGID uint64 `url:"rgId" json:"rgId"` // Name of the load balancer. // Must be unique among all load balancers in this Resource Group // Required: true - Name string `url:"name"` + Name string `url:"name" json:"name"` // External network to connect this load balancer to // Required: true - ExtNetID uint64 `url:"extnetId"` + ExtNetID uint64 `url:"extnetId" json:"extnetId"` // Internal network (VINS) to connect this load balancer to // Required: true - VINSID uint64 `url:"vinsId"` + VINSID uint64 `url:"vinsId" json:"vinsId"` // Start now Load balancer // Required: false - Start bool `url:"start"` + Start bool `url:"start" json:"start"` // Text description of this load balancer // Required: false - Description string `url:"desc,omitempty"` + Description string `url:"desc,omitempty" json:"desc,omitempty"` } func (lbrq CreateRequest) validate() error { diff --git a/pkg/cloudapi/lb/delete.go b/pkg/cloudapi/lb/delete.go index ea8bb94..46eafdb 100644 --- a/pkg/cloudapi/lb/delete.go +++ b/pkg/cloudapi/lb/delete.go @@ -11,11 +11,11 @@ import ( type DeleteRequest struct { // ID of the load balancer instance to delete // Required: true - LBID uint64 `url:"lbId"` + LBID uint64 `url:"lbId" json:"lbId"` // Set to true to delete load balancer immediately bypassing recycle bin // Required: false - Permanently bool `url:"permanently,omitempty"` + Permanently bool `url:"permanently,omitempty" json:"permanently,omitempty"` } func (lbrq DeleteRequest) validate() error { diff --git a/pkg/cloudapi/lb/disable_enable.go b/pkg/cloudapi/lb/disable_enable.go index e2dca40..8742bab 100644 --- a/pkg/cloudapi/lb/disable_enable.go +++ b/pkg/cloudapi/lb/disable_enable.go @@ -11,7 +11,7 @@ import ( type DisableEnableRequest struct { // ID of the load balancer instance to disable/enable // Required: true - LBID uint64 `url:"lbId"` + LBID uint64 `url:"lbId" json:"lbId"` } func (lbrq DisableEnableRequest) validate() error { diff --git a/pkg/cloudapi/lb/frontend_bind.go b/pkg/cloudapi/lb/frontend_bind.go index b960df4..46fb125 100644 --- a/pkg/cloudapi/lb/frontend_bind.go +++ b/pkg/cloudapi/lb/frontend_bind.go @@ -11,26 +11,26 @@ import ( type FrontendBindRequest struct { // ID of the load balancer instance to FrontendBind // Required: true - LBID uint64 `url:"lbId"` + LBID uint64 `url:"lbId" json:"lbId"` // Name of the frontend to update // Required: true - FrontendName string `url:"frontendName"` + FrontendName string `url:"frontendName" json:"frontendName"` // Name of the binding to update // Required: true - BindingName string `url:"bindingName"` + BindingName string `url:"bindingName" json:"bindingName"` // If specified must be within the IP range of either Ext Net or ViNS, // where this load balancer is connected - new IP address to use for this binding. // If omitted, current IP address is retained // Required: false - BindingAddress string `url:"bindingAddress,omitempty"` + BindingAddress string `url:"bindingAddress,omitempty" json:"bindingAddress,omitempty"` // New port number to use for this binding. // If omitted, current port number is retained // Required: false - BindingPort uint64 `url:"bindingPort,omitempty"` + BindingPort uint64 `url:"bindingPort,omitempty" json:"bindingPort,omitempty"` } func (lbrq FrontendBindRequest) validate() error { diff --git a/pkg/cloudapi/lb/frontend_bind_delete.go b/pkg/cloudapi/lb/frontend_bind_delete.go index cddf789..1011bee 100644 --- a/pkg/cloudapi/lb/frontend_bind_delete.go +++ b/pkg/cloudapi/lb/frontend_bind_delete.go @@ -11,15 +11,15 @@ import ( type FrontendBindDeleteRequest struct { // ID of the load balancer instance to FrontendBindDelete // Required: true - LBID uint64 `url:"lbId"` + LBID uint64 `url:"lbId" json:"lbId"` // Name of the frontend to delete // Required: true - FrontendName string `url:"frontendName"` + FrontendName string `url:"frontendName" json:"frontendName"` // Name of the binding to delete // Required: true - BindingName string `url:"bindingName"` + BindingName string `url:"bindingName" json:"bindingName"` } func (lbrq FrontendBindDeleteRequest) validate() error { diff --git a/pkg/cloudapi/lb/frontend_bind_update.go b/pkg/cloudapi/lb/frontend_bind_update.go index 2ece2c3..3bcc115 100644 --- a/pkg/cloudapi/lb/frontend_bind_update.go +++ b/pkg/cloudapi/lb/frontend_bind_update.go @@ -11,26 +11,26 @@ import ( type FrontendBindUpdateRequest struct { // ID of the load balancer instance to FrontendBindUpdate // Required: true - LBID uint64 `url:"lbId"` + LBID uint64 `url:"lbId" json:"lbId"` // Name of the frontend to update // Required: true - FrontendName string `url:"frontendName"` + FrontendName string `url:"frontendName" json:"frontendName"` // Name of the binding to update // Required: true - BindingName string `url:"bindingName"` + BindingName string `url:"bindingName" json:"bindingName"` // If specified must be within the IP range of either Ext Net or ViNS, // where this load balancer is connected - new IP address to use for this binding. // If omitted, current IP address is retained // Required: false - BindingAddress string `url:"bindingAddress,omitempty"` + BindingAddress string `url:"bindingAddress,omitempty" json:"bindingAddress,omitempty"` // New port number to use for this binding. // If omitted, current port number is retained // Required: false - BindingPort uint64 `url:"bindingPort,omitempty"` + BindingPort uint64 `url:"bindingPort,omitempty" json:"bindingPort,omitempty"` } func (lbrq FrontendBindUpdateRequest) validate() error { diff --git a/pkg/cloudapi/lb/frontend_create.go b/pkg/cloudapi/lb/frontend_create.go index c1d92a0..9d92ba6 100644 --- a/pkg/cloudapi/lb/frontend_create.go +++ b/pkg/cloudapi/lb/frontend_create.go @@ -11,17 +11,17 @@ import ( type FrontendCreateRequest struct { // ID of the load balancer instance to FrontendCreate // Required: true - LBID uint64 `url:"lbId"` + LBID uint64 `url:"lbId" json:"lbId"` // Must be unique among all frontends of // this load balancer - name of the new frontend to create // Required: true - FrontendName string `url:"frontendName"` + FrontendName string `url:"frontendName" json:"frontendName"` // Should be one of the backends existing on // this load balancer - name of the backend to use // Required: true - BackendName string `url:"backendName"` + BackendName string `url:"backendName" json:"backendName"` } func (lbrq FrontendCreateRequest) validate() error { diff --git a/pkg/cloudapi/lb/frontend_delete.go b/pkg/cloudapi/lb/frontend_delete.go index 2e3ce5c..7412ee8 100644 --- a/pkg/cloudapi/lb/frontend_delete.go +++ b/pkg/cloudapi/lb/frontend_delete.go @@ -11,11 +11,11 @@ import ( type FrontendDeleteRequest struct { // ID of the load balancer instance to FrontendDelete // Required: true - LBID uint64 `url:"lbId"` + LBID uint64 `url:"lbId" json:"lbId"` // Name of the frontend to delete // Required: true - FrontendName string `url:"frontendName"` + FrontendName string `url:"frontendName" json:"frontendName"` } func (lbrq FrontendDeleteRequest) validate() error { diff --git a/pkg/cloudapi/lb/get.go b/pkg/cloudapi/lb/get.go index ca09c20..63575ed 100644 --- a/pkg/cloudapi/lb/get.go +++ b/pkg/cloudapi/lb/get.go @@ -11,7 +11,7 @@ import ( type GetRequest struct { // ID of the load balancer to get details for // Required: true - LBID uint64 `url:"lbId"` + LBID uint64 `url:"lbId" json:"lbId"` } func (lbrq GetRequest) validate() error { diff --git a/pkg/cloudapi/lb/list.go b/pkg/cloudapi/lb/list.go index 9292ac0..48f777b 100644 --- a/pkg/cloudapi/lb/list.go +++ b/pkg/cloudapi/lb/list.go @@ -10,15 +10,15 @@ import ( type ListRequest struct { // Included deleted load balancers // Required: false - IncludeDeleted bool `url:"includedeleted,omitempty"` + IncludeDeleted bool `url:"includedeleted,omitempty" json:"includedeleted,omitempty"` // Page number // Required: false - Page uint64 `url:"page,omitempty"` + Page uint64 `url:"page,omitempty" json:"page,omitempty"` // Page size // Required: false - Size uint64 `url:"size,omitempty"` + Size uint64 `url:"size,omitempty" json:"size,omitempty"` } // List gets list all load balancers diff --git a/pkg/cloudapi/lb/list_deleted.go b/pkg/cloudapi/lb/list_deleted.go index 737d88c..95dd6b0 100644 --- a/pkg/cloudapi/lb/list_deleted.go +++ b/pkg/cloudapi/lb/list_deleted.go @@ -10,11 +10,11 @@ import ( type ListDeletedRequest struct { // Page number // Required: false - Page uint64 `url:"page,omitempty"` + Page uint64 `url:"page,omitempty" json:"page,omitempty"` // Page size // Required: true - Size uint64 `url:"size,omitempty"` + Size uint64 `url:"size,omitempty" json:"size,omitempty"` } // ListDeleted gets list of deleted load balancers diff --git a/pkg/cloudapi/lb/restart.go b/pkg/cloudapi/lb/restart.go index 172b9bf..84f48de 100644 --- a/pkg/cloudapi/lb/restart.go +++ b/pkg/cloudapi/lb/restart.go @@ -11,7 +11,7 @@ import ( type RestartRequest struct { // ID of the load balancer instance to restart // Required: true - LBID uint64 `url:"lbId"` + LBID uint64 `url:"lbId" json:"lbId"` } func (lbrq RestartRequest) validate() error { diff --git a/pkg/cloudapi/lb/restore.go b/pkg/cloudapi/lb/restore.go index 92511f8..67c8ac6 100644 --- a/pkg/cloudapi/lb/restore.go +++ b/pkg/cloudapi/lb/restore.go @@ -11,7 +11,7 @@ import ( type RestoreRequest struct { // ID of the load balancer instance to restore // Required: true - LBID uint64 `url:"lbId"` + LBID uint64 `url:"lbId" json:"lbId"` } func (lbrq RestoreRequest) validate() error { diff --git a/pkg/cloudapi/lb/start.go b/pkg/cloudapi/lb/start.go index 149a1a6..850ba79 100644 --- a/pkg/cloudapi/lb/start.go +++ b/pkg/cloudapi/lb/start.go @@ -11,7 +11,7 @@ import ( type StartRequest struct { // ID of the load balancer instance to start // Required: true - LBID uint64 `url:"lbId"` + LBID uint64 `url:"lbId" json:"lbId"` } func (lbrq StartRequest) validate() error { diff --git a/pkg/cloudapi/lb/stop.go b/pkg/cloudapi/lb/stop.go index 138c304..ca068de 100644 --- a/pkg/cloudapi/lb/stop.go +++ b/pkg/cloudapi/lb/stop.go @@ -11,7 +11,7 @@ import ( type StopRequest struct { // ID of the load balancer instance to stop // Required: true - LBID uint64 `url:"lbId"` + LBID uint64 `url:"lbId" json:"lbId"` } func (lbrq StopRequest) validate() error { diff --git a/pkg/cloudapi/lb/update.go b/pkg/cloudapi/lb/update.go index e21a8b5..c1627c0 100644 --- a/pkg/cloudapi/lb/update.go +++ b/pkg/cloudapi/lb/update.go @@ -11,12 +11,12 @@ import ( type UpdateRequest struct { // ID of the load balancer to update // Required: true - LBID uint64 `url:"lbId"` + LBID uint64 `url:"lbId" json:"lbId"` // New description of this load balancer. // If omitted, current description is retained // Required: true - Description string `url:"desc"` + Description string `url:"desc" json:"desc"` } func (lbrq UpdateRequest) validate() error { diff --git a/pkg/cloudapi/locations/list.go b/pkg/cloudapi/locations/list.go index e79bc94..ec3254d 100644 --- a/pkg/cloudapi/locations/list.go +++ b/pkg/cloudapi/locations/list.go @@ -10,11 +10,11 @@ import ( type ListRequest struct { // Page number // Required: false - Page uint64 `url:"page,omitempty"` + Page uint64 `url:"page,omitempty" json:"page,omitempty"` // Page size // Required: false - Size uint64 `url:"size,omitempty"` + Size uint64 `url:"size,omitempty" json:"size,omitempty"` } // List gets list all locations diff --git a/pkg/cloudapi/rg/access_grant.go b/pkg/cloudapi/rg/access_grant.go index ff676f1..f2363ea 100644 --- a/pkg/cloudapi/rg/access_grant.go +++ b/pkg/cloudapi/rg/access_grant.go @@ -13,22 +13,22 @@ import ( type AccessGrantRequest struct { // Resource group ID // Required: true - RGID uint64 `url:"rgId"` + RGID uint64 `url:"rgId" json:"rgId"` // User or group name to grant access // Required: true - User string `url:"user"` + User string `url:"user" json:"user"` // Access rights to set, one of: // - "R" // - "RCX" // - "ARCXDU" // Required: true - Right string `url:"right"` + Right string `url:"right" json:"right"` // Reason for action // Required: false - Reason string `url:"reason,omitempty"` + Reason string `url:"reason,omitempty" json:"reason,omitempty"` } func (rgrq AccessGrantRequest) validate() error { diff --git a/pkg/cloudapi/rg/access_revoke.go b/pkg/cloudapi/rg/access_revoke.go index 5ab9abd..fb72dd3 100644 --- a/pkg/cloudapi/rg/access_revoke.go +++ b/pkg/cloudapi/rg/access_revoke.go @@ -11,15 +11,15 @@ import ( type AccessRevokeRequest struct { // Resource group ID // Required: true - RGID uint64 `url:"rgId"` + RGID uint64 `url:"rgId" json:"rgId"` // User or group name to revoke access // Required: true - User string `url:"user"` + User string `url:"user" json:"user"` // Reason for action // Required: false - Reason string `url:"reason,omitempty"` + Reason string `url:"reason,omitempty" json:"reason,omitempty"` } func (rgrq AccessRevokeRequest) validate() error { diff --git a/pkg/cloudapi/rg/affinity_group_computes.go b/pkg/cloudapi/rg/affinity_group_computes.go index 656c220..cf7cb70 100644 --- a/pkg/cloudapi/rg/affinity_group_computes.go +++ b/pkg/cloudapi/rg/affinity_group_computes.go @@ -11,11 +11,11 @@ import ( type AffinityGroupComputesRequest struct { // Resource group ID // Required: true - RGID uint64 `url:"rgId"` + RGID uint64 `url:"rgId" json:"rgId"` // Affinity group label // Required: true - AffinityGroup string `url:"affinityGroup"` + AffinityGroup string `url:"affinityGroup" json:"affinityGroup"` } func (rgrq AffinityGroupComputesRequest) validate() error { diff --git a/pkg/cloudapi/rg/affinity_groups_get.go b/pkg/cloudapi/rg/affinity_groups_get.go index f8d46c8..00bf8c3 100644 --- a/pkg/cloudapi/rg/affinity_groups_get.go +++ b/pkg/cloudapi/rg/affinity_groups_get.go @@ -11,11 +11,11 @@ import ( type AffinityGroupsGetRequest struct { // Resource group ID // Required: true - RGID uint64 `url:"rgId"` + RGID uint64 `url:"rgId" json:"rgId"` // Label affinity group // Required: true - AffinityGroup string `url:"affinityGroup"` + AffinityGroup string `url:"affinityGroup" json:"affinityGroup"` } func (rgrq AffinityGroupsGetRequest) validate() error { diff --git a/pkg/cloudapi/rg/affinity_groups_list.go b/pkg/cloudapi/rg/affinity_groups_list.go index 7213074..f42bfbf 100644 --- a/pkg/cloudapi/rg/affinity_groups_list.go +++ b/pkg/cloudapi/rg/affinity_groups_list.go @@ -11,7 +11,7 @@ import ( type AffinityGroupsListRequest struct { // Resource group ID // Required: true - RGID uint64 `url:"rgId"` + RGID uint64 `url:"rgId" json:"rgId"` } func (rgrq AffinityGroupsListRequest) validate() error { diff --git a/pkg/cloudapi/rg/audits.go b/pkg/cloudapi/rg/audits.go index a5aee7e..feb1fa7 100644 --- a/pkg/cloudapi/rg/audits.go +++ b/pkg/cloudapi/rg/audits.go @@ -11,7 +11,7 @@ import ( type AuditsRequest struct { // Resource group ID // Required: true - RGID uint64 `url:"rgId"` + RGID uint64 `url:"rgId" json:"rgId"` } func (rgrq AuditsRequest) validate() error { diff --git a/pkg/cloudapi/rg/create.go b/pkg/cloudapi/rg/create.go index e1218d9..eab7a99 100644 --- a/pkg/cloudapi/rg/create.go +++ b/pkg/cloudapi/rg/create.go @@ -11,40 +11,40 @@ import ( type CreateRequest struct { // Account, which will own this resource group // Required: true - AccountID uint64 `url:"accountId"` + AccountID uint64 `url:"accountId" json:"accountId"` // Grid ID // Required: true - GID uint64 `url:"gid"` + GID uint64 `url:"gid" json:"gid"` // Name of this resource group. Must be unique within the account // Required: true - Name string `url:"name"` + Name string `url:"name" json:"name"` // Max size of memory in MB // Required: false - MaxMemoryCapacity int64 `url:"maxMemoryCapacity,omitempty"` + MaxMemoryCapacity int64 `url:"maxMemoryCapacity,omitempty" json:"maxMemoryCapacity,omitempty"` // Max size of aggregated virtual disks in GB // Required: false - MaxVDiskCapacity int64 `url:"maxVDiskCapacity,omitempty"` + MaxVDiskCapacity int64 `url:"maxVDiskCapacity,omitempty" json:"maxVDiskCapacity,omitempty"` // Max number of CPU cores // Required: false - MaxCPUCapacity int64 `url:"maxCPUCapacity,omitempty"` + MaxCPUCapacity int64 `url:"maxCPUCapacity,omitempty" json:"maxCPUCapacity,omitempty"` // Max sent/received network transfer peering // Required: false - MaxNetworkPeerTransfer int64 `url:"maxNetworkPeerTransfer,omitempty"` + MaxNetworkPeerTransfer int64 `url:"maxNetworkPeerTransfer,omitempty" json:"maxNetworkPeerTransfer,omitempty"` // Max number of assigned public IPs // Required: false - MaxNumPublicIP int64 `url:"maxNumPublicIP,omitempty"` + MaxNumPublicIP int64 `url:"maxNumPublicIP,omitempty" json:"maxNumPublicIP,omitempty"` // Username - owner of this resource group. // Leave blank to set current user as owner // Required: false - Owner string `url:"owner,omitempty"` + Owner string `url:"owner,omitempty" json:"owner,omitempty"` // Type of the default network for this resource group. // virtual machines created in this resource group will be by default connected to this network. @@ -53,31 +53,31 @@ type CreateRequest struct { // - PUBLIC // - NONE // Required: false - DefNet string `url:"def_net,omitempty"` + DefNet string `url:"def_net,omitempty" json:"def_net,omitempty"` // Private network IP CIDR if default network PRIVATE // Required: false - IPCIDR string `url:"ipcidr,omitempty"` + IPCIDR string `url:"ipcidr,omitempty" json:"ipcidr,omitempty"` // Text description of this resource group // Required: false - Description string `url:"desc,omitempty"` + Description string `url:"desc,omitempty" json:"desc,omitempty"` // Reason for action // Required: false - Reason string `url:"reason,omitempty"` + Reason string `url:"reason,omitempty" json:"reason,omitempty"` // External network ID // Required: false - ExtNetID uint64 `url:"extNetId,omitempty"` + ExtNetID uint64 `url:"extNetId,omitempty" json:"extNetId,omitempty"` // External IP address // Required: false - ExtIP string `url:"extIp,omitempty"` + ExtIP string `url:"extIp,omitempty" json:"extIp,omitempty"` // Register computes in registration system // Required: false - RegisterComputes bool `url:"registerComputes,omitempty"` + RegisterComputes bool `url:"registerComputes,omitempty" json:"registerComputes,omitempty"` } func (rgrq CreateRequest) validate() error { diff --git a/pkg/cloudapi/rg/delete.go b/pkg/cloudapi/rg/delete.go index eb76e1f..35500ac 100644 --- a/pkg/cloudapi/rg/delete.go +++ b/pkg/cloudapi/rg/delete.go @@ -11,20 +11,20 @@ import ( type DeleteRequest struct { // Resource group ID // Required: true - RGID uint64 `url:"rgId"` + RGID uint64 `url:"rgId" json:"rgId"` // Set to True if you want force delete non-empty resource group // Required: false - Force bool `url:"force,omitempty"` + Force bool `url:"force,omitempty" json:"force,omitempty"` // Set to True if you want to destroy resource group and all linked resources, if any, immediately. // Otherwise, they will be placed into recycle bin and could be restored later within recycle bin's purge period // Required: false - Permanently bool `url:"permanently,omitempty"` + Permanently bool `url:"permanently,omitempty" json:"permanently,omitempty"` // Reason for action // Required: false - Reason string `url:"reason,omitempty"` + Reason string `url:"reason,omitempty" json:"reason,omitempty"` } func (rgrq DeleteRequest) validate() error { diff --git a/pkg/cloudapi/rg/disable.go b/pkg/cloudapi/rg/disable.go index a5e7a9c..c26a3d3 100644 --- a/pkg/cloudapi/rg/disable.go +++ b/pkg/cloudapi/rg/disable.go @@ -11,11 +11,11 @@ import ( type DisableRequest struct { // Resource group ID // Required: true - RGID uint64 `url:"rgId"` + RGID uint64 `url:"rgId" json:"rgId"` // Reason for action // Required: false - Reason string `url:"reason,omitempty"` + Reason string `url:"reason,omitempty" json:"reason,omitempty"` } func (rgrq DisableRequest) validate() error { diff --git a/pkg/cloudapi/rg/enable.go b/pkg/cloudapi/rg/enable.go index 4e96c34..d4b2ad1 100644 --- a/pkg/cloudapi/rg/enable.go +++ b/pkg/cloudapi/rg/enable.go @@ -11,11 +11,11 @@ import ( type EnableRequest struct { // Resource group ID // Required: true - RGID uint64 `url:"rgId"` + RGID uint64 `url:"rgId" json:"rgId"` // Reason for action // Required: false - Reason string `url:"reason,omitempty"` + Reason string `url:"reason,omitempty" json:"reason,omitempty"` } func (rgrq EnableRequest) validate() error { diff --git a/pkg/cloudapi/rg/get.go b/pkg/cloudapi/rg/get.go index 362bf03..5790b45 100644 --- a/pkg/cloudapi/rg/get.go +++ b/pkg/cloudapi/rg/get.go @@ -11,11 +11,11 @@ import ( type GetRequest struct { // Resource group ID // Required: true - RGID uint64 `url:"rgId"` + RGID uint64 `url:"rgId" json:"rgId"` // Reason for action // Required: false - Reason string `url:"reason,omitempty"` + Reason string `url:"reason,omitempty" json:"reason,omitempty"` } func (rgrq GetRequest) validate() error { diff --git a/pkg/cloudapi/rg/list.go b/pkg/cloudapi/rg/list.go index 0040b87..9aa9694 100644 --- a/pkg/cloudapi/rg/list.go +++ b/pkg/cloudapi/rg/list.go @@ -10,15 +10,15 @@ import ( type ListRequest struct { // Included deleted resource groups // Required: false - IncludeDeleted bool `url:"includedeleted,omitempty"` + IncludeDeleted bool `url:"includedeleted,omitempty" json:"includedeleted,omitempty"` // Page number // Required: false - Page uint64 `url:"page,omitempty"` + Page uint64 `url:"page,omitempty" json:"page,omitempty"` // Page size // Required: false - Size uint64 `url:"size,omitempty"` + Size uint64 `url:"size,omitempty" json:"size,omitempty"` } // List gets list of all resource groups the user has access to diff --git a/pkg/cloudapi/rg/list_computes.go b/pkg/cloudapi/rg/list_computes.go index 0d88191..6de0edd 100644 --- a/pkg/cloudapi/rg/list_computes.go +++ b/pkg/cloudapi/rg/list_computes.go @@ -11,11 +11,11 @@ import ( type ListComputesRequest struct { // Resource group ID // Required: true - RGID uint64 `url:"rgId"` + RGID uint64 `url:"rgId" json:"rgId"` // Reason for action // Required: false - Reason string `url:"reason,omitempty"` + Reason string `url:"reason,omitempty" json:"reason,omitempty"` } func (rgrq ListComputesRequest) validate() error { diff --git a/pkg/cloudapi/rg/list_deleted.go b/pkg/cloudapi/rg/list_deleted.go index 568b735..1f059de 100644 --- a/pkg/cloudapi/rg/list_deleted.go +++ b/pkg/cloudapi/rg/list_deleted.go @@ -10,11 +10,11 @@ import ( type ListDeletedRequest struct { // Page number // Required: false - Page uint64 `url:"page,omitempty"` + Page uint64 `url:"page,omitempty" json:"page,omitempty"` // Page size // Required: false - Size uint64 `url:"size,omitempty"` + Size uint64 `url:"size,omitempty" json:"size,omitempty"` } // ListDeleted gets list all deleted resource groups the user has access to diff --git a/pkg/cloudapi/rg/list_lb.go b/pkg/cloudapi/rg/list_lb.go index a5ce14c..9940ac1 100644 --- a/pkg/cloudapi/rg/list_lb.go +++ b/pkg/cloudapi/rg/list_lb.go @@ -11,7 +11,7 @@ import ( type ListLBRequest struct { // Resource group ID // Required: true - RGID uint64 `url:"rgId"` + RGID uint64 `url:"rgId" json:"rgId"` } func (rgrq ListLBRequest) validate() error { diff --git a/pkg/cloudapi/rg/list_pfw.go b/pkg/cloudapi/rg/list_pfw.go index 651e595..f33b096 100644 --- a/pkg/cloudapi/rg/list_pfw.go +++ b/pkg/cloudapi/rg/list_pfw.go @@ -11,7 +11,7 @@ import ( type ListPFWRequest struct { // Resource group ID // Required: true - RGID uint64 `url:"rgId"` + RGID uint64 `url:"rgId" json:"rgId"` } func (rgrq ListPFWRequest) validate() error { diff --git a/pkg/cloudapi/rg/list_vins.go b/pkg/cloudapi/rg/list_vins.go index 18135d7..dd86398 100644 --- a/pkg/cloudapi/rg/list_vins.go +++ b/pkg/cloudapi/rg/list_vins.go @@ -11,11 +11,11 @@ import ( type ListVINSRequest struct { // Resource group ID // Required: true - RGID uint64 `url:"rgId"` + RGID uint64 `url:"rgId" json:"rgId"` // Reason for action // Required: false - Reason string `url:"reason,omitempty"` + Reason string `url:"reason,omitempty" json:"reason,omitempty"` } func (rgrq ListVINSRequest) validate() error { diff --git a/pkg/cloudapi/rg/restore.go b/pkg/cloudapi/rg/restore.go index e579b78..7f49024 100644 --- a/pkg/cloudapi/rg/restore.go +++ b/pkg/cloudapi/rg/restore.go @@ -11,11 +11,11 @@ import ( type RestoreRequest struct { // Resource group ID // Required: true - RGID uint64 `url:"rgId"` + RGID uint64 `url:"rgId" json:"rgId"` // Reason for action // Required: false - Reason string `url:"reason,omitempty"` + Reason string `url:"reason,omitempty" json:"reason,omitempty"` } func (rgrq RestoreRequest) validate() error { diff --git a/pkg/cloudapi/rg/set_def_net.go b/pkg/cloudapi/rg/set_def_net.go index 208573f..150df3e 100644 --- a/pkg/cloudapi/rg/set_def_net.go +++ b/pkg/cloudapi/rg/set_def_net.go @@ -13,22 +13,22 @@ import ( type SetDefNetRequest struct { // Resource group ID // Required: true - RGID uint64 `url:"rgId"` + RGID uint64 `url:"rgId" json:"rgId"` // Network type // Should be one of: // - "PUBLIC" // - "PRIVATE" // Required: true - NetType string `url:"netType"` + NetType string `url:"netType" json:"netType"` // Network ID // Required: false - NetID uint64 `url:"netId"` + NetID uint64 `url:"netId" json:"netId"` // Reason for action // Required: false - Reason string `url:"reason,omitempty"` + Reason string `url:"reason,omitempty" json:"reason,omitempty"` } func (rgrq SetDefNetRequest) validate() error { diff --git a/pkg/cloudapi/rg/update.go b/pkg/cloudapi/rg/update.go index 905bd5b..a738bdc 100644 --- a/pkg/cloudapi/rg/update.go +++ b/pkg/cloudapi/rg/update.go @@ -11,43 +11,43 @@ import ( type UpdateRequest struct { // Resource group ID // Required: true - RGID uint64 `url:"rgId"` + RGID uint64 `url:"rgId" json:"rgId"` // New name // Required: false - Name string `url:"name,omitempty"` + Name string `url:"name,omitempty" json:"name,omitempty"` // New description // Required: false - Description string `url:"desc,omitempty"` + Description string `url:"desc,omitempty" json:"desc,omitempty"` // Max size of memory in MB // Required: false - MaxMemoryCapacity uint64 `url:"maxMemoryCapacity,omitempty"` + MaxMemoryCapacity uint64 `url:"maxMemoryCapacity,omitempty" json:"maxMemoryCapacity,omitempty"` // Max size of aggregated virtual disks in GB // Required: false - MaxVDiskCapacity uint64 `url:"maxVDiskCapacity,omitempty"` + MaxVDiskCapacity uint64 `url:"maxVDiskCapacity,omitempty" json:"maxVDiskCapacity,omitempty"` // Max number of CPU cores // Required: false - MaxCPUCapacity uint64 `url:"maxCPUCapacity,omitempty"` + MaxCPUCapacity uint64 `url:"maxCPUCapacity,omitempty" json:"maxCPUCapacity,omitempty"` // Max sent/received network transfer peering // Required: false - MaxNetworkPeerTransfer uint64 `url:"maxNetworkPeerTransfer,omitempty"` + MaxNetworkPeerTransfer uint64 `url:"maxNetworkPeerTransfer,omitempty" json:"maxNetworkPeerTransfer,omitempty"` // Max number of assigned public IPs // Required: false - MaxNumPublicIP uint64 `url:"maxNumPublicIP,omitempty"` + MaxNumPublicIP uint64 `url:"maxNumPublicIP,omitempty" json:"maxNumPublicIP,omitempty"` // Register computes in registration system // Required: false - RegisterComputes bool `url:"registerComputes,omitempty"` + RegisterComputes bool `url:"registerComputes,omitempty" json:"registerComputes,omitempty"` // Reason for action // Required: false - Reason string `url:"reason,omitempty"` + Reason string `url:"reason,omitempty" json:"reason,omitempty"` } func (rgrq UpdateRequest) validate() error { diff --git a/pkg/cloudapi/rg/usage.go b/pkg/cloudapi/rg/usage.go index fec6d63..c338ff1 100644 --- a/pkg/cloudapi/rg/usage.go +++ b/pkg/cloudapi/rg/usage.go @@ -11,11 +11,11 @@ import ( type UsageRequest struct { // Resource group ID // Required: true - RGID uint64 `url:"rgId"` + RGID uint64 `url:"rgId" json:"rgId"` // Reason for action // Required: false - Reason string `url:"reason,omitempty"` + Reason string `url:"reason,omitempty" json:"reason,omitempty"` } func (rgrq UsageRequest) validate() error { diff --git a/pkg/cloudapi/sizes/list.go b/pkg/cloudapi/sizes/list.go index 26afa77..7a20db4 100644 --- a/pkg/cloudapi/sizes/list.go +++ b/pkg/cloudapi/sizes/list.go @@ -10,19 +10,19 @@ import ( type ListRequest struct { // ID of the cloudspace // Required: false - CloudspaceID uint64 `url:"cloudspaceId,omitempty"` + CloudspaceID uint64 `url:"cloudspaceId,omitempty" json:"cloudspaceId,omitempty"` // Location code for the sizes // Required: false - Location string `url:"location,omitempty"` + Location string `url:"location,omitempty" json:"location,omitempty"` // Page number // Required: false - Page uint64 `url:"page,omitempty"` + Page uint64 `url:"page,omitempty" json:"page,omitempty"` // Page size // Required: false - Size uint64 `url:"size,omitempty"` + Size uint64 `url:"size,omitempty" json:"size,omitempty"` } // List gets list the available flavors, filtering can be based on the user which is doing the request diff --git a/pkg/cloudapi/tasks/get.go b/pkg/cloudapi/tasks/get.go index fb15576..68f05b7 100644 --- a/pkg/cloudapi/tasks/get.go +++ b/pkg/cloudapi/tasks/get.go @@ -11,7 +11,7 @@ import ( type GetRequest struct { // ID of audit // Required: true - AuditID string `url:"auditId"` + AuditID string `url:"auditId" json:"auditId"` } func (trq GetRequest) validate() error { diff --git a/pkg/cloudapi/tasks/list.go b/pkg/cloudapi/tasks/list.go index 28f41d4..31d3983 100644 --- a/pkg/cloudapi/tasks/list.go +++ b/pkg/cloudapi/tasks/list.go @@ -10,11 +10,11 @@ import ( type ListRequest struct { // Page number // Required: false - Page uint64 `url:"page,omitempty"` + Page uint64 `url:"page,omitempty" json:"page,omitempty"` // Page size // Required: false - Size uint64 `url:"size,omitempty"` + Size uint64 `url:"size,omitempty" json:"size,omitempty"` } // List gets list user API tasks with status PROCESSING diff --git a/pkg/cloudapi/vins/audits.go b/pkg/cloudapi/vins/audits.go index 9d72c42..9fe3377 100644 --- a/pkg/cloudapi/vins/audits.go +++ b/pkg/cloudapi/vins/audits.go @@ -11,7 +11,7 @@ import ( type AuditsRequest struct { // ID of the VINS // Required: true - VINSID uint64 `url:"vinsId"` + VINSID uint64 `url:"vinsId" json:"vinsId"` } func (vrq AuditsRequest) validate() error { diff --git a/pkg/cloudapi/vins/create_in_account.go b/pkg/cloudapi/vins/create_in_account.go index c5521e5..3e71b33 100644 --- a/pkg/cloudapi/vins/create_in_account.go +++ b/pkg/cloudapi/vins/create_in_account.go @@ -11,27 +11,27 @@ import ( type CreateInAccountRequest struct { // VINS name // Required: true - Name string `url:"name"` + Name string `url:"name" json:"name"` // ID of account // Required: true - AccountID uint64 `url:"accountId"` + AccountID uint64 `url:"accountId" json:"accountId"` // Grid ID // Required: false - GID uint64 `url:"gid,omitempty"` + GID uint64 `url:"gid,omitempty" json:"gid,omitempty"` // Private network IP CIDR // Required: false - IPCIDR string `url:"ipcidr,omitempty"` + IPCIDR string `url:"ipcidr,omitempty" json:"ipcidr,omitempty"` // Description // Required: false - Description string `url:"desc,omitempty"` + Description string `url:"desc,omitempty" json:"desc,omitempty"` // Number of pre created reservations // Required: false - PreReservationsNum uint64 `url:"preReservationsNum,omitempty"` + PreReservationsNum uint64 `url:"preReservationsNum,omitempty" json:"preReservationsNum,omitempty"` } func (vrq CreateInAccountRequest) validate() error { diff --git a/pkg/cloudapi/vins/create_in_rg.go b/pkg/cloudapi/vins/create_in_rg.go index 39c834a..c9dfd05 100644 --- a/pkg/cloudapi/vins/create_in_rg.go +++ b/pkg/cloudapi/vins/create_in_rg.go @@ -11,31 +11,31 @@ import ( type CreateInRGRequest struct { // VINS name // Required: true - Name string `url:"name"` + Name string `url:"name" json:"name"` // Resource group ID // Required: true - RGID uint64 `url:"rgId"` + RGID uint64 `url:"rgId" json:"rgId"` // Private network IP CIDR // Required: false - IPCIDR string `url:"ipcidr,omitempty"` + IPCIDR string `url:"ipcidr,omitempty" json:"ipcidr,omitempty"` // External network ID // Required: false - ExtNetID uint64 `url:"extNetId,omitempty"` + ExtNetID uint64 `url:"extNetId,omitempty" json:"extNetId,omitempty"` // External IP, related only for extNetId >= 0 // Required: false - ExtIP string `url:"extIp,omitempty"` + ExtIP string `url:"extIp,omitempty" json:"extIp,omitempty"` // Description // Required: false - Description string `url:"desc,omitempty"` + Description string `url:"desc,omitempty" json:"desc,omitempty"` // Number of pre created reservations // Required: false - PreReservationsNum uint `url:"preReservationsNum,omitempty"` + PreReservationsNum uint `url:"preReservationsNum,omitempty" json:"preReservationsNum,omitempty"` } func (vrq CreateInRGRequest) validate() error { diff --git a/pkg/cloudapi/vins/delete.go b/pkg/cloudapi/vins/delete.go index fd24430..3645ea5 100644 --- a/pkg/cloudapi/vins/delete.go +++ b/pkg/cloudapi/vins/delete.go @@ -11,19 +11,19 @@ import ( type DeleteRequest struct { // VINS ID // Required: true - VINSID uint64 `url:"vinsId"` + VINSID uint64 `url:"vinsId" json:"vinsId"` // Set to True if you want force delete non-empty VINS. // Primarily, VINS is considered non-empty if it has virtual machines connected to it, // and force flag will detach them from the VINS being deleted. // Otherwise method will return an error // Required: false - Force bool `url:"force,omitempty"` + Force bool `url:"force,omitempty" json:"force,omitempty"` // Set to True if you want to destroy VINS and all linked resources, if any, immediately. // Otherwise, they will be placed into recycle bin and could be restored later within the recycle bin's purge period // Required: false - Permanently bool `url:"permanently,omitempty"` + Permanently bool `url:"permanently,omitempty" json:"permanently,omitempty"` } func (vrq DeleteRequest) validate() error { diff --git a/pkg/cloudapi/vins/disable_enable.go b/pkg/cloudapi/vins/disable_enable.go index 1595ff0..4957c70 100644 --- a/pkg/cloudapi/vins/disable_enable.go +++ b/pkg/cloudapi/vins/disable_enable.go @@ -11,7 +11,7 @@ import ( type DisableEnableRequest struct { // VINS ID // Required: true - VINSID uint64 `url:"vinsId"` + VINSID uint64 `url:"vinsId" json:"vinsId"` } func (vrq DisableEnableRequest) validate() error { diff --git a/pkg/cloudapi/vins/extnet_connect.go b/pkg/cloudapi/vins/extnet_connect.go index e6b9c62..316109b 100644 --- a/pkg/cloudapi/vins/extnet_connect.go +++ b/pkg/cloudapi/vins/extnet_connect.go @@ -11,15 +11,15 @@ import ( type ExtNetConnectRequest struct { // VINS ID // Required: true - VINSID uint64 `url:"vinsId"` + VINSID uint64 `url:"vinsId" json:"vinsId"` // External network ID // Required: false - NetID uint64 `url:"netId,omitempty"` + NetID uint64 `url:"netId,omitempty" json:"netId,omitempty"` // Directly set IP address // Required: false - IP string `url:"ip,omitempty"` + IP string `url:"ip,omitempty" json:"ip,omitempty"` } func (vrq ExtNetConnectRequest) validate() error { diff --git a/pkg/cloudapi/vins/extnet_disconnect.go b/pkg/cloudapi/vins/extnet_disconnect.go index 0b0e573..4fd58f0 100644 --- a/pkg/cloudapi/vins/extnet_disconnect.go +++ b/pkg/cloudapi/vins/extnet_disconnect.go @@ -11,7 +11,7 @@ import ( type ExtNetDisconnectRequest struct { // VINS ID // Required: true - VINSID uint64 `url:"vinsId"` + VINSID uint64 `url:"vinsId" json:"vinsId"` } func (vrq ExtNetDisconnectRequest) validate() error { diff --git a/pkg/cloudapi/vins/extnet_list.go b/pkg/cloudapi/vins/extnet_list.go index eceddc1..610c9b8 100644 --- a/pkg/cloudapi/vins/extnet_list.go +++ b/pkg/cloudapi/vins/extnet_list.go @@ -11,7 +11,7 @@ import ( type ExtNetListRequest struct { // VINS ID // Required: true - VINSID uint64 `url:"vinsId"` + VINSID uint64 `url:"vinsId" json:"vinsId"` } func (vrq ExtNetListRequest) validate() error { diff --git a/pkg/cloudapi/vins/get.go b/pkg/cloudapi/vins/get.go index 0fb222c..2c0dda4 100644 --- a/pkg/cloudapi/vins/get.go +++ b/pkg/cloudapi/vins/get.go @@ -11,7 +11,7 @@ import ( type GetRequest struct { // VINS ID // Required: true - VINSID uint64 `url:"vinsId"` + VINSID uint64 `url:"vinsId" json:"vinsId"` } func (vrq GetRequest) validate() error { diff --git a/pkg/cloudapi/vins/ip_list.go b/pkg/cloudapi/vins/ip_list.go index 069fb73..abba4ba 100644 --- a/pkg/cloudapi/vins/ip_list.go +++ b/pkg/cloudapi/vins/ip_list.go @@ -11,7 +11,7 @@ import ( type IPListRequest struct { // VINS ID // Required: true - VINSID uint64 `url:"vinsId"` + VINSID uint64 `url:"vinsId" json:"vinsId"` } func (vrq IPListRequest) validate() error { diff --git a/pkg/cloudapi/vins/ip_release.go b/pkg/cloudapi/vins/ip_release.go index 9e8708a..2df364b 100644 --- a/pkg/cloudapi/vins/ip_release.go +++ b/pkg/cloudapi/vins/ip_release.go @@ -11,15 +11,15 @@ import ( type IPReleaseRequest struct { // VINS ID // Required: true - VINSID uint64 `url:"vinsId"` + VINSID uint64 `url:"vinsId" json:"vinsId"` // IP address // Required: false - IPAddr string `url:"ipAddr,omitempty"` + IPAddr string `url:"ipAddr,omitempty" json:"ipAddr,omitempty"` // MAC address // Required: false - MAC string `url:"mac,omitempty"` + MAC string `url:"mac,omitempty" json:"mac,omitempty"` } func (vrq IPReleaseRequest) validate() error { diff --git a/pkg/cloudapi/vins/ip_reserve.go b/pkg/cloudapi/vins/ip_reserve.go index c6368db..09b953a 100644 --- a/pkg/cloudapi/vins/ip_reserve.go +++ b/pkg/cloudapi/vins/ip_reserve.go @@ -12,7 +12,7 @@ import ( type IPReserveRequest struct { // VINS ID // Required: true - VINSID uint64 `url:"vinsId"` + VINSID uint64 `url:"vinsId" json:"vinsId"` // Type of the reservation // Should be one of: @@ -20,23 +20,23 @@ type IPReserveRequest struct { // - VIP // - EXCLUDE // Required: true - Type string `url:"type"` + Type string `url:"type" json:"type"` // IP address to use. Non-empty string is required for type "EXCLUDE". // Ignored for types "DHCP" and "VIP". // Required: false - IPAddr string `url:"ipAddr,omitempty"` + IPAddr string `url:"ipAddr,omitempty" json:"ipAddr,omitempty"` // MAC address to associate with IP reservation. // Ignored for type "EXCLUDE", // non-empty string is required for "DHCP" and "VIP" // Required: false - MAC string `url:"mac,omitempty"` + MAC string `url:"mac,omitempty" json:"mac,omitempty"` // ID of the compute, associated with this reservation of type "DHCP". // Ignored for other types // Required: false - ComputeID uint64 `url:"computeId,omitempty"` + ComputeID uint64 `url:"computeId,omitempty" json:"computeId,omitempty"` } func (vrq IPReserveRequest) validate() error { diff --git a/pkg/cloudapi/vins/list.go b/pkg/cloudapi/vins/list.go index d607b11..937b6f8 100644 --- a/pkg/cloudapi/vins/list.go +++ b/pkg/cloudapi/vins/list.go @@ -10,15 +10,15 @@ import ( type ListRequest struct { // Include deleted // Required: false - IncludeDeleted bool `url:"includeDeleted,omitempty"` + IncludeDeleted bool `url:"includeDeleted,omitempty" json:"includeDeleted,omitempty"` // Page number // Required: false - Page uint64 `url:"page,omitempty"` + Page uint64 `url:"page,omitempty" json:"page,omitempty"` // Page size // Required: false - Size uint64 `url:"size,omitempty"` + Size uint64 `url:"size,omitempty" json:"size,omitempty"` } // List gets list of VINSes available for current user diff --git a/pkg/cloudapi/vins/list_deleted.go b/pkg/cloudapi/vins/list_deleted.go index 930952b..dcbb6af 100644 --- a/pkg/cloudapi/vins/list_deleted.go +++ b/pkg/cloudapi/vins/list_deleted.go @@ -10,11 +10,11 @@ import ( type ListDeletedRequest struct { // Page number // Required: false - Page uint64 `url:"page,omitempty"` + Page uint64 `url:"page,omitempty" json:"page,omitempty"` // Page size // Required: false - Size uint64 `url:"size,omitempty"` + Size uint64 `url:"size,omitempty" json:"size,omitempty"` } // ListDeleted gets list of deleted VINSes available for current user diff --git a/pkg/cloudapi/vins/nat_rule_add.go b/pkg/cloudapi/vins/nat_rule_add.go index 02df2f3..f56f7b7 100644 --- a/pkg/cloudapi/vins/nat_rule_add.go +++ b/pkg/cloudapi/vins/nat_rule_add.go @@ -11,30 +11,30 @@ import ( type NATRuleAddRequest struct { // VINS ID // Required: true - VINSID uint64 `url:"vinsId"` + VINSID uint64 `url:"vinsId" json:"vinsId"` // Internal IP address to apply this rule to // Required: true - IntIP string `url:"intIp "` + IntIP string `url:"intIp" json:"intIp"` // Internal IP port number to use for this rule // Required: true - IntPort uint `url:"intPort"` + IntPort uint `url:"intPort" json:"intPort"` // External IP start port to use for this rule // Required: true - ExtPortStart uint `url:"extPortStart"` + ExtPortStart uint `url:"extPortStart" json:"extPortStart"` // External IP end port to use for this rule // Required: false - ExtPortEnd uint `url:"extPortEnd,omitempty"` + ExtPortEnd uint `url:"extPortEnd,omitempty" json:"extPortEnd,omitempty"` // IP protocol type // Should be one of: // - "tcp" // - "udp" // Required: false - Proto string `url:"proto,omitempty"` + Proto string `url:"proto,omitempty" json:"proto,omitempty"` } func (vrq NATRuleAddRequest) validate() error { diff --git a/pkg/cloudapi/vins/nat_rule_del.go b/pkg/cloudapi/vins/nat_rule_del.go index 9eba720..8e57ced 100644 --- a/pkg/cloudapi/vins/nat_rule_del.go +++ b/pkg/cloudapi/vins/nat_rule_del.go @@ -11,12 +11,12 @@ import ( type NATRuleDelRequest struct { // VINS ID // Required: true - VINSID uint64 `url:"vinsId"` + VINSID uint64 `url:"vinsId" json:"vinsId"` // ID of the rule to delete. // Pass -1 to clear all rules at once // Required: true - RuleID uint64 `url:"ruleId"` + RuleID uint64 `url:"ruleId" json:"ruleId"` } func (vrq NATRuleDelRequest) validate() error { diff --git a/pkg/cloudapi/vins/nat_rule_list.go b/pkg/cloudapi/vins/nat_rule_list.go index b4afe9c..3d8ffe0 100644 --- a/pkg/cloudapi/vins/nat_rule_list.go +++ b/pkg/cloudapi/vins/nat_rule_list.go @@ -11,7 +11,7 @@ import ( type NATRuleListRequest struct { // VINS ID // Required: true - VINSID uint64 `url:"vinsId"` + VINSID uint64 `url:"vinsId" json:"vinsId"` } func (vrq NATRuleListRequest) validate() error { diff --git a/pkg/cloudapi/vins/restore.go b/pkg/cloudapi/vins/restore.go index a15f555..59ac8e0 100644 --- a/pkg/cloudapi/vins/restore.go +++ b/pkg/cloudapi/vins/restore.go @@ -11,7 +11,7 @@ import ( type RestoreRequest struct { // VINS ID // Required: true - VINSID uint64 `url:"vinsId"` + VINSID uint64 `url:"vinsId" json:"vinsId"` } func (vrq RestoreRequest) validate() error { diff --git a/pkg/cloudapi/vins/search.go b/pkg/cloudapi/vins/search.go index 3122c2c..0e81cc9 100644 --- a/pkg/cloudapi/vins/search.go +++ b/pkg/cloudapi/vins/search.go @@ -10,19 +10,19 @@ import ( type SearchRequest struct { // ID of the account to search for the ViNSes // Required: false - AccountID uint64 `url:"accountId,omitempty"` + AccountID uint64 `url:"accountId,omitempty" json:"accountId,omitempty"` // ID of the resource group to limit search to the specified RG level only // Required: false - RGID uint64 `url:"rgId,omitempty"` + RGID uint64 `url:"rgId,omitempty" json:"rgId,omitempty"` // Name of the ViNS to search for // Required: false - Name string `url:"name,omitempty"` + Name string `url:"name,omitempty" json:"name,omitempty"` // If False, then VINSes having one of the statuses are not listed for // Required: false - ShowAll bool `url:"show_all,omitempty"` + ShowAll bool `url:"show_all,omitempty" json:"show_all,omitempty"` } // Search search VINSes diff --git a/pkg/cloudapi/vins/vnfdev_redeploy.go b/pkg/cloudapi/vins/vnfdev_redeploy.go index 7fa6ef5..f08d322 100644 --- a/pkg/cloudapi/vins/vnfdev_redeploy.go +++ b/pkg/cloudapi/vins/vnfdev_redeploy.go @@ -11,7 +11,7 @@ import ( type VNFDevRedeployRequest struct { // VINS ID // Required: true - VINSID uint64 `url:"vinsId"` + VINSID uint64 `url:"vinsId" json:"vinsId"` } func (vrq VNFDevRedeployRequest) validate() error { diff --git a/pkg/cloudapi/vins/vnfdev_restart.go b/pkg/cloudapi/vins/vnfdev_restart.go index d858d8a..6a1a7a8 100644 --- a/pkg/cloudapi/vins/vnfdev_restart.go +++ b/pkg/cloudapi/vins/vnfdev_restart.go @@ -11,7 +11,7 @@ import ( type VNFDevRestartRequest struct { // VINS ID // Required: true - VINSID uint64 `url:"vinsId"` + VINSID uint64 `url:"vinsId" json:"vinsId"` } func (vrq VNFDevRestartRequest) validate() error { diff --git a/pkg/cloudbroker/account/add_user.go b/pkg/cloudbroker/account/add_user.go index b3d8fe6..a44435a 100644 --- a/pkg/cloudbroker/account/add_user.go +++ b/pkg/cloudbroker/account/add_user.go @@ -13,18 +13,18 @@ import ( type AddUserRequest struct { // ID of account to add to // Required: true - AccountID uint64 `url:"accountId"` + AccountID uint64 `url:"accountId" json:"accountId"` // Name of the user to be given rights // Required: true - UserName string `url:"username"` + UserName string `url:"username" json:"username"` // Account permission types: // - 'R' for read only access // - 'RCX' for Write // - 'ARCXDU' for Admin // Required: true - AccessType string `url:"accesstype"` + AccessType string `url:"accesstype" json:"accesstype"` } func (arq AddUserRequest) validate() error { diff --git a/pkg/cloudbroker/account/audits.go b/pkg/cloudbroker/account/audits.go index e1fa7d8..2024e5b 100644 --- a/pkg/cloudbroker/account/audits.go +++ b/pkg/cloudbroker/account/audits.go @@ -11,7 +11,7 @@ import ( type AuditsRequest struct { // ID of the account // Required: true - AccountID uint64 `url:"accountId"` + AccountID uint64 `url:"accountId" json:"accountId"` } func (arq AuditsRequest) validate() error { diff --git a/pkg/cloudbroker/account/create.go b/pkg/cloudbroker/account/create.go index 53080ae..49ea155 100644 --- a/pkg/cloudbroker/account/create.go +++ b/pkg/cloudbroker/account/create.go @@ -11,48 +11,48 @@ import ( type CreateRequest struct { // Display name // Required: true - Name string `url:"name"` + Name string `url:"name" json:"name"` // Name of the account // Required: true - Username string `url:"username"` + Username string `url:"username" json:"username"` // Email // Required: false - EmailAddress string `url:"emailaddress,omitempty"` + EmailAddress string `url:"emailaddress,omitempty" json:"emailaddress,omitempty"` // Max size of memory in MB // Required: false - MaxMemoryCapacity int64 `url:"maxMemoryCapacity,omitempty"` + MaxMemoryCapacity int64 `url:"maxMemoryCapacity,omitempty" json:"maxMemoryCapacity,omitempty"` // Max size of aggregated vdisks in GB // Required: false - MaxVDiskCapacity int64 `url:"maxVDiskCapacity,omitempty"` + MaxVDiskCapacity int64 `url:"maxVDiskCapacity,omitempty" json:"maxVDiskCapacity,omitempty"` // Max number of CPU cores // Required: false - MaxCPUCapacity int64 `url:"maxCPUCapacity,omitempty"` + MaxCPUCapacity int64 `url:"maxCPUCapacity,omitempty" json:"maxCPUCapacity,omitempty"` // Max sent/received network transfer peering // Required: false - MaxNetworkPeerTransfer int64 `url:"maxNetworkPeerTransfer,omitempty"` + MaxNetworkPeerTransfer int64 `url:"maxNetworkPeerTransfer,omitempty" json:"maxNetworkPeerTransfer,omitempty"` // Max number of assigned public IPs // Required: false - MaxNumPublicIP int64 `url:"maxNumPublicIP,omitempty"` + MaxNumPublicIP int64 `url:"maxNumPublicIP,omitempty" json:"maxNumPublicIP,omitempty"` // If true send emails when a user is granted access to resources // Required: false - SendAccessEmails bool `url:"sendAccessEmails,omitempty"` + SendAccessEmails bool `url:"sendAccessEmails,omitempty" json:"sendAccessEmails,omitempty"` // Limit (positive) or disable (0) GPU resources // Required: false - GPUUnits int64 `url:"gpu_units,omitempty"` + GPUUnits int64 `url:"gpu_units,omitempty" json:"gpu_units,omitempty"` // List of strings with pools // i.e.: ["sep1_poolName1", "sep2_poolName2", etc] // Required: false - UniqPools []string `url:"uniqPools,omitempty"` + UniqPools []string `url:"uniqPools,omitempty" json:"uniqPools,omitempty"` } func (arq CreateRequest) validate() error { diff --git a/pkg/cloudbroker/account/delete.go b/pkg/cloudbroker/account/delete.go index 69c4c28..4a00c5e 100644 --- a/pkg/cloudbroker/account/delete.go +++ b/pkg/cloudbroker/account/delete.go @@ -10,15 +10,15 @@ import ( type DeleteRequest struct { // ID of account to delete // Required: true - AccountID uint64 `url:"accountId"` + AccountID uint64 `url:"accountId" json:"accountId"` // Reason to delete // Required: true - Reason string `url:"reason"` + Reason string `url:"reason" json:"reason"` // Whether to completely delete the account // Required: false - Permanently bool `url:"permanently,omitempty"` + Permanently bool `url:"permanently,omitempty" json:"permanently,omitempty"` } func (arq DeleteRequest) validate() error { diff --git a/pkg/cloudbroker/account/delete_accounts.go b/pkg/cloudbroker/account/delete_accounts.go index 88e152a..aece37a 100644 --- a/pkg/cloudbroker/account/delete_accounts.go +++ b/pkg/cloudbroker/account/delete_accounts.go @@ -10,15 +10,15 @@ import ( type DeleteAccountsRequest struct { // IDs of accounts // Required: true - AccountsIDs []uint64 `url:"accountIds"` + AccountsIDs []uint64 `url:"accountIds" json:"accountIds"` // Reason for deletion // Required: true - Reason string `url:"reason"` + Reason string `url:"reason" json:"reason"` // Whether to completely destroy accounts or not // Required: false - Permanently bool `url:"permanently,omitempty"` + Permanently bool `url:"permanently,omitempty" json:"permanently,omitempty"` } func (arq DeleteAccountsRequest) validate() error { diff --git a/pkg/cloudbroker/account/delete_user.go b/pkg/cloudbroker/account/delete_user.go index 1fdad92..c6595ce 100644 --- a/pkg/cloudbroker/account/delete_user.go +++ b/pkg/cloudbroker/account/delete_user.go @@ -11,15 +11,15 @@ import ( type DeleteUserRequest struct { // ID of the account // Required: true - AccountID uint64 `url:"accountId"` + AccountID uint64 `url:"accountId" json:"accountId"` // ID or emailaddress of the user to remove // Required: true - UserName string `url:"username"` + UserName string `url:"username" json:"username"` // Recursively revoke access rights from owned cloudspaces and vmachines // Required: false - RecursiveDelete bool `url:"recursivedelete,omitempty"` + RecursiveDelete bool `url:"recursivedelete,omitempty" json:"recursivedelete,omitempty"` } func (arq DeleteUserRequest) validate() error { diff --git a/pkg/cloudbroker/account/disable.go b/pkg/cloudbroker/account/disable.go index bf3f653..894c835 100644 --- a/pkg/cloudbroker/account/disable.go +++ b/pkg/cloudbroker/account/disable.go @@ -11,11 +11,11 @@ import ( type DisableRequest struct { // ID of account // Required: true - AccountID uint64 `url:"accountId"` + AccountID uint64 `url:"accountId" json:"accountId"` // Reason to disable // Required: true - Reason string `url:"reason"` + Reason string `url:"reason" json:"reason"` } func (arq DisableRequest) validate() error { diff --git a/pkg/cloudbroker/account/disable_accounts.go b/pkg/cloudbroker/account/disable_accounts.go index b00aa46..b6300e9 100644 --- a/pkg/cloudbroker/account/disable_accounts.go +++ b/pkg/cloudbroker/account/disable_accounts.go @@ -10,7 +10,7 @@ import ( type DisableAccountsRequest struct { // IDs of accounts // Required: true - AccountIDs []uint64 `url:"accountIds,omitempty"` + AccountIDs []uint64 `url:"accountIds,omitempty" json:"accountIds,omitempty"` } func (arq DisableAccountsRequest) validate() error { diff --git a/pkg/cloudbroker/account/enable.go b/pkg/cloudbroker/account/enable.go index aef14f8..9bdee47 100644 --- a/pkg/cloudbroker/account/enable.go +++ b/pkg/cloudbroker/account/enable.go @@ -11,11 +11,11 @@ import ( type EnableRequest struct { // ID of account // Required: true - AccountID uint64 `url:"accountId"` + AccountID uint64 `url:"accountId" json:"accountId"` // Reason to enable // Required: true - Reason string `url:"reason"` + Reason string `url:"reason" json:"reason"` } func (arq EnableRequest) validate() error { diff --git a/pkg/cloudbroker/account/enable_accounts.go b/pkg/cloudbroker/account/enable_accounts.go index f962679..df977eb 100644 --- a/pkg/cloudbroker/account/enable_accounts.go +++ b/pkg/cloudbroker/account/enable_accounts.go @@ -10,7 +10,7 @@ import ( type EnableAccountsRequest struct { // IDs od accounts // Required: true - AccountIDs []uint64 `url:"accountIds"` + AccountIDs []uint64 `url:"accountIds" json:"accountIds"` } func (arq EnableAccountsRequest) validate() error { diff --git a/pkg/cloudbroker/account/get.go b/pkg/cloudbroker/account/get.go index 84d0295..683f22b 100644 --- a/pkg/cloudbroker/account/get.go +++ b/pkg/cloudbroker/account/get.go @@ -11,7 +11,7 @@ import ( type GetRequest struct { // ID an account // Required: true - AccountID uint64 `url:"accountId"` + AccountID uint64 `url:"accountId" json:"accountId"` } func (arq GetRequest) validate() error { diff --git a/pkg/cloudbroker/account/list.go b/pkg/cloudbroker/account/list.go index f237954..03f5245 100644 --- a/pkg/cloudbroker/account/list.go +++ b/pkg/cloudbroker/account/list.go @@ -10,11 +10,11 @@ import ( type ListRequest struct { // Page number // Required: false - Page uint64 `url:"page"` + Page uint64 `url:"page" json:"page"` // Page size // Required: false - Size uint64 `url:"size"` + Size uint64 `url:"size" json:"size"` } // List gets list all accounts the user has access to diff --git a/pkg/cloudbroker/account/list_computes.go b/pkg/cloudbroker/account/list_computes.go index 996432c..977dc96 100644 --- a/pkg/cloudbroker/account/list_computes.go +++ b/pkg/cloudbroker/account/list_computes.go @@ -11,7 +11,7 @@ import ( type ListComputesRequest struct { // ID an account // Required: true - AccountID uint64 `url:"accountId"` + AccountID uint64 `url:"accountId" json:"accountId"` } func (arq ListComputesRequest) validate() error { diff --git a/pkg/cloudbroker/account/list_deleted.go b/pkg/cloudbroker/account/list_deleted.go index 27a2fc7..a096a90 100644 --- a/pkg/cloudbroker/account/list_deleted.go +++ b/pkg/cloudbroker/account/list_deleted.go @@ -10,11 +10,11 @@ import ( type ListDeletedRequest struct { // Page number // Required: false - Page uint64 `url:"page"` + Page uint64 `url:"page" json:"page"` // Page size // Required: false - Size uint64 `url:"size"` + Size uint64 `url:"size" json:"size"` } // ListDeleted gets list all deleted accounts the user has access to diff --git a/pkg/cloudbroker/account/list_disks.go b/pkg/cloudbroker/account/list_disks.go index f5cc7b2..0c183cb 100644 --- a/pkg/cloudbroker/account/list_disks.go +++ b/pkg/cloudbroker/account/list_disks.go @@ -11,7 +11,7 @@ import ( type ListDisksRequest struct { // ID an account // Required: true - AccountID uint64 `url:"accountId"` + AccountID uint64 `url:"accountId" json:"accountId"` } func (arq ListDisksRequest) validate() error { diff --git a/pkg/cloudbroker/account/list_flip_groups.go b/pkg/cloudbroker/account/list_flip_groups.go index a92ce48..9cd7903 100644 --- a/pkg/cloudbroker/account/list_flip_groups.go +++ b/pkg/cloudbroker/account/list_flip_groups.go @@ -11,7 +11,7 @@ import ( type ListFLIPGroupsRequest struct { // ID an account // Required: true - AccountID uint64 `url:"accountId"` + AccountID uint64 `url:"accountId" json:"accountId"` } func (arq ListFLIPGroupsRequest) validate() error { diff --git a/pkg/cloudbroker/account/list_rg.go b/pkg/cloudbroker/account/list_rg.go index 83160fe..e9ad296 100644 --- a/pkg/cloudbroker/account/list_rg.go +++ b/pkg/cloudbroker/account/list_rg.go @@ -11,7 +11,7 @@ import ( type ListRGRequest struct { // ID an account // Required: true - AccountID uint64 `url:"accountId"` + AccountID uint64 `url:"accountId" json:"accountId"` } func (arq ListRGRequest) validate() error { diff --git a/pkg/cloudbroker/account/list_vins.go b/pkg/cloudbroker/account/list_vins.go index 3f3e691..317dd9f 100644 --- a/pkg/cloudbroker/account/list_vins.go +++ b/pkg/cloudbroker/account/list_vins.go @@ -11,7 +11,7 @@ import ( type ListVINSRequest struct { // ID an account // Required: true - AccountID uint64 `url:"accountId"` + AccountID uint64 `url:"accountId" json:"accountId"` } func (arq ListVINSRequest) validate() error { diff --git a/pkg/cloudbroker/account/restore.go b/pkg/cloudbroker/account/restore.go index 4c67643..94897f0 100644 --- a/pkg/cloudbroker/account/restore.go +++ b/pkg/cloudbroker/account/restore.go @@ -10,11 +10,11 @@ import ( type RestoreRequest struct { // ID an account // Required: true - AccountID uint64 `url:"accountId"` + AccountID uint64 `url:"accountId" json:"accountId"` // Reason to restore // Required: true - Reason string `url:"reason"` + Reason string `url:"reason" json:"reason"` } func (arq RestoreRequest) validate() error { diff --git a/pkg/cloudbroker/account/update.go b/pkg/cloudbroker/account/update.go index cab4cd0..93e1310 100644 --- a/pkg/cloudbroker/account/update.go +++ b/pkg/cloudbroker/account/update.go @@ -11,52 +11,52 @@ import ( type UpdateRequest struct { // ID of account // Required: true - AccountID uint64 `url:"accountId"` + AccountID uint64 `url:"accountId" json:"accountId"` // Display name // Required: true - Name string `url:"name"` + Name string `url:"name" json:"name"` // Name of the account // Required: true - Username string `url:"username"` + Username string `url:"username" json:"username"` // Email // Required: false - EmailAddress string `url:"emailaddress,omitempty"` + EmailAddress string `url:"emailaddress,omitempty" json:"emailaddress,omitempty"` // Max size of memory in MB // Required: false - MaxMemoryCapacity uint64 `url:"maxMemoryCapacity,omitempty"` + MaxMemoryCapacity uint64 `url:"maxMemoryCapacity,omitempty" json:"maxMemoryCapacity,omitempty"` // Max size of aggregated vdisks in GB // Required: false - MaxVDiskCapacity uint64 `url:"maxVDiskCapacity,omitempty"` + MaxVDiskCapacity uint64 `url:"maxVDiskCapacity,omitempty" json:"maxVDiskCapacity,omitempty"` // Max number of CPU cores // Required: false - MaxCPUCapacity uint64 `url:"maxCPUCapacity,omitempty"` + MaxCPUCapacity uint64 `url:"maxCPUCapacity,omitempty" json:"maxCPUCapacity,omitempty"` // Max sent/received network transfer peering // Required: false - MaxNetworkPeerTransfer uint64 `url:"maxNetworkPeerTransfer,omitempty"` + MaxNetworkPeerTransfer uint64 `url:"maxNetworkPeerTransfer,omitempty" json:"maxNetworkPeerTransfer,omitempty"` // Max number of assigned public IPs // Required: false - MaxNumPublicIP uint64 `url:"maxNumPublicIP,omitempty"` + MaxNumPublicIP uint64 `url:"maxNumPublicIP,omitempty" json:"maxNumPublicIP,omitempty"` // If true send emails when a user is granted access to resources // Required: false - SendAccessEmails bool `url:"sendAccessEmails,omitempty"` + SendAccessEmails bool `url:"sendAccessEmails,omitempty" json:"sendAccessEmails,omitempty"` // Limit (positive) or disable (0) GPU resources // Required: false - GPUUnits uint64 `url:"gpu_units,omitempty"` + GPUUnits uint64 `url:"gpu_units,omitempty" json:"gpu_units,omitempty"` // List of strings with pools // i.e.: ["sep1_poolName1", "sep2_poolName2", etc] // Required: false - UniqPools []string `url:"uniqPools,omitempty"` + UniqPools []string `url:"uniqPools,omitempty" json:"uniqPools,omitempty"` } func (arq UpdateRequest) validate() error { diff --git a/pkg/cloudbroker/account/update_resource_types.go b/pkg/cloudbroker/account/update_resource_types.go index 45bd9e1..3c4930b 100644 --- a/pkg/cloudbroker/account/update_resource_types.go +++ b/pkg/cloudbroker/account/update_resource_types.go @@ -13,7 +13,7 @@ import ( type UpdateResourceTypesRequest struct { // ID of account // Required: true - AccountID uint64 `url:"accountId"` + AccountID uint64 `url:"accountId" json:"accountId"` // Resource types available to create in this account // Each element in a resource type slice must be one of: @@ -24,7 +24,7 @@ type UpdateResourceTypesRequest struct { // - lb // - flipgroup // Required: true - ResTypes []string `url:"resourceTypes"` + ResTypes []string `url:"resourceTypes" json:"resourceTypes"` } func (arq UpdateResourceTypesRequest) validate() error { diff --git a/pkg/cloudbroker/account/update_user.go b/pkg/cloudbroker/account/update_user.go index 2b195fb..36c330e 100644 --- a/pkg/cloudbroker/account/update_user.go +++ b/pkg/cloudbroker/account/update_user.go @@ -11,18 +11,18 @@ import ( type UpdateUserRequest struct { // ID of the account // Required: true - AccountID uint64 `url:"accountId"` + AccountID uint64 `url:"accountId" json:"accountId"` // Userid/Email for registered users or emailaddress for unregistered users // Required: true - UserID string `url:"userId"` + UserID string `url:"userId" json:"userId"` // Account permission types: // - 'R' for read only access // - 'RCX' for Write // - 'ARCXDU' for Admin // Required: true - AccessType string `url:"accesstype"` + AccessType string `url:"accesstype" json:"accesstype"` } func (arq UpdateUserRequest) validate() error { diff --git a/pkg/cloudbroker/compute/affinity_group_check_start.go b/pkg/cloudbroker/compute/affinity_group_check_start.go index f039ec4..b5f2e20 100644 --- a/pkg/cloudbroker/compute/affinity_group_check_start.go +++ b/pkg/cloudbroker/compute/affinity_group_check_start.go @@ -10,11 +10,11 @@ import ( type AffinityGroupCheckStartRequest struct { // ID of the resource group // Required: true - RGID uint64 `url:"rgId"` + RGID uint64 `url:"rgId" json:"rgId"` // Affinity group label // Required: true - AffinityLabel string `url:"affinityLabel"` + AffinityLabel string `url:"affinityLabel" json:"affinityLabel"` } func (crq AffinityGroupCheckStartRequest) validate() error { diff --git a/pkg/cloudbroker/compute/affinity_label_remove.go b/pkg/cloudbroker/compute/affinity_label_remove.go index b7684d1..224bc01 100644 --- a/pkg/cloudbroker/compute/affinity_label_remove.go +++ b/pkg/cloudbroker/compute/affinity_label_remove.go @@ -11,7 +11,7 @@ import ( type AffinityLabelRemoveRequest struct { // IDs of the compute instances // Required: true - ComputeIDs []uint64 `url:"computeIds"` + ComputeIDs []uint64 `url:"computeIds" json:"computeIds"` } func (crq AffinityLabelRemoveRequest) validate() error { diff --git a/pkg/cloudbroker/compute/affinity_label_set.go b/pkg/cloudbroker/compute/affinity_label_set.go index 07bc742..587a452 100644 --- a/pkg/cloudbroker/compute/affinity_label_set.go +++ b/pkg/cloudbroker/compute/affinity_label_set.go @@ -10,11 +10,11 @@ import ( // Request struct for set affinity label for compute type AffinityLabelSetRequest struct { // IDs of the compute instances - ComputeIDs []uint64 `url:"computeIds"` + ComputeIDs []uint64 `url:"computeIds" json:"computeIds"` // Affinity group label // Required: true - AffinityLabel string `url:"affinityLabel"` + AffinityLabel string `url:"affinityLabel" json:"affinityLabel"` } func (crq AffinityLabelSetRequest) validate() error { diff --git a/pkg/cloudbroker/compute/affinity_relations.go b/pkg/cloudbroker/compute/affinity_relations.go index a5dd866..7bbbf5c 100644 --- a/pkg/cloudbroker/compute/affinity_relations.go +++ b/pkg/cloudbroker/compute/affinity_relations.go @@ -11,11 +11,11 @@ import ( type AffinityRelationsRequest struct { // ID of the compute instance // Required: true - ComputeID uint64 `url:"computeId"` + ComputeID uint64 `url:"computeId" json:"computeId"` // Affinity group label // Required: false - AffinityLabel string `url:"affinityLabel,omitempty"` + AffinityLabel string `url:"affinityLabel,omitempty" json:"affinityLabel,omitempty"` } func (crq AffinityRelationsRequest) validate() error { diff --git a/pkg/cloudbroker/compute/affinity_rule_add.go b/pkg/cloudbroker/compute/affinity_rule_add.go index 1e77325..778bd9d 100644 --- a/pkg/cloudbroker/compute/affinity_rule_add.go +++ b/pkg/cloudbroker/compute/affinity_rule_add.go @@ -13,20 +13,20 @@ import ( type AffinityRuleAddRequest struct { // IDs of the compute instances // Required: true - ComputeIDs []uint64 `url:"computeIds"` + ComputeIDs []uint64 `url:"computeIds" json:"computeIds"` // Should be one of: // - node // - compute // Required: true - Topology string `url:"topology"` + Topology string `url:"topology" json:"topology"` // The degree of 'strictness' of this rule // Should be one of: // - RECOMMENDED // - REQUIRED // Required: true - Policy string `url:"policy"` + Policy string `url:"policy" json:"policy"` // The comparison mode is 'value', recorded by the specified 'key' // Should be one of: @@ -34,15 +34,15 @@ type AffinityRuleAddRequest struct { // - EN // - ANY // Required: true - Mode string `url:"mode"` + Mode string `url:"mode" json:"mode"` // Key that are taken into account when analyzing this rule will be identified // Required: true - Key string `url:"key"` + Key string `url:"key" json:"key"` // Value that must match the key to be taken into account when analyzing this rule // Required: true - Value string `url:"value"` + Value string `url:"value" json:"value"` } func (crq AffinityRuleAddRequest) validate() error { diff --git a/pkg/cloudbroker/compute/affinity_rule_remove.go b/pkg/cloudbroker/compute/affinity_rule_remove.go index fd99db6..fbe92e1 100644 --- a/pkg/cloudbroker/compute/affinity_rule_remove.go +++ b/pkg/cloudbroker/compute/affinity_rule_remove.go @@ -13,18 +13,18 @@ import ( type AffinityRuleRemoveRequest struct { // IDs of the compute instances // Required: true - ComputeIDs []uint64 `url:"computeIds"` + ComputeIDs []uint64 `url:"computeIds" json:"computeIds"` // Compute or node, for whom rule applies // Required: true - Topology string `url:"topology"` + Topology string `url:"topology" json:"topology"` // The degree of 'strictness' of this rule // Should be one of: // - RECOMMENDED // - REQUIRED // Required: true - Policy string `url:"policy"` + Policy string `url:"policy" json:"policy"` // The comparison mode is 'value', recorded by the specified 'key' // Should be one of: @@ -32,15 +32,15 @@ type AffinityRuleRemoveRequest struct { // - EN // - ANY // Required: true - Mode string `url:"mode"` + Mode string `url:"mode" json:"mode"` // Key that are taken into account when analyzing this rule will be identified // Required: true - Key string `url:"key"` + Key string `url:"key" json:"key"` // Value that must match the key to be taken into account when analyzing this rule // Required: true - Value string `url:"value"` + Value string `url:"value" json:"value"` } func (crq AffinityRuleRemoveRequest) validate() error { diff --git a/pkg/cloudbroker/compute/affinity_rules_clear.go b/pkg/cloudbroker/compute/affinity_rules_clear.go index 06d294a..2babd55 100644 --- a/pkg/cloudbroker/compute/affinity_rules_clear.go +++ b/pkg/cloudbroker/compute/affinity_rules_clear.go @@ -11,7 +11,7 @@ import ( type AffinityRulesClearRequest struct { // IDs of the compute instances // Required: true - ComputeIDs []uint64 `url:"computeIds"` + ComputeIDs []uint64 `url:"computeIds" json:"computeIds"` } func (crq AffinityRulesClearRequest) validate() error { diff --git a/pkg/cloudbroker/compute/anti_affinity_rule_add.go b/pkg/cloudbroker/compute/anti_affinity_rule_add.go index fa1c98e..188c249 100644 --- a/pkg/cloudbroker/compute/anti_affinity_rule_add.go +++ b/pkg/cloudbroker/compute/anti_affinity_rule_add.go @@ -13,18 +13,18 @@ import ( type AntiAffinityRuleAddRequest struct { // IDs of the compute instances // Required: true - ComputeIDs []uint64 `url:"computeIds"` + ComputeIDs []uint64 `url:"computeIds" json:"computeIds"` // Compute or node, for whom rule applies // Required: true - Topology string `url:"topology"` + Topology string `url:"topology" json:"topology"` // The degree of 'strictness' of this rule // Should be one of: // - RECOMMENDED // - REQUIRED // Required: true - Policy string `url:"policy"` + Policy string `url:"policy" json:"policy"` // The comparison mode is 'value', recorded by the specified 'key' // Should be one of: @@ -32,15 +32,15 @@ type AntiAffinityRuleAddRequest struct { // - EN // - ANY // Required: true - Mode string `url:"mode"` + Mode string `url:"mode" json:"mode"` // Key that are taken into account when analyzing this rule will be identified // Required: true - Key string `url:"key"` + Key string `url:"key" json:"key"` // Value that must match the key to be taken into account when analyzing this rule // Required: true - Value string `url:"value"` + Value string `url:"value" json:"value"` } func (crq AntiAffinityRuleAddRequest) validate() error { diff --git a/pkg/cloudbroker/compute/anti_affinity_rule_clear.go b/pkg/cloudbroker/compute/anti_affinity_rule_clear.go index 5b3687f..d362592 100644 --- a/pkg/cloudbroker/compute/anti_affinity_rule_clear.go +++ b/pkg/cloudbroker/compute/anti_affinity_rule_clear.go @@ -11,7 +11,7 @@ import ( type AntiAffinityRulesClearRequest struct { // IDs of the compute instances // Required: true - ComputeIDs []uint64 `url:"computeIds"` + ComputeIDs []uint64 `url:"computeIds" json:"computeIds"` } func (crq AntiAffinityRulesClearRequest) validate() error { diff --git a/pkg/cloudbroker/compute/anti_affinity_rule_remove.go b/pkg/cloudbroker/compute/anti_affinity_rule_remove.go index 4bdc4ae..f700444 100644 --- a/pkg/cloudbroker/compute/anti_affinity_rule_remove.go +++ b/pkg/cloudbroker/compute/anti_affinity_rule_remove.go @@ -13,18 +13,18 @@ import ( type AntiAffinityRuleRemoveRequest struct { // IDs of the compute instances // Required: true - ComputeIDs []uint64 `url:"computeIds"` + ComputeIDs []uint64 `url:"computeIds" json:"computeIds"` // Compute or node, for whom rule applies // Required: true - Topology string `url:"topology"` + Topology string `url:"topology" json:"topology"` // The degree of 'strictness' of this rule // Should be one of: // - RECOMMENDED // - REQUIRED // Required: true - Policy string `url:"policy"` + Policy string `url:"policy" json:"policy"` // The comparison mode is 'value', recorded by the specified 'key' // Should be one of: @@ -32,15 +32,15 @@ type AntiAffinityRuleRemoveRequest struct { // - EN // - ANY // Required: true - Mode string `url:"mode"` + Mode string `url:"mode" json:"mode"` // Key that are taken into account when analyzing this rule will be identified // Required: true - Key string `url:"key"` + Key string `url:"key" json:"key"` // Value that must match the key to be taken into account when analyzing this rule // Required: true - Value string `url:"value"` + Value string `url:"value" json:"value"` } func (crq AntiAffinityRuleRemoveRequest) validate() error { diff --git a/pkg/cloudbroker/compute/attach_gpu.go b/pkg/cloudbroker/compute/attach_gpu.go index 41e1110..8dfbe4e 100644 --- a/pkg/cloudbroker/compute/attach_gpu.go +++ b/pkg/cloudbroker/compute/attach_gpu.go @@ -11,11 +11,11 @@ import ( type AttachGPURequest struct { // Identifier compute // Required: true - ComputeID uint64 `url:"computeId"` + ComputeID uint64 `url:"computeId" json:"computeId"` // Identifier vGPU // Required: true - VGPUID uint64 `url:"vgpuId"` + VGPUID uint64 `url:"vgpuId" json:"vgpuId"` } func (crq AttachGPURequest) validate() error { diff --git a/pkg/cloudbroker/compute/attach_pci_device.go b/pkg/cloudbroker/compute/attach_pci_device.go index 9fc931c..afb1a06 100644 --- a/pkg/cloudbroker/compute/attach_pci_device.go +++ b/pkg/cloudbroker/compute/attach_pci_device.go @@ -11,11 +11,11 @@ import ( type AttachPCIDeviceRequest struct { // Identifier compute // Required: true - ComputeID uint64 `url:"computeId"` + ComputeID uint64 `url:"computeId" json:"computeId"` // PCI device ID // Required: true - DeviceID uint64 `url:"deviceId"` + DeviceID uint64 `url:"deviceId" json:"deviceId"` } func (crq AttachPCIDeviceRequest) validate() error { diff --git a/pkg/cloudbroker/compute/audits.go b/pkg/cloudbroker/compute/audits.go index 600cc61..ceebb5e 100644 --- a/pkg/cloudbroker/compute/audits.go +++ b/pkg/cloudbroker/compute/audits.go @@ -11,7 +11,7 @@ import ( type AuditsRequest struct { // ID of the compute // Required: true - ComputeID uint64 `url:"computeId"` + ComputeID uint64 `url:"computeId" json:"computeId"` } func (crq AuditsRequest) validate() error { diff --git a/pkg/cloudbroker/compute/boot_order_get.go b/pkg/cloudbroker/compute/boot_order_get.go index af22cec..67bef88 100644 --- a/pkg/cloudbroker/compute/boot_order_get.go +++ b/pkg/cloudbroker/compute/boot_order_get.go @@ -11,7 +11,7 @@ import ( type BootOrderGetRequest struct { // ID of compute instance // Required: true - ComputeID uint64 `url:"computeId"` + ComputeID uint64 `url:"computeId" json:"computeId"` } func (crq BootOrderGetRequest) validate() error { diff --git a/pkg/cloudbroker/compute/boot_order_set.go b/pkg/cloudbroker/compute/boot_order_set.go index 9814c4a..0c5c0fc 100644 --- a/pkg/cloudbroker/compute/boot_order_set.go +++ b/pkg/cloudbroker/compute/boot_order_set.go @@ -13,7 +13,7 @@ import ( type BootOrderSetRequest struct { // ID of compute instance // Required: true - ComputeID uint64 `url:"computeId"` + ComputeID uint64 `url:"computeId" json:"computeId"` // List of boot devices // Should be one of: @@ -21,7 +21,7 @@ type BootOrderSetRequest struct { // - network // - hd // Required: true - Order []string `url:"order"` + Order []string `url:"order" json:"order"` } func (crq BootOrderSetRequest) validate() error { diff --git a/pkg/cloudbroker/compute/cd_eject.go b/pkg/cloudbroker/compute/cd_eject.go index 6ff8937..250e4a2 100644 --- a/pkg/cloudbroker/compute/cd_eject.go +++ b/pkg/cloudbroker/compute/cd_eject.go @@ -11,11 +11,11 @@ import ( type CDEjectRequest struct { // ID of compute instance // Required: true - ComputeID uint64 `url:"computeId"` + ComputeID uint64 `url:"computeId" json:"computeId"` // Reason to eject // Required: false - Reason string `url:"reason,omitempty"` + Reason string `url:"reason,omitempty" json:"reason,omitempty"` } func (crq CDEjectRequest) validate() error { diff --git a/pkg/cloudbroker/compute/cd_insert.go b/pkg/cloudbroker/compute/cd_insert.go index d415d9a..c2bf6da 100644 --- a/pkg/cloudbroker/compute/cd_insert.go +++ b/pkg/cloudbroker/compute/cd_insert.go @@ -10,15 +10,15 @@ import ( type CDInsertRequest struct { // ID of compute instance // Required: true - ComputeID uint64 `url:"computeId"` + ComputeID uint64 `url:"computeId" json:"computeId"` // ID of CD-ROM image // Required: true - CDROMID uint64 `url:"cdromId"` + CDROMID uint64 `url:"cdromId" json:"cdromId"` // Reason to insert // Required: false - Reason string `url:"reason,omitempty"` + Reason string `url:"reason,omitempty" json:"reason,omitempty"` } func (crq CDInsertRequest) validate() error { diff --git a/pkg/cloudbroker/compute/clone.go b/pkg/cloudbroker/compute/clone.go index 3292fb0..25c4d94 100644 --- a/pkg/cloudbroker/compute/clone.go +++ b/pkg/cloudbroker/compute/clone.go @@ -11,23 +11,23 @@ import ( type CloneRequest struct { // ID of compute instance // Required: true - ComputeID uint64 `url:"computeId"` + ComputeID uint64 `url:"computeId" json:"computeId"` // Name of the clone // Required: true - Name string `url:"name"` + Name string `url:"name" json:"name"` // Timestamp of the parent's snapshot to create clone from // Required: false - SnapshotTimestamp uint64 `url:"snapshotTimestamp"` + SnapshotTimestamp uint64 `url:"snapshotTimestamp" json:"snapshotTimestamp"` // Name of the parent's snapshot to create clone from // Required: false - SnapshotName string `url:"snapshotName"` + SnapshotName string `url:"snapshotName" json:"snapshotName"` // Reason to clone // Required: false - Reason string `url:"reason,omitempty"` + Reason string `url:"reason,omitempty" json:"reason,omitempty"` } func (crq CloneRequest) validate() error { diff --git a/pkg/cloudbroker/compute/computeci_set.go b/pkg/cloudbroker/compute/computeci_set.go index b345b09..171bb8d 100644 --- a/pkg/cloudbroker/compute/computeci_set.go +++ b/pkg/cloudbroker/compute/computeci_set.go @@ -11,11 +11,11 @@ import ( type ComputeCISetRequest struct { // ID of compute instance // Required: true - ComputeID uint64 `url:"computeId"` + ComputeID uint64 `url:"computeId" json:"computeId"` // ID of the Compute CI // Required: true - ComputeCIID uint64 `url:"computeciId"` + ComputeCIID uint64 `url:"computeciId" json:"computeciId"` } func (crq ComputeCISetRequest) validate() error { diff --git a/pkg/cloudbroker/compute/computeci_unset.go b/pkg/cloudbroker/compute/computeci_unset.go index d86ee7f..8905c99 100644 --- a/pkg/cloudbroker/compute/computeci_unset.go +++ b/pkg/cloudbroker/compute/computeci_unset.go @@ -11,7 +11,7 @@ import ( type ComputeCIUnsetRequest struct { // ID of compute instance // Required: true - ComputeID uint64 `url:"computeId"` + ComputeID uint64 `url:"computeId" json:"computeId"` } func (crq ComputeCIUnsetRequest) validate() error { diff --git a/pkg/cloudbroker/compute/create_template.go b/pkg/cloudbroker/compute/create_template.go index 3a9582a..7e995e1 100644 --- a/pkg/cloudbroker/compute/create_template.go +++ b/pkg/cloudbroker/compute/create_template.go @@ -12,15 +12,15 @@ import ( type CreateTemplateRequest struct { // ID of the compute to create template from // Required: true - ComputeID uint64 `url:"computeId"` + ComputeID uint64 `url:"computeId" json:"computeId"` // Name to assign to the template being created // Required: true - Name string `url:"name"` + Name string `url:"name" json:"name"` // Reason for action // Required: false - Reason string `url:"reason,omitempty"` + Reason string `url:"reason,omitempty" json:"reason,omitempty"` // Async API call // For async call use CreateTemplateAsync diff --git a/pkg/cloudbroker/compute/delete.go b/pkg/cloudbroker/compute/delete.go index 6dd600e..1b92d29 100644 --- a/pkg/cloudbroker/compute/delete.go +++ b/pkg/cloudbroker/compute/delete.go @@ -11,19 +11,19 @@ import ( type DeleteRequest struct { // ID of compute instance // Required: true - ComputeID uint64 `url:"computeId"` + ComputeID uint64 `url:"computeId" json:"computeId"` // Delete permanently // Required: false - Permanently bool `url:"permanently,omitempty"` + Permanently bool `url:"permanently,omitempty" json:"permanently,omitempty"` // Set True if you want to detach data disks (if any) from the compute before its deletion // Required: false - DetachDisks bool `url:"detachDisks,omitempty"` + DetachDisks bool `url:"detachDisks,omitempty" json:"detachDisks,omitempty"` // Reason for action // Required: false - Reason string `url:"reason,omitempty"` + Reason string `url:"reason,omitempty" json:"reason,omitempty"` } func (crq DeleteRequest) validate() error { diff --git a/pkg/cloudbroker/compute/detach_gpu.go b/pkg/cloudbroker/compute/detach_gpu.go index dacef72..3d12eb7 100644 --- a/pkg/cloudbroker/compute/detach_gpu.go +++ b/pkg/cloudbroker/compute/detach_gpu.go @@ -11,11 +11,11 @@ import ( type DetachGPURequest struct { // Identifier compute // Required: true - ComputeID uint64 `url:"computeId"` + ComputeID uint64 `url:"computeId" json:"computeId"` // Identifier virtual GPU // Required: false - VGPUID int64 `url:"vgpuId,omitempty"` + VGPUID int64 `url:"vgpuId,omitempty" json:"vgpuId,omitempty"` } func (crq DetachGPURequest) validate() error { diff --git a/pkg/cloudbroker/compute/detach_pci_device.go b/pkg/cloudbroker/compute/detach_pci_device.go index 2fd0b94..ef8d1ff 100644 --- a/pkg/cloudbroker/compute/detach_pci_device.go +++ b/pkg/cloudbroker/compute/detach_pci_device.go @@ -11,11 +11,11 @@ import ( type DetachPCIDeviceRequest struct { // Identifier compute // Required: true - ComputeID uint64 `url:"computeId"` + ComputeID uint64 `url:"computeId" json:"computeId"` // PCI device ID // Required: true - DeviceID uint64 `url:"deviceId"` + DeviceID uint64 `url:"deviceId" json:"deviceId"` } func (crq DetachPCIDeviceRequest) validate() error { diff --git a/pkg/cloudbroker/compute/disable.go b/pkg/cloudbroker/compute/disable.go index 647cf4a..18c07ca 100644 --- a/pkg/cloudbroker/compute/disable.go +++ b/pkg/cloudbroker/compute/disable.go @@ -11,11 +11,11 @@ import ( type DisableRequest struct { // ID of compute instance // Required: true - ComputeID uint64 `url:"computeId"` + ComputeID uint64 `url:"computeId" json:"computeId"` // Reason for action // Required: false - Reason string `url:"reason,omitempty"` + Reason string `url:"reason,omitempty" json:"reason,omitempty"` } func (crq DisableRequest) validate() error { diff --git a/pkg/cloudbroker/compute/disk_add.go b/pkg/cloudbroker/compute/disk_add.go index e503759..3d4b6d2 100644 --- a/pkg/cloudbroker/compute/disk_add.go +++ b/pkg/cloudbroker/compute/disk_add.go @@ -11,40 +11,40 @@ import ( type DiskAddRequest struct { // ID of compute instance // Required: true - ComputeID uint64 `url:"computeId"` + ComputeID uint64 `url:"computeId" json:"computeId"` // Name for disk // Required: true - DiskName string `url:"diskName"` + DiskName string `url:"diskName" json:"diskName"` // Disk size in GB // Required: true - Size uint64 `url:"size"` + Size uint64 `url:"size" json:"size"` // Type of the disk // Should be one of: // - D // - B // Required: false - DiskType string `url:"diskType,omitempty"` + DiskType string `url:"diskType,omitempty" json:"diskType,omitempty"` // Storage endpoint provider ID // By default the same with boot disk // Required: false - SepID uint64 `url:"sepId,omitempty"` + SepID uint64 `url:"sepId,omitempty" json:"sepId,omitempty"` // Pool name // By default will be chosen automatically // Required: false - Pool string `url:"pool,omitempty"` + Pool string `url:"pool,omitempty" json:"pool,omitempty"` // Optional description // Required: false - Description string `url:"desc,omitempty"` + Description string `url:"desc,omitempty" json:"desc,omitempty"` // Specify image id for create disk from template // Required: false - ImageID uint64 `url:"imageId,omitempty"` + ImageID uint64 `url:"imageId,omitempty" json:"imageId,omitempty"` } func (crq DiskAddRequest) validate() error { diff --git a/pkg/cloudbroker/compute/disk_attach.go b/pkg/cloudbroker/compute/disk_attach.go index 07ad2d4..1e8dd2b 100644 --- a/pkg/cloudbroker/compute/disk_attach.go +++ b/pkg/cloudbroker/compute/disk_attach.go @@ -11,15 +11,15 @@ import ( type DiskAttachRequest struct { // ID of compute instance // Required: true - ComputeID uint64 `url:"computeId"` + ComputeID uint64 `url:"computeId" json:"computeId"` // ID of the disk to attach // Required: true - DiskID uint64 `url:"diskId"` + DiskID uint64 `url:"diskId" json:"diskId"` // Reason for action // Required: false - Reason string `url:"reason,omitempty"` + Reason string `url:"reason,omitempty" json:"reason,omitempty"` } func (crq DiskAttachRequest) validate() error { diff --git a/pkg/cloudbroker/compute/disk_del.go b/pkg/cloudbroker/compute/disk_del.go index 814e71c..2dff7f1 100644 --- a/pkg/cloudbroker/compute/disk_del.go +++ b/pkg/cloudbroker/compute/disk_del.go @@ -11,19 +11,19 @@ import ( type DiskDelRequest struct { // ID of compute instance // Required: true - ComputeID uint64 `url:"computeId"` + ComputeID uint64 `url:"computeId" json:"computeId"` // ID of disk instance // Required: true - DiskID uint64 `url:"diskId"` + DiskID uint64 `url:"diskId" json:"diskId"` // False if disk is to be deleted to recycle bin // Required: true - Permanently bool `url:"permanently"` + Permanently bool `url:"permanently" json:"permanently"` // Reason for action // Required: false - Reason string `url:"reason,omitempty"` + Reason string `url:"reason,omitempty" json:"reason,omitempty"` } func (crq DiskDelRequest) validate() error { diff --git a/pkg/cloudbroker/compute/disk_detach.go b/pkg/cloudbroker/compute/disk_detach.go index d259a96..507175e 100644 --- a/pkg/cloudbroker/compute/disk_detach.go +++ b/pkg/cloudbroker/compute/disk_detach.go @@ -11,15 +11,15 @@ import ( type DiskDetachRequest struct { // ID of compute instance // Required: true - ComputeID uint64 `url:"computeId"` + ComputeID uint64 `url:"computeId" json:"computeId"` // ID of the disk to detach // Required: true - DiskID uint64 `url:"diskId"` + DiskID uint64 `url:"diskId" json:"diskId"` // Reason for action // Required: false - Reason string `url:"reason,omitempty"` + Reason string `url:"reason,omitempty" json:"reason,omitempty"` } func (crq DiskDetachRequest) validate() error { diff --git a/pkg/cloudbroker/compute/disk_qos.go b/pkg/cloudbroker/compute/disk_qos.go index 71ae002..99b333b 100644 --- a/pkg/cloudbroker/compute/disk_qos.go +++ b/pkg/cloudbroker/compute/disk_qos.go @@ -11,15 +11,15 @@ import ( type DiskQOSRequest struct { // ID of compute instance // Required: true - ComputeID uint64 `url:"computeId"` + ComputeID uint64 `url:"computeId" json:"computeId"` // ID of the disk to apply limits // Required: true - DiskID uint64 `url:"diskId"` + DiskID uint64 `url:"diskId" json:"diskId"` // Limit IO for a certain disk total and read/write options are not allowed to be combined // Required: true - Limits string `url:"limits"` + Limits string `url:"limits" json:"limits"` } func (crq DiskQOSRequest) validate() error { diff --git a/pkg/cloudbroker/compute/disk_resize.go b/pkg/cloudbroker/compute/disk_resize.go index c58a9a1..d1052f2 100644 --- a/pkg/cloudbroker/compute/disk_resize.go +++ b/pkg/cloudbroker/compute/disk_resize.go @@ -11,19 +11,19 @@ import ( type DiskResizeRequest struct { // ID of compute instance // Required: true - ComputeID uint64 `url:"computeId"` + ComputeID uint64 `url:"computeId" json:"computeId"` // ID of the disk to resize // Required: true - DiskID uint64 `url:"diskId"` + DiskID uint64 `url:"diskId" json:"diskId"` // New disk size // Required: true - Size uint64 `url:"size"` + Size uint64 `url:"size" json:"size"` // Reason for action // Required: false - Reason string `url:"reason,omitempty"` + Reason string `url:"reason,omitempty" json:"reason,omitempty"` } func (crq DiskResizeRequest) validate() error { diff --git a/pkg/cloudbroker/compute/enable.go b/pkg/cloudbroker/compute/enable.go index b85e0e7..b4c544a 100644 --- a/pkg/cloudbroker/compute/enable.go +++ b/pkg/cloudbroker/compute/enable.go @@ -11,11 +11,11 @@ import ( type EnableRequest struct { // ID of compute instance // Required: true - ComputeID uint64 `url:"computeId"` + ComputeID uint64 `url:"computeId" json:"computeId"` // Reason for action // Required: false - Reason string `url:"reason,omitempty"` + Reason string `url:"reason,omitempty" json:"reason,omitempty"` } func (crq EnableRequest) validate() error { diff --git a/pkg/cloudbroker/compute/get.go b/pkg/cloudbroker/compute/get.go index 2da6f92..7e88901 100644 --- a/pkg/cloudbroker/compute/get.go +++ b/pkg/cloudbroker/compute/get.go @@ -11,11 +11,11 @@ import ( type GetRequest struct { // ID of compute instance // Required: true - ComputeID uint64 `url:"computeId"` + ComputeID uint64 `url:"computeId" json:"computeId"` // Reason to action // Required: false - Reason string `url:"reason,omitempty"` + Reason string `url:"reason,omitempty" json:"reason,omitempty"` } func (crq GetRequest) validate() error { diff --git a/pkg/cloudbroker/compute/get_audits.go b/pkg/cloudbroker/compute/get_audits.go index 7aa075b..04dfd39 100644 --- a/pkg/cloudbroker/compute/get_audits.go +++ b/pkg/cloudbroker/compute/get_audits.go @@ -11,11 +11,11 @@ import ( type GetAuditsRequest struct { // ID of compute instance // Required: true - ComputeID uint64 `url:"computeId"` + ComputeID uint64 `url:"computeId" json:"computeId"` // Reason to action // Required: true - Reason string `url:"reason,omitempty"` + Reason string `url:"reason,omitempty" json:"reason,omitempty"` } func (crq GetAuditsRequest) validate() error { diff --git a/pkg/cloudbroker/compute/get_console_url.go b/pkg/cloudbroker/compute/get_console_url.go index 38dd711..b0ddaa2 100644 --- a/pkg/cloudbroker/compute/get_console_url.go +++ b/pkg/cloudbroker/compute/get_console_url.go @@ -11,7 +11,7 @@ import ( type GetConsoleURLRequest struct { // ID of compute instance to get console for // Required: true - ComputeID uint64 `url:"computeId"` + ComputeID uint64 `url:"computeId" json:"computeId"` } func (crq GetConsoleURLRequest) validate() error { diff --git a/pkg/cloudbroker/compute/get_log.go b/pkg/cloudbroker/compute/get_log.go index a1dbe58..ee72b8b 100644 --- a/pkg/cloudbroker/compute/get_log.go +++ b/pkg/cloudbroker/compute/get_log.go @@ -10,11 +10,11 @@ import ( type GetLogRequest struct { // ID of compute instance to get log for // Required: true - ComputeID uint64 `url:"computeId"` + ComputeID uint64 `url:"computeId" json:"computeId"` // Path to log file // Required: true - Path string `url:"path"` + Path string `url:"path" json:"path"` } func (crq GetLogRequest) validate() error { diff --git a/pkg/cloudbroker/compute/list.go b/pkg/cloudbroker/compute/list.go index 1614e2a..22cb05a 100644 --- a/pkg/cloudbroker/compute/list.go +++ b/pkg/cloudbroker/compute/list.go @@ -10,15 +10,15 @@ import ( type ListRequest struct { // Include deleted computes // Required: false - IncludeDeleted bool `url:"includedeleted,omitempty"` + IncludeDeleted bool `url:"includedeleted,omitempty" json:"includedeleted,omitempty"` // Page number // Required: false - Page uint64 `url:"page,omitempty"` + Page uint64 `url:"page,omitempty" json:"page,omitempty"` // Page size // Required: false - Size uint64 `url:"size,omitempty"` + Size uint64 `url:"size,omitempty" json:"size,omitempty"` } // List gets list of the available computes. diff --git a/pkg/cloudbroker/compute/list_deleted.go b/pkg/cloudbroker/compute/list_deleted.go index 07b6ecc..886b705 100644 --- a/pkg/cloudbroker/compute/list_deleted.go +++ b/pkg/cloudbroker/compute/list_deleted.go @@ -10,11 +10,11 @@ import ( type ListDeletedRequest struct { // Page number // Required: false - Page uint64 `url:"page,omitempty"` + Page uint64 `url:"page,omitempty" json:"page,omitempty"` // Page size // Required: false - Size uint64 `url:"size,omitempty"` + Size uint64 `url:"size,omitempty" json:"size,omitempty"` } // ListDeleted gets list all deleted computes diff --git a/pkg/cloudbroker/compute/list_gpu.go b/pkg/cloudbroker/compute/list_gpu.go index 8122eba..3e8cc08 100644 --- a/pkg/cloudbroker/compute/list_gpu.go +++ b/pkg/cloudbroker/compute/list_gpu.go @@ -11,11 +11,11 @@ import ( type ListGPURequest struct { // ID of compute instance // Required: true - ComputeID uint64 `url:"computeId"` + ComputeID uint64 `url:"computeId" json:"computeId"` // Also list destroyed // Required: false - ListDestroyed bool `url:"list_destroyed,omitempty"` + ListDestroyed bool `url:"list_destroyed,omitempty" json:"list_destroyed,omitempty"` } func (crq ListGPURequest) validate() error { diff --git a/pkg/cloudbroker/compute/list_pci_device.go b/pkg/cloudbroker/compute/list_pci_device.go index 7d5f37f..6e2231d 100644 --- a/pkg/cloudbroker/compute/list_pci_device.go +++ b/pkg/cloudbroker/compute/list_pci_device.go @@ -11,7 +11,7 @@ import ( type ListPCIDeviceRequest struct { // Identifier compute // Required: true - ComputeID uint64 `url:"computeId"` + ComputeID uint64 `url:"computeId" json:"computeId"` } func (crq ListPCIDeviceRequest) validate() error { diff --git a/pkg/cloudbroker/compute/mass_delete.go b/pkg/cloudbroker/compute/mass_delete.go index 4f357de..087c946 100644 --- a/pkg/cloudbroker/compute/mass_delete.go +++ b/pkg/cloudbroker/compute/mass_delete.go @@ -11,15 +11,15 @@ import ( type MassDeleteRequest struct { // IDs of compute instances to delete // Required: true - ComputeIDs []uint64 `url:"computeIds"` + ComputeIDs []uint64 `url:"computeIds" json:"computeIds"` // Delete computes permanently // Required: false - Permanently bool `url:"permanently,omitempty"` + Permanently bool `url:"permanently,omitempty" json:"permanently,omitempty"` // Reason for action // Required: false - Reason string `url:"reason,omitempty"` + Reason string `url:"reason,omitempty" json:"reason,omitempty"` } func (crq MassDeleteRequest) validate() error { diff --git a/pkg/cloudbroker/compute/mass_reboot.go b/pkg/cloudbroker/compute/mass_reboot.go index f32dd2e..6141678 100644 --- a/pkg/cloudbroker/compute/mass_reboot.go +++ b/pkg/cloudbroker/compute/mass_reboot.go @@ -11,11 +11,11 @@ import ( type MassRebootRequest struct { // IDs of compute instances to reboot // Required: true - ComputeIDs []uint64 `url:"computeIds"` + ComputeIDs []uint64 `url:"computeIds" json:"computeIds"` // Reason for action // Required: false - Reason string `url:"reason,omitempty"` + Reason string `url:"reason,omitempty" json:"reason,omitempty"` } func (crq MassRebootRequest) validate() error { diff --git a/pkg/cloudbroker/compute/mass_repair_boot_fs.go b/pkg/cloudbroker/compute/mass_repair_boot_fs.go index d50993a..a7b2058 100644 --- a/pkg/cloudbroker/compute/mass_repair_boot_fs.go +++ b/pkg/cloudbroker/compute/mass_repair_boot_fs.go @@ -11,11 +11,11 @@ import ( type MassRepairBootFSRequest struct { // IDs of compute instances which boot file systems will be repaired // Required: true - ComputeIDs []uint64 `url:"computeIds"` + ComputeIDs []uint64 `url:"computeIds" json:"computeIds"` // Reason for action // Required: false - Reason string `url:"reason,omitempty"` + Reason string `url:"reason,omitempty" json:"reason,omitempty"` } func (crq MassRepairBootFSRequest) validate() error { diff --git a/pkg/cloudbroker/compute/mass_start.go b/pkg/cloudbroker/compute/mass_start.go index 03b1c61..9247e3b 100644 --- a/pkg/cloudbroker/compute/mass_start.go +++ b/pkg/cloudbroker/compute/mass_start.go @@ -11,11 +11,11 @@ import ( type MassStartRequest struct { // IDs of compute instances to start // Required: true - ComputeIDs []uint64 `url:"computeIds"` + ComputeIDs []uint64 `url:"computeIds" json:"computeIds"` // Reason for action // Required: false - Reason string `url:"reason,omitempty"` + Reason string `url:"reason,omitempty" json:"reason,omitempty"` } func (crq MassStartRequest) validate() error { diff --git a/pkg/cloudbroker/compute/mass_stop.go b/pkg/cloudbroker/compute/mass_stop.go index b3695f2..e1d5189 100644 --- a/pkg/cloudbroker/compute/mass_stop.go +++ b/pkg/cloudbroker/compute/mass_stop.go @@ -11,15 +11,15 @@ import ( type MassStopRequest struct { // IDs of compute instances to stop // Required: true - ComputeIDs []uint64 `url:"computeIds"` + ComputeIDs []uint64 `url:"computeIds" json:"computeIds"` // Force stop compute // Required: false - Force bool `url:"force,omitempty"` + Force bool `url:"force,omitempty" json:"force,omitempty"` // Reason for action // Required: false - Reason string `url:"reason,omitempty"` + Reason string `url:"reason,omitempty" json:"reason,omitempty"` } func (crq MassStopRequest) validate() error { diff --git a/pkg/cloudbroker/compute/migrate.go b/pkg/cloudbroker/compute/migrate.go index 9ae6fc3..b00b518 100644 --- a/pkg/cloudbroker/compute/migrate.go +++ b/pkg/cloudbroker/compute/migrate.go @@ -11,20 +11,20 @@ import ( type MigrateRequest struct { // ID of compute instance // Required: true - ComputeID uint64 `url:"computeId"` + ComputeID uint64 `url:"computeId" json:"computeId"` // Particular Stack ID to migrate this compute to // Required: false - TargetStackID uint64 `url:"targetStackId,omitempty"` + TargetStackID uint64 `url:"targetStackId,omitempty" json:"targetStackId,omitempty"` // If live migration fails, destroy compute // on source node and recreate on the target // Required: false - Force bool `url:"force,omitempty"` + Force bool `url:"force,omitempty" json:"force,omitempty"` // Reason for action // Required: false - Reason string `url:"reason,omitempty"` + Reason string `url:"reason,omitempty" json:"reason,omitempty"` } func (crq MigrateRequest) validate() error { diff --git a/pkg/cloudbroker/compute/migrate_storage.go b/pkg/cloudbroker/compute/migrate_storage.go index 7ad25e9..648e773 100644 --- a/pkg/cloudbroker/compute/migrate_storage.go +++ b/pkg/cloudbroker/compute/migrate_storage.go @@ -11,23 +11,23 @@ import ( type MigrateStorageRequest struct { // ID of the compute instance // Required: true - ComputeID uint64 `url:"computeId"` + ComputeID uint64 `url:"computeId" json:"computeId"` // SEP ID to migrate disks // Required: true - SEPID uint64 `url:"sepId"` + SEPID uint64 `url:"sepId" json:"sepId"` // SEP pool name to migrate disks // Required: true - PoolName string `url:"poolName"` + PoolName string `url:"poolName" json:"poolName"` // Target stack ID // Required: true - StackID uint64 `url:"stackId"` + StackID uint64 `url:"stackId" json:"stackId"` // Async API call // Required: true - Sync bool `url:"sync"` + Sync bool `url:"sync" json:"sync"` } func (crq MigrateStorageRequest) validate() error { diff --git a/pkg/cloudbroker/compute/migrate_storage_abort.go b/pkg/cloudbroker/compute/migrate_storage_abort.go index d586d08..02b6ccc 100644 --- a/pkg/cloudbroker/compute/migrate_storage_abort.go +++ b/pkg/cloudbroker/compute/migrate_storage_abort.go @@ -11,7 +11,7 @@ import ( type MigrateStorageAbortRequest struct { // ID of the compute instance // Required: true - ComputeID uint64 `url:"computeId"` + ComputeID uint64 `url:"computeId" json:"computeId"` } func (crq MigrateStorageAbortRequest) validate() error { diff --git a/pkg/cloudbroker/compute/migrate_storage_clean_up.go b/pkg/cloudbroker/compute/migrate_storage_clean_up.go index 66dbdac..6d4c4d1 100644 --- a/pkg/cloudbroker/compute/migrate_storage_clean_up.go +++ b/pkg/cloudbroker/compute/migrate_storage_clean_up.go @@ -11,7 +11,7 @@ import ( type MigrateStorageCleanUpRequest struct { // ID of the compute instance // Required: true - ComputeID uint64 `url:"computeId"` + ComputeID uint64 `url:"computeId" json:"computeId"` } func (crq MigrateStorageCleanUpRequest) validate() error { diff --git a/pkg/cloudbroker/compute/migrate_storage_info.go b/pkg/cloudbroker/compute/migrate_storage_info.go index 981e434..4ef8af6 100644 --- a/pkg/cloudbroker/compute/migrate_storage_info.go +++ b/pkg/cloudbroker/compute/migrate_storage_info.go @@ -11,7 +11,7 @@ import ( type MigrateStorageInfoRequest struct { // ID of the compute instance // Required: true - ComputeID uint64 `url:"computeId"` + ComputeID uint64 `url:"computeId" json:"computeId"` } func (crq MigrateStorageInfoRequest) validate() error { diff --git a/pkg/cloudbroker/compute/move_to_rg.go b/pkg/cloudbroker/compute/move_to_rg.go index 7bcd861..2bd7e42 100644 --- a/pkg/cloudbroker/compute/move_to_rg.go +++ b/pkg/cloudbroker/compute/move_to_rg.go @@ -11,26 +11,26 @@ import ( type MoveToRGRequest struct { // ID of the compute instance to move // Required: true - ComputeID uint64 `url:"computeId"` + ComputeID uint64 `url:"computeId" json:"computeId"` // ID of the target resource group // Required: true - RGID uint64 `url:"rgId"` + RGID uint64 `url:"rgId" json:"rgId"` // New name for the compute upon successful move, // if name change required. // Pass empty string if no name change necessary // Required: false - Name string `url:"name,omitempty"` + Name string `url:"name,omitempty" json:"name,omitempty"` // Should the compute be restarted upon successful move // Required: false - Autostart bool `url:"autostart,omitempty"` + Autostart bool `url:"autostart,omitempty" json:"autostart,omitempty"` // By default moving compute in a running state is not allowed. // Set this flag to True to force stop running compute instance prior to move. // Required: false - ForceStop bool `url:"forceStop,omitempty"` + ForceStop bool `url:"forceStop,omitempty" json:"forceStop,omitempty"` } func (crq MoveToRGRequest) validate() error { diff --git a/pkg/cloudbroker/compute/net_attach.go b/pkg/cloudbroker/compute/net_attach.go index 5acaafc..1a0f673 100644 --- a/pkg/cloudbroker/compute/net_attach.go +++ b/pkg/cloudbroker/compute/net_attach.go @@ -13,27 +13,27 @@ import ( type NetAttachRequest struct { // ID of compute instance // Required: true - ComputeID uint64 `url:"computeId"` + ComputeID uint64 `url:"computeId" json:"computeId"` // Network type // 'EXTNET' for connect to external network directly // and 'VINS' for connect to ViNS // Required: true - NetType string `url:"netType"` + NetType string `url:"netType" json:"netType"` // Network ID for connect to // For EXTNET - external network ID // For VINS - VINS ID // Required: true - NetID uint64 `url:"netId"` + NetID uint64 `url:"netId" json:"netId"` // Directly required IP address for new network interface // Required: true - IPAddr string `url:"ipAddr,omitempty"` + IPAddr string `url:"ipAddr,omitempty" json:"ipAddr,omitempty"` // Reason for action // Required: false - Reason string `url:"reason,omitempty"` + Reason string `url:"reason,omitempty" json:"reason,omitempty"` } func (crq NetAttachRequest) validate() error { diff --git a/pkg/cloudbroker/compute/net_detach.go b/pkg/cloudbroker/compute/net_detach.go index 0816732..0815da4 100644 --- a/pkg/cloudbroker/compute/net_detach.go +++ b/pkg/cloudbroker/compute/net_detach.go @@ -11,19 +11,19 @@ import ( type NetDetachRequest struct { // ID of compute instance // Required: true - ComputeID uint64 `url:"computeId"` + ComputeID uint64 `url:"computeId" json:"computeId"` // IP of the network interface // Required: false - IPAddr string `url:"ipAddr,omitempty"` + IPAddr string `url:"ipAddr,omitempty" json:"ipAddr,omitempty"` // MAC of the network interface // Required: false - MAC string `url:"mac,omitempty"` + MAC string `url:"mac,omitempty" json:"mac,omitempty"` // Reason for action // Required: false - Reason string `url:"reason,omitempty"` + Reason string `url:"reason,omitempty" json:"reason,omitempty"` } func (crq NetDetachRequest) validate() error { diff --git a/pkg/cloudbroker/compute/net_qos.go b/pkg/cloudbroker/compute/net_qos.go index 519afec..0f9c5cb 100644 --- a/pkg/cloudbroker/compute/net_qos.go +++ b/pkg/cloudbroker/compute/net_qos.go @@ -13,30 +13,30 @@ import ( type NetQOSRequest struct { // ID of compute instance // Required: true - ComputeID uint64 `url:"computeId"` + ComputeID uint64 `url:"computeId" json:"computeId"` // Network ID // Required: true - NetID uint64 `url:"netId"` + NetID uint64 `url:"netId" json:"netId"` // Network type // Should be one of: // - VINS // - EXTNET // Required: true - NetType string `url:"netType"` + NetType string `url:"netType" json:"netType"` // Internal traffic, kbit // Required: false - IngressRate uint64 `url:"ingress_rate,omitempty"` + IngressRate uint64 `url:"ingress_rate,omitempty" json:"ingress_rate,omitempty"` // Internal traffic burst, kbit // Required: false - IngressBurst uint64 `url:"ingress_burst,omitempty"` + IngressBurst uint64 `url:"ingress_burst,omitempty" json:"ingress_burst,omitempty"` // External traffic rate, kbit // Required: false - EgressRate uint64 `url:"egress_rate,omitempty"` + EgressRate uint64 `url:"egress_rate,omitempty" json:"egress_rate,omitempty"` } func (crq NetQOSRequest) validate() error { diff --git a/pkg/cloudbroker/compute/pause.go b/pkg/cloudbroker/compute/pause.go index b109890..f31053d 100644 --- a/pkg/cloudbroker/compute/pause.go +++ b/pkg/cloudbroker/compute/pause.go @@ -11,11 +11,11 @@ import ( type PauseRequest struct { // ID of compute instance // Required: true - ComputeID uint64 `url:"computeId"` + ComputeID uint64 `url:"computeId" json:"computeId"` // Reason for action // Required: false - Reason string `url:"reason,omitempty"` + Reason string `url:"reason,omitempty" json:"reason,omitempty"` } func (crq PauseRequest) validate() error { diff --git a/pkg/cloudbroker/compute/pfw_add.go b/pkg/cloudbroker/compute/pfw_add.go index 56df46a..2cfaba8 100644 --- a/pkg/cloudbroker/compute/pfw_add.go +++ b/pkg/cloudbroker/compute/pfw_add.go @@ -13,30 +13,30 @@ import ( type PFWAddRequest struct { // ID of compute instance // Required: true - ComputeID uint64 `url:"computeId"` + ComputeID uint64 `url:"computeId" json:"computeId"` // External start port number for the rule // Required: true - PublicPortStart uint64 `url:"publicPortStart"` + PublicPortStart uint64 `url:"publicPortStart" json:"publicPortStart"` // End port number (inclusive) for the ranged rule // Required: false - PublicPortEnd uint64 `url:"publicPortEnd,omitempty"` + PublicPortEnd uint64 `url:"publicPortEnd,omitempty" json:"publicPortEnd,omitempty"` // Internal base port number // Required: true - LocalBasePort uint64 `url:"localBasePort"` + LocalBasePort uint64 `url:"localBasePort" json:"localBasePort"` // Network protocol // Should be one of: // - tcp // - udp // Required: true - Proto string `url:"proto"` + Proto string `url:"proto" json:"proto"` // Reason for action // Required: false - Reason string `url:"reason,omitempty"` + Reason string `url:"reason,omitempty" json:"reason,omitempty"` } func (crq PFWAddRequest) validate() error { diff --git a/pkg/cloudbroker/compute/pfw_del.go b/pkg/cloudbroker/compute/pfw_del.go index 9f3cee7..a489d7c 100644 --- a/pkg/cloudbroker/compute/pfw_del.go +++ b/pkg/cloudbroker/compute/pfw_del.go @@ -11,34 +11,34 @@ import ( type PFWDelRequest struct { // ID of compute instance // Required: true - ComputeID uint64 `url:"computeId"` + ComputeID uint64 `url:"computeId" json:"computeId"` // ID of the rule to delete. If specified, all other arguments will be ignored // Required: false - RuleID uint64 `url:"ruleId,omitempty"` + RuleID uint64 `url:"ruleId,omitempty" json:"ruleId,omitempty"` // External start port number for the rule // Required: false - PublicPortStart uint64 `url:"publicPortStart,omitempty"` + PublicPortStart uint64 `url:"publicPortStart,omitempty" json:"publicPortStart,omitempty"` // End port number (inclusive) for the ranged rule // Required: false - PublicPortEnd uint64 `url:"publicPortEnd,omitempty"` + PublicPortEnd uint64 `url:"publicPortEnd,omitempty" json:"publicPortEnd,omitempty"` // Internal base port number // Required: false - LocalBasePort uint64 `url:"localBasePort,omitempty"` + LocalBasePort uint64 `url:"localBasePort,omitempty" json:"localBasePort,omitempty"` // Network protocol // Should be one of: // - tcp // - udp // Required: false - Proto string `url:"proto,omitempty"` + Proto string `url:"proto,omitempty" json:"proto,omitempty"` // Reason for action // Required: false - Reason string `url:"reason,omitempty"` + Reason string `url:"reason,omitempty" json:"reason,omitempty"` } func (crq PFWDelRequest) validate() error { diff --git a/pkg/cloudbroker/compute/pfw_list.go b/pkg/cloudbroker/compute/pfw_list.go index d3a6c00..4e14e8c 100644 --- a/pkg/cloudbroker/compute/pfw_list.go +++ b/pkg/cloudbroker/compute/pfw_list.go @@ -11,11 +11,11 @@ import ( type PFWListRequest struct { // ID of compute instance // Required: true - ComputeID uint64 `url:"computeId"` + ComputeID uint64 `url:"computeId" json:"computeId"` // Reason for action // Required: false - Reason string `url:"reason,omitempty"` + Reason string `url:"reason,omitempty" json:"reason,omitempty"` } func (crq PFWListRequest) validate() error { diff --git a/pkg/cloudbroker/compute/pin_to_stack.go b/pkg/cloudbroker/compute/pin_to_stack.go index 68ebef1..365f0b5 100644 --- a/pkg/cloudbroker/compute/pin_to_stack.go +++ b/pkg/cloudbroker/compute/pin_to_stack.go @@ -11,15 +11,15 @@ import ( type PinToStackRequest struct { // ID of the compute instance // Required: true - ComputeID uint64 `url:"computeId"` + ComputeID uint64 `url:"computeId" json:"computeId"` // Stack ID to pin to // Required: true - TargetStackID uint64 `url:"targetStackId"` + TargetStackID uint64 `url:"targetStackId" json:"targetStackId"` // Try to migrate or not if compute in running states // Required: false - Force bool `url:"force"` + Force bool `url:"force" json:"force"` } func (crq PinToStackRequest) validate() error { diff --git a/pkg/cloudbroker/compute/power_cycle.go b/pkg/cloudbroker/compute/power_cycle.go index c0b33a0..6ad9c4d 100644 --- a/pkg/cloudbroker/compute/power_cycle.go +++ b/pkg/cloudbroker/compute/power_cycle.go @@ -11,7 +11,7 @@ import ( type PowerCycleRequest struct { // ID of compute instance // Required: true - ComputeID uint64 `url:"computeId"` + ComputeID uint64 `url:"computeId" json:"computeId"` } func (crq PowerCycleRequest) validate() error { diff --git a/pkg/cloudbroker/compute/reboot.go b/pkg/cloudbroker/compute/reboot.go index 1838d4e..6aaf147 100644 --- a/pkg/cloudbroker/compute/reboot.go +++ b/pkg/cloudbroker/compute/reboot.go @@ -11,11 +11,11 @@ import ( type RebootRequest struct { // ID of compute instance // Required: true - ComputeID uint64 `url:"computeId"` + ComputeID uint64 `url:"computeId" json:"computeId"` // Reason for action // Required: false - Reason string `url:"reason,omitempty"` + Reason string `url:"reason,omitempty" json:"reason,omitempty"` } func (crq RebootRequest) validate() error { diff --git a/pkg/cloudbroker/compute/redeploy.go b/pkg/cloudbroker/compute/redeploy.go index e4d7ef9..2eff6dd 100644 --- a/pkg/cloudbroker/compute/redeploy.go +++ b/pkg/cloudbroker/compute/redeploy.go @@ -11,15 +11,15 @@ import ( type RedeployRequest struct { // ID of compute instance // Required: true - ComputeID uint64 `url:"computeId"` + ComputeID uint64 `url:"computeId" json:"computeId"` // ID of the new OS image, if image change is required // Required: false - ImageID uint64 `url:"imageId,omitempty"` + ImageID uint64 `url:"imageId,omitempty" json:"imageId,omitempty"` // New size for the boot disk in GB, if boot disk size change is required // Required: false - DiskSize uint64 `url:"diskSize,omitempty"` + DiskSize uint64 `url:"diskSize,omitempty" json:"diskSize,omitempty"` // How to handle data disks connected to this compute instance // Should be one of: @@ -27,19 +27,19 @@ type RedeployRequest struct { // - DETACH // - DESTROY // Required: false - DataDisks string `url:"dataDisks,omitempty"` + DataDisks string `url:"dataDisks,omitempty" json:"dataDisks,omitempty"` // Should the compute be restarted upon successful redeploy // Required: false - AutoStart bool `url:"autoStart,omitempty"` + AutoStart bool `url:"autoStart,omitempty" json:"autoStart,omitempty"` // Set this flag to True to force stop running compute instance and redeploy next // Required: false - ForceStop bool `url:"forceStop,omitempty"` + ForceStop bool `url:"forceStop,omitempty" json:"forceStop,omitempty"` // Reason for action // Required: false - Reason string `url:"reason,omitempty"` + Reason string `url:"reason,omitempty" json:"reason,omitempty"` } func (crq RedeployRequest) validate() error { diff --git a/pkg/cloudbroker/compute/registration.go b/pkg/cloudbroker/compute/registration.go index 1c4977a..0f000d6 100644 --- a/pkg/cloudbroker/compute/registration.go +++ b/pkg/cloudbroker/compute/registration.go @@ -11,11 +11,11 @@ import ( type RegistrationRequest struct { // ID of the Compute // Required: true - ComputeID uint64 `url:"computeId"` + ComputeID uint64 `url:"computeId" json:"computeId"` // Unique compute registration key // Required: true - RegistrationKey string `url:"registrationKey"` + RegistrationKey string `url:"registrationKey" json:"registrationKey"` } func (crq RegistrationRequest) validate() error { diff --git a/pkg/cloudbroker/compute/repair_boot_fs.go b/pkg/cloudbroker/compute/repair_boot_fs.go index a12aad6..b9db663 100644 --- a/pkg/cloudbroker/compute/repair_boot_fs.go +++ b/pkg/cloudbroker/compute/repair_boot_fs.go @@ -11,11 +11,11 @@ import ( type RepairBootFSRequest struct { // ID of compute instance // Required: true - ComputeID uint64 `url:"computeId"` + ComputeID uint64 `url:"computeId" json:"computeId"` // Reason for action // Required: false - Reason string `url:"reason,omitempty"` + Reason string `url:"reason,omitempty" json:"reason,omitempty"` } func (crq RepairBootFSRequest) validate() error { diff --git a/pkg/cloudbroker/compute/reset.go b/pkg/cloudbroker/compute/reset.go index 34075f3..d703404 100644 --- a/pkg/cloudbroker/compute/reset.go +++ b/pkg/cloudbroker/compute/reset.go @@ -11,11 +11,11 @@ import ( type ResetRequest struct { // ID of compute instance // Required: true - ComputeID uint64 `url:"computeId"` + ComputeID uint64 `url:"computeId" json:"computeId"` // Reason for action // Required: false - Reason string `url:"reason,omitempty"` + Reason string `url:"reason,omitempty" json:"reason,omitempty"` } func (crq ResetRequest) validate() error { diff --git a/pkg/cloudbroker/compute/resize.go b/pkg/cloudbroker/compute/resize.go index 38de54a..7c1a334 100644 --- a/pkg/cloudbroker/compute/resize.go +++ b/pkg/cloudbroker/compute/resize.go @@ -11,25 +11,25 @@ import ( type ResizeRequest struct { // ID of compute instance // Required: true - ComputeID uint64 `url:"computeId"` + ComputeID uint64 `url:"computeId" json:"computeId"` // New CPU count. // Pass 0 if no change to CPU count is required // Required: false - Force bool `url:"force,omitempty"` + Force bool `url:"force,omitempty" json:"force,omitempty"` // New RAM volume in MB. // Pass 0 if no change to RAM volume is required // Required: false - CPU uint64 `url:"cpu,omitempty"` + CPU uint64 `url:"cpu,omitempty" json:"cpu,omitempty"` // Force compute resize // Required: false - RAM uint64 `url:"ram,omitempty"` + RAM uint64 `url:"ram,omitempty" json:"ram,omitempty"` // Reason for action // Required: false - Reason string `url:"reason,omitempty"` + Reason string `url:"reason,omitempty" json:"reason,omitempty"` } func (crq ResizeRequest) validate() error { diff --git a/pkg/cloudbroker/compute/restore.go b/pkg/cloudbroker/compute/restore.go index f500ffa..df08be6 100644 --- a/pkg/cloudbroker/compute/restore.go +++ b/pkg/cloudbroker/compute/restore.go @@ -11,11 +11,11 @@ import ( type RestoreRequest struct { // ID of compute instance // Required: true - ComputeID uint64 `url:"computeId"` + ComputeID uint64 `url:"computeId" json:"computeId"` // Reason for action // Required: false - Reason string `url:"reason,omitempty"` + Reason string `url:"reason,omitempty" json:"reason,omitempty"` } func (crq RestoreRequest) validate() error { diff --git a/pkg/cloudbroker/compute/resume.go b/pkg/cloudbroker/compute/resume.go index ba56319..2e902c2 100644 --- a/pkg/cloudbroker/compute/resume.go +++ b/pkg/cloudbroker/compute/resume.go @@ -11,11 +11,11 @@ import ( type ResumeRequest struct { // ID of compute instance // Required: true - ComputeID uint64 `url:"computeId"` + ComputeID uint64 `url:"computeId" json:"computeId"` // Reason for action // Required: false - Reason string `url:"reason,omitempty"` + Reason string `url:"reason,omitempty" json:"reason,omitempty"` } func (crq ResumeRequest) validate() error { diff --git a/pkg/cloudbroker/compute/snapshot_create.go b/pkg/cloudbroker/compute/snapshot_create.go index f4a8a4c..5877868 100644 --- a/pkg/cloudbroker/compute/snapshot_create.go +++ b/pkg/cloudbroker/compute/snapshot_create.go @@ -11,12 +11,12 @@ import ( type SnapshotCreateRequest struct { // ID of the compute instance to create snapshot for // Required: true - ComputeID uint64 `url:"computeId"` + ComputeID uint64 `url:"computeId" json:"computeId"` // Text label for snapshot. // Must be unique among this compute snapshots // Required: true - Label string `url:"label"` + Label string `url:"label" json:"label"` } func (crq SnapshotCreateRequest) validate() error { diff --git a/pkg/cloudbroker/compute/snapshot_delete.go b/pkg/cloudbroker/compute/snapshot_delete.go index efe6652..5cc7e13 100644 --- a/pkg/cloudbroker/compute/snapshot_delete.go +++ b/pkg/cloudbroker/compute/snapshot_delete.go @@ -11,11 +11,11 @@ import ( type SnapshotDeleteRequest struct { // ID of the compute instance // Required: true - ComputeID uint64 `url:"computeId"` + ComputeID uint64 `url:"computeId" json:"computeId"` // Text label of snapshot to delete // Required: true - Label string `url:"label"` + Label string `url:"label" json:"label"` } func (crq SnapshotDeleteRequest) validate() error { diff --git a/pkg/cloudbroker/compute/snapshot_evict_disk.go b/pkg/cloudbroker/compute/snapshot_evict_disk.go index f1b8b6b..4b9696b 100644 --- a/pkg/cloudbroker/compute/snapshot_evict_disk.go +++ b/pkg/cloudbroker/compute/snapshot_evict_disk.go @@ -11,11 +11,11 @@ import ( type SnapshotEvictDiskRequest struct { // ID of the compute instance // Required: true - ComputeID uint64 `url:"computeId"` + ComputeID uint64 `url:"computeId" json:"computeId"` // ID of the disk instance // Required: true - DiskID uint64 `url:"diskId"` + DiskID uint64 `url:"diskId" json:"diskId"` } func (crq SnapshotEvictDiskRequest) validate() error { diff --git a/pkg/cloudbroker/compute/snapshot_list.go b/pkg/cloudbroker/compute/snapshot_list.go index cd5dda5..f3b2313 100644 --- a/pkg/cloudbroker/compute/snapshot_list.go +++ b/pkg/cloudbroker/compute/snapshot_list.go @@ -11,7 +11,7 @@ import ( type SnapshotListRequest struct { // ID of the compute instance // Required: true - ComputeID uint64 `url:"computeId"` + ComputeID uint64 `url:"computeId" json:"computeId"` } func (crq SnapshotListRequest) validate() error { diff --git a/pkg/cloudbroker/compute/snapshot_rollback.go b/pkg/cloudbroker/compute/snapshot_rollback.go index 60cb6be..d66a424 100644 --- a/pkg/cloudbroker/compute/snapshot_rollback.go +++ b/pkg/cloudbroker/compute/snapshot_rollback.go @@ -11,11 +11,11 @@ import ( type SnapshotRollbackRequest struct { // ID of the compute instance // Required: true - ComputeID uint64 `url:"computeId"` + ComputeID uint64 `url:"computeId" json:"computeId"` // Text label of snapshot to rollback // Required: true - Label string `url:"label"` + Label string `url:"label" json:"label"` } func (crq SnapshotRollbackRequest) validate() error { diff --git a/pkg/cloudbroker/compute/snapshot_usage.go b/pkg/cloudbroker/compute/snapshot_usage.go index af28bd1..740a0a7 100644 --- a/pkg/cloudbroker/compute/snapshot_usage.go +++ b/pkg/cloudbroker/compute/snapshot_usage.go @@ -11,12 +11,12 @@ import ( type SnapshotUsageRequest struct { // ID of the compute instance // Required: true - ComputeID uint64 `url:"computeId"` + ComputeID uint64 `url:"computeId" json:"computeId"` // Specify to show usage exact for this snapshot. // Leave empty for get usage for all compute snapshots // Required: false - Label string `url:"label,omitempty"` + Label string `url:"label,omitempty" json:"label,omitempty"` } func (crq SnapshotUsageRequest) validate() error { diff --git a/pkg/cloudbroker/compute/start.go b/pkg/cloudbroker/compute/start.go index de71072..7de68f6 100644 --- a/pkg/cloudbroker/compute/start.go +++ b/pkg/cloudbroker/compute/start.go @@ -11,19 +11,19 @@ import ( type StartRequest struct { // ID of compute instance // Required: true - ComputeID uint64 `url:"computeId"` + ComputeID uint64 `url:"computeId" json:"computeId"` // ID of CD-ROM live image to boot // Required: false - AltBootID uint64 `url:"altBootId,omitempty"` + AltBootID uint64 `url:"altBootId,omitempty" json:"altBootId,omitempty"` // ID of stack to start compute // Required: false - StackID uint64 `url:"stackId,omitempty"` + StackID uint64 `url:"stackId,omitempty" json:"stackId,omitempty"` // Reason for action // Required: false - Reason string `url:"reason,omitempty"` + Reason string `url:"reason,omitempty" json:"reason,omitempty"` } func (crq StartRequest) validate() error { diff --git a/pkg/cloudbroker/compute/stop.go b/pkg/cloudbroker/compute/stop.go index 82741cb..131dd55 100644 --- a/pkg/cloudbroker/compute/stop.go +++ b/pkg/cloudbroker/compute/stop.go @@ -11,15 +11,15 @@ import ( type StopRequest struct { // ID of compute instance // Required: true - ComputeID uint64 `url:"computeId"` + ComputeID uint64 `url:"computeId" json:"computeId"` // Force stop compute // Required: false - Force bool `url:"force,omitempty"` + Force bool `url:"force,omitempty" json:"force,omitempty"` // Reason for action // Required: false - Reason string `url:"reason,omitempty"` + Reason string `url:"reason,omitempty" json:"reason,omitempty"` } func (crq StopRequest) validate() error { diff --git a/pkg/cloudbroker/compute/tag_add.go b/pkg/cloudbroker/compute/tag_add.go index cb2703d..a21ed43 100644 --- a/pkg/cloudbroker/compute/tag_add.go +++ b/pkg/cloudbroker/compute/tag_add.go @@ -11,15 +11,15 @@ import ( type TagAddRequest struct { // IDs of the compute instances // Required: true - ComputeIDs []uint64 `url:"computeIds"` + ComputeIDs []uint64 `url:"computeIds" json:"computeIds"` // Tag key // Required: true - Key string `url:"key"` + Key string `url:"key" json:"key"` // Tag value // Required: true - Value string `url:"value"` + Value string `url:"value" json:"value"` } func (crq TagAddRequest) validate() error { diff --git a/pkg/cloudbroker/compute/tag_remove.go b/pkg/cloudbroker/compute/tag_remove.go index 94373f0..440f1bd 100644 --- a/pkg/cloudbroker/compute/tag_remove.go +++ b/pkg/cloudbroker/compute/tag_remove.go @@ -11,11 +11,11 @@ import ( type TagRemoveRequest struct { // IDs of the compute instances // Required: true - ComputeIDs []uint64 `url:"computeIds"` + ComputeIDs []uint64 `url:"computeIds" json:"computeIds"` // Tag key // Required: true - Key string `url:"key"` + Key string `url:"key" json:"key"` } func (crq TagRemoveRequest) validate() error { diff --git a/pkg/cloudbroker/compute/unpin_from_stack.go b/pkg/cloudbroker/compute/unpin_from_stack.go index ae3545d..ec5b511 100644 --- a/pkg/cloudbroker/compute/unpin_from_stack.go +++ b/pkg/cloudbroker/compute/unpin_from_stack.go @@ -11,7 +11,7 @@ import ( type UnpinFromStackRequest struct { // ID of the compute instance // Required: true - ComputeID uint64 `url:"computeId"` + ComputeID uint64 `url:"computeId" json:"computeId"` } func (crq UnpinFromStackRequest) validate() error { diff --git a/pkg/cloudbroker/compute/update.go b/pkg/cloudbroker/compute/update.go index c3d8214..84f09ee 100644 --- a/pkg/cloudbroker/compute/update.go +++ b/pkg/cloudbroker/compute/update.go @@ -11,19 +11,19 @@ import ( type UpdateRequest struct { // ID of the compute // Required: true - ComputeID uint64 `url:"computeId"` + ComputeID uint64 `url:"computeId" json:"computeId"` // New name // Required: false - Name string `url:"name,omitempty"` + Name string `url:"name,omitempty" json:"name,omitempty"` // New description // Required: false - Description string `url:"desc,omitempty"` + Description string `url:"desc,omitempty" json:"desc,omitempty"` // Reason for action // Required: false - Reason string `url:"reason,omitempty"` + Reason string `url:"reason,omitempty" json:"reason,omitempty"` } func (crq UpdateRequest) validate() error { diff --git a/pkg/cloudbroker/compute/user_grant.go b/pkg/cloudbroker/compute/user_grant.go index 9ab88fc..96087dd 100644 --- a/pkg/cloudbroker/compute/user_grant.go +++ b/pkg/cloudbroker/compute/user_grant.go @@ -13,11 +13,11 @@ import ( type UserGrantRequest struct { // ID of the compute instance // Required: true - ComputeID uint64 `url:"computeId"` + ComputeID uint64 `url:"computeId" json:"computeId"` // Name of the user to add // Required: true - Username string `url:"userName"` + Username string `url:"userName" json:"userName"` // Access type // Should be one of: @@ -25,7 +25,7 @@ type UserGrantRequest struct { // - 'RCX' for Write // - 'ARCXDU' for Admin // Required: true - AccessType string `url:"accesstype"` + AccessType string `url:"accesstype" json:"accesstype"` } func (crq UserGrantRequest) validate() error { diff --git a/pkg/cloudbroker/compute/user_list.go b/pkg/cloudbroker/compute/user_list.go index b5b0f83..cc98cc2 100644 --- a/pkg/cloudbroker/compute/user_list.go +++ b/pkg/cloudbroker/compute/user_list.go @@ -11,7 +11,7 @@ import ( type UserListRequest struct { // ID of the compute instance // Required: true - ComputeID uint64 `url:"computeId"` + ComputeID uint64 `url:"computeId" json:"computeId"` } func (crq UserListRequest) validate() error { diff --git a/pkg/cloudbroker/compute/user_revoke.go b/pkg/cloudbroker/compute/user_revoke.go index a44c176..1232faf 100644 --- a/pkg/cloudbroker/compute/user_revoke.go +++ b/pkg/cloudbroker/compute/user_revoke.go @@ -11,11 +11,11 @@ import ( type UserRevokeRequest struct { // ID of the compute instance // Required: true - ComputeID uint64 `url:"computeId"` + ComputeID uint64 `url:"computeId" json:"computeId"` // Name of the user to remove // Required: true - Username string `url:"userName"` + Username string `url:"userName" json:"userName"` } func (crq UserRevokeRequest) validate() error { diff --git a/pkg/cloudbroker/compute/user_update.go b/pkg/cloudbroker/compute/user_update.go index 1411795..74c847d 100644 --- a/pkg/cloudbroker/compute/user_update.go +++ b/pkg/cloudbroker/compute/user_update.go @@ -13,11 +13,11 @@ import ( type UserUpdateRequest struct { // ID of the compute instance // Required: true - ComputeID uint64 `url:"computeId"` + ComputeID uint64 `url:"computeId" json:"computeId"` // Name of the user to update // Required: true - Username string `url:"userName"` + Username string `url:"userName" json:"userName"` // Access type // Should be one of: @@ -25,7 +25,7 @@ type UserUpdateRequest struct { // - 'RCX' for Write // - 'ARCXDU' for Admin // Required: true - AccessType string `url:"accesstype"` + AccessType string `url:"accesstype" json:"accesstype"` } func (crq UserUpdateRequest) validate() error { diff --git a/pkg/cloudbroker/disks/create.go b/pkg/cloudbroker/disks/create.go index 428c61d..d7626c3 100644 --- a/pkg/cloudbroker/disks/create.go +++ b/pkg/cloudbroker/disks/create.go @@ -13,46 +13,46 @@ import ( type CreateRequest struct { // ID of the account // Required: true - AccountID uint64 `url:"accountId"` + AccountID uint64 `url:"accountId" json:"accountId"` // ID of the grid (platform) // Required: true - GID uint64 `url:"gid"` + GID uint64 `url:"gid" json:"gid"` // Name of disk // Required: true - Name string `url:"name"` + Name string `url:"name" json:"name"` // Description of disk // Required: false - Description string `url:"description,omitempty"` + Description string `url:"description,omitempty" json:"description,omitempty"` // Size in GB, default is 0 // Required: false - Size uint64 `url:"size,omitempty"` + Size uint64 `url:"size,omitempty" json:"size,omitempty"` // Type of disk // - B=Boot // - D=Data // - T=Temp // Required: true - Type string `url:"type"` + Type string `url:"type" json:"type"` // Size in GB default is 0 // Required: false - SSDSize uint64 `url:"ssdSize,omitempty"` + SSDSize uint64 `url:"ssdSize,omitempty" json:"ssdSize,omitempty"` // Max IOPS disk can perform defaults to 2000 // Required: false - IOPS uint64 `url:"iops,omitempty"` + IOPS uint64 `url:"iops,omitempty" json:"iops,omitempty"` // Storage endpoint provider ID to create disk // Required: false - SEPID uint64 `url:"sep_id,omitempty"` + SEPID uint64 `url:"sep_id,omitempty" json:"sep_id,omitempty"` // Pool name to create disk // Required: false - Pool string `url:"pool,omitempty"` + Pool string `url:"pool,omitempty" json:"pool,omitempty"` } func (drq CreateRequest) validate() error { diff --git a/pkg/cloudbroker/disks/delete.go b/pkg/cloudbroker/disks/delete.go index 3f23e5d..b462b93 100644 --- a/pkg/cloudbroker/disks/delete.go +++ b/pkg/cloudbroker/disks/delete.go @@ -11,19 +11,19 @@ import ( type DeleteRequest struct { // ID of disk to delete // Required: true - DiskID uint64 `url:"diskId"` + DiskID uint64 `url:"diskId" json:"diskId"` // Detach disk from machine first // Required: false - Detach bool `url:"detach,omitempty"` + Detach bool `url:"detach,omitempty" json:"detach,omitempty"` // Whether to completely delete the disk, works only with non attached disks // Required: false - Permanently bool `url:"permanently,omitempty"` + Permanently bool `url:"permanently,omitempty" json:"permanently,omitempty"` // Reason to delete // Required: false - Reason string `url:"reason,omitempty"` + Reason string `url:"reason,omitempty" json:"reason,omitempty"` } func (drq DeleteRequest) validate() error { diff --git a/pkg/cloudbroker/disks/delete_disks.go b/pkg/cloudbroker/disks/delete_disks.go index ddd6baa..097929b 100644 --- a/pkg/cloudbroker/disks/delete_disks.go +++ b/pkg/cloudbroker/disks/delete_disks.go @@ -11,15 +11,15 @@ import ( type DeleteDisksRequest struct { // List of disk ids to delete // Required: true - DisksIDs []uint64 `url:"diskIds"` + DisksIDs []uint64 `url:"diskIds" json:"diskIds"` // Reason for deleting the disks // Required: true - Reason string `url:"reason"` + Reason string `url:"reason" json:"reason"` // Whether to completely delete the disks, works only with non attached disks // Required: false - Permanently bool `url:"permanently,omitempty"` + Permanently bool `url:"permanently,omitempty" json:"permanently,omitempty"` } func (drq DeleteDisksRequest) validate() error { diff --git a/pkg/cloudbroker/disks/get.go b/pkg/cloudbroker/disks/get.go index 3ea7695..fe70f35 100644 --- a/pkg/cloudbroker/disks/get.go +++ b/pkg/cloudbroker/disks/get.go @@ -11,7 +11,7 @@ import ( type GetRequest struct { // ID of the disk // Required: true - DiskID uint64 `url:"diskId"` + DiskID uint64 `url:"diskId" json:"diskId"` } func (drq GetRequest) validate() error { diff --git a/pkg/cloudbroker/disks/limit_io.go b/pkg/cloudbroker/disks/limit_io.go index 14c4e4b..fbc707d 100644 --- a/pkg/cloudbroker/disks/limit_io.go +++ b/pkg/cloudbroker/disks/limit_io.go @@ -11,63 +11,63 @@ import ( type LimitIORequest struct { // ID of the disk to limit // Required: true - DiskID uint64 `url:"diskId"` + DiskID uint64 `url:"diskId" json:"diskId"` // Alias for total_iops_sec for backwards compatibility // Required: false - IOPS uint64 `url:"iops,omitempty"` + IOPS uint64 `url:"iops,omitempty" json:"iops,omitempty"` // TotalBytesSec // Required: false - TotalBytesSec uint64 `url:"total_bytes_sec,omitempty"` + TotalBytesSec uint64 `url:"total_bytes_sec,omitempty" json:"total_bytes_sec,omitempty"` // ReadBytesSec // Required: false - ReadBytesSec uint64 `url:"read_bytes_sec,omitempty"` + ReadBytesSec uint64 `url:"read_bytes_sec,omitempty" json:"read_bytes_sec,omitempty"` // WriteBytesSec // Required: false - WriteBytesSec uint64 `url:"write_bytes_sec,omitempty"` + WriteBytesSec uint64 `url:"write_bytes_sec,omitempty" json:"write_bytes_sec,omitempty"` // TotalIOPSSec // Required: false - TotalIOPSSec uint64 `url:"total_iops_sec,omitempty"` + TotalIOPSSec uint64 `url:"total_iops_sec,omitempty" json:"total_iops_sec,omitempty"` // ReadIOPSSec // Required: false - ReadIOPSSec uint64 `url:"read_iops_sec,omitempty"` + ReadIOPSSec uint64 `url:"read_iops_sec,omitempty" json:"read_iops_sec,omitempty"` // WriteIOPSSec // Required: false - WriteIOPSSec uint64 `url:"write_iops_sec,omitempty"` + WriteIOPSSec uint64 `url:"write_iops_sec,omitempty" json:"write_iops_sec,omitempty"` // TotalBytesSecMax // Required: false - TotalBytesSecMax uint64 `url:"total_bytes_sec_max,omitempty"` + TotalBytesSecMax uint64 `url:"total_bytes_sec_max,omitempty" json:"total_bytes_sec_max,omitempty"` // ReadBytesSecMax // Required: false - ReadBytesSecMax uint64 `url:"read_bytes_sec_max,omitempty"` + ReadBytesSecMax uint64 `url:"read_bytes_sec_max,omitempty" json:"read_bytes_sec_max,omitempty"` // WriteBytesSecMax // Required: false - WriteBytesSecMax uint64 `url:"write_bytes_sec_max,omitempty"` + WriteBytesSecMax uint64 `url:"write_bytes_sec_max,omitempty" json:"write_bytes_sec_max,omitempty"` // TotalIOPSSecMax // Required: false - TotalIOPSSecMax uint64 `url:"total_iops_sec_max,omitempty"` + TotalIOPSSecMax uint64 `url:"total_iops_sec_max,omitempty" json:"total_iops_sec_max,omitempty"` // ReadIOPSSecMax // Required: false - ReadIOPSSecMax uint64 `url:"read_iops_sec_max,omitempty"` + ReadIOPSSecMax uint64 `url:"read_iops_sec_max,omitempty" json:"read_iops_sec_max,omitempty"` // WriteIOPSSecMax // Required: false - WriteIOPSSecMax uint64 `url:"write_iops_sec_max,omitempty"` + WriteIOPSSecMax uint64 `url:"write_iops_sec_max,omitempty" json:"write_iops_sec_max,omitempty"` // SizeIOPSSec // Required: false - SizeIOPSSec uint64 `url:"size_iops_sec,omitempty"` + SizeIOPSSec uint64 `url:"size_iops_sec,omitempty" json:"size_iops_sec,omitempty"` } func (drq LimitIORequest) validate() error { diff --git a/pkg/cloudbroker/disks/list.go b/pkg/cloudbroker/disks/list.go index aeff68c..11cb0e7 100644 --- a/pkg/cloudbroker/disks/list.go +++ b/pkg/cloudbroker/disks/list.go @@ -10,19 +10,19 @@ import ( type ListRequest struct { // ID of the account the disks belong to // Required: false - AccountID uint64 `url:"accountId,omitempty"` + AccountID uint64 `url:"accountId,omitempty" json:"accountId,omitempty"` // Type of the disks // Required: false - Type string `url:"type,omitempty"` + Type string `url:"type,omitempty" json:"type,omitempty"` // Page number // Required: false - Page uint64 `url:"page,omitempty"` + Page uint64 `url:"page,omitempty" json:"page,omitempty"` // Page size // Required: false - Size uint64 `url:"size,omitempty"` + Size uint64 `url:"size,omitempty" json:"size,omitempty"` } // List gets list the created disks belonging to an account diff --git a/pkg/cloudbroker/disks/list_deleted.go b/pkg/cloudbroker/disks/list_deleted.go index caf187c..b723cf8 100644 --- a/pkg/cloudbroker/disks/list_deleted.go +++ b/pkg/cloudbroker/disks/list_deleted.go @@ -10,19 +10,19 @@ import ( type ListDeletedRequest struct { // ID of the account the disks belong to // Required: false - AccountID uint64 `url:"accountId,omitempty"` + AccountID uint64 `url:"accountId,omitempty" json:"accountId,omitempty"` // Type of the disks // Required: false - Type string `url:"type,omitempty"` + Type string `url:"type,omitempty" json:"type,omitempty"` // Page number // Required: false - Page uint64 `url:"page,omitempty"` + Page uint64 `url:"page,omitempty" json:"page,omitempty"` // Page size // Required: false - Size uint64 `url:"size,omitempty"` + Size uint64 `url:"size,omitempty" json:"size,omitempty"` } // ListDeleted gets list the deleted disks based on filter diff --git a/pkg/cloudbroker/disks/list_types.go b/pkg/cloudbroker/disks/list_types.go index fdd41a0..da609b0 100644 --- a/pkg/cloudbroker/disks/list_types.go +++ b/pkg/cloudbroker/disks/list_types.go @@ -10,7 +10,7 @@ import ( type ListTypesRequest struct { // Show detailed disk types by seps // Required: false - Detailed bool `url:"detailed"` + Detailed bool `url:"detailed" json:"detailed"` } // ListTypes gets list defined disk types diff --git a/pkg/cloudbroker/disks/list_unattached.go b/pkg/cloudbroker/disks/list_unattached.go index 54c8c9a..e24d015 100644 --- a/pkg/cloudbroker/disks/list_unattached.go +++ b/pkg/cloudbroker/disks/list_unattached.go @@ -10,15 +10,15 @@ import ( type ListUnattachedRequest struct { // ID of the account // Required: false - AccountID uint64 `url:"accountId,omitempty"` + AccountID uint64 `url:"accountId,omitempty" json:"accountId,omitempty"` // Page number // Required: false - Page uint64 `url:"page,omitempty"` + Page uint64 `url:"page,omitempty" json:"page,omitempty"` // Page size // Required: false - Size uint64 `url:"size,omitempty"` + Size uint64 `url:"size,omitempty" json:"size,omitempty"` } // ListUnattached gets list of unattached disks diff --git a/pkg/cloudbroker/disks/rename.go b/pkg/cloudbroker/disks/rename.go index 66b3645..cd4f38f 100644 --- a/pkg/cloudbroker/disks/rename.go +++ b/pkg/cloudbroker/disks/rename.go @@ -11,11 +11,11 @@ import ( type RenameRequest struct { // ID of the disk to rename // Required: true - DiskID uint64 `url:"diskId"` + DiskID uint64 `url:"diskId" json:"diskId"` // New name of disk // Required: true - Name string `url:"name"` + Name string `url:"name" json:"name"` } func (drq RenameRequest) validate() error { diff --git a/pkg/cloudbroker/disks/resize.go b/pkg/cloudbroker/disks/resize.go index 274ec21..79086b9 100644 --- a/pkg/cloudbroker/disks/resize.go +++ b/pkg/cloudbroker/disks/resize.go @@ -11,11 +11,11 @@ import ( type ResizeRequest struct { // ID of the disk to resize // Required: true - DiskID uint64 `url:"diskId"` + DiskID uint64 `url:"diskId" json:"diskId"` // New size of the disk in GB // Required: true - Size uint64 `url:"size"` + Size uint64 `url:"size" json:"size"` } func (drq ResizeRequest) validate() error { diff --git a/pkg/cloudbroker/disks/restore.go b/pkg/cloudbroker/disks/restore.go index ebd5695..a09f717 100644 --- a/pkg/cloudbroker/disks/restore.go +++ b/pkg/cloudbroker/disks/restore.go @@ -11,11 +11,11 @@ import ( type RestoreRequest struct { // ID of the disk to restore // Required: true - DiskID uint64 `url:"diskId"` + DiskID uint64 `url:"diskId" json:"diskId"` // Reason for restoring the disk // Required: true - Reason string `url:"reason"` + Reason string `url:"reason" json:"reason"` } func (drq RestoreRequest) validate() error { diff --git a/pkg/cloudbroker/disks/search.go b/pkg/cloudbroker/disks/search.go index 28d3e3b..12c68ee 100644 --- a/pkg/cloudbroker/disks/search.go +++ b/pkg/cloudbroker/disks/search.go @@ -10,22 +10,22 @@ import ( type SearchRequest struct { // ID of the account to search for the Disk // Required: false - AccountID uint64 `url:"accountId,omitempty"` + AccountID uint64 `url:"accountId,omitempty" json:"accountId,omitempty"` // Name of the Disk to search for // Required: false - Name string `url:"name,omitempty"` + Name string `url:"name,omitempty" json:"name,omitempty"` // If false, then disks having one of the statuses are not listed // Required: false - ShowAll bool `url:"show_all,omitempty"` + ShowAll bool `url:"show_all,omitempty" json:"show_all,omitempty"` // Page number // Required: false - Page uint64 `url:"page,omitempty"` + Page uint64 `url:"page,omitempty" json:"page,omitempty"` // Page size // Required: false - Size uint64 `url:"size,omitempty"` + Size uint64 `url:"size,omitempty" json:"size,omitempty"` } // Search search disks diff --git a/pkg/cloudbroker/disks/share.go b/pkg/cloudbroker/disks/share.go index 84f8c93..d7d6232 100644 --- a/pkg/cloudbroker/disks/share.go +++ b/pkg/cloudbroker/disks/share.go @@ -11,7 +11,7 @@ import ( type ShareRequest struct { // ID of the disk to share // Required: true - DiskID uint64 `url:"diskId"` + DiskID uint64 `url:"diskId" json:"diskId"` } func (drq ShareRequest) validate() error { diff --git a/pkg/cloudbroker/disks/snapshot_delete.go b/pkg/cloudbroker/disks/snapshot_delete.go index 6b8d091..873dc76 100644 --- a/pkg/cloudbroker/disks/snapshot_delete.go +++ b/pkg/cloudbroker/disks/snapshot_delete.go @@ -11,11 +11,11 @@ import ( type SnapshotDeleteRequest struct { // ID of disk to delete // Required: true - DiskID uint64 `url:"diskId"` + DiskID uint64 `url:"diskId" json:"diskId"` // Label of the snapshot to delete // Required: false - Label string `url:"label"` + Label string `url:"label" json:"label"` } func (drq SnapshotDeleteRequest) validate() error { diff --git a/pkg/cloudbroker/disks/snapshot_rollback.go b/pkg/cloudbroker/disks/snapshot_rollback.go index c365365..433cbdf 100644 --- a/pkg/cloudbroker/disks/snapshot_rollback.go +++ b/pkg/cloudbroker/disks/snapshot_rollback.go @@ -11,15 +11,15 @@ import ( type SnapshotRollbackRequest struct { // ID of the disk // Required: true - DiskID uint64 `url:"diskId"` + DiskID uint64 `url:"diskId" json:"diskId"` // Label of the snapshot to rollback // Required: true - Label string `url:"label"` + Label string `url:"label" json:"label"` // Timestamp of the snapshot to rollback // Required: true - TimeStamp uint64 `url:"timestamp"` + TimeStamp uint64 `url:"timestamp" json:"timestamp"` } func (drq SnapshotRollbackRequest) validate() error { diff --git a/pkg/cloudbroker/disks/unshare.go b/pkg/cloudbroker/disks/unshare.go index fc62126..60a08ec 100644 --- a/pkg/cloudbroker/disks/unshare.go +++ b/pkg/cloudbroker/disks/unshare.go @@ -11,7 +11,7 @@ import ( type UnshareRequest struct { // ID of the disk to unshare // Required: true - DiskID uint64 `url:"diskId"` + DiskID uint64 `url:"diskId" json:"diskId"` } func (drq UnshareRequest) validate() error { diff --git a/pkg/cloudbroker/extnet/access_add.go b/pkg/cloudbroker/extnet/access_add.go index a36785d..88b9117 100644 --- a/pkg/cloudbroker/extnet/access_add.go +++ b/pkg/cloudbroker/extnet/access_add.go @@ -11,11 +11,11 @@ import ( type AccessAddRequest struct { // ID of external network // Required: true - NetID uint64 `url:"net_id"` + NetID uint64 `url:"net_id" json:"net_id"` // Account ID // Required: true - AccountID uint64 `url:"accountId"` + AccountID uint64 `url:"accountId" json:"accountId"` } func (erq AccessAddRequest) validate() error { diff --git a/pkg/cloudbroker/extnet/access_remove.go b/pkg/cloudbroker/extnet/access_remove.go index aee0dce..5f6855f 100644 --- a/pkg/cloudbroker/extnet/access_remove.go +++ b/pkg/cloudbroker/extnet/access_remove.go @@ -11,11 +11,11 @@ import ( type AccessRemoveRequest struct { // ID of external network // Required: true - NetID uint64 `url:"net_id"` + NetID uint64 `url:"net_id" json:"net_id"` // Account ID // Required: true - AccountID uint64 `url:"accountId"` + AccountID uint64 `url:"accountId" json:"accountId"` } func (erq AccessRemoveRequest) validate() error { diff --git a/pkg/cloudbroker/extnet/create.go b/pkg/cloudbroker/extnet/create.go index c964488..79de16c 100644 --- a/pkg/cloudbroker/extnet/create.go +++ b/pkg/cloudbroker/extnet/create.go @@ -11,64 +11,64 @@ import ( type CreateRequest struct { // External network name // Required: true - Name string `url:"name"` + Name string `url:"name" json:"name"` // Grid (platform) ID // Required: true - GID uint64 `url:"gid"` + GID uint64 `url:"gid" json:"gid"` // IP network CIDR // For example 192.168.0.0/24 // Required: true - IPCIDR string `url:"ipcidr"` + IPCIDR string `url:"ipcidr" json:"ipcidr"` // External network gateway IP address // Required: true - Gateway string `url:"gateway"` + Gateway string `url:"gateway" json:"gateway"` // VLAN ID // Required: true - VLANID uint64 `url:"vlanId"` + VLANID uint64 `url:"vlanId" json:"vlanId"` // List of DNS addresses // Required: false - DNS []string `url:"dns,omitempty"` + DNS []string `url:"dns,omitempty" json:"dns,omitempty"` // List of NTP addresses // Required: false - NTP []string `url:"ntp,omitempty"` + NTP []string `url:"ntp,omitempty" json:"ntp,omitempty"` // IPs to check network availability // Required: false - CheckIPs []string `url:"checkIps,omitempty"` + CheckIPs []string `url:"checkIps,omitempty" json:"checkIps,omitempty"` // If true - platform DHCP server will not be created // Required: false - Virtual bool `url:"virtual,omitempty"` + Virtual bool `url:"virtual,omitempty" json:"virtual,omitempty"` // Optional description // Required: false - Description string `url:"desc,omitempty"` + Description string `url:"desc,omitempty" json:"desc,omitempty"` // Start of IP range to be explicitly included // Required: false - StartIP string `url:"startIP,omitempty"` + StartIP string `url:"startIP,omitempty" json:"startIP,omitempty"` // End of IP range to be explicitly included // Required: false - EndIP string `url:"endIP,omitempty"` + EndIP string `url:"endIP,omitempty" json:"endIP,omitempty"` // IP to create VNFDev with // Required: false - VNFDevIP string `url:"vnfdevIP,omitempty"` + VNFDevIP string `url:"vnfdevIP,omitempty" json:"vnfdevIP,omitempty"` // Number of pre created reservations // Required: false - PreReservationsNum uint64 `url:"preReservationsNum,omitempty"` + PreReservationsNum uint64 `url:"preReservationsNum,omitempty" json:"preReservationsNum,omitempty"` // OpenvSwith bridge name for ExtNet connection // Required: false - OVSBridge string `url:"ovsBridge,omitempty"` + OVSBridge string `url:"ovsBridge,omitempty" json:"ovsBridge,omitempty"` } func (erq CreateRequest) validate() error { diff --git a/pkg/cloudbroker/extnet/default_qos_update.go b/pkg/cloudbroker/extnet/default_qos_update.go index 339b74f..c3fd2f4 100644 --- a/pkg/cloudbroker/extnet/default_qos_update.go +++ b/pkg/cloudbroker/extnet/default_qos_update.go @@ -11,19 +11,19 @@ import ( type DefaultQOSUpdateRequest struct { // ID of external network // Required: true - NetID uint64 `url:"net_id"` + NetID uint64 `url:"net_id" json:"net_id"` // Internal traffic, kbit // Required: false - IngressRate uint64 `url:"ingress_rate,omitempty"` + IngressRate uint64 `url:"ingress_rate,omitempty" json:"ingress_rate,omitempty"` // Internal traffic burst, kbit // Required: false - IngressBurst uint64 `url:"ingress_burst,omitempty"` + IngressBurst uint64 `url:"ingress_burst,omitempty" json:"ingress_burst,omitempty"` // External traffic rate, kbit // Required: false - EgressRate uint64 `url:"egress_rate,omitempty"` + EgressRate uint64 `url:"egress_rate,omitempty" json:"egress_rate,omitempty"` } func (erq DefaultQOSUpdateRequest) validate() error { diff --git a/pkg/cloudbroker/extnet/destroy.go b/pkg/cloudbroker/extnet/destroy.go index c7f47a2..75988f5 100644 --- a/pkg/cloudbroker/extnet/destroy.go +++ b/pkg/cloudbroker/extnet/destroy.go @@ -11,7 +11,7 @@ import ( type DestroyRequest struct { // ID of external network // Required: true - NetID uint64 `url:"net_id"` + NetID uint64 `url:"net_id" json:"net_id"` } func (erq DestroyRequest) validate() error { diff --git a/pkg/cloudbroker/extnet/device_deploy.go b/pkg/cloudbroker/extnet/device_deploy.go index 7bf250d..ec391fc 100644 --- a/pkg/cloudbroker/extnet/device_deploy.go +++ b/pkg/cloudbroker/extnet/device_deploy.go @@ -11,7 +11,7 @@ import ( type DeviceDeployRequest struct { // ID of external network // Required: true - NetID uint64 `url:"net_id"` + NetID uint64 `url:"net_id" json:"net_id"` } func (erq DeviceDeployRequest) validate() error { diff --git a/pkg/cloudbroker/extnet/device_migrate.go b/pkg/cloudbroker/extnet/device_migrate.go index 78b5093..219b4bc 100644 --- a/pkg/cloudbroker/extnet/device_migrate.go +++ b/pkg/cloudbroker/extnet/device_migrate.go @@ -11,10 +11,10 @@ import ( type DeviceMigrateRequest struct { // ID of external network // Required: true - NetID uint64 `url:"net_id"` + NetID uint64 `url:"net_id" json:"net_id"` // Target stack ID to migrate to - StackID uint64 `url:"stackId"` + StackID uint64 `url:"stackId" json:"stackId"` } func (erq DeviceMigrateRequest) validate() error { diff --git a/pkg/cloudbroker/extnet/device_remove.go b/pkg/cloudbroker/extnet/device_remove.go index 6eea2ee..2d4ec7d 100644 --- a/pkg/cloudbroker/extnet/device_remove.go +++ b/pkg/cloudbroker/extnet/device_remove.go @@ -11,7 +11,7 @@ import ( type DeviceRemoveRequest struct { // ID of external network // Required: true - NetID uint64 `url:"net_id"` + NetID uint64 `url:"net_id" json:"net_id"` } func (erq DeviceRemoveRequest) validate() error { diff --git a/pkg/cloudbroker/extnet/device_restart.go b/pkg/cloudbroker/extnet/device_restart.go index 54826c6..f36b974 100644 --- a/pkg/cloudbroker/extnet/device_restart.go +++ b/pkg/cloudbroker/extnet/device_restart.go @@ -11,7 +11,7 @@ import ( type DeviceRestartRequest struct { // ID of external network // Required: true - NetID uint64 `url:"net_id"` + NetID uint64 `url:"net_id" json:"net_id"` } func (erq DeviceRestartRequest) validate() error { diff --git a/pkg/cloudbroker/extnet/disable.go b/pkg/cloudbroker/extnet/disable.go index 3bd25ea..09ac21a 100644 --- a/pkg/cloudbroker/extnet/disable.go +++ b/pkg/cloudbroker/extnet/disable.go @@ -11,7 +11,7 @@ import ( type DisableRequest struct { // ID of external network // Required: true - NetID uint64 `url:"net_id"` + NetID uint64 `url:"net_id" json:"net_id"` } func (erq DisableRequest) validate() error { diff --git a/pkg/cloudbroker/extnet/dns_apply.go b/pkg/cloudbroker/extnet/dns_apply.go index abeaca5..8b174b8 100644 --- a/pkg/cloudbroker/extnet/dns_apply.go +++ b/pkg/cloudbroker/extnet/dns_apply.go @@ -11,11 +11,11 @@ import ( type DNSApplyRequest struct { // ID of external network // Required: true - NetID uint64 `url:"net_id"` + NetID uint64 `url:"net_id" json:"net_id"` // List of DNS to apply // Required: false - DNSList []string `url:"dns_list,omitempty"` + DNSList []string `url:"dns_list,omitempty" json:"dns_list,omitempty"` } func (erq DNSApplyRequest) validate() error { diff --git a/pkg/cloudbroker/extnet/enable.go b/pkg/cloudbroker/extnet/enable.go index 97e922d..cb1db9b 100644 --- a/pkg/cloudbroker/extnet/enable.go +++ b/pkg/cloudbroker/extnet/enable.go @@ -11,7 +11,7 @@ import ( type EnableRequest struct { // ID of external network // Required: true - NetID uint64 `url:"net_id"` + NetID uint64 `url:"net_id" json:"net_id"` } func (erq EnableRequest) validate() error { diff --git a/pkg/cloudbroker/extnet/get.go b/pkg/cloudbroker/extnet/get.go index 4fc2b7c..df7fda0 100644 --- a/pkg/cloudbroker/extnet/get.go +++ b/pkg/cloudbroker/extnet/get.go @@ -11,7 +11,7 @@ import ( type GetRequest struct { // ID of external network // Required: true - NetID uint64 `url:"net_id"` + NetID uint64 `url:"net_id" json:"net_id"` } func (erq GetRequest) validate() error { diff --git a/pkg/cloudbroker/extnet/ips_exclude.go b/pkg/cloudbroker/extnet/ips_exclude.go index 665ec99..8eb262a 100644 --- a/pkg/cloudbroker/extnet/ips_exclude.go +++ b/pkg/cloudbroker/extnet/ips_exclude.go @@ -11,11 +11,11 @@ import ( type IPsExcludeRequest struct { // ID of external network // Required: true - NetID uint64 `url:"net_id"` + NetID uint64 `url:"net_id" json:"net_id"` // List of IPs for exclude from external network // Required: true - IPs []string `url:"ips"` + IPs []string `url:"ips" json:"ips"` } func (erq IPsExcludeRequest) validate() error { diff --git a/pkg/cloudbroker/extnet/ips_exclude_range.go b/pkg/cloudbroker/extnet/ips_exclude_range.go index b5462ab..596796a 100644 --- a/pkg/cloudbroker/extnet/ips_exclude_range.go +++ b/pkg/cloudbroker/extnet/ips_exclude_range.go @@ -11,15 +11,15 @@ import ( type IPsExcludeRangeRequest struct { // ID of external network // Required: true - NetID uint64 `url:"net_id"` + NetID uint64 `url:"net_id" json:"net_id"` // Starting IP // Required: true - IPStart string `url:"ip_start"` + IPStart string `url:"ip_start" json:"ip_start"` // Ending IP // Required: true - IPEnd string `url:"ip_end"` + IPEnd string `url:"ip_end" json:"ip_end"` } func (erq IPsExcludeRangeRequest) validate() error { diff --git a/pkg/cloudbroker/extnet/ips_include.go b/pkg/cloudbroker/extnet/ips_include.go index ea35adc..866e46b 100644 --- a/pkg/cloudbroker/extnet/ips_include.go +++ b/pkg/cloudbroker/extnet/ips_include.go @@ -11,11 +11,11 @@ import ( type IPsIncludeRequest struct { // ID of external network // Required: true - NetID uint64 `url:"net_id"` + NetID uint64 `url:"net_id" json:"net_id"` // List of IPs for include to external network // Required: true - IPs []string `url:"ips"` + IPs []string `url:"ips" json:"ips"` } func (erq IPsIncludeRequest) validate() error { diff --git a/pkg/cloudbroker/extnet/ips_include_range.go b/pkg/cloudbroker/extnet/ips_include_range.go index 81dbabd..bf91e43 100644 --- a/pkg/cloudbroker/extnet/ips_include_range.go +++ b/pkg/cloudbroker/extnet/ips_include_range.go @@ -11,15 +11,15 @@ import ( type IPsIncludeRangeRequest struct { // ID of external network // Required: true - NetID uint64 `url:"net_id"` + NetID uint64 `url:"net_id" json:"net_id"` // Starting IP // Required: true - IPStart string `url:"ip_start"` + IPStart string `url:"ip_start" json:"ip_start"` // Ending IP // Required: true - IPEnd string `url:"ip_end"` + IPEnd string `url:"ip_end" json:"ip_end"` } func (erq IPsIncludeRangeRequest) validate() error { diff --git a/pkg/cloudbroker/extnet/list.go b/pkg/cloudbroker/extnet/list.go index 898946c..63e6278 100644 --- a/pkg/cloudbroker/extnet/list.go +++ b/pkg/cloudbroker/extnet/list.go @@ -10,15 +10,15 @@ import ( type ListRequest struct { // Filter by account ID // Required: false - AccountID uint64 `url:"accountId,omitempty"` + AccountID uint64 `url:"accountId,omitempty" json:"accountId,omitempty"` // Page number // Required: false - Page uint64 `url:"page,omitempty"` + Page uint64 `url:"page,omitempty" json:"page,omitempty"` // Page size // Required: false - Size uint64 `url:"size,omitempty"` + Size uint64 `url:"size,omitempty" json:"size,omitempty"` } // List gets list all available external networks diff --git a/pkg/cloudbroker/extnet/ntp_apply.go b/pkg/cloudbroker/extnet/ntp_apply.go index 164a239..9c341e9 100644 --- a/pkg/cloudbroker/extnet/ntp_apply.go +++ b/pkg/cloudbroker/extnet/ntp_apply.go @@ -11,11 +11,11 @@ import ( type NTPApplyRequest struct { // ID of external network // Required: true - NetID uint64 `url:"net_id"` + NetID uint64 `url:"net_id" json:"net_id"` // List of NTP to apply // Required: false - NTPList []string `url:"ntp_list,omitempty"` + NTPList []string `url:"ntp_list,omitempty" json:"ntp_list,omitempty"` } func (erq NTPApplyRequest) validate() error { diff --git a/pkg/cloudbroker/extnet/set_default.go b/pkg/cloudbroker/extnet/set_default.go index 48c5378..87f4607 100644 --- a/pkg/cloudbroker/extnet/set_default.go +++ b/pkg/cloudbroker/extnet/set_default.go @@ -11,7 +11,7 @@ import ( type SetDefaultRequest struct { // ID of external network // Required: true - NetID uint64 `url:"net_id"` + NetID uint64 `url:"net_id" json:"net_id"` } func (erq SetDefaultRequest) validate() error { diff --git a/pkg/cloudbroker/extnet/update.go b/pkg/cloudbroker/extnet/update.go index 15c712f..f249553 100644 --- a/pkg/cloudbroker/extnet/update.go +++ b/pkg/cloudbroker/extnet/update.go @@ -11,15 +11,15 @@ import ( type UpdateRequest struct { // ID of external network // Required: true - NetID uint64 `url:"net_id"` + NetID uint64 `url:"net_id" json:"net_id"` // New external network name // Required: false - Name string `url:"name,omitempty"` + Name string `url:"name,omitempty" json:"name,omitempty"` // New external network description // Required: false - Description string `url:"desc,omitempty"` + Description string `url:"desc,omitempty" json:"desc,omitempty"` } func (erq UpdateRequest) validate() error { diff --git a/pkg/cloudbroker/grid/add.go b/pkg/cloudbroker/grid/add.go index 6921ce1..b6fd6af 100644 --- a/pkg/cloudbroker/grid/add.go +++ b/pkg/cloudbroker/grid/add.go @@ -11,15 +11,15 @@ import ( type AddRequest struct { // Grid (platform) ID // Required: true - GID uint64 `url:"gid"` + GID uint64 `url:"gid" json:"gid"` // Name of the location // Required: true - Name string `url:"name"` + Name string `url:"name" json:"name"` // Location code typicly used in dns names // Required: true - LocationCode string `url:"locationcode"` + LocationCode string `url:"locationcode" json:"locationcode"` } func (grq AddRequest) validate() error { diff --git a/pkg/cloudbroker/grid/change_settings.go b/pkg/cloudbroker/grid/change_settings.go index 42603ae..da5bdd2 100644 --- a/pkg/cloudbroker/grid/change_settings.go +++ b/pkg/cloudbroker/grid/change_settings.go @@ -11,11 +11,11 @@ import ( type ChangeSettingsRequest struct { // Grid (platform) ID // Required: true - GID uint64 `url:"id"` + GID uint64 `url:"id" json:"id"` // Json data of the new settings will override old data // Required: true - Settings string `url:"settings"` + Settings string `url:"settings" json:"settings"` } func (grq ChangeSettingsRequest) validate() error { diff --git a/pkg/cloudbroker/grid/check_vms.go b/pkg/cloudbroker/grid/check_vms.go index b11767d..3d768a4 100644 --- a/pkg/cloudbroker/grid/check_vms.go +++ b/pkg/cloudbroker/grid/check_vms.go @@ -11,7 +11,7 @@ import ( type CheckVMsRequest struct { // Grid (platform) ID // Required: true - GID uint64 `url:"gid"` + GID uint64 `url:"gid" json:"gid"` } func (grq CheckVMsRequest) validate() error { diff --git a/pkg/cloudbroker/grid/create_system_space.go b/pkg/cloudbroker/grid/create_system_space.go index 6ba9fcd..7a1f7ba 100644 --- a/pkg/cloudbroker/grid/create_system_space.go +++ b/pkg/cloudbroker/grid/create_system_space.go @@ -10,35 +10,35 @@ import ( type CreateSystemSpaceRequest struct { // Grid (platform) ID // Required: true - GID uint64 `url:"id"` + GID uint64 `url:"id" json:"id"` // Name of the account/cloudspace to be created for the system // Required: true - Name string `url:"name"` + Name string `url:"name" json:"name"` // ID of the specific image // Required: true - ImageID uint64 `url:"imageId"` + ImageID uint64 `url:"imageId" json:"imageId"` // Size of base volume // Required: true - BootSize uint64 `url:"bootsize"` + BootSize uint64 `url:"bootsize" json:"bootsize"` // Data disk size in gigabytes // Required: true - DataDiskSize uint64 `url:"dataDiskSize"` + DataDiskSize uint64 `url:"dataDiskSize" json:"dataDiskSize"` // ID of the specific size // Required: false - SizeID uint64 `url:"sizeId,omitempty"` + SizeID uint64 `url:"sizeId,omitempty" json:"sizeId,omitempty"` // Number of vcpus to provide // Required: false - VCPUS uint64 `url:"vcpus,omitempty"` + VCPUS uint64 `url:"vcpus,omitempty" json:"vcpus,omitempty"` // Amount of memory to provide // Required: false - Memory uint64 `url:"memory,omitempty"` + Memory uint64 `url:"memory,omitempty" json:"memory,omitempty"` } func (grq CreateSystemSpaceRequest) validate() error { diff --git a/pkg/cloudbroker/grid/execute_maintenance_script.go b/pkg/cloudbroker/grid/execute_maintenance_script.go index c7aa68f..5533eeb 100644 --- a/pkg/cloudbroker/grid/execute_maintenance_script.go +++ b/pkg/cloudbroker/grid/execute_maintenance_script.go @@ -11,15 +11,15 @@ import ( type ExecuteMaintenanceScriptRequest struct { // Grid (platform) ID // Required: true - GID string `url:"gid"` + GID string `url:"gid" json:"gid"` // Type of nodes you want to apply the action on // Required: true - NodesType string `url:"nodestype"` + NodesType string `url:"nodestype" json:"nodestype"` // The script you want to run // Required: true - Script string `url:"script"` + Script string `url:"script" json:"script"` } func (grq ExecuteMaintenanceScriptRequest) validate() error { diff --git a/pkg/cloudbroker/grid/get.go b/pkg/cloudbroker/grid/get.go index e860490..1e7051e 100644 --- a/pkg/cloudbroker/grid/get.go +++ b/pkg/cloudbroker/grid/get.go @@ -11,7 +11,7 @@ import ( type GetRequest struct { // Grid (platform) ID // Required: true - GID uint64 `url:"gridId"` + GID uint64 `url:"gridId" json:"gridId"` } func (grq GetRequest) validate() error { diff --git a/pkg/cloudbroker/grid/get_backup.go b/pkg/cloudbroker/grid/get_backup.go index f6d7eaf..83f4299 100644 --- a/pkg/cloudbroker/grid/get_backup.go +++ b/pkg/cloudbroker/grid/get_backup.go @@ -10,7 +10,7 @@ import ( type GetBackupRequest struct { // Grid (platform) ID // Required: true - GID uint64 `url:"gid"` + GID uint64 `url:"gid" json:"gid"` } func (grq GetBackupRequest) validate() error { diff --git a/pkg/cloudbroker/grid/get_diagnosis.go b/pkg/cloudbroker/grid/get_diagnosis.go index 6370295..0e72724 100644 --- a/pkg/cloudbroker/grid/get_diagnosis.go +++ b/pkg/cloudbroker/grid/get_diagnosis.go @@ -10,7 +10,7 @@ import ( type GetDiagnosisRequest struct { // Grid (platform) ID // Required: true - GID uint64 `url:"gid"` + GID uint64 `url:"gid" json:"gid"` } func (grq GetDiagnosisRequest) validate() error { diff --git a/pkg/cloudbroker/grid/list.go b/pkg/cloudbroker/grid/list.go index a1f7503..a30bdbb 100644 --- a/pkg/cloudbroker/grid/list.go +++ b/pkg/cloudbroker/grid/list.go @@ -10,11 +10,11 @@ import ( type ListRequest struct { // Page number // Required: false - Page uint64 `url:"page,omitempty"` + Page uint64 `url:"page,omitempty" json:"page,omitempty"` // Page size // Required: false - Size uint64 `url:"size,omitempty"` + Size uint64 `url:"size,omitempty" json:"size,omitempty"` } // List gets list all locations diff --git a/pkg/cloudbroker/grid/purge_logs.go b/pkg/cloudbroker/grid/purge_logs.go index fad8859..1873f44 100644 --- a/pkg/cloudbroker/grid/purge_logs.go +++ b/pkg/cloudbroker/grid/purge_logs.go @@ -11,11 +11,11 @@ import ( type PurgeLogsRequest struct { // Grid (platform) ID // Required: true - GID uint64 `url:"gid"` + GID uint64 `url:"gid" json:"gid"` // Age of the records to remove, e.g. -1h for records older than 1 hour, -1w - one week, etc // Required: true - Age string `url:"age"` + Age string `url:"age" json:"age"` } func (grq PurgeLogsRequest) validate() error { diff --git a/pkg/cloudbroker/grid/rename.go b/pkg/cloudbroker/grid/rename.go index 0f038c6..c6e5bd7 100644 --- a/pkg/cloudbroker/grid/rename.go +++ b/pkg/cloudbroker/grid/rename.go @@ -11,11 +11,11 @@ import ( type RenameRequest struct { // Grid (platform) ID // Required: true - GID uint64 `url:"gid"` + GID uint64 `url:"gid" json:"gid"` // New name // Required: true - Name string `url:"Name"` + Name string `url:"Name" json:"Name"` } func (grq RenameRequest) validate() error { diff --git a/pkg/cloudbroker/grid/services_restart.go b/pkg/cloudbroker/grid/services_restart.go index 863f60b..f747829 100644 --- a/pkg/cloudbroker/grid/services_restart.go +++ b/pkg/cloudbroker/grid/services_restart.go @@ -11,11 +11,11 @@ import ( type ServicesRestartRequest struct { // Grid (platform) ID // Required: true - GID uint64 `url:"gid"` + GID uint64 `url:"gid" json:"gid"` // Node ID // Required: true - NID uint64 `url:"nid"` + NID uint64 `url:"nid" json:"nid"` } func (grq ServicesRestartRequest) validate() error { diff --git a/pkg/cloudbroker/grid/set_cpu_allocation_ratio.go b/pkg/cloudbroker/grid/set_cpu_allocation_ratio.go index 84fa5fb..04f375d 100644 --- a/pkg/cloudbroker/grid/set_cpu_allocation_ratio.go +++ b/pkg/cloudbroker/grid/set_cpu_allocation_ratio.go @@ -11,11 +11,11 @@ import ( type SetCPUAllocationRatioRequest struct { // Grid (platform) ID // Required: true - GID uint64 `url:"gridId"` + GID uint64 `url:"gridId" json:"gridId"` // Allocation ratio // Required: true - Ratio float64 `url:"ratio"` + Ratio float64 `url:"ratio" json:"ratio"` } func (grq SetCPUAllocationRatioRequest) validate() error { diff --git a/pkg/cloudbroker/grid/set_mem_allocation_ratio.go b/pkg/cloudbroker/grid/set_mem_allocation_ratio.go index a9a22b8..bc67c5c 100644 --- a/pkg/cloudbroker/grid/set_mem_allocation_ratio.go +++ b/pkg/cloudbroker/grid/set_mem_allocation_ratio.go @@ -11,11 +11,11 @@ import ( type SetMemAllocationRatioRequest struct { // Grid (platform) ID // Required: true - GID uint64 `url:"gridId"` + GID uint64 `url:"gridId" json:"gridId"` // Allocation ratio // Required: true - Ratio float64 `url:"ratio"` + Ratio float64 `url:"ratio" json:"ratio"` } func (grq SetMemAllocationRatioRequest) validate() error { diff --git a/pkg/cloudbroker/image/computeci_set.go b/pkg/cloudbroker/image/computeci_set.go index 957cd44..1a6cc70 100644 --- a/pkg/cloudbroker/image/computeci_set.go +++ b/pkg/cloudbroker/image/computeci_set.go @@ -11,11 +11,11 @@ import ( type ComputeCISetRequest struct { // ID of the image // Required: true - ImageID uint64 `url:"imageId"` + ImageID uint64 `url:"imageId" json:"imageId"` // ID of the compute CI // Required: true - ComputeCIID uint64 `url:"computeciId"` + ComputeCIID uint64 `url:"computeciId" json:"computeciId"` } func (irq ComputeCISetRequest) validate() error { diff --git a/pkg/cloudbroker/image/computeci_unset.go b/pkg/cloudbroker/image/computeci_unset.go index d0f2b53..859fae4 100644 --- a/pkg/cloudbroker/image/computeci_unset.go +++ b/pkg/cloudbroker/image/computeci_unset.go @@ -11,7 +11,7 @@ import ( type ComputeCIUnsetRequest struct { // ID of the image // Required: true - ImageID uint64 `url:"imageId"` + ImageID uint64 `url:"imageId" json:"imageId"` } func (irq ComputeCIUnsetRequest) validate() error { diff --git a/pkg/cloudbroker/image/create_cdrom_image.go b/pkg/cloudbroker/image/create_cdrom_image.go index 415fe56..862cff5 100644 --- a/pkg/cloudbroker/image/create_cdrom_image.go +++ b/pkg/cloudbroker/image/create_cdrom_image.go @@ -13,47 +13,47 @@ import ( type CreateCDROMImageRequest struct { // Name of the rescue disk // Required: true - Name string `url:"name"` + Name string `url:"name" json:"name"` // URL where to download ISO from // Required: true - URL string `url:"url"` + URL string `url:"url" json:"url"` // Grid (platform) ID where this CD-ROM image should be create in // Required: true - GID uint64 `url:"gid"` + GID uint64 `url:"gid" json:"gid"` // Account ID to make the image exclusive // Required: false - AccountID uint64 `url:"accountId,omitempty"` + AccountID uint64 `url:"accountId,omitempty" json:"accountId,omitempty"` // Storage endpoint provider ID for place rescue CD // Required: false - SEPID uint64 `url:"sep_id,omitempty"` + SEPID uint64 `url:"sep_id,omitempty" json:"sep_id,omitempty"` // Pool for place rescue CD // Required: false - PoolName string `url:"pool_name,omitempty"` + PoolName string `url:"pool_name,omitempty" json:"pool_name,omitempty"` // Username for remote media download // Required: false - UsernameDL string `url:"usernameDL,omitempty"` + UsernameDL string `url:"usernameDL,omitempty" json:"usernameDL,omitempty"` // Password for remote media download // Required: false - PasswordDl string `url:"passwordDL,omitempty"` + PasswordDl string `url:"passwordDL,omitempty" json:"passwordDL,omitempty"` // Binary architecture of this image // Should be one of: // - X86_64 // - PPC64_LE // Required: false - Architecture string `url:"architecture,omitempty"` + Architecture string `url:"architecture,omitempty" json:"architecture,omitempty"` // List of types of compute suitable for image. // Example: [ "KVM_X86" ] // Required: true - Drivers []string `url:"drivers"` + Drivers []string `url:"drivers" json:"drivers"` } func (irq CreateCDROMImageRequest) validate() error { diff --git a/pkg/cloudbroker/image/create_image.go b/pkg/cloudbroker/image/create_image.go index af3d413..462929e 100644 --- a/pkg/cloudbroker/image/create_image.go +++ b/pkg/cloudbroker/image/create_image.go @@ -13,22 +13,22 @@ import ( type CreateRequest struct { // Name of the rescue disk // Required: true - Name string `url:"name"` + Name string `url:"name" json:"name"` // URL where to download media from // Required: true - URL string `url:"url"` + URL string `url:"url" json:"url"` // Grid (platform) ID where this template should be create in // Required: true - GID uint64 `url:"gid"` + GID uint64 `url:"gid" json:"gid"` // Boot type of image // Should be one of: // - bios // - UEFI // Required: true - BootType string `url:"boottype"` + BootType string `url:"boottype" json:"boottype"` // Image type // Should be one of: @@ -36,55 +36,55 @@ type CreateRequest struct { // - windows // - or other // Required: true - ImageType string `url:"imagetype"` + ImageType string `url:"imagetype" json:"imagetype"` // Does this machine supports hot resize // Required: false - HotResize bool `url:"hotresize,omitempty"` + HotResize bool `url:"hotresize,omitempty" json:"hotresize,omitempty"` // Optional username for the image // Required: false - Username string `url:"username,omitempty"` + Username string `url:"username,omitempty" json:"username,omitempty"` // Optional password for the image // Required: false - Password string `url:"password,omitempty"` + Password string `url:"password,omitempty" json:"password,omitempty"` // Account ID to make the image exclusive // Required: false - AccountID uint64 `url:"accountId,omitempty"` + AccountID uint64 `url:"accountId,omitempty" json:"accountId,omitempty"` // Username for upload binary media // Required: false - UsernameDL string `url:"usernameDL,omitempty"` + UsernameDL string `url:"usernameDL,omitempty" json:"usernameDL,omitempty"` // Password for upload binary media // Required: false - PasswordDL string `url:"passwordDL,omitempty"` + PasswordDL string `url:"passwordDL,omitempty" json:"passwordDL,omitempty"` // Storage endpoint provider ID // Required: false - SEPID uint64 `url:"sepId,omitempty"` + SEPID uint64 `url:"sepId,omitempty" json:"sepId,omitempty"` // Pool for image create // Required: false - PoolName string `url:"poolName,omitempty"` + PoolName string `url:"poolName,omitempty" json:"poolName,omitempty"` // Binary architecture of this image // Should be one of: // - X86_64 // - PPC64_LE // Required: false - Architecture string `url:"architecture,omitempty"` + Architecture string `url:"architecture,omitempty" json:"architecture,omitempty"` // List of types of compute suitable for image // Example: [ "KVM_X86" ] // Required: true - Drivers []string `url:"drivers"` + Drivers []string `url:"drivers" json:"drivers"` // Bootable image or not // Required: false - Bootable bool `url:"bootable,omitempty"` + Bootable bool `url:"bootable,omitempty" json:"bootable,omitempty"` } func (irq CreateRequest) validate() error { diff --git a/pkg/cloudbroker/image/create_virtual.go b/pkg/cloudbroker/image/create_virtual.go index 7a0a76f..2cea138 100644 --- a/pkg/cloudbroker/image/create_virtual.go +++ b/pkg/cloudbroker/image/create_virtual.go @@ -11,11 +11,11 @@ import ( type CreateVirtualRequest struct { // Name of the virtual image to create // Required: true - Name string `url:"name"` + Name string `url:"name" json:"name"` // ID of real image to link this virtual image to upon creation // Required: true - TargetID uint64 `url:"targetId"` + TargetID uint64 `url:"targetId" json:"targetId"` } func (irq CreateVirtualRequest) validate() error { diff --git a/pkg/cloudbroker/image/delete.go b/pkg/cloudbroker/image/delete.go index e53787e..b0e74ee 100644 --- a/pkg/cloudbroker/image/delete.go +++ b/pkg/cloudbroker/image/delete.go @@ -11,15 +11,15 @@ import ( type DeleteRequest struct { // ID of the image to delete // Required: true - ImageID uint64 `url:"imageId"` + ImageID uint64 `url:"imageId" json:"imageId"` // Reason for action // Required: true - Reason string `url:"reason"` + Reason string `url:"reason" json:"reason"` // Whether to completely delete the image // Required: false - Permanently bool `url:"permanently,omitempty"` + Permanently bool `url:"permanently,omitempty" json:"permanently,omitempty"` } func (irq DeleteRequest) validate() error { diff --git a/pkg/cloudbroker/image/delete_cdrom_image.go b/pkg/cloudbroker/image/delete_cdrom_image.go index 5b638c5..4bf22cf 100644 --- a/pkg/cloudbroker/image/delete_cdrom_image.go +++ b/pkg/cloudbroker/image/delete_cdrom_image.go @@ -11,11 +11,11 @@ import ( type DeleteCDROMImageRequest struct { // ID of the CD-ROM image to delete // Required: true - ImageID uint64 `url:"imageId"` + ImageID uint64 `url:"imageId" json:"imageId"` // Whether to completely delete the CD-ROM image, needs to be unused // Required: true - Permanently bool `url:"permanently"` + Permanently bool `url:"permanently" json:"permanently"` } func (irq DeleteCDROMImageRequest) validate() error { diff --git a/pkg/cloudbroker/image/delete_images.go b/pkg/cloudbroker/image/delete_images.go index 0eb8e9d..87f183e 100644 --- a/pkg/cloudbroker/image/delete_images.go +++ b/pkg/cloudbroker/image/delete_images.go @@ -11,15 +11,15 @@ import ( type DeleteImagesRequest struct { // List of images to be deleted // Required: true - ImageIDs []uint64 `url:"imageIds"` + ImageIDs []uint64 `url:"imageIds" json:"imageIds"` // Reason for action // Required: true - Reason string `url:"reason,omitempty"` + Reason string `url:"reason,omitempty" json:"reason,omitempty"` // Whether to completely delete the images // Required: true - Permanently bool `url:"permanently,omitempty"` + Permanently bool `url:"permanently,omitempty" json:"permanently,omitempty"` } func (irq DeleteImagesRequest) validate() error { diff --git a/pkg/cloudbroker/image/disable.go b/pkg/cloudbroker/image/disable.go index e933476..8fa1062 100644 --- a/pkg/cloudbroker/image/disable.go +++ b/pkg/cloudbroker/image/disable.go @@ -11,7 +11,7 @@ import ( type DisableRequest struct { // ID of image to be disabled // Required: true - ImageID uint64 `url:"imageId"` + ImageID uint64 `url:"imageId" json:"imageId"` } func (irq DisableRequest) validate() error { diff --git a/pkg/cloudbroker/image/edit.go b/pkg/cloudbroker/image/edit.go index d0c3ae9..505f649 100644 --- a/pkg/cloudbroker/image/edit.go +++ b/pkg/cloudbroker/image/edit.go @@ -11,31 +11,31 @@ import ( type EditRequest struct { // ID of the image to edit // Required: true - ImageID uint64 `url:"imageId"` + ImageID uint64 `url:"imageId" json:"imageId"` // Name for the image // Required: false - Name string `url:"name,omitempty"` + Name string `url:"name,omitempty" json:"name,omitempty"` // Username for the image // Required: false - Username string `url:"username,omitempty"` + Username string `url:"username,omitempty" json:"username,omitempty"` // Password for the image // Required: false - Password string `url:"password,omitempty"` + Password string `url:"password,omitempty" json:"password,omitempty"` // Account ID to make the image exclusive // Required: false - AccountID uint64 `url:"accountId,omitempty"` + AccountID uint64 `url:"accountId,omitempty" json:"accountId,omitempty"` // Does this machine supports hot resize // Required: false - HotResize bool `url:"hotresize,omitempty"` + HotResize bool `url:"hotresize,omitempty" json:"hotresize,omitempty"` // Does this image boot OS // Required: false - Bootable bool `url:"bootable,omitempty"` + Bootable bool `url:"bootable,omitempty" json:"bootable,omitempty"` } func (irq EditRequest) validate() error { diff --git a/pkg/cloudbroker/image/enable.go b/pkg/cloudbroker/image/enable.go index e316afb..7f21edd 100644 --- a/pkg/cloudbroker/image/enable.go +++ b/pkg/cloudbroker/image/enable.go @@ -11,7 +11,7 @@ import ( type EnableRequest struct { // ID of image to be enabled // Required: true - ImageID uint64 `url:"imageId"` + ImageID uint64 `url:"imageId" json:"imageId"` } func (irq EnableRequest) validate() error { diff --git a/pkg/cloudbroker/image/get.go b/pkg/cloudbroker/image/get.go index 3f3c477..4b9b3fc 100644 --- a/pkg/cloudbroker/image/get.go +++ b/pkg/cloudbroker/image/get.go @@ -11,7 +11,7 @@ import ( type GetRequest struct { // ID of image // Required: true - ImageID uint64 `url:"imageId"` + ImageID uint64 `url:"imageId" json:"imageId"` } func (irq GetRequest) validate() error { diff --git a/pkg/cloudbroker/image/link.go b/pkg/cloudbroker/image/link.go index ee6a2d7..00fcbd0 100644 --- a/pkg/cloudbroker/image/link.go +++ b/pkg/cloudbroker/image/link.go @@ -11,11 +11,11 @@ import ( type LinkRequest struct { // ID of the virtual image // Required: true - ImageID uint64 `url:"imageId"` + ImageID uint64 `url:"imageId" json:"imageId"` // ID of real image to link this virtual image to // Required: true - TargetID uint64 `url:"targetId"` + TargetID uint64 `url:"targetId" json:"targetId"` } func (irq LinkRequest) validate() error { diff --git a/pkg/cloudbroker/image/list.go b/pkg/cloudbroker/image/list.go index 6b83a81..39a30c7 100644 --- a/pkg/cloudbroker/image/list.go +++ b/pkg/cloudbroker/image/list.go @@ -10,19 +10,19 @@ import ( type ListRequest struct { // Filter images by storage endpoint provider ID // Required: false - SepID uint64 `url:"sepId,omitempty"` + SepID uint64 `url:"sepId,omitempty" json:"sepId,omitempty"` // Filter images by account ID availability // Required: false - SharedWith uint64 `url:"sharedWith,omitempty"` + SharedWith uint64 `url:"sharedWith,omitempty" json:"sharedWith,omitempty"` // Page number // Required: false - Page uint64 `url:"page,omitempty"` + Page uint64 `url:"page,omitempty" json:"page,omitempty"` // Page size // Required: false - Size uint64 `url:"size,omitempty"` + Size uint64 `url:"size,omitempty" json:"size,omitempty"` } // List gets list of information about images diff --git a/pkg/cloudbroker/image/list_stacks.go b/pkg/cloudbroker/image/list_stacks.go index fdc120e..c91d411 100644 --- a/pkg/cloudbroker/image/list_stacks.go +++ b/pkg/cloudbroker/image/list_stacks.go @@ -11,15 +11,15 @@ import ( type ListStacksRequest struct { // Image ID // Required: true - ImageID uint64 `url:"imageId"` + ImageID uint64 `url:"imageId" json:"imageId"` // Page number // Required: false - Page uint64 `url:"page,omitempty"` + Page uint64 `url:"page,omitempty" json:"page,omitempty"` // Page size // Required: false - Size uint64 `url:"size,omitempty"` + Size uint64 `url:"size,omitempty" json:"size,omitempty"` } func (irq ListStacksRequest) validate() error { diff --git a/pkg/cloudbroker/image/rename.go b/pkg/cloudbroker/image/rename.go index 2d6e790..90c2f19 100644 --- a/pkg/cloudbroker/image/rename.go +++ b/pkg/cloudbroker/image/rename.go @@ -11,11 +11,11 @@ import ( type RenameRequest struct { // ID of the virtual image to rename // Required: true - ImageID uint64 `url:"imageId"` + ImageID uint64 `url:"imageId" json:"imageId"` // New name // Required: true - Name string `url:"name"` + Name string `url:"name" json:"name"` } func (irq RenameRequest) validate() error { diff --git a/pkg/cloudbroker/image/share.go b/pkg/cloudbroker/image/share.go index 2fe20d6..501cb57 100644 --- a/pkg/cloudbroker/image/share.go +++ b/pkg/cloudbroker/image/share.go @@ -11,11 +11,11 @@ import ( type ShareRequest struct { // ID of the image to share // Required: true - ImageId uint64 `url:"imageId"` + ImageId uint64 `url:"imageId" json:"imageId"` // List of account IDs // Required: true - AccountIDs []uint64 `url:"accounts"` + AccountIDs []uint64 `url:"accounts" json:"accounts"` } func (irq ShareRequest) validate() error { diff --git a/pkg/cloudbroker/image/sync_create_image.go b/pkg/cloudbroker/image/sync_create_image.go index 4a5b34c..e20e9eb 100644 --- a/pkg/cloudbroker/image/sync_create_image.go +++ b/pkg/cloudbroker/image/sync_create_image.go @@ -13,22 +13,22 @@ import ( type SyncCreateRequest struct { // Name of the rescue disk // Required: true - Name string `url:"name"` + Name string `url:"name" json:"name"` // URL where to download media from // Required: true - URL string `url:"url"` + URL string `url:"url" json:"url"` // Grid (platform) ID where this template should be create in // Required: true - GID uint64 `url:"gid"` + GID uint64 `url:"gid" json:"gid"` // Boot type of image // Should be one of: // - bios // - UEFI // Required: true - BootType string `url:"boottype"` + BootType string `url:"boottype" json:"boottype"` // Image type // Should be one of: @@ -36,55 +36,55 @@ type SyncCreateRequest struct { // - windows // - or other // Required: true - ImageType string `url:"imagetype"` + ImageType string `url:"imagetype" json:"imagetype"` // Does this machine supports hot resize // Required: false - HotResize bool `url:"hotresize,omitempty"` + HotResize bool `url:"hotresize,omitempty" json:"hotresize,omitempty"` // Optional username for the image // Required: false - Username string `url:"username,omitempty"` + Username string `url:"username,omitempty" json:"username,omitempty"` // Optional password for the image // Required: false - Password string `url:"password,omitempty"` + Password string `url:"password,omitempty" json:"password,omitempty"` // Account ID to make the image exclusive // Required: false - AccountID uint64 `url:"accountId,omitempty"` + AccountID uint64 `url:"accountId,omitempty" json:"accountId,omitempty"` // Username for upload binary media // Required: false - UsernameDL string `url:"usernameDL,omitempty"` + UsernameDL string `url:"usernameDL,omitempty" json:"usernameDL,omitempty"` // Password for upload binary media // Required: false - PasswordDL string `url:"passwordDL,omitempty"` + PasswordDL string `url:"passwordDL,omitempty" json:"passwordDL,omitempty"` // Storage endpoint provider ID // Required: false - SEPID uint64 `url:"sepId,omitempty"` + SEPID uint64 `url:"sepId,omitempty" json:"sepId,omitempty"` // Pool for image create // Required: false - PoolName string `url:"poolName,omitempty"` + PoolName string `url:"poolName,omitempty" json:"poolName,omitempty"` // Binary architecture of this image // Should be one of: // - X86_64 // - PPC64_LE // Required: false - Architecture string `url:"architecture,omitempty"` + Architecture string `url:"architecture,omitempty" json:"architecture,omitempty"` // List of types of compute suitable for image // Example: [ "KVM_X86" ] // Required: true - Drivers []string `url:"drivers"` + Drivers []string `url:"drivers" json:"drivers"` // Bootable image or not // Required: false - Bootable bool `url:"bootable,omitempty"` + Bootable bool `url:"bootable,omitempty" json:"bootable,omitempty"` } func (irq SyncCreateRequest) validate() error { diff --git a/pkg/cloudbroker/image/update_nodes.go b/pkg/cloudbroker/image/update_nodes.go index 4785c40..1d4e307 100644 --- a/pkg/cloudbroker/image/update_nodes.go +++ b/pkg/cloudbroker/image/update_nodes.go @@ -11,11 +11,11 @@ import ( type UpdateNodesRequest struct { // Image ID // Required: true - ImageID uint64 `url:"imageId"` + ImageID uint64 `url:"imageId" json:"imageId"` // List of stacks // Required: false - EnabledStacks []uint64 `url:"enabledStacks,omitempty"` + EnabledStacks []uint64 `url:"enabledStacks,omitempty" json:"enabledStacks,omitempty"` } func (irq UpdateNodesRequest) validate() error { diff --git a/pkg/cloudbroker/k8ci/create.go b/pkg/cloudbroker/k8ci/create.go index 8bb2b6e..fa75c1f 100644 --- a/pkg/cloudbroker/k8ci/create.go +++ b/pkg/cloudbroker/k8ci/create.go @@ -13,19 +13,19 @@ import ( type CreateRequest struct { // Name of catalog item // Required: true - Name string `url:"name"` + Name string `url:"name" json:"name"` // Version tag // Required: true - Version string `url:"version"` + Version string `url:"version" json:"version"` // Optional description // Required: false - Description string `url:"description,omitempty"` + Description string `url:"description,omitempty" json:"description,omitempty"` // Image ID for master K8S node // Required: true - MasterImageID uint64 `url:"masterImageId"` + MasterImageID uint64 `url:"masterImageId" json:"masterImageId"` // Compute driver // Should be one of: @@ -33,11 +33,11 @@ type CreateRequest struct { // - KVM_PPC // - etc // Required: true - MasterDriver string `url:"masterDriver"` + MasterDriver string `url:"masterDriver" json:"masterDriver"` // Image ID for worker K8S node // Required: true - WorkerImageID uint64 `url:"workerImageId"` + WorkerImageID uint64 `url:"workerImageId" json:"workerImageId"` // Compute driver // Should be one of @@ -45,24 +45,24 @@ type CreateRequest struct { // - KVM_PPC // - etc // Required: true - WorkerDriver string `url:"workerDriver"` + WorkerDriver string `url:"workerDriver" json:"workerDriver"` // Image ID for load balancer node // Required: true - LBImageID uint64 `url:"lbImageId"` + LBImageID uint64 `url:"lbImageId" json:"lbImageId"` // List of account IDs, which have access to this item. // If empty, any account has access // Required: false - SharedWith []uint64 `url:"sharedWith,omitempty"` + SharedWith []uint64 `url:"sharedWith,omitempty" json:"sharedWith,omitempty"` // Policy limit on maximum number of master nodes // Required: true - MaxMasterCount uint64 `url:"maxMasterCount"` + MaxMasterCount uint64 `url:"maxMasterCount" json:"maxMasterCount"` // Policy limit on maximum number of worker nodes // Required: true - MaxWorkerCount uint64 `url:"maxWorkerCount"` + MaxWorkerCount uint64 `url:"maxWorkerCount" json:"maxWorkerCount"` } func (krq CreateRequest) validate() error { diff --git a/pkg/cloudbroker/k8ci/delete.go b/pkg/cloudbroker/k8ci/delete.go index d5315d8..9a280a9 100644 --- a/pkg/cloudbroker/k8ci/delete.go +++ b/pkg/cloudbroker/k8ci/delete.go @@ -11,11 +11,11 @@ import ( type DeleteRequest struct { // K8CI ID // Required: true - K8CIID uint64 `url:"k8ciId"` + K8CIID uint64 `url:"k8ciId" json:"k8ciId"` // Delete permanently or not // Required: false - Permanently bool `url:"permanently,omitempty"` + Permanently bool `url:"permanently,omitempty" json:"permanently,omitempty"` } func (krq DeleteRequest) validate() error { diff --git a/pkg/cloudbroker/k8ci/disable.go b/pkg/cloudbroker/k8ci/disable.go index 91ed79a..ff7fc15 100644 --- a/pkg/cloudbroker/k8ci/disable.go +++ b/pkg/cloudbroker/k8ci/disable.go @@ -11,7 +11,7 @@ import ( type DisableRequest struct { // K8CI ID // Required: true - K8CIID uint64 `url:"k8ciId"` + K8CIID uint64 `url:"k8ciId" json:"k8ciId"` } func (krq DisableRequest) validate() error { diff --git a/pkg/cloudbroker/k8ci/enable.go b/pkg/cloudbroker/k8ci/enable.go index e51fbc7..57eff11 100644 --- a/pkg/cloudbroker/k8ci/enable.go +++ b/pkg/cloudbroker/k8ci/enable.go @@ -11,7 +11,7 @@ import ( type EnableRequest struct { // K8CI ID // Required: true - K8CIID uint64 `url:"k8ciId"` + K8CIID uint64 `url:"k8ciId" json:"k8ciId"` } func (krq EnableRequest) validate() error { diff --git a/pkg/cloudbroker/k8ci/get.go b/pkg/cloudbroker/k8ci/get.go index eec815f..32d4aa1 100644 --- a/pkg/cloudbroker/k8ci/get.go +++ b/pkg/cloudbroker/k8ci/get.go @@ -11,7 +11,7 @@ import ( type GetRequest struct { // ID of the K8 catalog item to get // Required: true - K8CIID uint64 `url:"k8ciId"` + K8CIID uint64 `url:"k8ciId" json:"k8ciId"` } func (krq GetRequest) validate() error { diff --git a/pkg/cloudbroker/k8ci/list.go b/pkg/cloudbroker/k8ci/list.go index e6d006d..c696ffc 100644 --- a/pkg/cloudbroker/k8ci/list.go +++ b/pkg/cloudbroker/k8ci/list.go @@ -10,15 +10,15 @@ import ( type ListRequest struct { // List disabled items as well // Required: false - IncludeDisabled bool `url:"includeDisabled,omitempty"` + IncludeDisabled bool `url:"includeDisabled,omitempty" json:"includeDisabled,omitempty"` // Page number // Required: false - Page uint64 `url:"page,omitempty"` + Page uint64 `url:"page,omitempty" json:"page,omitempty"` // Page size // Required: false - Size uint64 `url:"size,omitempty"` + Size uint64 `url:"size,omitempty" json:"size,omitempty"` } // List gets list all k8ci catalog items available to the current user diff --git a/pkg/cloudbroker/k8ci/list_deleted.go b/pkg/cloudbroker/k8ci/list_deleted.go index 26d3ae5..b7075bc 100644 --- a/pkg/cloudbroker/k8ci/list_deleted.go +++ b/pkg/cloudbroker/k8ci/list_deleted.go @@ -10,11 +10,11 @@ import ( type ListDeletedRequest struct { // Page number // Required: false - Page uint64 `url:"page,omitempty"` + Page uint64 `url:"page,omitempty" json:"page,omitempty"` // Page size // Required: false - Size uint64 `url:"size,omitempty"` + Size uint64 `url:"size,omitempty" json:"size,omitempty"` } // ListDeleted gets list all deleted k8ci catalog items available to the current user diff --git a/pkg/cloudbroker/k8ci/restore.go b/pkg/cloudbroker/k8ci/restore.go index be5db22..803510d 100644 --- a/pkg/cloudbroker/k8ci/restore.go +++ b/pkg/cloudbroker/k8ci/restore.go @@ -11,7 +11,7 @@ import ( type RestoreRequest struct { // K8CI ID // Required: true - K8CIID uint64 `url:"k8ciId"` + K8CIID uint64 `url:"k8ciId" json:"k8ciId"` } func (krq RestoreRequest) validate() error { diff --git a/pkg/cloudbroker/k8s/create.go b/pkg/cloudbroker/k8s/create.go index 428eecc..ae8887e 100644 --- a/pkg/cloudbroker/k8s/create.go +++ b/pkg/cloudbroker/k8s/create.go @@ -11,97 +11,97 @@ import ( type CreateRequest struct { // Name of kubernetes cluster // Required: true - Name string `url:"name"` + Name string `url:"name" json:"name"` // Resource group ID for cluster placement // Required: true - RGID uint64 `url:"rgId"` + RGID uint64 `url:"rgId" json:"rgId"` // ID of kubernetes catalog item (K8CI) for cluster // Required: true - K8CIID uint64 `url:"k8ciId"` + K8CIID uint64 `url:"k8ciId" json:"k8ciId"` // Name for first worker group created with cluster // Required: true - WorkerGroupName string `url:"workerGroupName"` + WorkerGroupName string `url:"workerGroupName" json:"workerGroupName"` // ID of SEP to create boot disks for master nodes. // Uses images SEP ID if not set // Required: false - MasterSEPID uint64 `url:"masterSepId,omitempty"` + MasterSEPID uint64 `url:"masterSepId,omitempty" json:"masterSepId,omitempty"` // Pool to use if master SEP ID is set, can be also empty if needed to be chosen by system // Required: false - MasterSEPPool string `url:"masterSepPool,omitempty"` + MasterSEPPool string `url:"masterSepPool,omitempty" json:"masterSepPool,omitempty"` // ID of SEP to create boot disks for default worker nodes group. // Uses images SEP ID if not set // Required: false - WorkerSEPID uint64 `url:"workerSepId,omitempty"` + WorkerSEPID uint64 `url:"workerSepId,omitempty" json:"workerSepId,omitempty"` // Pool to use if worker SEP ID is set, can be also empty if needed to be chosen by system // Required: false - WorkerSEPPool string `url:"workerSepPool,omitempty"` + WorkerSEPPool string `url:"workerSepPool,omitempty" json:"workerSepPool,omitempty"` // List of strings with labels for default worker group // i.e: ["label1=value1", "label2=value2"] // Required: false - Labels []string `url:"labels,omitempty"` + Labels []string `url:"labels,omitempty" json:"labels,omitempty"` // List of strings with taints for default worker group // i.e: ["key1=value1:NoSchedule", "key2=value2:NoExecute"] // Required: false - Taints []string `url:"taints,omitempty"` + Taints []string `url:"taints,omitempty" json:"taints,omitempty"` // List of strings with annotations for worker group // i.e: ["key1=value1", "key2=value2"] // Required: false - Annotations []string `url:"annotations,omitempty"` + Annotations []string `url:"annotations,omitempty" json:"annotations,omitempty"` // Number of master nodes to create // Required: false - MasterNum uint64 `url:"masterNum,omitempty"` + MasterNum uint64 `url:"masterNum,omitempty" json:"masterNum,omitempty"` // Master node CPU count // Required: false - MasterCPU uint64 `url:"masterCpu,omitempty"` + MasterCPU uint64 `url:"masterCpu,omitempty" json:"masterCpu,omitempty"` // Master node RAM volume in MB // Required: false - MasterRAM uint64 `url:"masterRam,omitempty"` + MasterRAM uint64 `url:"masterRam,omitempty" json:"masterRam,omitempty"` // Master node boot disk size in GB If 0 is specified, size is defined by the OS image size // Required: false - MasterDisk uint64 `url:"masterDisk,omitempty"` + MasterDisk uint64 `url:"masterDisk,omitempty" json:"masterDisk,omitempty"` // Number of worker nodes to create in default worker group // Required: false - WorkerNum uint64 `url:"workerNum,omitempty"` + WorkerNum uint64 `url:"workerNum,omitempty" json:"workerNum,omitempty"` // Worker node CPU count // Required: false - WorkerCPU uint64 `url:"workerCpu,omitempty"` + WorkerCPU uint64 `url:"workerCpu,omitempty" json:"workerCpu,omitempty"` // Worker node RAM volume in MB // Required: false - WorkerRAM uint64 `url:"workerRam,omitempty"` + WorkerRAM uint64 `url:"workerRam,omitempty" json:"workerRam,omitempty"` // Worker node boot disk size in GB. If 0 is specified, size is defined by the OS image size // Required: false - WorkerDisk uint64 `url:"workerDisk,omitempty"` + WorkerDisk uint64 `url:"workerDisk,omitempty" json:"workerDisk,omitempty"` // ID of the external network to connect load balancer and cluster VINS. If 0 is specified, external network selects automatically to // Required: false - ExtNetID uint64 `url:"extnetId,omitempty"` + ExtNetID uint64 `url:"extnetId,omitempty" json:"extnetId,omitempty"` // Create kubernetes cluster with masters nodes behind load balancer if true. // Otherwise give all cluster nodes direct external addresses from selected external network // Required: false - WithLB bool `url:"withLB,omitempty"` + WithLB bool `url:"withLB,omitempty" json:"withLB,omitempty"` // Text description of this kubernetes cluster // Required: false - Description string `url:"desc,omitempty"` + Description string `url:"desc,omitempty" json:"desc,omitempty"` } func (krq CreateRequest) validate() error { diff --git a/pkg/cloudbroker/k8s/delete.go b/pkg/cloudbroker/k8s/delete.go index d1fdba7..88d23b6 100644 --- a/pkg/cloudbroker/k8s/delete.go +++ b/pkg/cloudbroker/k8s/delete.go @@ -11,12 +11,12 @@ import ( type DeleteRequest struct { // Kubernetes cluster ID // Required: true - K8SID uint64 `url:"k8sId"` + K8SID uint64 `url:"k8sId" json:"k8sId"` // True if cluster is destroyed permanently. // Otherwise it can be restored from recycle bin // Required: true - Permanently bool `url:"permanently"` + Permanently bool `url:"permanently" json:"permanently"` } func (krq DeleteRequest) validate() error { diff --git a/pkg/cloudbroker/k8s/delete_master_from_group.go b/pkg/cloudbroker/k8s/delete_master_from_group.go index 9a59fe8..0d67c43 100644 --- a/pkg/cloudbroker/k8s/delete_master_from_group.go +++ b/pkg/cloudbroker/k8s/delete_master_from_group.go @@ -11,15 +11,15 @@ import ( type DeleteMasterFromGroupRequest struct { // Kubernetes cluster ID // Required: true - K8SID uint64 `url:"k8sId"` + K8SID uint64 `url:"k8sId" json:"k8sId"` // ID of the masters compute group // Required: true - MasterGroupID uint64 `url:"masterGroupId"` + MasterGroupID uint64 `url:"masterGroupId" json:"masterGroupId"` // List of Compute IDs of master nodes to delete // Required: true - MasterIDs []string `url:"masterIds"` + MasterIDs []string `url:"masterIds" json:"masterIds"` } func (krq DeleteMasterFromGroupRequest) validate() error { diff --git a/pkg/cloudbroker/k8s/delete_worker_from_group.go b/pkg/cloudbroker/k8s/delete_worker_from_group.go index 04af01e..3ac9b99 100644 --- a/pkg/cloudbroker/k8s/delete_worker_from_group.go +++ b/pkg/cloudbroker/k8s/delete_worker_from_group.go @@ -11,15 +11,15 @@ import ( type DeleteWorkerFromGroupRequest struct { // Kubernetes cluster ID // Required: true - K8SID uint64 `url:"k8sId"` + K8SID uint64 `url:"k8sId" json:"k8sId"` // ID of the workers compute group // Required: true - WorkersGroupID uint64 `url:"workersGroupId"` + WorkersGroupID uint64 `url:"workersGroupId" json:"workersGroupId"` // Compute ID of worker node to delete // Required: true - WorkerID uint64 `url:"workerId"` + WorkerID uint64 `url:"workerId" json:"workerId"` } func (krq DeleteWorkerFromGroupRequest) validate() error { diff --git a/pkg/cloudbroker/k8s/disable.go b/pkg/cloudbroker/k8s/disable.go index 8bbf684..2da7305 100644 --- a/pkg/cloudbroker/k8s/disable.go +++ b/pkg/cloudbroker/k8s/disable.go @@ -11,7 +11,7 @@ import ( type DisableRequest struct { // Kubernetes cluster ID // Required: true - K8SID uint64 `url:"k8sId"` + K8SID uint64 `url:"k8sId" json:"k8sId"` } func (krq DisableRequest) validate() error { diff --git a/pkg/cloudbroker/k8s/enable.go b/pkg/cloudbroker/k8s/enable.go index 4893414..edbaa11 100644 --- a/pkg/cloudbroker/k8s/enable.go +++ b/pkg/cloudbroker/k8s/enable.go @@ -11,7 +11,7 @@ import ( type EnableRequest struct { // Kubernetes cluster ID // Required: true - K8SID uint64 `url:"k8sId"` + K8SID uint64 `url:"k8sId" json:"k8sId"` } func (krq EnableRequest) validate() error { diff --git a/pkg/cloudbroker/k8s/find_group_by_label.go b/pkg/cloudbroker/k8s/find_group_by_label.go index 27260fc..82542a3 100644 --- a/pkg/cloudbroker/k8s/find_group_by_label.go +++ b/pkg/cloudbroker/k8s/find_group_by_label.go @@ -11,16 +11,16 @@ import ( type FindGroupByLabelRequest struct { // Kubernetes cluster ID // Required: true - K8SID uint64 `url:"k8sId"` + K8SID uint64 `url:"k8sId" json:"k8sId"` // List of labels to search // Required: true - Labels []string `url:"labels"` + Labels []string `url:"labels" json:"labels"` // If true and more than one label provided, select only groups that have all provided labels. // If false - groups that have at least one label // Required: true - Strict bool `url:"strict"` + Strict bool `url:"strict" json:"strict"` } func (krq FindGroupByLabelRequest) validate() error { diff --git a/pkg/cloudbroker/k8s/get.go b/pkg/cloudbroker/k8s/get.go index 56436b3..cedb34c 100644 --- a/pkg/cloudbroker/k8s/get.go +++ b/pkg/cloudbroker/k8s/get.go @@ -11,7 +11,7 @@ import ( type GetRequest struct { // Kubernetes cluster ID // Required: true - K8SID uint64 `url:"k8sId"` + K8SID uint64 `url:"k8sId" json:"k8sId"` } func (krq GetRequest) validate() error { diff --git a/pkg/cloudbroker/k8s/get_config.go b/pkg/cloudbroker/k8s/get_config.go index d4db031..bd9d8c3 100644 --- a/pkg/cloudbroker/k8s/get_config.go +++ b/pkg/cloudbroker/k8s/get_config.go @@ -11,7 +11,7 @@ import ( type GetConfigRequest struct { // Kubernetes cluster ID // Required: true - K8SID uint64 `url:"k8sId"` + K8SID uint64 `url:"k8sId" json:"k8sId"` } func (krq GetConfigRequest) validate() error { diff --git a/pkg/cloudbroker/k8s/get_node_annotations.go b/pkg/cloudbroker/k8s/get_node_annotations.go index d067626..da05ac2 100644 --- a/pkg/cloudbroker/k8s/get_node_annotations.go +++ b/pkg/cloudbroker/k8s/get_node_annotations.go @@ -11,11 +11,11 @@ import ( type GetNodeAnnotationsRequest struct { // Kubernetes cluster ID // Required: true - K8SID uint64 `url:"k8sId"` + K8SID uint64 `url:"k8sId" json:"k8sId"` // Node ID // Required: true - NodeID uint64 `url:"nodeId"` + NodeID uint64 `url:"nodeId" json:"nodeId"` } func (krq GetNodeAnnotationsRequest) validate() error { diff --git a/pkg/cloudbroker/k8s/get_node_labels.go b/pkg/cloudbroker/k8s/get_node_labels.go index c146ece..2268ee7 100644 --- a/pkg/cloudbroker/k8s/get_node_labels.go +++ b/pkg/cloudbroker/k8s/get_node_labels.go @@ -11,11 +11,11 @@ import ( type GetNodeLabelsRequest struct { // Kubernetes cluster ID // Required: true - K8SID uint64 `url:"k8sId"` + K8SID uint64 `url:"k8sId" json:"k8sId"` // Compute ID of worker node // Required: true - NodeID uint64 `url:"nodeId"` + NodeID uint64 `url:"nodeId" json:"nodeId"` } func (krq GetNodeLabelsRequest) validate() error { diff --git a/pkg/cloudbroker/k8s/get_node_taints.go b/pkg/cloudbroker/k8s/get_node_taints.go index 58a7d02..a301b70 100644 --- a/pkg/cloudbroker/k8s/get_node_taints.go +++ b/pkg/cloudbroker/k8s/get_node_taints.go @@ -11,11 +11,11 @@ import ( type GetNodeTaintsRequest struct { // Kubernetes cluster ID // Required: true - K8SID uint64 `url:"k8sId"` + K8SID uint64 `url:"k8sId" json:"k8sId"` // Node ID // Required: false - NodeID uint64 `url:"nodeId"` + NodeID uint64 `url:"nodeId" json:"nodeId"` } func (krq GetNodeTaintsRequest) validate() error { diff --git a/pkg/cloudbroker/k8s/list.go b/pkg/cloudbroker/k8s/list.go index 02d3896..c5cd315 100644 --- a/pkg/cloudbroker/k8s/list.go +++ b/pkg/cloudbroker/k8s/list.go @@ -10,15 +10,15 @@ import ( type ListRequest struct { // Include deleted clusters in result // Required: false - IncludeDeleted bool `url:"includedeleted,omitempty"` + IncludeDeleted bool `url:"includedeleted,omitempty" json:"includedeleted,omitempty"` // Page number // Required: false - Page uint64 `url:"page,omitempty"` + Page uint64 `url:"page,omitempty" json:"page,omitempty"` // Page size // Required: false - Size uint64 `url:"size,omitempty"` + Size uint64 `url:"size,omitempty" json:"size,omitempty"` } // List gets list all kubernetes clusters diff --git a/pkg/cloudbroker/k8s/list_deleted.go b/pkg/cloudbroker/k8s/list_deleted.go index e1003c7..738f74c 100644 --- a/pkg/cloudbroker/k8s/list_deleted.go +++ b/pkg/cloudbroker/k8s/list_deleted.go @@ -10,11 +10,11 @@ import ( type ListDeletedRequest struct { // Page number // Required: false - Page uint64 `url:"page,omitempty"` + Page uint64 `url:"page,omitempty" json:"page,omitempty"` // Page size // Required: false - Size uint64 `url:"size,omitempty"` + Size uint64 `url:"size,omitempty" json:"size,omitempty"` } // ListDeleted gets all deleted kubernetes clusters diff --git a/pkg/cloudbroker/k8s/restore.go b/pkg/cloudbroker/k8s/restore.go index d0c6bd9..6bd3a65 100644 --- a/pkg/cloudbroker/k8s/restore.go +++ b/pkg/cloudbroker/k8s/restore.go @@ -11,7 +11,7 @@ import ( type RestoreRequest struct { // Kubernetes cluster ID // Required: true - K8SID uint64 `url:"k8sId"` + K8SID uint64 `url:"k8sId" json:"k8sId"` } func (krq RestoreRequest) validate() error { diff --git a/pkg/cloudbroker/k8s/start.go b/pkg/cloudbroker/k8s/start.go index 8a09825..e25d31f 100644 --- a/pkg/cloudbroker/k8s/start.go +++ b/pkg/cloudbroker/k8s/start.go @@ -11,7 +11,7 @@ import ( type StartRequest struct { // Kubernetes cluster ID // Required: true - K8SID uint64 `url:"k8sId"` + K8SID uint64 `url:"k8sId" json:"k8sId"` } func (krq StartRequest) validate() error { diff --git a/pkg/cloudbroker/k8s/stop.go b/pkg/cloudbroker/k8s/stop.go index 3d6611c..d1d585c 100644 --- a/pkg/cloudbroker/k8s/stop.go +++ b/pkg/cloudbroker/k8s/stop.go @@ -11,7 +11,7 @@ import ( type StopRequest struct { // Kubernetes cluster ID // Required: true - K8SID uint64 `url:"k8sId"` + K8SID uint64 `url:"k8sId" json:"k8sId"` } func (krq StopRequest) validate() error { diff --git a/pkg/cloudbroker/k8s/update.go b/pkg/cloudbroker/k8s/update.go index fdda541..c2b0dc4 100644 --- a/pkg/cloudbroker/k8s/update.go +++ b/pkg/cloudbroker/k8s/update.go @@ -11,17 +11,17 @@ import ( type UpdateRequest struct { // Kubernetes cluster ID // Required: true - K8SID uint64 `url:"k8sId"` + K8SID uint64 `url:"k8sId" json:"k8sId"` // New name to set. // If empty string is passed, name is not updated // Required: false - Name string `url:"name,omitempty"` + Name string `url:"name,omitempty" json:"name,omitempty"` // New description to set. // If empty string is passed, description is not updated // Required: false - Description string `url:"desc,omitempty"` + Description string `url:"desc,omitempty" json:"desc,omitempty"` } func (krq UpdateRequest) validate() error { diff --git a/pkg/cloudbroker/k8s/worker_add.go b/pkg/cloudbroker/k8s/worker_add.go index 8ce9b14..4cd0475 100644 --- a/pkg/cloudbroker/k8s/worker_add.go +++ b/pkg/cloudbroker/k8s/worker_add.go @@ -11,15 +11,15 @@ import ( type WorkerAddRequest struct { // Kubernetes cluster ID // Required: true - K8SID uint64 `url:"k8sId"` + K8SID uint64 `url:"k8sId" json:"k8sId"` // ID of the workers compute group // Required: true - WorkersGroupID uint64 `url:"workersGroupId"` + WorkersGroupID uint64 `url:"workersGroupId" json:"workersGroupId"` // How many worker nodes to add // Required: true - Num uint64 `url:"num"` + Num uint64 `url:"num" json:"num"` } func (krq WorkerAddRequest) validate() error { diff --git a/pkg/cloudbroker/k8s/worker_reset.go b/pkg/cloudbroker/k8s/worker_reset.go index 360eb5d..c8257e8 100644 --- a/pkg/cloudbroker/k8s/worker_reset.go +++ b/pkg/cloudbroker/k8s/worker_reset.go @@ -11,15 +11,15 @@ import ( type WorkerResetRequest struct { // Kubernetes cluster ID // Required: true - K8SID uint64 `url:"k8sId"` + K8SID uint64 `url:"k8sId" json:"k8sId"` // ID of the workers compute group // Required: true - WorkersGroupID uint64 `url:"workersGroupId"` + WorkersGroupID uint64 `url:"workersGroupId" json:"workersGroupId"` // Compute ID of worker node to reset // Required: true - WorkerID uint64 `url:"workerId"` + WorkerID uint64 `url:"workerId" json:"workerId"` } func (krq WorkerResetRequest) validate() error { diff --git a/pkg/cloudbroker/k8s/worker_restart.go b/pkg/cloudbroker/k8s/worker_restart.go index 8e4d3d8..f336200 100644 --- a/pkg/cloudbroker/k8s/worker_restart.go +++ b/pkg/cloudbroker/k8s/worker_restart.go @@ -11,15 +11,15 @@ import ( type WorkerRestartRequest struct { // Kubernetes cluster ID // Required: true - K8SID uint64 `url:"k8sId"` + K8SID uint64 `url:"k8sId" json:"k8sId"` // ID of the workers compute group // Required: true - WorkersGroupID uint64 `url:"workersGroupId"` + WorkersGroupID uint64 `url:"workersGroupId" json:"workersGroupId"` // Compute ID of worker node to restart // Required: true - WorkerID uint64 `url:"workerId"` + WorkerID uint64 `url:"workerId" json:"workerId"` } func (krq WorkerRestartRequest) validate() error { diff --git a/pkg/cloudbroker/k8s/workers_group_add.go b/pkg/cloudbroker/k8s/workers_group_add.go index b95033f..dda4fdd 100644 --- a/pkg/cloudbroker/k8s/workers_group_add.go +++ b/pkg/cloudbroker/k8s/workers_group_add.go @@ -11,52 +11,52 @@ import ( type WorkersGroupAddRequest struct { // Kubernetes cluster ID // Required: true - K8SID uint64 `url:"k8sId"` + K8SID uint64 `url:"k8sId" json:"k8sId"` // Worker group name // Required: true - Name string `url:"name"` + Name string `url:"name" json:"name"` // ID of SEP to create boot disks for default worker nodes group. // Uses images SEP ID if not set // Required: false - WorkerSEPID uint64 `url:"workerSepId,omitempty"` + WorkerSEPID uint64 `url:"workerSepId,omitempty" json:"workerSepId,omitempty"` // Pool to use if worker SEP ID is set, can be also empty if // needed to be chosen by system // Required: false - WorkerSEPPool string `url:"workerSepPool,omitempty"` + WorkerSEPPool string `url:"workerSepPool,omitempty" json:"workerSepPool,omitempty"` // List of strings with labels for worker group // i.e: ["label1=value1", "label2=value2"] // Required: false - Labels []string `url:"labels,omitempty"` + Labels []string `url:"labels,omitempty" json:"labels,omitempty"` // List of strings with taints for worker group // i.e: ["key1=value1:NoSchedule", "key2=value2:NoExecute"] // Required: false - Taints []string `url:"taints,omitempty"` + Taints []string `url:"taints,omitempty" json:"taints,omitempty"` // List of strings with annotations for worker group // i.e: ["key1=value1", "key2=value2"] // Required: false - Annotations []string `url:"annotations,omitempty"` + Annotations []string `url:"annotations,omitempty" json:"annotations,omitempty"` // Number of worker nodes to create // Required: false - WorkerNum uint64 `url:"workerNum,omitempty"` + WorkerNum uint64 `url:"workerNum,omitempty" json:"workerNum,omitempty"` // Worker node CPU count // Required: false - WorkerCPU uint64 `url:"workerCpu,omitempty"` + WorkerCPU uint64 `url:"workerCpu,omitempty" json:"workerCpu,omitempty"` // Worker node RAM volume in MB // Required: false - WorkerRAM uint64 `url:"workerRam,omitempty"` + WorkerRAM uint64 `url:"workerRam,omitempty" json:"workerRam,omitempty"` // Worker node boot disk size in GB If 0 is specified, size is defined by the OS image size // Required: false - WorkerDisk uint64 `url:"workerDisk,omitempty"` + WorkerDisk uint64 `url:"workerDisk,omitempty" json:"workerDisk,omitempty"` } func (krq WorkersGroupAddRequest) validate() error { diff --git a/pkg/cloudbroker/k8s/workers_group_delete.go b/pkg/cloudbroker/k8s/workers_group_delete.go index 1800288..ac6775e 100644 --- a/pkg/cloudbroker/k8s/workers_group_delete.go +++ b/pkg/cloudbroker/k8s/workers_group_delete.go @@ -11,11 +11,11 @@ import ( type WorkersGroupDeleteRequest struct { // Kubernetes cluster ID // Required: true - K8SID uint64 `url:"k8sId"` + K8SID uint64 `url:"k8sId" json:"k8sId"` // Worker group ID // Required: true - WorkersGroupID uint64 `url:"workersGroupId"` + WorkersGroupID uint64 `url:"workersGroupId" json:"workersGroupId"` } func (krq WorkersGroupDeleteRequest) validate() error { diff --git a/pkg/cloudbroker/k8s/workers_group_get_by_name.go b/pkg/cloudbroker/k8s/workers_group_get_by_name.go index 861b3cd..6113df2 100644 --- a/pkg/cloudbroker/k8s/workers_group_get_by_name.go +++ b/pkg/cloudbroker/k8s/workers_group_get_by_name.go @@ -11,11 +11,11 @@ import ( type WorkersGroupGetByNameRequest struct { // Kubernetes cluster ID // Required: true - K8SID uint64 `url:"k8sId"` + K8SID uint64 `url:"k8sId" json:"k8sId"` // Worker group name // Required: true - GroupName string `url:"groupName"` + GroupName string `url:"groupName" json:"groupName"` } func (krq WorkersGroupGetByNameRequest) validate() error { diff --git a/pkg/cloudbroker/kvmppc/create.go b/pkg/cloudbroker/kvmppc/create.go index fe42142..cd37bdf 100644 --- a/pkg/cloudbroker/kvmppc/create.go +++ b/pkg/cloudbroker/kvmppc/create.go @@ -11,38 +11,38 @@ import ( type CreateRequest struct { // ID of the resource group, which will own this VM // Required: true - RGID uint64 `url:"rgId"` + RGID uint64 `url:"rgId" json:"rgId"` // Name of this VM. // Must be unique among all VMs (including those in DELETED state) in target resource group // Required: true - Name string `url:"name"` + Name string `url:"name" json:"name"` // Number CPUs to allocate to this VM // Required: true - CPU uint64 `url:"cpu"` + CPU uint64 `url:"cpu" json:"cpu"` // Volume of RAM in MB to allocate to this VM // Required: true - RAM uint64 `url:"ram"` + RAM uint64 `url:"ram" json:"ram"` // ID of the OS image to base this VM on; // Could be boot disk image or CD-ROM image // Required: true - ImageID uint64 `url:"imageId"` + ImageID uint64 `url:"imageId" json:"imageId"` // Size of the boot disk in GB // Required: false - BootDisk uint64 `url:"bootDisk,omitempty"` + BootDisk uint64 `url:"bootDisk,omitempty" json:"bootDisk,omitempty"` // ID of SEP to create boot disk on. // Uses images SEP ID if not set // Required: false - SEPID uint64 `url:"sepId,omitempty"` + SEPID uint64 `url:"sepId,omitempty" json:"sepId,omitempty"` // Pool to use if SEP ID is set, can be also empty if needed to be chosen by system // Required: false - Pool string `url:"pool,omitempty"` + Pool string `url:"pool,omitempty" json:"pool,omitempty"` // Network type // Should be one of: @@ -50,46 +50,46 @@ type CreateRequest struct { // - EXTNET // - NONE // Required: false - NetType string `url:"netType,omitempty"` + NetType string `url:"netType,omitempty" json:"netType,omitempty"` // Network ID for connect to, // for EXTNET - external network ID, // for VINS - VINS ID, // when network type is not "NONE" // Required: false - NetID uint64 `url:"netId,omitempty"` + NetID uint64 `url:"netId,omitempty" json:"netId,omitempty"` // IP address to assign to this VM when connecting to the specified network // Required: false - IPAddr string `url:"ipAddr,omitempty"` + IPAddr string `url:"ipAddr,omitempty" json:"ipAddr,omitempty"` // Input data for cloud-init facility // Required: false - Userdata string `url:"userdata,omitempty"` + Userdata string `url:"userdata,omitempty" json:"userdata,omitempty"` // Text description of this VM // Required: false - Description string `url:"desc,omitempty"` + Description string `url:"desc,omitempty" json:"desc,omitempty"` // Start VM upon success // Required: false - Start bool `url:"start,omitempty"` + Start bool `url:"start,omitempty" json:"start,omitempty"` // Stack ID // Required: false - StackID uint64 `url:"stackId,omitempty"` + StackID uint64 `url:"stackId,omitempty" json:"stackId,omitempty"` // System name // Required: false - IS string `url:"IS,omitempty"` + IS string `url:"IS,omitempty" json:"IS,omitempty"` // Compute purpose // Required: false - IPAType string `url:"ipaType,omitempty"` + IPAType string `url:"ipaType,omitempty" json:"ipaType,omitempty"` // Reason for action // Required: false - Reason string `url:"reason,omitempty"` + Reason string `url:"reason,omitempty" json:"reason,omitempty"` } func (krq CreateRequest) validate() error { diff --git a/pkg/cloudbroker/kvmppc/create_blank.go b/pkg/cloudbroker/kvmppc/create_blank.go index 6288097..fbca0c8 100644 --- a/pkg/cloudbroker/kvmppc/create_blank.go +++ b/pkg/cloudbroker/kvmppc/create_blank.go @@ -11,33 +11,33 @@ import ( type CreateBlankRequest struct { // ID of the resource group, which will own this VM // Required: true - RGID uint64 `url:"rgId"` + RGID uint64 `url:"rgId" json:"rgId"` // Name of this VM. // Must be unique among all VMs (including those in DELETED state) in target resource group // Required: true - Name string `url:"name"` + Name string `url:"name" json:"name"` // Number CPUs to allocate to this VM // Required: true - CPU uint64 `url:"cpu"` + CPU uint64 `url:"cpu" json:"cpu"` // Volume of RAM in MB to allocate to this VM // Required: true - RAM uint64 `url:"ram"` + RAM uint64 `url:"ram" json:"ram"` // Size of the boot disk in GB // Required: true - BootDisk uint64 `url:"bootDisk"` + BootDisk uint64 `url:"bootDisk" json:"bootDisk"` // ID of SEP to create boot disk on. // Uses images SEP ID if not set // Required: true - SEPID uint64 `url:"sepId"` + SEPID uint64 `url:"sepId" json:"sepId"` // Pool to use if SEP ID is set, can be also empty if needed to be chosen by system // Required: true - Pool string `url:"pool"` + Pool string `url:"pool" json:"pool"` // Network type // Should be one of: @@ -45,22 +45,22 @@ type CreateBlankRequest struct { // - EXTNET // - NONE // Required: false - NetType string `url:"netType,omitempty"` + NetType string `url:"netType,omitempty" json:"netType,omitempty"` // Network ID for connect to, // for EXTNET - external network ID, // for VINS - VINS ID, // when network type is not "NONE" // Required: false - NetID uint64 `url:"netId,omitempty"` + NetID uint64 `url:"netId,omitempty" json:"netId,omitempty"` // IP address to assign to this VM when connecting to the specified network // Required: false - IPAddr string `url:"ipAddr,omitempty"` + IPAddr string `url:"ipAddr,omitempty" json:"ipAddr,omitempty"` // Text description of this VM // Required: false - Description string `url:"desc,omitempty"` + Description string `url:"desc,omitempty" json:"desc,omitempty"` } func (krq CreateBlankRequest) validate() error { diff --git a/pkg/cloudbroker/kvmppc/mass_create.go b/pkg/cloudbroker/kvmppc/mass_create.go index 4120247..e55997b 100644 --- a/pkg/cloudbroker/kvmppc/mass_create.go +++ b/pkg/cloudbroker/kvmppc/mass_create.go @@ -11,41 +11,41 @@ import ( type MassCreateRequest struct { // ID of the resource group, which will own this VM // Required: true - RGID uint64 `url:"rgId"` + RGID uint64 `url:"rgId" json:"rgId"` // Name of this VM. // Must be unique among all VMs (including those in DELETED state) in target resource group // Required: true - Name string `url:"name"` + Name string `url:"name" json:"name"` // Number of VMs // Required: true - Count uint64 `url:"count"` + Count uint64 `url:"count" json:"count"` // Number CPUs to allocate to this VM // Required: true - CPU uint64 `url:"cpu"` + CPU uint64 `url:"cpu" json:"cpu"` // Volume of RAM in MB to allocate to this VM // Required: true - RAM uint64 `url:"ram"` + RAM uint64 `url:"ram" json:"ram"` // Image ID // Required: true - ImageID uint64 `url:"imageId"` + ImageID uint64 `url:"imageId" json:"imageId"` // Size of the boot disk in GB // Required: true - BootDisk uint64 `url:"bootDisk"` + BootDisk uint64 `url:"bootDisk" json:"bootDisk"` // ID of SEP to create boot disk on. // Uses images SEP ID if not set // Required: true - SEPID uint64 `url:"sepId"` + SEPID uint64 `url:"sepId" json:"sepId"` // Pool to use if SEP ID is set, can be also empty if needed to be chosen by system // Required: true - Pool string `url:"pool"` + Pool string `url:"pool" json:"pool"` // Network type // Should be one of: @@ -53,30 +53,30 @@ type MassCreateRequest struct { // - EXTNET // - NONE // Required: false - NetType string `url:"netType,omitempty"` + NetType string `url:"netType,omitempty" json:"netType,omitempty"` // Network ID for connect to, // for EXTNET - external network ID, // for VINS - VINS ID, // when network type is not "NONE" // Required: false - NetID uint64 `url:"netId,omitempty"` + NetID uint64 `url:"netId,omitempty" json:"netId,omitempty"` // Input data for cloud-init facility // Required: false - UserData string `url:"userdata,omitempty"` + UserData string `url:"userdata,omitempty" json:"userdata,omitempty"` // Text description of this VM // Required: false - Description string `url:"desc,omitempty"` + Description string `url:"desc,omitempty" json:"desc,omitempty"` // Start after create of not // Required: false - Start bool `url:"start,omitempty"` + Start bool `url:"start,omitempty" json:"start,omitempty"` // Reason to action // Required: false - Reason string `url:"reason,omitempty"` + Reason string `url:"reason,omitempty" json:"reason,omitempty"` } func (krq MassCreateRequest) validate() error { diff --git a/pkg/cloudbroker/kvmx86/create.go b/pkg/cloudbroker/kvmx86/create.go index 9aec1bf..1d5127a 100644 --- a/pkg/cloudbroker/kvmx86/create.go +++ b/pkg/cloudbroker/kvmx86/create.go @@ -11,38 +11,38 @@ import ( type CreateRequest struct { // ID of the resource group, which will own this VM // Required: true - RGID uint64 `url:"rgId"` + RGID uint64 `url:"rgId" json:"rgId"` // Name of this VM. // Must be unique among all VMs (including those in DELETED state) in target resource group // Required: true - Name string `url:"name"` + Name string `url:"name" json:"name"` // Number CPUs to allocate to this VM // Required: true - CPU uint64 `url:"cpu"` + CPU uint64 `url:"cpu" json:"cpu"` // Volume of RAM in MB to allocate to this VM // Required: true - RAM uint64 `url:"ram"` + RAM uint64 `url:"ram" json:"ram"` // ID of the OS image to base this VM on; // Could be boot disk image or CD-ROM image // Required: true - ImageID uint64 `url:"imageId"` + ImageID uint64 `url:"imageId" json:"imageId"` // Size of the boot disk in GB // Required: false - BootDisk uint64 `url:"bootDisk,omitempty"` + BootDisk uint64 `url:"bootDisk,omitempty" json:"bootDisk,omitempty"` // ID of SEP to create boot disk on. // Uses images SEP ID if not set // Required: false - SEPID uint64 `url:"sepId,omitempty"` + SEPID uint64 `url:"sepId,omitempty" json:"sepId,omitempty"` // Pool to use if SEP ID is set, can be also empty if needed to be chosen by system // Required: false - Pool string `url:"pool,omitempty"` + Pool string `url:"pool,omitempty" json:"pool,omitempty"` // Network type // Should be one of: @@ -50,46 +50,46 @@ type CreateRequest struct { // - EXTNET // - NONE // Required: false - NetType string `url:"netType,omitempty"` + NetType string `url:"netType,omitempty" json:"netType,omitempty"` // Network ID for connect to, // for EXTNET - external network ID, // for VINS - VINS ID, // when network type is not "NONE" // Required: false - NetID uint64 `url:"netId,omitempty"` + NetID uint64 `url:"netId,omitempty" json:"netId,omitempty"` // IP address to assign to this VM when connecting to the specified network // Required: false - IPAddr string `url:"ipAddr,omitempty"` + IPAddr string `url:"ipAddr,omitempty" json:"ipAddr,omitempty"` // Input data for cloud-init facility // Required: false - Userdata string `url:"userdata,omitempty"` + Userdata string `url:"userdata,omitempty" json:"userdata,omitempty"` // Text description of this VM // Required: false - Description string `url:"desc,omitempty"` + Description string `url:"desc,omitempty" json:"desc,omitempty"` // Start VM upon success // Required: false - Start bool `url:"start,omitempty"` + Start bool `url:"start,omitempty" json:"start,omitempty"` // Stack ID // Required: false - StackID uint64 `url:"stackId,omitempty"` + StackID uint64 `url:"stackId,omitempty" json:"stackId,omitempty"` // System name // Required: false - IS string `url:"IS,omitempty"` + IS string `url:"IS,omitempty" json:"IS,omitempty"` // Compute purpose // Required: false - IPAType string `url:"ipaType,omitempty"` + IPAType string `url:"ipaType,omitempty" json:"ipaType,omitempty"` // Reason for action // Required: false - Reason string `url:"reason,omitempty"` + Reason string `url:"reason,omitempty" json:"reason,omitempty"` } func (krq CreateRequest) validate() error { diff --git a/pkg/cloudbroker/kvmx86/create_blank.go b/pkg/cloudbroker/kvmx86/create_blank.go index 24e0b8f..35ed7f8 100644 --- a/pkg/cloudbroker/kvmx86/create_blank.go +++ b/pkg/cloudbroker/kvmx86/create_blank.go @@ -11,33 +11,33 @@ import ( type CreateBlankRequest struct { // ID of the resource group, which will own this VM // Required: true - RGID uint64 `url:"rgId"` + RGID uint64 `url:"rgId" json:"rgId"` // Name of this VM. // Must be unique among all VMs (including those in DELETED state) in target resource group // Required: true - Name string `url:"name"` + Name string `url:"name" json:"name"` // Number CPUs to allocate to this VM // Required: true - CPU uint64 `url:"cpu"` + CPU uint64 `url:"cpu" json:"cpu"` // Volume of RAM in MB to allocate to this VM // Required: true - RAM uint64 `url:"ram"` + RAM uint64 `url:"ram" json:"ram"` // Size of the boot disk in GB // Required: true - BootDisk uint64 `url:"bootDisk"` + BootDisk uint64 `url:"bootDisk" json:"bootDisk"` // ID of SEP to create boot disk on. // Uses images SEP ID if not set // Required: true - SEPID uint64 `url:"sepId"` + SEPID uint64 `url:"sepId" json:"sepId"` // Pool to use if sepId is set, can be also empty if needed to be chosen by system // Required: true - Pool string `url:"pool"` + Pool string `url:"pool" json:"pool"` // Network type // Should be one of: @@ -45,22 +45,22 @@ type CreateBlankRequest struct { // - EXTNET // - NONE // Required: false - NetType string `url:"netType,omitempty"` + NetType string `url:"netType,omitempty" json:"netType,omitempty"` // Network ID for connect to, // for EXTNET - external network ID, // for VINS - VINS ID, // when network type is not "NONE" // Required: false - NetID uint64 `url:"netId,omitempty"` + NetID uint64 `url:"netId,omitempty" json:"netId,omitempty"` // IP address to assign to this VM when connecting to the specified network // Required: false - IPAddr string `url:"ipAddr,omitempty"` + IPAddr string `url:"ipAddr,omitempty" json:"ipAddr,omitempty"` // Text description of this VM // Required: false - Description string `url:"desc,omitempty"` + Description string `url:"desc,omitempty" json:"desc,omitempty"` } func (krq CreateBlankRequest) validate() error { diff --git a/pkg/cloudbroker/kvmx86/mass_create.go b/pkg/cloudbroker/kvmx86/mass_create.go index 51a560c..5b84f75 100644 --- a/pkg/cloudbroker/kvmx86/mass_create.go +++ b/pkg/cloudbroker/kvmx86/mass_create.go @@ -11,41 +11,41 @@ import ( type MassCreateRequest struct { // ID of the resource group, which will own this VM // Required: true - RGID uint64 `url:"rgId"` + RGID uint64 `url:"rgId" json:"rgId"` // Name of this VM. // Must be unique among all VMs (including those in DELETED state) in target resource group // Required: true - Name string `url:"name"` + Name string `url:"name" json:"name"` // Number of VMs // Required: true - Count uint64 `url:"count"` + Count uint64 `url:"count" json:"count"` // Number CPUs to allocate to this VM // Required: true - CPU uint64 `url:"cpu"` + CPU uint64 `url:"cpu" json:"cpu"` // Volume of RAM in MB to allocate to this VM // Required: true - RAM uint64 `url:"ram"` + RAM uint64 `url:"ram" json:"ram"` // Image ID // Required: true - ImageID uint64 `url:"imageId"` + ImageID uint64 `url:"imageId" json:"imageId"` // Size of the boot disk in GB // Required: true - BootDisk uint64 `url:"bootDisk"` + BootDisk uint64 `url:"bootDisk" json:"bootDisk"` // ID of SEP to create boot disk on. // Uses images SEP ID if not set // Required: true - SEPID uint64 `url:"sepId"` + SEPID uint64 `url:"sepId" json:"sepId"` // Pool to use if SEP ID is set, can be also empty if needed to be chosen by system // Required: true - Pool string `url:"pool"` + Pool string `url:"pool" json:"pool"` // Network type // Should be one of: @@ -53,34 +53,34 @@ type MassCreateRequest struct { // - EXTNET // - NONE // Required: false - NetType string `url:"netType,omitempty"` + NetType string `url:"netType,omitempty" json:"netType,omitempty"` // Network ID for connect to, // for EXTNET - external network ID, // for VINS - VINS ID, // when network type is not "NONE" // Required: false - NetID uint64 `url:"netId,omitempty"` + NetID uint64 `url:"netId,omitempty" json:"netId,omitempty"` // IP address to assign to this VM when connecting to the specified network // Required: false - IPAddr string `url:"ipAddr,omitempty"` + IPAddr string `url:"ipAddr,omitempty" json:"ipAddr,omitempty"` // Input data for cloud-init facility // Required: false - UserData string `url:"userdata,omitempty"` + UserData string `url:"userdata,omitempty" json:"userdata,omitempty"` // Text description of this VM // Required: false - Description string `url:"desc,omitempty"` + Description string `url:"desc,omitempty" json:"desc,omitempty"` // Start after create of not // Required: false - Start bool `url:"start,omitempty"` + Start bool `url:"start,omitempty" json:"start,omitempty"` // Reason to action // Required: false - Reason string `url:"reason,omitempty"` + Reason string `url:"reason,omitempty" json:"reason,omitempty"` } func (krq MassCreateRequest) validate() error { diff --git a/pkg/cloudbroker/lb/backend_create.go b/pkg/cloudbroker/lb/backend_create.go index 70f71ae..1fead33 100644 --- a/pkg/cloudbroker/lb/backend_create.go +++ b/pkg/cloudbroker/lb/backend_create.go @@ -13,11 +13,11 @@ import ( type BackendCreateRequest struct { // ID of the load balancer instance to backendCreate // Required: true - LBID uint64 `url:"lbId"` + LBID uint64 `url:"lbId" json:"lbId"` // Must be unique among all backends of this load balancer - name of the new backend to create // Required: true - BackendName string `url:"backendName"` + BackendName string `url:"backendName" json:"backendName"` // Algorithm // Should be one of: @@ -25,47 +25,47 @@ type BackendCreateRequest struct { // - static-rr // - leastconn // Required: false - Algorithm string `url:"algorithm,omitempty"` + Algorithm string `url:"algorithm,omitempty" json:"algorithm,omitempty"` // Interval in milliseconds between two consecutive availability // checks of the server that is considered available // Required: false - Inter uint64 `url:"inter,omitempty"` + Inter uint64 `url:"inter,omitempty" json:"inter,omitempty"` // Interval in milliseconds between two consecutive checks to // restore the availability of a server that is currently considered unavailable // Required: false - DownInter uint64 `url:"downinter,omitempty"` + DownInter uint64 `url:"downinter,omitempty" json:"downinter,omitempty"` // Number of checks that the server must pass in order to get the available status // and be included in the balancing scheme again // Required: false - Rise uint64 `url:"rise,omitempty"` + Rise uint64 `url:"rise,omitempty" json:"rise,omitempty"` // Number of consecutive failed availability checks, // after which the previously considered available server receives the status of // unavailable and is temporarily excluded from the balancing scheme // Required: false - Fall uint64 `url:"fall,omitempty"` + Fall uint64 `url:"fall,omitempty" json:"fall,omitempty"` // Interval in milliseconds from the moment the server receives the available status, // after which the number of actually allowed connections to this server will be returned to 100% of the set limit // Required: false - SlowStart uint64 `url:"slowstart,omitempty"` + SlowStart uint64 `url:"slowstart,omitempty" json:"slowstart,omitempty"` // Limit of simultaneous connections to the server. When this limit is reached, // the server is temporarily excluded from the balancing scheme // Required: false - MaxConn uint64 `url:"maxconn,omitempty"` + MaxConn uint64 `url:"maxconn,omitempty" json:"maxconn,omitempty"` // Limit of connections waiting in the queue. // When this limit is reached, all subsequent connections will be forwarded to other servers // Required: false - MaxQueue uint64 `url:"maxqueue,omitempty"` + MaxQueue uint64 `url:"maxqueue,omitempty" json:"maxqueue,omitempty"` // Server weight for use in weight balancing algorithms // Required: false - Weight uint64 `url:"weight,omitempty"` + Weight uint64 `url:"weight,omitempty" json:"weight,omitempty"` } func (lbrq BackendCreateRequest) validate() error { diff --git a/pkg/cloudbroker/lb/backend_delete.go b/pkg/cloudbroker/lb/backend_delete.go index 908dbbc..3cf6347 100644 --- a/pkg/cloudbroker/lb/backend_delete.go +++ b/pkg/cloudbroker/lb/backend_delete.go @@ -11,11 +11,11 @@ import ( type BackendDeleteRequest struct { // ID of the load balancer instance to BackendDelete // Required: true - LBID uint64 `url:"lbId"` + LBID uint64 `url:"lbId" json:"lbId"` // Cannot be emtpy string - name of the backend to delete // Required: true - BackendName string `url:"backendName"` + BackendName string `url:"backendName" json:"backendName"` } func (lbrq BackendDeleteRequest) validate() error { diff --git a/pkg/cloudbroker/lb/backend_server_add.go b/pkg/cloudbroker/lb/backend_server_add.go index 89e3de9..098a248 100644 --- a/pkg/cloudbroker/lb/backend_server_add.go +++ b/pkg/cloudbroker/lb/backend_server_add.go @@ -11,64 +11,64 @@ import ( type BackendServerAddRequest struct { // ID of the load balancer instance to BackendServerAdd // Required: true - LBID uint64 `url:"lbId"` + LBID uint64 `url:"lbId" json:"lbId"` // Must match one of the existing backens - name of the backend to add servers to // Required: true - BackendName string `url:"backendName"` + BackendName string `url:"backendName" json:"backendName"` // Must be unique among all servers defined for this backend - name of the server definition to add // Required: true - ServerName string `url:"serverName"` + ServerName string `url:"serverName" json:"serverName"` // IP address of the server // Required: true - Address string `url:"address"` + Address string `url:"address" json:"address"` // Port number on the server // Required: true - Port uint64 `url:"port"` + Port uint64 `url:"port" json:"port"` // Set to disabled if this server should be used regardless of its state // Required: false - Check string `url:"check,omitempty"` + Check string `url:"check,omitempty" json:"check,omitempty"` // Interval in milliseconds between two consecutive availability checks of the server that is considered available // Required: false - Inter uint64 `url:"inter,omitempty"` + Inter uint64 `url:"inter,omitempty" json:"inter,omitempty"` // Interval in milliseconds between two consecutive checks to restore // the availability of a server that is currently considered unavailable // Required: false - DownInter uint64 `url:"downinter,omitempty"` + DownInter uint64 `url:"downinter,omitempty" json:"downinter,omitempty"` // Number of checks that the server must pass in order to get // the available status and be included in the balancing scheme again // Required: false - Rise uint64 `url:"rise,omitempty"` + Rise uint64 `url:"rise,omitempty" json:"rise,omitempty"` // Number of consecutive failed availability checks, // after which the previously considered available server receives the status of unavailable and // is temporarily excluded from the balancing scheme // Required: false - Fall uint64 `url:"fall,omitempty"` + Fall uint64 `url:"fall,omitempty" json:"fall,omitempty"` // Interval in milliseconds from the moment the server receives the available status, // after which the number of actually allowed connections to this server will be returned to 100% of the set limit // Required: false - SlowStart uint64 `url:"slowstart,omitempty"` + SlowStart uint64 `url:"slowstart,omitempty" json:"slowstart,omitempty"` // Limit of simultaneous connections to the server. When this limit is reached, the server is temporarily excluded from the balancing scheme // Required: false - MaxConn uint64 `url:"maxconn,omitempty"` + MaxConn uint64 `url:"maxconn,omitempty" json:"maxconn,omitempty"` // Limit of connections waiting in the queue. When this limit is reached, all subsequent connections will be forwarded to other servers // Required: false - MaxQueue uint64 `url:"maxqueue,omitempty"` + MaxQueue uint64 `url:"maxqueue,omitempty" json:"maxqueue,omitempty"` // Server weight for use in weight balancing algorithms // Required: false - Weight uint64 `url:"weight,omitempty"` + Weight uint64 `url:"weight,omitempty" json:"weight,omitempty"` } func (lbrq BackendServerAddRequest) validate() error { diff --git a/pkg/cloudbroker/lb/backend_server_delete.go b/pkg/cloudbroker/lb/backend_server_delete.go index 567c7f3..b2e240d 100644 --- a/pkg/cloudbroker/lb/backend_server_delete.go +++ b/pkg/cloudbroker/lb/backend_server_delete.go @@ -11,15 +11,15 @@ import ( type BackendServerDeleteRequest struct { // ID of the load balancer instance to BackendServerDelete // Required: true - LBID uint64 `url:"lbId"` + LBID uint64 `url:"lbId" json:"lbId"` // Must match one of the existing backens - name of the backend to add servers to // Required: true - BackendName string `url:"backendName"` + BackendName string `url:"backendName" json:"backendName"` // Must be unique among all servers defined for this backend - name of the server definition to add // Required: true - ServerName string `url:"serverName"` + ServerName string `url:"serverName" json:"serverName"` } func (lbrq BackendServerDeleteRequest) validate() error { diff --git a/pkg/cloudbroker/lb/backend_server_update.go b/pkg/cloudbroker/lb/backend_server_update.go index d5ef4b6..4ec6672 100644 --- a/pkg/cloudbroker/lb/backend_server_update.go +++ b/pkg/cloudbroker/lb/backend_server_update.go @@ -11,64 +11,64 @@ import ( type BackendServerUpdateRequest struct { // ID of the load balancer instance to BackendServerAdd // Required: true - LBID uint64 `url:"lbId"` + LBID uint64 `url:"lbId" json:"lbId"` // Must match one of the existing backens - name of the backend to add servers to // Required: true - BackendName string `url:"backendName"` + BackendName string `url:"backendName" json:"backendName"` // Must be unique among all servers defined for this backend - name of the server definition to add // Required: true - ServerName string `url:"serverName"` + ServerName string `url:"serverName" json:"serverName"` // IP address of the server // Required: true - Address string `url:"address"` + Address string `url:"address" json:"address"` // Port number on the server // Required: true - Port uint64 `url:"port"` + Port uint64 `url:"port" json:"port"` // Set to disabled if this server should be used regardless of its state // Required: false - Check string `url:"check,omitempty"` + Check string `url:"check,omitempty" json:"check,omitempty"` // Interval in milliseconds between two consecutive availability checks of the server that is considered available // Required: false - Inter uint64 `url:"inter,omitempty"` + Inter uint64 `url:"inter,omitempty" json:"inter,omitempty"` // Interval in milliseconds between two consecutive checks to restore // the availability of a server that is currently considered unavailable // Required: false - DownInter uint64 `url:"downinter,omitempty"` + DownInter uint64 `url:"downinter,omitempty" json:"downinter,omitempty"` // Number of checks that the server must pass in order to get // the available status and be included in the balancing scheme again // Required: false - Rise uint64 `url:"rise,omitempty"` + Rise uint64 `url:"rise,omitempty" json:"rise,omitempty"` // Number of consecutive failed availability checks, // after which the previously considered available server receives the status of unavailable and // is temporarily excluded from the balancing scheme // Required: false - Fall uint64 `url:"fall,omitempty"` + Fall uint64 `url:"fall,omitempty" json:"fall,omitempty"` // Interval in milliseconds from the moment the server receives the available status, // after which the number of actually allowed connections to this server will be returned to 100% of the set limit // Required: false - SlowStart uint64 `url:"slowstart,omitempty"` + SlowStart uint64 `url:"slowstart,omitempty" json:"slowstart,omitempty"` // Limit of simultaneous connections to the server. When this limit is reached, the server is temporarily excluded from the balancing scheme // Required: false - MaxConn uint64 `url:"maxconn,omitempty"` + MaxConn uint64 `url:"maxconn,omitempty" json:"maxconn,omitempty"` // Limit of connections waiting in the queue. When this limit is reached, all subsequent connections will be forwarded to other servers // Required: false - MaxQueue uint64 `url:"maxqueue,omitempty"` + MaxQueue uint64 `url:"maxqueue,omitempty" json:"maxqueue,omitempty"` // Server weight for use in weight balancing algorithms // Required: false - Weight uint64 `url:"weight,omitempty"` + Weight uint64 `url:"weight,omitempty" json:"weight,omitempty"` } func (lbrq BackendServerUpdateRequest) validate() error { diff --git a/pkg/cloudbroker/lb/backend_update.go b/pkg/cloudbroker/lb/backend_update.go index 2fa3d90..ee6f0d8 100644 --- a/pkg/cloudbroker/lb/backend_update.go +++ b/pkg/cloudbroker/lb/backend_update.go @@ -11,11 +11,11 @@ import ( type BackendUpdateRequest struct { // ID of the load balancer instance to backendCreate // Required: true - LBID uint64 `url:"lbId"` + LBID uint64 `url:"lbId" json:"lbId"` // Must be unique among all backends of this load balancer - name of the new backend to create // Required: true - BackendName string `url:"backendName"` + BackendName string `url:"backendName" json:"backendName"` // Algorithm // Should be one of: @@ -23,47 +23,47 @@ type BackendUpdateRequest struct { // - static-rr // - leastconn // Required: false - Algorithm string `url:"algorithm,omitempty"` + Algorithm string `url:"algorithm,omitempty" json:"algorithm,omitempty"` // Interval in milliseconds between two consecutive availability // checks of the server that is considered available // Required: false - Inter uint64 `url:"inter,omitempty"` + Inter uint64 `url:"inter,omitempty" json:"inter,omitempty"` // Interval in milliseconds between two consecutive checks to // restore the availability of a server that is currently considered unavailable // Required: false - DownInter uint64 `url:"downinter,omitempty"` + DownInter uint64 `url:"downinter,omitempty" json:"downinter,omitempty"` // Number of checks that the server must pass in order to get the available status // and be included in the balancing scheme again // Required: false - Rise uint64 `url:"rise,omitempty"` + Rise uint64 `url:"rise,omitempty" json:"rise,omitempty"` // Number of consecutive failed availability checks, // after which the previously considered available server receives the status of // unavailable and is temporarily excluded from the balancing scheme // Required: false - Fall uint64 `url:"fall,omitempty"` + Fall uint64 `url:"fall,omitempty" json:"fall,omitempty"` // Interval in milliseconds from the moment the server receives the available status, // after which the number of actually allowed connections to this server will be returned to 100% of the set limit // Required: false - SlowStart uint64 `url:"slowstart,omitempty"` + SlowStart uint64 `url:"slowstart,omitempty" json:"slowstart,omitempty"` // Limit of simultaneous connections to the server. When this limit is reached, // the server is temporarily excluded from the balancing scheme // Required: false - MaxConn uint64 `url:"maxconn,omitempty"` + MaxConn uint64 `url:"maxconn,omitempty" json:"maxconn,omitempty"` // Limit of connections waiting in the queue. // When this limit is reached, all subsequent connections will be forwarded to other servers // Required: false - MaxQueue uint64 `url:"maxqueue,omitempty"` + MaxQueue uint64 `url:"maxqueue,omitempty" json:"maxqueue,omitempty"` // Server weight for use in weight balancing algorithms // Required: false - Weight uint64 `url:"weight,omitempty"` + Weight uint64 `url:"weight,omitempty" json:"weight,omitempty"` } func (lbrq BackendUpdateRequest) validate() error { diff --git a/pkg/cloudbroker/lb/config_reset.go b/pkg/cloudbroker/lb/config_reset.go index 3b71d7f..316d9ac 100644 --- a/pkg/cloudbroker/lb/config_reset.go +++ b/pkg/cloudbroker/lb/config_reset.go @@ -11,7 +11,7 @@ import ( type ConfigResetRequest struct { // ID of the load balancer instance to ConfigReset // Required: true - LBID uint64 `url:"lbId"` + LBID uint64 `url:"lbId" json:"lbId"` } func (lbrq ConfigResetRequest) validate() error { diff --git a/pkg/cloudbroker/lb/create.go b/pkg/cloudbroker/lb/create.go index 645b5e7..5bdc574 100644 --- a/pkg/cloudbroker/lb/create.go +++ b/pkg/cloudbroker/lb/create.go @@ -11,32 +11,32 @@ import ( type CreateRequest struct { // ID of the resource group where this load balancer instance will be located // Required: true - RGID uint64 `url:"rgId"` + RGID uint64 `url:"rgId" json:"rgId"` // Name of the load balancer. // Must be unique among all load balancers in this resource group // Required: true - Name string `url:"name"` + Name string `url:"name" json:"name"` // OS image ID to create load balancer from // Required: false - ImageID uint64 `url:"imageId,omitempty"` + ImageID uint64 `url:"imageId,omitempty" json:"imageId,omitempty"` // External network to connect this load balancer to // Required: true - ExtNetID uint64 `url:"extnetId"` + ExtNetID uint64 `url:"extnetId" json:"extnetId"` // Internal network (VINS) to connect this load balancer to // Required: true - VINSID uint64 `url:"vinsId"` + VINSID uint64 `url:"vinsId" json:"vinsId"` // Start now Load balancer // Required: false - Start bool `url:"start"` + Start bool `url:"start" json:"start"` // Text description of this load balancer // Required: false - Description string `url:"desc,omitempty"` + Description string `url:"desc,omitempty" json:"desc,omitempty"` } func (lbrq CreateRequest) validate() error { diff --git a/pkg/cloudbroker/lb/delete.go b/pkg/cloudbroker/lb/delete.go index b6beab9..4f5d352 100644 --- a/pkg/cloudbroker/lb/delete.go +++ b/pkg/cloudbroker/lb/delete.go @@ -11,11 +11,11 @@ import ( type DeleteRequest struct { // ID of the load balancer instance to delete // Required: true - LBID uint64 `url:"lbId"` + LBID uint64 `url:"lbId" json:"lbId"` // Set to true to delete load balancer immediately bypassing recycle bin // Required: false - Permanently bool `url:"permanently,omitempty"` + Permanently bool `url:"permanently,omitempty" json:"permanently,omitempty"` } func (lbrq DeleteRequest) validate() error { diff --git a/pkg/cloudbroker/lb/disable.go b/pkg/cloudbroker/lb/disable.go index bec084a..51e95bb 100644 --- a/pkg/cloudbroker/lb/disable.go +++ b/pkg/cloudbroker/lb/disable.go @@ -11,7 +11,7 @@ import ( type DisableRequest struct { // ID of the load balancer instance to disable // Required: true - LBID uint64 `url:"lbId"` + LBID uint64 `url:"lbId" json:"lbId"` } func (lbrq DisableRequest) validate() error { diff --git a/pkg/cloudbroker/lb/enable.go b/pkg/cloudbroker/lb/enable.go index 9763639..6c38fe2 100644 --- a/pkg/cloudbroker/lb/enable.go +++ b/pkg/cloudbroker/lb/enable.go @@ -11,7 +11,7 @@ import ( type EnableRequest struct { // ID of the load balancer instance to enable // Required: true - LBID uint64 `url:"lbId"` + LBID uint64 `url:"lbId" json:"lbId"` } func (lbrq EnableRequest) validate() error { diff --git a/pkg/cloudbroker/lb/frontend_bind.go b/pkg/cloudbroker/lb/frontend_bind.go index 6f3e5a5..aec71f2 100644 --- a/pkg/cloudbroker/lb/frontend_bind.go +++ b/pkg/cloudbroker/lb/frontend_bind.go @@ -11,26 +11,26 @@ import ( type FrontendBindRequest struct { // ID of the load balancer instance to FrontendBind // Required: true - LBID uint64 `url:"lbId"` + LBID uint64 `url:"lbId" json:"lbId"` // Name of the frontend to update // Required: true - FrontendName string `url:"frontendName"` + FrontendName string `url:"frontendName" json:"frontendName"` // Name of the binding to update // Required: true - BindingName string `url:"bindingName"` + BindingName string `url:"bindingName" json:"bindingName"` // If specified must be within the IP range of either Ext Net or ViNS, // where this load balancer is connected - new IP address to use for this binding. // If omitted, current IP address is retained // Required: false - BindingAddress string `url:"bindingAddress,omitempty"` + BindingAddress string `url:"bindingAddress,omitempty" json:"bindingAddress,omitempty"` // New port number to use for this binding. // If omitted, current port number is retained // Required: false - BindingPort uint64 `url:"bindingPort,omitempty"` + BindingPort uint64 `url:"bindingPort,omitempty" json:"bindingPort,omitempty"` } func (lbrq FrontendBindRequest) validate() error { diff --git a/pkg/cloudbroker/lb/frontend_bind_delete.go b/pkg/cloudbroker/lb/frontend_bind_delete.go index c2217ec..b16ae1e 100644 --- a/pkg/cloudbroker/lb/frontend_bind_delete.go +++ b/pkg/cloudbroker/lb/frontend_bind_delete.go @@ -11,15 +11,15 @@ import ( type FrontendBindDeleteRequest struct { // ID of the load balancer instance to FrontendBindDelete // Required: true - LBID uint64 `url:"lbId"` + LBID uint64 `url:"lbId" json:"lbId"` // Name of the frontend to delete // Required: true - FrontendName string `url:"frontendName"` + FrontendName string `url:"frontendName" json:"frontendName"` // Name of the binding to delete // Required: true - BindingName string `url:"bindingName"` + BindingName string `url:"bindingName" json:"bindingName"` } func (lbrq FrontendBindDeleteRequest) validate() error { diff --git a/pkg/cloudbroker/lb/frontend_binding_update.go b/pkg/cloudbroker/lb/frontend_binding_update.go index 64d7830..915e613 100644 --- a/pkg/cloudbroker/lb/frontend_binding_update.go +++ b/pkg/cloudbroker/lb/frontend_binding_update.go @@ -11,26 +11,26 @@ import ( type FrontendBindUpdateRequest struct { // ID of the load balancer instance to FrontendBindUpdate // Required: true - LBID uint64 `url:"lbId"` + LBID uint64 `url:"lbId" json:"lbId"` // Name of the frontend to update // Required: true - FrontendName string `url:"frontendName"` + FrontendName string `url:"frontendName" json:"frontendName"` // Name of the binding to update // Required: true - BindingName string `url:"bindingName"` + BindingName string `url:"bindingName" json:"bindingName"` // If specified must be within the IP range of either Ext Net or ViNS, // where this load balancer is connected - new IP address to use for this binding. // If omitted, current IP address is retained // Required: false - BindingAddress string `url:"bindingAddress,omitempty"` + BindingAddress string `url:"bindingAddress,omitempty" json:"bindingAddress,omitempty"` // New port number to use for this binding. // If omitted, current port number is retained // Required: false - BindingPort uint64 `url:"bindingPort,omitempty"` + BindingPort uint64 `url:"bindingPort,omitempty" json:"bindingPort,omitempty"` } func (lbrq FrontendBindUpdateRequest) validate() error { diff --git a/pkg/cloudbroker/lb/frontend_create.go b/pkg/cloudbroker/lb/frontend_create.go index 733054a..c1299c2 100644 --- a/pkg/cloudbroker/lb/frontend_create.go +++ b/pkg/cloudbroker/lb/frontend_create.go @@ -11,17 +11,17 @@ import ( type FrontendCreateRequest struct { // ID of the load balancer instance to FrontendCreate // Required: true - LBID uint64 `url:"lbId"` + LBID uint64 `url:"lbId" json:"lbId"` // Must be unique among all frontends of // this load balancer - name of the new frontend to create // Required: true - FrontendName string `url:"frontendName"` + FrontendName string `url:"frontendName" json:"frontendName"` // Should be one of the backends existing on // this load balancer - name of the backend to use // Required: true - BackendName string `url:"backendName"` + BackendName string `url:"backendName" json:"backendName"` } func (lbrq FrontendCreateRequest) validate() error { diff --git a/pkg/cloudbroker/lb/frontend_delete.go b/pkg/cloudbroker/lb/frontend_delete.go index 0302853..8b8c856 100644 --- a/pkg/cloudbroker/lb/frontend_delete.go +++ b/pkg/cloudbroker/lb/frontend_delete.go @@ -11,11 +11,11 @@ import ( type FrontendDeleteRequest struct { // ID of the load balancer instance to FrontendDelete // Required: true - LBID uint64 `url:"lbId"` + LBID uint64 `url:"lbId" json:"lbId"` // Name of the frontend to delete // Required: true - FrontendName string `url:"frontendName"` + FrontendName string `url:"frontendName" json:"frontendName"` } func (lbrq FrontendDeleteRequest) validate() error { diff --git a/pkg/cloudbroker/lb/get.go b/pkg/cloudbroker/lb/get.go index 1cc9099..0cc8377 100644 --- a/pkg/cloudbroker/lb/get.go +++ b/pkg/cloudbroker/lb/get.go @@ -11,7 +11,7 @@ import ( type GetRequest struct { // ID of the load balancer to get details for // Required: true - LBID uint64 `url:"lbId"` + LBID uint64 `url:"lbId" json:"lbId"` } func (lbrq GetRequest) validate() error { diff --git a/pkg/cloudbroker/lb/list.go b/pkg/cloudbroker/lb/list.go index a6609d9..7e87378 100644 --- a/pkg/cloudbroker/lb/list.go +++ b/pkg/cloudbroker/lb/list.go @@ -10,15 +10,15 @@ import ( type ListRequest struct { // Included deleted load balancers // Required: false - IncludeDeleted bool `url:"includedeleted,omitempty"` + IncludeDeleted bool `url:"includedeleted,omitempty" json:"includedeleted,omitempty"` // Page number // Required: false - Page uint64 `url:"page,omitempty"` + Page uint64 `url:"page,omitempty" json:"page,omitempty"` // Page size // Required: false - Size uint64 `url:"size,omitempty"` + Size uint64 `url:"size,omitempty" json:"size,omitempty"` } // List gets list all load balancers diff --git a/pkg/cloudbroker/lb/list_deleted.go b/pkg/cloudbroker/lb/list_deleted.go index d7e9a32..3c44eeb 100644 --- a/pkg/cloudbroker/lb/list_deleted.go +++ b/pkg/cloudbroker/lb/list_deleted.go @@ -10,11 +10,11 @@ import ( type ListDeletedRequest struct { // Page number // Required: false - Page uint64 `url:"page,omitempty"` + Page uint64 `url:"page,omitempty" json:"page,omitempty"` // Page size // Required: true - Size uint64 `url:"size,omitempty"` + Size uint64 `url:"size,omitempty" json:"size,omitempty"` } // ListDeleted gets list of deleted load balancers diff --git a/pkg/cloudbroker/lb/restart.go b/pkg/cloudbroker/lb/restart.go index bd15a9c..182f884 100644 --- a/pkg/cloudbroker/lb/restart.go +++ b/pkg/cloudbroker/lb/restart.go @@ -11,7 +11,7 @@ import ( type RestartRequest struct { // ID of the load balancer instance to restart // Required: true - LBID uint64 `url:"lbId"` + LBID uint64 `url:"lbId" json:"lbId"` } func (lbrq RestartRequest) validate() error { diff --git a/pkg/cloudbroker/lb/restore.go b/pkg/cloudbroker/lb/restore.go index 5bb36b9..af48e34 100644 --- a/pkg/cloudbroker/lb/restore.go +++ b/pkg/cloudbroker/lb/restore.go @@ -11,7 +11,7 @@ import ( type RestoreRequest struct { // ID of the load balancer instance to restore // Required: true - LBID uint64 `url:"lbId"` + LBID uint64 `url:"lbId" json:"lbId"` } func (lbrq RestoreRequest) validate() error { diff --git a/pkg/cloudbroker/lb/start.go b/pkg/cloudbroker/lb/start.go index ace0d0e..e04a3ca 100644 --- a/pkg/cloudbroker/lb/start.go +++ b/pkg/cloudbroker/lb/start.go @@ -11,7 +11,7 @@ import ( type StartRequest struct { // ID of the LB instance to start // Required: true - LBID uint64 `url:"lbId"` + LBID uint64 `url:"lbId" json:"lbId"` } func (lbrq StartRequest) validate() error { diff --git a/pkg/cloudbroker/lb/stop.go b/pkg/cloudbroker/lb/stop.go index 7d0fed7..c878b65 100644 --- a/pkg/cloudbroker/lb/stop.go +++ b/pkg/cloudbroker/lb/stop.go @@ -11,7 +11,7 @@ import ( type StopRequest struct { // ID of the LB instance to stop // Required: true - LBID uint64 `url:"lbId"` + LBID uint64 `url:"lbId" json:"lbId"` } func (lbrq StopRequest) validate() error { diff --git a/pkg/cloudbroker/lb/update.go b/pkg/cloudbroker/lb/update.go index 30c9454..aa4ded3 100644 --- a/pkg/cloudbroker/lb/update.go +++ b/pkg/cloudbroker/lb/update.go @@ -11,12 +11,12 @@ import ( type UpdateRequest struct { // ID of the load balancer to update // Required: true - LBID uint64 `url:"lbId"` + LBID uint64 `url:"lbId" json:"lbId"` // New description of this load balancer. // If omitted, current description is retained // Required: true - Description string `url:"desc"` + Description string `url:"desc" json:"desc"` } func (lbrq UpdateRequest) validate() error { diff --git a/pkg/cloudbroker/rg/access_grant.go b/pkg/cloudbroker/rg/access_grant.go index 0c485ea..30e7764 100644 --- a/pkg/cloudbroker/rg/access_grant.go +++ b/pkg/cloudbroker/rg/access_grant.go @@ -13,11 +13,11 @@ import ( type AccessGrantRequest struct { // Resource group ID // Required: true - RGID uint64 `url:"rgId"` + RGID uint64 `url:"rgId" json:"rgId"` // User or group name to grant access // Required: true - User string `url:"user"` + User string `url:"user" json:"user"` // Access rights to set, // Should be one of: @@ -25,11 +25,11 @@ type AccessGrantRequest struct { // - "RCX" // - "ARCXDU" // Required: true - Right string `url:"right"` + Right string `url:"right" json:"right"` // Reason for action // Required: false - Reason string `url:"reason,omitempty"` + Reason string `url:"reason,omitempty" json:"reason,omitempty"` } func (rgrq AccessGrantRequest) validate() error { diff --git a/pkg/cloudbroker/rg/access_revoke.go b/pkg/cloudbroker/rg/access_revoke.go index ee9c825..717cb67 100644 --- a/pkg/cloudbroker/rg/access_revoke.go +++ b/pkg/cloudbroker/rg/access_revoke.go @@ -11,15 +11,15 @@ import ( type AccessRevokeRequest struct { // Resource group ID // Required: true - RGID uint64 `url:"rgId"` + RGID uint64 `url:"rgId" json:"rgId"` // User or group name to revoke access // Required: true - User string `url:"user"` + User string `url:"user" json:"user"` // Reason for action // Required: false - Reason string `url:"reason,omitempty"` + Reason string `url:"reason,omitempty" json:"reason,omitempty"` } func (rgrq AccessRevokeRequest) validate() error { diff --git a/pkg/cloudbroker/rg/affinity_group_computes.go b/pkg/cloudbroker/rg/affinity_group_computes.go index 18c3a0b..3e69540 100644 --- a/pkg/cloudbroker/rg/affinity_group_computes.go +++ b/pkg/cloudbroker/rg/affinity_group_computes.go @@ -11,11 +11,11 @@ import ( type AffinityGroupComputesRequest struct { // Resource group ID // Required: true - RGID uint64 `url:"rgId"` + RGID uint64 `url:"rgId" json:"rgId"` // Affinity group label // Required: true - AffinityGroup string `url:"affinityGroup"` + AffinityGroup string `url:"affinityGroup" json:"affinityGroup"` } func (rgrq AffinityGroupComputesRequest) validate() error { diff --git a/pkg/cloudbroker/rg/affinity_groups_get.go b/pkg/cloudbroker/rg/affinity_groups_get.go index 8f4e3dd..3a0c55e 100644 --- a/pkg/cloudbroker/rg/affinity_groups_get.go +++ b/pkg/cloudbroker/rg/affinity_groups_get.go @@ -11,11 +11,11 @@ import ( type AffinityGroupsGetRequest struct { // Resource group ID // Required: true - RGID uint64 `url:"rgId"` + RGID uint64 `url:"rgId" json:"rgId"` // Label affinity group // Required: true - AffinityGroup string `url:"affinityGroup"` + AffinityGroup string `url:"affinityGroup" json:"affinityGroup"` } func (rgrq AffinityGroupsGetRequest) validate() error { diff --git a/pkg/cloudbroker/rg/affinity_groups_list.go b/pkg/cloudbroker/rg/affinity_groups_list.go index be1b010..f69b41a 100644 --- a/pkg/cloudbroker/rg/affinity_groups_list.go +++ b/pkg/cloudbroker/rg/affinity_groups_list.go @@ -11,7 +11,7 @@ import ( type AffinityGroupsListRequest struct { // Resource group ID // Required: true - RGID uint64 `url:"rgId"` + RGID uint64 `url:"rgId" json:"rgId"` } func (rgrq AffinityGroupsListRequest) validate() error { diff --git a/pkg/cloudbroker/rg/audits.go b/pkg/cloudbroker/rg/audits.go index 78138c3..776c6b7 100644 --- a/pkg/cloudbroker/rg/audits.go +++ b/pkg/cloudbroker/rg/audits.go @@ -11,7 +11,7 @@ import ( type AuditsRequest struct { // Resource group ID // Required: true - RGID uint64 `url:"rgId"` + RGID uint64 `url:"rgId" json:"rgId"` } func (rgrq AuditsRequest) validate() error { diff --git a/pkg/cloudbroker/rg/create.go b/pkg/cloudbroker/rg/create.go index 8bf05d8..c586029 100644 --- a/pkg/cloudbroker/rg/create.go +++ b/pkg/cloudbroker/rg/create.go @@ -11,40 +11,40 @@ import ( type CreateRequest struct { // Account, which will own this resource group // Required: true - AccountID uint64 `url:"accountId"` + AccountID uint64 `url:"accountId" json:"accountId"` // Grid ID // Required: true - GID uint64 `url:"gid"` + GID uint64 `url:"gid" json:"gid"` // Name of this resource group. Must be unique within the account // Required: true - Name string `url:"name"` + Name string `url:"name" json:"name"` // Max size of memory in MB // Required: false - MaxMemoryCapacity int64 `url:"maxMemoryCapacity,omitempty"` + MaxMemoryCapacity int64 `url:"maxMemoryCapacity,omitempty" json:"maxMemoryCapacity,omitempty"` // Max size of aggregated virtual disks in GB // Required: false - MaxVDiskCapacity int64 `url:"maxVDiskCapacity,omitempty"` + MaxVDiskCapacity int64 `url:"maxVDiskCapacity,omitempty" json:"maxVDiskCapacity,omitempty"` // Max number of CPU cores // Required: false - MaxCPUCapacity int64 `url:"maxCPUCapacity,omitempty"` + MaxCPUCapacity int64 `url:"maxCPUCapacity,omitempty" json:"maxCPUCapacity,omitempty"` // Max sent/received network transfer peering // Required: false - MaxNetworkPeerTransfer int64 `url:"maxNetworkPeerTransfer,omitempty"` + MaxNetworkPeerTransfer int64 `url:"maxNetworkPeerTransfer,omitempty" json:"maxNetworkPeerTransfer,omitempty"` // Max number of assigned public IPs // Required: false - MaxNumPublicIP int64 `url:"maxNumPublicIP,omitempty"` + MaxNumPublicIP int64 `url:"maxNumPublicIP,omitempty" json:"maxNumPublicIP,omitempty"` // Username - owner of this resource group. // Leave blank to set current user as owner // Required: false - Owner string `url:"owner,omitempty"` + Owner string `url:"owner,omitempty" json:"owner,omitempty"` // Type of the default network for this resource group. // virtual machines created in this resource group will be by default connected to this network. @@ -53,35 +53,35 @@ type CreateRequest struct { // - PUBLIC // - NONE // Required: false - DefNet string `url:"def_net,omitempty"` + DefNet string `url:"def_net,omitempty" json:"def_net,omitempty"` // Private network IP CIDR if default network PRIVATE // Required: false - IPCIDR string `url:"ipcidr,omitempty"` + IPCIDR string `url:"ipcidr,omitempty" json:"ipcidr,omitempty"` // Text description of this resource group // Required: false - Description string `url:"desc,omitempty"` + Description string `url:"desc,omitempty" json:"desc,omitempty"` // Reason for action // Required: false - Reason string `url:"reason,omitempty"` + Reason string `url:"reason,omitempty" json:"reason,omitempty"` // External network ID // Required: false - ExtNetID uint64 `url:"extNetId,omitempty"` + ExtNetID uint64 `url:"extNetId,omitempty" json:"extNetId,omitempty"` // External IP address // Required: false - ExtIP string `url:"extIp,omitempty"` + ExtIP string `url:"extIp,omitempty" json:"extIp,omitempty"` // Register computes in registration system // Required: false - RegisterComputes bool `url:"registerComputes,omitempty"` + RegisterComputes bool `url:"registerComputes,omitempty" json:"registerComputes,omitempty"` // List of strings with pools i.e.: ["sep1_poolName1", "sep2_poolName2"] // Required: false - UniqPools []string `url:"unuqPools,omitempty"` + UniqPools []string `url:"unuqPools,omitempty" json:"unuqPools,omitempty"` } func (rgrq CreateRequest) validate() error { diff --git a/pkg/cloudbroker/rg/delete.go b/pkg/cloudbroker/rg/delete.go index 06178b4..9337bac 100644 --- a/pkg/cloudbroker/rg/delete.go +++ b/pkg/cloudbroker/rg/delete.go @@ -11,20 +11,20 @@ import ( type DeleteRequest struct { // Resource group ID // Required: true - RGID uint64 `url:"rgId"` + RGID uint64 `url:"rgId" json:"rgId"` // Set to True if you want force delete non-empty resource group // Required: false - Force bool `url:"force,omitempty"` + Force bool `url:"force,omitempty" json:"force,omitempty"` // Set to True if you want to destroy resource group and all linked resources, if any, immediately. // Otherwise, they will be placed into recycle bin and could be restored later within recycle bin's purge period // Required: false - Permanently bool `url:"permanently,omitempty"` + Permanently bool `url:"permanently,omitempty" json:"permanently,omitempty"` // Reason for action // Required: false - Reason string `url:"reason,omitempty"` + Reason string `url:"reason,omitempty" json:"reason,omitempty"` } func (rgrq DeleteRequest) validate() error { diff --git a/pkg/cloudbroker/rg/disable.go b/pkg/cloudbroker/rg/disable.go index 6b187a9..e7609ab 100644 --- a/pkg/cloudbroker/rg/disable.go +++ b/pkg/cloudbroker/rg/disable.go @@ -11,11 +11,11 @@ import ( type DisableRequest struct { // Resource group ID // Required: true - RGID uint64 `url:"rgId"` + RGID uint64 `url:"rgId" json:"rgId"` // Reason for action // Required: false - Reason string `url:"reason,omitempty"` + Reason string `url:"reason,omitempty" json:"reason,omitempty"` } func (rgrq DisableRequest) validate() error { diff --git a/pkg/cloudbroker/rg/enable.go b/pkg/cloudbroker/rg/enable.go index bd23aed..7afc7e0 100644 --- a/pkg/cloudbroker/rg/enable.go +++ b/pkg/cloudbroker/rg/enable.go @@ -11,11 +11,11 @@ import ( type EnableRequest struct { // Resource group ID // Required: true - RGID uint64 `url:"rgId"` + RGID uint64 `url:"rgId" json:"rgId"` // Reason for action // Required: false - Reason string `url:"reason,omitempty"` + Reason string `url:"reason,omitempty" json:"reason,omitempty"` } func (rgrq EnableRequest) validate() error { diff --git a/pkg/cloudbroker/rg/get.go b/pkg/cloudbroker/rg/get.go index 32e4a4d..c308597 100644 --- a/pkg/cloudbroker/rg/get.go +++ b/pkg/cloudbroker/rg/get.go @@ -11,11 +11,11 @@ import ( type GetRequest struct { // Resource group ID // Required: true - RGID uint64 `url:"rgId"` + RGID uint64 `url:"rgId" json:"rgId"` // Reason for action // Required: false - Reason string `url:"reason,omitempty"` + Reason string `url:"reason,omitempty" json:"reason,omitempty"` } func (rgrq GetRequest) validate() error { diff --git a/pkg/cloudbroker/rg/list.go b/pkg/cloudbroker/rg/list.go index 3f22c35..2cf6067 100644 --- a/pkg/cloudbroker/rg/list.go +++ b/pkg/cloudbroker/rg/list.go @@ -10,15 +10,15 @@ import ( type ListRequest struct { // Included deleted resource groups // Required: false - IncludeDeleted bool `url:"includedeleted,omitempty"` + IncludeDeleted bool `url:"includedeleted,omitempty" json:"includedeleted,omitempty"` // Page number // Required: false - Page uint64 `url:"page,omitempty"` + Page uint64 `url:"page,omitempty" json:"page,omitempty"` // Page size // Required: false - Size uint64 `url:"size,omitempty"` + Size uint64 `url:"size,omitempty" json:"size,omitempty"` } // List gets list of all resource groups the user has access to diff --git a/pkg/cloudbroker/rg/list_computes.go b/pkg/cloudbroker/rg/list_computes.go index 93f3011..4378d9e 100644 --- a/pkg/cloudbroker/rg/list_computes.go +++ b/pkg/cloudbroker/rg/list_computes.go @@ -11,11 +11,11 @@ import ( type ListComputesRequest struct { // Resource group ID // Required: true - RGID uint64 `url:"rgId"` + RGID uint64 `url:"rgId" json:"rgId"` // Reason for action // Required: false - Reason string `url:"reason,omitempty"` + Reason string `url:"reason,omitempty" json:"reason,omitempty"` } func (rgrq ListComputesRequest) validate() error { diff --git a/pkg/cloudbroker/rg/list_deleted.go b/pkg/cloudbroker/rg/list_deleted.go index d075518..23f8bbe 100644 --- a/pkg/cloudbroker/rg/list_deleted.go +++ b/pkg/cloudbroker/rg/list_deleted.go @@ -10,11 +10,11 @@ import ( type ListDeletedRequest struct { // Page number // Required: false - Page uint64 `url:"page,omitempty"` + Page uint64 `url:"page,omitempty" json:"page,omitempty"` // Page size // Required: false - Size uint64 `url:"size,omitempty"` + Size uint64 `url:"size,omitempty" json:"size,omitempty"` } // ListDeleted gets list all deleted resource groups the user has access to diff --git a/pkg/cloudbroker/rg/list_lb.go b/pkg/cloudbroker/rg/list_lb.go index 7a7e48f..a8b33a4 100644 --- a/pkg/cloudbroker/rg/list_lb.go +++ b/pkg/cloudbroker/rg/list_lb.go @@ -11,7 +11,7 @@ import ( type ListLBRequest struct { // Resource group ID // Required: true - RGID uint64 `url:"rgId"` + RGID uint64 `url:"rgId" json:"rgId"` } func (rgrq ListLBRequest) validate() error { diff --git a/pkg/cloudbroker/rg/list_pfw.go b/pkg/cloudbroker/rg/list_pfw.go index f657286..c5eef61 100644 --- a/pkg/cloudbroker/rg/list_pfw.go +++ b/pkg/cloudbroker/rg/list_pfw.go @@ -11,7 +11,7 @@ import ( type ListPFWRequest struct { // Resource group ID // Required: true - RGID uint64 `url:"rgId"` + RGID uint64 `url:"rgId" json:"rgId"` } func (rgrq ListPFWRequest) validate() error { diff --git a/pkg/cloudbroker/rg/list_vins.go b/pkg/cloudbroker/rg/list_vins.go index 946b6e1..f26d940 100644 --- a/pkg/cloudbroker/rg/list_vins.go +++ b/pkg/cloudbroker/rg/list_vins.go @@ -11,11 +11,11 @@ import ( type ListVINSRequest struct { // Resource group ID // Required: true - RGID uint64 `url:"rgId"` + RGID uint64 `url:"rgId" json:"rgId"` // Reason for action // Required: false - Reason string `url:"reason,omitempty"` + Reason string `url:"reason,omitempty" json:"reason,omitempty"` } func (rgrq ListVINSRequest) validate() error { diff --git a/pkg/cloudbroker/rg/mass_delete.go b/pkg/cloudbroker/rg/mass_delete.go index cea1d42..2e8a8a6 100644 --- a/pkg/cloudbroker/rg/mass_delete.go +++ b/pkg/cloudbroker/rg/mass_delete.go @@ -10,22 +10,22 @@ import ( type MassDeleteRequest struct { // IDs of the resource groups // Required: true - RGIDs []uint64 `url:"rgIds"` + RGIDs []uint64 `url:"rgIds" json:"rgIds"` // Set to true if you want force delete non-empty resource groups // Required: false - Force bool `url:"force,omitempty"` + Force bool `url:"force,omitempty" json:"force,omitempty"` // Set to true if you want to destroy resource group and all linked // resources, if any, immediately. // Otherwise, they will be placed into recycle bin and could be // restored later within recycle bins purge period // Required: false - Permanently bool `url:"permanently,omitempty"` + Permanently bool `url:"permanently,omitempty" json:"permanently,omitempty"` // Reason for action // Required: false - Reason string `url:"reason,omitempty"` + Reason string `url:"reason,omitempty" json:"reason,omitempty"` } func (rgrq MassDeleteRequest) validate() error { diff --git a/pkg/cloudbroker/rg/mass_disable.go b/pkg/cloudbroker/rg/mass_disable.go index cde6817..efcfb56 100644 --- a/pkg/cloudbroker/rg/mass_disable.go +++ b/pkg/cloudbroker/rg/mass_disable.go @@ -10,11 +10,11 @@ import ( type MassDisableRequest struct { // IDs of the resource groups // Required: true - RGIDs []uint64 `url:"rgIds"` + RGIDs []uint64 `url:"rgIds" json:"rgIds"` // Reason for action // Required: false - Reason string `url:"reason,omitempty"` + Reason string `url:"reason,omitempty" json:"reason,omitempty"` } func (rgrq MassDisableRequest) validate() error { diff --git a/pkg/cloudbroker/rg/mass_enable.go b/pkg/cloudbroker/rg/mass_enable.go index 80a1971..9bdf874 100644 --- a/pkg/cloudbroker/rg/mass_enable.go +++ b/pkg/cloudbroker/rg/mass_enable.go @@ -10,11 +10,11 @@ import ( type MassEnableRequest struct { // IDs of the resource groups // Required: true - RGIDs []uint64 `url:"rgIds"` + RGIDs []uint64 `url:"rgIds" json:"rgIds"` // Reason for action // Required: false - Reason string `url:"reason,omitempty"` + Reason string `url:"reason,omitempty" json:"reason,omitempty"` } func (rgrq MassEnableRequest) validate() error { diff --git a/pkg/cloudbroker/rg/restore.go b/pkg/cloudbroker/rg/restore.go index 4e0773e..0ee0082 100644 --- a/pkg/cloudbroker/rg/restore.go +++ b/pkg/cloudbroker/rg/restore.go @@ -11,11 +11,11 @@ import ( type RestoreRequest struct { // Resource group ID // Required: true - RGID uint64 `url:"rgId"` + RGID uint64 `url:"rgId" json:"rgId"` // Reason for action // Required: false - Reason string `url:"reason,omitempty"` + Reason string `url:"reason,omitempty" json:"reason,omitempty"` } func (rgrq RestoreRequest) validate() error { diff --git a/pkg/cloudbroker/rg/set_def_net.go b/pkg/cloudbroker/rg/set_def_net.go index 29e1b59..bebd4d2 100644 --- a/pkg/cloudbroker/rg/set_def_net.go +++ b/pkg/cloudbroker/rg/set_def_net.go @@ -13,22 +13,22 @@ import ( type SetDefNetRequest struct { // Resource group ID // Required: true - RGID uint64 `url:"rgId"` + RGID uint64 `url:"rgId" json:"rgId"` // Network type // Should be one of: // - "PUBLIC" // - "PRIVATE" // Required: true - NetType string `url:"netType"` + NetType string `url:"netType" json:"netType"` // Network ID // Required: false - NetID uint64 `url:"netId"` + NetID uint64 `url:"netId" json:"netId"` // Reason for action // Required: false - Reason string `url:"reason,omitempty"` + Reason string `url:"reason,omitempty" json:"reason,omitempty"` } func (rgrq SetDefNetRequest) validate() error { diff --git a/pkg/cloudbroker/rg/update.go b/pkg/cloudbroker/rg/update.go index 99fbb34..8c32acf 100644 --- a/pkg/cloudbroker/rg/update.go +++ b/pkg/cloudbroker/rg/update.go @@ -11,47 +11,47 @@ import ( type UpdateRequest struct { // Resource group ID // Required: true - RGID uint64 `url:"rgId"` + RGID uint64 `url:"rgId" json:"rgId"` // New name // Required: false - Name string `url:"name,omitempty"` + Name string `url:"name,omitempty" json:"name,omitempty"` // New description // Required: false - Description string `url:"desc,omitempty"` + Description string `url:"desc,omitempty" json:"desc,omitempty"` // Max size of memory in MB // Required: false - MaxMemoryCapacity uint64 `url:"maxMemoryCapacity,omitempty"` + MaxMemoryCapacity uint64 `url:"maxMemoryCapacity,omitempty" json:"maxMemoryCapacity,omitempty"` // Max size of aggregated virtual disks in GB // Required: false - MaxVDiskCapacity uint64 `url:"maxVDiskCapacity,omitempty"` + MaxVDiskCapacity uint64 `url:"maxVDiskCapacity,omitempty" json:"maxVDiskCapacity,omitempty"` // Max number of CPU cores // Required: false - MaxCPUCapacity uint64 `url:"maxCPUCapacity,omitempty"` + MaxCPUCapacity uint64 `url:"maxCPUCapacity,omitempty" json:"maxCPUCapacity,omitempty"` // Max sent/received network transfer peering // Required: false - MaxNetworkPeerTransfer uint64 `url:"maxNetworkPeerTransfer,omitempty"` + MaxNetworkPeerTransfer uint64 `url:"maxNetworkPeerTransfer,omitempty" json:"maxNetworkPeerTransfer,omitempty"` // Max number of assigned public IPs // Required: false - MaxNumPublicIP uint64 `url:"maxNumPublicIP,omitempty"` + MaxNumPublicIP uint64 `url:"maxNumPublicIP,omitempty" json:"maxNumPublicIP,omitempty"` // Register computes in registration system // Required: false - RegisterComputes bool `url:"registerComputes,omitempty"` + RegisterComputes bool `url:"registerComputes,omitempty" json:"registerComputes,omitempty"` // Reason for action // Required: false - Reason string `url:"reason,omitempty"` + Reason string `url:"reason,omitempty" json:"reason,omitempty"` // List of strings with pools i.e.: ["sep1_poolName1", "sep2_poolName2", etc] // Required: false - UniqPools []string `url:"uniqPools,omitempty"` + UniqPools []string `url:"uniqPools,omitempty" json:"uniqPools,omitempty"` } func (rgrq UpdateRequest) validate() error { diff --git a/pkg/cloudbroker/rg/update_resource_types.go b/pkg/cloudbroker/rg/update_resource_types.go index da05658..5cef627 100644 --- a/pkg/cloudbroker/rg/update_resource_types.go +++ b/pkg/cloudbroker/rg/update_resource_types.go @@ -13,7 +13,7 @@ import ( type UpdateResourceTypesRequest struct { // ID of resource group // Required: true - RGID uint64 `url:"rgId"` + RGID uint64 `url:"rgId" json:"rgId"` // Resource types available to create in this resource group // Each element in a resource type slice must be one of: @@ -24,7 +24,7 @@ type UpdateResourceTypesRequest struct { // - lb // - flipgroup // Required: true - ResTypes []string `url:"resourceTypes"` + ResTypes []string `url:"resourceTypes" json:"resourceTypes"` } func (rgrq UpdateResourceTypesRequest) validate() error { diff --git a/pkg/cloudbroker/rg/usage.go b/pkg/cloudbroker/rg/usage.go index e182d6e..bbece0e 100644 --- a/pkg/cloudbroker/rg/usage.go +++ b/pkg/cloudbroker/rg/usage.go @@ -11,11 +11,11 @@ import ( type UsageRequest struct { // Resource group ID // Required: true - RGID uint64 `url:"rgId"` + RGID uint64 `url:"rgId" json:"rgId"` // Reason for action // Required: false - Reason string `url:"reason,omitempty"` + Reason string `url:"reason,omitempty" json:"reason,omitempty"` } func (rgrq UsageRequest) validate() error { diff --git a/pkg/cloudbroker/sep/access_grant.go b/pkg/cloudbroker/sep/access_grant.go index e493aef..8fcd304 100644 --- a/pkg/cloudbroker/sep/access_grant.go +++ b/pkg/cloudbroker/sep/access_grant.go @@ -11,12 +11,12 @@ import ( type AccessGrantRequest struct { // Storage endpoint provider ID // Required: true - SEPID uint64 `url:"sep_id"` + SEPID uint64 `url:"sep_id" json:"sep_id"` // Account ID to grant access to the specified SEP. If 0, // the SEP will be available for all accounts with no exceptions // Required: true - AccountID uint64 `url:"account_id"` + AccountID uint64 `url:"account_id" json:"account_id"` } func (srq AccessGrantRequest) validate() error { diff --git a/pkg/cloudbroker/sep/access_grant_to_pool.go b/pkg/cloudbroker/sep/access_grant_to_pool.go index 915f78e..cc4622b 100644 --- a/pkg/cloudbroker/sep/access_grant_to_pool.go +++ b/pkg/cloudbroker/sep/access_grant_to_pool.go @@ -11,19 +11,19 @@ import ( type AccessGrantToPoolRequest struct { // Storage endpoint provider ID // Required: true - SEPID uint64 `url:"sep_id"` + SEPID uint64 `url:"sep_id" json:"sep_id"` // Pool name // Required: true - PoolName string `url:"pool_name"` + PoolName string `url:"pool_name" json:"pool_name"` // Account ID to grant access to the specified pool SEP // Required: false - AccountID uint64 `url:"account_id,omitempty"` + AccountID uint64 `url:"account_id,omitempty" json:"account_id,omitempty"` // Resource group to grant access to the specified pool SEP // Required: false - RGID uint64 `url:"resgroup_id,omitempty"` + RGID uint64 `url:"resgroup_id,omitempty" json:"resgroup_id,omitempty"` } func (srq AccessGrantToPoolRequest) validate() error { diff --git a/pkg/cloudbroker/sep/access_revoke.go b/pkg/cloudbroker/sep/access_revoke.go index 62482c4..5187dd1 100644 --- a/pkg/cloudbroker/sep/access_revoke.go +++ b/pkg/cloudbroker/sep/access_revoke.go @@ -11,11 +11,11 @@ import ( type AccessRevokeRequest struct { // Storage endpoint provider ID // Required: true - SEPID uint64 `url:"sep_id"` + SEPID uint64 `url:"sep_id" json:"sep_id"` // Account ID to revoke access to the specified SEP // Required: true - AccountID uint64 `url:"account_id"` + AccountID uint64 `url:"account_id" json:"account_id"` } func (srq AccessRevokeRequest) validate() error { diff --git a/pkg/cloudbroker/sep/access_revoke_to_pool.go b/pkg/cloudbroker/sep/access_revoke_to_pool.go index afdd60a..5d64378 100644 --- a/pkg/cloudbroker/sep/access_revoke_to_pool.go +++ b/pkg/cloudbroker/sep/access_revoke_to_pool.go @@ -11,19 +11,19 @@ import ( type AccessRevokeToPoolRequest struct { // Storage endpoint provider ID // Required: true - SEPID uint64 `url:"sep_id"` + SEPID uint64 `url:"sep_id" json:"sep_id"` // Pool name // Required: true - PoolName string `url:"pool_name"` + PoolName string `url:"pool_name" json:"pool_name"` // Account ID to grant access to the specified pool SEP // Required: false - AccountID uint64 `url:"account_id,omitempty"` + AccountID uint64 `url:"account_id,omitempty" json:"account_id,omitempty"` // Resource group ID to grant access to the specified pool SEP // Required: false - RGID uint64 `url:"resgroup_id,omitempty"` + RGID uint64 `url:"resgroup_id,omitempty" json:"resgroup_id,omitempty"` } func (srq AccessRevokeToPoolRequest) validate() error { diff --git a/pkg/cloudbroker/sep/add_consumer_nodes.go b/pkg/cloudbroker/sep/add_consumer_nodes.go index 181229b..fcd6cef 100644 --- a/pkg/cloudbroker/sep/add_consumer_nodes.go +++ b/pkg/cloudbroker/sep/add_consumer_nodes.go @@ -11,11 +11,11 @@ import ( type AddConsumerNodesRequest struct { // Storage endpoint provider ID // Required: true - SEPID uint64 `url:"sep_id"` + SEPID uint64 `url:"sep_id" json:"sep_id"` // List of nodes IDs // Required: true - ConsumerNIDs []uint64 `url:"consumer_nids"` + ConsumerNIDs []uint64 `url:"consumer_nids" json:"consumer_nids"` } func (srq AddConsumerNodesRequest) validate() error { diff --git a/pkg/cloudbroker/sep/add_provider_nodes.go b/pkg/cloudbroker/sep/add_provider_nodes.go index 81bcafe..f28b4c7 100644 --- a/pkg/cloudbroker/sep/add_provider_nodes.go +++ b/pkg/cloudbroker/sep/add_provider_nodes.go @@ -11,11 +11,11 @@ import ( type AddProviderNodesRequest struct { // Storage endpoint provider ID // Required: true - SEPID uint64 `url:"sep_id"` + SEPID uint64 `url:"sep_id" json:"sep_id"` // List of node IDs // Required: true - ProviderNIDs []uint64 `url:"provider_nids"` + ProviderNIDs []uint64 `url:"provider_nids" json:"provider_nids"` } func (srq AddProviderNodesRequest) validate() error { diff --git a/pkg/cloudbroker/sep/config_field_edit.go b/pkg/cloudbroker/sep/config_field_edit.go index dbc002e..15c6faa 100644 --- a/pkg/cloudbroker/sep/config_field_edit.go +++ b/pkg/cloudbroker/sep/config_field_edit.go @@ -13,15 +13,15 @@ import ( type ConfigFieldEditRequest struct { // Storage endpoint provider ID // Required: true - SEPID uint64 `url:"sep_id"` + SEPID uint64 `url:"sep_id" json:"sep_id"` // Field name // Required: true - FieldName string `url:"field_name"` + FieldName string `url:"field_name" json:"field_name"` // Field value // Required: true - FieldValue string `url:"field_value"` + FieldValue string `url:"field_value" json:"field_value"` // Field type // Should be one of: @@ -31,7 +31,7 @@ type ConfigFieldEditRequest struct { // - list // - dict // Required: true - FieldType string `url:"field_type"` + FieldType string `url:"field_type" json:"field_type"` } func (srq ConfigFieldEditRequest) validate() error { diff --git a/pkg/cloudbroker/sep/config_insert.go b/pkg/cloudbroker/sep/config_insert.go index c7f5743..a2126de 100644 --- a/pkg/cloudbroker/sep/config_insert.go +++ b/pkg/cloudbroker/sep/config_insert.go @@ -11,11 +11,11 @@ import ( type ConfigInsertRequest struct { // Storage endpoint provider ID // Required: true - SEPID uint64 `url:"sep_id"` + SEPID uint64 `url:"sep_id" json:"sep_id"` // Storage provider config // Required: true - Config string `url:"config"` + Config string `url:"config" json:"config"` } func (srq ConfigInsertRequest) validate() error { diff --git a/pkg/cloudbroker/sep/config_validate.go b/pkg/cloudbroker/sep/config_validate.go index d0463cf..3ad68fd 100644 --- a/pkg/cloudbroker/sep/config_validate.go +++ b/pkg/cloudbroker/sep/config_validate.go @@ -11,11 +11,11 @@ import ( type ConfigValidateRequest struct { // Storage endpoint provider ID // Required: true - SEPID uint64 `url:"sep_id"` + SEPID uint64 `url:"sep_id" json:"sep_id"` // Storage provider config // Required: true - Config string `url:"config"` + Config string `url:"config" json:"config"` } func (srq ConfigValidateRequest) validate() error { diff --git a/pkg/cloudbroker/sep/consumption.go b/pkg/cloudbroker/sep/consumption.go index 27c98fa..25b10c3 100644 --- a/pkg/cloudbroker/sep/consumption.go +++ b/pkg/cloudbroker/sep/consumption.go @@ -11,7 +11,7 @@ import ( type ConsumptionRequest struct { // Storage endpoint provider ID // Required: true - SEPID uint64 `url:"sep_id"` + SEPID uint64 `url:"sep_id" json:"sep_id"` } func (srq ConsumptionRequest) validate() error { diff --git a/pkg/cloudbroker/sep/create.go b/pkg/cloudbroker/sep/create.go index f818a77..99faba6 100644 --- a/pkg/cloudbroker/sep/create.go +++ b/pkg/cloudbroker/sep/create.go @@ -11,35 +11,35 @@ import ( type CreateRequest struct { // Grid ID // Required: true - GID uint64 `url:"gid"` + GID uint64 `url:"gid" json:"gid"` // SEP name // Required: true - Name string `url:"name"` + Name string `url:"name" json:"name"` // Type of storage // Required: true - SEPType string `url:"sep_type"` + SEPType string `url:"sep_type" json:"sep_type"` // Description // Required: false - Description string `url:"description,omitempty"` + Description string `url:"description,omitempty" json:"description,omitempty"` // SEP config // Required: false - Config string `url:"config,omitempty"` + Config string `url:"config,omitempty" json:"config,omitempty"` // List of provider node IDs // Required: false - ProviderNIDs []uint64 `url:"provider_nids,omitempty"` + ProviderNIDs []uint64 `url:"provider_nids,omitempty" json:"provider_nids,omitempty"` // List of consumer node IDs // Required: false - ConsumerNIDs []uint64 `url:"consumer_nids,omitempty"` + ConsumerNIDs []uint64 `url:"consumer_nids,omitempty" json:"consumer_nids,omitempty"` // Enable SEP after creation // Required: false - Enable bool `url:"enable,omitempty"` + Enable bool `url:"enable,omitempty" json:"enable,omitempty"` } func (srq CreateRequest) validate() error { diff --git a/pkg/cloudbroker/sep/decommission.go b/pkg/cloudbroker/sep/decommission.go index 5e089f0..034e2d2 100644 --- a/pkg/cloudbroker/sep/decommission.go +++ b/pkg/cloudbroker/sep/decommission.go @@ -11,11 +11,11 @@ import ( type DecommissionRequest struct { // Storage endpoint provider ID // Required: true - SEPID uint64 `url:"sep_id"` + SEPID uint64 `url:"sep_id" json:"sep_id"` // Clear disks and images physically // Required: false - ClearPhisically bool `url:"clear_physically,omitempty"` + ClearPhisically bool `url:"clear_physically,omitempty" json:"clear_physically,omitempty"` } func (srq DecommissionRequest) validate() error { diff --git a/pkg/cloudbroker/sep/del_consumer_nodes.go b/pkg/cloudbroker/sep/del_consumer_nodes.go index 2bd0869..d59f577 100644 --- a/pkg/cloudbroker/sep/del_consumer_nodes.go +++ b/pkg/cloudbroker/sep/del_consumer_nodes.go @@ -11,11 +11,11 @@ import ( type DelConsumerNodesRequest struct { // Storage endpoint provider ID // Required: true - SEPID uint64 `url:"sep_id"` + SEPID uint64 `url:"sep_id" json:"sep_id"` // List of consumer node IDs // Required: true - ConsumerNIDs []uint64 `url:"consumer_nids"` + ConsumerNIDs []uint64 `url:"consumer_nids" json:"consumer_nids"` } func (srq DelConsumerNodesRequest) validate() error { diff --git a/pkg/cloudbroker/sep/delete.go b/pkg/cloudbroker/sep/delete.go index 1a18a3e..3fb4529 100644 --- a/pkg/cloudbroker/sep/delete.go +++ b/pkg/cloudbroker/sep/delete.go @@ -11,7 +11,7 @@ import ( type DeleteRequest struct { // Storage endpoint provider ID // Required: true - SEPID uint64 `url:"sep_id"` + SEPID uint64 `url:"sep_id" json:"sep_id"` } func (srq DeleteRequest) validate() error { diff --git a/pkg/cloudbroker/sep/disable.go b/pkg/cloudbroker/sep/disable.go index bea1a69..87b4678 100644 --- a/pkg/cloudbroker/sep/disable.go +++ b/pkg/cloudbroker/sep/disable.go @@ -11,7 +11,7 @@ import ( type DisableRequest struct { // Storage endpoint provider ID // Required: true - SEPID uint64 `url:"sep_id"` + SEPID uint64 `url:"sep_id" json:"sep_id"` } func (srq DisableRequest) validate() error { diff --git a/pkg/cloudbroker/sep/disk_list.go b/pkg/cloudbroker/sep/disk_list.go index c73c9f7..ffcf96d 100644 --- a/pkg/cloudbroker/sep/disk_list.go +++ b/pkg/cloudbroker/sep/disk_list.go @@ -11,11 +11,11 @@ import ( type DiskListRequest struct { // Storage endpoint provider ID // Required: true - SEPID uint64 `url:"sep_id"` + SEPID uint64 `url:"sep_id" json:"sep_id"` // Pool name // Required: false - PoolName string `url:"pool_name,omitempty"` + PoolName string `url:"pool_name,omitempty" json:"pool_name,omitempty"` } func (srq DiskListRequest) validate() error { diff --git a/pkg/cloudbroker/sep/enable.go b/pkg/cloudbroker/sep/enable.go index 5e6c20d..ea21b2c 100644 --- a/pkg/cloudbroker/sep/enable.go +++ b/pkg/cloudbroker/sep/enable.go @@ -11,7 +11,7 @@ import ( type EnableRequest struct { // Storage endpoint provider ID // Required: true - SEPID uint64 `url:"sep_id"` + SEPID uint64 `url:"sep_id" json:"sep_id"` } func (srq EnableRequest) validate() error { diff --git a/pkg/cloudbroker/sep/get.go b/pkg/cloudbroker/sep/get.go index 121a5ab..b82e8aa 100644 --- a/pkg/cloudbroker/sep/get.go +++ b/pkg/cloudbroker/sep/get.go @@ -11,7 +11,7 @@ import ( type GetRequest struct { // Storage endpoint provider ID // Required: true - SEPID uint64 `url:"sep_id"` + SEPID uint64 `url:"sep_id" json:"sep_id"` } func (srq GetRequest) validate() error { diff --git a/pkg/cloudbroker/sep/get_config.go b/pkg/cloudbroker/sep/get_config.go index b9792f6..02382ca 100644 --- a/pkg/cloudbroker/sep/get_config.go +++ b/pkg/cloudbroker/sep/get_config.go @@ -11,7 +11,7 @@ import ( type GetConfigRequest struct { // Storage endpoint provider ID // Required: true - SEPID uint64 `url:"sep_id"` + SEPID uint64 `url:"sep_id" json:"sep_id"` } func (srq GetConfigRequest) validate() error { diff --git a/pkg/cloudbroker/sep/get_pool.go b/pkg/cloudbroker/sep/get_pool.go index 85867dc..6a9dd9a 100644 --- a/pkg/cloudbroker/sep/get_pool.go +++ b/pkg/cloudbroker/sep/get_pool.go @@ -11,11 +11,11 @@ import ( type GetPoolRequest struct { // Storage endpoint provider ID // Required: true - SEPID uint64 `url:"sep_id"` + SEPID uint64 `url:"sep_id" json:"sep_id"` // Pool name // Required: true - PoolName string `url:"pool_name"` + PoolName string `url:"pool_name" json:"pool_name"` } func (srq GetPoolRequest) validate() error { diff --git a/pkg/cloudbroker/sep/list.go b/pkg/cloudbroker/sep/list.go index 5d09cda..91682d9 100644 --- a/pkg/cloudbroker/sep/list.go +++ b/pkg/cloudbroker/sep/list.go @@ -10,11 +10,11 @@ import ( type ListRequest struct { // Page size // Required: false - Size uint64 `url:"size,omitempty"` + Size uint64 `url:"size,omitempty" json:"size,omitempty"` // Page number // Required: false - Page uint64 `url:"page,omitempty"` + Page uint64 `url:"page,omitempty" json:"page,omitempty"` } // List gets list of SEPs diff --git a/pkg/cloudbroker/sep/update_capacity_limit.go b/pkg/cloudbroker/sep/update_capacity_limit.go index 0228fa4..c7a1394 100644 --- a/pkg/cloudbroker/sep/update_capacity_limit.go +++ b/pkg/cloudbroker/sep/update_capacity_limit.go @@ -11,7 +11,7 @@ import ( type UpdateCapacityLimitRequest struct { // Storage endpoint provider ID // Required: true - SEPID uint64 `url:"sep_id"` + SEPID uint64 `url:"sep_id" json:"sep_id"` } func (srq UpdateCapacityLimitRequest) validate() error { diff --git a/pkg/cloudbroker/tasks/get.go b/pkg/cloudbroker/tasks/get.go index 3c60cee..7ddefc4 100644 --- a/pkg/cloudbroker/tasks/get.go +++ b/pkg/cloudbroker/tasks/get.go @@ -11,7 +11,7 @@ import ( type GetRequest struct { // ID of audit GUID // Required: true - AuditID string `url:"auditId"` + AuditID string `url:"auditId" json:"auditId"` } func (trq GetRequest) validate() error { diff --git a/pkg/cloudbroker/tasks/list.go b/pkg/cloudbroker/tasks/list.go index a853515..89a753c 100644 --- a/pkg/cloudbroker/tasks/list.go +++ b/pkg/cloudbroker/tasks/list.go @@ -10,11 +10,11 @@ import ( type ListRequest struct { // Page number // Required: false - Page uint64 `url:"page,omitempty"` + Page uint64 `url:"page,omitempty" json:"page,omitempty"` // Page size // Required: false - Size uint64 `url:"size,omitempty"` + Size uint64 `url:"size,omitempty" json:"size,omitempty"` } // List gets list user API task with status PROCESSING diff --git a/pkg/cloudbroker/vins/audits.go b/pkg/cloudbroker/vins/audits.go index 009071c..14f13ac 100644 --- a/pkg/cloudbroker/vins/audits.go +++ b/pkg/cloudbroker/vins/audits.go @@ -11,7 +11,7 @@ import ( type AuditsRequest struct { // ID of the VINS // Required: true - VINSID uint64 `url:"vinsId"` + VINSID uint64 `url:"vinsId" json:"vinsId"` } func (vrq AuditsRequest) validate() error { diff --git a/pkg/cloudbroker/vins/create_in_account.go b/pkg/cloudbroker/vins/create_in_account.go index 169af70..ad12d41 100644 --- a/pkg/cloudbroker/vins/create_in_account.go +++ b/pkg/cloudbroker/vins/create_in_account.go @@ -11,31 +11,31 @@ import ( type CreateInAccountRequest struct { // VINS name // Required: true - Name string `url:"name"` + Name string `url:"name" json:"name"` // ID of account // Required: true - AccountID uint64 `url:"accountId"` + AccountID uint64 `url:"accountId" json:"accountId"` // Grid ID // Required: false - GID uint64 `url:"gid,omitempty"` + GID uint64 `url:"gid,omitempty" json:"gid,omitempty"` // Private network IP CIDR // Required: false - IPCIDR string `url:"ipcidr,omitempty"` + IPCIDR string `url:"ipcidr,omitempty" json:"ipcidr,omitempty"` // Description // Required: false - Description string `url:"desc,omitempty"` + Description string `url:"desc,omitempty" json:"desc,omitempty"` // Number of pre created reservations // Required: false - PreReservationsNum uint64 `url:"preReservationsNum,omitempty"` + PreReservationsNum uint64 `url:"preReservationsNum,omitempty" json:"preReservationsNum,omitempty"` // Reason for action // Required: false - Reason string `url:"reason,omitempty"` + Reason string `url:"reason,omitempty" json:"reason,omitempty"` } func (vrq CreateInAccountRequest) validate() error { diff --git a/pkg/cloudbroker/vins/create_in_rg.go b/pkg/cloudbroker/vins/create_in_rg.go index 47193a9..0d350fb 100644 --- a/pkg/cloudbroker/vins/create_in_rg.go +++ b/pkg/cloudbroker/vins/create_in_rg.go @@ -11,35 +11,35 @@ import ( type CreateInRGRequest struct { // VINS name // Required: true - Name string `url:"name"` + Name string `url:"name" json:"name"` // Resource group ID // Required: true - RGID uint64 `url:"rgId"` + RGID uint64 `url:"rgId" json:"rgId"` // Private network IP CIDR // Required: false - IPCIDR string `url:"ipcidr,omitempty"` + IPCIDR string `url:"ipcidr,omitempty" json:"ipcidr,omitempty"` // External network ID // Required: false - ExtNetID uint64 `url:"extNetId,omitempty"` + ExtNetID uint64 `url:"extNetId,omitempty" json:"extNetId,omitempty"` // External IP, related only for extNetId >= 0 // Required: false - ExtIP string `url:"extIp,omitempty"` + ExtIP string `url:"extIp,omitempty" json:"extIp,omitempty"` // Description // Required: false - Description string `url:"desc,omitempty"` + Description string `url:"desc,omitempty" json:"desc,omitempty"` // Number of pre created reservations // Required: false - PreReservationsNum uint `url:"preReservationsNum,omitempty"` + PreReservationsNum uint `url:"preReservationsNum,omitempty" json:"preReservationsNum,omitempty"` // Reason for action // Required: false - Reason string `url:"reason,omitempty"` + Reason string `url:"reason,omitempty" json:"reason,omitempty"` } func (vrq CreateInRGRequest) validate() error { diff --git a/pkg/cloudbroker/vins/default_qos_update.go b/pkg/cloudbroker/vins/default_qos_update.go index 63b457c..43f1a68 100644 --- a/pkg/cloudbroker/vins/default_qos_update.go +++ b/pkg/cloudbroker/vins/default_qos_update.go @@ -11,19 +11,19 @@ import ( type DefaultQOSUpdateRequest struct { // ID of VINS // Required: true - VINSID uint64 `url:"vinsId"` + VINSID uint64 `url:"vinsId" json:"vinsId"` // Internal traffic, kbit // Required: false - IngressRate uint64 `url:"ingress_rate,omitempty"` + IngressRate uint64 `url:"ingress_rate,omitempty" json:"ingress_rate,omitempty"` // Internal traffic burst, kbit // Required: false - IngressBirst uint64 `url:"ingress_birst,omitempty"` + IngressBirst uint64 `url:"ingress_birst,omitempty" json:"ingress_birst,omitempty"` // External traffic rate, kbit // Required: false - EgressRate uint64 `url:"egress_rate,omitempty"` + EgressRate uint64 `url:"egress_rate,omitempty" json:"egress_rate,omitempty"` } func (vrq DefaultQOSUpdateRequest) validate() error { diff --git a/pkg/cloudbroker/vins/delete.go b/pkg/cloudbroker/vins/delete.go index 4d5ff62..7b15b64 100644 --- a/pkg/cloudbroker/vins/delete.go +++ b/pkg/cloudbroker/vins/delete.go @@ -11,23 +11,23 @@ import ( type DeleteRequest struct { // VINS ID // Required: true - VINSID uint64 `url:"vinsId"` + VINSID uint64 `url:"vinsId" json:"vinsId"` // Set to True if you want force delete non-empty VINS. // Primarily, VINS is considered non-empty if it has virtual machines connected to it, // and force flag will detach them from the VINS being deleted. // Otherwise method will return an error // Required: false - Force bool `url:"force,omitempty"` + Force bool `url:"force,omitempty" json:"force,omitempty"` // Set to True if you want to destroy VINS and all linked resources, if any, immediately. // Otherwise, they will be placed into recycle bin and could be restored later within the recycle bin's purge period // Required: false - Permanently bool `url:"permanently,omitempty"` + Permanently bool `url:"permanently,omitempty" json:"permanently,omitempty"` // Reason for action // Required: false - Reason string `url:"reason,omitempty"` + Reason string `url:"reason,omitempty" json:"reason,omitempty"` } func (vrq DeleteRequest) validate() error { diff --git a/pkg/cloudbroker/vins/disable.go b/pkg/cloudbroker/vins/disable.go index 12a5770..f46f0ae 100644 --- a/pkg/cloudbroker/vins/disable.go +++ b/pkg/cloudbroker/vins/disable.go @@ -11,11 +11,11 @@ import ( type DisableRequest struct { // VINS ID // Required: true - VINSID uint64 `url:"vinsId"` + VINSID uint64 `url:"vinsId" json:"vinsId"` // Reason for action // Required: false - Reason string `url:"reason,omitempty"` + Reason string `url:"reason,omitempty" json:"reason,omitempty"` } func (vrq DisableRequest) validate() error { diff --git a/pkg/cloudbroker/vins/enable.go b/pkg/cloudbroker/vins/enable.go index f4e0500..69d54ec 100644 --- a/pkg/cloudbroker/vins/enable.go +++ b/pkg/cloudbroker/vins/enable.go @@ -11,11 +11,11 @@ import ( type EnableRequest struct { // VINS ID // Required: true - VINSID uint64 `url:"vinsId"` + VINSID uint64 `url:"vinsId" json:"vinsId"` // Reason for action // Required: false - Reason string `url:"reason,omitempty"` + Reason string `url:"reason,omitempty" json:"reason,omitempty"` } func (vrq EnableRequest) validate() error { diff --git a/pkg/cloudbroker/vins/extnet_connect.go b/pkg/cloudbroker/vins/extnet_connect.go index 09b9286..7c7d91f 100644 --- a/pkg/cloudbroker/vins/extnet_connect.go +++ b/pkg/cloudbroker/vins/extnet_connect.go @@ -11,19 +11,19 @@ import ( type ExtNetConnectRequest struct { // VINS ID // Required: true - VINSID uint64 `url:"vinsId"` + VINSID uint64 `url:"vinsId" json:"vinsId"` // External network ID // Required: true - NetID uint64 `url:"netId"` + NetID uint64 `url:"netId" json:"netId"` // Directly set IP address // Required: false - IP string `url:"ip,omitempty"` + IP string `url:"ip,omitempty" json:"ip,omitempty"` // Reason for action // Required: false - Reason string `url:"reason,omitempty"` + Reason string `url:"reason,omitempty" json:"reason,omitempty"` } func (vrq ExtNetConnectRequest) validate() error { diff --git a/pkg/cloudbroker/vins/extnet_disconnect.go b/pkg/cloudbroker/vins/extnet_disconnect.go index bc2bef3..cf5d0f0 100644 --- a/pkg/cloudbroker/vins/extnet_disconnect.go +++ b/pkg/cloudbroker/vins/extnet_disconnect.go @@ -11,11 +11,11 @@ import ( type ExtNetDisconnectRequest struct { // VINS ID // Required: true - VINSID uint64 `url:"vinsId"` + VINSID uint64 `url:"vinsId" json:"vinsId"` // Reason for action // Required: false - Reason string `url:"reason,omitempty"` + Reason string `url:"reason,omitempty" json:"reason,omitempty"` } func (vrq ExtNetDisconnectRequest) validate() error { diff --git a/pkg/cloudbroker/vins/extnet_list.go b/pkg/cloudbroker/vins/extnet_list.go index 9fd8b66..123bd74 100644 --- a/pkg/cloudbroker/vins/extnet_list.go +++ b/pkg/cloudbroker/vins/extnet_list.go @@ -11,11 +11,11 @@ import ( type ExtNetListRequest struct { // VINS ID // Required: true - VINSID uint64 `url:"vinsId"` + VINSID uint64 `url:"vinsId" json:"vinsId"` // Reason for action // Required: false - Reason string `url:"reason,omitempty"` + Reason string `url:"reason,omitempty" json:"reason,omitempty"` } func (vrq ExtNetListRequest) validate() error { diff --git a/pkg/cloudbroker/vins/get.go b/pkg/cloudbroker/vins/get.go index ec6ca98..fbd9913 100644 --- a/pkg/cloudbroker/vins/get.go +++ b/pkg/cloudbroker/vins/get.go @@ -11,11 +11,11 @@ import ( type GetRequest struct { // VINS ID // Required: true - VINSID uint64 `url:"vinsId"` + VINSID uint64 `url:"vinsId" json:"vinsId"` // Reason for action // Required: false - Reason string `url:"reason,omitempty"` + Reason string `url:"reason,omitempty" json:"reason,omitempty"` } func (vrq GetRequest) validate() error { diff --git a/pkg/cloudbroker/vins/ip_list.go b/pkg/cloudbroker/vins/ip_list.go index 9502c54..d2651f0 100644 --- a/pkg/cloudbroker/vins/ip_list.go +++ b/pkg/cloudbroker/vins/ip_list.go @@ -11,7 +11,7 @@ import ( type IPListRequest struct { // VINS ID // Required: true - VINSID uint64 `url:"vinsId"` + VINSID uint64 `url:"vinsId" json:"vinsId"` } func (vrq IPListRequest) validate() error { diff --git a/pkg/cloudbroker/vins/ip_release.go b/pkg/cloudbroker/vins/ip_release.go index 52b5624..41d4300 100644 --- a/pkg/cloudbroker/vins/ip_release.go +++ b/pkg/cloudbroker/vins/ip_release.go @@ -11,15 +11,15 @@ import ( type IPReleaseRequest struct { // VINS ID // Required: true - VINSID uint64 `url:"vinsId"` + VINSID uint64 `url:"vinsId" json:"vinsId"` // IP address // Required: false - IPAddr string `url:"ipAddr,omitempty"` + IPAddr string `url:"ipAddr,omitempty" json:"ipAddr,omitempty"` // MAC address // Required: false - MAC string `url:"mac,omitempty"` + MAC string `url:"mac,omitempty" json:"mac,omitempty"` } func (vrq IPReleaseRequest) validate() error { diff --git a/pkg/cloudbroker/vins/ip_reserve.go b/pkg/cloudbroker/vins/ip_reserve.go index 44a2d2e..814d137 100644 --- a/pkg/cloudbroker/vins/ip_reserve.go +++ b/pkg/cloudbroker/vins/ip_reserve.go @@ -13,7 +13,7 @@ import ( type IPReserveRequest struct { // VINS ID // Required: true - VINSID uint64 `url:"vinsId"` + VINSID uint64 `url:"vinsId" json:"vinsId"` // Type of the reservation // Should be one of: @@ -21,27 +21,27 @@ type IPReserveRequest struct { // - VIP // - EXCLUDE // Required: true - Type string `url:"type"` + Type string `url:"type" json:"type"` // IP address to use. Non-empty string is required for type "EXCLUDE". // Ignored for types "DHCP" and "VIP". // Required: false - IPAddr string `url:"ipAddr,omitempty"` + IPAddr string `url:"ipAddr,omitempty" json:"ipAddr,omitempty"` // MAC address to associate with IP reservation. // Ignored for type "EXCLUDE", // non-empty string is required for "DHCP" and "VIP" // Required: false - MAC string `url:"mac,omitempty"` + MAC string `url:"mac,omitempty" json:"mac,omitempty"` // ID of the compute, associated with this reservation of type "DHCP". // Ignored for other types // Required: false - ComputeID uint64 `url:"computeId,omitempty"` + ComputeID uint64 `url:"computeId,omitempty" json:"computeId,omitempty"` // Reason for action // Required: false - Reason string `url:"reason,omitempty"` + Reason string `url:"reason,omitempty" json:"reason,omitempty"` } func (vrq IPReserveRequest) validate() error { diff --git a/pkg/cloudbroker/vins/list.go b/pkg/cloudbroker/vins/list.go index fd46089..03d06c5 100644 --- a/pkg/cloudbroker/vins/list.go +++ b/pkg/cloudbroker/vins/list.go @@ -10,11 +10,11 @@ import ( type ListRequest struct { // Page number // Required: false - Page uint64 `url:"page,omitempty"` + Page uint64 `url:"page,omitempty" json:"page,omitempty"` // Page size // Required: false - Size uint64 `url:"size,omitempty"` + Size uint64 `url:"size,omitempty" json:"size,omitempty"` } // List gets list of VINSes diff --git a/pkg/cloudbroker/vins/list_deleted.go b/pkg/cloudbroker/vins/list_deleted.go index 0a7db50..ae70919 100644 --- a/pkg/cloudbroker/vins/list_deleted.go +++ b/pkg/cloudbroker/vins/list_deleted.go @@ -10,11 +10,11 @@ import ( type ListDeletedRequest struct { // Page number // Required: false - Page uint64 `url:"page,omitempty"` + Page uint64 `url:"page,omitempty" json:"page,omitempty"` // Page size // Required: false - Size uint64 `url:"size,omitempty"` + Size uint64 `url:"size,omitempty" json:"size,omitempty"` } // ListDeleted gets list of deleted VINSes diff --git a/pkg/cloudbroker/vins/mass_delete.go b/pkg/cloudbroker/vins/mass_delete.go index 129e7c5..4026b80 100644 --- a/pkg/cloudbroker/vins/mass_delete.go +++ b/pkg/cloudbroker/vins/mass_delete.go @@ -10,24 +10,24 @@ import ( type MassDeleteRequest struct { // VINS IDs // Required: true - VINSIDs []uint64 `url:"vinsIds"` + VINSIDs []uint64 `url:"vinsIds" json:"vinsIds"` // Set to true if you want force delete non-empty VINS. Primarily, // VINS is considered non-empty if it has VMs connected to it, // and force flag will detach them from the VINS being deleted. // Otherwise method will return an error // Required: false - Force bool `url:"force,omitempty"` + Force bool `url:"force,omitempty" json:"force,omitempty"` // Set to true if you want to destroy VINS and all linked resources, if any, immediately. // Otherwise, they will be placed into recycle bin and could be restored later // within the recycle bins purge period // Required: false - Permanently bool `url:"permanently,omitempty"` + Permanently bool `url:"permanently,omitempty" json:"permanently,omitempty"` // Reason for action // Required: false - Reason string `url:"reason,omitempty"` + Reason string `url:"reason,omitempty" json:"reason,omitempty"` } func (vrq MassDeleteRequest) validate() error { diff --git a/pkg/cloudbroker/vins/mass_disable.go b/pkg/cloudbroker/vins/mass_disable.go index 2f5db84..6b29ed8 100644 --- a/pkg/cloudbroker/vins/mass_disable.go +++ b/pkg/cloudbroker/vins/mass_disable.go @@ -10,11 +10,11 @@ import ( type MassDisableRequest struct { // VINS IDs // Required: true - VINSIDs []uint64 `url:"vinsIds"` + VINSIDs []uint64 `url:"vinsIds" json:"vinsIds"` // Reason for action // Required: false - Reason string `url:"reason,omitempty"` + Reason string `url:"reason,omitempty" json:"reason,omitempty"` } func (vrq MassDisableRequest) validate() error { diff --git a/pkg/cloudbroker/vins/mass_enable.go b/pkg/cloudbroker/vins/mass_enable.go index 38e2e19..4b9b13b 100644 --- a/pkg/cloudbroker/vins/mass_enable.go +++ b/pkg/cloudbroker/vins/mass_enable.go @@ -10,11 +10,11 @@ import ( type MassEnableRequest struct { // VINS IDs // Required: true - VINSIDs []uint64 `url:"vinsIds"` + VINSIDs []uint64 `url:"vinsIds" json:"vinsIds"` // Reason for action // Required: false - Reason string `url:"reason,omitempty"` + Reason string `url:"reason,omitempty" json:"reason,omitempty"` } func (vrq MassEnableRequest) validate() error { diff --git a/pkg/cloudbroker/vins/nat_rule_add.go b/pkg/cloudbroker/vins/nat_rule_add.go index 8bf902c..9a502ad 100644 --- a/pkg/cloudbroker/vins/nat_rule_add.go +++ b/pkg/cloudbroker/vins/nat_rule_add.go @@ -11,34 +11,34 @@ import ( type NATRuleAddRequest struct { // VINS ID // Required: true - VINSID uint64 `url:"vinsId"` + VINSID uint64 `url:"vinsId" json:"vinsId"` // Internal IP address to apply this rule to // Required: true - IntIP string `url:"intIp "` + IntIP string `url:"intIp " json:"intIp "` // Internal IP port number to use for this rule // Required: true - IntPort uint `url:"intPort"` + IntPort uint `url:"intPort" json:"intPort"` // External IP start port to use for this rule // Required: true - ExtPortStart uint `url:"extPortStart"` + ExtPortStart uint `url:"extPortStart" json:"extPortStart"` // External IP end port to use for this rule // Required: false - ExtPortEnd uint `url:"extPortEnd,omitempty"` + ExtPortEnd uint `url:"extPortEnd,omitempty" json:"extPortEnd,omitempty"` // IP protocol type // Should be one of: // - "tcp" // - "udp" // Required: false - Proto string `url:"proto,omitempty"` + Proto string `url:"proto,omitempty" json:"proto,omitempty"` // Reason for action // Required: false - Reason string `url:"reason,omitempty"` + Reason string `url:"reason,omitempty" json:"reason,omitempty"` } func (vrq NATRuleAddRequest) validate() error { diff --git a/pkg/cloudbroker/vins/nat_rule_del.go b/pkg/cloudbroker/vins/nat_rule_del.go index 7eccb7e..75317be 100644 --- a/pkg/cloudbroker/vins/nat_rule_del.go +++ b/pkg/cloudbroker/vins/nat_rule_del.go @@ -11,16 +11,16 @@ import ( type NATRuleDelRequest struct { // VINS ID // Required: true - VINSID uint64 `url:"vinsId"` + VINSID uint64 `url:"vinsId" json:"vinsId"` // ID of the rule to delete. // Pass -1 to clear all rules at once // Required: true - RuleID uint64 `url:"ruleId"` + RuleID uint64 `url:"ruleId" json:"ruleId"` // Reason for action // Required: false - Reason string `url:"reason,omitempty"` + Reason string `url:"reason,omitempty" json:"reason,omitempty"` } func (vrq NATRuleDelRequest) validate() error { diff --git a/pkg/cloudbroker/vins/nat_rule_list.go b/pkg/cloudbroker/vins/nat_rule_list.go index 34131be..3bb91a3 100644 --- a/pkg/cloudbroker/vins/nat_rule_list.go +++ b/pkg/cloudbroker/vins/nat_rule_list.go @@ -11,11 +11,11 @@ import ( type NATRuleListRequest struct { // VINS ID // Required: true - VINSID uint64 `url:"vinsId"` + VINSID uint64 `url:"vinsId" json:"vinsId"` // Reason for action // Required: false - Reason string `url:"reason,omitempty"` + Reason string `url:"reason,omitempty" json:"reason,omitempty"` } func (vrq NATRuleListRequest) validate() error { diff --git a/pkg/cloudbroker/vins/net_qos.go b/pkg/cloudbroker/vins/net_qos.go index 000c29a..9cca46d 100644 --- a/pkg/cloudbroker/vins/net_qos.go +++ b/pkg/cloudbroker/vins/net_qos.go @@ -11,19 +11,19 @@ import ( type NetQOSRequest struct { // VINS ID // Required: true - VINSID uint64 `url:"vinsId"` + VINSID uint64 `url:"vinsId" json:"vinsId"` // Internal traffic, kbit // Required: false - IngressRate uint64 `url:"ingress_rate,omitempty"` + IngressRate uint64 `url:"ingress_rate,omitempty" json:"ingress_rate,omitempty"` // Internal traffic burst, kbit // Required: false - IngressBirst uint64 `url:"ingress_birst,omitempty"` + IngressBirst uint64 `url:"ingress_birst,omitempty" json:"ingress_birst,omitempty"` // External traffic rate, kbit // Required: false - EgressRate uint64 `url:"egress_rate,omitempty"` + EgressRate uint64 `url:"egress_rate,omitempty" json:"egress_rate,omitempty"` } func (vrq NetQOSRequest) validate() error { diff --git a/pkg/cloudbroker/vins/restore.go b/pkg/cloudbroker/vins/restore.go index 42c47a8..d74094f 100644 --- a/pkg/cloudbroker/vins/restore.go +++ b/pkg/cloudbroker/vins/restore.go @@ -11,11 +11,11 @@ import ( type RestoreRequest struct { // VINS ID // Required: true - VINSID uint64 `url:"vinsId"` + VINSID uint64 `url:"vinsId" json:"vinsId"` // Reason for action // Required: false - Reason string `url:"reason,omitempty"` + Reason string `url:"reason,omitempty" json:"reason,omitempty"` } func (vrq RestoreRequest) validate() error { diff --git a/pkg/cloudbroker/vins/search.go b/pkg/cloudbroker/vins/search.go index ffdf1f9..59b68e5 100644 --- a/pkg/cloudbroker/vins/search.go +++ b/pkg/cloudbroker/vins/search.go @@ -10,23 +10,23 @@ import ( type SearchRequest struct { // ID of the account to search for the ViNSes // Required: false - AccountID uint64 `url:"accountId,omitempty"` + AccountID uint64 `url:"accountId,omitempty" json:"accountId,omitempty"` // ID of the resource group to limit search to the specified RG level only // Required: false - RGID uint64 `url:"rgId,omitempty"` + RGID uint64 `url:"rgId,omitempty" json:"rgId,omitempty"` // Name of the ViNS to search for // Required: false - Name string `url:"name,omitempty"` + Name string `url:"name,omitempty" json:"name,omitempty"` // If False, then VINSes having one of the statuses are not listed for // Required: false - ShowAll bool `url:"show_all,omitempty"` + ShowAll bool `url:"show_all,omitempty" json:"show_all,omitempty"` // Reason for action // Required: false - Reason string `url:"reason,omitempty"` + Reason string `url:"reason,omitempty" json:"reason,omitempty"` } // Search search VINSes diff --git a/pkg/cloudbroker/vins/vnfdev_redeploy.go b/pkg/cloudbroker/vins/vnfdev_redeploy.go index 2ad51bb..1f42ddf 100644 --- a/pkg/cloudbroker/vins/vnfdev_redeploy.go +++ b/pkg/cloudbroker/vins/vnfdev_redeploy.go @@ -11,11 +11,11 @@ import ( type VNFDevRedeployRequest struct { // VINS ID // Required: true - VINSID uint64 `url:"vinsId"` + VINSID uint64 `url:"vinsId" json:"vinsId"` // Reason for action // Required: false - Reason string `url:"reason,omitempty"` + Reason string `url:"reason,omitempty" json:"reason,omitempty"` } func (vrq VNFDevRedeployRequest) validate() error { diff --git a/pkg/cloudbroker/vins/vnfdev_reset.go b/pkg/cloudbroker/vins/vnfdev_reset.go index 4134607..d94a923 100644 --- a/pkg/cloudbroker/vins/vnfdev_reset.go +++ b/pkg/cloudbroker/vins/vnfdev_reset.go @@ -11,11 +11,11 @@ import ( type VNFDevResetRequest struct { // VINS ID // Required: true - VINSID uint64 `url:"vinsId"` + VINSID uint64 `url:"vinsId" json:"vinsId"` // Reason for action // Required: false - Reason string `url:"reason,omitempty"` + Reason string `url:"reason,omitempty" json:"reason,omitempty"` } func (vrq VNFDevResetRequest) validate() error { diff --git a/pkg/cloudbroker/vins/vnfdev_restart.go b/pkg/cloudbroker/vins/vnfdev_restart.go index 0b1da26..4280168 100644 --- a/pkg/cloudbroker/vins/vnfdev_restart.go +++ b/pkg/cloudbroker/vins/vnfdev_restart.go @@ -11,11 +11,11 @@ import ( type VNFDevRestartRequest struct { // VINS ID // Required: true - VINSID uint64 `url:"vinsId"` + VINSID uint64 `url:"vinsId" json:"vinsId"` // Reason for action // Required: fal - Reason string `url:"reason,omitempty"` + Reason string `url:"reason,omitempty" json:"reason,omitempty"` } func (vrq VNFDevRestartRequest) validate() error { diff --git a/pkg/cloudbroker/vins/vnfdev_start.go b/pkg/cloudbroker/vins/vnfdev_start.go index 21a4ae2..32c51db 100644 --- a/pkg/cloudbroker/vins/vnfdev_start.go +++ b/pkg/cloudbroker/vins/vnfdev_start.go @@ -11,11 +11,11 @@ import ( type VNFDevStartRequest struct { // VINS ID // Required: true - VINSID uint64 `url:"vinsId"` + VINSID uint64 `url:"vinsId" json:"vinsId"` // Reason for action // Required: false - Reason string `url:"reason,omitempty"` + Reason string `url:"reason,omitempty" json:"reason,omitempty"` } func (vrq VNFDevStartRequest) validate() error { diff --git a/pkg/cloudbroker/vins/vnfdev_stop.go b/pkg/cloudbroker/vins/vnfdev_stop.go index a13b006..3281d9d 100644 --- a/pkg/cloudbroker/vins/vnfdev_stop.go +++ b/pkg/cloudbroker/vins/vnfdev_stop.go @@ -11,11 +11,11 @@ import ( type VNFDevStopRequest struct { // VINS ID // Required: true - VINSID uint64 `url:"vinsId"` + VINSID uint64 `url:"vinsId" json:"vinsId"` // Reason for action // Required: true - Reason string `url:"reason,omitempty"` + Reason string `url:"reason,omitempty" json:"reason,omitempty"` } func (vrq VNFDevStopRequest) validate() error {