Search in sources :

Example 11 with KubevirtNodeAdminService

use of org.onosproject.kubevirtnode.api.KubevirtNodeAdminService in project onos by opennetworkinglab.

the class KubevirtSyncRulesCommand method doExecute.

@Override
protected void doExecute() throws Exception {
    // All handlers in this application reacts the node complete event and
    // tries to re-configure flow rules for the complete node.
    KubevirtNodeAdminService nodeAdminService = get(KubevirtNodeAdminService.class);
    if (nodeAdminService == null) {
        error("Failed to re-install flow rules for kubevirt networking.");
        return;
    }
    nodeAdminService.completeNodes().forEach(node -> syncRulesBaseForNode(nodeAdminService, node));
    print("Done all flow rules synchronization, but some nodes may have issues.");
}
Also used : KubevirtNodeAdminService(org.onosproject.kubevirtnode.api.KubevirtNodeAdminService)

Aggregations

KubevirtNodeAdminService (org.onosproject.kubevirtnode.api.KubevirtNodeAdminService)11 KubevirtNode (org.onosproject.kubevirtnode.api.KubevirtNode)9 Produces (javax.ws.rs.Produces)8 Path (javax.ws.rs.Path)6 GET (javax.ws.rs.GET)5 Consumes (javax.ws.rs.Consumes)4 INDENT_OUTPUT (com.fasterxml.jackson.databind.SerializationFeature.INDENT_OUTPUT)2 DELETE (javax.ws.rs.DELETE)2 POST (javax.ws.rs.POST)2 PUT (javax.ws.rs.PUT)2 UriBuilder (javax.ws.rs.core.UriBuilder)2 JsonNode (com.fasterxml.jackson.databind.JsonNode)1 ArrayNode (com.fasterxml.jackson.databind.node.ArrayNode)1 ObjectNode (com.fasterxml.jackson.databind.node.ObjectNode)1 Sets (com.google.common.collect.Sets)1 Node (io.fabric8.kubernetes.api.model.Node)1 KubernetesClient (io.fabric8.kubernetes.client.KubernetesClient)1 InputStream (java.io.InputStream)1 Set (java.util.Set)1 PathParam (javax.ws.rs.PathParam)1