Merge "remove instance:FLAVOR related code and docs"
This commit is contained in:
commit
a984495cef
@ -680,8 +680,7 @@ class PipelineManager(object):
|
||||
"meter_name" will be excluded; 'meter_name' means 'meter_name'
|
||||
will be included.
|
||||
|
||||
The 'meter_name" is Sample name field. For meter names with
|
||||
variable like "instance:m1.tiny", it's "instance:*".
|
||||
The 'meter_name" is Sample name field.
|
||||
|
||||
Valid meters definition is all "included meter names", all
|
||||
"excluded meter names", wildcard and "excluded meter names", or
|
||||
|
@ -77,7 +77,7 @@ class TestComputeDurationByResource(v2.FunctionalTest,
|
||||
side_effect=get_interval)
|
||||
|
||||
def _invoke_api(self):
|
||||
return self.get_json('/meters/instance:m1.tiny/statistics',
|
||||
return self.get_json('/meters/instance/statistics',
|
||||
q=[{'field': 'timestamp',
|
||||
'op': 'ge',
|
||||
'value': self.start.isoformat()},
|
||||
@ -151,7 +151,7 @@ class TestComputeDurationByResource(v2.FunctionalTest,
|
||||
]
|
||||
with mock.patch.object(type(self.conn), 'get_meter_statistics',
|
||||
return_value=statistics):
|
||||
data = self.get_json('/meters/instance:m1.tiny/statistics',
|
||||
data = self.get_json('/meters/instance/statistics',
|
||||
q=[{'field': 'timestamp',
|
||||
'op': 'ge',
|
||||
'value': self.late1.isoformat()},
|
||||
@ -183,7 +183,7 @@ class TestComputeDurationByResource(v2.FunctionalTest,
|
||||
|
||||
with mock.patch.object(type(self.conn), 'get_meter_statistics',
|
||||
return_value=statistics):
|
||||
data = self.get_json('/meters/instance:m1.tiny/statistics',
|
||||
data = self.get_json('/meters/instance/statistics',
|
||||
q=[{'field': 'timestamp',
|
||||
'op': 'le',
|
||||
'value': self.early2.isoformat()},
|
||||
|
@ -163,7 +163,7 @@ with which a source should operate:
|
||||
* To define the list of included meters, use the 'meter_name' syntax
|
||||
* To define the list of excluded meters, use the '!meter_name' syntax
|
||||
* For meters, which identify a complex Sample field, use the wildcard
|
||||
symbol to select all, e.g. for "instance:m1.tiny", use "instance:\*"
|
||||
symbol to select all, e.g. for "disk.read.bytes", use "disk.\*"
|
||||
|
||||
The above definition methods can be used in the following combinations:
|
||||
|
||||
|
@ -346,20 +346,6 @@ project::
|
||||
"op": "eq",
|
||||
"value": "8d6057bc-5b90-4296-afe0-84acaa2ef909"}]
|
||||
|
||||
Get the list of samples about instances with *m1.tiny* flavor running for June
|
||||
2013 for a particular project::
|
||||
|
||||
GET /v2/meters/instance:m1.tiny
|
||||
q: [{"field": "timestamp",
|
||||
"op": "ge",
|
||||
"value": "2013-06-01T00:00:00"},
|
||||
{"field": "timestamp",
|
||||
"op": "lt",
|
||||
"value": "2013-07-01T00:00:00"},
|
||||
{"field": "project_id",
|
||||
"op": "eq",
|
||||
"value": "8d6057bc-5b90-4296-afe0-84acaa2ef909"}]
|
||||
|
||||
Now you may want to have statistics on the meters you are targeting.
|
||||
Consider the following example where you are getting the list of samples
|
||||
about CPU utilization of a given instance (identified by its *resource_id*)
|
||||
|
@ -49,7 +49,7 @@ late2="2012-08-31T20:00:00"
|
||||
mkdata() {
|
||||
${bindir}/make_test_data.py --project "$project" \
|
||||
--user "$user" --start "$2" --end "$3" \
|
||||
--resource "$1" --counter instance:m1.tiny --volume 1
|
||||
--resource "$1" --counter instance --volume 1
|
||||
}
|
||||
|
||||
dates=(early1 early2 start middle1 middle2 middle3 middle4 end late1 late2)
|
||||
|
Loading…
Reference in New Issue
Block a user