The ceilometer.tests.unit.hardware.pollsters.test_generic Module

The ceilometer.tests.unit.hardware.pollsters.test_generic Module

class ceilometer.tests.unit.hardware.pollsters.test_generic.FakeInspector[source]

Bases: ceilometer.hardware.inspector.base.Inspector

DATA = {'test': (0.99, {}, {}), 'test2': (90, {'ip': '10.0.0.2', 'mac': '001122334455', 'speed': 1000, 'name': 'test.teest'}, {})}
inspect_generic(host, cache, extra_metadata=None, param=None)[source]

A generic inspect function.

Parameters:
  • host – the target host
  • cache – cache passed from the pollster
  • extra_metadata – extra dict to be used as metadata
  • param – a dict of inspector specific param
Returns:

an iterator of (value, metadata, extra) containing the sample value, metadata dict to construct sample’s metadata, and extra dict of extra metadata to help constructing sample

net_metadata = {'ip': '10.0.0.2', 'mac': '001122334455', 'name': 'test.teest', 'speed': 1000}
class ceilometer.tests.unit.hardware.pollsters.test_generic.TestGenericPollsters(*args, **kwds)[source]

Bases: ceilometer.tests.base.BaseTestCase

static faux_get_inspector(url, namespace=None)[source]
setUp()[source]

Hook method for setting up the test fixture before exercising it.

test_get_pollsters_extensions()[source]
test_get_samples()[source]
class ceilometer.tests.unit.hardware.pollsters.test_generic.TestMeterDefinition(*args, **kwds)[source]

Bases: ceilometer.tests.base.BaseTestCase

test_bad_metric_skip(**keywargs)[source]
test_config_definition()[source]
test_config_invalid_field()[source]
test_config_invalid_type_field()[source]
test_config_missing_field()[source]
Creative Commons Attribution 3.0 License

Except where otherwise noted, this document is licensed under Creative Commons Attribution 3.0 License. See all OpenStack Legal Documents.