From d990c0bf4e7d0c4391bfbf0c52b80f70ea71d272 Mon Sep 17 00:00:00 2001
From: rabbitali <shusheng.wen@outlook.com>
Date: Tue, 9 May 2023 11:08:58 +0800
Subject: [PATCH] update validate rules of username field

---
 zeus/function/verify/host.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/zeus/function/verify/host.py b/zeus/function/verify/host.py
index f955975..63fc330 100644
--- a/zeus/function/verify/host.py
+++ b/zeus/function/verify/host.py
@@ -29,7 +29,7 @@ class HostSchema(Schema):
         required=True, validate=lambda s: len(s) > 0)
     host_ip = fields.IP(required=True)
     management = fields.Boolean(required=True)
-    username = fields.String(required=True, validate=lambda s: len(s) > 0)
+    username = fields.String(required=True, validate=lambda s: 32 >= len(s) > 0)
     password = fields.String(required=True, validate=lambda s: len(s) > 0)
     agent_port = fields.Integer(required=True, validate=lambda s: 65535 >= s >= 0)
     os_version = fields.String(required=True, validate=lambda s: len(s) > 0)
-- 
Gitee

