Compare commits

...

934 Commits

Author SHA1 Message Date
Jian Qiu
f71b787abb fix: dns record create ignore is_public field (#7589)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2020-08-18 10:51:57 +08:00
Zexi Li
780dea24d1 Merge pull request #7581 from swordqiu/automated-cherry-pick-of-#7580-upstream-release-3.2
Automated cherry pick of #7580: fix: allow delete shared role and policy
2020-08-16 23:43:24 +08:00
Zexi Li
a8c65cbeed Merge pull request #7577 from rainzm/automated-cherry-pick-of-#7575-upstream-release-3.2
Automated cherry pick of #7575: fix: GetIImages correctly without 'image_cache' dir
2020-08-16 23:41:56 +08:00
Qiu Jian
b41bd4066c fix: allow delete shared role and policy 2020-08-15 21:04:48 +08:00
rainzm
c5a731daa9 fix: GetIImages correctly without 'image_cache' dir
After creating vms, there is no dir named 'image_cache' exists in
storage of esxi. So handle this case to not affecte the synchronization of the
VMware Template.
2020-08-14 20:36:58 +08:00
屈轩
3bc1381c36 fix: aovid duplicate sku name (#7574)
Co-authored-by: Qu Xuan <quxuan@yunionyun.com>
2020-08-14 20:35:49 +08:00
Zexi Li
ff880efe8c Merge pull request #7571 from zexi/hotfix/jsontag-syntax-v32
fix: json TAG_PREFIX invalid syntax
2020-08-14 17:42:04 +08:00
Jian Qiu
813a8c2021 fix: init wire domain_id for local vpc (#7569)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2020-08-14 17:29:51 +08:00
Zexi Li
4f9b8a29da fix: json TAG_PREFIX invalid syntax 2020-08-14 17:02:54 +08:00
屈轩
db7621081a fix: avoid virtual resource project id is empty when cloudaccount with no project (#7562)
Co-authored-by: Qu Xuan <quxuan@yunionyun.com>
2020-08-14 10:37:49 +08:00
Jian Qiu
3032f7e26b fix: network port count stat recode (#7556)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2020-08-14 10:33:48 +08:00
Zexi Li
44c0d0ce47 Merge pull request #7549 from wanyaoqi/automated-cherry-pick-of-#7547-upstream-release-3.2
Automated cherry pick of #7547: support diable usb kbd
2020-08-11 18:41:34 +08:00
Zexi Li
5eb4b549ba Merge pull request #7543 from ioito/automated-cherry-pick-of-#7541-upstream-release-3.2
Automated cherry pick of #7541: fix: separete enabled and status field
2020-08-11 18:39:24 +08:00
wanyaoqi
3b6662f7fa support diable usb kbd 2020-08-11 15:33:16 +08:00
Qu Xuan
551ea72afb fix: separete enabled and status field 2020-08-11 14:55:09 +08:00
Zexi Li
2c9378cc9a Merge pull request #7537 from wanyaoqi/automated-cherry-pick-of-#7530-upstream-release-3.2
Automated cherry pick of #7530: fix mount xfs
2020-08-11 11:16:39 +08:00
wanyaoqi
be3244d0b5 fix usage get storage capbility (#7529) 2020-08-10 20:07:56 +08:00
wanyaoqi
9c756c1cc9 fix mount xfs 2020-08-10 20:05:09 +08:00
屈轩
fa47f50e32 fix: optimized huawei security group get and create operation (#7522)
Co-authored-by: Qu Xuan <quxuan@yunionyun.com>
2020-08-10 15:38:44 +08:00
wanyaoqi
40b3074acb set disk status on disk detached (#7519) 2020-08-10 12:05:46 +08:00
Zexi Li
035dcaa08b Merge pull request #7510 from ioito/automated-cherry-pick-of-#7508-upstream-release-3.2
Automated cherry pick of #7508: fix: avoid nil pointer
2020-08-10 10:24:58 +08:00
Qu Xuan
efd888ab45 fix: avoid nil pointer 2020-08-07 11:16:24 +08:00
Zexi Li
3dd36fbc46 Merge pull request #7500 from ioito/automated-cherry-pick-of-#7498-upstream-release-3.2
Automated cherry pick of #7498: fix: 隐藏auzre经典类型存储
2020-08-07 11:06:14 +08:00
Zexi Li
d3f1c3c202 Merge pull request #7503 from ioito/automated-cherry-pick-of-#7501-upstream-release-3.2
Automated cherry pick of #7501: fix: 提高zstack认证兼容性
2020-08-07 11:05:19 +08:00
Qu Xuan
0d301c554c fix: 提高zstack认证兼容性 2020-08-06 19:25:25 +08:00
Qu Xuan
19fc35afa5 fix: 隐藏auzre经典类型存储 2020-08-06 18:01:37 +08:00
屈轩
ed7576f2ac fix: 增加openstack兼容性 (#7494)
Co-authored-by: Qu Xuan <quxuan@yunionyun.com>
2020-08-06 11:56:18 +08:00
Zexi Li
5bcc5f1e34 Merge pull request #7486 from wanyaoqi/automated-cherry-pick-of-#7484-upstream-release-3.2
Automated cherry pick of #7484: fix host info get sshkey
2020-08-04 13:51:21 +08:00
wanyaoqi
93a8856c2a fix host info get sshkey 2020-08-04 10:37:16 +08:00
Zexi Li
44dabd9af7 Merge pull request #7480 from swordqiu/automated-cherry-pick-of-#7479-upstream-release-3.2
Automated cherry pick of #7479: fix: typo running_geusts => running_guests
2020-08-03 16:58:32 +08:00
Zexi Li
67c1324feb Merge pull request #7476 from ioito/automated-cherry-pick-of-#7474-upstream-release-3.2
Automated cherry pick of #7474: fix: typo
2020-08-03 16:57:54 +08:00
Qiu Jian
9af38305d7 fix: typo running_geusts => running_guests 2020-08-03 16:32:19 +08:00
Qu Xuan
0fd6e1c460 fix: typo 2020-08-03 10:57:19 +08:00
Zexi Li
03b1be05f9 Merge pull request #7471 from swordqiu/automated-cherry-pick-of-#7470-upstream-release-3.2
Automated cherry pick of #7470: fix: ignore bucket-set-acl not implemented error
2020-08-03 09:24:54 +08:00
Qiu Jian
938264a1aa fix: ignore bucket-set-acl not implemented error 2020-08-03 02:24:47 +08:00
Zexi Li
731d86439a Merge pull request #7449 from tb365/automated-cherry-pick-of-#7447-upstream-release-3.2
Automated cherry pick of #7447: aws elb listener&rule name too long fix
2020-08-02 10:08:42 +08:00
屈轩
53bf3d7740 fix: avoid host globalid change (#7467)
Co-authored-by: Qu Xuan <quxuan@yunionyun.com>
2020-08-02 03:03:03 +08:00
wanyaoqi
be18d0a34f fix reauth condition on influxdb not found (#7458) 2020-08-01 21:27:04 +08:00
wanyaoqi
9687884ac5 fix cache non lvm disks (#7461) 2020-08-01 21:14:03 +08:00
tangbin
ccb2cbce41 aws elb listener&rule name too long fix 2020-08-01 11:13:00 +08:00
Zexi Li
f232c4cd4f Merge pull request #7421 from rainzm/automated-cherry-pick-of-#7416-upstream-release-3.2
Automated cherry pick of #7416: fix(region): Don't allow address conflicts under vpc
2020-08-01 11:05:00 +08:00
Zexi Li
4661370b37 Merge pull request #7436 from tb365/automated-cherry-pick-of-#7435-upstream-release-3.2
Automated cherry pick of #7435: loadblancer listener modify name fix
2020-08-01 10:57:53 +08:00
tangbin
ee8166352a fix redis reset account password action log 2020-08-01 10:53:59 +08:00
tangbin
9f3684a1f6 loadblancer listener modify name fix 2020-08-01 10:53:34 +08:00
rainzm
2e3a4abca3 fix(region): Don't allow address conflicts under vpc
Except for default vpc, vpc and wire have a one-to-one correspondence.
So prohibiting the address conflict of wire does not avoid
the address conflict of default vpc.
2020-08-01 10:52:27 +08:00
Zexi Li
a14da344c0 Merge pull request #7439 from swordqiu/automated-cherry-pick-of-#7438-upstream-release-3.2
Automated cherry pick of #7438: fix: sync share mode between vpc and wire
2020-08-01 10:39:28 +08:00
Zexi Li
a3f71e8959 Merge pull request #7443 from wanyaoqi/automated-cherry-pick-of-#7441-upstream-release-3.2
Automated cherry pick of #7441: fix deploy admin auth key
2020-08-01 00:06:33 +08:00
wanyaoqi
d925cb080d fix deploy admin auth key 2020-07-31 23:24:46 +08:00
Zexi Li
3ca28cfcc7 baremetal: fix hpssactl split last LV size out of limit (#7428) 2020-07-31 22:40:02 +08:00
Qiu Jian
8c33cc9445 fix: sync share mode between vpc and wire 2020-07-31 22:30:16 +08:00
Zexi Li
37b9a960ef Merge pull request #7420 from ioito/automated-cherry-pick-of-#7417-upstream-release-3.2
Automated cherry pick of #7417: fix: avoid lost backend params
2020-07-31 18:07:59 +08:00
Zexi Li
f69370c4db Merge pull request #7415 from ioito/automated-cherry-pick-of-#7413-upstream-release-3.2
Automated cherry pick of #7413: fix: openstack win image user data need encode
2020-07-31 18:06:48 +08:00
Zexi Li
fb8f8847d0 Merge pull request #7407 from ioito/automated-cherry-pick-of-#7405-upstream-release-3.2
Automated cherry pick of #7405: fix: avoid account sync deadlock
2020-07-31 18:05:31 +08:00
Zexi Li
fc7de4722b Merge pull request #7408 from swordqiu/automated-cherry-pick-of-#7400-upstream-release-3.2
Automated cherry pick of #7400: fix: ignore general s3 set acl not implemented error
2020-07-31 18:04:05 +08:00
屈轩
f43af31195 fix: 避免glance metadata-list project scope无权限 (#7404)
Co-authored-by: Qu Xuan <quxuan@yunionyun.com>
2020-07-31 18:01:48 +08:00
屈轩
0b13608d90 fix: 优化openstack项目认证 (#7399)
Co-authored-by: Qu Xuan <quxuan@yunionyun.com>
2020-07-31 18:00:17 +08:00
屈轩
04e1a25c60 fix: 避免在仅调整虚拟机磁盘时opslog日志记录mem cpu异常 (#7394)
Co-authored-by: Qu Xuan <quxuan@yunionyun.com>
2020-07-31 17:57:02 +08:00
Qu Xuan
b09dbdd69f fix: avoid lost backend params 2020-07-31 17:19:49 +08:00
Qu Xuan
ae26dc1214 fix: openstack win image user data need encode 2020-07-31 16:55:43 +08:00
Qu Xuan
cbc4739b1a fix: avoid account sync deadlock 2020-07-31 16:32:57 +08:00
Qiu Jian
5cfe521a23 fix: ignore general s3 set acl not implemented error 2020-07-31 16:31:52 +08:00
Zexi Li
1dd8a0c066 Merge pull request #7389 from rainzm/automated-cherry-pick-of-#7387-upstream-release-3.2
Automated cherry pick of #7387: fix(region): zone from guesttemplate's preferzone maybe nil
2020-07-30 17:41:49 +08:00
rainzm
661611f338 fix(region): zone from guesttemplate's preferzone maybe nil 2020-07-30 16:12:36 +08:00
Zexi Li
5bfd7f3494 Merge pull request #7353 from ioito/automated-cherry-pick-of-#7318-upstream-release-3.2
Automated cherry pick of #7318: fix: openstack多项目问题
2020-07-30 15:53:40 +08:00
Zexi Li
4553879a1a Merge pull request #7386 from ioito/automated-cherry-pick-of-#7384-upstream-release-3.2
Automated cherry pick of #7384: fix: avoid parse json err nil pointer
2020-07-30 15:15:38 +08:00
Qu Xuan
fb25efa0cf fix: openstack多项目问题 2020-07-30 14:48:16 +08:00
Qu Xuan
7c2268417b fix: avoid parse json err nil pointer 2020-07-30 11:32:31 +08:00
Zexi Li
97be89b9f6 Merge pull request #7380 from ioito/automated-cherry-pick-of-#7378-upstream-release-3.2
Automated cherry pick of #7378: fix: 添加阿里云rds备份恢复限制条件
2020-07-29 21:38:48 +08:00
Zexi Li
4e31734f0e Merge pull request #7376 from swordqiu/automated-cherry-pick-of-#7375-upstream-release-3.2
Automated cherry pick of #7375: fix: change owner should check required domain list
2020-07-29 17:31:44 +08:00
Qu Xuan
6d0b4f37f7 fix: 添加阿里云rds备份恢复限制条件 2020-07-29 16:56:24 +08:00
Qiu Jian
244e83b8ae fix: change owner should check required domain list 2020-07-29 13:01:14 +08:00
Zexi Li
dd42c55d1e Merge pull request #7374 from ioito/automated-cherry-pick-of-#7358-upstream-release-3.2
Automated cherry pick of #7358: fix: 普通视图下,安全组仅统计可看到的vm count
2020-07-29 10:27:18 +08:00
Zexi Li
c9f61ca7d5 Merge pull request #7361 from ioito/automated-cherry-pick-of-#7359-upstream-release-3.2
Automated cherry pick of #7359: fix: 修复vm绑定重复安全组
2020-07-28 20:56:06 +08:00
Qu Xuan
439cf1948e fix: 普通视图下,安全组仅统计可看到的vm count 2020-07-28 20:53:32 +08:00
Zexi Li
d2916c079f Merge pull request #7370 from ioito/automated-cherry-pick-of-#7368-upstream-release-3.2
Automated cherry pick of #7368: fix: 同步sku与磁盘类型关系
2020-07-28 20:48:10 +08:00
Qu Xuan
cf294a1f58 fix: 同步sku与磁盘类型关系 2020-07-28 19:47:50 +08:00
Zexi Li
63bff57a05 Merge pull request #7366 from zexi/automated-cherry-pick-of-#7364-upstream-release-3.2
Automated cherry pick of #7364: adjust schedule resource condition width
2020-07-28 18:50:29 +08:00
Zexi Li
620b31e0f3 Merge pull request #7356 from ioito/automated-cherry-pick-of-#7354-upstream-release-3.2
Automated cherry pick of #7354: fix: 避免创建rds备份时对rds进行一些操作
2020-07-28 18:49:47 +08:00
Zexi Li
95b21d541d adjust schedule resource condition width 2020-07-28 18:37:23 +08:00
Qu Xuan
d6782d5324 fix: 修复vm绑定重复安全组 2020-07-28 18:15:45 +08:00
Qu Xuan
fd233a6869 fix: 避免创建rds备份时对rds进行一些操作 2020-07-28 16:03:06 +08:00
Zexi Li
92a7fad56c Merge pull request #7340 from rainzm/automated-cherry-pick-of-#7338-upstream-release-3.2
Automated cherry pick of #7338: fix(region): Remove default secgroup for esxi guest
2020-07-27 19:49:24 +08:00
Zexi Li
788c845ca3 Merge pull request #7345 from rainzm/automated-cherry-pick-of-#7343-upstream-release-3.2
Automated cherry pick of #7343: fix: modify list details for guesttemplate
2020-07-27 19:48:28 +08:00
Zexi Li
7554cd5268 Merge pull request #7322 from swordqiu/automated-cherry-pick-of-#7321-upstream-release-3.2
Automated cherry pick of #7321: fix: choose candidate list from the list returned from backend
2020-07-27 15:53:56 +08:00
Zexi Li
15fe440911 Merge pull request #7325 from swordqiu/automated-cherry-pick-of-#7324-upstream-release-3.2
Automated cherry pick of #7324: fix: schedtag should be system resource
2020-07-27 15:49:59 +08:00
Zexi Li
7a4d0cf507 Merge pull request #7328 from tb365/automated-cherry-pick-of-#7327-upstream-release-3.2
Automated cherry pick of #7327: huawei fetch regions&projects fix
2020-07-27 15:21:51 +08:00
rainzm
0824b5445e Add metadata for GuestTempalte details 2020-07-27 15:18:40 +08:00
rainzm
951f53a96b Add network info when list scalingGroup details 2020-07-27 15:18:40 +08:00
rainzm
260d259392 fix: modify list details for guesttemplate 2020-07-27 15:18:40 +08:00
Zexi Li
54b16d94c7 Merge pull request #7333 from swordqiu/automated-cherry-pick-of-#7332-upstream-release-3.2
Automated cherry pick of #7332: fix: cloud account delete may fail due to inconsistent status
2020-07-27 15:13:01 +08:00
rainzm
52008bace0 fix(region): Remove default secgroup for esxi guest
1. InitializeData remove all secgroup_id of esxi guest from database
2. Set input.SecgroupId as empty for guest whose GetMaxSecurityGroupCount
return 0
2020-07-27 14:54:19 +08:00
屈轩
5df48d5b76 fix: 避免status_code>=400并且resp为空时err为nil (#7266)
Co-authored-by: Qu Xuan <quxuan@yunionyun.com>
2020-07-27 04:43:24 +08:00
yunion-ci-robot
88f46fc0c2 Merge pull request #7313 from ioito/automated-cherry-pick-of-#7310-upstream-release-3.2
Automated cherry pick of #7310: fix: 支持多项目安全组规则过滤
2020-07-25 23:56:45 +08:00
Qiu Jian
44f3226061 fix: cloud account delete may fail due to inconsistent status 2020-07-25 23:08:17 +08:00
yunion-ci-robot
d997501c64 Merge pull request #7305 from wanyaoqi/automated-cherry-pick-of-#7302-upstream-release-3.2
Automated cherry pick of #7302: fix clone clean pending usage
2020-07-24 22:52:44 +08:00
tangbin
8f7e75772c go fmt 2020-07-24 18:31:04 +08:00
tangbin
c723def4b7 go fmt 2020-07-24 18:31:04 +08:00
tangbin
31a9373b7b host upload template check 2020-07-24 18:31:03 +08:00
tangbin
a85af97bef huawei fetch regions&projects fix 2020-07-24 18:31:02 +08:00
Qiu Jian
143fa7a896 fix: schedtag should be system resource 2020-07-24 17:03:38 +08:00
Qiu Jian
7e68b1c6a2 fix: choose candidate list from the list returned from backend 2020-07-24 16:41:43 +08:00
Qu Xuan
ec16b2abbd fix: 支持多项目安全组规则过滤 2020-07-23 20:36:59 +08:00
wanyaoqi
a8a2f07742 fix clone clean pending usage 2020-07-23 18:39:02 +08:00
Zexi Li
b627985733 Merge pull request #7296 from wanyaoqi/automated-cherry-pick-of-#7294-upstream-release-3.2
Automated cherry pick of #7294: fix snapshot clean pending usage
2020-07-23 13:48:08 +08:00
wanyaoqi
89a355132c fix snapshot clean pending usage 2020-07-23 11:36:46 +08:00
Zexi Li
0e9d0052e9 Merge pull request #7288 from tb365/automated-cherry-pick-of-#7286-upstream-release-3.2
Automated cherry pick of #7286: apigateway host imports data validate
2020-07-22 21:44:07 +08:00
tangbin
2b67f052b7 format fix 2020-07-22 17:50:46 +08:00
tangbin
6280ea485d fix empty else 2020-07-22 17:50:46 +08:00
tangbin
0b7ab48836 fix host import 2020-07-22 17:50:46 +08:00
tangbin
88d67e0f36 fix huawei delete resource 2020-07-22 17:50:46 +08:00
tangbin
faffc39a34 fix huawei elb disable healthcheck 2020-07-22 17:50:46 +08:00
tangbin
9ce1527d35 lb sync project fix 2020-07-22 17:50:45 +08:00
tangbin
1b480af798 add more log 2020-07-22 17:50:45 +08:00
tangbin
dfbd0af963 apigateway host imports data validate 2020-07-22 17:50:45 +08:00
Zexi Li
83e67c50c3 Merge pull request #7278 from ioito/automated-cherry-pick-of-#7276-upstream-release-3.2
Automated cherry pick of #7276: fix: 避免未能导出共享安全组规则
2020-07-22 13:55:50 +08:00
Zexi Li
27fa4752a2 Merge pull request #7275 from swordqiu/automated-cherry-pick-of-#7273-upstream-release-3.2
Automated cherry pick of #7273: fix: image upload not clean pending usage
2020-07-22 13:54:45 +08:00
Zexi Li
4281636f42 Merge pull request #7283 from rainzm/automated-cherry-pick-of-#7281-upstream-release-3.2
Automated cherry pick of #7281: fix(esxi): Select correct unitNumber for ide control when creating disk
2020-07-22 13:52:26 +08:00
Rain Zheng
d670f37156 fix(esxi): Select correct unitNumber for ide control when creating disk 2020-07-21 20:49:18 +08:00
Qu Xuan
9fef6dfb46 fix: 避免未能导出共享安全组规则 2020-07-21 17:14:54 +08:00
yunion-ci-robot
1f6762b4a0 Merge pull request #7272 from zexi/automated-cherry-pick-of-#7270-upstream-release-3.2
Automated cherry pick of #7270: baremetal: set zone when enable netif
2020-07-21 11:49:25 +08:00
Qiu Jian
2a892fd845 fix: image upload not clean pending usage 2020-07-21 01:43:40 +08:00
yunion-ci-robot
1d1674faf9 Merge pull request #7269 from tb365/automated-cherry-pick-of-#7267-upstream-release-3.2
Automated cherry pick of #7267: fix GetOrCreateVpcForClassicNetwork
2020-07-20 20:49:27 +08:00
Zexi Li
ae1acc891c Merge pull request #7262 from tb365/automated-cherry-pick-of-#7237-upstream-release-3.2
Automated cherry pick of #7237: huawei eip delete fix
2020-07-20 20:47:34 +08:00
Zexi Li
9fd48cee3c baremetal: set zone when enable netif 2020-07-20 20:45:30 +08:00
tangbin
ea14aaa52e fix GetOrCreateVpcForClassicNetwork 2020-07-20 18:52:08 +08:00
tangbin
38440ed276 huawei eip delete fix 2020-07-20 10:51:56 +08:00
Zexi Li
2910eeb89b Merge pull request #7241 from ioito/automated-cherry-pick-of-#7225-upstream-release-3.2
Automated cherry pick of #7225: fix: rds备份恢复优化
2020-07-20 02:07:57 +08:00
Zexi Li
53d0d4c4e7 Merge pull request #7230 from wanyaoqi/automated-cherry-pick-of-#7228-upstream-release-3.2
Automated cherry pick of #7228: fix server sync status
2020-07-20 02:06:41 +08:00
Zexi Li
e3270c90e6 Merge pull request #7236 from ioito/automated-cherry-pick-of-#7234-upstream-release-3.2
Automated cherry pick of #7234: fix: globalvpc跟随云账号共享
2020-07-20 02:05:46 +08:00
Zexi Li
31883f5984 Merge pull request #7232 from tb365/automated-cherry-pick-of-#7231-upstream-release-3.2
Automated cherry pick of #7231: acl delete condition fix
2020-07-20 02:02:25 +08:00
Zexi Li
1e7b5e2e2c Merge pull request #7250 from wanyaoqi/automated-cherry-pick-of-#7248-upstream-release-3.2
Automated cherry pick of #7248: fix error output
2020-07-19 20:53:59 +08:00
Zexi Li
c939399546 Merge pull request #7252 from swordqiu/automated-cherry-pick-of-#7251-upstream-release-3.2
Automated cherry pick of #7251: fix: quota usage not updated after disk resizing
2020-07-19 20:25:07 +08:00
Qiu Jian
f2e4a9af63 fix: quota usage not updated after disk resizing 2020-07-19 13:24:31 +08:00
wanyaoqi
e4c24c436c fix error output 2020-07-19 12:35:25 +08:00
Qu Xuan
144f40b472 fix: rds备份恢复优化 2020-07-18 20:48:28 +08:00
Qu Xuan
0af8c519be fix: globalvpc跟随云账号共享 2020-07-17 20:47:10 +08:00
tangbin
e1665416f1 acl delete condition fix 2020-07-17 20:41:34 +08:00
wanyaoqi
050d019f7f fix server sync status 2020-07-17 20:25:56 +08:00
Zexi Li
4e7af6e2e7 Merge pull request #7227 from ioito/automated-cherry-pick-of-#7224-upstream-release-3.2
Automated cherry pick of #7224: fix: 过滤可用eip
2020-07-17 20:25:04 +08:00
Zexi Li
df8982747a Merge pull request #7223 from ioito/automated-cherry-pick-of-#7221-upstream-release-3.2
Automated cherry pick of #7221: fix: 避免乌兰察布区域拉取资源异常
2020-07-17 20:24:05 +08:00
Qu Xuan
08c836ad1c fix: 过滤可用eip 2020-07-17 20:16:54 +08:00
Qu Xuan
5a47ca5da4 fix: 避免乌兰察布区域拉取资源异常 2020-07-17 18:53:20 +08:00
Zexi Li
1e992cc145 Merge pull request #7218 from rainzm/automated-cherry-pick-of-#7216-upstream-release-3.2
Automated cherry pick of #7216: fix: prefetch image error when create guest with vmware template
2020-07-17 10:16:43 +08:00
Zexi Li
1c45f1c6a4 Merge pull request #7215 from tb365/automated-cherry-pick-of-#7213-upstream-release-3.2
Automated cherry pick of #7213: sync classic redis fix
2020-07-17 10:15:54 +08:00
Zexi Li
128bf89ba8 Merge pull request #7205 from yousong/automated-cherry-pick-of-#7202-upstream-release-3.2
Automated cherry pick of #7202: mcclient: options: loadbalanceragents: yum as the default deploy method
2020-07-17 10:15:17 +08:00
Zexi Li
7055459cc0 Merge pull request #7200 from yousong/automated-cherry-pick-of-#7198-upstream-release-3.2
Automated cherry pick of #7198: ansibleserver: register metadata manager
2020-07-17 10:12:02 +08:00
Zexi Li
f0a65e5b5f Merge pull request #7197 from ioito/automated-cherry-pick-of-#7195-upstream-release-3.2
Automated cherry pick of #7195: fix: sec rule export missing fields
2020-07-17 10:10:42 +08:00
Zexi Li
34c865ce22 Merge pull request #7191 from ioito/automated-cherry-pick-of-#7077-upstream-release-3.2
Automated cherry pick of #7077: fix: 修复elastic cache sku zone_id异常问题
2020-07-17 10:09:57 +08:00
Zexi Li
51911362ab Merge pull request #7194 from wanyaoqi/automated-cherry-pick-of-#7192-upstream-release-3.2
Automated cherry pick of #7192: add params auto_migrate_on_host_down
2020-07-17 10:09:14 +08:00
Zexi Li
28c6abd0e8 Merge pull request #7212 from ioito/automated-cherry-pick-of-#7210-upstream-release-3.2
Automated cherry pick of #7210: fix: not work for network-list --zones
2020-07-17 10:08:22 +08:00
rainzm
d3c1bfd21d fix: prefetch image error when create guest with vmware template
1. Only need the corresponding vmware template in the vcenter where the host is
located.
2. Chose storagecache which cacheimage is ready before deploying.
2020-07-16 21:44:26 +08:00
tangbin
df2deb61c4 update vendor 2020-07-16 20:39:35 +08:00
tangbin
38be2488be sync classic redis fix 2020-07-16 20:34:09 +08:00
yunion-ci-robot
c781346225 Merge pull request #7206 from zexi/automated-cherry-pick-of-#7201-upstream-release-3.2
Automated cherry pick of #7201: webconsole: fix old session make new session closed
2020-07-16 20:21:20 +08:00
Qu Xuan
60ba1ffc20 fix: not work for network-list --zones 2020-07-16 19:06:37 +08:00
Yousong Zhou
87bba5ae4f region: lbagents: turn off guest src check 2020-07-16 18:50:36 +08:00
Yousong Zhou
836ac8e00e region: loadbalanceragents: yum as the default method 2020-07-16 18:50:36 +08:00
Yousong Zhou
4bdf62cb81 mcclient: options: loadbalanceragents: yum as the default deploy method 2020-07-16 18:50:36 +08:00
Zexi Li
1d2b64d62e webconsole: fix old session make new session closed 2020-07-16 18:50:29 +08:00
Yousong Zhou
67230151a0 build: ansibleserver: use native alpine, include openssh 2020-07-16 18:12:41 +08:00
Yousong Zhou
08b60b4c6f ansibleserver: register metadata manager
To quash the following error in log

  [E 200716 15:20:40 db.(*SMetadataResourceBaseModelManager).FetchCustomizeColumns(metadataresource.go:136)] FetchQueryObjectsByIds metadata fail Error 1146: Table 'yunionansible.metadata_tbl' doesn't exist
2020-07-16 18:10:38 +08:00
Qu Xuan
9e81cae902 fix: sec rule export missing fields 2020-07-16 17:14:44 +08:00
Qu Xuan
020f3dee57 fix: 修复elastic cache sku zone_id异常问题 2020-07-16 16:32:08 +08:00
wanyaoqi
4ab5051c04 add params auto_migrate_on_host_down 2020-07-16 15:08:33 +08:00
Zexi Li
e39ce07331 Merge pull request #7176 from ioito/automated-cherry-pick-of-#7174-upstream-release-3.2
Automated cherry pick of #7174: fix: 添加secgroup rule过滤参数
2020-07-16 11:18:55 +08:00
Zexi Li
3259b1b2c4 Merge pull request #7190 from ioito/automated-cherry-pick-of-#7188-upstream-release-3.2
Automated cherry pick of #7188: fix: check azure image format when rebuild root
2020-07-16 11:09:51 +08:00
Zexi Li
2934f6c15b Merge pull request #7179 from ioito/automated-cherry-pick-of-#7177-upstream-release-3.2
Automated cherry pick of #7177: fix: 避免华为云安全组规则删除失败
2020-07-16 10:16:35 +08:00
Qu Xuan
84c7341b7f fix: check azure image format when rebuild root 2020-07-15 18:48:25 +08:00
Zexi Li
5cff334188 Merge pull request #7183 from wanyaoqi/automated-cherry-pick-of-#7181-upstream-release-3.2
Automated cherry pick of #7181: misc ha guest fix
2020-07-15 17:42:40 +08:00
Qu Xuan
987ba6079b fix: 避免华为云安全组规则删除失败 2020-07-15 17:14:21 +08:00
wanyaoqi
60df899d5d misc ha guest fix 2020-07-15 17:06:43 +08:00
Qu Xuan
39c033e0c5 fix: 添加secgroup rule过滤参数 2020-07-15 14:32:24 +08:00
Zexi Li
01908aebdb Merge pull request #7170 from wanyaoqi/automated-cherry-pick-of-#7168-upstream-release-3.2
Automated cherry pick of #7168: fix list guests on host
2020-07-15 10:46:03 +08:00
Zexi Li
472a2f9ebb Merge pull request #7154 from yousong/bugfix/yousong-vpcagent-mtu3.2
vpcagent: ovn: set underlay mtu size in config file
2020-07-15 10:35:28 +08:00
Zexi Li
4919226d0d Merge pull request #7160 from yousong/automated-cherry-pick-of-#7158-upstream-release-3.2
Automated cherry pick of #7158: iproute2: address: make Exact idempotent
2020-07-15 10:34:41 +08:00
Zexi Li
769dd28a51 Merge pull request #7164 from tb365/automated-cherry-pick-of-#7163-upstream-release-3.2
Automated cherry pick of #7163: cloudprovider usable filter with zone
2020-07-15 10:34:03 +08:00
wanyaoqi
2b7373608d fix list guests on host 2020-07-14 22:36:55 +08:00
tangbin
6a81f78a4d cloudprovider usable filter with zone 2020-07-14 19:55:05 +08:00
Zexi Li
05d5bd6c9f Merge pull request #7157 from ioito/automated-cherry-pick-of-#7155-upstream-release-3.2
Automated cherry pick of #7155: fix: 优化webconsole代码&bugfix
2020-07-14 17:53:08 +08:00
Yousong Zhou
48000786cc iproute2: address: make Exact idempotent
Idempotence against address not available for Exact is not a bad idea if
we look at the name of that func

This should accomodate the race condition where keepalived will remove
vips should the primary address used for vrrp comms is removed, causing
later addr del to fail with "cannot assign requested address"
2020-07-14 16:42:18 +08:00
Qu Xuan
fae1c3d542 fix: 优化webconsole代码&bugfix 2020-07-14 15:09:35 +08:00
Yousong Zhou
ba87528561 vpcagent: ovn: set underlay mtu size in config file
(cherry picked from commit 2841e245e2)
2020-07-14 11:38:21 +08:00
Zexi Li
03d393cca4 Merge pull request #7149 from rainzm/automated-cherry-pick-of-#7147-upstream-release-3.2
Automated cherry pick of #7147: fix: mo.VirtualMachine's Config maybe nil
2020-07-14 11:34:47 +08:00
rainzm
51131f9c75 fix: mo.VirtualMachine's Config maybe nil 2020-07-13 23:11:02 +08:00
Zexi Li
b7b5e5666e Merge pull request #7136 from tb365/automated-cherry-pick-of-#7135-upstream-release-3.2
Automated cherry pick of #7135: user batch register bugfix
2020-07-13 21:28:58 +08:00
Zexi Li
3c9ca461d9 Merge pull request #7142 from ioito/automated-cherry-pick-of-#7140-upstream-release-3.2
Automated cherry pick of #7140: fix: 修复阿里云同步安全组规则异常问题
2020-07-13 21:24:36 +08:00
Qu Xuan
f874a02c05 fix: 修复阿里云同步安全组规则异常问题 2020-07-13 20:48:18 +08:00
tangbin
f7b31c08cb user batch register bugfix 2020-07-13 14:49:20 +08:00
Zexi Li
08c2864b71 Merge pull request #7127 from wanyaoqi/automated-cherry-pick-of-#7125-upstream-release-3.2
Automated cherry pick of #7125: - fix local storage init local man
2020-07-10 20:15:49 +08:00
wanyaoqi
b25e4dfb31 - fix local storage init local man
- fix rbd set storage info
2020-07-10 14:49:35 +08:00
Zexi Li
35cdcbe0ff Merge pull request #7118 from ioito/automated-cherry-pick-of-#7116-upstream-release-3.2
Automated cherry pick of #7116: fix: 修复vpc同步异常问题
2020-07-09 21:23:17 +08:00
Zexi Li
8e440f9390 Merge pull request #7115 from ioito/automated-cherry-pick-of-#7113-upstream-release-3.2
Automated cherry pick of #7113: fix: 避免越界访问
2020-07-09 21:21:24 +08:00
Zexi Li
40a903a56f Merge pull request #7108 from wanyaoqi/automated-cherry-pick-of-#7106-upstream-release-3.2
Automated cherry pick of #7106: fix set storage info bind mount
2020-07-09 21:19:39 +08:00
Qu Xuan
2d4d76cdd6 fix: 修复vpc同步异常问题 2020-07-09 21:13:36 +08:00
Qu Xuan
3e2eeb9e6e fix: 避免越界访问 2020-07-09 20:25:11 +08:00
wanyaoqi
447f41a40f fix set storage info bind mount 2020-07-09 14:55:44 +08:00
Zexi Li
95f59d0a59 Merge pull request #7104 from swordqiu/automated-cherry-pick-of-#7102-upstream-release-3.2
Automated cherry pick of #7102: fix: opslog show the owners operation logs only
2020-07-09 14:24:13 +08:00
Qiu Jian
40ee6d6d44 fix: opslog show the owners operation logs only 2020-07-09 11:27:01 +08:00
Zexi Li
f978973c7e Merge pull request #7095 from ioito/automated-cherry-pick-of-#7093-upstream-release-3.2
Automated cherry pick of #7093: fix: 修复资源组云上同步异常问题
2020-07-08 21:24:30 +08:00
Qu Xuan
8f5634eafc fix: 修复资源组云上同步异常问题 2020-07-08 16:26:26 +08:00
Zexi Li
eda171ced0 Merge pull request #7081 from ioito/automated-cherry-pick-of-#7079-upstream-release-3.2
Automated cherry pick of #7079: fix: 修复腾讯云操作日志时间异常问题
2020-07-08 14:09:39 +08:00
Zexi Li
c3a81ca793 Merge pull request #7090 from ioito/automated-cherry-pick-of-#7088-upstream-release-3.2
Automated cherry pick of #7088: fix: 修复azure 项目同步问题
2020-07-08 01:38:24 +08:00
Qu Xuan
abfa4a5a4d fix: 修复azure 项目同步问题 2020-07-07 18:48:31 +08:00
Qu Xuan
e77eb6e8ba fix: 修复腾讯云操作日志时间异常问题 2020-07-07 14:59:19 +08:00
Zexi Li
9d35818660 Merge pull request #7070 from swordqiu/automated-cherry-pick-of-#6880-upstream-release-3.2
Automated cherry pick of #6880: feature: 1. allow enable/disable idp-synced-users 2. turn off user's MFA by default
2020-07-07 14:51:45 +08:00
Zexi Li
fe28b8d6c6 Merge pull request #7073 from ioito/automated-cherry-pick-of-#7066-upstream-release-3.2
Automated cherry pick of #7066: fix: json request 支持自定义匹配err
2020-07-07 14:46:56 +08:00
Zexi Li
bccc16c4c5 Merge pull request #7053 from ioito/automated-cherry-pick-of-#7050-upstream-release-3.2
Automated cherry pick of #7050: fix: google rds regional and zonal
2020-07-07 14:45:51 +08:00
Zexi Li
8f3a9fe611 Merge pull request #7076 from ioito/automated-cherry-pick-of-#7074-upstream-release-3.2
Automated cherry pick of #7074: fix: 分开统计安全组关联虚拟机数量
2020-07-07 14:43:39 +08:00
Qu Xuan
dce47bbb22 fix: 分开统计安全组关联虚拟机数量 2020-07-07 11:49:52 +08:00
Qu Xuan
15a809e744 fix: json request 支持自定义匹配err 2020-07-07 11:18:32 +08:00
Zexi Li
ba7af63d59 Merge pull request #7063 from rainzm/automated-cherry-pick-of-#7061-upstream-release-3.2
Automated cherry pick of #7061: Update docker image onecloud-base and its references
2020-07-07 11:12:51 +08:00
Qiu Jian
c808ca89e6 remove mfa/totp modification on 3.2 2020-07-07 01:21:22 +08:00
Qiu Jian
d2b28e04c9 feature: 1. allow enable/disable idp-synced-users 2. turn off user's MFA by default 2020-07-07 01:19:14 +08:00
rainzm
b9908acaae Update docker image onecloud-base and its references 2020-07-06 21:04:45 +08:00
Qu Xuan
fec72492b7 fix: google rds regional and zonal 2020-07-06 11:18:52 +08:00
Zexi Li
1a0974ae83 Merge pull request #7044 from swordqiu/automated-cherry-pick-of-#7042-upstream-release-3.2
Automated cherry pick of #7042: feature: project filter that list jointable projects for user or group
2020-07-04 12:11:45 +08:00
Zexi Li
51197b837f Merge pull request #7033 from ioito/automated-cherry-pick-of-#7031-upstream-release-3.2
Automated cherry pick of #7031: fix: 避免azure同步资源组异常
2020-07-04 12:10:50 +08:00
Zexi Li
dcfa17492b Merge pull request #7038 from swordqiu/automated-cherry-pick-of-#7036-upstream-release-3.2
Automated cherry pick of #7036: fix: cloud account sync may block
2020-07-04 12:09:28 +08:00
Qiu Jian
b982ff47f3 feature: project filter that list jointable projects for user or group 2020-07-04 11:35:47 +08:00
Qiu Jian
d9035e9cba fix: cloud account sync may block 2020-07-04 10:24:24 +08:00
Qu Xuan
c4f14c7f42 fix: 避免azure同步资源组异常 2020-07-03 20:57:52 +08:00
Zexi Li
60bcb757fb Merge pull request #7011 from ioito/automated-cherry-pick-of-#7009-upstream-release-3.2
Automated cherry pick of #7009: fix: 取消aliyun lb scheduler创建限制
2020-07-03 19:24:49 +08:00
Zexi Li
40bffa5d12 Merge pull request #7022 from ioito/automated-cherry-pick-of-#7020-upstream-release-3.2
Automated cherry pick of #7020: fix: 优化安全组list速度,并发挥rule规则信息
2020-07-03 17:39:40 +08:00
Qu Xuan
22e7aa2f79 fix: 优化安全组list速度,并发挥rule规则信息 2020-07-03 15:53:26 +08:00
yunion-ci-robot
b34f6dbd8c Merge pull request #7001 from tb365/automated-cherry-pick-of-#7000-upstream-release-3.2
Automated cherry pick of #7000: cluster_d required->optional
2020-07-02 20:29:27 +08:00
Zexi Li
fdc918a0ee Merge pull request #7005 from ioito/automated-cherry-pick-of-#6998-upstream-release-3.2
Automated cherry pick of #6998: fix: manager_id资源隔离获取
2020-07-02 20:20:23 +08:00
Zexi Li
7609ef53df Merge pull request #7008 from wanyaoqi/automated-cherry-pick-of-#7006-upstream-release-3.2
Automated cherry pick of #7006: bind mount nfs storage path
2020-07-02 17:35:30 +08:00
Qu Xuan
ee173b3397 fix: 取消aliyun lb scheduler创建限制 2020-07-02 15:44:42 +08:00
wanyaoqi
4e22ff4805 bind mount nfs storage path 2020-07-02 14:35:13 +08:00
Qu Xuan
aaa3d498a5 fix: manager_id资源隔离获取 2020-07-02 14:30:18 +08:00
tangbin
a2bcbb83cd cluster_d required->optional 2020-07-02 11:54:39 +08:00
Zexi Li
068662e36e Merge pull request #6992 from rainzm/automated-cherry-pick-of-#6990-upstream-release-3.2
Automated cherry pick of #6990: fix the bug introduced in #6643
2020-07-01 19:26:32 +08:00
rainzm
9c141930c2 fix the bug introduced in #6643 2020-07-01 16:54:28 +08:00
Zexi Li
d27574e832 Merge pull request #6969 from ioito/automated-cherry-pick-of-#6903-upstream-release-3.2
Automated cherry pick of #6903: fix: 修正项目映射同步
2020-07-01 16:30:02 +08:00
Zexi Li
8641803302 Merge pull request #6977 from wanyaoqi/automated-cherry-pick-of-#6975-upstream-release-3.2
Automated cherry pick of #6975: fix deploy backup server order
2020-06-30 23:09:03 +08:00
wanyaoqi
6feeff2009 fix deploy backup server order 2020-06-30 22:03:51 +08:00
Qu Xuan
60cdc3fdda fix: 支持同步project标签到本地资源 2020-06-30 14:08:49 +08:00
Qu Xuan
6bed7639b0 fix: 修正项目映射同步 2020-06-30 11:52:41 +08:00
Zexi Li
aa9a5896c8 Merge pull request #6949 from swordqiu/automated-cherry-pick-of-#6947-upstream-release-3.2
Automated cherry pick of #6947: fix: disable domain sharing if non_default_domain_projects turned off
2020-06-30 10:48:22 +08:00
Qiu Jian
24f4b91955 fix: disable domain sharing if non_default_domain_projects turned off 2020-06-28 13:26:31 +08:00
Zexi Li
185c780faf Merge pull request #6945 from yousong/automated-cherry-pick-of-#6943-upstream-release-3.2
Automated cherry pick of #6943: lb: include cluster name info in details
2020-06-28 09:01:44 +08:00
Yousong Zhou
b3588b48a2 lb: include cluster name info in details 2020-06-24 18:55:51 +08:00
Zexi Li
98a0d39a0a Merge pull request #6935 from wanyaoqi/automated-cherry-pick-of-#6933-upstream-release-3.2
Automated cherry pick of #6933: server name enable upper case
2020-06-24 17:42:27 +08:00
Zexi Li
f7fde18f46 Merge pull request #6920 from ioito/automated-cherry-pick-of-#6918-upstream-release-3.2
Automated cherry pick of #6918: fix: 避免azure同步项目失败
2020-06-24 12:58:40 +08:00
Zexi Li
0cb69b7fb6 Merge pull request #6928 from ioito/automated-cherry-pick-of-#6926-upstream-release-3.2
Automated cherry pick of #6926: fix: google资源名称兼容处理
2020-06-23 23:29:39 +08:00
Zexi Li
8637b1fa04 Merge pull request #6938 from swordqiu/automated-cherry-pick-of-#6936-upstream-release-3.2
Automated cherry pick of #6936: fix: sort quota list result by usage rate
2020-06-23 23:28:02 +08:00
Qiu Jian
9a6362cd6b fix: sort quota list result by usage rate 2020-06-23 22:24:00 +08:00
Zexi Li
e0b523ba65 Merge pull request #6923 from swordqiu/automated-cherry-pick-of-#6921-upstream-release-3.2
Automated cherry pick of #6921: fix: simplify forbidden user login message
2020-06-23 21:26:03 +08:00
wanyaoqi
74037b56ca server name enable upper case 2020-06-23 21:07:16 +08:00
Qu Xuan
a898351061 fix: google资源名称兼容处理 2020-06-23 20:30:54 +08:00
Qiu Jian
21f1486001 fix: simplify forbidden user login message 2020-06-23 17:47:49 +08:00
Qu Xuan
8ec7fd93dc fix: 避免azure同步项目失败 2020-06-23 17:32:49 +08:00
Zexi Li
f3b2f3d93e Merge pull request #6905 from wanyaoqi/automated-cherry-pick-of-#6904-upstream-release-3.2
Automated cherry pick of #6904: fix get storage capabilities with null field
2020-06-23 11:53:31 +08:00
Zexi Li
a75554ed40 Merge pull request #6916 from ioito/automated-cherry-pick-of-#6912-upstream-release-3.2
Automated cherry pick of #6912: optimized: 支持ip和端口过滤安全组
2020-06-23 11:52:32 +08:00
Qu Xuan
3452b85d69 optimized: 支持ip和端口过滤安全组 2020-06-23 11:26:37 +08:00
yunion-ci-robot
ef47ad9807 Merge pull request #6908 from wanyaoqi/automated-cherry-pick-of-#6906-upstream-release-3.2
Automated cherry pick of #6906: disable dhclient
2020-06-22 23:42:03 +08:00
wanyaoqi
063ac404f0 disable dhclient 2020-06-22 21:30:53 +08:00
wanyaoqi
1425da2ccd fix get storage capabilities with null field 2020-06-22 20:00:15 +08:00
Zexi Li
c857ca4410 Merge pull request #6895 from yousong/automated-cherry-pick-of-#6893-upstream-release-3.2
Automated cherry pick of #6893: cloudcommon: app: cosmetic change
2020-06-22 09:15:33 +08:00
Yousong Zhou
8bb60ea439 cloudcommon: policy: fix interval and oneshot sync
Reduce CPU utilization caused by queued time.AfterFunc calls
2020-06-21 18:34:00 +08:00
Yousong Zhou
f59f5cb4bf cloudcommon: app: cosmetic change 2020-06-21 18:34:00 +08:00
yunion-ci-robot
c8e986d077 Merge pull request #6870 from rainzm/automated-cherry-pick-of-#6869-upstream-release-3.2
Automated cherry pick of #6869: Notify/email fix
2020-06-19 10:09:22 +08:00
yunion-ci-robot
2878cc81e8 Merge pull request #6884 from swordqiu/automated-cherry-pick-of-#6883-upstream-release-3.2
Automated cherry pick of #6883: fix: network created by sysadmin should be shared by default
2020-06-19 09:50:14 +08:00
yunion-ci-robot
b3b26475cc Merge pull request #6886 from swordqiu/automated-cherry-pick-of-#6885-upstream-release-3.2
Automated cherry pick of #6885: fix: wrong cloud provider status when sync disconnected cloud account
2020-06-19 09:49:08 +08:00
Qiu Jian
bd2a4e2832 fix: wrong cloud provider status when sync disconnected cloud account 2020-06-19 01:21:00 +08:00
yunion-ci-robot
cacd42ee15 Merge pull request #6860 from yousong/automated-cherry-pick-of-#6859-upstream-release-3.2
Automated cherry pick of #6859: cloudaccounts: one sync task in queue per cloudaccount
2020-06-18 23:20:03 +08:00
yunion-ci-robot
a90e6eac8c Merge pull request #6882 from wanyaoqi/automated-cherry-pick-of-#6881-upstream-release-3.2
Automated cherry pick of #6881: fix reserved ip export keys
2020-06-18 22:52:04 +08:00
Qiu Jian
95413e8a02 fix: network created by sysadmin should be shared by default 2020-06-18 22:48:26 +08:00
wanyaoqi
639e4fb87f fix reserved ip export keys 2020-06-18 21:45:56 +08:00
rainzm
7ffb1c969f fix: Fix problems about sending verify email 2020-06-18 19:05:58 +08:00
rainzm
a1a96f35fe fix: Fix the url of 'notify-template-delete' in climc 2020-06-18 19:05:58 +08:00
Zexi Li
a06b9c7884 Merge pull request #6872 from ioito/automated-cherry-pick-of-#6871-upstream-release-3.2
Automated cherry pick of #6871: fix: 避免同步删除失败
2020-06-18 19:05:31 +08:00
Qu Xuan
fd788b15b3 fix: 避免同步删除失败 2020-06-18 17:20:11 +08:00
Yousong Zhou
2ccc45df92 cloudaccounts: one sync task in queue per cloudaccount 2020-06-18 17:12:09 +08:00
yunion-ci-robot
4abbfd9932 Merge pull request #6877 from tb365/automated-cherry-pick-of-#6875-upstream-release-3.2
Automated cherry pick of #6875: replace err with errors.cause
2020-06-18 15:13:06 +08:00
tangbin
8fd53d0db5 replace err with errors.cause 2020-06-18 14:30:52 +08:00
Zexi Li
5775c13fbf Merge pull request #6862 from tb365/automated-cherry-pick-of-#6861-upstream-release-3.2
Automated cherry pick of #6861: shuzhou to suzhou
2020-06-17 18:50:50 +08:00
Zexi Li
c9998c8b47 Merge pull request #6841 from zexi/automated-cherry-pick-of-#6839-upstream-release-3.2
Automated cherry pick of #6839: scheduler: fix memory over committed
2020-06-17 18:49:35 +08:00
tangbin
43000c7d77 shuzhou to suzhou 2020-06-17 15:53:42 +08:00
Zexi Li
bce22f04d4 Merge pull request #6855 from yousong/automated-cherry-pick-of-#6837-upstream-release-3.2
Automated cherry pick of #6837: appsrv: ring: release ring content on pop
2020-06-17 11:24:35 +08:00
Yousong Zhou
7f98ec2a30 appsrv: rework TestRing 2020-06-17 10:53:15 +08:00
Yousong Zhou
4e735f8972 appsrv: ring: release ring content on pop 2020-06-17 10:53:15 +08:00
Zexi Li
21650e61f9 Merge pull request #6850 from swordqiu/automated-cherry-pick-of-#6849-upstream-release-3.2
Automated cherry pick of #6849: fix: disable policy rule compaction
2020-06-17 10:29:01 +08:00
Qiu Jian
406cc01b7c fix: policy allow if one of the matching rules is allow 2020-06-16 23:11:01 +08:00
Qiu Jian
d8d8256b0a fix: disable policy rule compaction 2020-06-16 23:11:01 +08:00
Zexi Li
75576e17dc Merge pull request #6845 from wanyaoqi/automated-cherry-pick-of-#6844-upstream-release-3.2
Automated cherry pick of #6844: fix cpu usage metrics
2020-06-16 21:00:44 +08:00
wanyaoqi
479b309160 fix cpu usage metrics 2020-06-16 20:44:00 +08:00
Zexi Li
d3ecbd98f8 Merge pull request #6825 from wanyaoqi/automated-cherry-pick-of-#6824-upstream-release-3.2
Automated cherry pick of #6824: fix windows install regedit record
2020-06-16 20:13:02 +08:00
Zexi Li
a957815041 scheduler: fix memory over committed 2020-06-16 19:12:47 +08:00
Zexi Li
bf2d727933 Merge pull request #6829 from yousong/bugfix/yousong-lblistener-cert-32
[3.2] Bugfix/yousong lblistener cert 32
2020-06-15 17:37:11 +08:00
Zexi Li
231a3a9fdd Merge pull request #6831 from ioito/automated-cherry-pick-of-#6830-upstream-release-3.2
Automated cherry pick of #6830: fix: 优化标签列表version问题
2020-06-15 14:11:16 +08:00
Qu Xuan
ada6d9e00c fix: 优化标签列表version问题 2020-06-15 14:06:18 +08:00
Yousong Zhou
6a10d8a66a lblistener: rename filter name certificate{,_id}
Previously we accept both, now with structured input we'd better choose
one and ignore the other.  Use certificate_id because that's the
console's choice
2020-06-15 11:26:07 +08:00
Yousong Zhou
9fd612c5ac lblisteners: list: filter with certificate ids 2020-06-15 11:25:53 +08:00
wanyaoqi
18cb393ba3 fix windows install regedit record 2020-06-15 10:58:07 +08:00
Zexi Li
4e6bb13c52 Merge pull request #6818 from yousong/automated-cherry-pick-of-#6817-upstream-release-3.2
Automated cherry pick of #6817: guestnetworks: use math/rand instead of crypto/rand
2020-06-12 10:10:01 +08:00
Yousong Zhou
2989ecfe8a guestnetworks: reduce odds of collision seeded by epoch seconds 2020-06-11 21:22:16 +08:00
Yousong Zhou
a91e8230f3 guestnetworks: use math/rand instead of crypto/rand 2020-06-11 21:22:16 +08:00
Zexi Li
e8592d9158 Merge pull request #6809 from ioito/automated-cherry-pick-of-#6808-upstream-release-3.2
Automated cherry pick of #6808: fix: 避免sql erorr
2020-06-11 17:52:40 +08:00
Zexi Li
a765271c55 Merge pull request #6812 from ioito/automated-cherry-pick-of-#6810-upstream-release-3.2
Automated cherry pick of #6810: fix: 避免openstack磁盘和存储窜位
2020-06-11 17:52:14 +08:00
Zexi Li
6181ce84b3 Merge pull request #6804 from zexi/automated-cherry-pick-of-#6803-upstream-release-3.2
Automated cherry pick of #6803: webconsole: fix version and others handler not handle
2020-06-11 17:50:03 +08:00
Qu Xuan
51c4a420ae fix: 避免openstack磁盘和存储窜位 2020-06-11 14:13:25 +08:00
Qu Xuan
735461541e fix: 避免sql erorr 2020-06-11 10:42:37 +08:00
Zexi Li
804d987dc0 Merge pull request #6798 from wanyaoqi/automated-cherry-pick-of-#6797-upstream-release-3.2
Automated cherry pick of #6797: fix host list servers filter
2020-06-10 17:05:37 +08:00
Zexi Li
f44f6532dd webconsole: fix version and others handler not handle 2020-06-10 17:00:16 +08:00
wanyaoqi
a4968259e7 fix host list servers filter 2020-06-10 14:07:46 +08:00
Zexi Li
97b6bcd9f0 Merge pull request #6787 from rainzm/automated-cherry-pick-of-#6786-upstream-release-3.2
Automated cherry pick of #6786: fix: Hanle the error of vdisk.GetIStorage in syncCloudDisk
2020-06-10 11:28:01 +08:00
Zexi Li
48326f46dc Merge pull request #6731 from ioito/automated-cherry-pick-of-#6663-upstream-release-3.2
Automated cherry pick of #6663: fix: 优化安全组同步逻辑
2020-06-10 11:19:30 +08:00
Zexi Li
1fb12fe81f Merge pull request #6780 from ioito/automated-cherry-pick-of-#6779-upstream-release-3.2
Automated cherry pick of #6779: fix: 更正华为云操作成功判断
2020-06-10 10:46:02 +08:00
Zexi Li
8c6db4e81a Merge pull request #6776 from yousong/automated-cherry-pick-of-#6775-upstream-release-3.2
Automated cherry pick of #6775: networks: sep check of masklen only for start,end type creation
2020-06-10 10:20:34 +08:00
Zexi Li
18edd50fe3 Merge pull request #6783 from rainzm/automated-cherry-pick-of-#6782-upstream-release-3.2
Automated cherry pick of #6782: fix: Add '/version' handler for notify
2020-06-10 10:19:19 +08:00
Zexi Li
50338788c8 Merge pull request #6792 from swordqiu/automated-cherry-pick-of-#6791-upstream-release-3.2
Automated cherry pick of #6791: fix: policy-explain not working properly
2020-06-10 09:52:57 +08:00
Qiu Jian
447616f779 fix: policy-explain not working properly 2020-06-09 22:28:40 +08:00
rainzm
3e0344dc0d fix: Hanle the error of vdisk.GetIStorage in syncCloudDisk 2020-06-09 19:50:00 +08:00
rainzm
df44eb8082 fix: Add '/version' handler for notify 2020-06-09 18:55:06 +08:00
Qu Xuan
9443fe7b42 fix: 更正华为云操作成功判断 2020-06-09 18:21:03 +08:00
Yousong Zhou
d196db034f networks: validate that start, end, gateway ip are in the same subnet 2020-06-09 16:14:01 +08:00
Yousong Zhou
90e3bcd5d0 networks: validateUpdateData: eliminate intermediate vars 2020-06-09 16:14:01 +08:00
Yousong Zhou
7f052c0a79 networks: decrease indent 2020-06-09 16:14:01 +08:00
Yousong Zhou
3022a121ef networks: sep check of masklen only for start,end type creation 2020-06-09 16:14:01 +08:00
Zexi Li
a3cda0ca59 Merge pull request #6768 from yousong/bugfix/yousong-climc-lb-create-cluster
mcclient: options: lb: arg rename cluster{,_id}
2020-06-09 00:12:40 +08:00
Zexi Li
3d8ef5d442 Merge pull request #6773 from swordqiu/automated-cherry-pick-of-#6772-upstream-release-3.2
Automated cherry pick of #6772: fix: disable updating zone_id for host, storage, wire
2020-06-09 00:12:05 +08:00
Qiu Jian
ce64a499bb fix: disable updating zone_id for host, storage, wire 2020-06-08 22:02:57 +08:00
yunion-ci-robot
191f0dcb88 Merge pull request #6770 from zexi/automated-cherry-pick-of-#6769-upstream-release-3.2
Automated cherry pick of #6769: region: retry set influxdb policy until completed
2020-06-08 21:12:07 +08:00
Zexi Li
fb20a846f8 region: retry set influxdb policy until completed 2020-06-08 19:08:22 +08:00
Yousong Zhou
7f8549cd4b mcclient: options: lb: arg rename cluster{,_id}
Ref b0537773cd ("fxi: 修复lb 有些有vpc_id为空的问题")
2020-06-08 17:36:53 +08:00
Zexi Li
14716b64da Merge pull request #6761 from wanyaoqi/automated-cherry-pick-of-#6760-upstream-release-3.2
Automated cherry pick of #6760: image support generate name
2020-06-08 16:11:42 +08:00
Qu Xuan
42fe1cbfe2 fix: 优化安全组同步逻辑 2020-06-08 14:11:16 +08:00
wanyaoqi
57df58aa43 image support generate name 2020-06-08 11:27:10 +08:00
Zexi Li
8149573a80 Merge pull request #6751 from swordqiu/automated-cherry-pick-of-#6750-upstream-release-3.2
Automated cherry pick of #6750: fix: base64 decode 12-bytes plain text password return nil
2020-06-08 09:13:18 +08:00
yunion-ci-robot
daa0621bcd Merge pull request #6758 from swordqiu/automated-cherry-pick-of-#6757-upstream-release-3.2
Automated cherry pick of #6757: fix: remove spaces in name
2020-06-06 12:22:45 +08:00
Qiu Jian
18e8d68c9d fix: base64 decode 12-bytes plain text password return nil 2020-06-06 11:08:04 +08:00
Qiu Jian
3712a3a077 fix: remove spaces in name 2020-06-06 11:01:59 +08:00
yunion-ci-robot
388b152517 Merge pull request #6693 from ioito/automated-cherry-pick-of-#6692-upstream-release-3.2
Automated cherry pick of #6692: fix: 返回object默认acl
2020-06-06 11:00:45 +08:00
Qu Xuan
e70d7f4357 fix: 返回object默认acl 2020-06-05 11:00:34 +08:00
Zexi Li
97b5bd2006 Merge pull request #6741 from swordqiu/automated-cherry-pick-of-#6740-upstream-release-3.2
Automated cherry pick of #6740: fix: xsky recode using endpoint as accesskey key
2020-06-04 21:40:58 +08:00
Zexi Li
9c100c8a92 Merge pull request #6739 from tb365/automated-cherry-pick-of-#6737-upstream-release-3.2
Automated cherry pick of #6737: ctyun sync host wire fix
2020-06-04 21:39:57 +08:00
Zexi Li
8683501e69 Merge pull request #6745 from wanyaoqi/automated-cherry-pick-of-#6744-upstream-release-3.2
Automated cherry pick of #6744: bind mount local image path to container path
2020-06-04 21:24:14 +08:00
Zexi Li
ac47a29a8c Merge pull request #6748 from wanyaoqi/automated-cherry-pick-of-#6173-upstream-release-3.2
Automated cherry pick of #6173: support custom service url
2020-06-04 21:19:53 +08:00
wanyaoqi
b903a2aecb support custom service url 2020-06-04 20:27:44 +08:00
wanyaoqi
4cebf604ab bind mount local image path to container path 2020-06-04 20:21:14 +08:00
Qiu Jian
5da84f7a51 fix: xsky recode using endpoint as accesskey key 2020-06-04 19:22:54 +08:00
tangbin
4ba3437006 ctyun sync host wire fix 2020-06-04 18:53:45 +08:00
Zexi Li
f7dde179d8 Merge pull request #6729 from ioito/automated-cherry-pick-of-#6728-upstream-release-3.2
Automated cherry pick of #6728: fix: 避免openstack session==nil
2020-06-04 15:04:29 +08:00
Qu Xuan
7d505c6dc1 fix: 避免openstack session==nil 2020-06-04 11:24:13 +08:00
Zexi Li
bdbb08c15d Merge pull request #6723 from ioito/automated-cherry-pick-of-#6722-upstream-release-3.2
Automated cherry pick of #6722: fix: 添加region翻译
2020-06-04 10:28:59 +08:00
Zexi Li
b24ec284f7 Merge pull request #6727 from swordqiu/automated-cherry-pick-of-#6726-upstream-release-3.2
Automated cherry pick of #6726: fix: keystone event list fail to find user
2020-06-04 10:26:57 +08:00
Qiu Jian
635827794d fix: keystone event list fail to find user 2020-06-04 08:01:15 +08:00
Qu Xuan
c0ad0c495a fix: 添加region翻译 2020-06-03 20:40:10 +08:00
Zexi Li
728494b9e3 Merge pull request #6721 from ioito/automated-cherry-pick-of-#6720-upstream-release-3.2
Automated cherry pick of #6720: fix: 修复gcp object编码问题
2020-06-03 20:07:46 +08:00
Zexi Li
0585a83a0c Merge pull request #6712 from ioito/automated-cherry-pick-of-#6711-upstream-release-3.2
Automated cherry pick of #6711: fix: 移除默认调度策略
2020-06-03 17:27:30 +08:00
Zexi Li
60b11e8f50 Merge pull request #6719 from tb365/automated-cherry-pick-of-#6696-upstream-release-3.2
Automated cherry pick of #6696: add-enterprise-info-update-climc
2020-06-03 17:26:25 +08:00
Zexi Li
7ec7598037 Merge pull request #6714 from wanyaoqi/automated-cherry-pick-of-#6713-upstream-release-3.2
Automated cherry pick of #6713: isolated device manager:
2020-06-03 17:25:12 +08:00
Qu Xuan
fe8c2c6d51 fix: 修复gcp object编码问题 2020-06-03 16:36:42 +08:00
tangbin
2fb4254d83 add-enterprise-info-update-climc 2020-06-03 16:27:10 +08:00
wanyaoqi
cbbbd29830 isolated device manager:
- fix find boot_vga got No such file or dirtory
2020-06-03 15:50:03 +08:00
Qu Xuan
f70ca13563 fix: 移除默认调度策略 2020-06-03 15:23:08 +08:00
Zexi Li
9f4a4028b8 Merge pull request #6709 from ioito/automated-cherry-pick-of-#6708-upstream-release-3.2
Automated cherry pick of #6708: fix: 转换gcp错误
2020-06-03 13:03:25 +08:00
Qu Xuan
7bbc8afc51 fix: 转换gcp错误 2020-06-03 11:57:28 +08:00
Zexi Li
afdc49d0b5 Merge pull request #6700 from rainzm/automated-cherry-pick-of-#6699-upstream-release-3.2
Automated cherry pick of #6699: feat: Logo and copyright in verify email are same with these in company info
2020-06-03 10:23:57 +08:00
Zexi Li
bea0d7b978 Merge pull request #6703 from ioito/automated-cherry-pick-of-#6702-upstream-release-3.2
Automated cherry pick of #6702: fix: gcp默认创建允许所有地址访问的用户
2020-06-03 10:17:12 +08:00
Zexi Li
562e15c97d Merge pull request #6705 from ioito/automated-cherry-pick-of-#6704-upstream-release-3.2
Automated cherry pick of #6704: fix: 允许gcp创建vpc时不指定cidr
2020-06-03 10:16:50 +08:00
Zexi Li
7211580cfe Merge pull request #6707 from ioito/automated-cherry-pick-of-#6706-upstream-release-3.2
Automated cherry pick of #6706: fix: 避免越过tenantcache过期检查
2020-06-03 10:16:08 +08:00
Qu Xuan
7451ae9f90 fix: 避免越过tenantcache过期检查 2020-06-02 22:18:43 +08:00
Qu Xuan
766d5cf803 fix: 允许gcp创建vpc时不指定cidr 2020-06-02 22:03:17 +08:00
Qu Xuan
040a90587b fix: gcp默认创建允许所有地址访问的用户 2020-06-02 21:47:02 +08:00
Zexi Li
d3f8c71050 Merge pull request #6698 from swordqiu/automated-cherry-pick-of-#6697-upstream-release-3.2
Automated cherry pick of #6697: fix: apigateway expose esxiagent service avaiability
2020-06-02 21:20:24 +08:00
rainzm
3630164960 feat: Logo and copyright in verify email are same with these in company info 2020-06-02 20:55:56 +08:00
Qiu Jian
38b8e24eb0 fix: apigateway expose esxiagent service avaiability 2020-06-02 20:32:30 +08:00
yunion-ci-robot
847c296b64 Merge pull request #6687 from ioito/automated-cherry-pick-of-#6686-upstream-release-3.2
Automated cherry pick of #6686: fix: 避免锁超时
2020-06-02 13:59:44 +08:00
Qu Xuan
2521ec8f91 fix: 避免锁超时 2020-06-02 11:14:33 +08:00
Zexi Li
15f0e8c72c Merge pull request #6681 from ioito/automated-cherry-pick-of-#6680-upstream-release-3.2
Automated cherry pick of #6680: fix: sync s3 bucket status
2020-06-02 10:05:04 +08:00
Zexi Li
6013c0e0d8 Merge pull request #6685 from ioito/automated-cherry-pick-of-#6684-upstream-release-3.2
Automated cherry pick of #6684: fix: gcp path escape for object
2020-06-02 10:04:40 +08:00
Zexi Li
f072ef65fd Merge pull request #6667 from ioito/automated-cherry-pick-of-#6666-upstream-release-3.2
Automated cherry pick of #6666: fix: 安全组规则返回项目id信息
2020-06-02 10:03:24 +08:00
Zexi Li
b3b6a0cf59 Merge pull request #6665 from zhaoxiangchun/automated-cherry-pick-of-#6664-upstream-release-3.2
Automated cherry pick of #6664: 在优化建议资源列表中增加费用信息
2020-06-02 10:02:37 +08:00
Zexi Li
c47f6a77b9 Merge pull request #6676 from ioito/automated-cherry-pick-of-#6675-upstream-release-3.2
Automated cherry pick of #6675: fix: add us-west4 for google region
2020-06-02 09:59:50 +08:00
Zexi Li
b1704b0039 Merge pull request #6671 from wanyaoqi/automated-cherry-pick-of-#6670-upstream-release-3.2
Automated cherry pick of #6670: get snapshots order by created at asc
2020-06-02 09:58:31 +08:00
Qu Xuan
a98ce67684 fix: gcp path escape for object 2020-06-01 19:58:44 +08:00
Qu Xuan
fcc8db69a8 fix: sync s3 bucket status 2020-06-01 18:56:04 +08:00
Qu Xuan
43748db2e2 fix: add us-west4 for google region 2020-06-01 18:26:51 +08:00
wanyaoqi
41673a54c0 get snapshots order by created at asc 2020-06-01 15:09:15 +08:00
Qu Xuan
bd63447bae fix: 安全组规则返回项目id信息 2020-05-29 20:49:52 +08:00
zhaoxiangchun
5ca2c6fcdf 在优化建议资源列表中增加费用信息
另外,在资源进行处理时记录对应的status信息
2020-05-29 19:45:47 +08:00
Zexi Li
f330d01791 Merge pull request #6662 from rainzm/automated-cherry-pick-of-#6661-upstream-release-3.2
Automated cherry pick of #6661: fix(notify): Remove default mobile template
2020-05-29 19:32:24 +08:00
Zexi Li
8fb744be58 Merge pull request #6659 from ioito/automated-cherry-pick-of-#6658-upstream-release-3.2
Automated cherry pick of #6658: fix: byte size fix
2020-05-29 19:14:33 +08:00
rainzm
ec2087f3f0 fix(notify): Remove default mobile template 2020-05-29 18:50:11 +08:00
Qu Xuan
f67011b143 fix: byte size fix 2020-05-29 17:00:01 +08:00
Zexi Li
bb0b831b72 Merge pull request #6649 from swordqiu/automated-cherry-pick-of-#6636-upstream-release-3.2
Automated cherry pick of #6636: fix: ignore match weights when searching matched policysets
2020-05-29 14:20:29 +08:00
Zexi Li
74a1ccec9d Merge pull request #6651 from wanyaoqi/automated-cherry-pick-of-#6650-upstream-release-3.2
Automated cherry pick of #6650: fix migrate with multi local storage
2020-05-29 14:18:54 +08:00
wanyaoqi
c74b41ef1f fix migrate with multi local storage 2020-05-29 11:52:28 +08:00
Qiu Jian
54d3173c15 fix: ignore match weights when searching matched policysets 2020-05-29 11:20:17 +08:00
yunion-ci-robot
dbee0d0eef Merge pull request #6644 from rainzm/automated-cherry-pick-of-#6643-upstream-release-3.2
Automated cherry pick of #6643: feat(notify): Support 'socpe:domain' when list contacts
2020-05-28 19:11:01 +08:00
yunion-ci-robot
6e22bea1cc Merge pull request #6634 from swordqiu/automated-cherry-pick-of-#6631-upstream-release-3.2
Automated cherry pick of #6631: fix: sysadmin cannot convert host in non-default domain
2020-05-28 19:04:01 +08:00
yunion-ci-robot
6fa35f9c7c Merge pull request #6617 from ioito/automated-cherry-pick-of-#6592-upstream-release-3.2
Automated cherry pick of #6592: fix: 通用指定项目到云上创建资源
2020-05-28 19:02:01 +08:00
yunion-ci-robot
62b4fd8240 Merge pull request #6556 from zhaoxiangchun/automated-cherry-pick-of-#6544-upstream-release-3.2
Automated cherry pick of #6544: 类型是onecloud的notifier增加webconsole的alert
2020-05-28 18:59:00 +08:00
rainzm
c3d0ff9e6f feat(notify): Support 'socpe:domain' when list contacts
This is a temporary solution.
2020-05-28 18:57:10 +08:00
Zexi Li
f727fb6d6d Merge pull request #6633 from zhaoxiangchun/automated-cherry-pick-of-#6632-upstream-release-3.2
Automated cherry pick of #6632: 修复优化建议资源列表cloudenv过滤失效的问题
2020-05-28 18:07:08 +08:00
Zexi Li
3198cccd6d Merge pull request #6638 from ioito/automated-cherry-pick-of-#6637-upstream-release-3.2
Automated cherry pick of #6637: fix: 避免因磁盘数量导致创建机器失败
2020-05-28 17:13:55 +08:00
Qu Xuan
62607fb9d2 fix: tmp update 2020-05-28 14:39:42 +08:00
Qu Xuan
11cae0b675 fix: 避免因磁盘数量导致创建机器失败 2020-05-28 12:08:32 +08:00
Qiu Jian
f32538d92d fix: sysadmin cannot convert host in non-default domain 2020-05-27 22:34:08 +08:00
zhaoxiangchun
0afe110088 修复优化建议资源列表cloudenv过滤失效的问题 2020-05-27 22:14:30 +08:00
Zexi Li
158f70613d Merge pull request #6623 from wanyaoqi/automated-cherry-pick-of-#6621-upstream-release-3.2
Automated cherry pick of #6621: host storage misc fix:
2020-05-27 18:04:14 +08:00
Zexi Li
04ee98c6dc Merge pull request #6627 from swordqiu/automated-cherry-pick-of-#6618-upstream-release-3.2
Automated cherry pick of #6618: fix: domain user no previleges to convert host
2020-05-27 18:03:54 +08:00
Zexi Li
913879c95f Merge pull request #6612 from wanyaoqi/automated-cherry-pick-of-#6609-upstream-release-3.2
Automated cherry pick of #6609: fix host name validator
2020-05-27 18:01:21 +08:00
Zexi Li
baa575953b Merge pull request #6581 from yousong/automated-cherry-pick-of-#6580-upstream-release-3.2
Automated cherry pick of #6580: hostman: deprecate k8s_cluster_cidr
2020-05-27 18:00:51 +08:00
Zexi Li
2b62f8d8e2 Merge pull request #6606 from ioito/automated-cherry-pick-of-#6605-upstream-release-3.2
Automated cherry pick of #6605: fix: 移除azure policy sync部分
2020-05-27 17:56:31 +08:00
Zexi Li
f1683f3d03 Merge pull request #6614 from swordqiu/automated-cherry-pick-of-#6613-upstream-release-3.2
Automated cherry pick of #6613: fix: scheduler test ignore quota limit
2020-05-27 17:54:54 +08:00
Zexi Li
eb4780fd78 Merge pull request #6620 from ioito/automated-cherry-pick-of-#6619-upstream-release-3.2
Automated cherry pick of #6619: fix: 避免azure卸载磁盘失败
2020-05-27 17:51:57 +08:00
wanyaoqi
03592086a4 host storage misc fix:
- add accessible timeout
- add force detach host storage
2020-05-27 15:57:07 +08:00
Qu Xuan
abd5c9a03a fix: 避免azure卸载磁盘失败 2020-05-27 15:55:21 +08:00
Qiu Jian
96ea180573 fix: domain user no previleges to convert host 2020-05-27 15:49:34 +08:00
Qu Xuan
9208a70518 fix: 通用指定项目到云上创建资源 2020-05-27 15:31:54 +08:00
Qiu Jian
8feafc1bf4 fix: scheduler test ignore quota limit 2020-05-27 14:48:08 +08:00
Zexi Li
7f7ce94c57 Merge pull request #6608 from yousong/automated-cherry-pick-of-#6607-upstream-release-3.2
Automated cherry pick of #6607: vpcagent: apihelper: use its own options
2020-05-27 14:36:10 +08:00
Zexi Li
0b18d55068 Merge pull request #6590 from swordqiu/automated-cherry-pick-of-#6589-upstream-release-3.2
Automated cherry pick of #6589: fix: retry ipmi probe if redfish-api-probe fails
2020-05-27 14:35:11 +08:00
wanyaoqi
6a5f97f626 fix host name validator 2020-05-26 23:17:52 +08:00
Zexi Li
2e8749eb97 Merge pull request #6604 from ioito/automated-cherry-pick-of-#6603-upstream-release-3.2
Automated cherry pick of #6603: fix: sku status filter
2020-05-26 18:23:51 +08:00
Yousong Zhou
7298c4bf67 hostman: options: remove k8s_cluster_cidr
Remove instead of deprecation.  No user of this option anymore
2020-05-26 17:56:53 +08:00
Qu Xuan
920db3bb60 fix: 移除azure policy sync部分 2020-05-26 17:55:56 +08:00
Yousong Zhou
a91bef28c4 hostman: options: fix default value spec 2020-05-26 17:54:22 +08:00
Yousong Zhou
94d14b1863 vpcagent: models: separate Copy() and CopyJoined() 2020-05-26 17:54:21 +08:00
Yousong Zhou
dd288441b1 vpcagent: apihelper: use CopyJoined() 2020-05-26 17:54:21 +08:00
Yousong Zhou
f86cdbbdad vpcagent: models: add CopyJoined() 2020-05-26 17:54:21 +08:00
Yousong Zhou
c7468440f0 vpcagent: remove unused code 2020-05-26 17:54:21 +08:00
Yousong Zhou
16c4663e7b vpcagent: apihelper: use its own options 2020-05-26 17:54:21 +08:00
Zexi Li
7b5053e77f Merge pull request #6599 from wanyaoqi/automated-cherry-pick-of-#6598-upstream-release-3.2
Automated cherry pick of #6598: fix remotefile fetch image propertites
2020-05-26 17:15:20 +08:00
Zexi Li
13b43caf91 Merge pull request #6595 from ioito/automated-cherry-pick-of-#6594-upstream-release-3.2
Automated cherry pick of #6594: fix: bucket信息修正
2020-05-26 17:14:06 +08:00
Qu Xuan
8201433166 fix: sku status filter 2020-05-26 17:10:02 +08:00
wanyaoqi
fd4830859e fix remotefile fetch image propertites 2020-05-26 15:54:09 +08:00
Qu Xuan
e775515b59 fix: bucket信息修正 2020-05-26 15:09:58 +08:00
Zexi Li
752f9763c1 Merge pull request #6588 from swordqiu/automated-cherry-pick-of-#6587-upstream-release-3.2
Automated cherry pick of #6587: fix: identity_provider details missing fields
2020-05-25 18:34:20 +08:00
Zexi Li
015d7a213d Merge pull request #6583 from zexi/hotfix/k8s-repo-privilege
fix k8s repo privilege
2020-05-25 18:28:53 +08:00
Qiu Jian
216d6cbc89 fix: retry ipmi probe if redfish-api-probe fails 2020-05-25 17:55:08 +08:00
Qiu Jian
01d7c16f84 fix: identity_provider details missing fields 2020-05-25 17:45:22 +08:00
Zexi Li
95db384c6c fix k8s repo privilege 2020-05-25 16:51:57 +08:00
yunion-ci-robot
383ead3988 Merge pull request #6579 from zexi/automated-cherry-pick-of-#6578-upstream-release-3.2
Automated cherry pick of #6578: baremetal: fix forget init lockman pkg
2020-05-25 12:49:55 +08:00
Zexi Li
99cf71401c Merge pull request #6577 from zhaoxiangchun/automated-cherry-pick-of-#6573-upstream-release-3.2
Automated cherry pick of #6573: zstack宿主机监控中增加参数信息进行Unmarshal
2020-05-25 12:18:15 +08:00
Zexi Li
bffdf0cd64 baremetal: fix forget init lockman pkg 2020-05-25 12:17:26 +08:00
zhaoxiangchun
21888984b9 zstack宿主机监控中增加参数信息进行Unmarshal 2020-05-24 17:20:08 +08:00
Zexi Li
a85171ddf1 Merge pull request #6568 from swordqiu/automated-cherry-pick-of-#6567-upstream-release-3.2
Automated cherry pick of #6567: fix: default policy not effective
2020-05-22 22:48:21 +08:00
Zexi Li
3bd9c756db Merge pull request #6566 from rainzm/automated-cherry-pick-of-#6565-upstream-release-3.2
Automated cherry pick of #6565: fix: Support filtering notification with contactType
2020-05-22 22:47:08 +08:00
Zexi Li
e117dd46ed Merge pull request #6559 from ioito/automated-cherry-pick-of-#6558-upstream-release-3.2
Automated cherry pick of #6558: fix: 避免openstack以镜像做系统盘创建失败
2020-05-22 22:45:20 +08:00
Qiu Jian
8d6911a8cb fix: default policy not effective 2020-05-22 22:36:33 +08:00
rainzm
c303d8eafd feat: Supports disabling of feishu and dingtalk notification 2020-05-22 20:54:04 +08:00
rainzm
841224b402 fix: Support filtering notification with contactType 2020-05-22 20:54:04 +08:00
Qu Xuan
e1238af669 fix: 避免openstack以镜像做系统盘创建失败 2020-05-22 20:16:54 +08:00
zhaoxiangchun
909e92040c 类型是onecloud的notifier增加webconsole的alert 2020-05-22 20:04:22 +08:00
Zexi Li
3908877d3b Merge pull request #6547 from ioito/automated-cherry-pick-of-#6534-upstream-release-3.2
Automated cherry pick of #6534: fix: 避免azure uefi重装系统失败
2020-05-22 19:39:09 +08:00
Zexi Li
b8c287b1ad Merge pull request #6546 from rainzm/automated-cherry-pick-of-#6545-upstream-release-3.2
Automated cherry pick of #6545: Fix the problem of field duplication when exporting fields
2020-05-22 19:34:58 +08:00
Zexi Li
8b67811739 Merge pull request #6550 from ioito/automated-cherry-pick-of-#6549-upstream-release-3.2
Automated cherry pick of #6549: fix: 返回项目信息
2020-05-22 19:33:56 +08:00
Zexi Li
cc9e94dbbe Merge pull request #6552 from swordqiu/automated-cherry-pick-of-#6551-upstream-release-3.2
Automated cherry pick of #6551: fix: empty matched policies list for roles
2020-05-22 19:32:18 +08:00
Qiu Jian
1afbe0e44d fix: empty matched policies list for roles 2020-05-22 18:50:18 +08:00
Qu Xuan
6ba2ddf0d7 fix: 返回项目信息 2020-05-22 17:32:24 +08:00
Qu Xuan
d52062137c fix: 加入Azure套餐和镜像的检查 2020-05-22 16:12:52 +08:00
Qu Xuan
cc1e19b025 fix: 避免azure uefi重装系统失败 2020-05-22 16:12:52 +08:00
rainzm
71a7922ca0 Fix the problem of field duplication when exporting fields 2020-05-22 15:54:11 +08:00
Zexi Li
699fa4c458 Merge pull request #6541 from ioito/automated-cherry-pick-of-#6540-upstream-release-3.2
Automated cherry pick of #6540: fix: 避免因io问题导致同步镜像列表为空
2020-05-22 14:43:44 +08:00
Qu Xuan
c8652e7997 fix: 避免因io问题导致同步镜像列表为空 2020-05-22 13:47:09 +08:00
Zexi Li
37f30aca20 Merge pull request #6537 from ioito/automated-cherry-pick-of-#6530-upstream-release-3.2
Automated cherry pick of #6530: fix: aliyun rds backup create fix
2020-05-22 12:36:43 +08:00
Qu Xuan
793a02598a fix: aliyun rds backup create fix 2020-05-22 10:31:15 +08:00
Zexi Li
ff4c3616cf Merge pull request #6512 from ioito/automated-cherry-pick-of-#6511-upstream-release-3.2
Automated cherry pick of #6511: fix: 避免忽略本地allow any云上deny any安全组规则同步
2020-05-22 10:26:59 +08:00
Zexi Li
d282ea5480 Merge pull request #6532 from ioito/automated-cherry-pick-of-#6531-upstream-release-3.2
Automated cherry pick of #6531: fix: gcp bucket文件夹默认设为private
2020-05-22 10:26:06 +08:00
Zexi Li
1d516505e3 Merge pull request #6526 from tb365/automated-cherry-pick-of-#6525-upstream-release-3.2
Automated cherry pick of #6525: aws lbbg cache bugfix
2020-05-22 10:24:45 +08:00
Zexi Li
f3158a09c9 Merge pull request #6510 from wanyaoqi/automated-cherry-pick-of-#6509-upstream-release-3.2
Automated cherry pick of #6509: fix list disk attachable servers
2020-05-22 10:20:31 +08:00
Zexi Li
db4e94d455 Merge pull request #6536 from swordqiu/automated-cherry-pick-of-#6535-upstream-release-3.2
Automated cherry pick of #6535: fix: usage for schetag not accurate
2020-05-22 10:19:27 +08:00
Zexi Li
4d547c5d84 Merge pull request #6529 from ioito/automated-cherry-pick-of-#6528-upstream-release-3.2
Automated cherry pick of #6528: fix: 避免regional network-list --zone导致返回结果为空
2020-05-22 10:18:06 +08:00
Zexi Li
07359651d5 Merge pull request #6519 from swordqiu/automated-cherry-pick-of-#6516-upstream-release-3.2
Automated cherry pick of #6516: fix: system privileges user cannot access system console
2020-05-22 10:15:15 +08:00
yunion-ci-robot
ebf2e84de6 Merge pull request #6506 from ioito/automated-cherry-pick-of-#6505-upstream-release-3.2
Automated cherry pick of #6505: fix: 上传镜像为转换列表之外时,subformat状态异常
2020-05-21 23:09:53 +08:00
Qiu Jian
c9998c2176 fix: usage for schetag not accurate 2020-05-21 22:37:57 +08:00
Qu Xuan
95ded99428 fix: gcp bucket文件夹默认设为private 2020-05-21 20:54:03 +08:00
Qu Xuan
9cdd63299d fix: 避免regional network-list --zone导致返回结果为空 2020-05-21 20:15:47 +08:00
tangbin
e2db897856 aws lbbg cache bugfix 2020-05-21 19:08:23 +08:00
Qiu Jian
41db54737e fix: system privileges user cannot access system console 2020-05-21 18:44:03 +08:00
Qu Xuan
d567916e06 fix: 避免忽略本地allow any云上deny any安全组规则同步 2020-05-21 18:29:54 +08:00
wanyaoqi
60107e5dd1 fix list disk attachable servers 2020-05-21 18:02:39 +08:00
Qu Xuan
ab72632ece fix: 上传镜像为转换列表之外时,subformat状态异常 2020-05-21 17:41:33 +08:00
Zexi Li
df8a942d38 Merge pull request #6502 from zhaoxiangchun/automated-cherry-pick-of-#6500-upstream-release-3.2
Automated cherry pick of #6500: 修复当prestate=alerting,newstate=alerting的情况无法触发notify的问题
2020-05-21 16:38:04 +08:00
Zexi Li
e638c7dfca Merge pull request #6496 from zhaoxiangchun/automated-cherry-pick-of-#6472-upstream-release-3.2
Automated cherry pick of #6472: suggestions  increase time screening range
2020-05-21 16:34:26 +08:00
yunion-ci-robot
e030d683f0 Merge pull request #6498 from wanyaoqi/automated-cherry-pick-of-#6497-upstream-release-3.2
Automated cherry pick of #6497: image cache use lockman
2020-05-21 16:33:45 +08:00
Zexi Li
8e28f9f72d Merge pull request #6490 from rainzm/automated-cherry-pick-of-#6487-upstream-release-3.2
Automated cherry pick of #6487: Fix/esxi
2020-05-21 16:33:27 +08:00
zhaoxiangchun
041a1b2cdc bugfix-优化建议
在删除资源列表的信息时,增加对应的状态值。如果删除失败记录相关日志
2020-05-21 15:18:52 +08:00
zhaoxiangchun
094a3115df 优化建议增加时间筛选范围
1.在时间范围内查询未使用的资源,对于存在解绑的操作,通过查询对应的日志来确定最近的使用时间
2.基于监控的优化建议,增加新的reducer,当有足够多的points时,再进行其他逻辑
2020-05-21 15:18:52 +08:00
zhaoxiangchun
0fb24d91e3 修复当prestate=alerting,newstate=alerting的情况无法触发notify的问题 2020-05-21 13:58:37 +08:00
wanyaoqi
5131057cd8 image cache use lockman 2020-05-21 11:47:32 +08:00
rainzm
9735881e55 fix(esxi): Modify the disk size correctly when creating vm 2020-05-21 10:51:10 +08:00
rainzm
a465548e5e fix(esxi): Detach all disk first when deleting vm 2020-05-21 10:51:10 +08:00
rainzm
5b0b346f12 Kill processes in time & Add debug info 2020-05-21 10:51:10 +08:00
rainzm
caffe7f96f fix(esxi): Remove 'Destory' operation that is unnecessary for VirtualDiskManager 2020-05-21 10:51:10 +08:00
rainzm
1ea7937cdd fix(esxi): Separate detach disk and delete disk when rebuilding.
In previous versions, set
`removeSpec.FileOperation = types.VirtualDeviceConfigSpecFileOperationDestroy'
to delete disk indirectly.

But, when its parent has only one child, the parent will be deleted along with it.
And the consequence is failure to reinstall the system.

Now, detach disk without deleteing backing file and then remove backing
2020-05-21 10:51:10 +08:00
Zexi Li
a3c48265fe Merge pull request #6486 from wanyaoqi/automated-cherry-pick-of-#6485-upstream-release-3.2
Automated cherry pick of #6485: add sys usage
2020-05-21 10:02:33 +08:00
Zexi Li
6caa3be510 Merge pull request #6495 from yousong/automated-cherry-pick-of-#6494-upstream-release-3.2
Automated cherry pick of #6494: guests: include vpc, network info in guest nics list
2020-05-21 10:00:33 +08:00
Yousong Zhou
b9543dd565 guests: include vpc, network info in guest nics list 2020-05-20 22:49:28 +08:00
Zexi Li
1efba08bf2 Merge pull request #6492 from zexi/automated-cherry-pick-of-#6491-upstream-release-3.2
Automated cherry pick of #6491: keystone: fix db not sync
2020-05-20 17:32:20 +08:00
Zexi Li
b19c7cfdcf keystone: fix db not sync 2020-05-20 17:22:13 +08:00
wanyaoqi
4e1acfc028 add sys usage 2020-05-20 15:03:24 +08:00
Zexi Li
d81d99394f Merge pull request #6483 from zexi/automated-cherry-pick-of-#6481-upstream-release-3.2
Automated cherry pick of #6481: region: fix get resource details panic
2020-05-20 14:00:17 +08:00
Zexi Li
6dbd344c10 region: fix get resource details panic 2020-05-20 13:30:56 +08:00
Zexi Li
3b99ebfd03 Merge pull request #6475 from yousong/automated-cherry-pick-of-#6474-upstream-release-3.2
Automated cherry pick of #6474: cloudcommon: rbac: fix typo
2020-05-20 12:54:38 +08:00
Zexi Li
e1f43e29a3 Merge pull request #6470 from zexi/automated-cherry-pick-of-#6463-upstream-release-3.2
Automated cherry pick of #6463: add fuzzy ip matching
2020-05-20 11:09:44 +08:00
Zexi Li
f428ad2abe Merge pull request #6457 from swordqiu/automated-cherry-pick-of-#6456-upstream-release-3.2
Automated cherry pick of #6456: fix: cloudprovider list support filter by zone and cloudregion
2020-05-20 11:09:11 +08:00
Zexi Li
3e9fab0ca0 Merge pull request #6454 from ioito/automated-cherry-pick-of-#6453-upstream-release-3.2
Automated cherry pick of #6453: fix: 优化azure image同步逻辑
2020-05-20 11:08:23 +08:00
Zexi Li
11463ce683 Merge pull request #6435 from ioito/automated-cherry-pick-of-#6434-upstream-release-3.2
Automated cherry pick of #6434: fix: 加入azure镜像vhd检查
2020-05-20 11:07:46 +08:00
Zexi Li
7d1b6a98eb Merge pull request #6448 from ioito/automated-cherry-pick-of-#6427-upstream-release-3.2
Automated cherry pick of #6427: fix: 避免大范围安全组共享
2020-05-20 11:07:23 +08:00
Yousong Zhou
2180e2e361 networks: return HTTP 404 for sql.ErrNoRows 2020-05-20 11:04:50 +08:00
Yousong Zhou
94433b590d wires: default to "default" vpc on creation
Wire creation request right now only makes sense in context of classic
network ("default" vpc)
2020-05-20 11:04:50 +08:00
Yousong Zhou
e5eed9ef2a networks: eliminate a variable 2020-05-20 11:04:50 +08:00
Yousong Zhou
7cd01cf535 guestdrivers: managed: use const api.EIP_STATUS_ASSOCIATE 2020-05-20 11:04:50 +08:00
Yousong Zhou
5d284b392b cloudprovider: fix typo 2020-05-20 11:04:50 +08:00
Yousong Zhou
306f8eabf2 cloudcommon: rbac: fix typo 2020-05-20 11:04:50 +08:00
Zexi Li
b5604f4767 Merge pull request #6469 from zexi/automated-cherry-pick-of-#6468-upstream-release-3.2
Automated cherry pick of #6468: host convert inject dockerd config
2020-05-20 10:44:31 +08:00
tangbin
fd13237ff3 add fuzzy ip matching 2020-05-19 19:15:55 +08:00
Zexi Li
36bef6db5a Merge pull request #6459 from ioito/automated-cherry-pick-of-#6458-upstream-release-3.2
Automated cherry pick of #6458: fix: 修复zstack使用win镜像时userdata base64加密问题
2020-05-19 19:13:49 +08:00
Zexi Li
926ab1e41a Merge pull request #6464 from zexi/automated-cherry-pick-of-#6462-upstream-release-3.2
Automated cherry pick of #6462: region: fix server create params not include specified resource
2020-05-19 19:08:45 +08:00
Zexi Li
ccef3b6aba host convert inject dockerd config 2020-05-19 19:08:11 +08:00
Zexi Li
c95f397ecf region: fix server create params not include specified resource 2020-05-19 17:38:23 +08:00
Qu Xuan
9455c75098 fix: 修复zstack使用win镜像时userdata base64加密问题 2020-05-19 16:46:31 +08:00
Qiu Jian
498aea4d18 fix: cloudprovider list support filter by zone and cloudregion 2020-05-19 16:44:44 +08:00
Qu Xuan
78be10c0a4 fix: 优化azure image同步逻辑 2020-05-19 16:24:23 +08:00
Zexi Li
fdbecf5365 Merge pull request #6452 from swordqiu/automated-cherry-pick-of-#6451-upstream-release-3.2
Automated cherry pick of #6451: fix: policy create fail on initialization phrase
2020-05-19 15:49:13 +08:00
Qiu Jian
d23b1fb08a fix: policy create fail on initialization phrase 2020-05-19 15:25:37 +08:00
Qu Xuan
fa287db5d6 fix: 避免大范围安全组共享 2020-05-19 14:03:24 +08:00
Zexi Li
379877189a Merge pull request #6422 from ioito/automated-cherry-pick-of-#6421-upstream-release-3.2
Automated cherry pick of #6421: fix: 优化标签列表过滤参数
2020-05-19 10:21:44 +08:00
Zexi Li
93179d30a7 Merge pull request #6442 from swordqiu/automated-cherry-pick-of-#6441-upstream-release-3.2
Automated cherry pick of #6441: update lisDescendent scope params
2020-05-19 10:20:24 +08:00
Zexi Li
a5436f2ba0 Merge pull request #6444 from swordqiu/automated-cherry-pick-of-#6443-upstream-release-3.2
Automated cherry pick of #6443: fix: anonymous user may list resources
2020-05-19 10:17:53 +08:00
Zexi Li
4576bb1728 Merge pull request #6440 from zexi/automated-cherry-pick-of-#6436-upstream-release-3.2
Automated cherry pick of #6436: baremetal: fix ssh put empty content file not created
2020-05-19 10:16:16 +08:00
Qiu Jian
f964b93bf8 fix: anonymous user may list resources 2020-05-19 01:13:52 +08:00
Qiu Jian
3cdf2da320 sync storage shared info when syncing local storage 2020-05-18 23:19:58 +08:00
Qiu Jian
7123de13ed update lisDescendent scope params 2020-05-18 23:19:58 +08:00
Zexi Li
9b0dc429c6 Merge pull request #6419 from ioito/automated-cherry-pick-of-#6418-upstream-release-3.2
Automated cherry pick of #6418: 可根据代理过滤云账号
2020-05-18 21:51:20 +08:00
Zexi Li
45f88c907d Merge pull request #6424 from ioito/automated-cherry-pick-of-#6423-upstream-release-3.2
Automated cherry pick of #6423: fix: 避免仅同步一个region时,其余region状态变为准备中
2020-05-18 21:49:10 +08:00
Zexi Li
534e7b4eda Merge pull request #6429 from ioito/automated-cherry-pick-of-#6428-upstream-release-3.2
Automated cherry pick of #6428: fix: 避免设置自动释放后磁盘的expired_at失效
2020-05-18 21:47:53 +08:00
Zexi Li
97cb68397b Merge pull request #6433 from swordqiu/automated-cherry-pick-of-#6432-upstream-release-3.2
Automated cherry pick of #6432: fix: update fields permission tags
2020-05-18 21:47:22 +08:00
Zexi Li
e8b90a9617 baremetal: fix ssh put empty content file not created 2020-05-18 21:46:26 +08:00
Qu Xuan
6281c56333 fix: image-list --sub-format support 2020-05-18 21:22:19 +08:00
Qu Xuan
1fa6b53a34 fix: 加入azure镜像vhd检查 2020-05-18 21:22:18 +08:00
Qiu Jian
5471bd9acf fix: update fields permission tags 2020-05-18 21:01:10 +08:00
Qu Xuan
2f84801b18 fix: 避免设置自动释放后磁盘的expired_at失效 2020-05-18 20:07:03 +08:00
Qu Xuan
963aaf0c33 fix: 避免仅同步一个region时,其余region状态变为准备中 2020-05-18 19:37:14 +08:00
Qu Xuan
168a4c7e9a fix: 优化标签列表过滤参数 2020-05-18 15:31:15 +08:00
Qu Xuan
be7adbea40 根据调度标签过滤网络和存储资源 2020-05-18 12:05:47 +08:00
Qu Xuan
2cdccfcf65 可根据代理过滤云账号 2020-05-18 12:05:46 +08:00
Zexi Li
eb56db7b00 Merge pull request #6404 from swordqiu/automated-cherry-pick-of-#6401-upstream-release-3.2
Automated cherry pick of #6401: fix: fail to explain permission for disabled policy
2020-05-17 14:22:45 +08:00
Zexi Li
8277ae48a6 Merge pull request #6415 from zhaoxiangchun/automated-cherry-pick-of-#6410-upstream-release-3.2
Automated cherry pick of #6410: 修复无法获取vmware宿主机监控数据的问题
2020-05-17 14:17:17 +08:00
Zexi Li
b91f4a2fde Merge pull request #6403 from swordqiu/automated-cherry-pick-of-#6402-upstream-release-3.2
Automated cherry pick of #6402: fix: disable delete standard image
2020-05-17 14:15:27 +08:00
yunion-ci-robot
121f538690 Merge pull request #6409 from rainzm/release/3.2
update vendor for release/3.2
2020-05-17 09:43:37 +08:00
zhaoxiangchun
f8fb9eddc8 修复无法获取vmware宿主机监控数据的问题 2020-05-16 21:23:51 +08:00
rainzm
66e42f2dba update vendor 2020-05-16 21:14:52 +08:00
Zexi Li
411c264890 Merge pull request #6400 from swordqiu/automated-cherry-pick-of-#6394-upstream-release-3.2
Automated cherry pick of #6394: fix: xxx-agent should generally use scope=system to list resources
2020-05-16 17:46:26 +08:00
Zexi Li
4696a51e92 Merge pull request #6396 from swordqiu/automated-cherry-pick-of-#6395-upstream-release-3.2
Automated cherry pick of #6395: fix: server-sync-fix-nics should return errors if vnics ip is not reachable on host
2020-05-16 17:45:25 +08:00
Zexi Li
928ceff800 Merge pull request #6376 from rainzm/automated-cherry-pick-of-#6375-upstream-release-3.2
Automated cherry pick of #6375: Fix/esxi
2020-05-16 17:42:42 +08:00
yunion-ci-robot
f5f83d3b3f Merge pull request #6389 from zexi/automated-cherry-pick-of-#6388-upstream-release-3.2
Automated cherry pick of #6388: region: fix baremetal can't enable public baremetal type network
2020-05-16 17:31:07 +08:00
Qiu Jian
74e784a84d fix: bugfixes 2020-05-16 01:05:40 +08:00
Qiu Jian
6ad68788e5 fix: fail to explain permission for disabled policy 2020-05-16 01:05:40 +08:00
Qiu Jian
4b6723d8fe fix: disable delete standard image 2020-05-16 00:37:04 +08:00
Qiu Jian
b12c644494 fix: xxx-agent should generally use scope=system to list resources 2020-05-15 22:33:03 +08:00
Qiu Jian
16b6186cab fix: server-sync-fix-nics should return errors if vnics ip is not reachable on host 2020-05-15 22:16:54 +08:00
rainzm
e9d0764be9 fix(esxi): Allow the creation of duplicate vcenter machines.
Create vm with name whose vlaue is localVM.Uuid and try to rename again.
2020-05-15 21:36:19 +08:00
rainzm
3e8b854dbe fix(esxi): Add usb to support mouse in vnc viewer 2020-05-15 21:36:19 +08:00
rainzm
cdabc68a71 fix(esxi): Fix GetDriver and add driver log for vdisk.
In GetDriver, return 'name' directly if driverMap is empty.
2020-05-15 21:36:19 +08:00
rainzm
4873635dd8 fix(esxi): Set 'WindowsDefaultAdminUser' as true when deploy vm.
'WindowsDefaultAdminUser' means that the default admin account is
'Administrator' when deploy windows vm.
2020-05-15 21:36:19 +08:00
rainzm
7d1270c968 fix(region): Set default value if rootdisk's driver is empty. 2020-05-15 21:36:19 +08:00
rainzm
4b9f1a409b fix(esxi): Disable automatically add host to the dvs 2020-05-15 21:36:19 +08:00
rainzm
23a03bb24c fix(esxi): Set 'IsInit' as true when rebuildroot
IsInit is true will cause cloudinit enable. When rebuilding root, if there is cloudinit service in the image, it will cover the initialization work we did on the rebuilding.
2020-05-15 21:36:19 +08:00
Zexi Li
62fe9cee88 region: fix baremetal can't enable public baremetal type network 2020-05-15 20:00:09 +08:00
Zexi Li
61a707bd57 Merge pull request #6387 from yousong/automated-cherry-pick-of-#6386-upstream-release-3.2
Automated cherry pick of #6386: vpcagent: ovn: cmp: generate clean args in a single batch
2020-05-15 19:59:27 +08:00
Yousong Zhou
188a0ea9e3 vpcagent: ovnutil: destroy non root obj first
To avoid the following error

	/* Can't happen because of the database schema. */
	ctl_fatal("logical port %s is not part of any logical router",
		  ctx->argv[1]);
2020-05-15 16:34:51 +08:00
Yousong Zhou
fea1e2166e vpcagent: ovn: cmp: generate clean args in a single batch 2020-05-15 16:31:18 +08:00
Zexi Li
3864156c5f Merge pull request #6380 from ioito/automated-cherry-pick-of-#6379-upstream-release-3.2
Automated cherry pick of #6379: fix: 避免backup list未能正常显示rds信息
2020-05-15 15:29:43 +08:00
Zexi Li
6301776f72 Merge pull request #6385 from zexi/automated-cherry-pick-of-#6381-upstream-release-3.2
Automated cherry pick of #6381: scheduler: fix min counter get count not correct
2020-05-15 15:28:34 +08:00
Zexi Li
0f6297aea8 scheduler: fix min counter get count not correct 2020-05-15 15:12:02 +08:00
Qu Xuan
c29528ac54 fix: 避免backup list未能正常显示rds信息 2020-05-15 14:30:19 +08:00
Zexi Li
0a3f041bf7 Merge pull request #6374 from zhaoxiangchun/automated-cherry-pick-of-#6358-upstream-release-3.2
Automated cherry pick of #6358: modify the logic of queryCondition save the  evalMatch
2020-05-15 11:11:15 +08:00
Zexi Li
4b8e100916 Merge pull request #6361 from ioito/automated-cherry-pick-of-#6346-upstream-release-3.2
Automated cherry pick of #6346: fix: 优化windows powershell userdata
2020-05-15 11:09:51 +08:00
Zexi Li
5ad8cb051f Merge pull request #6373 from swordqiu/automated-cherry-pick-of-#6363-upstream-release-3.2
Automated cherry pick of #6363: fix: set public_scope to system for image with is_public=true
2020-05-15 11:08:22 +08:00
zhaoxiangchun
23380f2a00 modify the logic of queryCondition save the evalMatch 2020-05-15 11:07:23 +08:00
Zexi Li
e45ef0a8e1 Merge pull request #6359 from ioito/automated-cherry-pick-of-#6352-upstream-release-3.2
Automated cherry pick of #6352: fix: 优化rds zone同步逻辑
2020-05-15 11:05:46 +08:00
Qiu Jian
e6d240ac79 fix: set public_scope to system for image with is_public=true 2020-05-15 00:34:29 +08:00
Qu Xuan
1cc5eee870 fix: 优化windows powershell userdata 2020-05-14 20:42:47 +08:00
Qu Xuan
9f99f1466b fix: 优化rds zone同步逻辑 2020-05-14 20:24:15 +08:00
Zexi Li
519cbec486 Merge pull request #6357 from zexi/automated-cherry-pick-of-#6353-upstream-release-3.2
Automated cherry pick of #6353: scheduler: filter disabled cloudprovider
2020-05-14 18:59:34 +08:00
Zexi Li
5ed76cd0cf Merge pull request #6345 from tb365/automated-cherry-pick-of-#6344-upstream-release-3.2
Automated cherry pick of #6344: allow delete paramter config
2020-05-14 18:20:50 +08:00
Zexi Li
408a4e33c4 Merge pull request #6339 from swordqiu/automated-cherry-pick-of-#6338-upstream-release-3.2
Automated cherry pick of #6338: fix: avoid using background context
2020-05-14 18:18:58 +08:00
Zexi Li
9104f101eb Merge pull request #6337 from zhaoxiangchun/automated-cherry-pick-of-#6336-upstream-release-3.2
Automated cherry pick of #6336: Modify the logic of rule change execution time
2020-05-14 18:17:53 +08:00
Zexi Li
019d72a694 scheduler: filter disabled cloudprovider 2020-05-14 18:15:53 +08:00
Zexi Li
c23ee27c9f Merge pull request #6348 from zexi/automated-cherry-pick-of-#6347-upstream-release-3.2
Automated cherry pick of #6347: scheduler: set schedtag default strategy if input empty
2020-05-14 17:49:20 +08:00
Zexi Li
fa5f9351d2 scheduler: set schedtag default strategy if input empty 2020-05-14 17:25:50 +08:00
Qiu Jian
db111a8da4 fix: avoid using background context 2020-05-14 16:51:26 +08:00
tangbin
de4c354c7d allow delete paramter config 2020-05-14 15:20:37 +08:00
zhaoxiangchun
acd7fceb91 修改规则执行时间
在将资源数据取到后更新执行时间
2020-05-14 15:00:36 +08:00
Zexi Li
8a7f37dcd1 Merge pull request #6330 from zhaoxiangchun/automated-cherry-pick-of-#6164-upstream-release-3.2
Automated cherry pick of #6164: bugfix mem paginate
2020-05-14 13:02:45 +08:00
Zexi Li
1f8c1f4d13 Merge pull request #6332 from tb365/automated-cherry-pick-of-#6331-upstream-release-3.2
Automated cherry pick of #6331: clear yunionauth cookie
2020-05-14 13:02:20 +08:00
Zexi Li
fd3fb7ba89 Merge pull request #6335 from wanyaoqi/automated-cherry-pick-of-#6333-upstream-release-3.2
Automated cherry pick of #6333: remove statefile in start script
2020-05-14 13:01:45 +08:00
wanyaoqi
6b63ac0af5 fix esxi disk disconnect 2020-05-14 12:28:27 +08:00
wanyaoqi
f50dfaef4c remove statefile in start script 2020-05-14 12:28:27 +08:00
tangbin
346a325e7e clear yunionauth cookie 2020-05-14 11:46:03 +08:00
zhaoxiangchun
9b1aa45a15 修复规则无法禁用的问题 2020-05-14 10:38:39 +08:00
Zexi Li
9e2874caaa Merge pull request #6329 from swordqiu/automated-cherry-pick-of-#6328-upstream-release-3.2
Automated cherry pick of #6328: fix: status-base resource's action log missing owner project/domain
2020-05-14 09:52:32 +08:00
Zexi Li
e0a8fe38d0 Merge pull request #6327 from zexi/automated-cherry-pick-of-#6326-upstream-release-3.2
Automated cherry pick of #6326: region: server create prefer resource fetch by name or id
2020-05-14 09:51:46 +08:00
Qiu Jian
6453e7fa82 fix: status-base resource's action log missing owner project/domain 2020-05-14 01:17:09 +08:00
Zexi Li
ad4d25e0cd Merge pull request #6197 from zhaoxiangchun/automated-cherry-pick-of-#6164-upstream-release-3.2
Automated cherry pick of #6164 bugfix-suggestrule cannot disable
2020-05-14 01:02:08 +08:00
Zexi Li
a3d962894c region: server create prefer resource fetch by name or id 2020-05-14 01:00:18 +08:00
zhaoxiangchun
c1384f29cf merge 2020-05-14 00:29:11 +08:00
zhaoxiangchun
829c6c65fc 修复规则无法禁用的问题 2020-05-14 00:27:34 +08:00
Zexi Li
c106bdc24c Merge pull request #6088 from zhaoxiangchun/automated-cherry-pick-of-#6087-upstream-release-3.2
Automated cherry pick of #6087: 在monitor的package中新增influxdb相关的功能
2020-05-13 23:00:04 +08:00
zhaoxiangchun
d9509a0cf5 基于监控数据的优化建议 2020-05-13 22:45:41 +08:00
zhaoxiangchun
22dccbbb20 在monitor的package中新增influxdb相关的功能
1.可以获取influxdb实例中的databases
2.可以获取指定database中的measurements
3.通过指定measurement获取其中的tags和fileds
2020-05-13 22:45:41 +08:00
Zexi Li
442e95a2c1 Merge pull request #6325 from swordqiu/automated-cherry-pick-of-#6324-upstream-release-3.2
Automated cherry pick of #6324: fix: host agent list use baremetalagents model
2020-05-13 21:20:56 +08:00
Qiu Jian
2089c055f3 fix: host agent list use baremetalagents model 2020-05-13 21:15:38 +08:00
yunion-ci-robot
c52946c5ed Merge pull request #6320 from wanyaoqi/automated-cherry-pick-of-#6319-upstream-release-3.2
Automated cherry pick of #6319: do not close worker chan
2020-05-13 20:18:01 +08:00
wanyaoqi
3e2f5c7af1 do not close worker chan
don't close worker chan after put work, will cause dead loop
2020-05-13 18:58:18 +08:00
Zexi Li
061d31ae0d Merge pull request #6314 from swordqiu/automated-cherry-pick-of-#6305-upstream-release-3.2
Automated cherry pick of #6305: fix: change-owner-candidate-domains not implemented for some resources
2020-05-13 12:46:17 +08:00
Zexi Li
055d01d24e Merge pull request #6303 from yousong/automated-cherry-pick-of-#6302-upstream-release-3.2
Automated cherry pick of #6302: vpcagent: ignore possible external subnets
2020-05-13 12:45:30 +08:00
Zexi Li
b48647abbd Merge pull request #6301 from ioito/automated-cherry-pick-of-#6300-upstream-release-3.2
Automated cherry pick of #6300: fix: 避免provider错乱返回
2020-05-13 12:44:28 +08:00
Zexi Li
34f7a4e6d0 Merge pull request #6298 from ioito/automated-cherry-pick-of-#6297-upstream-release-3.2
Automated cherry pick of #6297: fix: cloud-provider-list support filter by cloudregion
2020-05-13 12:44:02 +08:00
Zexi Li
cb0810c7c2 Merge pull request #6279 from swordqiu/automated-cherry-pick-of-#6241-upstream-release-3.2
Automated cherry pick of #6241: feature: user login into project with highest privilege automatically
2020-05-13 12:43:33 +08:00
Zexi Li
ec9dcb05ee Merge pull request #6310 from ioito/automated-cherry-pick-of-#6306-upstream-release-3.2
Automated cherry pick of #6306: fix: openstack 安全组规则同步
2020-05-13 12:41:55 +08:00
Zexi Li
cfb3c4c184 Merge pull request #6316 from ioito/automated-cherry-pick-of-#6315-upstream-release-3.2
Automated cherry pick of #6315: fix: i-ps -> ips
2020-05-13 10:46:16 +08:00
Zexi Li
cd5d452e86 Merge pull request #6318 from swordqiu/automated-cherry-pick-of-#6317-upstream-release-3.2
Automated cherry pick of #6317: fix: reserved ip owner filter
2020-05-13 10:44:16 +08:00
Zexi Li
e725bdf0ca Merge pull request #6293 from ioito/automated-cherry-pick-of-#6292-upstream-release-3.2
Automated cherry pick of #6292: fix: 优化openstack错误处理
2020-05-13 10:42:45 +08:00
Qiu Jian
04ba1e8300 fix: reserved ip owner filter 2020-05-12 21:13:14 +08:00
Qu Xuan
93222c5827 fix: i-ps -> ips 2020-05-12 20:27:36 +08:00
Qiu Jian
014e159339 fix: change-owner-candidate-domains not implemented for some resources 2020-05-12 18:47:30 +08:00
Yousong Zhou
f7e1676a17 vpcagent: ignore possible external subnets 2020-05-12 18:06:27 +08:00
Qu Xuan
535e9a1861 fix: openstack 安全组规则同步 2020-05-12 17:57:25 +08:00
Qu Xuan
48e35019b3 fix: 避免provider错乱返回 2020-05-12 17:03:12 +08:00
Zexi Li
79f9d69125 Merge pull request #6281 from yousong/automated-cherry-pick-of-#6280-upstream-release-3.2
Automated cherry pick of #6280: cloudcommon: elect: notifyOne on subscribe
2020-05-12 14:22:37 +08:00
Zexi Li
7bec5cbdb8 Merge pull request #6278 from ioito/automated-cherry-pick-of-#6277-upstream-release-3.2
Automated cherry pick of #6277: fix: 支持访问其他服务的标签列表
2020-05-12 14:21:47 +08:00
Qu Xuan
b8104481ee fix: 优化openstack错误处理 2020-05-12 14:09:10 +08:00
Qu Xuan
ebe775338c fix: cloud-provider-list support filter by cloudregion 2020-05-12 14:06:53 +08:00
Zexi Li
fa54acf2c7 Merge pull request #6288 from yousong/automated-cherry-pick-of-#6287-upstream-release-3.2
Automated cherry pick of #6287: region: lbagent: undeploy: make it idempotent
2020-05-12 11:50:05 +08:00
Zexi Li
f01d45d7ed Merge pull request #6283 from yousong/automated-cherry-pick-of-#6282-upstream-release-3.2
Automated cherry pick of #6282: region: lbagents: fix deleting pending_deleted objects
2020-05-12 11:43:42 +08:00
Yousong Zhou
d2197aec70 region: lbagent: undeploy: make it idempotent
Both the following three can result in the same error message "Could not
find the requested service yunion-xx: host"

  -m systemd -a 'name=yunion-xx enabled=no state=stopped daemon_reload=yes'
  -m systemd -a 'name=yunion-xx enabled=no state=stopped daemon_reload=yes force=yes'
  -m service -a 'name=yunion-xx enabled=no state=stopped'

Use of ansibleplaybookv2 is overkill and can break console expectation.
Just turn to shell module for now
2020-05-12 10:38:56 +08:00
Yousong Zhou
51f50c1087 region: lbagents: fix deleting pending_deleted objects
This was broken since the introduction of virtual object
2020-05-12 10:11:01 +08:00
Yousong Zhou
a77aa72d47 cloudcommon: elect: notifyOne on subscribe 2020-05-11 23:27:19 +08:00
Qu Xuan
88af7f7f2f fix: 支持访问其他服务的标签列表 2020-05-11 21:39:59 +08:00
Qiu Jian
e95ea4a0fa detect bmagent and hostagent service 2020-05-11 21:21:15 +08:00
Qiu Jian
6e24efd176 feature: user login into project with highest privilege automatically 2020-05-11 21:21:15 +08:00
Zexi Li
9034bff3cb Merge pull request #6264 from ioito/automated-cherry-pick-of-#6263-upstream-release-3.2
Automated cherry pick of #6263: fix: globalvpc count vpc
2020-05-11 21:09:39 +08:00
Zexi Li
002ac64e8b Merge pull request #6266 from ioito/automated-cherry-pick-of-#6265-upstream-release-3.2
Automated cherry pick of #6265: fix: 避免卸载完已删除的磁盘后,磁盘状态为ready
2020-05-11 21:09:09 +08:00
Zexi Li
4e67c95561 Merge pull request #6271 from zexi/automated-cherry-pick-of-#6270-upstream-release-3.2
Automated cherry pick of #6270: scheduler: get region nil panic
2020-05-11 21:07:38 +08:00
Zexi Li
2d9cc6d99e Merge pull request #6276 from swordqiu/automated-cherry-pick-of-#6275-upstream-release-3.2
Automated cherry pick of #6275: fix: isolated_devices domain filter not working
2020-05-11 21:07:14 +08:00
Qiu Jian
05c206497a fix: isolated_devices domain filter not working 2020-05-11 20:47:58 +08:00
Zexi Li
a3955a36b9 Merge pull request #6269 from ioito/automated-cherry-pick-of-#6268-upstream-release-3.2
Automated cherry pick of #6268: fix: gcp rds 默认不使用vpc网络
2020-05-11 18:17:51 +08:00
Zexi Li
2e13690b5c Merge pull request #6259 from ioito/automated-cherry-pick-of-#6258-upstream-release-3.2
Automated cherry pick of #6258: fix: 避免aliyun磁盘计费类型多次转换
2020-05-11 18:17:04 +08:00
Zexi Li
e22bac2597 scheduler: get region nil panic 2020-05-11 14:58:09 +08:00
Qu Xuan
7840528040 fix: gcp rds 默认不使用vpc网络 2020-05-11 14:52:58 +08:00
Qu Xuan
e8070c171a fix: 避免卸载完已删除的磁盘后,磁盘状态为ready 2020-05-11 14:37:13 +08:00
Qu Xuan
73890e5adb fix: globalvpc count vpc 2020-05-11 14:18:22 +08:00
Qu Xuan
1868ab31eb fix: 避免aliyun磁盘计费类型多次转换 2020-05-11 14:06:03 +08:00
Zexi Li
52200db57b Merge pull request #6220 from swordqiu/automated-cherry-pick-of-#6219-upstream-release-3.2
Automated cherry pick of #6219: fix: 1. vpc, cloudprovider should not violate the sharing limit of cloud account 2. sharing mode of host and attached local storage should be consistent. 3. cannot change owner of shared resource
2020-05-11 12:37:21 +08:00
Zexi Li
4da9c3b427 Merge pull request #6256 from swordqiu/automated-cherry-pick-of-#6252-upstream-release-3.2
Automated cherry pick of #6252: fix: panic when disk has no valid storage_id
2020-05-11 10:01:20 +08:00
yunion-ci-robot
5ae4a4b2de Merge pull request #6231 from tb365/automated-cherry-pick-of-#6230-upstream-release-3.2
Automated cherry pick of #6230: lb acl cache add acl filter
2020-05-11 09:42:56 +08:00
Qiu Jian
dbd88e3288 fix: panic when disk has no valid storage_id 2020-05-11 02:58:43 +08:00
Zexi Li
83c186b616 Merge pull request #6248 from wanyaoqi/automated-cherry-pick-of-#6247-upstream-release-3.2
Automated cherry pick of #6247: fix import from libvirt
2020-05-10 21:35:04 +08:00
Zexi Li
77ac919edb Merge pull request #6236 from tb365/automated-cherry-pick-of-#6232-upstream-release-3.2
Automated cherry pick of #6232: huawei network id fix
2020-05-10 21:33:53 +08:00
wanyaoqi
e8a8416b77 fix import from libvirt 2020-05-10 20:43:24 +08:00
Zexi Li
558c477de1 Merge pull request #6218 from swordqiu/automated-cherry-pick-of-#6200-upstream-release-3.2
Automated cherry pick of #6200: fix: recode sync public_src of cloud resources
2020-05-10 19:50:21 +08:00
Zexi Li
d768fc33f1 Merge pull request #6243 from yousong/automated-cherry-pick-of-#6242-upstream-release-3.2
Automated cherry pick of #6242: disks: reword error message on bad DiskConfig struct
2020-05-10 11:29:03 +08:00
Yousong Zhou
ee13acba43 disks: reword error message on bad DiskConfig struct 2020-05-10 00:18:21 +08:00
yunion-ci-robot
c65a25fa80 Merge pull request #6240 from swordqiu/automated-cherry-pick-of-#6237-upstream-release-3.2
Automated cherry pick of #6237: fix: guestsecgroup-list panic
2020-05-10 00:17:50 +08:00
Qiu Jian
4599988771 fix: guestsecgroup-list panic 2020-05-09 23:06:06 +08:00
Qiu Jian
d85e9be656 fix: init sharing status of default vpc and default secgroup 2020-05-09 22:36:16 +08:00
Qiu Jian
9e06c3a52f fix: allow delete shared resource 2020-05-09 22:36:15 +08:00
Qiu Jian
a51f928af9 fix: 1. vpc, cloudprovider should not violate the sharing limit of cloud account 2. sharing mode of host and attached local storage should be consistent. 3. cannot change owner of shared resource 2020-05-09 22:36:15 +08:00
Qiu Jian
117122c363 fix: recode sync public_src of cloud resources 2020-05-09 21:26:42 +08:00
tangbin
2d61f927a4 huawei network id fix 2020-05-09 20:12:17 +08:00
tangbin
b4b815a30f new local lb backend fix 2020-05-09 19:23:57 +08:00
tangbin
9c50414a0e lb acl cache add acl filter 2020-05-09 19:23:57 +08:00
Zexi Li
2714b6ceb0 Merge pull request #6222 from yousong/automated-cherry-pick-of-#6221-upstream-release-3.2
Automated cherry pick of #6221: cloudprovider: add methods for getting http client
2020-05-09 19:02:14 +08:00
Zexi Li
472c5b2622 Merge pull request #6210 from swordqiu/automated-cherry-pick-of-#6209-upstream-release-3.2
Automated cherry pick of #6209: fix: missing methods for SDomainRegionalCloudResourceKeys
2020-05-09 19:00:06 +08:00
Zexi Li
4ee4a9d872 Merge pull request #6217 from swordqiu/automated-cherry-pick-of-#6216-upstream-release-3.2
Automated cherry pick of #6216: fix: export missing keys && export panic
2020-05-09 18:58:58 +08:00
Zexi Li
89af0eeba1 Merge pull request #6214 from yousong/automated-cherry-pick-of-#6213-upstream-release-3.2
Automated cherry pick of #6213: vpcagent: ovn: explicitly include gateway route in classless routes
2020-05-09 18:57:13 +08:00
Zexi Li
ea7cd16ab3 Merge pull request #6212 from yousong/automated-cherry-pick-of-#6211-upstream-release-3.2
Automated cherry pick of #6211: vpcagent: models: ignore possible external guests
2020-05-09 18:55:39 +08:00
Zexi Li
f89276dd6a Merge pull request #6207 from wanyaoqi/automated-cherry-pick-of-#6206-upstream-release-3.2
Automated cherry pick of #6206: bm register use domain token
2020-05-09 18:54:38 +08:00
Zexi Li
a9bb0087b2 Merge pull request #6226 from yousong/automated-cherry-pick-of-#6225-upstream-release-3.2
Automated cherry pick of #6225: apigateway: handlers: register cloudnet modules
2020-05-09 18:47:42 +08:00
Zexi Li
00ca11f63c Merge pull request #6208 from zexi/automated-cherry-pick-of-#6193-upstream-release-3.2
Automated cherry pick of #6193: baremetal: find baremetal add scope system
2020-05-09 17:48:49 +08:00
Yousong Zhou
3e135e70ae apigateway: handlers: register cloudnet modules 2020-05-09 16:41:08 +08:00
Yousong Zhou
caf6726b12 multicloud: loader: guard against changing proxyFunc of default client 2020-05-09 12:56:29 +08:00
Yousong Zhou
f080a4ca9b multicloud: avoid changing transport of global default http client 2020-05-09 12:56:29 +08:00
Yousong Zhou
b187ca471f cloudprovider: add methods for getting http client
Prepare for following changes to avoid using and changing default
client settings
2020-05-09 12:56:29 +08:00
Qiu Jian
83f2defb24 fix: export missing keys && export panic 2020-05-08 17:44:30 +08:00
Yousong Zhou
daa591e99d vpcagent: ovn: explicitly include gateway route in classless routes 2020-05-08 16:35:52 +08:00
Yousong Zhou
88ac93510b vpcagent: models: ignore possible external guests 2020-05-08 15:46:46 +08:00
Qiu Jian
bf5d38d510 fix: missing methods for SDomainRegionalCloudResourceKeys 2020-05-08 14:16:34 +08:00
Zexi Li
79cecc5c7e baremetal: find baremetal add scope system 2020-05-08 13:46:38 +08:00
wanyaoqi
5fdd93fa2e bm register use domain token 2020-05-08 12:00:19 +08:00
Zexi Li
af9bf353f4 Merge pull request #6205 from tb365/automated-cherry-pick-of-#6204-upstream-release-3.2
Automated cherry pick of #6204: set cookie domain
2020-05-08 11:57:25 +08:00
tangbin
50146557ba set cookie domain 2020-05-08 11:56:17 +08:00
Zexi Li
cc52279ba2 Merge pull request #6201 from tb365/automated-cherry-pick-of-#6190-upstream-release-3.2
Automated cherry pick of #6190: apigateway-yunionauth-domain-setting
2020-05-08 10:29:21 +08:00
tangbin
6320fe1594 apigateway-yunionauth-domain-setting 2020-05-08 10:19:04 +08:00
Zexi Li
aa4cba8e6f Merge pull request #6199 from swordqiu/automated-cherry-pick-of-#6198-upstream-release-3.2
Automated cherry pick of #6198: fix: fail to sync share state for on-premise storages
2020-05-08 10:18:31 +08:00
Zexi Li
8d17139484 Merge pull request #6195 from wanyaoqi/automated-cherry-pick-of-#6194-upstream-release-3.2
Automated cherry pick of #6194: set host list scope system
2020-05-08 10:16:28 +08:00
Qiu Jian
7291e620a3 fix: fail to sync share state for on-premise storages 2020-05-07 20:47:12 +08:00
wanyaoqi
e8dc98ca8d set host list scope system 2020-05-07 20:04:31 +08:00
Zexi Li
012ee72fcb Merge pull request #6189 from zhaoxiangchun/automated-cherry-pick-of-#6185-upstream-release-3.2
Automated cherry pick of #6185: 修复谷歌监控无法获取的问题
2020-05-07 17:21:38 +08:00
yunion-ci-robot
84ea12f86d Merge pull request #6165 from zhaoxiangchun/automated-cherry-pick-of-#6164-upstream-release-3.2
Automated cherry pick of #6164: bugfix mem paginate
2020-05-07 16:51:45 +08:00
Zexi Li
67baa9be6e Merge pull request #6184 from swordqiu/automated-cherry-pick-of-#6183-upstream-release-3.2
Automated cherry pick of #6183: fix: missing perform public/private actionlog
2020-05-07 11:38:40 +08:00
zhaoxiangchun
1a800c99c7 修复谷歌监控无法获取的问题
直接返回调用RestAPI的json格式数据
2020-05-07 11:28:34 +08:00
Zexi Li
e9a4c0fe86 Merge pull request #6182 from swordqiu/automated-cherry-pick-of-#6181-upstream-release-3.2
Automated cherry pick of #6181: fix: shared cloudprovider not accessible
2020-05-07 11:28:26 +08:00
Zexi Li
8d9bddf6da Merge pull request #6180 from swordqiu/automated-cherry-pick-of-#6179-upstream-release-3.2
Automated cherry pick of #6179: fix: shared resource should not be deletable
2020-05-07 11:23:59 +08:00
Zexi Li
5eb616a30c Merge pull request #6169 from yousong/automated-cherry-pick-of-#6168-upstream-release-3.2
Automated cherry pick of #6168: dnsrecords: note that DnsRecordManager is a IAdminSharableVirtualModelManager
2020-05-07 11:23:14 +08:00
Zexi Li
8a9aef390d Merge pull request #6175 from swordqiu/automated-cherry-pick-of-#6174-upstream-release-3.2
Automated cherry pick of #6174: fix: fail to fetch real client ip from httprequest
2020-05-07 11:16:23 +08:00
Qiu Jian
c269437f36 fix: missing perform public/private actionlog 2020-05-07 02:14:49 +08:00
Qiu Jian
92232a5c45 fix: shared cloudprovider not accessible 2020-05-07 01:54:10 +08:00
Qiu Jian
fea14ed51e fix: shared resource should not be deletable 2020-05-07 01:40:23 +08:00
Qiu Jian
5c74ad427f fix: fail to fetch real client ip from httprequest 2020-05-06 22:27:08 +08:00
Yousong Zhou
40282fa5e6 dnsrecords: allow updating only description
This commit includes the following changes

 - Eliminate unused arguments from validateModelData()
 - Remove "records" member of input data unconditionally
 - Allow updates to not include records related parameters, to allow
   updating only "description" without emitting "Empty record" error
2020-05-06 18:42:29 +08:00
Yousong Zhou
356bea1915 dnsrecords: note that DnsRecordManager is a IAdminSharableVirtualModelManager 2020-05-06 18:42:29 +08:00
yunion-ci-robot
e3d062290a Merge pull request #6159 from zhaoxiangchun/automated-cherry-pick-of-#6158-upstream-release-3.2
Automated cherry pick of #6158: bugfix mem paginate
2020-05-06 15:45:44 +08:00
Zexi Li
1817cb1423 Merge pull request #6166 from wanyaoqi/automated-cherry-pick-of-#6150-upstream-release-3.2
Automated cherry pick of #6150: fix update input
2020-05-06 12:35:52 +08:00
wanyaoqi
eda2a39e5a fix update input 2020-05-06 11:55:22 +08:00
zhaoxiangchun
ee55aed03f bugfix mem paginate
通过totoal和offset 与limit比较确定最后返回数据
2020-05-06 11:06:27 +08:00
Zexi Li
70534106e6 Merge pull request #6154 from ioito/automated-cherry-pick-of-#6153-upstream-release-3.2
Automated cherry pick of #6153: fix: secgroupcache权限问题修复
2020-04-30 20:14:01 +08:00
zhaoxiangchun
b20d1ab7bd 修复规则无法禁用的问题 2020-04-30 20:13:30 +08:00
zhaoxiangchun
2ef877bd4d bugfix mem paginate
通过totoal和offset 与limit比较确定最后返回数据
2020-04-30 20:13:30 +08:00
Zexi Li
9103700f33 Merge pull request #6163 from wanyaoqi/automated-cherry-pick-of-#6151-upstream-release-3.2
Automated cherry pick of #6151: fix host details output
2020-04-30 19:08:24 +08:00
wanyaoqi
17676568d8 fix host init without etcd 2020-04-30 18:46:15 +08:00
wanyaoqi
341dda54ca fix host details output 2020-04-30 18:34:42 +08:00
Qu Xuan
0812fc2efe fix: secgroupcache权限问题修复 2020-04-30 15:42:32 +08:00
Zexi Li
7a97d5690b Merge pull request #6148 from rainzm/automated-cherry-pick-of-#6147-upstream-release-3.2
Automated cherry pick of #6147: fix/monitor: AutoScalingNotifier.ShouldNotify should call NotifierBase.ShouldNotify
2020-04-30 14:41:38 +08:00
Zexi Li
70db8a462e Merge pull request #6149 from wanyaoqi/automated-cherry-pick-of-#6145-upstream-release-3.2
Automated cherry pick of #6145: fix host health
2020-04-30 14:41:05 +08:00
wanyaoqi
9b22f51f25 fix host health 2020-04-30 11:32:53 +08:00
Rain
3a09de47b7 fix/monitor: AutoScalingNotifier.ShouldNotify should call NotifierBase.ShouldNotify 2020-04-30 11:31:28 +08:00
Zexi Li
b2c20dac86 Merge pull request #6138 from ioito/automated-cherry-pick-of-#6137-upstream-release-3.2
Automated cherry pick of #6137: fix: 云账号创建可以指定项目
2020-04-30 10:36:36 +08:00
Zexi Li
71be44a29b Merge pull request #6126 from ioito/automated-cherry-pick-of-#6123-upstream-release-3.2
Automated cherry pick of #6123: fix: usage-handler 不统计虚拟的vpc wire
2020-04-30 10:36:14 +08:00
Zexi Li
bab5b137ae Merge pull request #6142 from swordqiu/automated-cherry-pick-of-#6141-upstream-release-3.2
Automated cherry pick of #6141: fix: remove cloudaccount autosync randomness
2020-04-30 10:35:40 +08:00
Zexi Li
0fc6e1a29b Merge pull request #6144 from swordqiu/automated-cherry-pick-of-#6143-upstream-release-3.2
Automated cherry pick of #6143: fix: list lbbg panic
2020-04-30 10:35:07 +08:00
Qiu Jian
4b8ddca41b fix: list lbbg panic 2020-04-29 22:42:53 +08:00
Qiu Jian
2181019270 fix: remove cloudaccount autosync randomness 2020-04-29 22:34:37 +08:00
Zexi Li
fb3ae328c8 Merge pull request #6136 from wanyaoqi/automated-cherry-pick-of-#6034-upstream-release-3.2
Automated cherry pick of #6034: host health check
2020-04-29 21:17:12 +08:00
Zexi Li
60f3b1e6a2 Merge pull request #6128 from swordqiu/automated-cherry-pick-of-#6120-upstream-release-3.2
Automated cherry pick of #6120: fix: sysadmin can override policy violation check
2020-04-29 21:15:44 +08:00
Zexi Li
368a45069e Merge pull request #6125 from tb365/automated-cherry-pick-of-#6124-upstream-release-3.2
Automated cherry pick of #6124: add cookie domain setting option
2020-04-29 21:13:34 +08:00
Qu Xuan
a126f56bfb fix: 云账号创建可以指定项目 2020-04-29 20:06:26 +08:00
wanyaoqi
70fa719942 enable etcd lock 2020-04-29 20:03:06 +08:00
wanyaoqi
e024bdef1b host health check 2020-04-29 19:58:03 +08:00
Zexi Li
b18df612be Merge pull request #6122 from zhaoxiangchun/automated-cherry-pick-of-#6121-upstream-release-3.2
Automated cherry pick of #6121: monitor,对于监控数据nodata,默认不发送邮件
2020-04-29 19:36:05 +08:00
Qiu Jian
ae9838a38b fix: sysadmin can override policy violation check 2020-04-29 17:59:03 +08:00
Qu Xuan
599facb154 fix: usage-handler 不统计虚拟的vpc wire 2020-04-29 17:56:46 +08:00
tangbin
793412b813 add cookie domain setting option 2020-04-29 17:54:42 +08:00
zhaoxiangchun
27e075bfae monitor,对于监控数据nodata,默认不发送邮件 2020-04-29 15:18:23 +08:00
Zexi Li
ba6e8a1656 Merge pull request #6119 from swordqiu/automated-cherry-pick-of-#6118-upstream-release-3.2
Automated cherry pick of #6118: fix: cloud-account-usage vpc/storage not accurate
2020-04-29 13:11:41 +08:00
Zexi Li
e1840785c4 Merge pull request #6112 from swordqiu/automated-cherry-pick-of-#6111-upstream-release-3.2
Automated cherry pick of #6111: fix: prevent policy violation
2020-04-29 13:10:22 +08:00
Zexi Li
8767b92bc2 Merge pull request #6102 from rainzm/automated-cherry-pick-of-#6101-upstream-release-3.2
Automated cherry pick of #6101: fix/autoscaling: Chang the format of CoolingTime
2020-04-29 13:09:35 +08:00
Zexi Li
1fc3614d7c Merge pull request #6096 from ioito/automated-cherry-pick-of-#6095-upstream-release-3.2
Automated cherry pick of #6095: fix: 普通用户可获取rds账号密码
2020-04-29 13:08:07 +08:00
Zexi Li
3b94a82dc4 Merge pull request #6110 from ioito/automated-cherry-pick-of-#6109-upstream-release-3.2
Automated cherry pick of #6109: fix: 避免gcp创建创建文件夹失败
2020-04-29 13:07:32 +08:00
Zexi Li
7a4096c733 Merge pull request #6117 from swordqiu/automated-cherry-pick-of-#6116-upstream-release-3.2
Automated cherry pick of #6116: fix: export files complain duplicate field name error
2020-04-29 13:06:38 +08:00
Qiu Jian
eb67eb6346 fix: cloud-account-usage vpc/storage not accurate 2020-04-29 01:16:18 +08:00
Qiu Jian
ac4832ebf2 fix: export files complain duplicate field name error 2020-04-29 00:56:07 +08:00
yunion-ci-robot
4cdb7513a0 Merge pull request #6104 from ioito/automated-cherry-pick-of-#6103-upstream-release-3.2
Automated cherry pick of #6103: fix: 修复openstack存储同步问题
2020-04-28 23:41:35 +08:00
Qiu Jian
3713cfd967 fix: prevent policy violation 2020-04-28 23:37:26 +08:00
Qu Xuan
ff0e90a593 fix: 避免gcp创建创建文件夹失败 2020-04-28 20:50:31 +08:00
Zexi Li
e4f57eebe0 Merge pull request #6093 from wanyaoqi/automated-cherry-pick-of-#6092-upstream-release-3.2
Automated cherry pick of #6092: gpu host enable huge page
2020-04-28 16:05:23 +08:00
Qu Xuan
d6ae5042b0 fix: 修复openstack存储同步问题 2020-04-28 14:47:34 +08:00
Rain
76788bfa9d fix/as: Set ScalingPolicy's project as its ScalingGroup's project 2020-04-28 11:18:23 +08:00
Rain
f9fcb5e73f fix/autoscaling: Chang the format of CoolingTime 2020-04-28 11:18:23 +08:00
Qu Xuan
c3f13225cd fix: 普通用户可获取rds账号密码 2020-04-28 10:41:08 +08:00
Zexi Li
deac1a9ea4 Merge pull request #6086 from yousong/automated-cherry-pick-of-#6085-upstream-release-3.2
Automated cherry pick of #6085: region: cloudaccounts: re-validate only when proxysetting changed
2020-04-27 20:59:28 +08:00
Zexi Li
396f099098 Merge pull request #6091 from yousong/automated-cherry-pick-of-#6090-upstream-release-3.2
Automated cherry pick of #6090: vpcagent: tmp replacement for db.FindByIndex()
2020-04-27 20:52:19 +08:00
Yousong Zhou
6d9a5c2a70 vpcagent: ad-hoc replacement for db.FindByIndex() 2020-04-27 20:07:34 +08:00
wanyaoqi
41aceac04d gpu host enable huge page 2020-04-27 20:04:03 +08:00
Yousong Zhou
29dcd54f4a region: cloudaccounts: re-validate only when proxysetting changed 2020-04-27 17:36:29 +08:00
Zexi Li
f8a2f31373 Merge pull request #6076 from yousong/automated-cherry-pick-of-#6075-upstream-release-3.2
Automated cherry pick of #6075: vpcagent: work around nics of pending deleted guest
2020-04-27 17:19:02 +08:00
Zexi Li
95aa4a91fe Merge pull request #6080 from ioito/automated-cherry-pick-of-#6079-upstream-release-3.2
Automated cherry pick of #6079: fix: gcp fake region status
2020-04-27 17:17:46 +08:00
Zexi Li
1212dad5b3 Merge pull request #6078 from swordqiu/automated-cherry-pick-of-#6077-upstream-release-3.2
Automated cherry pick of #6077: fix: cloudaccount usage region/zone count not accurate
2020-04-27 17:17:06 +08:00
Zexi Li
36c64afcec Merge pull request #6026 from zhaoxiangchun/automated-cherry-pick-of-#6024-upstream-release-3.2
Automated cherry pick of #6024: lb 负载均衡优化建议
2020-04-27 17:16:18 +08:00
Zexi Li
f90bd32c61 Merge pull request #6082 from wanyaoqi/automated-cherry-pick-of-#6081-upstream-release-3.2
Automated cherry pick of #6081: fix exsi convert disk path
2020-04-27 17:14:34 +08:00
Yousong Zhou
12e9bcca0e vpcagent: models: allow guest to have multiple vpc nics 2020-04-27 17:13:44 +08:00
Yousong Zhou
95ada0fe55 vpcagent: work around nics of pending deleted guest 2020-04-27 17:13:44 +08:00
Zexi Li
933368b4b2 Merge pull request #6069 from ioito/automated-cherry-pick-of-#6068-upstream-release-3.2
Automated cherry pick of #6068: fix: gcp use project name for cloudprovider
2020-04-27 16:03:18 +08:00
wanyaoqi
16af1a4dc0 fix exsi convert disk path 2020-04-27 15:58:09 +08:00
Qu Xuan
06d47bba43 fix: gcp fake region status 2020-04-27 15:56:39 +08:00
Qiu Jian
eb401bd1f8 fix: cloudaccount usage region/zone count not accurate 2020-04-27 15:53:27 +08:00
yunion-ci-robot
81ea86885e Merge pull request #6074 from rainzm/automated-cherry-pick-of-#6073-upstream-release-3.2
Automated cherry pick of #6073: fix/notify: remove 'v2' from email verify url
2020-04-27 14:38:32 +08:00
Qu Xuan
fcb817033c fix: gcp use project name for cloudprovider 2020-04-27 14:16:25 +08:00
Zexi Li
dc43158b59 Merge pull request #6061 from wanyaoqi/automated-cherry-pick-of-#5853-upstream-release-3.2
Automated cherry pick of #5853: host health check
2020-04-27 12:55:14 +08:00
Zexi Li
ce1eef35bd Merge pull request #6063 from rainzm/automated-cherry-pick-of-#6062-upstream-release-3.2
Automated cherry pick of #6062: fix/notify: Add deadline for rpc client
2020-04-27 12:48:02 +08:00
yunion-ci-robot
a6e7042a09 Merge pull request #6045 from tb365/automated-cherry-pick-of-#6041-upstream-release-3.2
Automated cherry pick of #6041: yunionapi reset password fix
2020-04-27 12:12:32 +08:00
Rain
77d4a0ee77 fix/notify: remove 'v2' from email verify url 2020-04-27 11:33:41 +08:00
Zexi Li
5b00f25dc8 Merge pull request #6060 from swordqiu/automated-cherry-pick-of-#6059-upstream-release-3.2
Automated cherry pick of #6059: fix: cloud-account/provider usage not accurate
2020-04-27 10:55:16 +08:00
Zexi Li
587eade0a4 Merge pull request #6053 from wanyaoqi/automated-cherry-pick-of-#6052-upstream-release-3.2
Automated cherry pick of #6052: host fix cmt bound, minor fix
2020-04-27 10:54:55 +08:00
Zexi Li
dc8d122394 Merge pull request #6051 from swordqiu/automated-cherry-pick-of-#6050-upstream-release-3.2
Automated cherry pick of #6050: feature: make baremetal options managed by service config
2020-04-27 10:53:42 +08:00
Zexi Li
9bef06b319 Merge pull request #6055 from rainzm/automated-cherry-pick-of-#6054-upstream-release-3.2
Automated cherry pick of #6054: Fix/auto scaling & guest template
2020-04-27 10:52:12 +08:00
Rain
778b619a59 fix/notify: Add deadline for rpc client 2020-04-27 10:43:54 +08:00
wanyaoqi
342f963e6e host health check 2020-04-27 10:32:34 +08:00
Qiu Jian
1a61a8445f fix: cloud-account/provider usage not accurate 2020-04-27 02:13:18 +08:00
tangbin
3e722dd487 yunionapi reset password fix 2020-04-26 21:50:18 +08:00
Qiu Jian
6d263c3bd1 feature: make baremetal options managed by service config 2020-04-26 21:28:48 +08:00
Zexi Li
3d0e842825 Merge pull request #6046 from tb365/automated-cherry-pick-of-#6042-upstream-release-3.2
Automated cherry pick of #6042: huawei elb cookie timeout fix
2020-04-26 21:06:22 +08:00
Rain
5ed62e22d8 fix/autoscaling: Change Sunday as 7 from 0 2020-04-26 21:05:25 +08:00
Rain
a31c64e726 fix/guesttemplate: Change ResetPassword as true default 2020-04-26 21:05:25 +08:00
Rain
e6c9d50bf3 fix/autoscaling: fix some problem
1. ScalingGroupGuestManger.Query 默认添加 NotEqual(...)
2. ScalingGroup.Scale 扩大锁的粒度,更新冷却时间也挪到这里面
3. climc 中增加 scaling-group-show
2020-04-26 21:05:25 +08:00
Zexi Li
2116475c9f Merge pull request #6021 from swordqiu/automated-cherry-pick-of-#6020-upstream-release-3.2
Automated cherry pick of #6020: fix: opslog FetchOwnerId fail
2020-04-26 21:04:55 +08:00
Zexi Li
5f3009c157 Merge pull request #6023 from yousong/automated-cherry-pick-of-#6022-upstream-release-3.2
Automated cherry pick of #6022: vpcagent: fend off non-onecloud-vpc guest nics
2020-04-26 21:04:42 +08:00
wanyaoqi
6b4c215d66 host fix cmt bound, minor fix 2020-04-26 20:57:07 +08:00
Zexi Li
aab70ad1b8 Merge pull request #6044 from tb365/automated-cherry-pick-of-#6040-upstream-release-3.2
Automated cherry pick of #6040: ctyun subnet create bugfix
2020-04-26 20:31:29 +08:00
tangbin
d3d46e81b3 aws elb health check type fix 2020-04-26 20:09:51 +08:00
tangbin
3f7b410bc2 huawei elb cookie timeout fix 2020-04-26 20:09:51 +08:00
tangbin
ce25fc43d6 ctyun subnet create bugfix 2020-04-26 20:08:42 +08:00
Zexi Li
0b138da714 Merge pull request #6019 from swordqiu/automated-cherry-pick-of-#6013-upstream-release-3.2
Automated cherry pick of #6013: fix: network allocation according to sharing status
2020-04-26 19:59:18 +08:00
Zexi Li
bc44cce0e1 Merge pull request #6039 from wanyaoqi/automated-cherry-pick-of-#6038-upstream-release-3.2
Automated cherry pick of #6038: misc bugfix:
2020-04-26 19:57:46 +08:00
yunion-ci-robot
479665c3fe Merge pull request #6012 from swordqiu/automated-cherry-pick-of-#6008-upstream-release-3.2
Automated cherry pick of #6008: fix: GetOnPremiseNetworkOfIP should return underlay networks
2020-04-26 19:50:31 +08:00
yunion-ci-robot
cd25cc9b33 Merge pull request #6037 from swordqiu/automated-cherry-pick-of-#6036-upstream-release-3.2
Automated cherry pick of #6036: fix: proxysetting attributes should be domain-settable
2020-04-26 19:47:32 +08:00
Yousong Zhou
16815d078d guestnetworks: try allocation of mapped addr on sync 2020-04-26 19:03:24 +08:00
Yousong Zhou
78d39efde7 region: vpcs_mapped_address: fix locking 2020-04-26 19:03:24 +08:00
Yousong Zhou
f2a777c977 region: vpcs_mapped_address: alloc guestnic mapped addr backwards 2020-04-26 19:03:24 +08:00
Yousong Zhou
b8fcf37883 guests: simplify code 2020-04-26 19:03:24 +08:00
Yousong Zhou
47ad14ea4c hostman: options: pack up a Parse() func 2020-04-26 19:03:24 +08:00
Yousong Zhou
1234fb46c5 vpcagent: fend off non-onecloud-vpc guest nics 2020-04-26 19:03:24 +08:00
wanyaoqi
127ce54503 misc bugfix:
- fix get details hosts
- save image enable generate_name
- network auto set dns
- fix servers filter by disk
2020-04-26 18:35:33 +08:00
Zexi Li
82f4f070ab Merge pull request #6029 from ioito/automated-cherry-pick-of-#6028-upstream-release-3.2
Automated cherry pick of #6028: fix: json unmarshal
2020-04-26 18:19:18 +08:00
Qiu Jian
5c42d6eb88 make DIRECT proxysettting default share to system 2020-04-26 17:34:41 +08:00
Qiu Jian
fe213d8bf7 fix: proxysetting attributes should be domain-settable 2020-04-26 17:34:41 +08:00
Zexi Li
8e57a5af9c Merge pull request #6025 from swordqiu/automated-cherry-pick-of-#6006-upstream-release-3.2
Automated cherry pick of #6006: fix: resolve parameter name conflict in google cloud account create input
2020-04-26 16:36:16 +08:00
Qu Xuan
bbeda23bf9 fix: json unmarshal 2020-04-26 15:51:51 +08:00
zhaoxiangchun
383517c0df lb 负载均衡优化建议
通过判断是否包含后端服务器组和后端服务实例进行判断
2020-04-26 11:43:27 +08:00
Qiu Jian
f835b55e4f fix: resolve parameter name conflict in google cloud account create input 2020-04-26 11:43:01 +08:00
Qiu Jian
87b0e7f48a fix: opslog FetchOwnerId fail 2020-04-26 11:37:04 +08:00
Qiu Jian
ca13731a58 fix: network allocation according to sharing status 2020-04-26 00:37:38 +08:00
yunion-ci-robot
d9ec66362e Merge pull request #6015 from zexi/automated-cherry-pick-of-#6014-upstream-release-3.2
Automated cherry pick of #6014: scheduler: fix network predicate get wrong free port
2020-04-26 00:32:31 +08:00
Zexi Li
02ec462b5d scheduler: fix network predicate get wrong free port 2020-04-25 23:24:15 +08:00
Qiu Jian
92d1d1f3a8 fix: GetOnPremiseNetworkOfIP should return underlay networks 2020-04-25 16:31:29 +08:00
Zexi Li
822838035b Merge pull request #6005 from swordqiu/automated-cherry-pick-of-#6004-upstream-release-3.2
Automated cherry pick of #6004: fix: dns name pattern revisited
2020-04-25 10:44:45 +08:00
Qiu Jian
fa820b8740 fix: dns name pattern revisited 2020-04-24 21:55:43 +08:00
yunion-ci-robot
c573880cc7 Merge pull request #5912 from yousong/automated-cherry-pick-of-#5911-upstream-release-3.2
Automated cherry pick of #5911: apis: add ovn distgw const definitions
2020-04-24 21:08:30 +08:00
Zexi Li
6c0f61becd Merge pull request #6003 from swordqiu/automated-cherry-pick-of-#6002-upstream-release-3.2
Automated cherry pick of #6002: fix: code autogen issues
2020-04-24 20:33:22 +08:00
Zexi Li
44e8a0843a Merge pull request #6000 from rainzm/automated-cherry-pick-of-#5978-upstream-release-3.2
Automated cherry pick of #5978: fix/autoscaling: Use UserCred's session but AdminSession to request monitor
2020-04-24 20:30:26 +08:00
Qiu Jian
cbf1818e5c fix: code autogen issues 2020-04-24 20:20:48 +08:00
Rain
87506a8140 fix/autoscaling: Add 'scaling_group_id' for server-list result 2020-04-24 19:39:11 +08:00
Rain
e01292274d fix/autoscaling: Add status 'pending_remove' for ScalingGroup_Guest
The status 'pending_remove' means that the guest described by
ScalingGroup_Guest has been pendingdeleted or deleted.
2020-04-24 19:39:11 +08:00
Rain
e6e95f31a7 fix/autoscaling: Change ScalingPolicy as VirtualResource 2020-04-24 19:39:11 +08:00
Rain
b28c1a0b63 fix/autoscaling: Use UserCred's session but AdminSession to request monitor 2020-04-24 19:39:11 +08:00
Yousong Zhou
96dcd83996 hostman: let sdnagent do port cleanup
ovsutils.CleanHiddenPorts() is buggy in that it has no regards for
patch ports
2020-04-24 18:32:40 +08:00
Yousong Zhou
8eb6c01ecd hostman: options: add ovn_mapped_bridge 2020-04-24 18:32:40 +08:00
Yousong Zhou
2588613598 hostman: options: add allow_xx_vms 2020-04-24 18:32:40 +08:00
Yousong Zhou
417cc017d9 vpcagent: ovn: use network.GuestDns when available 2020-04-24 18:32:40 +08:00
Yousong Zhou
96b58d0455 vpcagent: ovn: manage static routes 2020-04-24 18:32:40 +08:00
Yousong Zhou
5185e93413 vpcagent: ovn: guestnetwork: guard against empty dhcpopt 2020-04-24 18:32:40 +08:00
Yousong Zhou
8cad301846 vpcagent: ovn: rename subnet, guestnetwork ovn obj names 2020-04-24 18:32:40 +08:00
Yousong Zhou
4cb1fbbd8f vpcagent: ovn: use cmp() when claimVpc 2020-04-24 18:32:40 +08:00
Yousong Zhou
08ef2c5cf6 vpcagent: ovn: use cmp() 2020-04-24 18:32:40 +08:00
Yousong Zhou
09d6446d05 vpcagent: add cmp() for search and pre-cleanup 2020-04-24 18:32:40 +08:00
Yousong Zhou
12a79243e0 vpcagent: ovn: make host ls when claimVpc 2020-04-24 18:32:40 +08:00
Yousong Zhou
f9a4085a8f vpcagent: models: include guest, host 2020-04-24 18:32:40 +08:00
Yousong Zhou
6fcfd5a755 guests: always include host_id in desc 2020-04-24 18:32:40 +08:00
Yousong Zhou
012bdbce48 guestnetworks: add vpc id and mapped ip addr info to nic desc 2020-04-24 18:32:40 +08:00
Yousong Zhou
b772f95dbf guestnetworks,hosts: add alloc mapped ip addr for use in onecloud vpc 2020-04-24 18:32:40 +08:00
Yousong Zhou
38ccf7e056 apis: add ovn distgw const definitions 2020-04-24 18:32:40 +08:00
Zexi Li
da5e1e3bfe Merge pull request #5991 from ioito/automated-cherry-pick-of-#5918-upstream-release-3.2
Automated cherry pick of #5918: fix: 修复华为云eneterprise-project-list异常问题
2020-04-24 18:18:08 +08:00
Zexi Li
faf92ef201 Merge pull request #5996 from yousong/automated-cherry-pick-of-#5995-upstream-release-3.2
Automated cherry pick of #5995: lblistener: fix updating lblistener without backend_group field
2020-04-24 18:17:18 +08:00
Zexi Li
91fbb50060 Merge pull request #5994 from yousong/automated-cherry-pick-of-#5993-upstream-release-3.2
Automated cherry pick of #5993: cloudcommon: allow create:"domain" tag
2020-04-24 14:45:51 +08:00
Yousong Zhou
ba1a51c771 lblistener: fix updating lblistener without backend_group field
Fixes dd01610931 ("lblistener: allow setting http/https listener
backendgroup to empty")
2020-04-24 14:22:43 +08:00
Yousong Zhou
26b74b0873 cloudcommon: allow create:"domain" tag
Fixes panic: model manager hosts: column manager_uri has invalid tag
create:"domain", expecting [required optional domain_required
domain_optional admin_required admin_optional]
2020-04-24 14:20:13 +08:00
Qu Xuan
cbd3480309 fix: 修复华为云eneterprise-project-list异常问题 2020-04-24 14:11:25 +08:00
Zexi Li
9176aa3169 Merge pull request #5986 from ioito/automated-cherry-pick-of-#5985-upstream-release-3.2
Automated cherry pick of #5985: fix: 避免rds任务交叉运行
2020-04-24 14:11:02 +08:00
Zexi Li
bb571f40f6 Merge pull request #5987 from ioito/automated-cherry-pick-of-#5881-upstream-release-3.2
Automated cherry pick of #5881: fix: 阿里云资源组同步
2020-04-24 14:10:09 +08:00
Zexi Li
89507e2576 Merge pull request #5989 from ioito/automated-cherry-pick-of-#5903-upstream-release-3.2
Automated cherry pick of #5903: fix: esxi disk project sync
2020-04-24 14:09:47 +08:00
Qu Xuan
5411324d3b fix: esxi disk project sync 2020-04-24 11:34:46 +08:00
Qu Xuan
9e22edbc08 VMware resource pool同步 2020-04-24 11:32:05 +08:00
Qu Xuan
99353d2676 fix: 华为企业项目映射同步 2020-04-24 11:32:05 +08:00
Qu Xuan
8735d4c737 fix: 阿里云资源组同步 2020-04-24 11:32:05 +08:00
Qu Xuan
8c01ba2165 fix: 避免rds任务交叉运行 2020-04-24 11:29:13 +08:00
Zexi Li
afbd1359f2 Merge pull request #5983 from swordqiu/automated-cherry-pick-of-#5982-upstream-release-3.2
Automated cherry pick of #5982: fix: domain resources' field tags should changed to domain tags
2020-04-24 11:15:16 +08:00
Zexi Li
de3e335774 Merge pull request #5972 from swordqiu/automated-cherry-pick-of-#5960-upstream-release-3.2
Automated cherry pick of #5960: fix: opslog create fail
2020-04-24 01:37:38 +08:00
Zexi Li
6ad425e395 Merge pull request #5976 from ioito/automated-cherry-pick-of-#5975-upstream-release-3.2
Automated cherry pick of #5975: fix: 添加cloudevent过滤参数
2020-04-24 01:36:19 +08:00
Zexi Li
b46bf918be Merge pull request #5980 from ioito/automated-cherry-pick-of-#5979-upstream-release-3.2
Automated cherry pick of #5979: fix: cloudevent使用代理优化
2020-04-24 01:35:24 +08:00
Qiu Jian
01a2195c20 fix: domain resources' field tags should changed to domain tags 2020-04-23 22:13:47 +08:00
yunion-ci-robot
87995e2533 Merge pull request #5974 from tb365/automated-cherry-pick-of-#5973-upstream-release-3.2
Automated cherry pick of #5973: aliyun create elb listener fix
2020-04-23 20:24:52 +08:00
Qu Xuan
3363f091b0 fix: cloudevent使用代理优化 2020-04-23 17:53:44 +08:00
Qu Xuan
d071aa1408 fix: 添加cloudevent过滤参数 2020-04-23 17:13:02 +08:00
tangbin
ee392ac8f3 aliyun create elb listener fix 2020-04-23 16:35:08 +08:00
yunion-ci-robot
ab151f0f29 Merge pull request #5938 from ioito/automated-cherry-pick-of-#5915-upstream-release-3.2
Automated cherry pick of #5915: fix: 自动创建项目
2020-04-23 13:40:53 +08:00
Qiu Jian
96ac8267ab fix: opslog create fail 2020-04-23 11:17:51 +08:00
Zexi Li
b65dc463bc Merge pull request #5970 from swordqiu/automated-cherry-pick-of-#5966-upstream-release-3.2
Automated cherry pick of #5966: supermicro redfish support
2020-04-23 09:56:43 +08:00
Qiu Jian
6059e14fe1 supermicro redfish support 2020-04-23 09:32:37 +08:00
Zexi Li
1abed1f794 Merge pull request #5929 from yousong/automated-cherry-pick-of-#5928-upstream-release-3.2
Automated cherry pick of #5928: lbagent: fend off unexpected resources just in case
2020-04-23 00:07:05 +08:00
Zexi Li
3775608d93 Merge pull request #5959 from wanyaoqi/automated-cherry-pick-of-#5958-upstream-release-3.2
Automated cherry pick of #5958: fix check ca cert
2020-04-23 00:05:50 +08:00
Zexi Li
dfa1f7c0bc Merge pull request #5946 from rainzm/automated-cherry-pick-of-#5944-upstream-release-3.2
Automated cherry pick of #5944: fix(region): Add implements about owner for ScalingPolicy and ScalingActivity
2020-04-23 00:04:23 +08:00
Zexi Li
05e88b971a Merge pull request #5962 from swordqiu/automated-cherry-pick-of-#5961-upstream-release-3.2
Automated cherry pick of #5961: fix: clean pending usage caused by pre-validate-create-data
2020-04-23 00:03:06 +08:00
Zexi Li
e2499d23b8 Merge pull request #5925 from swordqiu/automated-cherry-pick-of-#5921-upstream-release-3.2
Automated cherry pick of #5921: fix: FindAnonymousStructPoint needs input as a pointer to struct
2020-04-23 00:02:33 +08:00
Zexi Li
f867795011 Merge pull request #5920 from ioito/automated-cherry-pick-of-#5919-upstream-release-3.2
Automated cherry pick of #5919: fix: 非私有云同步region name
2020-04-22 23:59:36 +08:00
Zexi Li
1e0594c3d5 Merge pull request #5957 from wanyaoqi/automated-cherry-pick-of-#5956-upstream-release-3.2
Automated cherry pick of #5956: support sync disk snapshot status
2020-04-22 23:58:35 +08:00
Zexi Li
6426b8a031 Merge pull request #5933 from ioito/automated-cherry-pick-of-#5931-upstream-release-3.2
Automated cherry pick of #5931: fix: 转换非标准存储类型到lrs
2020-04-22 23:57:25 +08:00
Zexi Li
28937f42e8 Merge pull request #5947 from tb365/automated-cherry-pick-of-#5945-upstream-release-3.2
Automated cherry pick of #5945: huawei elb sync vpc
2020-04-22 23:55:33 +08:00
Zexi Li
124edf9790 Merge pull request #5955 from zexi/automated-cherry-pick-of-#5951-upstream-release-3.2
Automated cherry pick of #5951: baremetal: ensure power up add retries
2020-04-22 23:51:28 +08:00
Qiu Jian
f145b360d6 fix: clean pending usage caused by pre-validate-create-data 2020-04-22 23:40:28 +08:00
yunion-ci-robot
ca7be6fa79 Merge pull request #5942 from tb365/automated-cherry-pick-of-#5927-upstream-release-3.2
Automated cherry pick of #5927: remove aws invalid backendgroup
2020-04-22 23:05:06 +08:00
wanyaoqi
4cf299b0fd fix check ca cert 2020-04-22 22:07:32 +08:00
yunion-ci-robot
6af24165fe Merge pull request #5883 from wanyaoqi/automated-cherry-pick-of-#5879-upstream-release-3.2
Automated cherry pick of #5879: keystone store service cert
2020-04-22 22:06:51 +08:00
wanyaoqi
034b546b16 support sync disk snapshot status 2020-04-22 20:53:47 +08:00
Zexi Li
3b01b23f79 baremetal: ensure power up add retries 2020-04-22 20:41:47 +08:00
tangbin
9f83fefc11 huawei elb sync vpc 2020-04-22 20:30:17 +08:00
Rain
fb1a399f09 fix(region): Add implements about owner for ScalingPolicy and ScalingActivity 2020-04-22 20:28:31 +08:00
Qiu Jian
7bc617fdcd fix: lb FetchCustomizedColumes fixes 2020-04-22 20:20:50 +08:00
Qiu Jian
dc69693c3d fix: is_managed filter is not accurate 2020-04-22 20:20:50 +08:00
Qiu Jian
70804c5cde fix: FindAnonymousStructPoint needs input as a pointer to struct 2020-04-22 20:20:50 +08:00
tangbin
5a2e7ef414 remove aws invalid backendgroup 2020-04-22 19:01:59 +08:00
Qu Xuan
e908f8114d fix: 自动创建项目 2020-04-22 18:56:36 +08:00
Qu Xuan
7dee2a1569 fix: 转换非标准存储类型到lrs 2020-04-22 18:54:05 +08:00
Yousong Zhou
b5183ca9ab lbagent: fend off unexpected resources just in case
As resource we do not know whether they are bad, but surely we know
they are not what we expect
2020-04-22 18:50:30 +08:00
Qu Xuan
12df8c099f fix: 非私有云同步region name 2020-04-22 17:59:40 +08:00
Zexi Li
af2abeec78 Merge pull request #5917 from rainzm/automated-cherry-pick-of-#5916-upstream-release-3.2
Automated cherry pick of #5916: fix(host): No tag when tag's value is empty
2020-04-22 17:41:12 +08:00
Zexi Li
7ad3c66a84 Merge pull request #5914 from rainzm/automated-cherry-pick-of-#5913-upstream-release-3.2
Automated cherry pick of #5913: fix(region): Fix problems for Auto Scaling
2020-04-22 17:38:22 +08:00
Rain
05c42c1081 fix(host): No tag when tag's value is empty 2020-04-22 16:48:53 +08:00
wanyaoqi
bffb8eec65 keystone store service cert 2020-04-22 16:37:02 +08:00
Rain
0bf450a384 fix(region): Fix problems for Auto Scaling
1. ScalingPolicyManager and ScalingActivityManager override ResourceScope.
2. Change 'tenant' as 'project_id' before requesting to forcast.
2020-04-22 16:32:01 +08:00
Zexi Li
20d36f97ef Merge pull request #5901 from ioito/automated-cherry-pick-of-#5900-upstream-release-3.2
Automated cherry pick of #5900: fix: 尽量避免因代理问题导致google request异常
2020-04-22 15:12:14 +08:00
Zexi Li
cf158ea2db Merge pull request #5905 from swordqiu/automated-cherry-pick-of-#5904-upstream-release-3.2
Automated cherry pick of #5904: fix: do not share porject resource by default
2020-04-22 15:10:06 +08:00
Zexi Li
f7a4164243 Merge pull request #5907 from swordqiu/automated-cherry-pick-of-#5906-upstream-release-3.2
Automated cherry pick of #5906: fix: blacklist keystone reset admin password
2020-04-22 15:06:53 +08:00
Qiu Jian
41eb37d64e fix: blacklist keystone reset admin password 2020-04-22 15:02:21 +08:00
Qiu Jian
9ee568b7b8 fix: do not share porject resource by default 2020-04-22 11:52:27 +08:00
Qu Xuan
b0b58648a6 fix: 尽量避免因代理问题导致google request异常 2020-04-22 10:48:26 +08:00
Zexi Li
04879cbc2f Merge pull request #5894 from swordqiu/automated-cherry-pick-of-#5890-upstream-release-3.2
Automated cherry pick of #5890: fix: policy details should carry updated_at and created_at fields
2020-04-22 10:39:32 +08:00
Zexi Li
058dd98a6c Merge pull request #5899 from swordqiu/automated-cherry-pick-of-#5895-upstream-release-3.2
Automated cherry pick of #5895: fix: delete idp also delete users/groups in target domain
2020-04-22 10:34:13 +08:00
Zexi Li
d3caf76dd1 Merge pull request #5885 from ioito/automated-cherry-pick-of-#5884-upstream-release-3.2
Automated cherry pick of #5884: fix: 仅当变更domainId时才需要更新projectId
2020-04-22 10:32:33 +08:00
Qiu Jian
895f161417 fix: delete idp also delete users/groups in target domain 2020-04-22 10:17:58 +08:00
Qiu Jian
f0ab47058f fix: policy details should carry updated_at and created_at fields 2020-04-21 22:44:07 +08:00
Qu Xuan
db8783a51b fix: 仅当变更domainId时才需要更新projectId 2020-04-21 21:14:12 +08:00
Zexi Li
fd67654377 Merge pull request #5876 from swordqiu/automated-cherry-pick-of-#5875-upstream-release-3.2
Automated cherry pick of #5875: fix: list item export recode
2020-04-21 13:03:57 +08:00
Qiu Jian
0edfe50985 fix: list item export recode 2020-04-21 11:46:47 +08:00
Zexi Li
ec78017902 Merge pull request #5874 from swordqiu/automated-cherry-pick-of-#5873-upstream-release-3.2
Automated cherry pick of #5873: fix: cloudaccount is created as system shared by default
2020-04-21 10:27:51 +08:00
Zexi Li
aa01f99ec2 Merge pull request #5878 from swordqiu/automated-cherry-pick-of-#5877-upstream-release-3.2
Automated cherry pick of #5877: fix: adjust scope of isolated_device and reservedips
2020-04-21 10:25:00 +08:00
Qiu Jian
0427445167 fix: adjust scope of isolated_device and reservedips 2020-04-21 00:37:27 +08:00
Qiu Jian
2f6798036f fix: cloudaccount is created as system shared by default 2020-04-20 22:48:50 +08:00
Zexi Li
59b209bec3 Merge pull request #5857 from ioito/automated-cherry-pick-of-#5856-upstream-release-3.2
Automated cherry pick of #5856: fix: show sql connection error
2020-04-20 20:55:32 +08:00
Zexi Li
972cbb15c7 Merge pull request #5855 from rainzm/automated-cherry-pick-of-#5854-upstream-release-3.2
Automated cherry pick of #5854: fix(region): Add CustomizeListFilter for snapshotpolicy
2020-04-20 20:54:41 +08:00
Zexi Li
fae2a304d5 Merge pull request #5871 from rainzm/automated-cherry-pick-of-#5870-upstream-release-3.2
Automated cherry pick of #5870: fix(region): Fix problems for Auto Scaling
2020-04-20 20:53:39 +08:00
Zexi Li
0c2dfa3027 Merge pull request #5864 from zhaoxiangchun/automated-cherry-pick-of-#5863-upstream-release-3.2
Automated cherry pick of #5863: 优化邮件格式
2020-04-20 20:53:07 +08:00
Zexi Li
5272cd132f Merge pull request #5869 from tb365/automated-cherry-pick-of-#5865-upstream-release-3.2
Automated cherry pick of #5865: lblis & lbbg & lbr & lbb create add fetch owner id
2020-04-20 20:51:28 +08:00
zhaoxiangchun
bcce808981 优化邮件格式
1.邮件主题中的报警级别和web页面进行对应
2.向onecloud发送邮件时,通过html/template进行格式化
2020-04-20 20:35:30 +08:00
Rain
bccb6d10eb fix(region): Fix problems for Auto Scaling
1. 支持 scaling group 根据 enable 过滤
2. 周期策略返回开始时间
3. scaling controller 在创建机器之前先调用 scheduler 的 forcast 接口
4. 修复健康状态检查的一个问题
2020-04-20 19:42:51 +08:00
tangbin
c59c4e314a lblis & lbbg & lbr & lbb create add fetch owner id 2020-04-20 19:31:42 +08:00
Rain
6506002703 fix(region): Add CustomizeListFilter for snapshotpolicy 2020-04-20 17:34:25 +08:00
Qu Xuan
58e2d71f15 fix: show sql connection error 2020-04-20 16:49:32 +08:00
963 changed files with 26862 additions and 26538 deletions

View File

@@ -291,9 +291,11 @@ gen-swagger: gen-swagger-check
$(ROOT_DIR)/scripts/codegen.py swagger-code
$(ROOT_DIR)/scripts/codegen.py swagger-yaml
swagger-serve: gen-model-api gen-swagger
swagger-serve-only:
$(ROOT_DIR)/scripts/codegen.py swagger-serve
swagger-serve: gen-model-api gen-swagger swagger-serve-only
swagger-site: gen-model-api gen-swagger
$(ROOT_DIR)/scripts/codegen.py swagger-site

View File

@@ -1,3 +1,3 @@
FROM registry.cn-beijing.aliyuncs.com/yunionio/ansibleserver-base:latest
FROM registry.cn-beijing.aliyuncs.com/yunionio/ansibleserver-base:1.0.0
ADD ./_output/bin/ansibleserver /opt/yunion/bin/ansibleserver
ADD ./_output/alpine-build/bin/ansibleserver /opt/yunion/bin/ansibleserver

View File

@@ -1,13 +1,11 @@
FROM frolvlad/alpine-glibc:glibc-2.28
FROM alpine:3.11.6
MAINTAINER "Zexi Li <lizexi@yunionyun.com>"
MAINTAINER "Yousong Zhou <zhouyousong@yunionyun.com>"
ENV TZ Asia/Shanghai
RUN mkdir -p /opt/yunion/bin
RUN apk update && \
apk add --no-cache tzdata ansible ca-certificates && \
rm -rf /var/cache/apk/*
RUN cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
# openssh-client, for ansible ssh connection
RUN set -x \
&& apk update \
&& apk add openssh-client \
&& apk add ansible \
&& apk add tzdata ca-certificates \
&& rm -rf /var/cache/apk/*

View File

@@ -1,3 +1,3 @@
FROM registry.cn-beijing.aliyuncs.com/yunionio/onecloud-base:latest
FROM registry.cn-beijing.aliyuncs.com/yunionio/onecloud-base:v0.1
ADD ./_output/bin/apigateway /opt/yunion/bin/apigateway

View File

@@ -1,3 +1,3 @@
FROM registry.cn-beijing.aliyuncs.com/yunionio/onecloud-base:latest
FROM registry.cn-beijing.aliyuncs.com/yunionio/onecloud-base:v0.1
ADD ./_output/bin/cloudevent /opt/yunion/bin/cloudevent

View File

@@ -1,3 +1,3 @@
FROM registry.cn-beijing.aliyuncs.com/yunionio/onecloud-base:latest
FROM registry.cn-beijing.aliyuncs.com/yunionio/onecloud-base:v0.1
ADD ./_output/bin/cloudnet /opt/yunion/bin/cloudnet

View File

@@ -1,3 +1,3 @@
FROM registry.cn-beijing.aliyuncs.com/yunionio/onecloud-base:latest
FROM registry.cn-beijing.aliyuncs.com/yunionio/onecloud-base:v0.1
ADD ./_output/bin/devtool /opt/yunion/bin/devtool

View File

@@ -1,4 +1,4 @@
FROM registry.cn-beijing.aliyuncs.com/yunionio/onecloud-base:latest
FROM registry.cn-beijing.aliyuncs.com/yunionio/onecloud-base:v0.1
COPY ./build/esxi-agent/root/opt/ /opt/
ADD ./_output/bin/esxi-agent /opt/yunion/bin/esxi-agent

View File

@@ -1,3 +1,3 @@
FROM registry.cn-beijing.aliyuncs.com/yunionio/onecloud-base:latest
FROM registry.cn-beijing.aliyuncs.com/yunionio/onecloud-base:v0.1
ADD ./_output/bin/keystone /opt/yunion/bin/keystone

View File

@@ -1,4 +1,4 @@
FROM registry.cn-beijing.aliyuncs.com/yunionio/onecloud-base:latest
FROM registry.cn-beijing.aliyuncs.com/yunionio/onecloud-base:v0.1
ADD ./_output/bin/logger /opt/yunion/bin/logger

View File

@@ -1,4 +1,4 @@
FROM registry.cn-beijing.aliyuncs.com/yunionio/onecloud-base:latest
FROM registry.cn-beijing.aliyuncs.com/yunionio/onecloud-base:v0.1
ADD ./_output/bin/monitor /opt/yunion/bin/monitor

View File

@@ -1,4 +1,4 @@
FROM registry.cn-beijing.aliyuncs.com/yunionio/onecloud-base:latest
FROM registry.cn-beijing.aliyuncs.com/yunionio/onecloud-base:v0.1
COPY ./build/notify/root/opt/ /opt/
ADD ./_output/bin/notify /opt/yunion/bin/notify

View File

@@ -7,7 +7,7 @@ ENV TZ Asia/Shanghai
RUN mkdir -p /opt/yunion/bin
RUN apk update && \
apk add --no-cache tzdata ca-certificates && \
apk add --no-cache tzdata curl busybox-extras tcpdump strace ca-certificates && \
rm -rf /var/cache/apk/*
RUN cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime

View File

@@ -1,4 +1,4 @@
FROM registry.cn-beijing.aliyuncs.com/yunionio/onecloud-base:latest
FROM registry.cn-beijing.aliyuncs.com/yunionio/onecloud-base:v0.1
COPY ./build/region/root/opt/ /opt/
ADD ./_output/bin/region /opt/yunion/bin/region

View File

@@ -1,3 +1,3 @@
FROM registry.cn-beijing.aliyuncs.com/yunionio/onecloud-base:latest
FROM registry.cn-beijing.aliyuncs.com/yunionio/onecloud-base:v0.1
ADD ./_output/bin/s3gateway /opt/yunion/bin/s3gateway

View File

@@ -1,3 +1,3 @@
FROM registry.cn-beijing.aliyuncs.com/yunionio/onecloud-base:latest
FROM registry.cn-beijing.aliyuncs.com/yunionio/onecloud-base:v0.1
ADD ./_output/bin/scheduler /opt/yunion/bin/scheduler

View File

@@ -1,4 +1,4 @@
FROM registry.cn-beijing.aliyuncs.com/yunionio/onecloud-base:latest
FROM registry.cn-beijing.aliyuncs.com/yunionio/onecloud-base:v0.1
ADD ./_output/bin/yunionconf /opt/yunion/bin/yunionconf

File diff suppressed because one or more lines are too long

View File

@@ -1 +0,0 @@
SMS_126915025

View File

@@ -26,6 +26,28 @@ import (
"yunion.io/x/onecloud/pkg/mcclient/options"
)
func parseGcpCredential(filename string) (jsonutils.JSONObject, error) {
data, err := ioutil.ReadFile(filename)
if err != nil {
return nil, err
}
authParams, err := jsonutils.Parse(data)
if err != nil {
return nil, err
}
ret := jsonutils.NewDict()
for _, k := range []string{
"client_email",
"project_id",
"private_key_id",
"private_key",
} {
v, _ := authParams.Get(k)
ret.Add(v, fmt.Sprintf("gcp_%s", k))
}
return ret, nil
}
func init() {
type CloudaccountListOptions struct {
@@ -33,6 +55,7 @@ func init() {
Capability []string `help:"capability filter" choices:"project|compute|network|loadbalancer|objectstore|rds|cache|event"`
DistinctField string `help:"distinct field"`
ProxySetting string `help:"Proxy setting id or name"`
}
R(&CloudaccountListOptions{}, "cloud-account-list", "List cloud accounts", func(s *mcclient.ClientSession, args *CloudaccountListOptions) error {
var params *jsonutils.JSONDict
@@ -45,6 +68,9 @@ func init() {
if len(args.Capability) > 0 {
params.Add(jsonutils.NewStringArray(args.Capability), "capability")
}
if len(args.ProxySetting) > 0 {
params.Add(jsonutils.NewString(args.ProxySetting), "proxy_setting")
}
}
if len(args.DistinctField) > 0 {
params.Add(jsonutils.NewString(args.DistinctField), "extra_field")
@@ -149,11 +175,7 @@ func init() {
R(&options.SGoogleCloudAccountCreateOptions{}, "cloud-account-create-google", "Create a Google cloud account", func(s *mcclient.ClientSession, args *options.SGoogleCloudAccountCreateOptions) error {
params := jsonutils.Marshal(args)
params.(*jsonutils.JSONDict).Add(jsonutils.NewString("Google"), "provider")
data, err := ioutil.ReadFile(args.GoogleJsonFile)
if err != nil {
return err
}
authParams, err := jsonutils.Parse(data)
authParams, err := parseGcpCredential(args.GoogleJsonFile)
if err != nil {
return err
}
@@ -699,11 +721,7 @@ func init() {
})
R(&options.SGoogleCloudAccountUpdateCredentialOptions{}, "cloud-account-update-credential-google", "Update credential of a Google cloud account", func(s *mcclient.ClientSession, args *options.SGoogleCloudAccountUpdateCredentialOptions) error {
data, err := ioutil.ReadFile(args.GoogleJsonFile)
if err != nil {
return err
}
params, err := jsonutils.Parse(data)
params, err := parseGcpCredential(args.GoogleJsonFile)
if err != nil {
return err
}
@@ -826,11 +844,7 @@ func init() {
})
R(&options.SGoogleCloudAccountUpdateCredentialOptions{}, "cloud-account-test-connectivity-google", "Update credential of a Google cloud account", func(s *mcclient.ClientSession, args *options.SGoogleCloudAccountUpdateCredentialOptions) error {
data, err := ioutil.ReadFile(args.GoogleJsonFile)
if err != nil {
return err
}
params, err := jsonutils.Parse(data)
params, err := parseGcpCredential(args.GoogleJsonFile)
if err != nil {
return err
}
@@ -1027,4 +1041,12 @@ func init() {
return nil
})
R(&CloudaccountShowOptions{}, "cloud-account-change-owner-candidate-domains", "Show candiate domains of a cloud account changing project", func(s *mcclient.ClientSession, args *CloudaccountShowOptions) error {
result, err := modules.Cloudaccounts.GetSpecific(s, args.ID, "change-owner-candidate-domains", nil)
if err != nil {
return err
}
printObject(result)
return nil
})
}

View File

@@ -34,6 +34,7 @@ func init() {
HasObjectStorage bool `help:"filter cloudproviders that has object storage"`
NoObjectStorage bool `help:"filter cloudproviders that has no object storage"`
Capability []string `help:"capability filter" choices:"project|compute|network|loadbalancer|objectstore|rds|cache|event"`
Cloudregion string `help:"filter cloudproviders by cloudregion"`
}
R(&CloudproviderListOptions{}, "cloud-provider-list", "List cloud providers", func(s *mcclient.ClientSession, args *CloudproviderListOptions) error {
var params *jsonutils.JSONDict
@@ -57,6 +58,10 @@ func init() {
if len(args.Capability) > 0 {
params.Add(jsonutils.NewStringArray(args.Capability), "capability")
}
if len(args.Cloudregion) > 0 {
params.Add(jsonutils.NewString(args.Cloudregion), "cloudregion")
}
}
result, err := modules.Cloudproviders.List(s, params)
if err != nil {
@@ -245,4 +250,13 @@ func init() {
printObject(result)
return nil
})
R(&CloudproviderShowOptions{}, "cloud-provider-change-owner-candidate-domains", "Show candiate domains of a cloud provider changing owner", func(s *mcclient.ClientSession, args *CloudproviderShowOptions) error {
result, err := modules.Cloudproviders.GetSpecific(s, args.ID, "change-owner-candidate-domains", nil)
if err != nil {
return err
}
printObject(result)
return nil
})
}

View File

@@ -15,7 +15,14 @@
package shell
import (
"bufio"
"bytes"
"encoding/base64"
"fmt"
"io/ioutil"
"mime/multipart"
"net/http"
"path/filepath"
"yunion.io/x/jsonutils"
@@ -56,4 +63,78 @@ func init() {
printObject(r)
return nil
})
type EnterpriseUpdateOptions struct {
Name string `help:"Enterprise name"`
Copyright string `help:"The Email"`
Logo string `help:"logo file path"`
LoginLogo string `help:"login page logo file path"`
Favicon string `help:"favicon path"`
}
R(&EnterpriseUpdateOptions{}, "infos-update", "update enterprise info", func(s *mcclient.ClientSession, args *EnterpriseUpdateOptions) error {
var b bytes.Buffer
w := multipart.NewWriter(&b)
if len(args.Name) > 0 {
w.WriteField("name", args.Name)
}
if len(args.Copyright) > 0 {
w.WriteField("copyright", args.Copyright)
}
writeFile := func(filedName, filePath string) error {
if len(filePath) == 0 {
return nil
}
c, err := ioutil.ReadFile(filePath)
if err != nil {
return err
}
var v string
c64 := base64.StdEncoding.EncodeToString(c)
ext := filepath.Ext(filePath)
switch ext {
case ".png":
v = fmt.Sprintf("data:image/png;base64,%s", c64)
case ".jpg":
v = fmt.Sprintf("data:image/jpg;base64,%s", c64)
default:
return fmt.Errorf("only support png/jpg image")
}
err = w.WriteField(filedName, v)
if err != nil {
return err
}
return nil
}
if err := writeFile("logo", args.Logo); err != nil {
return err
}
if err := writeFile("login_logo", args.LoginLogo); err != nil {
return err
}
if err := writeFile("favicon", args.Favicon); err != nil {
return err
}
header := make(http.Header)
header.Set("content-type", fmt.Sprintf("multipart/form-data; boundary=%s", w.Boundary()))
w.Close()
ret, err := modules.Info.Update(s, header, bufio.NewReader(&b))
if err != nil {
return err
}
printObject(ret)
return nil
})
}

View File

@@ -38,7 +38,11 @@ func init() {
if err != nil {
return err
}
printList(result, modules.DBInstanceBackups.GetColumns(s))
if len(opts.ExportFile) > 0 {
exportList(result, opts.ExportFile, opts.ExportKeys, opts.ExportTexts, modules.DBInstanceBackups.GetColumns(s))
} else {
printList(result, modules.DBInstanceBackups.GetColumns(s))
}
return nil
})

View File

@@ -41,7 +41,12 @@ func init() {
if err != nil {
return err
}
printList(result, modules.DBInstance.GetColumns(s))
if len(opts.ExportFile) > 0 {
exportList(result, opts.ExportFile, opts.ExportKeys, opts.ExportTexts, modules.DBInstance.GetColumns(s))
} else {
printList(result, modules.DBInstance.GetColumns(s))
}
return nil
})

View File

@@ -291,4 +291,14 @@ func init() {
printObject(srv)
return nil
})
R(&DiskDetailOptions{}, "disk-change-owner-candidate-domains", "Get change owner candidate domain list", func(s *mcclient.ClientSession, args *DiskDetailOptions) error {
result, err := modules.Disks.GetSpecific(s, args.ID, "change-owner-candidate-domains", nil)
if err != nil {
return err
}
printObject(result)
return nil
})
}

View File

@@ -64,14 +64,15 @@ func init() {
})
type EndpointCreateOptions struct {
SERVICE string `help:"Service ID or Name"`
REGION string `help:"Region"`
INTERFACE string `help:"Interface types" choices:"internal|public|admin|console"`
URL string `help:"URL"`
Zone string `help:"Zone"`
Name string `help:"Name"`
Enabled bool `help:"Enabled"`
Disabled bool `help:"Disabled"`
SERVICE string `help:"Service ID or Name"`
REGION string `help:"Region"`
INTERFACE string `help:"Interface types" choices:"internal|public|admin|console"`
URL string `help:"URL"`
Zone string `help:"Zone"`
Name string `help:"Name"`
Enabled bool `help:"Enabled"`
Disabled bool `help:"Disabled"`
ServiceCertificate string `help:"Service certificate id or name"`
}
R(&EndpointCreateOptions{}, "endpoint-create", "Create endpoint", func(s *mcclient.ClientSession, args *EndpointCreateOptions) error {
params := jsonutils.NewDict()
@@ -95,6 +96,9 @@ func init() {
} else if !args.Enabled && args.Disabled {
params.Add(jsonutils.JSONFalse, "enabled")
}
if len(args.ServiceCertificate) > 0 {
params.Add(jsonutils.NewString(args.ServiceCertificate), "service_certificate")
}
ep, err := modules.EndpointsV3.Create(s, params)
if err != nil {
return err
@@ -104,11 +108,12 @@ func init() {
})
type EndpointUpdateOptions struct {
ID string `help:"ID or name of endpoint"`
Url string `help:"URL"`
Name string `help:"Name"`
Enabled bool `help:"Enabled"`
Disabled bool `help:"Disabled"`
ID string `help:"ID or name of endpoint"`
Url string `help:"URL"`
Name string `help:"Name"`
Enabled bool `help:"Enabled"`
Disabled bool `help:"Disabled"`
ServiceCertificate string `help:"Service certificate id or name"`
}
R(&EndpointUpdateOptions{}, "endpoint-update", "Update a endpoint", func(s *mcclient.ClientSession, args *EndpointUpdateOptions) error {
params := jsonutils.NewDict()
@@ -123,6 +128,9 @@ func init() {
} else if !args.Enabled && args.Disabled {
params.Add(jsonutils.JSONFalse, "enabled")
}
if len(args.ServiceCertificate) > 0 {
params.Add(jsonutils.NewString(args.ServiceCertificate), "service_certificate")
}
ep, err := modules.EndpointsV3.Patch(s, args.ID, params)
if err != nil {
return err

View File

@@ -34,8 +34,8 @@ type BaseEventListOptions struct {
OrderBy string `help:"order by specific field"`
Action []string `help:"Log action"`
User []string `help:"filter by operator user"`
Project []string `help:"filter by owner project"`
User string `help:"filter by operator user"`
Project string `help:"filter by owner project"`
PagingMarker string `help:"marker for pagination"`
}
@@ -99,10 +99,10 @@ func doEventList(man modulebase.ResourceManager, s *mcclient.ClientSession, args
params.Add(jsonutils.NewStringArray(args.Action), "action")
}
if len(args.User) > 0 {
params.Add(jsonutils.NewStringArray(args.User), "user")
params.Add(jsonutils.NewString(args.User), "user")
}
if len(args.Project) > 0 {
params.Add(jsonutils.NewStringArray(args.Project), "project")
params.Add(jsonutils.NewString(args.Project), "project")
}
if len(args.Scope) > 0 {
params.Add(jsonutils.NewString(args.Scope), "scope")

View File

@@ -15,6 +15,10 @@
package shell
import (
"fmt"
"yunion.io/x/jsonutils"
"yunion.io/x/onecloud/pkg/mcclient"
"yunion.io/x/onecloud/pkg/mcclient/modules"
"yunion.io/x/onecloud/pkg/mcclient/options"
@@ -48,4 +52,58 @@ func init() {
printObject(result)
return nil
})
type GlobalVpcPublicOptions struct {
ID string `help:"ID or name of global vpc" json:"-"`
Scope string `help:"sharing scope" choices:"system|domain"`
SharedDomains []string `help:"share to domains"`
}
R(&GlobalVpcPublicOptions{}, "global-vpc-public", "Make global vpc public", func(s *mcclient.ClientSession, args *GlobalVpcPublicOptions) error {
params := jsonutils.Marshal(args)
result, err := modules.GlobalVpcs.PerformAction(s, args.ID, "public", params)
if err != nil {
return err
}
printObject(result)
return nil
})
type GlobalVpcPrivateOptions struct {
ID string `help:"ID or name of global vpc" json:"-"`
}
R(&GlobalVpcPrivateOptions{}, "global-vpc-private", "Make global vpc private", func(s *mcclient.ClientSession, args *GlobalVpcPrivateOptions) error {
params := jsonutils.Marshal(args)
result, err := modules.GlobalVpcs.PerformAction(s, args.ID, "private", params)
if err != nil {
return err
}
printObject(result)
return nil
})
R(&GlobalVpcShowOptions{}, "global-vpc-change-owner-candidate-domains", "Show candiate domains of a global vpc for changing owner", func(s *mcclient.ClientSession, args *GlobalVpcShowOptions) error {
result, err := modules.GlobalVpcs.GetSpecific(s, args.ID, "change-owner-candidate-domains", nil)
if err != nil {
return err
}
printObject(result)
return nil
})
type GlobalVpcChangeOwnerOptions struct {
ID string `help:"ID or name of vpc" json:"-"`
ProjectDomain string `json:"project_domain" help:"target domain"`
}
R(&GlobalVpcChangeOwnerOptions{}, "global-vpc-change-owner", "Change owner domain of a global vpc", func(s *mcclient.ClientSession, args *GlobalVpcChangeOwnerOptions) error {
if len(args.ProjectDomain) == 0 {
return fmt.Errorf("empty project_domain")
}
params := jsonutils.Marshal(args)
ret, err := modules.GlobalVpcs.PerformAction(s, args.ID, "change-owner", params)
if err != nil {
return err
}
printObject(ret)
return nil
})
}

View File

@@ -224,4 +224,29 @@ func init() {
printObject(sp)
return nil
})
type GroupAddUsersOptions struct {
GROUP string `help:"group Id or Name" json:"-"`
USER []string `help:"list of user id or name" json:"user"`
}
R(&GroupAddUsersOptions{}, "group-add-users", "Add users into group",
func(s *mcclient.ClientSession, args *GroupAddUsersOptions) error {
params := jsonutils.Marshal(args)
result, err := modules.Groups.PerformAction(s, args.GROUP, "add-users", params)
if err != nil {
return err
}
printObject(result)
return nil
})
R(&GroupAddUsersOptions{}, "group-remove-users", "Add users into group",
func(s *mcclient.ClientSession, args *GroupAddUsersOptions) error {
params := jsonutils.Marshal(args)
result, err := modules.Groups.PerformAction(s, args.GROUP, "remove-users", params)
if err != nil {
return err
}
printObject(result)
return nil
})
}

View File

@@ -793,4 +793,26 @@ func init() {
printObject(result)
return nil
})
type HostAutoMigrateOnHostDownOptions struct {
ID string `help:"ID or name of host"`
Enable bool `help:"enable auto migrate"`
Disable bool `help:"disable auto migrate"`
}
R(&HostAutoMigrateOnHostDownOptions{}, "host-auto-migrate-on-host-down", "Get change owner candidate domain list", func(s *mcclient.ClientSession, args *HostAutoMigrateOnHostDownOptions) error {
params := jsonutils.NewDict()
if args.Disable {
params.Set("auto_migrate_on_host_down", jsonutils.NewString("disable"))
} else if args.Enable {
params.Set("auto_migrate_on_host_down", jsonutils.NewString("enable"))
} else {
return fmt.Errorf("missing input enable or disable")
}
result, err := modules.Hosts.PerformAction(s, args.ID, "auto-migrate-on-host-down", params)
if err != nil {
return err
}
printObject(result)
return nil
})
}

View File

@@ -299,7 +299,9 @@ func init() {
IDP string `help:"identity provider name or ID"`
}
R(&IdentityProviderConfigEditOptions{}, "idp-config-edit", "Edit config yaml of an identity provider", func(s *mcclient.ClientSession, args *IdentityProviderConfigEditOptions) error {
conf, err := modules.IdentityProviders.GetSpecific(s, args.IDP, "config", nil)
params := jsonutils.NewDict()
params.Add(jsonutils.JSONTrue, "sensitive")
conf, err := modules.IdentityProviders.GetSpecific(s, args.IDP, "config", params)
if err != nil {
return err
}

View File

@@ -34,6 +34,7 @@ type ImageOptionalOptions struct {
Unprotected bool `help:"Allow image to be deleted"`
Standard bool `help:"Mark image as a standard image"`
Nonstandard bool `help:"Mark image as a non-standard image"`
Public bool `help:"make image public"`
MinDisk int64 `help:"Disk size after expanded, in MB" metavar:"MIN_DISK_SIZE_MB"`
MinRam int64 `help:"Minimal memory size required" metavar:"MIN_RAM_MB"`
VirtualSize int64 `help:"Disk size after expanded, in MB"`
@@ -53,11 +54,11 @@ type ImageOptionalOptions struct {
Hypervisor []string `help:"Prefer hypervisor type" choices:"kvm|esxi|baremetal|container|openstack|ctyun"`
DiskDriver string `help:"Perfer disk driver" choices:"virtio|scsi|pvscsi|ide|sata"`
NetDriver string `help:"Preferred network driver" choices:"virtio|e1000|vmxnet3"`
DisableUsbKbd bool `help:"Disable usb keyboard on this image(for hypervisor kvm)"`
}
func addImageOptionalOptions(s *mcclient.ClientSession, params *jsonutils.JSONDict, args ImageOptionalOptions) error {
if len(args.Format) > 0 {
params.Add(jsonutils.NewString("bare"), "container-format")
params.Add(jsonutils.NewString(args.Format), "disk-format")
}
if args.Protected && !args.Unprotected {
@@ -70,6 +71,9 @@ func addImageOptionalOptions(s *mcclient.ClientSession, params *jsonutils.JSONDi
} else if !args.Standard && args.Nonstandard {
params.Add(jsonutils.JSONFalse, "is_standard")
}
if args.Public {
params.Add(jsonutils.JSONTrue, "is_public")
}
if args.MinDisk > 0 {
params.Add(jsonutils.NewString(fmt.Sprintf("%d", args.MinDisk)), "min_disk")
}
@@ -128,6 +132,9 @@ func addImageOptionalOptions(s *mcclient.ClientSession, params *jsonutils.JSONDi
if len(args.Hypervisor) > 0 {
params.Add(jsonutils.NewString(strings.Join(args.Hypervisor, ",")), "properties", "hypervisor")
}
if args.DisableUsbKbd {
params.Add(jsonutils.NewString("true"), "properties", "disable_usb_kbd")
}
return nil
}
@@ -140,6 +147,7 @@ func init() {
Protected string `help:"filter images by protected" choices:"true|false"`
IsUefi bool `help:"list uefi image"`
Format []string `help:"Disk formats"`
SubFormats []string `help:"Sub formats"`
Name string `help:"Name filter"`
}
R(&ImageListOptions{}, "image-list", "List images", func(s *mcclient.ClientSession, args *ImageListOptions) error {
@@ -170,15 +178,14 @@ func init() {
params.Add(jsonutils.NewString(args.Name), "name")
}
if len(args.Format) > 0 {
if len(args.Format) == 1 {
params.Add(jsonutils.NewString(args.Format[0]), "disk_format")
} else {
fs := jsonutils.NewArray()
for _, f := range args.Format {
fs.Add(jsonutils.NewString(f))
}
params.Add(fs, "disk_formats")
fs := jsonutils.NewArray()
for _, f := range args.Format {
fs.Add(jsonutils.NewString(f))
}
params.Add(fs, "disk_formats")
}
if len(args.SubFormats) > 0 {
params.Add(jsonutils.Marshal(args.SubFormats), "sub_formats")
}
result, err := modules.Images.List(s, params)
if err != nil {
@@ -244,28 +251,12 @@ func init() {
return nil
})
type ImageMembershipOptions struct {
IMAGE string `help:"ID or name of image to share"`
PROJECT string `help:"ID or name of project to share image with"`
}
type ImageMembershipAddOptions struct {
ImageMembershipOptions
CanShare bool `help:"Indicating whether the project can share the image with others"`
}
R(&ImageMembershipAddOptions{}, "image-add-project", "Add a project to private image's membership list", func(s *mcclient.ClientSession, args *ImageMembershipAddOptions) error {
return modules.Images.AddMembership(s, args.IMAGE, args.PROJECT, args.CanShare)
})
R(&ImageMembershipOptions{}, "image-remove-project", "Remove a project from private image's membership list", func(s *mcclient.ClientSession, args *ImageMembershipOptions) error {
return modules.Images.RemoveMembership(s, args.IMAGE, args.PROJECT)
})
type ImageDetailOptions struct {
ID string `help:"Image ID or name"`
}
type ImageDeleteOptions struct {
ID []string `help:"Image ID or name"`
ID []string `help:"Image ID or name" json:"-"`
OverridePendingDelete *bool `help:"Delete image directly instead of pending delete" short-token:"f"`
}
R(&ImageDeleteOptions{}, "image-delete", "Delete a image", func(s *mcclient.ClientSession, args *ImageDeleteOptions) error {
@@ -278,19 +269,6 @@ func init() {
return nil
})
R(&ImageDetailOptions{}, "image-list-project", "List image members", func(s *mcclient.ClientSession, args *ImageDetailOptions) error {
imgId, e := modules.Images.GetId(s, args.ID, nil)
if e != nil {
return e
}
result, e := modules.Images.ListMemberProjects(s, imgId)
if e != nil {
return e
}
printList(result, modules.Projects.GetColumns(s))
return nil
})
type ImageCancelDeleteOptions struct {
ID string `help:"Image id or name" metavar:"IMAGE"`
}

View File

@@ -99,4 +99,13 @@ func init() {
return nil
})
R(&options.LoadbalancerGetOptions{}, "lb-change-owner-candidate-domains", "Get change owner candidate domain list", func(s *mcclient.ClientSession, args *options.LoadbalancerGetOptions) error {
result, err := modules.Loadbalancers.GetSpecific(s, args.ID, "change-owner-candidate-domains", nil)
if err != nil {
return err
}
printObject(result)
return nil
})
}

View File

@@ -38,6 +38,7 @@ func init() {
City string `help:"search networks belongs to a city"`
Usable *bool `help:"search usable networks"`
ServerType string `help:"search networks belongs to a ServerType" choices:"guest|baremetal|container|pxe|ipmi"`
Schedtag string `help:"filter networks by schedtag"`
Status string `help:"filter by network status"`
}
@@ -55,7 +56,11 @@ func init() {
if err != nil {
return err
}
printList(result, modules.Networks.GetColumns(s))
if len(opts.ExportFile) > 0 {
exportList(result, opts.ExportFile, opts.ExportKeys, opts.ExportTexts, modules.Networks.GetColumns(s))
} else {
printList(result, modules.Networks.GetColumns(s))
}
return nil
})
@@ -405,4 +410,21 @@ func init() {
printObject(result)
return nil
})
type NetworkChangeOwnerOptions struct {
ID string `help:"Network to change owner" json:"-"`
PROJECT string `help:"Project ID or change" json:"tenant"`
}
R(&NetworkChangeOwnerOptions{}, "network-change-owner", "Change owner project of a network", func(s *mcclient.ClientSession, args *NetworkChangeOwnerOptions) error {
params, err := options.StructToParams(args)
if err != nil {
return err
}
net, err := modules.Networks.PerformAction(s, args.ID, "change-owner", params)
if err != nil {
return err
}
printObject(net)
return nil
})
}

View File

@@ -15,6 +15,7 @@
package shell
import (
"context"
"fmt"
"io/ioutil"
"strings"
@@ -287,12 +288,30 @@ func init() {
if err != nil {
log.Fatalf("Set log level %q: %v", "debug", err)
}
if args.Debug {
rbacutils.ShowMatchRuleDebug = true
}
auth.InitFromClientSession(s)
policy.EnableGlobalRbac(15*time.Second, 15*time.Second, false)
if args.Debug {
consts.EnableRbacDebug()
}
findPolicy := false
for !findPolicy {
all := policy.PolicyManager.AllPolicies()
for _, allP := range all {
if len(allP) > 0 {
findPolicy = true
break
}
}
if findPolicy {
break
}
time.Sleep(time.Second)
}
req := jsonutils.NewDict()
for i := 0; i < len(args.Request); i += 1 {
parts := strings.Split(args.Request[i], ":")
@@ -358,17 +377,22 @@ func init() {
Context: mcclient.SAuthContext{
Ip: args.Ip,
},
Token: "faketoken",
}
} else {
token = s.GetToken()
}
result, err := policy.PolicyManager.ExplainRpc(token, req, args.Name)
result, err := policy.ExplainRpc(context.Background(), token, req, args.Name)
if err != nil {
return err
}
printObject(result)
for _, r := range args.Role {
fmt.Println("role", r, "matched policies:", policy.PolicyManager.RoleMatchPolicies(r))
}
fmt.Println("userCred:", token)
for _, scope := range []rbacutils.TRbacScope{
rbacutils.ScopeSystem,
@@ -377,7 +401,7 @@ func init() {
rbacutils.ScopeUser,
rbacutils.ScopeNone,
} {
m := policy.PolicyManager.MatchedPolicies(scope, token)
m := policy.PolicyManager.MatchedPolicyNames(scope, token)
fmt.Println("matched", scope, "policies:", m)
}

View File

@@ -41,6 +41,20 @@ func init() {
printList(result, modules.ScalingGroup.GetColumns(s))
return nil
})
type ScalingGroupShowOptions struct {
ID string
}
R(&ScalingGroupShowOptions{}, "scaling-group-show", "Show scaling group", func(s *mcclient.ClientSession,
args *ScalingGroupShowOptions) error {
result, err := modules.ScalingGroup.Get(s, args.ID, nil)
if err != nil {
return err
}
printObject(result)
return nil
})
type ScalingGroupCreateOptions struct {
NAME string

View File

@@ -25,33 +25,20 @@ import (
func init() {
type SecGroupRulesListOptions struct {
options.BaseListOptions
Secgroup string `help:"Secgroup ID or Name"`
Direction string `help:"filter Direction of rule" choices:"in|out"`
Protocol string `help:"filter Protocol of rule" choices:"any|tcp|udp|icmp"`
Action string `help:"filter Actin of rule" choices:"allow|deny"`
Secgroup string `help:"Secgroup ID or Name"`
SecgroupName string `help:"Search rules by fuzzy secgroup name"`
Projects []string `help:"Filter rules by project"`
Direction string `help:"filter Direction of rule" choices:"in|out"`
Protocol string `help:"filter Protocol of rule" choices:"any|tcp|udp|icmp"`
Action string `help:"filter Actin of rule" choices:"allow|deny"`
Ports string `help:"filter Ports of rule"`
Ip string `help:"filter cidr of rule"`
}
R(&SecGroupRulesListOptions{}, "secgroup-rule-list", "List all security group", func(s *mcclient.ClientSession, args *SecGroupRulesListOptions) error {
var params *jsonutils.JSONDict
{
var err error
params, err = args.BaseListOptions.Params()
if err != nil {
return err
}
}
if len(args.Secgroup) > 0 {
params.Add(jsonutils.NewString(args.Secgroup), "secgroup")
}
if len(args.Direction) > 0 {
params.Add(jsonutils.NewString(args.Direction), "direction")
}
if len(args.Protocol) > 0 {
params.Add(jsonutils.NewString(args.Protocol), "protocol")
}
if len(args.Action) > 0 {
params.Add(jsonutils.NewString(args.Action), "action")
params, err := options.ListStructToParams(args)
if err != nil {
return err
}
result, err := modules.SecGroupRules.List(s, params)
if err != nil {

View File

@@ -29,23 +29,15 @@ func init() {
Equals string `help:"Secgroup ID or Name, filter secgroups whose rules equals the specified one"`
Server string `help:"Filter secgroups bound to specified server"`
options.BaseListOptions
Ip string `help:"Filter secgroup by ip"`
Ports string `help:"Filter secgroup by ports"`
Direction string `help:"Filter secgroup by ports" choices:"all|in|out"`
}
R(&SecGroupsListOptions{}, "secgroup-list", "List all security group", func(s *mcclient.ClientSession, args *SecGroupsListOptions) error {
var params *jsonutils.JSONDict
{
var err error
params, err = args.BaseListOptions.Params()
if err != nil {
return err
}
}
if len(args.Equals) > 0 {
params.Add(jsonutils.NewString(args.Equals), "equals")
}
if len(args.Server) > 0 {
params.Add(jsonutils.NewString(args.Server), "server")
params, err := options.ListStructToParams(args)
if err != nil {
return err
}
result, err := modules.SecGroups.List(s, params)
if err != nil {

View File

@@ -988,6 +988,7 @@ func init() {
config.Hosts[i].HostIp = yamlConfig.Hosts[i].HostIp
config.Hosts[i].XmlFilePath = yamlConfig.Hosts[i].XmlFilePath
config.Hosts[i].Servers = make([]compute.SLibvirtServerConfig, len(yamlConfig.Hosts[i].Servers))
config.Hosts[i].MonitorPath = yamlConfig.Hosts[i].MonitorPath
for j := 0; j < len(yamlConfig.Hosts[i].Servers); j++ {
config.Hosts[i].Servers[j].MacIp = make(map[string]string)
mac := yamlConfig.Hosts[i].Servers[j].Mac
@@ -1010,11 +1011,11 @@ func init() {
if err != nil {
return err
}
for i := 0; i < len(params); i++ {
val := jsonutils.NewDict()
val.Set(modules.Servers.KeywordPlural, params[i])
params[i] = val
}
//for i := 0; i < len(params); i++ {
// val := jsonutils.NewDict()
// val.Set(modules.Servers.KeywordPlural, params[i])
// params[i] = val
//}
results := modules.Servers.BatchPerformClassAction(s, "import-from-libvirt", params)
printBatchResults(results, modules.Servers.GetColumns(s))
@@ -1145,6 +1146,7 @@ func init() {
ID string `help:"ID or name of VM"`
DisableIsaSerial string `help:"disable isa serial device" choices:"true|false"`
DisablePvpanic string `help:"disable pvpanic device" choices:"true|false"`
DisableUsbKbd string `help:"disable usb kbd" choices:"true|false"`
}
R(&ServerQemuParams{}, "server-set-qemu-params", "config qemu params", func(s *mcclient.ClientSession,
@@ -1156,6 +1158,9 @@ func init() {
if len(opts.DisablePvpanic) > 0 {
params.Set("disable_pvpanic", jsonutils.NewString(opts.DisablePvpanic))
}
if len(opts.DisableUsbKbd) > 0 {
params.Set("disable_usb_kbd", jsonutils.NewString(opts.DisableUsbKbd))
}
result, err := modules.Servers.PerformAction(s, opts.ID, "set-qemu-params", params)
if err != nil {
return err
@@ -1349,4 +1354,14 @@ func init() {
printObject(result)
return nil
})
R(&options.ServerShowOptions{}, "server-change-owner-candidate-domains", "Get change owner candidate domain list", func(s *mcclient.ClientSession, args *options.ServerShowOptions) error {
result, err := modules.Servers.GetSpecific(s, args.ID, "change-owner-candidate-domains", nil)
if err != nil {
return err
}
printObject(result)
return nil
})
}

View File

@@ -0,0 +1,72 @@
// Copyright 2019 Yunion
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package shell
import (
"yunion.io/x/jsonutils"
"yunion.io/x/onecloud/pkg/mcclient"
"yunion.io/x/onecloud/pkg/mcclient/modulebase"
"yunion.io/x/onecloud/pkg/mcclient/modules"
"yunion.io/x/onecloud/pkg/mcclient/options"
)
func init() {
type ServerSecgroupListOptions struct {
options.BaseListOptions
Server string `help:"ID or Name of Server"`
Secgroup string `help:"Secgroup ID or name"`
}
R(&ServerSecgroupListOptions{}, "server-secgroup-list", "List server secgroup pairs", func(s *mcclient.ClientSession, args *ServerSecgroupListOptions) error {
var params *jsonutils.JSONDict
{
var err error
params, err = args.BaseListOptions.Params()
if err != nil {
return err
}
}
var result *modulebase.ListResult
var err error
if len(args.Server) > 0 {
result, err = modules.Serversecgroups.ListDescendent(s, args.Server, params)
} else if len(args.Secgroup) > 0 {
result, err = modules.Serversecgroups.ListDescendent2(s, args.Secgroup, params)
} else {
result, err = modules.Serversecgroups.List(s, params)
}
if err != nil {
return err
}
printList(result, modules.Serversecgroups.GetColumns(s))
return nil
})
type ServerSecgroupDetailOptions struct {
SERVER string `help:"ID or Name of Server"`
SECGROUP string `help:"ID or Name of Security Group"`
}
R(&ServerSecgroupDetailOptions{}, "server-secgroup-show", "Show server security group details", func(s *mcclient.ClientSession, args *ServerSecgroupDetailOptions) error {
query := jsonutils.NewDict()
result, err := modules.Serversecgroups.Get(s, args.SERVER, args.SECGROUP, query)
if err != nil {
return err
}
printObject(result)
return nil
})
}

View File

@@ -0,0 +1,60 @@
package shell
import (
"yunion.io/x/onecloud/pkg/mcclient"
"yunion.io/x/onecloud/pkg/mcclient/modules"
"yunion.io/x/onecloud/pkg/mcclient/options"
)
func init() {
R(&options.ServiceCertificateCreateOptions{}, "service-cert-create", "Create service cert", func(s *mcclient.ClientSession, opts *options.ServiceCertificateCreateOptions) error {
params, err := opts.Params()
if err != nil {
return err
}
cert, err := modules.ServiceCertificatesV3.Create(s, params)
if err != nil {
return err
}
printObject(cert)
return nil
})
type ServiceCertificateGetOptions struct {
ID string `json:"-"`
}
R(&ServiceCertificateGetOptions{}, "service-cert-show", "Show service cert", func(s *mcclient.ClientSession, opts *ServiceCertificateGetOptions) error {
cert, err := modules.ServiceCertificatesV3.Get(s, opts.ID, nil)
if err != nil {
return err
}
printObject(cert)
return nil
})
type ServiceCertificateListOptions struct {
options.BaseListOptions
}
R(&ServiceCertificateListOptions{}, "service-cert-list", "List service certs", func(s *mcclient.ClientSession, opts *ServiceCertificateListOptions) error {
params, err := options.ListStructToParams(opts)
if err != nil {
return err
}
result, err := modules.ServiceCertificatesV3.List(s, params)
if err != nil {
return err
}
printList(result, modules.ServiceCertificatesV3.GetColumns(s))
return nil
})
type ServiceCertificateDeleteOptions struct {
ID string `json:"-"`
}
R(&ServiceCertificateDeleteOptions{}, "service-cert-delete", "Delete service cert", func(s *mcclient.ClientSession, opts *ServiceCertificateDeleteOptions) error {
cert, err := modules.ServiceCertificatesV3.Delete(s, opts.ID, nil)
if err != nil {
return err
}
printObject(cert)
return nil
})
}

View File

@@ -25,13 +25,15 @@ import (
func init() {
type ServerSkusListOptions struct {
options.BaseListOptions
Cloudregion string `help:"region Id or name"`
Usable bool `help:"Filter usable sku"`
Zone string `help:"zone Id or name"`
City *string `help:"city name,eg. BeiJing"`
Cpu *int `help:"Cpu core count" json:"cpu_core_count"`
Mem *int `help:"Memory size in MB" json:"memory_size_mb"`
Name string `help:"Name of Sku"`
Cloudregion string `help:"region Id or name"`
Usable bool `help:"Filter usable sku"`
Zone string `help:"zone Id or name"`
City *string `help:"city name,eg. BeiJing"`
Cpu *int `help:"Cpu core count" json:"cpu_core_count"`
Mem *int `help:"Memory size in MB" json:"memory_size_mb"`
Name string `help:"Name of Sku"`
PostpaidStatus string `help:"Postpaid status" choices:"soldout|available"`
PrepaidStatus string `help:"Prepaid status" choices:"soldout|available"`
}
R(&ServerSkusListOptions{}, "server-sku-list", "List all avaiable Server SKU", func(s *mcclient.ClientSession, args *ServerSkusListOptions) error {

View File

@@ -29,11 +29,12 @@ func init() {
type StorageListOptions struct {
options.BaseListOptions
Share *bool `help:"Share storage list"`
Local *bool `help:"Local storage list"`
Usable *bool `help:"Usable storage list"`
Zone string `help:"List storages in zone" json:"-"`
Region string `help:"List storages in region"`
Share *bool `help:"Share storage list"`
Local *bool `help:"Local storage list"`
Usable *bool `help:"Usable storage list"`
Zone string `help:"List storages in zone" json:"-"`
Region string `help:"List storages in region"`
Schedtag string `help:"filter storage by schedtag"`
}
R(&StorageListOptions{}, "storage-list", "List storages", func(s *mcclient.ClientSession, opts *StorageListOptions) error {
params, err := options.ListStructToParams(opts)
@@ -215,4 +216,63 @@ func init() {
printObject(storage)
return nil
})
type StorageChangeOwnerOptions struct {
ID string `help:"ID or name of storage" json:"-"`
ProjectDomain string `json:"project_domain" help:"target domain"`
}
R(&StorageChangeOwnerOptions{}, "storage-change-owner", "Change owner domain of storage", func(s *mcclient.ClientSession, args *StorageChangeOwnerOptions) error {
if len(args.ProjectDomain) == 0 {
return fmt.Errorf("empty project_domain")
}
params := jsonutils.Marshal(args)
ret, err := modules.Storages.PerformAction(s, args.ID, "change-owner", params)
if err != nil {
return err
}
printObject(ret)
return nil
})
type StorageForceDetachHost struct {
ID string `help:"ID or name of storage" json:"-"`
Host string `help:"ID or name of host"`
}
R(&StorageForceDetachHost{}, "storage-public", "Force detach host", func(s *mcclient.ClientSession, args *StorageForceDetachHost) error {
params := jsonutils.Marshal(args)
result, err := modules.Storages.PerformAction(s, args.ID, "force-detach-host", params)
if err != nil {
return err
}
printObject(result)
return nil
})
type StoragePublicOptions struct {
ID string `help:"ID or name of storage" json:"-"`
Scope string `help:"sharing scope" choices:"system|domain"`
SharedDomains []string `help:"share to domains"`
}
R(&StoragePublicOptions{}, "storage-public", "Make a storage public", func(s *mcclient.ClientSession, args *StoragePublicOptions) error {
params := jsonutils.Marshal(args)
result, err := modules.Storages.PerformAction(s, args.ID, "public", params)
if err != nil {
return err
}
printObject(result)
return nil
})
type StoragePrivateOptions struct {
ID string `help:"ID or name of storage" json:"-"`
}
R(&StoragePrivateOptions{}, "storage-private", "Make a storage private", func(s *mcclient.ClientSession, args *StoragePrivateOptions) error {
params := jsonutils.Marshal(args)
result, err := modules.Storages.PerformAction(s, args.ID, "private", params)
if err != nil {
return err
}
printObject(result)
return nil
})
}

View File

@@ -40,7 +40,11 @@ func init() {
if err != nil {
return err
}
printList(result, modules.UsersV3.GetColumns(s))
if len(args.ExportFile) > 0 {
exportList(result, args.ExportFile, args.ExportKeys, args.ExportTexts, modules.UsersV3.GetColumns(s))
} else {
printList(result, modules.UsersV3.GetColumns(s))
}
return nil
})

View File

@@ -15,6 +15,8 @@
package shell
import (
"fmt"
"yunion.io/x/jsonutils"
"yunion.io/x/onecloud/pkg/mcclient"
@@ -47,7 +49,11 @@ func init() {
return err
}
printList(result, modules.Vpcs.GetColumns(s))
if len(opts.ExportFile) > 0 {
exportList(result, opts.ExportFile, opts.ExportKeys, opts.ExportTexts, modules.Vpcs.GetColumns(s))
} else {
printList(result, modules.Vpcs.GetColumns(s))
}
return nil
})
@@ -214,4 +220,21 @@ func init() {
printObject(result)
return nil
})
type VpcChangeOwnerOptions struct {
ID string `help:"ID or name of vpc" json:"-"`
ProjectDomain string `json:"project_domain" help:"target domain"`
}
R(&VpcChangeOwnerOptions{}, "vpc-change-owner", "Change owner domain of vpc", func(s *mcclient.ClientSession, args *VpcChangeOwnerOptions) error {
if len(args.ProjectDomain) == 0 {
return fmt.Errorf("empty project_domain")
}
params := jsonutils.Marshal(args)
ret, err := modules.Vpcs.PerformAction(s, args.ID, "change-owner", params)
if err != nil {
return err
}
printObject(ret)
return nil
})
}

View File

@@ -18,17 +18,21 @@ import (
"fmt"
"os"
"yunion.io/x/jsonutils"
"yunion.io/x/log"
"yunion.io/x/pkg/errors"
"yunion.io/x/structarg"
"yunion.io/x/onecloud/pkg/multicloud/google"
_ "yunion.io/x/onecloud/pkg/multicloud/google/shell"
"yunion.io/x/onecloud/pkg/util/fileutils2"
"yunion.io/x/onecloud/pkg/util/shellutils"
)
type BaseOptions struct {
Debug bool `help:"debug mode"`
Help bool `help:"Show help"`
AuthFile string `help:"google cloud auth json file path" default:"$GOOGLE_AUTH_FILE"`
ClientEmail string `help:"Client email" default:"$GOOGLE_CLIENT_EMAIL"`
ProjectID string `help:"Project ID" default:"$GOOGLE_PROJECT_ID"`
PrivateKeyID string `help:"Private Key ID" default:"$GOOGLE_PRIVATE_KEY_ID"`
@@ -78,6 +82,20 @@ func showErrorAndExit(e error) {
}
func newClient(options *BaseOptions) (*google.SRegion, error) {
if len(options.AuthFile) > 0 {
jsonStr, err := fileutils2.FileGetContents(options.AuthFile)
if err != nil {
return nil, errors.Wrap(err, "FileGetContents")
}
jsonCfg, err := jsonutils.ParseString(jsonStr)
if err != nil {
return nil, errors.Wrap(err, "jsonutils.ParseString")
}
options.ClientEmail, _ = jsonCfg.GetString("client_email")
options.PrivateKeyID, _ = jsonCfg.GetString("private_key_id")
options.PrivateKey, _ = jsonCfg.GetString("private_key")
options.ProjectID, _ = jsonCfg.GetString("project_id")
}
if len(options.ClientEmail) == 0 {
return nil, fmt.Errorf("Missing ClientEmail")
}

10
go.mod
View File

@@ -3,7 +3,6 @@ module yunion.io/x/onecloud
go 1.12
require (
cloud.google.com/go v0.50.0
cloud.google.com/go/storage v1.5.0
github.com/360EntSecGroup-Skylar/excelize v1.4.0
github.com/Azure/azure-sdk-for-go v36.1.0+incompatible
@@ -118,6 +117,7 @@ require (
google.golang.org/genproto v0.0.0-20191230161307-f3c370f40bfb
google.golang.org/grpc v1.26.0
gopkg.in/asn1-ber.v1 v1.0.0-20181015200546-f715ec2f112d // indirect
gopkg.in/fatih/set.v0 v0.2.1
gopkg.in/inf.v0 v0.9.1 // indirect
gopkg.in/ini.v1 v1.44.0 // indirect
gopkg.in/ldap.v3 v3.0.3
@@ -128,12 +128,12 @@ require (
k8s.io/cluster-bootstrap v0.17.3
k8s.io/kubernetes v1.16.0
yunion.io/x/executor v0.0.0-20200227030256-a18417815e74
yunion.io/x/jsonutils v0.0.0-20200415132054-2bf8a5e94501
yunion.io/x/jsonutils v0.0.0-20200814075449-927b118adbd8
yunion.io/x/log v0.0.0-20200313080802-57a4ce5966b3
yunion.io/x/pkg v0.0.0-20200416145704-22c189971435
yunion.io/x/pkg v0.0.0-20200814072949-4f1b541857d6
yunion.io/x/s3cli v0.0.0-20190917004522-13ac36d8687e
yunion.io/x/sqlchemy v0.0.0-20200312002602-1177cd8fbc57
yunion.io/x/structarg v0.0.0-20190809075558-115bed041de3
yunion.io/x/sqlchemy v0.0.0-20200814052348-164f1f20f8a6
yunion.io/x/structarg v0.0.0-20200720093445-9f850fa222ce
)
replace (

19
go.sum
View File

@@ -1013,6 +1013,8 @@ gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 h1:qIbj1fsPNlZgppZ+VLlY7N33
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/cheggaaa/pb.v1 v1.0.25/go.mod h1:V/YB90LKu/1FcN3WVnfiiE5oMCibMjukxqG/qStrOgw=
gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI=
gopkg.in/fatih/set.v0 v0.2.1 h1:Xvyyp7LXu34P0ROhCyfXkmQCAoOUKb1E2JS9I7SE5CY=
gopkg.in/fatih/set.v0 v0.2.1/go.mod h1:5eLWEndGL4zGGemXWrKuts+wTJR0y+w+auqUJZbmyBg=
gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys=
gopkg.in/gcfg.v1 v1.2.0/go.mod h1:yesOnuUOFQAhST5vPY4nbZsb/huCgGGXlipJsBn0b3o=
gopkg.in/gemnasium/logrus-airbrake-hook.v2 v2.1.2/go.mod h1:Xk6kEKp8OKb+X14hQBKWaSkCsqBpgog8nAV2xsGOxlo=
@@ -1106,8 +1108,8 @@ vbom.ml/util v0.0.0-20160121211510-db5cfe13f5cc/go.mod h1:so/NYdZXCz+E3ZpW0uAoCj
yunion.io/x/executor v0.0.0-20200227030256-a18417815e74 h1:A15C6VdVRWvmQ9pAJHrUs9yan5qKlYH7uaRxHg1kRbk=
yunion.io/x/executor v0.0.0-20200227030256-a18417815e74/go.mod h1:Uxuou9WQIeJXNpy7t2fPLL0BYLvLiMvGQwY7Qc6aSws=
yunion.io/x/jsonutils v0.0.0-20190625054549-a964e1e8a051/go.mod h1:4N0/RVzsYL3kH3WE/H1BjUQdFiWu50JGCFQuuy+Z634=
yunion.io/x/jsonutils v0.0.0-20200415132054-2bf8a5e94501 h1:i1r9XvbdxH3FgTCLmTaRi3MzQqhiQimXJRlUOPgrxnU=
yunion.io/x/jsonutils v0.0.0-20200415132054-2bf8a5e94501/go.mod h1:T7kxQJR13+t7z0TuT+Wzd7MTxBOk2H9c0pO1ONQSv90=
yunion.io/x/jsonutils v0.0.0-20200814075449-927b118adbd8 h1:KQVw5EmohJCqBDMdZ3fAcOQNNMIYgVuNCNWNwg4EM3A=
yunion.io/x/jsonutils v0.0.0-20200814075449-927b118adbd8/go.mod h1:p0nyMqGA/apTxxyLIU/o1k4V7Vujl2O6ey30L594sYE=
yunion.io/x/log v0.0.0-20190514041436-04ce53b17c6b/go.mod h1:+gauLs73omeJAPlsXcevLsJLKixV+sR/E7WSYTSx1fE=
yunion.io/x/log v0.0.0-20190629062853-9f6483a7103d h1:59zrDL7Ft+hDukguJRmLr/Gdu/9V75x+yX99ovZwfaA=
yunion.io/x/log v0.0.0-20190629062853-9f6483a7103d/go.mod h1:LC6f/4FozL0iaAbnFt2eDX9jlsyo3WiOUPm03d7+U4U=
@@ -1115,12 +1117,11 @@ yunion.io/x/log v0.0.0-20200313080802-57a4ce5966b3 h1:5Wc5hkB8PtMudmHuzCyok960Ru
yunion.io/x/log v0.0.0-20200313080802-57a4ce5966b3/go.mod h1:LC6f/4FozL0iaAbnFt2eDX9jlsyo3WiOUPm03d7+U4U=
yunion.io/x/pkg v0.0.0-20190620104149-945c25821dbf/go.mod h1:t6rEGG2sQ4J7DhFxSZVOTjNd0YO/KlfWQyK1W4tog+E=
yunion.io/x/pkg v0.0.0-20190628082551-f4033ba2ea30/go.mod h1:t6rEGG2sQ4J7DhFxSZVOTjNd0YO/KlfWQyK1W4tog+E=
yunion.io/x/pkg v0.0.0-20200302034534-fdf44d54b070/go.mod h1:t6rEGG2sQ4J7DhFxSZVOTjNd0YO/KlfWQyK1W4tog+E=
yunion.io/x/pkg v0.0.0-20200416145704-22c189971435 h1:Fwf1rjdl+Qmw9BNxQN7wi2lQpYVExV7eBLifd0emHaI=
yunion.io/x/pkg v0.0.0-20200416145704-22c189971435/go.mod h1:t6rEGG2sQ4J7DhFxSZVOTjNd0YO/KlfWQyK1W4tog+E=
yunion.io/x/pkg v0.0.0-20200814072949-4f1b541857d6 h1:UarEDTBGkgcgc+nc+PZ75uo9M9+jiOGd5P2B90TxDNw=
yunion.io/x/pkg v0.0.0-20200814072949-4f1b541857d6/go.mod h1:t6rEGG2sQ4J7DhFxSZVOTjNd0YO/KlfWQyK1W4tog+E=
yunion.io/x/s3cli v0.0.0-20190917004522-13ac36d8687e h1:v+EzIadodSwkdZ/7bremd7J8J50Cise/HCylsOJngmo=
yunion.io/x/s3cli v0.0.0-20190917004522-13ac36d8687e/go.mod h1:0iFKpOs1y4lbCxeOmq3Xx/0AcQoewVPwj62eRluioEo=
yunion.io/x/sqlchemy v0.0.0-20200312002602-1177cd8fbc57 h1:KtQAuLJ00RSUVqkiRmJ1DiDABiw0U3xxXnzD3lGavaY=
yunion.io/x/sqlchemy v0.0.0-20200312002602-1177cd8fbc57/go.mod h1:FTdwPdGhMgh4E+UFXc9klI1Ok34fMuybTT+jLhOaIjI=
yunion.io/x/structarg v0.0.0-20190809075558-115bed041de3 h1:bfC8EhXYvyGYldRWlzxiCM39Zfj3s3+zham9mW2h2LE=
yunion.io/x/structarg v0.0.0-20190809075558-115bed041de3/go.mod h1:EP6NSv2C0zzqBDTKumv8hPWLb3XvgMZDHQRfyuOrQng=
yunion.io/x/sqlchemy v0.0.0-20200814052348-164f1f20f8a6 h1:k7E8Zjwzyk/lo1dDO0jtLbODwYRNv+w/zsUJrKWCXvo=
yunion.io/x/sqlchemy v0.0.0-20200814052348-164f1f20f8a6/go.mod h1:FTdwPdGhMgh4E+UFXc9klI1Ok34fMuybTT+jLhOaIjI=
yunion.io/x/structarg v0.0.0-20200720093445-9f850fa222ce h1:kU8xE7O5uZ1GSJVMZHoJ+jrNL7csUQHYGyAPW9QfNpE=
yunion.io/x/structarg v0.0.0-20200720093445-9f850fa222ce/go.mod h1:EP6NSv2C0zzqBDTKumv8hPWLb3XvgMZDHQRfyuOrQng=

View File

@@ -39,6 +39,7 @@ func InitHandlers(app *appsrv.Application) {
db.InitAllManagers()
db.RegisterModelManager(db.OpsLog)
db.RegisterModelManager(db.Metadata)
db.RegisterModelManager(db.UserCacheManager)
db.RegisterModelManager(db.TenantCacheManager)
for _, manager := range []db.IModelManager{

View File

@@ -16,6 +16,7 @@ package handler
import (
"context"
"encoding/base64"
"fmt"
"net/http"
"strings"
@@ -41,6 +42,7 @@ import (
"yunion.io/x/onecloud/pkg/util/httputils"
"yunion.io/x/onecloud/pkg/util/netutils2"
"yunion.io/x/onecloud/pkg/util/rbacutils"
"yunion.io/x/onecloud/pkg/util/stringutils2"
)
func AppContextToken(ctx context.Context) mcclient.TokenCredential {
@@ -269,6 +271,10 @@ func (h *AuthHandlers) doCredentialLogin(ctx context.Context, req *http.Request,
if err != nil {
return nil, httperrors.NewInputParameterError("get password in body")
}
// try base64 decryption
if decPasswd, err := base64.StdEncoding.DecodeString(passwd); err == nil && stringutils2.IsPrintableAsciiString(string(decPasswd)) {
passwd = string(decPasswd)
}
if len(uname) == 0 || len(passwd) == 0 {
return nil, httperrors.NewInputParameterError("username or password is empty")
}
@@ -314,6 +320,35 @@ func (h *AuthHandlers) doCredentialLogin(ctx context.Context, req *http.Request,
}
}
}
if len(tenant) == 0 {
token3, ok := token.(*mcclient.TokenCredentialV3)
if ok {
targetLevel := rbacutils.ScopeProject
targetProjId := ""
for _, r := range token3.Token.RoleAssignments {
level := rbacutils.ScopeProject
if len(r.Policies.System) > 0 {
level = rbacutils.ScopeSystem
} else if len(r.Policies.Domain) > 0 {
level = rbacutils.ScopeDomain
}
if len(targetProjId) == 0 || level.HigherThan(targetLevel) {
targetProjId = r.Scope.Project.Id
targetLevel = level
}
}
if len(targetProjId) > 0 {
ntoken, e := auth.Client().SetProject(targetProjId, "", "", token)
if e != nil {
log.Errorf("fail to change to project %s(%s), reset to empty", targetProjId, e)
} else {
token = ntoken
tenant = targetProjId
body.(*jsonutils.JSONDict).Set("scope", jsonutils.NewString(string(targetLevel)))
}
}
}
}
if len(tenant) == 0 {
s := auth.GetAdminSession(ctx, FetchRegion(req), "")
projects, e := modules.UsersV3.GetProjects(s, token.GetUserId())
@@ -361,13 +396,13 @@ func isUserAllowWebconsole(ctx context.Context, w http.ResponseWriter, req *http
return false
}
if !jsonutils.QueryBoolean(usr, "allow_web_console", true) {
httperrors.ForbiddenError(w, "forbidden user %q login from web", usr.String())
httperrors.ForbiddenError(w, "user forbidden login from web")
return false
}
return true
}
func saveCookie(w http.ResponseWriter, name, val string, expire time.Time, base64 bool) {
func saveCookie(w http.ResponseWriter, name, val, domain string, expire time.Time, base64 bool) {
diff := time.Until(expire)
maxAge := int(diff.Seconds())
// log.Println("Set cookie", name, expire, maxAge, val)
@@ -379,6 +414,11 @@ func saveCookie(w http.ResponseWriter, name, val string, expire time.Time, base6
}
// log.Printf("Set coookie: %s - %s\n", val, valenc)
cookie := &http.Cookie{Name: name, Value: valenc, Path: "/", Expires: expire, MaxAge: maxAge, HttpOnly: false}
if len(domain) > 0 {
cookie.Domain = domain
}
http.SetCookie(w, cookie)
}
@@ -400,8 +440,12 @@ func getCookie(r *http.Request, name string) string {
}
}
func clearCookie(w http.ResponseWriter, name string) {
func clearCookie(w http.ResponseWriter, name string, domain string) {
cookie := &http.Cookie{Name: name, Expires: time.Now(), Path: "/", MaxAge: -1, HttpOnly: false}
if len(domain) > 0 {
cookie.Domain = domain
}
http.SetCookie(w, cookie)
}
@@ -458,7 +502,7 @@ func (h *AuthHandlers) postLoginHandler(ctx context.Context, w http.ResponseWrit
httperrors.GeneralServerError(w, err)
return
}
saveCookie(w, constants.YUNION_AUTH_COOKIE, authCookie, token.GetExpires(), true)
saveCookie(w, constants.YUNION_AUTH_COOKIE, authCookie, options.Options.CookieDomain, token.GetExpires(), true)
if len(token.GetProjectId()) > 0 {
if body.Contains("isadmin") {
@@ -466,20 +510,20 @@ func (h *AuthHandlers) postLoginHandler(ctx context.Context, w http.ResponseWrit
if policy.PolicyManager.IsScopeCapable(token, rbacutils.ScopeSystem) {
adminVal, _ = body.GetString("isadmin")
}
saveCookie(w, "isadmin", adminVal, token.GetExpires(), false)
saveCookie(w, "isadmin", adminVal, "", token.GetExpires(), false)
}
if body.Contains("scope") {
scopeStr, _ := body.GetString("scope")
if !policy.PolicyManager.IsScopeCapable(token, rbacutils.TRbacScope(scopeStr)) {
scopeStr = string(rbacutils.ScopeProject)
}
saveCookie(w, "scope", scopeStr, token.GetExpires(), false)
saveCookie(w, "scope", scopeStr, "", token.GetExpires(), false)
}
if body.Contains("domain") {
domainStr, _ := body.GetString("domain")
saveCookie(w, "domain", domainStr, token.GetExpires(), false)
saveCookie(w, "domain", domainStr, "", token.GetExpires(), false)
}
saveCookie(w, "tenant", token.GetProjectId(), token.GetExpires(), false)
saveCookie(w, "tenant", token.GetProjectId(), "", token.GetExpires(), false)
}
setAuthHeader(w, tid)
@@ -502,7 +546,7 @@ func (h *AuthHandlers) postLogoutHandler(ctx context.Context, w http.ResponseWri
if len(tid) > 0 {
clientman.TokenMan.Remove(tid)
}
clearCookie(w, constants.YUNION_AUTH_COOKIE)
clearCookie(w, constants.YUNION_AUTH_COOKIE, options.Options.CookieDomain)
appsrv.Send(w, "")
}
@@ -533,14 +577,6 @@ func FetchRegion(req *http.Request) string {
return ""
}
func fetchDomain(req *http.Request) string {
r, e := req.Cookie("domain")
if e != nil {
return ""
}
return r.Value
}
type role struct {
id string
name string
@@ -570,6 +606,7 @@ func (this *projectRoles) add(roleId, roleName string) {
func (this *projectRoles) getToken(scope rbacutils.TRbacScope, user, userId, domain, domainId string, ip string) mcclient.TokenCredential {
return &mcclient.SSimpleToken{
Token: "faketoken",
Domain: domain,
DomainId: domainId,
User: user,
@@ -609,12 +646,12 @@ func (this *projectRoles) json(user, userId, domain, domainId string, ip string)
}
obj.Add(roles, "roles")
for _, scope := range []rbacutils.TRbacScope{
rbacutils.ScopeSystem,
rbacutils.ScopeDomain,
rbacutils.ScopeProject,
rbacutils.ScopeDomain,
rbacutils.ScopeSystem,
} {
token := this.getToken(scope, user, userId, domain, domainId, ip)
matches := policy.PolicyManager.MatchedPolicies(scope, token)
matches := policy.PolicyManager.MatchedPolicyNames(scope, token)
obj.Add(jsonutils.NewStringArray(matches), fmt.Sprintf("%s_policies", scope))
if len(matches) > 0 {
obj.Add(jsonutils.JSONTrue, fmt.Sprintf("%s_capable", scope))
@@ -646,26 +683,74 @@ func getUserAuthCookie(ctx context.Context, s *mcclient.ClientSession, token mcc
return info.String(), nil
}
func getLBAgentInfo(s *mcclient.ClientSession, token mcclient.TokenCredential) (*jsonutils.JSONDict, error) {
func isLBAgentExists(s *mcclient.ClientSession) (bool, error) {
params := jsonutils.NewDict()
params.Add(jsonutils.NewString("hb_last_seen.isnotempty()"), "filter.0")
params.Add(jsonutils.NewInt(1), "limit")
params.Add(jsonutils.JSONFalse, "details")
lbagents, err := modules.LoadbalancerAgents.List(s, params)
agents, err := modules.LoadbalancerAgents.List(s, params)
if err != nil {
return nil, errors.Wrapf(err, "user %s get lbagent", token.GetUserName())
return false, errors.Wrap(err, "modules.LoadbalancerAgents.List")
}
item := jsonutils.NewDict()
item.Add(jsonutils.NewString(""), "name")
item.Add(jsonutils.NewString("lbagent"), "type")
item.Add(jsonutils.JSONTrue, "as_menu")
if len(lbagents.Data) > 0 {
item.Add(jsonutils.JSONTrue, "status")
if len(agents.Data) > 0 {
return true, nil
} else {
item.Add(jsonutils.JSONFalse, "status")
return false, nil
}
}
func isBaremetalAgentExists(s *mcclient.ClientSession) (bool, error) {
params := jsonutils.NewDict()
params.Add(jsonutils.NewString("agent_type.equals(baremetal)"), "filter.0")
params.Add(jsonutils.NewInt(1), "limit")
params.Add(jsonutils.JSONFalse, "details")
agents, err := modules.Baremetalagents.List(s, params)
if err != nil {
return false, errors.Wrap(err, "modules.Baremetalagents.List")
}
if len(agents.Data) > 0 {
return true, nil
} else {
return false, nil
}
}
func isEsxiAgentExists(s *mcclient.ClientSession) (bool, error) {
params := jsonutils.NewDict()
params.Add(jsonutils.NewString("agent_type.equals(esxiagent)"), "filter.0")
params.Add(jsonutils.NewInt(1), "limit")
params.Add(jsonutils.JSONFalse, "details")
agents, err := modules.Baremetalagents.List(s, params)
if err != nil {
return false, errors.Wrap(err, "modules.Baremetalagents.List esxiagent")
}
if len(agents.Data) > 0 {
return true, nil
} else {
return false, nil
}
}
func isHostAgentExists(s *mcclient.ClientSession) (bool, error) {
params := jsonutils.NewDict()
params.Add(jsonutils.JSONFalse, "show_emulated")
params.Add(jsonutils.JSONFalse, "baremetal")
params.Add(jsonutils.NewString("system"), "scope")
params.Add(jsonutils.NewInt(1), "limit")
params.Add(jsonutils.JSONFalse, "details")
agents, err := modules.Hosts.List(s, params)
if err != nil {
return false, errors.Wrap(err, "modules.LoadbalancerAgents.List")
}
if len(agents.Data) > 0 {
return true, nil
} else {
return false, nil
}
return item, nil
}
func getUserInfo(ctx context.Context, s *mcclient.ClientSession, token mcclient.TokenCredential, req *http.Request) (*jsonutils.JSONDict, error) {
@@ -741,7 +826,7 @@ func getUserInfo(ctx context.Context, s *mcclient.ClientSession, token mcclient.
rbacutils.ScopeDomain,
rbacutils.ScopeProject,
} {
p := policy.PolicyManager.MatchedPolicies(scope, token)
p := policy.PolicyManager.MatchedPolicyNames(scope, token)
data.Add(jsonutils.NewStringArray(p), fmt.Sprintf("%s_policies", scope))
if scope == rbacutils.ScopeSystem {
data.Add(jsonutils.NewStringArray(p), "admin_policies")
@@ -756,43 +841,57 @@ func getUserInfo(ctx context.Context, s *mcclient.ClientSession, token mcclient.
menus := jsonutils.NewArray()
k8s := jsonutils.NewArray()
adminToken := auth.AdminCredential()
curReg := FetchRegion(req)
allsrv := adminToken.GetInternalServices(curReg)
alleps := auth.Client().GetServiceCatalog().GetServicesByInterface(curReg, "console")
if allsrv != nil && len(allsrv) > 0 {
for _, srv := range allsrv {
item := jsonutils.NewDict()
item.Add(jsonutils.NewString(""), "name")
item.Add(jsonutils.NewString(srv), "type")
item.Add(jsonutils.JSONTrue, "status")
if srv == "notify" {
item.Add(jsonutils.JSONFalse, "as_menu")
} else {
item.Add(jsonutils.JSONTrue, "as_menu")
}
services.Add(item)
}
} else {
log.Errorf("fail to find services????: %#v %s", adminToken, curReg)
srvCat := auth.Client().GetServiceCatalog()
var allsrv []string
var alleps []mcclient.ExternalService
if srvCat != nil {
allsrv = srvCat.GetInternalServices(curReg)
alleps = srvCat.GetServicesByInterface(curReg, "console")
}
log.Infof("getUserInfo getLBAgentInfo")
lb, err := getLBAgentInfo(s, adminToken)
if err != nil {
log.Errorf("getLBAgentInfo fail %s", err)
} else {
services.Add(lb)
log.Infof("getUserInfo checkAgent exists")
for _, cf := range []struct {
existFunc func(*mcclient.ClientSession) (bool, error)
srvName string
}{
{
existFunc: isLBAgentExists,
srvName: "lbagent",
},
{
existFunc: isBaremetalAgentExists,
srvName: "bmagent",
},
{
existFunc: isHostAgentExists,
srvName: "hostagent",
},
{
existFunc: isEsxiAgentExists,
srvName: "esxiagent",
},
} {
exist, err := cf.existFunc(s)
if err != nil {
log.Errorf("isLBAgentExists fail %s", err)
} else if exist {
allsrv = append(allsrv, cf.srvName)
}
}
if alleps != nil {
for _, ep := range alleps {
item := jsonutils.NewDict()
item.Add(jsonutils.NewString(ep.Url), "url")
item.Add(jsonutils.NewString(ep.Name), "name")
menus.Add(item)
}
for _, srv := range allsrv {
item := jsonutils.NewDict()
item.Add(jsonutils.NewString(srv), "type")
item.Add(jsonutils.JSONTrue, "status")
services.Add(item)
}
for _, ep := range alleps {
item := jsonutils.NewDict()
item.Add(jsonutils.NewString(ep.Url), "url")
item.Add(jsonutils.NewString(ep.Name), "name")
menus.Add(item)
}
log.Infof("getUserInfo modules.Hosts.Get")
@@ -853,7 +952,7 @@ func (h *AuthHandlers) getPermissionDetails(ctx context.Context, w http.Response
if query != nil {
name, _ = query.GetString("policy")
}
result, err := policy.PolicyManager.ExplainRpc(t, body, name)
result, err := policy.ExplainRpc(ctx, t, body, name)
if err != nil {
httperrors.GeneralServerError(w, err)
return
@@ -987,20 +1086,14 @@ func (h *AuthHandlers) resetUserPassword(ctx context.Context, w http.ResponseWri
confirmPwd, _ := body.GetString("password_confirm")
passcode, _ := body.GetString("passcode")
// 1.验证新密码正确
if len(newPwd) < 6 {
httperrors.InputParameterError(w, "new password must have at least 6 characters")
return
}
if newPwd != confirmPwd {
httperrors.InputParameterError(w, "new password mismatch")
return
}
// 2.验证原密码正确且idp_driver为空
// 1.验证原密码正确且idp_driver为空
if isLdapUser(user) {
httperrors.ForbiddenError(w, "not support reset ldap user password")
httperrors.ForbiddenError(w, "not support reset user password")
return
}
@@ -1018,7 +1111,7 @@ func (h *AuthHandlers) resetUserPassword(ctx context.Context, w http.ResponseWri
return
}
// 3.如果已开启MFA验证 随机密码正确
// 2.如果已开启MFA验证 随机密码正确
tid := getAuthToken(req)
if isMfaEnabled(user) {
totp := clientman.TokenMan.GetTotp(tid)
@@ -1029,7 +1122,7 @@ func (h *AuthHandlers) resetUserPassword(ctx context.Context, w http.ResponseWri
}
}
// 4.重置密码清除认证token
// 3.重置密码清除认证token
params := jsonutils.NewDict()
params.Set("password", jsonutils.NewString(newPwd))
ret, err := modules.UsersV3.Patch(s, uid, params)
@@ -1044,7 +1137,7 @@ func (h *AuthHandlers) resetUserPassword(ctx context.Context, w http.ResponseWri
}
func isLdapUser(user jsonutils.JSONObject) bool {
if driver, _ := user.GetString("idp_driver"); driver == "ldap" {
if driver, _ := user.GetString("idp_driver"); len(driver) > 0 {
return true
}

View File

@@ -0,0 +1,19 @@
// Copyright 2019 Yunion
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package handler
import (
_ "yunion.io/x/onecloud/pkg/mcclient/modules/cloudnet"
)

View File

@@ -28,6 +28,7 @@ import (
"yunion.io/x/jsonutils"
"yunion.io/x/log"
"yunion.io/x/pkg/utils"
"yunion.io/x/onecloud/pkg/apigateway/options"
"yunion.io/x/onecloud/pkg/appctx"
@@ -37,6 +38,7 @@ import (
"yunion.io/x/onecloud/pkg/mcclient/auth"
"yunion.io/x/onecloud/pkg/mcclient/modulebase"
"yunion.io/x/onecloud/pkg/mcclient/modules"
"yunion.io/x/onecloud/pkg/util/httputils"
)
const (
@@ -57,6 +59,12 @@ const (
BATCH_HOST_REGISTER_QUANTITY_LIMITATION = 1000
)
var (
BatchHostRegisterTemplate = []string{HOST_MAC, HOST_NAME, HOST_IPMI_ADDR_OPTIONAL, HOST_IPMI_USERNAME_OPTIONAL, HOST_IPMI_PASSWORD_OPTIONAL}
BatchHostISORegisterTemplate = []string{HOST_NAME, HOST_IPMI_ADDR, HOST_IPMI_USERNAME, HOST_IPMI_PASSWORD, HOST_MNG_IP_ADDR}
BatchHostPXERegisterTemplate = []string{HOST_NAME, HOST_IPMI_ADDR, HOST_IPMI_USERNAME, HOST_IPMI_PASSWORD, HOST_MNG_IP_ADDR_OPTIONAL}
)
func FetchSession(ctx context.Context, r *http.Request, apiVersion string) *mcclient.ClientSession {
token := AppContextToken(ctx)
session := auth.GetSession(ctx, token, FetchRegion(r), apiVersion)
@@ -170,20 +178,43 @@ func (mh *MiscHandler) DoBatchHostRegister(ctx context.Context, w http.ResponseW
return
}
// check header line
titlesOk := false
for _, t := range [][]string{BatchHostRegisterTemplate, BatchHostISORegisterTemplate, BatchHostPXERegisterTemplate} {
if len(t) == len(rows[0]) {
for _, title := range rows[0] {
if !utils.IsInStringArray(title, t) {
break
}
}
titlesOk = true
}
}
if !titlesOk {
httperrors.InputParameterError(w, "template file is invalid.please check.")
return
}
paramKeys := []string{}
for _, title := range rows[0] {
i1 := -1
i2 := -1
for i, title := range rows[0] {
switch title {
case HOST_MAC:
paramKeys = append(paramKeys, "access_mac")
case HOST_NAME:
paramKeys = append(paramKeys, "name")
case HOST_IPMI_ADDR, HOST_IPMI_ADDR_OPTIONAL:
i1 = i
paramKeys = append(paramKeys, "ipmi_ip_addr")
case HOST_IPMI_USERNAME, HOST_IPMI_USERNAME_OPTIONAL:
paramKeys = append(paramKeys, "ipmi_username")
case HOST_IPMI_PASSWORD, HOST_IPMI_PASSWORD_OPTIONAL:
paramKeys = append(paramKeys, "ipmi_password")
case HOST_MNG_IP_ADDR, HOST_MNG_IP_ADDR_OPTIONAL:
i2 = i
paramKeys = append(paramKeys, "access_ip")
default:
e := httperrors.NewInternalServerError("empty file content")
@@ -199,8 +230,33 @@ func (mh *MiscHandler) DoBatchHostRegister(ctx context.Context, w http.ResponseW
return
}
ips := []string{}
hosts := bytes.Buffer{}
for _, row := range rows[1:] {
var e *httputils.JSONClientError
if i1 >= 0 && len(row[i1]) > 0 {
i1Ip := fmt.Sprintf("%d-%s", i1, row[i1])
if utils.IsInStringArray(i1Ip, ips) {
e = httperrors.NewDuplicateIdError("ip", row[i1])
} else {
ips = append(ips, i1Ip)
}
}
if i2 >= 0 && len(row[i2]) > 0 {
i2Ip := fmt.Sprintf("%d-%s", i2, row[i2])
if utils.IsInStringArray(i2Ip, ips) {
e = httperrors.NewDuplicateIdError("ip", row[i2])
} else {
ips = append(ips, i2Ip)
}
}
if e != nil {
httperrors.JsonClientError(w, e)
return
}
hosts.WriteString(strings.Join(row, ",") + "\n")
}
@@ -297,18 +353,6 @@ func (mh *MiscHandler) DoBatchUserRegister(ctx context.Context, w http.ResponseW
return
}
if _, ok := names[name]; ok {
e := httperrors.NewClientError("row %d duplicate name %s", rowIdx, name)
httperrors.JsonClientError(w, e)
return
} else {
names[name] = true
_, err := modules.UsersV3.Get(s, name, nil)
if err == nil {
continue
}
}
domainId, ok := domains[domain]
if !ok {
if len(domain) == 0 {
@@ -327,6 +371,18 @@ func (mh *MiscHandler) DoBatchUserRegister(ctx context.Context, w http.ResponseW
domains[domain] = id
}
if _, ok := names[name+"/"+domainId]; ok {
e := httperrors.NewClientError("row %d duplicate name %s", rowIdx, name)
httperrors.JsonClientError(w, e)
return
} else {
names[name+"/"+domainId] = true
_, err := modules.UsersV3.Get(s, name, nil)
if err == nil {
continue
}
}
user := jsonutils.NewDict()
user.Add(jsonutils.NewString(name), "name")
user.Add(jsonutils.NewString(domainId), "domain_id")
@@ -375,21 +431,21 @@ func (mh *MiscHandler) getDownloadsHandler(ctx context.Context, w http.ResponseW
var content bytes.Buffer
switch template {
case "BatchHostRegister":
records := [][]string{{HOST_MAC, HOST_NAME, HOST_IPMI_ADDR_OPTIONAL, HOST_IPMI_USERNAME_OPTIONAL, HOST_IPMI_PASSWORD_OPTIONAL}}
records := [][]string{BatchHostRegisterTemplate}
content, err = writeXlsx("hosts", records)
if err != nil {
httperrors.InternalServerError(w, "internal server error")
return
}
case "BatchHostISORegister":
records := [][]string{{HOST_NAME, HOST_IPMI_ADDR, HOST_IPMI_USERNAME, HOST_IPMI_PASSWORD, HOST_MNG_IP_ADDR}}
records := [][]string{BatchHostISORegisterTemplate}
content, err = writeXlsx("hosts", records)
if err != nil {
httperrors.InternalServerError(w, "internal server error")
return
}
case "BatchHostPXERegister":
records := [][]string{{HOST_NAME, HOST_IPMI_ADDR, HOST_IPMI_USERNAME, HOST_IPMI_PASSWORD, HOST_MNG_IP_ADDR_OPTIONAL}}
records := [][]string{BatchHostPXERegisterTemplate}
content, err = writeXlsx("hosts", records)
if err != nil {
httperrors.InternalServerError(w, "internal server error")

View File

@@ -20,12 +20,13 @@ import (
type GatewayOptions struct {
DefaultRegion string `help:"Use default region while region not specific in api request"`
CookieDomain string `help:"specific yunionauth cookie domain" default:""`
Timeout int `help:"Timeout in seconds, default is 300" default:"300"`
DisableModuleApiVersion bool `help:"Disable each modules default api version" default:"false"`
EnableTotp bool `help:"Enable two-factor authentication" default:"false"`
EnableTotp bool `help:"Enable two-factor authentication" default:"false"`
SqlitePath string `help:"sqlite db path" default:"/etc/yunion/data/yunionapi.db"`

View File

@@ -0,0 +1,20 @@
// Copyright 2019 Yunion
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package baremetal
const (
SERVICE_TYPE = "baremetal"
SERVICE_VERSION = ""
)

View File

@@ -1,4 +1,4 @@
// Copyright 2017, OpenCensus Authors
// Copyright 2019 Yunion
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
@@ -12,8 +12,4 @@
// See the License for the specific language governing permissions and
// limitations under the License.
// Package ocgrpc contains OpenCensus stats and trace
// integrations for gRPC.
//
// Use ServerHandler for servers and ClientHandler for clients.
package ocgrpc // import "go.opencensus.io/plugin/ocgrpc"
package baremetal // import "yunion.io/x/onecloud/pkg/apis/baremetal"

View File

@@ -57,7 +57,7 @@ type ProxySettingResourceInput struct {
// swagger:ignore
// Deprecated
ProxySettingId string `json:"proxy_setting_id" "yunion:deprecated-by":"proxy_setting"`
ProxySettingId string `json:"proxy_setting_id" yunion-deprecated-by:"proxy_setting"`
}
type ProxySettingTestInput struct {

View File

@@ -22,9 +22,21 @@ import (
)
type CloudeventListInput struct {
apis.VirtualResourceListInput
apis.ModelBaseListInput
compute.ManagedResourceListInput
compute.CloudenvResourceListInput
// 服务类型
Service []string `json:"service"`
// 订阅
Manager []string `json:"manager"`
// 账号
Account []string `json:"account"`
// 操作类型
Action []string `json:"action"`
// 操作日志起始时间
Since time.Time `json:"since"`

View File

@@ -285,7 +285,7 @@ type ServerConfigs struct {
// swagger:ignore
// Deprecated
// alias for InstanceType
Sku string `json:"sku" "yunion:deprecated-by":"instance_type"`
Sku string `json:"sku" yunion-deprecated-by:"instance_type"`
// 虚拟机高可用(创建备机)
// default: false
@@ -359,7 +359,7 @@ type ServerCreateInput struct {
// swagger:ignore
// Deprecated
KeypairId string `json:"keypair_id" "yunion:deprecated-by":"keypair"`
KeypairId string `json:"keypair_id" yunion-deprecated-by:"keypair"`
// 秘钥对Id
// required: false
@@ -466,7 +466,8 @@ type ServerCreateInput struct {
// swagger:ignore
OsType string `json:"os_type"`
// swagger:ignore
DisableUsbKbd bool `json:"disable_usb_kbd"`
// swagger:ignore
OsProfile jsonutils.JSONObject `json:"__os_profile__"`
// swagger:ignore

View File

@@ -28,4 +28,26 @@ type CachedLoadbalancerAclListInput struct {
apis.SharableVirtualResourceListInput
RegionalFilterListInput
ManagedResourceListInput
LoadbalancerAclFilterListInput
}
type LoadbalancerAclResourceInfo struct {
// 负载均衡ACL名称
Acl string `json:"acl"`
}
type LoadbalancerAclResourceInput struct {
// ACL名称或ID
Acl string `json:"acl"`
// swagger:ignore
// Deprecated
AclId string `json:"acl_id" yunion-deprecated-by:"acl"`
}
type LoadbalancerAclFilterListInput struct {
LoadbalancerAclResourceInput
// 以ACL名称排序
OrderByAcl string `json:"order_by_acl"`
}

View File

@@ -43,7 +43,7 @@ type LoadbalancerCertificateResourceInput struct {
// swagger:ignore
// Deprecated
CertificateId string `json:"certificate_id" "yunion:deprecated-by":"certificate"`
CertificateId string `json:"certificate_id" yunion-deprecated-by:"certificate"`
}
type LoadbalancerCertificateFilterListInput struct {

View File

@@ -66,7 +66,7 @@ type CloudenvResourceListInput struct {
Providers []string `json:"providers"`
// swagger:ignore
// Deprecated
Provider []string `json:"provider" "yunion:deprecated-by":"providers"`
Provider []string `json:"provider" yunion-deprecated-by:"providers"`
// 列出指定云平台品牌的资源一般来说brand和provider相同除了以上支持的provider之外还支持以下band
//
@@ -77,7 +77,7 @@ type CloudenvResourceListInput struct {
Brands []string `json:"brands"`
// swagger:ignore
// Deprecated
Brand []string `json:"brand" "yunion:deprecated-by":"brands"`
Brand []string `json:"brand" yunion-deprecated-by:"brands"`
// 列出指定云环境的资源,支持云环境如下:
//
@@ -167,10 +167,11 @@ type CloudaccountCreateInput struct {
IsOnPremise bool
// 指定云账号所属的项目
Tenant string `json:"tenant"`
// Tenant string `json:"tenant"`
// swagger:ignore
TenantId string
// TenantId string
apis.ProjectizedResourceInput
// 启用自动同步
// default: false
@@ -179,9 +180,9 @@ type CloudaccountCreateInput struct {
// 自动同步间隔时间
SyncIntervalSeconds int `json:"sync_interval_seconds"`
// 自动根据云上项目或订阅创建本地项目
// 自动根据云上项目或订阅创建本地项目, OpenStack此参数为true
// default: false
AutoCreateProject bool `json:"auto_create_project"`
AutoCreateProject *bool `json:"auto_create_project"`
// 额外信息,例如账单的access key
Options *jsonutils.JSONDict `json:"options"`
@@ -222,6 +223,11 @@ type CloudaccountListInput struct {
// 共享模式
ShareMode []string `json:"share_mode"`
// 代理
ProxySetting string `json:"proxy_setting"`
// swagger:ignore
ProxySettingId string `json:"proxy_setting_id" yunion-deprecated-by:"proxy_setting"`
}
type ProviderProject struct {
@@ -313,7 +319,7 @@ type CloudaccountUpdateInput struct {
}
type CloudaccountPerformPublicInput struct {
apis.PerformPublicInput
apis.PerformPublicDomainInput
// 共享模式可能值为provider_domain, system
// example: provider_domain

View File

@@ -15,6 +15,7 @@
package compute
import (
"yunion.io/x/onecloud/pkg/apis"
"yunion.io/x/onecloud/pkg/cloudprovider"
)
@@ -103,9 +104,9 @@ const (
)
const (
CLOUD_ACCOUNT_SHARE_MODE_ACCOUNT_DOMAIN = "account_domain"
CLOUD_ACCOUNT_SHARE_MODE_SYSTEM = "system"
CLOUD_ACCOUNT_SHARE_MODE_PROVIDER_DOMAIN = "provider_domain"
CLOUD_ACCOUNT_SHARE_MODE_ACCOUNT_DOMAIN = apis.CLOUD_ACCOUNT_SHARE_MODE_ACCOUNT_DOMAIN
CLOUD_ACCOUNT_SHARE_MODE_SYSTEM = apis.CLOUD_ACCOUNT_SHARE_MODE_SYSTEM
CLOUD_ACCOUNT_SHARE_MODE_PROVIDER_DOMAIN = apis.CLOUD_ACCOUNT_SHARE_MODE_PROVIDER_DOMAIN
)
var (

View File

@@ -147,15 +147,15 @@ type CloudproviderResourceInput struct {
// swagger:ignore
// Deprecated
// description: this param will be deprecate at 3.0
Manager string `json:"manager" "yunion:deprecated-by":"cloudprovider"`
Manager string `json:"manager" yunion-deprecated-by:"cloudprovider"`
// swagger:ignore
// Deprecated
// description: this param will be deprecate at 3.0
ManagerId string `json:"manager_id" "yunion:deprecated-by":"cloudprovider"`
ManagerId string `json:"manager_id" yunion-deprecated-by:"cloudprovider"`
// swagger:ignore
// Deprecated
// description: this param will be deprecate at 3.0
CloudproviderId string `json:"cloudprovider_id" "yunion:deprecated-by":"cloudprovider"`
CloudproviderId string `json:"cloudprovider_id" yunion-deprecated-by:"cloudprovider"`
}
type ManagedResourceListInput struct {
@@ -169,19 +169,19 @@ type ManagedResourceListInput struct {
// swagger:ignore
// Deprecated
// description: this param will be deprecate at 3.0
CloudaccountId string `json:"cloudaccount_id" "yunion:deprecated-by":"cloudaccount"`
CloudaccountId string `json:"cloudaccount_id" yunion-deprecated-by:"cloudaccount"`
// swagger:ignore
// Deprecated
// description: this param will be deprecate at 3.0
Account string `json:"account" "yunion:deprecated-by":"cloudaccount"`
Account string `json:"account" yunion-deprecated-by:"cloudaccount"`
// swagger:ignore
// Deprecated
// description: this param will be deprecate at 3.0
AccountId string `json:"account_id" "yunion:deprecated-by":"cloudaccount"`
AccountId string `json:"account_id" yunion-deprecated-by:"cloudaccount"`
// 过滤资源是否为非OneCloud内置私有云管理的资源
// default: false
IsManaged bool `json:"is_managed"`
IsManaged *bool `json:"is_managed"`
// 以云账号名称排序
// pattern:asc|desc
@@ -222,6 +222,10 @@ type CloudproviderListInput struct {
UsableResourceListInput
CloudregionResourceInput
ZoneResourceInput
CapabilityListInput
SyncableBaseResourceListInput
@@ -247,3 +251,23 @@ type CloudproviderUpdateInput struct {
type CloudproviderCreateInput struct {
}
type CloudproviderGetStorageClassInput struct {
CloudregionResourceInput
}
type CloudproviderGetStorageClassOutput struct {
// 对象存储存储类型
StorageClasses []string `json:"storage_classes"`
}
type CloudproviderGetCannedAclInput struct {
CloudregionResourceInput
}
type CloudproviderGetCannedAclOutput struct {
// Bucket支持的预置ACL列表
BucketCannedAcls []string `json:"bucket_canned_acls"`
// Object支持的预置ACL列表
ObjectCannedAcls []string `json:"object_canned_acls"`
}

View File

@@ -51,11 +51,12 @@ const (
CITY_FU_ZHOU = "Fuzhou" //福州
CITY_WU_HAN = "Wuhan" //武汉
CITY_CHANG_SHA = "Changsha" //长沙
CITY_SHU_ZHOU = "Shuzhou" //苏州
CITY_SU_ZHOU = "Suzhou" //苏州
CITY_BAO_DING = "Baoding" //保定
CITY_NAN_JING = "Nanjing" //南京
CITY_FO_SHAN = "Foshan" //佛山
CITY_QUAN_ZHOU = "Quanzhou" //泉州
CITY_NEI_MENG_GU = "Neimenggu" //内蒙古
// 日本
CITY_TOKYO = "Tokyo" //东京
@@ -111,6 +112,7 @@ const (
CITY_US_GOV_WEST = "us-gov-west" //???
CITY_SOUTH_CAROLINA = "South Carolina" //南卡罗来纳州
CITY_SALT_LAKE_CITY = "Salt Lake City" //盐湖城
CITY_LAS_VEGAS = "Las Vegas" //拉斯维加斯
// 英国
CITY_LONDON = "London" //伦敦
@@ -149,6 +151,12 @@ const (
// 巴西
CITY_SAO_PAULO = "Sao Paulo" //圣保罗
// 智利
CITY_SANTIAGO = "Santiago" // 圣地亚哥
// 墨西哥
CITY_MEXICO = "Mexico" // 墨西哥
// 荷兰
CITY_HOLLAND = "Holland" //荷兰
@@ -194,4 +202,6 @@ const (
COUNTRY_CODE_VN = "VN" //越南
COUNTRY_CODE_CH = "CH" //瑞士
COUNTRY_CODE_NO = "NO" //挪威
COUNTRY_CODE_MX = "MX" //墨西哥
COUNTRY_CODE_CL = "CL" //智利
)

View File

@@ -101,7 +101,7 @@ type DBInstanceCreateInput struct {
// | ----- | ------ | --- |
// | 华为云 |ha, single, replica| |
// | 阿里云 |basic, high_availability, always_on, finance||
// | Google |SECOND_GEN | FIRST_GEN 目前谷歌已弃用|
// | Google |Zonal, Regional | |
// 翻译:
// basic: 基础版
// high_availability: 高可用
@@ -110,7 +110,8 @@ type DBInstanceCreateInput struct {
// ha: 高可用
// single: 单机
// replica: 只读
// SECNOD_GEN: 第二代
// Zonal: 单区域
// Regional: 区域级
// required: true
Category string `json:"category"`
@@ -170,9 +171,22 @@ type SDBInstanceChangeConfigInput struct {
type SDBInstanceRecoveryConfigInput struct {
apis.Meta
DBInstancebackup string
DBInstancebackupId string `json:"dbinstancebackup_id"`
Databases map[string]string `json:"databases,allowempty"`
// swagger:ignore
DBInstancebackup string `json:"dbinstancebackup" yunion-deprecated-by:"dbinstancebackup_id"`
// 备份Id
//
//
// | 平台 | 支持引擎 | 说明 |
// | ----- | ------ | --- |
// | 华为云 |MySQL, SQL Server | 仅SQL Server支持恢复到当前实例 |
// | 阿里云 |MySQL, SQL Server | MySQL要求必须开启单库单表恢复功能 并且只能是MySQL 8.0 高可用版本地SSD盘MySQL 5.7 高可用版本地SSD盘或MySQL 5.6 高可用版, MySQL仅支持恢复到当前实例|
// | Google |MySQL, PostgreSQL, SQL Server | PostgreSQL备份恢复时要求实例不能有副本 |
DBInstancebackupId string `json:"dbinstancebackup_id"`
// 数据库信息, 例如 {"src":"dest"} 是将备份中的src数据库恢复到目标实例的dest数据库中, 阿里云此参数为必传
// example: {"sdb1":"ddb1"}
Databases map[string]string `json:"databases,allowempty"`
}
type DBInstanceListInput struct {
@@ -313,7 +327,7 @@ type DBInstanceResourceInput struct {
// swagger:ignore
// Deprecated
DBInstanceId string `json:"dbinstance_id" "yunion:deprecated-by":"dbinstance"`
DBInstanceId string `json:"dbinstance_id" yunion-deprecated-by:"dbinstance"`
}
type DBInstanceFilterListInputBase struct {

View File

@@ -70,21 +70,24 @@ type SDBInstanceSetPrivilegesInput struct {
type DBInstancePrivilege struct {
// 数据库名称
Database string
Database string `json:"database"`
// 账号名称
Account string
Account string `json:"account"`
// 数据库Id
DBInstancedatabaseId string
DBInstancedatabaseId string `json:"dbinstancedatabase_id"`
// 权限
Privileges string
Privileges string `json:"privileges"`
}
type DBInstanceAccountDetails struct {
apis.StatusStandaloneResourceDetails
apis.ProjectizedResourceInfo
DBInstanceResourceInfo
SDBInstanceAccount
// 账号权限列表
DBInstanceprivileges []DBInstancePrivilege `json:"dbinstanceprivileges,allowempty"`
ProjectId string `json:"tenant_id"`
}

View File

@@ -16,19 +16,20 @@ package compute
const (
//实例状态
DBINSTANCE_DEPLOYING = "deploying" //部署中
DBINSTANCE_RUNNING = "running" //运行中
DBINSTANCE_REBOOTING = "rebooting" //重启中
DBINSTANCE_MIGRATING = "migrating" //迁移中
DBINSTANCE_BACKING_UP = "backing_up" //备份中
DBINSTANCE_RESTORING = "restoring" //备份恢复中
DBINSTANCE_RESTORE_FAILED = "restore_failed"
DBINSTANCE_IMPORTING = "importing" //数据导入中
DBINSTANCE_CLONING = "cloning" //克隆
DBINSTANCE_DELETING = "deleting" //删除
DBINSTANCE_DELETE_FAILED = "delete_failed" //删除失败
DBINSTANCE_MAINTENANCE = "maintenance" //维护中
DBINSTANCE_UNKNOWN = "unknown"
DBINSTANCE_DEPLOYING = "deploying" //部署中
DBINSTANCE_RUNNING = "running" //运行中
DBINSTANCE_REBOOTING = "rebooting" //重启中
DBINSTANCE_MIGRATING = "migrating" //迁移中
DBINSTANCE_BACKING_UP = "backing_up" //备份中
DBINSTANCE_BACKING_UP_FAILED = "backing_up_failed" //备份失败
DBINSTANCE_RESTORING = "restoring" //备份恢复中
DBINSTANCE_RESTORE_FAILED = "restore_failed"
DBINSTANCE_IMPORTING = "importing" //数据导入
DBINSTANCE_CLONING = "cloning" //克隆
DBINSTANCE_DELETING = "deleting" //删除
DBINSTANCE_DELETE_FAILED = "delete_failed" //删除失败
DBINSTANCE_MAINTENANCE = "maintenance" //维护中
DBINSTANCE_UNKNOWN = "unknown"
DBINSTANCE_CHANGE_CONFIG = "change_config" //调整配置
DBINSTANCE_CHANGE_CONFIG_FAILED = "change_config_failed" //调整配置失败
@@ -103,6 +104,10 @@ const (
HUAWEI_DBINSTANCE_CATEGORY_SINGLE = "single" //单机
HUAWEI_DBINSTANCE_CATEGORY_REPLICA = "replica" //只读
//谷歌云实例类型
GOOGLE_DBINSTANCE_CATEGORY_REGIONAL = "Regional" // 高可用性(区域级)
GOOGLE_DBINSTANCE_CATEGORY_ZONAL = "Zonal" // 单个地区
//阿里云存储类型
ALIYUN_DBINSTANCE_STORAGE_TYPE_LOCAL_SSD = "local_ssd" //本地盘SSD盘
ALIYUN_DBINSTANCE_STORAGE_TYPE_CLOUD_ESSD = "cloud_essd" //ESSD云盘

View File

@@ -63,12 +63,14 @@ type DBInstanceDatabaseCreateInput struct {
type DBInstancedatabaseDetails struct {
apis.StatusStandaloneResourceDetails
apis.ProjectizedResourceInfo
DBInstanceResourceInfo
SDBInstanceDatabase
// 数据库权限
DBInstanceprivileges []DBInstancePrivilege `json:"dbinstanceprivileges"`
ProjectId string `json:"tenant_id"`
}
type DBInstanceparameterDetails struct {

View File

@@ -88,7 +88,7 @@ type SnapshotPolicyResourceInput struct {
// swagger:ignore
// Deprecated
// filter disk by snapshotpolicy_id
SnapshotpolicyId string `json:"snapshotpolicy_id" "yunion:deprecated-by":"snapshotpolicy"`
SnapshotpolicyId string `json:"snapshotpolicy_id" yunion-deprecated-by:"snapshotpolicy"`
}
type SnapshotPolicyFilterListInput struct {
@@ -113,7 +113,7 @@ type DiskListInput struct {
// swagger:ignore
// Deprecated
// filter by disk type
Type string `json:"type" "yunion:deprecated-by":"disk_type"`
Type string `json:"type" yunion-deprecated-by:"disk_type"`
// 过滤指定disk_type的磁盘列表可能的值为sys, data, swap. volume
//
// | disk_type值 | 说明 |
@@ -137,13 +137,13 @@ type DiskListInput struct {
Template string `json:"template"`
// swagger:ignore
// Deprecated
TemplateId string `json:"template_id" "yunion:deprecated-by":"template"`
TemplateId string `json:"template_id" yunion-deprecated-by:"template"`
// 快照
Snapshot string `json:"snapshot"`
// swagger:ignore
// Deprecated
SnapshotId string `json:"snapshot_id" "yunion:deprecated-by":"snapshot"`
SnapshotId string `json:"snapshot_id" yunion-deprecated-by:"snapshot"`
}
type DiskResourceInput struct {
@@ -152,7 +152,7 @@ type DiskResourceInput struct {
// swagger:ignore
// Deprecated
// filter by disk_id
DiskId string `json:"disk_id" "yunion:deprecated-by":"disk"`
DiskId string `json:"disk_id" yunion-deprecated-by:"disk"`
}
type DiskFilterListInputBase struct {

View File

@@ -55,4 +55,7 @@ const (
DISK_BACKING_IMAGE = "image"
DISK_SIZE_AUTOEXTEND = -1
DISK_NOT_EXIST = "not_exist"
DISK_EXIST = "exist"
)

View File

@@ -14,5 +14,11 @@
package compute
import "yunion.io/x/onecloud/pkg/apis"
type DnsRecordCreateInput struct {
apis.AdminSharableVirtualResourceBaseCreateInput
}
type DnsRecordUpdateInput struct {
}

View File

@@ -53,7 +53,7 @@ type ELasticcacheResourceInput struct {
// swagger:ignore
// Deprecated
ElasticcacheId string `json:"elasticcache_id" "yunion:deprecated-by":"elasticcache"`
ElasticcacheId string `json:"elasticcache_id" yunion-deprecated-by:"elasticcache"`
}
type ElasticcacheFilterListInput struct {
@@ -69,16 +69,20 @@ type ElasticcacheFilterListInput struct {
type ElasticcacheAccountDetails struct {
apis.StatusStandaloneResourceDetails
apis.ProjectizedResourceInfo
ElasticcacheResourceInfo
SElasticcacheAccount
ProjectId string `json:"tenant_id"`
}
type ElasticcacheAclDetails struct {
apis.StandaloneResourceDetails
apis.ProjectizedResourceInfo
ElasticcacheResourceInfo
SElasticcacheAcl
ProjectId string `json:"tenant_id"`
}
type ElasticcacheParameterDetails struct {

View File

@@ -18,7 +18,9 @@ import "yunion.io/x/onecloud/pkg/apis"
type ElasticcacheBackupDetails struct {
apis.StatusStandaloneResourceDetails
apis.ProjectizedResourceInfo
ElasticcacheResourceInfo
SElasticcacheBackup
ProjectId string `json:"tenant_id"`
}

View File

@@ -16,9 +16,16 @@ package compute
import "yunion.io/x/onecloud/pkg/apis"
const (
EXTERNAL_PROJECT_STATUS_AVAILABLE = "available" // 可用
EXTERNAL_PROJECT_STATUS_UNAVAILABLE = "unavailable" // 不可用
EXTERNAL_PROJECT_STATUS_CREATING = "creating" // 创建中
EXTERNAL_PROJECT_STATUS_DELETING = "deleting" // 删除中
EXTERNAL_PROJECT_STATUS_UNKNOWN = "unknown" // 未知
)
type ExternalProjectDetails struct {
apis.StandaloneResourceDetails
apis.ProjectizedResourceInfo
apis.VirtualResourceDetails
ManagedResourceInfo
SExternalProject

View File

@@ -24,15 +24,15 @@ type CloudregionResourceInput struct {
// swagger:ignore
// Deprecated
// description: this param will be deprecate at 3.0
CloudregionId string `json:"cloudregion_id" "yunion:deprecated-by":"cloudregion"`
CloudregionId string `json:"cloudregion_id" yunion-deprecated-by:"cloudregion"`
// swagger:ignore
// Deprecated
// description: this param will be deprecate at 3.0
Region string `json:"region" "yunion:deprecated-by":"cloudregion"`
Region string `json:"region" yunion-deprecated-by:"cloudregion"`
// swagger:ignore
// Deprecated
// description: this param will be deprecate at 3.0
RegionId string `json:"region_id" "yunion:deprecated-by":"cloudregion"`
RegionId string `json:"region_id" yunion-deprecated-by:"cloudregion"`
}
type RegionalFilterListInput struct {
@@ -64,6 +64,23 @@ type ZonalFilterListBase struct {
OrderByZone string `json:"order_by_zone"`
}
func (input ZonalFilterListBase) ZoneList() []string {
zoneStr := input.Zone
if len(zoneStr) > 0 {
input.Zones = append(input.Zones, zoneStr)
}
return input.Zones
}
func (input ZonalFilterListBase) FirstZone() string {
if len(input.Zone) > 0 {
return input.Zone
}
if len(input.Zones) > 0 {
return input.Zones[0]
}
return ""
}
func (input ZonalFilterListInput) ZoneList() []string {
zoneStr := input.Zone
if len(zoneStr) > 0 {
@@ -117,5 +134,5 @@ type ZoneResourceInput struct {
// swagger:ignore
// Deprecated
ZoneId string `json:"zone_id" "yunion:deprecated-by":"zone"`
ZoneId string `json:"zone_id" yunion-deprecated-by:"zone"`
}

View File

@@ -26,6 +26,9 @@ type GlobalVpcDetails struct {
apis.EnabledStatusInfrasResourceBaseDetails
SGlobalVpc
// vpc数量
VpcCount int `json:"vpc_count"`
}
type GlobalVpcResourceInfo struct {
@@ -39,7 +42,7 @@ type GlobalVpcResourceInput struct {
// swagger:ignore
// Deprecated
GlobalvpcId string `json:"globalvpc_id" "yunion:deprecated-by":"globalvpc"`
GlobalvpcId string `json:"globalvpc_id" yunion-deprecated-by:"globalvpc"`
}
type GlobalVpcResourceListInput struct {

View File

@@ -135,6 +135,7 @@ const (
VM_CONVERT = "convert"
VM_CONVERTING = "converting"
VM_CONVERT_FAILED = "convert_failed"
VM_CONVERTED = "converted"
SHUTDOWN_STOP = "stop"
SHUTDOWN_TERMINATE = "terminate"

View File

@@ -20,13 +20,14 @@ type GuestnetworkDetails struct {
SGuestnetwork
// IP子网名称
Network string
Network string `json:"network"`
}
type GuestnetworkShortDesc struct {
// IP地址
IpAddr string `json:"ip_addr"`
// 是否为外网网卡
// Deprecated
IsExit bool `json:"is_exit"`
// IPv6地址
Ip6Addr string `json:"ip6_addr"`
@@ -34,6 +35,10 @@ type GuestnetworkShortDesc struct {
Mac string `json:"mac"`
// Bonding的配对网卡MAC
TeamWith string `json:"team_with"`
// 所属Vpc
VpcId string `json:"vpc_id"`
// 所属Network
NetworkId string `json:"network_id"`
}
type GuestnetworkListInput struct {

View File

@@ -30,13 +30,13 @@ type ServerListInput struct {
HostFilterListInput
NetworkFilterListInput `"yunion:ambiguous-prefix":"vpc_"`
NetworkFilterListInput `yunion-ambiguous-prefix:"vpc_"`
billing.BillingResourceListInput
GroupFilterListInput
SecgroupFilterListInput
DiskFilterListInput
//DiskFilterListInput `yunion-ambiguous-prefix:"storage_"`
ScalingGroupFilterListInput
// 只列出裸金属主机
@@ -63,11 +63,16 @@ type ServerListInput struct {
// 列出可以挂载指定EIP的主机
UsableServerForEip string `json:"usable_server_for_eip"`
// 列出可以挂载磁盘的主机
AttachableServersForDisk string `json:"attachable_servers_for_disk"`
// Deprecated:列出可以挂载磁盘的主机
Disk string `json:"disk" yunion-deprecated-by:"attachable_servers_for_disk"`
// 按主机资源类型进行排序
// enum: shared,prepaid,dedicated
ResourceType string `json:"resource_type"`
// 返回开启主备机功能的主
GetBackupGuestsOnHost *bool `json:"get_backup_guests_on_host"`
// 返回该宿主机上的所有虚拟机,包括备份
GetAllGuestsOnHost string `json:"get_all_guests_on_host"`
// 根据宿主机 SN 过滤
// HostSn string `json:"host_sn"`
@@ -262,15 +267,15 @@ type ServerResourceInput struct {
// swagger:ignore
// Deprecated
// Filter by guest Id
ServerId string `json:"server_id" "yunion:deprecated-by":"server"`
ServerId string `json:"server_id" yunion-deprecated-by:"server"`
// swagger:ignore
// Deprecated
// Filter by guest Id
Guest string `json:"guest" "yunion:deprecated-by":"server"`
Guest string `json:"guest" yunion-deprecated-by:"server"`
// swagger:ignore
// Deprecated
// Filter by guest Id
GuestId string `json:"guest_id" "yunion:deprecated-by":"server"`
GuestId string `json:"guest_id" yunion-deprecated-by:"server"`
}
type ServerFilterListInput struct {

View File

@@ -57,6 +57,7 @@ type GuestTemplateDetails struct {
Secgroups []string `json:"secgroups"`
Zone string `json:"zone"`
ZoneId string `json:"zone_id"`
Brand string `json:"brand"`
ConfigInfo GuestTemplateConfigInfo `json:"config_info"`
@@ -71,9 +72,7 @@ type GuestTemplateListInput struct {
}
type GuestTemplateConfigInfo struct {
Region string `json:"region"`
Zone string `json:"zone"`
Hypervisor string `json:"hypervisor"`
Metadata map[string]string `json:"metadata"`
Secgroup string `json:"secgroup"`
Sku GuestTemplateSku `json:"sku"`
Disks []GuestTemplateDisk `json:"disks"`

View File

@@ -138,11 +138,15 @@ type HostDetails struct {
NonsystemGuests int `json:"nonsystem_guests"`
// 运行中云主机数量
// example: 2
RunningGuests int `json:"running_geusts"`
RunningGuests int `json:"running_guests"`
// CPU超分率
CpuCommitRate float64 `json:"cpu_commit_rate"`
// 内存超分率
MemCommitRate float64 `json:"mem_commit_rate"`
// CPU超售比
CpuCommitBound float32 `json:"cpu_commit_bound"`
// 内存超售比
MemCommitBound float32 `json:"mem_commint_bound"`
// 存储大小
Storage int64 `json:"storage"`
// 已使用存储大小
@@ -159,6 +163,9 @@ type HostDetails struct {
IsPrepaidRecycle bool `json:"is_prepaid_recycle"`
CanPrepare bool `json:"can_prepare"`
PrepareFailReason string `json:"prepare_fail_reason"`
// 允许开启宿主机健康检查
AllowHealthCheck bool `json:"allow_health_check"`
AutoMigrateOnHostDown bool `json:"auto_migrate_on_host_down"`
// 标签
Metadata map[string]string `json:"metadata"`
@@ -217,7 +224,7 @@ type HostResourceInput struct {
// swagger:ignore
// Deprecated
// filter by host_id
HostId string `json:"host_id" "yunion:deprecated-by":"host"`
HostId string `json:"host_id" yunion-deprecated-by:"host"`
}
type HostRegisterMetadata struct {
@@ -245,19 +252,19 @@ type HostAccessAttributes struct {
type HostSizeAttributes struct {
// CPU核数
CpuCount int `json:"cpu_count"`
CpuCount *int `json:"cpu_count"`
// 物理CPU颗数
NodeCount int8 `json:"node_count"`
NodeCount *int8 `json:"node_count"`
// CPU描述信息
CpuDesc string `json:"cpu_desc"`
// CPU频率
CpuMhz int `json:"cpu_mhz"`
CpuMhz *int `json:"cpu_mhz"`
// CPU缓存大小,单位KB
CpuCache string `json:"cpu_cache"`
// 预留CPU大小
CpuReserved int `json:"cpu_reserved"`
CpuReserved *int `json:"cpu_reserved"`
// CPU超分比
CpuCmtbound float32 `json:"cpu_cmtbound"`
CpuCmtbound *float32 `json:"cpu_cmtbound"`
// CPUMicrocode
CpuMicrocode string `json:"cpu_microcode"`
// CPU架构
@@ -268,10 +275,10 @@ type HostSizeAttributes struct {
// 预留内存大小(单位MB)
MemReserved string `json:"mem_reserved"`
// 内存超分比
MemCmtbound float32 `json:"mem_cmtbound"`
MemCmtbound *float32 `json:"mem_cmtbound"`
// 存储大小,单位Mb
StorageSize int `json:"storage_size"`
StorageSize *int `json:"storage_size"`
// 存储类型
StorageType string `json:"storage_type"`
// 存储驱动类型

View File

@@ -123,3 +123,9 @@ const (
BOOT_MODE_PXE = "pxe"
BOOT_MODE_ISO = "iso"
)
const (
HOST_HEALTH_PREFIX = "/onecloud/kvm/host/health"
HOST_HEALTH_STATUS_RUNNING = "running"
HOST_HEALTH_LOCK_PREFIX = "host-health"
)

View File

@@ -21,7 +21,7 @@ type HostJointResourceDetailsBase struct {
Host string `json:"host"`
// 裸金属服务器名称
// Deprecated
Baremetal string `json:"baremetal" "yunion:deprecated-by":"host"`
Baremetal string `json:"baremetal" yunion-deprecated-by:"host"`
}
type HostJointResourceDetails struct {

View File

@@ -66,8 +66,7 @@ type CachedimageListInput struct {
}
type ExternalProjectListInput struct {
apis.StandaloneResourceListInput
apis.ProjectizedResourceListInput
apis.VirtualResourceListInput
apis.ExternalizedResourceBaseListInput
ManagedResourceListInput
@@ -150,7 +149,7 @@ type GuestTemplateFilterListInput struct {
GuestTemplate string `json:"guest_template"`
// swagger:ignore
// Deprecated
GuestTemplateId string `json:"guest_template_id" "yunion:deprecated-by":"guest_template"`
GuestTemplateId string `json:"guest_template_id" yunion-deprecated-by:"guest_template"`
}
type ServiceCatalogListInput struct {

View File

@@ -50,7 +50,7 @@ type GroupResourceInput struct {
// swagger:ignore
// Deprecated
// Filter by instance group Id
GroupId string `json:"group_id" "yunion:deprecated-by":"group"`
GroupId string `json:"group_id" yunion-deprecated-by:"group"`
}
type GroupFilterListInput struct {

View File

@@ -54,3 +54,24 @@ type IsolatedDeviceListInput struct {
// 设备VENDOE编号
VendorDeviceId []string `json:"vendor_device_id"`
}
type IsolatedDeviceCreateInput struct {
apis.StandaloneResourceCreateInput
HostResourceInput
// 设备类型USB/GPU
// example: GPU
DevType string `json:"dev_type"`
// 设备型号
// # Specific device name read from lspci command, e.g. `Tesla K40m` ...
Model string `json:"model"`
// PCI地址
// # pci address of `Bus:Device.Function` format, or usb bus address of `bus.addr`
Addr string `json:"addr"`
// 设备VendorId
VendorDeviceId string `json:"vendor_device_id"`
}

View File

@@ -48,6 +48,8 @@ type LoadbalancerListenerListInput struct {
Scheduler []string `json:"scheduler"`
Certificate []string `json:"certificate_id"`
SendProxy []string `json:"send_proxy"`
AclStatus []string `json:"acl_status"`
@@ -164,7 +166,13 @@ type LoadbalancerAclListInput struct {
type LoadbalancerDetails struct {
apis.VirtualResourceDetails
VpcResourceInfo
ManagedResourceInfo
CloudregionResourceInfo
LoadbalancerClusterResourceInfo
VpcResourceInfoBase
ZoneResourceInfoBase
NetworkResourceInfoBase
@@ -202,7 +210,7 @@ type LoadbalancerResourceInput struct {
// swagger:ignore
// Deprecated
LoadbalancerId string `json:"loadbalancer_id" "yunion:deprecated-by":"loadbalancer"`
LoadbalancerId string `json:"loadbalancer_id" yunion-deprecated-by:"loadbalancer"`
}
type LoadbalancerFilterListInput struct {

View File

@@ -39,7 +39,7 @@ type LoadbalancerBackendGroupResourceInput struct {
// swagger:ignore
// Deprecated
BackendGroupId string `json:"backend_group_id" "yunion:deprecated-by":"backend_group"`
BackendGroupId string `json:"backend_group_id" yunion-deprecated-by:"backend_group"`
}
type LoadbalancerBackendGroupFilterListInput struct {

View File

@@ -45,7 +45,7 @@ type LoadbalancerClusterResourceInput struct {
// swagger:ignore
// Deprecated
ClusterId string `json:"cluster_id" "yunion:deprecated-by":"cluster"`
ClusterId string `json:"cluster_id" yunion-deprecated-by:"cluster"`
}
type LoadbalancerClusterFilterListInput struct {

View File

@@ -45,7 +45,7 @@ type LoadbalancerListenerResourceInput struct {
// 负载均衡监听器ID
// swagger:ignore
// Deprecated
ListenerId string `json:"listener_id" "yunion:deprecated-by":"listener"`
ListenerId string `json:"listener_id" yunion-deprecated-by:"listener"`
}
type LoadbalancerListenerFilterListInput struct {

View File

@@ -89,7 +89,7 @@ type NatGatewayResourceInput struct {
// swagger:ignore
// Deprecated
NatgatewayId string `json:"natgateway_id" "yunion:deprecated-by":"natgateway"`
NatgatewayId string `json:"natgateway_id" yunion-deprecated-by:"natgateway"`
}
type NatGatewayFilterListInput struct {

View File

@@ -24,7 +24,7 @@ type WireResourceInput struct {
// swagger:ignore
// Deprecated
// fitler by wire id
WireId string `json:"wire_id" "yunion:deprecated-by":"wire"`
WireId string `json:"wire_id" yunion-deprecated-by:"wire"`
}
type WireFilterListBase struct {
@@ -47,7 +47,7 @@ type NetworkResourceInput struct {
// swagger:ignore
// Deprecated
// filter by networkId
NetworkId string `json:"network_id" "yunion:deprecated-by":"network"`
NetworkId string `json:"network_id" yunion-deprecated-by:"network"`
}
type NetworkFilterListBase struct {
@@ -65,16 +65,21 @@ type NetworkFilterListInput struct {
type NetworkListInput struct {
apis.SharableVirtualResourceListInput
apis.ExternalizedResourceBaseListInput
SchedtagResourceInput
WireFilterListInput
HostResourceInput
UsableResourceListInput
// description: search ip address in network.
// description: Exact matching ip address in network.
// example: 10.168.222.1
Ip string `json:"ip"`
// description: Fuzzy matching ip address in network.
// example: 10.168.222.1
IpMatch string `json:"ip_match"`
IfnameHint []string `json:"ifname_hint"`
// 起始IP地址
GuestIpStart []string `json:"guest_ip_start"`

View File

@@ -56,10 +56,11 @@ const (
TIMER_TYPE_MONTH = "month"
// 加入中 和 加入失败 的不算是 ScalingGroup 的机器
SG_GUEST_STATUS_JOINING = "joining" // 加入中
SG_GUEST_STATUS_READY = "ready" // 正常
SG_GUEST_STATUS_REMOVING = "removing" // 移除中
SG_GUEST_STATUS_REMOVE_FAILED = "remove_failed" // 移除失败
SG_GUEST_STATUS_JOINING = "joining" // 加入中
SG_GUEST_STATUS_READY = "ready" // 正常
SG_GUEST_STATUS_REMOVING = "removing" // 移除中
SG_GUEST_STATUS_REMOVE_FAILED = "remove_failed" // 移除失败
SG_GUEST_STATUS_PENDING_REMOVE = "pending_remove" // 机器进入回收站
// 只有ready状态是正常的
SG_STATUS_READY = "ready" // 正常

View File

@@ -134,9 +134,15 @@ type ScalingGroupDetails struct {
// example: OneCloud
Brand string `json:"brand"`
// description: 网络ID
// example: net-12345
Networks []string `json:"networks"`
// description: 网络信息
Networks []ScalingGroupNetwork `json:"networks"`
}
type ScalingGroupNetwork struct {
Id string `json:"id"`
Name string `json:"name"`
GuestIpStart string `json:"guest_ip_start"`
GuestIpEnd string `json:"guest_ip_end"`
}
type ScalingGroupResourceInfo struct {

View File

@@ -17,7 +17,7 @@ package compute
import "yunion.io/x/onecloud/pkg/apis"
type ScalingPolicyDetails struct {
apis.StatusStandaloneResourceDetails
apis.VirtualResourceDetails
ScalingGroupResourceInfo
SScalingPolicy
// 定时方式触发
@@ -29,7 +29,7 @@ type ScalingPolicyDetails struct {
}
type ScalingPolicyCreateInput struct {
apis.StandaloneResourceCreateInput
apis.VirtualResourceCreateInput
apis.EnabledBaseResourceCreateInput
// description: scaling_group ID or Name
@@ -67,7 +67,7 @@ type ScalingPolicyCreateInput struct {
}
type ScalingPolicyListInput struct {
apis.StatusStandaloneResourceListInput
apis.VirtualResourceListInput
apis.EnabledResourceBaseListInput
// description: scaling group

View File

@@ -45,7 +45,7 @@ type SchedtagResourceInput struct {
// swagger:ignore
// Deprecated
// filter by schedtag_id
SchedtagId string `json:"schedtag_id" "yunion:deprecated-by":"schedtag"`
SchedtagId string `json:"schedtag_id" yunion-deprecated-by:"schedtag"`
}
type SchedtagFilterListInput struct {
@@ -69,7 +69,7 @@ type SchedtagListInput struct {
// swagger:ignore
// Deprecated
// filter by type, alias for resource_type
Type string `json:"type" "yunion:deprecated-by":"resource_type"`
Type string `json:"type" yunion-deprecated-by:"resource_type"`
DefaultStrategy []string `json:"default_strategy"`
}

View File

@@ -145,8 +145,18 @@ type SecgroupListInput struct {
// pattern:asc|desc
OrderByGuestCnt string `json:"order_by_guest_cnt"`
// 是否被修改
IsDirty *bool `json:"is_dirty"`
// 模糊过滤规则中含有指定ip的安全组
// example: 10.10.2.1
Ip string `json:"ip"`
// 精确匹配规则中含有指定端口的安全组
// example: 100-200
Ports string `json:"ports"`
// 指定过滤规则的方向(仅在指定ip或ports时生效) choices: all|in|out
// default: all
// example: in
Direction string `json:"direction"`
}
type SecurityGroupCacheListInput struct {
@@ -164,12 +174,18 @@ type SecurityGroupRuleListInput struct {
apis.ResourceBaseListInput
SecgroupFilterListInput
Projects []string `json:"projects"`
// 以direction字段过滤安全组规则
Direction string `json:"direction"`
// 以action字段过滤安全组规则
Action string `json:"action"`
// 以protocol字段过滤安全组规则
Protocol string `json:"protocol"`
// 以ports字段过滤安全组规则
Ports string `json:"ports"`
// 根据ip模糊匹配安全组规则
Ip string `json:"ip"`
}
type SecgroupResourceInput struct {
@@ -178,7 +194,10 @@ type SecgroupResourceInput struct {
// swagger:ignore
// Deprecated
// filter by secgroup_id
SecgroupId string `json:"secgroup_id" "yunion:deprecated-by":"secgroup"`
SecgroupId string `json:"secgroup_id" yunion-deprecated-by:"secgroup"`
// 模糊匹配安全组规则名称
SecgroupName string `json:"secgroup_name"`
}
type SecgroupFilterListInput struct {
@@ -193,15 +212,22 @@ type SecgroupDetails struct {
SSecurityGroup
// 关联云主机数量
GuestCnt int `json:"guest_cnt"`
GuestCnt int `json:"guest_cnt,allowempty"`
// 关联此安全组的云主机is_system为true数量
SystemGuestCnt int `json:"system_guest_cnt,allowempty"`
// admin_secgrp_id为此安全组的云主机数量
AdminGuestCnt int `json:"admin_guest_cnt,allowempty"`
// 安全组缓存数量
CacheCnt int `json:"cache_cnt"`
CacheCnt int `json:"cache_cnt,allowempty"`
// 规则信息
Rules string `json:"rules"`
Rules []SSecurityGroupRule `json:"rules"`
// 入方向规则信息
InRules string `json:"in_rules"`
InRules []SSecurityGroupRule `json:"in_rules"`
// 出方向规则信息
OutRules string `json:"out_rules"`
OutRules []SSecurityGroupRule `json:"out_rules"`
}
type SecurityGroupResourceInfo struct {
@@ -213,3 +239,12 @@ type GuestsecgroupListInput struct {
GuestJointsListInput
SecgroupFilterListInput
}
type GuestsecgroupDetails struct {
GuestJointResourceDetails
SGuestsecgroup
// 安全组名称
Secgroup string `json:"secgroup"`
}

View File

@@ -18,6 +18,9 @@ import "yunion.io/x/onecloud/pkg/apis"
type SecgroupRuleDetails struct {
apis.ResourceBaseDetails
apis.ProjectizedResourceInfo
SSecurityGroupRule
SecurityGroupResourceInfo
ProjectId string `json:"tenant_id"`
}

View File

@@ -77,6 +77,12 @@ type ServerSkuListInput struct {
MemorySizeMb int `json:"memory_size_mb"`
// filter sku by CPU core count
CpuCoreCount []int `json:"cpu_core_count"`
// 后付费状态
PostpaidStatus string `json:"postpaid_status"`
// 预付费状态
PrepaidStatus string `json:"prepaid_status"`
}
type ElasticcacheSkuListInput struct {

View File

@@ -52,4 +52,7 @@ const (
SNAPSHOT_POLICY_CACHE_STATUS_READY = "ready"
SNAPSHOT_POLICY_CACHE_STATUS_DELETING = "deleting"
SNAPSHOT_POLICY_CACHE_STATUS_DELETE_FAILED = "delete_failed"
SNAPSHOT_EXIST = "exist"
SNAPSHOT_NOT_EXIST = "not_exist"
)

Some files were not shown because too many files have changed in this diff Show More