diff --git a/apps/kubevirt-node/app/BUILD b/apps/kubevirt-node/app/BUILD
index 196953d..601bc8a 100644
--- a/apps/kubevirt-node/app/BUILD
+++ b/apps/kubevirt-node/app/BUILD
@@ -17,6 +17,7 @@
     "//core/api:onos-api-tests",
     "//core/common:onos-core-common-tests",
     "//web/api:onos-rest-tests",
+    "@minimal_json//jar",
 ]
 
 osgi_jar_with_tests(
diff --git a/apps/kubevirt-node/app/src/main/java/org/onosproject/kubevirtnode/codec/KubevirtNodeCodec.java b/apps/kubevirt-node/app/src/main/java/org/onosproject/kubevirtnode/codec/KubevirtNodeCodec.java
new file mode 100644
index 0000000..17ed505
--- /dev/null
+++ b/apps/kubevirt-node/app/src/main/java/org/onosproject/kubevirtnode/codec/KubevirtNodeCodec.java
@@ -0,0 +1,136 @@
+/*
+ * Copyright 2020-present Open Networking Foundation
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.onosproject.kubevirtnode.codec;
+
+import com.fasterxml.jackson.databind.JsonNode;
+import com.fasterxml.jackson.databind.node.ArrayNode;
+import com.fasterxml.jackson.databind.node.ObjectNode;
+import org.onlab.packet.IpAddress;
+import org.onosproject.codec.CodecContext;
+import org.onosproject.codec.JsonCodec;
+import org.onosproject.kubevirtnode.api.DefaultKubevirtNode;
+import org.onosproject.kubevirtnode.api.KubevirtNode;
+import org.onosproject.kubevirtnode.api.KubevirtNodeState;
+import org.onosproject.kubevirtnode.api.KubevirtPhyInterface;
+import org.onosproject.net.DeviceId;
+import org.slf4j.Logger;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.stream.IntStream;
+
+import static com.google.common.base.Preconditions.checkNotNull;
+import static org.onlab.util.Tools.nullIsIllegal;
+import static org.onosproject.kubevirtnode.api.Constants.DATA_IP;
+import static org.onosproject.kubevirtnode.api.Constants.HOST_NAME;
+import static org.onosproject.kubevirtnode.api.Constants.MANAGEMENT_IP;
+import static org.slf4j.LoggerFactory.getLogger;
+
+/**
+ * Kubevirt node codec used for serializing and de-serializing JSON string.
+ */
+public final class KubevirtNodeCodec extends JsonCodec<KubevirtNode> {
+
+    private final Logger log = getLogger(getClass());
+
+    private static final String TYPE = "type";
+    private static final String INTEGRATION_BRIDGE = "integrationBridge";
+    private static final String STATE = "state";
+    private static final String PHYSICAL_INTERFACES = "phyIntfs";
+
+    private static final String MISSING_MESSAGE = " is required in OpenstackNode";
+
+    @Override
+    public ObjectNode encode(KubevirtNode node, CodecContext context) {
+        checkNotNull(node, "Kubevirt node cannot be null");
+
+        ObjectNode result = context.mapper().createObjectNode()
+                .put(HOST_NAME, node.hostname())
+                .put(TYPE, node.type().name())
+                .put(STATE, node.state().name())
+                .put(MANAGEMENT_IP, node.managementIp().toString());
+
+        // serialize integration bridge config
+        if (node.intgBridge() != null) {
+            result.put(INTEGRATION_BRIDGE, node.intgBridge().toString());
+        }
+
+        // serialize data IP only if it presents
+        if (node.dataIp() != null) {
+            result.put(DATA_IP, node.dataIp().toString());
+        }
+
+        // serialize physical interfaces, it is valid only if any of physical interface presents
+        if (node.phyIntfs() != null && !node.phyIntfs().isEmpty()) {
+            ArrayNode phyIntfs = context.mapper().createArrayNode();
+            node.phyIntfs().forEach(phyIntf -> {
+                ObjectNode phyIntfJson =
+                        context.codec(KubevirtPhyInterface.class).encode(phyIntf, context);
+                phyIntfs.add(phyIntfJson);
+            });
+            result.set(PHYSICAL_INTERFACES, phyIntfs);
+        }
+
+        return result;
+    }
+
+    @Override
+    public KubevirtNode decode(ObjectNode json, CodecContext context) {
+        if (json == null || !json.isObject()) {
+            return null;
+        }
+
+        String hostname = nullIsIllegal(json.get(HOST_NAME).asText(),
+                HOST_NAME + MISSING_MESSAGE);
+        String type = nullIsIllegal(json.get(TYPE).asText(),
+                TYPE + MISSING_MESSAGE);
+        String mIp = nullIsIllegal(json.get(MANAGEMENT_IP).asText(),
+                MANAGEMENT_IP + MISSING_MESSAGE);
+
+        KubevirtNode.Builder nodeBuilder = DefaultKubevirtNode.builder()
+                .hostname(hostname)
+                .type(KubevirtNode.Type.valueOf(type))
+                .state(KubevirtNodeState.INIT)
+                .managementIp(IpAddress.valueOf(mIp));
+
+        if (json.get(DATA_IP) != null) {
+            nodeBuilder.dataIp(IpAddress.valueOf(json.get(DATA_IP).asText()));
+        }
+
+        JsonNode intBridgeJson = json.get(INTEGRATION_BRIDGE);
+        if (intBridgeJson != null) {
+            nodeBuilder.intgBridge(DeviceId.deviceId(intBridgeJson.asText()));
+        }
+
+        // parse physical interfaces
+        List<KubevirtPhyInterface> phyIntfs = new ArrayList<>();
+        JsonNode phyIntfsJson = json.get(PHYSICAL_INTERFACES);
+        if (phyIntfsJson != null) {
+            final JsonCodec<KubevirtPhyInterface>
+                    phyIntfCodec = context.codec(KubevirtPhyInterface.class);
+
+            IntStream.range(0, phyIntfsJson.size()).forEach(i -> {
+                ObjectNode intfJson = get(phyIntfsJson, i);
+                phyIntfs.add(phyIntfCodec.decode(intfJson, context));
+            });
+        }
+        nodeBuilder.phyIntfs(phyIntfs);
+
+        log.trace("node is {}", nodeBuilder.build().toString());
+
+        return nodeBuilder.build();
+    }
+}
diff --git a/apps/kubevirt-node/app/src/main/java/org/onosproject/kubevirtnode/codec/KubevirtPhyInterfaceCodec.java b/apps/kubevirt-node/app/src/main/java/org/onosproject/kubevirtnode/codec/KubevirtPhyInterfaceCodec.java
new file mode 100644
index 0000000..3ba0164
--- /dev/null
+++ b/apps/kubevirt-node/app/src/main/java/org/onosproject/kubevirtnode/codec/KubevirtPhyInterfaceCodec.java
@@ -0,0 +1,62 @@
+/*
+ * Copyright 2020-present Open Networking Foundation
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.onosproject.kubevirtnode.codec;
+
+import com.fasterxml.jackson.databind.node.ObjectNode;
+import org.onosproject.codec.CodecContext;
+import org.onosproject.codec.JsonCodec;
+import org.onosproject.kubevirtnode.api.DefaultKubevirtPhyInterface;
+import org.onosproject.kubevirtnode.api.KubevirtPhyInterface;
+
+import static com.google.common.base.Preconditions.checkNotNull;
+import static org.onlab.util.Tools.nullIsIllegal;
+
+/**
+ * Kubevirt physical interface codec used for serializing and de-serializing JSON string.
+ */
+public final class KubevirtPhyInterfaceCodec extends JsonCodec<KubevirtPhyInterface> {
+
+    private static final String NETWORK = "network";
+    private static final String INTERFACE = "intf";
+
+    private static final String MISSING_MESSAGE = " is required in KubevirtPhyInterface";
+
+    @Override
+    public ObjectNode encode(KubevirtPhyInterface phyIntf, CodecContext context) {
+        checkNotNull(phyIntf, "Kubevirt physical interface cannot be null");
+
+        return context.mapper().createObjectNode()
+                .put(NETWORK, phyIntf.network())
+                .put(INTERFACE, phyIntf.intf());
+    }
+
+    @Override
+    public KubevirtPhyInterface decode(ObjectNode json, CodecContext context) {
+        if (json == null || !json.isObject()) {
+            return null;
+        }
+
+        String network = nullIsIllegal(json.get(NETWORK).asText(),
+                NETWORK + MISSING_MESSAGE);
+        String intf = nullIsIllegal(json.get(INTERFACE).asText(),
+                INTERFACE + MISSING_MESSAGE);
+
+        return DefaultKubevirtPhyInterface.builder()
+                .network(network)
+                .intf(intf)
+                .build();
+    }
+}
diff --git a/apps/kubevirt-node/app/src/main/java/org/onosproject/kubevirtnode/web/KubevirtNodeCodecRegister.java b/apps/kubevirt-node/app/src/main/java/org/onosproject/kubevirtnode/web/KubevirtNodeCodecRegister.java
new file mode 100644
index 0000000..efdf164
--- /dev/null
+++ b/apps/kubevirt-node/app/src/main/java/org/onosproject/kubevirtnode/web/KubevirtNodeCodecRegister.java
@@ -0,0 +1,58 @@
+/*
+ * Copyright 2020-present Open Networking Foundation
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.onosproject.kubevirtnode.web;
+
+import org.onosproject.codec.CodecService;
+import org.onosproject.kubevirtnode.api.KubevirtNode;
+import org.onosproject.kubevirtnode.api.KubevirtPhyInterface;
+import org.onosproject.kubevirtnode.codec.KubevirtNodeCodec;
+import org.onosproject.kubevirtnode.codec.KubevirtPhyInterfaceCodec;
+import org.osgi.service.component.annotations.Activate;
+import org.osgi.service.component.annotations.Component;
+import org.osgi.service.component.annotations.Deactivate;
+import org.osgi.service.component.annotations.Reference;
+import org.osgi.service.component.annotations.ReferenceCardinality;
+import org.slf4j.Logger;
+
+import static org.slf4j.LoggerFactory.getLogger;
+
+/**
+ * Implementation of the JSON codec brokering service for KubevirtNode.
+ */
+@Component(immediate = true)
+public class KubevirtNodeCodecRegister {
+
+    private final Logger log = getLogger(getClass());
+
+    @Reference(cardinality = ReferenceCardinality.MANDATORY)
+    protected CodecService codecService;
+
+    @Activate
+    protected void activate() {
+        codecService.registerCodec(KubevirtNode.class, new KubevirtNodeCodec());
+        codecService.registerCodec(KubevirtPhyInterface.class, new KubevirtPhyInterfaceCodec());
+
+        log.info("Started");
+    }
+
+    @Deactivate
+    protected void deactivate() {
+        codecService.unregisterCodec(KubevirtNode.class);
+        codecService.unregisterCodec(KubevirtPhyInterface.class);
+
+        log.info("Stopped");
+    }
+}
diff --git a/apps/kubevirt-node/app/src/test/java/org/onosproject/kubevirtnode/codec/KubevirtNodeCodecTest.java b/apps/kubevirt-node/app/src/test/java/org/onosproject/kubevirtnode/codec/KubevirtNodeCodecTest.java
new file mode 100644
index 0000000..f8761bc
--- /dev/null
+++ b/apps/kubevirt-node/app/src/test/java/org/onosproject/kubevirtnode/codec/KubevirtNodeCodecTest.java
@@ -0,0 +1,184 @@
+/*
+ * Copyright 2020-present Open Networking Foundation
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.onosproject.kubevirtnode.codec;
+
+import com.fasterxml.jackson.databind.JsonNode;
+import com.fasterxml.jackson.databind.ObjectMapper;
+import com.fasterxml.jackson.databind.node.ObjectNode;
+import com.google.common.collect.ImmutableList;
+import org.hamcrest.MatcherAssert;
+import org.junit.Before;
+import org.junit.Test;
+import org.onlab.packet.IpAddress;
+import org.onosproject.codec.CodecContext;
+import org.onosproject.codec.JsonCodec;
+import org.onosproject.codec.impl.CodecManager;
+import org.onosproject.core.CoreService;
+import org.onosproject.kubevirtnode.api.DefaultKubevirtNode;
+import org.onosproject.kubevirtnode.api.DefaultKubevirtPhyInterface;
+import org.onosproject.kubevirtnode.api.KubevirtNode;
+import org.onosproject.kubevirtnode.api.KubevirtNodeState;
+import org.onosproject.kubevirtnode.api.KubevirtPhyInterface;
+import org.onosproject.net.DeviceId;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.HashMap;
+import java.util.Map;
+
+import static org.easymock.EasyMock.createMock;
+import static org.easymock.EasyMock.expect;
+import static org.easymock.EasyMock.replay;
+import static org.hamcrest.MatcherAssert.assertThat;
+import static org.hamcrest.Matchers.is;
+import static org.hamcrest.Matchers.notNullValue;
+import static org.onosproject.kubevirtnode.codec.KubevirtNodeJsonMatcher.matchesKubevirtNode;
+import static org.onosproject.net.NetTestTools.APP_ID;
+
+/**
+ * Unit tests for KubevirtNode codec.
+ */
+public class KubevirtNodeCodecTest {
+    MockCodecContext context;
+
+    JsonCodec<KubevirtNode> kubevirtNodeCodec;
+    JsonCodec<KubevirtPhyInterface> kubevirtPhyInterfaceJsonCodec;
+
+    final CoreService mockCoreService = createMock(CoreService.class);
+    private static final String REST_APP_ID = "org.onosproject.rest";
+
+    @Before
+    public void setUp() {
+        context = new MockCodecContext();
+        kubevirtNodeCodec = new KubevirtNodeCodec();
+        kubevirtPhyInterfaceJsonCodec = new KubevirtPhyInterfaceCodec();
+
+        assertThat(kubevirtNodeCodec, notNullValue());
+        assertThat(kubevirtPhyInterfaceJsonCodec, notNullValue());
+
+        expect(mockCoreService.registerApplication(REST_APP_ID))
+                .andReturn(APP_ID).anyTimes();
+        replay(mockCoreService);
+        context.registerService(CoreService.class, mockCoreService);
+    }
+
+    /**
+     * Tests the kubevirt compute node encoding.
+     */
+    @Test
+    public void testKubevirtComputeNodeEncode() {
+        KubevirtPhyInterface phyIntf1 = DefaultKubevirtPhyInterface.builder()
+                .network("mgmtnetwork")
+                .intf("eth3")
+                .build();
+
+        KubevirtPhyInterface phyIntf2 = DefaultKubevirtPhyInterface.builder()
+                .network("oamnetwork")
+                .intf("eth4")
+                .build();
+
+        KubevirtNode node = DefaultKubevirtNode.builder()
+                .hostname("worker")
+                .type(KubevirtNode.Type.WORKER)
+                .state(KubevirtNodeState.INIT)
+                .managementIp(IpAddress.valueOf("10.10.10.1"))
+                .intgBridge(DeviceId.deviceId("br-int"))
+                .dataIp(IpAddress.valueOf("20.20.20.2"))
+                .phyIntfs(ImmutableList.of(phyIntf1, phyIntf2))
+                .build();
+
+        ObjectNode nodeJson = kubevirtNodeCodec.encode(node, context);
+        assertThat(nodeJson, matchesKubevirtNode(node));
+    }
+
+    /**
+     * Tests the kubevirt compute node decoding.
+     *
+     * @throws IOException io exception
+     */
+    @Test
+    public void testKubevirtComputeNodeDecode() throws IOException {
+        KubevirtNode node = getKubevirtNode("KubevirtWorkerNode.json");
+
+        assertThat(node.hostname(), is("worker-01"));
+        assertThat(node.type().name(), is("WORKER"));
+        assertThat(node.managementIp().toString(), is("172.16.130.4"));
+        assertThat(node.dataIp().toString(), is("172.16.130.4"));
+        assertThat(node.intgBridge().toString(), is("of:00000000000000a1"));
+        assertThat(node.phyIntfs().size(), is(2));
+
+        node.phyIntfs().forEach(intf -> {
+            if (intf.network().equals("mgmtnetwork")) {
+                assertThat(intf.intf(), is("eth3"));
+            }
+            if (intf.network().equals("oamnetwork")) {
+                assertThat(intf.intf(), is("eth4"));
+            }
+        });
+    }
+
+    private KubevirtNode getKubevirtNode(String resourceName) throws IOException {
+        InputStream jsonStream = KubevirtNodeCodecTest.class.getResourceAsStream(resourceName);
+        JsonNode json = context.mapper().readTree(jsonStream);
+        MatcherAssert.assertThat(json, notNullValue());
+        KubevirtNode node = kubevirtNodeCodec.decode((ObjectNode) json, context);
+        assertThat(node, notNullValue());
+        return node;
+    }
+
+    /**
+     * Mock codec context for use in codec unit tests.
+     */
+    private class MockCodecContext implements CodecContext {
+
+        private final ObjectMapper mapper = new ObjectMapper();
+        private final CodecManager manager = new CodecManager();
+        private final Map<Class<?>, Object> services = new HashMap<>();
+
+        /**
+         * Constructs a new mock codec context.
+         */
+        public MockCodecContext() {
+            manager.activate();
+        }
+
+        @Override
+        public ObjectMapper mapper() {
+            return mapper;
+        }
+
+        @SuppressWarnings("unchecked")
+        @Override
+        public <T> JsonCodec<T> codec(Class<T> entityClass) {
+            if (entityClass == KubevirtPhyInterface.class) {
+                return (JsonCodec<T>) kubevirtPhyInterfaceJsonCodec;
+            }
+
+            return manager.getCodec(entityClass);
+        }
+
+        @SuppressWarnings("unchecked")
+        @Override
+        public <T> T getService(Class<T> serviceClass) {
+            return (T) services.get(serviceClass);
+        }
+
+        // for registering mock services
+        public <T> void registerService(Class<T> serviceClass, T impl) {
+            services.put(serviceClass, impl);
+        }
+    }
+}
diff --git a/apps/kubevirt-node/app/src/test/java/org/onosproject/kubevirtnode/codec/KubevirtNodeJsonArrayMatcher.java b/apps/kubevirt-node/app/src/test/java/org/onosproject/kubevirtnode/codec/KubevirtNodeJsonArrayMatcher.java
new file mode 100644
index 0000000..1e51616
--- /dev/null
+++ b/apps/kubevirt-node/app/src/test/java/org/onosproject/kubevirtnode/codec/KubevirtNodeJsonArrayMatcher.java
@@ -0,0 +1,71 @@
+/*
+ * Copyright 2020-present Open Networking Foundation
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.onosproject.kubevirtnode.codec;
+
+import com.eclipsesource.json.JsonArray;
+import com.eclipsesource.json.JsonObject;
+import org.hamcrest.Description;
+import org.hamcrest.TypeSafeMatcher;
+import org.onosproject.kubevirtnode.api.KubevirtNode;
+
+/**
+ * Hamcrest matcher for kubevirt node array.
+ */
+public class KubevirtNodeJsonArrayMatcher extends TypeSafeMatcher<JsonArray> {
+
+    private final KubevirtNode node;
+    private String reason = "";
+
+    public KubevirtNodeJsonArrayMatcher(KubevirtNode node) {
+        this.node = node;
+    }
+
+    @Override
+    protected boolean matchesSafely(JsonArray json) {
+        boolean nodeFound = false;
+        for (int jsonNodeIndex = 0; jsonNodeIndex < json.size(); jsonNodeIndex++) {
+            final JsonObject jsonNode = json.get(jsonNodeIndex).asObject();
+
+            final String hostname = node.hostname();
+            final String jsonHostname = jsonNode.get("hostname").asString();
+            if (jsonHostname.equals(hostname)) {
+                nodeFound = true;
+            }
+        }
+
+        if (!nodeFound) {
+            reason = "Node with hostname " + node.hostname() + " not found";
+            return false;
+        } else {
+            return true;
+        }
+    }
+
+    @Override
+    public void describeTo(Description description) {
+        description.appendText(reason);
+    }
+
+    /**
+     * Factory to allocate a node array matcher.
+     *
+     * @param node node object we are looking for
+     * @return matcher
+     */
+    public static KubevirtNodeJsonArrayMatcher hasNode(KubevirtNode node) {
+        return new KubevirtNodeJsonArrayMatcher(node);
+    }
+}
diff --git a/apps/kubevirt-node/app/src/test/java/org/onosproject/kubevirtnode/codec/KubevirtNodeJsonMatcher.java b/apps/kubevirt-node/app/src/test/java/org/onosproject/kubevirtnode/codec/KubevirtNodeJsonMatcher.java
new file mode 100644
index 0000000..92af688
--- /dev/null
+++ b/apps/kubevirt-node/app/src/test/java/org/onosproject/kubevirtnode/codec/KubevirtNodeJsonMatcher.java
@@ -0,0 +1,136 @@
+/*
+ * Copyright 2020-present Open Networking Foundation
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.onosproject.kubevirtnode.codec;
+
+import com.fasterxml.jackson.databind.JsonNode;
+import org.hamcrest.Description;
+import org.hamcrest.TypeSafeDiagnosingMatcher;
+import org.onosproject.kubevirtnode.api.KubevirtNode;
+import org.onosproject.kubevirtnode.api.KubevirtPhyInterface;
+import org.onosproject.kubevirtnode.api.Constants;
+
+/**
+ * Hamcrest matcher for kubevirt node.
+ */
+public final class KubevirtNodeJsonMatcher extends TypeSafeDiagnosingMatcher<JsonNode> {
+
+    private final KubevirtNode node;
+    private static final String INTEGRATION_BRIDGE = "integrationBridge";
+    private static final String STATE = "state";
+    private static final String PHYSICAL_INTERFACES = "phyIntfs";
+
+    private KubevirtNodeJsonMatcher(KubevirtNode node) {
+        this.node = node;
+    }
+
+    @Override
+    protected boolean matchesSafely(JsonNode jsonNode, Description description) {
+        // check hostname
+        String jsonHostname = jsonNode.get(Constants.HOST_NAME).asText();
+        String hostname = node.hostname();
+        if (!jsonHostname.equals(hostname)) {
+            description.appendText("hostname was " + jsonHostname);
+            return false;
+        }
+
+        // check type
+        String jsonType = jsonNode.get(Constants.TYPE).asText();
+        String type = node.type().name();
+        if (!jsonType.equals(type)) {
+            description.appendText("type was " + jsonType);
+            return false;
+        }
+
+        // check management IP
+        String jsonMgmtIp = jsonNode.get(Constants.MANAGEMENT_IP).asText();
+        String mgmtIp = node.managementIp().toString();
+        if (!jsonMgmtIp.equals(mgmtIp)) {
+            description.appendText("management IP was " + jsonMgmtIp);
+            return false;
+        }
+
+        // check integration bridge
+        JsonNode jsonIntgBridge = jsonNode.get(INTEGRATION_BRIDGE);
+        if (jsonIntgBridge != null) {
+            String intgBridge = node.intgBridge().toString();
+            if (!jsonIntgBridge.asText().equals(intgBridge)) {
+                description.appendText("integration bridge was " + jsonIntgBridge);
+                return false;
+            }
+        }
+
+        // check state
+        String jsonState = jsonNode.get(STATE).asText();
+        String state = node.state().name();
+        if (!jsonState.equals(state)) {
+            description.appendText("state was " + jsonState);
+            return false;
+        }
+
+        // check data IP
+        JsonNode jsonDataIp = jsonNode.get(Constants.DATA_IP);
+        if (jsonDataIp != null) {
+            String dataIp = node.dataIp().toString();
+            if (!jsonDataIp.asText().equals(dataIp)) {
+                description.appendText("Data IP was " + jsonDataIp.asText());
+                return false;
+            }
+        }
+
+        // check physical interfaces
+        JsonNode jsonPhyIntfs = jsonNode.get(PHYSICAL_INTERFACES);
+        if (jsonPhyIntfs != null) {
+            if (jsonPhyIntfs.size() != node.phyIntfs().size()) {
+                description.appendText("physical interface size was " + jsonPhyIntfs.size());
+                return false;
+            }
+
+            for (KubevirtPhyInterface phyIntf : node.phyIntfs()) {
+                boolean intfFound = false;
+                for (int intfIndex = 0; intfIndex < jsonPhyIntfs.size(); intfIndex++) {
+                    KubevirtPhyInterfaceJsonMatcher intfMatcher =
+                            KubevirtPhyInterfaceJsonMatcher.matchesKubevirtPhyInterface(phyIntf);
+                    if (intfMatcher.matches(jsonPhyIntfs.get(intfIndex))) {
+                        intfFound = true;
+                        break;
+                    }
+                }
+
+                if (!intfFound) {
+                    description.appendText("PhyIntf not found " + phyIntf.toString());
+                    return false;
+                }
+            }
+        }
+
+        return true;
+    }
+
+    @Override
+    public void describeTo(Description description) {
+        description.appendText(node.toString());
+    }
+
+    /**
+     * Factory to allocate an kubevirt node matcher.
+     *
+     * @param node kubevirt node object we are looking for
+     * @return matcher
+     */
+    public static KubevirtNodeJsonMatcher matchesKubevirtNode(KubevirtNode node) {
+        return new KubevirtNodeJsonMatcher(node);
+    }
+}
diff --git a/apps/kubevirt-node/app/src/test/java/org/onosproject/kubevirtnode/codec/KubevirtPhyInterfaceJsonMatcher.java b/apps/kubevirt-node/app/src/test/java/org/onosproject/kubevirtnode/codec/KubevirtPhyInterfaceJsonMatcher.java
new file mode 100644
index 0000000..cecdc4a
--- /dev/null
+++ b/apps/kubevirt-node/app/src/test/java/org/onosproject/kubevirtnode/codec/KubevirtPhyInterfaceJsonMatcher.java
@@ -0,0 +1,72 @@
+/*
+ * Copyright 2020-present Open Networking Foundation
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.onosproject.kubevirtnode.codec;
+
+import com.fasterxml.jackson.databind.JsonNode;
+import org.hamcrest.Description;
+import org.hamcrest.TypeSafeDiagnosingMatcher;
+import org.onosproject.kubevirtnode.api.KubevirtPhyInterface;
+
+/**
+ * Hamcrest matcher for kubevirt physical interface.
+ */
+public final class KubevirtPhyInterfaceJsonMatcher extends TypeSafeDiagnosingMatcher<JsonNode> {
+
+    private final KubevirtPhyInterface phyIntf;
+    private static final String NETWORK = "network";
+    private static final String INTERFACE = "intf";
+
+    private KubevirtPhyInterfaceJsonMatcher(KubevirtPhyInterface phyIntf) {
+        this.phyIntf = phyIntf;
+    }
+
+    @Override
+    protected boolean matchesSafely(JsonNode jsonNode, Description description) {
+        // check network name
+        String jsonNetwork = jsonNode.get(NETWORK).asText();
+        String network = phyIntf.network();
+        if (!jsonNetwork.equals(network)) {
+            description.appendText("network name was " + jsonNetwork);
+            return false;
+        }
+
+        // check interface name
+        String jsonIntf = jsonNode.get(INTERFACE).asText();
+        String intf = phyIntf.intf();
+        if (!jsonIntf.equals(intf)) {
+            description.appendText("interface name was " + jsonIntf);
+            return false;
+        }
+
+        return true;
+    }
+
+    @Override
+    public void describeTo(Description description) {
+        description.appendText(phyIntf.toString());
+    }
+
+    /**
+     * Factory to allocate an openstack physical interface matcher.
+     *
+     * @param phyIntf kubevirt physical interface object we are looking for
+     * @return matcher
+     */
+    public static KubevirtPhyInterfaceJsonMatcher
+                    matchesKubevirtPhyInterface(KubevirtPhyInterface phyIntf) {
+        return new KubevirtPhyInterfaceJsonMatcher(phyIntf);
+    }
+}
diff --git a/apps/kubevirt-node/app/src/test/java/org/onosproject/kubevirtnode/web/KubevirtNodeCodecRegisterTest.java b/apps/kubevirt-node/app/src/test/java/org/onosproject/kubevirtnode/web/KubevirtNodeCodecRegisterTest.java
new file mode 100644
index 0000000..9335153
--- /dev/null
+++ b/apps/kubevirt-node/app/src/test/java/org/onosproject/kubevirtnode/web/KubevirtNodeCodecRegisterTest.java
@@ -0,0 +1,88 @@
+/*
+ * Copyright 2020-present Open Networking Foundation
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.onosproject.kubevirtnode.web;
+
+import com.google.common.collect.ImmutableSet;
+import com.google.common.collect.Maps;
+import org.junit.Test;
+import org.onlab.junit.TestUtils;
+import org.onosproject.codec.CodecService;
+import org.onosproject.codec.JsonCodec;
+import org.onosproject.kubevirtnode.api.KubevirtNode;
+import org.onosproject.kubevirtnode.api.KubevirtPhyInterface;
+import org.onosproject.kubevirtnode.codec.KubevirtNodeCodec;
+import org.onosproject.kubevirtnode.codec.KubevirtPhyInterfaceCodec;
+
+import java.util.Map;
+import java.util.Set;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNull;
+
+/**
+ * Unit test for kubevirt node codec register.
+ */
+public final class KubevirtNodeCodecRegisterTest {
+
+    private KubevirtNodeCodecRegister register;
+
+    /**
+     * Tests codec register activation and deactivation.
+     */
+    @Test
+    public void testActivateDeactivate() {
+        register = new KubevirtNodeCodecRegister();
+        CodecService codecService = new TestCodecService();
+
+        TestUtils.setField(register, "codecService", codecService);
+        register.activate();
+
+        assertEquals(KubevirtNodeCodec.class.getName(),
+                codecService.getCodec(KubevirtNode.class).getClass().getName());
+        assertEquals(KubevirtPhyInterfaceCodec.class.getName(),
+                codecService.getCodec(KubevirtPhyInterface.class).getClass().getName());
+
+        register.deactivate();
+
+        assertNull(codecService.getCodec(KubevirtNode.class));
+        assertNull(codecService.getCodec(KubevirtPhyInterface.class));
+    }
+
+    private static class TestCodecService implements CodecService {
+
+        private Map<String, JsonCodec> codecMap = Maps.newConcurrentMap();
+
+        @Override
+        public Set<Class<?>> getCodecs() {
+            return ImmutableSet.of();
+        }
+
+        @Override
+        public <T> JsonCodec<T> getCodec(Class<T> entityClass) {
+            return codecMap.get(entityClass.getName());
+        }
+
+        @Override
+        public <T> void registerCodec(Class<T> entityClass, JsonCodec<T> codec) {
+            codecMap.put(entityClass.getName(), codec);
+        }
+
+        @Override
+        public void unregisterCodec(Class<?> entityClass) {
+            codecMap.remove(entityClass.getName());
+        }
+    }
+}
diff --git a/apps/kubevirt-node/app/src/test/resources/org/onosproject/kubevirtnode/codec/KubevirtWorkerNode.json b/apps/kubevirt-node/app/src/test/resources/org/onosproject/kubevirtnode/codec/KubevirtWorkerNode.json
new file mode 100644
index 0000000..70b449d
--- /dev/null
+++ b/apps/kubevirt-node/app/src/test/resources/org/onosproject/kubevirtnode/codec/KubevirtWorkerNode.json
@@ -0,0 +1,17 @@
+{
+  "hostname": "worker-01",
+  "type": "WORKER",
+  "managementIp": "172.16.130.4",
+  "dataIp": "172.16.130.4",
+  "integrationBridge": "of:00000000000000a1",
+  "phyIntfs": [
+    {
+      "network": "mgmtnetwork",
+      "intf": "eth3"
+    },
+    {
+      "network": "oamnetwork",
+      "intf": "eth4"
+    }
+  ]
+}
\ No newline at end of file
