use of org.ovirt.engine.api.model.Value in project ovirt-engine by oVirt.
the class StatisticResourceUtils method setDatum.
public static Statistic setDatum(Statistic statistic, BigDecimal datum) {
if (datum != null) {
Value value = new Value();
value.setDatum(datum);
statistic.getValues().getValues().add(value);
}
return statistic;
}
use of org.ovirt.engine.api.model.Value in project ovirt-engine by oVirt.
the class StatisticResourceUtils method setDatum.
public static Statistic setDatum(Statistic statistic, String datum) {
if (datum != null) {
Value value = new Value();
value.setDetail(datum);
statistic.getValues().getValues().add(value);
}
return statistic;
}
use of org.ovirt.engine.api.model.Value in project ovirt-engine by oVirt.
the class BackendStatisticsResourceTest method getPrototype.
static Statistic getPrototype(String name) {
Statistic statistic = new Statistic();
statistic.setName(name);
statistic.setId(UUID.nameUUIDFromBytes(statistic.getName().getBytes()).toString());
statistic.setUnit(StatisticUnit.BYTES);
statistic.setKind(StatisticKind.GAUGE);
Value value = new Value();
statistic.setValues(new Values());
statistic.setType(ValueType.INTEGER);
statistic.getValues().getValues().add(value);
statistic.setHost(new Host());
statistic.getHost().setId(GUIDS[2].toString());
return statistic;
}