Search in sources :

Example 6 with DefaultK8sIpam

use of org.onosproject.k8snetworking.api.DefaultK8sIpam in project onos by opennetworkinglab.

the class K8sIpamCodecTest method testK8sIpamEncode.

/**
 * Tests the kubernetes IPAM encoding.
 */
@Test
public void testK8sIpamEncode() {
    K8sIpam ipam = new DefaultK8sIpam("network-1-10.10.10.10", IpAddress.valueOf("10.10.10.10"), "network-1");
    ObjectNode nodeJson = k8sIpamCodec.encode(ipam, context);
    assertThat(nodeJson, matchesK8sIpam(ipam));
}
Also used : DefaultK8sIpam(org.onosproject.k8snetworking.api.DefaultK8sIpam) K8sIpamJsonMatcher.matchesK8sIpam(org.onosproject.k8snetworking.codec.K8sIpamJsonMatcher.matchesK8sIpam) K8sIpam(org.onosproject.k8snetworking.api.K8sIpam) DefaultK8sIpam(org.onosproject.k8snetworking.api.DefaultK8sIpam) ObjectNode(com.fasterxml.jackson.databind.node.ObjectNode) Test(org.junit.Test)

Aggregations

DefaultK8sIpam (org.onosproject.k8snetworking.api.DefaultK8sIpam)6 IpAddress (org.onlab.packet.IpAddress)3 K8sIpam (org.onosproject.k8snetworking.api.K8sIpam)3 ObjectNode (com.fasterxml.jackson.databind.node.ObjectNode)2 GET (javax.ws.rs.GET)1 Path (javax.ws.rs.Path)1 Produces (javax.ws.rs.Produces)1 Test (org.junit.Test)1 K8sNetwork (org.onosproject.k8snetworking.api.K8sNetwork)1 K8sIpamJsonMatcher.matchesK8sIpam (org.onosproject.k8snetworking.codec.K8sIpamJsonMatcher.matchesK8sIpam)1