|
@@ -102,6 +102,10 @@ func (s *gatewayIpAdminService) DeleteGatewayIp(ctx context.Context,id int64) er
|
|
|
if err != nil {
|
|
|
return err
|
|
|
}
|
|
|
+ if oldData.HostId != 0 {
|
|
|
+ return fmt.Errorf("该IP已被绑定,无法删除")
|
|
|
+ }
|
|
|
+
|
|
|
// 启动网关组IP
|
|
|
if oldData.NodeArea != "" {
|
|
|
err := s.sendIp(ctx,oldData.Ip,"deleteIp",oldData.NodeArea)
|
|
@@ -122,6 +126,10 @@ func (s *gatewayIpAdminService) DeleteGatewayIps(ctx context.Context, ids []int6
|
|
|
return err
|
|
|
}
|
|
|
|
|
|
+ if oldData.HostId != 0 {
|
|
|
+ return fmt.Errorf("该IP已被绑定,无法删除")
|
|
|
+ }
|
|
|
+
|
|
|
// 启动网关组IP
|
|
|
if oldData.NodeArea != "" {
|
|
|
err := s.sendIp(ctx,oldData.Ip,"deleteIp",oldData.NodeArea)
|