use of org.onosproject.ovsdb.rfc.message.MonitorRequest in project onos by opennetworkinglab.
the class ParamUtil method getMonitorParams.
/**
* Returns params of monitor method, refer to RFC7047's Section 4.1.5.
* @param monotorId json-value, refer to RFC7047's Section 4.1.5.
* @param dbSchema DatabaseSchema entity
* @return List of Object, the params of monitor request
*/
public static List<Object> getMonitorParams(String monotorId, DatabaseSchema dbSchema) {
Set<String> tables = dbSchema.getTableNames();
Map<String, MonitorRequest> mrMap = Maps.newHashMap();
for (String tableName : tables) {
TableSchema tableSchema = dbSchema.getTableSchema(tableName);
MonitorRequest monitorRequest = getAllColumnsMonitorRequest(tableSchema);
mrMap.put(tableName, monitorRequest);
}
return Lists.newArrayList(dbSchema.name(), monotorId, mrMap);
}
use of org.onosproject.ovsdb.rfc.message.MonitorRequest in project onos by opennetworkinglab.
the class ParamUtil method getAllColumnsMonitorRequest.
/**
* Returns MonitorRequest, refer to RFC7047's Section 4.1.5.
* @param tableSchema entity
* @return MonitorRequest
*/
private static MonitorRequest getAllColumnsMonitorRequest(TableSchema tableSchema) {
String tableName = tableSchema.name();
Set<String> columns = tableSchema.getColumnNames();
MonitorSelect select = new MonitorSelect(true, true, true, true);
MonitorRequest monitorRequest = new MonitorRequest(tableName, columns, select);
return monitorRequest;
}
Aggregations