Yousong Zhou
2f7bd7a7a2
validators: set xx_id when possible
2021-02-23 15:29:12 +08:00
Qu Xuan
7417452ec6
fix(region): support peer secgroup
2021-02-22 16:18:36 +08:00
Qu Xuan
5cd26b297e
fix: 支持多安全组
2020-10-24 11:44:31 +08:00
Yousong Zhou
c2bca8ab39
Feature/yousong text ( #7487 )
...
* notify: log with context info
* region: guests: log with context info
* region: hosts: log with context info
* region: misc: remove redundant log
* region: skus: use NewInternalServerError instead of NewGeneralError
* appsrv: dispatcher: preserve text id
* appsrv: dispatcher: remove commented-out code
* cloudcommon: db_dispatcher: note errors that won't be translated
* cloudcommon: db: rbac: preserve text id
* cloudcommon: caller: preserve text id
* treewide: fix fmt string
* region: guest_actions: preserve text id
* region: guest_actions: fix fmt string
* region: usages: fix fmt string
* mcclient: hosts: remove redundant return value
* cloudcommon: fetch: preserve text id
* region: guest_template: preserve text id
* cloudcommon: db: db_dispatcher: preserve text id
* region: guest_actions: preserve text id
* httperrors: add funcs for wrap lang tag into context
* vendor: golang.org/x/text
* httperrors: error with context
* httperrors: HTTPError
* treewide: fix typo
* treewide: use en in source code
* locales: initial version
2020-08-25 15:26:31 +08:00
wanyaoqi
b682e1b44e
keystone store service cert
2020-04-22 16:37:42 +08:00
Yousong Zhou
dcb4366e6d
validators: ValidatorModelIdOrName: allow empty
2020-01-14 21:36:50 +08:00
Yousong Zhou
b41d2f7248
validators: add ValidatorHostPort
2020-01-10 21:33:12 +08:00
Yousong Zhou
0c00b3ac98
validators: add ValidatorIntChoices
2020-01-10 21:33:12 +08:00
Yousong Zhou
60eb3bcbb2
validators: remove unused defaultVal member
2020-01-10 21:33:12 +08:00
Qiu Jian
09f91f306a
update vendor
2019-11-11 17:05:21 +08:00
Qiu Jian
53c0d3b29f
fix: recode error handling to make conform with error handling standard
2019-11-11 10:55:01 +08:00
Yousong Zhou
8ba5986d83
goimports: first run
2019-10-28 06:22:17 +00:00
Yousong Zhou
b2d1bb6d5a
validators: actor joined by more tests
2019-10-18 03:22:29 +00:00
Yousong Zhou
396fc7be7c
validators: add ValidatorByActor
2019-10-18 03:22:29 +00:00
Yousong Zhou
43f25bd4b4
validators: add sshkey validator
2019-10-18 03:22:29 +00:00
Yousong Zhou
e30448f119
validators: add string length validator
2019-10-18 03:22:29 +00:00
Yousong Zhou
200f59c1d2
validators: 应对"listener"参数被重复Validate的情况
...
Fixes e4ef23515f ("aws elb support")
2019-09-18 07:34:06 +00:00
Qiu Jian
870813f04b
feature: s3gateway
2019-07-24 21:28:37 +08:00
Yousong Zhou
29d445b058
validators: errors: 使用msgFmt而非包含{NN}的msgTmpl
2019-06-28 15:09:13 +00:00
Yousong Zhou
c0b080ab66
validators: 默认将pending deleted的模型排除在外
2019-06-24 14:29:01 +00:00
Yousong Zhou
5fb930c3a8
validators: add SetParent()
2019-06-09 16:02:39 +00:00
Qiu Jian
b7027934db
feature: 3-level policies, system/domain/project
2019-05-31 13:56:02 +08:00
Qiu Jian
2efc5e641e
fix: add keystone initialization procedures
2019-05-17 13:54:29 +08:00
ioito
4ed3d9c192
腾讯云要求vpc掩码范围需在16 - 28之间
2019-04-19 17:53:24 +08:00
Zexi
db0e303798
make 'go test ./...' pass
2019-04-15 19:54:46 +08:00
Qiu Jian
004d9b6f95
update copyright headers of all source
2019-03-29 14:47:48 +08:00
Qiu Jian
df0474e25a
fix: break dependencies of climc/mcclient on compute/models
2019-02-27 16:40:13 +08:00
Yousong Zhou
35384160ce
validators: 添加ApplyModelFilters()
2018-12-12 08:50:57 +00:00
Yousong Zhou
751525d779
validators: add newInvalidStructError()
...
To retain fmt and parameter information
{"class":"InputParameterError","code":400,"data":{"fields":["acl_entries","192.168.0.256"],"id":"Invalid value error: invalid %q: invalid addr %s"},"details":"Invalid value error: invalid \"acl_entries\": invalid addr 192.168.0.256"}
{"class":"InputParameterError","code":400,"data":{"fields":[],"id":"invalid \"acl_entries\": invalid addr 192.168.0.256"},"details":"invalid \"acl_entries\": invalid addr 192.168.0.256"}
2018-11-19 10:54:17 +00:00
Yousong Zhou
f9ac0c0204
validators: errors: retain msg fmt and params
2018-11-19 10:54:17 +00:00
Yousong Zhou
09e511883c
cloudcommon: validators: return 400 for struct validation failure
2018-11-08 15:54:38 +00:00
Yousong Zhou
06b3495237
validators: add NewVlanIdValidator()
2018-10-26 06:30:43 +00:00
Qiu Jian
b17b24b232
Update format
2018-10-12 12:13:35 +08:00
Qiu Jian
17175bc0a4
改进:1. 部署VM时注入全局和项目公钥 2. 完善keypair的创建和导入功能 3.
...
其他
2018-10-11 23:04:42 +08:00
Yousong Zhou
a8a19c4de9
validators: validate certs and keys
2018-09-29 14:12:59 +00:00
Yousong Zhou
8eac303dbf
validators: ValidatorStruct: update input data with validated struct
2018-09-28 04:07:57 +00:00
Yousong Zhou
dd38b2b53d
validators: add Optional() to IValidator for use in ValidateUpdateData()
2018-09-13 02:06:41 +00:00
Yousong Zhou
cc70be165f
validators: rework error handling
...
- Return httperrors by default (return ValidateError when testing)
- Special casing sql.ErrNoRows for model not found
2018-09-12 01:26:52 +00:00
Yousong Zhou
2b691c5dbd
validators: StringMultiChoicesValidator: add test case
2018-09-12 01:26:52 +00:00
Yousong Zhou
75f38447fd
validators: add BoolValidator
2018-09-10 16:08:17 +00:00
Yousong Zhou
b4f00220f9
validators: add ValidatorStringMultiChoices
2018-09-10 16:08:13 +00:00
Yousong Zhou
7ad2624a7c
cloudcommon: add validator helpers
2018-08-30 07:47:08 +00:00