1.1.0
This commit is contained in:
@@ -9,6 +9,7 @@ import (
|
||||
account "repository.basistech.ru/BASIS/decort-golang-sdk/pkg/cloudapi/account"
|
||||
"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"
|
||||
extnet "repository.basistech.ru/BASIS/decort-golang-sdk/pkg/cloudapi/extnet"
|
||||
image "repository.basistech.ru/BASIS/decort-golang-sdk/pkg/cloudapi/image"
|
||||
k8ci "repository.basistech.ru/BASIS/decort-golang-sdk/pkg/cloudapi/k8ci"
|
||||
@@ -448,6 +449,30 @@ func ExistVFPool(ctx context.Context, vfpoolId uint64, c *decort.DecortClient) e
|
||||
return nil
|
||||
}
|
||||
|
||||
func ExistDPDK(ctx context.Context, dpdkId uint64, c *decort.DecortClient) error {
|
||||
|
||||
req := dpdknet.ListRequest{
|
||||
ByID: dpdkId,
|
||||
}
|
||||
|
||||
dpdkList, err := c.CloudAPI().DPDKNet().List(ctx, req)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
if len(dpdkList.Data) == 0 {
|
||||
return fmt.Errorf("DPDK net with ID %v not found", dpdkId)
|
||||
}
|
||||
|
||||
for _, item := range dpdkList.Data {
|
||||
if item.Status != "ENABLED" {
|
||||
return fmt.Errorf("DPDK net with ID %v must be enabled", dpdkId)
|
||||
}
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func ExistSnapshotInCompute(ctx context.Context, computeID uint64, label string, c *decort.DecortClient) error {
|
||||
req := compute.SnapshotListRequest{
|
||||
ComputeID: computeID,
|
||||
|
||||
Reference in New Issue
Block a user