use of org.onlab.osgi.ServiceDirectory in project onos by opennetworkinglab.
the class VirtualNetworkWebResourceTest method setUpTest.
/**
* Sets up the global values for all the tests.
*/
@Before
public void setUpTest() {
// Register the services needed for the test
codecService = new CodecManager();
codecService.activate();
ServiceDirectory testDirectory = new TestServiceDirectory().add(VirtualNetworkAdminService.class, mockVnetAdminService).add(VirtualNetworkService.class, mockVnetService).add(CodecService.class, codecService);
setServiceDirectory(testDirectory);
}
use of org.onlab.osgi.ServiceDirectory in project onos by opennetworkinglab.
the class OpenstackTelemetryConfigWebResourceTest method setUpTest.
/**
* Sets up the global values for all the tests.
*/
@Before
public void setUpTest() {
ServiceDirectory testDirectory = new TestServiceDirectory().add(TelemetryConfigAdminService.class, mockConfigAdminService);
setServiceDirectory(testDirectory);
PROP.put(PROP_KEY_1, PROP_VALUE_1);
PROP.put(PROP_KEY_2, PROP_VALUE_2);
telemetryConfig = new DefaultTelemetryConfig(NAME, TYPE, null, MANUFACTURER, SW_VERSION, STATUS, PROP);
}
use of org.onlab.osgi.ServiceDirectory in project onos by opennetworkinglab.
the class AclWebResourceTest method setUpMock.
@Before
public void setUpMock() {
expect(mockAclService.getAclRules()).andReturn(rules).anyTimes();
ServiceDirectory testDirectory = new TestServiceDirectory().add(AclService.class, mockAclService).add(AclStore.class, mockAclStore);
setServiceDirectory(testDirectory);
TestUtils.setField(BaseResource.class, "services", testDirectory);
AclRule.idGenerator = new MockIdGenerator();
}
use of org.onlab.osgi.ServiceDirectory in project onos by opennetworkinglab.
the class KubevirtApiConfigWebResourceTest method setUpTest.
/**
* Sets up the global values for all the tests.
*/
@Before
public void setUpTest() {
final CodecManager codecService = new CodecManager();
codecService.activate();
codecService.registerCodec(KubevirtApiConfig.class, new KubevirtApiConfigCodec());
ServiceDirectory testDirectory = new TestServiceDirectory().add(KubevirtApiConfigAdminService.class, mockConfigAdminService).add(CodecService.class, codecService);
setServiceDirectory(testDirectory);
kubevirtApiConfig = DefaultKubevirtApiConfig.builder().scheme(HTTPS).ipAddress(IpAddress.valueOf("10.134.34.223")).port(6443).state(DISCONNECTED).token("tokenMod").caCertData("caCertData").clientCertData("clientCertData").clientKeyData("clientKeyData").datacenterId("DB").clusterId("BD-MEH-CT01").build();
}
use of org.onlab.osgi.ServiceDirectory in project onos by opennetworkinglab.
the class OpenstackFloatingIpWebResourceTest method setUpTest.
/**
* Sets up the global values for all tests.
*/
@Before
public void setUpTest() {
ServiceDirectory testDirectory = new TestServiceDirectory().add(OpenstackRouterAdminService.class, mockOpenstackRouterAdminService).add(OpenstackHaService.class, mockOpenstackHaService);
setServiceDirectory(testDirectory);
}
Aggregations