mirror of
https://github.com/opennetworkinglab/onos.git
synced 2026-05-04 11:51:43 +02:00
ONOS-7509 preserve all attributes when ensuring enabled state
- it seemed deleted flag was lost due to old code. Change-Id: I0abb22835318f2e165bbf23fa2978b601d563be1
This commit is contained in:
parent
620655b7f8
commit
2b1935d824
@ -133,11 +133,10 @@ public final class OpticalPortOperator implements PortConfigOperator {
|
||||
// result is no-op
|
||||
return descr;
|
||||
}
|
||||
return new DefaultPortDescription(port,
|
||||
descr.isEnabled(),
|
||||
descr.type(),
|
||||
descr.portSpeed(),
|
||||
sa);
|
||||
return DefaultPortDescription.builder(descr)
|
||||
.withPortNumer(port)
|
||||
.annotations(sa)
|
||||
.build();
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@ -568,11 +568,9 @@ public class DeviceManager
|
||||
|
||||
private PortDescription ensurePortEnabledState(PortDescription desc, boolean enabled) {
|
||||
if (desc.isEnabled() != enabled) {
|
||||
return new DefaultPortDescription(desc.portNumber(),
|
||||
enabled,
|
||||
desc.type(),
|
||||
desc.portSpeed(),
|
||||
desc.annotations());
|
||||
return DefaultPortDescription.builder(desc)
|
||||
.isEnabled(enabled)
|
||||
.build();
|
||||
}
|
||||
return desc;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user