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 timeutils
|
||||
from ceilometer import counter
|
||||
from ceilometer import storage
|
||||
|
||||
|
||||
LOG = log.getLogger(__name__)
|
||||
|
||||
|
||||
@ -421,8 +421,9 @@ class Meter(_Base):
|
||||
name = wtypes.text
|
||||
"The unique name for the meter"
|
||||
|
||||
# FIXME(dhellmann): Make this an enum?
|
||||
type = wtypes.text
|
||||
type = wtypes.Enum(str, counter.TYPE_GAUGE,
|
||||
counter.TYPE_CUMULATIVE,
|
||||
counter.TYPE_DELTA)
|
||||
"The meter type (see :ref:`measurements`)"
|
||||
|
||||
unit = wtypes.text
|
||||
|
@ -97,7 +97,7 @@ class TestPipeline(base.TestCase):
|
||||
|
||||
self.test_counter = counter.Counter(
|
||||
name='a',
|
||||
type='test_type',
|
||||
type=counter.TYPE_GAUGE,
|
||||
volume=1,
|
||||
unit='B',
|
||||
user_id="test_user",
|
||||
|
Loading…
x
Reference in New Issue
Block a user