Compare commits

..

599 Commits

Author SHA1 Message Date
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
1392 changed files with 35349 additions and 82912 deletions

View File

@@ -13,7 +13,7 @@ jobs:
- checkout
- run:
command: |
make -j3 check
make check
build:
requires:
- check
@@ -38,7 +38,7 @@ jobs:
command: |
targets="$(circleci tests glob "cmd/*" | grep -v cmd/host-image | circleci tests split)"
echo $targets | tr ' ' '\n'
make -j3 $targets
make $targets
ls -lh _output/bin/
- save_cache:
key: onecloud-build-cache-{{ checksum "go.mod" }}-{{ checksum "Makefile" }}
@@ -55,7 +55,6 @@ jobs:
environment:
GO111MODULE: "on"
working_directory: /root/go/onecloud
parallelism: 4
steps:
- checkout
- restore_cache:

View File

@@ -36,7 +36,7 @@ jobs:
make cmd/ansibleserver cmd/cloudnet cmd/notify
make cmd/host-deployer && ./scripts/bundle_libraries.sh _output/bin/bundles/host-deployer _output/bin/host-deployer
make cmd/baremetal-agent && ./scripts/bundle_libraries.sh _output/bin/bundles/baremetal-agent _output/bin/baremetal-agent
make cmd/cloudevent cmd/devtool cmd/cloudid
make cmd/cloudevent cmd/devtool
make cmd/*cli
make cmd/esxi-agent
make docker-alpine-build F='-j4 cmd/host cmd/vpcagent cmd/region-dns'
@@ -211,16 +211,6 @@ jobs:
snapshot: true
dockerfile: build/docker/Dockerfile.cloudevent
- name: Image cloudid
uses: elgohr/Publish-Docker-Github-Action@master
with:
name: registry.cn-beijing.aliyuncs.com/yunionio/cloudid
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
registry: registry.cn-beijing.aliyuncs.com
snapshot: true
dockerfile: build/docker/Dockerfile.cloudid
- name: Image devtool
uses: elgohr/Publish-Docker-Github-Action@master
with:

2
.gitignore vendored
View File

@@ -35,5 +35,3 @@ GPATH
GRTAGS
GTAGS
pkg/generated
*.orig

View File

@@ -163,15 +163,9 @@ goimports-check:
fi
.PHONY: goimports-check
vet-check:
./scripts/vet.sh gen
./scripts/vet.sh chk
.PHONY: vet-check
check: fmt-check
check: gendocgo-check
check: goimports-check
check: vet-check
.PHONY: check

View File

@@ -1,7 +1,7 @@
# Yunion OneCloud
[![CircleCI](https://circleci.com/gh/yunionio/onecloud.svg?style=svg)](https://circleci.com/gh/yunionio/onecloud)
[![Build Status](https://travis-ci.com/yunionio/onecloud.svg?branch=master)](https://travis-ci.com/yunionio/onecloud/branches)
[![Build Status](https://travis-ci.com/yunionio/onecloud.svg?branch=master)](https://travis-ci.org/yunionio/onecloud)
[![Go Report Card](https://goreportcard.com/badge/github.com/yunionio/onecloud)](https://goreportcard.com/report/github.com/yunionio/onecloud)
### [README in Chinese](./README-CN.md)
@@ -40,7 +40,7 @@ Please refers to [install & deployment](https://docs.yunion.io/docs/setup/) (cur
- [Yunion OneCloud Documents](https://docs.yunion.io/)
- [Swagger API](https://docs.yunion.cn/apiv2/)
- [Swagger API](https://docs.yunion.cn/api/)
## Architecture

View File

@@ -1 +0,0 @@
DESCRIPTION="Yunion CloudId"

View File

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

View File

@@ -1,12 +1,13 @@
FROM alpine:3.11.6
FROM frolvlad/alpine-glibc:glibc-2.28
MAINTAINER "Yousong Zhou <zhouyousong@yunionyun.com>"
MAINTAINER "Zexi Li <lizexi@yunionyun.com>"
# openssh-client, for ansible ssh connection
# git, ca-certificates, for fetching ansible roles
RUN set -x \
&& apk update \
&& apk add openssh-client \
&& apk add ansible \
&& apk add tzdata git ca-certificates \
&& rm -rf /var/cache/apk/*
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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@@ -1,4 +1,4 @@
FROM registry.cn-beijing.aliyuncs.com/yunionio/host-base:v0.2.0
FROM registry.cn-beijing.aliyuncs.com/yunionio/host-base:v0.1.0
MAINTAINER "Yaoqi Wan wanyaoqi@yunionyun.com"

View File

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

View File

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

View File

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

View File

@@ -1,4 +1,4 @@
FROM registry.cn-beijing.aliyuncs.com/yunionio/onecloud-base:v0.1
FROM registry.cn-beijing.aliyuncs.com/yunionio/onecloud-base:latest
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 curl busybox-extras tcpdump strace ca-certificates && \
apk add --no-cache tzdata 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:v0.1
FROM registry.cn-beijing.aliyuncs.com/yunionio/onecloud-base:latest
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:v0.1
FROM registry.cn-beijing.aliyuncs.com/yunionio/onecloud-base:latest
ADD ./_output/bin/s3gateway /opt/yunion/bin/s3gateway

View File

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

View File

@@ -1,4 +1,4 @@
FROM registry.cn-beijing.aliyuncs.com/yunionio/openvswitch:2.10.4-0
FROM registry.cn-beijing.aliyuncs.com/yunionio/openvswitch:2.9.6-1
MAINTAINER "Yousong Zhou <zhouyousong@yunion.cn>"

View File

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

View File

@@ -11,7 +11,7 @@
<table style="margin-left: 20px;">
<tr>
<td>
<img src="data:{{.login_logo_format}};base64,{{.login_logo}}" alt="" style="color: #fff; height: 32px; vertical-align: middle;">
<img src="data:{{.logo_format}};base64,{{.logo}}" alt="" style="color: #fff; width: 80px; vertical-align: middle;">
</td>
</tr>
</table>
@@ -43,23 +43,23 @@
<table style="padding: 20px 10px; width: 100%;">
<tr>
<td style="padding-bottom: 20px;">
尊敬的{{.name}},您好:
亲爱的{{.name}},您好:
</td>
</tr>
<tr>
<td style="padding-bottom: 10px;">请点击下面的链接,完成用户邮箱的激活:</td>
</tr>
<tr>
<td style="padding-bottom: 30px;"><a href="{{.link}}">{{.link}}</a></td>
<td style="padding-bottom: 30px;"><a href="{{.link}}">{{.link}}</a></td>
</tr>
</table>
</td>
</tr>
<tr style="width: 96%;">
<td colspan="2" style="border-top: 1px dashed #ccc; color: #333; font-size: 12px; padding-bottom: 10px; font-weight: 100;">*为了确保您的帐号安全该链接仅48小时内访问有效请勿直接回复此邮件。</td>
<td colspan="2" style="border-top: 1px dashed #ccc; color: #ccc; font-size: 12px; padding-bottom: 10px; font-weight: 100;">*为了确保您的帐号安全该链接仅48小时内访问有效请勿直接回复此邮件。</td>
</tr>
<tr>
<td colspan="2" style="background: #333; text-align: right; padding-right: 20px; font-size: 12px; color: #fff; height: 50px;">版权所有 © {{.copyright}} 保留一切权利</td>
<td colspan="2" style="background: #333; text-align: right; padding-right: 20px; font-size: 12px; color: #949494; height: 50px;">版权所有 © {{.copyright}} 保留一切权利</td>
</tr>
</table>
</body>

View File

@@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
package entry
package main
import (
"context"
@@ -32,6 +32,10 @@ import (
"yunion.io/x/onecloud/cmd/climc/promputils"
"yunion.io/x/onecloud/cmd/climc/shell"
_ "yunion.io/x/onecloud/cmd/climc/shell/cloudnet"
_ "yunion.io/x/onecloud/cmd/climc/shell/etcd"
_ "yunion.io/x/onecloud/cmd/climc/shell/k8s"
_ "yunion.io/x/onecloud/cmd/climc/shell/monitor"
"yunion.io/x/onecloud/pkg/mcclient"
)
@@ -45,7 +49,7 @@ type BaseOptions struct {
CertFile string `default:"$YUNION_CERT_FILE" help:"certificate file"`
KeyFile string `default:"$YUNION_KEY_FILE" help:"private key file"`
Completion string `default:"" help:"Generate climc auto complete script" choices:"bash|zsh"`
Completion string `default:"" help:"Generate climc auto complete script" choices:"bash"`
UseCachedToken bool `default:"$YUNION_USE_CACHED_TOKEN|false" help:"Use cached token"`
OsUsername string `default:"$OS_USERNAME" help:"Username, defaults to env[OS_USERNAME]"`
@@ -58,8 +62,6 @@ type BaseOptions struct {
OsAccessKey string `default:"$OS_ACCESS_KEY" help:"ak/sk access key, defaults to env[OS_ACCESS_KEY]"`
OsSecretKey string `default:"$OS_SECRET_KEY" help:"ak/s secret, defaults to env[OS_SECRET_KEY]"`
OsAuthToken string `default:"$OS_AUTH_TOKEN" help:"token authenticate, defaults to env[OS_AUTH_TOKEN]"`
OsAuthURL string `default:"$OS_AUTH_URL" help:"Defaults to env[OS_AUTH_URL]"`
OsRegionName string `default:"$OS_REGION_NAME" help:"Defaults to env[OS_REGION_NAME]"`
@@ -71,13 +73,9 @@ type BaseOptions struct {
}
func getSubcommandsParser() (*structarg.ArgumentParser, error) {
var (
prog = "climc"
desc = `Command-line interface to the API server.`
)
parse, e := structarg.NewArgumentParser(&BaseOptions{},
prog,
desc,
"climc",
`Command-line interface to the API server.`,
`See "climc help COMMAND" for help on a specific command.`)
if e != nil {
return nil, e
@@ -98,28 +96,26 @@ func getSubcommandsParser() (*structarg.ArgumentParser, error) {
return nil
}
})
promptRootCmd := promputils.InitRootCmd(prog, desc, parse.GetOptArgs(), parse.GetPosArgs())
for _, v := range shell.CommandTable {
_par, e := subcmd.AddSubParser(v.Options, v.Command, v.Desc, v.Callback)
if e != nil {
return nil, e
}
promputils.AppendCommand(promptRootCmd, v.Command, v.Desc)
promputils.AppendCommand(v.Command, v.Desc)
cmd := v.Command
for _, v := range _par.GetOptArgs() {
text := v.String()
text = strings.TrimLeft(text, "[<")
text = strings.TrimRight(text, "]>")
promputils.AppendOpt(cmd, text, v.HelpString(""), v)
promputils.AppendOpt(cmd, text, v.HelpString(""))
}
for _, v := range _par.GetPosArgs() {
text := v.String()
text = strings.TrimLeft(text, "[<")
text = strings.TrimRight(text, "]>")
promputils.AppendPos(cmd, text, v.HelpString(""), v)
promputils.AppendPos(cmd, text, v.HelpString(""))
}
}
return parse, nil
@@ -135,8 +131,8 @@ func newClientSession(options *BaseOptions) (*mcclient.ClientSession, error) {
if len(options.OsAuthURL) == 0 {
return nil, fmt.Errorf("Missing OS_AUTH_URL")
}
if len(options.OsUsername) == 0 && len(options.OsAccessKey) == 0 && len(options.OsAuthToken) == 0 {
return nil, fmt.Errorf("Missing OS_USERNAME or OS_ACCESS_KEY or OS_AUTH_TOKEN")
if len(options.OsUsername) == 0 && len(options.OsAccessKey) == 0 {
return nil, fmt.Errorf("Missing OS_USERNAME or OS_ACCESS_KEY")
}
if len(options.OsUsername) > 0 && len(options.OsPassword) == 0 {
return nil, fmt.Errorf("Missing OS_PASSWORD")
@@ -144,6 +140,9 @@ func newClientSession(options *BaseOptions) (*mcclient.ClientSession, error) {
if len(options.OsAccessKey) > 0 && len(options.OsSecretKey) == 0 {
return nil, fmt.Errorf("Missing OS_SECRET_KEY")
}
if len(options.OsRegionName) == 0 {
return nil, fmt.Errorf("Missing OS_REGION_NAME")
}
logLevel := "info"
if options.Debug {
@@ -186,11 +185,7 @@ func newClientSession(options *BaseOptions) (*mcclient.ClientSession, error) {
if cacheToken == nil {
var token mcclient.TokenCredential
var err error
if len(options.OsAuthToken) > 0 {
token, err = client.AuthenticateToken(options.OsAuthToken, options.OsProjectName,
options.OsProjectDomain,
mcclient.AuthSourceCli)
} else if len(options.OsAccessKey) > 0 {
if len(options.OsAccessKey) > 0 {
token, err = client.AuthenticateByAccessKey(options.OsAccessKey,
options.OsSecretKey, mcclient.AuthSourceCli)
} else {
@@ -266,7 +261,7 @@ func executeSubcommand(
}
}
func ClimcMain() {
func main() {
parser, e := getSubcommandsParser()
if e != nil {
showErrorAndExit(e)
@@ -275,7 +270,7 @@ func ClimcMain() {
options := parser.Options().(*BaseOptions)
if len(options.Completion) > 0 {
completeScript := promputils.GenerateAutoCompleteCmds(promputils.GetRootCmd(), options.Completion)
completeScript := promputils.GenerateAutoCompleteCmds(options.Completion)
if len(completeScript) > 0 {
fmt.Printf("%s", completeScript)
}

View File

@@ -1,15 +0,0 @@
// 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 entry // import "yunion.io/x/onecloud/cmd/climc/entry"

View File

@@ -1,42 +0,0 @@
// 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 main
import (
"yunion.io/x/onecloud/cmd/climc/entry"
_ "yunion.io/x/onecloud/cmd/climc/shell"
_ "yunion.io/x/onecloud/cmd/climc/shell/ansible"
_ "yunion.io/x/onecloud/cmd/climc/shell/cloudevent"
_ "yunion.io/x/onecloud/cmd/climc/shell/cloudid"
_ "yunion.io/x/onecloud/cmd/climc/shell/cloudnet"
_ "yunion.io/x/onecloud/cmd/climc/shell/compute"
_ "yunion.io/x/onecloud/cmd/climc/shell/etcd"
_ "yunion.io/x/onecloud/cmd/climc/shell/events"
_ "yunion.io/x/onecloud/cmd/climc/shell/identity"
_ "yunion.io/x/onecloud/cmd/climc/shell/image"
_ "yunion.io/x/onecloud/cmd/climc/shell/itsm"
_ "yunion.io/x/onecloud/cmd/climc/shell/k8s"
_ "yunion.io/x/onecloud/cmd/climc/shell/logger"
_ "yunion.io/x/onecloud/cmd/climc/shell/meter"
_ "yunion.io/x/onecloud/cmd/climc/shell/misc"
_ "yunion.io/x/onecloud/cmd/climc/shell/monitor"
_ "yunion.io/x/onecloud/cmd/climc/shell/notify"
_ "yunion.io/x/onecloud/cmd/climc/shell/servicetree"
_ "yunion.io/x/onecloud/cmd/climc/shell/yunionconf"
)
func main() {
entry.ClimcMain()
}

View File

@@ -1,178 +0,0 @@
// 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 promputils
import (
"fmt"
"io"
"strings"
"text/template"
"yunion.io/x/structarg"
)
// ref: https://github.com/spf13/cobra/blob/master/zsh_completions.go
var (
zshCompFuncMap = template.FuncMap{
"genZshFuncName": zshCompGenFuncName,
"extractFlags": zshCompExtractFlag,
"genFlagEntryForZshArguments": zshCompGenFlagEntryForArguments,
"extractArgsCompletions": zshCompExtractArgumentCompletionHintsForRendering,
}
zshCompletionText = `
{{/* should accept Command (that contains subcommands) as parameter */}}
{{define "argumentsC" -}}
{{ $cmdPath := genZshFuncName .}}
function {{$cmdPath}} {
local -a commands
_arguments -C \{{- range extractFlags .}}
{{genFlagEntryForZshArguments .}} \{{- end}}
"1: :->cmnds" \
"*::arg:->args"
case $state in
cmnds)
commands=({{range .SubCmds}}
"{{.Name}}:{{.Desc}}"{{end}}
)
_describe "command" commands
;;
esac
case "$words[1]" in {{- range .SubCmds}}
{{.Name}})
{{$cmdPath}}_{{.Name}}
;;{{end}}
esac
}
{{range .SubCmds}}
{{template "selectCmdTemplate" .}}
{{- end}}
{{- end}}
{{/* should accept Command without subcommands as parameter */}}
{{define "arguments" -}}
function {{genZshFuncName .}} {
{{" _arguments"}}{{range extractFlags .}} \
{{genFlagEntryForZshArguments . -}}
{{end}}{{range extractArgsCompletions .}} \
{{.}}{{end}}
}
{{end}}
{{/* dispatcher for commands with or without subcommands */}}
{{define "selectCmdTemplate" -}}
{{if .SubCmds}}{{template "argumentsC" .}}{{else}}{{template "arguments" .}}{{end}}
{{- end}}
{{/* template entry point */}}
{{define "Main" -}}
#compdef _{{.Name}} {{.Name}}
{{template "selectCmdTemplate" .}}
compdef _{{.Name}} {{.Name}}
{{end}}
`
)
func zshCompGenFuncName(c *Cmd) string {
if c.ParentCmd != nil {
return zshCompGenFuncName(c.ParentCmd) + "_" + c.Name
}
return "_" + c.Name
}
func zshCompExtractFlag(c *Cmd) []structarg.Argument {
return c.GetArguments()
}
func zshCompGenFlagEntryForArguments(f structarg.Argument) string {
// not process positional argument and single command
if f.IsPositional() {
return ""
}
if f.ShortToken() == "" {
return zshCompGenFlagEntryForSingleOptionFlag(f)
}
return zshCompGenFlagEntryForMultiOptionFlag(f)
}
func zshCompGenFlagEntryForSingleOptionFlag(f structarg.Argument) string {
var option, multiMark, extras string
if f.IsMulti() {
multiMark = "*"
}
option = "--" + f.Token()
extras = zshCompGenFlagEntryExtras(f)
return fmt.Sprintf(`'%s%s[%s]%s'`, multiMark, option, zshCompQuoteFlagDescription(f.HelpString("")), extras)
}
func zshCompGenFlagEntryForMultiOptionFlag(f structarg.Argument) string {
var options, parenMultiMark, curlyMultiMark, extras string
if f.IsMulti() {
parenMultiMark = "*"
curlyMultiMark = "\\*"
}
options = fmt.Sprintf(`'(%s-%s %s--%s)'{%s-%s,%s--%s}`,
parenMultiMark, f.ShortToken(), parenMultiMark, f.Token(), curlyMultiMark, f.ShortToken(), curlyMultiMark, f.Token())
extras = zshCompGenFlagEntryExtras(f)
return fmt.Sprintf(`%s'[%s]%s'`, options, zshCompQuoteFlagDescription(f.HelpString("")), extras)
}
func zshCompGenFlagEntryExtras(f structarg.Argument) string {
if !f.NeedData() {
return ""
}
// allow options for flag
extras := ":"
type iChoices interface {
Choices() []string
}
if hasChoices, ok := f.(iChoices); ok {
// process choices
var words []string
for _, w := range hasChoices.Choices() {
words = append(words, fmt.Sprintf("%q", w))
}
if len(words) != 0 {
extras = fmt.Sprintf("%s :(%s)", extras, strings.Join(words, " "))
}
}
return extras
}
func zshCompQuoteFlagDescription(s string) string {
s = strings.Replace(s, "'", `'\''`, -1)
s = strings.Replace(s, "[", `\[`, -1)
s = strings.Replace(s, "]", `\]`, -1)
return s
}
func zshCompExtractArgumentCompletionHintsForRendering(c *Cmd) []string {
return nil
}
func (c *Cmd) GenZshCompletion(w io.Writer) error {
tmpl, err := template.New("Main").Funcs(zshCompFuncMap).Parse(zshCompletionText)
if err != nil {
return fmt.Errorf("error creating zsh completion template: %v", err)
}
return tmpl.Execute(w, c.Root())
}

View File

@@ -75,3 +75,33 @@ _climc(){
do
line="${arr[$i]}"
allopts[count]=${line%s`
const ZSH_COMPLETE_SCRIPT_2 = `%"#"*}
subopts[count]=${line#*"#"}
((count++))
done
_arguments \
'1: :->commands'\
'*: :->options'
case $state in
commands)
_arguments '1:Comm:(${allopts[*]})'
;;
*)
item=1
for key in ${allopts[*]}
do
case $words[2] in
$key)
compadd "$@"` + "`echo $subopts[item]`" + `
;;
*)
;;
esac
((item++))
done
esac
}
_climc "$@"
`

