ContainX / openstack4j

A Fluent OpenStack SDK / Client Library for Java
http://openstack4j.com
Other
290 stars 366 forks source link

Ceilometer resource metadata missing #398

Open tfriman opened 9 years ago

tfriman commented 9 years ago

org.openstack4j.openstack.telemetry.domain.CeilometerSample#setMetadata(Map<String, Object> metadata) has TODO, it seems to work with

@Override
public void setMetadata(Map<String, Object> metadata) {
        this.metadata = metadata;
}

A simple way to test this:

final SampleCriteria criteria = SampleCriteria.create();
criteria.add("metadata.event_type", SampleCriteria.Oper.EQUALS, "compute.instance.create.end");
final List<? extends Sample> instance = osClient.telemetry().meters().samples("instance", criteria);
for (Sample sample : instance) {
    LOGGER.info("metadata: {}", sample.getMetadata());
}
iviireczech commented 9 years ago

Hello, I think you are right so I've created pull request https://github.com/gondor/openstack4j/pull/508