Search in sources :

Example 1 with KubevirtNetworkCodec

use of org.onosproject.kubevirtnetworking.codec.KubevirtNetworkCodec in project onos by opennetworkinglab.

the class KubevirtNetworkingCodecRegister method activate.

@Activate
protected void activate() {
    codecService.registerCodec(KubevirtHostRoute.class, new KubevirtHostRouteCodec());
    codecService.registerCodec(KubevirtIpPool.class, new KubevirtIpPoolCodec());
    codecService.registerCodec(KubevirtNetwork.class, new KubevirtNetworkCodec());
    codecService.registerCodec(KubevirtPort.class, new KubevirtPortCodec());
    codecService.registerCodec(KubevirtRouter.class, new KubevirtRouterCodec());
    codecService.registerCodec(KubevirtFloatingIp.class, new KubevirtFloatingIpCodec());
    codecService.registerCodec(KubevirtSecurityGroup.class, new KubevirtSecurityGroupCodec());
    codecService.registerCodec(KubevirtSecurityGroupRule.class, new KubevirtSecurityGroupRuleCodec());
    codecService.registerCodec(KubevirtLoadBalancer.class, new KubevirtLoadBalancerCodec());
    codecService.registerCodec(KubevirtLoadBalancerRule.class, new KubevirtLoadBalancerRuleCodec());
    log.info("Started");
}
Also used : KubevirtNetworkCodec(org.onosproject.kubevirtnetworking.codec.KubevirtNetworkCodec) KubevirtPortCodec(org.onosproject.kubevirtnetworking.codec.KubevirtPortCodec) KubevirtFloatingIpCodec(org.onosproject.kubevirtnetworking.codec.KubevirtFloatingIpCodec) KubevirtLoadBalancerRuleCodec(org.onosproject.kubevirtnetworking.codec.KubevirtLoadBalancerRuleCodec) KubevirtSecurityGroupCodec(org.onosproject.kubevirtnetworking.codec.KubevirtSecurityGroupCodec) KubevirtLoadBalancerCodec(org.onosproject.kubevirtnetworking.codec.KubevirtLoadBalancerCodec) KubevirtSecurityGroupRuleCodec(org.onosproject.kubevirtnetworking.codec.KubevirtSecurityGroupRuleCodec) KubevirtIpPoolCodec(org.onosproject.kubevirtnetworking.codec.KubevirtIpPoolCodec) KubevirtRouterCodec(org.onosproject.kubevirtnetworking.codec.KubevirtRouterCodec) KubevirtHostRouteCodec(org.onosproject.kubevirtnetworking.codec.KubevirtHostRouteCodec) Activate(org.osgi.service.component.annotations.Activate)

Example 2 with KubevirtNetworkCodec

use of org.onosproject.kubevirtnetworking.codec.KubevirtNetworkCodec in project onos by opennetworkinglab.

the class KubevirtNetworkWebResourceTest method setUpTest.

/**
 * Sets up the global values for all the tests.
 */
@Before
public void setUpTest() {
    final CodecManager codecService = new CodecManager();
    codecService.activate();
    codecService.registerCodec(KubevirtHostRoute.class, new KubevirtHostRouteCodec());
    codecService.registerCodec(KubevirtIpPool.class, new KubevirtIpPoolCodec());
    codecService.registerCodec(KubevirtNetwork.class, new KubevirtNetworkCodec());
    ServiceDirectory testDirectory = new TestServiceDirectory().add(KubevirtNetworkAdminService.class, mockAdminService).add(CodecService.class, codecService);
    setServiceDirectory(testDirectory);
    network = DefaultKubevirtNetwork.builder().networkId("network").name("network").type(KubevirtNetwork.Type.FLAT).cidr("10.10.10.0/24").mtu(1500).gatewayIp(IpAddress.valueOf("10.10.10.1")).defaultRoute(true).ipPool(new KubevirtIpPool(IpAddress.valueOf("10.10.10.100"), IpAddress.valueOf("10.10.10.200"))).build();
}
Also used : KubevirtNetworkCodec(org.onosproject.kubevirtnetworking.codec.KubevirtNetworkCodec) ServiceDirectory(org.onlab.osgi.ServiceDirectory) TestServiceDirectory(org.onlab.osgi.TestServiceDirectory) KubevirtNetworkAdminService(org.onosproject.kubevirtnetworking.api.KubevirtNetworkAdminService) TestServiceDirectory(org.onlab.osgi.TestServiceDirectory) CodecManager(org.onosproject.codec.impl.CodecManager) KubevirtIpPool(org.onosproject.kubevirtnetworking.api.KubevirtIpPool) KubevirtIpPoolCodec(org.onosproject.kubevirtnetworking.codec.KubevirtIpPoolCodec) KubevirtHostRouteCodec(org.onosproject.kubevirtnetworking.codec.KubevirtHostRouteCodec) Before(org.junit.Before)

Aggregations

KubevirtHostRouteCodec (org.onosproject.kubevirtnetworking.codec.KubevirtHostRouteCodec)2 KubevirtIpPoolCodec (org.onosproject.kubevirtnetworking.codec.KubevirtIpPoolCodec)2 KubevirtNetworkCodec (org.onosproject.kubevirtnetworking.codec.KubevirtNetworkCodec)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 KubevirtIpPool (org.onosproject.kubevirtnetworking.api.KubevirtIpPool)1 KubevirtNetworkAdminService (org.onosproject.kubevirtnetworking.api.KubevirtNetworkAdminService)1 KubevirtFloatingIpCodec (org.onosproject.kubevirtnetworking.codec.KubevirtFloatingIpCodec)1 KubevirtLoadBalancerCodec (org.onosproject.kubevirtnetworking.codec.KubevirtLoadBalancerCodec)1 KubevirtLoadBalancerRuleCodec (org.onosproject.kubevirtnetworking.codec.KubevirtLoadBalancerRuleCodec)1 KubevirtPortCodec (org.onosproject.kubevirtnetworking.codec.KubevirtPortCodec)1 KubevirtRouterCodec (org.onosproject.kubevirtnetworking.codec.KubevirtRouterCodec)1 KubevirtSecurityGroupCodec (org.onosproject.kubevirtnetworking.codec.KubevirtSecurityGroupCodec)1 KubevirtSecurityGroupRuleCodec (org.onosproject.kubevirtnetworking.codec.KubevirtSecurityGroupRuleCodec)1 Activate (org.osgi.service.component.annotations.Activate)1