use of org.onosproject.kubevirtnetworking.codec.KubevirtIpPoolCodec 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");
}
use of org.onosproject.kubevirtnetworking.codec.KubevirtIpPoolCodec 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();
}
Aggregations