/** Modification of binding information */ public Table.OvsdbUpdate updateBindings(PhysicalPort port) { Update<GenericTableSchema> op = new Update<>(tableSchema); op.set(getVlanBindingsSchema(), toOvsdb(port.vlanBindings())); op.set(getVlanStatsSchema(), toOvsdb(port.vlanStats())); op.where(getUuidMatcher(port.uuid())); op.where(getNameMatcher(port.name())); return new OvsdbUpdate(op); }
/** Insertion of physical port information */ @Override public <E extends VtepEntry> OvsdbInsert insert(E row) throws IllegalArgumentException { Insert<GenericTableSchema> op = newInsert(row); PhysicalPort port = (PhysicalPort) row; op.value(getNameSchema(), port.name()); op.value(getDescriptionSchema(), port.description()); op.value(getVlanBindingsSchema(), toOvsdb(port.vlanBindings())); op.value(getVlanStatsSchema(), toOvsdb(port.vlanStats())); op.value(getPortFaultStatusSchema(), setAsJavaSet(port.portFaultStatus())); return new OvsdbInsert(op); }
@Override public <E extends VtepEntry> Row<GenericTableSchema> generateRow(E entry) throws IllegalArgumentException { Row<GenericTableSchema> row = super.generateRow(entry); PhysicalPort data = (PhysicalPort) entry; addToRow(row, getNameSchema(), data.name()); addToRow(row, getDescriptionSchema(), data.description()); addToRow(row, getVlanBindingsSchema(), toOvsdb(data.vlanBindings())); addToRow(row, getVlanStatsSchema(), toOvsdb(data.vlanStats())); addToRow(row, getPortFaultStatusSchema(), setAsJavaSet(data.portFaultStatus())); return row; }