This commit is contained in:
asteam
2024-12-04 13:18:58 +03:00
parent 003e4d656e
commit 76ea459b3d
417 changed files with 30051 additions and 975 deletions

View File

@@ -303,3 +303,21 @@ func ExistImages(ctx context.Context, imageIDs []uint64, c *decort.DecortClient)
return nil
}
func ExistExtNetInRG(ctx context.Context, extNetId, accountId uint64, c *decort.DecortClient) error {
req := extnet.ListRequest{
AccountID: accountId,
ByID: extNetId,
}
listExtNet, err := c.CloudBroker().ExtNet().List(ctx, req)
if err != nil {
return err
}
if len(listExtNet.Data) == 0 {
return fmt.Errorf("EXTNET with ID %v not found for account with id %d", extNetId, accountId)
}
return nil
}