Change-Id: Ie9f5ba977615211e5813cc47d39fb7f363d961e1
Signed-off-by: guillaume.lambert <guillaume.lambert@orange.com>
public Optional<Interface> getInterface(String nodeId, String interfaceName) throws OpenRoadmInterfaceException {
InstanceIdentifier<Interface> interfacesIID = InstanceIdentifier.create(OrgOpenroadmDevice.class)
.child(Interface.class, new InterfaceKey(interfaceName));
public Optional<Interface> getInterface(String nodeId, String interfaceName) throws OpenRoadmInterfaceException {
InstanceIdentifier<Interface> interfacesIID = InstanceIdentifier.create(OrgOpenroadmDevice.class)
.child(Interface.class, new InterfaceKey(interfaceName));
- return this.deviceTransactionManager.getDataFromDevice(nodeId, LogicalDatastoreType.CONFIGURATION, interfacesIID,
- Timeouts.DEVICE_READ_TIMEOUT, Timeouts.DEVICE_READ_TIMEOUT_UNIT);
+ return this.deviceTransactionManager.getDataFromDevice(nodeId, LogicalDatastoreType.CONFIGURATION,
+ interfacesIID, Timeouts.DEVICE_READ_TIMEOUT, Timeouts.DEVICE_READ_TIMEOUT_UNIT);
InstanceIdentifier<Interface> interfacesIID = InstanceIdentifier.create(OrgOpenroadmDevice.class)
.child(Interface.class, new InterfaceKey(interfaceName));
InstanceIdentifier<Interface> interfacesIID = InstanceIdentifier.create(OrgOpenroadmDevice.class)
.child(Interface.class, new InterfaceKey(interfaceName));
- Future<Optional<DeviceTransaction>> deviceTxFuture = this.deviceTransactionManager.getDeviceTransaction(nodeId);
+ Future<Optional<DeviceTransaction>> deviceTxFuture =
+ this.deviceTransactionManager.getDeviceTransaction(nodeId);
DeviceTransaction deviceTx;
try {
Optional<DeviceTransaction> deviceTxOpt = deviceTxFuture.get();
DeviceTransaction deviceTx;
try {
Optional<DeviceTransaction> deviceTxOpt = deviceTxFuture.get();
* @return
* number of tasks rolled back
*/
* @return
* number of tasks rolled back
*/
+ @SuppressWarnings("checkstyle:IllegalCatch")
public int rollbackAll() {
int rollbackCounter = 0;
while (this.tasks.size() > 0) {
public int rollbackAll() {
int rollbackCounter = 0;
while (this.tasks.size() > 0) {
try {
LOG.info("rolling back: {}", task.getId());
task.call();
try {
LOG.info("rolling back: {}", task.getId());
task.call();
+ //this methode prototype only use the generic Exception and no specific and useable subclasse
} catch (Exception e) {
LOG.error("ERROR: Rollback task {} has failed", task.getId(), e);
}
} catch (Exception e) {
LOG.error("ERROR: Rollback task {} has failed", task.getId(), e);
}