diff options
| author | Lianhao Lu <lianhao.lu@intel.com> | 2015-02-12 10:21:39 +0800 |
|---|---|---|
| committer | Lianhao Lu <lianhao.lu@intel.com> | 2015-02-12 10:21:39 +0800 |
| commit | 80b15778beafa2ea52315305cd0c0d0c62aea4ba (patch) | |
| tree | 03fd199d113a1405244b2b917d85bf0b2a6e4be6 /ceilometerclient/v2 | |
| parent | 0453ac6e8d80db49dcc7a7b07abe27542767bad2 (diff) | |
| download | python-ceilometerclient-80b15778beafa2ea52315305cd0c0d0c62aea4ba.tar.gz | |
Corrected the errors in sample-show and sample-create
Patchset I67152c636526dad3ec27e06058ff73ad969ae2b9 broke the sample-show
and sample-create when introducing the new sample API support. This
patch fixes those.
Change-Id: I3e36df61cf672b44c376c4a18dc808d565315bf6
Closes-Bug: #1421040
Diffstat (limited to 'ceilometerclient/v2')
| -rw-r--r-- | ceilometerclient/v2/shell.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ceilometerclient/v2/shell.py b/ceilometerclient/v2/shell.py index 3e53b24..67a7646 100644 --- a/ceilometerclient/v2/shell.py +++ b/ceilometerclient/v2/shell.py @@ -169,7 +169,7 @@ def _do_sample_list(cc, args): help='ID (aka message ID) of the sample to show.') def do_sample_show(cc, args): '''Show an sample.''' - sample = cc.samples.get(args.sample_id) + sample = cc.new_samples.get(args.sample_id) if sample is None: raise exc.CommandError('Sample not found: %s' % args.sample_id) @@ -216,7 +216,7 @@ def do_sample_create(cc, args={}): fields[k] = json.loads(v) else: fields[arg_to_field_mapping.get(k, k)] = v - sample = cc.old_samples.create(**fields) + sample = cc.samples.create(**fields) fields = ['counter_name', 'user_id', 'resource_id', 'timestamp', 'message_id', 'source', 'counter_unit', 'counter_volume', 'project_id', 'resource_metadata', |
