Search in sources :

Example 1 with KubevirtNodeCodec

use of org.onosproject.kubevirtnode.codec.KubevirtNodeCodec in project onos by opennetworkinglab.

the class KubevirtNodeCodecRegister method activate.

@Activate
protected void activate() {
    codecService.registerCodec(KubevirtNode.class, new KubevirtNodeCodec());
    codecService.registerCodec(KubevirtPhyInterface.class, new KubevirtPhyInterfaceCodec());
    codecService.registerCodec(KubevirtApiConfig.class, new KubevirtApiConfigCodec());
    log.info("Started");
}
Also used : KubevirtNodeCodec(org.onosproject.kubevirtnode.codec.KubevirtNodeCodec) KubevirtPhyInterfaceCodec(org.onosproject.kubevirtnode.codec.KubevirtPhyInterfaceCodec) KubevirtApiConfigCodec(org.onosproject.kubevirtnode.codec.KubevirtApiConfigCodec) Activate(org.osgi.service.component.annotations.Activate)

Example 2 with KubevirtNodeCodec

use of org.onosproject.kubevirtnode.codec.KubevirtNodeCodec in project onos by opennetworkinglab.

the class KubevirtNodeWebResourceTest method setUpTest.

/**
 * Sets up the global values for all the tests.
 */
@Before
public void setUpTest() {
    final CodecManager codecService = new CodecManager();
    codecService.activate();
    codecService.registerCodec(KubevirtNode.class, new KubevirtNodeCodec());
    ServiceDirectory testDirectory = new TestServiceDirectory().add(KubevirtNodeAdminService.class, mockKubevirtNodeAdminService).add(CodecService.class, codecService);
    setServiceDirectory(testDirectory);
    kubevirtNode = DefaultKubevirtNode.builder().hostname("worker-node").type(KubevirtNode.Type.WORKER).dataIp(IpAddress.valueOf("10.134.34.222")).managementIp(IpAddress.valueOf("10.134.231.30")).intgBridge(DeviceId.deviceId("of:00000000000000a1")).tunBridge(DeviceId.deviceId("of:00000000000000a2")).state(KubevirtNodeState.INIT).build();
}
Also used : KubevirtNodeCodec(org.onosproject.kubevirtnode.codec.KubevirtNodeCodec) ServiceDirectory(org.onlab.osgi.ServiceDirectory) TestServiceDirectory(org.onlab.osgi.TestServiceDirectory) TestServiceDirectory(org.onlab.osgi.TestServiceDirectory) KubevirtNodeAdminService(org.onosproject.kubevirtnode.api.KubevirtNodeAdminService) CodecManager(org.onosproject.codec.impl.CodecManager) Before(org.junit.Before)

Aggregations

KubevirtNodeCodec (org.onosproject.kubevirtnode.codec.KubevirtNodeCodec)2 Before (org.junit.Before)1 ServiceDirectory (org.onlab.osgi.ServiceDirectory)1 TestServiceDirectory (org.onlab.osgi.TestServiceDirectory)1 CodecManager (org.onosproject.codec.impl.CodecManager)1 KubevirtNodeAdminService (org.onosproject.kubevirtnode.api.KubevirtNodeAdminService)1 KubevirtApiConfigCodec (org.onosproject.kubevirtnode.codec.KubevirtApiConfigCodec)1 KubevirtPhyInterfaceCodec (org.onosproject.kubevirtnode.codec.KubevirtPhyInterfaceCodec)1 Activate (org.osgi.service.component.annotations.Activate)1