Commit 55b55f61 authored by ibuler's avatar ibuler

[Update] 修改测试连接节点时,资产为下面的所有资产

parent d8069f47
...@@ -259,7 +259,7 @@ class RefreshNodeHardwareInfoApi(APIView): ...@@ -259,7 +259,7 @@ class RefreshNodeHardwareInfoApi(APIView):
def get(self, request, *args, **kwargs): def get(self, request, *args, **kwargs):
node_id = kwargs.get('pk') node_id = kwargs.get('pk')
node = get_object_or_404(self.model, id=node_id) node = get_object_or_404(self.model, id=node_id)
assets = node.assets.all() assets = node.get_all_assets()
# task_name = _("更新节点资产硬件信息: {}".format(node.name)) # task_name = _("更新节点资产硬件信息: {}".format(node.name))
task_name = _("Update node asset hardware information: {}").format(node.name) task_name = _("Update node asset hardware information: {}").format(node.name)
task = update_assets_hardware_info_util.delay(assets, task_name=task_name) task = update_assets_hardware_info_util.delay(assets, task_name=task_name)
...@@ -273,7 +273,7 @@ class TestNodeConnectiveApi(APIView): ...@@ -273,7 +273,7 @@ class TestNodeConnectiveApi(APIView):
def get(self, request, *args, **kwargs): def get(self, request, *args, **kwargs):
node_id = kwargs.get('pk') node_id = kwargs.get('pk')
node = get_object_or_404(self.model, id=node_id) node = get_object_or_404(self.model, id=node_id)
assets = node.assets.all() assets = node.get_all_assets()
# task_name = _("测试节点下资产是否可连接: {}".format(node.name)) # task_name = _("测试节点下资产是否可连接: {}".format(node.name))
task_name = _("Test if the assets under the node are connectable: {}".format(node.name)) task_name = _("Test if the assets under the node are connectable: {}".format(node.name))
task = test_asset_connectivity_util.delay(assets, task_name=task_name) task = test_asset_connectivity_util.delay(assets, task_name=task_name)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment