mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-09-24 16:03:43 +08:00
Merge pull request #936 in YUNIONIO/onecloud from ~ZHOUYOUSONG/onecloud:bugfix/yousong-lb to release/2.3.0
* commit '82796ed1e534b7e59dd57f6fa2a3b8666118b8ec':
lb: 改正health_check_{domain,path}校验
This commit is contained in:
@@ -237,8 +237,8 @@ func (man *SLoadbalancerListenerManager) ValidateCreateData(ctx context.Context,
|
||||
"health_check": validators.NewStringChoicesValidator("health_check", LB_BOOL_VALUES).Default(LB_BOOL_ON),
|
||||
"health_check_type": checkTypeV,
|
||||
|
||||
"health_check_domain": validators.NewDomainNameValidator("domain").AllowEmpty(true).Default(""),
|
||||
"health_check_path": validators.NewURLPathValidator("path").Default(""),
|
||||
"health_check_domain": validators.NewDomainNameValidator("health_check_domain").AllowEmpty(true).Default(""),
|
||||
"health_check_path": validators.NewURLPathValidator("health_check_path").Default(""),
|
||||
"health_check_http_code": validators.NewStringMultiChoicesValidator("health_check_http_code", LB_HEALTH_CHECK_HTTP_CODES).Sep(",").Default(LB_HEALTH_CHECK_HTTP_CODE_DEFAULT),
|
||||
|
||||
"health_check_rise": validators.NewRangeValidator("health_check_rise", 1, 1000).Default(3),
|
||||
@@ -324,8 +324,8 @@ func (lblis *SLoadbalancerListener) ValidateUpdateData(ctx context.Context, user
|
||||
"health_check": validators.NewStringChoicesValidator("health_check", LB_BOOL_VALUES),
|
||||
"health_check_type": LoadbalancerListenerManager.checkTypeV(lblis.ListenerType),
|
||||
|
||||
"health_check_domain": validators.NewDomainNameValidator("domain").AllowEmpty(true),
|
||||
"health_check_path": validators.NewURLPathValidator("path"),
|
||||
"health_check_domain": validators.NewDomainNameValidator("health_check_domain").AllowEmpty(true),
|
||||
"health_check_path": validators.NewURLPathValidator("health_check_path"),
|
||||
"health_check_http_code": validators.NewStringMultiChoicesValidator("health_check_http_code", LB_HEALTH_CHECK_HTTP_CODES).Sep(","),
|
||||
|
||||
"health_check_rise": validators.NewRangeValidator("health_check_rise", 1, 1000),
|
||||
|
||||
Reference in New Issue
Block a user