use of org.onosproject.workflow.api.WorkflowStore in project onos by opennetworkinglab.
the class WorkFlowStoreCommand method rmWorkflow.
private void rmWorkflow(String id) {
WorkflowStore workflowStore = get(WorkflowStore.class);
workflowStore.unregister(URI.create(id));
}
use of org.onosproject.workflow.api.WorkflowStore in project onos by opennetworkinglab.
the class WorkflowStatusCommand method invoke.
private void invoke() {
try {
WorkflowStore workflowStore = get(WorkflowStore.class);
WorkplaceStore workplaceStore = get(WorkplaceStore.class);
System.out.printf("%-25s %-45s %-10s%n", "DEVICEIP", " WORKFLOW NAME", "WORKFLOW STATE");
for (WorkflowContext context : workplaceStore.getContexts()) {
for (Workflow workflow : workflowStore.getAll()) {
if (context.workflowId().equals(workflow.id())) {
JsonDataModelTree tree = (JsonDataModelTree) context.data();
JsonNode mgmtIp = tree.nodeAt("/mgmtIp");
System.out.printf("%-25s %-45s %-10s%n", mgmtIp, context.name(), context.state().toString());
}
}
}
} catch (WorkflowException e) {
e.printStackTrace();
}
}
Aggregations