1.1.0
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user