55 lines
2.4 KiB
Diff
55 lines
2.4 KiB
Diff
From 35907042fbdbe7949671cb508ee4690d91e27e0b Mon Sep 17 00:00:00 2001
|
|
From: root <root@localhost.localdomain>
|
|
Date: Sat, 18 Sep 2021 14:33:03 +0800
|
|
Subject: [PATCH] add missed file and better cli output
|
|
|
|
---
|
|
aops-cli/aops_cli/commands/task_cmd.py | 4 ++--
|
|
aops-utils/aops_utils/excel2dict/__init__.py | 12 ++++++++++++
|
|
2 files changed, 14 insertions(+), 2 deletions(-)
|
|
create mode 100644 aops-utils/aops_utils/excel2dict/__init__.py
|
|
|
|
diff --git a/aops-cli/aops_cli/commands/task_cmd.py b/aops-cli/aops_cli/commands/task_cmd.py
|
|
index 7d918e0..cd72b8c 100644
|
|
--- a/aops-cli/aops_cli/commands/task_cmd.py
|
|
+++ b/aops-cli/aops_cli/commands/task_cmd.py
|
|
@@ -23,7 +23,7 @@ from aops_utils.restful.helper import make_manager_url
|
|
from aops_utils.restful.response import MyResponse
|
|
from aops_utils.restful.status import SUCCEED
|
|
from aops_utils.cli_utils import add_page, cli_request, add_access_token, add_query_args
|
|
-from aops_utils.cli_utils import request_without_print, print_row_from_result
|
|
+from aops_utils.cli_utils import request_without_print, pretty_json
|
|
|
|
|
|
class TaskCommand(BaseCommand):
|
|
@@ -151,7 +151,7 @@ class TaskCommand(BaseCommand):
|
|
result = request_without_print('POST', manager_url, pyload, header, params.access_token)
|
|
task_infos = result.pop('task_infos', [])
|
|
print(result)
|
|
- print_row_from_result(task_infos)
|
|
+ print(pretty_json(task_infos))
|
|
|
|
@staticmethod
|
|
def manage_requests_delete(**kwargs):
|
|
diff --git a/aops-utils/aops_utils/excel2dict/__init__.py b/aops-utils/aops_utils/excel2dict/__init__.py
|
|
new file mode 100644
|
|
index 0000000..e90ecf9
|
|
--- /dev/null
|
|
+++ b/aops-utils/aops_utils/excel2dict/__init__.py
|
|
@@ -0,0 +1,12 @@
|
|
+#!/usr/bin/python3
|
|
+# ******************************************************************************
|
|
+# Copyright (c) Huawei Technologies Co., Ltd. 2021-2021. All rights reserved.
|
|
+# licensed under the Mulan PSL v2.
|
|
+# You can use this software according to the terms and conditions of the Mulan PSL v2.
|
|
+# You may obtain a copy of Mulan PSL v2 at:
|
|
+# http://license.coscl.org.cn/MulanPSL2
|
|
+# THIS SOFTWARE IS PROVIDED ON AN 'AS IS' BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR
|
|
+# IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR
|
|
+# PURPOSE.
|
|
+# See the Mulan PSL v2 for more details.
|
|
+# ******************************************************************************/
|
|
--
|
|
2.30.0
|
|
|