Search in sources :

Example 1 with KubevirtApiConfigCodec

use of org.onosproject.kubevirtnode.codec.KubevirtApiConfigCodec 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").build();
}
Also used : ServiceDirectory(org.onlab.osgi.ServiceDirectory) TestServiceDirectory(org.onlab.osgi.TestServiceDirectory) KubevirtApiConfigAdminService(org.onosproject.kubevirtnode.api.KubevirtApiConfigAdminService) TestServiceDirectory(org.onlab.osgi.TestServiceDirectory) KubevirtApiConfigCodec(org.onosproject.kubevirtnode.codec.KubevirtApiConfigCodec) CodecManager(org.onosproject.codec.impl.CodecManager) Before(org.junit.Before)

Example 2 with KubevirtApiConfigCodec

use of org.onosproject.kubevirtnode.codec.KubevirtApiConfigCodec 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)

Aggregations

KubevirtApiConfigCodec (org.onosproject.kubevirtnode.codec.KubevirtApiConfigCodec)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 KubevirtApiConfigAdminService (org.onosproject.kubevirtnode.api.KubevirtApiConfigAdminService)1 KubevirtNodeCodec (org.onosproject.kubevirtnode.codec.KubevirtNodeCodec)1 KubevirtPhyInterfaceCodec (org.onosproject.kubevirtnode.codec.KubevirtPhyInterfaceCodec)1 Activate (org.osgi.service.component.annotations.Activate)1