Compare commits

...

837 Commits

Author SHA1 Message Date
Zexi Li
f2c5065003 Merge pull request #5397 from swordqiu/automated-cherry-pick-of-#5392-upstream-release-2.11
Automated cherry pick of #5392: fix: scoped resource should override FetchOwnerId
2020-03-07 15:51:25 +08:00
Qiu Jian
a6e7670c15 fix: scoped resource should override FetchOwnerId 2020-03-07 15:50:06 +08:00
Zexi Li
b0e0d74daf Merge pull request #5377 from swordqiu/automated-cherry-pick-of-#5372-upstream-release-2.11
Automated cherry pick of #5372: fix: no scope shcedtag should be visible to all
2020-03-06 18:32:50 +08:00
Qiu Jian
5886c64d36 fix: no scope shcedtag should be visible to all 2020-03-06 15:25:21 +08:00
yunion-ci-robot
7a5f89b75b Merge pull request #5146 from tb365/automated-cherry-pick-of-#5145-upstream-release-2.11
Automated cherry pick of #5145: qcloud elb sync
2020-02-19 16:06:27 +08:00
TangBin
d8a8e56bbe qcloud elb sync 2020-02-17 22:28:23 +08:00
yunion-ci-robot
5f3af20771 Merge pull request #5067 from swordqiu/automated-cherry-pick-of-#5065-upstream-release-2.11
Automated cherry pick of #5065: fix: allow empty domain for windows deployment
2020-02-10 10:34:56 +08:00
Qiu Jian
e3459ed11f fix: allow empty domain for windows deployment 2020-02-10 09:23:07 +08:00
yunion-ci-robot
e5ff6e2f91 Merge pull request #5059 from swordqiu/automated-cherry-pick-of-#5054-upstream-release-2.11
Automated cherry pick of #5054: fix: createdAt should not be synced when update
2020-02-09 22:09:57 +08:00
Qiu Jian
eddc544220 fix: createdAt should not be synced when update 2020-02-08 21:31:03 +08:00
yunion-ci-robot
d9fc2eacee Merge pull request #5033 from tb365/automated-cherry-pick-of-#5032-upstream-release-2.11
Automated cherry pick of #5032: aws create with eip fix
2020-02-07 04:51:49 +08:00
tangbin
1e5b5c1a1a aws create with eip fix 2020-02-06 17:56:41 +08:00
yunion-ci-robot
0bac302344 Merge pull request #5016 from swordqiu/automated-cherry-pick-of-#5014-upstream-release-2.11
Automated cherry pick of #5014: fix: support empty dns domain
2020-02-06 09:48:48 +08:00
Qiu Jian
74f6472101 fix: support empty dns domain 2020-02-06 03:26:37 +08:00
yunion-ci-robot
79c91c5891 Merge pull request #4951 from ioito/automated-cherry-pick-of-#4946-upstream-release-2.11
Automated cherry pick of #4946: fix: 腾讯云主机带宽跟随eip带宽变化而变化
2020-01-17 19:44:10 +08:00
Qu Xuan
5334e46509 fix: 腾讯云主机带宽跟随eip带宽变化而变化 2020-01-17 13:40:11 +08:00
yunion-ci-robot
b2861807ae Merge pull request #4881 from tb365/automated-cherry-pick-of-#4880-upstream-release-2.11
Automated cherry pick of #4880: huawei remove backend group bugfix
2020-01-17 11:01:10 +08:00
yunion-ci-robot
14948596a1 Merge pull request #4909 from ioito/automated-cherry-pick-of-#4904-upstream-release-2.11
Automated cherry pick of #4904: fix: 避免创建azure时指定高级ssd失效
2020-01-16 09:49:07 +08:00
Qu Xuan
ce0c03db11 fix: 避免创建azure时指定高级ssd失效 2020-01-15 18:03:28 +08:00
TangBin
99fb57e0f3 aliyun backendgroup bugfix 2020-01-14 15:51:37 +08:00
TangBin
1f2dbdf126 aws backendgroup delete bugfix 2020-01-14 15:51:37 +08:00
TangBin
f984f6879f aws sync routetable 2020-01-14 15:51:37 +08:00
TangBin
1a6e8c3c9d huawei remove backend group bugfix 2020-01-14 15:51:37 +08:00
yunion-ci-robot
e89c04d6c3 Merge pull request #4868 from ioito/automated-cherry-pick-of-#4862-upstream-release-2.11
Automated cherry pick of #4862: fix: 仅kvm需要去判断是否需要关机调整配置,公有云私有云默认不需要
2020-01-14 03:00:02 +08:00
yunion-ci-robot
274e4b3afa Merge pull request #4854 from ioito/automated-cherry-pick-of-#4849-upstream-release-2.11
Automated cherry pick of #4849: fix: aliyun rule fix
2020-01-14 02:20:01 +08:00
Qu Xuan
84ca5cde0d fix: 仅kvm需要去判断是否需要关机调整配置,公有云私有云默认不需要 2020-01-13 19:17:56 +08:00
Qu Xuan
ef8753f4f5 fix: aliyun rule fix 2020-01-13 17:46:08 +08:00
yunion-ci-robot
b561ae3b2d Merge pull request #4802 from tb365/automated-cherry-pick-of-#4801-upstream-release-2.11
Automated cherry pick of #4801: kvm elb listener update bugfix
2020-01-10 19:53:01 +08:00
TangBin
cb0a96f1e9 kvm elb listener update bugfix 2020-01-10 18:49:00 +08:00
yunion-ci-robot
9a06637b10 Merge pull request #4789 from yousong/automated-cherry-pick-of-#4784-upstream-release-2.11
Automated cherry pick of #4784: dnsrecords: add helper methods
2020-01-10 10:17:59 +08:00
Yousong Zhou
76ea830519 dns: chain load records for cname 2020-01-09 23:24:56 +08:00
Yousong Zhou
e6ef1cccd7 dns: prepare for responding with A record of cname value 2020-01-09 23:24:56 +08:00
Yousong Zhou
a7d5f8cdba dnsrecords: add helper methods 2020-01-09 23:24:56 +08:00
yunion-ci-robot
e1aff9c68d Merge pull request #4748 from yousong/automated-cherry-pick-of-#4724-upstream-release-2.11
Automated cherry pick of #4724: wires: lift name length, charset constraint
2020-01-08 23:41:58 +08:00
Yousong Zhou
66f8189d3d wires: lift name length, charset constraint 2020-01-08 19:16:21 +08:00
yunion-ci-robot
2e81618aa1 Merge pull request #4733 from ioito/automated-cherry-pick-of-#4728-upstream-release-2.11
Automated cherry pick of #4728: fix: eip duplicate name
2020-01-08 19:02:58 +08:00
Qu Xuan
f7f3a6620e fix: eip duplicate name 2020-01-08 18:13:21 +08:00
yunion-ci-robot
76edf6b752 Merge pull request #4689 from yousong/automated-cherry-pick-of-#4683-upstream-release-2.11
Automated cherry pick of #4683: hostman: distro name OpenWrt instead of OpenWRT
2020-01-08 12:54:59 +08:00
Zexi Li
86173c358b Merge pull request #4678 from swordqiu/automated-cherry-pick-of-#4676-upstream-release-2.11
Automated cherry pick of #4676: fix: guest network default share scope should be system if non-default-domain-projects is off
2020-01-07 19:30:16 +08:00
yunion-ci-robot
e916113ec6 Merge pull request #4671 from ioito/automated-cherry-pick-of-#4656-upstream-release-2.11
Automated cherry pick of #4656: fix: 避免拥有带宽包的腾讯云创建机器失败
2020-01-07 18:05:58 +08:00
Yousong Zhou
4ccb85e767 hostman: openwrt: deploy public key for root 2020-01-07 18:02:34 +08:00
Yousong Zhou
e23b4674fb hostman: split DeployAuthorizedKeys() 2020-01-07 18:02:34 +08:00
Yousong Zhou
dbae935b9d hostman: openwrt: support deploy networking scripts 2020-01-07 18:02:34 +08:00
Yousong Zhou
ac9ee812b9 hostman: openwrt: deploy hostname with board config 2020-01-07 18:02:34 +08:00
Yousong Zhou
2478e2acef hostman: distro name OpenWrt instead of OpenWRT 2020-01-07 18:02:34 +08:00
yunion-ci-robot
456b8bfb3d Merge pull request #4663 from ioito/automated-cherry-pick-of-#4658-upstream-release-2.11
Automated cherry pick of #4658: fix: 避免同步安全组失败后,没有任何日志记录
2020-01-07 17:06:57 +08:00
Qiu Jian
85877c2950 fix: guest network default share scope should be system if non-default-domain-projects is off 2020-01-07 16:51:57 +08:00
Qu Xuan
6632ef999d fix: 避免拥有带宽包的腾讯云创建机器失败 2020-01-07 15:06:14 +08:00
Qu Xuan
54fd08c1c8 fix: 避免同步安全组失败后,没有任何日志记录 2020-01-07 11:50:42 +08:00
Zexi Li
ad7a545878 Merge pull request #4614 from ioito/automated-cherry-pick-of-#4609-upstream-release-2.11
Automated cherry pick of #4609: fix: 避免仅删除value时,行为演变为删除标签
2020-01-04 23:18:19 +08:00
Qu Xuan
0eea7468b7 fix: 避免仅删除value时,行为演变为删除标签 2020-01-04 22:17:58 +08:00
yunion-ci-robot
34ca16dbad Merge pull request #4586 from ioito/automated-cherry-pick-of-#4581-upstream-release-2.11
Automated cherry pick of #4581: fix: 修复zstack安全组创建失败问题
2020-01-04 20:13:36 +08:00
Qu Xuan
a51ca978ea fix: 修复zstack安全组创建失败问题 2020-01-04 20:02:57 +08:00
yunion-ci-robot
01847084c0 Merge pull request #4563 from ioito/automated-cherry-pick-of-#4558-upstream-release-2.11
Automated cherry pick of #4558: fix: openstack eip dissociate optimized
2020-01-04 19:53:36 +08:00
Zexi Li
1ee1b7b1b9 Merge pull request #4569 from swordqiu/automated-cherry-pick-of-#4564-upstream-release-2.11
Automated cherry pick of #4564: fix: minio fail to set object metadata
2020-01-04 19:52:57 +08:00
Qu Xuan
421dc4b48e fix: openstack eip dissociate optimized 2020-01-04 18:45:04 +08:00
Qiu Jian
e99c227e37 fix: minio fail to set object metadata 2020-01-04 18:38:03 +08:00
Zexi Li
772a273c70 Merge pull request #4525 from zexi/automated-cherry-pick-of-#4520-upstream-release-2.11
Automated cherry pick of #4520: baremetal: fix megaraid check jbod always disabled
2020-01-03 21:51:46 +08:00
yunion-ci-robot
5c4f1e2fc3 Merge pull request #4518 from ioito/automated-cherry-pick-of-#4513-upstream-release-2.11
Automated cherry pick of #4513: fix: 腾讯云不支持描述字段参数
2020-01-03 21:33:36 +08:00
Zexi Li
d73b97df5a baremetal: fix megaraid check jbod always disabled 2020-01-03 21:23:58 +08:00
Qu Xuan
29c3c02bfc fix: 腾讯云不支持描述字段参数 2020-01-03 20:47:07 +08:00
yunion-ci-robot
84932be256 Merge pull request #4467 from yousong/automated-cherry-pick-of-#4464-upstream-release-2.11
Automated cherry pick of #4464: networks: 确保外部network也有ifname_hint
2020-01-01 15:31:34 +08:00
Yousong Zhou
5c0ae09083 networks: 确保外部network也有ifname_hint 2020-01-01 11:53:55 +08:00
yunion-ci-robot
97a2395b83 Merge pull request #4462 from ioito/automated-cherry-pick-of-#4459-upstream-release-2.11
Automated cherry pick of #4459: fix: openstack image: vmdk -> qcow2
2020-01-01 09:30:34 +08:00
Qu Xuan
d995a0927f fix: openstack image: vmdk -> qcow2 2019-12-31 19:57:15 +08:00
yunion-ci-robot
019d2c134a Merge pull request #4448 from wanyaoqi/automated-cherry-pick-of-#4445-upstream-release-2.11
Automated cherry pick of #4445: not return on recv packet failed
2019-12-31 17:30:33 +08:00
yunion-ci-robot
c63c439664 Merge pull request #4438 from yousong/automated-cherry-pick-of-#4435-upstream-release-2.11
Automated cherry pick of #4435: networks: newIfnameHint: 可读性改善
2019-12-31 17:13:33 +08:00
wanyaoqi
da5446d5f5 not return on recv packet failed 2019-12-31 17:05:07 +08:00
Yousong Zhou
3fd022981a guestnetworks: 加强ifname内容判断 2019-12-31 14:25:04 +08:00
Yousong Zhou
015c802bd9 networks: newIfnameHint: 可读性改善 2019-12-31 14:25:04 +08:00
yunion-ci-robot
680c504a65 Merge pull request #4397 from ioito/automated-cherry-pick-of-#4394-upstream-release-2.11
Automated cherry pick of #4394: fix: 避免同步将eip同步到弹性网卡里面
2019-12-31 00:47:32 +08:00
Zexi Li
46dde8b659 Merge pull request #4408 from wanyaoqi/automated-cherry-pick-of-#4405-upstream-release-2.11
Automated cherry pick of #4405: fix panic on fstab no content
2019-12-31 00:43:25 +08:00
yunion-ci-robot
c88108613f Merge pull request #4415 from yousong/automated-cherry-pick-of-#4412-upstream-release-2.11
Automated cherry pick of #4412: networks: make ifname hint also valid qemu identifier
2019-12-30 18:54:33 +08:00
Yousong Zhou
9d101572d8 networks: make ifname hint also valid qemu identifier 2019-12-30 18:15:01 +08:00
Zexi Li
394bf8e5ec Merge pull request #4404 from swordqiu/automated-cherry-pick-of-#4401-upstream-release-2.11
Automated cherry pick of #4401: fix: host-update ipmi and host-sync-config support
2019-12-30 17:59:12 +08:00
wanyaoqi
2bd0b5cb0d fix panic on fstab no content 2019-12-30 16:27:37 +08:00
Qiu Jian
06b545f643 fix: host-update ipmi and host-sync-config support 2019-12-30 16:19:04 +08:00
Qu Xuan
7da0fd564a fix: 避免同步将eip同步到弹性网卡里面 2019-12-30 14:55:41 +08:00
yunion-ci-robot
d061a79f01 Merge pull request #4366 from ioito/automated-cherry-pick-of-#4362-upstream-release-2.11
Automated cherry pick of #4362: fix: 更正腾讯云磁盘创建时间
2019-12-29 22:04:39 +08:00
Qu Xuan
072dce826c fix: 更正腾讯云磁盘创建时间 2019-12-28 13:08:37 +08:00
yunion-ci-robot
c0d7ae7758 Merge pull request #4378 from ioito/automated-cherry-pick-of-#4375-upstream-release-2.11
Automated cherry pick of #4375: fix: 避免因太多锁导致删除安全组task失败
2019-12-28 09:53:35 +08:00
Qu Xuan
dbf811e403 fix: 避免因太多锁导致删除安全组task失败 2019-12-27 16:24:31 +08:00
Zexi Li
14bc5e4fd0 Merge pull request #4371 from swordqiu/automated-cherry-pick-of-#4368-upstream-release-2.11
Automated cherry pick of #4368: fix: alter user email charset to utf8
2019-12-27 14:29:04 +08:00
Qiu Jian
79074e4715 fix: alter user email charset to utf8 2019-12-27 14:15:03 +08:00
Zexi Li
c8c9e1ac33 Merge pull request #4329 from swordqiu/automated-cherry-pick-of-#4326-upstream-release-2.11
Automated cherry pick of #4326: fix: baremetal diskconfig empty adaptor index
2019-12-26 21:16:04 +08:00
yunion-ci-robot
5d1f0de884 Merge pull request #4325 from swordqiu/automated-cherry-pick-of-#4322-upstream-release-2.11
Automated cherry pick of #4322: fix: SyncEip时同步项目应该在同步主机信息之前
2019-12-26 15:53:33 +08:00
yunion-ci-robot
a6580b3e3e Merge pull request #4302 from yousong/automated-cherry-pick-of-#4299-upstream-release-2.11
Automated cherry pick of #4299: hostman: different error message for different error reason
2019-12-26 11:04:30 +08:00
yunion-ci-robot
a6dd639459 Merge pull request #4316 from ioito/automated-cherry-pick-of-#4313-upstream-release-2.11
Automated cherry pick of #4313: fix: 避免在域管理后台rules不可见
2019-12-26 01:55:15 +08:00
yunion-ci-robot
05ef873228 Merge pull request #4310 from ioito/automated-cherry-pick-of-#4307-upstream-release-2.11
Automated cherry pick of #4307: fix: 同步openstack宿主机关闭服务后状态
2019-12-26 01:51:15 +08:00
Qiu Jian
6a0981f347 fix: baremetal diskconfig empty adaptor index 2019-12-26 01:13:52 +08:00
Qiu Jian
b06858fe78 fix: SyncEip时同步项目应该在同步主机信息之前 2019-12-26 01:02:40 +08:00
Qu Xuan
597410487a fix: 避免在域管理后台rules不可见 2019-12-25 17:16:00 +08:00
Qu Xuan
ecd93bc0ae fix: 同步openstack宿主机关闭服务后状态 2019-12-25 16:28:18 +08:00
Yousong Zhou
4baa601658 hostman: fsdriver: fix hostname deployment for openwrt
We will need to add native uci support later
2019-12-25 16:04:36 +08:00
Yousong Zhou
99df6d6198 hostman: add default values for host config 2019-12-25 16:04:36 +08:00
Yousong Zhou
d4ec9d48a6 networks: different indent level for asymmetric branches 2019-12-25 16:03:30 +08:00
Yousong Zhou
81d4cb3a2c hostman: different error message for different error reason 2019-12-25 16:03:30 +08:00
yunion-ci-robot
cf05505ece Merge pull request #4273 from swordqiu/automated-cherry-pick-of-#4270-upstream-release-2.11
Automated cherry pick of #4270: feature: support centos 8 deployment. centos 8 requiest NetworkManager
2019-12-23 10:43:14 +08:00
Qiu Jian
05670d8cf6 feature: support centos 8 deployment. centos 8 requiest NetworkManager 2019-12-21 18:45:20 +08:00
yunion-ci-robot
20b932fdd0 Merge pull request #4215 from yousong/automated-cherry-pick-of-#4212-upstream-release-2.11
Automated cherry pick of #4212: guestnetworks: ignore empty preferIfname
2019-12-18 19:01:08 +08:00
Yousong Zhou
f4d3670802 guestnetworks: ignore empty preferIfname
Fixes cc02ac74 ("guestnetworks: check ifname uniqueness across different
networks")
2019-12-18 09:20:14 +00:00
yunion-ci-robot
3985fa7bbd Merge pull request #4198 from ioito/automated-cherry-pick-of-#4194-upstream-release-2.11
Automated cherry pick of #4194: fix: 标签过滤和框架保持一致
2019-12-17 16:35:04 +08:00
Qu Xuan
6509cb3e83 fix: 标签过滤和框架保持一致 2019-12-17 15:58:00 +08:00
yunion-ci-robot
636c302148 Merge pull request #4143 from tb365/automated-cherry-pick-of-#4141-upstream-release-2.11
Automated cherry pick of #4141: huawei sync instance offset bugfix
2019-12-14 11:08:00 +08:00
TangBin
b0db0b5275 huawei sync instance offset bugfix 2019-12-13 15:45:51 +08:00
yunion-ci-robot
b4f8789f96 Merge pull request #4137 from swordqiu/automated-cherry-pick-of-#4134-upstream-release-2.11
Automated cherry pick of #4134: fix: misc bugfix for esxi 20191213
2019-12-13 12:59:00 +08:00
yunion-ci-robot
a5a9f9c363 Merge pull request #4126 from yousong/automated-cherry-pick-of-#4123-upstream-release-2.11
Automated cherry pick of #4123: guestnetworks: check ifname uniqueness across different networks
2019-12-13 12:57:01 +08:00
Qiu Jian
bafb696d7e fix: misc bugfix for esxi 20191213 2019-12-13 12:35:56 +08:00
yunion-ci-robot
83f5716f67 Merge pull request #4132 from ioito/automated-cherry-pick-of-#4129-upstream-release-2.11
Automated cherry pick of #4129: fix: 避免插入时出现duplicate primary key error
2019-12-13 11:38:59 +08:00
Qu Xuan
cefe49d789 fix: 避免插入时出现duplicate primary key error 2019-12-13 10:46:26 +08:00
Yousong Zhou
be6a98b8a8 guestnetworks: check ifname uniqueness across different networks
With PerformChangeIpAddr, it can happen that a guestnetwork from network
A can take a name that was originally allocated by network B
2019-12-12 15:49:56 +00:00
yunion-ci-robot
8f09f56138 Merge pull request #4100 from ioito/automated-cherry-pick-of-#4097-upstream-release-2.11
Automated cherry pick of #4097: fix: 避免zstack参数含有中文,未编码导致请求失败
2019-12-12 11:01:39 +08:00
Qu Xuan
62bb76ff44 fix: 避免zstack参数含有中文,未编码导致请求失败 2019-12-11 23:23:06 +08:00
yunion-ci-robot
2bfc2909f4 Merge pull request #4107 from wanyaoqi/automated-cherry-pick-of-#4104-upstream-release-2.11
Automated cherry pick of #4104: fix image upload log event
2019-12-11 22:29:44 +08:00
wanyaoqi
85d531f716 fix image upload log event 2019-12-11 20:41:25 +08:00
yunion-ci-robot
9f9dd99329 Merge pull request #4095 from yousong/automated-cherry-pick-of-#4092-upstream-release-2.11
Automated cherry pick of #4092: loadbalancerbackends: janitor: move to InitializeData
2019-12-11 20:14:44 +08:00
Yousong Zhou
e3bf4cbc5e loadbalancerbackends: janitor: move to InitializeData
The janitor only makes sense when inside region service
2019-12-11 08:24:26 +00:00
yunion-ci-robot
29f42dadde Merge pull request #4075 from ioito/automated-cherry-pick-of-#4072-upstream-release-2.11
Automated cherry pick of #4072: fix: 导出用户标签不加user:前缀
2019-12-11 15:07:39 +08:00
Qu Xuan
c63a471e59 fix: 导出用户标签不加user:前缀 2019-12-09 21:46:24 +08:00
yunion-ci-robot
8aa376a673 Merge pull request #4038 from ioito/automated-cherry-pick-of-#4035-upstream-release-2.11
Automated cherry pick of #4035: fix: 避免普通用户添加规则到系统安全组
2019-12-06 23:22:36 +08:00
Qu Xuan
e5411cb484 fix: 避免普通用户添加规则到系统安全组 2019-12-06 15:34:21 +08:00
yunion-ci-robot
2752e6fddd Merge pull request #4024 from wanyaoqi/automated-cherry-pick-of-#4021-upstream-release-2.11
Automated cherry pick of #4021: add socket used check of deploy server
2019-12-05 14:36:36 +08:00
wanyaoqi
d5d1c91d8e add socket used check of deploy server 2019-12-04 11:42:15 +08:00
yunion-ci-robot
d9cf597830 Merge pull request #4020 from yousong/automated-cherry-pick-of-#4016-upstream-release-2.11
Automated cherry pick of #4016: hostman: hostinfo: turn off report_ignored_msrs
2019-12-04 11:02:34 +08:00
Yousong Zhou
93ba40ec7a hostman: hostinfo: turn off report_ignored_msrs
Quote mainline linux commit fab0aa3b ("KVM: x86: Allow suppressing
prints on RDMSR/WRMSR of unhandled MSRs")

> Some guests use these unhandled MSRs very frequently.
> This cause dmesg to be populated with lots of aggregated messages on
> usage of ignored MSRs. As ignore_msrs=true means that the user is
> well-aware his guest use ignored MSRs, allow to also disable the
> prints on their usage.
>
> An example of such guest is ESXi which tends to access a lot to MSR
> 0x34 (MSR_SMI_COUNT) very frequently.
>
> In addition, we have observed this to cause unnecessary delays to
> guest execution. Such an example is ESXi which experience networking
> delays in it's guests (L2 guests) because of these prints (even when
> prints are rate-limited). This can easily be reproduced by pinging
> from one L2 guest to another.  Once in a while, a peak in ping RTT
> will be observed. Removing these unhandled MSR prints solves the
> issue.
>
> Because these prints can help diagnose issues with guests,
> this commit only suppress them by a module parameter instead of
> removing them from code entirely.
2019-12-04 02:43:32 +00:00
Zexi Li
e080b3de7c Merge pull request #3980 from rainzm/automated-cherry-pick-of-#3979-upstream-release-2.11
Automated cherry pick of #3979: feat(region): Add suspend feature for vmware guest
2019-12-02 10:35:28 +08:00
郑雨
378a02a05f feat(region): Add suspend feature for vmware guest 2019-11-29 16:09:07 +08:00
yunion-ci-robot
243323a68c Merge pull request #3961 from wanyaoqi/automated-cherry-pick-of-#3958-upstream-release-2.11
Automated cherry pick of #3958: add lock on host detected offline
2019-11-28 14:14:28 +08:00
wanyaoqi
93074abfa4 add lock on host detected offline 2019-11-28 11:23:12 +08:00
yunion-ci-robot
382de0d48a Merge pull request #3947 from wanyaoqi/automated-cherry-pick-of-#3944-upstream-release-2.11
Automated cherry pick of #3944: fix image set chksum
2019-11-27 20:47:30 +08:00
wanyaoqi
6d3ba300d2 fix image set chksum 2019-11-27 18:28:21 +08:00
yunion-ci-robot
07fcf6cc9f Merge pull request #3899 from tb365/automated-cherry-pick-of-#3897-upstream-release-2.11
Automated cherry pick of #3897: huawei disk detach bugfix
2019-11-27 09:06:29 +08:00
yunion-ci-robot
f69cbad397 Merge pull request #3913 from ioito/automated-cherry-pick-of-#3910-upstream-release-2.11
Automated cherry pick of #3910: fix: 避免有,Azure更新安全组规则出错
2019-11-27 08:57:28 +08:00
yunion-ci-robot
9b554c5f51 Merge pull request #3905 from ioito/automated-cherry-pick-of-#3902-upstream-release-2.11
Automated cherry pick of #3902: fix: 普通后台也返回cloudregion_id信息
2019-11-27 08:54:28 +08:00
Qu Xuan
f9be080ef7 fix: 避免有,Azure更新安全组规则出错 2019-11-26 20:51:47 +08:00
Qu Xuan
01031c77d8 fix: 普通后台也返回cloudregion_id信息 2019-11-26 19:13:13 +08:00
TangBin
193ce0fab1 huawei disk detach bugfix 2019-11-26 11:41:23 +08:00
Zexi Li
96d8a5fafe Merge pull request #3889 from swordqiu/automated-cherry-pick-of-#3887-upstream-release-2.11
Automated cherry pick of #3887: fix: host-add-netif requires index
2019-11-26 00:44:02 +08:00
Zexi Li
aa39713f5e Merge pull request #3882 from swordqiu/automated-cherry-pick-of-#3879-upstream-release-2.11
Automated cherry pick of #3879: fix: keystone project resource count not set set to zero
2019-11-26 00:41:45 +08:00
Qiu Jian
fe891af006 fix: host-add-netif requires index 2019-11-25 23:47:25 +08:00
Qiu Jian
09c46eece9 fix: keystone project resource count not set set to zero 2019-11-25 22:33:48 +08:00
yunion-ci-robot
54e2fce808 Merge pull request #3871 from ioito/automated-cherry-pick-of-#3868-upstream-release-2.11
Automated cherry pick of #3868: fix: 避免openstack重装系统,过不了镜像系统盘大小校验
2019-11-25 17:19:27 +08:00
Qu Xuan
4b76dad113 fix: 避免openstack重装系统,过不了镜像系统盘大小校验 2019-11-25 15:04:37 +08:00
yunion-ci-robot
a83cd5f9b7 Merge pull request #3866 from zexi/automated-cherry-pick-of-#3863-upstream-release-2.11
Automated cherry pick of #3863: baremetal: fix init baremetals fatal exit
2019-11-25 10:21:27 +08:00
Zexi Li
8759c83539 baremetal: fix init baremetals fatal exit 2019-11-25 09:41:32 +08:00
yunion-ci-robot
810b60d53c Merge pull request #3852 from swordqiu/automated-cherry-pick-of-#3848-upstream-release-2.11
Automated cherry pick of #3848: fix: user join read-only group response timeout
2019-11-22 22:52:27 +08:00
yunion-ci-robot
efaa914b7d Merge pull request #3860 from ioito/automated-cherry-pick-of-#3857-upstream-release-2.11
Automated cherry pick of #3857: fix: 避免旧密码覆盖新重置的密码
2019-11-22 21:51:27 +08:00
Qu Xuan
030e6bc3dc fix: 避免旧密码覆盖新重置的密码 2019-11-22 20:46:49 +08:00
Qiu Jian
1549d98fae fix: user join read-only group response timeout 2019-11-22 16:24:13 +08:00
yunion-ci-robot
fa54baf1fa Merge pull request #3836 from wanyaoqi/automated-cherry-pick-of-#3833-upstream-release-2.11
Automated cherry pick of #3833: host complie error
2019-11-21 18:50:26 +08:00
wanyaoqi
eb62aa5113 host complie error 2019-11-21 18:42:31 +08:00
Zexi Li
894bcd95bd Merge pull request #3827 from wanyaoqi/automated-cherry-pick-of-#3824-upstream-release-2.11
Automated cherry pick of #3824: fix resize disk
2019-11-21 18:22:32 +08:00
wanyaoqi
92a46d1944 fix host register 2019-11-21 18:07:26 +08:00
yunion-ci-robot
8fc5125d11 Merge pull request #3816 from tb365/automated-cherry-pick-of-#3813-upstream-release-2.11
Automated cherry pick of #3813: aws upload image bugfix & huawei change default disk type to SAS
2019-11-21 15:39:25 +08:00
Zexi Li
ccd628b554 Merge pull request #3812 from wanyaoqi/automated-cherry-pick-of-#3749-upstream-release-2.11
Automated cherry pick of #3749: hugepage fix
2019-11-21 00:23:28 +08:00
wanyaoqi
6cf5d41970 fix resize disk 2019-11-20 22:04:57 +08:00
TangBin
395e06e566 aws upload image bugfix & huawei change default disk type to SAS 2019-11-20 19:06:59 +08:00
wanyaoqi
68b9474275 hugepage fix 2019-11-20 18:45:24 +08:00
yunion-ci-robot
85ef08fe41 Merge pull request #3791 from yousong/automated-cherry-pick-of-#3788-upstream-release-2.11
Automated cherry pick of #3788: lbagent: pidfile: add PidFile
2019-11-19 23:22:27 +08:00
yunion-ci-robot
d6fe2db17b Merge pull request #3784 from yousong/automated-cherry-pick-of-#3778-upstream-release-2.11
Automated cherry pick of #3778: treewide: 避免使用fmt.Print记录日志
2019-11-19 23:16:25 +08:00
Yousong Zhou
f93c5a57be lbagent: pidfile: remove ReadPidFile() 2019-11-19 12:28:05 +00:00
Yousong Zhou
45545a7374 lbagent: stop daemons: use agentutils.PidFile 2019-11-19 12:28:05 +00:00
Yousong Zhou
e89261c218 lbagent: haproxy: use agentutils.PidFile 2019-11-19 12:28:05 +00:00
Yousong Zhou
a67bed276f lbagent: gobetween: use agentutils.PidFile 2019-11-19 12:28:05 +00:00
Yousong Zhou
39301a68d0 lbagent: telegraf: use agentutils.PidFile 2019-11-19 12:28:05 +00:00
Yousong Zhou
1b509d4977 lbagent: keepalived: use agentutils.PidFile 2019-11-19 12:28:05 +00:00
Yousong Zhou
1bfe912edf lbagent: pidfile: add PidFile 2019-11-19 12:28:05 +00:00
Yousong Zhou
4c975db0eb vendor: update sqlchemy 2019-11-19 11:25:23 +00:00
Yousong Zhou
e28551e3ee treewide: 避免使用fmt.Print记录日志 2019-11-19 11:25:23 +00:00
Zexi Li
9fbfbe4da8 Merge pull request #3776 from ioito/automated-cherry-pick-of-#3773-upstream-release-2.11
Automated cherry pick of #3773: fix: 调整存储容量后刷新调度缓存
2019-11-19 16:10:07 +08:00
Qu Xuan
1f2e786d4c fix: 调整存储容量后刷新调度缓存 2019-11-19 14:34:57 +08:00
Zexi Li
6ab91bb9dd Merge pull request #3734 from yousong/automated-cherry-pick-of-#3731-upstream-release-2.11
Automated cherry pick of #3731: build: 避免并发构建rpm时触发file exists错误
2019-11-19 10:48:18 +08:00
yunion-ci-robot
c49dee4b32 Merge pull request #3740 from rainzm/automated-cherry-pick-of-#3739-upstream-release-2.11
Automated cherry pick of #3739: fix(region): Fix the return value when sycning snapshotpolicy
2019-11-18 14:30:22 +08:00
郑雨
6e068724e3 fix(region): Fix the return value when sycning snapshotpolicy
This is a big bug: the return value of SyncSnapshotPolicies is a empty
value.
2019-11-18 12:50:34 +08:00
Yousong Zhou
e4ffc9aaca build: 避免并发构建rpm时触发file exists错误 2019-11-18 02:44:43 +00:00
Zexi Li
59f108988d Merge pull request #3725 from swordqiu/automated-cherry-pick-of-#3724-upstream-release-2.11
Automated cherry pick of #3724: update vendor for qcloud cos-go-sdk
2019-11-18 00:36:00 +08:00
Qiu Jian
a36fb600f1 update vendor for qcloud cos-go-sdk 2019-11-16 15:19:44 +08:00
yunion-ci-robot
9237341847 Merge pull request #3719 from ioito/automated-cherry-pick-of-#3699-upstream-release-2.11
Automated cherry pick of #3699: fix: cpuCmtbound sync for zstack
2019-11-15 20:21:21 +08:00
Qu Xuan
41ca1fcea4 fix: cpuCmtbound sync for zstack 2019-11-15 19:08:23 +08:00
yunion-ci-robot
1f81c03d65 Merge pull request #3709 from ioito/automated-cherry-pick-of-#3593-upstream-release-2.11
Automated cherry pick of #3593: fix: 避免公有云绑定秘钥后解密密码为空
2019-11-15 17:17:20 +08:00
Qu Xuan
2037789ada fix: 避免公有云绑定秘钥后解密密码为空 2019-11-15 16:15:29 +08:00
Zexi Li
3d05d940d1 Merge pull request #3706 from zexi/automated-cherry-pick-of-#3703-upstream-release-2.11
Automated cherry pick of #3703: webconsole: skip spice access interval check
2019-11-15 15:07:06 +08:00
Zexi Li
19ac1f2f92 webconsole: skip spice access interval check 2019-11-15 15:07:04 +08:00
yunion-ci-robot
a16a7d89c0 Merge pull request #3651 from swordqiu/automated-cherry-pick-of-#3649-upstream-release-2.11
Automated cherry pick of #3649: fix: agent-list show zone info
2019-11-14 12:38:22 +08:00
yunion-ci-robot
c184f9cc1a Merge pull request #3609 from yousong/automated-cherry-pick-of-#3606-upstream-release-2.11
Automated cherry pick of #3606: influxdb: 记录结果中的tags
2019-11-14 00:23:19 +08:00
yunion-ci-robot
8be0f1edb5 Merge pull request #3639 from ioito/automated-cherry-pick-of-#3636-upstream-release-2.11
Automated cherry pick of #3636: fix: 避免associationtype异常
2019-11-14 00:09:22 +08:00
Qiu Jian
e1f1214b07 fix: agent-list show zone info 2019-11-13 23:33:18 +08:00
Qu Xuan
d4a97293eb fix: 避免associationtype异常 2019-11-13 19:57:40 +08:00
yunion-ci-robot
db1235ebf9 Merge pull request #3634 from ioito/automated-cherry-pick-of-#3631-upstream-release-2.11
Automated cherry pick of #3631: fix: 避免匹配到64导致version是6
2019-11-13 19:45:20 +08:00
yunion-ci-robot
f39ca7b5e7 Merge pull request #3624 from swordqiu/automated-cherry-pick-of-#3621-upstream-release-2.11
Automated cherry pick of #3621: fix: nic teaming/bonding not working properly
2019-11-13 17:50:20 +08:00
Zexi Li
a6ed8428c6 Merge pull request #3642 from zexi/automated-cherry-pick-of-#3641-upstream-release-2.11
Automated cherry pick of #3641: climc: fix k8s sa not register
2019-11-13 16:49:41 +08:00
Zexi Li
73f1405793 climc: fix k8s sa not register 2019-11-13 16:48:33 +08:00
Qu Xuan
a91a4f7f68 fix: 避免匹配到64导致version是6 2019-11-13 14:50:47 +08:00
Yousong Zhou
00498d22ac climc: 添加lblistener{,rule}-backend-status命令 2019-11-13 03:02:29 +00:00
Yousong Zhou
3de69737b9 lblis, lbr: 增加查询后端状态接口 2019-11-13 02:42:42 +00:00
Yousong Zhou
9df8bd0c3a lbbackends: 使用yunion.io/pkg/errors 2019-11-13 02:42:42 +00:00
Yousong Zhou
4a3a21330a influxdb: 记录结果中的tags 2019-11-13 02:42:42 +00:00
yunion-ci-robot
d8cc67c7bc Merge pull request #3614 from wanyaoqi/automated-cherry-pick-of-#3611-upstream-release-2.11
Automated cherry pick of #3611: fix resie fs
2019-11-13 01:40:20 +08:00
yunion-ci-robot
a645ca7623 Merge pull request #3601 from ioito/automated-cherry-pick-of-#3598-upstream-release-2.11
Automated cherry pick of #3598: fix: 支持创建时指定多个安全组
2019-11-13 01:30:19 +08:00
yunion-ci-robot
6cbb0c51a3 Merge pull request #3618 from yousong/automated-cherry-pick-of-#3523-upstream-release-2.11
Automated cherry pick of #3523: lockman: log bug with Errorf
2019-11-13 00:48:22 +08:00
Qiu Jian
d92ad4efa2 fix: nic teaming/bonding not working properly 2019-11-13 00:23:03 +08:00
Yousong Zhou
ba93c96392 vendor: restore a few files to locally managed version 2019-11-12 15:21:51 +00:00
yunion-ci-robot
6fc1d3aa5f Merge pull request #3585 from ioito/automated-cherry-pick-of-#3582-upstream-release-2.11
Automated cherry pick of #3582: fix: 避免Openstack越过存储检查
2019-11-12 21:43:33 +08:00
Yousong Zhou
456dcaafcc vendor: update 2019-11-12 13:30:23 +00:00
Yousong Zhou
0115c9dc5e lockman: test multiple lockman 2019-11-12 13:28:03 +00:00
Yousong Zhou
c35e53c1db cloudcommon: options: new options for etcd lockman 2019-11-12 13:28:03 +00:00
Yousong Zhou
8390f25f46 lockman: distributed lockman with etcd 2019-11-12 13:28:03 +00:00
Yousong Zhou
21262995a9 lockman: log bug with Errorf 2019-11-12 13:28:03 +00:00
wanyaoqi
f102cf5559 fix resie fs 2019-11-12 21:08:04 +08:00
Qu Xuan
9e2e45d25a fix: 支持创建时指定多个安全组 2019-11-12 20:06:01 +08:00
Qu Xuan
1f9a72a016 fix: 避免Openstack越过存储检查 2019-11-12 15:17:50 +08:00
yunion-ci-robot
c68bec9230 Merge pull request #3562 from tb365/automated-cherry-pick-of-#3558-upstream-release-2.11
Automated cherry pick of #3558: huawei disk attach bugfix
2019-11-12 00:32:17 +08:00
tangbin
df57d232e7 huawei disk attach bugfix 2019-11-11 10:38:28 +08:00
Zexi Li
b20463d3e4 Merge pull request #3541 from zexi/automated-cherry-pick-of-#3539-upstream-release-2.11
Automated cherry pick of #3539: climc: k8s api update
2019-11-08 18:04:39 +08:00
Zexi Li
9985f8c92b climc: k8s api update 2019-11-08 17:55:39 +08:00
yunion-ci-robot
d4aa8ba0cf Merge pull request #3532 from tb365/automated-cherry-pick-of-#3524-upstream-release-2.11
Automated cherry pick of #3524: 1.elb certificate usable fix 2.aws tcp&udp backendgroup create bugfix 3.aws backendgroup create bugfix 4.aws create listener bugfix 5.aws delete loadbalancer bugfix 6.aws backendgroup cache query fix 7.aws delete loadbalancer listener fix 8.aws create backendgroup fix 9.aws delete backend fix 10.loadbalancer listener rule add is_default column 11.huawei elb backendgroup sync fix 12.aws https listener sync fix
2019-11-08 17:49:15 +08:00
yunion-ci-robot
f7f483cf6e Merge pull request #3530 from zexi/automated-cherry-pick-of-#3528-upstream-release-2.11
Automated cherry pick of #3528: webconsole: fix baremetal ipmitool sol payload active on another session
2019-11-08 13:34:16 +08:00
TangBin
3ef8ba59b8 1.elb certificate usable fix 2.aws tcp&udp backendgroup create bugfix 3.aws backendgroup create bugfix 4.aws create listener bugfix 5.aws delete loadbalancer bugfix 6.aws backendgroup cache query fix 7.aws delete loadbalancer listener fix 8.aws create backendgroup fix 9.aws delete backend fix 10.loadbalancer listener rule add is_default column 11.huawei elb backendgroup sync fix 12.aws https listener sync fix 2019-11-08 11:46:53 +08:00
yunion-ci-robot
16a9cf704b Merge pull request #3526 from ioito/automated-cherry-pick-of-#3518-upstream-release-2.11
Automated cherry pick of #3518: fix: 虚拟机漂移后设置新的hostId
2019-11-08 11:46:17 +08:00
Zexi Li
1264d36edd webconsole: fix baremetal ipmitool sol payload active on another session 2019-11-08 11:36:40 +08:00
Qu Xuan
c9b9b6d880 fix: 虚拟机漂移后设置新的hostId 2019-11-08 10:50:42 +08:00
yunion-ci-robot
9956be208a Merge pull request #3516 from ioito/automated-cherry-pick-of-#3492-upstream-release-2.11
Automated cherry pick of #3492: fix: 避免version输出不正确
2019-11-08 00:54:16 +08:00
Qu Xuan
ddbe197e33 fix: 避免version输出不正确 2019-11-07 17:42:59 +08:00
yunion-ci-robot
99a4759e50 Merge pull request #3484 from tb365/automated-cherry-pick-of-#3478-upstream-release-2.11
Automated cherry pick of #3478: region sync fix
2019-11-07 15:08:17 +08:00
yunion-ci-robot
f2b4868c0d Merge pull request #3496 from swordqiu/automated-cherry-pick-of-#3494-upstream-release-2.11
Automated cherry pick of #3494: fix: skip esxi vm with nil config
2019-11-07 10:19:16 +08:00
yunion-ci-robot
406989bc5b Merge pull request #3489 from swordqiu/automated-cherry-pick-of-#3487-upstream-release-2.11
Automated cherry pick of #3487: fix: nil pointer panic when auth decode body failed
2019-11-07 10:18:17 +08:00
Qiu Jian
d56d5fcf0c fix: skip esxi vm with nil config 2019-11-06 22:15:20 +08:00
Qiu Jian
e1ed838474 fix: nil pointer panic when auth decode body failed 2019-11-06 19:43:19 +08:00
TangBin
a6c7b316ec region sync fix 2019-11-06 14:33:35 +08:00
yunion-ci-robot
a8ecdace51 Merge pull request #3470 from yousong/automated-cherry-pick-of-#3468-upstream-release-2.11
Automated cherry pick of #3468: azure: fix tmp image file handling
2019-11-06 12:44:15 +08:00
yunion-ci-robot
e369e4dbbd Merge pull request #3464 from tb365/automated-cherry-pick-of-#3463-upstream-release-2.11
Automated cherry pick of #3463: elb sync fix
2019-11-06 10:25:14 +08:00
Yousong Zhou
b3f72fd7ac azure: storagecache: fix writing sparse image file 2019-11-05 09:10:33 +00:00
Yousong Zhou
45c4bec115 fileutils: add SparseFileWriter 2019-11-05 09:10:33 +00:00
Yousong Zhou
d97710d366 webconsole: always do session close on pty stop 2019-11-05 09:10:33 +00:00
Yousong Zhou
8efdfe4a3e fileutils: SReadSeeker: fix closing tmpfile fd 2019-11-05 09:10:33 +00:00
Yousong Zhou
f0157d07ba seclib2: add doc describing the protocol on removal of tmpfile 2019-11-05 09:10:33 +00:00
Yousong Zhou
76936574d8 aliyun: fix tmp image file handling 2019-11-05 09:10:32 +00:00
Yousong Zhou
8f103ed87e azure: fix tmp image file handling 2019-11-05 09:10:32 +00:00
TangBin
466e0213f6 elb sync fix 2019-11-05 16:30:35 +08:00
yunion-ci-robot
8227e2c080 Merge pull request #3455 from swordqiu/automated-cherry-pick-of-#3454-upstream-release-2.11
Automated cherry pick of #3454: fix: aliyun eip associate instance ignores IncorrectInstanceStatus error
2019-11-04 22:45:15 +08:00
yunion-ci-robot
92a802ea5a Merge pull request #3445 from ioito/automated-cherry-pick-of-#3428-upstream-release-2.11
Automated cherry pick of #3428: fix: 避免创建vmware磁盘快照
2019-11-04 22:44:16 +08:00
Qu Xuan
5bc0c7743e fix: 避免创建vmware磁盘快照 2019-11-04 22:02:55 +08:00
yunion-ci-robot
367a6a9cc2 Merge pull request #3459 from yousong/automated-cherry-pick-of-#3457-upstream-release-2.11
Automated cherry pick of #3457: build: show diffs made by checks
2019-11-04 22:01:16 +08:00
yunion-ci-robot
282f62737f Merge pull request #3451 from ioito/automated-cherry-pick-of-#3430-upstream-release-2.11
Automated cherry pick of #3430: fix: 标准镜像version
2019-11-04 21:37:17 +08:00
yunion-ci-robot
87763273ee Merge pull request #3448 from ioito/automated-cherry-pick-of-#3429-upstream-release-2.11
Automated cherry pick of #3429: fix: 梳理磁盘reset条件
2019-11-04 21:23:14 +08:00
yunion-ci-robot
4b02b01b16 Merge pull request #3442 from tb365/automated-cherry-pick-of-#3439-upstream-release-2.11
Automated cherry pick of #3439: elb bugfix & aws client init bugfix
2019-11-04 17:12:13 +08:00
TangBin
751716626f elb bugfix & aws client init bugfix 2019-11-04 15:24:32 +08:00
Yousong Zhou
bfc762b064 build: show diffs made by checks 2019-11-04 07:19:58 +00:00
Qiu Jian
a527c1c028 fix: aliyun eip associate instance ignores IncorrectInstanceStatus error 2019-11-04 14:40:51 +08:00
yunion-ci-robot
7ea767d797 Merge pull request #3435 from swordqiu/automated-cherry-pick-of-#3434-upstream-release-2.11
Automated cherry pick of #3434: fix: bucket invalid status due to disabled cloud provider
2019-11-04 10:33:14 +08:00
Qu Xuan
d1af8ed43b fix: 标准镜像version 2019-11-04 10:21:35 +08:00
Qu Xuan
f265eeee1c fix: 梳理磁盘reset条件 2019-11-04 10:17:29 +08:00
Qiu Jian
743621c473 fix: bucket invalid status due to disabled cloud provider 2019-11-01 22:12:18 +08:00
Yousong Zhou
d033a115e1 Merge pull request #3417 from ioito/automated-cherry-pick-of-#3412-upstream-release-2.11
Automated cherry pick of #3412: fix: add latitude for huawei cloud
2019-10-30 21:57:30 +08:00
Qu Xuan
2c75b8674a fix: add latitude for huawei cloud 2019-10-30 21:30:36 +08:00
yunion-ci-robot
42f3739c5d Merge pull request #3400 from wanyaoqi/automated-cherry-pick-of-#3398-upstream-release-2.11
Automated cherry pick of #3398: change config add log event
2019-10-29 23:44:10 +08:00
yunion-ci-robot
1cf143f857 Merge pull request #3403 from ioito/automated-cherry-pick-of-#3363-upstream-release-2.11
Automated cherry pick of #3363: fix: 避免虚拟机正常磁盘在回收站
2019-10-28 22:17:09 +08:00
ioito
8894641100 fix: 避免虚拟机正常磁盘在回收站 2019-10-28 21:56:14 +08:00
yunion-ci-robot
7f4e2ccb1a Merge pull request #3376 from yousong/automated-cherry-pick-of-#3374-upstream-release-2.11
Automated cherry pick of #3374: lb: 创建时校验不通过返回httperrors
2019-10-28 21:46:08 +08:00
yunion-ci-robot
9aec5dd2a0 Merge pull request #3395 from wanyaoqi/automated-cherry-pick-of-#3390-upstream-release-2.11
Automated cherry pick of #3390: disk list add manual snapshot count
2019-10-28 21:34:12 +08:00
yunion-ci-robot
ce81c3f2b4 Merge pull request #3396 from Mjoycarry/automated-cherry-pick-of-#3380-upstream-release-2.11
Automated cherry pick of #3380: fix: local snapshot's ownerId should be same with its disk even if extsnapshot's project has corresponding cloud project
2019-10-28 21:21:10 +08:00
wanyaoqi
a18e24355f change config add log event 2019-10-28 21:17:34 +08:00
郑雨
1a51913a66 fix: local snapshot's ownerId should be same with its disk even if extsnapshot's project has corresponding cloud project 2019-10-28 21:01:30 +08:00
wanyaoqi
545df80e28 disk list add manual snapshot count 2019-10-28 20:55:21 +08:00
yunion-ci-robot
9a8840837b Merge pull request #3388 from wanyaoqi/automated-cherry-pick-of-#3386-upstream-release-2.11
Automated cherry pick of #3386: support hmp
2019-10-28 20:05:10 +08:00
wanyaoqi
cae9aca3fd support hmp 2019-10-28 19:06:02 +08:00
yunion-ci-robot
89a36367ef Merge pull request #3383 from yousong/automated-cherry-pick-of-#3381-upstream-release-2.11
Automated cherry pick of #3381: .circleci: yunionio/onecloud-ci: bump golang version to 1.13.3
2019-10-28 15:43:09 +08:00
Yousong Zhou
ab1f02a278 goimports: first run 2019-10-28 06:29:54 +00:00
Yousong Zhou
8968b1f4b6 build: add goimports-check 2019-10-28 06:27:25 +00:00
Yousong Zhou
1b7b492b55 .circleci: use yunionio/onecloud-ci:v1.0.3 2019-10-28 06:27:25 +00:00
Yousong Zhou
4faf20e18c .circleci: yunionio/onecloud-ci: bundle custom goimports 2019-10-28 06:27:25 +00:00
Yousong Zhou
c1c9832ddb .circleci: yunionio/onecloud-ci: run as user "build" 2019-10-28 06:27:25 +00:00
Yousong Zhou
6c2e6c7edb .circleci: yunionio/onecloud-ci: bump golang version to 1.13.3 2019-10-28 06:27:25 +00:00
Yousong Zhou
6daad655a5 cloudcommon: db: 允许普通用户获得pending_deleted字段
Convenient for testing
2019-10-28 02:30:54 +00:00
Yousong Zhou
ed952ba303 lb: 创建时校验不通过返回httperrors 2019-10-28 02:30:54 +00:00
yunion-ci-robot
f9ede8b78f Merge pull request #3372 from swordqiu/automated-cherry-pick-of-#3370-upstream-release-2.11
Automated cherry pick of #3370: fix: host-wire-update param rename
2019-10-28 09:43:12 +08:00
Qiu Jian
b8eec1e7f5 fix: hostwire update user network name as wireId 2019-10-27 14:28:19 +08:00
Qiu Jian
f04459430b fix: host-wire-update param rename 2019-10-27 14:28:19 +08:00
Zexi Li
b4eb1250b0 Merge pull request #3362 from zexi/hotfix/baremetal-stop-task
baremetal: fix repeat stop task invoke
2019-10-25 17:33:32 +08:00
Zexi Li
f45ecee0c2 baremetal: fix repeat stop task invoke 2019-10-25 17:26:26 +08:00
yunion-ci-robot
ee80b9f976 Merge pull request #3361 from ioito/automated-cherry-pick-of-#3352-upstream-release-2.11
Automated cherry pick of #3352: update vendor
2019-10-25 17:23:07 +08:00
ioito
d47865d4d8 update vendor 2019-10-25 16:58:51 +08:00
yunion-ci-robot
1062111249 Merge pull request #3341 from tb365/automated-cherry-pick-of-#3340-upstream-release-2.11
Automated cherry pick of #3340: huawei & qcloud & aws bugfix
2019-10-25 16:33:07 +08:00
TangBin
e08a739267 huawei & qcloud & aws bugfix 2019-10-25 16:13:02 +08:00
Zexi Li
7cf007ea32 Merge pull request #3359 from Mjoycarry/automated-cherry-pick-of-#3358-upstream-release-2.11
Automated cherry pick of #3358: fix: eip display info will contains 'associate_name' even if associate_type is not vm; eip-dissociate will add log to eip now; eip-dissociate for natgateway will check if natgatway has nat rules with this eip.
2019-10-25 15:37:07 +08:00
Rain
842c52cfda fix: eip display info will contains 'associate_name' even if associate_type is not vm; eip-dissociate will add log to eip now; eip-dissociate for natgateway will check if natgatway has nat rules with this eip. 2019-10-25 15:21:48 +08:00
yunion-ci-robot
04ab7dd50d Merge pull request #3356 from Mjoycarry/automated-cherry-pick-of-#3355-upstream-release-2.11
Automated cherry pick of #3355: fix: shoule purge snat table and dnat table when sync remove local natgateway; nat rule's 'real_name'.
2019-10-25 12:18:06 +08:00
Rain
236513194d fix: shoule purge snat table and dnat table when sync remove local natgateway; nat rule's 'real_name'. 2019-10-25 12:03:14 +08:00
yunion-ci-robot
087365cb02 Merge pull request #3349 from ioito/automated-cherry-pick-of-#3347-upstream-release-2.11
Automated cherry pick of #3347: fix: 更正stoping状态
2019-10-24 14:11:06 +08:00
ioito
ed06f69bd5 fix: 更正stoping状态 2019-10-24 10:51:56 +08:00
yunion-ci-robot
8e6fdba9ae Merge pull request #3334 from swordqiu/automated-cherry-pick-of-#3332-upstream-release-2.11
Automated cherry pick of #3332: fix: allow multi-guest-dhcp
2019-10-24 10:46:08 +08:00
yunion-ci-robot
6a87d5498f Merge pull request #3345 from ioito/automated-cherry-pick-of-#3343-upstream-release-2.11
Automated cherry pick of #3343: fix: 避免update存储tag信息异常
2019-10-24 07:47:06 +08:00
yunion-ci-robot
ab1b1be2d7 Merge pull request #3338 from yousong/automated-cherry-pick-of-#3336-upstream-release-2.11
Automated cherry pick of #3336: dns: 添加k8s_skip选项
2019-10-24 07:30:05 +08:00
yunion-ci-robot
6d2c9e7504 Merge pull request #3327 from ioito/automated-cherry-pick-of-#3325-upstream-release-2.11
Automated cherry pick of #3325: fix: 避免解绑eip更新状态不及时导致再次同步出现public ip问题
2019-10-24 01:57:05 +08:00
yunion-ci-robot
2cbe220ea9 Merge pull request #3311 from wanyaoqi/automated-cherry-pick-of-#3309-upstream-release-2.11
Automated cherry pick of #3309: fix snapshot-list list created_by, migrate add auto-converge
2019-10-24 01:52:06 +08:00
Qiu Jian
1faf0a3b7e fix: allow multi-guest-dhcp 2019-10-24 01:15:31 +08:00
ioito
6aa482cdf8 fix: 避免update存储tag信息异常 2019-10-23 20:53:36 +08:00
Yousong Zhou
3a5fae1cae dns: 添加k8s_skip选项 2019-10-23 08:45:24 +00:00
ioito
3817e1e8cc fix: 避免解绑eip更新状态不及时导致再次同步出现public ip问题 2019-10-22 21:57:56 +08:00
Zexi Li
a186a2b682 Merge pull request #3324 from zexi/automated-cherry-pick-of-#3321-upstream-release-2.11
Automated cherry pick of #3321: climc: k8s import cluster support
2019-10-22 21:18:50 +08:00
Zexi Li
03c3ad675b climc: k8s import cluster support 2019-10-22 21:18:32 +08:00
yunion-ci-robot
f8a6d8753a Merge pull request #3319 from Mjoycarry/automated-cherry-pick-of-#3317-upstream-release-2.11
Automated cherry pick of #3317: Bugfix: add parameter deepsync to command 'cloud-provider-sync' and 'cloud-account-sync'; fix the bug when syncing eip.
2019-10-22 19:02:05 +08:00
Rain
5e521f4d3b Bugfix: add parameter deepsync to command 'cloud-provider-sync' and 'cloud-account-sync'; fix the bug when syncing eip. 2019-10-22 18:20:55 +08:00
yunion-ci-robot
88e65c5346 Merge pull request #3315 from Mjoycarry/automated-cherry-pick-of-#3314-upstream-release-2.11
Automated cherry pick of #3314: Bugfix: add the operation log of natgateway; display correctly multiple eip of snat rule in huawei cloud; bind ip to natgateway automatically when creating nat rule in aliyun cloud and try to unbind when deleting; fill or unfill the fields AssociateType, AssociateId when creating or deleting nat rule in huawei cloud; add SNatEntry and SNatEntryManager which has common field and function of SNat and DNat.
2019-10-22 16:05:06 +08:00
Rain
2130a8504a Bugfix: add the operation log of natgateway; display correctly multiple eip of snat rule in huawei cloud; bind ip to natgateway automatically when creating nat rule in aliyun cloud and try to unbind when deleting; fill or unfill the fields AssociateType, AssociateId when creating or deleting nat rule in huawei cloud; add SNatEntry and SNatEntryManager which has common field and function of SNat and DNat. 2019-10-22 15:57:59 +08:00
yunion-ci-robot
931083da4d Merge pull request #3312 from Mjoycarry/automated-cherry-pick-of-#3260-upstream-release-2.11
Automated cherry pick of #3260: fix: The domain and project info between disk and disk's cloudprovider maybe different and the new snapshot synced from cloud should have same domain and project info with disk. Project of snapshot with undeleted disk should always be same with disk's. Project of snapshot whose disk has been deleted should not change in SyncWithCloudSnapshot.
2019-10-22 12:04:06 +08:00
Rain
bd50c81f36 fix: The domain and project info between disk and disk's cloudprovider maybe different and the new snapshot synced from cloud should have same domain and project info with disk. Project of snapshot with undeleted disk should always be same with disk's. Project of snapshot whose disk has been deleted should not change in SyncWithCloudSnapshot. 2019-10-22 11:30:43 +08:00
wanyaoqi
d0c411cb5b fix snapshot-list list created_by, migrate add auto-converge 2019-10-22 11:05:11 +08:00
yunion-ci-robot
12126de6c9 Merge pull request #3303 from ioito/automated-cherry-pick-of-#3301-upstream-release-2.11
Automated cherry pick of #3301: fix: 修复华为云ucloud安全组同步问题
2019-10-22 02:26:05 +08:00
yunion-ci-robot
8b1016dbbf Merge pull request #3307 from zexi/automated-cherry-pick-of-#3305-upstream-release-2.11
Automated cherry pick of #3305: baremetal: cancel password complex check
2019-10-22 02:23:04 +08:00
Zexi Li
c0152c662a baremetal: cancel password complex check 2019-10-21 15:17:56 +08:00
ioito
2b0a6b0999 fix: 修复华为云ucloud安全组同步问题 2019-10-21 11:51:58 +08:00
yunion-ci-robot
0e7312d9a1 Merge pull request #3299 from swordqiu/automated-cherry-pick-of-#3297-upstream-release-2.11
Automated cherry pick of #3297: fix: esxi change vm instance type always timeout
2019-10-21 09:28:08 +08:00
yunion-ci-robot
4253b85fd6 Merge pull request #3293 from swordqiu/automated-cherry-pick-of-#3292-upstream-release-2.11
Automated cherry pick of #3292: fix: policy support description
2019-10-21 09:27:06 +08:00
Qiu Jian
6610ba78d0 fix: esxi change vm instance type always timeout 2019-10-21 01:30:32 +08:00
Qiu Jian
8f1c0d7dac fix: policy support description 2019-10-20 19:02:02 +08:00
yunion-ci-robot
1159ad7010 Merge pull request #3285 from yousong/automated-cherry-pick-of-#3283-upstream-release-2.11
Automated cherry pick of #3283: lbagent: fix listing filter on manager_id
2019-10-18 20:12:02 +08:00
yunion-ci-robot
30edad799b Merge pull request #3289 from tb365/automated-cherry-pick-of-#3287-upstream-release-2.11
Automated cherry pick of #3287: huawei eip disassociate bugfix
2019-10-18 16:12:03 +08:00
TangBin
72f1156d3a huawei eip disassociate bugfix 2019-10-18 15:26:19 +08:00
Yousong Zhou
e1676105a9 lbagent: fix listing filter on manager_id 2019-10-18 06:16:29 +00:00
yunion-ci-robot
9d1ff30ac5 Merge pull request #3276 from wanyaoqi/automated-cherry-pick-of-#3270-upstream-release-2.11
Automated cherry pick of #3270: fix reserved memory is zero
2019-10-17 21:39:02 +08:00
Zexi Li
b79e516177 Merge pull request #3279 from zexi/automated-cherry-pick-of-#3278-upstream-release-2.11
Automated cherry pick of #3278: region: fix get disk detail panic
2019-10-17 16:26:22 +08:00
Zexi Li
ff8b1e7294 region: fix get disk detail panic 2019-10-17 16:21:30 +08:00
wanyaoqi
087d67d08c fix reserved memory is zero 2019-10-17 15:18:55 +08:00
Zexi Li
1612474e7f Merge pull request #3273 from zexi/automated-cherry-pick-of-#3271-upstream-release-2.11
Automated cherry pick of #3271: region: capability public network count filter by host type
2019-10-17 12:49:28 +08:00
Zexi Li
742092cd19 region: capability public network count filter by host type 2019-10-17 12:47:39 +08:00
yunion-ci-robot
610ff5d0a6 Merge pull request #3266 from ioito/automated-cherry-pick-of-#3264-upstream-release-2.11
Automated cherry pick of #3264: fix: 避免返回nil, nil
2019-10-16 20:33:05 +08:00
ioito
22812afcfa fix: 避免返回nil, nil 2019-10-16 18:13:08 +08:00
yunion-ci-robot
d4b360e5f2 Merge pull request #3259 from ioito/automated-cherry-pick-of-#3257-upstream-release-2.11
Automated cherry pick of #3257: optimized: 优化安全组规则,支持逗号分隔的规则
2019-10-16 15:09:02 +08:00
ioito
a207c52fc2 optimized: 优化安全组规则,支持逗号分隔的规则 2019-10-16 12:51:51 +08:00
Zexi Li
6c5ad8fad2 Merge pull request #3255 from zexi/automated-cherry-pick-of-#3253-upstream-release-2.11
Automated cherry pick of #3253: baremetal: fix stop task hang
2019-10-16 11:51:27 +08:00
Zexi Li
19daf6cc58 baremetal: fix stop task hang 2019-10-16 11:49:43 +08:00
yunion-ci-robot
6160bc4ce2 Merge pull request #3251 from ioito/automated-cherry-pick-of-#3187-upstream-release-2.11
Automated cherry pick of #3187: fix: 创建云账号时指定tenant生效
2019-10-15 22:15:00 +08:00
ioito
dcc13c4b4c optimized cloud account create 2019-10-15 22:02:23 +08:00
ioito
1ab8eca21d fix: 创建云账号时指定tenant生效 2019-10-15 22:02:23 +08:00
yunion-ci-robot
fac5f23234 Merge pull request #3248 from tb365/automated-cherry-pick-of-#3240-upstream-release-2.11
Automated cherry pick of #3240: qcloud elb bugfix
2019-10-15 21:49:01 +08:00
yunion-ci-robot
cce5fa6c78 Merge pull request #3247 from wanyaoqi/automated-cherry-pick-of-#3230-upstream-release-2.11
Automated cherry pick of #3230: gpu mutil attach by model type, fix network hint name
2019-10-15 21:12:00 +08:00
yunion-ci-robot
9992e214b8 Merge pull request #3233 from ioito/automated-cherry-pick-of-#3231-upstream-release-2.11
Automated cherry pick of #3231: fix: 避免删除azure失败
2019-10-15 21:10:01 +08:00
wanyaoqi
afc9201c1d gpu mutil attach by model type, fix network hint name 2019-10-15 20:54:17 +08:00
TangBin
8921265701 attach disk wait sucess 2019-10-15 20:34:23 +08:00
TangBin
f20eaa37db qcloud elb bugfix 2019-10-15 20:34:23 +08:00
yunion-ci-robot
407ba69aaf Merge pull request #3242 from Mjoycarry/automated-cherry-pick-of-#3241-upstream-release-2.11
Automated cherry pick of #3241: fix: the input parameters is wrong when create snapshotpolicy with repeatweekday Sunday for qcloud.
2019-10-15 20:01:00 +08:00
Rain
e2b54e19c9 fix: the input parameters is wrong when create snapshotpolicy with repeatweekday Sunday for qcloud. 2019-10-15 19:47:18 +08:00
Zexi Li
b7f974fdfc Merge pull request #3238 from zexi/automated-cherry-pick-of-#3236-upstream-release-2.11
Automated cherry pick of #3236: scheduler: adjust skip network filter condition
2019-10-15 16:23:41 +08:00
Zexi Li
0f2447a105 scheduler: adjust skip network filter condition 2019-10-15 16:23:02 +08:00
yunion-ci-robot
57668c486c Merge pull request #3221 from swordqiu/automated-cherry-pick-of-#3220-upstream-release-2.11
Automated cherry pick of #3220: fix: azure ListObject should skip current folder
2019-10-15 16:15:03 +08:00
yunion-ci-robot
b71f1a40be Merge pull request #3228 from ioito/automated-cherry-pick-of-#3189-upstream-release-2.11
Automated cherry pick of #3189: fix: openstack上传镜像时也指定os_type及额外信息
2019-10-15 16:12:01 +08:00
ioito
db43852cba fix: 避免删除azure失败 2019-10-15 15:17:18 +08:00
ioito
948846a5bc fix: openstack上传镜像时也指定os_type及额外信息 2019-10-15 10:43:19 +08:00
Qiu Jian
76e8685697 fix: azure ListObject should skip current folder 2019-10-14 20:09:51 +08:00
yunion-ci-robot
7903796782 Merge pull request #3217 from swordqiu/automated-cherry-pick-of-#3216-upstream-release-2.11
Automated cherry pick of #3216: fix: recover can_update field and add update_fail_reason field
2019-10-14 17:57:02 +08:00
yunion-ci-robot
328a88181f Merge pull request #3214 from swordqiu/automated-cherry-pick-of-#3213-upstream-release-2.11
Automated cherry pick of #3213: fix: aliyun bucket sync cancel local limit
2019-10-14 17:56:03 +08:00
yunion-ci-robot
12014973a4 Merge pull request #3211 from swordqiu/automated-cherry-pick-of-#3210-upstream-release-2.11
Automated cherry pick of #3210: fix: azure blob storage empty blob error
2019-10-14 17:55:01 +08:00
yunion-ci-robot
78036987c7 Merge pull request #3207 from ioito/automated-cherry-pick-of-#3205-upstream-release-2.11
Automated cherry pick of #3205: fix: 返回网卡所在的网络名称信息
2019-10-14 16:44:01 +08:00
Qiu Jian
89c95bbfdf fix: recover can_update field and add update_fail_reason field 2019-10-14 16:25:29 +08:00
Qiu Jian
82f899f242 fix: azure blob storage empty blob error 2019-10-14 15:59:01 +08:00
Qiu Jian
4454e75fb9 fix: aliyun bucket sync cancel local limit 2019-10-14 15:51:06 +08:00
yunion-ci-robot
01976cdc42 Merge pull request #3208 from Mjoycarry/automated-cherry-pick-of-#3127-upstream-release-2.11
Automated cherry pick of #3127: fix
2019-10-14 12:46:41 +08:00
yunion-ci-robot
77e5b0a0e9 Merge pull request #3198 from ioito/automated-cherry-pick-of-#3195-upstream-release-2.11
Automated cherry pick of #3195: fix: 避免部分套餐无法列出
2019-10-14 12:05:41 +08:00
yunion-ci-robot
301e158c9c Merge pull request #3177 from tb365/automated-cherry-pick-of-#3161-upstream-release-2.11
Automated cherry pick of #3161: loadbalancer cache create api
2019-10-14 12:03:40 +08:00
yunion-ci-robot
ea8260d3ca Merge pull request #3202 from tb365/automated-cherry-pick-of-#3200-upstream-release-2.11
Automated cherry pick of #3200: huawei & aws bugfix
2019-10-14 11:58:44 +08:00
Rain
7af554d47d fix
log for snapshotpolicy

docs

auto sync

add performCache for snapshotpolicy

detach snapshotpolicy after detach disk and guest

fix sync snapshot of disk in qcloud
2019-10-14 11:32:19 +08:00
yunion-ci-robot
34fc1089b1 Merge pull request #3192 from ioito/automated-cherry-pick-of-#3190-upstream-release-2.11
Automated cherry pick of #3190: fix: 创建相同配置时返回正确的eip信息
2019-10-14 07:41:42 +08:00
yunion-ci-robot
f67ba553d2 Merge pull request #3182 from ioito/automated-cherry-pick-of-#3180-upstream-release-2.11
Automated cherry pick of #3180: fix: 避免公有云账号统计虚拟的host数量
2019-10-14 07:40:41 +08:00
yunion-ci-robot
451d7912f9 Merge pull request #3196 from wanyaoqi/automated-cherry-pick-of-#3188-upstream-release-2.11
Automated cherry pick of #3188: fix dirty server start, disk format empty
2019-10-13 21:45:41 +08:00
ioito
719964417c fix: 返回网卡所在的网络名称信息 2019-10-12 19:19:35 +08:00
TangBin
81139922e2 add loadblancer acl&cert cached api docs 2019-10-12 19:19:14 +08:00
TangBin
6c549e800f loadbalancer cache create api 2019-10-12 19:18:39 +08:00
TangBin
83dbfffb3a huawei & aws bugfix 2019-10-12 18:07:06 +08:00
wanyaoqi
4c67bf49e7 fix qemu args 2019-10-12 17:55:20 +08:00
ioito
13972b939c fix: 避免部分套餐无法列出 2019-10-12 17:40:43 +08:00
wanyaoqi
208f8e2d28 add user cache 2019-10-12 17:38:22 +08:00
wanyaoqi
c0ff0a7599 - sanpshot add expire time - fix image probe iso cause iso md5 changed - add loadbalancer cluster distinct field 2019-10-12 17:38:22 +08:00
wanyaoqi
62b697692c fix dirty server start, disk format empty 2019-10-12 17:38:21 +08:00
ioito
d4a9e75eee fix: 创建相同配置时返回正确的eip信息 2019-10-12 16:52:50 +08:00
Zexi Li
410d700c4b Merge pull request #3160 from wanyaoqi/automated-cherry-pick-of-#3147-upstream-release-2.11
Automated cherry pick of #3147: feature:
2019-10-12 12:50:28 +08:00
Zexi Li
fc214cf7cb Merge pull request #3186 from zexi/automated-cherry-pick-of-#3184-upstream-release-2.11
Automated cherry pick of #3184: keystone: endpoint list by service
2019-10-12 12:49:55 +08:00
Zexi Li
280f6f1256 keystone: endpoint list by service 2019-10-12 12:49:33 +08:00
ioito
510815cacf fix: 避免公有云账号统计虚拟的host数量 2019-10-12 11:43:35 +08:00
yunion-ci-robot
cf0f7f028a Merge pull request #3156 from yousong/automated-cherry-pick-of-#3154-upstream-release-2.11
Automated cherry pick of #3154: ansibleserver: enable tenant/user cache manager
2019-10-12 10:08:40 +08:00
yunion-ci-robot
edcedb4701 Merge pull request #3175 from yousong/automated-cherry-pick-of-#3173-upstream-release-2.11
Automated cherry pick of #3173: hostman: system_service: add IsEnabled() support
2019-10-12 10:05:39 +08:00
yunion-ci-robot
8ce0cfe003 Merge pull request #3171 from swordqiu/automated-cherry-pick-of-#3169-upstream-release-2.11
Automated cherry pick of #3169: fix: string2scope ignore user scope
2019-10-12 00:04:38 +08:00
yunion-ci-robot
b3c070285c Merge pull request #3163 from swordqiu/automated-cherry-pick-of-#3162-upstream-release-2.11
Automated cherry pick of #3162: fix: show delele fail reason if cannot delete a resource
2019-10-12 00:00:39 +08:00
Yousong Zhou
3182e4c28d hostman: ensure openvswitch won't automatically start at boot 2019-10-11 15:58:38 +00:00
Yousong Zhou
b2f4a219a3 hostman: system_service: add IsEnabled() support 2019-10-11 15:58:38 +00:00
yunion-ci-robot
c299201402 Merge pull request #3167 from swordqiu/automated-cherry-pick-of-#3165-upstream-release-2.11
Automated cherry pick of #3165: fix: skip services without project resources when fetching project resources
2019-10-11 23:52:44 +08:00
Qiu Jian
bb6f4dc60d fix: string2scope ignore user scope 2019-10-11 22:10:09 +08:00
yunion-ci-robot
5b23bd0c5a Merge pull request #3138 from swordqiu/automated-cherry-pick-of-#3136-upstream-release-2.11
Automated cherry pick of #3136: fix: guest create eip quota check use owner quota
2019-10-11 14:52:38 +08:00
Qiu Jian
8474e62675 fix: skip services without project resources when fetching project resources 2019-10-11 08:55:53 +08:00
Qiu Jian
134aa7101d fix: show delele fail reason if cannot delete a resource 2019-10-10 21:54:09 +08:00
wanyaoqi
8ba0bd5fc7 feature:
- postpaid server support expire
- extend distinct tenant filed
- gpu batch perform action
2019-10-10 19:31:28 +08:00
yunion-ci-robot
972c4f19d8 Merge pull request #3152 from yousong/automated-cherry-pick-of-#3150-upstream-release-2.11
Automated cherry pick of #3150: hostman: ovs: implement PersistentMAC()
2019-10-10 19:29:40 +08:00
Yousong Zhou
7351b2db14 ansibleserver: enable tenant/user cache manager 2019-10-10 08:11:29 +00:00
Yousong Zhou
6a2b7c35b6 hostman: ovs: implement PersistentMAC()
This is required if phy port was not added as first member or macaddr of
phy port is "locally managed"

More importantly, it needs to be fixed
2019-10-10 08:07:39 +00:00
Zexi Li
8aaca0ea73 Merge pull request #3145 from zexi/bugfix/sched-set-pending
scheduler: fix not setSchedPendingUsage condition
2019-10-10 10:49:28 +08:00
Zexi Li
772981fe9c scheduler: fix not setSchedPendingUsage condition 2019-10-10 10:46:02 +08:00
Zexi Li
35b44546b8 Merge pull request #3143 from zexi/automated-cherry-pick-of-#3141-upstream-release-2.11
Automated cherry pick of #3141: fix: scheduler specfied network no errors
2019-10-09 21:11:33 +08:00
Zexi Li
eebcdc63da fix: scheduler specfied network no errors 2019-10-09 21:11:12 +08:00
Qiu Jian
c1a1bc7a83 fix: guest create eip quota check use owner quota 2019-10-09 17:38:51 +08:00
yunion-ci-robot
9a6d93092a Merge pull request #3066 from ioito/automated-cherry-pick-of-#3064-upstream-release-2.11
Automated cherry pick of #3064: add: 支持创建安全组时同时创建规则
2019-10-09 17:26:38 +08:00
yunion-ci-robot
584d2faf0f Merge pull request #3130 from tb365/automated-cherry-pick-of-#3110-upstream-release-2.11
Automated cherry pick of #3110: loadbalancer bugfix
2019-10-09 17:15:37 +08:00
TangBin
3e0be8fe96 huawei & qcloud elb bugfix 2019-10-09 16:03:18 +08:00
TangBin
6db1a2aafe loadbalancer bugfix 2019-10-09 16:03:17 +08:00
Zexi Li
420e9b649f Merge pull request #3135 from zexi/automated-cherry-pick-of-#3133-upstream-release-2.11
Automated cherry pick of #3133: fix: services model incorrect nullable define
2019-10-09 11:09:05 +08:00
Zexi Li
d68f8172b5 fix: services model incorrect nullable define 2019-10-08 22:25:13 +08:00
Zexi Li
13d1c69742 Merge pull request #3125 from Mjoycarry/automated-cherry-pick-of-#3026-upstream-release-2.11
Automated cherry pick of #3026: nat_docs fix
2019-10-08 10:42:02 +08:00
Rain
e23cb70007 nat_docs fix 2019-10-08 10:39:27 +08:00
yunion-ci-robot
83b31727f7 Merge pull request #3123 from zexi/automated-cherry-pick-of-#3121-upstream-release-2.11
Automated cherry pick of #3121: scheduler: fix random network domain not matched
2019-10-07 12:59:36 +08:00
Zexi Li
a711f4f64e scheduler: fix random network domain not matched 2019-10-07 12:06:10 +08:00
yunion-ci-robot
d54475ca54 Merge pull request #3119 from zexi/automated-cherry-pick-of-#3117-upstream-release-2.11
Automated cherry pick of #3117: scheduler: set random network filter default scope domain
2019-10-06 12:36:34 +08:00
Zexi Li
016679e66d scheduler: set random network filter default scope domain 2019-10-06 10:35:52 +08:00
yunion-ci-robot
3e0cecbaa0 Merge pull request #3113 from swordqiu/automated-cherry-pick-of-#3111-upstream-release-2.11
Automated cherry pick of #3111: fix: snapsho realdelete nil pointer panic
2019-10-05 07:36:35 +08:00
Qiu Jian
3ac1f417ac fix: snapsho realdelete nil pointer panic 2019-10-04 00:12:40 +08:00
yunion-ci-robot
3b3dbacd0a Merge pull request #3108 from swordqiu/automated-cherry-pick-of-#3106-upstream-release-2.11
Automated cherry pick of #3106: fix: server-create allow create server with empty disk
2019-09-29 19:34:31 +08:00
Qiu Jian
b5e33e7be8 fix: server-create allow create server with empty disk 2019-09-29 17:22:00 +08:00
Zexi Li
4b264c6b2d Merge pull request #3100 from zexi/automated-cherry-pick-of-#3098-upstream-release-2.11
Automated cherry pick of #3098: scheduler: refactor network_predicate filter
2019-09-29 13:17:09 +08:00
Zexi Li
44e8dda703 scheduler: refactor network_predicate filter 2019-09-28 18:30:06 +08:00
yunion-ci-robot
340f192180 Merge pull request #3093 from swordqiu/automated-cherry-pick-of-#3091-upstream-release-2.11
Automated cherry pick of #3091: fix: reduce policy sync worker queue size
2019-09-28 11:31:33 +08:00
yunion-ci-robot
4eef15a2c6 Merge pull request #3089 from wanyaoqi/automated-cherry-pick-of-#3087-upstream-release-2.11
Automated cherry pick of #3087: fix snaphot task complete
2019-09-28 10:49:31 +08:00
Qiu Jian
a34333c243 fix: reduce policy sync worker queue size 2019-09-27 23:04:13 +08:00
wanyaoqi
5bf76832b5 fix snaphot task complete 2019-09-27 19:17:36 +08:00
Zexi Li
7a04b94c7f Merge pull request #3083 from zexi/automated-cherry-pick-of-#3082-upstream-release-2.11
Automated cherry pick of #3082: apigateway: fix forbidden login prompt format
2019-09-27 15:53:51 +08:00
Zexi Li
52478419cb apigateway: fix forbidden login prompt format 2019-09-27 15:52:15 +08:00
yunion-ci-robot
b756cb96e7 Merge pull request #3054 from swordqiu/automated-cherry-pick-of-#3053-upstream-release-2.11
Automated cherry pick of #3053: fix: missing region in cookie cause no service catalog fetched
2019-09-27 10:15:29 +08:00
yunion-ci-robot
ea3a2e9cf2 Merge pull request #3069 from wanyaoqi/automated-cherry-pick-of-#3067-upstream-release-2.11
Automated cherry pick of #3067: snapshot move to recycle bin
2019-09-27 08:51:30 +08:00
yunion-ci-robot
50767ec6c7 Merge pull request #3058 from ioito/automated-cherry-pick-of-#3056-upstream-release-2.11
Automated cherry pick of #3056: fix: typo
2019-09-27 08:50:31 +08:00
yunion-ci-robot
51921e1e99 Merge pull request #3073 from wanyaoqi/automated-cherry-pick-of-#3071-upstream-release-2.11
Automated cherry pick of #3071: windows format fs fast
2019-09-27 08:49:29 +08:00
yunion-ci-robot
1626227841 Merge pull request #3062 from yousong/automated-cherry-pick-of-#3059-upstream-release-2.11
Automated cherry pick of #3059: guestnetworks: IsExit()减少一次数据库查询
2019-09-26 23:41:36 +08:00
wanyaoqi
1199d96c8b windows format fs fast 2019-09-26 22:57:25 +08:00
yunion-ci-robot
898420f5c1 Merge pull request #3049 from swordqiu/automated-cherry-pick-of-#3046-upstream-release-2.11
Automated cherry pick of #3046: fix: keystone panic on invalid auth token
2019-09-26 22:46:36 +08:00
wanyaoqi
2934c7b7ca snapshot move to recycle bin 2019-09-26 22:34:33 +08:00
ioito
b8f7a6b19e add: 支持创建安全组时同时创建规则 2019-09-26 18:05:17 +08:00
Yousong Zhou
459ee3d994 guests: list details with nics details 2019-09-26 04:45:50 +00:00
Yousong Zhou
ebc665dbe8 guestnetworks: IsExit()减少一次数据库查询 2019-09-26 04:45:50 +00:00
ioito
446e98acfd fix: typo 2019-09-26 11:14:12 +08:00
yunion-ci-robot
065356bef1 Merge pull request #3041 from yousong/automated-cherry-pick-of-#3039-upstream-release-2.11
Automated cherry pick of #3039: lbagents: 添加部署和下线操作记录
2019-09-25 21:21:29 +08:00
Qiu Jian
57d810cacd fix: missing region in cookie cause no service catalog fetched 2019-09-25 21:16:18 +08:00
Qiu Jian
394349b37a fix: keystone panic on invalid auth token 2019-09-25 21:03:17 +08:00
yunion-ci-robot
c387aabe9c Merge pull request #3045 from wanyaoqi/automated-cherry-pick-of-#3043-upstream-release-2.11
Automated cherry pick of #3043: fix host init cronjob
2019-09-25 16:30:32 +08:00
wanyaoqi
90292118dd fix host init cronjob 2019-09-25 16:22:57 +08:00
yunion-ci-robot
6b30d6320a Merge pull request #3037 from ioito/automated-cherry-pick-of-#3035-upstream-release-2.11
Automated cherry pick of #3035: add: lb vpc info
2019-09-25 13:30:29 +08:00
Yousong Zhou
4f7d7b8d7b lbagents: 添加部署和下线操作记录 2019-09-25 05:27:45 +00:00
ioito
74f94e985a add: lb vpc info 2019-09-25 11:49:25 +08:00
yunion-ci-robot
5b629acca3 Merge pull request #3031 from swordqiu/automated-cherry-pick-of-#3030-upstream-release-2.11
Automated cherry pick of #3030: fix: disable cas idp not working
2019-09-25 10:03:31 +08:00
yunion-ci-robot
a1f39ba03b Merge pull request #3029 from ioito/automated-cherry-pick-of-#3027-upstream-release-2.11
Automated cherry pick of #3027: fix: 避免监听未设置manager_id
2019-09-24 20:55:29 +08:00
yunion-ci-robot
1804f3590e Merge pull request #3018 from wanyaoqi/automated-cherry-pick-of-#3004-upstream-release-2.11
Automated cherry pick of #3004: fix rbd disk delete rebuild root with snapshot
2019-09-24 20:50:31 +08:00
yunion-ci-robot
ebc9086068 Merge pull request #3034 from wanyaoqi/automated-cherry-pick-of-#3023-upstream-release-2.11
Automated cherry pick of #3023: fix add cronjob validate times
2019-09-24 20:46:29 +08:00
wanyaoqi
19545983a1 fix add cronjob validate times 2019-09-24 20:23:12 +08:00
yunion-ci-robot
1dcf47bc99 Merge pull request #3025 from wanyaoqi/automated-cherry-pick-of-#3023-upstream-release-2.11
Automated cherry pick of #3023: fix add cronjob validate times
2019-09-24 20:16:28 +08:00
ioito
50c3b12c7c add: error log trace 2019-09-24 19:58:43 +08:00
ioito
7b7319b982 fix: 避免监听未设置manager_id 2019-09-24 19:58:43 +08:00
Qiu Jian
c5436b330c fix: disable cas idp not working 2019-09-24 19:52:01 +08:00
wanyaoqi
bc6fd27439 fix add cronjob validate times 2019-09-24 18:52:36 +08:00
yunion-ci-robot
7bc624a10b Merge pull request #3012 from yousong/automated-cherry-pick-of-#3009-upstream-release-2.11
Automated cherry pick of #3009: ansibleserver: 避免数据库故障引起内部状态不一致
2019-09-24 00:51:28 +08:00
yunion-ci-robot
e7ed4bf1e5 Merge pull request #3015 from yousong/automated-cherry-pick-of-#3010-upstream-release-2.11
Automated cherry pick of #3010: lbagents: 禁止在公有云、托管物理机上部署
2019-09-24 00:48:29 +08:00
wanyaoqi
9311f1a4aa fix rbd disk delete rebuild root with snapshot 2019-09-23 20:58:34 +08:00
Yousong Zhou
b3deab9e04 lbagents: 禁止在公有云、托管物理机上部署 2019-09-23 11:45:35 +00:00
Yousong Zhou
a869540903 ansibleserver: 避免数据库故障引起内部状态不一致 2019-09-23 11:43:48 +00:00
yunion-ci-robot
dae1b62432 Merge pull request #3007 from swordqiu/automated-cherry-pick-of-#3005-upstream-release-2.11
Automated cherry pick of #3005: fix: tenant filter fail to work
2019-09-21 20:42:28 +08:00
Qiu Jian
fd9154d7f8 fix: tenant filter fail to work 2019-09-21 20:39:42 +08:00
yunion-ci-robot
127a54ec0d Merge pull request #3000 from swordqiu/automated-cherry-pick-of-#2998-upstream-release-2.11
Automated cherry pick of #2998: fix: adjust default process timeout to 1 minute (previously 15 seconds)
2019-09-19 22:02:29 +08:00
yunion-ci-robot
2fe4eec37e Merge pull request #2996 from swordqiu/automated-cherry-pick-of-#2994-upstream-release-2.11
Automated cherry pick of #2994: fix: fail to search opslog by obj_name
2019-09-19 22:00:28 +08:00
yunion-ci-robot
7804d94558 Merge pull request #2978 from swordqiu/automated-cherry-pick-of-#2965-upstream-release-2.11
Automated cherry pick of #2965: feature: support xsky object storage
2019-09-19 21:59:25 +08:00
yunion-ci-robot
3ce1a836a7 Merge pull request #2981 from swordqiu/automated-cherry-pick-of-#2980-upstream-release-2.11
Automated cherry pick of #2980: feature: keystone v3 auth response carry user's displayname/email/mobile
2019-09-19 21:40:26 +08:00
yunion-ci-robot
6bf4c6dbce Merge pull request #2963 from wanyaoqi/automated-cherry-pick-of-#2956-upstream-release-2.11
Automated cherry pick of #2956: misc fix
2019-09-19 21:21:24 +08:00
yunion-ci-robot
633ad14fdb Merge pull request #2992 from wanyaoqi/automated-cherry-pick-of-#2988-upstream-release-2.11
Automated cherry pick of #2988: cronjob support remove
2019-09-19 21:19:27 +08:00
Qiu Jian
7e506a0da5 fix: status check before accessing external bucket 2019-09-19 21:15:27 +08:00
Qiu Jian
0ae302255a fix: cloud-account-create-xsky nil pointer error 2019-09-19 21:13:32 +08:00
Qiu Jian
1adecd4691 feature: add climc cloud-account-create-xsky 2019-09-19 21:13:31 +08:00
Qiu Jian
e07c50ca99 update doc and copyright 2019-09-19 21:13:30 +08:00
Qiu Jian
2db0736792 update vendor 2019-09-19 21:12:59 +08:00
Qiu Jian
de13c47185 feature: support xsky object storage 2019-09-19 21:12:59 +08:00
yunion-ci-robot
3afc640190 Merge pull request #2986 from yousong/automated-cherry-pick-of-#2984-upstream-release-2.11
Automated cherry pick of #2984: lbbackends: 改进错误信息传递
2019-09-19 21:12:28 +08:00
Qiu Jian
f15fb2aa59 fix: adjust default process timeout to 1 minute (previously 15 seconds) 2019-09-19 21:08:35 +08:00
Qiu Jian
0eb574e1c3 fix: fail to search opslog by obj_name 2019-09-19 21:03:08 +08:00
wanyaoqi
372c3a1f4a cronjob support remove 2019-09-19 20:08:09 +08:00
Yousong Zhou
9029645101 lbbackends: 改进错误信息传递 2019-09-19 10:40:15 +00:00
Qiu Jian
6c44a6bb58 feature: keystone v3 auth response carry user's displayname/email/mobile 2019-09-19 00:04:43 +08:00
yunion-ci-robot
3d6a1ecfa4 Merge pull request #2977 from yousong/automated-cherry-pick-of-#2975-upstream-release-2.11
Automated cherry pick of #2975: lblistener: 改正监听update
2019-09-18 23:44:25 +08:00
yunion-ci-robot
963b2be3c0 Merge pull request #2973 from yousong/automated-cherry-pick-of-#2971-upstream-release-2.11
Automated cherry pick of #2971: validators: 应对"listener"参数被重复Validate的情况
2019-09-18 23:43:27 +08:00
Yousong Zhou
22ee7fd681 lblistener: 改正监听update
Fixes e4ef23515f ("aws elb support")
2019-09-18 12:22:01 +00:00
Yousong Zhou
542f7d35e3 validators: 应对"listener"参数被重复Validate的情况
Fixes e4ef23515f ("aws elb support")
2019-09-18 07:36:58 +00:00
yunion-ci-robot
27e8c9ffa8 Merge pull request #2968 from swordqiu/automated-cherry-pick-of-#2966-upstream-release-2.11
Automated cherry pick of #2966: fix: missing log audit for updating cloudaccount account credential
2019-09-18 11:31:25 +08:00
yunion-ci-robot
206a37c0b0 Merge pull request #2959 from ioito/automated-cherry-pick-of-#2957-upstream-release-2.11
Automated cherry pick of #2957: fix: 添加弹性网卡过滤参数
2019-09-18 11:30:26 +08:00
yunion-ci-robot
fa8fd55a61 Merge pull request #2954 from swordqiu/automated-cherry-pick-of-#2952-upstream-release-2.11
Automated cherry pick of #2952: fix: Table 'yunionlogger.users_cache_tbl' doesn't exist
2019-09-18 11:28:26 +08:00
Qiu Jian
a592790104 fix: missing log audit for updating cloudaccount account credential 2019-09-18 00:19:23 +08:00
wanyaoqi
3b2e88985a misc fix
- optimize batch create validate
2019-09-17 18:49:38 +08:00
ioito
320abc918f fix: 添加弹性网卡过滤参数 2019-09-17 14:52:39 +08:00
Qiu Jian
6cc122961d fix: Table 'yunionlogger.users_cache_tbl' doesn't exist 2019-09-17 13:12:06 +08:00
yunion-ci-robot
b753ab9208 Merge pull request #2950 from ioito/automated-cherry-pick-of-#2948-upstream-release-2.11
Automated cherry pick of #2948: fix: 避免make mod时异常
2019-09-17 13:07:25 +08:00
ioito
b3ba5e8fb3 fix: 避免make mod时异常 2019-09-17 12:31:17 +08:00
yunion-ci-robot
9232b721e1 Merge pull request #2946 from ioito/automated-cherry-pick-of-#2944-upstream-release-2.11
Automated cherry pick of #2944: fix: 避免zstack高可用关机失效问题
2019-09-17 11:55:24 +08:00
ioito
5f9cd29a70 fix: 避免zstack高可用关机失效问题 2019-09-17 11:32:49 +08:00
yunion-ci-robot
32c4be2a83 Merge pull request #2942 from swordqiu/automated-cherry-pick-of-#2940-upstream-release-2.11
Automated cherry pick of #2940: fix: fail to delete disconnected cloudaccount
2019-09-17 08:48:25 +08:00
yunion-ci-robot
d78877c8f7 Merge pull request #2938 from swordqiu/automated-cherry-pick-of-#2936-upstream-release-2.11
Automated cherry pick of #2936: fix: 1. hpssactl blocks on user input 2. host-add-netif reset nic index 3. init baremetal nics with name enX instead of ethX
2019-09-17 08:47:25 +08:00
Qiu Jian
593edf10fc fix: fail to delete disconnected cloudaccount 2019-09-17 01:44:46 +08:00
yunion-ci-robot
20b079fd4e Merge pull request #2918 from wanyaoqi/automated-cherry-pick-of-#2912-upstream-release-2.11
Automated cherry pick of #2912: fix init listen interface
2019-09-17 00:15:24 +08:00
yunion-ci-robot
635e3a6128 Merge pull request #2934 from yousong/automated-cherry-pick-of-#2932-upstream-release-2.11
Automated cherry pick of #2932: lbagents: deploy: check existence of pbId before create/update
2019-09-17 00:13:22 +08:00
Qiu Jian
15b9e75a48 fix: baremetal prepare updates nic_info incrementally 2019-09-17 00:07:39 +08:00
Qiu Jian
d7a065d7e5 fix: 1. hpssactl blocks on user input 2. host-add-netif reset nic index 3. init baremetal nics with name enX instead of ethX 2019-09-17 00:07:39 +08:00
Yousong Zhou
55dfdc854e ansibleserver: ansibleplaybooks: a way out on status chaos
an apb was in state

 - apb.output has content
 - apb.status == running
 - apb.start_time && apb.end_time both set
 - not present in man.sessions

an impossible state
2019-09-16 14:12:36 +00:00
Yousong Zhou
00ea1c98f1 lbagents: deploy: check existence of pbId before create/update 2019-09-16 14:12:36 +00:00
Zexi Li
ce4c4999c8 Merge pull request #2930 from zexi/automated-cherry-pick-of-#2928-upstream-release-2.11
Automated cherry pick of #2928: scheduler: fix baremetal disk and storage not match
2019-09-16 20:30:03 +08:00
Zexi Li
7f8dd77241 scheduler: fix baremetal disk and storage not match 2019-09-16 20:28:34 +08:00
yunion-ci-robot
676766b4f0 Merge pull request #2926 from ioito/automated-cherry-pick-of-#2921-upstream-release-2.11
Automated cherry pick of #2921: fix: 避免删除不存在的快照出错
2019-09-16 18:57:24 +08:00
ioito
b47d6a4321 fix: 避免删除不存在的快照出错 2019-09-16 17:25:19 +08:00
Zexi Li
8b52fd96ea Merge pull request #2915 from zexi/automated-cherry-pick-of-#2913-upstream-release-2.11
Automated cherry pick of #2913: scheduler: fix disk local backend not select matched storage
2019-09-16 14:44:26 +08:00
wanyaoqi
614a77b1bd fix init listen interface 2019-09-16 14:35:24 +08:00
Zexi Li
057a20c2c5 scheduler: fix disk local backend not select matched storage 2019-09-16 13:52:41 +08:00
Yousong Zhou
77a72141ac Merge pull request #2911 from ioito/automated-cherry-pick-of-#2908-upstream-release-2.11
Automated cherry pick of #2908: fix: 避免cache raw格式的镜像
2019-09-12 19:12:11 +08:00
yunion-ci-robot
b426bf5212 Merge pull request #2906 from wanyaoqi/automated-cherry-pick-of-#2904-upstream-release-2.11
Automated cherry pick of #2904: set concurrent deploy count
2019-09-12 19:11:23 +08:00
ioito
b9d375ad97 fix: 避免cache raw格式的镜像 2019-09-12 19:09:24 +08:00
wanyaoqi
5fd0ca9d12 set concurrent deploy count 2019-09-12 19:03:53 +08:00
yunion-ci-robot
10bbb84408 Merge pull request #2902 from ioito/automated-cherry-pick-of-#2900-upstream-release-2.11
Automated cherry pick of #2900: fix: update vendor
2019-09-12 18:21:20 +08:00
ioito
29e1beb3e5 fix: update vendor 2019-09-12 18:17:48 +08:00
yunion-ci-robot
a77c6e384f Merge pull request #2894 from ioito/automated-cherry-pick-of-#2892-upstream-release-2.11
Automated cherry pick of #2892: fix: update go-ceph vendor
2019-09-12 17:33:20 +08:00
yunion-ci-robot
391134ecc8 Merge pull request #2898 from ioito/automated-cherry-pick-of-#2896-upstream-release-2.11
Automated cherry pick of #2896: fix: avoid nil pointer
2019-09-12 17:18:23 +08:00
ioito
9e94108240 fix: update go-ceph vendor 2019-09-12 16:57:33 +08:00
ioito
d37bc6a0b8 fix: avoid nil pointer 2019-09-12 16:52:33 +08:00
yunion-ci-robot
345a2b818f Merge pull request #2883 from swordqiu/automated-cherry-pick-of-#2881-upstream-release-2.11
Automated cherry pick of #2881: fix: 1. specifically baremetal use access ip to manage and listen ip to serve baremetal 2. hot net interface might be attached to multiple wire 2. hack fix: baremetal cannot access glance on management network
2019-09-12 14:35:21 +08:00
yunion-ci-robot
45e9e5971f Merge pull request #2890 from ioito/automated-cherry-pick-of-#2885-upstream-release-2.11
Automated cherry pick of #2885: fix: go-ceph bugifx
2019-09-12 14:34:22 +08:00
ioito
3d2760ac98 fix: go-ceph bugifx 2019-09-12 14:19:18 +08:00
Qiu Jian
092ed5d92d fix: 1. specifically baremetal use access ip to manage and listen ip to serve baremetal 2. hot net interface might be attached to multiple wire 2. hack fix: baremetal cannot access glance on management network 2019-09-12 13:11:07 +08:00
yunion-ci-robot
9c13484a56 Merge pull request #2879 from wanyaoqi/automated-cherry-pick-of-#2877-upstream-release-2.11
Automated cherry pick of #2877: fix glance save form url save md5
2019-09-12 12:02:22 +08:00
wanyaoqi
f5a83e7bb0 fix glance save form url save md5 2019-09-12 11:09:00 +08:00
yunion-ci-robot
8a9dc2cccf Merge pull request #2847 from tb365/automated-cherry-pick-of-#2846-upstream-release-2.11
Automated cherry pick of #2846: qrcode issuer coding fix
2019-09-11 21:45:20 +08:00
yunion-ci-robot
2471eb6a94 Merge pull request #2871 from ioito/automated-cherry-pick-of-#2869-upstream-release-2.11
Automated cherry pick of #2869: fix: 避免置空description失效
2019-09-11 21:35:22 +08:00
yunion-ci-robot
e39606bf96 Merge pull request #2867 from swordqiu/automated-cherry-pick-of-#2866-upstream-release-2.11
Automated cherry pick of #2866: fix: system account user fail to login apigateway
2019-09-11 21:33:21 +08:00
yunion-ci-robot
030ee063ef Merge pull request #2875 from swordqiu/automated-cherry-pick-of-#2873-upstream-release-2.11
Automated cherry pick of #2873: fix: fail to update reserved ip notes
2019-09-11 21:31:23 +08:00
Qiu Jian
fb363493a8 fix: fail to update reserved ip notes 2019-09-11 19:30:00 +08:00
ioito
c4853a8163 fix: 避免置空description失效 2019-09-11 16:17:53 +08:00
Qiu Jian
8411dea60f fix: system account user fail to login apigateway 2019-09-11 13:38:24 +08:00
yunion-ci-robot
5293a98b4c Merge pull request #2863 from wanyaoqi/automated-cherry-pick-of-#2861-upstream-release-2.11
Automated cherry pick of #2861: misc bugfix
2019-09-11 09:30:20 +08:00
yunion-ci-robot
09b16b8d3f Merge pull request #2856 from yousong/automated-cherry-pick-of-#2853-upstream-release-2.11
Automated cherry pick of #2853: ansibleserver: 限定Playbook字段长度
2019-09-10 22:48:23 +08:00
wanyaoqi
da62ccf2eb misc bugfix 2019-09-10 22:30:41 +08:00
yunion-ci-robot
af8dd023c4 Merge pull request #2858 from ioito/automated-cherry-pick-of-#2855-upstream-release-2.11
Automated cherry pick of #2855: fix: 避免密码登录时使用秘钥认证
2019-09-10 17:45:19 +08:00
yunion-ci-robot
1bd9c55771 Merge pull request #2851 from ioito/automated-cherry-pick-of-#2849-upstream-release-2.11
Automated cherry pick of #2849: fix: 虚拟机更改项目时,eip同时变更
2019-09-10 17:28:22 +08:00
ioito
a81d610f9b fix: 避免密码登录时使用秘钥认证 2019-09-10 17:23:10 +08:00
Yousong Zhou
ba1f27392e ansibleserver: 限定Playbook字段长度
避免进入数据库时被截断产生无效数据
2019-09-10 09:21:52 +00:00
ioito
88f3a028b1 fix: 虚拟机更改项目时,eip同时变更 2019-09-10 16:49:44 +08:00
TangBin
86c0ee0946 qrcode issuer coding fix 2019-09-10 16:43:43 +08:00
yunion-ci-robot
7a71ce3670 Merge pull request #2844 from tb365/automated-cherry-pick-of-#2842-upstream-release-2.11
Automated cherry pick of #2842: fix ucloud snapshot delete
2019-09-10 16:00:20 +08:00
TangBin
31109c391b totp auth code support multi-domain 2019-09-10 15:31:10 +08:00
TangBin
c356da7eca fix ucloud snapshot delete 2019-09-10 15:31:10 +08:00
yunion-ci-robot
1095587472 Merge pull request #2840 from swordqiu/automated-cherry-pick-of-#2838-upstream-release-2.11
Automated cherry pick of #2838: fix: fail to delete orphane VM in esxi https://kb.vmware.com/s/article/1003742
2019-09-10 15:25:19 +08:00
yunion-ci-robot
f844f8b5e9 Merge pull request #2835 from swordqiu/automated-cherry-pick-of-#2834-upstream-release-2.11
Automated cherry pick of #2834: fix: 1. CAS user fail to create totp credential 2. do not try password auth for CAS users
2019-09-10 15:21:20 +08:00
yunion-ci-robot
101c134458 Merge pull request #2832 from wanyaoqi/automated-cherry-pick-of-#2800-upstream-release-2.11
Automated cherry pick of #2800: misc deploy fix
2019-09-10 15:17:19 +08:00
wanyaoqi
b5c72335fc guest misc fix 2019-09-10 10:59:19 +08:00
Qiu Jian
890bad3296 fix: fail to delete orphane VM in esxi https://kb.vmware.com/s/article/1003742 2019-09-10 10:01:00 +08:00
yunion-ci-robot
1793ceb689 Merge pull request #2825 from ioito/automated-cherry-pick-of-#2823-upstream-release-2.11
Automated cherry pick of #2823: fix: 修复安全组关联数量校验不正确问题
2019-09-09 23:48:21 +08:00
Qiu Jian
82b22e8399 fix: 1. CAS user fail to create totp credential 2. do not try password auth for CAS users 2019-09-09 23:42:41 +08:00
yunion-ci-robot
e24d50a794 Merge pull request #2821 from ioito/automated-cherry-pick-of-#2819-upstream-release-2.11
Automated cherry pick of #2819: fix: 避免数据盘顺序也被颠倒
2019-09-09 23:30:21 +08:00
wanyaoqi
d86ee656d8 misc deploy fix 2019-09-09 20:37:17 +08:00
Yousong Zhou
3b57875e86 Merge pull request #2829 from yousong/automated-cherry-pick-of-#2827-upstream-release-2.11
Automated cherry pick of #2827: .circleci: fix requires
2019-09-09 18:41:35 +08:00
Yousong Zhou
c55a61863a build: rename cleandocgo to adddocgo 2019-09-09 10:04:19 +00:00
Yousong Zhou
9159195639 .circleci: fix requires 2019-09-09 10:04:19 +00:00
Yousong Zhou
7b334b356b Merge pull request #2816 from yousong/automated-cherry-pick-of-#2809-upstream-release-2.11
Automated cherry pick of #2809: build: 将check与构建部分解耦
2019-09-09 17:52:57 +08:00
ioito
a728981729 fix: 修复安全组关联数量校验不正确问题 2019-09-09 16:50:40 +08:00
ioito
bf1ae28158 fix: 避免数据盘顺序也被颠倒 2019-09-09 16:46:40 +08:00
yunion-ci-robot
bd8ea725d4 Merge pull request #2810 from swordqiu/automated-cherry-pick-of-#2808-upstream-release-2.11
Automated cherry pick of #2808: fix: yunionapi nil pointer panic after failed login
2019-09-09 16:31:20 +08:00
yunion-ci-robot
4f529dda79 Merge pull request #2815 from swordqiu/automated-cherry-pick-of-#2813-upstream-release-2.11
Automated cherry pick of #2813: fix: fail to find host ip in virtual console vnic
2019-09-09 16:27:20 +08:00
Yousong Zhou
8a7581f2c8 .circleci: 构建前check 2019-09-09 07:53:52 +00:00
Yousong Zhou
78d27bad8b treewide: fix "make check" 2019-09-09 07:53:52 +00:00
Qiu Jian
0b3ced3f76 fix: fail to find host ip in virtual console vnic 2019-09-09 15:53:40 +08:00
Yousong Zhou
3d51730640 build: 将check与构建部分解耦 2019-09-09 07:50:23 +00:00
Qiu Jian
f96685a177 fix: yunionapi nil pointer panic after failed login 2019-09-09 15:44:10 +08:00
yunion-ci-robot
9fc0717617 Merge pull request #2806 from ioito/automated-cherry-pick-of-#2804-upstream-release-2.11
Automated cherry pick of #2804: fix: 避免解绑EIP后释放EIP任务失败
2019-09-09 11:56:20 +08:00
ioito
61ff3b4c14 fix: 避免解绑EIP后释放EIP任务失败 2019-09-09 11:20:52 +08:00
yunion-ci-robot
f8e92cf2d3 Merge pull request #2802 from swordqiu/automated-cherry-pick-of-#2801-upstream-release-2.11
Automated cherry pick of #2801: fix: api gateway logout handler error and fix go fmt issues
2019-09-07 23:04:19 +08:00
Qiu Jian
4d3cff6fc3 fix: remove casfe.go 2019-09-07 22:44:07 +08:00
Qiu Jian
73b9de9b82 fix: api gateway logout handler error and fix go fmt issues 2019-09-07 22:44:07 +08:00
yunion-ci-robot
cdcabd04a0 Merge pull request #2792 from swordqiu/automated-cherry-pick-of-#2770-upstream-release-2.11
Automated cherry pick of #2770: feature: keystone support CAS SSO authentication
2019-09-07 19:23:18 +08:00
yunion-ci-robot
3756039155 Merge pull request #2789 from wanyaoqi/automated-cherry-pick-of-#2787-upstream-release-2.11
Automated cherry pick of #2787: fix guest manager server struct
2019-09-07 19:14:18 +08:00
yunion-ci-robot
b4e80cfba4 Merge pull request #2796 from Mjoycarry/automated-cherry-pick-of-#2795-upstream-release-2.11
Automated cherry pick of #2795: add interface fetch resources of snats and dnats
2019-09-07 19:09:17 +08:00
yunion-ci-robot
d25cb980a9 Merge pull request #2757 from wanyaoqi/automated-cherry-pick-of-#2741-upstream-release-2.11
Automated cherry pick of #2741: io throttle add log event
2019-09-07 19:08:18 +08:00
yunion-ci-robot
b3a11b5ba0 Merge pull request #2786 from ioito/automated-cherry-pick-of-#2783-upstream-release-2.11
Automated cherry pick of #2783: fix: 避免重装系统后同步信息导致磁盘类型都为系统盘
2019-09-07 19:06:18 +08:00
Rain
aee0cd421a add interface fetch resources of snats and dnats
snat network show

check sourcecidr is available when creating snat

add natgateway, snattable, dnattable to compute system resources
2019-09-07 18:53:52 +08:00
Qiu Jian
0799b9db42 feature: keystone support CAS SSO authentication 2019-09-07 18:51:32 +08:00
yunion-ci-robot
c8c6708895 Merge pull request #2777 from swordqiu/automated-cherry-pick-of-#2775-upstream-release-2.11
Automated cherry pick of #2775: fix: 1. nil pointer panic error when accessing resource pool and storagecache 2. support multiple disk format
2019-09-07 17:39:18 +08:00
Qiu Jian
d043a95074 fix: 1. nil pointer panic error when accessing resource pool and storagecache 2. support multiple disk format 2019-09-07 17:23:05 +08:00
wanyaoqi
f5c5c1f56f fix guest manager server struct 2019-09-07 15:14:15 +08:00
ioito
9e66fb47a8 fix: 避免重装系统后同步信息导致磁盘类型都为系统盘 2019-09-07 13:43:53 +08:00
yunion-ci-robot
3a6b758d85 Merge pull request #2781 from Mjoycarry/automated-cherry-pick-of-#2780-upstream-release-2.11
Automated cherry pick of #2780: snapshotpolicy and disk should have same domain and project in snapshotpolicydisks
2019-09-07 13:32:18 +08:00
yunion-ci-robot
28c83ebe22 Merge pull request #2773 from swordqiu/automated-cherry-pick-of-#2772-upstream-release-2.11
Automated cherry pick of #2772: fix: allow set object acl in batch
2019-09-07 13:02:18 +08:00
Rain
766f605f8a snapshotpolicy and disk should have same domain and project in snapshotpolicydisks
snapshotpolicydisk disk details

registerModelManager is reqired but AddHander for snapshotpolicy cache IModelManager
2019-09-07 12:23:29 +08:00
Qiu Jian
5523960ab7 fix: allow set object acl in batch 2019-09-06 23:30:00 +08:00
yunion-ci-robot
ecb9fd24c1 Merge pull request #2749 from ioito/automated-cherry-pick-of-#2747-upstream-release-2.11
Automated cherry pick of #2747: fix: networkinterfaces belong system resource
2019-09-06 14:40:17 +08:00
yunion-ci-robot
b582e6bba0 Merge pull request #2768 from ioito/automated-cherry-pick-of-#2766-upstream-release-2.11
Automated cherry pick of #2766: fix: 不能无限制追加 application/json
2019-09-06 13:09:16 +08:00
yunion-ci-robot
c368708a7a Merge pull request #2764 from yousong/automated-cherry-pick-of-#2762-upstream-release-2.11
Automated cherry pick of #2762: lbagents: deploy: 检查服务账号有效性
2019-09-06 11:59:18 +08:00
yunion-ci-robot
3dbd68a48d Merge pull request #2760 from wanyaoqi/automated-cherry-pick-of-#2758-upstream-release-2.11
Automated cherry pick of #2758: fix vnc connect, filter qmp event
2019-09-06 11:58:20 +08:00
ioito
0b3ee55241 fix: 不能无限制追加 application/json 2019-09-06 11:46:53 +08:00
yunion-ci-robot
17ba603244 Merge pull request #2734 from swordqiu/automated-cherry-pick-of-#2733-upstream-release-2.11
Automated cherry pick of #2733: fix: optimize logger query time
2019-09-05 22:00:17 +08:00
Yousong Zhou
85df7aa3e6 lbagents: deploy: 检查服务账号有效性 2019-09-05 13:59:42 +00:00
wanyaoqi
1d4461d59f fix vnc connect, filter qmp event 2019-09-05 21:02:07 +08:00
wanyaoqi
c18df1ef73 io throttle add log event 2019-09-05 20:32:06 +08:00
yunion-ci-robot
b0741bd203 Merge pull request #2752 from yousong/automated-cherry-pick-of-#2750-upstream-release-2.11
Automated cherry pick of #2750: lbagent: reuse mcclient client session
2019-09-05 19:59:18 +08:00
yunion-ci-robot
f16a4b6040 Merge pull request #2754 from Mjoycarry/automated-cherry-pick-of-#2744-upstream-release-2.11
Automated cherry pick of #2744: qcloud sunday
2019-09-05 15:57:17 +08:00
Rain
3007211268 qcloud sunday
disk diskplay
2019-09-05 15:50:26 +08:00
Yousong Zhou
bfa9135f7a lbagent: fix possible out of bound index access 2019-09-05 07:37:58 +00:00
Yousong Zhou
682610de37 lbagent: reuse mcclient client session 2019-09-05 07:37:58 +00:00
ioito
bbf931018e fix: networkinterfaces belong system resource 2019-09-05 14:50:06 +08:00
yunion-ci-robot
eae568c40f Merge pull request #2740 from wanyaoqi/automated-cherry-pick-of-#2727-upstream-release-2.11
Automated cherry pick of #2727: fix snapshot policy filter
2019-09-04 14:35:17 +08:00
wanyaoqi
6957c7d50f fix snapshot policy filter 2019-09-04 12:48:40 +08:00
yunion-ci-robot
5be5f0fb7d Merge pull request #2737 from swordqiu/automated-cherry-pick-of-#2736-upstream-release-2.11
Automated cherry pick of #2736: fix: for backward compatility, only check account id consistency for non-empty account id
2019-09-04 10:03:16 +08:00
Qiu Jian
3df625e77a fix: optimize logger query time 2019-09-04 00:48:31 +08:00
Qiu Jian
bc99dbf09d fix: for backward compatility, only check account id consistency for non-empty account id 2019-09-03 21:21:15 +08:00
yunion-ci-robot
869ca6c457 Merge pull request #2731 from swordqiu/automated-cherry-pick-of-#2730-upstream-release-2.11
Automated cherry pick of #2730: fix: s3cli enable debug trace
2019-09-03 17:37:15 +08:00
Qiu Jian
5c2ecddd09 fix: s3cli enable debug trace 2019-09-03 17:14:26 +08:00
Zexi Li
755375fd39 Merge pull request #2725 from zexi/automated-cherry-pick-of-#2723-upstream-release-2.11
Automated cherry pick of #2723: region: fix create params cdrom missing
2019-09-03 10:47:13 +08:00
Zexi
35a6d13f32 region: fix create params cdrom missing 2019-09-03 10:46:15 +08:00
yunion-ci-robot
c66e8cf33d Merge pull request #2716 from wanyaoqi/automated-cherry-pick-of-#2714-upstream-release-2.11
Automated cherry pick of #2714: fix auto snapshot check quota, name, owner
2019-09-03 10:44:16 +08:00
yunion-ci-robot
ba1f904064 Merge pull request #2712 from Mjoycarry/automated-cherry-pick-of-#2711-upstream-release-2.11
Automated cherry pick of #2711: hanler snapshotpolicy cache
2019-09-03 10:33:16 +08:00
yunion-ci-robot
3f7c20bc3c Merge pull request #2721 from Mjoycarry/automated-cherry-pick-of-#2720-upstream-release-2.11
Automated cherry pick of #2720: add OnBindIPCompleteFailed and fix aliyun Refresh for snat and dnat
2019-09-03 10:29:15 +08:00
Rain
991eb3f38c add OnBindIPCompleteFailed and fix aliyun Refresh for snat and dnat 2019-09-03 10:25:18 +08:00
yunion-ci-robot
831863cea3 Merge pull request #2718 from swordqiu/automated-cherry-pick-of-#2717-upstream-release-2.11
Automated cherry pick of #2717: fix: bucket list access accessUrl nil pointer panic
2019-09-02 21:42:17 +08:00
yunion-ci-robot
2f204e2811 Merge pull request #2705 from swordqiu/automated-cherry-pick-of-#2703-upstream-release-2.11
Automated cherry pick of #2703: fix: guest get host nil pointer panic
2019-09-02 21:41:16 +08:00
Qiu Jian
35700b9692 fix: bucket list access accessUrl nil pointer panic 2019-09-02 21:36:00 +08:00
wanyaoqi
e85e23a110 fix auto snapshot check quota, name, owner 2019-09-02 21:03:08 +08:00
Rain
49bb413a36 hanler snapshotpolicy cache 2019-09-02 18:55:07 +08:00
yunion-ci-robot
8100b2aebe Merge pull request #2709 from zexi/automated-cherry-pick-of-#2707-upstream-release-2.11
Automated cherry pick of #2707: scheduler: fix reserved resource out of limit bug
2019-09-02 18:53:16 +08:00
Zexi
4b7dc251b0 scheduler: fix reserved resource out of limit bug 2019-09-02 18:40:55 +08:00
Qiu Jian
b80c30dcfb fix: guest get host nil pointer panic 2019-09-02 18:20:28 +08:00
yunion-ci-robot
b5f87568bf Merge pull request #2701 from ioito/automated-cherry-pick-of-#2699-upstream-release-2.11
Automated cherry pick of #2699: fix: 忽略裸金属器删除条件
2019-09-02 17:24:19 +08:00
ioito
c9c00f3776 fix: 忽略裸金属器删除条件 2019-09-02 16:32:09 +08:00
yunion-ci-robot
7fe3d646f9 Merge pull request #2696 from Mjoycarry/automated-cherry-pick-of-#2672-upstream-release-2.11
Automated cherry pick of #2672: local snapshotpolicy
2019-09-02 16:12:17 +08:00
yunion-ci-robot
ac4d9f2b2d Merge pull request #2694 from ioito/automated-cherry-pick-of-#2689-upstream-release-2.11
Automated cherry pick of #2689: fix: 避免裸金属服务器转宿主机任务失败
2019-09-02 15:58:15 +08:00
yunion-ci-robot
957fbd66db Merge pull request #2691 from swordqiu/automated-cherry-pick-of-#2690-upstream-release-2.11
Automated cherry pick of #2690: fix: no quota check when making directory
2019-09-02 15:56:15 +08:00
yunion-ci-robot
c2ca6d2f2c Merge pull request #2681 from swordqiu/automated-cherry-pick-of-#2680-upstream-release-2.11
Automated cherry pick of #2680: fix: azure create bucket failure due to empty storageClass
2019-09-02 15:53:15 +08:00
Rain
0b3d3b02b8 local snapshotpolicy 2019-09-02 15:36:59 +08:00
ioito
94f29d7c81 fix: 避免裸金属服务器转宿主机任务失败 2019-09-02 15:33:14 +08:00
yunion-ci-robot
1f0c738fc1 Merge pull request #2685 from wanyaoqi/automated-cherry-pick-of-#2683-upstream-release-2.11
Automated cherry pick of #2683: fix glance update mindisk
2019-09-02 15:31:15 +08:00
yunion-ci-robot
7161b279ce Merge pull request #2678 from zexi/automated-cherry-pick-of-#2676-upstream-release-2.11
Automated cherry pick of #2676: baremetal: auto prepare when pxe boot
2019-09-02 15:30:17 +08:00
Qiu Jian
390d599552 fix: no quota check when making directory 2019-09-02 15:26:58 +08:00
yunion-ci-robot
febf0086c7 Merge pull request #2670 from swordqiu/automated-cherry-pick-of-#2669-upstream-release-2.11
Automated cherry pick of #2669: feature: 1. add ceph cloud provider based on generic s3 provider 2. climc support AK/SK authentication
2019-09-02 13:59:15 +08:00
wanyaoqi
5a5f10aece fix glance update mindisk 2019-09-02 13:53:48 +08:00
yunion-ci-robot
1a9800cb42 Merge pull request #2667 from swordqiu/automated-cherry-pick-of-#2665-upstream-release-2.11
Automated cherry pick of #2665: fix: 1. glance/keystone version handler fix 2. allow run glance as normal user
2019-09-02 13:48:15 +08:00
yunion-ci-robot
9d9875c1cf Merge pull request #2663 from swordqiu/automated-cherry-pick-of-#2662-upstream-release-2.11
Automated cherry pick of #2662: fix: qcloud fail to set object acl
2019-09-02 13:47:15 +08:00
Qiu Jian
f469e8a632 fix: azure create bucket failure due to empty storageClass 2019-09-02 13:47:06 +08:00
yunion-ci-robot
731dc5bb9a Merge pull request #2660 from swordqiu/automated-cherry-pick-of-#2659-upstream-release-2.11
Automated cherry pick of #2659: fix: huawei fail to import image
2019-09-02 13:45:18 +08:00
yunion-ci-robot
f9ac4ce8c7 Merge pull request #2657 from swordqiu/automated-cherry-pick-of-#2656-upstream-release-2.11
Automated cherry pick of #2656: fix: allow column search in array
2019-09-02 13:44:15 +08:00
Zexi
2577b8f2a1 baremetal: auto prepare when pxe boot 2019-09-02 11:46:37 +08:00
yunion-ci-robot
ba3c8d321e Merge pull request #2674 from swordqiu/automated-cherry-pick-of-#2673-upstream-release-2.11
Automated cherry pick of #2673: fix: provides policies info in auth token response
2019-09-02 10:21:15 +08:00
Qiu Jian
7208be9b59 fix: provides policies info in auth token response 2019-09-02 09:15:44 +08:00
Qiu Jian
5ae65cb7b7 feature: 1. add ceph cloud provider based on generic s3 provider 2. climc support AK/SK authentication 2019-09-01 19:04:11 +08:00
Qiu Jian
71f6b89155 fix: 1. glance/keystone version handler fix 2. allow run glance as normal user 2019-08-31 11:13:26 +08:00
Qiu Jian
e025e65f7b fix: qcloud fail to set object acl 2019-08-30 23:22:42 +08:00
Qiu Jian
91f16ce64c fix: huawei fail to import image 2019-08-30 23:11:56 +08:00
Qiu Jian
d510ca1994 fix: allow column search in array 2019-08-30 22:27:25 +08:00
yunion-ci-robot
53d25123e0 Merge pull request #2654 from zhasm/automated-cherry-pick-of-#2652-upstream-release-2.11
Automated cherry pick of #2652: 修改 Makefile 获取当前分支的方式
2019-08-30 18:24:15 +08:00
张东亮
b346875837 修改 Makefile 获取当前分支的方式 2019-08-30 17:57:51 +08:00
yunion-ci-robot
94b5f92164 Merge pull request #2640 from swordqiu/automated-cherry-pick-of-#2629-upstream-release-2.11
Automated cherry pick of #2629: fix: incorrect import path of options pkg
2019-08-30 17:22:13 +08:00
liuxueguo6921
0589d38771 fix: incorrect import path of options pkg 2019-08-30 16:18:14 +08:00
yunion-ci-robot
55e41c3e37 Merge pull request #2650 from Mjoycarry/automated-cherry-pick-of-#2607-upstream-release-2.11
Automated cherry pick of #2607: natgateway bugfix
2019-08-30 16:07:13 +08:00
yunion-ci-robot
65fa546664 Merge pull request #2645 from ioito/automated-cherry-pick-of-#2601-upstream-release-2.11
Automated cherry pick of #2601: fix: 避免创建磁盘时显示provider disable底下的存储
2019-08-30 16:05:14 +08:00
Rain
1c937aeee0 natgateway bugfix
only one of that snat source cidr and networkid is needed

eip auto bind natgateway when not in aliyun
2019-08-30 15:11:41 +08:00
ioito
34ec4c3751 fix: 避免创建磁盘时显示provider disable底下的存储 2019-08-30 10:55:22 +08:00
yunion-ci-robot
1fd2fcefe5 Merge pull request #2642 from swordqiu/automated-cherry-pick-of-#2608-upstream-release-2.11
Automated cherry pick of #2608: feature: 1. ak/sk auth support 2. a full feature s3gateway works with Cyberduck
2019-08-30 07:35:12 +08:00
Qiu Jian
6441069a73 feature: 1. ak/sk auth support 2. a full feature s3gateway works with Cyberduck
注意:以下两个文件的修改还未被官方合并,所以下次make
mod的时候会被覆盖,需要注意checkout恢复:

vendor/github.com/Azure/azure-sdk-for-go/storage/blockblob.go
vendor/github.com/tencentyun/cos-go-sdk-v5/object_part.go
2019-08-30 00:27:36 +08:00
yunion-ci-robot
95e59f67d0 Merge pull request #2627 from swordqiu/automated-cherry-pick-of-#2626-upstream-release-2.11
Automated cherry pick of #2626: fix: compatible with minio s3
2019-08-29 23:52:12 +08:00
yunion-ci-robot
751740a655 Merge pull request #2636 from wanyaoqi/automated-cherry-pick-of-#2635-upstream-release-2.11
Automated cherry pick of #2635: bugfix:
2019-08-29 22:46:12 +08:00
wanyaoqi
825b92f1b4 bugfix:
- fix guest vnc connect failed on host unsupport ipv6
- fix cirros qemu args conflict with windows
2019-08-29 21:24:37 +08:00
yunion-ci-robot
9632f45d35 Merge pull request #2632 from ioito/automated-cherry-pick-of-#2630-upstream-release-2.11
Automated cherry pick of #2630: fix: avoid not release pending-usage
2019-08-29 20:45:13 +08:00
ioito
facb566c88 fix: avoid not release pending-usage 2019-08-29 20:30:11 +08:00
yunion-ci-robot
3cdeb52dd1 Merge pull request #2624 from zhasm/automated-cherry-pick-of-#2619-upstream-release-2.11
Automated cherry pick of #2619: 新增 s3gateway s3cli的 rpm 描述文件
2019-08-29 18:59:14 +08:00
Qiu Jian
44c1115ce2 fix: compatible with minio s3 2019-08-29 18:51:04 +08:00
rex zhasm
70c686e254 Merge branch 'release/2.11' into automated-cherry-pick-of-#2619-upstream-release-2.11 2019-08-29 17:33:32 +08:00
yunion-ci-robot
a87fd32c65 Merge pull request #2617 from ioito/automated-cherry-pick-of-#2615-upstream-release-2.11
Automated cherry pick of #2615: fix: avoid rbd image exist when rebuild-root
2019-08-29 17:32:14 +08:00
yunion-ci-robot
6da30aa260 Merge pull request #2622 from ioito/automated-cherry-pick-of-#2620-upstream-release-2.11
Automated cherry pick of #2620: hotfix: add aliyun request user-agent
2019-08-29 17:18:11 +08:00
Zhang Dongliang
1ec1646857 update wording 2019-08-29 17:01:46 +08:00
Zhang Dongliang
34dea11536 新增 s3gateway s3cli的 rpm 描述文件 2019-08-29 17:01:46 +08:00
ioito
f1b22c2249 hotfix: add aliyun request user-agent 2019-08-29 16:37:28 +08:00
ioito
06b18545a2 fix: avoid rbd image exist when rebuild-root 2019-08-29 11:49:03 +08:00
yunion-ci-robot
7282608f60 Merge pull request #2613 from ioito/automated-cherry-pick-of-#2569-upstream-release-2.11
Automated cherry pick of #2569: fix: 宿主机下线时,需要将宿主机底下的虚拟机状态设为unknown
2019-08-29 11:24:14 +08:00
yunion-ci-robot
712fdcae4d Merge pull request #2610 from swordqiu/automated-cherry-pick-of-#2609-upstream-release-2.11
Automated cherry pick of #2609: fix: 1. missing action log for bucket objects ops 2. huawei cloud sync duplicate buckets
2019-08-29 10:54:12 +08:00
ioito
f7f076a70c fix: 宿主机下线时,需要将宿主机底下的虚拟机状态设为unknown 2019-08-29 10:14:03 +08:00
Qiu Jian
d6cd29f588 fix: 1. missing action log for bucket objects ops 2. huawei cloud sync duplicate buckets 2019-08-29 02:40:16 +08:00
yunion-ci-robot
1e9d548de0 Merge pull request #2605 from yousong/automated-cherry-pick-of-#2603-upstream-release-2.11
Automated cherry pick of #2603: mcclient: ansibleplaybooks: 注册为v2接口
2019-08-28 22:34:14 +08:00
yunion-ci-robot
61a8cb5742 Merge pull request #2590 from yousong/automated-cherry-pick-of-#2588-upstream-release-2.11
Automated cherry pick of #2588: lbagents: 详情增加zone信息
2019-08-28 22:32:17 +08:00
yunion-ci-robot
122667e9b3 Merge pull request #2600 from zexi/automated-cherry-pick-of-#2599-upstream-release-2.11
Automated cherry pick of #2599: schedtag: create support scope
2019-08-28 22:29:12 +08:00
Yousong Zhou
9f2a830cb3 mcclient: ansibleplaybooks: 注册为v2接口 2019-08-28 12:44:54 +00:00
yunion-ci-robot
0b51b87404 Merge pull request #2551 from ioito/automated-cherry-pick-of-#2546-upstream-release-2.11
Automated cherry pick of #2546: fix: 避免host disable时detach磁盘
2019-08-28 15:57:14 +08:00
Zexi
7bef674810 schedtag: create support scope 2019-08-27 15:21:09 +08:00
yunion-ci-robot
7d268f1a73 Merge pull request #2544 from ioito/automated-cherry-pick-of-#2512-upstream-release-2.11
Automated cherry pick of #2512: fix: add external perform change-project
2019-08-27 11:17:10 +08:00
Yousong Zhou
2de2fca0bd lbagents: 详情增加zone信息 2019-08-27 03:02:50 +00:00
yunion-ci-robot
6453472e25 Merge pull request #2586 from wanyaoqi/automated-cherry-pick-of-#2581-upstream-release-2.11
Automated cherry pick of #2581: fix rbd disk delete with snapshot
2019-08-27 10:32:10 +08:00
yunion-ci-robot
1001d1fc38 Merge pull request #2579 from swordqiu/automated-cherry-pick-of-#2577-upstream-release-2.11
Automated cherry pick of #2577: fix: quota-list fail if deleted projects found
2019-08-27 10:08:13 +08:00
yunion-ci-robot
1bf78eaae4 Merge pull request #2561 from ioito/automated-cherry-pick-of-#2558-upstream-release-2.11
Automated cherry pick of #2558: fix: sync and set secgroup public scope
2019-08-26 22:57:16 +08:00
yunion-ci-robot
de5e019834 Merge pull request #2575 from yousong/automated-cherry-pick-of-#2573-upstream-release-2.11
Automated cherry pick of #2573: policy: 将lb集群相关资源归入系统资源类
2019-08-26 22:55:11 +08:00
yunion-ci-robot
bb69a3f009 Merge pull request #2583 from wanyaoqi/automated-cherry-pick-of-#2568-upstream-release-2.11
Automated cherry pick of #2568: fix host maintenance
2019-08-26 22:42:12 +08:00
wanyaoqi
35942623f7 fix rbd disk delete with snapshot 2019-08-26 22:09:25 +08:00
wanyaoqi
2912797abe fix host maintenance 2019-08-26 22:06:37 +08:00
Qiu Jian
1b0295b4dc fix: quota-list fail if deleted projects found 2019-08-26 20:30:29 +08:00
yunion-ci-robot
ca34eff740 Merge pull request #2422 from zexi/automated-cherry-pick-of-#2415-upstream-release-2.11
Automated cherry pick of #2415: webconsole: update aliyun vnc base url and uniq vnc session
2019-08-26 16:30:15 +08:00
Yousong Zhou
4c44a80a81 policy: 将lb集群相关资源归入系统资源类 2019-08-26 07:43:28 +00:00
Zexi
60a554eab9 webconsole: update aliyun vnc base url and uniq vnc session 2019-08-26 15:42:14 +08:00
yunion-ci-robot
e15a280336 Merge pull request #2566 from tb365/automated-cherry-pick-of-#2564-upstream-release-2.11
Automated cherry pick of #2564: aws disk resize bugfix
2019-08-26 15:26:11 +08:00
TangBin
1ed74a2126 aws disk resize bugfix 2019-08-26 14:53:57 +08:00
yunion-ci-robot
a43839ce4a Merge pull request #2541 from swordqiu/automated-cherry-pick-of-#2539-upstream-release-2.11
Automated cherry pick of #2539: fix: pending usage not release after failed change config
2019-08-24 18:40:11 +08:00
yunion-ci-robot
cf380fdfd8 Merge pull request #2533 from swordqiu/automated-cherry-pick-of-#2477-upstream-release-2.11
Automated cherry pick of #2477: fix: use policy match weight to override less specific policy
2019-08-24 18:39:10 +08:00
ioito
63d582a8b2 fix: sync and set secgroup public scope 2019-08-24 18:38:19 +08:00
yunion-ci-robot
d447db4bab Merge pull request #2537 from swordqiu/automated-cherry-pick-of-#2536-upstream-release-2.11
Automated cherry pick of #2536: fix: bucket mkdir may create path with empty whitespaces
2019-08-24 18:38:12 +08:00
yunion-ci-robot
242c376610 Merge pull request #2554 from wanyaoqi/automated-cherry-pick-of-#2552-upstream-release-2.11
Automated cherry pick of #2552: guest batch migrate
2019-08-24 17:56:10 +08:00
yunion-ci-robot
b60e7a77f3 Merge pull request #2557 from wanyaoqi/automated-cherry-pick-of-#2413-upstream-release-2.11
Automated cherry pick of #2413: host migrate
2019-08-24 17:36:09 +08:00
wanyaoqi
2483e00dab guest batch migrate 2019-08-24 17:31:24 +08:00
wanyaoqi
1ae5f2463b host migrate 2019-08-24 17:12:27 +08:00
ioito
01bb295476 fix: 避免host disable时detach磁盘 2019-08-24 14:00:31 +08:00
ioito
204690fb07 fix: add external perform change-project 2019-08-24 10:13:00 +08:00
Qiu Jian
923f58131b fix: pending usage not release after failed change config 2019-08-23 22:46:08 +08:00
Qiu Jian
9e91d9ea75 fix: bucket mkdir may create path with empty whitespaces 2019-08-23 22:01:22 +08:00
yunion-ci-robot
15088059dc Merge pull request #2530 from ioito/automated-cherry-pick-of-#2528-upstream-release-2.11
Automated cherry pick of #2528: fix: deploy action not sync guest status in subtask
2019-08-23 21:24:08 +08:00
Qiu Jian
9694523ecc fix: use policy match weight to override less specific policy 2019-08-23 21:20:35 +08:00
ioito
45e3fc45b2 fix: deploy action not sync guest status in subtask 2019-08-23 21:02:37 +08:00
yunion-ci-robot
cf787675e0 Merge pull request #2519 from yousong/automated-cherry-pick-of-#2517-upstream-release-2.11
Automated cherry pick of #2517: snapshotpolicy: 改正bool default:"true"
2019-08-23 19:52:08 +08:00
yunion-ci-robot
7c288a1a81 Merge pull request #2524 from ioito/automated-cherry-pick-of-#2522-upstream-release-2.11
Automated cherry pick of #2522: fix: sync status after guest sync conf
2019-08-23 18:03:10 +08:00
ioito
4c09822976 fix: sync status after guest sync conf 2019-08-23 17:16:48 +08:00
yunion-ci-robot
830977c6d0 Merge pull request #2520 from zexi/automated-cherry-pick-of-#2511-upstream-release-2.11
Automated cherry pick of #2511: schedtags: support scope
2019-08-23 14:27:08 +08:00
Zexi
69bbe99cbe schedtags: support scope 2019-08-23 13:38:59 +08:00
Yousong Zhou
546d53f386 snapshotpolicy: 改正bool default:"true" 2019-08-23 03:28:48 +00:00
yunion-ci-robot
0545078f13 Merge pull request #2504 from ioito/automated-cherry-pick-of-#2499-upstream-release-2.11
Automated cherry pick of #2499: fix: qcloud sync unavailable storages
2019-08-23 10:55:09 +08:00
yunion-ci-robot
366b527430 Merge pull request #2515 from zexi/automated-cherry-pick-of-#2513-upstream-release-2.11
Automated cherry pick of #2513: scheduler: fix disk or net specify resource id execute schedtag filter
2019-08-23 03:39:08 +08:00
yunion-ci-robot
82d7304419 Merge pull request #2508 from wanyaoqi/automated-cherry-pick-of-#2456-upstream-release-2.11
Automated cherry pick of #2456: io throttle
2019-08-23 03:38:10 +08:00
yunion-ci-robot
96ba6bfbce Merge pull request #2493 from yousong/automated-cherry-pick-of-#2491-upstream-release-2.11
Automated cherry pick of #2491: networks: 添加ifname_hint字段
2019-08-23 03:37:14 +08:00
yunion-ci-robot
b1a22d7d28 Merge pull request #2497 from yousong/automated-cherry-pick-of-#2495-upstream-release-2.11
Automated cherry pick of #2495: appsrv: 反转义path segs
2019-08-23 03:14:08 +08:00
yunion-ci-robot
d434fdd121 Merge pull request #2489 from tb365/automated-cherry-pick-of-#2487-upstream-release-2.11
Automated cherry pick of #2487: huawei & aws bugfix
2019-08-23 03:10:09 +08:00
Zexi
398cc61cb6 scheduler: fix disk or net specify resource id execute schedtag filter 2019-08-22 21:59:23 +08:00
wanyaoqi
12a59fd256 add io-throttle doc 2019-08-22 21:00:46 +08:00
wanyaoqi
8dbdc9d3ee io throttle 2019-08-22 21:00:46 +08:00
ioito
f30886bfc1 fix: qcloud sync unavailable storages 2019-08-22 20:47:35 +08:00
Yousong Zhou
c42221e8f4 guests: detachnetwork时支持以名字指定network 2019-08-22 08:44:49 +00:00
Yousong Zhou
7cc11a293e appsrv: 反转义path segs
支持"climc network-delete 中文"
2019-08-22 08:44:48 +00:00
Yousong Zhou
1588690951 networks: 添加ifname_hint字段
- 升级部署时,从network.Name初始化
 - 创建时,尝试从network.Name取值,取不到则生成随机值
 - 不允许更新
2019-08-22 08:10:15 +00:00
TangBin
c83988ba68 huawei bugfix 2019-08-22 14:35:55 +08:00
TangBin
43ed2b8ebf huawei & aws bugfix 2019-08-22 14:35:55 +08:00
yunion-ci-robot
295a6ac93d Merge pull request #2485 from ioito/automated-cherry-pick-of-#2483-upstream-release-2.11
Automated cherry pick of #2483: fix: zstack reset passworkd with username
2019-08-22 11:42:08 +08:00
ioito
cd42443083 fix: zstack reset passworkd with username 2019-08-22 11:25:56 +08:00
yunion-ci-robot
24076578db Merge pull request #2479 from ioito/automated-cherry-pick-of-#2451-upstream-release-2.11
Automated cherry pick of #2451: bugfix: 避免openstack磁盘扩容成功后未能挂载到虚拟机上
2019-08-22 10:25:07 +08:00
ioito
a204a3c231 bugfix: 避免openstack磁盘扩容成功后未能挂载到虚拟机上 2019-08-22 10:15:09 +08:00
yunion-ci-robot
d4dd0fb2e7 Merge pull request #2475 from swordqiu/automated-cherry-pick-of-#2473-upstream-release-2.11
Automated cherry pick of #2473: fix: doamin admin cannot access private networks across domain
2019-08-22 09:49:07 +08:00
yunion-ci-robot
1bda7601d1 Merge pull request #2471 from swordqiu/automated-cherry-pick-of-#2469-upstream-release-2.11
Automated cherry pick of #2469: fix: disk-resize sync guest status cause deadlock
2019-08-22 09:45:08 +08:00
yunion-ci-robot
e6fc769053 Merge pull request #2467 from swordqiu/automated-cherry-pick-of-#2465-upstream-release-2.11
Automated cherry pick of #2465: fix: a join update is allowed if one of the joint models is allowed to update
2019-08-22 09:43:08 +08:00
yunion-ci-robot
ab957c0a20 Merge pull request #2454 from tb365/automated-cherry-pick-of-#2452-upstream-release-2.11
Automated cherry pick of #2452: add update vm name method
2019-08-22 08:11:08 +08:00
yunion-ci-robot
4d80247b21 Merge pull request #2431 from ioito/automated-cherry-pick-of-#2414-upstream-release-2.11
Automated cherry pick of #2414: hotfix: 避免上传镜像后,再次获取镜像列表因网络原因导致任务失败
2019-08-22 08:09:08 +08:00
Qiu Jian
a4550b84e1 fix: doamin admin cannot access private networks across domain 2019-08-22 00:27:28 +08:00
Qiu Jian
e29645e49f fix: disk-resize sync guest status cause deadlock 2019-08-21 23:57:11 +08:00
Qiu Jian
a60e603248 fix: a join update is allowed if one of the joint models is allowed to update 2019-08-21 20:41:42 +08:00
yunion-ci-robot
00df4331c3 Merge pull request #2429 from ioito/automated-cherry-pick-of-#2416-upstream-release-2.11
Automated cherry pick of #2416: fix: 避免provider污染sql,导致查询结果为空
2019-08-21 20:33:06 +08:00
yunion-ci-robot
9d644948e5 Merge pull request #2459 from zexi/automated-cherry-pick-of-#2457-upstream-release-2.11
Automated cherry pick of #2457: region: capability domain public network must equal domain_id
2019-08-21 20:30:07 +08:00
yunion-ci-robot
ff9389de7d Merge pull request #2463 from wanyaoqi/automated-cherry-pick-of-#2461-upstream-release-2.11
Automated cherry pick of #2461: fix snapshot can't delete
2019-08-21 20:17:09 +08:00
Zexi
828e44d0e5 region: capability domain public network must equal domain_id 2019-08-21 19:24:51 +08:00
wanyaoqi
add2b6af1c fix snapshot can't delete 2019-08-21 19:12:26 +08:00
TangBin
5c26f733b0 add update vm name method 2019-08-21 15:44:48 +08:00
yunion-ci-robot
b70c8a6795 Merge pull request #2437 from ioito/automated-cherry-pick-of-#2407-upstream-release-2.11
Automated cherry pick of #2407: fix: 避免admin=false时,不显示其余项目下的标签信息
2019-08-21 15:32:09 +08:00
yunion-ci-robot
f767617628 Merge pull request #2444 from wanyaoqi/automated-cherry-pick-of-#2406-upstream-release-2.11
Automated cherry pick of #2406: - snapshot support custom snapshot policy
2019-08-21 15:30:06 +08:00
yunion-ci-robot
751543f947 Merge pull request #2449 from zexi/automated-cherry-pick-of-#2447-upstream-release-2.11
Automated cherry pick of #2447: scheduler: sku not unmarshal to ServerConfigs
2019-08-21 14:57:08 +08:00
Zexi
dedbe1cb82 scheduler: sku not unmarshal to ServerConfigs 2019-08-21 12:31:06 +08:00
yunion-ci-robot
02d824dc79 Merge pull request #2445 from Mjoycarry/automated-cherry-pick-of-#2442-upstream-release-2.11
Automated cherry pick of #2442: nat delele should overvide Delete() and call RealDelete() after delete cloud resource successfully
2019-08-21 12:01:07 +08:00
Rain
f5a038cf79 nat delele should overvide Delete() and call RealDelete() after delete cloud resource successfully 2019-08-21 11:22:01 +08:00
wanyaoqi
249df4bdf9 - snapshot support custom snapshot policy 2019-08-21 11:19:52 +08:00
yunion-ci-robot
fb45719b89 Merge pull request #2434 from ioito/automated-cherry-pick-of-#2412-upstream-release-2.11
Automated cherry pick of #2412: hotfix: snapshot create optimized
2019-08-21 10:57:08 +08:00
ioito
6f3f2708fb fix: 避免admin=false时,不显示其余项目下的标签信息 2019-08-21 10:27:30 +08:00
ioito
4c5cc5ab34 hotfix: snapshot create optimized 2019-08-21 10:22:23 +08:00
ioito
1e01f48a7e hotfix: 避免上传镜像后,再次获取镜像列表因网络原因导致任务失败 2019-08-21 10:07:18 +08:00
ioito
8e07684181 fix: 避免provider污染sql,导致查询结果为空 2019-08-21 10:05:15 +08:00
yunion-ci-robot
acb4ce15dd Merge pull request #2426 from ioito/automated-cherry-pick-of-#2424-upstream-release-2.11
Automated cherry pick of #2424: fix: 允许更改私有云region名称
2019-08-20 23:48:08 +08:00
yunion-ci-robot
3ca067c493 Merge pull request #2410 from ioito/automated-cherry-pick-of-#2408-upstream-release-2.11
Automated cherry pick of #2408: fix: avoid sku validate delete return error
2019-08-20 23:34:11 +08:00
ioito
dae129738d fix: 允许更改私有云region名称 2019-08-20 21:20:46 +08:00
yunion-ci-robot
7ef70d069b Merge pull request #2384 from zexi/automated-cherry-pick-of-#2382-upstream-release-2.11
Automated cherry pick of #2382: baremetal: fix ext4 rootfs inode inconsistent
2019-08-20 21:01:07 +08:00
yunion-ci-robot
23cc08a80f Merge pull request #2419 from wanyaoqi/automated-cherry-pick-of-#2417-upstream-release-2.11
Automated cherry pick of #2417: fix snapshot ops log
2019-08-20 20:54:07 +08:00
yunion-ci-robot
6762313e0b Merge pull request #2404 from swordqiu/automated-cherry-pick-of-#2402-upstream-release-2.11
Automated cherry pick of #2402: fix: sysadmin should be a system account
2019-08-20 20:47:08 +08:00
wanyaoqi
526a4a42ef fix snapshot ops log 2019-08-20 20:27:23 +08:00
Zexi
1ebc11363d baremetal: fix ext4 rootfs inode inconsistent 2019-08-20 17:16:57 +08:00
ioito
feff0569b8 fix: avoid sku validate delete return error 2019-08-20 15:26:18 +08:00
Qiu Jian
d6f8efbce2 fix: sysadmin should be a system account 2019-08-20 14:02:37 +08:00
yunion-ci-robot
c49ff16066 Merge pull request #2393 from swordqiu/automated-cherry-pick-of-#2392-upstream-release-2.11
Automated cherry pick of #2392: fix: qcloud change config failed
2019-08-20 11:30:07 +08:00
yunion-ci-robot
bb6858a779 Merge pull request #2389 from swordqiu/automated-cherry-pick-of-#2387-upstream-release-2.11
Automated cherry pick of #2387: fix: cloud-provider-region add cloudaccount_domain_id
2019-08-20 11:28:07 +08:00
yunion-ci-robot
cf9782355b Merge pull request #2397 from ioito/automated-cherry-pick-of-#2381-upstream-release-2.11
Automated cherry pick of #2381: fix: httputils show error when resp body is not dict
2019-08-20 10:25:08 +08:00
ioito
c73ff1a3f9 fix: httputils show error when resp body is not dict 2019-08-20 10:18:40 +08:00
Qiu Jian
4b69c5c4aa fix: qcloud change config failed 2019-08-20 01:48:52 +08:00
yunion-ci-robot
ab20127b28 Merge pull request #2379 from wanyaoqi/automated-cherry-pick-of-#2377-upstream-release-2.11
Automated cherry pick of #2377: snapshot bugs fix
2019-08-20 00:04:07 +08:00
Qiu Jian
d7436e4718 fix: cloud-provider-region add cloudaccount_domain_id 2019-08-19 22:29:30 +08:00
wanyaoqi
d1d8b9bc49 snapshot bugs fix 2019-08-19 20:33:32 +08:00
yunion-ci-robot
c627096533 Merge pull request #2374 from swordqiu/automated-cherry-pick-of-#2373-upstream-release-2.11
Automated cherry pick of #2373: fix: not sync correctly aws VM's tempoaral public ip
2019-08-19 10:24:06 +08:00
Qiu Jian
244be990ae fix: not sync correctly aws VM's tempoaral public ip 2019-08-19 02:00:39 +08:00
yunion-ci-robot
2dee6f0d85 Merge pull request #2371 from swordqiu/automated-cherry-pick-of-#2369-upstream-release-2.11
Automated cherry pick of #2369: fix: avoid duplicate image uploading if multiple identical instances created at same time
2019-08-19 00:10:05 +08:00
Qiu Jian
c03abdaf64 fix: avoid duplicate image uploading if multiple identical instances created at same time 2019-08-18 23:27:16 +08:00
yunion-ci-robot
be252c74b8 Merge pull request #2367 from swordqiu/automated-cherry-pick-of-#2357-upstream-release-2.11
Automated cherry pick of #2357: fix: deprecate old user/group joint project API, create new action apis for add user/group to projects with roles
2019-08-17 21:35:09 +08:00
Qiu Jian
ec5b6af2fc update vendor 2019-08-17 18:56:02 +08:00
Qiu Jian
0373b5f025 fix: deprecate old user/group joint project API, create new action apis for add user/group to projects with roles 2019-08-17 18:56:02 +08:00
yunion-ci-robot
21be87d52c Merge pull request #2364 from swordqiu/automated-cherry-pick-of-#2362-upstream-release-2.11
Automated cherry pick of #2362: fix: cloud-account-usage no data for domain admin
2019-08-17 18:55:05 +08:00
Qiu Jian
0e40833636 fix: cloud-account-usage no data for domain admin 2019-08-17 18:41:44 +08:00
yunion-ci-robot
278a195a0d Merge pull request #2360 from swordqiu/automated-cherry-pick-of-#2358-upstream-release-2.11
Automated cherry pick of #2358: fix: new user without porject may view any resources
2019-08-17 18:27:05 +08:00
Qiu Jian
500c11f1f1 fix: new user without porject may view any resources 2019-08-17 13:42:10 +08:00
yunion-ci-robot
71fb35aea3 Merge pull request #2355 from yousong/automated-cherry-pick-of-#2353-upstream-release-2.11
Automated cherry pick of #2353: Makefile: 改正rpm target
2019-08-17 10:00:06 +08:00
yunion-ci-robot
bf586f75cc Merge pull request #2345 from yousong/automated-cherry-pick-of-#2343-upstream-release-2.11
Automated cherry pick of #2343: hostman: windows: 改正批处理代码
2019-08-17 09:58:06 +08:00
yunion-ci-robot
ab4baf8a50 Merge pull request #2351 from swordqiu/automated-cherry-pick-of-#2349-upstream-release-2.11
Automated cherry pick of #2349: fix: project_id/domain_id was cleared after FetchProjectInfo/FetchDomainInfo called
2019-08-16 22:09:07 +08:00
Yousong Zhou
ffefc8dd3a .travis.yml: 去掉过时comment 2019-08-16 13:57:41 +00:00
Yousong Zhou
fd1643282c Makefile: 改正rpm target 2019-08-16 13:57:41 +00:00
Qiu Jian
495b8ede20 fix: project_id/domain_id was cleared after FetchProjectInfo/FetchDomainInfo called 2019-08-16 21:26:30 +08:00
yunion-ci-robot
2897c96070 Merge pull request #2341 from wanyaoqi/automated-cherry-pick-of-#2339-upstream-release-2.11
Automated cherry pick of #2339: fix managered disk reset not update disk size
2019-08-16 21:23:06 +08:00
Yousong Zhou
bbcbb4992d hostman: windows: 改正批处理代码 2019-08-16 13:21:04 +00:00
wanyaoqi
d9ff944212 fix managered disk reset not update disk size 2019-08-16 18:01:33 +08:00
yunion-ci-robot
c70cea36e9 Merge pull request #2334 from tb365/automated-cherry-pick-of-#2332-upstream-release-2.11
Automated cherry pick of #2332: aws & huawei & ucloud fix
2019-08-16 17:21:06 +08:00
yunion-ci-robot
1095bceecd Merge pull request #2313 from ioito/automated-cherry-pick-of-#2311-upstream-release-2.11
Automated cherry pick of #2311: fix: avoid duplicate sku error
2019-08-16 17:11:06 +08:00
yunion-ci-robot
0328d466e0 Merge pull request #2310 from Mjoycarry/automated-cherry-pick-of-#2291-upstream-release-2.11
Automated cherry pick of #2291: snapshotpolicy list create delete apply cancel finish except that disk sync snapshot policy
2019-08-16 17:05:06 +08:00
yunion-ci-robot
205141c840 Merge pull request #2303 from wanyaoqi/automated-cherry-pick-of-#2301-upstream-release-2.11
Automated cherry pick of #2301: fix image head no field tenant
2019-08-16 17:04:05 +08:00
yunion-ci-robot
01b4643aa2 Merge pull request #2289 from wanyaoqi/automated-cherry-pick-of-#2287-upstream-release-2.11
Automated cherry pick of #2287: fix ceph rescue mode migrate
2019-08-16 17:03:05 +08:00
TangBin
0ea70f9df6 aws & huawei & ucloud fix 2019-08-16 16:45:53 +08:00
yunion-ci-robot
d9098ab8e4 Merge pull request #2328 from ioito/automated-cherry-pick-of-#2326-upstream-release-2.11
Automated cherry pick of #2326: fix: azure快照的磁盘id应该小写
2019-08-16 16:29:04 +08:00
yunion-ci-robot
4bba4e51fc Merge pull request #2324 from swordqiu/automated-cherry-pick-of-#2322-upstream-release-2.11
Automated cherry pick of #2322: fix: openstack provider string should be OpenStack
2019-08-16 16:28:04 +08:00
yunion-ci-robot
222da06ab1 Merge pull request #2307 from Mjoycarry/automated-cherry-pick-of-#2292-upstream-release-2.11
Automated cherry pick of #2292: task.Params pass paramters
2019-08-16 16:20:05 +08:00
yunion-ci-robot
ee2004caeb Merge pull request #2294 from zexi/automated-cherry-pick-of-#2293-upstream-release-2.11
Automated cherry pick of #2293: baremetal: raid disk inode inconsistent due to mkfs.ext4 largefile option
2019-08-16 16:14:05 +08:00
ioito
e8e72845ed fix: azure快照的磁盘id应该小写 2019-08-16 15:52:52 +08:00
Qiu Jian
44803bc413 fix: openstack provider string should be OpenStack 2019-08-16 15:42:03 +08:00
yunion-ci-robot
cd14775433 Merge pull request #2318 from ioito/automated-cherry-pick-of-#2316-upstream-release-2.11
Automated cherry pick of #2316: fix: create disk with project-src=local
2019-08-16 15:22:06 +08:00
ioito
7cfd414fa3 fix: create disk with project-src=local 2019-08-16 15:04:10 +08:00
ioito
e57416c3ed fix: avoid duplicate sku error 2019-08-16 14:44:34 +08:00
yunion-ci-robot
09677ddb36 Merge pull request #2308 from yousong/automated-cherry-pick-of-#2305-upstream-release-2.11
Automated cherry pick of #2305: .travis.yml: 不使用docker
2019-08-16 14:39:07 +08:00
Rain
1651dfaea1 snapshotpolicy list create delete apply cancel finish except that disk sync snapshot policy
add copyright

fix some imprefection

fix test file
2019-08-16 14:36:38 +08:00
Yousong Zhou
d062220e9f .travis.yml: 不使用docker 2019-08-16 05:43:33 +00:00
Rain
bf45edb016 task.Params pass paramters 2019-08-16 13:42:38 +08:00
wanyaoqi
5db5ff30e3 fix image head no field tenant 2019-08-16 12:16:56 +08:00
yunion-ci-robot
13913fcf61 Merge pull request #2299 from yousong/automated-cherry-pick-of-#2297-upstream-release-2.11
Automated cherry pick of #2297: Makefile: 使用rpm/%
2019-08-16 10:36:05 +08:00
Yousong Zhou
3f161c805f .travis.yml: 改正权限问题 2019-08-16 02:20:50 +00:00
Yousong Zhou
a0fb6398e4 Makefile: 使用rpm/% 2019-08-16 02:20:50 +00:00
yunion-ci-robot
1a8825fcee Merge pull request #2274 from yousong/automated-cherry-pick-of-#2272-upstream-release-2.11
Automated cherry pick of #2272: .travis.yml: 改正配置
2019-08-15 22:03:04 +08:00
Zexi
09f63b6a58 baremetal: raid disk inode inconsistent due to mkfs.ext4 largefile option 2019-08-15 21:33:30 +08:00
yunion-ci-robot
b32272cf8a Merge pull request #2285 from swordqiu/automated-cherry-pick-of-#2284-upstream-release-2.11
Automated cherry pick of #2284: feature: 1. limit for bucket object count and size 2. quota for object count and size
2019-08-15 16:07:04 +08:00
wanyaoqi
40407be7a3 fix ceph rescue mode migrate 2019-08-15 16:01:53 +08:00
yunion-ci-robot
e52c179abd Merge pull request #2282 from wanyaoqi/automated-cherry-pick-of-#2280-upstream-release-2.11
Automated cherry pick of #2280: add distinct field manager
2019-08-15 10:38:02 +08:00
Qiu Jian
875349e8d7 feature: 1. limit for bucket object count and size 2. quota for object count and size 2019-08-14 22:31:41 +08:00
wanyaoqi
53ac3f79ce add distinct field manager 2019-08-14 21:02:51 +08:00
yunion-ci-robot
1dda992340 Merge pull request #2278 from ioito/automated-cherry-pick-of-#2276-upstream-release-2.11
Automated cherry pick of #2276: fix: missing setup managerId for snapshot
2019-08-14 20:38:05 +08:00
ioito
971f3f7738 fix: missing setup managerId for snapshot 2019-08-14 20:14:44 +08:00
Yousong Zhou
600672641c Makefile: fail for unknown target 2019-08-14 07:12:21 +00:00
Yousong Zhou
0132701dde .travis.yml: 改正配置
找不到commit

	$ git clone --depth=1 --branch=release/2.11 https://github.com/yunionio/onecloud.git yunionio/onecloud
	Cloning into 'yunionio/onecloud'...
	remote: Enumerating objects: 9016, done.
	remote: Counting objects: 100% (9016/9016), done.
	remote: Compressing objects: 100% (6914/6914), done.
	remote: Total 9016 (delta 2420), reused 5969 (delta 1637), pack-reused 0
	Receiving objects: 100% (9016/9016), 14.37 MiB | 14.29 MiB/s, done.
	Resolving deltas: 100% (2420/2420), done.
	$ cd yunionio/onecloud
	$ git checkout -qf 4e9f605844
	fatal: reference is not a tree: 4e9f605844
	The command "git checkout -qf 4e9f60584434f56a410604b4ef36f979ecdb9623" failed and exited with 128 during .
2019-08-14 07:12:21 +00:00
yunion-ci-robot
91763813d5 Merge pull request #2262 from ioito/automated-cherry-pick-of-#2198-upstream-release-2.11
Automated cherry pick of #2198: fix: private sku sync and delete
2019-08-14 11:41:01 +08:00
ioito
18ca4ef9be fix: private sku sync and delete 2019-08-13 21:44:27 +08:00
1459 changed files with 76060 additions and 46008 deletions

View File

@@ -13,9 +13,9 @@ RUN true \
WORKDIR /opt
RUN true \
&& wget https://dl.google.com/go/go1.12.6.linux-amd64.tar.gz \
&& tar xzf go1.12.6.linux-amd64.tar.gz \
&& rm -vf go1.12.6.linux-amd64.tar.gz \
&& wget https://dl.google.com/go/go1.13.3.linux-amd64.tar.gz \
&& tar xzf go1.13.3.linux-amd64.tar.gz \
&& rm -vf go1.13.3.linux-amd64.tar.gz \
&& true
ENV GOROOT="/opt/go"
ENV PATH="/opt/go/bin:${PATH}"
@@ -24,6 +24,16 @@ RUN useradd -c "OneCloud Builder" --create-home --home-dir /home/build --shell /
USER build
ENV HOME /home/build
WORKDIR /home/build
USER build
ENV GOPATH="/home/build/go"
ENV PATH="${GOPATH}/bin:${PATH}"
RUN true \
&& mkdir -p "$GOPATH" \
&& d="$GOPATH/src/golang.org/x/tools" \
&& mkdir -p "$d" \
&& git clone --branch yun --depth 8 https://github.com/yousong/tools "$d" \
&& cd "$d" \
&& go install ./cmd/goimports \
&& true

View File

@@ -3,7 +3,20 @@
# Check https://circleci.com/docs/2.0/language-go/ for more details
version: 2
jobs:
check:
docker:
- image: yunionio/onecloud-ci:v1.0.3
environment:
ONECLOUD_CI_BUILD: "1"
working_directory: /home/build/go/src/yunion.io/x/onecloud
steps:
- checkout
- run:
command: |
make check
build:
requires:
- check
docker:
- image: yunionio/onecloud-ci:v1.0.2
environment:
@@ -35,6 +48,8 @@ jobs:
path: _output/
test:
requires:
- check
docker:
- image: yunionio/onecloud-ci:v1.0.2
environment:
@@ -59,5 +74,10 @@ workflows:
version: 2
build_and_test:
jobs:
- build
- test
- check
- build:
requires:
- check
- test:
requires:
- check

View File

@@ -1,22 +1,29 @@
# This is how to tell Travis to use the fast container-based test
# runner instead of the slow VM-based one.
sudo: false
dist: xenial
dist: bionic
services:
- docker
addons:
apt:
sources:
- sourceline: "deb https://download.ceph.com/debian-luminous/ bionic main"
key_url: "https://download.ceph.com/keys/release.asc"
packages:
- build-essential
- libcephfs-dev
- librbd-dev
- librados-dev
language: go
go_import_path: yunion.io/x/onecloud
go:
- "1.12.x"
- 1.12.x
go_import_path: yunion.io/x/onecloud
cache:
directories:
- $HOME/.cache/go-build
# Only clone the most recent commit.
git:
depth: 1
depth: 8
script:
- make docker_build
- make -j$(nproc) ONECLOUD_CI_BUILD=1
- ls -lh _output/bin

View File

@@ -8,17 +8,17 @@ BIN_DIR := $(BUILD_DIR)/bin
BUILD_SCRIPT := $(ROOT_DIR)/build/build.sh
ifeq ($(ONECLOUD_CI_BUILD),)
GIT_COMMIT := $(shell git rev-parse --short HEAD)
GIT_BRANCH := $(shell git rev-parse --abbrev-ref HEAD)
GIT_VERSION := $(shell git describe --tags --abbrev=14 $(GIT_COMMIT)^{commit})
GIT_TREE_STATE := $(shell s=`git status --porcelain 2>/dev/null`; if [ -z "$$s" ]; then echo "clean"; else echo "dirty"; fi)
BUILD_DATE := $(shell date -u +'%Y-%m-%dT%H:%M:%SZ')
GIT_COMMIT := $(shell git rev-parse --short HEAD)
GIT_BRANCH := $(shell git name-rev --name-only HEAD)
GIT_VERSION := $(shell git describe --tags --abbrev=14 $(GIT_COMMIT)^{commit})
GIT_TREE_STATE := $(shell s=`git status --porcelain 2>/dev/null`; if [ -z "$$s" ]; then echo "clean"; else echo "dirty"; fi)
BUILD_DATE := $(shell date -u +'%Y-%m-%dT%H:%M:%SZ')
else
GIT_COMMIT:=x
GIT_BRANCH:=x
GIT_VERSION:=x
BUILD_TREE_STATE:=clean
BUILD_DATE=2099-07-01T07:11:09Z
GIT_COMMIT:=x
GIT_BRANCH:=x
GIT_VERSION:=x
BUILD_TREE_STATE:=clean
BUILD_DATE=2099-07-01T07:11:09Z
endif
LDFLAGS := "-w \
@@ -44,8 +44,8 @@ CGO_CFLAGS_ENV = $(shell go env CGO_CFLAGS)
CGO_LDFLAGS_ENV = $(shell go env CGO_LDFLAGS)
ifdef LIBQEMUIO_PATH
X_CGO_CFLAGS := ${CGO_CFLAGS_ENV} -I${LIBQEMUIO_PATH}/src -I${LIBQEMUIO_PATH}/src/include
X_CGO_LDFLAGS := ${CGO_LDFLAGS_ENV} -laio -lqemuio -lpthread -L ${LIBQEMUIO_PATH}/src
X_CGO_CFLAGS := ${CGO_CFLAGS_ENV} -I${LIBQEMUIO_PATH}/src -I${LIBQEMUIO_PATH}/src/include
X_CGO_LDFLAGS := ${CGO_LDFLAGS_ENV} -laio -lqemuio -lpthread -L ${LIBQEMUIO_PATH}/src
endif
export GO111MODULE:=on
@@ -58,6 +58,9 @@ ifeq ($(UNAME), Linux)
XARGS_FLAGS = --no-run-if-empty
endif
cmdTargets:=$(filter-out cmd/host-image,$(wildcard cmd/*))
rpmTargets:=$(foreach b,$(patsubst cmd/%,%,$(cmdTargets)),$(if $(shell [ -f "$(CURDIR)/build/$(b)/vars" ] && echo 1),rpm/$(b)))
all: build
@@ -68,12 +71,6 @@ install: prepare_dir
done
build: gendoc
$(MAKE) $(filter-out cmd/host-image, $(wildcard cmd/*))
gendoc:
@sh build/gendoc.sh
gencopyright:
@sh scripts/gencopyright.sh pkg cmd
@@ -83,18 +80,20 @@ test:
vet:
go vet ./...
cmd/%: prepare_dir fmt
cmd/%: prepare_dir
$(GO_BUILD) -o $(BIN_DIR)/$(shell basename $@) $(REPO_PREFIX)/$@
rpm/%: cmd/%
$(BUILD_SCRIPT) $*
pkg/%: prepare_dir fmt
pkg/%: prepare_dir
$(GO_INSTALL) $(REPO_PREFIX)/$@
build:
$(MAKE) $(cmdTargets)
# a hack
rpm:
$(MAKE) $(patsubst %,cmd/%,$(filter-out $@,$(MAKECMDGOALS)))
$(foreach cmd,$(filter-out $@,$(MAKECMDGOALS)),$(BUILD_SCRIPT) $(cmd);)
$(MAKE) $(rpmTargets)
rpmclean:
rm -fr $(BUILD_DIR)/rpms
@@ -110,7 +109,7 @@ output_dir:
@mkdir -p $(BUILD_DIR)
.PHONY: all build prepare_dir clean fmt rpm
.PHONY: all build prepare_dir clean rpm
clean:
@@ -118,8 +117,50 @@ clean:
fmt:
@$(if $(ONECLOUD_CI_BUILD),:,find) . -type f -name "*.go" -not -path "./_output/*" \
-not -path "./vendor/*" | xargs $(XARGS_FLAGS) gofmt -s -w
@git ls-files --exclude '*' '*.go' \
| grep -v '^vendor/' \
| xargs $(XARGS_FLAGS) gofmt -w
fmt-check: fmt
@if git status --short | grep -E '^.M .*/[^.]+.go'; then \
git diff | cat; \
echo "$@: working tree modified (possibly by gofmt)" >&2 ; \
false ; \
fi
.PHONY: fmt fmt-check
gendocgo:
@sh build/gendoc.sh
adddocgo:
@git ls-files --others '*/doc.go' | xargs $(XARGS_FLAGS) -- git add
gendocgo-check: gendocgo
@n="$$(git ls-files --others '*/doc.go' | wc -l)"; \
if test "$$n" -gt 0; then \
git ls-files --others '*/doc.go' | sed -e 's/^/ /'; \
echo "$@: untracked doc.go file(s) exist in working directory" >&2 ; \
false ; \
fi
.PHONY: gendocgo adddocgo gendocgo-check
goimports-check:
@goimports -w -local "yunion.io/x/:yunion.io/x/onecloud" pkg cmd; \
if git status --short | grep -E '^.M .*/[^.]+.go'; then \
git diff | cat; \
echo "$@: working tree modified (possibly by goimports)" >&2 ; \
echo "$@: " >&2 ; \
echo "$@: import spec should be grouped in order: std, 3rd-party, yunion.io/x, yunion.io/x/onecloud" >&2 ; \
echo "$@: see \"yun\" branch at https://github.com/yousong/tools" >&2 ; \
false ; \
fi
.PHONY: goimports-check
check: fmt-check
check: gendocgo-check
check: goimports-check
.PHONY: check
define depDeprecated
OneCloud now requires using go-mod for dependency management. dep target,
@@ -144,9 +185,6 @@ mod:
go mod tidy
go mod vendor -v
%:
@:
DOCKER_BUILD_IMAGE_VERSION?=latest

View File

@@ -134,7 +134,11 @@ fi
rpmbuild --define "_topdir $BUILDROOT" -bb $SPEC_FILE
mkdir -p $OUTPUT_DIR
cp -fr $RPM_DIR/* $OUTPUT_DIR/
find $RPM_DIR -type f | while read f; do
d="$(dirname "$f")"
d="$OUTPUT_DIR/${d#$RPM_DIR}"
mkdir -p "$d"
cp $f $d
done
rm -fr $BUILDROOT

1
build/s3cli/vars Normal file
View File

@@ -0,0 +1 @@
DESCRIPTION="S3 Cli Command Line Utility"

1
build/s3gateway/vars Normal file
View File

@@ -0,0 +1 @@
DESCRIPTION="Yunion Cloud S3 Gateway Service"

View File

@@ -49,14 +49,19 @@ type BaseOptions struct {
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]"`
OsPassword string `default:"$OS_PASSWORD" help:"Password, defaults to env[OS_PASSWORD]"`
OsUsername string `default:"$OS_USERNAME" help:"Username, defaults to env[OS_USERNAME]"`
OsPassword string `default:"$OS_PASSWORD" help:"Password, defaults to env[OS_PASSWORD]"`
// OsProjectId string `default:"$OS_PROJECT_ID" help:"Proejct ID, defaults to env[OS_PROJECT_ID]"`
OsProjectName string `default:"$OS_PROJECT_NAME" help:"Project name, defaults to env[OS_PROJECT_NAME]"`
OsProjectDomain string `default:"$OS_PROJECT_DOMAIN" help:"Domain name of project, defaults to env[OS_PROJECT_DOMAIN]"`
OsDomainName string `default:"$OS_DOMAIN_NAME" help:"Domain name, defaults to env[OS_DOMAIN_NAME]"`
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]"`
OsAuthURL string `default:"$OS_AUTH_URL" help:"Defaults to env[OS_AUTH_URL]"`
OsDomainName string `default:"$OS_DOMAIN_NAME" help:"Domain name, defaults to env[OS_DOMAIN_NAME]"`
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]"`
OsZoneName string `default:"$OS_ZONE_NAME" help:"Defaults to env[OS_ZONE_NAME]"`
OsEndpointType string `default:"$OS_ENDPOINT_TYPE|internalURL" help:"Defaults to env[OS_ENDPOINT_TYPE] or internalURL" choices:"publicURL|internalURL|adminURL"`
@@ -124,20 +129,18 @@ 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 {
return nil, fmt.Errorf("Missing OS_USERNAME")
if len(options.OsUsername) == 0 && len(options.OsAccessKey) == 0 {
return nil, fmt.Errorf("Missing OS_USERNAME or OS_ACCESS_KEY")
}
if len(options.OsPassword) == 0 {
if len(options.OsUsername) > 0 && len(options.OsPassword) == 0 {
return nil, fmt.Errorf("Missing OS_PASSWORD")
}
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")
}
// if len(options.OsProjectId) == 0 && len(options.OsProjectName) == 0 {
// showErrorAndExit(fmt.Errorf("Missing OS_PROEJCT_ID or OS_PROJECT_NAME"))
// if len(options.OsProjectName) == 0 {
// return nil, fmt.Errorf("Missing OS_PROJECT_NAME")
// }
logLevel := "info"
if options.Debug {
@@ -178,12 +181,19 @@ func newClientSession(options *BaseOptions) (*mcclient.ClientSession, error) {
}
if cacheToken == nil {
token, err := client.AuthenticateWithSource(options.OsUsername,
options.OsPassword,
options.OsDomainName,
options.OsProjectName,
options.OsProjectDomain,
mcclient.AuthSourceCli)
var token mcclient.TokenCredential
var err error
if len(options.OsAccessKey) > 0 {
token, err = client.AuthenticateByAccessKey(options.OsAccessKey,
options.OsSecretKey, mcclient.AuthSourceCli)
} else {
token, err = client.AuthenticateWithSource(options.OsUsername,
options.OsPassword,
options.OsDomainName,
options.OsProjectName,
options.OsProjectDomain,
mcclient.AuthSourceCli)
}
if err != nil {
return nil, err
}

View File

@@ -36,6 +36,11 @@ type BaseActionListOptions struct {
Admin bool `help:"admin mode"`
Succ bool `help:"Show success action log only"`
Fail bool `help:"Show failed action log only"`
User []string `help:"filter by operator user"`
Project []string `help:"filter by owner project"`
PagingMarker string `help:"marker for pagination"`
}
type ActionListOptions struct {
@@ -60,9 +65,18 @@ func doActionList(s *mcclient.ClientSession, args *ActionListOptions) error {
if len(args.Search) > 0 {
params.Add(jsonutils.NewString(args.Search), "search")
}
if len(args.User) > 0 {
params.Add(jsonutils.NewStringArray(args.User), "user")
}
if len(args.Project) > 0 {
params.Add(jsonutils.NewStringArray(args.Project), "project")
}
if len(args.Scope) > 0 {
params.Add(jsonutils.NewString(args.Scope), "scope")
}
if len(args.PagingMarker) > 0 {
params.Add(jsonutils.NewString(args.PagingMarker), "paging_marker")
}
if len(args.Since) > 0 {
params.Add(jsonutils.NewString(args.Since), "since")
}

View File

@@ -213,15 +213,12 @@ func init() {
})
type BucketSetAclOptions struct {
ID string `help:"ID or name of bucket" json:"-"`
ACL string `help:"ACL to set" choices:"default|private|public-read|public-read-write"`
Key string `help:"Optional object key"`
ID string `help:"ID or name of bucket" json:"-"`
ACL string `help:"ACL to set" choices:"default|private|public-read|public-read-write" json:"acl"`
Key []string `help:"Optional object key" json:"key"`
}
R(&BucketSetAclOptions{}, "bucket-set-acl", "Set ACL of bucket or object", func(s *mcclient.ClientSession, args *BucketSetAclOptions) error {
params, err := options.StructToParams(args)
if err != nil {
return err
}
params := jsonutils.Marshal(args)
result, err := modules.Buckets.PerformAction(s, args.ID, "acl", params)
if err != nil {
return err
@@ -264,4 +261,32 @@ func init() {
return nil
})
type BucketLimitOptions struct {
ID string `help:"ID or name of bucket" json:"-"`
SizeBytes int64 `help:"size limit in bytes"`
ObjectCount int64 `help:"object count limit"`
}
R(&BucketLimitOptions{}, "bucket-limit", "Set limit of bucket", func(s *mcclient.ClientSession, args *BucketLimitOptions) error {
limit := jsonutils.Marshal(args)
params := jsonutils.NewDict()
params.Set("limit", limit)
result, err := modules.Buckets.PerformAction(s, args.ID, "limit", params)
if err != nil {
return err
}
printObject(result)
return nil
})
type BucketAccessInfoOptions struct {
ID string `help:"ID or name of bucket" json:"-"`
}
R(&BucketAccessInfoOptions{}, "bucket-access-info", "Show backend access info of a bucket", func(s *mcclient.ClientSession, args *BucketAccessInfoOptions) error {
result, err := modules.Buckets.GetSpecific(s, args.ID, "access-info", nil)
if err != nil {
return err
}
printObject(result)
return nil
})
}

View File

@@ -189,6 +189,28 @@ func init() {
return nil
})
R(&options.SS3CloudAccountCreateOptions{}, "cloud-account-create-ceph", "Create a ceph object storage account", func(s *mcclient.ClientSession, args *options.SS3CloudAccountCreateOptions) error {
params := jsonutils.Marshal(args)
params.(*jsonutils.JSONDict).Add(jsonutils.NewString("Ceph"), "provider")
result, err := modules.Cloudaccounts.Create(s, params)
if err != nil {
return err
}
printObject(result)
return nil
})
R(&options.SS3CloudAccountCreateOptions{}, "cloud-account-create-xsky", "Create a xsky object storage account", func(s *mcclient.ClientSession, args *options.SS3CloudAccountCreateOptions) error {
params := jsonutils.Marshal(args)
params.(*jsonutils.JSONDict).Add(jsonutils.NewString("Xsky"), "provider")
result, err := modules.Cloudaccounts.Create(s, params)
if err != nil {
return err
}
printObject(result)
return nil
})
type CloudaccountUpdateOptions struct {
ID string `help:"ID or Name of cloud account"`
Name string `help:"New name to update"`

View File

@@ -16,6 +16,7 @@ package shell
import (
"fmt"
"yunion.io/x/jsonutils"
"yunion.io/x/onecloud/pkg/mcclient"

View File

@@ -16,6 +16,7 @@ package shell
import (
"fmt"
"time"
"yunion.io/x/jsonutils"
@@ -25,7 +26,8 @@ import (
func init() {
type CredentialListOptions struct {
Type string `help:"credential type" choices:"totp|recovery|ec2"`
Scope string `help:"scope" choices:"project|domain|system"`
Type string `help:"credential type" choices:"totp|recovery|aksk"`
User string `help:"filter by user"`
UserDomain string `help:"the domain of user"`
}
@@ -34,22 +36,14 @@ func init() {
if len(args.Type) > 0 {
query.Add(jsonutils.NewString(args.Type), "type")
}
var err error
if len(args.Scope) > 0 {
query.Add(jsonutils.NewString(args.Scope), "scope")
}
if len(args.User) > 0 {
domainId := "default"
if len(args.UserDomain) > 0 {
domainId, err = modules.Domains.GetId(s, args.UserDomain, nil)
if err != nil {
return err
}
query.Add(jsonutils.NewString(args.UserDomain), "domain_id")
}
userQuery := jsonutils.NewDict()
userQuery.Add(jsonutils.NewString(domainId), "domain_id")
userId, err := modules.UsersV3.GetId(s, args.User, userQuery)
if err != nil {
return err
}
query.Add(jsonutils.NewString(userId), "user_id")
query.Add(jsonutils.NewString(args.User), "user_id")
}
results, err := modules.Credentials.List(s, query)
if err != nil {
@@ -159,4 +153,126 @@ func init() {
fmt.Println("success")
return nil
})
type CredentialAkSkOptions struct {
User string `help:"User"`
UserDomain string `help:"domain of user"`
Project string `help:"Project"`
ProjectDomain string `help:"domain of user"`
}
R(&CredentialAkSkOptions{}, "credential-create-aksk", "Create AccessKey/Secret credential", func(s *mcclient.ClientSession, args *CredentialAkSkOptions) error {
var uid string
var pid string
var err error
if len(args.User) > 0 {
uid, err = modules.UsersV3.FetchId(s, args.User, args.UserDomain)
if err != nil {
return err
}
}
if len(args.Project) > 0 {
pid, err = modules.Projects.FetchId(s, args.Project, args.ProjectDomain)
if err != nil {
return err
}
}
secret, err := modules.Credentials.CreateAccessKeySecret(s, uid, pid, time.Time{})
if err != nil {
return err
}
printObject(jsonutils.Marshal(&secret))
return nil
})
R(&CredentialAkSkOptions{}, "credential-get-aksk", "Get AccessKey/Secret credential for user and project", func(s *mcclient.ClientSession, args *CredentialAkSkOptions) error {
var uid string
var err error
if len(args.User) > 0 {
uid, err = modules.UsersV3.FetchId(s, args.User, args.UserDomain)
if err != nil {
return err
}
}
var pid string
if len(args.Project) > 0 {
pid, err = modules.Projects.FetchId(s, args.Project, args.ProjectDomain)
if err != nil {
return err
}
}
secrets, err := modules.Credentials.GetAccessKeySecrets(s, uid, pid)
if err != nil {
return err
}
result := modules.ListResult{}
result.Data = make([]jsonutils.JSONObject, len(secrets))
for i := range secrets {
result.Data[i] = jsonutils.Marshal(secrets[i])
result.Data[i].(*jsonutils.JSONDict).Add(jsonutils.NewString(secrets[i].KeyId), "key_id")
result.Data[i].(*jsonutils.JSONDict).Add(jsonutils.NewString(secrets[i].ProjectId), "project_id")
result.Data[i].(*jsonutils.JSONDict).Add(jsonutils.NewTimeString(secrets[i].TimeStamp), "time_stamp")
}
printList(&result, nil)
return nil
})
R(&CredentialAkSkOptions{}, "credential-remove-aksk", "Remove AccessKey/Secret credential for user and project", func(s *mcclient.ClientSession, args *CredentialAkSkOptions) error {
uid, err := modules.UsersV3.FetchId(s, args.User, args.UserDomain)
if err != nil {
return err
}
var pid string
if len(args.Project) > 0 {
pid, err = modules.Projects.FetchId(s, args.Project, args.ProjectDomain)
if err != nil {
return err
}
}
err = modules.Credentials.RemoveAccessKeySecrets(s, uid, pid)
if err != nil {
return err
}
fmt.Println("success")
return nil
})
type CredentialDeleteOptions struct {
ID string `help:"ID of credentail"`
}
R(&CredentialDeleteOptions{}, "credential-delete", "Delete credential", func(s *mcclient.ClientSession, args *CredentialDeleteOptions) error {
result, err := modules.Credentials.Delete(s, args.ID, nil)
if err != nil {
return err
}
printObject(result)
return nil
})
type CredentialUpdateOptions struct {
ID string `help:"ID of credentail"`
Enable bool `help:"Enable credential"`
Disable bool `help:"Disable credential"`
Name string `help:"new name of credential"`
Desc string `help:"new description of credential"`
}
R(&CredentialUpdateOptions{}, "credential-update", "Enable/disable credential", func(s *mcclient.ClientSession, args *CredentialUpdateOptions) error {
params := jsonutils.NewDict()
if args.Enable {
params.Add(jsonutils.JSONTrue, "enabled")
} else if args.Disable {
params.Add(jsonutils.JSONFalse, "enabled")
}
if args.Name != "" {
params.Add(jsonutils.NewString(args.Name), "name")
}
if args.Desc != "" {
params.Add(jsonutils.NewString(args.Desc), "description")
}
result, err := modules.Credentials.Update(s, args.ID, params)
if err != nil {
return err
}
printObject(result)
return nil
})
}

View File

@@ -34,6 +34,8 @@ func init() {
CloudType string `help:"Public cloud or private cloud" choices:"Public|Private"`
BillingType string `help:"billing type" choices:"postpaid|prepaid"`
SnapshotpolicyId string `help:"snapshotpolicy id"`
}
R(&DiskListOptions{}, "disk-list", "List virtual disks", func(s *mcclient.ClientSession, opts *DiskListOptions) error {
params, err := options.ListStructToParams(opts)
@@ -259,33 +261,6 @@ func init() {
printObject(disk)
return nil
})
type DiskApplySnapshotPolicy struct {
ID string `help:"ID or name of disk" json:"-"`
Snapshotpolicy string `help:"ID or name of snapshot policy"`
}
R(&DiskApplySnapshotPolicy{}, "disk-apply-snapshot-policy", "Set disk snapshot policy", func(s *mcclient.ClientSession, args *DiskApplySnapshotPolicy) error {
params, err := options.StructToParams(args)
if err != nil {
return err
}
disk, err := modules.Disks.PerformAction(s, args.ID, "apply-snapshot-policy", params)
if err != nil {
return err
}
printObject(disk)
return nil
})
type DiskCancelSnapshotPolicy struct {
ID string `help:"ID or name of disk"`
}
R(&DiskCancelSnapshotPolicy{}, "disk-cancel-snapshot-policy", "Cancel disk snapshot policy", func(s *mcclient.ClientSession, args *DiskCancelSnapshotPolicy) error {
disk, err := modules.Disks.PerformAction(s, args.ID, "cancel-snapshot-policy", nil)
if err != nil {
return err
}
printObject(disk)
return nil
})
type DiskChangeOwnerOptions struct {
ID string `help:"Disk to change owner" json:"-"`

View File

@@ -32,6 +32,11 @@ type BaseEventListOptions struct {
Descending bool `help:"Descending order"`
OrderBy string `help:"order by specific field"`
Action []string `help:"Log action"`
User []string `help:"filter by operator user"`
Project []string `help:"filter by owner project"`
PagingMarker string `help:"marker for pagination"`
}
type EventListOptions struct {
@@ -92,9 +97,18 @@ func doEventList(man modules.ResourceManager, s *mcclient.ClientSession, args *E
if len(args.Action) > 0 {
params.Add(jsonutils.NewStringArray(args.Action), "action")
}
if len(args.User) > 0 {
params.Add(jsonutils.NewStringArray(args.User), "user")
}
if len(args.Project) > 0 {
params.Add(jsonutils.NewStringArray(args.Project), "project")
}
if len(args.Scope) > 0 {
params.Add(jsonutils.NewString(args.Scope), "scope")
}
if len(args.PagingMarker) > 0 {
params.Add(jsonutils.NewString(args.PagingMarker), "paging_marker")
}
logs, err := man.List(s, params)
if err != nil {
return err

View File

@@ -57,10 +57,10 @@ func init() {
PROJECT string `help:"Local project ID or Name"`
}
R(&ExternalProjectUpdateOptions{}, "external-project-update", "Update external project point to local project", func(s *mcclient.ClientSession, args *ExternalProjectUpdateOptions) error {
R(&ExternalProjectUpdateOptions{}, "external-project-change-project", "Change external project point to local project", func(s *mcclient.ClientSession, args *ExternalProjectUpdateOptions) error {
params := jsonutils.NewDict()
params.Add(jsonutils.NewString(args.PROJECT), "project")
result, err := modules.ExternalProjects.Update(s, args.ID, params)
result, err := modules.ExternalProjects.PerformAction(s, args.ID, "change-project", params)
if err != nil {
return err
}

View File

@@ -17,6 +17,7 @@ package shell
import (
"yunion.io/x/jsonutils"
api "yunion.io/x/onecloud/pkg/apis/identity"
"yunion.io/x/onecloud/pkg/mcclient"
"yunion.io/x/onecloud/pkg/mcclient/modules"
"yunion.io/x/onecloud/pkg/mcclient/options"
@@ -133,4 +134,61 @@ func init() {
return nil
})
R(&GroupShowOptions{}, "group-project-list", "List projects of group", func(s *mcclient.ClientSession, args *GroupShowOptions) error {
query := jsonutils.NewDict()
if len(args.Domain) > 0 {
domainId, err := modules.Domains.GetId(s, args.Domain, nil)
if err != nil {
return err
}
query.Add(jsonutils.NewString(domainId), "domain_id")
}
uid, err := modules.Groups.GetId(s, args.ID, query)
if err != nil {
return err
}
projects, e := modules.Groups.GetProjects(s, uid)
if e != nil {
return e
}
printList(projects, modules.Projects.GetColumns(s))
return nil
})
type GroupJoinProjectOptions struct {
Group string `help:"Group Id or name" optional:"false" positional:"true"`
Project []string `help:"Projects to join" nargs:"+"`
Role []string `help:"User join project with roles" nargs:"+"`
}
R(&GroupJoinProjectOptions{}, "group-join-project", "Group join projects with roles", func(s *mcclient.ClientSession, args *GroupJoinProjectOptions) error {
input := api.SJoinProjectsInput{}
input.Projects = args.Project
input.Roles = args.Role
result, err := modules.Groups.PerformAction(s, args.Group, "join", jsonutils.Marshal(input))
if err != nil {
return err
}
printObject(result)
return nil
})
type GroupLeaveProjectsOptions struct {
Group string `help:"group id or name" optional:"false" positional:"true"`
Project string `help:"project id or name" optional:"false" positional:"true"`
Role []string `help:"roles to remove" nargs:"+"`
}
R(&GroupLeaveProjectsOptions{}, "group-leave-project", "Leave a group from projects", func(s *mcclient.ClientSession, args *GroupLeaveProjectsOptions) error {
input := api.SLeaveProjectsInput{}
input.ProjectRoles = make([]api.SProjectRole, len(args.Role))
for i := range args.Role {
input.ProjectRoles[i].Project = args.Project
input.ProjectRoles[i].Role = args.Role[i]
}
result, err := modules.Groups.PerformAction(s, args.Group, "leave", jsonutils.Marshal(input))
if err != nil {
return err
}
printObject(result)
return nil
})
}

View File

@@ -127,6 +127,12 @@ func init() {
return nil
})
R(&HostOpsOptions{}, "host-sync-config", "Synchronize config of a host", func(s *mcclient.ClientSession, args *HostOpsOptions) error {
results := modules.Hosts.BatchPerformAction(s, args.ID, "sync-config", nil)
printBatchResults(results, modules.Hosts.GetColumns(s))
return nil
})
R(&HostOpsOptions{}, "host-prepare", "Prepare a host for installation", func(s *mcclient.ClientSession, args *HostOpsOptions) error {
results := modules.Hosts.BatchPerformAction(s, args.ID, "prepare", nil)
printBatchResults(results, modules.Hosts.GetColumns(s))
@@ -186,6 +192,10 @@ func init() {
CpuReserved int64 `help:"CPU reserved"`
HostType string `help:"Change host type, CAUTION!!!!" choices:"hypervisor|kubelet|esxi|baremetal"`
AccessIp string `help:"Change access ip, CAUTION!!!!"`
IpmiUsername string `help:"IPMI user"`
IpmiPassword string `help:"IPMI password"`
IpmiIpAddr string `help:"IPMI ip_addr"`
}
R(&HostUpdateOptions{}, "host-update", "Update information of a host", func(s *mcclient.ClientSession, args *HostUpdateOptions) error {
params := jsonutils.NewDict()
@@ -213,6 +223,15 @@ func init() {
if len(args.AccessIp) > 0 {
params.Add(jsonutils.NewString(args.AccessIp), "access_ip")
}
if len(args.IpmiUsername) > 0 {
params.Add(jsonutils.NewString(args.IpmiUsername), "ipmi_username")
}
if len(args.IpmiPassword) > 0 {
params.Add(jsonutils.NewString(args.IpmiPassword), "ipmi_password")
}
if len(args.IpmiIpAddr) > 0 {
params.Add(jsonutils.NewString(args.IpmiIpAddr), "ipmi_ip_addr")
}
if params.Size() == 0 {
return fmt.Errorf("Not data to update")
}
@@ -335,6 +354,7 @@ func init() {
ID string `help:"ID or Name of host"`
WIRE string `help:"ID or Name of wire to attach"`
MAC string `help:"Mac address of NIC"`
INDEX int64 `help:"nic index"`
Type string `help:"Nic type" choices:"admin|ipmi"`
IpAddr string `help:"IP address"`
}
@@ -343,6 +363,7 @@ func init() {
params.Add(jsonutils.NewString(args.WIRE), "wire")
params.Add(jsonutils.NewString(args.MAC), "mac")
params.Add(jsonutils.JSONTrue, "link_up")
params.Add(jsonutils.NewInt(args.INDEX), "index")
if len(args.Type) > 0 {
params.Add(jsonutils.NewString(args.Type), "nic_type")
}

View File

@@ -70,15 +70,15 @@ func init() {
type HostWireUpdateOptions struct {
HOST string `help:"ID or Name of Host"`
WIRE string `help:"ID or Name of Wire"`
Mac string `help:"Mac address"`
MacAddr string `help:"Mac address"`
Interface string `help:"Interface"`
Bridge string `help:"Bridge"`
IsMaster string `help:"Master interface" choices:"true|false"`
}
R(&HostWireUpdateOptions{}, "host-wire-update", "Update host wire information", func(s *mcclient.ClientSession, args *HostWireUpdateOptions) error {
params := jsonutils.NewDict()
if len(args.Mac) > 0 {
params.Add(jsonutils.NewString(args.Mac), "mac_addr")
if len(args.MacAddr) > 0 {
params.Add(jsonutils.NewString(args.MacAddr), "mac_addr")
}
if len(args.Interface) > 0 {
params.Add(jsonutils.NewString(args.Interface), "interface")

View File

@@ -17,12 +17,12 @@ package shell
import (
"fmt"
"yunion.io/x/jsonutils"
api "yunion.io/x/onecloud/pkg/apis/identity"
"yunion.io/x/onecloud/pkg/mcclient"
"yunion.io/x/onecloud/pkg/mcclient/modules"
"yunion.io/x/onecloud/pkg/mcclient/options"
"yunion.io/x/jsonutils"
)
func init() {
@@ -114,17 +114,17 @@ func init() {
return nil
})
type IdentityProviderCreateOptions struct {
type IdentityProviderCreateLDAPOptions struct {
NAME string `help:"name of identity provider" json:"-"`
AutoCreateProject bool `help:"automatically create a default project when importing domain" json:"-"`
NoAutoCreateProject bool `help:"do not create default project when importing domain" json:"-"`
TargetDomain string `help:"target domain without creating new domain"`
TargetDomain string `help:"target domain without creating new domain" json:"-"`
api.SLDAPIdpConfigOptions
}
R(&IdentityProviderCreateOptions{}, "idp-create-ldap", "Create an identity provider with LDAP driver", func(s *mcclient.ClientSession, args *IdentityProviderCreateOptions) error {
R(&IdentityProviderCreateLDAPOptions{}, "idp-create-ldap", "Create an identity provider with LDAP driver", func(s *mcclient.ClientSession, args *IdentityProviderCreateLDAPOptions) error {
params := jsonutils.NewDict()
params.Add(jsonutils.NewString(args.NAME), "name")
@@ -170,7 +170,7 @@ func init() {
AutoCreateProject bool `help:"automatically create a default project when importing domain" json:"-"`
NoAutoCreateProject bool `help:"do not create default project when importing domain" json:"-"`
TargetDomain string `help:"target domain without creating new domain"`
TargetDomain string `help:"target domain without creating new domain" json:"-"`
api.SLDAPIdpConfigSingleDomainOptions
}
@@ -245,4 +245,53 @@ func init() {
return nil
})
type IdentityProviderCreateCASOptions struct {
NAME string `help:"name of identity provider" json:"-"`
AutoCreateProject bool `help:"automatically create a default project when importing domain" json:"-"`
NoAutoCreateProject bool `help:"do not create default project when importing domain" json:"-"`
TargetDomain string `help:"target domain without creating new domain" json:"-"`
api.SCASIdpConfigOptions
}
R(&IdentityProviderCreateCASOptions{}, "idp-create-cas", "Create an identity provider with CAS driver", func(s *mcclient.ClientSession, args *IdentityProviderCreateCASOptions) error {
params := jsonutils.NewDict()
params.Add(jsonutils.NewString(args.NAME), "name")
if len(args.TargetDomain) > 0 {
params.Add(jsonutils.NewString(args.TargetDomain), "target_domain")
}
if args.AutoCreateProject {
params.Add(jsonutils.JSONTrue, "auto_create_project")
} else if args.NoAutoCreateProject {
params.Add(jsonutils.JSONFalse, "auto_create_project")
}
params.Add(jsonutils.NewString("cas"), "driver")
params.Add(jsonutils.Marshal(args), "config", "cas")
idp, err := modules.IdentityProviders.Create(s, params)
if err != nil {
return err
}
printObject(idp)
return nil
})
type IdentityProviderConfigCASOptions struct {
ID string `help:"ID of idp to config" json:"-"`
api.SCASIdpConfigOptions
}
R(&IdentityProviderConfigCASOptions{}, "idp-config-cas", "Config an Identity provider with CAS driver", func(s *mcclient.ClientSession, args *IdentityProviderConfigCASOptions) error {
config := jsonutils.NewDict()
config.Add(jsonutils.Marshal(args), "config", "cas")
nconf, err := modules.IdentityProviders.PerformAction(s, args.ID, "config", config)
if err != nil {
return err
}
fmt.Println(nconf.PrettyString())
return nil
})
}

View File

@@ -16,9 +16,6 @@ package k8s
import (
"fmt"
"io/ioutil"
"os"
"os/exec"
"yunion.io/x/jsonutils"
@@ -27,63 +24,21 @@ import (
o "yunion.io/x/onecloud/pkg/mcclient/options/k8s"
)
func initCluster() {
cmdN := func(suffix string) string {
return kubeResourceCmdN("cluster", suffix)
func initKubeCluster() {
cmdN := func(action string) string {
return fmt.Sprintf("kubecluster-%s", action)
}
R(&o.ClusterListOptions{}, cmdN("list"), "List k8s infra clusters", func(s *mcclient.ClientSession, args *o.ClusterListOptions) error {
result, err := k8s.Clusters.List(s, args.Params())
R(&o.ClusterListOptions{}, cmdN("list"), "List k8s clusters", func(s *mcclient.ClientSession, args *o.ClusterListOptions) error {
result, err := k8s.KubeClusters.List(s, args.Params())
if err != nil {
return err
}
printList(result, k8s.Clusters.GetColumns(s))
return nil
})
R(&o.ClusterCreateOptions{}, cmdN("create"), "Create k8s cluster", func(s *mcclient.ClientSession, args *o.ClusterCreateOptions) error {
cluster, err := k8s.Clusters.Create(s, args.Params())
if err != nil {
return err
}
printObject(cluster)
return nil
})
R(&o.ClusterImportOptions{}, cmdN("import"), "Import exists YKE deployed kubernetes cluster", func(s *mcclient.ClientSession, args *o.ClusterImportOptions) error {
params, err := args.Params()
if err != nil {
return err
}
cluster, err := k8s.Clusters.PerformAction(s, args.NAME, "import", params)
if err != nil {
return err
}
printObject(cluster)
return nil
})
R(&o.ClusterUpdateOptions{}, cmdN("update"), "Update k8s cluster", func(s *mcclient.ClientSession, args *o.ClusterUpdateOptions) error {
cluster, err := k8s.Clusters.Update(s, args.NAME, args.Params())
if err != nil {
return err
}
printObject(cluster)
return nil
})
R(&o.ClusterDeployOptions{}, cmdN("deploy"), "Start deploy a cluster", func(s *mcclient.ClientSession, args *o.ClusterDeployOptions) error {
ret, err := k8s.Clusters.PerformAction(s, args.ID, "deploy", args.Params())
if err != nil {
return err
}
printObject(ret)
printList(result, k8s.KubeClusters.GetColumns(s))
return nil
})
R(&o.IdentOptions{}, cmdN("show"), "Show details of a cluster", func(s *mcclient.ClientSession, args *o.IdentOptions) error {
result, err := k8s.Clusters.Get(s, args.ID, nil)
result, err := k8s.KubeClusters.Get(s, args.ID, nil)
if err != nil {
return err
}
@@ -91,14 +46,75 @@ func initCluster() {
return nil
})
R(&o.ClusterDeleteOptions{}, cmdN("delete"), "Delete cluster", func(s *mcclient.ClientSession, args *o.ClusterDeleteOptions) error {
ret := k8s.Clusters.BatchDeleteWithParam(s, args.ID, nil, nil)
printBatchResults(ret, k8s.Clusters.GetColumns(s))
R(&o.KubeClusterCreateOptions{}, cmdN("create"), "Create k8s cluster", func(s *mcclient.ClientSession, args *o.KubeClusterCreateOptions) error {
params, err := args.Params()
if err != nil {
return err
}
cluster, err := k8s.KubeClusters.Create(s, params)
if err != nil {
return err
}
printObject(cluster)
return nil
})
R(&o.ClusterKubeconfigOptions{}, cmdN("kubeconfig"), "Generate kubeconfig of a cluster", func(s *mcclient.ClientSession, args *o.ClusterKubeconfigOptions) error {
ret, err := k8s.Clusters.PerformAction(s, args.ID, "generate-kubeconfig", args.Params())
R(&o.KubeClusterImportOptions{}, cmdN("import"), "Import k8s cluster", func(s *mcclient.ClientSession, args *o.KubeClusterImportOptions) error {
params, err := args.Params()
if err != nil {
return err
}
cluster, err := k8s.KubeClusters.Create(s, params)
if err != nil {
return err
}
printObject(cluster)
return nil
})
R(&o.ClusterDeleteOptions{}, cmdN("delete"), "Delete cluster", func(s *mcclient.ClientSession, args *o.ClusterDeleteOptions) error {
ret := k8s.KubeClusters.BatchDeleteWithParam(s, args.ID, nil, nil)
printBatchResults(ret, k8s.KubeClusters.GetColumns(s))
return nil
})
R(&o.KubeClusterAddMachinesOptions{}, cmdN("add-machines"), "Add machines to cluster", func(s *mcclient.ClientSession, args *o.KubeClusterAddMachinesOptions) error {
params, err := args.Params()
if err != nil {
return err
}
ret, err := k8s.KubeClusters.PerformAction(s, args.ID, "add-machines", params)
if err != nil {
return err
}
printObject(ret)
return nil
})
R(&o.KubeClusterDeleteMachinesOptions{}, cmdN("delete-machines"), "Delete machines in cluster", func(s *mcclient.ClientSession, args *o.KubeClusterDeleteMachinesOptions) error {
params, err := args.Params()
if err != nil {
return err
}
ret, err := k8s.KubeClusters.PerformAction(s, args.ID, "delete-machines", params)
if err != nil {
return err
}
printObject(ret)
return nil
})
R(&o.IdentOptions{}, cmdN("terminate"), "Terminate cluster", func(s *mcclient.ClientSession, args *o.IdentOptions) error {
ret, err := k8s.KubeClusters.PerformAction(s, args.ID, "terminate", nil)
if err != nil {
return err
}
printObject(ret)
return nil
})
R(&o.IdentOptions{}, cmdN("kubeconfig"), "Generate kubeconfig of a cluster", func(s *mcclient.ClientSession, args *o.IdentOptions) error {
ret, err := k8s.KubeClusters.GetSpecific(s, args.ID, "kubeconfig", nil)
if err != nil {
return err
}
@@ -110,12 +126,12 @@ func initCluster() {
return nil
})
R(&o.IdentOptions{}, cmdN("engineconfig"), "Get kubernetes engine config of a cluster", func(s *mcclient.ClientSession, args *o.IdentOptions) error {
ret, err := k8s.Clusters.GetSpecific(s, args.ID, "engine-config", nil)
R(&o.IdentOptions{}, cmdN("addons"), "Get addon manifest of a cluster", func(s *mcclient.ClientSession, args *o.IdentOptions) error {
ret, err := k8s.KubeClusters.GetSpecific(s, args.ID, "addons", nil)
if err != nil {
return err
}
conf, err := ret.GetString("config")
conf, err := ret.GetString("addons")
if err != nil {
return err
}
@@ -123,94 +139,39 @@ func initCluster() {
return nil
})
R(&o.IdentOptions{}, cmdN("webhookauthurl"), "Get cluster kubernetes api server webhook auth url", func(s *mcclient.ClientSession, args *o.IdentOptions) error {
ret, err := k8s.Clusters.GetSpecific(s, args.ID, "webhook-auth-url", nil)
if err != nil {
return err
}
url, err := ret.GetString("url")
if err != nil {
return err
}
fmt.Println(url)
return nil
})
R(&o.ClusterAddNodesOptions{}, cmdN("addnodes"), "Add nodes to cluster", func(s *mcclient.ClientSession, args *o.ClusterAddNodesOptions) error {
params, err := args.Params()
if err != nil {
return err
}
ret, err := k8s.Clusters.PerformAction(s, args.ID, "add-nodes", params)
if err != nil {
return err
}
printObject(ret)
return nil
})
R(&o.ClusterDeleteNodesOptions{}, cmdN("delete-nodes"), "Delete nodes in cluster", func(s *mcclient.ClientSession, args *o.ClusterDeleteNodesOptions) error {
params, err := args.Params()
if err != nil {
return err
}
ret, err := k8s.Clusters.PerformAction(s, args.ID, "delete-nodes", params)
if err != nil {
return err
}
printObject(ret)
return nil
})
R(&o.IdentOptions{}, cmdN("engineconfig-edit"), "Edit and update kubernetes engine config of a cluster", func(s *mcclient.ClientSession, args *o.IdentOptions) error {
ret, err := k8s.Clusters.GetSpecific(s, args.ID, "engine-config", nil)
if err != nil {
return err
}
conf, err := ret.GetString("config")
if err != nil {
return err
}
tempfile, err := ioutil.TempFile("", fmt.Sprintf("%s-engineconfig", args.ID))
if err != nil {
return err
}
defer os.Remove(tempfile.Name())
if _, err := tempfile.Write([]byte(conf)); err != nil {
return err
}
if err := tempfile.Close(); err != nil {
return err
}
cmd := exec.Command("vim", tempfile.Name())
cmd.Stdin = os.Stdin
cmd.Stdout = os.Stdout
if err := cmd.Run(); err != nil {
return err
}
R(&o.ClusterK8sVersions{}, cmdN("k8s-versions"), "Get kubernetes deployable versions", func(s *mcclient.ClientSession, args *o.ClusterK8sVersions) error {
params := jsonutils.NewDict()
configBytes, err := ioutil.ReadFile(tempfile.Name())
params.Add(jsonutils.NewString(args.PROVIDER), "provider")
ret, err := k8s.KubeClusters.Get(s, "k8s-versions", params)
if err != nil {
return err
}
params.Add(jsonutils.NewString(string(configBytes)), "config")
result, err := k8s.Clusters.PerformAction(s, args.ID, "update-engine-config", params)
if err != nil {
return err
}
conf, err = result.GetString("config")
if err != nil {
return err
}
fmt.Println(conf)
fmt.Println(ret.String())
return nil
})
R(&o.IdentOptions{}, cmdN("sync-config"), "Sync kubernetes cluster by engineconfig", func(s *mcclient.ClientSession, args *o.IdentOptions) error {
ret, err := k8s.Clusters.PerformAction(s, args.ID, "sync-config", nil)
R(&o.ClusterK8sVersions{}, cmdN("usable-instances"), "Get deploy usable instance", func(s *mcclient.ClientSession, args *o.ClusterK8sVersions) error {
params := jsonutils.NewDict()
params.Add(jsonutils.NewString(args.PROVIDER), "provider")
ret, err := k8s.KubeClusters.Get(s, "usable-instances", params)
if err != nil {
return err
}
fmt.Println(ret.String())
return nil
})
R(&o.ClusterCheckOptions{}, cmdN("check-system-ready"), "Check system cluster status", func(s *mcclient.ClientSession, args *o.ClusterCheckOptions) error {
ret, err := k8s.KubeClusters.PerformClassAction(s, "check-system-ready", nil)
if err != nil {
return err
}
fmt.Println(ret.String())
return nil
})
R(&o.IdentOptions{}, cmdN("apply-addons"), "Apply base requirements addons", func(s *mcclient.ClientSession, args *o.IdentOptions) error {
ret, err := k8s.KubeClusters.PerformAction(s, args.ID, "apply-addons", nil)
if err != nil {
return err
}
@@ -218,12 +179,26 @@ func initCluster() {
return nil
})
R(&o.ClusterRestartAgentsOptions{}, cmdN("restart-agent"), "Restart node agents in cluster", func(s *mcclient.ClientSession, args *o.ClusterRestartAgentsOptions) error {
params, err := args.Params()
R(&o.IdentOptions{}, cmdN("syncstatus"), "Sync cluster status", func(s *mcclient.ClientSession, args *o.IdentOptions) error {
ret, err := k8s.KubeClusters.PerformAction(s, args.ID, "syncstatus", nil)
if err != nil {
return err
}
ret, err := k8s.Clusters.PerformAction(s, args.ID, "restart-agent", params)
printObject(ret)
return nil
})
R(&o.IdentOptions{}, cmdN("public"), "Make cluster public", func(s *mcclient.ClientSession, args *o.IdentOptions) error {
ret, err := k8s.KubeClusters.PerformAction(s, args.ID, "public", nil)
if err != nil {
return err
}
printObject(ret)
return nil
})
R(&o.IdentOptions{}, cmdN("private"), "Make cluster private", func(s *mcclient.ClientSession, args *o.IdentOptions) error {
ret, err := k8s.KubeClusters.PerformAction(s, args.ID, "private", nil)
if err != nil {
return err
}

View File

@@ -27,7 +27,7 @@ func initCronJob() {
&o.CronJobCreateOptions{},
cmdN("create"),
"Create cronjob resource",
func(s *mcclient.ClientSession, args *o.JobCreateOptions) error {
func(s *mcclient.ClientSession, args *o.CronJobCreateOptions) error {
params, err := args.Params()
if err != nil {
return err

View File

@@ -18,6 +18,6 @@ import (
"yunion.io/x/onecloud/pkg/mcclient/modules/k8s"
)
func initK8sNode() {
initK8sClusterResource("node", k8s.K8sNodes)
func initDaemonSet() {
initK8sNamespaceResource("daemonset", k8s.DaemonSets)
}

View File

@@ -41,5 +41,22 @@ func initDeployment() {
return nil
})
cmd.AddR(createCmd)
updateCmd := NewCommand(
&o.DeploymentUpdateOptions{},
cmdN("update"),
"Update deployment resource",
func(s *mcclient.ClientSession, args *o.DeploymentUpdateOptions) error {
params, err := args.Params()
if err != nil {
return err
}
ret, err := k8s.Deployments.Update(s, args.NAME, params)
if err != nil {
return err
}
printObjectYAML(ret)
return nil
})
cmd.AddR(createCmd, updateCmd)
}

View File

@@ -29,10 +29,8 @@ import (
func init() {
// cluster resources
initCluster()
initKubeCluster()
initKubeMachine()
initNode()
initKubeCerts()
// helm resources
@@ -47,6 +45,7 @@ func init() {
initConfigMap()
initDeployment()
initStatefulset()
initDaemonSet()
initPod()
initService()
initIngress()
@@ -59,6 +58,8 @@ func init() {
initJob()
initCronJob()
initRbac()
initApp()
}
@@ -79,7 +80,7 @@ func kubeResourceCmdN(prefix, suffix string) string {
func clusterContext(clusterId string) modules.ManagerContext {
return modules.ManagerContext{
InstanceManager: k8s.Clusters,
InstanceManager: k8s.KubeClusters,
InstanceId: clusterId,
}
}

View File

@@ -1,195 +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 k8s
import (
"fmt"
"yunion.io/x/jsonutils"
"yunion.io/x/onecloud/pkg/mcclient"
"yunion.io/x/onecloud/pkg/mcclient/modules/k8s"
o "yunion.io/x/onecloud/pkg/mcclient/options/k8s"
)
func initKubeCluster() {
cmdN := func(action string) string {
return fmt.Sprintf("kubecluster-%s", action)
}
R(&o.ClusterListOptions{}, cmdN("list"), "List k8s clusters", func(s *mcclient.ClientSession, args *o.ClusterListOptions) error {
result, err := k8s.KubeClusters.List(s, args.Params())
if err != nil {
return err
}
printList(result, k8s.KubeClusters.GetColumns(s))
return nil
})
R(&o.IdentOptions{}, cmdN("show"), "Show details of a cluster", func(s *mcclient.ClientSession, args *o.IdentOptions) error {
result, err := k8s.KubeClusters.Get(s, args.ID, nil)
if err != nil {
return err
}
printObject(result)
return nil
})
R(&o.KubeClusterCreateOptions{}, cmdN("create"), "Create k8s cluster", func(s *mcclient.ClientSession, args *o.KubeClusterCreateOptions) error {
params, err := args.Params()
if err != nil {
return err
}
cluster, err := k8s.KubeClusters.Create(s, params)
if err != nil {
return err
}
printObject(cluster)
return nil
})
R(&o.ClusterDeleteOptions{}, cmdN("delete"), "Delete cluster", func(s *mcclient.ClientSession, args *o.ClusterDeleteOptions) error {
ret := k8s.KubeClusters.BatchDeleteWithParam(s, args.ID, nil, nil)
printBatchResults(ret, k8s.Clusters.GetColumns(s))
return nil
})
R(&o.KubeClusterAddMachinesOptions{}, cmdN("add-machines"), "Add machines to cluster", func(s *mcclient.ClientSession, args *o.KubeClusterAddMachinesOptions) error {
params, err := args.Params()
if err != nil {
return err
}
ret, err := k8s.KubeClusters.PerformAction(s, args.ID, "add-machines", params)
if err != nil {
return err
}
printObject(ret)
return nil
})
R(&o.KubeClusterDeleteMachinesOptions{}, cmdN("delete-machines"), "Delete machines in cluster", func(s *mcclient.ClientSession, args *o.KubeClusterDeleteMachinesOptions) error {
params, err := args.Params()
if err != nil {
return err
}
ret, err := k8s.KubeClusters.PerformAction(s, args.ID, "delete-machines", params)
if err != nil {
return err
}
printObject(ret)
return nil
})
R(&o.IdentOptions{}, cmdN("terminate"), "Terminate cluster", func(s *mcclient.ClientSession, args *o.IdentOptions) error {
ret, err := k8s.KubeClusters.PerformAction(s, args.ID, "terminate", nil)
if err != nil {
return err
}
printObject(ret)
return nil
})
R(&o.IdentOptions{}, cmdN("kubeconfig"), "Generate kubeconfig of a cluster", func(s *mcclient.ClientSession, args *o.IdentOptions) error {
ret, err := k8s.KubeClusters.GetSpecific(s, args.ID, "kubeconfig", nil)
if err != nil {
return err
}
conf, err := ret.GetString("kubeconfig")
if err != nil {
return err
}
fmt.Println(conf)
return nil
})
R(&o.IdentOptions{}, cmdN("addons"), "Get addon manifest of a cluster", func(s *mcclient.ClientSession, args *o.IdentOptions) error {
ret, err := k8s.KubeClusters.GetSpecific(s, args.ID, "addons", nil)
if err != nil {
return err
}
conf, err := ret.GetString("addons")
if err != nil {
return err
}
fmt.Println(conf)
return nil
})
R(&o.ClusterK8sVersions{}, cmdN("k8s-versions"), "Get kubernetes deployable versions", func(s *mcclient.ClientSession, args *o.ClusterK8sVersions) error {
params := jsonutils.NewDict()
params.Add(jsonutils.NewString(args.PROVIDER), "provider")
ret, err := k8s.KubeClusters.Get(s, "k8s-versions", params)
if err != nil {
return err
}
fmt.Println(ret.String())
return nil
})
R(&o.ClusterK8sVersions{}, cmdN("usable-instances"), "Get deploy usable instance", func(s *mcclient.ClientSession, args *o.ClusterK8sVersions) error {
params := jsonutils.NewDict()
params.Add(jsonutils.NewString(args.PROVIDER), "provider")
ret, err := k8s.KubeClusters.Get(s, "usable-instances", params)
if err != nil {
return err
}
fmt.Println(ret.String())
return nil
})
R(&o.ClusterCheckOptions{}, cmdN("check-system-ready"), "Check system cluster status", func(s *mcclient.ClientSession, args *o.ClusterCheckOptions) error {
ret, err := k8s.KubeClusters.PerformClassAction(s, "check-system-ready", nil)
if err != nil {
return err
}
fmt.Println(ret.String())
return nil
})
R(&o.IdentOptions{}, cmdN("apply-addons"), "Apply base requirements addons", func(s *mcclient.ClientSession, args *o.IdentOptions) error {
ret, err := k8s.KubeClusters.PerformAction(s, args.ID, "apply-addons", nil)
if err != nil {
return err
}
printObject(ret)
return nil
})
R(&o.IdentOptions{}, cmdN("syncstatus"), "Sync cluster status", func(s *mcclient.ClientSession, args *o.IdentOptions) error {
ret, err := k8s.KubeClusters.PerformAction(s, args.ID, "syncstatus", nil)
if err != nil {
return err
}
printObject(ret)
return nil
})
R(&o.IdentOptions{}, cmdN("public"), "Make cluster public", func(s *mcclient.ClientSession, args *o.IdentOptions) error {
ret, err := k8s.KubeClusters.PerformAction(s, args.ID, "public", nil)
if err != nil {
return err
}
printObject(ret)
return nil
})
R(&o.IdentOptions{}, cmdN("private"), "Make cluster private", func(s *mcclient.ClientSession, args *o.IdentOptions) error {
ret, err := k8s.KubeClusters.PerformAction(s, args.ID, "private", nil)
if err != nil {
return err
}
printObject(ret)
return nil
})
}

View File

@@ -26,7 +26,7 @@ func initKubeMachine() {
cmdN := func(action string) string {
return fmt.Sprintf("kubemachine-%s", action)
}
R(&o.NodeListOptions{}, cmdN("list"), "List k8s node machines", func(s *mcclient.ClientSession, args *o.NodeListOptions) error {
R(&o.MachineListOptions{}, cmdN("list"), "List k8s node machines", func(s *mcclient.ClientSession, args *o.MachineListOptions) error {
params, err := args.Params()
if err != nil {
return err

View File

@@ -15,78 +15,9 @@
package k8s
import (
"fmt"
"yunion.io/x/onecloud/pkg/mcclient"
"yunion.io/x/onecloud/pkg/mcclient/modules/k8s"
o "yunion.io/x/onecloud/pkg/mcclient/options/k8s"
)
func initNode() {
cmdN := func(suffix string) string {
return kubeResourceCmdN("node", suffix)
}
R(&o.NodeListOptions{}, cmdN("list"), "List k8s infra nodes", func(s *mcclient.ClientSession, args *o.NodeListOptions) error {
params, err := args.Params()
if err != nil {
return err
}
result, err := k8s.Nodes.List(s, params)
if err != nil {
return err
}
printList(result, k8s.Nodes.GetColumns(s))
return nil
})
R(&o.NodeCreateOptions{}, cmdN("create"), "Create k8s cluster node", func(s *mcclient.ClientSession, args *o.NodeCreateOptions) error {
params := args.Params()
node, err := k8s.Nodes.Create(s, params)
if err != nil {
return err
}
printObject(node)
return nil
})
R(&o.IdentOptions{}, cmdN("delete"), "Delete node", func(s *mcclient.ClientSession, args *o.IdentOptions) error {
ret, err := k8s.Nodes.Delete(s, args.ID, nil)
if err != nil {
return err
}
printObject(ret)
return nil
})
R(&o.IdentOptions{}, cmdN("show"), "Show node details", func(s *mcclient.ClientSession, args *o.IdentOptions) error {
obj, err := k8s.Nodes.Get(s, args.ID, nil)
if err != nil {
return err
}
printObject(obj)
return nil
})
R(&o.IdentsOptions{}, cmdN("purge"), "Purge a node record in database, not actually do deletion", func(s *mcclient.ClientSession, args *o.IdentsOptions) error {
ret := k8s.Nodes.BatchPerformAction(s, args.ID, "purge", nil)
printBatchResults(ret, k8s.Nodes.GetColumns(s))
return nil
})
R(&o.IdentOptions{}, cmdN("dockerconfig"), "Get docker daemon config", func(s *mcclient.ClientSession, args *o.IdentOptions) error {
ret, err := k8s.Nodes.GetSpecific(s, args.ID, "docker-config", nil)
if err != nil {
return err
}
fmt.Println(ret)
return nil
})
R(&o.NodeConfigDockerRegistryOptions{}, cmdN("config-docker-registry"), "Config node docker daemon registry",
func(s *mcclient.ClientSession, args *o.NodeConfigDockerRegistryOptions) error {
params := args.Params()
ret := k8s.Nodes.BatchPerformAction(s, args.ID, "config-docker-registry", params)
printBatchResults(ret, k8s.Nodes.GetColumns(s))
return nil
})
func initK8sNode() {
initK8sClusterResource("node", k8s.K8sNodes)
}

View File

@@ -21,6 +21,7 @@ import (
"os/exec"
"github.com/ghodss/yaml"
"yunion.io/x/jsonutils"
"yunion.io/x/onecloud/pkg/mcclient"

View File

@@ -0,0 +1,29 @@
// 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 k8s
import (
//"yunion.io/x/onecloud/pkg/mcclient"
"yunion.io/x/onecloud/pkg/mcclient/modules/k8s"
//o "yunion.io/x/onecloud/pkg/mcclient/options/k8s"
)
func initRbac() {
//cmdRole := initK8sNamespaceResource("rbacrole", k8s.RbacRoles)
initK8sNamespaceResource("rbacrole", k8s.RbacRoles)
initK8sNamespaceResource("rbacrolebinding", k8s.RbacRoleBindings)
initK8sNamespaceResource("serviceaccount", k8s.ServiceAccounts)
//cmdRoleN := cmdRole.CommandNameFactory
}

View File

@@ -36,7 +36,7 @@ func initRelease() {
return nil
})
R(&o.ResourceGetOptions{}, cmdN("show"), "Get helm release details", func(s *mcclient.ClientSession, args *o.ResourceGetOptions) error {
R(&o.NamespaceResourceGetOptions{}, cmdN("show"), "Get helm release details", func(s *mcclient.ClientSession, args *o.NamespaceResourceGetOptions) error {
ret, err := k8s.Releases.Get(s, args.NAME, args.Params())
if err != nil {
return err

View File

@@ -90,6 +90,29 @@ func init() {
printLbAclList(result, modules.LoadbalancerCachedAcls.GetColumns(s))
return nil
})
type LoadbalancerCachedAclCreateOptions struct {
CLOUDPROVIDER string `help:"cloud provider id"`
CLOUDREGION string `help:"cloud region id"`
ACL string `help:"acl id"`
Listener string `help:"cloud listener id, required by huawei"`
}
R(&LoadbalancerCachedAclCreateOptions{}, "lbacl-cache-create", "Create cached lbacl", func(s *mcclient.ClientSession, opts *LoadbalancerCachedAclCreateOptions) error {
params, err := options.StructToParams(opts)
if err != nil {
return err
}
lbacl, err := modules.LoadbalancerCachedAcls.Create(s, params)
if err != nil {
return err
}
printObject(lbacl)
return nil
})
R(&options.LoadbalancerAclDeleteOptions{}, "lbacl-cache-purge", "Purge cached lbacl", func(s *mcclient.ClientSession, opts *options.LoadbalancerAclDeleteOptions) error {
lbacl, err := modules.LoadbalancerCachedAcls.PerformAction(s, opts.ID, "purge", nil)
if err != nil {

View File

@@ -47,6 +47,28 @@ func init() {
printList(result, modules.LoadbalancerCachedCertificates.GetColumns(s))
return nil
})
type LoadbalancerCachedCertificateCreateOptions struct {
CLOUDPROVIDER string `help:"cloud provider id"`
CLOUDREGION string `help:"cloud region id"`
CERTIFICATE string `help:"certificate id"`
}
R(&LoadbalancerCachedCertificateCreateOptions{}, "lbcert-cache-create", "Create cached lbcert", func(s *mcclient.ClientSession, opts *LoadbalancerCachedCertificateCreateOptions) error {
params, err := options.StructToParams(opts)
if err != nil {
return err
}
lbcert, err := modules.LoadbalancerCachedCertificates.Create(s, params)
if err != nil {
return err
}
printObject(lbcert)
return nil
})
R(&options.LoadbalancerCertificateDeleteOptions{}, "lbcert-cache-delete", "Delete cached lbcert", func(s *mcclient.ClientSession, opts *options.LoadbalancerCertificateDeleteOptions) error {
lbcert, err := modules.LoadbalancerCachedCertificates.Delete(s, opts.ID, nil)
if err != nil {

View File

@@ -89,4 +89,11 @@ func init() {
printObject(lblistenerrule)
return nil
})
R(&options.LoadbalancerListenerRuleGetBackendStatusOptions{}, "lblistenerrule-backend-status", "Get lblistenerrule backend status", func(s *mcclient.ClientSession, opts *options.LoadbalancerListenerRuleGetBackendStatusOptions) error {
backendStatus, err := modules.LoadbalancerListenerRules.GetSpecific(s, opts.ID, "backend-status", nil)
if err != nil {
return err
}
return printLbBackendStatus(backendStatus)
})
}

View File

@@ -15,6 +15,8 @@
package shell
import (
"fmt"
"yunion.io/x/jsonutils"
"yunion.io/x/onecloud/pkg/mcclient"
@@ -22,6 +24,34 @@ import (
"yunion.io/x/onecloud/pkg/mcclient/options"
)
func printLbBackendStatus(backendStatus jsonutils.JSONObject) error {
arr, ok := backendStatus.(*jsonutils.JSONArray)
if !ok {
return fmt.Errorf("want json array, got %s", backendStatus.String())
}
objList, err := arr.GetArray()
if err != nil {
return err
}
listResult := &modules.ListResult{
Data: objList,
}
columns := []string{
"id",
"name",
"backend_type",
"backend_id",
"address",
"port",
"weight",
"check_time",
"check_status",
"check_code",
}
printList(listResult, columns)
return nil
}
func init() {
R(&options.LoadbalancerListenerCreateOptions{}, "lblistener-create", "Create lblistener", func(s *mcclient.ClientSession, opts *options.LoadbalancerListenerCreateOptions) error {
@@ -99,4 +129,11 @@ func init() {
printObject(lblistener)
return nil
})
R(&options.LoadbalancerListenerGetBackendStatusOptions{}, "lblistener-backend-status", "Get lblistene backend status", func(s *mcclient.ClientSession, opts *options.LoadbalancerListenerGetBackendStatusOptions) error {
backendStatus, err := modules.LoadbalancerListeners.GetSpecific(s, opts.ID, "backend-status", nil)
if err != nil {
return err
}
return printLbBackendStatus(backendStatus)
})
}

View File

@@ -43,4 +43,30 @@ func init() {
printObject(results)
return nil
})
type NatGatewayListEipOptions struct {
ID string `help:"ID"`
}
R(&NatGatewayListEipOptions{}, "natgateway-dnat-resources", "list resources in dnats of natgateway",
func(s *mcclient.ClientSession, opts *NatGatewayListEipOptions) error {
ret, err := modules.NatGateways.PerformAction(s, opts.ID, "dnat-resources", nil)
if err != nil {
return err
}
printObject(ret)
return nil
})
R(&NatGatewayListEipOptions{}, "natgateway-snat-resources", "list resources in snats of natgateway",
func(s *mcclient.ClientSession, opts *NatGatewayListEipOptions) error {
ret, err := modules.NatGateways.PerformAction(s, opts.ID, "snat-resources", nil)
if err != nil {
return err
}
printObject(ret)
return nil
})
}

View File

@@ -60,7 +60,8 @@ func init() {
params.Add(jsonutils.NewString(args.NATGATEWAYID), "natgateway_id")
params.Add(jsonutils.NewString(args.IP), "ip")
params.Add(jsonutils.NewString(args.EXTERNALIPID), "external_ip_id")
params.Add(jsonutils.NewString(args.SOURCECIDR), "source_cidr")
params.Add(jsonutils.NewString(args.SourceCIDR), "source_cidr")
params.Add(jsonutils.NewString(args.NetworkID), "network_id")
result, err := modules.NatSTable.Create(s, params)
if err != nil {

View File

@@ -16,6 +16,7 @@ package shell
import (
"yunion.io/x/jsonutils"
"yunion.io/x/onecloud/pkg/mcclient"
"yunion.io/x/onecloud/pkg/mcclient/modules"
)

View File

@@ -210,6 +210,7 @@ func init() {
NETMASK int64 `help:"Length of network mask"`
Gateway string `help:"Default gateway"`
VlanId int64 `help:"Vlan ID" default:"1"`
IfnameHint string `help:"Hint for ifname generation"`
AllocPolicy string `help:"Address allocation policy" choices:"none|stepdown|stepup|random"`
ServerType string `help:"Server type" choices:"baremetal|guest|container|pxe|ipmi"`
Desc string `help:"Description" metavar:"DESCRIPTION"`
@@ -229,6 +230,9 @@ func init() {
if len(args.ServerType) > 0 {
params.Add(jsonutils.NewString(args.ServerType), "server_type")
}
if len(args.IfnameHint) > 0 {
params.Add(jsonutils.NewString(args.IfnameHint), "ifname_hint")
}
if len(args.AllocPolicy) > 0 {
params.Add(jsonutils.NewString(args.AllocPolicy), "alloc_policy")
}

View File

@@ -23,6 +23,7 @@ import (
"time"
"yunion.io/x/jsonutils"
"yunion.io/x/log"
"yunion.io/x/onecloud/pkg/cloudcommon/consts"
"yunion.io/x/onecloud/pkg/cloudcommon/policy"
@@ -59,6 +60,7 @@ func init() {
FILE string `help:"path to policy file"`
Enabled bool `help:"create policy enabled"`
Disabled bool `help:"create policy disabled"`
Desc string `help:"policy description"`
}
R(&PolicyCreateOptions{}, "policy-create", "Create a new policy", func(s *mcclient.ClientSession, args *PolicyCreateOptions) error {
policyBytes, err := ioutil.ReadFile(args.FILE)
@@ -77,6 +79,9 @@ func init() {
} else if args.Disabled {
params.Add(jsonutils.JSONFalse, "enabled")
}
if len(args.Desc) > 0 {
params.Add(jsonutils.NewString(args.Desc), "description")
}
result, err := modules.Policies.Create(s, params)
if err != nil {
@@ -94,6 +99,7 @@ func init() {
Type string `help:"policy type"`
Enabled bool `help:"update policy enabled"`
Disabled bool `help:"update policy disabled"`
Desc string `help:"Description"`
}
updateFunc := func(s *mcclient.ClientSession, args *PolicyPatchOptions) error {
policyId, err := modules.Policies.GetId(s, args.ID, nil)
@@ -116,6 +122,9 @@ func init() {
} else if args.Disabled {
params.Add(jsonutils.JSONFalse, "enabled")
}
if len(args.Desc) > 0 {
params.Add(jsonutils.NewString(args.Desc), "description")
}
result, err := modules.Policies.Patch(s, policyId, params)
if err != nil {
return err
@@ -293,6 +302,10 @@ func init() {
Ip string `help:"login IP"`
}
R(&PolicyExplainOptions{}, "policy-explain", "Explain policy result", func(s *mcclient.ClientSession, args *PolicyExplainOptions) error {
err := log.SetLogLevelByString(log.Logger(), "debug")
if err != nil {
log.Fatalf("Set log level %q: %v", "debug", err)
}
auth.InitFromClientSession(s)
policy.EnableGlobalRbac(15*time.Second, 15*time.Second, false)
if args.Debug {

View File

@@ -17,6 +17,7 @@ package shell
import (
"yunion.io/x/jsonutils"
api "yunion.io/x/onecloud/pkg/apis/identity"
"yunion.io/x/onecloud/pkg/mcclient"
"yunion.io/x/onecloud/pkg/mcclient/modules"
"yunion.io/x/onecloud/pkg/mcclient/options"
@@ -364,6 +365,7 @@ func init() {
return nil
})*/
// Deprecated
type ProjectBatchJoinOptions struct {
Ids []string `help:"user ids or group ids"`
Resource string `help:"resource type" choices:"users|groups"`
@@ -378,4 +380,55 @@ func init() {
}
return nil
})
type ProjectAddUserGroupOptions struct {
Project string `help:"ID or name of project to add users/groups" positional:"true" optional:"false"`
User []string `help:"ID of user to add"`
Group []string `help:"ID of group to add"`
Role []string `help:"ID of role to add"`
}
R(&ProjectAddUserGroupOptions{}, "project-add-user-group", "Batch add users/groups to project", func(s *mcclient.ClientSession, args *ProjectAddUserGroupOptions) error {
input := api.SProjectAddUserGroupInput{}
input.Users = args.User
input.Groups = args.Group
input.Roles = args.Role
err := input.Validate()
if err != nil {
return err
}
result, err := modules.Projects.PerformAction(s, args.Project, "join", jsonutils.Marshal(input))
if err != nil {
return err
}
printObject(result)
return nil
})
type ProjectRemoveUserGroup struct {
Project string `help:"ID or name of project to remove user/group" optional:"false" positional:"true"`
User string `help:"user to remove"`
Group string `help:"group to remove"`
Role []string `help:"roles to remove"`
}
R(&ProjectRemoveUserGroup{}, "project-remove-user-group", "Remove users/groups from project", func(s *mcclient.ClientSession, args *ProjectRemoveUserGroup) error {
input := api.SProjectRemoveUserGroupInput{}
input.UserRoles = make([]api.SUserRole, len(args.Role))
input.GroupRoles = make([]api.SGroupRole, len(args.Role))
for i := range args.Role {
input.UserRoles[i].User = args.User
input.UserRoles[i].Role = args.Role[i]
input.GroupRoles[i].Group = args.Group
input.GroupRoles[i].Role = args.Role[i]
}
err := input.Validate()
if err != nil {
return err
}
result, err := modules.Projects.PerformAction(s, args.Project, "leave", jsonutils.Marshal(input))
if err != nil {
return err
}
printObject(result)
return nil
})
}

View File

@@ -34,6 +34,9 @@ type QuotaBaseOptions struct {
Snapshot int64 `help:"Snapshot count" json:"snapshot,omitzero"`
Image int64 `help:"Template count" json:"image,omitzero"`
Secgroup int64 `help:"Secgroup count" json:"secgroup,omitzero"`
Bucket int64 `help:"bucket count" json:"bucket,omitzero"`
ObjectGB int64 `help:"object size in GB" json:"object_gb,omitzero"`
ObjectCnt int64 `help:"object count" json:"object_cnt,omitzero"`
}
func init() {

View File

@@ -80,4 +80,18 @@ func init() {
return nil
})
type ReservedIpUpdateOptions struct {
ID string `help:"ID of reserved ip" json:"-"`
Notes string `help:"notes"`
}
R(&ReservedIpUpdateOptions{}, "reserved-ip-update", "update reserved ip notes", func(s *mcclient.ClientSession, args *ReservedIpUpdateOptions) error {
params := jsonutils.Marshal(args)
result, err := modules.ReservedIPs.Update(s, args.ID, params)
if err != nil {
return err
}
printObject(result)
return nil
})
}

View File

@@ -75,6 +75,7 @@ func init() {
NAME string `help:"Name of new schedtag"`
Strategy string `help:"Policy" choices:"require|exclude|prefer|avoid"`
Desc string `help:"Description"`
Scope string `help:"Resource scope" choices:"system|domain|project"`
Type string `help:"Resource type" choices:"hosts|storages|networks"`
}
R(&SchedtagCreateOptions{}, "schedtag-create", "Create a schedule tag", func(s *mcclient.ClientSession, args *SchedtagCreateOptions) error {
@@ -89,6 +90,9 @@ func init() {
if len(args.Type) > 0 {
params.Add(jsonutils.NewString(args.Type), "resource_type")
}
if len(args.Scope) > 0 {
params.Add(jsonutils.NewString(args.Scope), "scope")
}
schedtag, err := modules.Schedtags.Create(s, params)
if err != nil {
return err
@@ -129,4 +133,24 @@ func init() {
return nil
})
type SetScopeOptions struct {
ID []string `help:"ID or Name of schetag"`
Project string `help:"ID or Name of project"`
Domain string `help:"ID or Name of domain"`
System bool `help:"Set to system scope"`
}
R(&SetScopeOptions{}, "schedtag-set-scope", "Set schedtag scope", func(s *mcclient.ClientSession, args *SetScopeOptions) error {
params := jsonutils.NewDict()
domainId := args.Domain
projectId := args.Project
if args.System {
domainId = ""
projectId = ""
}
params.Add(jsonutils.NewString(domainId), "domain")
params.Add(jsonutils.NewString(projectId), "project")
ret := modules.Schedtags.BatchPerformAction(s, args.ID, "set-scope", params)
printBatchResults(ret, modules.Schedtags.GetColumns(s))
return nil
})
}

View File

@@ -23,6 +23,7 @@ import (
"path/filepath"
yaml "gopkg.in/yaml.v2"
"yunion.io/x/jsonutils"
"yunion.io/x/log"
@@ -1001,4 +1002,57 @@ func init() {
printObject(result)
return nil
})
type ServerResizeDiskOptions struct {
Server string `help:"ID or name of VM" json:"-" optional:"false" positional:"true"`
Disk string `help:"ID or name of disk to resize" json:"disk" optional:"false" positional:"true"`
Size string `help:"new size of disk in MB" json:"size" optional:"false" positional:"true"`
}
R(&ServerResizeDiskOptions{}, "server-resize-disk", "Resize attached disk of a server", func(s *mcclient.ClientSession, args *ServerResizeDiskOptions) error {
params := jsonutils.Marshal(args)
result, err := modules.Servers.PerformAction(s, args.Server, "resize-disk", params)
if err != nil {
return err
}
printObject(result)
return nil
})
type ServerIoThrottle struct {
ID string `help:"ID or name of VM" json:"-"`
BPS int `help:"bps(MB) of throttle" json:"bps"`
IOPS int `help:"iops of throttle" json:"iops"`
}
R(&ServerIoThrottle{}, "server-io-throttle", "Guest io set throttle", func(s *mcclient.ClientSession, opts *ServerIoThrottle) error {
params := jsonutils.Marshal(opts)
result, err := modules.Servers.PerformAction(s, opts.ID, "io-throttle", params)
if err != nil {
return err
}
printObject(result)
return nil
})
type ServerQemuParams struct {
ID string `help:"ID or name of VM"`
DisableIsaSerial string `help:"disable isa serial device" choices:"true|false"`
DisablePvpanic string `help:"disable pvpanic device" choices:"true|false"`
}
R(&ServerQemuParams{}, "server-set-qemu-params", "config qemu params", func(s *mcclient.ClientSession,
opts *ServerQemuParams) error {
params := jsonutils.NewDict()
if len(opts.DisableIsaSerial) > 0 {
params.Set("disable_isa_serial", jsonutils.NewString(opts.DisableIsaSerial))
}
if len(opts.DisablePvpanic) > 0 {
params.Set("disable_pvpanic", jsonutils.NewString(opts.DisablePvpanic))
}
result, err := modules.Servers.PerformAction(s, opts.ID, "set-qemu-params", params)
if err != nil {
return err
}
printObject(result)
return nil
})
}

View File

@@ -101,6 +101,8 @@ func init() {
Zone *string `help:"Zone ID or name"`
Cloudregion *string `help:"Cloudregion ID or name"`
Provider string `help:"provider"`
Brand string `help:"brand"`
}
R(&ServerSkusCreateOptions{}, "server-sku-create", "Create a server sku record", func(s *mcclient.ClientSession, args *ServerSkusCreateOptions) error {
params, err := options.StructToParams(args)

View File

@@ -16,6 +16,7 @@ package shell
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"
@@ -51,9 +52,7 @@ func init() {
})
type SnapshotPolicyCreateOptions struct {
NAME string
Manager string `help:"Manager id or name"`
Cloudregion string `help:"Cloudregion id or name"`
NAME string
RetentionDays int `help:"snapshot retention days"`
RepeatWeekdays []int `help:"snapshot create days on week"`
@@ -70,21 +69,56 @@ func init() {
return nil
})
type SnapshotPolicyApplyOptions struct {
ID string `help:"ID or Name of SnapshotPolicy" json:"-"`
Disk []string `help:"Disks id to apply snapshot policy"`
type SnapshotPolicyBindDisksOptions struct {
ID string `help:"ID"`
Disk []string `help:"ids of disk"`
}
R(&SnapshotPolicyApplyOptions{}, "snapshot-policy-apply", "Apply snapshot policy to disks", func(s *mcclient.ClientSession, args *SnapshotPolicyApplyOptions) error {
params, err := options.StructToParams(args)
if err != nil {
return err
}
snapshot, err := modules.SnapshotPoliciy.PerformAction(s, args.ID, "apply-to-disk", params)
if err != nil {
return err
}
printObject(snapshot)
return nil
})
R(&SnapshotPolicyBindDisksOptions{}, "snapshot-policy-bind-disk", "bind snapshotpolicy to disks",
func(s *mcclient.ClientSession, opts *SnapshotPolicyBindDisksOptions) error {
params, err := options.StructToParams(opts)
if err != nil {
return err
}
sp, err := modules.SnapshotPoliciy.PerformAction(s, opts.ID, "bind-disks", params)
if err != nil {
return err
}
printObject(sp)
return nil
})
R(&SnapshotPolicyBindDisksOptions{}, "snapshot-policy-unbind-disk", "bind snapshotpolicy to disks",
func(s *mcclient.ClientSession, opts *SnapshotPolicyBindDisksOptions) error {
params, err := options.StructToParams(opts)
if err != nil {
return err
}
sp, err := modules.SnapshotPoliciy.PerformAction(s, opts.ID, "unbind-disks", params)
if err != nil {
return err
}
printObject(sp)
return nil
})
type SnapshotPolicyCacheOptions struct {
ID string `help:"SnasphotPolicy ID"`
REGIONID string `help:"Region ID"`
PROVIDER string `help:"Provider ID"`
}
R(&SnapshotPolicyCacheOptions{}, "snapshot-policy-cache", "upload local snapshotpolicy to cloud",
func(s *mcclient.ClientSession, opts *SnapshotPolicyCacheOptions) error {
params, err := options.StructToParams(opts)
if err != nil {
return err
}
sp, err := modules.SnapshotPoliciy.PerformAction(s, opts.ID, "cache", params)
if err != nil {
return err
}
printObject(sp)
return nil
},
)
}

View File

@@ -0,0 +1,80 @@
// Copyright 2019 Yunion
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package shell
import (
"yunion.io/x/jsonutils"
"yunion.io/x/onecloud/pkg/mcclient"
"yunion.io/x/onecloud/pkg/mcclient/modules"
)
func init() {
type SSnapshotpolicyDiskListOfDiskOption struct {
DISKID string `help:"disk id"`
}
R(&SSnapshotpolicyDiskListOfDiskOption{}, "disk-snapshot-policy-list", "List snapshot policy attached",
func(s *mcclient.ClientSession, opts *SSnapshotpolicyDiskListOfDiskOption) error {
result, err := modules.SnapshotPolicyDisk.ListDescendent(s, opts.DISKID, jsonutils.NewDict())
if err != nil {
return err
}
printList(result, modules.SnapshotPolicyDisk.GetColumns(s))
return nil
},
)
type SSnapshotpolicyDiskListOfSnapshotpolicyOption struct {
SNAPSHOTPOLICYID string `help:"snapshot policy id"`
}
R(&SSnapshotpolicyDiskListOfSnapshotpolicyOption{}, "snapshot-policy-disk-list", "List disk attached",
func(s *mcclient.ClientSession, opts *SSnapshotpolicyDiskListOfSnapshotpolicyOption) error {
result, err := modules.SnapshotPolicyDisk.ListDescendent2(s, opts.SNAPSHOTPOLICYID, jsonutils.NewDict())
if err != nil {
return err
}
printList(result, modules.SnapshotPolicyDisk.GetColumns(s))
return nil
},
)
type SSnapshotpolicyDiskAttachOption struct {
DISKID string `help:"disk id"`
SNAPSHOTPOLICYID string `help:"snapshot policy id"`
}
R(&SSnapshotpolicyDiskAttachOption{}, "disk-snapshot-policy-attach", "attach snapshot policy to disk",
func(s *mcclient.ClientSession, opts *SSnapshotpolicyDiskAttachOption) error {
_, err := modules.SnapshotPolicyDisk.Attach(s, opts.DISKID, opts.SNAPSHOTPOLICYID, jsonutils.NewDict())
if err != nil {
return err
}
return nil
},
)
type SSnapshotpolicyDiskDetachOption struct {
DISKID string `help:"disk id"`
SNAPSHOTPOLICYID string `help:"snapshot policy id"`
}
R(&SSnapshotpolicyDiskDetachOption{}, "disk-snapshot-policy-detach", "detach snapshot policy to disk",
func(s *mcclient.ClientSession, opts *SSnapshotpolicyDiskDetachOption) error {
_, err := modules.SnapshotPolicyDisk.Detach(s, opts.DISKID, opts.SNAPSHOTPOLICYID, jsonutils.NewDict())
if err != nil {
return err
}
return nil
},
)
}

View File

@@ -17,6 +17,7 @@ package shell
import (
"yunion.io/x/jsonutils"
api "yunion.io/x/onecloud/pkg/apis/identity"
"yunion.io/x/onecloud/pkg/mcclient"
"yunion.io/x/onecloud/pkg/mcclient/modules"
"yunion.io/x/onecloud/pkg/mcclient/options"
@@ -361,4 +362,41 @@ func init() {
return nil
})
type UserJoinProjectOptions struct {
User string `help:"User Id or name" optional:"false" positional:"true"`
Project []string `help:"Projects to join" nargs:"+"`
Role []string `help:"User join project with roles" nargs:"+"`
}
R(&UserJoinProjectOptions{}, "user-join-project", "User join projects with roles", func(s *mcclient.ClientSession, args *UserJoinProjectOptions) error {
input := api.SJoinProjectsInput{}
input.Projects = args.Project
input.Roles = args.Role
result, err := modules.UsersV3.PerformAction(s, args.User, "join", jsonutils.Marshal(input))
if err != nil {
return err
}
printObject(result)
return nil
})
type UserLeaveProjectsOptions struct {
User string `help:"user id or name" optional:"false" positional:"true"`
Project string `help:"project id or name" optional:"false" positional:"true"`
Role []string `help:"roles to remove" nargs:"+"`
}
R(&UserLeaveProjectsOptions{}, "user-leave-project", "Leave a user from projects", func(s *mcclient.ClientSession, args *UserLeaveProjectsOptions) error {
input := api.SLeaveProjectsInput{}
input.ProjectRoles = make([]api.SProjectRole, len(args.Role))
for i := range args.Role {
input.ProjectRoles[i].Project = args.Project
input.ProjectRoles[i].Role = args.Role[i]
}
result, err := modules.UsersV3.PerformAction(s, args.User, "leave", jsonutils.Marshal(input))
if err != nil {
return err
}
printObject(result)
return nil
})
}

View File

@@ -20,9 +20,8 @@ import (
"yunion.io/x/structarg"
"yunion.io/x/onecloud/pkg/util/shellutils"
_ "yunion.io/x/onecloud/cmd/cryptool/shell"
"yunion.io/x/onecloud/pkg/util/shellutils"
)
type BaseOptions struct {

View File

@@ -20,8 +20,12 @@ import (
"yunion.io/x/structarg"
api "yunion.io/x/onecloud/pkg/apis/compute"
"yunion.io/x/onecloud/pkg/cloudprovider"
"yunion.io/x/onecloud/pkg/multicloud/objectstore"
"yunion.io/x/onecloud/pkg/multicloud/objectstore/ceph"
_ "yunion.io/x/onecloud/pkg/multicloud/objectstore/shell"
"yunion.io/x/onecloud/pkg/multicloud/objectstore/xsky"
"yunion.io/x/onecloud/pkg/util/shellutils"
)
@@ -31,6 +35,7 @@ type BaseOptions struct {
AccessUrl string `help:"Access url" default:"$S3_ACCESS_URL"`
AccessKey string `help:"Access key" default:"$S3_ACCESS_KEY"`
Secret string `help:"Secret" default:"$S3_SECRET"`
Backend string `help:"Backend driver" default:"$S3_BACKEND"`
SUBCOMMAND string `help:"s3cli subcommand" subcommand:"true"`
}
@@ -75,7 +80,7 @@ func showErrorAndExit(e error) {
os.Exit(1)
}
func newClient(options *BaseOptions) (*objectstore.SObjectStoreClient, error) {
func newClient(options *BaseOptions) (cloudprovider.ICloudRegion, error) {
if len(options.AccessUrl) == 0 {
return nil, fmt.Errorf("Missing accessUrl")
}
@@ -88,6 +93,11 @@ func newClient(options *BaseOptions) (*objectstore.SObjectStoreClient, error) {
return nil, fmt.Errorf("Missing secret")
}
if options.Backend == api.CLOUD_PROVIDER_CEPH {
return ceph.NewCephRados("", "", options.AccessUrl, options.AccessKey, options.Secret, options.Debug)
} else if options.Backend == api.CLOUD_PROVIDER_XSKY {
return xsky.NewXskyClient("", "", options.AccessUrl, options.AccessKey, options.Secret, options.Debug)
}
return objectstore.NewObjectStoreClient("", "", options.AccessUrl, options.AccessKey, options.Secret, options.Debug)
}
@@ -116,7 +126,7 @@ func main() {
if options.SUBCOMMAND == "help" {
e = subcmd.Invoke(suboptions)
} else {
var client *objectstore.SObjectStoreClient
var client cloudprovider.ICloudRegion
client, e = newClient(options)
if e != nil {
showErrorAndExit(e)

View File

@@ -17,10 +17,10 @@ package main
import (
"fmt"
"os"
"yunion.io/x/onecloud/pkg/multicloud/ucloud"
"yunion.io/x/structarg"
"yunion.io/x/onecloud/pkg/multicloud/ucloud"
_ "yunion.io/x/onecloud/pkg/multicloud/ucloud/shell"
"yunion.io/x/onecloud/pkg/util/shellutils"
)

11
docs/bucket/access.yaml Normal file
View File

@@ -0,0 +1,11 @@
get:
summary: 获取存储桶的后端访问信息例如ceph RADOS的endpint/ak/sk信息等
parameters:
- $ref: '../parameters/bucket.yaml#/bucket_name'
responses:
200:
description: 指定存储桶访问信息
schema:
$ref: "../schemas/bucket.yaml#/BucketAccessInfoResponse"
tags:
- buckets

View File

@@ -0,0 +1,16 @@
post:
summary: 将组以多个角色加入多个项目
parameters:
- $ref: '../parameters/group.yaml#/group_id'
- name: group
in: body
required: true
schema:
$ref: "../schemas/project.yaml#/ProjectJoinRequestInput"
responses:
200:
description: 组信息
schema:
$ref: "../schemas/group.yaml#/GroupGetResponse"
tags:
- groups

View File

@@ -0,0 +1,16 @@
post:
summary: 将组的多个角色从多个项目中删除
parameters:
- $ref: '../parameters/group.yaml#/group_id'
- name: group
in: body
required: true
schema:
$ref: "../schemas/project.yaml#/ProjectLeaveRequestInput"
responses:
200:
description: 组信息
schema:
$ref: "../schemas/group.yaml#/GroupGetResponse"
tags:
- groups

View File

@@ -0,0 +1,16 @@
post:
summary: 将多个用户和组以多个角色加入指定项目
parameters:
- $ref: '../parameters/project.yaml#/project_id'
- name: project
in: body
required: true
schema:
$ref: "../schemas/project.yaml#/ProjectJoinUserGroupRequestInput"
responses:
200:
description: 项目信息
schema:
$ref: "../schemas/project.yaml#/ProjectGetResponse"
tags:
- projects

View File

@@ -0,0 +1,16 @@
post:
summary: 将多个用户和组以多个角色从指定项目删除
parameters:
- $ref: '../parameters/project.yaml#/project_id'
- name: project
in: body
required: true
schema:
$ref: "../schemas/project.yaml#/ProjectRemoveUserGroupRequestInput"
responses:
200:
description: 项目信息
schema:
$ref: "../schemas/project.yaml#/ProjectGetResponse"
tags:
- projects

View File

@@ -1,4 +1,5 @@
put:
deprecated: true
summary: 将组以指定角色加入项目
parameters:
- $ref: '../parameters/identity.yaml#/project_id'
@@ -11,6 +12,7 @@ put:
- roles
delete:
deprecated: true
summary: 将组在项目中的角色删除
parameters:
- $ref: '../parameters/identity.yaml#/project_id'

View File

@@ -1,4 +1,5 @@
put:
deprecated: true
summary: 将用户以指定角色加入项目
parameters:
- $ref: '../parameters/identity.yaml#/project_id'
@@ -11,6 +12,7 @@ put:
- roles
delete:
deprecated: true
summary: 将用户在项目中的角色删除
parameters:
- $ref: '../parameters/identity.yaml#/project_id'

View File

@@ -0,0 +1,16 @@
post:
summary: 将用户以多个角色加入多个项目
parameters:
- $ref: '../parameters/user.yaml#/user_id'
- name: user
in: body
required: true
schema:
$ref: "../schemas/project.yaml#/ProjectJoinRequestInput"
responses:
200:
description: 用户信息
schema:
$ref: "../schemas/user.yaml#/UserGetResponse"
tags:
- users

View File

@@ -0,0 +1,16 @@
post:
summary: 将用户的多个角色从多个项目中删除
parameters:
- $ref: '../parameters/user.yaml#/user_id'
- name: user
in: body
required: true
schema:
$ref: "../schemas/project.yaml#/ProjectLeaveRequestInput"
responses:
200:
description: 用户信息
schema:
$ref: "../schemas/user.yaml#/UserGetResponse"
tags:
- users

View File

@@ -165,6 +165,8 @@ paths:
$ref: "./instance/user-data.yaml"
/servers/{instanceId}/vnc:
$ref: "./instance/vnc.yaml"
/servers/{instanceId}/io-throttle:
$ref: "./instance/io-throttle.yaml"
/images:
$ref: "./image/images.yaml"
@@ -177,6 +179,10 @@ paths:
$ref: "./natgateway/natgateways.yaml"
/natgateways/{natgatewayId}:
$ref: "./natgateway/natgateway.yaml"
/natgateways/{natgatewayId}/dnat-resources:
$ref: "./natgateway/dnat-resources.yaml"
/natgateways/{natgatewayId}/snat-resources:
$ref: "./natgateway/snat-resources.yaml"
/natdentries:
$ref: "./natgateway/dnatentries.yaml"
/natdentries/{dnatentryId}:
@@ -186,20 +192,37 @@ paths:
/natsentries/{snatentryId}:
$ref: "./natgateway/snatentry.yaml"
/snapshotpolicies:
$ref: "./snapshotpolicy/snapshotpolicies.yaml"
/snapshotpolicies/{snapshotpolicyId}:
$ref: "./snapshotpolicy/snapshotpolicy.yaml"
/disks/{disk_id}/snapshotpolicies:
$ref: "./snapshotpolicy/snapshotpolicydisk.yaml"
/snapshotpolicies/{snapshotpolicy_id}/disks:
$ref: "./snapshotpolicy/snapshotpolicydisk2.yaml"
/disks/{disk_id}/snapshotpolicies/{snapshotpolicy_id}:
$ref: "./snapshotpolicy/snapshotpolicydisk3.yaml"
/snapshotpolicies/{snapshotpolicyId}/bind-disks:
$ref: "./snapshotpolicy/bind-disk.yaml"
/snapshotpolicies/{snapshotpolicyId}/unbind-disks:
$ref: "./snapshotpolicy/unbind-disk.yaml"
/snapshotpolicies/{snapshotpolicyId}/cache:
$ref: "./snapshotpolicy/cache.yaml"
/loadbalancers:
$ref: "./loadbalancer/loadbalancers.yaml"
/loadbalancers/{loadbalancerId}:
$ref: "./loadbalancer/loadbalancer.yaml"
/cached_loadbalancer_acls:
$ref: "./loadbalancer/loadbalancercachedacl.yaml"
/cached_loadbalancer_acls/{loadbalancerlistenerId}:
$ref: "./loadbalancer/loadbalancercachedacls.yaml"
/cached_loadbalancer_acls/{loadbalancercachedaclId}:
$ref: "./loadbalancer/loadbalancercachedacl.yaml"
/cached_loadbalancercertificates:
$ref: "./loadbalancer/loadbalancercachedcertificates.yaml"
/cached_loadbalancercertificates/{loadbalancercachedcertificateId}:
$ref: "./loadbalancer/loadbalancercachedcertificate.yaml"
/cached_loadbalancercertificates/{loadbalancerlistenerId}:
$ref: "./loadbalancer/loadbalancercachedcertificates.yaml"
/loadbalancerlisteners:
$ref: "./loadbalancer/loadbalancerlisteners.yaml"
@@ -227,14 +250,22 @@ paths:
$ref: "./identity/domain.yaml"
/users:
$ref: "./identity/users.yaml"
$ref: "./identity/users.yaml"
/users/{user_id}:
$ref: "./identity/user.yaml"
$ref: "./identity/user.yaml"
/users/{user_id}/join:
$ref: "./identity/user_join.yaml"
/users/{user_id}/leave:
$ref: "./identity/user_leave.yaml"
/groups:
$ref: "./identity/groups.yaml"
/groups/{group_id}:
$ref: "./identity/group.yaml"
/groups/{group_id}/join:
$ref: "./identity/group_join.yaml"
/groups/{group_id}/leave:
$ref: "./identity/group_leave.yaml"
/groups/{group_id}/users/{user_id}:
$ref: "./identity/groupuser.yaml"
@@ -242,6 +273,10 @@ paths:
$ref: "./identity/projects.yaml"
/projects/{project_id}:
$ref: "./identity/project.yaml"
/projects/{project_id}/join:
$ref: "./identity/project_join.yaml"
/projects/{project_id}/leave:
$ref: "./identity/project_leave.yaml"
/roles:
$ref: "./identity/roles.yaml"
@@ -307,7 +342,6 @@ paths:
/networkinterfaces/{networkinterfaceId}/networks:
$ref: "./networkinterface/networks.yaml"
/buckets:
$ref: "./bucket/buckets.yaml"
/buckets/{bucketName}:
@@ -324,6 +358,10 @@ paths:
$ref: "./bucket/tempurl.yaml"
/buckets/{bucketName}/acl:
$ref: "./bucket/acl.yaml"
/buckets/{bucketName}/limit:
$ref: "./bucket/limit.yaml"
/buckets/{bucketName}/access-info:
$ref: "./bucket/access.yaml"
/dbinstances:
$ref: "./dbinstance/dbinstances.yaml"

View File

@@ -0,0 +1,16 @@
post:
summary: 虚拟机磁盘IO限速
parameters:
- $ref: '../parameters/instance.yaml#/instanceId'
- in: body
name: server
required: true
schema:
$ref: '../schemas/instance.yaml#/InstanceIoThrottle'
responses:
200:
description: 实例信息
schema:
$ref: '../schemas/instance.yaml#/InstanceResponse'
tags:
- instance

View File

@@ -8,4 +8,18 @@ get:
schema:
$ref: "../schemas/loadbalancer.yaml#/LoadbalancerCachedAclListResponse"
tags:
- loadbalanceracls
- loadbalanceracls
post:
summary: 同步ACL到指定公有云
parameters:
- name: cachedloadbalanceracl
in: body
schema:
$ref: "../schemas/loadbalancer.yaml#/LoadbalancerCachedAclCreateRequest"
responses:
200:
description: 新创建的公有云ACL
schema:
$ref: "../schemas/loadbalancer.yaml#/LoadbalancerCachedAclResponse"
tags:
- loadbalanceracls

View File

@@ -18,4 +18,4 @@ delete:
schema:
$ref: "../schemas/loadbalancer.yaml#/LoadbalancerCachedCertificateResponse"
tags:
- loadbalancercertificates
- loadbalancercertificates

View File

@@ -8,4 +8,18 @@ get:
schema:
$ref: "../schemas/loadbalancer.yaml#/LoadbalancerCachedCertificateListResponse"
tags:
- loadbalancercertificates
- loadbalancercertificates
post:
summary: 同步SSL证书到指定公有云
parameters:
- name: cachedloadbalancercertificate
in: body
schema:
$ref: "../schemas/loadbalancer.yaml#/LoadbalancerCachedCertificateCreateRequest"
responses:
200:
description: 新创建的公有云SSL证书
schema:
$ref: "../schemas/loadbalancer.yaml#/LoadbalancerCachedCertificateResponse"
tags:
- loadbalancercertificates

View File

@@ -0,0 +1,13 @@
post:
summary: NAT网关下DNAT规则EIP的集合
parameters:
- $ref: "../parameters/natgateway.yaml#/natgatewayId"
responses:
200:
description: DNAT规则EIP集合
schema:
- $ref: "../schemas/natgateway.yaml#/DNATResources"
tags:
- natgateway

View File

@@ -3,9 +3,7 @@ get:
parameters:
- $ref: "../parameters/common.yaml#/offset"
- $ref: "../parameters/common.yaml#/limit"
- $ref: "../parameters/common.yaml#/provider"
- $ref: "../parameters/common.yaml#/account"
- $ref: "../parameters/common.yaml#/cloudprovider"
- $ref: "../parameters/common.yaml#/brand"
- $ref: "../parameters/natgateway.yaml#/natgateway"

View File

@@ -0,0 +1,11 @@
post:
summary: NAT网关下SNAT规则EIP的集合
parameters:
- $ref: "../parameters/natgateway.yaml#/natgatewayId"
responses:
200:
description: SNAT规则EIP集合
schema:
- $ref: "../schemas/natgateway.yaml#/SNATResources"
tags:
- natgateway

View File

@@ -4,11 +4,8 @@ get:
- $ref: "../parameters/common.yaml#/limit"
- $ref: "../parameters/common.yaml#/offset"
- $ref: "../parameters/common.yaml#/network"
- $ref: "../parameters/common.yaml#/provider"
- $ref: "../parameters/common.yaml#/account"
- $ref: "../parameters/common.yaml#/cloudprovider"
- $ref: "../parameters/common.yaml#/brand"
- $ref: "../parameters/natgateway.yaml#/natgateway"
responses:

57
docs/parameters/disk.yaml Normal file
View File

@@ -0,0 +1,57 @@
diskId:
name: diskId
required: true
in: path
type: string
description: 磁盘名称或ID
unused:
name: unused
required: false
in: query
type: boolean
description: 列出未挂载磁盘
share:
name: share
required: false
in: query
type: boolean
description: 列出共享磁盘
local:
name: local
required: false
in: query
type: boolean
description: 列出本地磁盘
guest:
name: guest
required: false
in: query
type: string
description: 列出改虚拟机的磁盘
storage:
name: storage
required: false
in: query
type: string
description: 列出改存储的磁盘
type:
name: type
required: false
in: query
type: string
enum: [sys,data,swap,volume]
description: 列出改类型的磁盘
cloud_type:
name: cloud_type
required: false
in: query
type: string
enum: [Public,Private]
description: 列出公有云或私有云的磁盘
snapshotpolicy_id:
name: snapshotpolicy_id
required: false
in: query
type: string
description: 列出绑定了此快照策略的磁盘

View File

@@ -18,4 +18,5 @@ usable:
name: usable
in: query
type: boolean
description: 过滤所在region底下有ip子网的套餐
description: 过滤所在region底下有ip子网的套餐

View File

@@ -0,0 +1,28 @@
snapshotpolicyId:
name: snapshotpolicyId
required: true
in: path
description: 自动快照策略的ID
diskId:
name: diskId
in: path
description: 磁盘的ID
retention_days:
name: retention_days
in: query
type: integer
description: 快照的保存时间(永久保存选-1
repeat_weekdays:
name: repeat_weekdays
in: query
type: array
items:
type: integer
description: 做快照的时间(周几)
time_points:
name: time_points
in: query
type: array
items:
type: integer
description: 做快照的时间(每天几点)

View File

@@ -260,11 +260,37 @@ TokenV3:
$ref: './roleassignments.yaml#/DomainObject'
user:
type: object
$ref: './roleassignments.yaml#/DomainObject'
properties:
id:
type: string
description: 用户ID
name:
type: string
description: 用户名称
displayname:
type: string
description: 用户显示名称
email:
type: string
description: 用户的电子邮箱
mobile:
type: string
description: 用户的手机号
domain:
type: object
description: 资源归属的域信息
$ref: './roleassignments.yaml#/Domain'
policies:
type: object
$ref: './roleassignments.yaml#/PolicyObject'
projects:
type: array
items:
$ref: './roleassignments.yaml#/DomainObject'
role_assignments:
type: array
items:
$ref: './roleassignments.yaml#/RoleAssignment'
catalog:
type: array
items:

View File

@@ -206,3 +206,24 @@ BucketSetACLInput:
key:
type: string
description: 如果设置对象的ACL则此字段指定对象的key
BucketSetLimitInput:
type: object
properties:
limit:
type: object
description: 桶的存储限制
properties:
size_bytes:
type: integer
description: 容量上限为0则无限制
object_count:
type: integer
description: 对象数量限制为0则无限制
BucketAccessInfoResponse:
type: object
properties:
bucket:
type: object
description: 桶的后端访问信息例如ceph RADOS的endpoint/access_key/secret信息等。具体形式由存储后端决定。

View File

@@ -114,6 +114,17 @@ InstanceAddSecgroup:
example: 38dc8e80-14e5-4629-81c1-3847320ae821
description: 待绑定的安全组名称或ID
InstanceIoThrottle:
type: object
properties:
iops:
type: integer
example: 1000
description: 最高iops
bps:
type: integer
example: 1000
description: 最高bps单位MB
InstanceRevokeSecgroup:
type: object
@@ -641,6 +652,13 @@ InstanceCreate:
type: array
items:
$ref: '#/InstanceDisk'
secgroups:
type: array
description: 安全组列表
items:
type: string
example: default
description: 安全组名称或ID,建议使用ID
InstanceDisk:

View File

@@ -89,13 +89,13 @@ LoadbalancerListResponse:
loadbalancers:
type: array
items:
$ref: '#/Loadbalancer'
$ref: "#/Loadbalancer"
LoadbalancerResponse:
type: object
properties:
loadbalancer:
type: object
$ref: '#/Loadbalancer'
$ref: "#/Loadbalancer"
LoadbalancerListenerCreateRequest:
type: object
@@ -137,13 +137,13 @@ LoadbalancerListenerListResponse:
loadbalancerlisteners:
type: array
items:
$ref: '#/LoadbalancerListener'
$ref: "#/LoadbalancerListener"
LoadbalancerListenerResponse:
type: object
properties:
loadbalancerlistener:
type: object
$ref: '#/LoadbalancerListener'
$ref: "#/LoadbalancerListener"
LoadbalancerBackendGroupListResponse:
type: object
@@ -151,13 +151,13 @@ LoadbalancerBackendGroupListResponse:
loadbalancerbackendgroups:
type: array
items:
$ref: '#/LoadbalancerBackendGroup'
$ref: "#/LoadbalancerBackendGroup"
LoadbalancerBackendGroupResponse:
type: object
properties:
loadbalancerbackendgroup:
type: object
$ref: '#/LoadbalancerBackendGroup'
$ref: "#/LoadbalancerBackendGroup"
LoadbalancerBackendCreateRequest:
type: object
@@ -202,13 +202,13 @@ LoadbalancerBackendListResponse:
loadbalancerbackends:
type: array
items:
$ref: '#/LoadbalancerBackend'
$ref: "#/LoadbalancerBackend"
LoadbalancerBackendResponse:
type: object
properties:
loadbalancerbackend:
type: object
$ref: '#/LoadbalancerBackend'
$ref: "#/LoadbalancerBackend"
LoadbalancerAclEntry:
type: object
@@ -221,15 +221,36 @@ LoadbalancerAclEntry:
comment:
type: string
description: 注释
readOnly: true
readOnly: true
LoadbalancerAclEntries:
type: array
items:
$ref: '#/LoadbalancerAclEntry'
$ref: "#/LoadbalancerAclEntry"
LoadbalancerCachedAclCreateRequest:
type: object
properties:
cachedloadbalanceracl:
type: object
required:
- cloudregion
- cloudprovider
- acl
properties:
cloudregion:
type: string
description: 指定公有云region
cloudprovider:
type: string
description: 指定云账号订阅ID
acl:
type: string
description: 指定需要同步的ACL ID
listener:
type: string
description: 指定负载均衡监听器ID华为云必须指定该参数。
LoadbalancerCachedAcl:
allOf:
allOf:
- $ref: "./common.yaml#/SharableVirtualResourceBaseResponse"
- $ref: "./common.yaml#/ExternalizedResourceBaseResponse"
- type: object
@@ -238,10 +259,10 @@ LoadbalancerCachedAcl:
type: string
description: 所属的本地访问控制uuid
acl_entries:
$ref: "#/LoadbalancerAclEntries"
$ref: "#/LoadbalancerAclEntries"
LoadbalancerCachedAclResponse:
$ref: "#/LoadbalancerCachedAcl"
$ref: "#/LoadbalancerCachedAcl"
LoadbalancerCachedAclListResponse:
type: object
@@ -251,8 +272,28 @@ LoadbalancerCachedAclListResponse:
items:
$ref: "#/LoadbalancerCachedAcl"
LoadbalancerCachedCertificateCreateRequest:
type: object
properties:
cachedloadbalancercertificate:
type: object
required:
- cloudregion
- cloudprovider
- certificate
properties:
cloudregion:
type: string
description: 指定公有云region
cloudprovider:
type: string
description: 指定云账号订阅ID
certificate:
type: string
description: 指定需要同步的SSL证书 ID
LoadbalancerCachedCertificateResponse:
allOf:
allOf:
- $ref: "./common.yaml#/SharableVirtualResourceBaseResponse"
- $ref: "./common.yaml#/ExternalizedResourceBaseResponse"
- type: object
@@ -273,11 +314,11 @@ LoadbalancerCachedCertificateResponse:
publicKey_bitLen:
type: int
description: 公钥长度
readOnly: true
readOnly: true
signature_algorithm:
type: string
description: 签名算法
readOnly: true
readOnly: true
fingerprint:
type: string
example: sha1:da:39:a3:ee:5e:6b:4b:0d:32:55:bf:ef:95:60:18:90:af:d8:07:09
@@ -287,22 +328,22 @@ LoadbalancerCachedCertificateResponse:
type: string
example: 2019-05-23T11:50:33.000000Z
description: 最早生效时间
readOnly: true
readOnly: true
not_after:
type: string
example: 2020-05-23T11:50:33.000000Z
description: 失效时间
readOnly: true
readOnly: true
common_name:
type: string
example: www.onecloud.com
description: 域名
readOnly: true
readOnly: true
subject_alternative_names:
type: string
example: ''
example: ""
description: 附加域名
readOnly: true
readOnly: true
LoadbalancerCachedCertificateListResponse:
type: object
@@ -310,4 +351,4 @@ LoadbalancerCachedCertificateListResponse:
cached_loadbalancercertificates:
type: array
items:
$ref: "#/LoadbalancerCachedCertificateResponse"
$ref: "#/LoadbalancerCachedCertificateResponse"

View File

@@ -51,7 +51,7 @@ NatGateway:
nat_spec:
type: string
description: NAT网关规格
example: Small
example: small
region:
type: string
description: 所属的区域
@@ -154,8 +154,8 @@ DNatEntry:
example: tcp
name:
type: string
description: DNAT名称
example: 111.230.80.43/udp/32
description: DNAT名称(处理过的)
example: hello-ea27c0ce-5870-49f3-8d57-f53e63f40361
natgateway:
type: string
description: 所属NAT网关名称
@@ -168,6 +168,10 @@ DNatEntry:
type: string
description: DNAT状态
example: available
real_name:
type: string
description: DNAT真实的名称
example: hello
DNatEntryListResponse:
type: object
@@ -215,7 +219,8 @@ SNatEntry:
description: 公网IP
name:
type: string
example: snat-2zeqqfcow4t67ahduei7x
description: SNAT名称经过处理的
example: hello-ea27c0ce-5870-49f3-8d57-f53e63f40361
natgateway:
type: string
example: test-nat
@@ -225,9 +230,7 @@ SNatEntry:
example: 4daf9886-ebe6-4a8a-8082-3bd623d1c857
description: 所属NAT网关ID
network:
type: string
example: test-network
description: 所属子网名称
$ref: 'network.yaml#/Network'
network_id:
type: string
example: 7caf732e-93fc-42c0-89d2-86aac2970c38
@@ -240,6 +243,10 @@ SNatEntry:
type: string
example: available
description: SNAT状态
real_name:
type: string
example: hello
description: SNAT真实的名称
SNatEntryListResponse:
type: object
@@ -335,7 +342,7 @@ SNatEntryCreate:
network_id:
type: string
example: 648a6baa-9827-49b1-8831-278a889154a1
description: 所属网络ID
description: 所属网络ID(与source_cidr互斥只需要传入一个)
ip:
type: string
example: 49.4.12.184
@@ -343,8 +350,31 @@ SNatEntryCreate:
external_ip_id:
type: string
example: ""
description: 公网IP对应的ID,除了华为云,可以为空
description: 公网IP对应的ID
source_cidr:
type: string
example: 192.168.1.0/24
description: 映射到公网IP的内网网段
description: 映射到公网IP的内网网段(和network_id互斥只需要传入一个
DNATResources:
type: object
properties:
eips:
type: array
items:
type: string
example: [34.23.125.45, 23.45.123.56]
SNATResources:
type: object
properties:
eips:
type: array
items:
type: string
example: [34.23.125.45, 23.45.123.56]
networks:
type: array
items:
type: string
example: []

View File

@@ -5,6 +5,10 @@ NetworkinterfaceNetwork:
type: string
example: "192.168.0.240"
description: 弹性网卡IP地址
network:
type: string
example: test-network
description: 子网名称
network_id:
type: string
example: 19b09a31-1884-4b3f-84cd-ac03827c567d
@@ -38,4 +42,4 @@ NetworkinterfaceResponse:
properties:
networkinterfacenetwork:
type: object
$ref: '#/NetworkinterfaceNetwork'
$ref: '#/NetworkinterfaceNetwork'

View File

@@ -57,3 +57,84 @@ Project:
can_delete:
type: boolean
description: 是否可以删除
ProjectJoinRequestInput:
type: object
description: 用户或组批量加入项目的请求body
properties:
projects:
type: array
description: 项目列表
items:
type: string
roles:
type: array
description: 角色列表
items:
type: string
ProjectLeaveRequestInput:
type: object
description: 用户或组批量移除项目的请求body
properties:
project_roles:
type: array
description: 移除的项目和角色列表
items:
type: object
properties:
project:
type: string
description: 项目ID或名称
role:
type: string
description: 角色ID或名称
ProjectJoinUserGroupRequestInput:
type: object
description: 将多个用户或组批量加入指定项目的请求body
properties:
users:
type: array
description: 加入的用户列表
items:
type: string
groups:
type: array
description: 加入的组列表
items:
type: string
roles:
type: array
description: 加入的角色列表
items:
type: string
ProjectRemoveUserGroupRequestInput:
type: object
description: 将多个用户或组从指定项目移除的请求body
properties:
user_roles:
type: array
description: 用户和角色列表
items:
type: object
properties:
user:
type: string
description: 用户ID或名称
role:
type: string
description: 角色ID或名称
group_roles:
type: array
description: 组和角色列表
items:
type: object
properties:
group:
type: string
description: 组ID或名称
role:
type: string
description: 角色ID或名称

View File

@@ -13,7 +13,7 @@ RoleAssignmentListResponse:
role_assignments:
type: array
items:
$ref: "#/RoleAssignment"
$ref: "./roleassignments.yaml#/RoleAssignment"
RoleAssignment:
type: object
@@ -22,35 +22,42 @@ RoleAssignment:
scope:
type: object
description: 角色分配的范围
$ref: '#/Scope'
$ref: './roleassignments.yaml#/Scope'
user:
type: object
description: 角色分配的用户
$ref: '#/DomainObject'
$ref: './roleassignments.yaml#/DomainObject'
group:
type: object
description: 角色分配的组
$ref: '#/DomainObject'
$ref: './roleassignments.yaml#/DomainObject'
role:
type: object
description: 角色
$ref: '#/DomainObject'
$ref: './roleassignments.yaml#/DomainObject'
policies:
type: object
description: 匹配的权限列表
properties:
project:
type: array
items:
type: string
domain:
type: array
items:
type: string
system:
type: array
items:
type: string
$ref: './roleassignments.yaml#/PolicyObject'
PolicyObject:
type: object
description: 匹配的权限列表
properties:
project:
type: array
items:
type: string
domain:
type: array
items:
type: string
system:
type: array
items:
type: string
Scope:
type: object

View File

@@ -0,0 +1,206 @@
CanDelete:
type: string
example: true
description: 可否删除
CanUpdate:
type: string
example: false
description: 可否更新
CreatedAt:
type: string
example: 2019-05-30T08:46:12.000000Z
description: 资源创建时间
UpdatedAt:
type: string
example: 2019-05-30T08:46:12.000000Z
description: 资源最近一次更新时间
SnapshotPolicy:
type: object
description: 自动快照策略
properties:
id:
type: string
example: ea27c0ce-5870-49f3-8d57-f53e63f40361
description: 自动快照策略ID
readOnly: true
name:
type: string
description: 自动快照策略名称
example: snapshotpolicy-jo5pskhg
retention_days:
type: integer
example: 10
description: 快照保存的时间(-1为永久保存)
repeat_weekdays:
type: array
items:
type: integer
example: [1, 2]
description: 做快照的时间(每周的周几)
time_points:
type: array
items:
type: integer
example: [2]
description: 做快照的时间(每天的几点)
is_activated:
type: boolean
example: true
description: 是否启用快照策略
binding_disk_count:
type: integer
example: 3
description: 自动快照策略绑定的磁盘数量
can_delete:
$ref: '#/CanDelete'
can_update:
$ref: '#/CanUpdate'
created_at:
$ref: '#/CreatedAt'
updated_at:
$ref: '#/UpdatedAt'
is_emulated:
type: boolean
example: false
description: 是否是虚拟出来的实例
status:
type: string
example: init
description: 状态
update_version:
type: integer
example: 2
description: 资源被更新的次数
SnapshotPolicyCreate:
type: object
properties:
snapshotpolicy:
type: object
required:
- name
- retention_days
- repeat_weekdays
- time_points
- is_activated
properties:
name:
type: string
example: snapshotpolicy-jo5pskhg
description: 自动快照策略名称
retention_days:
type: integer
example: 10
description: 快照保存的时间(-1为永久保存)
repeat_weekdays:
type: array
items:
type: integer
example: [1, 2]
description: 做快照的时间(每周的周几)
time_points:
type: array
items:
type: integer
example: [2]
description: 做快照的时间(每天的几点)
is_activated:
type: boolean
example: true
description: 是否启用快照策略
SnapshotPolicyListResponse:
type: object
properties:
limit:
type: integer
example: 20
total:
type: integer
example: 12
snapshotpolicies:
type: array
items:
$ref: '#/SnapshotPolicy'
SnapshotPolicyResponse:
type: object
properties:
snapshotpolicy:
type: object
$ref: '#/SnapshotPolicy'
SnapshotPolicyDisk:
type: object
properties:
can_delete:
$ref: '#/CanDelete'
can_update:
$ref: '#/CanUpdate'
created_at:
$ref: '#/CreatedAt'
updated_at:
$ref: '#/UpdatedAt'
status:
type: string
example: init
description: 状态
snapshotpolicy_id:
type: string
example: -be8b-4f0f-8885-797930266c6539210785
description: 自动快照策略ID
disk_id:
type: string
example: f7749379-34b1-4219-8835-257615cf34f6
description: 磁盘ID
disk:
$ref: 'disk.yaml#/Disk'
SnapshotPolicyDiskResponse:
type: object
properties:
snapshotpolicydisk:
type: object
$ref: '#/SnapshotPolicyDisk'
SnapshotPolicyDiskListResponse:
type: object
properties:
total:
type: integer
example: 20
snapshotpolicydisks:
type: array
items:
$ref: '#/SnapshotPolicyDisk'
SnapshotPolicyBindDisk:
type: object
required:
- disk.0
properties:
disk.0:
type: string
example: vv100455-79ef-43a3-8fc3-23adc74b8b87
description: 待绑定的disk的ID
disk.1:
type: string
example: dd100399-79ef-43a3-8fc3-23adc74b8b87
description: 待绑定的disk的ID
SnapshotPolicyCache:
type: object
required:
- region_id
- provider_id
properties:
region_id:
type: string
example: d2ea8591-68b2-4066-802d-c896d1828417
description: Region ID
provider_id:
type: string
example: 42fde9ca-8642-4318-8c84-2ead0bdc78d2
description: Provider ID

View File

@@ -32,4 +32,4 @@ post:
$ref: "../schemas/serversku.yaml#ServerSkuResponse"
tags:
- serverskus
- serverskus

View File

@@ -0,0 +1,16 @@
post:
summary: 批量绑定磁盘
parameters:
- $ref: '../parameters/snapshotpolicy.yaml#/snapshotpolicyId'
- in: body
name: disks
required: true
schema:
$ref: '../schemas/snapshotpolicy.yaml#/SnapshotPolicyBindDisk'
responses:
200:
description: 自动快照策略
schema:
$ref: '../schemas/snapshotpolicy.yaml#/SnapshotPolicyResponse'
tags:
- snapshotpolicy

View File

@@ -0,0 +1,17 @@
post:
summary: 将本地的自动快照策略同步到云上
parameters:
- $ref: '../parameters/snapshotpolicy.yaml#/snapshotpolicyId'
- in: body
name: snapshotpolicy
required: true
schema:
$ref: '../schemas/snapshotpolicy.yaml#/SnapshotPolicyCache'
responses:
200:
description: 自动快照策略
schema:
$ref: '../schemas/snapshotpolicy.yaml#/SnapshotPolicyResponse'
tags:
- snapshotpolicy

View File

@@ -0,0 +1,32 @@
get:
summary: 按指定条件列出快照策略
parameters:
- $ref: "../parameters/common.yaml#/offset"
- $ref: "../parameters/common.yaml#/limit"
- $ref: "../parameters/snapshotpolicy.yaml#/retention_days"
- $ref: "../parameters/snapshotpolicy.yaml#/repeat_weekdays"
- $ref: "../parameters/snapshotpolicy.yaml#/time_points"
responses:
200:
description: 快照策略列表信息
schema:
$ref: "../schemas/snapshotpolicy.yaml#/SnapshotPolicyListResponse"
tags:
- snapshotpolicy
post:
summary: 创建自动快照策略
parameters:
- in: body
name: snapshotpolicy
required: true
schema:
$ref: '../schemas/snapshotpolicy.yaml#/SnapshotPolicyCreate'
responses:
200:
description: 新建自动快照策略的信息
schema:
$ref: '../schemas/snapshotpolicy.yaml#/SnapshotPolicyResponse'
tags:
- snapshotpolicy

View File

@@ -0,0 +1,22 @@
get:
summary: 获取指定自动快照策略信息
parameters:
- $ref: "../parameters/snapshotpolicy.yaml#/snapshotpolicyId"
responses:
200:
description: 自动快照策略信息
schema:
$ref: "../schemas/snapshotpolicy.yaml#/SnapshotPolicyResponse"
tags:
- snapshotpolicy
delete:
summary: 删除指定自动快照
parameters:
- $ref: '../parameters/snapshotpolicy.yaml#/snapshotpolicyId'
responses:
200:
schema:
$ref: '../schemas/snapshotpolicy.yaml#/SnapshotPolicyResponse'
tags:
- snapshotpolicy

View File

@@ -0,0 +1,11 @@
get:
summary: 列出指定磁盘下所有绑定的自动快照策略
parameters:
- $ref: '../parameters/snapshotpolicy.yaml#/diskId'
responses:
200:
description: 自动快照策略ID列表
schema:
$ref: '../schemas/snapshotpolicy.yaml#/SnapshotPolicyDiskListResponse'
tags:
- snapshotpolicy

View File

@@ -0,0 +1,11 @@
get:
summary: 列出指定自动快照策略所有绑定的磁盘
parameters:
- $ref: '../parameters/snapshotpolicy.yaml#/snapshotpolicyId'
responses:
200:
description: 自动快照策略ID列表
schema:
$ref: '../schemas/snapshotpolicy.yaml#/SnapshotPolicyDiskListResponse'
tags:
- snapshotpolicy

View File

@@ -0,0 +1,23 @@
post:
summary: 绑定指定磁盘和自动快照策略
parameters:
- $ref: '../parameters/snapshotpolicy.yaml#/diskId'
- $ref: '../parameters/snapshotpolicy.yaml#/snapshotpolicyId'
responses:
200:
schema:
$ref: '../schemas/snapshotpolicy.yaml#/SnapshotPolicyDiskResponse'
tags:
- snapshotpolicy
delete:
summary: 解绑指定磁盘和自动快照策略
parameters:
- $ref: '../parameters/snapshotpolicy.yaml#/diskId'
- $ref: '../parameters/snapshotpolicy.yaml#/snapshotpolicyId'
responses:
200:
schema:
$ref: '../schemas/snapshotpolicy.yaml#/SnapshotPolicyDiskResponse'
tags:
- snapshotpolicy

View File

@@ -0,0 +1,16 @@
post:
summary: 批量解绑磁盘
parameters:
- $ref: '../parameters/snapshotpolicy.yaml#/snapshotpolicyId'
- in: body
name: disks
required: true
schema:
$ref: '../schemas/snapshotpolicy.yaml#/SnapshotPolicyBindDisk'
responses:
200:
description: 自动快照策略
schema:
$ref: '../schemas/snapshotpolicy.yaml#/SnapshotPolicyResponse'
tags:
- snapshotpolicy

47
go.mod
View File

@@ -4,7 +4,7 @@ go 1.12
require (
github.com/360EntSecGroup-Skylar/excelize v1.4.0
github.com/Azure/azure-sdk-for-go v19.1.0+incompatible
github.com/Azure/azure-sdk-for-go v36.1.0+incompatible
github.com/Azure/go-autorest v10.15.5+incompatible
github.com/DataDog/dd-trace-go v0.6.1 // indirect
github.com/DataDog/zstd v1.3.4 // indirect
@@ -27,13 +27,10 @@ require (
github.com/c-bata/go-prompt v0.2.1
github.com/ceph/go-ceph v0.0.0-20181217221554-e32f9f0f2e94
github.com/coredns/coredns v1.3.0
github.com/coreos/bbolt v1.3.3 // indirect
github.com/coreos/etcd v3.3.10+incompatible // indirect
github.com/coreos/go-semver v0.3.0 // indirect
github.com/coreos/go-systemd v0.0.0-20190620071333-e64a0ec8b42a // indirect
github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f // indirect
github.com/denisenkom/go-mssqldb v0.0.0-20190806190131-db2462fef53b // indirect
github.com/dgrijalva/jwt-go v3.2.0+incompatible // indirect
github.com/dimchansky/utfbom v1.1.0 // indirect
github.com/dnaeon/go-vcr v1.0.1 // indirect
github.com/dnstap/golang-dnstap v0.0.0-20170829151710-2cf77a2b5e11 // indirect
@@ -56,10 +53,7 @@ require (
github.com/golang-plus/testing v1.0.0 // indirect
github.com/golang-plus/uuid v1.0.0
github.com/golang/groupcache v0.0.0-20190129154638-5b532d6fd5ef // indirect
github.com/golang/protobuf v1.3.1
github.com/google/btree v1.0.0 // indirect
github.com/google/go-querystring v1.0.0 // indirect
github.com/google/gofuzz v0.0.0-20170612174753-24818f796faf // indirect
github.com/golang/protobuf v1.3.2
github.com/google/gopacket v1.1.17
github.com/google/uuid v1.1.0 // indirect
github.com/googleapis/gnostic v0.2.0 // indirect
@@ -69,9 +63,6 @@ require (
github.com/gorilla/websocket v1.4.0
github.com/gosuri/uitable v0.0.0-20160404203958-36ee7e946282
github.com/gregjones/httpcache v0.0.0-20181110185634-c63ab54fda8f // indirect
github.com/grpc-ecosystem/go-grpc-middleware v1.0.0 // indirect
github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0 // indirect
github.com/grpc-ecosystem/grpc-gateway v1.9.2 // indirect
github.com/grpc-ecosystem/grpc-opentracing v0.0.0-20180507213350-8e809c8a8645 // indirect
github.com/hako/durafmt v0.0.0-20180520121703-7b7ae1e72ead
github.com/huandu/xstrings v1.2.0 // indirect
@@ -79,13 +70,10 @@ require (
github.com/jinzhu/gorm v1.9.1
github.com/jinzhu/inflection v1.0.0 // indirect
github.com/jinzhu/now v1.0.1 // indirect
github.com/jonboulle/clockwork v0.1.0 // indirect
github.com/json-iterator/go v1.1.5 // indirect
github.com/koding/websocketproxy v0.0.0-20181220232114-7ed82d81a28c
github.com/kr/pty v1.1.3
github.com/lib/pq v1.2.0 // indirect
github.com/libvirt/libvirt-go-xml v5.2.0+incompatible
github.com/marstr/guid v1.1.0 // indirect
github.com/mattn/go-runewidth v0.0.4 // indirect
github.com/mattn/go-sqlite3 v1.10.0 // indirect
github.com/mattn/go-tty v0.0.0-20181127064339-e4f871175a2f // indirect
@@ -95,11 +83,8 @@ require (
github.com/mholt/caddy v0.10.11
github.com/miekg/dns v1.1.1
github.com/minio/minio-go v6.0.14+incompatible
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742 // indirect
github.com/mohae/deepcopy v0.0.0-20170929034955-c48cc78d4826 // indirect
github.com/moul/http2curl v1.0.0
github.com/mozillazg/go-httpheader v0.2.1 // indirect
github.com/mozillazg/go-pinyin v0.15.0
github.com/opentracing-contrib/go-observer v0.0.0-20170622124052-a52f23424492 // indirect
github.com/opentracing/opentracing-go v1.0.2 // indirect
@@ -114,28 +99,23 @@ require (
github.com/shirou/gopsutil v2.18.10+incompatible
github.com/shirou/w32 v0.0.0-20160930032740-bb4de0191aa4 // indirect
github.com/skip2/go-qrcode v0.0.0-20190110000554-dc11ecdae0a9
github.com/soheilhy/cmux v0.1.4 // indirect
github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72 // indirect
github.com/spaolacci/murmur3 v1.1.0 // indirect
github.com/spf13/pflag v1.0.3 // indirect
github.com/stretchr/testify v1.3.0
github.com/tencentcloud/tencentcloud-sdk-go v0.0.0-20181108132626-805d01dd0e2e
github.com/tencentyun/cos-go-sdk-v5 v0.0.0-20190717101923-c5c1f9751e7f
github.com/tencentyun/cos-go-sdk-v5 v0.0.0-20191108095731-8ca4b370cde4
github.com/tinylib/msgp v1.1.0 // indirect
github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5 // indirect
github.com/tredoe/osutil v0.0.0-20161130133508-7d3ee1afa71c
github.com/ugorji/go v0.0.0-20161130061742-9c7f9b7a2bc3 // indirect
github.com/vmihailenco/msgpack v4.0.4+incompatible
github.com/vmware/govmomi v0.19.0
github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2 // indirect
go.etcd.io/bbolt v1.3.3 // indirect
go.etcd.io/etcd v3.3.10+incompatible
go.etcd.io/etcd v0.5.0-alpha.5.0.20191023171146-3cf2f69b5738
go.uber.org/atomic v1.4.0 // indirect
go.uber.org/multierr v1.1.0 // indirect
go.uber.org/zap v1.10.0 // indirect
golang.org/x/crypto v0.0.0-20190621222207-cc06ce4a13d4
golang.org/x/net v0.0.0-20190603091049-60506f45cf65
golang.org/x/sys v0.0.0-20190620070143-6f217b454f45
google.golang.org/grpc v1.19.0
golang.org/x/net v0.0.0-20190813141303-74dc4d7220e7
golang.org/x/sys v0.0.0-20190826190057-c7b8b68b1456
google.golang.org/grpc v1.23.1
gopkg.in/asn1-ber.v1 v1.0.0-20181015200546-f715ec2f112d // indirect
gopkg.in/go-playground/assert.v1 v1.2.1 // indirect
gopkg.in/go-playground/validator.v8 v8.18.2 // indirect
@@ -148,11 +128,12 @@ require (
k8s.io/client-go v9.0.0+incompatible
k8s.io/klog v0.1.0 // indirect
k8s.io/kubernetes v1.12.3
sigs.k8s.io/yaml v1.1.0 // indirect
yunion.io/x/jsonutils v0.0.0-20190625054549-a964e1e8a051
yunion.io/x/jsonutils v0.0.0-20191005115334-bb1c187fc0e7
yunion.io/x/log v0.0.0-20190629062853-9f6483a7103d
yunion.io/x/pkg v0.0.0-20190726033806-b564cfdcc224
yunion.io/x/s3cli v0.0.0-20190812034537-1e65a6651a3e
yunion.io/x/sqlchemy v0.0.0-20190813100902-cfa59aeabbfe
yunion.io/x/pkg v0.0.0-20191112153320-4346cc308eed
yunion.io/x/s3cli v0.0.0-20190917004522-13ac36d8687e
yunion.io/x/sqlchemy v0.0.0-20191119025555-5948646b39e6
yunion.io/x/structarg v0.0.0-20190809075558-115bed041de3
)
replace github.com/ceph/go-ceph v0.0.0-20181217221554-e32f9f0f2e94 => github.com/yunionio/go-ceph v0.0.0-20190912101231-6f05a06b3859

113
go.sum
View File

@@ -6,8 +6,8 @@ cloud.google.com/go v0.37.4/go.mod h1:NHPJ89PdicEuT9hdPXMROBD91xc5uRDxsMtSB16k7h
github.com/360EntSecGroup-Skylar/excelize v1.4.0 h1:43rak9uafmwSJpXfFO1heKQph8tP3nlfWJWFQQtW1R0=
github.com/360EntSecGroup-Skylar/excelize v1.4.0/go.mod h1:R8KYLmGns0vDPe6/HyphW0mzW+MFexlGDafU0ykVEnU=
github.com/Azure/azure-sdk-for-go v5.0.0-beta.0.20161118192335-3b1282355199+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc=
github.com/Azure/azure-sdk-for-go v19.1.0+incompatible h1:ysqLW+tqZjJWOTE74heH/pDRbr4vlN3yV+dqQYgpyxw=
github.com/Azure/azure-sdk-for-go v19.1.0+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc=
github.com/Azure/azure-sdk-for-go v36.1.0+incompatible h1:smHlbChr/JDmsyUqELZXLs0YIgpXecIGdUibuc2983s=
github.com/Azure/azure-sdk-for-go v36.1.0+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc=
github.com/Azure/go-autorest v10.15.5+incompatible h1:vdxx6wM1rVkKt/3niByPVjguoLWkWImOcJNvEykgBzY=
github.com/Azure/go-autorest v10.15.5+incompatible/go.mod h1:r+4oMnoxhatjLLJ6zxSWATqVooLgysK6ZNox3g/xq24=
github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
@@ -17,6 +17,7 @@ github.com/DataDog/zstd v1.3.4 h1:LAGHkXuvC6yky+C2CUG2tD7w8QlrUwpue8XwIh0X4AY=
github.com/DataDog/zstd v1.3.4/go.mod h1:1jcaCB/ufaK+sKp1NBhlGmpz41jOoPQ35bpF36t7BBo=
github.com/Microsoft/azure-vhd-utils v0.0.0-20181115010904-44cbada2ece3 h1:gImoAO1xAcC1oDlYmD/X7dggsodGf2DFJOVE5m0ssms=
github.com/Microsoft/azure-vhd-utils v0.0.0-20181115010904-44cbada2ece3/go.mod h1:u0H9gMieFLxkUy8RS0X8VbFWyPs2815qQAaitRbj6x0=
github.com/QcloudApi/qcloud_sign_golang v0.0.0-20141224014652-e4130a326409/go.mod h1:1pk82RBxDY/JZnPQrtqHlUFfCctgdorsd9M06fMynOM=
github.com/RoaringBitmap/roaring v0.4.7/go.mod h1:8khRDP4HmeXns4xIj9oGrKSz7XTQiJx2zgh7AcNke4w=
github.com/RoaringBitmap/roaring v0.4.16 h1:NholfewybRLOwACgfqfzn/N5xa6keKNs4fP00t0cwLo=
github.com/RoaringBitmap/roaring v0.4.16/go.mod h1:8khRDP4HmeXns4xIj9oGrKSz7XTQiJx2zgh7AcNke4w=
@@ -78,6 +79,9 @@ github.com/baiyubin/aliyun-sts-go-sdk v0.0.0-20180326062324-cfa1a18b161f h1:ZNv7
github.com/baiyubin/aliyun-sts-go-sdk v0.0.0-20180326062324-cfa1a18b161f/go.mod h1:AuiFmCCPBSrqvVMvuqFuk0qogytodnVFVSN5CeJB8Gc=
github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973 h1:xJ4a3vCFaGF/jqvzLMYoU8P317H5OQ+Via4RmuPwCS0=
github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q=
github.com/beorn7/perks v1.0.0 h1:HWo1m869IqiPhD389kmkxeTalrjNbbJTC8LXupb+sl0=
github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8=
github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs=
github.com/bitly/go-simplejson v0.5.0 h1:6IH+V8/tVMab511d5bn4M7EwGXZf9Hj6i2xSwkNEM+Y=
github.com/bitly/go-simplejson v0.5.0/go.mod h1:cXHtHw4XUPsvGaxgjIAn8PhEWG9NfngEKAMDJEczWVA=
github.com/bmizerany/assert v0.0.0-20160611221934-b7ed37b82869 h1:DDGfHa7BWjL4YnC6+E63dPcxHo2sUxDIu8g3QgEJdRY=
@@ -90,21 +94,21 @@ github.com/bradfitz/iter v0.0.0-20140124041915-454541ec3da2 h1:1B/+1BcRhOMG1KH/Y
github.com/bradfitz/iter v0.0.0-20140124041915-454541ec3da2/go.mod h1:PyRFw1Lt2wKX4ZVSQ2mk+PeDa1rxyObEDlApuIsUKuo=
github.com/c-bata/go-prompt v0.2.1 h1:HTPxmnfY4y5x3Myo7Gq4ce989jfnvZIBgdBp6y8bjYM=
github.com/c-bata/go-prompt v0.2.1/go.mod h1:VzqtzE2ksDBcdln8G7mk2RX9QyGjH+OVqOCSiVIqS34=
github.com/ceph/go-ceph v0.0.0-20181217221554-e32f9f0f2e94 h1:m3fyIqe28zGggNHc9hE2R3Zk/CJC3Lg8KFSNfXu8mpk=
github.com/ceph/go-ceph v0.0.0-20181217221554-e32f9f0f2e94/go.mod h1:DhWkbjUxN0QRc0xQvpI9QhzqQSzYysRuZVcqSfiStds=
github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw=
github.com/cockroachdb/datadriven v0.0.0-20190809214429-80d97fb3cbaa h1:OaNxuTZr7kxeODyLWsRMC+OD03aFUH+mW6r2d+MWa5Y=
github.com/cockroachdb/datadriven v0.0.0-20190809214429-80d97fb3cbaa/go.mod h1:zn76sxSg3SzpJ0PPJaLDCu+Bu0Lg3sKTORVIj19EIF8=
github.com/coredns/coredns v1.3.0 h1:Ubjr8ZrOpEj95/A9dqQqQAG2k5DWEFdg2ZB3tUXuULA=
github.com/coredns/coredns v1.3.0/go.mod h1:zASH/MVDgR6XZTbxvOnsZfffS+31vg6Ackf/wo1+AM0=
github.com/coreos/bbolt v1.3.3 h1:n6AiVyVRKQFNb6mJlwESEvvLoDyiTzXX7ORAUlkeBdY=
github.com/coreos/bbolt v1.3.3/go.mod h1:iRUV2dpdMOn7Bo10OQBFzIJO9kkE559Wcmn+qkEiiKk=
github.com/coreos/etcd v3.3.10+incompatible h1:jFneRYjIvLMLhDLCzuTuU4rSJUjRplcJQ7pD7MnhC04=
github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE=
github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk=
github.com/coreos/go-semver v0.3.0 h1:wkHLiw0WNATZnSG7epLsujiMCgPAc9xhjJ4tgnAxmfM=
github.com/coreos/go-semver v0.3.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk=
github.com/coreos/go-systemd v0.0.0-20180511133405-39ca1b05acc7/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4=
github.com/coreos/go-systemd v0.0.0-20190620071333-e64a0ec8b42a h1:W8b4lQ4tFF21aspRGoBuCNV6V2fFJBF+pm1J6OY8Lys=
github.com/coreos/go-systemd v0.0.0-20190620071333-e64a0ec8b42a/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4=
github.com/coreos/pkg v0.0.0-20160727233714-3ac0863d7acf/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA=
github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f h1:lBNOc5arjvs8E5mO2tbpBpLoyyu8B6e44T7hJy6potg=
github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA=
github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
@@ -119,6 +123,7 @@ github.com/dnaeon/go-vcr v1.0.1/go.mod h1:aBB1+wY4s93YsC3HHjMBMrwTj2R9FHDzUr9KyG
github.com/dnstap/golang-dnstap v0.0.0-20170829151710-2cf77a2b5e11 h1:m8nX8hsUghn853BJ5qB0lX+VvS6LTJPksWyILFZRYN4=
github.com/dnstap/golang-dnstap v0.0.0-20170829151710-2cf77a2b5e11/go.mod h1:s1PfVYYVmTMgCSPtho4LKBDecEHJWtiVDPNv78Z985U=
github.com/docopt/docopt-go v0.0.0-20180111231733-ee0de3bc6815/go.mod h1:WwZ+bS3ebgob9U8Nd0kOddGdZWjyMGR8Wziv+TBNwSE=
github.com/dustin/go-humanize v0.0.0-20171111073723-bb3d318650d4/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk=
github.com/dustin/go-humanize v0.0.0-20180421182945-02af3965c54e/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk=
github.com/dustin/go-humanize v1.0.0 h1:VSnTsYCnlFHaM2/igO1h6X3HA71jcobQuxemgkq4zYo=
github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk=
@@ -171,6 +176,8 @@ github.com/gofrs/uuid v3.2.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRx
github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ=
github.com/gogo/protobuf v1.2.0 h1:xU6/SpYbvkNYiptHJYEDRseDLvYE7wSqhYYNy0QSUzI=
github.com/gogo/protobuf v1.2.0/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ=
github.com/gogo/protobuf v1.2.1 h1:/s5zKNz0uPFCZ5hddgPdo2TK2TVrUNMn0OOX8/aZMTE=
github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zVXpSg4=
github.com/golang-plus/errors v1.0.0 h1:9Rh4itnph6OYO7wm9u3FUTLMFMKCoL07+bLiYKELxWw=
github.com/golang-plus/errors v1.0.0/go.mod h1:YTFZjOTBcUFieeZe4q+7Umfu/sceSr3XQyBIkTkzpd8=
github.com/golang-plus/testing v1.0.0 h1:azmFWFV44LHK/j/jAkNTbzB2G2b6HdmqF358r73m8kg=
@@ -179,6 +186,7 @@ github.com/golang-plus/uuid v1.0.0 h1:ga84hG89vda++AGpup4N/cbfbM3O4d3R5ON9/jcN6A
github.com/golang-plus/uuid v1.0.0/go.mod h1:pBDDRrdgRHHqyYlj1d1i2gwyBq62Zc+sP2cDiCDkBLI=
github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b h1:VKtxabqXZkF25pY9ekfRL6a582T4P37/31XEstQ5p58=
github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q=
github.com/golang/groupcache v0.0.0-20160516000752-02826c3e7903/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc=
github.com/golang/groupcache v0.0.0-20190129154638-5b532d6fd5ef h1:veQD95Isof8w9/WXiA+pa3tz3fJXkt5B7QaRBrM62gk=
github.com/golang/groupcache v0.0.0-20190129154638-5b532d6fd5ef/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc=
github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A=
@@ -187,6 +195,8 @@ github.com/golang/protobuf v1.2.0 h1:P3YflyNX/ehuJFLhxviNdFxQPkGK5cDcApsge1SqnvM
github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
github.com/golang/protobuf v1.3.1 h1:YF8+flBXS5eO826T4nzqPrxfhQThhXl0YzfuUPu4SBg=
github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
github.com/golang/protobuf v1.3.2 h1:6nsPYzhq5kReh6QImI3k5qWzO4PEbvbIW2cwSfR/6xs=
github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db h1:woRePGFeVFfLKN/pOkfl+p/TAqKOfFu+7KPlMVpok/w=
github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q=
github.com/google/btree v0.0.0-20180124185431-e89373fe6b4a/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ=
@@ -198,12 +208,13 @@ github.com/google/go-cmp v0.3.0 h1:crn/baboCvb5fXaQ0IJ1SGTsTVrWpDsCWC8EGETZijY=
github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU=
github.com/google/go-querystring v1.0.0 h1:Xkwi/a1rcvNg1PPYe5vI8GbeBY/jrVuDX5ASuANWTrk=
github.com/google/go-querystring v1.0.0/go.mod h1:odCYkC5MyYFN7vkCjXpyrEuKhc/BUO6wN/zVPAxq5ck=
github.com/google/gofuzz v0.0.0-20170612174753-24818f796faf h1:+RRA9JqSOZFfKrOeqr2z77+8R2RKyh8PG66dcu1V0ck=
github.com/google/gofuzz v0.0.0-20170612174753-24818f796faf/go.mod h1:HP5RmnzzSNb993RKQDq4+1A4ia9nllfqcQFTQJedwGI=
github.com/google/gofuzz v1.0.0 h1:A8PeW59pxE9IoFRqBp37U+mSNaQoZ46F1f0f863XSXw=
github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg=
github.com/google/gopacket v1.1.17 h1:rMrlX2ZY2UbvT+sdz3+6J+pp2z+msCq9MxTU6ymxbBY=
github.com/google/gopacket v1.1.17/go.mod h1:UdDNZ1OO62aGYVnPhxT1U6aI7ukYtA/kB8vaU0diBUM=
github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs=
github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc=
github.com/google/uuid v1.0.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
github.com/google/uuid v1.1.0 h1:Jf4mxPC/ziBnoPIdpQdPJ9OeiomAUHLvxmPRSPH9m4s=
github.com/google/uuid v1.1.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg=
@@ -221,6 +232,7 @@ github.com/gorilla/context v1.1.1 h1:AWwleXJkX/nhcU9bZSnZoi3h/qGYqQAGhq6zZe/aQW8
github.com/gorilla/context v1.1.1/go.mod h1:kBGZzfjB9CEq2AlWe17Uuf7NDRt0dE0s8S51q0aT7Yg=
github.com/gorilla/mux v1.6.2 h1:Pgr17XVTNXAk3q/r4CpKzC5xBM/qW1uVLV+IhRZpIIk=
github.com/gorilla/mux v1.6.2/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs=
github.com/gorilla/websocket v0.0.0-20170926233335-4201258b820c/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ=
github.com/gorilla/websocket v1.4.0 h1:WDFjx/TMzVgy9VdMMQi2K2Emtwi2QcUQsztZ/zLaH/Q=
github.com/gorilla/websocket v1.4.0/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ=
github.com/gosuri/uilive v0.0.0-20170323041506-ac356e6e42cd/go.mod h1:qkLSc0A5EXSP6B04TrN4oQoxqFI7A8XvoXSlJi8cwk8=
@@ -229,12 +241,12 @@ github.com/gosuri/uitable v0.0.0-20160404203958-36ee7e946282 h1:KFqmdzEPbU7Uck2t
github.com/gosuri/uitable v0.0.0-20160404203958-36ee7e946282/go.mod h1:tKR86bXuXPZazfOTG1FIzvjIdXzd0mo4Vtn16vt0PJo=
github.com/gregjones/httpcache v0.0.0-20181110185634-c63ab54fda8f h1:ShTPMJQes6tubcjzGMODIVG5hlrCeImaBnZzKF2N8SM=
github.com/gregjones/httpcache v0.0.0-20181110185634-c63ab54fda8f/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA=
github.com/grpc-ecosystem/go-grpc-middleware v1.0.0 h1:Iju5GlWwrvL6UBg4zJJt3btmonfrMlCDdsejg4CZE7c=
github.com/grpc-ecosystem/go-grpc-middleware v1.0.0/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs=
github.com/grpc-ecosystem/go-grpc-middleware v1.0.1-0.20190118093823-f849b5445de4 h1:z53tR0945TRRQO/fLEVPI6SMv7ZflF0TEaTAoU7tOzg=
github.com/grpc-ecosystem/go-grpc-middleware v1.0.1-0.20190118093823-f849b5445de4/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs=
github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0 h1:Ovs26xHkKqVztRpIrF/92BcuyuQ/YW4NSIpoGtfXNho=
github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk=
github.com/grpc-ecosystem/grpc-gateway v1.9.2 h1:S+ef0492XaIknb8LMjcwgW2i3cNTzDYMmDrOThOJNWc=
github.com/grpc-ecosystem/grpc-gateway v1.9.2/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY=
github.com/grpc-ecosystem/grpc-gateway v1.9.5 h1:UImYN5qQ8tuGpGE16ZmjvcTtTw24zw1QAp/SlnNrZhI=
github.com/grpc-ecosystem/grpc-gateway v1.9.5/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY=
github.com/grpc-ecosystem/grpc-opentracing v0.0.0-20180507213350-8e809c8a8645 h1:MJG/KsmcqMwFAkh8mTnAwhyKoB+sTAnY4CACC110tbU=
github.com/grpc-ecosystem/grpc-opentracing v0.0.0-20180507213350-8e809c8a8645/go.mod h1:6iZfnjpejD4L/4DwD7NryNaJyCQdzwWwH2MWhCA90Kw=
github.com/hako/durafmt v0.0.0-20180520121703-7b7ae1e72ead h1:Y9WOGZY2nw5ksbEf5AIpk+vK52Tdg/VN/rHFRfEeeGQ=
@@ -246,6 +258,8 @@ github.com/huandu/xstrings v1.2.0 h1:yPeWdRnmynF7p+lLYz0H2tthW9lqhMJrQV/U7yy4wX0
github.com/huandu/xstrings v1.2.0/go.mod h1:DvyZB1rfVYsBIigL8HwpZgxHwXozlTgGqn63UyNX5k4=
github.com/imdario/mergo v0.3.6 h1:xTNEAn+kxVO7dTZGu0CegyqKZmoWFI0rF8UxjlB2d28=
github.com/imdario/mergo v0.3.6/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA=
github.com/inconshreveable/mousetrap v1.0.0 h1:Z8tu5sraLXCXIcARxBp/8cbvlwVa7Z1NHg9XEKhtSvM=
github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8=
github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI=
github.com/jinzhu/gorm v1.9.1 h1:lDSDtsCt5AGGSKTs8AHlSDbbgif4G4+CKJ8ETBDVHTA=
github.com/jinzhu/gorm v1.9.1/go.mod h1:Vla75njaFJ8clLU1W44h34PjIkijhjHIYnZxMqCdxqo=
@@ -257,14 +271,16 @@ github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af h1:pmfjZENx5i
github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k=
github.com/jonboulle/clockwork v0.1.0 h1:VKV+ZcuP6l3yW9doeqz6ziZGgcynBVQO+obU0+0hcPo=
github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo=
github.com/json-iterator/go v1.1.5 h1:gL2yXlmiIo4+t+y32d4WGwOjKGYcGOuyrg46vadswDE=
github.com/json-iterator/go v1.1.5/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU=
github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU=
github.com/json-iterator/go v1.1.7 h1:KfgG9LzI+pYjr4xvmz/5H4FXjokeP+rlHLhv3iH62Fo=
github.com/json-iterator/go v1.1.7/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4=
github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU=
github.com/jtolds/gls v4.2.1+incompatible h1:fSuqC+Gmlu6l/ZYAoZzx2pyucC8Xza35fpRVWLVmUEE=
github.com/jtolds/gls v4.2.1+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU=
github.com/jtolds/gls v4.20.0+incompatible h1:xdiiI2gbIgH/gLH7ADydsJ1uDOEzR8yvV7C0MuV77Wo=
github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU=
github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w=
github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q=
github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck=
github.com/koding/websocketproxy v0.0.0-20181220232114-7ed82d81a28c h1:N7A4JCA2G+j5fuFxCsJqjFU/sZe0mj8H0sSoSwbaikw=
github.com/koding/websocketproxy v0.0.0-20181220232114-7ed82d81a28c/go.mod h1:Nn5wlyECw3iJrzi0AhIWg+AJUb4PlRQVW4/3XHH1LZA=
@@ -283,13 +299,14 @@ github.com/lib/pq v1.2.0 h1:LXpIM/LZ5xGFhOpXAQUIMM1HdyqzVYM13zNdjCEEcA0=
github.com/lib/pq v1.2.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo=
github.com/libvirt/libvirt-go-xml v5.2.0+incompatible h1:ALyVpa0/lFfFaUpb5l0fNBohufmQG6jsOGRCl/nKEi8=
github.com/libvirt/libvirt-go-xml v5.2.0+incompatible/go.mod h1:oBlgD3xOA01ihiK5stbhFzvieyW+jVS6kbbsMVF623A=
github.com/marstr/guid v1.1.0 h1:/M4H/1G4avsieL6BbUwCOBzulmoeKVP5ux/3mQNnbyI=
github.com/marstr/guid v1.1.0/go.mod h1:74gB1z2wpxxInTG6yaqA7KrtM0NZ+RbrcqDvYHefzho=
github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU=
github.com/mattn/go-colorable v0.1.2 h1:/bC9yWikZXAL9uJdulbSfyVNIR3n3trXl+v8+1sx8mU=
github.com/mattn/go-colorable v0.1.2/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE=
github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4=
github.com/mattn/go-isatty v0.0.4/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4=
github.com/mattn/go-isatty v0.0.8 h1:HLtExJ+uU2HOZ+wI0Tt5DtUDrx8yhUqDcp7fYERX4CE=
github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s=
github.com/mattn/go-runewidth v0.0.2/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU=
github.com/mattn/go-runewidth v0.0.4 h1:2BvfKmzob6Bmd4YsL0zygOqfdFnK7GR4QL06Do4/p7Y=
github.com/mattn/go-runewidth v0.0.4/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU=
github.com/mattn/go-sqlite3 v1.7.0/go.mod h1:FPy6KqzDD04eiIsT53CuJW3U88zkxoIYsOqkbpncsNc=
@@ -321,10 +338,13 @@ github.com/minio/minio-go/v6 v6.0.33 h1:CNThMAZ9bN6OEIP8DulqlYpaXKJ18rgG/Cqm14Q4
github.com/minio/minio-go/v6 v6.0.33/go.mod h1:vaNT59cWULS37E+E9zkuN/BVnKHyXtVGS+b04Boc66Y=
github.com/mitchellh/go-homedir v1.1.0 h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG+4E0Y=
github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0=
github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg=
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742 h1:Esafd1046DLDQ0W1YjYsBW+p8U2u7vzgW2SQVmlNazg=
github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0=
github.com/modern-go/reflect2 v1.0.1 h1:9f412s+6RmYXLWZSEzVVgPGK7C2PphHj5RJrvfx9AWI=
github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0=
github.com/mohae/deepcopy v0.0.0-20170929034955-c48cc78d4826 h1:RWengNIwukTxcDr9M+97sNutRR1RKhG96O6jWumTTnw=
github.com/mohae/deepcopy v0.0.0-20170929034955-c48cc78d4826/go.mod h1:TaXosZuwdSHYgviHp1DAtfrULt5eUgsSMsZf+YrPgl8=
github.com/moul/http2curl v1.0.0 h1:dRMWoAtb+ePxMlLkrCbAqh4TlPHXvoGUSQ323/9Zahs=
@@ -336,6 +356,7 @@ github.com/mozillazg/go-pinyin v0.15.0/go.mod h1:bO+dztNW6O2lSJdYLha7LO3bujXzjjU
github.com/mschoch/smat v0.0.0-20160514031455-90eadee771ae h1:VeRdUYdCw49yizlSbMEn2SZ+gT+3IUKx8BqxyQdz+BY=
github.com/mschoch/smat v0.0.0-20160514031455-90eadee771ae/go.mod h1:qAyveg+e4CE+eKJXWVjKXM4ck2QobLqTDytGJbLLhJg=
github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U=
github.com/olekukonko/tablewriter v0.0.0-20170122224234-a0225b3f23b5/go.mod h1:vsDQFd/mU46D+Z4whnwzcISnGGzXWMclvtLoiIKAKIo=
github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
github.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY=
@@ -366,15 +387,23 @@ github.com/pquerna/otp v1.2.0/go.mod h1:dkJfzwRKNiegxyNb54X/3fLwhCynbMspSyWKnvi1
github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw=
github.com/prometheus/client_golang v0.9.3-0.20190127221311-3c4408c8b829 h1:D+CiwcpGTW6pL6bv6KI3KbyEyCKyS+1JWS2h8PNDnGA=
github.com/prometheus/client_golang v0.9.3-0.20190127221311-3c4408c8b829/go.mod h1:p2iRAGwDERtqlqzRXnrOVns+ignqQo//hLXqYxZYVNs=
github.com/prometheus/client_golang v1.0.0 h1:vrDKnkGzuGvhNAL56c7DBz29ZL+KxnoR0x7enabFceM=
github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo=
github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910 h1:idejC8f05m9MGOsuEi1ATq9shN03HrxNkD/luQvxCv8=
github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo=
github.com/prometheus/client_model v0.0.0-20190115171406-56726106282f h1:BVwpUVJDADN2ufcGik7W992pyps0wZ888b/y9GXcLTU=
github.com/prometheus/client_model v0.0.0-20190115171406-56726106282f/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo=
github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90 h1:S/YWwWx/RA8rT8tKFRuGUZhuA90OyIBpPCXkcbwU8DE=
github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA=
github.com/prometheus/common v0.2.0 h1:kUZDBDTdBVBYBj5Tmh2NZLlF60mfjA27rM34b+cVwNU=
github.com/prometheus/common v0.2.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4=
github.com/prometheus/common v0.4.1 h1:K0MGApIoQvMw27RTdJkPbr3JZ7DNbtxQNyi5STVM6Kw=
github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4=
github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk=
github.com/prometheus/procfs v0.0.0-20190117184657-bf6a532e95b1 h1:/K3IL0Z1quvmJ7X0A1AwNEK7CRkVK3YwfOU/QAL4WGg=
github.com/prometheus/procfs v0.0.0-20190117184657-bf6a532e95b1/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk=
github.com/prometheus/procfs v0.0.2 h1:6LJUbpNm42llc4HRCuvApCSWB/WfhuNo9K98Q9sNGfs=
github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA=
github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a h1:9ZKAASQSHhDYGoxY8uLVpewe1GDZ2vu2Tr/vTdVAkFQ=
github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4=
github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg=
@@ -407,6 +436,11 @@ github.com/soheilhy/cmux v0.1.4 h1:0HKaf1o97UwFjHH9o5XsHUOF+tqmdA7KEzXLpiyaw0E=
github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM=
github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72 h1:qLC7fQah7D6K1B0ujays3HV9gkFtllcxhzImRR7ArPQ=
github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA=
github.com/spaolacci/murmur3 v1.1.0 h1:7c1g84S4BPRrfL5Xrdp6fOJ206sU9y293DDHaoy0bLI=
github.com/spaolacci/murmur3 v1.1.0/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA=
github.com/spf13/cobra v0.0.3 h1:ZlrZ4XsMRm04Fr5pSFxBgfND2EBVa1nLpiy1stUsX/8=
github.com/spf13/cobra v0.0.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ=
github.com/spf13/pflag v1.0.1/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4=
github.com/spf13/pflag v1.0.3 h1:zPAT6CGy6wXeQ7NtTnaTerfKOsV6V6F8agHXFiazDkg=
github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4=
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
@@ -419,19 +453,21 @@ github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UV
github.com/syncthing/syncthing v0.14.48-rc.4/go.mod h1:nw3siZwHPA6M8iSfjDCWQ402eqvEIasMQOE8nFOxy7M=
github.com/tencentcloud/tencentcloud-sdk-go v0.0.0-20181108132626-805d01dd0e2e h1:CtKVGXKh2bfmepZ/YogAjvL/CrSy9NGZET500K7arf4=
github.com/tencentcloud/tencentcloud-sdk-go v0.0.0-20181108132626-805d01dd0e2e/go.mod h1:0PfYow01SHPMhKY31xa+EFz2RStxIqj6JFAJS+IkCi4=
github.com/tencentyun/cos-go-sdk-v5 v0.0.0-20190717101923-c5c1f9751e7f h1:TzE7Cs9HhTyfot4WIoMnbD1rWfD4Jkwy2M3Zs66CaRE=
github.com/tencentyun/cos-go-sdk-v5 v0.0.0-20190717101923-c5c1f9751e7f/go.mod h1:/4BhymH1yO6ljUGQgcKsd7L3W+pdKRxoRiOuoZPLnGg=
github.com/tencentyun/cos-go-sdk-v5 v0.0.0-20191108095731-8ca4b370cde4 h1:wVKDVTKxaf0ll8ONv22Q+cazYSSmcWt7JJOeQD0LoKQ=
github.com/tencentyun/cos-go-sdk-v5 v0.0.0-20191108095731-8ca4b370cde4/go.mod h1:wk2XFUg6egk4tSDNZtXeKfe2G6690UVyt163PuUxBZk=
github.com/texttheater/golang-levenshtein v0.0.0-20180516184445-d188e65d659e h1:T5PdfK/M1xyrHwynxMIVMWLS7f/qHwfslZphxtGnw7s=
github.com/texttheater/golang-levenshtein v0.0.0-20180516184445-d188e65d659e/go.mod h1:XDKHRm5ThF8YJjx001LtgelzsoaEcvnA7lVWz9EeX3g=
github.com/tinylib/msgp v1.0.2/go.mod h1:+d+yLhGm8mzTaHzB+wgMYrodPfmZrzkirds8fDWklFE=
github.com/tinylib/msgp v1.1.0 h1:9fQd+ICuRIu/ue4vxJZu6/LzxN0HwMds2nq/0cFvxHU=
github.com/tinylib/msgp v1.1.0/go.mod h1:+d+yLhGm8mzTaHzB+wgMYrodPfmZrzkirds8fDWklFE=
github.com/tmc/grpc-websocket-proxy v0.0.0-20170815181823-89b8d40f7ca8/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U=
github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5 h1:LnC5Kc/wtumK+WB441p7ynQJzVuNRJiqddSIE3IlSEQ=
github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U=
github.com/tredoe/osutil v0.0.0-20161130133508-7d3ee1afa71c h1:5q7IHeqvAA4hWR1CfpTOS7RFsTDC36TaSZ8Dvc00bPk=
github.com/tredoe/osutil v0.0.0-20161130133508-7d3ee1afa71c/go.mod h1:M/I710pXKQToMdqt/D+mJ4QsnW6WDaajyB6DWFmDXBs=
github.com/ugorji/go v0.0.0-20161130061742-9c7f9b7a2bc3 h1:KfqgRfYvGRyKOQUx8GphSC8D6vVoBndzco3rESP8I4k=
github.com/ugorji/go v0.0.0-20161130061742-9c7f9b7a2bc3/go.mod h1:hnLbHMwcvSihnDhEfx2/BzKp2xb0Y+ErdfYcrs9tkJQ=
github.com/urfave/cli v1.20.0/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA=
github.com/vmihailenco/msgpack v4.0.4+incompatible h1:dSLoQfGFAo3F6OoNhwUmLwVgaUXK79GlxNBwueZn0xI=
github.com/vmihailenco/msgpack v4.0.4+incompatible/go.mod h1:fy3FlTQTDXWkZ7Bh6AcGMlsjHatGryHQYUTf1ShIgkk=
github.com/vmware/govmomi v0.19.0 h1:CR6tEByWCPOnRoRyhLzuHaU+6o2ybF3qufNRWS/MGrY=
@@ -444,11 +480,14 @@ github.com/willf/bloom v2.0.3+incompatible h1:QDacWdqcAUI1MPOwIQZRy9kOR7yxfyEmxX
github.com/willf/bloom v2.0.3+incompatible/go.mod h1:MmAltL9pDMNTrvUkxdg0k0q5I0suxmuwp3KbyrZLOZ8=
github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2 h1:eY9dn8+vbi4tKz5Qo6v2eYzo7kUS51QINcR5jNpbZS8=
github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU=
github.com/yunionio/go-ceph v0.0.0-20190912101231-6f05a06b3859 h1:wu596gn6sV3j5wy+GDfiG8nwtzIDpalJihfmC/TjoYc=
github.com/yunionio/go-ceph v0.0.0-20190912101231-6f05a06b3859/go.mod h1:8XuBae5AzsgotLArJSewMruYVaQs8AlfsK5jBCG8T9Y=
go.etcd.io/bbolt v1.3.3 h1:MUGmc65QhB3pIlaQ5bB4LwqSj6GIonVJXpZiaKNyaKk=
go.etcd.io/bbolt v1.3.3/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU=
go.etcd.io/etcd v3.3.10+incompatible h1:qXVcIR1kU3CYLD8zXDseOmBNwg0uaui53e4Wg4uj0rk=
go.etcd.io/etcd v3.3.10+incompatible/go.mod h1:yaeTdrJi5lOmYerz05bd8+V7KubZs8YSFZfzsF9A6aI=
go.etcd.io/etcd v0.5.0-alpha.5.0.20191023171146-3cf2f69b5738 h1:lWF4f9Nypl1ZqSb4gLeh/DGvBYVaUYHuiB93teOmwgc=
go.etcd.io/etcd v0.5.0-alpha.5.0.20191023171146-3cf2f69b5738/go.mod h1:dnLIgRNXwCJa5e+c6mIZCrds/GIG4ncV9HhK5PX7jPg=
go.opencensus.io v0.20.1/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk=
go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE=
go.uber.org/atomic v1.4.0 h1:cxzIVoETapQEqDhQu3QfnvXAV4AlzcvUCxkVUFw3+EU=
go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE=
go.uber.org/multierr v1.1.0 h1:HoEmRHQPVSqub6w2z2d2EOVs2fjyFRGyofhKuyDq0QI=
@@ -468,6 +507,7 @@ golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL
golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE=
golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU=
golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE=
golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc=
golang.org/x/net v0.0.0-20180524181706-dfa909b99c79/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
@@ -484,6 +524,8 @@ golang.org/x/net v0.0.0-20190419010253-1f3472d942ba/go.mod h1:t9HGtf8HONx5eT2rtn
golang.org/x/net v0.0.0-20190522155817-f3200d17e092/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks=
golang.org/x/net v0.0.0-20190603091049-60506f45cf65 h1:+rhAzEzT3f4JtomfC371qB+0Ola2caSKcY69NUBZrRQ=
golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks=
golang.org/x/net v0.0.0-20190813141303-74dc4d7220e7 h1:fHDIZ2oxGnUZRN6WgWFCbYBjH9uqVPRCUVUDhs0wnbA=
golang.org/x/net v0.0.0-20190813141303-74dc4d7220e7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421 h1:Wo7BWFiOk0QRFMLYMqJGFMd9CgUAcGx7V+qEg/h5IBI=
golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
@@ -493,6 +535,8 @@ golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJ
golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6 h1:bjcUS9ztw9kFmmIxJInhon/0Is3p+EHBKNgquIzo1OI=
golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20190423024810-112230192c58 h1:8gQV6CLnAEikrhgkHFbMAEhagSSnXWGV915qUMm9mrU=
golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sys v0.0.0-20180724212812-e072cadbbdc8/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
@@ -509,8 +553,8 @@ golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7w
golang.org/x/sys v0.0.0-20190418153312-f0ce4c0180be/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20190606122018-79a91cf218c4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20190620070143-6f217b454f45 h1:Dl2hc890lrizvUppGbRWhnIh2f8jOTCQpY5IKWRS0oM=
golang.org/x/sys v0.0.0-20190620070143-6f217b454f45/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20190826190057-c7b8b68b1456 h1:ng0gs1AKnRRuEMZoTLLlbOd+C17zUDepwGQBb/n+JVg=
golang.org/x/sys v0.0.0-20190826190057-c7b8b68b1456/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/text v0.3.0 h1:g61tztE5qeGQ89tm6NTjjM9VPIm088od1l6aSorWRWg=
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2 h1:z99zHgr7hKfrUcX/KsoJk5FJfjTceCKIp96+biqP4To=
@@ -518,11 +562,14 @@ golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3
golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
golang.org/x/time v0.0.0-20181108054448-85acf8d2951c h1:fqgJT0MGcGpPgpWU7VRdRjuArfcOvC4AoJmILihzhDg=
golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
golang.org/x/tools v0.0.0-20180828015842-6cd1fcedba52/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY=
golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=
golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=
golang.org/x/tools v0.0.0-20190328211700-ab21143f2384/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=
golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q=
google.golang.org/api v0.3.1/go.mod h1:6wY9I6uQWHQ8EM57III9mq/AjF+i8G65rmVagqKMtkk=
google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM=
google.golang.org/appengine v1.4.0 h1:/wp5JvzpHIxhs/dumFmF7BXTf3Z+dd4uXta4kVyO508=
@@ -534,12 +581,15 @@ google.golang.org/genproto v0.0.0-20190404172233-64821d5d2107/go.mod h1:VzzqZJRn
google.golang.org/grpc v1.17.0/go.mod h1:6QZJwpn2B+Zp71q/5VxRsJ6NXXVCE5NRUHRo+f3cWCs=
google.golang.org/grpc v1.19.0 h1:cfg4PD8YEdSFnm7qLV4++93WcmhH2nIUhMjhdCvl3j8=
google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c=
google.golang.org/grpc v1.23.1 h1:q4XQuHFC6I28BKZpo6IYyb3mNO+l7lSOxRuYTCiDfXk=
google.golang.org/grpc v1.23.1/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg=
gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw=
gopkg.in/asn1-ber.v1 v1.0.0-20181015200546-f715ec2f112d h1:TxyelI5cVkbREznMhfzycHdkp5cLA7DpE+GKjSslYhM=
gopkg.in/asn1-ber.v1 v1.0.0-20181015200546-f715ec2f112d/go.mod h1:cuepJuh7vyXfUyUwEgHQXw849cJrilpS5NeIjOWESAw=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 h1:qIbj1fsPNlZgppZ+VLlY7N33q108Sa+fhmuc+sWQYwY=
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/cheggaaa/pb.v1 v1.0.25/go.mod h1:V/YB90LKu/1FcN3WVnfiiE5oMCibMjukxqG/qStrOgw=
gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys=
gopkg.in/go-playground/assert.v1 v1.2.1 h1:xoYuJVE7KT85PYWrN730RguIQO0ePzVRfFMXadIrXTM=
gopkg.in/go-playground/assert.v1 v1.2.1/go.mod h1:9RXL0bg/zibRAgZUYszZSwO/z8Y/a8bDuhia5mkpMnE=
@@ -563,6 +613,7 @@ gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
honnef.co/go/tools v0.0.0-20180728063816-88497007e858/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
k8s.io/api v0.0.0-20181004124137-fd83cbc87e76 h1:cGc6jt7tNK7a2WfgNKjxjoU/UXXr9Q7JTqvCupZ+6+Y=
k8s.io/api v0.0.0-20181004124137-fd83cbc87e76/go.mod h1:iuAfoD4hCxJ8Onx9kaTIt30j7jUFS00AXQi6QMi99vA=
k8s.io/apimachinery v0.0.0-20181215012845-4d029f033399 h1:xdXaRQ7uNX4x6NpvxXASvlVXtKa8+WbCXK7Hjr6XZ6c=
@@ -577,17 +628,19 @@ sigs.k8s.io/yaml v1.1.0 h1:4A07+ZFc2wgJwo8YNlQpr1rVlgUDlxXHhPJciaPY5gs=
sigs.k8s.io/yaml v1.1.0/go.mod h1:UJmg0vDUVViEyp3mgSv9WPwZCDxu4rQW1olrI1uml+o=
yunion.io/x/jsonutils v0.0.0-20190625054549-a964e1e8a051 h1:vtZw2iwGrsARNSwRTREGjmr2BWPdxbmXVkb3kI1qu28=
yunion.io/x/jsonutils v0.0.0-20190625054549-a964e1e8a051/go.mod h1:4N0/RVzsYL3kH3WE/H1BjUQdFiWu50JGCFQuuy+Z634=
yunion.io/x/jsonutils v0.0.0-20191005115334-bb1c187fc0e7 h1:9NcHs2OFMyN8O8SmJ3sFm5AJSVXP3u1N3avJsbyX3RI=
yunion.io/x/jsonutils v0.0.0-20191005115334-bb1c187fc0e7/go.mod h1:4N0/RVzsYL3kH3WE/H1BjUQdFiWu50JGCFQuuy+Z634=
yunion.io/x/log v0.0.0-20190514041436-04ce53b17c6b h1:Z9z+7iegu0HXuL+S8taVWRd1P4b9JJOgPXIeoqYrj7c=
yunion.io/x/log v0.0.0-20190514041436-04ce53b17c6b/go.mod h1:+gauLs73omeJAPlsXcevLsJLKixV+sR/E7WSYTSx1fE=
yunion.io/x/log v0.0.0-20190629062853-9f6483a7103d h1:59zrDL7Ft+hDukguJRmLr/Gdu/9V75x+yX99ovZwfaA=
yunion.io/x/log v0.0.0-20190629062853-9f6483a7103d/go.mod h1:LC6f/4FozL0iaAbnFt2eDX9jlsyo3WiOUPm03d7+U4U=
yunion.io/x/pkg v0.0.0-20190620104149-945c25821dbf h1:OsKC+2ghZHwp+Ztm/MwKlLKKRiE7QcPG8eTp0GmsHbg=
yunion.io/x/pkg v0.0.0-20190620104149-945c25821dbf/go.mod h1:t6rEGG2sQ4J7DhFxSZVOTjNd0YO/KlfWQyK1W4tog+E=
yunion.io/x/pkg v0.0.0-20190726033806-b564cfdcc224 h1:dAeUov/CtKcPaOapGVG7+NRqmUF2fr2O3Onb+ID5HS4=
yunion.io/x/pkg v0.0.0-20190726033806-b564cfdcc224/go.mod h1:t6rEGG2sQ4J7DhFxSZVOTjNd0YO/KlfWQyK1W4tog+E=
yunion.io/x/s3cli v0.0.0-20190812034537-1e65a6651a3e h1:Jk82txl4vaL/MoVV3+GweEcCmLOcqo5XYF8tlBD/1hY=
yunion.io/x/s3cli v0.0.0-20190812034537-1e65a6651a3e/go.mod h1:0iFKpOs1y4lbCxeOmq3Xx/0AcQoewVPwj62eRluioEo=
yunion.io/x/sqlchemy v0.0.0-20190813100902-cfa59aeabbfe h1:gslRYwVFAQI29PZL56mfBe+zpgbtIMSL1zSEnBbF1bI=
yunion.io/x/sqlchemy v0.0.0-20190813100902-cfa59aeabbfe/go.mod h1:FTdwPdGhMgh4E+UFXc9klI1Ok34fMuybTT+jLhOaIjI=
yunion.io/x/pkg v0.0.0-20191112153320-4346cc308eed h1:seECXVsAP+wTuxIo8VpyQ9U2zPPf0fsxb1zvmbsLo90=
yunion.io/x/pkg v0.0.0-20191112153320-4346cc308eed/go.mod h1:t6rEGG2sQ4J7DhFxSZVOTjNd0YO/KlfWQyK1W4tog+E=
yunion.io/x/s3cli v0.0.0-20190917004522-13ac36d8687e h1:v+EzIadodSwkdZ/7bremd7J8J50Cise/HCylsOJngmo=
yunion.io/x/s3cli v0.0.0-20190917004522-13ac36d8687e/go.mod h1:0iFKpOs1y4lbCxeOmq3Xx/0AcQoewVPwj62eRluioEo=
yunion.io/x/sqlchemy v0.0.0-20191119025555-5948646b39e6 h1:vgltfojqVRXxWiBt+8bgrSmO7F0cSNAbG6Ktn1SLIq8=
yunion.io/x/sqlchemy v0.0.0-20191119025555-5948646b39e6/go.mod h1:FTdwPdGhMgh4E+UFXc9klI1Ok34fMuybTT+jLhOaIjI=
yunion.io/x/structarg v0.0.0-20190809075558-115bed041de3 h1:bfC8EhXYvyGYldRWlzxiCM39Zfj3s3+zham9mW2h2LE=
yunion.io/x/structarg v0.0.0-20190809075558-115bed041de3/go.mod h1:EP6NSv2C0zzqBDTKumv8hPWLb3XvgMZDHQRfyuOrQng=

View File

@@ -53,14 +53,15 @@ const (
type SAnsiblePlaybook struct {
db.SVirtualResourceBase
Playbook *ansible.Playbook `nullable:"false" create:"required" get:"user" update:"user"`
Playbook *ansible.Playbook `length:"text" nullable:"false" create:"required" get:"user" update:"user"`
Output string `length:"medium" get:"user"`
StartTime time.Time `list:"user"`
EndTime time.Time `list:"user"`
}
const (
OutputMaxBytes = 64*1024*1024 - 1
OutputMaxBytes = 64*1024*1024 - 1
PlaybookMaxBytes = 64*1024 - 1
)
type SAnsiblePlaybookManager struct {
@@ -224,8 +225,6 @@ func (apb *SAnsiblePlaybook) runPlaybook(ctx context.Context, userCred mcclient.
}
pb.OutputWriter(&ansiblePlaybookOutputRecorder{apb})
man.sessions.Add(apb.Id, pb)
_, err := db.Update(apb, func() error {
apb.StartTime = time.Now()
apb.EndTime = time.Time{}
@@ -236,7 +235,8 @@ func (apb *SAnsiblePlaybook) runPlaybook(ctx context.Context, userCred mcclient.
if err != nil {
log.Errorf("run playbook: update db failed before run: %v", err)
}
// NOTE host state check? run only on online hosts and running guests, skip others
man.sessions.Add(apb.Id, pb)
go func() {
defer func() {
man.sessionsMux.Lock()
@@ -270,6 +270,15 @@ func (apb *SAnsiblePlaybook) stopPlaybook(ctx context.Context, userCred mcclient
man.sessionsMux.Lock()
defer man.sessionsMux.Unlock()
if !man.sessions.Has(apb.Id) {
if apb.Status == AnsiblePlaybookStatusRunning {
_, err := db.Update(apb, func() error {
apb.Status = AnsiblePlaybookStatusUnknown
return nil
})
if err != nil {
log.Errorf("updating ansible playbook status to unknown failed: %v", err)
}
}
return fmt.Errorf("playbook is not running")
}
// the playbook will be removed from session map in runPlaybook() on return from run

View File

@@ -87,8 +87,12 @@ func (v *ValidatorAnsiblePlaybook) Validate(data *jsonutils.JSONDict) error {
}
}
}
v.Playbook = pb
pbJson := jsonutils.Marshal(pb)
if serialized := pbJson.String(); len(serialized) > PlaybookMaxBytes {
return httperrors.NewBadRequestError("playbook too big, got %d bytes, exceeding %d",
len(serialized), PlaybookMaxBytes)
}
v.Playbook = pb
data.Set("playbook", pbJson)
return nil
}

View File

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

View File

@@ -21,9 +21,9 @@ import (
"strings"
"time"
"github.com/pkg/errors"
"yunion.io/x/jsonutils"
"yunion.io/x/log"
"yunion.io/x/pkg/errors"
"yunion.io/x/onecloud/pkg/apigateway/clientman"
"yunion.io/x/onecloud/pkg/apigateway/constants"
@@ -103,15 +103,17 @@ func (h *AuthHandlers) Bind(app *appsrv.Application) {
func (h *AuthHandlers) GetRegionsResponse(ctx context.Context, w http.ResponseWriter, req *http.Request) (*jsonutils.JSONDict, error) {
adminToken := auth.AdminCredential()
if adminToken == nil {
return nil, errors.New("failed to get admin credential")
return nil, errors.Error("failed to get admin credential")
}
regions := adminToken.GetRegions()
if len(regions) == 0 {
return nil, errors.New("region is empty")
return nil, errors.Error("region is empty")
}
regionsJson := jsonutils.NewStringArray(regions)
s := auth.GetAdminSession(ctx, regions[0], "")
result, e := modules.Domains.List(s, nil)
filters := jsonutils.NewDict()
filters.Add(jsonutils.NewInt(1000), "limit")
result, e := modules.Domains.List(s, filters)
if e != nil {
return nil, errors.Wrap(e, "list domain")
}
@@ -127,6 +129,34 @@ func (h *AuthHandlers) GetRegionsResponse(ctx context.Context, w http.ResponseWr
resp := jsonutils.NewDict()
resp.Add(domains, "domains")
resp.Add(regionsJson, "regions")
filters = jsonutils.NewDict()
filters.Add(jsonutils.NewStringArray([]string{"cas"}), "driver")
filters.Add(jsonutils.JSONTrue, "enabled")
filters.Add(jsonutils.NewInt(1000), "limit")
idps, err := modules.IdentityProviders.List(s, filters)
if err != nil {
return nil, errors.Wrap(err, "list idp")
}
retIdps := make([]jsonutils.JSONObject, 0)
for i := range idps.Data {
retIdp := jsonutils.NewDict()
id, _ := idps.Data[i].GetString("id")
name, _ := idps.Data[i].GetString("name")
driver, _ := idps.Data[i].GetString("driver")
retIdp.Add(jsonutils.NewString(id), "id")
retIdp.Add(jsonutils.NewString(name), "name")
retIdp.Add(jsonutils.NewString(driver), "driver")
conf, err := modules.IdentityProviders.GetSpecific(s, id, "config", nil)
if err != nil {
return nil, errors.Wrap(err, "idp get config spec")
}
retIdp.Update(conf)
retIdps = append(retIdps, retIdp)
}
resp.Add(jsonutils.NewArray(retIdps...), "idps")
return resp, nil
}
@@ -218,62 +248,52 @@ func isUserEnableTotp(ctx context.Context, req *http.Request, token mcclient.Tok
return jsonutils.QueryBoolean(usr, "enable_mfa", true)
}
func (h *AuthHandlers) doPasswordLogin(ctx context.Context, w http.ResponseWriter, req *http.Request, uname string, body jsonutils.JSONObject) mcclient.TokenCredential {
if h.preLoginHook != nil {
if err := h.preLoginHook(ctx, req, uname, body); err != nil {
httperrors.GeneralServerError(w, err)
return nil
}
}
passwd, e := body.GetString("password")
if e != nil {
httperrors.InvalidInputError(w, "get password in body")
return nil
}
if len(uname) == 0 || len(passwd) == 0 {
httperrors.InvalidInputError(w, "username or password is empty")
return nil
}
tenant, uname := parseLoginUser(uname)
// var token mcclient.TokenCredential
domain, _ := body.GetString("domain")
func (h *AuthHandlers) doCredentialLogin(ctx context.Context, req *http.Request, body jsonutils.JSONObject) (mcclient.TokenCredential, error) {
var token mcclient.TokenCredential
var err error
var tenant string
cliIp := netutils2.GetHttpRequestIp(req)
token, err := auth.Client().AuthenticateWeb(uname, passwd, domain, "", "", cliIp)
if body.Contains("username") {
uname, _ := body.GetString("username")
if h.preLoginHook != nil {
if err = h.preLoginHook(ctx, req, uname, body); err != nil {
return nil, err
}
}
var passwd string
passwd, err = body.GetString("password")
if err != nil {
return nil, httperrors.NewInputParameterError("get password in body")
}
if len(uname) == 0 || len(passwd) == 0 {
return nil, httperrors.NewInputParameterError("username or password is empty")
}
tenant, uname = parseLoginUser(uname)
// var token mcclient.TokenCredential
domain, _ := body.GetString("domain")
token, err = auth.Client().AuthenticateWeb(uname, passwd, domain, "", "", cliIp)
} else if body.Contains("cas_ticket") {
ticket, _ := body.GetString("cas_ticket")
if len(ticket) == 0 {
return nil, httperrors.NewInputParameterError("cas_ticket is empty")
}
token, err = auth.Client().AuthenticateCAS(ticket, "", "", "", cliIp)
} else {
return nil, httperrors.NewInputParameterError("missing credential")
}
if err != nil {
switch httperr := err.(type) {
case *httputils.JSONClientError:
if httperr.Code == 409 {
httperrors.GeneralServerError(w, err)
return nil
return nil, err
}
}
httperrors.InvalidCredentialError(w, "username/password incorrect")
return nil
return nil, httperrors.NewInvalidCredentialError("username/password incorrect")
}
/* if token == nil { // invalid domain, try all domains
s := auth.GetAdminSession(ctx, fetchRegion(req), "")
domains, e := modules.Domains.List(s, nil)
if e != nil {
httperrors.InternalServerError(w, "获取认证源列表失败")
return nil
}
for _, d := range domains.Data {
domain, e = d.GetString("name")
if e == nil {
token, e = auth.Client().Authenticate(uname, passwd, domain, "")
if e == nil {
break
}
}
}
}
if token == nil {
httperrors.InvalidCredentialError(w, "用户名/密码错误")
return nil
}
*/
uname := token.GetUserName()
if len(tenant) > 0 {
s := auth.GetAdminSession(ctx, FetchRegion(req), "")
jsonProj, e := modules.Projects.GetById(s, tenant, nil)
@@ -317,7 +337,7 @@ func (h *AuthHandlers) doPasswordLogin(ctx context.Context, w http.ResponseWrite
log.Errorf("GetProjects for login user error %s project count %d", e, len(projects.Data))
}
}
return token
return token, nil
}
func parseLoginUser(uname string) (string, string) {
@@ -339,7 +359,7 @@ func isUserAllowWebconsole(ctx context.Context, w http.ResponseWriter, req *http
return false
}
if !jsonutils.QueryBoolean(usr, "allow_web_console", true) {
httperrors.ForbiddenError(w, "forbidden user %q login from web")
httperrors.ForbiddenError(w, "forbidden user %q login from web", usr.String())
return false
}
return true
@@ -391,13 +411,21 @@ func (h *AuthHandlers) postLoginHandler(ctx context.Context, w http.ResponseWrit
httperrors.InvalidInputError(w, "fetch json for request: %v", e)
return
}
uname, e := body.GetString("username")
var token mcclient.TokenCredential
otpVerified := false
if e != nil { // switch project
if body.Contains("tenantId") { // switch project
token, otpVerified = doTenantLogin(ctx, w, req, body)
} else { // user/password authenticate
token = h.doPasswordLogin(ctx, w, req, uname, body)
} else if body.Contains("username") || body.Contains("cas_ticket") {
// user/password authenticate
// cas authentication
token, e = h.doCredentialLogin(ctx, req, body)
if e != nil {
httperrors.GeneralServerError(w, e)
return
}
} else {
httperrors.InvalidInputError(w, "no login credential")
return
}
if token == nil {
return
@@ -478,10 +506,29 @@ func (h *AuthHandlers) postLogoutHandler(ctx context.Context, w http.ResponseWri
func FetchRegion(req *http.Request) string {
r, e := req.Cookie("region")
if e != nil {
if e == nil && len(r.Value) > 0 {
return r.Value
}
if len(options.Options.DefaultRegion) > 0 {
return options.Options.DefaultRegion
}
return r.Value
adminToken := auth.AdminCredential()
if adminToken == nil {
log.Errorf("FetchRegion: nil adminTken")
return ""
}
regions := adminToken.GetRegions()
if len(regions) == 0 {
log.Errorf("FetchRegion: empty region list")
return ""
}
for _, r := range regions {
if len(r) > 0 {
return r
}
}
log.Errorf("FetchRegion: no valid region")
return ""
}
func fetchDomain(req *http.Request) string {
@@ -641,6 +688,7 @@ func getUserInfo(ctx context.Context, s *mcclient.ClientSession, token mcclient.
query := jsonutils.NewDict()
query.Add(jsonutils.JSONNull, "effective")
query.Add(jsonutils.JSONNull, "include_names")
query.Add(jsonutils.JSONNull, "include_system")
query.Add(jsonutils.NewInt(0), "limit")
query.Add(jsonutils.NewString(token.GetUserId()), "user", "id")
roleAssigns, err := modules.RoleAssignments.List(s, query)

View File

@@ -20,6 +20,7 @@ import (
"encoding/base64"
"fmt"
"net/http"
"net/url"
"github.com/skip2/go-qrcode"
@@ -42,7 +43,14 @@ import (
func toQrcode(secret string, token mcclient.TokenCredential) (string, error) {
_secret := base32.StdEncoding.EncodeToString([]byte(secret))
// https://github.com/google/google-authenticator/wiki/Key-Uri-Format
uri := fmt.Sprintf("otpauth://totp/Onecloud:%s?secret=%s&issuer=Onecloud", token.GetUserName(), _secret)
// issuer Onecloud.Domain
issuer := "Onecloud"
if len(token.GetDomainName()) > 0 {
issuer = fmt.Sprintf("Onecloud.%s", token.GetDomainName())
issuer = url.PathEscape(issuer)
}
uri := fmt.Sprintf("otpauth://totp/%s:%s?secret=%s&issuer=%s", issuer, token.GetUserName(), _secret, issuer)
c, err := qrcode.Encode(uri, qrcode.High, 256)
if err != nil {

View File

@@ -30,10 +30,9 @@ import (
"yunion.io/x/onecloud/pkg/appctx"
"yunion.io/x/onecloud/pkg/appsrv"
"yunion.io/x/onecloud/pkg/httperrors"
"yunion.io/x/onecloud/pkg/mcclient"
"yunion.io/x/onecloud/pkg/mcclient/auth"
"yunion.io/x/onecloud/pkg/httperrors"
"yunion.io/x/onecloud/pkg/mcclient/modules"
)

View File

@@ -174,6 +174,7 @@ type ServerCreateInput struct {
EipBw int `json:"eip_bw,omitzero"`
EipChargeType string `json:"eip_charge_type,omitempty"`
Eip string `json:"eip,omitempty"`
Secgroups []string `json:"secgroups"`
OsType string `json:"os_type"`
// Fill by server
@@ -216,6 +217,20 @@ type ServerDeployInput struct {
AutoStart *bool `json:"auto_start"`
}
type GuestBatchMigrateRequest struct {
apis.Meta
GuestIds []string
PreferHost string
}
type GuestBatchMigrateParams struct {
Id string
LiveMigrate bool
RescueMode bool
OldStatus string
}
type HostLoginInfo struct {
apis.Meta

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