Search in sources :

Example 1 with K8sPortCodec

use of org.onosproject.k8snetworking.codec.K8sPortCodec in project onos by opennetworkinglab.

the class K8sPortWebResourceTest method setUpTest.

/**
 * Sets up the global values for all the tests.
 */
@Before
public void setUpTest() {
    final CodecManager codecService = new CodecManager();
    codecService.activate();
    codecService.registerCodec(K8sPort.class, new K8sPortCodec());
    ServiceDirectory testDirectory = new TestServiceDirectory().add(K8sNetworkAdminService.class, mockAdminService).add(CodecService.class, codecService);
    setServiceDirectory(testDirectory);
}
Also used : ServiceDirectory(org.onlab.osgi.ServiceDirectory) TestServiceDirectory(org.onlab.osgi.TestServiceDirectory) TestServiceDirectory(org.onlab.osgi.TestServiceDirectory) CodecManager(org.onosproject.codec.impl.CodecManager) K8sNetworkAdminService(org.onosproject.k8snetworking.api.K8sNetworkAdminService) K8sPortCodec(org.onosproject.k8snetworking.codec.K8sPortCodec) Before(org.junit.Before)

Example 2 with K8sPortCodec

use of org.onosproject.k8snetworking.codec.K8sPortCodec in project onos by opennetworkinglab.

the class K8sNetworkingCodecRegister method activate.

@Activate
protected void activate() {
    codecService.registerCodec(K8sIpam.class, new K8sIpamCodec());
    codecService.registerCodec(K8sNetwork.class, new K8sNetworkCodec());
    codecService.registerCodec(K8sPort.class, new K8sPortCodec());
    log.info("Started");
}
Also used : K8sNetworkCodec(org.onosproject.k8snetworking.codec.K8sNetworkCodec) K8sIpamCodec(org.onosproject.k8snetworking.codec.K8sIpamCodec) K8sPortCodec(org.onosproject.k8snetworking.codec.K8sPortCodec) Activate(org.osgi.service.component.annotations.Activate)

Aggregations

K8sPortCodec (org.onosproject.k8snetworking.codec.K8sPortCodec)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 K8sNetworkAdminService (org.onosproject.k8snetworking.api.K8sNetworkAdminService)1 K8sIpamCodec (org.onosproject.k8snetworking.codec.K8sIpamCodec)1 K8sNetworkCodec (org.onosproject.k8snetworking.codec.K8sNetworkCodec)1 Activate (org.osgi.service.component.annotations.Activate)1