- Add endpoints GrantAccessTemplates, ListAvailableTemplates, RevokeAccessTemplates in cloudbroker/account
- Add SortBy field for list groups and validation functionality
- Add ComputeFeatures field to RecordAccount and ItemAccount models in cloudapi/account
- Add ComputeFeatures field to InfoAccount and CreateRequest model in cloudbroker/account
- Add UpdateComputeFeatures endpoint in cloudbroker/account
- Add ExtnetId, FreeIPs fields to model ItemVINS in cloudapi/account and cloudbroker/account
#### audit:
- Add field GUID in model ItemLinkedJobs cloudbroker/audit
- Delete field StatusCode in model ListRequest cloudbroker/audit
- Add fields MinStatusCode and MaxStatusCode in model ListRequest cloudbroker/audit
#### bservice:
- Add validation of RAM to be divisible by 128 in cloudapi/bservice
#### compute:
- Add field CdImageId in models ItemCompute and RecordCompute in cloudapi/compute and cloudbroker/compute
- Add fields NatableVINSID, NatableVINSIP, NatableVINSName, NatableVINSNetwork, NatableVINSNetworkName in models RecordCompute in cloudbroker/compute
- Set field LocalBasePort in model PFWAddRequest as optional in cloudapi/compute and cloudbroker/compute
- Add SortBy field for list groups and validation functionality
- Add HPBacked, CPUPin, NumaAffinity fields to RecordCompute and InfoCompute models in cloudbroker/compute
- Add HPBacked, CPUPin, NumaAffinity fields to RecordCompute and ItemCompute models in cloudapi/compute
- Add validation of RAM to be divisible by 128 in cloudapi/compute and cloudbroker/compute
- Add field NumaNodeId in models RecordCompute and ItemCompute in cloudapi/compute and cloudbroker/compute
- Add BootDiskSet endpoints in cloudapi/compute and cloudbroker/compute
- Add endpoints DiskSwitchToReplication, DiskMigrate in cloudapi/compute and cloudbroker/compute
- Add field Replication in model RecordCompute.Disks.ItemComputeDisk in cloudapi/compute and cloudbroker/compute
- Add endpoint getCustomFields in cloudbroker/compute
- Delete field AffinityLabel in model AffinityRelationsRequest in cloudbroker/compute
- Add fields ImageName and VirtualImageName, delete VINSConnected fields in RecordCompute model in cloudbroker/compute
- Add fields Enabled and NodeID in ItemInterface model in cloudbroker/compute. Add NodeID field in ItemVNFInterface model in cloudapi/compute
#### disks:
- Add endpoints Replicate, ReplicationResume, ReplicationReverse, ReplicationStart, ReplicationStop, ReplicationStatus, ReplicationSuspend in cloudapi/disks and cloudbroker/disks
- Add field Replication in models RecordDisk and ItemDisk in cloudapi/disks and cloudbroker/disks
- Add CreateTemplateFromBlank and CreateTemplateFromBlankAsync endpoints in cloudapi/compute and cloudbroker/compute
- Add fields Page and Size in model SearchRequest in cloudapi/disks
- Add FromPlatformDisk and FromPlatformDiskAsync endpoints in cloudapi/disks and cloudbroker/disks
#### flipgroup:
- Add fields ConnId, Status, AccountId to model ListRequest in cloudapi/flipgroup and cloudbroker/flipgroup
- Add SortBy field for list groups and validation functionality
#### grid:
- Add endpoints addCustomBackupPath, removeCustomBackupPath, setPasswordPolicy in cloudbroker/grid
#### image:
- Add field CdPresentedTo in model RecordImage in cloudapi/image cloudbroker/image
- Set field AccountId in CreateRequest in cloudapi/image as required
- Add endpoints GrantAccess, RevokeAccess in cloudbroker/image
- Add SortBy field for list groups and validation functionality
- Add field NetworkInterfaceNaming in model CreateRequest in cloudapi/image cloudbroker/image, in model EditRequest in cloudbroker/image, in models ItemImage and RecordImage in cloudapi/image and cloudbroker/image
- Add validation field NetworkInterfaceNaming in cloudapi/image cloudbroker/image
- Delete field GID in model CreateRequest in cloudapi/image
- Delete field Meta and Ckey in model and RecordImage in cloudbroker/image
- Add model ItemImage in cloudbroker/image
#### k8s:
- Add field LbSysctlParams in model CreateRequest in cloudapi/k8s/create and cloudbroker/k8s/create
- Add validation of RAM to be divisible by 128 in cloudapi/k8s and cloudbroker/k8s
- Set uint64 as MasterRAM and WorkerRAM types in CreateRequest struct in cloudapi/k8s and cloudbroker/k8s
#### kvmppc
- Add validation of RAM to be divisible by 128 in cloudapi/kvmppc and cloudbroker/kvmppc
- Add DataDisks field to CreateRequest and CreateBlankRequest in cloudapi/kvmppc and cloudbroker/kvmppc
- Add DataDisks field to MassCreateRequest in cloudbroker/kvmppc
#### kvmx86
- Add validation of RAM to be divisible by 128 in cloudapi/kvmx86 and cloudbroker/kvmx86
- Add DataDisks field to CreateRequest and CreateBlankRequest in cloudapi/kvmx86 and cloudbroker/kvmx86
- Add DataDisks field to MassCreateRequest in cloudbroker/kvmx86
#### lb:
- Add fields UserManaged, ManagerId, ManagerType, PartK8S in models RecordLB, ItemLBList in cloudapi/lb and cloudbroker/lb
- Add SortBy field for list groups and validation functionality
- Add field SysctlParams in model CreateRequest in cloudapi/lb/create and cloudbroker/lb/create
- Add endpoint update_sysctl_params in cloudapi/lb and cloudbroker/lb
- Add IDs method and Filters methods for ListNodes structure in cloudbroker/node
- Add Serialize method for ListNodes, ItemNode and RecordNode structures in cloudbroker/node
#### pcidevice:
- Add List, ListRaw endpoints in cloudapi/pcidevice
- Add IDs and Serialize methods for ListPCIDevices structure in cloudapi/pcidevice
#### rg:
- Add ComputeFeatures field to ItemResourceGroup and RecordResourceGroup models in cloudapi/rg
- Add ComputeFeatures field to ItemRG and CreateRequest models in cloudbroker/rg
- Add UpdateComputeFeatures endpoint in cloudbroker/rg
- Add ExtnetId, FreeIPs fields to model ItemVINS in cloudapi/rg and cloudbroker/rg
#### sep:
- Add endpoints addPool, delPool in cloudbroker/sep
- Set field Config in CreateRequest as required in cloudbroker/sep
- Add SortBy field for list groups and validation functionality
#### stack:
- Add endpoints getLogicalCoresCount, setCpuAllocationRatio, setMemAllocationRatio in cloudbroker/stack
#### tasks:
- Add field TaskId, Status, Completed in model ListRequest in cloudapi/task and cloudbroker/task
- Add fields GUID, UpdatedBy in model ItemTask in cloudapi/task and cloudbroker/task
- Fix panic in List endpoints in cloudapi/task and cloudbroker/task
- Change type field Result from int to interface{} in models RecordAsyncTask, ItemAsyncTask in cloudapi/task and models ItemTask, RecordTask in cloudbroker/task
- Add methods ID(), Name(), ToString(), ToMaps() for processing the value of the Result field in model ItemTask in cloudapi/task and cloudbroker/task
- Add use case examples for the above methods in README.md
- Add SortBy field for list groups and validation functionality
- Add fields UpdateTimeAt and UpdateTimeTo in model ListRequest in cloudapi/tasks and cloudbroker/tasks
#### user:
- Add fields Call, StatusCode, TimestampAt, TimestampTo in models GetAuditRequest in cloudbroker/user
- Fix return value in GetAudit endpoint in cloudbroker/user
- Add model ListAudits and change type field APIAccess in model ItemUser in cloudbroker/user
- Add SortBy field for list groups and validation functionality in cloudbroker/user
- Add IDs method for ListVFPool, VFSInfoListand in cloudapi/vfpool and cloudbroker/vfpool
- Add Filters methods for ListVFPool structure in cloudapi/vfpool and cloudbroker/vfpool
- Add Serialize method for ListVFPool, ItemVFPool and RecordVFPool structures in cloudapi/vfpool and cloudbroker/vfpool
#### vins:
- Set field IntPort in model NATRuleAddRequest as optional in cloudapi/vins and cloudbroker/vins
- Add SortBy field for list groups and validation functionality
- Add ExtnetId, FreeIPs fields to model ItemVINS in cloudapi/vins and cloudbroker/vins
- Add DNSList field to models CreateInAccountRequest and CreateInRGRequest in cloudapi/vins and cloudbroker/vins
- Add DNSApply endpoints in cloudapi/vins and cloudbroker/vins
- Add field NodeID in model RecordVINS.RecordVNFDev.Interfaces in cloudapi/vins and cloudbroker/vins
- Add NumaAffinity, CPUPin and HPBacked fields to model CreateRequest in cloudapi/kvmx86 and cloudbroker/kvmx86
- Add NumaAffinity, CPUPin and HPBacked fields to model UpdateRequest in cloudapi/compute and cloudbroker/compute
- Add ReservedNodeCpus field to models ItemCompute, RecordCompute in cloudapi/compute and to models ItemCompute, InfoCompute in cloudbroker/compute
- Add VFNIC as possible NetType value in Interfaces field in model CreateRequest in cloudapi/kvmx86 and cloudbroker/kvmx86
- Add VFNIC as possible NetType value in model NetAttachRequest in cloudapi/compute and cloudbroker/compute
- Add WithoutBootDisk field to models CreateRequest, CreateBlankRequest, MassCreateRequest in cloudapi/kvmx86 and cloudbroker/kvmx86
- Set optional fields BootDisk, SEPID, Pool in model CreateBlankRequest in cloudapi/kvmx86 and cloudbroker/kvmx86
- Set optional field ImageID in model CreateRequest in cloudapi/kvmx86 and cloudbroker/kvmx86
- Add field VNFDevID in models ListRequest (cloudbrocker/vins/list) and ListDeletedRequest (cloudapi/vins/list_deleted)
- Add new endpoints /cloudbroker/disks/present and /cloudbroker/disks/depresent
- Add field AuditID in model ListRequest (cloudbrocker/tasks/list, cloudapi/tasks/list)
- Add field ClientIDs in model ListRequest (cloudbrocker/flipgroup/list, cloudapi/flipgroup/list)
- Add field Depresent in model StopRequest (cloudbrocker/compute/stop)
- Add new endpoint /cloudbroker/image/uploadImageFile
### Bugfix
#### account:
- Fix wrong json, url field AccountID in model SetCPUAllocationParameterRequest in cloudbroker/account
- Fix wrong json, url field AccountID in model SetCPUAllocationRatioRequest in cloudbroker/account
- Change Start and End fields type from uint64 to float64 in model GetConsumptionRequest in cloudapi/account
#### apiaccess:
- Changed Job and Resmon field types in model CloudBrokerEndpoints in cloudbroker/apiaccess
- Add fields Page and Size in model UserListRequest in cloudbroker/apiaccess
#### bservice:
- Fix url for Disable endpoint in cloudapi/bservice
#### compute:
- Fix Entrycount tag inmodel ListComputes in cloudbroker/compute
- Add field Name in model ListPCIDeviceRequest in cloudbroker/compute
- Fix type of field Data in model ListPCIDevices in cloudapi/compute
- Add model ItemPCIDevice in cloudapi/compute
- Fix type of field Data in model ListVGPUs in cloudapi/compute and cloudbroker/compute
- Add model ItemVGPU in cloudapi/compute and cloudbroker/compute
#### disks:
- Delete tag required from field Detailed in ListTypesRequest model in cloudapi/disks
#### grid:
- Fix json, url tags in field Name in model RenameRequest in cloudbroker/grid
#### image:
- Fix url for ComputeCIUnset endpoint in cloudbroker/image
#### k8ci:
- Delete omitempty from json, url tags in field Permanently in model DeleteRequest in cloudbroker/k8ci
- Fix wrong json, url tags field ByID in model ListDeletedRequest in cloudbroker/k8ci
- Fix allowed network plugin value from "weawenet" to "weavenet" in validators for cloudbroker/k8ci
#### k8s:
- Fix allowed network plugin value from "weawenet" to "weavenet" in validators for cloudapi/k8s, cloudbroker/k8s
#### lb:
- Fix wrong json, url tags field AccountID in model ListDeletedRequest in cloudapi/lb
- Add field Safe in model RestartRequest in cloudbroker/lb
- Fix wrong json, url tags field AccountID in models ListRequest, ListDeletedRequest in cloudbroker/lb
- Fix url for Stop endpoint in cloudapi/lb
#### rg:
- Fix wrong json, url field AccountID in model ListLBRequest in cloudapi/rg and cloudbroker/rg
- Fix wrong json, url field UniqPools in model CreateRequest in cloudbroker/rg
#### sep:
- Fix wrong json, url tag in field GID in model ListRequest in cloudbroker/sep
#### user:
- Fix wrong json, url field Password in model ItemUser in cloudbroker/user
- Change ByID field type from uint64 to string in model ListRequest in cloudbroker/user
#### vins:
- Fix wrong json, url tags in models DefaultQOSUpdateRequest and NetQOSRequest in fieldIngressBirst in cloudbroker/vins
- Fix wrong name field ListNatRule to ListNATRule in cloudbroker/vins
- Change the return value of the method ReplicationStatus from interface to string in cloudapi/disks and cloudbroker/disks
- Fix type field Replication in models ItemComputeDisk (cloudapi/compute), ItemDisk (cloudapi/disks, cloudbroker/disks), RecordDisk (cloudapi/disks), InfoDisk (cloudbroker/compute). Add type ItemReplication in models cloudapi/disks, cloudbroker/disks, cloudapi/compute, cloudbroker/compute
- Rename field Async to AsyncMode in cloudapi/compute, cloudbroker/compute, cloudbroker/backup
- Fix url tags in fields UpdateTimeAt and UpdateTimeTo in models ListRequest (cloudapi/tasks/list, cloudbroker/tasks/list)
- Fix type field Completed in models ListRequest (cloudapi/tasks/list, cloudbroker/tasks/list)
- Fix type field Shared in models ListRequest (cloudapi/disk/list, cloudbroker/disk/list)
- Fix type field Shared in models ListDeletedRequest (cloudapi/disk/list_deleted, cloudbroker/disk/list_deleted)
- Fix type field Public, HotResize, Bootable in models ListRequest (cloudapi/image/list, cloudbroker/image/list)
- Fix type field Active, ServiceAccount in model ListRequest (cloudbroker/user/list)
- Change required type and correct description in field ImageID in model MassCreateRequest (cloudbroker/kvmx86/mass_create)
- Delete field AccountID in model ListLBRequest (cloudbroker/rg/listLB, cloudapi/rg/listLB)
1. Тесты находятся по директории `decort-sdk/tests/platform_upgrade`
2. Внутри директории нужно создать и заполнить файл `.env` по аналогии с`.env.template` для доступа к платформе
3. Внутри директории нужно создать и заполнить файл `input.json`, содержащий json с раздела [POST /system/docgenerator/prepareCatalog](https://delta.qa.loc/system/ActorApi?group=system#!/system__docgenerator/post_system_docgenerator_prepareCatalog) (для получения json нажать кнопку Try it Out!) - требуется только для тестов запросов
3. Внутри директории нужно создать и заполнить файл `input.json`, содержащий json с раздела [POST /system/docgenerator/prepareCatalog](https://delta.qa.loc/system/ActorApi?group=system#!/system__docgenerator/post_system_docgenerator_prepareCatalog) (для получения json нажать кнопку Try it Out!) - требуется только для тестов запросов и тестов API методов
Примечание: тесты можно запускать напрямую методами среды разработки либо из командной строки из нужной директории, например командой `go test -v -run <TestName>`, где `<TestName>` - название запускаемого теста.
Примечание 2: все тесты, кроме `TestGetAllPaths` при первом запуске генерируют фал `.log`. При каждом последующем запуске результаты вывода сравниваются с файлом и в случае, если они одинаковы, то в консоль будет выведено `All lines match the log file.`. В противном случае будут выведены различающиеся строки.
## Тесты Raw методов (Get, List)
@ -90,7 +94,7 @@ FAIL
## Тесты API методов
Запустить тест `TestGetAllPaths` в `decort-sdk/tests/platform_upgrade/cloud_test.go`
При наличии подсвеченных ошибок, проверить, что указанные методы API не являются устаревшими (deprecated). В противном случе добавить устаревшие методы в переменную `DEPRECATED_GROUPS` по адресу `decort-sdk/tests/platform_upgrade/utils_url.go`.
При наличии подсвеченных ошибок, проверить, что указанные методы API не являются устаревшими (deprecated). В противном случае добавить устаревшие методы в переменную `DEPRECATED_GROUPS` по адресу `decort-sdk/tests/platform_upgrade/utils_url.go`.
"Compute list: \nPlatform has these fields that golang struct doesn't: [lb mgmt_target mgmt_mac mgmt_slot]\n",
"Compute get: \nPlatform has these fields that golang struct doesn't: [mgmt_target mgmt_mac mgmt_slot lb]\n",
"Disk list: OK",
"Disk get: OK",
"",
"ExtNet get: OK",
"FLIPGroup list: OK",
"",
"",
"Image get: \nPlatform has these fields that golang struct doesn't: [12]\n",
"K8CI list: OK",
"",
"K8S list: OK",
"K8S get: OK",
"LB list: \nPlatform has these fields that golang struct doesn't: [fs.inotify.max_queued_events kernel.kptr_restrict net.ipv4.tcp_congestion_control]\n",
"LB get: \nPlatform has these fields that golang struct doesn't: [kernel.kptr_restrict net.ipv4.tcp_congestion_control fs.inotify.max_queued_events]\n",
"Locations list: OK",
"RG list: OK",
"",
"Sizes list: OK",
"",
"Tasks list: \nPlatform has these fields that golang struct doesn't: [completed guid stage updateTime updatedTime auditId error log status]\n",
"Tasks get: \nPlatform has these fields that golang struct doesn't: [updatedTime completed error updateTime auditId stage status log]\n",
"Path /cloudapi/compute/antiAffinityRuleAdd has following errors: [Field value has different required parameters on the platform and in golang structure]",
"Path /cloudapi/user/setData has following errors: [Field data has different required parameters on the platform and in golang structure]",
"Path /cloudapi/compute/affinityRuleRemove has following errors: [Field value has different required parameters on the platform and in golang structure]",
"Path /cloudapi/compute/createTemplate has following errors: [Platform (3) and golang structure (2) have different amount of fields. Platform has field asyncMode that golang structure doesn't]",
"Path /cloudapi/k8s/create has following errors: [Field oidcCertificate has different type parameters on the platform and in golang structure]",
"Path /cloudapi/disks/fromPlatformDisk has following errors: [Platform (14) and golang structure (13) have different amount of fields. Field drivers has different type parameters on the platform and in golang structure Platform has field asyncMode that golang structure doesn't]",
"Path /cloudapi/compute/affinityRuleAdd has following errors: [Field value has different required parameters on the platform and in golang structure]",
"Path /cloudapi/compute/antiAffinityRuleRemove has following errors: [Field value has different required parameters on the platform and in golang structure]",
"Path /cloudapi/compute/createTemplateFromBlank has following errors: [Platform (11) and golang structure (10) have different amount of fields. Platform has field asyncMode that golang structure doesn't]",
"Path /cloudapi/lb/create has following errors: [Field extnetId has different required parameters on the platform and in golang structure Field vinsId has different required parameters on the platform and in golang structure]",
"Path /cloudapi/image/list has following errors: [Field size has different type parameters on the platform and in golang structure]",
"Path /cloudapi/compute/snapshotDelete has following errors: [Platform (3) and golang structure (2) have different amount of fields. Platform has field asyncMode that golang structure doesn't]"
["Path /cloudbroker/compute/createTemplate has following errors: [Platform (4) and golang structure (3) have different amount of fields. Platform has field asyncMode that golang structure doesn't]","Path /cloudbroker/backup/createDisksBackup has following errors: [Platform (3) and golang structure (2) have different amount of fields. Platform has field asyncMode that golang structure doesn't]","Path /cloudbroker/compute/affinityRuleAdd has following errors: [Field value has different required parameters on the platform and in golang structure]","Path /cloudbroker/apiaccess/update has following errors: [Platform has field apis that golang structure doesn't]","Path /cloudbroker/compute/antiAffinityRuleRemove has following errors: [Field value has different required parameters on the platform and in golang structure]","Path /cloudbroker/compute/snapshotDelete has following errors: [Platform (3) and golang structure (2) have different amount of fields. Platform has field asyncMode that golang structure doesn't]","Path /cloudbroker/backup/restoreDiskFromBackup has following errors: [Platform (5) and golang structure (4) have different amount of fields. Platform has field asyncMode that golang structure doesn't]","Path /cloudbroker/backup/createDiskBackup has following errors: [Platform (4) and golang structure (3) have different amount of fields. Platform has field asyncMode that golang structure doesn't]","Path /cloudbroker/compute/createTemplateFromBlank has following errors: [Platform (11) and golang structure (10) have different amount of fields. Platform has field asyncMode that golang structure doesn't]","Path /cloudbroker/account/setCpuAllocationRatio has following errors: [Field ratio has different required parameters on the platform and in golang structure]","Path /cloudbroker/disks/fromPlatformDisk has following errors: [Platform (14) and golang structure (13) have different amount of fields. Field drivers has different type parameters on the platform and in golang structure Platform has field asyncMode that golang structure doesn't]","Path /cloudbroker/lb/create has following errors: [Field extnetId has different required parameters on the platform and in golang structure Field vinsId has different required parameters on the platform and in golang structure]","Path /cloudbroker/stack/setCpuAllocationRatio has following errors: [Field ratio has different required parameters on the platform and in golang structure]","Path /cloudbroker/backup/deleteDiskBackup has following errors: [Platform (3) and golang structure (2) have different amount of fields. Platform has field asyncMode that golang structure doesn't]","Path /cloudbroker/image/updateNodes has following errors: [Field enabledStacks has different type parameters on the platform and in golang structure]","Path /cloudbroker/stack/setMemAllocationRatio has following errors: [Field ratio has different required parameters on the platform and in golang structure]","Path /cloudbroker/compute/antiAffinityRuleAdd has following errors: [Field value has different required parameters on the platform and in golang structure]","Path /cloudbroker/k8s/create has following errors: [Field oidcCertificate has different type parameters on the platform and in golang structure]","Path /cloudbroker/backup/restoreDisksFromBackup has following errors: [Platform (3) and golang structure (2) have different amount of fields. Platform has field disks that golang structure doesn't Platform has field asyncMode that golang structure doesn't]","Path /cloudbroker/node/enable has following errors: [Platform (4) and golang structure (3) have different amount of fields. Platform has field asyncMode that golang structure doesn't]","Path /cloudbroker/compute/affinityRuleRemove has following errors: [Field value has different required parameters on the platform and in golang structure]","Path /cloudbroker/image/list has following errors: [Field size has different type parameters on the platform and in golang structure]"]
t.Errorf("Path %s has following errors: %v",k,errs)
msg:=fmt.Sprintf("Path %s has following errors: %v",k,errs)
t.Error(msg)
dataLogs=append(dataLogs,msg)
}
}
iflen(requests)!=i{
t.Errorf("Amount of structure checked (%d) is not the same as amount of platform requests available (%d), please check getRequestsMapCloudAPI func in code.",
msg :=fmt.Sprintf("Amount of structure checked (%d) is not the same as amount of platform requests available (%d), please check getRequestsMapCloudAPI func in code.",
i,len(requests))
t.Error(msg)
dataLogs=append(dataLogs,msg)
}
compareLogs(logFileName,dataLogs,t,"request")
}
// checkName checks if name field from platform has the same value as json tag in golang structure (maybe including omitempty)