Merge pull request 'feature/responses-v2' (#29) from feature/responses-v2 into dev
Reviewed-on: winter-access/backend_nam#29
This commit is contained in:
commit
dd90547309
|
|
@ -82,7 +82,7 @@ func (u *backboneUseCase) CreateBackbone(backbone req.BackboneDTO) error {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Validate port availability - each backbone uses 1 port regardless of core amount
|
// Validate port availability - each backbone uses 1 port regardless of core amount
|
||||||
if startDevicePort.PortAvailable < 1 {
|
if startDevicePort.PortAvailable < 1 && startDevice.DeviceType == "OTB" {
|
||||||
return fmt.Errorf("start device has no available ports (available: %d, required: 1)",
|
return fmt.Errorf("start device has no available ports (available: %d, required: 1)",
|
||||||
startDevicePort.PortAvailable)
|
startDevicePort.PortAvailable)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -101,7 +101,7 @@ func (u *fishboneUseCase) CreateFishbone(fishbone req.FishboneDTO) error {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Validate port availability
|
// Validate port availability
|
||||||
if startDevicePort.PortAvailable < 1 {
|
if startDevicePort.PortAvailable < 1 && startDevice.DeviceType == "ODP" {
|
||||||
return fmt.Errorf("start device has no available ports (available: %d, required: 1)",
|
return fmt.Errorf("start device has no available ports (available: %d, required: 1)",
|
||||||
startDevicePort.PortAvailable)
|
startDevicePort.PortAvailable)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue