This commit is contained in:
2024-12-27 11:35:22 +03:00
parent 88eb9e8898
commit e04dc42d2b
37 changed files with 516 additions and 274 deletions

View File

@@ -20,6 +20,7 @@ import (
"repository.basistech.ru/BASIS/decort-golang-sdk/pkg/cloudapi/stack"
"repository.basistech.ru/BASIS/decort-golang-sdk/pkg/cloudapi/tasks"
"repository.basistech.ru/BASIS/decort-golang-sdk/pkg/cloudapi/vins"
node_cb "repository.basistech.ru/BASIS/decort-golang-sdk/pkg/cloudbroker/node"
account_cb "repository.basistech.ru/BASIS/decort-golang-sdk/pkg/cloudbroker/account"
audit_cb "repository.basistech.ru/BASIS/decort-golang-sdk/pkg/cloudbroker/audit"
@@ -563,6 +564,26 @@ func TestGetListCloudbroker(t *testing.T) {
t.Errorf("Can not test LB get because LB list is empty")
}
// Node
// List
bytes, err = client.CloudBroker().Node().ListRaw(context.Background(), node_cb.ListRequest{})
if err != nil {
t.Error(err)
}
testLogs = append(testLogs, getResult("Node list", bytes, node_cb.ListNodes{}, t))
// Get
listNode, _ := client.CloudBroker().Node().List(context.Background(), node_cb.ListRequest{})
if len(listLB.Data) > 0 {
id := listNode.Data[0].ID
bytes, err = client.CloudBroker().Node().GetRaw(context.Background(), node_cb.GetRequest{NID: id})
if err != nil {
t.Error(err)
}
testLogs = append(testLogs, getResult("Node get", bytes, node_cb.RecordNode{}, t))
} else {
t.Errorf("Can not test Node get because LB list is empty")
}
// Pcidevice
// List
bytes, err = client.CloudBroker().PCIDevice().ListRaw(context.Background(), pcidevice_cb.ListRequest{})
@@ -684,10 +705,19 @@ func TestGetAllPaths(t *testing.T) {
decortUrls := readUrlFromDir("../../pkg", len(jsonUrls))
result := getMissingDecortUrls(jsonUrls, decortUrls)
if len(result) > 0 {
errorText := fmt.Sprintf("Below API handlers (%d in total) need to be added to decort-sdk:\n", len(result))
for _, r := range result {
missingUrls := getMissingDecortUrls(jsonUrls, decortUrls)
if len(missingUrls) > 0 {
errorText := fmt.Sprintf("Below API handlers (%d in total) need to be added to decort-sdk:\n", len(missingUrls))
for _, r := range missingUrls {
errorText += fmt.Sprintln(r)
}
t.Errorf(errorText)
}
deprecatedUrls := getDeprecatedDecortUrls(jsonUrls, decortUrls)
if len(deprecatedUrls) > 0 {
errorText := fmt.Sprintf("Below API handlers (%d in total) need to be delete to decort-sdk:\n", len(deprecatedUrls))
for _, r := range deprecatedUrls {
errorText += fmt.Sprintln(r)
}
t.Errorf(errorText)

View File

@@ -2,9 +2,11 @@ package test
import (
"repository.basistech.ru/BASIS/decort-golang-sdk/pkg/cloudapi/account"
"repository.basistech.ru/BASIS/decort-golang-sdk/pkg/cloudapi/audit"
"repository.basistech.ru/BASIS/decort-golang-sdk/pkg/cloudapi/bservice"
"repository.basistech.ru/BASIS/decort-golang-sdk/pkg/cloudapi/compute"
"repository.basistech.ru/BASIS/decort-golang-sdk/pkg/cloudapi/disks"
"repository.basistech.ru/BASIS/decort-golang-sdk/pkg/cloudapi/dpdknet"
"repository.basistech.ru/BASIS/decort-golang-sdk/pkg/cloudapi/extnet"
"repository.basistech.ru/BASIS/decort-golang-sdk/pkg/cloudapi/flipgroup"
"repository.basistech.ru/BASIS/decort-golang-sdk/pkg/cloudapi/image"
@@ -27,6 +29,7 @@ import (
backup_cb "repository.basistech.ru/BASIS/decort-golang-sdk/pkg/cloudbroker/backup"
compute_cb "repository.basistech.ru/BASIS/decort-golang-sdk/pkg/cloudbroker/compute"
disks_cb "repository.basistech.ru/BASIS/decort-golang-sdk/pkg/cloudbroker/disks"
dpdknet_cb "repository.basistech.ru/BASIS/decort-golang-sdk/pkg/cloudbroker/dpdknet"
extnet_cb "repository.basistech.ru/BASIS/decort-golang-sdk/pkg/cloudbroker/extnet"
flipgroup_cb "repository.basistech.ru/BASIS/decort-golang-sdk/pkg/cloudbroker/flipgroup"
grid_cb "repository.basistech.ru/BASIS/decort-golang-sdk/pkg/cloudbroker/grid"
@@ -78,6 +81,9 @@ func getRequestsMapCloudAPI() map[string]interface{} {
"/restmachine/cloudapi/account/update": account.UpdateRequest{},
"/restmachine/cloudapi/account/updateUser": account.UpdateUserRequest{},
//audit
"/restmachine/cloudapi/audit/get": audit.GetRequest{},
//bservice
"/restmachine/cloudapi/bservice/create": bservice.CreateRequest{},
"/restmachine/cloudapi/bservice/delete": bservice.DeleteRequest{},
@@ -107,7 +113,6 @@ func getRequestsMapCloudAPI() map[string]interface{} {
"/restmachine/cloudapi/bservice/stop": bservice.StopRequest{},
// compute
"/restmachine/cloudapi/compute/affinityGroupCheckStart": compute.AffinityGroupCheckStartRequest{},
"/restmachine/cloudapi/compute/affinityLabelRemove": compute.AffinityLabelRemoveRequest{},
"/restmachine/cloudapi/compute/affinityLabelSet": compute.AffinityLabelSetRequest{},
"/restmachine/cloudapi/compute/affinityRelations": compute.AffinityRelationsRequest{},
@@ -203,7 +208,6 @@ func getRequestsMapCloudAPI() map[string]interface{} {
"/restmachine/cloudapi/disks/replicationStatus": disks.ReplicationStatusRequest{},
"/restmachine/cloudapi/disks/replicationStop": disks.ReplicationStopRequest{},
"/restmachine/cloudapi/disks/replicationSuspend": disks.ReplicationSuspendRequest{},
"/restmachine/cloudapi/disks/resize": disks.ResizeRequest{},
"/restmachine/cloudapi/disks/resize2": disks.ResizeRequest{},
"/restmachine/cloudapi/disks/restore": disks.RestoreRequest{},
"/restmachine/cloudapi/disks/search": disks.SearchRequest{},
@@ -212,11 +216,16 @@ func getRequestsMapCloudAPI() map[string]interface{} {
"/restmachine/cloudapi/disks/snapshotRollback": disks.SnapshotRollbackRequest{},
"/restmachine/cloudapi/disks/unshare": disks.UnshareRequest{},
//dpdknet
"/restmachine/cloudapi/dpdknet/get": dpdknet.GetRequest{},
"/restmachine/cloudapi/dpdknet/list": dpdknet.ListRequest{},
// extnet
"/restmachine/cloudapi/extnet/get": extnet.GetRequest{},
"/restmachine/cloudapi/extnet/getDefault": EmptyStruct{},
"/restmachine/cloudapi/extnet/list": extnet.ListRequest{},
"/restmachine/cloudapi/extnet/listComputes": extnet.ListComputesRequest{},
"/restmachine/cloudapi/extnet/get": extnet.GetRequest{},
"/restmachine/cloudapi/extnet/getDefault": EmptyStruct{},
"/restmachine/cloudapi/extnet/getReservedIp": extnet.GetReservedIP{},
"/restmachine/cloudapi/extnet/list": extnet.ListRequest{},
"/restmachine/cloudapi/extnet/listComputes": extnet.ListComputesRequest{},
// flipgroup
"/restmachine/cloudapi/flipgroup/computeAdd": flipgroup.ComputeAddRequest{},
@@ -353,34 +362,32 @@ func getRequestsMapCloudAPI() map[string]interface{} {
"/restmachine/cloudapi/vfpool/list": vfpool.ListRequest{},
// vins
"/restmachine/cloudapi/vins/audits": vins.AuditsRequest{},
"/restmachine/cloudapi/vins/createInAccount": vins.CreateInAccountRequest{},
"/restmachine/cloudapi/vins/createInRG": vins.CreateInRGRequest{},
"/restmachine/cloudapi/vins/delete": vins.DeleteRequest{},
"/restmachine/cloudapi/vins/disable": vins.DisableEnableRequest{},
"/restmachine/cloudapi/vins/dnsApply": vins.DNSApplyRequest{},
"/restmachine/cloudapi/vins/enable": vins.DisableEnableRequest{},
"/restmachine/cloudapi/vins/extNetConnect": vins.ExtNetConnectRequest{},
"/restmachine/cloudapi/vins/extNetDisconnect": vins.ExtNetDisconnectRequest{},
"/restmachine/cloudapi/vins/extNetList": vins.ExtNetListRequest{},
"/restmachine/cloudapi/vins/get": vins.GetRequest{},
"/restmachine/cloudapi/vins/ipList": vins.IPListRequest{},
"/restmachine/cloudapi/vins/ipRelease": vins.IPReleaseRequest{},
"/restmachine/cloudapi/vins/ipReserve": vins.IPReserveRequest{},
"/restmachine/cloudapi/vins/list": vins.ListRequest{},
"/restmachine/cloudapi/vins/listDeleted": vins.ListDeletedRequest{},
"/restmachine/cloudapi/vins/natRuleAdd": vins.NATRuleAddRequest{},
"/restmachine/cloudapi/vins/natRuleDel": vins.NATRuleDelRequest{},
"/restmachine/cloudapi/vins/natRuleList": vins.NATRuleListRequest{},
"/restmachine/cloudapi/vins/restore": vins.RestoreRequest{},
"/restmachine/cloudapi/vins/search": vins.SearchRequest{},
"/restmachine/cloudapi/vins/staticRouteAccessGrant": vins.StaticRouteAccessGrantRequest{},
"/restmachine/cloudapi/vins/staticRouteAccessRevoke": vins.StaticRouteAccessRevokeRequest{},
"/restmachine/cloudapi/vins/staticRouteAdd": vins.StaticRouteAddRequest{},
"/restmachine/cloudapi/vins/staticRouteDel": vins.StaticRouteDelRequest{},
"/restmachine/cloudapi/vins/staticRouteList": vins.StaticRouteListRequest{},
"/restmachine/cloudapi/vins/vnfdevRedeploy": vins.VNFDevRedeployRequest{},
"/restmachine/cloudapi/vins/vnfdevRestart": vins.VNFDevRestartRequest{},
"/restmachine/cloudapi/vins/audits": vins.AuditsRequest{},
"/restmachine/cloudapi/vins/createInAccount": vins.CreateInAccountRequest{},
"/restmachine/cloudapi/vins/createInRG": vins.CreateInRGRequest{},
"/restmachine/cloudapi/vins/delete": vins.DeleteRequest{},
"/restmachine/cloudapi/vins/disable": vins.DisableEnableRequest{},
"/restmachine/cloudapi/vins/dnsApply": vins.DNSApplyRequest{},
"/restmachine/cloudapi/vins/enable": vins.DisableEnableRequest{},
"/restmachine/cloudapi/vins/extNetConnect": vins.ExtNetConnectRequest{},
"/restmachine/cloudapi/vins/extNetDisconnect": vins.ExtNetDisconnectRequest{},
"/restmachine/cloudapi/vins/extNetList": vins.ExtNetListRequest{},
"/restmachine/cloudapi/vins/get": vins.GetRequest{},
"/restmachine/cloudapi/vins/ipList": vins.IPListRequest{},
"/restmachine/cloudapi/vins/ipRelease": vins.IPReleaseRequest{},
"/restmachine/cloudapi/vins/ipReserve": vins.IPReserveRequest{},
"/restmachine/cloudapi/vins/list": vins.ListRequest{},
"/restmachine/cloudapi/vins/listDeleted": vins.ListDeletedRequest{},
"/restmachine/cloudapi/vins/natRuleAdd": vins.NATRuleAddRequest{},
"/restmachine/cloudapi/vins/natRuleDel": vins.NATRuleDelRequest{},
"/restmachine/cloudapi/vins/natRuleList": vins.NATRuleListRequest{},
"/restmachine/cloudapi/vins/restore": vins.RestoreRequest{},
"/restmachine/cloudapi/vins/search": vins.SearchRequest{},
"/restmachine/cloudapi/vins/staticRouteAdd": vins.StaticRouteAddRequest{},
"/restmachine/cloudapi/vins/staticRouteDel": vins.StaticRouteDelRequest{},
"/restmachine/cloudapi/vins/staticRouteList": vins.StaticRouteListRequest{},
"/restmachine/cloudapi/vins/vnfdevRedeploy": vins.VNFDevRedeployRequest{},
"/restmachine/cloudapi/vins/vnfdevRestart": vins.VNFDevRestartRequest{},
}
}
@@ -576,12 +583,23 @@ func getRequestsMapCloudbroker() map[string]interface{} {
"/restmachine/cloudbroker/disks/snapshotRollback": disks_cb.SnapshotRollbackRequest{},
"/restmachine/cloudbroker/disks/unshare": disks_cb.UnshareRequest{},
// dpdknet
"/restmachine/cloudbroker/dpdknet/get": dpdknet_cb.GetRequest{},
"/restmachine/cloudbroker/dpdknet/list": dpdknet_cb.ListRequest{},
"/restmachine/cloudbroker/dpdknet/disable": dpdknet_cb.DisableRequest{},
"/restmachine/cloudbroker/dpdknet/enable": dpdknet_cb.EnableRequest{},
"/restmachine/cloudbroker/dpdknet/create": dpdknet_cb.CreateRequest{},
"/restmachine/cloudbroker/dpdknet/update": dpdknet_cb.UpdateRequest{},
"/restmachine/cloudbroker/dpdknet/delete": dpdknet_cb.DeleteRequest{},
// extnet
"/restmachine/cloudbroker/extnet/accessAdd": extnet_cb.AccessAddRequest{},
"/restmachine/cloudbroker/extnet/accessRemove": extnet_cb.AccessRemoveRequest{},
"/restmachine/cloudbroker/extnet/addReservedIp": extnet_cb.AddReserveIPRequest{},
"/restmachine/cloudbroker/extnet/create": extnet_cb.CreateRequest{},
"/restmachine/cloudbroker/extnet/dnsApply": extnet_cb.DNSApplyRequest{},
"/restmachine/cloudbroker/extnet/defaultQosUpdate": extnet_cb.DefaultQOSUpdateRequest{},
"/restmachine/cloudbroker/extnet/delReservedIp": extnet_cb.DelReserveIPRequest{},
"/restmachine/cloudbroker/extnet/destroy": extnet_cb.DestroyRequest{},
"/restmachine/cloudbroker/extnet/deviceDeploy": extnet_cb.DeviceDeployRequest{},
"/restmachine/cloudbroker/extnet/deviceMigrate": extnet_cb.DeviceMigrateRequest{},
@@ -591,6 +609,7 @@ func getRequestsMapCloudbroker() map[string]interface{} {
"/restmachine/cloudbroker/extnet/enable": extnet_cb.EnableRequest{},
"/restmachine/cloudbroker/extnet/get": extnet_cb.GetRequest{},
"/restmachine/cloudbroker/extnet/getDefault": EmptyStruct{},
"/restmachine/cloudbroker/extnet/getReservedIp": extnet.GetReservedIP{},
"/restmachine/cloudbroker/extnet/ipsExclude": extnet_cb.IPsExcludeRequest{},
"/restmachine/cloudbroker/extnet/ipsExcludeRange": extnet_cb.IPsExcludeRangeRequest{},
"/restmachine/cloudbroker/extnet/ipsInclude": extnet_cb.IPsExcludeRequest{},
@@ -794,30 +813,29 @@ func getRequestsMapCloudbroker() map[string]interface{} {
"/restmachine/cloudbroker/rg/usage": rg_cb.UsageRequest{},
// sep
"/restmachine/cloudbroker/sep/accessGrant": sep_cb.AccessGrantRequest{},
"/restmachine/cloudbroker/sep/accessGrantToPool": sep_cb.AccessGrantToPoolRequest{},
"/restmachine/cloudbroker/sep/accessRevoke": sep_cb.AccessRevokeRequest{},
"/restmachine/cloudbroker/sep/accessRevokeToPool": sep_cb.AccessRevokeToPoolRequest{},
"/restmachine/cloudbroker/sep/addConsumerNodes": sep_cb.AddConsumerNodesRequest{},
"/restmachine/cloudbroker/sep/addPool": sep_cb.AddPoolRequest{},
"/restmachine/cloudbroker/sep/addProviderNodes": sep_cb.AddProviderNodesRequest{},
"/restmachine/cloudbroker/sep/configFieldEdit": sep_cb.ConfigFieldEditRequest{},
"/restmachine/cloudbroker/sep/configInsert": sep_cb.ConfigInsertRequest{},
"/restmachine/cloudbroker/sep/configValidate": sep_cb.ConfigValidateRequest{},
"/restmachine/cloudbroker/sep/consumption": sep_cb.ConsumptionRequest{},
"/restmachine/cloudbroker/sep/create": sep_cb.CreateRequest{},
"/restmachine/cloudbroker/sep/decommission": sep_cb.DecommissionRequest{},
"/restmachine/cloudbroker/sep/delConsumerNodes": sep_cb.DelConsumerNodesRequest{},
"/restmachine/cloudbroker/sep/delete": sep_cb.DeleteRequest{},
"/restmachine/cloudbroker/sep/delPool": sep_cb.DelPoolRequest{},
"/restmachine/cloudbroker/sep/disable": sep_cb.DisableRequest{},
"/restmachine/cloudbroker/sep/diskList": sep_cb.DiskListRequest{},
"/restmachine/cloudbroker/sep/enable": sep_cb.EnableRequest{},
"/restmachine/cloudbroker/sep/get": sep_cb.GetRequest{},
"/restmachine/cloudbroker/sep/getConfig": sep_cb.GetConfigRequest{},
"/restmachine/cloudbroker/sep/getPool": sep_cb.GetPoolRequest{},
"/restmachine/cloudbroker/sep/list": sep_cb.ListRequest{},
"/restmachine/cloudbroker/sep/updateCapacityLimit": sep_cb.UpdateCapacityLimitRequest{},
"/restmachine/cloudbroker/sep/accessGrant": sep_cb.AccessGrantRequest{},
"/restmachine/cloudbroker/sep/accessGrantToPool": sep_cb.AccessGrantToPoolRequest{},
"/restmachine/cloudbroker/sep/accessRevoke": sep_cb.AccessRevokeRequest{},
"/restmachine/cloudbroker/sep/accessRevokeToPool": sep_cb.AccessRevokeToPoolRequest{},
"/restmachine/cloudbroker/sep/addConsumerNodes": sep_cb.AddConsumerNodesRequest{},
"/restmachine/cloudbroker/sep/addPool": sep_cb.AddPoolRequest{},
"/restmachine/cloudbroker/sep/addProviderNodes": sep_cb.AddProviderNodesRequest{},
"/restmachine/cloudbroker/sep/configFieldEdit": sep_cb.ConfigFieldEditRequest{},
"/restmachine/cloudbroker/sep/configInsert": sep_cb.ConfigInsertRequest{},
"/restmachine/cloudbroker/sep/configValidate": sep_cb.ConfigValidateRequest{},
"/restmachine/cloudbroker/sep/consumption": sep_cb.ConsumptionRequest{},
"/restmachine/cloudbroker/sep/create": sep_cb.CreateRequest{},
"/restmachine/cloudbroker/sep/decommission": sep_cb.DecommissionRequest{},
"/restmachine/cloudbroker/sep/delConsumerNodes": sep_cb.DelConsumerNodesRequest{},
"/restmachine/cloudbroker/sep/delete": sep_cb.DeleteRequest{},
"/restmachine/cloudbroker/sep/delPool": sep_cb.DelPoolRequest{},
"/restmachine/cloudbroker/sep/disable": sep_cb.DisableRequest{},
"/restmachine/cloudbroker/sep/diskList": sep_cb.DiskListRequest{},
"/restmachine/cloudbroker/sep/enable": sep_cb.EnableRequest{},
"/restmachine/cloudbroker/sep/get": sep_cb.GetRequest{},
"/restmachine/cloudbroker/sep/getConfig": sep_cb.GetConfigRequest{},
"/restmachine/cloudbroker/sep/getPool": sep_cb.GetPoolRequest{},
"/restmachine/cloudbroker/sep/list": sep_cb.ListRequest{},
// stack
"/restmachine/cloudbroker/stack/get": stack_cb.GetRequest{},

View File

@@ -1,31 +0,0 @@
[
"Account list: OK",
"Account get: OK",
"",
"Bservice get: OK",
"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",
"",
"VINS get: OK"
]

View File

@@ -1,34 +0,0 @@
[
"Account list: OK",
"Account get: OK",
"",
"Audit get: OK",
"Compute list: \nPlatform has these fields that golang struct doesn't: [disks]\n",
"Compute get: OK",
"Disk list: \nPlatform has these fields that golang struct doesn't: [machineId machineName sepType devicename]\n",
"Disk get: \nPlatform has these fields that golang struct doesn't: [devicename sepType updatedBy]\n",
"ExtNet list: OK",
"ExtNet get: OK",
"FLIPGroup list: OK",
"",
"Grid list: \nPlatform has these fields that golang struct doesn't: [1 90 380 1 90 380]\n",
"Grid get: OK",
"Image list: OK",
"Image get: OK",
"K8CI list: \nPlatform has these fields that golang struct doesn't: [createdTime]\n",
"K8CI get: OK",
"K8S list: OK",
"K8S get: OK",
"LB list: OK",
"LB get: OK",
"Pcidevice list: OK",
"RG list: OK",
"RG get: OK",
"SEP list: \nPlatform has these fields that golang struct doesn't: [protocol disk_max_size format name name_prefix pools]\n",
"SEP get: \nPlatform has these fields that golang struct doesn't: [format name name_prefix pools protocol disk_max_size]\n",
"Stack list: OK",
"Stack get: OK",
"Tasks list: \nPlatform has these fields that golang struct doesn't: [stage status error log auditId completed updateTime guid]\n",
"",
"VINS get: \nPlatform has these fields that golang struct doesn't: [computes config config config]\n"
]

View File

@@ -1,14 +0,0 @@
[
"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]"
]

View File

@@ -1 +0,0 @@
["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]"]

View File

@@ -15,10 +15,14 @@ var DEPRECATED_GROUPS = []string{
"//cloudbroker/pgpu/",
"/cloudapi/gpu/",
"/cloudapi/portforwarding/",
"/cloudapi/account/create",
"/cloudapi/account/listVMs",
"/cloudapi/account/listCS",
"/cloudapi/account/getStats",
"/cloudapi/vgpu/list",
"/cloudapi/compute/affinityGroupCheckStart",
"/cloudapi/vins/staticRouteAccessGrant",
"/cloudapi/vins/staticRouteAccessRevoke",
"/cloudbroker/account/listVMs",
"/cloudbroker/account/listCS",
@@ -42,6 +46,9 @@ var DEPRECATED_GROUPS = []string{
"/cloudbroker/iaas/",
"/cloudbroker/diagnostics/",
"/cloudbroker/milestones/",
"/cloudbroker/compute/affinityGroupCheckStart",
"/cloudbroker/vins/staticRouteAccessGrant",
"/cloudbroker/vins/staticRouteAccessRevoke",
}
// getUrlsFromBytes converts bytes to array of urls strings
@@ -95,6 +102,26 @@ func getMissingDecortUrls(jsonUrls, decortUrls []string) []string {
return result
}
// getMissingDecortUrls returns array of url strings that are present in json swagger docs and absent in decort-sdk handlers.
func getDeprecatedDecortUrls(jsonUrls, decortUrls []string) []string {
result := make([]string, 0, len(decortUrls))
for _, decortUrl := range decortUrls {
var found bool
for _, jsonUrl := range jsonUrls {
if jsonUrl == decortUrl {
found = true
break
}
}
if !found && validateUrlFromJson(decortUrl) {
result = append(result, decortUrl)
}
}
return result
}
// readUrlFromDir reads all url addresses from given directory and its subdirectories and subfiles and returns array of urls found. Capacity will
func readUrlFromDir(dirName string, capacity int) []string {
result := make([]string, 0, capacity)