remove instance:FLAVOR related code and docs

We have already removed meter instance:FLAVOR, let's clean our
code and docs to avoid unnecessary misleading.

Change-Id: I0c03b93252a263840ff50da6beed6445cc122ac2
Closes-Bug: #1505566
This commit is contained in:
ZhiQiang Fan 2015-10-13 02:13:51 -07:00
parent 130b8519df
commit 662870ca3a
5 changed files with 6 additions and 21 deletions

View File

@ -689,8 +689,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

View File

@ -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()},

View File

@ -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:

View File

@ -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*)

View File

@ -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)