import org.opendaylight.transportpce.test.AbstractTest;
import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.pce.rev190624.PathComputationRequestOutput;
import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.pce.rev190624.PathComputationRequestOutputBuilder;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev161014.configuration.response.common.ConfigurationResponseCommon;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev161014.configuration.response.common.ConfigurationResponseCommonBuilder;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.common.types.rev161014.State;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev161014.ServiceCreateInput;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev161014.TempServiceCreateInput;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev161014.service.list.Services;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev190531.configuration.response.common.ConfigurationResponseCommon;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev190531.configuration.response.common.ConfigurationResponseCommonBuilder;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.common.state.types.rev181130.State;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.equipment.states.types.rev181130.AdminStates;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.ServiceCreateInput;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.TempServiceCreateInput;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.service.list.Services;
import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev171017.path.description.AToZDirectionBuilder;
import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev171017.path.description.ZToADirectionBuilder;
import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.service.types.rev191009.response.parameters.sp.ResponseParameters;
@Test
public void modifyIfServiceNotPresent() {
OperationResult result =
- this.serviceDataStoreOperations.modifyService("service 1", State.InService, State.InService);
+ this.serviceDataStoreOperations.modifyService("service 1", State.InService, AdminStates.InService);
Assert.assertFalse(result.isSuccess());
- Assert.assertEquals("Service " + "service 1" + " is not present!", result.getResultMessage());
+ Assert.assertEquals("Service service 1 is not present!", result.getResultMessage());
}
@Test
ServiceCreateInput createInput = ServiceDataUtils.buildServiceCreateInput();
this.serviceDataStoreOperations.createService(createInput);
OperationResult result = this.serviceDataStoreOperations.modifyService(createInput.getServiceName(),
- State.InService, State.InService);
+ State.InService, AdminStates.InService);
Assert.assertTrue(result.isSuccess());
}
@Test
public void getTempServiceFromEmptyDataStoreShouldBeEmpty() {
- Optional<org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev161014.temp.service.list
+ Optional<org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.temp.service.list
.Services> optService = this.serviceDataStoreOperations.getTempService("service 1");
Assert.assertFalse(optService.isPresent());
}
TempServiceCreateInput createInput = ServiceDataUtils.buildTempServiceCreateInput();
this.serviceDataStoreOperations.createTempService(createInput);
- Optional<org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev161014.temp.service.list
+ Optional<org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev190531.temp.service.list
.Services> optService = this.serviceDataStoreOperations.getTempService(createInput.getCommonId());
Assert.assertTrue(optService.isPresent());
Assert.assertEquals(createInput.getCommonId(), optService.get().getCommonId());
TempServiceCreateInput createInput = ServiceDataUtils.buildTempServiceCreateInput();
this.serviceDataStoreOperations.createTempService(createInput);
OperationResult result = this.serviceDataStoreOperations.modifyTempService(createInput.getCommonId(),
- State.InService, State.InService);
+ State.InService, AdminStates.InService);
Assert.assertTrue(result.isSuccess());
}