View File

@@ -15,118 +15,26 @@
package promputils
import (
"bytes"
"fmt"
"regexp"
"strings"
prompt "github.com/c-bata/go-prompt"
"yunion.io/x/structarg"
)
var (
subcmds = make(map[string]*Cmd)
rootCmd *Cmd
)
type Cmd struct {
desc string
optArgs []prompt.Suggest
posArgs []prompt.Suggest
}
var cmds = make(map[string]*Cmd)
var optionHelp = []prompt.Suggest{
{Text: "-h"},
{Text: "--help"},
}
type Cmd struct {
Name string
Desc string
optArgs []CmdArgument
posArgs []CmdArgument
ParentCmd *Cmd
SubCmds []*Cmd
}
func InitRootCmd(name, desc string, optArgs, posArgs []structarg.Argument) *Cmd {
rootCmd = NewCmd(name, desc)
for _, optA := range optArgs {
rootCmd.AddOptArgument(optA, optA.Token(), optA.HelpString(""))
}
for _, posA := range posArgs {
rootCmd.AddPosArgument(posA, posA.Token(), posA.HelpString(""))
}
return rootCmd
}
func GetRootCmd() *Cmd {
return rootCmd
}
func NewCmd(name, desc string) *Cmd {
return &Cmd{
Name: name,
Desc: desc,
optArgs: make([]CmdArgument, 0),
posArgs: make([]CmdArgument, 0),
SubCmds: make([]*Cmd, 0),
}
}
func (c Cmd) getPromptSuggests(args []CmdArgument) []prompt.Suggest {
ret := make([]prompt.Suggest, 0)
for _, arg := range args {
ret = append(ret, arg.Suggest)
}
return ret
}
func (c *Cmd) Root() *Cmd {
if c.ParentCmd == nil {
return c
}
return c.ParentCmd.Root()
}
func (c Cmd) GetName() string {
return c.Name
}
func (c *Cmd) AddCmd(cmd *Cmd) {
c.SubCmds = append(c.SubCmds, cmd)
}
func (c Cmd) GetPromptOptSuggests() []prompt.Suggest {
return c.getPromptSuggests(c.optArgs)
}
func (c Cmd) GetPromptPosSuggests() []prompt.Suggest {
return c.getPromptSuggests(c.posArgs)
}
func (c Cmd) GetOptArguments() []structarg.Argument {
return c.getArguments(c.optArgs)
}
func (c Cmd) GetArguments() []structarg.Argument {
ret := c.GetOptArguments()
ret = append(ret, c.GetPosArguments()...)
return ret
}
func (c Cmd) GetPosArguments() []structarg.Argument {
return c.getArguments(c.posArgs)
}
func (c Cmd) getArguments(args []CmdArgument) []structarg.Argument {
ret := make([]structarg.Argument, 0)
for _, a := range args {
ret = append(ret, a.Argument)
}
return ret
}
type CmdArgument struct {
Suggest prompt.Suggest
Argument structarg.Argument
}
func optionCompleter(args []string, long bool) []prompt.Suggest {
l := len(args)
if l == 0 {
@@ -139,11 +47,11 @@ func optionCompleter(args []string, long bool) []prompt.Suggest {
return optionHelp
}
if subcmds[args[0]] == nil {
if cmds[args[0]] == nil {
return []prompt.Suggest{}
}
_cmd := subcmds[args[0]].GetPromptOptSuggests()
_cmd := cmds[args[0]].optArgs
return prompt.FilterContains(_cmd, strings.TrimLeft(args[l-1], "-"), true)
}
@@ -192,7 +100,7 @@ func argumentsCompleter(args []string) []prompt.Suggest {
if len(args) == 1 {
return prompt.FilterHasPrefix(commands, args[0], true)
}
_cmd, ok := subcmds[args[0]]
_cmd, ok := cmds[args[0]]
if !ok {
return []prompt.Suggest{}
}
@@ -203,75 +111,48 @@ func argumentsCompleter(args []string) []prompt.Suggest {
prm := _cmd.posArgs[len(args)-2]
subcommands := []prompt.Suggest{
prm.Suggest,
prm,
}
return prompt.FilterHasPrefix(subcommands, args[len(args)-1], true)
}
func AppendCommand(parentCmd *Cmd, text, desc string) {
func AppendCommand(text, desc string) {
commands = append(commands, prompt.Suggest{Text: text, Description: desc})
cmd := &Cmd{
Name: text,
Desc: desc,
posArgs: make([]CmdArgument, 0),
optArgs: make([]CmdArgument, 0),
ParentCmd: parentCmd,
}
subcmds[text] = cmd
parentCmd.AddCmd(cmd)
cmds[text] = &Cmd{}
cmds[text].desc = desc
cmds[text].posArgs = []prompt.Suggest{}
cmds[text].optArgs = []prompt.Suggest{}
}
func (c *Cmd) addArgument(target *[]CmdArgument, arg structarg.Argument, argStr string, desc string) {
*target = append(*target, CmdArgument{
Suggest: prompt.Suggest{
Text: argStr,
Description: desc,
},
Argument: arg,
})
func AppendPos(text, cmd, desc string) {
var v = []prompt.Suggest{{Text: cmd, Description: desc}}
cmds[text].posArgs = append(cmds[text].posArgs, v...)
}
func (c *Cmd) AddPosArgument(arg structarg.Argument, argStr string, desc string) {
c.addArgument(&c.posArgs, arg, argStr, desc)
func AppendOpt(text, cmd, desc string) {
var v = []prompt.Suggest{{Text: cmd, Description: desc}}
cmds[text].optArgs = append(cmds[text].optArgs, v...)
}
func (c *Cmd) AddOptArgument(arg structarg.Argument, argStr string, desc string) {
c.addArgument(&c.optArgs, arg, argStr, desc)
}
func AppendPos(text, cmd, desc string, arg structarg.Argument) {
cmdObj := subcmds[text]
cmdObj.AddPosArgument(arg, cmd, desc)
}
func AppendOpt(text, cmd, desc string, arg structarg.Argument) {
cmdObj := subcmds[text]
cmdObj.AddOptArgument(arg, cmd, desc)
}
func GenerateAutoCompleteCmds(rootCmd *Cmd, shell string) string {
func GenerateAutoCompleteCmds(shell string) string {
var ret = []string{}
var i = 0
if strings.ToLower(shell) == "zsh" {
out := bytes.NewBufferString("")
if err := rootCmd.GenZshCompletion(out); err != nil {
panic(err)
}
return out.String()
i = 1
}
for _, cmd := range subcmds {
for cmd, options := range cmds {
var (
strPosArgs = []string{}
strOptArgs = []string{}
)
for _, posArg := range cmd.GetPromptPosSuggests() {
for _, posArg := range options.posArgs {
strPosArgs = append(strPosArgs, posArg.Text)
}
for _, optArg := range cmd.GetPromptOptSuggests() {
for _, optArg := range options.optArgs {
strOptArgs = append(strOptArgs, strings.Split(optArg.Text, " ")[0])
}
ret = append(ret, fmt.Sprintf(`arr[%d]="%s# %s %s"`, i, cmd.Name,
ret = append(ret, fmt.Sprintf(`arr[%d]="%s# %s %s"`, i, cmd,
strings.Join(strPosArgs, " "), strings.Join(strOptArgs, " ")))
i += 1
}

View File

@@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
package meter
package shell
import (
"yunion.io/x/jsonutils"

View File

@@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
package logger
package shell
import (
"fmt"

View File

@@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
package servicetree
package shell
import (
"yunion.io/x/jsonutils"

View File

@@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
package servicetree
package shell
import (
"fmt"

View File

@@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
package servicetree
package shell
import (
"yunion.io/x/jsonutils"

View File

@@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
package servicetree
package shell
import (
"strings"

View File

@@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
package ansible
package shell
import (
"fmt"

View File

@@ -1,32 +0,0 @@
// 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 ansible
import (
"yunion.io/x/onecloud/cmd/climc/shell"
"yunion.io/x/onecloud/pkg/util/printutils"
)
var (
R = shell.R
printList = printutils.PrintJSONList
printObject = printutils.PrintJSONObject
printBatchResults = printutils.PrintJSONBatchResults
InvalidUpdateError = shell.InvalidUpdateError
printObjectRecursive = printutils.PrintJSONObjectRecursive
exportList = shell.ExportList
)

View File

@@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
package ansible
package shell
import (
"yunion.io/x/jsonutils"

View File

@@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
package ansible
package shell
import (
"yunion.io/x/onecloud/pkg/mcclient"
@@ -49,34 +49,4 @@ func init() {
printList(apbs, modules.AnsiblePlaybooksV2.GetColumns(s))
return nil
})
R(&AnsiblePlaybookV2IdOptions{}, "ansibleplaybookv2-run", "Run ansible playbook",
func(s *mcclient.ClientSession, opts *AnsiblePlaybookV2IdOptions) error {
apb, err := modules.AnsiblePlaybooksV2.PerformAction(s, opts.ID, "run", nil)
if err != nil {
return err
}
printObject(apb)
return nil
},
)
R(&AnsiblePlaybookV2IdOptions{}, "ansibleplaybookv2-stop", "Stop ansible playbook",
func(s *mcclient.ClientSession, opts *AnsiblePlaybookV2IdOptions) error {
apb, err := modules.AnsiblePlaybooksV2.PerformAction(s, opts.ID, "stop", nil)
if err != nil {
return err
}
printObject(apb)
return nil
},
)
R(&AnsiblePlaybookV2IdOptions{}, "ansibleplaybookv2-delete", "Delete ansible playbook",
func(s *mcclient.ClientSession, opts *AnsiblePlaybookV2IdOptions) error {
apb, err := modules.AnsiblePlaybooksV2.Delete(s, opts.ID, nil)
if err != nil {
return err
}
printObject(apb)
return nil
},
)
}

View File

@@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
package meter
package shell
import (
"yunion.io/x/onecloud/pkg/mcclient"

View File

@@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
package compute
package shell
import (
"yunion.io/x/jsonutils"

View File

@@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
package logger
package shell
import (
"yunion.io/x/jsonutils"

View File

@@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
package compute
package shell
import (
"yunion.io/x/jsonutils"

View File

@@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
package compute
package shell
import (
"yunion.io/x/jsonutils"

View File

@@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
package meter
package shell
import (
"yunion.io/x/jsonutils"

View File

@@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
package meter
package shell
import (
"yunion.io/x/jsonutils"

View File

@@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
package meter
package shell
import (
"yunion.io/x/jsonutils"

View File

@@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
package meter
package shell
import (
"yunion.io/x/jsonutils"

View File

@@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
package meter
package shell
import (
"yunion.io/x/jsonutils"

View File

@@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
package meter
package shell
import (
"yunion.io/x/jsonutils"

View File

@@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
package meter
package shell
import (
"yunion.io/x/jsonutils"

View File

@@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
package meter
package shell
import (
"yunion.io/x/jsonutils"

View File

@@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
package compute
package shell
import (
"fmt"
@@ -26,7 +26,7 @@ import (
"yunion.io/x/onecloud/pkg/mcclient/modulebase"
"yunion.io/x/onecloud/pkg/mcclient/modules"
"yunion.io/x/onecloud/pkg/mcclient/options"
"yunion.io/x/onecloud/pkg/multicloud/objectstore"
objectshell "yunion.io/x/onecloud/pkg/multicloud/objectstore"
)
func init() {
@@ -188,7 +188,7 @@ func init() {
StorageClass string `help:"storage CLass"`
Acl string `help:"object acl." choices:"private|public-read|public-read-write"`
objectstore.ObjectHeaderOptions
objectshell.ObjectHeaderOptions
}
R(&BucketUploadObjectsOptions{}, "bucket-object-upload", "Upload an object into a bucket", func(s *mcclient.ClientSession, args *BucketUploadObjectsOptions) error {
var body io.Reader
@@ -325,7 +325,7 @@ func init() {
Key []string `help:"Optional object key" json:"key"`
objectstore.ObjectHeaderOptions
objectshell.ObjectHeaderOptions
}
R(&BucketSetMetadataOptions{}, "bucket-set-metadata", "Set metadata of object", func(s *mcclient.ClientSession, args *BucketSetMetadataOptions) error {
input := api.BucketMetadataInput{}

View File

@@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
package compute
package shell
import (
"yunion.io/x/onecloud/pkg/mcclient"

View File

@@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
package compute
package shell
import (
"yunion.io/x/onecloud/pkg/mcclient"

View File

@@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
package meter
package shell
import (
"yunion.io/x/jsonutils"

View File

@@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
package compute
package shell
import (
"fmt"
@@ -125,22 +125,6 @@ func init() {
printObject(result)
return nil
})
type SVMwareCloudAccountPrepareNetsOptions struct {
Project string `help:"project for this account"`
ProjectDomain string `help:"domain for this account"`
NAME string `help:"name for this account"`
options.SVMwareCredentialWithEnvironment
}
R(&SVMwareCloudAccountPrepareNetsOptions{}, "cloud-account-preparenets-vmware", "Prepare networks for a VMware cloud account before create this accout", func(s *mcclient.ClientSession, args *SVMwareCloudAccountPrepareNetsOptions) error {
params := jsonutils.Marshal(args)
params.(*jsonutils.JSONDict).Add(jsonutils.NewString("VMware"), "provider")
result, err := modules.Cloudaccounts.PerformClassAction(s, "prepare-nets", params)
if err != nil {
return err
}
printObject(result)
return nil
})
R(&options.SAliyunCloudAccountCreateOptions{}, "cloud-account-create-aliyun", "Create an Aliyun cloud account", func(s *mcclient.ClientSession, args *options.SAliyunCloudAccountCreateOptions) error {
params := jsonutils.Marshal(args)

View File

@@ -1,25 +0,0 @@
// 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 cloudevent
import (
"yunion.io/x/onecloud/cmd/climc/shell"
"yunion.io/x/onecloud/pkg/util/printutils"
)
var (
R = shell.R
printList = printutils.PrintJSONList
)

View File

@@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
package cloudevent
package shell
import (
"yunion.io/x/onecloud/pkg/mcclient"

View File

@@ -1,168 +0,0 @@
// 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 cloudid
import (
"yunion.io/x/jsonutils"
"yunion.io/x/onecloud/pkg/mcclient"
"yunion.io/x/onecloud/pkg/mcclient/modules"
"yunion.io/x/onecloud/pkg/mcclient/options"
)
func init() {
type CloudgroupListOptions struct {
options.BaseListOptions
ClouduserId string `json:"clouduser_id"`
CloudpolicyId string `json:"cloudpolicy_id"`
Usable bool `json:"usable"`
}
R(&CloudgroupListOptions{}, "cloud-group-list", "List cloud groups", func(s *mcclient.ClientSession, opts *CloudgroupListOptions) error {
params, err := options.ListStructToParams(opts)
if err != nil {
return err
}
result, err := modules.Cloudgroups.List(s, params)
if err != nil {
return err
}
printList(result, modules.Cloudgroups.GetColumns(s))
return nil
})
type CloudgroupCreateOptions struct {
NAME string `json:"name"`
PROVIDER string `json:"provider" choices:"Google|Aliyun|Aws|Huawei|Qcloud"`
CloudpolicyIds []string `json:"cloudpolicy_ids"`
Desc string `json:"description"`
}
R(&CloudgroupCreateOptions{}, "cloud-group-create", "Create cloud group", func(s *mcclient.ClientSession, opts *CloudgroupCreateOptions) error {
params := jsonutils.Marshal(opts)
result, err := modules.Cloudgroups.Create(s, params)
if err != nil {
return err
}
printObject(result)
return nil
})
type CloudgroupIdOptions struct {
ID string `help:"Cloudgroup Id"`
}
R(&CloudgroupIdOptions{}, "cloud-group-delete", "Delete cloud group", func(s *mcclient.ClientSession, opts *CloudgroupIdOptions) error {
result, err := modules.Cloudgroups.Delete(s, opts.ID, nil)
if err != nil {
return err
}
printObject(result)
return nil
})
R(&CloudgroupIdOptions{}, "cloud-group-show", "Show cloud group", func(s *mcclient.ClientSession, opts *CloudgroupIdOptions) error {
result, err := modules.Cloudgroups.Get(s, opts.ID, nil)
if err != nil {
return err
}
printObject(result)
return nil
})
R(&CloudgroupIdOptions{}, "cloud-group-syncstatus", "Sync cloud group status", func(s *mcclient.ClientSession, opts *CloudgroupIdOptions) error {
result, err := modules.Cloudgroups.PerformAction(s, opts.ID, "syncstatus", nil)
if err != nil {
return err
}
printObject(result)
return nil
})
type CloudgroupPolicyOptions struct {
ID string `help:"Cloudgroup Id"`
CLOUDPOLICY_ID string `help:"Cloudpolicy Id"`
}
R(&CloudgroupPolicyOptions{}, "cloud-group-attach-policy", "Attach policy for cloud group", func(s *mcclient.ClientSession, opts *CloudgroupPolicyOptions) error {
result, err := modules.Cloudgroups.PerformAction(s, opts.ID, "attach-policy", jsonutils.Marshal(opts))
if err != nil {
return err
}
printObject(result)
return nil
})
R(&CloudgroupPolicyOptions{}, "cloud-group-detach-policy", "Detach policy from cloud group", func(s *mcclient.ClientSession, opts *CloudgroupPolicyOptions) error {
result, err := modules.Cloudgroups.PerformAction(s, opts.ID, "detach-policy", jsonutils.Marshal(opts))
if err != nil {
return err
}
printObject(result)
return nil
})
type CloudgroupUserOptions struct {
ID string `help:"Cloudgroup Id"`
CLOUDUSER_ID string `help:"Clouduser Id"`
}
R(&CloudgroupUserOptions{}, "cloud-group-add-user", "Add user to cloud group", func(s *mcclient.ClientSession, opts *CloudgroupUserOptions) error {
result, err := modules.Cloudgroups.PerformAction(s, opts.ID, "add-user", jsonutils.Marshal(opts))
if err != nil {
return err
}
printObject(result)
return nil
})
R(&CloudgroupUserOptions{}, "cloud-group-remove-user", "Remove user from cloud group", func(s *mcclient.ClientSession, opts *CloudgroupUserOptions) error {
result, err := modules.Cloudgroups.PerformAction(s, opts.ID, "remove-user", jsonutils.Marshal(opts))
if err != nil {
return err
}
printObject(result)
return nil
})
type CloudgroupPoliciesOptions struct {
ID string `help:"Cloudgroup Id"`
CloudpolicyIds []string `json:"cloudpolicy_ids"`
}
R(&CloudgroupPoliciesOptions{}, "cloud-group-set-policies", "Set cloudpolicies for cloud group", func(s *mcclient.ClientSession, opts *CloudgroupPoliciesOptions) error {
result, err := modules.Cloudgroups.PerformAction(s, opts.ID, "set-policies", jsonutils.Marshal(opts))
if err != nil {
return err
}
printObject(result)
return nil
})
type CloudgroupUsersOptions struct {
ID string `help:"Cloudgroup Id"`
ClouduserIds []string `json:"clouduser_ids"`
}
R(&CloudgroupUsersOptions{}, "cloud-group-set-users", "Set users for cloud group", func(s *mcclient.ClientSession, opts *CloudgroupUsersOptions) error {
result, err := modules.Cloudgroups.PerformAction(s, opts.ID, "set-users", jsonutils.Marshal(opts))
if err != nil {
return err
}
printObject(result)
return nil
})
}

View File

@@ -1,73 +0,0 @@
// 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 cloudid
import (
"yunion.io/x/onecloud/pkg/mcclient"
"yunion.io/x/onecloud/pkg/mcclient/modules"
"yunion.io/x/onecloud/pkg/mcclient/options"
)
func init() {
type CloudgroupcacheListOptions struct {
options.BaseListOptions
CloudgroupId string `json:"cloudgroup_id"`
}
R(&CloudgroupcacheListOptions{}, "cloud-group-cache-list", "List cloud group caches", func(s *mcclient.ClientSession, opts *CloudgroupcacheListOptions) error {
params, err := options.ListStructToParams(opts)
if err != nil {
return err
}
result, err := modules.Cloudgroupcaches.List(s, params)
if err != nil {
return err
}
printList(result, modules.Cloudgroupcaches.GetColumns(s))
return nil
})
type CloudgroupcacheIdOption struct {
ID string `help:"Cloudgroup Id"`
}
R(&CloudgroupcacheIdOption{}, "cloud-group-cache-show", "Show cloud groupcache details", func(s *mcclient.ClientSession, opts *CloudgroupcacheIdOption) error {
result, err := modules.Cloudgroupcaches.Get(s, opts.ID, nil)
if err != nil {
return err
}
printObject(result)
return nil
})
R(&CloudgroupcacheIdOption{}, "cloud-group-cache-syncstatus", "Sync cloudgroupcache", func(s *mcclient.ClientSession, opts *CloudgroupcacheIdOption) error {
result, err := modules.Cloudgroupcaches.PerformAction(s, opts.ID, "syncstatus", nil)
if err != nil {
return err
}
printObject(result)
return nil
})
R(&CloudgroupcacheIdOption{}, "cloud-group-cache-delete", "Delete cloudgroupcache", func(s *mcclient.ClientSession, opts *CloudgroupcacheIdOption) error {
result, err := modules.Cloudgroupcaches.Delete(s, opts.ID, nil)
if err != nil {
return err
}
printObject(result)
return nil
})
}

View File

@@ -1,72 +0,0 @@
// 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 cloudid
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 CloudgroupPolicyListOptions struct {
options.BaseListOptions
Cloudgroup string `help:"ID or Name of Cloudgroup"`
Cloudpolicy string `help:"Policy ID or name"`
}
R(&CloudgroupPolicyListOptions{}, "cloud-group-policy-list", "List cloudgroup cloudpolicy pairs", func(s *mcclient.ClientSession, args *CloudgroupPolicyListOptions) 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.Cloudgroup) > 0 {
result, err = modules.Cloudgrouppolicies.ListDescendent(s, args.Cloudgroup, params)
} else if len(args.Cloudpolicy) > 0 {
result, err = modules.Cloudgrouppolicies.ListDescendent2(s, args.Cloudpolicy, params)
} else {
result, err = modules.Cloudgrouppolicies.List(s, params)
}
if err != nil {
return err
}
printList(result, modules.Cloudgrouppolicies.GetColumns(s))
return nil
})
type CloudgroupPolicyDetailOptions struct {
CLOUDUSER string `help:"ID or Name of Cloudgroup"`
CLOUDPOLICY string `help:"ID or Name of Cloudpolicy"`
}
R(&CloudgroupPolicyDetailOptions{}, "cloud-group-policy-show", "Show cloudgrouppolicy details", func(s *mcclient.ClientSession, args *CloudgroupPolicyDetailOptions) error {
query := jsonutils.NewDict()
result, err := modules.Cloudgrouppolicies.Get(s, args.CLOUDUSER, args.CLOUDPOLICY, query)
if err != nil {
return err
}
printObject(result)
return nil
})
}

View File

@@ -1,72 +0,0 @@
// 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 cloudid
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 CloudgroupUserListOptions struct {
options.BaseListOptions
Cloudgroup string `help:"ID or Name of Cloudgroup"`
Clouduser string `help:"User ID or name"`
}
R(&CloudgroupUserListOptions{}, "cloud-group-user-list", "List cloudgroup clouduser pairs", func(s *mcclient.ClientSession, args *CloudgroupUserListOptions) 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.Cloudgroup) > 0 {
result, err = modules.Cloudgroupusers.ListDescendent(s, args.Cloudgroup, params)
} else if len(args.Clouduser) > 0 {
result, err = modules.Cloudgroupusers.ListDescendent2(s, args.Clouduser, params)
} else {
result, err = modules.Cloudgroupusers.List(s, params)
}
if err != nil {
return err
}
printList(result, modules.Cloudgroupusers.GetColumns(s))
return nil
})
type CloudgroupUserDetailOptions struct {
CLOUDUSER string `help:"ID or Name of Cloudgroup"`
CLOUDPOLICY string `help:"ID or Name of Clouduser"`
}
R(&CloudgroupUserDetailOptions{}, "cloud-group-user-show", "Show cloudgroupuser details", func(s *mcclient.ClientSession, args *CloudgroupUserDetailOptions) error {
query := jsonutils.NewDict()
result, err := modules.Cloudgroupusers.Get(s, args.CLOUDUSER, args.CLOUDPOLICY, query)
if err != nil {
return err
}
printObject(result)
return nil
})
}

View File

@@ -1,81 +0,0 @@
// 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 cloudid
import (
"yunion.io/x/jsonutils"
"yunion.io/x/onecloud/pkg/mcclient"
"yunion.io/x/onecloud/pkg/mcclient/modules"
"yunion.io/x/onecloud/pkg/mcclient/options"
)
func init() {
type CloudpolicyListOptions struct {
options.BaseListOptions
ClouduserId string `json:"clouduser_id"`
CloudgroupId string `json:"cloudgroup_id"`
}
R(&CloudpolicyListOptions{}, "cloud-policy-list", "List cloud policies", func(s *mcclient.ClientSession, opts *CloudpolicyListOptions) error {
params, err := options.ListStructToParams(opts)
if err != nil {
return err
}
result, err := modules.Cloudpolicies.List(s, params)
if err != nil {
return err
}
printList(result, modules.Cloudpolicies.GetColumns(s))
return nil
})
type CloudpolicyIdOptions struct {
ID string `help:"Cloudpolicy Id"`
}
R(&CloudpolicyIdOptions{}, "cloud-policy-show", "Sow cloud policiy details", func(s *mcclient.ClientSession, opts *CloudpolicyIdOptions) error {
result, err := modules.Cloudpolicies.Get(s, opts.ID, nil)
if err != nil {
return err
}
printObject(result)
return nil
})
type CloudpolicyGroupOptions struct {
ID string `help:"Cloudpolicy Id"`
CLOUDGROUP_ID string `help:"Cloudgroup Id" json:"cloudgroup_id"`
}
R(&CloudpolicyGroupOptions{}, "cloud-policy-assign-group", "Assign cloud policiy to group", func(s *mcclient.ClientSession, opts *CloudpolicyGroupOptions) error {
result, err := modules.Cloudpolicies.PerformAction(s, opts.ID, "assign-group", jsonutils.Marshal(opts))
if err != nil {
return err
}
printObject(result)
return nil
})
R(&CloudpolicyGroupOptions{}, "cloud-policy-revoke-group", "Revoke cloud policiy from group", func(s *mcclient.ClientSession, opts *CloudpolicyGroupOptions) error {
result, err := modules.Cloudpolicies.PerformAction(s, opts.ID, "revoke-group", jsonutils.Marshal(opts))
if err != nil {
return err
}
printObject(result)
return nil
})
}

View File

@@ -1,72 +0,0 @@
// 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 cloudid
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 ClouduserPolicyListOptions struct {
options.BaseListOptions
Clouduser string `help:"ID or Name of Clouduser"`
Cloudpolicy string `help:"Policy ID or name"`
}
R(&ClouduserPolicyListOptions{}, "cloud-user-policy-list", "List clouduser cloudpolicy pairs", func(s *mcclient.ClientSession, args *ClouduserPolicyListOptions) 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.Clouduser) > 0 {
result, err = modules.Clouduserpolicies.ListDescendent(s, args.Clouduser, params)
} else if len(args.Cloudpolicy) > 0 {
result, err = modules.Clouduserpolicies.ListDescendent2(s, args.Cloudpolicy, params)
} else {
result, err = modules.Clouduserpolicies.List(s, params)
}
if err != nil {
return err
}
printList(result, modules.Clouduserpolicies.GetColumns(s))
return nil
})
type ClouduserPolicyDetailOptions struct {
CLOUDUSER string `help:"ID or Name of Clouduser"`
CLOUDPOLICY string `help:"ID or Name of Cloudpolicy"`
}
R(&ClouduserPolicyDetailOptions{}, "cloud-user-policy-show", "Show clouduserpolicy details", func(s *mcclient.ClientSession, args *ClouduserPolicyDetailOptions) error {
query := jsonutils.NewDict()
result, err := modules.Clouduserpolicies.Get(s, args.CLOUDUSER, args.CLOUDPOLICY, query)
if err != nil {
return err
}
printObject(result)
return nil
})
}

View File

@@ -1,197 +0,0 @@
// 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 cloudid
import (
"yunion.io/x/jsonutils"
"yunion.io/x/onecloud/pkg/mcclient"
"yunion.io/x/onecloud/pkg/mcclient/modules"
"yunion.io/x/onecloud/pkg/mcclient/options"
)
func init() {
type ClouduserListOptions struct {
options.BaseListOptions
CloudaccountId string `help:"Cloudaccount Id"`
CloudproviderId string `help:"Cloudprovider Id"`
CloudpolicyId string `help:"filter cloudusers by cloudpolicy"`
CloudgroupId string `help:"filter cloudusers by cloudgroup"`
}
R(&ClouduserListOptions{}, "cloud-user-list", "List cloud users", func(s *mcclient.ClientSession, opts *ClouduserListOptions) error {
params, err := options.ListStructToParams(opts)
if err != nil {
return err
}
result, err := modules.Cloudusers.List(s, params)
if err != nil {
return err
}
printList(result, modules.Cloudusers.GetColumns(s))
return nil
})
type ClouduserCreateOptions struct {
Name string
CloudaccountId string `help:"Cloudaccount Id"`
CloudproviderId string `help:"Cloudprovider Id"`
OwnerId string `help:"Owner Id"`
CloudpolicyIds []string `help:"cloudpolicy ids"`
CloudgroupIds []string `help:"cloudgroup ids"`
Email string `help:"email address"`
MobilePhone string `help:"phone number"`
IsConsoleLogin *bool `help:"is console login"`
Password string `help:"clouduser password"`
}
R(&ClouduserCreateOptions{}, "cloud-user-create", "Create cloud user", func(s *mcclient.ClientSession, opts *ClouduserCreateOptions) error {
params := jsonutils.Marshal(opts)
result, err := modules.Cloudusers.Create(s, params)
if err != nil {
return err
}
printObject(result)
return nil
})
type ClouduserIdOptions struct {
ID string `help:"Clouduser Id"`
}
R(&ClouduserIdOptions{}, "cloud-user-delete", "Delete cloud user", func(s *mcclient.ClientSession, opts *ClouduserIdOptions) error {
result, err := modules.Cloudusers.Delete(s, opts.ID, nil)
if err != nil {
return err
}
printObject(result)
return nil
})
R(&ClouduserIdOptions{}, "cloud-user-logininfo", "Show cloud user login info", func(s *mcclient.ClientSession, opts *ClouduserIdOptions) error {
result, err := modules.Cloudusers.GetLoginInfo(s, opts.ID, nil)
if err != nil {
return err
}
printObject(result)
return nil
})
R(&ClouduserIdOptions{}, "cloud-user-show", "Show cloud user", func(s *mcclient.ClientSession, opts *ClouduserIdOptions) error {
result, err := modules.Cloudusers.Get(s, opts.ID, nil)
if err != nil {
return err
}
printObject(result)
return nil
})
type ClouduserSyncOptions struct {
ID string `help:"Clouduser Id"`
PolicyOnly bool `help:"Ony sync clouduser policies for cloud"`
}
R(&ClouduserSyncOptions{}, "cloud-user-sync", "Sync cloud user policies", func(s *mcclient.ClientSession, opts *ClouduserSyncOptions) error {
result, err := modules.Cloudusers.PerformAction(s, opts.ID, "sync", jsonutils.Marshal(opts))
if err != nil {
return err
}
printObject(result)
return nil
})
R(&ClouduserIdOptions{}, "cloud-user-syncstatus", "Sync cloud user status", func(s *mcclient.ClientSession, opts *ClouduserIdOptions) error {
result, err := modules.Cloudusers.PerformAction(s, opts.ID, "syncstatus", nil)
if err != nil {
return err
}
printObject(result)
return nil
})
type ClouduserPolicyOptions struct {
ID string `help:"Clouduser Id"`
CLOUDPOLICY_ID string `help:"cloudpolicy Id"`
}
R(&ClouduserPolicyOptions{}, "cloud-user-attach-policy", "Attach policy for cloud user", func(s *mcclient.ClientSession, opts *ClouduserPolicyOptions) error {
result, err := modules.Cloudusers.PerformAction(s, opts.ID, "attach-policy", jsonutils.Marshal(opts))
if err != nil {
return err
}
printObject(result)
return nil
})
R(&ClouduserPolicyOptions{}, "cloud-user-detach-policy", "Detach policy from cloud user", func(s *mcclient.ClientSession, opts *ClouduserPolicyOptions) error {
result, err := modules.Cloudusers.PerformAction(s, opts.ID, "detach-policy", jsonutils.Marshal(opts))
if err != nil {
return err
}
printObject(result)
return nil
})
type ClouduserPasswordOptions struct {
ID string `help:"Clouduser Id"`
Password string `help:"clouduser password"`
}
R(&ClouduserPasswordOptions{}, "cloud-user-reset-password", "Reset clouduser password", func(s *mcclient.ClientSession, opts *ClouduserPasswordOptions) error {
result, err := modules.Cloudusers.PerformAction(s, opts.ID, "reset-password", jsonutils.Marshal(opts))
if err != nil {
return err
}
printObject(result)
return nil
})
type ClouduserChangeOwnerOptions struct {
ID string `help:"clouduser id"`
USER_ID string `help:"local user id"`
}
R(&ClouduserChangeOwnerOptions{}, "cloud-user-change-owner", "Change clouduser owner", func(s *mcclient.ClientSession, opts *ClouduserChangeOwnerOptions) error {
result, err := modules.Cloudusers.PerformAction(s, opts.ID, "change-owner", jsonutils.Marshal(opts))
if err != nil {
return err
}
printObject(result)
return nil
})
type ClouduserGroupOptions struct {
ID string `help:"clouduser id"`
CLOUDGROUP_ID string `help:"cloudgroup id" json:"cloudgroup_id"`
}
R(&ClouduserGroupOptions{}, "cloud-user-join-group", "Join user to cloudgroup", func(s *mcclient.ClientSession, opts *ClouduserGroupOptions) error {
result, err := modules.Cloudusers.PerformAction(s, opts.ID, "join-group", jsonutils.Marshal(opts))
if err != nil {
return err
}
printObject(result)
return nil
})
R(&ClouduserGroupOptions{}, "cloud-user-leave-group", "Leave from cloudgroup", func(s *mcclient.ClientSession, opts *ClouduserGroupOptions) error {
result, err := modules.Cloudusers.PerformAction(s, opts.ID, "leave-group", jsonutils.Marshal(opts))
if err != nil {
return err
}
printObject(result)
return nil
})
}

View File

@@ -1,26 +0,0 @@
// 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 cloudid
import (
"yunion.io/x/onecloud/cmd/climc/shell"
"yunion.io/x/onecloud/pkg/util/printutils"
)
var (
R = shell.R
printList = printutils.PrintJSONList
printObject = printutils.PrintJSONObject
)

View File

@@ -15,19 +15,16 @@
package shell
import (
"yunion.io/x/onecloud/pkg/multicloud/aws"
"yunion.io/x/onecloud/pkg/util/shellutils"
"yunion.io/x/onecloud/pkg/mcclient"
)
func init() {
type CallerIdentityOptions struct {
type CloudmetaOptions struct {
PROVIDER_ID string `help:"provider_id"`
REGION_ID string `help:"region_id"`
ZONE_ID string `help:"zone_id"`
}
shellutils.R(&CallerIdentityOptions{}, "caller-identity-show", "Show caller identity", func(cli *aws.SRegion, args *CallerIdentityOptions) error {
identity, err := cli.GetClient().GetCallerIdentity()
if err != nil {
return err
}
printObject(identity)
R(&CloudmetaOptions{}, "instance-type-list", "query backend service for its version", func(s *mcclient.ClientSession, args *CloudmetaOptions) error {
return nil
})
}

View File

@@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
package compute
package shell
import (
"yunion.io/x/jsonutils"

View File

@@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
package compute
package shell
import (
"yunion.io/x/jsonutils"

View File

@@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
package compute
package shell
import (
"fmt"

View File

@@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
package compute
package shell
import (
"fmt"

View File

@@ -1,34 +0,0 @@
// 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 compute
import (
"yunion.io/x/onecloud/cmd/climc/shell"
"yunion.io/x/onecloud/pkg/util/printutils"
)
var (
R = shell.R
printList = printutils.PrintJSONList
printObject = printutils.PrintJSONObject
printBatchResults = printutils.PrintJSONBatchResults
InvalidUpdateError = shell.InvalidUpdateError
printObjectRecursive = printutils.PrintJSONObjectRecursive
exportList = shell.ExportList
printObjectRecursiveEx = printutils.PrintJSONObjectRecursiveEx
)

View File

@@ -1,211 +0,0 @@
// 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 compute
import (
"fmt"
"time"
"yunion.io/x/jsonutils"
apis "yunion.io/x/onecloud/pkg/apis/compute"
"yunion.io/x/onecloud/pkg/mcclient"
"yunion.io/x/onecloud/pkg/mcclient/modules"
"yunion.io/x/onecloud/pkg/mcclient/options"
)
func init() {
type ScheduledTaskListOptions struct {
options.BaseListOptions
ScheduledType string `help:"scheduled type" choices:"timing|cycle"`
ResourceType string `help:"resource type"`
Operation string `help:"operation"`
}
R(&ScheduledTaskListOptions{}, "scheduledtask-list", "list Scheduled Task", func(s *mcclient.ClientSession, args *ScheduledTaskListOptions) error {
params, err := options.ListStructToParams(args)
tasks, err := modules.ScheduledTask.List(s, params)
if err != nil {
return err
}
printList(tasks, modules.ScheduledTask.GetColumns(s))
return nil
})
type ScheduledTaskShowOptions struct {
ID string `help:"ScheduledTask ID or Name"`
}
R(&ScheduledTaskShowOptions{}, "scheudled-task-show", "Show Scheduled Task", func(s *mcclient.ClientSession,
args *ScheduledTaskShowOptions) error {
params := jsonutils.NewDict()
params.Set("details", jsonutils.JSONTrue)
task, err := modules.ScheduledTask.Get(s, args.ID, params)
if err != nil {
return err
}
printObject(task)
return nil
})
type ScheduledTaskCreateOptions struct {
NAME string `help:"ScheduledTask Name" json:"name"`
ScheduledType string `help:"Scheudled Type" choices:"timing|cycle" json:"scheduled_type"`
Timer
CycleTimer
ResourceType string `help:"resource type"`
Operation string `help:"operation"`
LabelType string `help:"label type"`
Labels []string `help:"labels"`
}
R(&ScheduledTaskCreateOptions{}, "scheduledtask-create", "Create Scheduled Task", func(s *mcclient.ClientSession, args *ScheduledTaskCreateOptions) error {
formatStr := "2006-01-02 15:04:05"
var exectime, starttime, endtime time.Time
var err error
if len(args.TimingExecTime) > 0 {
exectime, err = time.Parse(formatStr, args.TimingExecTime)
if err != nil {
return fmt.Errorf("invalid time format for 'exec_time'")
}
}
if len(args.CycleStartTime) > 0 {
starttime, err = time.Parse(formatStr, args.CycleStartTime)
if err != nil {
return fmt.Errorf("invalid time format for 'start_time'")
}
}
if len(args.CycleEndTime) > 0 {
endtime, err = time.Parse(formatStr, args.CycleEndTime)
if err != nil {
return fmt.Errorf("invalid time format for 'end_time'")
}
}
stCreateInput := apis.ScheduledTaskCreateInput{
ScheduledType: args.ScheduledType,
Timer: apis.TimerCreateInput{
ExecTime: exectime,
},
CycleTimer: apis.CycleTimerCreateInput{
CycleType: args.CycleCycleType,
Minute: args.CycleMinute,
Hour: args.CycleHour,
WeekDays: args.CycleWeekdays,
MonthDays: args.CycleMonthDays,
StartTime: starttime,
EndTime: endtime,
},
ResourceType: args.ResourceType,
Operation: args.Operation,
LabelType: args.LabelType,
Labels: args.Labels,
}
stCreateInput.Name = args.NAME
ret, err := modules.ScheduledTask.Create(s, jsonutils.Marshal(stCreateInput))
if err != nil {
return err
}
printObject(ret)
return nil
})
type ScheduledTaskEnableOptions struct {
ID string `help:"ScheduledTask ID or Name"`
}
R(&ScheduledTaskEnableOptions{}, "scheduledtask-enable", "Enable ScheduledTask", func(s *mcclient.ClientSession,
args *ScheduledTaskEnableOptions) error {
ret, err := modules.ScheduledTask.PerformAction(s, args.ID, "enable", jsonutils.NewDict())
if err != nil {
return err
}
printObject(ret)
return nil
})
R(&ScheduledTaskEnableOptions{}, "scheduledtask-disable", "Disable ScheduledTask",
func(s *mcclient.ClientSession, args *ScheduledTaskEnableOptions) error {
ret, err := modules.ScheduledTask.PerformAction(s, args.ID, "disable", jsonutils.NewDict())
if err != nil {
return err
}
printObject(ret)
return nil
},
)
type ScheduledTaskSetLabelsOptions struct {
ID string `help:"ScheduledTask ID or Name"`
Labels []string `help:"Label"`
}
R(&ScheduledTaskSetLabelsOptions{}, "scheduledtask-setlabels", "Trigger ScheduledTask's action",
func(s *mcclient.ClientSession, args *ScheduledTaskSetLabelsOptions) error {
params := jsonutils.NewDict()
params.Set("labels", jsonutils.Marshal(args.Labels))
ret, err := modules.ScheduledTask.PerformAction(s, args.ID, "set-labels", params)
if err != nil {
return err
}
printObject(ret)
return nil
},
)
type ScheduledTaskTriggerOptions struct {
ID string `help:"ScheduledTask ID or Name"`
}
R(&ScheduledTaskTriggerOptions{}, "scheduledtask-trigger", "Trigger ScheduledTask",
func(s *mcclient.ClientSession, args *ScheduledTaskTriggerOptions) error {
params := jsonutils.NewDict()
ret, err := modules.ScheduledTask.PerformAction(s, args.ID, "trigger", params)
if err != nil {
return err
}
printObject(ret)
return nil
},
)
type ScheduledTaskDeleteOptions struct {
ID string `help:"ScheduledTask ID or Name"`
}
R(&ScheduledTaskDeleteOptions{}, "scheduledtask-delete", "Delete ScheduledTask",
func(s *mcclient.ClientSession, args *ScheduledTaskDeleteOptions) error {
ret, err := modules.ScheduledTask.Delete(s, args.ID, jsonutils.NewDict())
if err != nil {
return err
}
printObject(ret)
return nil
},
)
type ScheduledTaskAvtivityListOptions struct {
options.BaseListOptions
ScheduledTask string `help:"Scheduled Task" json:"scheduled_task"`
}
R(&ScheduledTaskAvtivityListOptions{}, "scheduledtask-activity-list", "List Scheduled Task Activity",
func(s *mcclient.ClientSession, args *ScheduledTaskAvtivityListOptions) error {
params, err := options.ListStructToParams(args)
if err != nil {
return err
}
list, err := modules.ScheduledTaskActivity.List(s, params)
if err != nil {
return err
}
printList(list, modules.ScheduledTaskActivity.GetColumns(s))
return nil
},
)
}

View File

@@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
package notify
package shell
import (
"yunion.io/x/jsonutils"

View File

@@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
package notify
package shell
import (
"yunion.io/x/jsonutils"

View File

@@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
package misc
package shell
import (
"bufio"
@@ -35,7 +35,6 @@ func init() {
Copyright string `help:"The copyright"`
Email string `help:"The Email"`
Docs *string `help:"the Docs website address"`
License *string `help:"the license generator website address"`
}
R(&CopyrightUpdateOptions{}, "copyright-update", "update copyright", func(s *mcclient.ClientSession, args *CopyrightUpdateOptions) error {
@@ -48,10 +47,6 @@ func init() {
params.Add(jsonutils.NewString(*args.Docs), "docs")
}
if args.License != nil {
params.Add(jsonutils.NewString(*args.License), "license")
}
if len(args.Copyright) > 0 {
params.Add(jsonutils.NewString(args.Copyright), "copyright")
}

View File

@@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
package identity
package shell
import (
"fmt"

View File

@@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
package misc
package shell
import (
"yunion.io/x/onecloud/pkg/mcclient"

View File

@@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
package compute
package shell
import (
"yunion.io/x/onecloud/pkg/mcclient"

View File

@@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
package compute
package shell
import (
"yunion.io/x/jsonutils"

View File

@@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
package compute
package shell
import (
"yunion.io/x/onecloud/pkg/mcclient"

View File

@@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
package compute
package shell
import (
"yunion.io/x/onecloud/pkg/mcclient"

View File

@@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
package compute
package shell
import (
"fmt"

View File

@@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
package ansible
package shell
import (
"fmt"

View File

@@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
package ansible
package shell
import (
"yunion.io/x/jsonutils"

View File

@@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
package compute
package shell
import (
"yunion.io/x/jsonutils"

View File

@@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
package misc
package shell
import (
"fmt"
@@ -27,7 +27,6 @@ func init() {
type DistinctFieldOption struct {
MODULE string `help:"module name"`
FIELD string `help:"distinct field name to query"`
Extra bool `help:"query extra distinct field"`
}
R(&DistinctFieldOption{}, "distinct-field", "Query values of a distinct field for a module", func(s *mcclient.ClientSession, args *DistinctFieldOption) error {
mod, err := modulebase.GetModule(s, args.MODULE)
@@ -38,11 +37,7 @@ func init() {
return fmt.Errorf("No module %s found", args.MODULE)
}
params := jsonutils.NewDict()
if args.Extra {
params.Add(jsonutils.NewString(args.FIELD), "extra_field")
} else {
params.Add(jsonutils.NewString(args.FIELD), "field")
}
params.Add(jsonutils.NewString(args.FIELD), "extra_field")
result, err := mod.Get(s, "distinct-field", params)
if err != nil {
return err

View File

@@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
package compute
package shell
import (
"yunion.io/x/onecloud/pkg/mcclient"

View File

@@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
package identity
package shell
import (
"yunion.io/x/jsonutils"

View File

@@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
package compute
package shell
import (
"yunion.io/x/jsonutils"

View File

@@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
package compute
package shell
import (
"fmt"

View File

@@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
package compute
package shell
import (
"yunion.io/x/jsonutils"
@@ -46,9 +46,9 @@ func init() {
})
type EipCreateOptions struct {
MANAGER string `help:"cloud provider"`
REGION string `help:"cloud region in which EIP is allocated"`
NAME string `help:"name of the EIP"`
Manager string `help:"cloud provider"`
Region string `help:"cloud region in which EIP is allocated"`
Bandwidth int `help:"Bandwidth in Mbps"`
Ip string `help:"IP address of the EIP"`
Network string `help:"Network of the EIP"`
@@ -56,13 +56,9 @@ func init() {
}
R(&EipCreateOptions{}, "eip-create", "Create an EIP", func(s *mcclient.ClientSession, args *EipCreateOptions) error {
params := jsonutils.NewDict()
params.Add(jsonutils.NewString(args.MANAGER), "manager")
params.Add(jsonutils.NewString(args.REGION), "region")
params.Add(jsonutils.NewString(args.NAME), "name")
if args.Region != "" {
params.Add(jsonutils.NewString(args.Region), "region")
}
if args.Manager != "" {
params.Add(jsonutils.NewString(args.Manager), "manager")
}
if args.Bandwidth != 0 {
params.Add(jsonutils.NewInt(int64(args.Bandwidth)), "bandwidth")
}

View File

@@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
package notify
package shell
import (
"yunion.io/x/jsonutils"

View File

@@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
package identity
package shell
import (
"yunion.io/x/jsonutils"

View File

@@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
package events
package shell
import (
"yunion.io/x/jsonutils"
@@ -35,10 +35,7 @@ type BaseEventListOptions struct {
Action []string `help:"Log action"`
User string `help:"filter by operator user"`
Project string `help:"filter by operator user's project"`
OwnerProjectIds []string `help:"filter by owner project ids"`
OwnerDomainIds []string `help:"filter by owner domain ids"`
Project string `help:"filter by owner project"`
PagingMarker string `help:"marker for pagination"`
}
@@ -110,12 +107,6 @@ func doEventList(man modulebase.ResourceManager, s *mcclient.ClientSession, args
if len(args.Scope) > 0 {
params.Add(jsonutils.NewString(args.Scope), "scope")
}
if len(args.OwnerProjectIds) > 0 {
params.Add(jsonutils.NewStringArray(args.OwnerProjectIds), "owner_project_ids")
}
if len(args.OwnerDomainIds) > 0 {
params.Add(jsonutils.NewStringArray(args.OwnerDomainIds), "owner_domain_ids")
}
if len(args.PagingMarker) > 0 {
params.Add(jsonutils.NewString(args.PagingMarker), "paging_marker")
}
@@ -190,6 +181,11 @@ func init() {
return doComputeEventList(s, &nargs)
})
R(&TypeEventListOptions{}, "kube-cluster-event", "Show operation event logs of kubernetes cluster", func(s *mcclient.ClientSession, args *TypeEventListOptions) error {
nargs := EventListOptions{BaseEventListOptions: args.BaseEventListOptions, Id: args.ID, Type: []string{"kube_cluster"}}
return doK8sEventList(s, &nargs)
})
R(&TypeEventListOptions{}, "kubecluster-event", "Show operation event logs of kubernetes cluster", func(s *mcclient.ClientSession, args *TypeEventListOptions) error {
nargs := EventListOptions{BaseEventListOptions: args.BaseEventListOptions, Id: args.ID, Type: []string{"kubecluster"}}
return doK8sEventList(s, &nargs)

View File

@@ -1,30 +0,0 @@
// 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 events
import (
"yunion.io/x/onecloud/cmd/climc/shell"
"yunion.io/x/onecloud/pkg/util/printutils"
)
var (
R = shell.R
printList = printutils.PrintJSONList
printObject = printutils.PrintJSONObject
printBatchResults = printutils.PrintJSONBatchResults
InvalidUpdateError = shell.InvalidUpdateError
printObjectRecursive = printutils.PrintJSONObjectRecursive
)

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