v1.12.3
This commit is contained in:
@@ -17,10 +17,10 @@ import (
|
||||
"repository.basistech.ru/BASIS/decort-golang-sdk/pkg/cloudapi/lb"
|
||||
"repository.basistech.ru/BASIS/decort-golang-sdk/pkg/cloudapi/locations"
|
||||
"repository.basistech.ru/BASIS/decort-golang-sdk/pkg/cloudapi/rg"
|
||||
securitygroup "repository.basistech.ru/BASIS/decort-golang-sdk/pkg/cloudapi/security_group"
|
||||
"repository.basistech.ru/BASIS/decort-golang-sdk/pkg/cloudapi/secgroup"
|
||||
"repository.basistech.ru/BASIS/decort-golang-sdk/pkg/cloudapi/sep"
|
||||
"repository.basistech.ru/BASIS/decort-golang-sdk/pkg/cloudapi/stack"
|
||||
storagepolicy "repository.basistech.ru/BASIS/decort-golang-sdk/pkg/cloudapi/storage_policy"
|
||||
"repository.basistech.ru/BASIS/decort-golang-sdk/pkg/cloudapi/stpolicy"
|
||||
"repository.basistech.ru/BASIS/decort-golang-sdk/pkg/cloudapi/tasks"
|
||||
"repository.basistech.ru/BASIS/decort-golang-sdk/pkg/cloudapi/trunk"
|
||||
"repository.basistech.ru/BASIS/decort-golang-sdk/pkg/cloudapi/vins"
|
||||
@@ -42,10 +42,10 @@ import (
|
||||
node_cb "repository.basistech.ru/BASIS/decort-golang-sdk/pkg/cloudbroker/node"
|
||||
pcidevice_cb "repository.basistech.ru/BASIS/decort-golang-sdk/pkg/cloudbroker/pcidevice"
|
||||
rg_cb "repository.basistech.ru/BASIS/decort-golang-sdk/pkg/cloudbroker/rg"
|
||||
securitygroup_cb "repository.basistech.ru/BASIS/decort-golang-sdk/pkg/cloudbroker/security_group"
|
||||
secgroup_cb "repository.basistech.ru/BASIS/decort-golang-sdk/pkg/cloudbroker/secgroup"
|
||||
sep_cb "repository.basistech.ru/BASIS/decort-golang-sdk/pkg/cloudbroker/sep"
|
||||
stack_cb "repository.basistech.ru/BASIS/decort-golang-sdk/pkg/cloudbroker/stack"
|
||||
storagepolicy_cb "repository.basistech.ru/BASIS/decort-golang-sdk/pkg/cloudbroker/storage_policy"
|
||||
stpolicy_cb "repository.basistech.ru/BASIS/decort-golang-sdk/pkg/cloudbroker/stpolicy"
|
||||
tasks_cb "repository.basistech.ru/BASIS/decort-golang-sdk/pkg/cloudbroker/tasks"
|
||||
trunk_cb "repository.basistech.ru/BASIS/decort-golang-sdk/pkg/cloudbroker/trunk"
|
||||
vins_cb "repository.basistech.ru/BASIS/decort-golang-sdk/pkg/cloudbroker/vins"
|
||||
@@ -308,40 +308,40 @@ func TestGetListCloudAPI(t *testing.T) {
|
||||
|
||||
// Storage policy
|
||||
// List
|
||||
bytes, err = client.CloudAPI().StoragePolicy().ListRaw(context.Background(), storagepolicy.ListRequest{})
|
||||
bytes, err = client.CloudAPI().StPolicy().ListRaw(context.Background(), stpolicy.ListRequest{})
|
||||
if err != nil {
|
||||
t.Error(err)
|
||||
}
|
||||
getResult("Storage policy list", bytes, storagepolicy.ListStoragePolicies{}, t)
|
||||
getResult("Storage policy list", bytes, stpolicy.ListStoragePolicies{}, t)
|
||||
// Get
|
||||
listStoragePolicies, _ := client.CloudAPI().StoragePolicy().List(context.Background(), storagepolicy.ListRequest{})
|
||||
listStoragePolicies, _ := client.CloudAPI().StPolicy().List(context.Background(), stpolicy.ListRequest{})
|
||||
if len(listStoragePolicies.Data) > 0 {
|
||||
id := listStoragePolicies.Data[0].ID
|
||||
bytes, err = client.CloudAPI().StoragePolicy().GetRaw(context.Background(), storagepolicy.GetRequest{StoragePolicyID: id})
|
||||
bytes, err = client.CloudAPI().StPolicy().GetRaw(context.Background(), stpolicy.GetRequest{StoragePolicyID: id})
|
||||
if err != nil {
|
||||
t.Error(err)
|
||||
}
|
||||
getResult("Storage policy get", bytes, storagepolicy.InfoStoragePolicy{}, t)
|
||||
getResult("Storage policy get", bytes, stpolicy.InfoStoragePolicy{}, t)
|
||||
} else {
|
||||
t.Errorf("Can not test Storage policy get because Storage policy list is empty")
|
||||
}
|
||||
|
||||
// Security group
|
||||
// List
|
||||
bytes, err = client.CloudAPI().SecurityGroup().ListRaw(context.Background(), securitygroup.ListRequest{})
|
||||
bytes, err = client.CloudAPI().SecurityGroup().ListRaw(context.Background(), secgroup.ListRequest{})
|
||||
if err != nil {
|
||||
t.Error(err)
|
||||
}
|
||||
getResult("Security group list", bytes, securitygroup.ListSecurityGroups{}, t)
|
||||
getResult("Security group list", bytes, secgroup.ListSecurityGroups{}, t)
|
||||
// Get
|
||||
listSecurityGroups, _ := client.CloudAPI().SecurityGroup().List(context.Background(), securitygroup.ListRequest{})
|
||||
listSecurityGroups, _ := client.CloudAPI().SecurityGroup().List(context.Background(), secgroup.ListRequest{})
|
||||
if len(listSecurityGroups.Data) > 0 {
|
||||
id := listSecurityGroups.Data[0].ID
|
||||
bytes, err = client.CloudAPI().SecurityGroup().GetRaw(context.Background(), securitygroup.GetRequest{SecurityGroupID: id})
|
||||
bytes, err = client.CloudAPI().SecurityGroup().GetRaw(context.Background(), secgroup.GetRequest{SecurityGroupID: id})
|
||||
if err != nil {
|
||||
t.Error(err)
|
||||
}
|
||||
getResult("Security group get", bytes, securitygroup.RecordSecurityGroup{}, t)
|
||||
getResult("Security group get", bytes, secgroup.RecordSecurityGroup{}, t)
|
||||
} else {
|
||||
t.Errorf("Can not test Security group get because Security group list is empty")
|
||||
}
|
||||
@@ -728,20 +728,20 @@ func TestGetListCloudbroker(t *testing.T) {
|
||||
|
||||
// Security group
|
||||
// List
|
||||
bytes, err = client.CloudBroker().SecurityGroup().ListRaw(context.Background(), securitygroup_cb.ListRequest{})
|
||||
bytes, err = client.CloudBroker().SecurityGroup().ListRaw(context.Background(), secgroup_cb.ListRequest{})
|
||||
if err != nil {
|
||||
t.Error(err)
|
||||
}
|
||||
getResult("Security group list", bytes, securitygroup_cb.ListSecurityGroups{}, t)
|
||||
getResult("Security group list", bytes, secgroup_cb.ListSecurityGroups{}, t)
|
||||
// Get
|
||||
listSecurityGroups, _ := client.CloudBroker().SecurityGroup().List(context.Background(), securitygroup_cb.ListRequest{})
|
||||
listSecurityGroups, _ := client.CloudBroker().SecurityGroup().List(context.Background(), secgroup_cb.ListRequest{})
|
||||
if len(listSecurityGroups.Data) > 0 {
|
||||
id := listSecurityGroups.Data[0].ID
|
||||
bytes, err = client.CloudBroker().SecurityGroup().GetRaw(context.Background(), securitygroup_cb.GetRequest{SecurityGroupID: id})
|
||||
bytes, err = client.CloudBroker().SecurityGroup().GetRaw(context.Background(), secgroup_cb.GetRequest{SecurityGroupID: id})
|
||||
if err != nil {
|
||||
t.Error(err)
|
||||
}
|
||||
getResult("Security group get", bytes, securitygroup_cb.RecordSecurityGroup{}, t)
|
||||
getResult("Security group get", bytes, secgroup_cb.RecordSecurityGroup{}, t)
|
||||
} else {
|
||||
t.Errorf("Can not test Security group get because Security group list is empty")
|
||||
}
|
||||
@@ -794,20 +794,20 @@ func TestGetListCloudbroker(t *testing.T) {
|
||||
|
||||
// Storage policy
|
||||
// List
|
||||
bytes, err = client.CloudBroker().StoragePolicy().ListRaw(context.Background(), storagepolicy_cb.ListRequest{})
|
||||
bytes, err = client.CloudBroker().StPolicy().ListRaw(context.Background(), stpolicy_cb.ListRequest{})
|
||||
if err != nil {
|
||||
t.Error(err)
|
||||
}
|
||||
getResult("Storage policy list", bytes, storagepolicy_cb.ListStoragePolicies{}, t)
|
||||
getResult("Storage policy list", bytes, stpolicy_cb.ListStoragePolicies{}, t)
|
||||
// Get
|
||||
listStoragePolicies, _ := client.CloudBroker().StoragePolicy().List(context.Background(), storagepolicy_cb.ListRequest{})
|
||||
listStoragePolicies, _ := client.CloudBroker().StPolicy().List(context.Background(), stpolicy_cb.ListRequest{})
|
||||
if len(listStoragePolicies.Data) > 0 {
|
||||
id := listStoragePolicies.Data[0].ID
|
||||
bytes, err = client.CloudBroker().StoragePolicy().GetRaw(context.Background(), storagepolicy_cb.GetRequest{StoragePolicyID: id})
|
||||
bytes, err = client.CloudBroker().StPolicy().GetRaw(context.Background(), stpolicy_cb.GetRequest{StoragePolicyID: id})
|
||||
if err != nil {
|
||||
t.Error(err)
|
||||
}
|
||||
getResult("Storage policy get", bytes, storagepolicy_cb.InfoStoragePolicy{}, t)
|
||||
getResult("Storage policy get", bytes, stpolicy_cb.InfoStoragePolicy{}, t)
|
||||
} else {
|
||||
t.Errorf("Can not test Storage policy get because Storage policy list is empty")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user