Java Code Examples for org.onosproject.net.intent.IntentService#getIntents()

The following examples show how to use org.onosproject.net.intent.IntentService#getIntents() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: IntentViewMessageHandler.java    From onos with Apache License 2.0 5 votes vote down vote up
@Override
protected void populateTable(TableModel tm, ObjectNode payload) {
    IntentService is = get(IntentService.class);
    for (Intent intent : is.getIntents()) {
        populateRow(tm.addRow(), intent, is);
    }
}
 
Example 2
Source File: TopologyViewMessageHandler.java    From onos with Apache License 2.0 5 votes vote down vote up
@Override
public void process(ObjectNode payload) {
    IntentService intentService = get(IntentService.class);
    for (Intent intent : intentService.getIntents()) {
        if (intentService.getIntentState(intent.key()) == IntentState.WITHDRAWN) {
            intentService.purge(intent);
        }
    }

}
 
Example 3
Source File: IntentPurgeCommand.java    From onos with Apache License 2.0 5 votes vote down vote up
@Override
protected void doExecute() {
    IntentService intentService = get(IntentService.class);
    for (Intent intent: intentService.getIntents()) {
        if (intentService.getIntentState(intent.key()) == WITHDRAWN) {
            intentService.purge(intent);
        }
    }
}