Merge pull request #387 from GallenShao/master
fix a bug when decoding image name_owner_type in taskmgr
This commit is contained in:
commit
8758d94deb
|
@ -687,9 +687,9 @@ class TaskMgr(threading.Thread):
|
||||||
username = username,
|
username = username,
|
||||||
vnode = VNode(
|
vnode = VNode(
|
||||||
image = Image(
|
image = Image(
|
||||||
name = json_task['image'].split('_')[0], #json_task['cluster']['image']['name'],
|
name = '_'.join(json_task['image'].split('_')[:-2]), #json_task['cluster']['image']['name'],
|
||||||
type = image_dict[json_task['image'].split('_')[2]], #json_task['cluster']['image']['type'],
|
type = image_dict[json_task['image'].split('_')[-1]], #json_task['cluster']['image']['type'],
|
||||||
owner = username if not json_task['image'].split('_')[1] else json_task['image'].split('_')[1]), #json_task['cluster']['image']['owner']),
|
owner = username if not json_task['image'].split('_')[-2] else json_task['image'].split('_')[-2]), #json_task['cluster']['image']['owner']),
|
||||||
instance = Instance(
|
instance = Instance(
|
||||||
cpu = int(json_task['cpuSetting']),
|
cpu = int(json_task['cpuSetting']),
|
||||||
memory = int(json_task['memorySetting']),
|
memory = int(json_task['memorySetting']),
|
||||||
|
|
Loading…
Reference in New Issue