Merge "Enumerate the meter type in the API Meter class"
This commit is contained in:
commit
cb7362ed04
@ -40,9 +40,9 @@ from wsme import types as wtypes
|
|||||||
|
|
||||||
from ceilometer.openstack.common import log
|
from ceilometer.openstack.common import log
|
||||||
from ceilometer.openstack.common import timeutils
|
from ceilometer.openstack.common import timeutils
|
||||||
|
from ceilometer import counter
|
||||||
from ceilometer import storage
|
from ceilometer import storage
|
||||||
|
|
||||||
|
|
||||||
LOG = log.getLogger(__name__)
|
LOG = log.getLogger(__name__)
|
||||||
|
|
||||||
|
|
||||||
@ -421,8 +421,9 @@ class Meter(_Base):
|
|||||||
name = wtypes.text
|
name = wtypes.text
|
||||||
"The unique name for the meter"
|
"The unique name for the meter"
|
||||||
|
|
||||||
# FIXME(dhellmann): Make this an enum?
|
type = wtypes.Enum(str, counter.TYPE_GAUGE,
|
||||||
type = wtypes.text
|
counter.TYPE_CUMULATIVE,
|
||||||
|
counter.TYPE_DELTA)
|
||||||
"The meter type (see :ref:`measurements`)"
|
"The meter type (see :ref:`measurements`)"
|
||||||
|
|
||||||
unit = wtypes.text
|
unit = wtypes.text
|
||||||
|
@ -97,7 +97,7 @@ class TestPipeline(base.TestCase):
|
|||||||
|
|
||||||
self.test_counter = counter.Counter(
|
self.test_counter = counter.Counter(
|
||||||
name='a',
|
name='a',
|
||||||
type='test_type',
|
type=counter.TYPE_GAUGE,
|
||||||
volume=1,
|
volume=1,
|
||||||
unit='B',
|
unit='B',
|
||||||
user_id="test_user",
|
user_id="test_user",
|
||||||
|
Loading…
Reference in New Issue
Block a user