Fix the CLI for {group,mapping}-create

This patch makes the command output valid data.

Change-Id: I40f45d658d02140a8dbb3411010c0fc589ff9da2
This commit is contained in:
Gauvain Pocentek 2015-05-07 12:56:39 +02:00
parent ccb0427325
commit a37e6ec6c1
1 changed files with 3 additions and 2 deletions

View File

@ -146,7 +146,7 @@ def do_hashmap_mapping_create(cc, args={}):
if v is not None:
fields[arg_to_field_mapping.get(k, k)] = v
out = cc.hashmap.mappings.create(**fields)
utils.print_dict(out)
utils.print_dict(out.to_dict())
@utils.arg('-m', '--mapping-id',
@ -238,7 +238,8 @@ def do_hashmap_group_create(cc, args={}):
if k in arg_to_field_mapping:
if v is not None:
fields[arg_to_field_mapping.get(k, k)] = v
cc.hashmap.groups.create(**fields)
group = cc.hashmap.groups.create(**fields)
utils.print_dict(group.to_dict())
def do_hashmap_group_list(cc, args={}):