Esempio n. 1
0
 /** 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);
 }
Esempio n. 2
0
 /** Extract the physical port information from the table entry */
 @Override
 @SuppressWarnings(value = "unckecked")
 public <E extends VtepEntry> E parseEntry(Row<GenericTableSchema> row, Class<E> clazz)
     throws IllegalArgumentException {
   ensureOutputClass(clazz);
   return (row == null)
       ? null
       : (E)
           PhysicalPort.apply(
               parseUuid(row),
               parseName(row),
               parseDescription(row),
               parseVlanBindings(row),
               parseVlanStats(row),
               parsePortFaultStatus(row));
 }
Esempio n. 3
0
 /** 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);
 }
Esempio n. 4
0
 @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;
 }