Skip to content

Commit

Permalink
pref: 节点管理插件增加 【重新注册 Agent_id】选项 #7544 (#7549)
Browse files Browse the repository at this point in the history
* pref: 节点管理插件增加 【重新注册 Agent_id】选项 #7544

* pref: 节点管理插件增加 【重新注册 Agent_id】选项 #7544
  • Loading branch information
lTimej authored and normal-wls committed Sep 11, 2024
1 parent 2493679 commit 7e663bc
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,10 @@ def execute(self, data, parent_data):
auth_params["key"] = auth_key

# 额外配置参数
extra_config_params = {"peer_exchange_switch_for_agent": host.get("peer_exchange_switch_for_agent", 0)}
extra_config_params = {
"peer_exchange_switch_for_agent": host.get("peer_exchange_switch_for_agent", 0),
"force_update_agent_id": host.get("force_update_agent_id", False),
}
speed_limit = host.get("speed_limit")
if speed_limit:
extra_config_params.update({"bt_speed_limit": int(speed_limit)})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -320,6 +320,23 @@
]
},
},
{
tag_code: "force_update_agent_id",
type: "radio",
attrs: {
name: gettext("重新注册Agent_id"),
items: [
{value: true, name: gettext("是")},
{value: false, name: gettext("否")}
],
default: false,
validation: [
{
type: "required"
},
]
},
},
];

self.columns = common_columns;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,7 @@ def __init__(
"outer_ip": "1.1.1.1",
"login_ip": "1.1.1.1",
"data_ip": "1.1.1.1",
"force_update_agent_id": False,
}
],
}
Expand Down Expand Up @@ -341,6 +342,7 @@ def __init__(
"login_ip": "1.1.1.1",
"data_ip": "1.1.1.1",
"bk_host_id": 1,
"force_update_agent_id": False,
},
{
"bk_biz_id": "1",
Expand All @@ -358,6 +360,7 @@ def __init__(
"login_ip": "6.6.6.6",
"data_ip": "8.8.8.8",
"bk_host_id": 2,
"force_update_agent_id": False,
},
{
"bk_biz_id": "1",
Expand All @@ -375,6 +378,7 @@ def __init__(
"login_ip": "7.7.7.7",
"data_ip": "9.9.9.9",
"bk_host_id": 3,
"force_update_agent_id": False,
},
],
}
Expand Down Expand Up @@ -419,6 +423,7 @@ def __init__(
"os_type": "LINUX",
"peer_exchange_switch_for_agent": 0,
"speed_limit": "100",
"force_update_agent_id": False,
},
{
"bk_biz_id": "1",
Expand All @@ -428,6 +433,7 @@ def __init__(
"inner_ip": "2.2.2.2,3.3.3.3",
"peer_exchange_switch_for_agent": 0,
"speed_limit": "100",
"force_update_agent_id": False,
},
],
},
Expand Down Expand Up @@ -458,6 +464,7 @@ def __init__(
"bt_speed_limit": 100,
"peer_exchange_switch_for_agent": 0, # 不加速
"bk_host_id": 1,
"force_update_agent_id": False,
},
{
"bk_biz_id": "1",
Expand All @@ -469,6 +476,7 @@ def __init__(
"bt_speed_limit": 100,
"peer_exchange_switch_for_agent": 0, # 不加速
"bk_host_id": 2,
"force_update_agent_id": False,
},
{
"bk_biz_id": "1",
Expand All @@ -480,6 +488,7 @@ def __init__(
"bt_speed_limit": 100,
"peer_exchange_switch_for_agent": 0, # 不加速
"bk_host_id": 3,
"force_update_agent_id": False,
},
],
}
Expand Down Expand Up @@ -561,6 +570,7 @@ def __init__(
"login_ip": "1.1.1.1",
"data_ip": "1.1.1.1",
"bk_host_id": 1,
"force_update_agent_id": False,
}
],
}
Expand Down Expand Up @@ -749,6 +759,7 @@ def __init__(
"login_ip": "5.5.5.5",
"data_ip": "7.7.7.7",
"bk_host_id": 1,
"force_update_agent_id": False,
},
{
"bk_biz_id": "1",
Expand All @@ -766,6 +777,7 @@ def __init__(
"login_ip": "6.6.6.6",
"data_ip": "8.8.8.8",
"bk_host_id": 1,
"force_update_agent_id": False,
},
{
"bk_biz_id": "1",
Expand All @@ -783,6 +795,7 @@ def __init__(
"login_ip": "5.5.5.5",
"data_ip": "7.7.7.7",
"bk_host_id": 1,
"force_update_agent_id": False,
},
{
"bk_biz_id": "1",
Expand All @@ -798,6 +811,7 @@ def __init__(
"password": "encrypt_auth_key",
"data_ip": "7.7.7.7",
"bk_host_id": 1,
"force_update_agent_id": False,
},
],
}
Expand Down Expand Up @@ -882,6 +896,7 @@ def __init__(
"outer_ip": "1.1.1.1",
"login_ip": "1.1.1.1",
"data_ip": "1.1.1.1",
"force_update_agent_id": False,
}
],
}
Expand Down Expand Up @@ -1021,6 +1036,7 @@ def __init__(
"outer_ip": "1.1.1.1",
"login_ip": "1.1.1.1",
"data_ip": "1.1.1.1",
"force_update_agent_id": False,
},
{
"bk_biz_id": "1",
Expand All @@ -1037,6 +1053,7 @@ def __init__(
"outer_ip": "2.2.2.2",
"login_ip": "2.2.2.2",
"data_ip": "2.2.2.2",
"force_update_agent_id": False,
},
],
}
Expand Down

0 comments on commit 7e663bc

Please sign in to comment.