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
|
||||
if startDevicePort.PortAvailable < 1 {
|
||||
if startDevicePort.PortAvailable < 1 && startDevice.DeviceType == "OTB" {
|
||||
return fmt.Errorf("start device has no available ports (available: %d, required: 1)",
|
||||
startDevicePort.PortAvailable)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -101,7 +101,7 @@ func (u *fishboneUseCase) CreateFishbone(fishbone req.FishboneDTO) error {
|
|||
}
|
||||
|
||||
// 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)",
|
||||
startDevicePort.PortAvailable)
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue