Compare commits

...

1264 Commits

Author SHA1 Message Date
yunion-ci-robot
90e365782c Merge pull request #8224 from yousong/automated-cherry-pick-of-#8222-upstream-release-2.13
Automated cherry pick of #8222: webconsole: ssh: each argument on its own line
2020-10-10 16:09:18 +08:00
Yousong Zhou
0f4b8e79ac webconsole: ssh: add keyboard-interactive as an option
For ESXi 6.0

  Authentications that can continue: publickey,keyboard-interactive
2020-10-10 14:49:28 +08:00
Yousong Zhou
79f0c66c48 webconsole: ssh: each argument on its own line 2020-10-10 14:49:28 +08:00
Zexi Li
6547ba83f3 Merge pull request #7540 from wanyaoqi/automated-cherry-pick-of-#7530-upstream-release-2.13
Automated cherry pick of #7530: fix mount xfs
2020-08-11 11:16:43 +08:00
wanyaoqi
7b57ee2ffe fix mount xfs 2020-08-10 20:09:10 +08:00
wanyaoqi
c2ef15dc0c fix cache non lvm disks (#7464) 2020-08-01 21:12:03 +08:00
Zexi Li
3018d8b724 baremetal: fix hpssactl split last LV size out of limit (#7431) 2020-07-31 22:36:03 +08:00
Zexi Li
4b02fd72df Merge pull request #7425 from ioito/automated-cherry-pick-of-#7417-upstream-release-2.13
Automated cherry pick of #7417: fix: avoid lost backend params
2020-07-31 18:08:21 +08:00
Zexi Li
a87eb0624e Merge pull request #7412 from ioito/automated-cherry-pick-of-#7405-upstream-release-2.13
Automated cherry pick of #7405: fix: avoid account sync deadlock
2020-07-31 18:05:46 +08:00
Qu Xuan
2eb090e6a6 fix: avoid lost backend params 2020-07-31 17:21:14 +08:00
Qu Xuan
fdf56f793b fix: avoid account sync deadlock 2020-07-31 16:41:50 +08:00
yunion-ci-robot
518e3b1ca4 Merge pull request #7308 from wanyaoqi/automated-cherry-pick-of-#7302-upstream-release-2.13
Automated cherry pick of #7302: fix clone clean pending usage
2020-07-24 22:49:45 +08:00
wanyaoqi
d68e6d73df fix clone clean pending usage 2020-07-23 18:40:00 +08:00
Zexi Li
ffad986f9c Merge pull request #7299 from wanyaoqi/automated-cherry-pick-of-#7294-upstream-release-2.13
Automated cherry pick of #7294: fix snapshot clean pending usage
2020-07-23 13:48:47 +08:00
wanyaoqi
115ecc7a05 fix snapshot clean pending usage 2020-07-23 11:48:34 +08:00
Zexi Li
a749af97a3 Merge pull request #7291 from tb365/automated-cherry-pick-of-#7286-upstream-release-2.13
Automated cherry pick of #7286: apigateway host imports data validate
2020-07-22 21:44:33 +08:00
tangbin
0b2576a349 format fix 2020-07-22 18:18:29 +08:00
tangbin
33394a4db6 fix empty else 2020-07-22 18:18:29 +08:00
tangbin
15eb943b3c fix host import 2020-07-22 18:18:29 +08:00
tangbin
5f447cee96 fix huawei delete resource 2020-07-22 18:18:29 +08:00
tangbin
e45e965190 fix huawei elb disable healthcheck 2020-07-22 18:18:28 +08:00
tangbin
8f923850b4 lb sync project fix 2020-07-22 18:18:28 +08:00
tangbin
3fbc9909a9 add more log 2020-07-22 18:12:57 +08:00
tangbin
56a1930e23 apigateway host imports data validate 2020-07-22 18:12:57 +08:00
Zexi Li
94bd6eb9be Merge pull request #7259 from tb365/automated-cherry-pick-of-#7237-upstream-release-2.13
Automated cherry pick of #7237: huawei eip delete fix
2020-07-20 20:47:21 +08:00
tangbin
634bddccbd huawei eip delete fix 2020-07-20 10:49:46 +08:00
yunion-ci-robot
7731120ec7 Merge pull request #7209 from zexi/automated-cherry-pick-of-#7201-upstream-release-2.13
Automated cherry pick of #7201: webconsole: fix old session make new session closed
2020-07-16 20:16:20 +08:00
Zexi Li
5d39ae3beb webconsole: fix old session make new session closed 2020-07-16 18:52:40 +08:00
Zexi Li
ecedd46ab0 Merge pull request #7041 from swordqiu/automated-cherry-pick-of-#7036-upstream-release-2.13
Automated cherry pick of #7036: fix: cloud account sync may block
2020-07-04 12:09:43 +08:00
Qiu Jian
80fd2aee4c fix: cloud account sync may block 2020-07-04 10:27:13 +08:00
Zexi Li
f1dfe9f7bd Merge pull request #6941 from swordqiu/automated-cherry-pick-of-#6936-upstream-release-2.13
Automated cherry pick of #6936: fix: sort quota list result by usage rate
2020-06-23 23:28:26 +08:00
Qiu Jian
e8f873b827 fix: sort quota list result by usage rate 2020-06-23 22:28:48 +08:00
yunion-ci-robot
4ef4fd6c7f Merge pull request #6911 from wanyaoqi/automated-cherry-pick-of-#6906-upstream-release-2.13
Automated cherry pick of #6906: disable dhclient
2020-06-22 23:41:04 +08:00
wanyaoqi
40ed3bcf8e disable dhclient 2020-06-22 21:32:41 +08:00
Zexi Li
107611bfc6 Merge pull request #6898 from yousong/automated-cherry-pick-of-#6893-upstream-release-2.13
Automated cherry pick of #6893: cloudcommon: app: cosmetic change
2020-06-22 09:17:51 +08:00
Yousong Zhou
1b5ba590d8 cloudcommon: policy: fix interval and oneshot sync
Reduce CPU utilization caused by queued time.AfterFunc calls
2020-06-21 18:35:01 +08:00
Yousong Zhou
3e6b487d57 cloudcommon: app: cosmetic change 2020-06-21 18:35:01 +08:00
yunion-ci-robot
ad9bd39375 Merge pull request #6889 from swordqiu/automated-cherry-pick-of-#6885-upstream-release-2.13
Automated cherry pick of #6885: fix: wrong cloud provider status when sync disconnected cloud account
2020-06-19 09:49:08 +08:00
Qiu Jian
c85dd5a69f fix: wrong cloud provider status when sync disconnected cloud account 2020-06-19 01:25:19 +08:00
yunion-ci-robot
70eb808590 Merge pull request #6868 from yousong/automated-cherry-pick-of-#6859-upstream-release-2.13
Automated cherry pick of #6859: cloudaccounts: one sync task in queue per cloudaccount
2020-06-18 23:13:04 +08:00
Yousong Zhou
785edd8c3d cloudaccounts: one sync task in queue per cloudaccount 2020-06-18 17:13:23 +08:00
Zexi Li
9dbb497e7b Merge pull request #6840 from zexi/automated-cherry-pick-of-#6839-upstream-release-2.13
Automated cherry pick of #6839: scheduler: fix memory over committed
2020-06-17 18:49:28 +08:00
Zexi Li
96aebfa77b Merge pull request #6858 from yousong/automated-cherry-pick-of-#6837-upstream-release-2.13
Automated cherry pick of #6837: appsrv: ring: release ring content on pop
2020-06-17 11:24:51 +08:00
Yousong Zhou
264339bb04 appsrv: rework TestRing 2020-06-17 10:54:47 +08:00
Yousong Zhou
ae58061bb5 appsrv: ring: release ring content on pop 2020-06-17 10:54:47 +08:00
Zexi Li
3736b9f741 Merge pull request #6853 from swordqiu/automated-cherry-pick-of-#6849-upstream-release-2.13
Automated cherry pick of #6849: fix: disable policy rule compaction
2020-06-17 10:29:20 +08:00
Qiu Jian
e01f12ac4d fix: policy allow if one of the matching rules is allow 2020-06-16 23:12:40 +08:00
Qiu Jian
30ddb24756 fix: disable policy rule compaction 2020-06-16 23:12:40 +08:00
Zexi Li
1d42067540 Merge pull request #6848 from wanyaoqi/automated-cherry-pick-of-#6844-upstream-release-2.13
Automated cherry pick of #6844: fix cpu usage metrics
2020-06-16 21:00:59 +08:00
wanyaoqi
36ed290b55 fix cpu usage metrics 2020-06-16 20:46:25 +08:00
Zexi Li
0c5aeb022d Merge pull request #6834 from wanyaoqi/bugfix/wyq/win10-2.13
CherryPick 2.13: fix windows install regedit record
2020-06-16 20:12:33 +08:00
Zexi Li
5a38a9af79 scheduler: fix memory over committed 2020-06-16 19:15:27 +08:00
wanyaoqi
3d95961fa9 fix windows install regedit record 2020-06-15 17:58:04 +08:00
Zexi Li
20efee53f2 Merge pull request #6821 from yousong/automated-cherry-pick-of-#6817-upstream-release-2.13
Automated cherry pick of #6817: guestnetworks: use math/rand instead of crypto/rand
2020-06-12 10:09:38 +08:00
Yousong Zhou
c5812e23f8 guestnetworks: reduce odds of collision seeded by epoch seconds 2020-06-11 21:23:51 +08:00
Yousong Zhou
f1522de214 guestnetworks: use math/rand instead of crypto/rand 2020-06-11 21:23:51 +08:00
Zexi Li
7492240523 Merge pull request #6815 from ioito/automated-cherry-pick-of-#6810-upstream-release-2.13
Automated cherry pick of #6810: fix: 避免openstack磁盘和存储窜位
2020-06-11 17:52:33 +08:00
Zexi Li
fde3a78544 Merge pull request #6807 from zexi/automated-cherry-pick-of-#6803-upstream-release-2.13
Automated cherry pick of #6803: webconsole: fix version and others handler not handle
2020-06-11 17:50:36 +08:00
Qu Xuan
d60bbae538 fix: 避免openstack磁盘和存储窜位 2020-06-11 14:15:46 +08:00
Zexi Li
f136d2af93 Merge pull request #6801 from wanyaoqi/automated-cherry-pick-of-#6797-upstream-release-2.13
Automated cherry pick of #6797: fix host list servers filter
2020-06-10 17:05:52 +08:00
Zexi Li
abb406d9db webconsole: fix version and others handler not handle 2020-06-10 17:04:56 +08:00
wanyaoqi
9674c55a09 fix host list servers filter 2020-06-10 14:09:51 +08:00
yunion-ci-robot
333eb468b0 Merge pull request #6795 from swordqiu/automated-cherry-pick-of-#6791-upstream-release-2.13
Automated cherry pick of #6791: fix: policy-explain not working properly
2020-06-10 11:31:08 +08:00
Zexi Li
48cdb6a62d Merge pull request #6790 from rainzm/automated-cherry-pick-of-#6786-upstream-release-2.13
Automated cherry pick of #6786: fix: Hanle the error of vdisk.GetIStorage in syncCloudDisk
2020-06-10 11:28:20 +08:00
Zexi Li
8039d9d5b2 Merge pull request #6767 from ioito/automated-cherry-pick-of-#6663-upstream-release-2.13
Automated cherry pick of #6663: fix: 优化安全组同步逻辑
2020-06-10 11:19:21 +08:00
Qiu Jian
6202adba97 fix: policy-explain not working properly 2020-06-10 11:09:03 +08:00
rainzm
4920ed421f fix: Hanle the error of vdisk.GetIStorage in syncCloudDisk 2020-06-09 19:52:19 +08:00
Qu Xuan
1159b7c4e8 fix: 优化安全组同步逻辑 2020-06-08 17:02:13 +08:00
yunion-ci-robot
d425614fd7 Merge pull request #6690 from ioito/automated-cherry-pick-of-#6686-upstream-release-2.13
Automated cherry pick of #6686: fix: 避免锁超时
2020-06-02 13:59:42 +08:00
Qu Xuan
9b82c90605 fix: 避免锁超时 2020-06-02 11:16:13 +08:00
Zexi Li
525201e67c Merge pull request #6679 from ioito/automated-cherry-pick-of-#6675-upstream-release-2.13
Automated cherry pick of #6675: fix: add us-west4 for google region
2020-06-02 10:01:10 +08:00
Zexi Li
9df3a13c27 Merge pull request #6674 from wanyaoqi/automated-cherry-pick-of-#6670-upstream-release-2.13
Automated cherry pick of #6670: get snapshots order by created at asc
2020-06-02 09:58:55 +08:00
Qu Xuan
ecb41770b0 fix: add us-west4 for google region 2020-06-01 18:30:17 +08:00
wanyaoqi
f35dee2597 get snapshots order by created at asc 2020-06-01 15:11:41 +08:00
Zexi Li
5c91ebd2a8 Merge pull request #6657 from swordqiu/automated-cherry-pick-of-#6636-upstream-release-2.13
Automated cherry pick of #6636: fix: ignore match weights when searching matched policysets
2020-05-29 14:20:45 +08:00
Zexi Li
3525c927c9 Merge pull request #6654 from wanyaoqi/automated-cherry-pick-of-#6650-upstream-release-2.13
Automated cherry pick of #6650: fix migrate with multi local storage
2020-05-29 14:19:11 +08:00
Qiu Jian
09611b6522 fix: ignore match weights when searching matched policysets 2020-05-29 12:56:43 +08:00
wanyaoqi
c20ee70f22 fix migrate with multi local storage 2020-05-29 12:42:33 +08:00
Zexi Li
c53a78a86c Merge pull request #6625 from ioito/automated-cherry-pick-of-#6619-upstream-release-2.13
Automated cherry pick of #6619: fix: 避免azure卸载磁盘失败
2020-05-27 17:52:23 +08:00
Qu Xuan
5d06746eec fix: 避免azure卸载磁盘失败 2020-05-27 15:57:54 +08:00
Zexi Li
a6abbab53a Merge pull request #6602 from wanyaoqi/automated-cherry-pick-of-#6598-upstream-release-2.13
Automated cherry pick of #6598: fix remotefile fetch image propertites
2020-05-26 17:15:30 +08:00
wanyaoqi
33da517e23 fix remotefile fetch image propertites 2020-05-26 15:56:04 +08:00
Zexi Li
c6fea991a7 Merge pull request #6586 from zexi/automated-cherry-pick-of-#6584-upstream-release-2.13
Automated cherry pick of #6584: fix k8s repo wrong privilege
2020-05-25 18:28:18 +08:00
Zexi Li
4232145884 fix k8s repo wrong privilege 2020-05-25 17:00:38 +08:00
Zexi Li
b33ad3e408 Merge pull request #6574 from zhaoxiangchun/automated-cherry-pick-of-#6573-upstream-release-2.13
Automated cherry pick of #6573: zstack宿主机监控中增加参数信息进行Unmarshal
2020-05-25 12:17:58 +08:00
zhaoxiangchun
19c21dda10 zstack宿主机监控中增加参数信息进行Unmarshal 2020-05-24 17:18:12 +08:00
Zexi Li
dfc62fbd78 Merge pull request #6571 from swordqiu/automated-cherry-pick-of-#6567-upstream-release-2.13
Automated cherry pick of #6567: fix: default policy not effective
2020-05-22 22:48:49 +08:00
Zexi Li
fb36b28715 Merge pull request #6562 from ioito/automated-cherry-pick-of-#6558-upstream-release-2.13
Automated cherry pick of #6558: fix: 避免openstack以镜像做系统盘创建失败
2020-05-22 22:45:41 +08:00
Qiu Jian
0714c8c1eb fix: default policy not effective 2020-05-22 22:41:48 +08:00
Qu Xuan
574cb3c659 fix: 避免openstack以镜像做系统盘创建失败 2020-05-22 20:18:51 +08:00
Zexi Li
7a0dd41201 Merge pull request #6555 from swordqiu/automated-cherry-pick-of-#6551-upstream-release-2.13
Automated cherry pick of #6551: fix: empty matched policies list for roles
2020-05-22 19:32:37 +08:00
Qiu Jian
fa9b5171d6 fix: empty matched policies list for roles 2020-05-22 18:58:44 +08:00
Zexi Li
de883a51b1 Merge pull request #6515 from ioito/automated-cherry-pick-of-#6511-upstream-release-2.13
Automated cherry pick of #6511: fix: 避免忽略本地allow any云上deny any安全组规则同步
2020-05-22 10:22:57 +08:00
Zexi Li
732c590dff Merge pull request #6524 from swordqiu/automated-cherry-pick-of-#6516-upstream-release-2.13
Automated cherry pick of #6516: fix: system privileges user cannot access system console
2020-05-22 10:16:06 +08:00
yunion-ci-robot
6c65a9e596 Merge pull request #6518 from zexi/automated-cherry-pick-of-#6481-upstream-release-2.13
Automated cherry pick of #6481: region: fix get resource details panic
2020-05-21 23:32:51 +08:00
yunion-ci-robot
68a6de6a4e Merge pull request #6517 from zexi/automated-cherry-pick-of-#6491-upstream-release-2.13
Automated cherry pick of #6491: keystone: fix db not sync
2020-05-21 22:49:51 +08:00
Qiu Jian
fe756a91fb fix: system privileges user cannot access system console 2020-05-21 18:46:53 +08:00
Zexi Li
7fe9e4a16a region: fix get resource details panic 2020-05-21 18:43:46 +08:00
Zexi Li
21ed506912 keystone: fix db not sync 2020-05-21 18:42:57 +08:00
Qu Xuan
15aa197ee3 fix: 避免忽略本地allow any云上deny any安全组规则同步 2020-05-21 18:31:59 +08:00
Zexi Li
4fc2d63a1e Merge pull request #6478 from yousong/automated-cherry-pick-of-#6477-upstream-release-2.13
Automated cherry pick of #6477: cloudcommon: rbac: fix typo
2020-05-20 12:53:43 +08:00
Yousong Zhou
124e84a229 wires: default to "default" vpc on creation
Wire creation request right now only makes sense in context of classic
network ("default" vpc)
2020-05-20 11:19:44 +08:00
Yousong Zhou
5b1e927522 networks: eliminate a variable 2020-05-20 11:19:44 +08:00
Yousong Zhou
847a20dbb8 guestdrivers: managed: use const api.EIP_STATUS_ASSOCIATE 2020-05-20 11:19:44 +08:00
Yousong Zhou
29b890b7d5 cloudprovider: fix typo 2020-05-20 11:19:43 +08:00
Yousong Zhou
bfcf626173 cloudcommon: rbac: fix typo 2020-05-20 11:19:43 +08:00
Zexi Li
125cf53602 Merge pull request #6467 from zexi/automated-cherry-pick-of-#6462-upstream-release-2.13
Automated cherry pick of #6462: region: fix server create params not include specified resource
2020-05-19 19:09:07 +08:00
Zexi Li
d055f8512b region: fix server create params not include specified resource 2020-05-19 17:39:42 +08:00
Zexi Li
df4a9011be Merge pull request #6447 from swordqiu/automated-cherry-pick-of-#6443-upstream-release-2.13
Automated cherry pick of #6443: fix: anonymous user may list resources
2020-05-19 10:18:09 +08:00
Zexi Li
7e0efe810c Merge pull request #6437 from zexi/automated-cherry-pick-of-#6436-upstream-release-2.13
Automated cherry pick of #6436: baremetal: fix ssh put empty content file not created
2020-05-19 10:16:03 +08:00
Qiu Jian
0a42c64d8c fix: anonymous user may list resources 2020-05-19 01:27:37 +08:00
Zexi Li
51aa8a8ccb baremetal: fix ssh put empty content file not created 2020-05-18 21:45:15 +08:00
Zexi Li
fe6b51b213 Merge pull request #6411 from zhaoxiangchun/automated-cherry-pick-of-#6410-upstream-release-2.13
Automated cherry pick of #6410: 修复无法获取vmware宿主机监控数据的问题
2020-05-17 14:16:47 +08:00
zhaoxiangchun
ce98301616 修复无法获取vmware宿主机监控数据的问题 2020-05-16 21:20:15 +08:00
yunion-ci-robot
a5b522efcb Merge pull request #6392 from zexi/automated-cherry-pick-of-#6388-upstream-release-2.13
Automated cherry pick of #6388: region: fix baremetal can't enable public baremetal type network
2020-05-16 18:25:04 +08:00
Zexi Li
45879caf56 Merge pull request #6399 from swordqiu/automated-cherry-pick-of-#6395-upstream-release-2.13
Automated cherry pick of #6395: fix: server-sync-fix-nics should return errors if vnics ip is not reachable on host
2020-05-16 17:45:06 +08:00
Zexi Li
0ff8359e2a region: fix baremetal can't enable public baremetal type network 2020-05-16 17:40:20 +08:00
Qiu Jian
9827a2f178 fix: server-sync-fix-nics should return errors if vnics ip is not reachable on host 2020-05-15 22:29:37 +08:00
Zexi Li
a23149987d Merge pull request #6383 from zexi/automated-cherry-pick-of-#6381-upstream-release-2.13
Automated cherry pick of #6381: scheduler: fix min counter get count not correct
2020-05-15 15:28:26 +08:00
Zexi Li
286042f2d3 scheduler: fix min counter get count not correct 2020-05-15 15:08:47 +08:00
Zexi Li
858c8e5dfd Merge pull request #6354 from zexi/automated-cherry-pick-of-#6353-upstream-release-2.13
Automated cherry pick of #6353: scheduler: filter disabled cloudprovider
2020-05-14 18:59:12 +08:00
Zexi Li
ac99e3cad2 Merge pull request #6342 from swordqiu/automated-cherry-pick-of-#6338-upstream-release-2.13
Automated cherry pick of #6338: fix: avoid using background context
2020-05-14 18:19:09 +08:00
Zexi Li
32511290b2 scheduler: filter disabled cloudprovider 2020-05-14 18:16:51 +08:00
Zexi Li
110b4d0862 Merge pull request #6351 from zexi/automated-cherry-pick-of-#6347-upstream-release-2.13
Automated cherry pick of #6347: scheduler: set schedtag default strategy if input empty
2020-05-14 17:49:32 +08:00
Zexi Li
07e0bc7461 scheduler: set schedtag default strategy if input empty 2020-05-14 17:27:37 +08:00
Qiu Jian
2cda2d55c0 fix: avoid using background context 2020-05-14 17:06:36 +08:00
yunion-ci-robot
af6362996a Merge pull request #6323 from wanyaoqi/automated-cherry-pick-of-#6319-upstream-release-2.13
Automated cherry pick of #6319: do not close worker chan
2020-05-13 20:16:03 +08:00
wanyaoqi
b18e534079 do not close worker chan
don't close worker chan after put work, will cause dead loop
2020-05-13 19:00:19 +08:00
Zexi Li
38ac5f6692 Merge pull request #6312 from ioito/automated-cherry-pick-of-#6306-upstream-release-2.13
Automated cherry pick of #6306: fix: openstack 安全组规则同步
2020-05-13 12:42:07 +08:00
Zexi Li
166cc07a34 Merge pull request #6296 from ioito/automated-cherry-pick-of-#6292-upstream-release-2.13
Automated cherry pick of #6292: fix: 优化openstack错误处理
2020-05-13 10:43:02 +08:00
Qu Xuan
af9067841a fix: openstack 安全组规则同步 2020-05-12 17:58:12 +08:00
Qu Xuan
195a972226 fix: 优化openstack错误处理 2020-05-12 14:10:17 +08:00
Zexi Li
1b86b7ee78 Merge pull request #6291 from yousong/automated-cherry-pick-of-#6287-upstream-release-2.13
Automated cherry pick of #6287: region: lbagent: undeploy: make it idempotent
2020-05-12 11:50:46 +08:00
Zexi Li
131d523a4a Merge pull request #6286 from yousong/automated-cherry-pick-of-#6282-upstream-release-2.13
Automated cherry pick of #6282: region: lbagents: fix deleting pending_deleted objects
2020-05-12 11:43:56 +08:00
Yousong Zhou
c0bd1ea0d2 region: lbagent: undeploy: make it idempotent
Both the following three can result in the same error message "Could not
find the requested service yunion-xx: host"

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

Use of ansibleplaybookv2 is overkill and can break console expectation.
Just turn to shell module for now
2020-05-12 10:40:02 +08:00
Yousong Zhou
51dd2ae063 region: lbagents: fix deleting pending_deleted objects
This was broken since the introduction of virtual object
2020-05-12 10:12:07 +08:00
Zexi Li
01ef9b24a6 Merge pull request #6274 from zexi/automated-cherry-pick-of-#6270-upstream-release-2.13
Automated cherry pick of #6270: scheduler: get region nil panic
2020-05-11 21:07:53 +08:00
Zexi Li
e32c02d2dc Merge pull request #6262 from ioito/automated-cherry-pick-of-#6258-upstream-release-2.13
Automated cherry pick of #6258: fix: 避免aliyun磁盘计费类型多次转换
2020-05-11 18:17:00 +08:00
Zexi Li
e040be15b9 scheduler: get region nil panic 2020-05-11 18:06:27 +08:00
Qu Xuan
acfa534b12 fix: 避免aliyun磁盘计费类型多次转换 2020-05-11 14:07:17 +08:00
Zexi Li
79e3ef08b5 Merge pull request #6253 from swordqiu/automated-cherry-pick-of-#6252-upstream-release-2.13
Automated cherry pick of #6252: fix: panic when disk has no valid storage_id
2020-05-11 10:01:28 +08:00
Qiu Jian
3b582cf708 fix: panic when disk has no valid storage_id 2020-05-11 02:55:33 +08:00
Zexi Li
3bca8f01ac Merge pull request #6251 from wanyaoqi/automated-cherry-pick-of-#6247-upstream-release-2.13
Automated cherry pick of #6247: fix import from libvirt
2020-05-10 21:35:28 +08:00
Zexi Li
233a5c9d40 Merge pull request #6233 from tb365/automated-cherry-pick-of-#6232-upstream-release-2.13
Automated cherry pick of #6232: huawei network id fix
2020-05-10 21:33:10 +08:00
wanyaoqi
65c5b55e83 fix import from libvirt 2020-05-10 20:46:06 +08:00
Zexi Li
b2ede96f97 Merge pull request #6246 from yousong/automated-cherry-pick-of-#6242-upstream-release-2.13
Automated cherry pick of #6242: disks: reword error message on bad DiskConfig struct
2020-05-10 11:29:23 +08:00
Yousong Zhou
4ac0f69db3 disks: reword error message on bad DiskConfig struct 2020-05-10 00:19:28 +08:00
tangbin
202375d1a0 huawei network id fix 2020-05-09 20:07:22 +08:00
Zexi Li
733dbdfa44 Merge pull request #6229 from yousong/automated-cherry-pick-of-#6225-upstream-release-2.13
Automated cherry pick of #6225: apigateway: handlers: register cloudnet modules
2020-05-09 18:52:46 +08:00
Yousong Zhou
04e0808c83 apigateway: handlers: register cloudnet modules 2020-05-09 16:42:10 +08:00
Zexi Li
5bcb3f5ced Merge pull request #6186 from zhaoxiangchun/automated-cherry-pick-of-#6185-upstream-release-2.13
Automated cherry pick of #6185: 修复谷歌监控无法获取的问题
2020-05-07 17:21:21 +08:00
zhaoxiangchun
1994f936aa 修复谷歌监控无法获取的问题
直接返回调用RestAPI的json格式数据
2020-05-07 11:27:05 +08:00
Zexi Li
ec20cde796 Merge pull request #6172 from yousong/automated-cherry-pick-of-#6168-upstream-release-2.13
Automated cherry pick of #6168: dnsrecords: note that DnsRecordManager is a IAdminSharableVirtualModelManager
2020-05-07 11:23:29 +08:00
Zexi Li
ee9801d568 Merge pull request #6178 from swordqiu/automated-cherry-pick-of-#6174-upstream-release-2.13
Automated cherry pick of #6174: fix: fail to fetch real client ip from httprequest
2020-05-07 11:16:36 +08:00
Qiu Jian
a4e4bd503f fix: fail to fetch real client ip from httprequest 2020-05-06 22:28:28 +08:00
Yousong Zhou
7970d8f6f6 dnsrecords: allow updating only description
This commit includes the following changes

 - Eliminate unused arguments from validateModelData()
 - Remove "records" member of input data unconditionally
 - Allow updates to not include records related parameters, to allow
   updating only "description" without emitting "Empty record" error
2020-05-06 18:43:46 +08:00
Yousong Zhou
e1f9aea44b dnsrecords: note that DnsRecordManager is a IAdminSharableVirtualModelManager 2020-05-06 18:43:45 +08:00
yunion-ci-robot
b37d140d0b Merge pull request #6162 from zhaoxiangchun/automated-cherry-pick-of-#6158-upstream-release-2.13
Automated cherry pick of #6158: bugfix mem paginate
2020-05-06 15:43:44 +08:00
zhaoxiangchun
cff7fb799a bugfix mem paginate
通过totoal和offset 与limit比较确定最后返回数据
2020-05-06 11:04:36 +08:00
Zexi Li
4be6f6ae93 Merge pull request #6157 from ioito/automated-cherry-pick-of-#6153-upstream-release-2.13
Automated cherry pick of #6153: fix: secgroupcache权限问题修复
2020-04-30 20:14:17 +08:00
Qu Xuan
df972f6ac3 fix: secgroupcache权限问题修复 2020-04-30 15:45:26 +08:00
Zexi Li
78ce130b4d Merge pull request #6131 from swordqiu/automated-cherry-pick-of-#6120-upstream-release-2.13
Automated cherry pick of #6120: fix: sysadmin can override policy violation check
2020-04-29 21:15:57 +08:00
Zexi Li
4d70f5343a Merge pull request #6134 from tb365/automated-cherry-pick-of-#6132-upstream-release-2.13
Automated cherry pick of #6132: fix: FindAnonymousStructPoint needs input as a pointer to struct
2020-04-29 19:15:47 +08:00
Qiu Jian
22b647d9d7 fix: FindAnonymousStructPoint needs input as a pointer to struct 2020-04-29 18:31:18 +08:00
Qiu Jian
a103383112 fix: sysadmin can override policy violation check 2020-04-29 18:00:49 +08:00
Zexi Li
bc943b6f30 Merge pull request #6115 from swordqiu/automated-cherry-pick-of-#6111-upstream-release-2.13
Automated cherry pick of #6111: fix: prevent policy violation
2020-04-29 13:09:55 +08:00
Zexi Li
c95026c615 Merge pull request #6099 from ioito/automated-cherry-pick-of-#6095-upstream-release-2.13
Automated cherry pick of #6095: fix: 普通用户可获取rds账号密码
2020-04-29 13:08:25 +08:00
Qiu Jian
0662923475 fix: prevent policy violation 2020-04-29 00:18:37 +08:00
yunion-ci-robot
437f05914f Merge pull request #6107 from ioito/automated-cherry-pick-of-#6103-upstream-release-2.13
Automated cherry pick of #6103: fix: 修复openstack存储同步问题
2020-04-28 23:36:35 +08:00
Qu Xuan
80c2c2e2ed fix: 修复openstack存储同步问题 2020-04-28 14:48:46 +08:00
Qu Xuan
007ad415de fix: 普通用户可获取rds账号密码 2020-04-28 10:44:36 +08:00
Zexi Li
70a689085a Merge pull request #6072 from ioito/automated-cherry-pick-of-#6068-upstream-release-2.13
Automated cherry pick of #6068: fix: gcp use project name for cloudprovider
2020-04-27 16:03:34 +08:00
Qu Xuan
e7b5cb7744 fix: gcp use project name for cloudprovider 2020-04-27 14:18:13 +08:00
Zexi Li
2ed6ebb42a Merge pull request #6066 from rainzm/automated-cherry-pick-of-#6062-upstream-release-2.13
Automated cherry pick of #6062: fix/notify: Add deadline for rpc client
2020-04-27 12:48:15 +08:00
Rain
c371eb5ba3 fix/notify: Add deadline for rpc client 2020-04-27 10:45:28 +08:00
Zexi Li
55f1c65a13 Merge pull request #6058 from swordqiu/automated-cherry-pick-of-#6006-upstream-release-2.13
Automated cherry pick of #6006: fix: resolve parameter name conflict in google cloud account create input
2020-04-26 23:04:58 +08:00
Qiu Jian
b22d97bc71 fix: resolve parameter name conflict in google cloud account create input 2020-04-26 21:56:50 +08:00
Zexi Li
fd1d2ed3e9 Merge pull request #6049 from tb365/automated-cherry-pick-of-#6042-upstream-release-2.13
Automated cherry pick of #6042: huawei elb cookie timeout fix
2020-04-26 21:06:36 +08:00
tangbin
120f81af39 aws elb health check type fix 2020-04-26 20:11:19 +08:00
tangbin
14ac447799 huawei elb cookie timeout fix 2020-04-26 20:11:19 +08:00
yunion-ci-robot
05565c61b4 Merge pull request #6009 from swordqiu/automated-cherry-pick-of-#6008-upstream-release-2.13
Automated cherry pick of #6008: fix: GetOnPremiseNetworkOfIP should return underlay networks
2020-04-26 19:49:33 +08:00
Zexi Li
755ed4c54a Merge pull request #6032 from ioito/automated-cherry-pick-of-#6028-upstream-release-2.13
Automated cherry pick of #6028: fix: json unmarshal
2020-04-26 18:19:48 +08:00
Qu Xuan
00140d3af2 fix: json unmarshal 2020-04-26 15:53:00 +08:00
yunion-ci-robot
e2ad8450b6 Merge pull request #6018 from zexi/automated-cherry-pick-of-#6014-upstream-release-2.13
Automated cherry pick of #6014: scheduler: fix network predicate get wrong free port
2020-04-26 00:29:32 +08:00
Zexi Li
f7da35a988 scheduler: fix network predicate get wrong free port 2020-04-25 23:31:04 +08:00
Qiu Jian
7e56ed01eb fix: GetOnPremiseNetworkOfIP should return underlay networks 2020-04-25 16:30:00 +08:00
Zexi Li
f1014690e3 Merge pull request #5967 from swordqiu/automated-cherry-pick-of-#5966-upstream-release-2.13
Automated cherry pick of #5966: supermicro redfish support
2020-04-23 09:54:18 +08:00
Qiu Jian
dcf56e0463 remove errors import 2020-04-23 09:29:15 +08:00
Qiu Jian
5063616d07 supermicro redfish support 2020-04-23 09:28:04 +08:00
Zexi Li
dce0ab2c8f Merge pull request #5965 from swordqiu/automated-cherry-pick-of-#5961-upstream-release-2.13
Automated cherry pick of #5961: fix: clean pending usage caused by pre-validate-create-data
2020-04-23 00:03:31 +08:00
Zexi Li
30121d55e7 Merge pull request #5924 from ioito/automated-cherry-pick-of-#5919-upstream-release-2.13
Automated cherry pick of #5919: fix: 非私有云同步region name
2020-04-23 00:00:03 +08:00
Zexi Li
6f96fdda74 Merge pull request #5935 from ioito/automated-cherry-pick-of-#5931-upstream-release-2.13
Automated cherry pick of #5931: fix: 转换非标准存储类型到lrs
2020-04-22 23:57:42 +08:00
Zexi Li
19806776e8 Merge pull request #5950 from tb365/automated-cherry-pick-of-#5945-upstream-release-2.13
Automated cherry pick of #5945: huawei elb sync vpc
2020-04-22 23:56:23 +08:00
Zexi Li
47b52c8aec Merge pull request #5952 from zexi/automated-cherry-pick-of-#5951-upstream-release-2.13
Automated cherry pick of #5951: baremetal: ensure power up add retries
2020-04-22 23:53:38 +08:00
Qiu Jian
456f7d5bb4 fix: clean pending usage caused by pre-validate-create-data 2020-04-22 23:49:21 +08:00
yunion-ci-robot
cba14b5dd0 Merge pull request #5937 from tb365/automated-cherry-pick-of-#5927-upstream-release-2.13
Automated cherry pick of #5927: remove aws invalid backendgroup
2020-04-22 23:05:06 +08:00
Zexi Li
309f31025a baremetal: ensure power up add retries 2020-04-22 22:07:34 +08:00
tangbin
3512c9214a huawei elb sync vpc 2020-04-22 20:31:40 +08:00
tangbin
80c09912f0 remove aws invalid backendgroup 2020-04-22 18:55:37 +08:00
Qu Xuan
d447bfe11c fix: 转换非标准存储类型到lrs 2020-04-22 18:54:48 +08:00
Qu Xuan
ca54219b96 fix: 非私有云同步region name 2020-04-22 18:00:54 +08:00
Zexi Li
3bd63e71de Merge pull request #5910 from swordqiu/automated-cherry-pick-of-#5906-upstream-release-2.13
Automated cherry pick of #5906: fix: blacklist keystone reset admin password
2020-04-22 15:09:44 +08:00
Qiu Jian
ad632dd76f fix: blacklist keystone reset admin password 2020-04-22 15:05:00 +08:00
Zexi Li
3fa388afaa Merge pull request #5891 from swordqiu/automated-cherry-pick-of-#5890-upstream-release-2.13
Automated cherry pick of #5890: fix: policy details should carry updated_at and created_at fields
2020-04-22 10:34:35 +08:00
Zexi Li
ff59f3d71c Merge pull request #5896 from swordqiu/automated-cherry-pick-of-#5895-upstream-release-2.13
Automated cherry pick of #5895: fix: delete idp also delete users/groups in target domain
2020-04-22 10:33:57 +08:00
Zexi Li
e6b22a8a59 Merge pull request #5888 from ioito/automated-cherry-pick-of-#5884-upstream-release-2.13
Automated cherry pick of #5884: fix: 仅当变更domainId时才需要更新projectId
2020-04-22 10:32:47 +08:00
Qiu Jian
f42d378082 fix: delete idp also delete users/groups in target domain 2020-04-22 10:09:22 +08:00
Qiu Jian
01e6fb4851 fix: policy details should carry updated_at and created_at fields 2020-04-21 22:41:02 +08:00
Qu Xuan
f694040ee2 fix: 仅当变更domainId时才需要更新projectId 2020-04-21 21:15:24 +08:00
Zexi Li
3a5de36189 Merge pull request #5866 from tb365/automated-cherry-pick-of-#5865-upstream-release-2.13
Automated cherry pick of #5865: lblis & lbbg & lbr & lbb create add fetch owner id
2020-04-20 20:50:59 +08:00
tangbin
54424146e8 lblis & lbbg & lbr & lbb create add fetch owner id 2020-04-20 19:22:28 +08:00
Zexi Li
8114e15fe2 Merge pull request #5846 from swordqiu/automated-cherry-pick-of-#5845-upstream-release-2.13
Automated cherry pick of #5845: fix: cloudproviderregion sync ignore panic
2020-04-18 12:02:14 +08:00
Zexi Li
2666b9a4db Merge pull request #5841 from tb365/automated-cherry-pick-of-#5840-upstream-release-2.13
Automated cherry pick of #5840: aws elb create bugfix
2020-04-18 11:59:39 +08:00
Qiu Jian
628b78f898 fix: cloudproviderregion sync ignore panic 2020-04-17 22:04:39 +08:00
TangBin
156aab4167 huawei oss client bugfix 2020-04-17 20:51:56 +08:00
TangBin
7c8dd38429 huawei oss client fix & huawei client init fix 2020-04-17 20:51:56 +08:00
tangbin
2bd7fa1d15 aws elb create bugfix 2020-04-17 20:48:29 +08:00
Zexi Li
fd8e92634a Merge pull request #5819 from swordqiu/automated-cherry-pick-of-#5818-upstream-release-2.13
Automated cherry pick of #5818: fix: non-redfish baremetal might support jnlp console
2020-04-17 00:04:51 +08:00
Zexi Li
681032273c Merge pull request #5828 from ioito/automated-cherry-pick-of-#5825-upstream-release-2.13
Automated cherry pick of #5825: fix: 尽量避免secgroup重名问题
2020-04-17 00:03:14 +08:00
Zexi Li
a42ccd5e8c Merge pull request #5833 from zhaoxiangchun/automated-cherry-pick-of-#5831-upstream-release-2.13
Automated cherry pick of #5831: 修复azure获取不到监控数据的问题
2020-04-17 00:01:09 +08:00
yunion-ci-robot
055b290f10 Merge pull request #5813 from yousong/automated-cherry-pick-of-#5811-upstream-release-2.13
Automated cherry pick of #5811: region: lbagents: default to using public type endpoint of influxdb
2020-04-16 23:22:03 +08:00
zhaoxiangchun
31eb7385d2 修复azure获取不到监控数据的问题 2020-04-16 20:09:35 +08:00
Zexi Li
a9a7e66de2 Merge pull request #5808 from ioito/automated-cherry-pick-of-#5805-upstream-release-2.13
Automated cherry pick of #5805: fix: 优化rds sku list查询速度
2020-04-16 18:01:28 +08:00
Qu Xuan
4f1f7f4715 fix: 尽量避免secgroup重名问题 2020-04-16 16:41:32 +08:00
Qiu Jian
a6a50d65ee fix: non-redfish baremetal might support jnlp console 2020-04-15 23:46:11 +08:00
Yousong Zhou
7e06512fda region: buckets: use identity_apis.EndpointInterfacePublic 2020-04-15 18:05:27 +08:00
Yousong Zhou
5f54d711c0 image: use identity_apis.EndpointInterfacePublic 2020-04-15 18:04:48 +08:00
Yousong Zhou
0e484e2a2f region: lbagents: default to using public type endpoint of influxdb 2020-04-15 18:04:48 +08:00
Qu Xuan
c35ed2f8b3 fix: 优化rds sku list查询速度 2020-04-15 18:02:43 +08:00
Zexi Li
44c12f7ca3 Merge pull request #5803 from zexi/automated-cherry-pick-of-#5798-upstream-release-2.13
Automated cherry pick of #5798: climc: support k8s service v3.2
2020-04-15 10:38:23 +08:00
Zexi Li
6acb41989a climc: support k8s service v3.2 2020-04-15 10:37:51 +08:00
Zexi Li
a08531e694 Merge pull request #5788 from ioito/automated-cherry-pick-of-#5785-upstream-release-2.13
Automated cherry pick of #5785: fix: 避免aliyun access key不可用时返回NotFoundError错误
2020-04-14 10:45:13 +08:00
Qu Xuan
dce8e65e0d fix: 避免aliyun access key不可用时返回NotFoundError错误 2020-04-13 18:50:51 +08:00
Zexi Li
1e4339e87b Merge pull request #5761 from tb365/automated-cherry-pick-of-#5759-upstream-release-2.13
Automated cherry pick of #5759: aws elb bugfix
2020-04-13 11:27:33 +08:00
tangbin
3b41cb91b5 aws elb bugfix 2020-04-13 10:28:19 +08:00
Zexi Li
52eca7a37c Merge pull request #5781 from swordqiu/automated-cherry-pick-of-#5780-upstream-release-2.13
Automated cherry pick of #5780: fix: host jnlp request fail for idrac9
2020-04-13 09:49:11 +08:00
Qiu Jian
7554c634f7 fix: host jnlp request fail for idrac9 2020-04-13 00:09:13 +08:00
yunion-ci-robot
fbe4f48fb0 Merge pull request #5777 from ioito/automated-cherry-pick-of-#5774-upstream-release-2.13
Automated cherry pick of #5774: fix: azure重装系统删除不必要的参数
2020-04-12 00:36:46 +08:00
Qu Xuan
b80742d7ef fix: azure重装系统删除不必要的参数 2020-04-11 15:12:38 +08:00
Zexi Li
c4829e2836 Merge pull request #5755 from swordqiu/automated-cherry-pick-of-#5745-upstream-release-2.13
Automated cherry pick of #5745: feature: redfish support IDRAC9 baremetal
2020-04-11 13:13:56 +08:00
Zexi Li
6d9845ece9 Merge pull request #5768 from yousong/automated-cherry-pick-of-#5765-upstream-release-2.13
Automated cherry pick of #5765: region: lbagent: vrrp.advert_int must be the same inside cluster
2020-04-11 13:04:37 +08:00
Yousong Zhou
b4fb07864b region: lbagent: vrrp.advert_int must be the same inside cluster 2020-04-10 15:55:55 +08:00
yunion-ci-robot
98d5f438de Merge pull request #5743 from yousong/automated-cherry-pick-of-#5740-upstream-release-2.13
Automated cherry pick of #5740: region: lbagents: fix returning error when glob has no match
2020-04-10 09:52:43 +08:00
Qiu Jian
f48d7ce87e feature: redfish support IDRAC9 baremetal 2020-04-09 23:01:16 +08:00
Yousong Zhou
a4de17108d region: lbagents: fix returning error when glob has no match 2020-04-09 11:08:52 +08:00
Zexi Li
59ee548f80 Merge pull request #5727 from tb365/automated-cherry-pick-of-#5726-upstream-release-2.13
Automated cherry pick of #5726: huawei&qcloud&huawei elb bugfix
2020-04-08 21:53:49 +08:00
Zexi Li
9dcf00664e Merge pull request #5734 from swordqiu/automated-cherry-pick-of-#5733-upstream-release-2.13
Automated cherry pick of #5733: fix: idp log connected/disconnected event
2020-04-08 21:51:40 +08:00
Qiu Jian
114708d93b fix: idp log connected/disconnected event 2020-04-08 21:26:09 +08:00
tangbin
6280c0dfc6 huawei&qcloud&huawei elb bugfix 2020-04-08 20:04:47 +08:00
Zexi Li
43e0935799 Merge pull request #5715 from swordqiu/automated-cherry-pick-of-#5714-upstream-release-2.13
Automated cherry pick of #5714: fix: decouple getUserInfo at apigateway from capabilities call
2020-04-08 02:26:06 +08:00
Qiu Jian
3008803b69 fix: decouple getUserInfo at apigateway from capabilities call 2020-04-08 00:05:09 +08:00
Zexi Li
e841ccf4c6 Merge pull request #5701 from swordqiu/automated-cherry-pick-of-#5698-upstream-release-2.13
Automated cherry pick of #5698: fix: service config changes not effective
2020-04-07 10:38:42 +08:00
Zexi Li
01abfe9b13 Merge pull request #5707 from wanyaoqi/automated-cherry-pick-of-#5704-upstream-release-2.13
Automated cherry pick of #5704: fix migrate cache cdrom
2020-04-07 10:37:28 +08:00
wanyaoqi
f10e16a697 fix migrate cache cdrom 2020-04-06 23:20:22 +08:00
Qiu Jian
02c50a26cf fix: service config changes not effective 2020-04-06 16:13:13 +08:00
Zexi Li
02f760c4b0 Merge pull request #5695 from swordqiu/automated-cherry-pick-of-#5694-upstream-release-2.13
Automated cherry pick of #5694: fix: misc bugs in usage data
2020-04-05 13:51:59 +08:00
Qiu Jian
821b103495 fix: misc bugs in usage data 2020-04-05 07:58:17 +08:00
Zexi Li
d63ca1e5d9 Merge pull request #5689 from ioito/automated-cherry-pick-of-#5686-upstream-release-2.13
Automated cherry pick of #5686: fix: 修复重装系统时未能更换指定image问题
2020-04-03 19:43:36 +08:00
Zexi Li
a721ccd489 Merge pull request #5674 from ioito/automated-cherry-pick-of-#5671-upstream-release-2.13
Automated cherry pick of #5671: fix: 华为云rds使用自身的存储类型
2020-04-03 19:41:52 +08:00
Qu Xuan
1c6ebbf149 fix: 修复重装系统时未能更换指定image问题 2020-04-03 11:36:25 +08:00
Qu Xuan
9d6779734c fix: 华为云rds使用自身的存储类型 2020-04-02 17:30:32 +08:00
Zexi Li
82aa74f949 Merge pull request #5636 from tb365/automated-cherry-pick-of-#5631-upstream-release-2.13
Automated cherry pick of #5631: elb bugfix
2020-04-02 12:47:16 +08:00
Zexi Li
cffd216351 Merge pull request #5663 from swordqiu/automated-cherry-pick-of-#5662-upstream-release-2.13
Automated cherry pick of #5662: fix: disk/nics usage should exclude those pending_deleted
2020-04-02 12:45:38 +08:00
Qiu Jian
d99dd1652a fix: disk/nics usage should exclude those pending_deleted 2020-04-02 01:48:29 +08:00
tangbin
9d61ccc09f elb bugfix 2020-04-01 20:24:04 +08:00
Zexi Li
d4b52b89aa Merge pull request #5654 from swordqiu/automated-cherry-pick-of-#5653-upstream-release-2.13
Automated cherry pick of #5653: fix: allow list cloudprovider by default
2020-04-01 18:13:43 +08:00
Zexi Li
1320c7a915 Merge pull request #5651 from swordqiu/automated-cherry-pick-of-#5648-upstream-release-2.13
Automated cherry pick of #5648: fix: cancel pending usage might not need to update usage
2020-04-01 18:11:35 +08:00
Qiu Jian
6006bb8b45 fix: allow list cloudprovider by default 2020-04-01 17:39:13 +08:00
Qiu Jian
e65dbf4926 fix: cancel pending usage might not need to update usage 2020-04-01 16:56:21 +08:00
Zexi Li
b73f544f89 Merge pull request #5643 from swordqiu/automated-cherry-pick-of-#5640-upstream-release-2.13
Automated cherry pick of #5640: fix: changes to request_work_count cause apigateway restart
2020-04-01 10:23:39 +08:00
Qiu Jian
91eda17b88 fix: changes to request_work_count cause apigateway restart 2020-04-01 10:20:31 +08:00
yunion-ci-robot
63c0b5dc62 Merge pull request #5628 from swordqiu/automated-cherry-pick-of-#5623-upstream-release-2.13
Automated cherry pick of #5623: fix: worker may block by worker_chan
2020-03-31 10:29:45 +08:00
Qiu Jian
d328b165c1 fix: worker may block by worker_chan 2020-03-31 10:10:58 +08:00
Zexi Li
66db3ed11b Merge pull request #5622 from swordqiu/automated-cherry-pick-of-#5616-upstream-release-2.13
Automated cherry pick of #5616: fix: increase apigateway default worker count to 32
2020-03-30 19:22:53 +08:00
Qiu Jian
784f21871d fix: increase apigateway default worker count to 32 2020-03-30 19:09:24 +08:00
yunion-ci-robot
54d67ad010 Merge pull request #5609 from swordqiu/automated-cherry-pick-of-#5608-upstream-release-2.13
Automated cherry pick of #5608: fix: allow list loadbalancer cluster by default
2020-03-28 09:47:42 +08:00
Qiu Jian
88deeae622 fix: allow list loadbalancer cluster by default 2020-03-28 08:59:41 +08:00
Zexi Li
0274e73a47 Merge pull request #5604 from ioito/automated-cherry-pick-of-#5601-upstream-release-2.13
Automated cherry pick of #5601: fix: 修正gcp不支持预付费资源
2020-03-26 20:33:17 +08:00
Qu Xuan
9b64b43dcd fix: 修正gcp不支持预付费资源 2020-03-26 20:02:52 +08:00
Zexi Li
162eb94fa8 Merge pull request #5597 from ioito/automated-cherry-pick-of-#5596-upstream-release-2.13
Automated cherry pick of #5596: fix: 避免onecloud lb未返回provider及brand信息
2020-03-26 10:42:17 +08:00
Qu Xuan
57075ebb56 fix: 避免onecloud lb未返回provider及brand信息 2020-03-25 18:28:14 +08:00
Zexi Li
f82d8c93e0 Merge pull request #5584 from yousong/automated-cherry-pick-of-#5581-upstream-release-2.13
Automated cherry pick of #5581: webconsole: typo fix accessable -> accessible
2020-03-23 21:14:11 +08:00
Yousong Zhou
4d7a68efca httperrors: fix passing "params" argument 2020-03-23 16:43:03 +08:00
Yousong Zhou
7a0e6cd04c webconsole: typo fix accessable -> accessible 2020-03-23 16:43:03 +08:00
Zexi Li
aebc9df97f Merge pull request #5579 from zexi/automated-cherry-pick-of-#5577-upstream-release-2.13
Automated cherry pick of #5577: climc: k8s storageclass support
2020-03-23 10:53:00 +08:00
Zexi Li
be6fbe1f6e climc: k8s storageclass support 2020-03-23 10:53:14 +08:00
Zexi Li
e3976c86ec Merge pull request #5574 from wanyaoqi/automated-cherry-pick-of-#5571-upstream-release-2.13
Automated cherry pick of #5571: guest add metadata cpu mode
2020-03-20 19:38:37 +08:00
wanyaoqi
95de6acd2b guest add metadata cpu mode
- live migrate if guest cpu mode is qemu, do not check host cpu mode
- disk name generation replace '_' to '-'
2020-03-20 15:18:41 +08:00
Zexi Li
aca89a3818 Merge pull request #5558 from rainzm/automated-cherry-pick-of-#5555-upstream-release-2.13
Automated cherry pick of #5555: feat(notify): Compatibility and repair
2020-03-19 10:06:32 +08:00
yunion-ci-robot
3b390ab4b6 Merge pull request #5493 from ioito/automated-cherry-pick-of-#5490-upstream-release-2.13
Automated cherry pick of #5490: fix: class action 统一使用keywords包裹
2020-03-19 08:47:20 +08:00
Rain
6522b8642d feat(notify): Compatibility and repair 2020-03-18 21:01:20 +08:00
Zexi Li
05f5cc96a8 Merge pull request #5548 from swordqiu/automated-cherry-pick-of-#5545-upstream-release-2.13
Automated cherry pick of #5545: fix: policy fetcher not retry after initial failure
2020-03-18 10:53:04 +08:00
Qu Xuan
8a59f35ae3 fix: class action 统一使用keywords包裹 2020-03-17 18:44:54 +08:00
Qiu Jian
ec2eef8138 fix: policy fetcher not retry after initial failure 2020-03-17 18:31:31 +08:00
yunion-ci-robot
4b32d4054b Merge pull request #5532 from ioito/automated-cherry-pick-of-#5529-upstream-release-2.13
Automated cherry pick of #5529: fix: 避免重装系统失败后imageId依然发生改变
2020-03-17 08:21:15 +08:00
yunion-ci-robot
8907c87a22 Merge pull request #5539 from ioito/automated-cherry-pick-of-#5536-upstream-release-2.13
Automated cherry pick of #5536: fix: 修复谷歌云 cloud-provider-clirc 显示错误问题
2020-03-17 08:12:15 +08:00
Qu Xuan
f5c26548ab fix: 修复谷歌云 cloud-provider-clirc 显示错误问题 2020-03-16 20:10:27 +08:00
Zexi Li
97f56884d5 Merge pull request #5526 from ioito/automated-cherry-pick-of-#5452-upstream-release-2.13
Automated cherry pick of #5452: fix: 优化rds sku同步逻辑
2020-03-16 18:25:15 +08:00
Zexi Li
9fff1c2123 Merge pull request #5509 from swordqiu/automated-cherry-pick-of-#5506-upstream-release-2.13
Automated cherry pick of #5506: fix: recode cloudprovider usable filter
2020-03-16 13:00:02 +08:00
Zexi Li
6349adb35b Merge pull request #5497 from zhaoxiangchun/automated-cherry-pick-of-#5496-upstream-release-2.13
Automated cherry pick of #5496: vmware 宿主机监控信息获取
2020-03-16 12:57:48 +08:00
Qu Xuan
e1b8c5f13a fix: 避免重装系统失败后imageId依然发生改变 2020-03-16 11:30:40 +08:00
Qu Xuan
86c672082a fix: 优化rds sku同步逻辑 2020-03-16 10:34:52 +08:00
yunion-ci-robot
3e3120ef87 Merge pull request #5522 from ioito/automated-cherry-pick-of-#5519-upstream-release-2.13
Automated cherry pick of #5519: fix: 避免未传递prority参数导致校验未通过
2020-03-16 09:07:13 +08:00
Qu Xuan
73ec39100a fix: 避免未传递prority参数导致校验未通过 2020-03-15 13:13:51 +08:00
yunion-ci-robot
9351330a2e Merge pull request #5513 from zexi/automated-cherry-pick-of-#5511-upstream-release-2.13
Automated cherry pick of #5511: scheduler: fix disk allocated not balanced
2020-03-14 17:51:05 +08:00
Zexi Li
ad50d6033d scheduler: fix disk allocated not balanced 2020-03-14 16:49:39 +08:00
Qiu Jian
15d5e4db92 fix: recode cloudprovider usable filter 2020-03-14 09:09:34 +08:00
Zexi Li
594c1d5b3a Merge pull request #5504 from zhaoxiangchun/automated-cherry-pick-of-#5268-upstream-release-2.13
Automated cherry pick of #5268: 谷歌云multicloud监控
2020-03-13 19:53:06 +08:00
zhaoxiangchun
a8c0e53902 谷歌云multicloud监控
monitor.go文件中GetMonitorData函数:
 1)首先组装参数信息
 2)通过external_id获取相关id信息,根据restAPI文档中的resource格式拼装完成monitoring相关的resource信息
 3)然后通过monitorList函数获取相关的监控信息

更新go.mod google.golang.org所依赖的google.golang.org/api版本
2020-03-13 19:48:09 +08:00
zhaoxiangchun
663d3062bd vmware 宿主机监控信息获取 2020-03-13 17:21:40 +08:00
yunion-ci-robot
d4db5ef360 Merge pull request #5476 from rainzm/automated-cherry-pick-of-#5454-upstream-release-2.13
Automated cherry pick of #5454: fix(glance): Structured subimage info and add 'created_at' field
2020-03-13 15:36:05 +08:00
yunion-ci-robot
9e1cb659f9 Merge pull request #5488 from wanyaoqi/automated-cherry-pick-of-#5484-upstream-release-2.13
Automated cherry pick of #5484: download handler set no timeout
2020-03-13 14:30:56 +08:00
wanyaoqi
7d252c2efc download handler set no timeout 2020-03-13 12:02:26 +08:00
Rain
02191c04f8 fix(glance): Structured subimage info and add 'created_at' field 2020-03-12 19:14:35 +08:00
Zexi Li
a659f27087 Merge pull request #5460 from bistuzx/automated-cherry-pick-of-#5459-upstream-release-2.13
Automated cherry pick of #5459: add bucket connection test
2020-03-12 16:19:14 +08:00
张旭
2aca328104 change climc bucket options import 2020-03-12 12:27:55 +08:00
张旭
b65a1dfe3b add bucket connection test 2020-03-12 12:27:55 +08:00
Zexi Li
bc41899969 Merge pull request #5467 from rainzm/feat/vendor_2.13
feat: Update Vendor for release/2.13
2020-03-12 12:07:33 +08:00
Rain
7a4e16ac82 feat: Update Vendor for release/2.13 2020-03-12 11:55:33 +08:00
Zexi Li
af444e1886 Merge pull request #5450 from zexi/automated-cherry-pick-of-#5447-upstream-release-2.13
Automated cherry pick of #5447: region: host update storage set enabled
2020-03-11 15:58:32 +08:00
Zexi Li
a7835a71da region: host update storage set enabled 2020-03-11 15:59:27 +08:00
Zexi Li
4d89685bba Merge pull request #5422 from swordqiu/automated-cherry-pick-of-#5419-upstream-release-2.13
Automated cherry pick of #5419: fix: fail to find esxi admin vnic, use vnic with default IPv4 route
2020-03-10 14:46:07 +08:00
yunion-ci-robot
a245385da8 Merge pull request #5432 from ioito/automated-cherry-pick-of-#5429-upstream-release-2.13
Automated cherry pick of #5429: fix: typo for sku sync
2020-03-10 11:13:59 +08:00
yunion-ci-robot
614c31f26e Merge pull request #5426 from rainzm/automated-cherry-pick-of-#5424-upstream-release-2.13
Automated cherry pick of #5424: fix(esxi): Add two account with same account name
2020-03-10 11:03:59 +08:00
Qu Xuan
16bbd77e8b fix: typo for sku sync 2020-03-09 19:59:33 +08:00
Rain
1cc788e684 fix(esxi): Add two account with same account name 2020-03-09 17:56:59 +08:00
Qiu Jian
54adabbde8 fix: fail to find esxi admin vnic, use vnic with default IPv4 route 2020-03-09 16:07:16 +08:00
Zexi Li
65c1b3effb Merge pull request #5417 from zexi/automated-cherry-pick-of-#5414-upstream-release-2.13
Automated cherry pick of #5414: opslog: notes use text column
2020-03-09 12:36:35 +08:00
Zexi Li
cc33efbbc9 Merge pull request #5401 from swordqiu/automated-cherry-pick-of-#5398-upstream-release-2.13
Automated cherry pick of #5398: fix: not check domain quota if non_default_domain_project is off
2020-03-09 12:32:12 +08:00
Zexi Li
6771b64b6f opslog: notes use text column 2020-03-09 12:31:51 +08:00
Zexi Li
706af7bf54 Merge pull request #5406 from swordqiu/automated-cherry-pick-of-#5403-upstream-release-2.13
Automated cherry pick of #5403: fix: cloudprovider performEnable should also enable its cloudaccount
2020-03-09 12:30:40 +08:00
Qiu Jian
f4d218209c fix: cloudprovider performEnable should also enable its cloudaccount 2020-03-08 18:26:38 +08:00
Qiu Jian
e5534c7d3a fix: not check domain quota if non_default_domain_project is off 2020-03-07 18:17:40 +08:00
Zexi Li
99e51d679b Merge pull request #5395 from swordqiu/automated-cherry-pick-of-#5392-upstream-release-2.13
Automated cherry pick of #5392: fix: scoped resource should override FetchOwnerId
2020-03-07 15:51:36 +08:00
Qiu Jian
a997303df9 fix: scoped resource should override FetchOwnerId 2020-03-07 15:46:26 +08:00
Zexi Li
dee404451b Merge pull request #5391 from swordqiu/automated-cherry-pick-of-#5388-upstream-release-2.13
Automated cherry pick of #5388: fix: keystone prefers internal endpoint type
2020-03-06 22:23:11 +08:00
Qiu Jian
5bad638411 fix: keystone prefers internal endpoint type 2020-03-06 21:47:40 +08:00
yunion-ci-robot
9e8b2eb017 Merge pull request #5385 from rainzm/automated-cherry-pick-of-#5378-upstream-release-2.13
Automated cherry pick of #5378: fix: Add 'scope=system' and 'system' for Caches when querying from Keystone.
2020-03-06 19:17:50 +08:00
Zexi Li
7337198f9e Merge pull request #5375 from swordqiu/automated-cherry-pick-of-#5372-upstream-release-2.13
Automated cherry pick of #5372: fix: no scope shcedtag should be visible to all
2020-03-06 18:32:39 +08:00
yunion-ci-robot
305caea1d5 Merge pull request #5380 from tb365/automated-cherry-pick-of-#5379-upstream-release-2.13
Automated cherry pick of #5379: huawei reset password bugfix
2020-03-06 18:15:51 +08:00
Rain
61657c6afc fix: Add 'scope=system' and 'system' for Caches when querying from Keystone.
1. Query 'scope=system' and 'system=true' is neccessary when fetching all users
   or groups from Keystone.
   Without these, users and groups in other domains (non-caller domains),
   as well as system-level users, cannot be detected.
2. Query 'scope=system' is neccessary when fetching all project from Keystone.
2020-03-06 17:17:57 +08:00
TangBin
f08be6b820 ctyun region name fix 2020-03-06 16:51:20 +08:00
TangBin
3c18eae779 huawei reset password bugfix 2020-03-06 16:51:20 +08:00
Qiu Jian
20d79e2c5c fix: no scope shcedtag should be visible to all 2020-03-06 15:24:21 +08:00
Zexi Li
254e1ce7ed Merge pull request #5369 from rainzm/automated-cherry-pick-of-#5366-upstream-release-2.13
Automated cherry pick of #5366: fix/notify: Fix the resend mechanism
2020-03-06 12:46:14 +08:00
Rain
b3bd5f6dcf fix/notify: Fix the resend mechanism 2020-03-06 11:13:25 +08:00
yunion-ci-robot
b3f30e2522 Merge pull request #5355 from rainzm/automated-cherry-pick-of-#5353-upstream-release-2.13
Automated cherry pick of #5353: feature(notify): Add query and return value for contact UPDATE interface
2020-03-05 19:03:51 +08:00
Rain
dc01dedb68 fix the conflict 2020-03-05 17:20:39 +08:00
Rain
252a5f2537 feature(notify): Add query and return value for contact UPDATE interface
1. Add same return value with contact GET interface when updating
2. Add pull params for query to pull subcontact by mobile number.
   For example, pull user_id from dingtalk throught user's mobile
   number.
3. Add corresponding feature based on above for climc.
4. UserCache will try FetchByName if there is no id matched user when
   fetching users from KeyStone.
2020-03-05 17:19:24 +08:00
Zexi Li
a7a77fc4be Merge pull request #5339 from swordqiu/automated-cherry-pick-of-#5336-upstream-release-2.13
Automated cherry pick of #5336: fix: keystone user password history check should skip system account
2020-03-04 19:16:32 +08:00
Qiu Jian
65da02614e fix: keystone user password history check should skip system account 2020-03-04 18:46:03 +08:00
Zexi Li
b21b514af3 Merge pull request #5327 from swordqiu/automated-cherry-pick-of-#5324-upstream-release-2.13
Automated cherry pick of #5324: fix: clean up pending usage no matter whether object upload is success
2020-03-03 13:14:30 +08:00
yunion-ci-robot
4e64dc1dca Merge pull request #5318 from ioito/automated-cherry-pick-of-#5315-upstream-release-2.13
Automated cherry pick of #5315: fix: 避免旧套餐下架zone信息未知,导致同步rds异常
2020-03-03 02:19:45 +08:00
Qiu Jian
2870c7acfa fix: clean up pending usage no matter whether object upload is success 2020-03-03 02:13:42 +08:00
Qu Xuan
699859f409 fix: 避免旧套餐下架zone信息未知,导致同步rds异常 2020-03-02 17:10:00 +08:00
yunion-ci-robot
ef0a88293b Merge pull request #5271 from zhaoxiangchun/automated-cherry-pick-of-#5268-upstream-release-2.13
Automated cherry pick of #5268: 谷歌云multicloud监控
2020-02-29 14:02:32 +08:00
yunion-ci-robot
f5261205cd Merge pull request #5310 from ioito/automated-cherry-pick-of-#5307-upstream-release-2.13
Automated cherry pick of #5307: 修复aliyun没有权限获取余额问题
2020-02-28 22:00:30 +08:00
yunion-ci-robot
2afb33adc5 Merge pull request #5299 from tb365/bugfix/tb-bugfix-022802
vpc list add param vpc_usable
2020-02-28 21:16:20 +08:00
yunion-ci-robot
06e10a8dbb Merge pull request #5284 from wanyaoqi/automated-cherry-pick-of-#5255-upstream-release-2.13
Automated cherry pick of #5255: fix nic get pci address
2020-02-28 21:07:27 +08:00
Qu Xuan
66e23b7b85 修复aliyun没有权限获取余额问题 2020-02-28 19:56:16 +08:00
yunion-ci-robot
865d53cddf Merge pull request #5280 from ioito/automated-cherry-pick-of-#5277-upstream-release-2.13
Automated cherry pick of #5277: fix: 新加gcp region 翻译
2020-02-28 15:05:19 +08:00
TangBin
d0eb89bc55 vpc list add param vpc_usable 2020-02-28 14:40:31 +08:00
yunion-ci-robot
9fa4dfa4cd Merge pull request #5293 from ioito/automated-cherry-pick-of-#5290-upstream-release-2.13
Automated cherry pick of #5290: 添加azure region city信息
2020-02-28 13:15:20 +08:00
Qu Xuan
0392b27b10 添加azure region city信息 2020-02-28 11:37:47 +08:00
wanyaoqi
efc216afe5 fix nic get pci address 2020-02-27 23:04:04 +08:00
Qu Xuan
42426d71e8 fix: 新加gcp region 翻译 2020-02-27 18:55:30 +08:00
zhaoxiangchun
90f4095297 谷歌云multicloud监控
monitor.go文件中GetMonitorData函数:
 1)首先组装参数信息
 2)通过external_id获取相关id信息,根据restAPI文档中的resource格式拼装完成monitoring相关的resource信息
 3)然后通过monitorList函数获取相关的监控信息

更新go.mod google.golang.org所依赖的google.golang.org/api版本
2020-02-27 15:57:34 +08:00
yunion-ci-robot
af7d67c5ac Merge pull request #5241 from wanyaoqi/automated-cherry-pick-of-#5238-upstream-release-2.13
Automated cherry pick of #5238: fix host init set reserve memory
2020-02-26 23:02:19 +08:00
wanyaoqi
16b0df3075 makesure /etc/ceph created before connect 2020-02-26 20:47:42 +08:00
yunion-ci-robot
680d50ed3a Merge pull request #5234 from ioito/automated-cherry-pick-of-#5231-upstream-release-2.13
Automated cherry pick of #5231: fix: 添加磁盘回滚snapshot日志
2020-02-26 15:57:12 +08:00
yunion-ci-robot
7c13b80119 Merge pull request #5245 from ioito/automated-cherry-pick-of-#5242-upstream-release-2.13
Automated cherry pick of #5242: fix: 避免根磁盘小于镜像大小导致创建失败
2020-02-26 10:17:13 +08:00
yunion-ci-robot
be20ad19d8 Merge pull request #5250 from ioito/automated-cherry-pick-of-#5247-upstream-release-2.13
Automated cherry pick of #5247: fix: 返回azure api 错误信息
2020-02-25 21:06:22 +08:00
Qu Xuan
27d9fc4879 fix: 返回azure api 错误信息 2020-02-25 19:31:50 +08:00
Qu Xuan
49af630a5b fix: 避免根磁盘小于镜像大小导致创建失败 2020-02-25 15:40:57 +08:00
wanyaoqi
b95fc4dfe9 fix host register get network filter: add server_type baremetal 2020-02-25 11:37:48 +08:00
wanyaoqi
237748a6e1 fix guest network get desc 2020-02-25 11:37:47 +08:00
wanyaoqi
c240062b36 fix host init set reserve memory 2020-02-25 11:33:58 +08:00
Qu Xuan
081c439243 fix: 添加磁盘回滚snapshot日志 2020-02-24 16:09:05 +08:00
yunion-ci-robot
f95e017ce3 Merge pull request #5229 from rainzm/automated-cherry-pick-of-#5186-upstream-release-2.13
Automated cherry pick of #5186: feature(notify): Validate config
2020-02-24 15:24:13 +08:00
Rain
c14202db03 feature(notify): Validate config 2020-02-24 14:12:29 +08:00
Zexi Li
d71f0ce952 Merge pull request #5210 from swordqiu/automated-cherry-pick-of-#5208-upstream-release-2.13
Automated cherry pick of #5208: fix: reset paging limit to 2048 from 20
2020-02-21 16:46:13 +08:00
Zexi Li
ccddbd96a2 Merge pull request #5220 from rainzm/automated-cherry-pick-of-#5217-upstream-release-2.13
Automated cherry pick of #5217: fix: Storage filter not work for Esxi
2020-02-21 16:44:50 +08:00
yunion-ci-robot
f728f3c325 Merge pull request #5205 from tb365/automated-cherry-pick-of-#5199-upstream-release-2.13
Automated cherry pick of #5199: cloud region city list add default limit 2048
2020-02-21 16:01:38 +08:00
Rain
03a8b0b7f0 fix: Storage filter not work for Esxi
1. SESXiGuestDriver.DoScheduleStorageFilter should return true.
2. ESXi's SHost.GetStorageSizeMB should return the capacity of all the
storage belonging to it.
2020-02-21 15:14:28 +08:00
yunion-ci-robot
a42926a9d7 Merge pull request #5216 from ioito/automated-cherry-pick-of-#5213-upstream-release-2.13
Automated cherry pick of #5213: fix: 添加gcp region中文翻译
2020-02-20 21:15:29 +08:00
yunion-ci-robot
f60e3d0894 Merge pull request #5202 from ioito/automated-cherry-pick-of-#5198-upstream-release-2.13
Automated cherry pick of #5198: fix: 修复azure坐标问题,添加新的azure region城市信息
2020-02-20 20:59:29 +08:00
Qu Xuan
779aa13dd1 fix: 添加gcp region中文翻译 2020-02-20 17:40:03 +08:00
yunion-ci-robot
9aaaf319e0 Merge pull request #5194 from ioito/automated-cherry-pick-of-#5191-upstream-release-2.13
Automated cherry pick of #5191: fix: add aliyun new region info
2020-02-20 16:15:30 +08:00
TangBin
151d081fb3 huawei cloud create bugfix 2020-02-20 15:36:27 +08:00
TangBin
ed31437bb0 huawei cloud create bugfix 2020-02-20 15:35:45 +08:00
TangBin
245349ac91 cloud region city list add default limit 2048 2020-02-20 15:35:45 +08:00
yunion-ci-robot
e9d04fd3fa Merge pull request #5190 from ioito/automated-cherry-pick-of-#5187-upstream-release-2.13
Automated cherry pick of #5187: fix: 填充gcp disk_format字段
2020-02-20 15:28:30 +08:00
Qiu Jian
df930fbd65 fix: reset paging limit to 2048 from 20 2020-02-20 15:20:26 +08:00
Qu Xuan
4811160707 fix: 修复azure坐标问题,添加新的azure region城市信息 2020-02-20 14:56:14 +08:00
Qu Xuan
ebf7b1d421 fix: add aliyun new region info 2020-02-20 11:08:06 +08:00
Qu Xuan
793f0ab4c1 fix: 填充gcp disk_format字段 2020-02-20 10:46:33 +08:00
yunion-ci-robot
07302e17d1 Merge pull request #5183 from tb365/automated-cherry-pick-of-#5181-upstream-release-2.13
Automated cherry pick of #5181: aws listener sync fix
2020-02-19 19:18:28 +08:00
tangbin
e06ebe8992 huawei http listener sync fix 2020-02-19 18:46:58 +08:00
tangbin
e0f341e07d aws rebuild root fix 2020-02-19 18:46:58 +08:00
tangbin
2206c7eb5c aws listener sync fix 2020-02-19 18:46:58 +08:00
yunion-ci-robot
5fc0b073a9 Merge pull request #5148 from tb365/automated-cherry-pick-of-#5145-upstream-release-2.13
Automated cherry pick of #5145: qcloud elb sync
2020-02-19 16:08:30 +08:00
Yousong Zhou
68bb6c1d09 Merge pull request #5175 from swordqiu/automated-cherry-pick-of-#5173-upstream-release-2.13
Automated cherry pick of #5173: fix: sync cloud provider should change its cloud account's sync_status
2020-02-19 16:02:40 +08:00
yunion-ci-robot
56d2236513 Merge pull request #5164 from tb365/automated-cherry-pick-of-#5162-upstream-release-2.13
Automated cherry pick of #5162: huawei elb backend vpc validate fix
2020-02-19 13:45:26 +08:00
yunion-ci-robot
97e05fc4b6 Merge pull request #5170 from ioito/automated-cherry-pick-of-#5167-upstream-release-2.13
Automated cherry pick of #5167: fix: 避免将虚拟机ip同步到弹性网卡
2020-02-19 12:35:27 +08:00
Qiu Jian
cb9ff42407 fix: sync cloud provider should change its cloud account's sync_status 2020-02-19 12:01:40 +08:00
Zexi Li
bccefab721 Merge pull request #5153 from swordqiu/automated-cherry-pick-of-#5151-upstream-release-2.13
Automated cherry pick of #5151: fix: 1. adjust default response header timer to 30 seconds 2. set default paging limit to 20
2020-02-19 02:29:56 +08:00
Qu Xuan
51201eede3 fix: 避免将虚拟机ip同步到弹性网卡 2020-02-18 15:39:51 +08:00
yunion-ci-robot
5e7aa130ea Merge pull request #5141 from ioito/automated-cherry-pick-of-#5138-upstream-release-2.13
Automated cherry pick of #5138: fix: 避免未过滤掉同一个network底下的guest
2020-02-18 14:44:50 +08:00
tangbin
3edd51c1dd huawei elb backend vpc validate fix 2020-02-18 14:19:33 +08:00
yunion-ci-robot
382309fff4 Merge pull request #5133 from zhaoxiangchun/automated-cherry-pick-of-#5132-upstream-release-2.13
Automated cherry pick of #5132: zstack监控功能
2020-02-18 12:05:39 +08:00
Qiu Jian
5aad93deab fix: 1. adjust default response header timer to 30 seconds 2. set default paging limit to 20 2020-02-18 08:54:29 +08:00
TangBin
d55bbf6d6e qcloud elb sync 2020-02-17 22:30:35 +08:00
Qu Xuan
d4cbaff1bc fix: 避免未过滤掉同一个network底下的guest 2020-02-17 20:53:10 +08:00
zhaoxiangchun
e93cbb6e58 zstack监控功能
monitor.go中GetMonitorData函数通过传入的参数拼装请求参数,然后调用zstack.go中的getMonitor(),通过GET请求,获取相应的指标监控数据
2020-02-17 12:01:59 +08:00
yunion-ci-robot
87a6aedae6 Merge pull request #5120 from ioito/automated-cherry-pick-of-#5117-upstream-release-2.13
Automated cherry pick of #5117: fix: 谷歌新加region翻译
2020-02-14 15:42:08 +08:00
Qu Xuan
7178f56c26 fix: 谷歌新加region翻译 2020-02-14 14:45:39 +08:00
yunion-ci-robot
18f2e230d9 Merge pull request #5108 from rainzm/automated-cherry-pick-of-#5106-upstream-release-2.13
Automated cherry pick of #5106: fix(notify): Set some default template
2020-02-14 12:23:04 +08:00
yunion-ci-robot
2c3b8df036 Merge pull request #5114 from zexi/automated-cherry-pick-of-#5111-upstream-release-2.13
Automated cherry pick of #5111: region: server list by host sn
2020-02-14 12:07:04 +08:00
Zexi Li
7f015f562a region: server list by host sn 2020-02-13 21:19:22 +08:00
Rain
cd580b07b6 fix(notify): Set some default template 2020-02-13 16:52:05 +08:00
yunion-ci-robot
3e1f7239dc Merge pull request #5062 from zhaoxiangchun/automated-cherry-pick-of-#5061-upstream-release-2.13
Automated cherry pick of #5061: multicloud的vmware监控功能
2020-02-13 04:00:01 +08:00
yunion-ci-robot
9d94bc5503 Merge pull request #5094 from bistuzx/automated-cherry-pick-of-#5092-upstream-release-2.13
Automated cherry pick of #5092: update account bucket options
2020-02-13 03:49:03 +08:00
张旭
fe5e1b1321 update account bucket options 2020-02-12 18:28:25 +08:00
yunion-ci-robot
648f0af3e8 Merge pull request #5080 from ioito/automated-cherry-pick-of-#5077-upstream-release-2.13
Automated cherry pick of #5077: fix: 修复gcp出方向规则同步问题
2020-02-11 17:38:58 +08:00
yunion-ci-robot
f47d98e382 Merge pull request #5075 from ioito/automated-cherry-pick-of-#5072-upstream-release-2.13
Automated cherry pick of #5072: fix: 忽略无权限的资源标签
2020-02-11 17:22:03 +08:00
zhaoxiangchun
f81a14f85a multicloud的vmware监控功能
monitor.go中GetMonitorData()函数获取监控数据
2020-02-11 00:49:15 +08:00
Qu Xuan
ce0eb0272a fix: 修复gcp出方向规则同步问题 2020-02-10 18:48:41 +08:00
Qu Xuan
349b8c246b fix: 忽略无权限的资源标签 2020-02-10 16:45:22 +08:00
yunion-ci-robot
9c28054105 Merge pull request #5069 from swordqiu/automated-cherry-pick-of-#5065-upstream-release-2.13
Automated cherry pick of #5065: fix: allow empty domain for windows deployment
2020-02-10 10:33:59 +08:00
Qiu Jian
e8dd5a40d0 fix: allow empty domain for windows deployment 2020-02-10 09:23:54 +08:00
yunion-ci-robot
18035d0689 Merge pull request #5057 from swordqiu/automated-cherry-pick-of-#5054-upstream-release-2.13
Automated cherry pick of #5054: fix: createdAt should not be synced when update
2020-02-09 22:23:56 +08:00
Qiu Jian
ed66f7a238 fix: createdAt should not be synced when update 2020-02-08 21:30:12 +08:00
yunion-ci-robot
000a04a67d Merge pull request #5047 from ioito/automated-cherry-pick-of-#5044-upstream-release-2.13
Automated cherry pick of #5044: fix: guest创建兼容keypair参数
2020-02-07 16:02:51 +08:00
Qu Xuan
5e164baf80 fix: guest创建兼容keypair参数 2020-02-07 15:13:40 +08:00
Zexi Li
15fb3e364d Merge pull request #5027 from swordqiu/automated-cherry-pick-of-#5026-upstream-release-2.13
Automated cherry pick of #5026: fix: api gateway rpc handler redudant response
2020-02-07 13:03:26 +08:00
yunion-ci-robot
1d65b27bef Merge pull request #5041 from ioito/automated-cherry-pick-of-#5038-upstream-release-2.13
Automated cherry pick of #5038: fix: 避免因tenantcache未缓存tenant导致创建云账号失败
2020-02-07 04:53:51 +08:00
yunion-ci-robot
11343fa652 Merge pull request #5035 from tb365/automated-cherry-pick-of-#5032-upstream-release-2.13
Automated cherry pick of #5032: aws create with eip fix
2020-02-07 04:50:51 +08:00
Qu Xuan
56c53712e0 fix: 避免因tenantcache未缓存tenant导致创建云账号失败 2020-02-06 18:30:00 +08:00
tangbin
4f6c70f5fb aws create with eip fix 2020-02-06 17:57:32 +08:00
Qiu Jian
8c0086a140 fix: api gateway rpc handler redudant response 2020-02-06 17:02:12 +08:00
yunion-ci-robot
8db7d00c82 Merge pull request #5024 from ioito/automated-cherry-pick-of-#5021-upstream-release-2.13
Automated cherry pick of #5021: fix: 避免因大小写导致linux未注入默认用户
2020-02-06 13:49:48 +08:00
Qu Xuan
8aa6aa3719 fix: 避免因大小写导致linux未注入默认用户 2020-02-06 12:04:46 +08:00
yunion-ci-robot
b422d70dd0 Merge pull request #5018 from swordqiu/automated-cherry-pick-of-#5014-upstream-release-2.13
Automated cherry pick of #5014: fix: support empty dns domain
2020-02-06 09:47:49 +08:00
Qiu Jian
e497eb70e8 fix: support empty dns domain 2020-02-06 03:27:31 +08:00
yunion-ci-robot
1e79fc1318 Merge pull request #4997 from zhaoxiangchun/automated-cherry-pick-of-#4996-upstream-release-2.13
Automated cherry pick of #4996: azure的主机监控信息的获取
2020-02-05 02:13:45 +08:00
zhaoxiangchun
c4dff69959 modify files by github comments 2020-02-04 10:25:06 +08:00
zhaoxiangchun
b760d9aa9d azure的主机监控信息的获取
monitor.go中的GetMonitorData函数完成参数的组装,查询获取监控信息
2020-02-04 10:25:06 +08:00
yunion-ci-robot
454e94e2ff Merge pull request #5001 from ioito/automated-cherry-pick-of-#4999-upstream-release-2.13
Automated cherry pick of #4999: fix: 避免私有云调整配置匹配不到sku
2020-02-03 16:17:43 +08:00
Qu Xuan
14e4ef8043 fix: 避免私有云调整配置匹配不到sku 2020-02-03 12:21:27 +08:00
Zexi Li
cc0319f531 Merge pull request #4992 from swordqiu/automated-cherry-pick-of-#4991-upstream-release-2.13
Automated cherry pick of #4991: update vendor
2020-01-19 17:35:26 +08:00
Qiu Jian
397ce71431 fix: increment paging list order by multiple columns 2020-01-19 17:21:31 +08:00
Qiu Jian
c368111984 update vendor 2020-01-19 17:21:31 +08:00
yunion-ci-robot
d8fb7a4759 Merge pull request #4989 from swordqiu/automated-cherry-pick-of-#4988-upstream-release-2.13
Automated cherry pick of #4988: fix: cloudevent_tbl use new primary column event_id
2020-01-19 14:24:14 +08:00
Qiu Jian
15d3eb7f32 fix: cloudevent_tbl use new primary column event_id 2020-01-19 12:55:20 +08:00
yunion-ci-robot
00703aeeb1 Merge pull request #4978 from tb365/automated-cherry-pick-of-#4977-upstream-release-2.13
Automated cherry pick of #4977: get login-info add 404 return & elasticcache account reset password api add input params
2020-01-19 11:44:11 +08:00
Zexi Li
9d23392bc3 Merge pull request #4985 from swordqiu/automated-cherry-pick-of-#4983-upstream-release-2.13
Automated cherry pick of #4983: fix: try allocate host access ip from reserved pool
2020-01-19 10:37:34 +08:00
Qiu Jian
c9d070aa74 fix: try allocate host access ip from reserved pool 2020-01-19 00:26:16 +08:00
Zexi Li
22f600bb20 Merge pull request #4982 from wanyaoqi/automated-cherry-pick-of-#4980-upstream-release-2.13
Automated cherry pick of #4980: is standard domain optional
2020-01-18 19:16:37 +08:00
wanyaoqi
49e2cff8fd is standard domain optional 2020-01-18 19:12:57 +08:00
TangBin
10f0d0ab35 get login-info add 404 return & elasticcache account reset password api add input params 2020-01-18 18:39:31 +08:00
yunion-ci-robot
840eb4dc47 Merge pull request #4967 from ioito/automated-cherry-pick-of-#4965-upstream-release-2.13
Automated cherry pick of #4965: fix: 公有云日志添加brand字段
2020-01-18 16:25:13 +08:00
Qu Xuan
6eaf6d3147 fix: 公有云日志添加brand字段 2020-01-18 16:05:17 +08:00
Zexi Li
acb46f42bc Merge pull request #4974 from swordqiu/automated-cherry-pick-of-#4973-upstream-release-2.13
Automated cherry pick of #4973: fix: bucket get details missing cloudprovider info
2020-01-18 16:03:53 +08:00
Qiu Jian
2982d6f718 fix: bucket get details missing cloudprovider info 2020-01-18 15:29:16 +08:00
Zexi Li
0245df37fc Merge pull request #4970 from swordqiu/automated-cherry-pick-of-#4968-upstream-release-2.13
Automated cherry pick of #4968: fix: network-reserve-ip ignores expired reserved ips
2020-01-18 14:25:07 +08:00
Qiu Jian
81c90c045b fix: network-reserve-ip ignores expired reserved ips 2020-01-18 11:10:11 +08:00
Zexi Li
c1b1aedb0a Merge pull request #4964 from wanyaoqi/automated-cherry-pick-of-#4962-upstream-release-2.13
Automated cherry pick of #4962: fix models renew
2020-01-17 21:55:56 +08:00
wanyaoqi
ef74e82f78 fix models renew 2020-01-17 21:52:55 +08:00
yunion-ci-robot
159c67e088 Merge pull request #4948 from ioito/automated-cherry-pick-of-#4946-upstream-release-2.13
Automated cherry pick of #4946: fix: 腾讯云主机带宽跟随eip带宽变化而变化
2020-01-17 19:45:10 +08:00
yunion-ci-robot
ffa907ad14 Merge pull request #4847 from zhaoxiangchun/automated-cherry-pick-of-#4775-upstream-release-2.13
Automated cherry pick of #4775: 新增aws监控代码,GetMonitorData函数,获取监控信息
2020-01-17 19:24:09 +08:00
Zexi Li
b6acaad75e Merge pull request #4959 from wanyaoqi/automated-cherry-pick-of-#4957-upstream-release-2.13
Automated cherry pick of #4957: fix postpaid expire
2020-01-17 18:57:11 +08:00
wanyaoqi
cdc6a07586 fix postpaid expire 2020-01-17 17:53:59 +08:00
Qu Xuan
1efdffe097 fix: 腾讯云主机带宽跟随eip带宽变化而变化 2020-01-17 13:36:33 +08:00
yunion-ci-robot
59e3d4bd3e Merge pull request #4945 from wanyaoqi/automated-cherry-pick-of-#4943-upstream-release-2.13
Automated cherry pick of #4943: fix snapshot list filter by disk type
2020-01-17 12:59:08 +08:00
wanyaoqi
4bcd50a8a8 fix snapshot list filter by disk type 2020-01-17 12:00:51 +08:00
yunion-ci-robot
79dbde03c1 Merge pull request #4883 from tb365/automated-cherry-pick-of-#4880-upstream-release-2.13
Automated cherry pick of #4880: huawei remove backend group bugfix
2020-01-17 11:01:10 +08:00
zhaoxiangchun
869e1146cf add License Head 2020-01-17 10:50:01 +08:00
zhaoxiangchun
72764183b6 vendor: update 2020-01-17 10:50:01 +08:00
zhaoxiangchun
48a288a603 新增aws监控代码,GetMonitorData函数,获取监控信息
首先通过monitor.go文件中的GetMonitorData函数组装查询参数,然后通过SRegion中cloudWatchRequest函数组装request信息,
进行查询返回
2020-01-17 10:50:01 +08:00
yunion-ci-robot
d327a96c66 Merge pull request #4928 from ioito/automated-cherry-pick-of-#4926-upstream-release-2.13
Automated cherry pick of #4926: cloudevent 支持since until参数过滤
2020-01-17 09:20:08 +08:00
Qu Xuan
fb9566b9a2 cloudevent 支持since until参数过滤 2020-01-16 19:46:01 +08:00
yunion-ci-robot
45271e04fd Merge pull request #4917 from tb365/automated-cherry-pick-of-#4916-upstream-release-2.13
Automated cherry pick of #4916: ctyun bugfix
2020-01-16 15:08:08 +08:00
TangBin
854b20fac6 comment fix 2020-01-16 14:07:10 +08:00
TangBin
36c50d17bc ctyun bugfix 2020-01-16 14:07:10 +08:00
yunion-ci-robot
da498950a7 Merge pull request #4912 from tb365/automated-cherry-pick-of-#4911-upstream-release-2.13
Automated cherry pick of #4911: server get login info 404 not found
2020-01-16 09:53:07 +08:00
yunion-ci-robot
ac71787261 Merge pull request #4907 from ioito/automated-cherry-pick-of-#4904-upstream-release-2.13
Automated cherry pick of #4904: fix: 避免创建azure时指定高级ssd失效
2020-01-16 09:50:07 +08:00
yunion-ci-robot
b71d450563 Merge pull request #4894 from wanyaoqi/automated-cherry-pick-of-#4887-upstream-release-2.13
Automated cherry pick of #4887: validate share on delete, update pulibc scope on mark standard
2020-01-15 20:37:07 +08:00
TangBin
c61d571295 server get login info 404 not found 2020-01-15 19:33:44 +08:00
Qu Xuan
d44fdcc36a fix: 避免创建azure时指定高级ssd失效 2020-01-15 18:02:30 +08:00
Zexi Li
48e3d1e016 Merge pull request #4897 from rainzm/automated-cherry-pick-of-#4895-upstream-release-2.13
Automated cherry pick of #4895: fix(notify): Update template
2020-01-14 18:23:46 +08:00
Rain
bb5b3a29d3 fix(notify): Update template 2020-01-14 18:15:09 +08:00
wanyaoqi
761edb91a8 validate share on delete, update pulibc scope on mark standard 2020-01-14 17:43:54 +08:00
TangBin
59b496f67d aliyun backendgroup bugfix 2020-01-14 15:52:55 +08:00
TangBin
a42ba5f728 aws backendgroup delete bugfix 2020-01-14 15:52:55 +08:00
TangBin
fb2dbdb9b6 aws sync routetable 2020-01-14 15:52:55 +08:00
TangBin
4d58595223 huawei remove backend group bugfix 2020-01-14 15:52:55 +08:00
Zexi Li
b5900e6ac6 Merge pull request #4877 from yousong/automated-cherry-pick-of-#4874-upstream-release-2.13
Automated cherry pick of #4874: vendor: update sqlchemy
2020-01-14 13:58:09 +08:00
Yousong Zhou
0acfe911f2 vendor: update sqlchemy 2020-01-14 13:26:54 +08:00
Zexi Li
bf30a53252 Merge pull request #4870 from swordqiu/automated-cherry-pick-of-#4869-upstream-release-2.13
Automated cherry pick of #4869: fix: first load of service config not effective
2020-01-14 10:23:44 +08:00
Qiu Jian
32468981f4 fix: first load of service config not effective 2020-01-14 03:03:22 +08:00
yunion-ci-robot
73c9871545 Merge pull request #4866 from ioito/automated-cherry-pick-of-#4862-upstream-release-2.13
Automated cherry pick of #4862: fix: 仅kvm需要去判断是否需要关机调整配置,公有云私有云默认不需要
2020-01-14 03:01:02 +08:00
yunion-ci-robot
e3a4aabad8 Merge pull request #4840 from ioito/automated-cherry-pick-of-#4837-upstream-release-2.13
Automated cherry pick of #4837: fix: 添加磁盘创建失败日志
2020-01-14 02:57:02 +08:00
yunion-ci-robot
4710a7a19a Merge pull request #4861 from ioito/automated-cherry-pick-of-#4858-upstream-release-2.13
Automated cherry pick of #4858: fix: 恢复公有云日志name
2020-01-14 02:50:02 +08:00
yunion-ci-robot
0741c7d039 Merge pull request #4832 from ioito/automated-cherry-pick-of-#4829-upstream-release-2.13
Automated cherry pick of #4829: fix: 公有云日志权限列表
2020-01-14 02:29:02 +08:00
yunion-ci-robot
b9b43e58b8 Merge pull request #4852 from ioito/automated-cherry-pick-of-#4849-upstream-release-2.13
Automated cherry pick of #4849: fix: aliyun rule fix
2020-01-14 02:22:02 +08:00
Zexi Li
9f4a2b6b2f Merge pull request #4845 from ioito/automated-cherry-pick-of-#4842-upstream-release-2.13
Automated cherry pick of #4842: fix: 添加安全组操作日志
2020-01-13 20:50:36 +08:00
Qu Xuan
c6c232f11b fix: 仅kvm需要去判断是否需要关机调整配置,公有云私有云默认不需要 2020-01-13 19:17:02 +08:00
Qu Xuan
a1b8c053ef fix: 恢复公有云日志name 2020-01-13 17:59:05 +08:00
Qu Xuan
c953edc3b2 fix: aliyun rule fix 2020-01-13 17:45:13 +08:00
Qu Xuan
504e251c3b fix: 添加安全组操作日志 2020-01-13 15:27:57 +08:00
Qu Xuan
4edcd85f07 fix: 添加磁盘创建失败日志 2020-01-13 14:55:26 +08:00
Qu Xuan
0bcee9e529 fix: 公有云日志权限列表 2020-01-13 11:22:16 +08:00
Zexi Li
f3c16ace78 Merge pull request #4818 from swordqiu/automated-cherry-pick-of-#4817-upstream-release-2.13
Automated cherry pick of #4817: fix: non-default-domain-projects changes not take effects after changing through service-config
2020-01-13 10:56:56 +08:00
Zexi Li
cf69029250 Merge pull request #4814 from swordqiu/automated-cherry-pick-of-#4813-upstream-release-2.13
Automated cherry pick of #4813: fix: set default read privileges for reading all quotas
2020-01-13 10:55:05 +08:00
yunion-ci-robot
d1a848ce28 Merge pull request #4827 from tb365/automated-cherry-pick-of-#4823-upstream-release-2.13
Automated cherry pick of #4823: sku domain filter bugfix
2020-01-13 09:24:00 +08:00
TangBin
8e5f7dc5b3 sku domain filter bugfix 2020-01-12 12:05:27 +08:00
Qiu Jian
3685860bbd fix: non-default-domain-projects changes not take effects after changing through service-config 2020-01-12 00:05:03 +08:00
yunion-ci-robot
c0a6045710 Merge pull request #4812 from tb365/automated-cherry-pick-of-#4809-upstream-release-2.13
Automated cherry pick of #4809: sku domain filter bugfix
2020-01-11 23:23:01 +08:00
TangBin
c847db56c1 sku domain filter bugfix 2020-01-11 21:26:22 +08:00
Qiu Jian
2e64a90823 fix: set default read privileges for reading all quotas 2020-01-11 18:00:28 +08:00
yunion-ci-robot
6d3fa65c7b Merge pull request #4798 from tb365/automated-cherry-pick-of-#4795-upstream-release-2.13
Automated cherry pick of #4795: add filter skus by domain id
2020-01-10 20:22:59 +08:00
yunion-ci-robot
4e3f902fa7 Merge pull request #4720 from tb365/automated-cherry-pick-of-#4712-upstream-release-2.13
Automated cherry pick of #4712: cloud account support manually sync skus
2020-01-10 20:09:02 +08:00
yunion-ci-robot
aa491b084b Merge pull request #4804 from tb365/automated-cherry-pick-of-#4801-upstream-release-2.13
Automated cherry pick of #4801: kvm elb listener update bugfix
2020-01-10 19:51:59 +08:00
TangBin
efcd66f6cf kvm elb listener update bugfix 2020-01-10 18:50:58 +08:00
TangBin
496bf0729d spelling mistakes fix 2020-01-10 17:20:54 +08:00
TangBin
5c9f3ecde5 user register ingore blank row 2020-01-10 17:20:54 +08:00
TangBin
3ca01a11af add filter skus by domain id 2020-01-10 17:20:54 +08:00
yunion-ci-robot
88d0580b4f Merge pull request #4776 from rainzm/automated-cherry-pick-of-#4754-upstream-release-2.13
Automated cherry pick of #4754: fix(region): Sync HostStorage in syncOnPremiseCloudProviderInfo
2020-01-10 10:35:58 +08:00
yunion-ci-robot
219af8dee4 Merge pull request #4764 from wanyaoqi/automated-cherry-pick-of-#4761-upstream-release-2.13
Automated cherry pick of #4761: image-properties-add-disable-delete
2020-01-10 10:30:00 +08:00
yunion-ci-robot
6fd90257f5 Merge pull request #4771 from wanyaoqi/automated-cherry-pick-of-#4768-upstream-release-2.13
Automated cherry pick of #4768: fix guest start no task complete
2020-01-10 10:24:59 +08:00
yunion-ci-robot
104310bab6 Merge pull request #4781 from swordqiu/automated-cherry-pick-of-#4780-upstream-release-2.13
Automated cherry pick of #4780: fix: initialize service config on keystone when service boot
2020-01-10 10:18:58 +08:00
yunion-ci-robot
a1d123bfb9 Merge pull request #4787 from yousong/automated-cherry-pick-of-#4784-upstream-release-2.13
Automated cherry pick of #4784: dnsrecords: add helper methods
2020-01-10 10:16:59 +08:00
Yousong Zhou
1979effd78 dns: chain load records for cname 2020-01-09 23:24:00 +08:00
Yousong Zhou
93fe16bba6 dns: prepare for responding with A record of cname value 2020-01-09 23:23:59 +08:00
Yousong Zhou
dc029452d0 dnsrecords: add helper methods 2020-01-09 23:23:59 +08:00
Qiu Jian
5ecc0bd1ec fix: initialize service config on keystone when service boot 2020-01-09 22:13:03 +08:00
Rain
02b24d1894 fix(region): Sync HostStorage in syncOnPremiseCloudProviderInfo
情景:绕过OneCloud,删除 storage 上的所有 vm 并且删除 storage 然后新建 storage。

问题:因为存在 vm 在使用此 storage ,所以在同步的时候,对应的 storage
会删除失败,并且阻止了 storagecache 的同步。这样在创建机器的时候,如果
使用旧的 storage 就会导致创建失败(因为此 Host 已经不再使用对应的
remote storage); 如果使用新的 storage 就会因为找不到对应的 storage cache 而失败。

修改:如果因为以上原因删除失败的 storage 的 storage_type 为 local
那么就把这个 storage 置为 offline,并且不再阻止 storage cache 的同步。
2020-01-09 21:01:20 +08:00
wanyaoqi
6a87e3e8df fix guest start no task complete 2020-01-09 17:14:12 +08:00
wanyaoqi
3609f2d921 image-properties-add-disable-delete 2020-01-09 15:43:09 +08:00
TangBin
176fbb305a cloud account support manually sync skus 2020-01-09 11:18:20 +08:00
Zexi Li
09a660d039 Merge pull request #4758 from swordqiu/automated-cherry-pick-of-#4757-upstream-release-2.13
Automated cherry pick of #4757: fix: brand of compute quota key should be fixed
2020-01-09 09:58:42 +08:00
yunion-ci-robot
708089ec7a Merge pull request #4746 from yousong/automated-cherry-pick-of-#4724-upstream-release-2.13
Automated cherry pick of #4724: wires: lift name length, charset constraint
2020-01-08 23:44:04 +08:00
Qiu Jian
3ce7cbd191 fix: brand of compute quota key should be fixed 2020-01-08 23:34:12 +08:00
yunion-ci-robot
b9babd6d28 Merge pull request #4753 from ioito/automated-cherry-pick-of-#4750-upstream-release-2.13
Automated cherry pick of #4750: fix: cloudevent 成功条件补充
2020-01-08 23:32:58 +08:00
Qu Xuan
bdd9fe8c57 fix: cloudevent 成功条件补充 2020-01-08 20:45:44 +08:00
Zexi Li
bf707f87f9 Merge pull request #4736 from swordqiu/automated-cherry-pick-of-#4735-upstream-release-2.13
Automated cherry pick of #4735: fix: misc quota bugs 1. snapshot pending usage not cleaned after created 2. server-attach-network error 3. loadbalancer fail to set cloudregion_id
2020-01-08 19:17:29 +08:00
Yousong Zhou
fbbfdb5cc7 wires: lift name length, charset constraint 2020-01-08 19:15:44 +08:00
yunion-ci-robot
d3b8770ae3 Merge pull request #4731 from ioito/automated-cherry-pick-of-#4728-upstream-release-2.13
Automated cherry pick of #4728: fix: eip duplicate name
2020-01-08 19:03:58 +08:00
Qiu Jian
7434e5688f fix: misc quota bugs 1. snapshot pending usage not cleaned after created 2. server-attach-network error 3. loadbalancer fail to set cloudregion_id 2020-01-08 18:51:38 +08:00
Qu Xuan
35f5553b14 fix: eip duplicate name 2020-01-08 18:12:19 +08:00
yunion-ci-robot
b1b76e88a2 Merge pull request #4697 from rainzm/automated-cherry-pick-of-#4695-upstream-release-2.13
Automated cherry pick of #4695: fix(glance): Cancel pending usage of image quota correctly
2020-01-08 16:12:57 +08:00
yunion-ci-robot
c61d9dd73e Merge pull request #4703 from tb365/automated-cherry-pick-of-#4701-upstream-release-2.13
Automated cherry pick of #4701: azure skus sync fix
2020-01-08 15:56:57 +08:00
Zexi Li
0f51f70324 Merge pull request #4717 from wanyaoqi/automated-cherry-pick-of-#4714-upstream-release-2.13
Automated cherry pick of #4714: set subimage some field nullable
2020-01-08 15:42:58 +08:00
wanyaoqi
97e516bc3b set subimage some field nullable 2020-01-08 15:37:54 +08:00
yunion-ci-robot
c44dccb370 Merge pull request #4708 from ioito/automated-cherry-pick-of-#4655-upstream-release-2.13
Automated cherry pick of #4655: optimized: 优化公有云日志查询
2020-01-08 14:54:57 +08:00
yunion-ci-robot
54919edf5f Merge pull request #4687 from yousong/automated-cherry-pick-of-#4683-upstream-release-2.13
Automated cherry pick of #4683: hostman: distro name OpenWrt instead of OpenWRT
2020-01-08 12:56:58 +08:00
Qu Xuan
51a09a8a44 optimized: 优化公有云日志查询 2020-01-08 11:48:49 +08:00
yunion-ci-robot
b2ffe40386 Merge pull request #4653 from ioito/automated-cherry-pick-of-#4650-upstream-release-2.13
Automated cherry pick of #4650: fix: 避免创建rds account, database后未设置exteranl_id
2020-01-08 11:40:57 +08:00
yunion-ci-robot
a4eacf1d85 Merge pull request #4640 from ioito/automated-cherry-pick-of-#4636-upstream-release-2.13
Automated cherry pick of #4636: fix: 加强密码校验
2020-01-08 11:37:57 +08:00
TangBin
024f9bdcdd huawei redis sync fix 2020-01-08 11:33:45 +08:00
TangBin
d93297785b ctyun default gateway fix 2020-01-08 11:33:45 +08:00
TangBin
661f16efe0 huawei network default gateway fix 2020-01-08 11:33:45 +08:00
TangBin
b91ec54883 network create GuestIpPrefix fix 2020-01-08 11:33:45 +08:00
TangBin
83a20552af azure skus sync fix 2020-01-08 11:33:45 +08:00
Rain
29e1705d6b fix(glance): Cancel pending usage of image quota correctly
ImageNumber always be zero because the 'image_number' in data was
removed so that canceling pending usage not work.
2020-01-08 11:29:34 +08:00
yunion-ci-robot
d2520e67b8 Merge pull request #4643 from tb365/automated-cherry-pick-of-#4634-upstream-release-2.13
Automated cherry pick of #4634: huawei image delete bugfix
2020-01-08 11:26:59 +08:00
yunion-ci-robot
4a6e410d6f Merge pull request #4692 from ioito/automated-cherry-pick-of-#4685-upstream-release-2.13
Automated cherry pick of #4685: fix: next marker format
2020-01-08 10:08:57 +08:00
Zexi Li
612eff6314 Merge pull request #4680 from swordqiu/automated-cherry-pick-of-#4676-upstream-release-2.13
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:29 +08:00
Zexi Li
b00d06eb61 Merge pull request #4673 from swordqiu/automated-cherry-pick-of-#4666-upstream-release-2.13
Automated cherry pick of #4666: fix: guess brand on guest create
2020-01-07 19:28:32 +08:00
yunion-ci-robot
70934b6b4d Merge pull request #4669 from ioito/automated-cherry-pick-of-#4656-upstream-release-2.13
Automated cherry pick of #4656: fix: 避免拥有带宽包的腾讯云创建机器失败
2020-01-07 18:06:59 +08:00
Qu Xuan
d2b6234eab fix: next marker format 2020-01-07 18:04:53 +08:00
Yousong Zhou
f91c337ae4 hostman: openwrt: deploy public key for root 2020-01-07 18:01:43 +08:00
Yousong Zhou
77c6f51c87 hostman: split DeployAuthorizedKeys() 2020-01-07 18:01:43 +08:00
Yousong Zhou
8f66dcfc96 hostman: openwrt: support deploy networking scripts 2020-01-07 18:01:43 +08:00
Yousong Zhou
4a327e795d hostman: openwrt: deploy hostname with board config 2020-01-07 18:01:43 +08:00
Yousong Zhou
4097dc8e68 hostman: distro name OpenWrt instead of OpenWRT 2020-01-07 18:01:43 +08:00
yunion-ci-robot
5944c9c20e Merge pull request #4661 from ioito/automated-cherry-pick-of-#4658-upstream-release-2.13
Automated cherry pick of #4658: fix: 避免同步安全组失败后,没有任何日志记录
2020-01-07 17:08:57 +08:00
Qiu Jian
d7de603fe5 fix: guest network default share scope should be system if non-default-domain-projects is off 2020-01-07 16:57:20 +08:00
Qiu Jian
238230491d fix: guess brand on guest create 2020-01-07 15:11:55 +08:00
Qu Xuan
1a32a15ddd fix: 避免拥有带宽包的腾讯云创建机器失败 2020-01-07 15:05:26 +08:00
Qu Xuan
852ed4590e fix: 避免同步安全组失败后,没有任何日志记录 2020-01-07 11:49:43 +08:00
yunion-ci-robot
e7b1dfff42 Merge pull request #4647 from swordqiu/automated-cherry-pick-of-#4645-upstream-release-2.13
Automated cherry pick of #4645: fix: comment out TestDialTimeout
2020-01-06 15:16:56 +08:00
Qu Xuan
3e7cf49674 fix: 避免创建rds account, database后未设置exteranl_id 2020-01-06 13:39:23 +08:00
Qiu Jian
8c74cff65b fix: comment out TestDialTimeout 2020-01-06 13:10:33 +08:00
TangBin
4cb7d03474 huawei image delete bugfix 2020-01-06 11:53:54 +08:00
Qu Xuan
cdc446f773 fix: 加强密码校验 2020-01-06 11:46:53 +08:00
Zexi Li
6ddd8c0df6 Merge pull request #4628 from swordqiu/automated-cherry-pick-of-#4627-upstream-release-2.13
Automated cherry pick of #4627: fix: increase default sync worker count from 2 to 5
2020-01-05 12:23:16 +08:00
Qiu Jian
f1e1949e14 fix: increase default sync worker count from 2 to 5 2020-01-05 12:20:23 +08:00
Zexi Li
d2c2362435 Merge pull request #4603 from swordqiu/automated-cherry-pick-of-#4601-upstream-release-2.13
Automated cherry pick of #4601: fix: remove bw/ebw quota limit
2020-01-04 23:59:29 +08:00
Qiu Jian
bb5e557c70 remove bw/ebw quota from scheduler 2020-01-04 23:34:37 +08:00
Qiu Jian
c5bbd936cf fix: remove bw/ebw quota limit 2020-01-04 23:34:37 +08:00
Zexi Li
d740109d0e Merge pull request #4624 from zexi/automated-cherry-pick-of-#4621-upstream-release-2.13
Automated cherry pick of #4621: fix: fmt error
2020-01-04 23:21:12 +08:00
Zexi Li
1e4975abb4 Merge pull request #4618 from swordqiu/automated-cherry-pick-of-#4616-upstream-release-2.13
Automated cherry pick of #4616: fix: huawei uncache image fail
2020-01-04 23:20:08 +08:00
Zexi Li
1d0129bca7 Merge pull request #4612 from ioito/automated-cherry-pick-of-#4609-upstream-release-2.13
Automated cherry pick of #4609: fix: 避免仅删除value时,行为演变为删除标签
2020-01-04 23:18:04 +08:00
Zexi Li
be57b97bb4 fix: fmt error 2020-01-04 23:16:51 +08:00
Qiu Jian
0d7355cde7 fix: huawei uncache image fail 2020-01-04 22:51:24 +08:00
Zexi Li
8af9889f5f Merge pull request #4606 from rainzm/automated-cherry-pick-of-#4602-upstream-release-2.13
Automated cherry pick of #4602: fix(notify): Fix the error of filter about contacts
2020-01-04 22:29:43 +08:00
Rain
a16a1489f7 fix(notify): Fix the error of filter about contacts 2020-01-04 22:25:20 +08:00
Qu Xuan
8fd0c9fb66 fix: 避免仅删除value时,行为演变为删除标签 2020-01-04 22:17:10 +08:00
Zexi Li
fa5e58f047 Merge pull request #4598 from rainzm/automated-cherry-pick-of-#4597-upstream-release-2.13
Automated cherry pick of #4597: fix(region): Add reset_password in guest template's ConfigInfo
2020-01-04 22:03:16 +08:00
Rain
5d300e5e4d fix(region): Cancel the check about project when creating service catlog 2020-01-04 21:37:44 +08:00
Rain
7e0c79ee66 fix(region): Add reset_password in guest template's ConfigInfo 2020-01-04 21:37:44 +08:00
Zexi Li
d65e459284 Merge pull request #4593 from rainzm/automated-cherry-pick-of-#4592-upstream-release-2.13
Automated cherry pick of #4592: fix(region): Fix that 'Can_delete' disappears due to parameter structuring
2020-01-04 21:09:52 +08:00
Zexi Li
b1407c1ea1 Merge pull request #4589 from rainzm/automated-cherry-pick-of-#4588-upstream-release-2.13
Automated cherry pick of #4588: fix(region): Set normal's snapshotpolicy's status as ready
2020-01-04 21:09:31 +08:00
Rain
614eb3a45c fix(region): Fix that 'Can_delete' disappears due to parameter structuring 2020-01-04 21:02:37 +08:00
Rain
c330655912 feature(region): Add bind/unbind-snapshotpolicy api for disk 2020-01-04 20:56:09 +08:00
Rain
1172a86955 fix(region): Set normal's snapshotpolicy's status as ready 2020-01-04 20:56:09 +08:00
Jian Qiu
6606c7fd27 Automated cherry pick of #4527: fix: httpclient timeout value cleanup, use notimeout client for oss (#4529)
* fix: httpclient timeout value cleanup, use notimeout client for oss

* Adaptive timeout client

* more test cases

* remove resolve timeout test case

* use adptive timeout only if timeout = 0

* add GetFreePort method
2020-01-04 20:51:50 +08:00
yunion-ci-robot
49eac5f4c4 Merge pull request #4577 from ioito/automated-cherry-pick-of-#4574-upstream-release-2.13
Automated cherry pick of #4574: fix: 子网删除忽略弹性网卡
2020-01-04 20:33:36 +08:00
yunion-ci-robot
960eee4974 Merge pull request #4572 from bistuzx/automated-cherry-pick-of-#4557-upstream-release-2.13
Automated cherry pick of #4557: add cloud account create&update options
2020-01-04 20:27:37 +08:00
yunion-ci-robot
feaad53279 Merge pull request #4584 from ioito/automated-cherry-pick-of-#4581-upstream-release-2.13
Automated cherry pick of #4581: fix: 修复zstack安全组创建失败问题
2020-01-04 20:14:35 +08:00
Qu Xuan
67d547e5f7 fix: 修复zstack安全组创建失败问题 2020-01-04 20:02:08 +08:00
yunion-ci-robot
f77357969f Merge pull request #4561 from ioito/automated-cherry-pick-of-#4558-upstream-release-2.13
Automated cherry pick of #4558: fix: openstack eip dissociate optimized
2020-01-04 20:00:36 +08:00
Zexi Li
57a09c5682 Merge pull request #4566 from swordqiu/automated-cherry-pick-of-#4564-upstream-release-2.13
Automated cherry pick of #4564: fix: minio fail to set object metadata
2020-01-04 19:52:41 +08:00
Zexi Li
18eb373389 Merge pull request #4550 from swordqiu/automated-cherry-pick-of-#4549-upstream-release-2.13
Automated cherry pick of #4549: fix: domain quota-list include domain's own quota
2020-01-04 19:46:15 +08:00
Qu Xuan
f13a185045 fix: 子网删除忽略弹性网卡 2020-01-04 19:24:48 +08:00
张旭
ad04b24487 add cloud account create&update options 2020-01-04 19:20:01 +08:00
yunion-ci-robot
0acc601d31 Merge pull request #4555 from tb365/automated-cherry-pick-of-#4553-upstream-release-2.13
Automated cherry pick of #4553: elastic account add random password
2020-01-04 19:05:38 +08:00
Qu Xuan
586e8c7714 fix: openstack eip dissociate optimized 2020-01-04 18:44:17 +08:00
Qiu Jian
70e43e7c94 fix: minio fail to set object metadata 2020-01-04 18:37:04 +08:00
TangBin
1d475533e9 get eip bugfix 2020-01-04 18:22:37 +08:00
TangBin
bd7ba7de8e get eip bugfix 2020-01-04 18:22:37 +08:00
TangBin
c912ee6c3c host batch register bugfix 2020-01-04 18:22:37 +08:00
TangBin
046dc63be7 elastic cache account add login info api 2020-01-04 18:22:37 +08:00
TangBin
25fbfad3c5 elastic account add random password 2020-01-04 18:22:37 +08:00
yunion-ci-robot
b34792e667 Merge pull request #4536 from wanyaoqi/automated-cherry-pick-of-#4535-upstream-release-2.13
Automated cherry pick of #4535: fix disk filter by guest
2020-01-04 18:21:37 +08:00
Qiu Jian
a241b2dd79 fix: domain quota-list include domain's own quota 2020-01-04 17:17:49 +08:00
Zexi Li
0902b4330d Merge pull request #4542 from swordqiu/automated-cherry-pick-of-#4539-upstream-release-2.13
Automated cherry pick of #4539: fix: add cloudprovider capabilities
2020-01-04 17:03:25 +08:00
wanyaoqi
7757381008 add recover on guest suddenly shotdown 2020-01-04 16:50:26 +08:00
Qiu Jian
8b253f68b4 minor fixes 2020-01-04 16:20:39 +08:00
Qiu Jian
8f68c3067f minor fixes 2020-01-04 16:20:38 +08:00
Qiu Jian
403f82314b minor fixes 2020-01-04 16:20:38 +08:00
Qiu Jian
c47a529daa add cloudevent capabilities 2020-01-04 16:20:38 +08:00
Qiu Jian
affed9af90 fix: add cloudprovider capabilities 2020-01-04 16:20:38 +08:00
wanyaoqi
5293e3f02a fix disk filter by guest 2020-01-04 15:17:31 +08:00
yunion-ci-robot
eb1f2e0665 Merge pull request #4510 from tb365/automated-cherry-pick-of-#4509-upstream-release-2.13
Automated cherry pick of #4509: account create bugfix
2020-01-04 13:10:37 +08:00
TangBin
9e714f603e InitPendingUsagesInContext fix 2020-01-04 12:42:35 +08:00
TangBin
27b1aff669 account&provider health status check 2020-01-04 12:42:35 +08:00
TangBin
48993ad92a elastic skus add region_ext_id & zone_ext_id 2020-01-04 12:42:35 +08:00
TangBin
3c0a012b5c disk delete condition validator 2020-01-04 12:42:34 +08:00
TangBin
78378248ce huawei oss client read http ProxyFromEnvironment 2020-01-04 12:42:34 +08:00
TangBin
2a578f8fef network operations add action log 2020-01-04 12:42:34 +08:00
TangBin
e3ecfa9dc1 account create bugfix 2020-01-04 12:42:34 +08:00
Zexi Li
c9964db983 Merge pull request #4523 from zexi/automated-cherry-pick-of-#4520-upstream-release-2.13
Automated cherry pick of #4520: baremetal: fix megaraid check jbod always disabled
2020-01-03 21:51:51 +08:00
yunion-ci-robot
f64fc69ef8 Merge pull request #4516 from ioito/automated-cherry-pick-of-#4513-upstream-release-2.13
Automated cherry pick of #4513: fix: 腾讯云不支持描述字段参数
2020-01-03 21:31:41 +08:00
Zexi Li
43b5518b0c baremetal: fix megaraid check jbod always disabled 2020-01-03 21:22:33 +08:00
Qu Xuan
9dc72687d5 fix: 腾讯云不支持描述字段参数 2020-01-03 20:45:47 +08:00
Zexi Li
1c0c64830d Merge pull request #4500 from swordqiu/automated-cherry-pick-of-#4498-upstream-release-2.13
Automated cherry pick of #4498: fix: allow delete cloudaccount with auto-sync enabled
2020-01-03 19:06:31 +08:00
yunion-ci-robot
cc52759a2a Merge pull request #4504 from rainzm/automated-cherry-pick-of-#4497-upstream-release-2.13
Automated cherry pick of #4497: fix(huawei): Add 'X-Project-ID' header for huawei nat reuqest
2020-01-03 19:04:35 +08:00
yunion-ci-robot
e8e5822d76 Merge pull request #4495 from ioito/automated-cherry-pick-of-#4492-upstream-release-2.13
Automated cherry pick of #4492: fix: 修复provider为空的套餐
2020-01-03 18:37:34 +08:00
Rain
50506d8daf fix(huawei): Add 'X-Project-ID' header for huawei nat reuqest 2020-01-03 17:21:08 +08:00
Qiu Jian
0bc8114f45 fix: allow delete cloudaccount with auto-sync enabled 2020-01-03 17:14:26 +08:00
Zexi Li
7fac5ed1de Merge pull request #4489 from swordqiu/automated-cherry-pick-of-#4488-upstream-release-2.13
Automated cherry pick of #4488: scheduler schedule according to quota limit
2020-01-03 17:13:54 +08:00
Qiu Jian
429e065deb fix: OutOfQuota error code 500 2020-01-03 16:01:30 +08:00
Qiu Jian
6c68873a72 automatically save pendingUsage in context 2020-01-03 16:01:30 +08:00
Qiu Jian
4a43b71a67 remove obsolete codes 2020-01-03 16:01:30 +08:00
Qiu Jian
c16df82138 bug fixes 2020-01-03 16:01:29 +08:00
Qiu Jian
9f53dadd0b move lb from zonequota to regionquota 2020-01-03 16:01:29 +08:00
Qiu Jian
37c78928f9 scheduler schedule according to quota limit 2020-01-03 16:01:29 +08:00
Qu Xuan
d7ab4dd931 fix: 修复provider为空的套餐 2020-01-03 15:55:14 +08:00
Zexi Li
f7662b4f5f Merge pull request #4485 from rainzm/automated-cherry-pick-of-#4483-upstream-release-2.13
Automated cherry pick of #4483: fix(notify): Always update websocket config
2020-01-03 11:22:36 +08:00
Zexi Li
1a7134f3df Merge pull request #4481 from swordqiu/automated-cherry-pick-of-#4478-upstream-release-2.13
Automated cherry pick of #4478: fix: bucket list object may skip first matched object
2020-01-03 11:01:32 +08:00
Rain
92cadee8f0 fix(notify): Always update websocket config 2020-01-02 19:12:03 +08:00
Qiu Jian
7aaad852a4 fix: sort objects and directories 2020-01-02 17:48:23 +08:00
Qiu Jian
ee10ff1fa4 fix: bucket list object may skip first matched object 2020-01-02 17:48:23 +08:00
rainzm
037ebf3b5a fix(region): Add support for suspend when syncing status of guest (#4475) 2020-01-02 16:33:47 +08:00
yunion-ci-robot
5ac9d6e278 Merge pull request #4471 from swordqiu/automated-cherry-pick-of-#4470-upstream-release-2.13
Automated cherry pick of #4470: fix: move loadblancer quota from zone to region
2020-01-02 12:00:35 +08:00
Qiu Jian
fe9100ef2a fix: move loadblancer quota from zone to region 2020-01-02 11:38:57 +08:00
yunion-ci-robot
4541d56925 Merge pull request #4339 from zhaoxiangchun/automated-cherry-pick-of-#4338-upstream-release-2.13
Automated cherry pick of #4338: qcloud监控信息
2020-01-02 10:14:34 +08:00
yunion-ci-robot
edf733d689 Merge pull request #4465 from yousong/automated-cherry-pick-of-#4464-upstream-release-2.13
Automated cherry pick of #4464: networks: 确保外部network也有ifname_hint
2020-01-01 15:32:35 +08:00
Yousong Zhou
6831d8713d networks: 确保外部network也有ifname_hint 2020-01-01 10:52:17 +08:00
yunion-ci-robot
aec34a9440 Merge pull request #4460 from ioito/automated-cherry-pick-of-#4459-upstream-release-2.13
Automated cherry pick of #4459: fix: openstack image: vmdk -> qcow2
2020-01-01 09:32:33 +08:00
yunion-ci-robot
6f1e187260 Merge pull request #4457 from ioito/automated-cherry-pick-of-#4455-upstream-release-2.13
Automated cherry pick of #4455: fix: 避免nova external_id duplicate
2019-12-31 23:30:34 +08:00
Qu Xuan
451a6e936e fix: openstack image: vmdk -> qcow2 2019-12-31 19:55:06 +08:00
yunion-ci-robot
16544f53b5 Merge pull request #4443 from wanyaoqi/automated-cherry-pick-of-#4442-upstream-release-2.13
Automated cherry pick of #4442: image batch update
2019-12-31 18:46:32 +08:00
Qu Xuan
93bd654630 fix: 避免nova external_id duplicate 2019-12-31 18:37:50 +08:00
tb365
4f47746ab6 Automated cherry pick of #4450: rpc batch opertaion bugfix (#4453)
* rpc batch opertaion bugfix

* batch user register ingnore password complexity check
2019-12-31 18:33:54 +08:00
Zexi Li
0310274310 Merge pull request #4452 from swordqiu/automated-cherry-pick-of-#4451-upstream-release-2.13
Automated cherry pick of #4451: feature: allow skip password complexity check when creating user
2019-12-31 18:05:17 +08:00
Qiu Jian
b9b3309348 feature: allow skip password complexity check when creating user 2019-12-31 18:03:05 +08:00
yunion-ci-robot
3d38fa76fa Merge pull request #4446 from wanyaoqi/automated-cherry-pick-of-#4445-upstream-release-2.13
Automated cherry pick of #4445: not return on recv packet failed
2019-12-31 17:31:32 +08:00
yunion-ci-robot
224d384863 Merge pull request #4436 from yousong/automated-cherry-pick-of-#4435-upstream-release-2.13
Automated cherry pick of #4435: networks: newIfnameHint: 可读性改善
2019-12-31 17:14:33 +08:00
wanyaoqi
381f7df822 not return on recv packet failed 2019-12-31 17:03:53 +08:00
wanyaoqi
15773ccb63 image batch update 2019-12-31 16:24:02 +08:00
yunion-ci-robot
157f49d84a Merge pull request #4434 from wanyaoqi/automated-cherry-pick-of-#4433-upstream-release-2.13
Automated cherry pick of #4433: fix owner of instance snapshot
2019-12-31 15:50:33 +08:00
Zexi Li
1e09a2e11a Merge pull request #4441 from ioito/automated-cherry-pick-of-#4440-upstream-release-2.13
Automated cherry pick of #4440: fix: struct api params
2019-12-31 15:46:30 +08:00
Qu Xuan
0160103054 fix: struct api params 2019-12-31 15:32:59 +08:00
wanyaoqi
757c3502fb fix owner of instance snapshot 2019-12-31 14:42:09 +08:00
Yousong Zhou
721321b54f guestnetworks: 加强ifname内容判断 2019-12-31 14:24:08 +08:00
Yousong Zhou
1bfc55b6c2 networks: newIfnameHint: 可读性改善 2019-12-31 14:24:08 +08:00
Zexi Li
15cd5675df Merge pull request #4431 from swordqiu/automated-cherry-pick-of-#4430-upstream-release-2.13
Automated cherry pick of #4430: fix: apigateway option use pointer
2019-12-31 12:40:40 +08:00
Qiu Jian
954ae03297 fix: apigateway option use pointer 2019-12-31 12:36:25 +08:00
yunion-ci-robot
f77b6a68a4 Merge pull request #4418 from ioito/automated-cherry-pick-of-#4417-upstream-release-2.13
Automated cherry pick of #4417: fix: metadata-list时考虑不同资源类型过滤条件
2019-12-31 11:35:33 +08:00
Qu Xuan
55e4d09fef fix: metadata-list通用化所有资源标签 2019-12-31 11:16:18 +08:00
yunion-ci-robot
79a7685cac Merge pull request #4429 from rainzm/automated-cherry-pick-of-#4374-upstream-release-2.13
Automated cherry pick of #4374: fix(region): fix the status when start to suspend vm
2019-12-31 11:09:33 +08:00
Rain
6611ee78f0 fix(region): fix the status when start to suspend vm 2019-12-31 10:59:39 +08:00
yunion-ci-robot
8c19d1d456 Merge pull request #4424 from wanyaoqi/automated-cherry-pick-of-#4423-upstream-release-2.13
Automated cherry pick of #4423: region MakeCloudProviderInfo instance snapshots
2019-12-31 01:23:32 +08:00
yunion-ci-robot
f3a2ee50e5 Merge pull request #4399 from ioito/automated-cherry-pick-of-#4398-upstream-release-2.13
Automated cherry pick of #4398: fix: 避免创建时localstorage为空导致校验失败
2019-12-31 01:21:33 +08:00
yunion-ci-robot
aabc7a0a15 Merge pull request #4391 from wanyaoqi/automated-cherry-pick-of-#4390-upstream-release-2.13
Automated cherry pick of #4390: public cloud support postpaid expire
2019-12-31 01:10:32 +08:00
yunion-ci-robot
b282a676c7 Merge pull request #4381 from ioito/automated-cherry-pick-of-#4380-upstream-release-2.13
Automated cherry pick of #4380: fix: 支持过滤有admin_secgrp的虚拟机
2019-12-31 01:04:32 +08:00
yunion-ci-robot
ffc7a1ce11 Merge pull request #4388 from ioito/automated-cherry-pick-of-#4387-upstream-release-2.13
Automated cherry pick of #4387: fix: 避免私有云找不到对应的套餐
2019-12-31 00:53:36 +08:00
yunion-ci-robot
76a121113c Merge pull request #4395 from ioito/automated-cherry-pick-of-#4394-upstream-release-2.13
Automated cherry pick of #4394: fix: 避免同步将eip同步到弹性网卡里面
2019-12-31 00:50:32 +08:00
Zexi Li
981ce91f2d Merge pull request #4406 from wanyaoqi/automated-cherry-pick-of-#4405-upstream-release-2.13
Automated cherry pick of #4405: fix panic on fstab no content
2019-12-31 00:42:45 +08:00
Zexi Li
8738df67cd Merge pull request #4427 from swordqiu/automated-cherry-pick-of-#4426-upstream-release-2.13
Automated cherry pick of #4426: fix: baremetal server may reuse host's IPMI address
2019-12-31 00:40:16 +08:00
yunion-ci-robot
af9a66906a Merge pull request #4421 from tb365/automated-cherry-pick-of-#4420-upstream-release-2.13
Automated cherry pick of #4420: update rbac default policy
2019-12-31 00:23:33 +08:00
Qiu Jian
f039bc6316 fix: baremetal server may reuse host's IPMI address 2019-12-30 23:40:28 +08:00
wanyaoqi
8c42bf4b14 region MakeCloudProviderInfo instance snapshots
- MakeCloudProviderInfo: fix panic on account is nil
- GetSnapshotsNotInInstanceSnapshot: add filter disk_id
2019-12-30 21:19:25 +08:00
TangBin
283037a724 update rbac default policy 2019-12-30 19:13:42 +08:00
yunion-ci-robot
992a84dd04 Merge pull request #4413 from yousong/automated-cherry-pick-of-#4412-upstream-release-2.13
Automated cherry pick of #4412: networks: make ifname hint also valid qemu identifier
2019-12-30 18:53:33 +08:00
Yousong Zhou
970e00b176 networks: make ifname hint also valid qemu identifier 2019-12-30 18:14:17 +08:00
Zexi Li
4b17d16531 Merge pull request #4402 from swordqiu/automated-cherry-pick-of-#4401-upstream-release-2.13
Automated cherry pick of #4401: fix: host-update ipmi and host-sync-config support
2019-12-30 17:58:53 +08:00
wanyaoqi
2d6823c8b9 fix panic on fstab no content 2019-12-30 16:26:36 +08:00
Qiu Jian
60b458ab77 fix: host-update ipmi and host-sync-config support 2019-12-30 16:13:30 +08:00
Qu Xuan
c1b9c0a9a9 fix: 避免创建时localstorage为空导致校验失败 2019-12-30 15:34:05 +08:00
Qu Xuan
0dfb2a1965 fix: 避免同步将eip同步到弹性网卡里面 2019-12-30 14:54:41 +08:00
wanyaoqi
c6fb41cf9c public cloud support postpaid expire 2019-12-30 11:24:52 +08:00
Qu Xuan
ba6ff394bd fix: 支持过滤有admin_secgrp的虚拟机 2019-12-30 10:50:47 +08:00
Qu Xuan
790878c743 fix: 避免私有云找不到对应的套餐 2019-12-30 10:42:15 +08:00
yunion-ci-robot
5bcd013622 Merge pull request #4348 from ioito/automated-cherry-pick-of-#4347-upstream-release-2.13
Automated cherry pick of #4347: fix: 支持同步经典网络ip地址
2019-12-30 09:19:32 +08:00
yunion-ci-robot
1079614d6e Merge pull request #4364 from ioito/automated-cherry-pick-of-#4362-upstream-release-2.13
Automated cherry pick of #4362: fix: 更正腾讯云磁盘创建时间
2019-12-29 22:04:39 +08:00
yunion-ci-robot
c28bf2bd81 Merge pull request #4384 from ioito/automated-cherry-pick-of-#4383-upstream-release-2.13
Automated cherry pick of #4383: fix: 修复接收参数异常问题
2019-12-28 14:19:31 +08:00
Qu Xuan
fbe17f2f1e fix: 支持同步经典网络ip地址 2019-12-28 13:16:33 +08:00
Qu Xuan
2a347aa5fc fix: 更正腾讯云磁盘创建时间 2019-12-28 13:06:44 +08:00
yunion-ci-robot
45084a31b6 Merge pull request #4376 from ioito/automated-cherry-pick-of-#4375-upstream-release-2.13
Automated cherry pick of #4375: fix: 避免因太多锁导致删除安全组task失败
2019-12-28 09:53:35 +08:00
Qu Xuan
f5971c650e fix: 修复接收参数异常问题 2019-12-27 20:32:51 +08:00
Qu Xuan
593a6a4a76 fix: 避免因太多锁导致删除安全组task失败 2019-12-27 16:23:33 +08:00
Zexi Li
7fed6b1a2a Merge pull request #4361 from swordqiu/automated-cherry-pick-of-#4360-upstream-release-2.13
Automated cherry pick of #4360: update vendor
2019-12-27 16:00:28 +08:00
Zexi Li
e5fd0bc7b8 Merge pull request #4353 from swordqiu/automated-cherry-pick-of-#4352-upstream-release-2.13
Automated cherry pick of #4352: fix: refresh quota usage may timeout
2019-12-27 16:00:16 +08:00
Zexi Li
a1b7ac1bf3 Merge pull request #4358 from swordqiu/automated-cherry-pick-of-#4357-upstream-release-2.13
Automated cherry pick of #4357: fix: change service type of apigateway to yunionapi
2019-12-27 15:59:42 +08:00
Zexi Li
5390e81c77 Merge pull request #4369 from swordqiu/automated-cherry-pick-of-#4368-upstream-release-2.13
Automated cherry pick of #4368: fix: alter user email charset to utf8
2019-12-27 14:28:53 +08:00
Qiu Jian
c6597d71e3 fix: alter user email charset to utf8 2019-12-27 14:11:54 +08:00
zhaoxiangchun
3532b8a261 go fmt 2019-12-27 12:43:58 +08:00
zhaoxiangchun
954799f512 腾讯云监控信息获取方法 2019-12-27 12:43:58 +08:00
zhaoxiangchun
183f2f5b7d qcloud监控信息
pkg/multicloud/qcloud/monitor.go文件:调用腾讯的接口获取指标监控信息
2019-12-27 12:43:58 +08:00
yunion-ci-robot
cd7b0d2c40 Merge pull request #4355 from swordqiu/automated-cherry-pick-of-#4354-upstream-release-2.13
Automated cherry pick of #4354: fix: cloudaccount try get info of empty project
2019-12-27 11:28:31 +08:00
yunion-ci-robot
de14557be2 Merge pull request #4350 from ioito/automated-cherry-pick-of-#4336-upstream-release-2.13
Automated cherry pick of #4336: fix: 优化支持openstack重装系统
2019-12-27 01:15:30 +08:00
yunion-ci-robot
c796f76fd7 Merge pull request #4297 from wanyaoqi/automated-cherry-pick-of-#4296-upstream-release-2.13
Automated cherry pick of #4296: snapshot misc bugfix
2019-12-27 01:12:31 +08:00
yunion-ci-robot
2eceb9ca4b Merge pull request #4292 from yousong/automated-cherry-pick-of-#4291-upstream-release-2.13
Automated cherry pick of #4291: guests: add modify-src-check support
2019-12-27 01:07:30 +08:00
yunion-ci-robot
396957312d Merge pull request #4334 from wanyaoqi/automated-cherry-pick-of-#4333-upstream-release-2.13
Automated cherry pick of #4333: eip add distinct account
2019-12-27 01:03:31 +08:00
Qiu Jian
5281ea243c update vendor 2019-12-27 00:58:27 +08:00
Qiu Jian
8fddcd7775 fix: change service type of apigateway to yunionapi 2019-12-27 00:26:57 +08:00
Qiu Jian
dab9cb0fe6 fix: cloudaccount try get info of empty project 2019-12-26 22:41:33 +08:00
Qiu Jian
65c080dff7 fix: refresh quota usage may timeout 2019-12-26 22:21:23 +08:00
Qu Xuan
5c14041446 fix: 优化支持openstack重装系统 2019-12-26 21:46:51 +08:00
Zexi Li
db01178432 Merge pull request #4327 from swordqiu/automated-cherry-pick-of-#4326-upstream-release-2.13
Automated cherry pick of #4326: fix: baremetal diskconfig empty adaptor index
2019-12-26 21:15:53 +08:00
Zexi Li
10bc25769e Merge pull request #4343 from swordqiu/automated-cherry-pick-of-#4342-upstream-release-2.13
Automated cherry pick of #4342: fix: fetch project/domain name should use system query scope
2019-12-26 21:13:58 +08:00
Zexi Li
77e43330ab Merge pull request #4345 from swordqiu/automated-cherry-pick-of-#4344-upstream-release-2.13
Automated cherry pick of #4344: fix: reduce action log for keystone authentication event
2019-12-26 21:12:15 +08:00
Qiu Jian
b49b189883 fix: reduce action log for keystone authentication event 2019-12-26 20:53:48 +08:00
yunion-ci-robot
c6f04dea16 Merge pull request #4341 from swordqiu/automated-cherry-pick-of-#4340-upstream-release-2.13
Automated cherry pick of #4340: fix: separate delete-object and delete-prefix methods
2019-12-26 18:51:30 +08:00
Qiu Jian
8ce3885265 fix: fetch project/domain name should use system query scope 2019-12-26 18:21:10 +08:00
Qiu Jian
ef1b1af6e7 fix: separate delete-object and delete-prefix methods 2019-12-26 17:37:22 +08:00
yunion-ci-robot
c2d2c86f30 Merge pull request #4323 from swordqiu/automated-cherry-pick-of-#4322-upstream-release-2.13
Automated cherry pick of #4322: fix: SyncEip时同步项目应该在同步主机信息之前
2019-12-26 15:53:35 +08:00
Zexi Li
7545d78937 Merge pull request #4320 from swordqiu/automated-cherry-pick-of-#4319-upstream-release-2.13
Automated cherry pick of #4319: fix: bucket list objects with marker and limit
2019-12-26 15:45:38 +08:00
yunion-ci-robot
c09b1d6832 Merge pull request #4318 from swordqiu/automated-cherry-pick-of-#4317-upstream-release-2.13
Automated cherry pick of #4317: fix: hide worker manager watchdog log
2019-12-26 15:42:31 +08:00
wanyaoqi
2ed863940c eip add distinct account 2019-12-26 14:45:34 +08:00
yunion-ci-robot
053f1a5a7d Merge pull request #4249 from zhasm/automated-cherry-pick-of-#4248-upstream-release-2.13
Automated cherry pick of #4248: 修复 devtool template rbac 权限
2019-12-26 11:22:31 +08:00
yunion-ci-robot
98ad1ad428 Merge pull request #4332 from tb365/automated-cherry-pick-of-#4331-upstream-release-2.13
Automated cherry pick of #4331: host register bugfix
2019-12-26 11:15:32 +08:00
yunion-ci-robot
34a4c356d3 Merge pull request #4300 from yousong/automated-cherry-pick-of-#4299-upstream-release-2.13
Automated cherry pick of #4299: hostman: different error message for different error reason
2019-12-26 11:06:30 +08:00
TangBin
329b4d6d62 host register bugfix 2019-12-26 10:56:59 +08:00
yunion-ci-robot
92389a8c5f Merge pull request #4314 from ioito/automated-cherry-pick-of-#4313-upstream-release-2.13
Automated cherry pick of #4313: fix: 避免在域管理后台rules不可见
2019-12-26 01:56:15 +08:00
yunion-ci-robot
0b3f5ce583 Merge pull request #4308 from ioito/automated-cherry-pick-of-#4307-upstream-release-2.13
Automated cherry pick of #4307: fix: 同步openstack宿主机关闭服务后状态
2019-12-26 01:52:14 +08:00
Qiu Jian
7b4aae71cd fix: baremetal diskconfig empty adaptor index 2019-12-26 01:12:27 +08:00
Qiu Jian
918d883cf9 fix: SyncEip时同步项目应该在同步主机信息之前 2019-12-26 01:01:23 +08:00
Qiu Jian
1b4bb62f83 fix fmt issue 2019-12-26 00:49:05 +08:00
Qiu Jian
cbc970a2d6 fix: minor fix 2019-12-26 00:49:05 +08:00
Qiu Jian
de68feba9b fix: bucket list objects with marker and limit 2019-12-26 00:49:05 +08:00
yunion-ci-robot
98174b4354 Merge pull request #4284 from swordqiu/automated-cherry-pick-of-#4283-upstream-release-2.13
Automated cherry pick of #4283: feature: 1. baremetal server reuse host ip 2. server name use expression
2019-12-25 21:00:16 +08:00
Qiu Jian
1441b70e8a fix: hide worker manager watchdog log 2019-12-25 18:29:42 +08:00
Qu Xuan
9e11b683a5 fix: 避免在域管理后台rules不可见 2019-12-25 17:14:39 +08:00
yunion-ci-robot
17e897cf93 Merge pull request #4305 from ioito/automated-cherry-pick-of-#4304-upstream-release-2.13
Automated cherry pick of #4304: fix: 支持忽略cloudaccount健康检查
2019-12-25 17:12:15 +08:00
Qu Xuan
a54adccadf fix: 同步openstack宿主机关闭服务后状态 2019-12-25 16:27:23 +08:00
yunion-ci-robot
586ac8c9fd Merge pull request #4287 from ioito/automated-cherry-pick-of-#4286-upstream-release-2.13
Automated cherry pick of #4286: fix: list增加provider字段,过滤已删除账号的cloudevent
2019-12-25 16:26:14 +08:00
Qu Xuan
b601ec6932 fix: 支持忽略cloudaccount健康检查 2019-12-25 16:09:25 +08:00
yunion-ci-robot
4074dde7b4 Merge pull request #4294 from ioito/automated-cherry-pick-of-#4293-upstream-release-2.13
Automated cherry pick of #4293: fix: 避免未接收到tenant参数
2019-12-25 16:03:15 +08:00
Yousong Zhou
77922d9f56 hostman: note for preflight check for ifconfig command 2019-12-25 16:00:30 +08:00
Yousong Zhou
e904e68313 hostman: fsdriver: fix hostname deployment for openwrt
We will need to add native uci support later
2019-12-25 15:58:50 +08:00
Yousong Zhou
c2b6ffc492 hostman: add default values for host config 2019-12-25 15:58:50 +08:00
Yousong Zhou
ce88fd3693 networks: different indent level for asymmetric branches 2019-12-25 15:58:50 +08:00
Yousong Zhou
40a400700f hostman: different error message for different error reason 2019-12-25 15:58:50 +08:00
wanyaoqi
da1a9b33af snapshot misc bugfix 2019-12-25 15:52:55 +08:00
Qu Xuan
97c2ee9e68 fix: 避免未接收到tenant参数 2019-12-25 14:38:00 +08:00
Yousong Zhou
05417fbbb4 climc: add server-modify-src-check 2019-12-25 12:43:24 +08:00
Yousong Zhou
ffd71ce2ab guests: add modify-src-check support 2019-12-25 12:43:24 +08:00
Qu Xuan
e212407b76 fix: list增加provider字段,过滤已删除账号的cloudevent 2019-12-24 22:25:05 +08:00
Qiu Jian
c3355e2312 remove debug log 2019-12-24 20:32:42 +08:00
Qiu Jian
d4c5d37fc2 minor fix 2019-12-24 20:32:42 +08:00
Qiu Jian
e75eae74a9 feature: 1. baremetal server reuse host ip 2. server name use expression 2019-12-24 20:32:41 +08:00
Zhang Dongliang
d260fbb185 devtool 资源类型 从standalone 改为 virtualresource 2019-12-24 11:11:28 +08:00
Zhang Dongliang
9541eccd38 修复 devtool template rbac 权限 2019-12-24 11:11:28 +08:00
yunion-ci-robot
b74b94f5c9 Merge pull request #4280 from swordqiu/automated-cherry-pick-of-#4257-upstream-release-2.13
Automated cherry pick of #4257: feature: service config update support
2019-12-24 10:25:13 +08:00
yunion-ci-robot
11423e574c Merge pull request #4276 from rainzm/automated-cherry-pick-of-#4274-upstream-release-2.13
Automated cherry pick of #4274: fix(notify): Fix for user cache and list contacts
2019-12-23 21:11:15 +08:00
Rain
36bfb48a9a fix(notify): Fix for user cache and list contacts 2019-12-23 20:49:56 +08:00
yunion-ci-robot
607c05acda Merge pull request #4282 from ioito/automated-cherry-pick-of-#4281-upstream-release-2.13
Automated cherry pick of #4281: fix: host支持标签
2019-12-23 20:25:16 +08:00
Qu Xuan
e089287970 fix: host支持标签 2019-12-23 19:55:46 +08:00
Qiu Jian
f4a6277c31 feature: service config update support 2019-12-23 19:05:20 +08:00
TangBin
41206abdd1 add services query permission 2019-12-23 19:03:09 +08:00
rainzm
fd74845797 update vendor (#4267) 2019-12-23 19:03:09 +08:00
Qiu Jian
40a922ac58 feature: service config update support 2019-12-23 19:02:37 +08:00
yunion-ci-robot
b113ab24ab Merge pull request #4278 from tb365/automated-cherry-pick-of-#4277-upstream-release-2.13
Automated cherry pick of #4277: add services query permission
2019-12-23 18:36:12 +08:00
TangBin
94dc3ca2fb add services query permission 2019-12-23 18:14:22 +08:00
yunion-ci-robot
f26431fc0c Merge pull request #4272 from swordqiu/automated-cherry-pick-of-#4270-upstream-release-2.13
Automated cherry pick of #4270: feature: support centos 8 deployment. centos 8 requiest NetworkManager
2019-12-23 10:43:14 +08:00
Qiu Jian
e645ab22ce feature: support centos 8 deployment. centos 8 requiest NetworkManager 2019-12-21 18:44:12 +08:00
rainzm
1f96aecf71 update vendor for 2.13 (#4269) 2019-12-21 17:55:59 +08:00
Jian Qiu
6d5493004b feature: add domain usage with prefix "domain." (#4266) 2019-12-21 17:55:19 +08:00
yunion-ci-robot
61bbbc5610 Merge pull request #4259 from swordqiu/automated-cherry-pick-of-#4258-upstream-release-2.13
Automated cherry pick of #4258: feature: add domain usage with prefix "domain."
2019-12-21 17:14:13 +08:00
yunion-ci-robot
01941f3637 Merge pull request #4265 from ioito/automated-cherry-pick-of-#4264-upstream-release-2.13
Automated cherry pick of #4264: fix: google storage name
2019-12-21 17:04:07 +08:00
Qu Xuan
2f31be5a00 fix: google storage name 2019-12-21 16:57:38 +08:00
yunion-ci-robot
d01ec224d1 Merge pull request #4263 from ioito/automated-cherry-pick-of-#4262-upstream-release-2.13
Automated cherry pick of #4262: fix: 编译问题
2019-12-21 16:42:06 +08:00
Qu Xuan
5c2f97e40b fix: 编译问题 2019-12-21 16:32:42 +08:00
yunion-ci-robot
7993845bfa Merge pull request #4261 from ioito/automated-cherry-pick-of-#4260-upstream-release-2.13
Automated cherry pick of #4260: fix: resourcebase和selflink,name重叠
2019-12-21 16:18:07 +08:00
Qu Xuan
3b7e97cc33 fix: resourcebase和selflink,name重叠 2019-12-21 16:15:41 +08:00
Qiu Jian
aca3da0b69 feature: add domain usage with prefix "domain." 2019-12-21 02:04:45 +08:00
yunion-ci-robot
69f969875e Merge pull request #4255 from ioito/automated-cherry-pick-of-#4254-upstream-release-2.13
Automated cherry pick of #4254: fix: 谷歌云镜像账号内共享,只需要一个storagecache
2019-12-21 00:03:06 +08:00
yunion-ci-robot
9aae793665 Merge pull request #4252 from rainzm/feature/update_vendor_2.13
Update vendor in release/2.13
2019-12-20 23:59:05 +08:00
yunion-ci-robot
1912170eb4 Merge pull request #4227 from ioito/automated-cherry-pick-of-#4226-upstream-release-2.13
Automated cherry pick of #4226: fix: globalvpc属于系统资源
2019-12-20 22:08:08 +08:00
Qu Xuan
d7c300f861 fix: 谷歌云镜像账号内共享,只需要一个storagecache 2019-12-20 21:38:36 +08:00
yunion-ci-robot
99fbe4f228 Merge pull request #4229 from yousong/automated-cherry-pick-of-#4228-upstream-release-2.13
Automated cherry pick of #4228: mcclient: proxy setting aware by using httputils' transport
2019-12-20 21:30:05 +08:00
Rain
ce71be7fed Update vendor in case of updating about yunion.io/x/pkg and yunion.io/x/jsonutils 2019-12-20 20:11:01 +08:00
yunion-ci-robot
c0c3d98871 Merge pull request #4247 from ioito/automated-cherry-pick-of-#4168-upstream-release-2.13
Automated cherry pick of #4168: fix: 避免创建安全组规则时未能接收到安全组参数
2019-12-20 18:09:04 +08:00
yunion-ci-robot
799f033e8c Merge pull request #4244 from rainzm/automated-cherry-pick-of-#4232-upstream-release-2.13
Automated cherry pick of #4232: Fix(notify): Unified the api params and fix some bug.
2019-12-20 16:04:07 +08:00
Qu Xuan
90f89c499f fix: 避免创建安全组规则时未能接收到安全组参数 2019-12-20 15:42:14 +08:00
Rain
3ff13c81a1 feat(notify): Add default email tempalte with topic IMAGE_ACTIVED 2019-12-20 11:42:52 +08:00
Rain
9bd93f96a4 Fix(notify): Unified the api params and fix some bug.
1. Config Verify 和 Contact 的 InitalizeData 写得过于直接了。
会导致正常的数据被覆盖。实际上,数据的Init只需要更换数据
库的时候更新,如何判断数据库要被更新了,就是判断新出现的
column 有没有非零值的,如果有,就说明数据库不是第一次更新。

2. 前端的请求经过yunionapi,最终会调用climc里面注册的ResourceManager,
所以这个地方一定要和后端的参数处理统一。之前因为添加 uname
的支持破坏了这个地方的统一,虽然climc可以调用成功但是前端接口调用会失败。

3. Resend 的bug,会导致任务的阻塞。

4. 为了兼容kapacitor对climc
notify的调用,分成了notify和notify-batch两个命令。
2019-12-20 11:42:52 +08:00
yunion-ci-robot
e3c1eb7e7e Merge pull request #4233 from tb365/automated-cherry-pick-of-#4184-upstream-release-2.13
Automated cherry pick of #4184: elastic skus query bugfix
2019-12-20 11:26:06 +08:00
Zexi Li
985111168c Merge pull request #4242 from rainzm/automated-cherry-pick-of-#4241-upstream-release-2.13
Automated cherry pick of #4241: Fix(region): Fix the Json tag of apis.GuesttemplateNetwork.GuestIpEnd
2019-12-20 10:49:30 +08:00
yunion-ci-robot
dccf867805 Merge pull request #4239 from zexi/automated-cherry-pick-of-#4238-upstream-release-2.13
Automated cherry pick of #4238: baremetal: fix register input params lost
2019-12-20 00:17:05 +08:00
Rain
9cecc6ac59 Fix(region): Fix the Json tag of apis.GuesttemplateNetwork.GuestIpEnd 2019-12-19 21:49:55 +08:00
Zexi Li
a3af11bacf baremetal: fix register input params lost 2019-12-19 21:10:33 +08:00
yunion-ci-robot
eb584c4d01 Merge pull request #4231 from tb365/automated-cherry-pick-of-#4083-upstream-release-2.13
Automated cherry pick of #4083: add user & project batch import template
2019-12-19 19:04:04 +08:00
TangBin
a66c25521f add cache skus query params 2019-12-19 18:18:14 +08:00
TangBin
f337ec244d add zone service filter 2019-12-19 18:18:14 +08:00
TangBin
d321458803 zone customize columns add region_external_id 2019-12-19 18:18:14 +08:00
TangBin
ce0257126f get elasitc cache account password api 2019-12-19 18:18:14 +08:00
TangBin
9cca89e7ec elastic skus query bugfix 2019-12-19 18:18:14 +08:00
Zexi Li
d42e67c2e8 Merge pull request #4236 from swordqiu/automated-cherry-pick-of-#4235-upstream-release-2.13
Automated cherry pick of #4235: fix: image-quotas not register model names
2019-12-19 17:31:21 +08:00
Qiu Jian
d130afb143 fix: image-quotas not register model names 2019-12-19 17:29:55 +08:00
TangBin
9e1e51abf8 add host iso&pxe register 2019-12-19 16:06:37 +08:00
TangBin
e1ed02f525 user batch create 2019-12-19 16:06:37 +08:00
TangBin
0565813764 add user & project batch import template 2019-12-19 16:06:37 +08:00
Yousong Zhou
862c2c27ee httputils: unset DisableCompression=true 2019-12-19 15:03:20 +08:00
Yousong Zhou
0416d3fd1e mcclient: proxy setting aware by using httputils' transport 2019-12-19 15:03:20 +08:00
yunion-ci-robot
b86fdbba43 Merge pull request #4225 from ioito/automated-cherry-pick-of-#4224-upstream-release-2.13
Automated cherry pick of #4224: fix: 移除重复的manger注册
2019-12-19 12:54:03 +08:00
Qu Xuan
692b1ce3c3 fix: globalvpc属于系统资源 2019-12-19 11:43:33 +08:00
Qu Xuan
d0bf533d4a fix: 移除重复的manger注册 2019-12-19 11:29:51 +08:00
yunion-ci-robot
d89d4dcb86 Merge pull request #4223 from rainzm/automated-cherry-pick-of-#4221-upstream-release-2.13
Automated cherry pick of #4221: fix(region): Fix the bug of snapshotpolicy's list with details
2019-12-19 11:11:02 +08:00
Rain
7956b0db38 fix(region): Fix the bug of snapshotpolicy's list with details
snapshotpolicy的GetCustomizeColumns和GetExtraDetails本来写的就有问题,
不过在2.12版本没有展示出来,因为2.13版本参数结构化的原因,details获取
的时候extraDict和jsonDict的更新逻辑有所改变,使得query携带着list第一
个item的数据一直存在整个循环之中,最终数据都是一样的。
2019-12-19 10:51:17 +08:00
Zexi Li
3a9a7b67ce Merge pull request #4219 from rainzm/automated-cherry-pick-of-#4217-upstream-release-2.13
Automated cherry pick of #4217: bugfix(notify): Fix the bug of notify config and verify
2019-12-18 20:50:40 +08:00
yunion-ci-robot
af2d8900c2 Merge pull request #4211 from ioito/automated-cherry-pick-of-#4210-upstream-release-2.13
Automated cherry pick of #4210: optimize: 分离各个资源的request请求
2019-12-18 20:00:03 +08:00
yunion-ci-robot
bc0bf4f772 Merge pull request #4213 from yousong/automated-cherry-pick-of-#4212-upstream-release-2.13
Automated cherry pick of #4212: guestnetworks: ignore empty preferIfname
2019-12-18 19:03:04 +08:00
Rain
cb995d844d bugfix(notify): Fix the bug of notify config and verify
1. 优化了报错信息
2. 将验证信息的发送由异步改成了同步,这样前端可以方便的展示验证消息发送失败的原因
3. 主动初始化webconsole的配置信息,使得websocket能够马上正常工作
4. 修复了验证信息发送失败之后联系方式状态不正确的bug
5. 去掉有关email回调地址的api
6. 修复了 update config 首次不起作用的 bug
2019-12-18 19:02:18 +08:00
Yousong Zhou
00979ab3b2 guestnetworks: ignore empty preferIfname
Fixes cc02ac74 ("guestnetworks: check ifname uniqueness across different
networks")
2019-12-18 09:15:44 +00:00
yunion-ci-robot
9adf57ec18 Merge pull request #4165 from rainzm/automated-cherry-pick-of-#4164-upstream-release-2.13
Automated cherry pick of #4164: fix(region): Add support for updating Service Catalog
2019-12-18 13:19:07 +08:00
yunion-ci-robot
d00e95dadb Merge pull request #4208 from swordqiu/automated-cherry-pick-of-#4207-upstream-release-2.13
Automated cherry pick of #4207: fix: ESXi fakeDC ID should matches any datacenter
2019-12-17 22:38:03 +08:00
Qu Xuan
40199d787e optimize: 分离各个资源的request请求 2019-12-17 21:34:12 +08:00
Qiu Jian
bb4c3fda21 fix: ESXi fakeDC ID should matches any datacenter 2019-12-17 18:50:21 +08:00
yunion-ci-robot
0a6c248887 Merge pull request #4181 from ioito/automated-cherry-pick-of-#4180-upstream-release-2.13
Automated cherry pick of #4180: fix: 添加缓存镜像失败日志
2019-12-17 17:53:02 +08:00
yunion-ci-robot
06d35542a1 Merge pull request #4206 from rainzm/automated-cherry-pick-of-#4204-upstream-release-2.13
Automated cherry pick of #4204: fix(notify): Fix the bugs of user cache and some api's params
2019-12-17 17:27:10 +08:00
Rain
b19fcf4487 fix(notify): Fix the bugs of user cache and some api's params 2019-12-17 17:21:00 +08:00
yunion-ci-robot
caa82c0917 Merge pull request #4178 from ioito/automated-cherry-pick-of-#4177-upstream-release-2.13
Automated cherry pick of #4177: fix: 增强host-list --usable限制
2019-12-17 17:04:01 +08:00
yunion-ci-robot
8aa88657c2 Merge pull request #4203 from swordqiu/automated-cherry-pick-of-#4202-upstream-release-2.13
Automated cherry pick of #4202: update vendor
2019-12-17 17:02:02 +08:00
Qiu Jian
f3370a5824 update vendor 2019-12-17 16:56:22 +08:00
yunion-ci-robot
02229d970e Merge pull request #4196 from ioito/automated-cherry-pick-of-#4194-upstream-release-2.13
Automated cherry pick of #4194: fix: 标签过滤和框架保持一致
2019-12-17 16:36:02 +08:00
yunion-ci-robot
4ac77b61df Merge pull request #4199 from swordqiu/automated-cherry-pick-of-#4193-upstream-release-2.13
Automated cherry pick of #4193: fix: fetch hosts if no permission to access datacenter
2019-12-17 16:23:02 +08:00
Zexi Li
633eecef22 Merge pull request #4176 from wanyaoqi/automated-cherry-pick-of-#4175-upstream-release-2.13
Automated cherry pick of #4175: fix snapshot create input
2019-12-17 16:13:59 +08:00
yunion-ci-robot
d0f8dd6607 Merge pull request #4183 from zhasm/automated-cherry-pick-of-#4182-upstream-release-2.13
Automated cherry pick of #4182: devtool manager 去掉重复的 RegisterModelManager
2019-12-17 16:03:03 +08:00
Qiu Jian
33fc89dca1 fix: fetch hosts if no permission to access datacenter 2019-12-17 15:57:41 +08:00
Qu Xuan
68d474b88d fix: 标签过滤和框架保持一致 2019-12-17 15:56:44 +08:00
Zhang Dongliang
bbf66c6e28 devtool manager 去掉重复的 RegisterModelManager 2019-12-17 15:14:38 +08:00
Qu Xuan
e972ac160c fix: 增强host-list --usable限制 2019-12-17 14:48:35 +08:00
yunion-ci-robot
80262325ec Merge pull request #4189 from swordqiu/automated-cherry-pick-of-#4188-upstream-release-2.13
Automated cherry pick of #4188: fix: disabling cloud account should not turn off auto sync switch
2019-12-17 14:02:04 +08:00
yunion-ci-robot
da5e9effdb Merge pull request #4192 from swordqiu/automated-cherry-pick-of-#4167-upstream-release-2.13
Automated cherry pick of #4167: feature: allow delete none-default quota fix: cannot set a quota to zero
2019-12-17 14:01:03 +08:00
yunion-ci-robot
f3d113a813 Merge pull request #4166 from swordqiu/automated-cherry-pick-of-#4128-upstream-release-2.13
Automated cherry pick of #4128: feaute: object storage support set/get http headers
2019-12-17 13:59:03 +08:00
Qiu Jian
cfaf7cf36e feature: allow delete none-default quota fix: cannot set a quota to zero 2019-12-17 13:52:17 +08:00
yunion-ci-robot
7fb69981f7 Merge pull request #4186 from swordqiu/automated-cherry-pick-of-#4185-upstream-release-2.13
Automated cherry pick of #4185: fix: server change config failed due to quota recode
2019-12-17 09:28:02 +08:00
Qiu Jian
98f990d838 fix: disabling cloud account should not turn off auto sync switch 2019-12-17 01:19:57 +08:00
Qiu Jian
61974fba54 fix: minor fixes 2019-12-16 23:41:06 +08:00
Qiu Jian
4d5585c5d7 fix: bucket-object-upload not work 2019-12-16 23:41:06 +08:00
Qiu Jian
de7d38cc6e misc imporvements 2019-12-16 23:41:06 +08:00
Qiu Jian
a20d617362 feaute: object storage support set/get http headers 2019-12-16 23:41:05 +08:00
Qiu Jian
ea2e57cbfd fix: server change config failed due to quota recode 2019-12-16 21:05:11 +08:00
Qu Xuan
2bcacdb180 fix: 添加缓存镜像失败日志 2019-12-16 13:11:18 +08:00
wanyaoqi
0babb71bbb fix snapshot create input 2019-12-16 12:03:19 +08:00
yunion-ci-robot
97643f5f49 Merge pull request #4174 from rainzm/automated-cherry-pick-of-#4103-upstream-release-2.13
Automated cherry pick of #4103: feat(notify): Available uname in api & Unified template management
2019-12-16 11:43:00 +08:00
yunion-ci-robot
c0a0008416 Merge pull request #4172 from ioito/automated-cherry-pick-of-#4170-upstream-release-2.13
Automated cherry pick of #4170: fix: 避免频繁同步rds sku信息
2019-12-16 11:25:01 +08:00
Rain
fc95701f80 feat(notify): Available uname in api & Unified template management
1. Uname is availbale now in api via adding "uname=true" in query.
So we can use uname in climc which is much more visual and use uid in
web client which avoid time-consuming remote calls that may occur.

2. Previously, the template for the message was managed by the
individual sending components. Now, these templats was managed uniformly
by Notify Service so that we can easily add and remove.

3. Now, failure to send a validation message will trigger a notification
to the user via websocket.
2019-12-16 11:07:40 +08:00
Qu Xuan
9423d614d1 fix: 避免频繁同步rds sku信息 2019-12-16 11:03:53 +08:00
Rain
dc2a2ec887 fix(region): Add support for updating Service Catalog 2019-12-14 16:45:01 +08:00
yunion-ci-robot
8d6bf39768 Merge pull request #4051 from ioito/automated-cherry-pick-of-#4050-upstream-release-2.13
Automated cherry pick of #4050: fix: cloudevent过滤及详情信息
2019-12-14 12:32:00 +08:00
yunion-ci-robot
5037c33a80 Merge pull request #4158 from ioito/automated-cherry-pick-of-#4157-upstream-release-2.13
Automated cherry pick of #4157: fix: 标签增强
2019-12-14 12:26:00 +08:00
yunion-ci-robot
88eca31e22 Merge pull request #4156 from tb365/automated-cherry-pick-of-#4155-upstream-release-2.13
Automated cherry pick of #4155: ctyun sync bugfix
2019-12-14 12:14:01 +08:00
Jian Qiu
92a0b8878a fix: prevent quota usage from being negative (#4163) 2019-12-14 12:11:38 +08:00
yunion-ci-robot
0f3a12898a Merge pull request #4153 from ioito/automated-cherry-pick-of-#4152-upstream-release-2.13
Automated cherry pick of #4152: fix: 私有云同步的sku归属于default region
2019-12-14 11:32:00 +08:00
yunion-ci-robot
484f56db9b Merge pull request #4145 from tb365/automated-cherry-pick-of-#4141-upstream-release-2.13
Automated cherry pick of #4141: huawei sync instance offset bugfix
2019-12-14 11:07:02 +08:00
yunion-ci-robot
6963837f2f Merge pull request #4160 from ioito/automated-cherry-pick-of-#4159-upstream-release-2.13
Automated cherry pick of #4159: fix: 增强host-list --usable限制
2019-12-14 10:53:59 +08:00
Qu Xuan
aa61c4bd97 fix: 增强host-list --usable限制 2019-12-13 20:29:33 +08:00
Qu Xuan
aa6e968413 fix: filter by multi value 2019-12-13 20:03:47 +08:00
TangBin
1fb48cd0db ctyun sync bugfix 2019-12-13 18:23:40 +08:00
Qu Xuan
e3889f6075 fix: 私有云同步的sku归属于default region 2019-12-13 17:39:13 +08:00
yunion-ci-robot
0dbf30588f Merge pull request #4149 from swordqiu/automated-cherry-pick-of-#4148-upstream-release-2.13
Automated cherry pick of #4148: fix: image quota key type mismatch
2019-12-13 17:38:00 +08:00
yunion-ci-robot
aea8c3929c Merge pull request #4151 from ioito/automated-cherry-pick-of-#4150-upstream-release-2.13
Automated cherry pick of #4150: hotfix: update vendor
2019-12-13 17:34:59 +08:00
yunion-ci-robot
f8a3c08771 Merge pull request #4147 from zexi/automated-cherry-pick-of-#4146-upstream-release-2.13
Automated cherry pick of #4146: region: fix schedule input project and domain missing
2019-12-13 17:32:59 +08:00
Qu Xuan
8b3c3f4e5e hotfix: update vendor 2019-12-13 17:06:59 +08:00
Qiu Jian
bf4c2eef0c fix: image quota key type mismatch 2019-12-13 16:27:26 +08:00
Zexi Li
defe9225c7 region: fix schedule input project and domain missing 2019-12-13 16:02:41 +08:00
TangBin
9ce19acb4a huawei sync instance offset bugfix 2019-12-13 15:46:36 +08:00
yunion-ci-robot
d1174be6f7 Merge pull request #4140 from swordqiu/automated-cherry-pick-of-#4139-upstream-release-2.13
Automated cherry pick of #4139: fix: init quota with negative value and negative quota means unlimited
2019-12-13 14:44:04 +08:00
Qiu Jian
07569221dd fix: init quota with negative value and negative quota means unlimited 2019-12-13 13:31:53 +08:00
yunion-ci-robot
4c9136819f Merge pull request #4135 from swordqiu/automated-cherry-pick-of-#4134-upstream-release-2.13
Automated cherry pick of #4134: fix: misc bugfix for esxi 20191213
2019-12-13 13:00:00 +08:00
yunion-ci-robot
11cd13d52d Merge pull request #4124 from yousong/automated-cherry-pick-of-#4123-upstream-release-2.13
Automated cherry pick of #4123: guestnetworks: check ifname uniqueness across different networks
2019-12-13 12:57:03 +08:00
Qiu Jian
351fbf4411 fix: misc bugfix for esxi 20191213 2019-12-13 12:34:31 +08:00
yunion-ci-robot
bbb6f5d175 Merge pull request #4130 from ioito/automated-cherry-pick-of-#4129-upstream-release-2.13
Automated cherry pick of #4129: fix: 避免插入时出现duplicate primary key error
2019-12-13 11:39:58 +08:00
Qu Xuan
2c7a1a2b8a fix: 避免插入时出现duplicate primary key error 2019-12-13 10:45:40 +08:00
Yousong Zhou
9611f04c31 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:45:59 +00:00
yunion-ci-robot
3795da080b Merge pull request #4122 from ioito/automated-cherry-pick-of-#4121-upstream-release-2.13
Automated cherry pick of #4121: fix: 避免污染cloud_env参数
2019-12-12 20:49:01 +08:00
Qu Xuan
3139734254 fix: 避免污染cloud_env参数 2019-12-12 19:56:25 +08:00
yunion-ci-robot
b52f7c21e9 Merge pull request #4120 from swordqiu/automated-cherry-pick-of-#4119-upstream-release-2.13
Automated cherry pick of #4119: fix: 1. image-quota-list 404 not found 2. usage nil pointer panic
2019-12-12 18:01:00 +08:00
Qiu Jian
8dde22f789 fix: 1. image-quota-list 404 not found 2. usage nil pointer panic 2019-12-12 17:44:25 +08:00
yunion-ci-robot
319f531f01 Merge pull request #4115 from bistuzx/automated-cherry-pick-of-#4113-upstream-release-2.13
Automated cherry pick of #4113: delete duplicate param brand
2019-12-12 15:38:58 +08:00
张旭
0d887b247a delete duplicate param brand 2019-12-12 15:27:25 +08:00
yunion-ci-robot
21ca0a46ee Merge pull request #4091 from swordqiu/automated-cherry-pick-of-#4090-upstream-release-2.13
Automated cherry pick of #4090: quota recode
2019-12-12 12:41:59 +08:00
yunion-ci-robot
96d721586e Merge pull request #4111 from bistuzx/automated-cherry-pick-of-#4109-upstream-release-2.13
Automated cherry pick of #4109: add associated_bills & modify meter version
2019-12-12 12:41:06 +08:00
张旭
d625556278 add associated_bills & modify meter version 2019-12-12 12:01:03 +08:00
Qiu Jian
eb413e11f9 fix: globalvpc validateCreateData fix 2019-12-12 11:55:17 +08:00
Qiu Jian
284a7f3b70 mergeInputOutputJson for ValidateCreateData and ValidateUpdateData 2019-12-12 11:55:16 +08:00
Qiu Jian
6b2a0e0412 update vendor 2019-12-12 11:55:15 +08:00
Qiu Jian
08471d9330 clean usages when resource deleted 2019-12-12 11:53:22 +08:00
Qiu Jian
6c515fc4f2 bufix 20191209 2019-12-12 11:53:22 +08:00
Qiu Jian
f7acf5d7f5 quota recode update 2 2019-12-12 11:53:21 +08:00
Qiu Jian
844c1064cc quota recode 2019-12-12 11:53:20 +08:00
yunion-ci-robot
ebeb22a18e Merge pull request #4098 from ioito/automated-cherry-pick-of-#4097-upstream-release-2.13
Automated cherry pick of #4097: fix: 避免zstack参数含有中文,未编码导致请求失败
2019-12-12 11:24:58 +08:00
屈轩
bcf76063ec fix: globalnetwork -> globalvpc (#4087) 2019-12-12 11:17:35 +08:00
Yousong Zhou
7fea44015c Merge pull request #4105 from wanyaoqi/automated-cherry-pick-of-#4104-upstream-release-2.13
Automated cherry pick of #4104: fix image upload log event
2019-12-12 00:48:13 +08:00
Qu Xuan
a3098f2893 fix: 避免zstack参数含有中文,未编码导致请求失败 2019-12-11 23:20:38 +08:00
Yousong Zhou
25cce356a5 loadbalancerbackends: janitor: move to InitializeData (#4093)
The janitor only makes sense when inside region service
2019-12-11 23:11:09 +08:00
wanyaoqi
b01f469e93 fix image upload log event 2019-12-11 20:40:35 +08:00
Yousong Zhou
f1f2eff680 Merge pull request #4073 from ioito/automated-cherry-pick-of-#4072-upstream-release-2.13
Automated cherry pick of #4072: fix: 导出用户标签不加user:前缀
2019-12-11 15:13:00 +08:00
Yousong Zhou
1f42c3cbc9 Merge pull request #4089 from swordqiu/automated-cherry-pick-of-#4088-upstream-release-2.13
Automated cherry pick of #4088: fix: add hostinfo to storage cached image details
2019-12-11 15:00:39 +08:00
Qiu Jian
455964acd3 fix: add hostinfo to storage cached image details 2019-12-10 21:42:06 +08:00
屈轩
0d82847868 fix: 兼容参数过滤 (#4055) 2019-12-10 21:27:17 +08:00
屈轩
2fa5ac147a fix: 兼容以前的参数 (#4071) 2019-12-10 21:26:11 +08:00
tb365
edc8de5aa1 sync server skus from offline data (#4066) 2019-12-10 21:22:28 +08:00
Yousong Zhou
e6b7e21f58 Automated cherry pick of #4084: httputils: use http.ProxyFromEnvironment by default (#4085)
* vendor: update aliyun-oss-go-sdk to v2.0.4

To use ClientOption oss.HTTPClient

* aliyun: use a http client that respects env proxy settings

* httputils: use http.ProxyFromEnvironment by default
2019-12-10 21:15:28 +08:00
屈轩
8136012312 fix: 子订阅更改项目时也同步更新external project项目信息 (#4069) 2019-12-10 21:12:20 +08:00
Zexi Li
9979be1284 Merge pull request #4082 from rainzm/automated-cherry-pick-of-#4081-upstream-release-2.13
Automated cherry pick of #4081: fix: Fix the unexpected json field coverage after GetCustomizeColumns
2019-12-10 16:10:55 +08:00
郑雨
40de4cb1d0 refactor: Instance Group's getMoreDetails 2019-12-10 16:03:48 +08:00
郑雨
c8269e35ad fix: Fix the unexpected json field coverage after GetCustomizeColumns
一般来说一个资源的detail版本的输出会放在 <ResoureName>Details
这样的结构体中,并且这个结构体包含资源本身。不过一般在 details
的处理函数中(比如GetCustomizeColumns)资源本身的结构体都是默认值,
而jsonutils的unmarshal函数会把默认值(零值)的int类型(也可能会有其他类型)
unmarshal到jsonutils.JSONDict中(string类型就不会有这种情况)。
这会导致返回的extraDict会覆盖掉原来的Dict中的一些字段,这种覆盖并不是所期望的。
所以现在暂时改为用后者来覆盖前者,前者是最终输出的全集。
2019-12-10 16:03:48 +08:00
Zexi Li
bba9af2abe Merge pull request #4080 from rainzm/automated-cherry-pick-of-#4079-upstream-release-2.13
Automated cherry pick of #4079: fix(region): Fix the list bug of Guest Template
2019-12-10 15:47:28 +08:00
郑雨
168c730e7d fix(region): Fix the list bug of Guest Template
1. Add function GetCustomizeColumns for Guest Template
2. Fix the ValidateDeleteCondition for Guest Template
3. Rename Config as ConfigInfo in apis.GuesttemplateDetails
2019-12-10 15:07:50 +08:00
Zexi Li
21425ee184 Merge pull request #4078 from rainzm/automated-cherry-pick-of-#4067-upstream-release-2.13
Automated cherry pick of #4067: fix(region): Guest template & Service catalog
2019-12-10 10:52:36 +08:00
郑雨
33ee2dd3dd fix(region): Guest template & Service catalog
Add the common create input.
Not allow to delete the guest template used by some service catalog.
2019-12-10 10:47:26 +08:00
Zexi Li
0620840fee Merge pull request #4077 from swordqiu/automated-cherry-pick-of-#4064-upstream-release-2.13
Automated cherry pick of #4064: fix: host-cache-image might not work
2019-12-10 10:03:11 +08:00
Qiu Jian
093d386057 fix: host-cache-image might not work 2019-12-10 09:09:26 +08:00
Qu Xuan
3836bf37f1 fix: 导出用户标签不加user:前缀 2019-12-09 21:45:17 +08:00
Zexi Li
4c0bc843f8 Merge pull request #4060 from ioito/automated-cherry-pick-of-#4008-upstream-release-2.13
Automated cherry pick of #4008: fix: 安全组同步优化,避免规则不同的安全组可以合并
2019-12-09 11:35:07 +08:00
Zexi Li
72fd0c9540 Merge pull request #4058 from ioito/automated-cherry-pick-of-#4057-upstream-release-2.13
Automated cherry pick of #4057: fix: 避免在初始化model时设置rds skuhandler
2019-12-09 11:33:59 +08:00
Zexi Li
4d1d11b6fd Merge pull request #4046 from rainzm/automated-cherry-pick-of-#4045-upstream-release-2.13
Automated cherry pick of #4045: feat(region): Support for resuming vm suspended in vmware
2019-12-09 11:32:53 +08:00
Zexi Li
015d9a2de7 Merge pull request #4061 from rainzm/automated-cherry-pick-of-#3805-upstream-release-2.13
Automated cherry pick of #3805: feat(region): Add Guest Template & Service Catalog
2019-12-09 11:31:20 +08:00
郑雨
e2b131457a feat(region): Add Guest Template & Service Catalog
Modify the structure of ServerCreateOptions so that
GuestTemplateCreateOptions can reuse most field.
2019-12-09 11:24:47 +08:00
Qu Xuan
fdf3f23589 fix: 安全组同步优化,避免规则不同的安全组可以合并 2019-12-09 10:29:16 +08:00
屈轩
a747edbd1b fix: 避免在初始化model时设置rds skuhandler 2019-12-08 12:42:51 +08:00
屈轩
48681849b5 fix: 避免普通用户添加规则到系统安全组 (#4036) 2019-12-08 01:50:57 +08:00
wanyaoqi
6cdb2cd12a region misc bugfix (#4048)
- fix capabilities filter disabled account
- fix kvm guest start no logevent
- fix guest restart not set guest status immediately
2019-12-08 01:47:12 +08:00
屈轩
98c9e82f60 fix: 返回region external_id (#4042) 2019-12-08 01:46:54 +08:00
Yousong Zhou
e905226b5e Merge pull request #4030 from tb365/automated-cherry-pick-of-#4028-upstream-release-2.13
Automated cherry pick of #4028: huawei reset password bugfix
2019-12-06 20:58:29 +08:00
Yousong Zhou
1a7ee1bfba Merge pull request #4033 from tb365/automated-cherry-pick-of-#4032-upstream-release-2.13
Automated cherry pick of #4032: image upload bugfix
2019-12-06 20:18:16 +08:00
Qu Xuan
c2a547c522 fix: cloudevent过滤及详情信息 2019-12-06 17:37:47 +08:00
郑雨
c2ca54a1ae feat(region): Support for resuming vm suspended in vmware 2019-12-06 16:38:31 +08:00
Yousong Zhou
1394187742 Merge pull request #4003 from rainzm/automated-cherry-pick-of-#4002-upstream-release-2.13
Automated cherry pick of #4002: fix(region): The param of list instancegroup filter by Guest is 'server'
2019-12-06 12:14:21 +08:00
Yousong Zhou
eff6c42a67 Merge pull request #4031 from ioito/automated-cherry-pick-of-#3988-upstream-release-2.13
Automated cherry pick of #3988: fix: 结构化network create list 参数
2019-12-06 12:13:39 +08:00
郑雨
e218ee3b12 fix(region): The param of list instancegroup filter by Guest is 'server' 2019-12-06 10:50:03 +08:00
TangBin
6298a76035 image upload bugfix 2019-12-06 10:06:55 +08:00
wanyaoqi
96894a0e7c add socket used check of deploy server (#4022) 2019-12-05 16:49:14 +08:00
屈轩
e3b0dcce79 fix: 标签添加排序,不统计回收站的资源标签 (#3993) 2019-12-05 16:48:51 +08:00
tb365
3718641068 Automated cherry pick of #3985: ctyun sync (#3987)
* ctyun sync

* comment fix
2019-12-05 16:47:40 +08:00
Qu Xuan
76d3f4ee69 fix: 结构化network create list 参数 2019-12-05 15:22:27 +08:00
TangBin
771b603c7b add elastic cache skus capability api 2019-12-05 11:22:22 +08:00
TangBin
6f4b0802e6 elastic cache task bugfix 2019-12-05 11:22:22 +08:00
TangBin
94402436b4 huawei reset password bugfix 2019-12-05 11:22:22 +08:00
Yousong Zhou
0576b8fab1 Merge pull request #4000 from tb365/automated-cherry-pick-of-#3999-upstream-release-2.13
Automated cherry pick of #3999: cloudregion cities filter
2019-12-04 16:30:22 +08:00
Yousong Zhou
1483a44689 Merge pull request #4017 from yousong/automated-cherry-pick-of-#4016-upstream-release-2.13
Automated cherry pick of #4016: hostman: hostinfo: turn off report_ignored_msrs
2019-12-04 15:10:31 +08:00
TangBin
64f9ec3859 yunionmeta offline data using gzip files disk billing type error fix 2019-12-04 14:51:24 +08:00
TangBin
240cb31ba3 cloudregion cities filter 2019-12-04 14:51:24 +08:00
Yousong Zhou
602d1ec4c1 Merge pull request #4015 from swordqiu/automated-cherry-pick-of-#4013-upstream-release-2.13
Automated cherry pick of #4013: fix: network-addresses add created_at column
2019-12-04 10:58:18 +08:00
Yousong Zhou
7129c46789 Merge pull request #4012 from zhaoxiangchun/automated-cherry-pick-of-#4007-upstream-release-2.13
Automated cherry pick of #4007: 更改aliyun和huawei的获取监控信息的参数单位:微秒=>毫秒
2019-12-04 10:58:09 +08:00
Yousong Zhou
c22780a020 Merge pull request #4010 from ioito/automated-cherry-pick-of-#4009-upstream-release-2.13
Automated cherry pick of #4009: fix: 未设置密码时,使用随机密码
2019-12-04 10:48:14 +08:00
Yousong Zhou
653de43d3f Merge pull request #4005 from ioito/automated-cherry-pick-of-#4004-upstream-release-2.13
Automated cherry pick of #4004: fix: 忽略名称条件,只要cpu,mem一致就不再同步
2019-12-04 10:47:54 +08:00
Yousong Zhou
4b36eedff5 Merge pull request #3995 from ioito/automated-cherry-pick-of-#3994-upstream-release-2.13
Automated cherry pick of #3994: fix: 避免每次重启region同步rds sku, 避免新加公有云账号未能及时同步sku问题
2019-12-04 10:47:42 +08:00
Yousong Zhou
51612e3288 Merge pull request #3982 from yousong/automated-cherry-pick-of-#3978-upstream-release-2.13
Automated cherry pick of #3978: cloudnet: fix validating "action"
2019-12-04 10:47:34 +08:00
Yousong Zhou
0aacf04bb0 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:22:43 +00:00
Qiu Jian
fff22188f3 fix: network-addresses add created_at column 2019-12-04 10:06:26 +08:00
zhaoxiangchun
baaccf7846 更改aliyun和huawei的获取监控信息的参数单位:微秒=>毫秒 2019-12-03 20:07:47 +08:00
Qu Xuan
a8bb9e4b03 fix: 未设置密码时,使用随机密码 2019-12-03 19:18:53 +08:00
Qu Xuan
0b478b9881 fix: 忽略名称条件,只要cpu,mem一致就不再同步 2019-12-03 16:29:19 +08:00
Zexi Li
efad765d4f Merge pull request #3990 from ioito/automated-cherry-pick-of-#3989-upstream-release-2.13
Automated cherry pick of #3989: fix: avoid index out of range
2019-12-02 21:34:17 +08:00
Qu Xuan
fa6d8ca384 fix: 避免每次重启region同步rds sku, 避免新加公有云账号未能及时同步sku问题 2019-12-02 17:54:34 +08:00
Zexi Li
4c67224b27 Merge pull request #3983 from rainzm/automated-cherry-pick-of-#3979-upstream-release-2.13
Automated cherry pick of #3979: feat(region): Add suspend feature for vmware guest
2019-12-02 10:35:19 +08:00
Qu Xuan
fdca02cb2f fix: avoid index out of range 2019-12-02 10:23:49 +08:00
郑雨
de754c3c9b feat(region): Add suspend feature for vmware guest 2019-11-29 16:10:57 +08:00
Yousong Zhou
4d1ae243e8 cloudnet: return non-nil data on validata create data pass 2019-11-29 08:02:31 +00:00
Yousong Zhou
f6afbab10c climc: cloudnet: fix passing invalid port on creating rules 2019-11-29 08:02:31 +00:00
Yousong Zhou
eaa22bb965 cloudnet: fix validating "action" 2019-11-29 08:02:31 +00:00
Zexi Li
78766f7a6f Merge pull request #3975 from zhasm/automated-cherry-pick-of-#3974-upstream-release-2.13
Automated cherry pick of #3974: 在删除 Devtool Template 之前检测是否存在关联的 cronjob; 如有则不允许删除
2019-11-29 15:18:38 +08:00
Zexi Li
c9d7f1a89b Merge pull request #3977 from zexi/automated-cherry-pick-of-#3976-upstream-release-2.13
Automated cherry pick of #3976: generated: model replace jsonutils member to interface
2019-11-29 14:56:03 +08:00
Zexi Li
73a892abf4 generated: model replace jsonutils member to interface 2019-11-29 14:55:25 +08:00
Zhang Dongliang
7d9aea7ab3 在删除 Devtool Template 之前检测是否存在关联的 cronjob; 如有则不允许删除 2019-11-29 14:17:05 +08:00
yunion-ci-robot
9296c03cb0 Merge pull request #3972 from rainzm/automated-cherry-pick-of-#3932-upstream-release-2.13
Automated cherry pick of #3932: fix(notify): Check input parameters and return when error occury
2019-11-29 11:49:30 +08:00
郑雨
880249c533 fix(notify): Check input parameters and return when error occury 2019-11-29 11:16:27 +08:00
Zexi Li
79e67b97e0 Merge pull request #3968 from zexi/automated-cherry-pick-of-#3966-upstream-release-2.13
Automated cherry pick of #3966: add list input and rewrite codegen use python
2019-11-29 10:38:10 +08:00
Zexi Li
7fc73a6a74 add list input and rewrite codegen use python 2019-11-29 10:18:58 +08:00
yunion-ci-robot
f3ef3c76ee Merge pull request #3967 from ioito/automated-cherry-pick-of-#3963-upstream-release-2.13
Automated cherry pick of #3963: hotfix: 添加标签资源列表接口
2019-11-28 19:46:29 +08:00
Qu Xuan
e068e895b1 hotfix: 添加标签资源列表接口 2019-11-28 18:45:19 +08:00
yunion-ci-robot
f9ef8fb861 Merge pull request #3964 from ioito/automated-cherry-pick-of-#3957-upstream-release-2.13
Automated cherry pick of #3957: fix: 修复rds普通后台下账号权限问题
2019-11-28 18:21:30 +08:00
Qu Xuan
f2d9bb50f8 fix: 修复rds普通后台下账号权限问题 2019-11-28 17:37:45 +08:00
yunion-ci-robot
e88cb216e1 Merge pull request #3959 from wanyaoqi/automated-cherry-pick-of-#3958-upstream-release-2.13
Automated cherry pick of #3958: add lock on host detected offline
2019-11-28 14:15:31 +08:00
wanyaoqi
2eb6ec5e5e add lock on host detected offline 2019-11-28 11:22:13 +08:00
yunion-ci-robot
5c93c55ebe Merge pull request #3853 from zhasm/automated-cherry-pick-of-#3851-upstream-release-2.13
Automated cherry pick of #3851: 新增 devtool cron manager,用来管理Ansibleserver 的定时任务
2019-11-28 10:14:28 +08:00
yunion-ci-robot
81c03f123d Merge pull request #3955 from ioito/automated-cherry-pick-of-#3939-upstream-release-2.13
Automated cherry pick of #3939: fix: 避免解绑eip后可以立即syncstatus操作导致同步eip出现问题
2019-11-27 22:11:28 +08:00
yunion-ci-robot
725d831203 Merge pull request #3954 from ioito/automated-cherry-pick-of-#3943-upstream-release-2.13
Automated cherry pick of #3943: fix: remove rds accout,database tenant attr
2019-11-27 21:25:28 +08:00
yunion-ci-robot
01e20ce277 Merge pull request #3934 from ioito/automated-cherry-pick-of-#3933-upstream-release-2.13
Automated cherry pick of #3933: fix: 抽离disable delete,避免删除账号失败
2019-11-27 21:06:28 +08:00
yunion-ci-robot
52812836ab Merge pull request #3948 from wanyaoqi/automated-cherry-pick-of-#3922-upstream-release-2.13
Automated cherry pick of #3922: snapshot show storage type
2019-11-27 21:00:28 +08:00
yunion-ci-robot
9482bc0a64 Merge pull request #3941 from tb365/automated-cherry-pick-of-#3940-upstream-release-2.13
Automated cherry pick of #3940: 修复不支持redis的公有云账号会频繁读取oss数据的问题
2019-11-27 20:56:29 +08:00
Qu Xuan
8c806a95e1 fix: 避免解绑eip后可以立即syncstatus操作导致同步eip出现问题 2019-11-27 20:52:17 +08:00
Zexi Li
8a3173cbd7 Merge pull request #3952 from swordqiu/automated-cherry-pick-of-#3950-upstream-release-2.13
Automated cherry pick of #3950: fix: 1. service-config not support key=value pair 2. sync_purge_removed_resources not working
2019-11-27 20:52:04 +08:00
Qu Xuan
cd8b984374 fix: remove rds accout,database tenant attr 2019-11-27 20:50:54 +08:00
yunion-ci-robot
38eb0b0a5e Merge pull request #3945 from wanyaoqi/automated-cherry-pick-of-#3944-upstream-release-2.13
Automated cherry pick of #3944: fix image set chksum
2019-11-27 20:48:34 +08:00
Qiu Jian
95d71ffa42 fix: 1. service-config not support key=value pair 2. sync_purge_removed_resources not working 2019-11-27 20:44:16 +08:00
Qu Xuan
097137d573 fix: 抽离disable delete,避免删除账号失败 2019-11-27 20:32:02 +08:00
Zexi Li
675d4524b8 Merge pull request #3938 from swordqiu/automated-cherry-pick-of-#3936-upstream-release-2.13
Automated cherry pick of #3936: fix: cloud account may not be visible temporarily after create
2019-11-27 20:25:57 +08:00
TangBin
07f2ff6260 elastic cache owner 2019-11-27 19:32:47 +08:00
TangBin
41c00f235c validate prepaid resource delete condition 2019-11-27 19:32:47 +08:00
TangBin
4593aa48bf 修复不支持redis的公有云账号会频繁读取oss数据的问题 2019-11-27 19:32:47 +08:00
wanyaoqi
2c6b85f57f snapshot show storage type 2019-11-27 19:16:46 +08:00
wanyaoqi
db373dbf5f fix image set chksum 2019-11-27 18:26:42 +08:00
yunion-ci-robot
d4f91f35a0 Merge pull request #3917 from swordqiu/automated-cherry-pick-of-#3915-upstream-release-2.13
Automated cherry pick of #3915: feature: metric data collector for aliyun&huawei
2019-11-27 17:47:28 +08:00
Zexi Li
1c6206d1b3 fix caller input nil panic 2019-11-27 17:13:53 +08:00
Zhang Dongliang
475f752067 rm unused re code 2019-11-27 17:13:53 +08:00
Zhang Dongliang
17b4f46f4c 新增 devtool cron manager,用来管理Ansibleserver 的定时任务 2019-11-27 17:13:53 +08:00
Qiu Jian
8b90e84f98 fix: cloud account may not be visible temporarily after create 2019-11-27 16:23:50 +08:00
Zexi Li
831c1b737f Merge pull request #3931 from zexi/automated-cherry-pick-of-#3930-upstream-release-2.13
Automated cherry pick of #3930: fix caller input nil panic
2019-11-27 15:07:44 +08:00
Zexi Li
bcdac6216e fix caller input nil panic 2019-11-27 15:08:09 +08:00
Zexi Li
743f65a2fe Merge pull request #3929 from zexi/automated-cherry-pick-of-#3928-upstream-release-2.13
Automated cherry pick of #3928: fix caller parameters missing
2019-11-27 14:08:15 +08:00
Zexi Li
7f20fe4c06 fix caller parameters missing 2019-11-27 14:08:37 +08:00
Zexi Li
8454e8c8bc Merge pull request #3927 from ioito/automated-cherry-pick-of-#3926-upstream-release-2.13
Automated cherry pick of #3926: fix: stack overflow
2019-11-27 13:47:51 +08:00
Qu Xuan
daf8f96839 fix: stack overflow 2019-11-27 13:44:59 +08:00
yunion-ci-robot
eadbec7427 Merge pull request #3919 from ioito/automated-cherry-pick-of-#3847-upstream-release-2.13
Automated cherry pick of #3847: add: gcp cloud support
2019-11-27 12:04:28 +08:00
yunion-ci-robot
ac75cc040a Merge pull request #3918 from zexi/automated-cherry-pick-of-#3843-upstream-release-2.13
Automated cherry pick of #3843: support generate
2019-11-27 12:01:27 +08:00
Qu Xuan
d7484a9078 add: gcp cloud support 2019-11-27 11:23:25 +08:00
yunion-ci-robot
73b2bf9c50 Merge pull request #3921 from ioito/automated-cherry-pick-of-#3461-upstream-release-2.13
Automated cherry pick of #3461: hotfix: 参数校验使用结构体传参
2019-11-27 11:22:27 +08:00
Qu Xuan
830641b0e9 hotfix: 参数校验使用结构体传参 2019-11-27 11:13:41 +08:00
yunion-ci-robot
8eece2a22c Merge pull request #3920 from ioito/automated-cherry-pick-of-#3801-upstream-release-2.13
Automated cherry pick of #3801: fix: remove duplicate interface and function
2019-11-27 11:02:28 +08:00
Qu Xuan
42a3f70073 fix: remove duplicate interface and function 2019-11-27 10:52:57 +08:00
Zexi Li
cfa6fc4cfe support generate 2019-11-27 10:20:51 +08:00
yunion-ci-robot
ec97345c31 Merge pull request #3908 from ioito/automated-cherry-pick-of-#3907-upstream-release-2.13
Automated cherry pick of #3907: fix: rds创建账号所属项目跟随rds实例
2019-11-27 09:10:27 +08:00
yunion-ci-robot
d950fb038d Merge pull request #3901 from tb365/automated-cherry-pick-of-#3897-upstream-release-2.13
Automated cherry pick of #3897: huawei disk detach bugfix
2019-11-27 09:05:28 +08:00
yunion-ci-robot
39c670bed3 Merge pull request #3911 from ioito/automated-cherry-pick-of-#3910-upstream-release-2.13
Automated cherry pick of #3910: fix: 避免有,Azure更新安全组规则出错
2019-11-27 08:58:27 +08:00
Qiu Jian
e58ffa2c6e feature: metric data collector for aliyun&huawei 2019-11-27 08:57:04 +08:00
yunion-ci-robot
1846988499 Merge pull request #3903 from ioito/automated-cherry-pick-of-#3902-upstream-release-2.13
Automated cherry pick of #3902: fix: 普通后台也返回cloudregion_id信息
2019-11-27 08:55:28 +08:00
Qu Xuan
999996ab67 fix: 避免有,Azure更新安全组规则出错 2019-11-26 20:51:08 +08:00
Qu Xuan
7150b3f46c fix: rds创建账号所属项目跟随rds实例 2019-11-26 20:38:43 +08:00
Qu Xuan
c82b4d0c4d fix: 普通后台也返回cloudregion_id信息 2019-11-26 19:12:31 +08:00
Zexi Li
2e6189e09e Merge pull request #3894 from swordqiu/automated-cherry-pick-of-#3892-upstream-release-2.13
Automated cherry pick of #3892: fix: baremetal restart fail after deployment
2019-11-26 17:45:54 +08:00
Zexi Li
0a97dd7112 Merge pull request #3886 from swordqiu/automated-cherry-pick-of-#3884-upstream-release-2.13
Automated cherry pick of #3884: fix: error in service config format cause service halt
2019-11-26 15:45:42 +08:00
yunion-ci-robot
1c69b5a349 Merge pull request #3877 from wanyaoqi/automated-cherry-pick-of-#3876-upstream-release-2.13
Automated cherry pick of #3876: misc fix
2019-11-26 13:39:27 +08:00
yunion-ci-robot
37654d0307 Merge pull request #3874 from ioito/automated-cherry-pick-of-#3873-upstream-release-2.13
Automated cherry pick of #3873: fix: 修复rds重置密码未正确接收参数问题
2019-11-26 13:33:27 +08:00
TangBin
e953e81017 huawei disk detach bugfix 2019-11-26 11:42:19 +08:00
Qiu Jian
595ca416e9 fix: error in service config format cause service halt 2019-11-26 02:57:17 +08:00
Qiu Jian
976456fb40 fix: baremetal restart fail after deployment 2019-11-26 02:44:08 +08:00
Zexi Li
4eceed308c Merge pull request #3891 from swordqiu/automated-cherry-pick-of-#3887-upstream-release-2.13
Automated cherry pick of #3887: fix: host-add-netif requires index
2019-11-26 00:45:00 +08:00
Zexi Li
3d37d97bf7 Merge pull request #3881 from swordqiu/automated-cherry-pick-of-#3879-upstream-release-2.13
Automated cherry pick of #3879: fix: keystone project resource count not set set to zero
2019-11-26 00:41:33 +08:00
Qiu Jian
7ec00235c7 fix: host-add-netif requires index 2019-11-25 23:48:14 +08:00
Qiu Jian
9457994332 fix: keystone project resource count not set set to zero 2019-11-25 22:33:15 +08:00
wanyaoqi
cce697ec76 misc fix
- image list filter by uefi
- fix instance sanpshot delete
- guest clean expire server exclude pending deleted servers
- host register abort on network not match
2019-11-25 21:26:54 +08:00
Qu Xuan
81a819117c fix: 修复rds重置密码未正确接收参数问题 2019-11-25 19:19:15 +08:00
yunion-ci-robot
814b1f4ac6 Merge pull request #3869 from ioito/automated-cherry-pick-of-#3868-upstream-release-2.13
Automated cherry pick of #3868: fix: 避免openstack重装系统,过不了镜像系统盘大小校验
2019-11-25 17:20:26 +08:00
Qu Xuan
afc88419c3 fix: 避免openstack重装系统,过不了镜像系统盘大小校验 2019-11-25 15:01:27 +08:00
yunion-ci-robot
7a67432b47 Merge pull request #3864 from zexi/automated-cherry-pick-of-#3863-upstream-release-2.13
Automated cherry pick of #3863: baremetal: fix init baremetals fatal exit
2019-11-25 10:22:27 +08:00
Zexi Li
ab3556a6d2 baremetal: fix init baremetals fatal exit 2019-11-25 09:39:54 +08:00
yunion-ci-robot
57eabfe429 Merge pull request #3862 from swordqiu/automated-cherry-pick-of-#3861-upstream-release-2.13
Automated cherry pick of #3861: update vendor
2019-11-22 22:22:24 +08:00
yunion-ci-robot
ae5658ca2b Merge pull request #3839 from tb365/automated-cherry-pick-of-#3837-upstream-release-2.13
Automated cherry pick of #3837: redis prepaid instance create bugfix
2019-11-22 22:17:28 +08:00
yunion-ci-robot
ff2e839fd6 Merge pull request #3858 from ioito/automated-cherry-pick-of-#3857-upstream-release-2.13
Automated cherry pick of #3857: fix: 避免旧密码覆盖新重置的密码
2019-11-22 21:53:26 +08:00
Qiu Jian
2409fa30bc update vendor 2019-11-22 21:46:39 +08:00
Qu Xuan
6e5574d5d3 fix: 避免旧密码覆盖新重置的密码 2019-11-22 20:46:10 +08:00
TangBin
a08aab1a83 redis prepaid instance create bugfix 2019-11-22 19:04:13 +08:00
yunion-ci-robot
627df99f99 Merge pull request #3841 from wanyaoqi/automated-cherry-pick-of-#3840-upstream-release-2.13
Automated cherry pick of #3840: instance snapshot bugfix
2019-11-22 18:58:25 +08:00
Zexi Li
f3c71765b6 Merge pull request #3856 from swordqiu/automated-cherry-pick-of-#3854-upstream-release-2.13
Automated cherry pick of #3854: fix: cloud-region filter by domain not support share_mode
2019-11-22 18:05:36 +08:00
Zexi Li
2e3023f82d Merge pull request #3850 from swordqiu/automated-cherry-pick-of-#3848-upstream-release-2.13
Automated cherry pick of #3848: fix: user join read-only group response timeout
2019-11-22 18:04:30 +08:00
Qiu Jian
4e6e8ee79a fix: cloud-region filter by domain not support share_mode 2019-11-22 17:46:34 +08:00
Qiu Jian
c755471cce fix: user join read-only group response timeout 2019-11-22 16:19:27 +08:00
Zexi Li
2ecabd9bde Merge pull request #3846 from rainzm/automated-cherry-pick-of-#3844-upstream-release-2.13
Automated cherry pick of #3844: fix(region): Fix the panic of nil map when syncing snapshotpolicy
2019-11-22 11:38:59 +08:00
郑雨
8f166908d1 fix(region): Fix the panic of nil map when syncing snapshotpolicy 2019-11-22 10:30:26 +08:00
wanyaoqi
3dce48fc46 instance snapshot bugfix 2019-11-21 20:46:18 +08:00
yunion-ci-robot
78177505e2 Merge pull request #3834 from wanyaoqi/automated-cherry-pick-of-#3833-upstream-release-2.13
Automated cherry pick of #3833: host complie error
2019-11-21 18:50:26 +08:00
wanyaoqi
5df9aba9d7 host complie error 2019-11-21 18:41:30 +08:00
Zexi Li
0e4cb3d272 Merge pull request #3825 from wanyaoqi/automated-cherry-pick-of-#3824-upstream-release-2.13
Automated cherry pick of #3824: fix resize disk
2019-11-21 18:22:25 +08:00
yunion-ci-robot
da138e8ec9 Merge pull request #3830 from ioito/automated-cherry-pick-of-#3829-upstream-release-2.13
Automated cherry pick of #3829: fix: 清理aliyun rds多余的包年包月参数转换
2019-11-21 16:24:24 +08:00
yunion-ci-robot
7a79dd62a5 Merge pull request #3818 from tb365/automated-cherry-pick-of-#3813-upstream-release-2.13
Automated cherry pick of #3813: aws upload image bugfix & huawei change default disk type to SAS
2019-11-21 15:39:25 +08:00
yunion-ci-robot
7c352011ce Merge pull request #3821 from swordqiu/automated-cherry-pick-of-#3809-upstream-release-2.13
Automated cherry pick of #3809: feature: add network-status methods to change status of on-premise network
2019-11-21 15:38:23 +08:00
Qu Xuan
83158493bf fix: 清理aliyun rds多余的包年包月参数转换 2019-11-21 14:59:27 +08:00
wanyaoqi
a824dad7cd fix host register 2019-11-21 10:49:11 +08:00
Zexi Li
4deaf1bc07 Merge pull request #3810 from wanyaoqi/automated-cherry-pick-of-#3749-upstream-release-2.13
Automated cherry pick of #3749: hugepage fix
2019-11-21 00:22:52 +08:00
yunion-ci-robot
121ff1f73a Merge pull request #3822 from wanyaoqi/automated-cherry-pick-of-#3798-upstream-release-2.13
Automated cherry pick of #3798: instance snapshot save secgrps
2019-11-21 00:18:23 +08:00
yunion-ci-robot
884b47c1a9 Merge pull request #3820 from rainzm/automated-cherry-pick-of-#3786-upstream-release-2.13
Automated cherry pick of #3786: fix(region): Add public/private feature for Guest Image
2019-11-21 00:04:26 +08:00
yunion-ci-robot
c943fa0c6a Merge pull request #3793 from yousong/automated-cherry-pick-of-#3787-upstream-release-2.13
Automated cherry pick of #3787: networks: 改进创建错误处理
2019-11-20 22:25:23 +08:00
wanyaoqi
87a952e3bc fix resize disk 2019-11-20 22:03:12 +08:00
wanyaoqi
960b876f0d instance snapshot save secgrps 2019-11-20 21:20:00 +08:00
yunion-ci-robot
20db1645d7 Merge pull request #3808 from tb365/automated-cherry-pick-of-#3806-upstream-release-2.13
Automated cherry pick of #3806: redis acl update bugfix
2019-11-20 21:19:23 +08:00
TangBin
1cf36daf3b add elastic cache extra details 2019-11-20 20:03:40 +08:00
TangBin
3fa59c2cc3 vm create bugfix 2019-11-20 20:03:40 +08:00
TangBin
42892dcc0c eip associate bugfix 2019-11-20 20:03:40 +08:00
TangBin
39145006be redis backup restore bugfix 2019-11-20 20:03:40 +08:00
TangBin
ce5bc2e4d0 redis acl update bugfix 2019-11-20 20:03:40 +08:00
郑雨
fe2871c9b9 fix(region): Add public/private feature for Guest Image
Public/private subimages firstly when do public/private for guest image.
Add cmd "guest-image-public" and "guest-image-private".
2019-11-20 19:11:10 +08:00
TangBin
f2fdbec692 aws upload image bugfix & huawei change default disk type to SAS 2019-11-20 19:07:57 +08:00
Qiu Jian
27d205e00b feature: add network-status methods to change status of on-premise network 2019-11-20 19:04:01 +08:00
wanyaoqi
dd6ee059cf hugepage fix 2019-11-20 18:53:12 +08:00
Zexi Li
74a60405c2 Merge pull request #3804 from rainzm/automated-cherry-pick-of-#3802-upstream-release-2.13
Automated cherry pick of #3802: feat(notify): Add interface contacts/users for Notify
2019-11-20 17:55:34 +08:00
Rain
ca3b7b3e8a feat(notify): Add interface contacts/users for Notify
The interface "contacts/users" return the users who has contacts or not.
2019-11-20 17:01:05 +08:00
yunion-ci-robot
88f19a3f73 Merge pull request #3800 from rainzm/automated-cherry-pick-of-#3772-upstream-release-2.13
Automated cherry pick of #3772: refactor(region): Optimization for snapshotpolicy sync
2019-11-20 16:13:24 +08:00
郑雨
68d5e0ab08 refactor(region): Optimization for snapshotpolicy sync
If the number of added cloudsnapshotpolicy more than 5, we do
clustering for all snapshotpolicies and find suitable one from these.
Otherwise, we find suitable one from database everytimes.
2019-11-20 15:11:20 +08:00
Zexi Li
194f6cefd4 Merge pull request #3797 from swordqiu/automated-cherry-pick-of-#3795-upstream-release-2.13
Automated cherry pick of #3795: fix: recover baremetal status after cdrom operations
2019-11-20 14:35:29 +08:00
Qiu Jian
c24108b8a6 fix: recover baremetal status after cdrom operations 2019-11-20 10:13:48 +08:00
Yousong Zhou
5155558cf0 cloudregions: 统一"OneCloud" provider过滤条件 2019-11-20 01:55:53 +00:00
Yousong Zhou
e6d48fda84 networks: 改进创建错误处理 2019-11-20 01:55:53 +00:00
yunion-ci-robot
ee83b205e7 Merge pull request #3789 from yousong/automated-cherry-pick-of-#3788-upstream-release-2.13
Automated cherry pick of #3788: lbagent: pidfile: add PidFile
2019-11-19 23:25:22 +08:00
yunion-ci-robot
de3918ec11 Merge pull request #3782 from yousong/automated-cherry-pick-of-#3778-upstream-release-2.13
Automated cherry pick of #3778: treewide: 避免使用fmt.Print记录日志
2019-11-19 23:17:23 +08:00
Yousong Zhou
5a6bea4916 lbagent: pidfile: remove ReadPidFile() 2019-11-19 12:27:20 +00:00
Yousong Zhou
d03e85de9e lbagent: stop daemons: use agentutils.PidFile 2019-11-19 12:27:20 +00:00
Yousong Zhou
bf6fe91cf7 lbagent: haproxy: use agentutils.PidFile 2019-11-19 12:27:20 +00:00
Yousong Zhou
3330864aaf lbagent: gobetween: use agentutils.PidFile 2019-11-19 12:27:20 +00:00
Yousong Zhou
5e26ac8ab9 lbagent: telegraf: use agentutils.PidFile 2019-11-19 12:27:20 +00:00
Yousong Zhou
7983ad12dc lbagent: keepalived: use agentutils.PidFile 2019-11-19 12:27:20 +00:00
Yousong Zhou
a8444a87ed lbagent: pidfile: add PidFile 2019-11-19 12:27:20 +00:00
yunion-ci-robot
f649590132 Merge pull request #3781 from tb365/automated-cherry-pick-of-#3779-upstream-release-2.13
Automated cherry pick of #3779: redis create bugfix & redis acl create bugfix
2019-11-19 19:44:22 +08:00
Yousong Zhou
39ca790650 vendor: update sqlchemy 2019-11-19 11:24:31 +00:00
Yousong Zhou
f11ff9a40d treewide: 避免使用fmt.Print记录日志 2019-11-19 11:24:31 +00:00
TangBin
b322e6c950 redis create bugfix & redis acl create bugfix 2019-11-19 17:57:47 +08:00
Zexi Li
e2b44b1093 Merge pull request #3774 from ioito/automated-cherry-pick-of-#3773-upstream-release-2.13
Automated cherry pick of #3773: fix: 调整存储容量后刷新调度缓存
2019-11-19 16:10:33 +08:00
Qu Xuan
67f1d7d083 fix: 调整存储容量后刷新调度缓存 2019-11-19 14:34:08 +08:00
yunion-ci-robot
c1e9886c62 Merge pull request #3770 from tb365/automated-cherry-pick-of-#3769-upstream-release-2.13
Automated cherry pick of #3769: elastic cache auth_mode status & password reset bugfix
2019-11-19 12:54:23 +08:00
TangBin
88ccad2624 elastic cache auth_mode status & password reset bugfix 2019-11-19 11:48:16 +08:00
Zexi Li
472213a9f9 Merge pull request #3765 from swordqiu/automated-cherry-pick-of-#3763-upstream-release-2.13
Automated cherry pick of #3763: fix: cloudaccount list duplicate entries due to join with cloudproviders
2019-11-19 10:49:29 +08:00
Zexi Li
2cb854fd32 Merge pull request #3732 from yousong/automated-cherry-pick-of-#3731-upstream-release-2.13
Automated cherry pick of #3731: build: 避免并发构建rpm时触发file exists错误
2019-11-19 10:47:59 +08:00
yunion-ci-robot
3cbf9af9c0 Merge pull request #3768 from zexi/automated-cherry-pick-of-#3766-upstream-release-2.13
Automated cherry pick of #3766: region: host list filter by cdrom_boot
2019-11-19 10:12:22 +08:00
Zexi Li
c1887bbec9 region: host list filter by cdrom_boot 2019-11-19 01:45:18 +08:00
Qiu Jian
b4552dd87a fix: cloudaccount list duplicate entries due to join with cloudproviders 2019-11-18 21:56:47 +08:00
yunion-ci-robot
22d6ddb38a Merge pull request #3761 from wanyaoqi/automated-cherry-pick-of-#3760-upstream-release-2.13
Automated cherry pick of #3760: allow delete standard and shared image
2019-11-18 21:53:22 +08:00
wanyaoqi
f7571ecbae allow delete standard and shared image 2019-11-18 21:16:38 +08:00
yunion-ci-robot
cbdc3e4cfb Merge pull request #3759 from rainzm/automated-cherry-pick-of-#3757-upstream-release-2.13
Automated cherry pick of #3757: fix(region): Cluster automatically when syncing snapshotpolicy
2019-11-18 21:11:22 +08:00
郑雨
b0674cf65c fix(region): Cluster automatically when syncing snapshotpolicy
Fix two bug about listing snapshotpolicycache:
1. no accont info 2. filter error
The func 'Key' of snapshotpolicy generate a Identification for
snapshotpolicy. If the key of cloud snapshotpolicy is same with local
snaphotpolicy, the cloud sp became a cache of this local sp.
2019-11-18 20:54:51 +08:00
yunion-ci-robot
45ba29cb80 Merge pull request #3755 from wanyaoqi/automated-cherry-pick-of-#3754-upstream-release-2.13
Automated cherry pick of #3754: fix login key on clone
2019-11-18 19:44:23 +08:00
yunion-ci-robot
4af17d61a5 Merge pull request #3723 from tb365/automated-cherry-pick-of-#3721-upstream-release-2.13
Automated cherry pick of #3721: add elastic cache sku default policy
2019-11-18 19:43:24 +08:00
yunion-ci-robot
aeff331773 Merge pull request #3752 from swordqiu/automated-cherry-pick-of-#3750-upstream-release-2.13
Automated cherry pick of #3750: fix: quick fix user password verification failure
2019-11-18 19:41:25 +08:00
yunion-ci-robot
3aa9a0ddf3 Merge pull request #3715 from tb365/automated-cherry-pick-of-#3711-upstream-release-2.13
Automated cherry pick of #3711: create vm attach eip fix
2019-11-18 19:38:24 +08:00
wanyaoqi
121a1b1d20 fix login key on clone 2019-11-18 19:23:50 +08:00
yunion-ci-robot
ccd9ab1fbd Merge pull request #3692 from tb365/automated-cherry-pick-of-#3690-upstream-release-2.13
Automated cherry pick of #3690: remove useless aws instance type config
2019-11-18 19:23:22 +08:00
yunion-ci-robot
662ca533ed Merge pull request #3713 from ioito/automated-cherry-pick-of-#3712-upstream-release-2.13
Automated cherry pick of #3712: fix: 避免匹配到售罄的套餐
2019-11-18 19:14:25 +08:00
TangBin
81950f0eb9 create vm attach eip fix 2019-11-18 17:44:23 +08:00
TangBin
760b18cb48 huawei elastic change spec bugfix 2019-11-18 17:32:51 +08:00
TangBin
4939849cf9 add elastic cache sku default policy 2019-11-18 17:32:51 +08:00
Qiu Jian
de3cf85957 fix: quick fix user password verification failure 2019-11-18 17:01:42 +08:00
yunion-ci-robot
aca5c46a8c Merge pull request #3748 from rainzm/automated-cherry-pick-of-#3746-upstream-release-2.13
Automated cherry pick of #3746: fix(region): Set name and status when creating and syncing snapshotpolicycache
2019-11-18 16:15:23 +08:00
郑雨
3e2934e61b fix(region): Set name and status when creating and syncing snapshotpolicycache
That snapshotpolicycaches has same name is ok. Set name and status
directly when creating and syncing snapshotpolicycache.
2019-11-18 15:39:12 +08:00
Zexi Li
e2df7c9307 Merge pull request #3730 from swordqiu/automated-cherry-pick-of-#3728-upstream-release-2.13
Automated cherry pick of #3728: fix: always lock login-failed user when PasswordErrorLockCount not initialized
2019-11-18 15:05:01 +08:00
yunion-ci-robot
a567892605 Merge pull request #3745 from swordqiu/automated-cherry-pick-of-#3743-upstream-release-2.13
Automated cherry pick of #3743: fix: filter out expire user passwords
2019-11-18 14:51:22 +08:00
Qiu Jian
1f3dedf4b5 fix: filter out expire user passwords 2019-11-18 14:34:10 +08:00
yunion-ci-robot
ecaffe2295 Merge pull request #3742 from rainzm/automated-cherry-pick-of-#3739-upstream-release-2.13
Automated cherry pick of #3739: fix(region): Fix the return value when sycning snapshotpolicy
2019-11-18 14:31:25 +08:00
yunion-ci-robot
379911fd07 Merge pull request #3648 from wanyaoqi/automated-cherry-pick-of-#3594-upstream-release-2.13
Automated cherry pick of #3594: host arm support
2019-11-18 14:09:23 +08:00
郑雨
ecec6b0417 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:51:21 +08:00
yunion-ci-robot
e3ca0ffdce Merge pull request #3738 from rainzm/automated-cherry-pick-of-#3736-upstream-release-2.13
Automated cherry pick of #3736: fix(region): Add snapshotpolicycache module for yunionapi
2019-11-18 12:46:24 +08:00
郑雨
2c4069b272 fix(region): Add snapshotpolicycache module for yunionapi
Remove extra 'models.SnapshotPolicyCache' in the first loop in
handlers.go.
Registered the moduels of snapshotpolicycache for yunionapi.
2019-11-18 11:41:02 +08:00
Yousong Zhou
7cf08555df build: 避免并发构建rpm时触发file exists错误 2019-11-18 02:43:37 +00:00
yunion-ci-robot
0ad03159e4 Merge pull request #3701 from ioito/automated-cherry-pick-of-#3700-upstream-release-2.13
Automated cherry pick of #3700: fix: 避免仅返回一个zone信息
2019-11-18 09:18:24 +08:00
Qiu Jian
4a3ecb8371 fix: always lock login-failed user when PasswordErrorLockCount not initialized 2019-11-18 08:53:56 +08:00
Zexi Li
b927ea8db0 Merge pull request #3727 from swordqiu/automated-cherry-pick-of-#3724-upstream-release-2.13
Automated cherry pick of #3724: update vendor for qcloud cos-go-sdk
2019-11-18 00:36:23 +08:00
yunion-ci-robot
8ebf6bfe30 Merge pull request #3680 from swordqiu/automated-cherry-pick-of-#3679-upstream-release-2.13
Automated cherry pick of #3679: feature: cloud account share_mode support
2019-11-18 00:35:22 +08:00
Qiu Jian
663616c518 update vendor for qcloud cos-go-sdk 2019-11-16 15:25:32 +08:00
yunion-ci-robot
91d8ba9355 Merge pull request #3717 from ioito/automated-cherry-pick-of-#3699-upstream-release-2.13
Automated cherry pick of #3699: fix: cpuCmtbound sync for zstack
2019-11-15 20:23:21 +08:00
Qu Xuan
77fdcd17d5 fix: cpuCmtbound sync for zstack 2019-11-15 19:07:36 +08:00
yunion-ci-robot
0cb3308f81 Merge pull request #3710 from ioito/automated-cherry-pick-of-#3669-upstream-release-2.13
Automated cherry pick of #3669: fix: 安全组列表添加server过滤参数
2019-11-15 18:41:22 +08:00
Zexi Li
b2f7b321ce Merge pull request #3698 from swordqiu/automated-cherry-pick-of-#3696-upstream-release-2.13
Automated cherry pick of #3696: fix: network-delete may fail immidiately after deleting vm
2019-11-15 18:41:12 +08:00
Qu Xuan
3dc6cca493 fix: 避免匹配到售罄的套餐 2019-11-15 17:52:09 +08:00
yunion-ci-robot
94608fcb42 Merge pull request #3707 from ioito/automated-cherry-pick-of-#3593-upstream-release-2.13
Automated cherry pick of #3593: fix: 避免公有云绑定秘钥后解密密码为空
2019-11-15 17:18:21 +08:00
Qu Xuan
13631a8c53 fix: 安全组列表添加server过滤参数 2019-11-15 16:55:26 +08:00
yunion-ci-robot
ec7f3308a2 Merge pull request #3672 from tb365/automated-cherry-pick-of-#3670-upstream-release-2.13
Automated cherry pick of #3670: * 修复redis新建无密码及公网访问地址未同步的问题
2019-11-15 16:54:21 +08:00
Qu Xuan
ac8fa280a1 fix: 避免公有云绑定秘钥后解密密码为空 2019-11-15 16:03:15 +08:00
Zexi Li
22201b65f0 Merge pull request #3694 from wanyaoqi/automated-cherry-pick-of-#3693-upstream-release-2.13
Automated cherry pick of #3693: bm register find network
2019-11-15 16:03:01 +08:00
yunion-ci-robot
d11bcc6863 Merge pull request #3688 from tb365/automated-cherry-pick-of-#3687-upstream-release-2.13
Automated cherry pick of #3687: elastic cache purge bugfix
2019-11-15 15:56:21 +08:00
Qiu Jian
42dd5a8de6 feature: cloud account share_mode support 2019-11-15 15:11:15 +08:00
Zexi Li
4c14c4c514 Merge pull request #3704 from zexi/automated-cherry-pick-of-#3703-upstream-release-2.13
Automated cherry pick of #3703: webconsole: skip spice access interval check
2019-11-15 15:07:25 +08:00
Zexi Li
a428188d9c webconsole: skip spice access interval check 2019-11-15 15:06:22 +08:00
Qu Xuan
9a1f90b0cc fix: 避免仅返回一个zone信息 2019-11-15 14:36:31 +08:00
Qiu Jian
adc58a3be0 fix: network-delete may fail immidiately after deleting vm 2019-11-15 12:41:13 +08:00
wanyaoqi
0b1a38da9a bm register find network 2019-11-15 12:08:21 +08:00
TangBin
665f52608b huawei config vm config fix 2019-11-15 11:45:30 +08:00
TangBin
30c8c68959 remove useless aws instance type config 2019-11-15 11:45:30 +08:00
TangBin
775a6a61af elastic cache purge bugfix 2019-11-15 11:38:07 +08:00
TangBin
d6cb216531 * 修复redis新建无密码及公网访问地址未同步的问题 2019-11-15 11:34:24 +08:00
yunion-ci-robot
2247b7111e Merge pull request #3685 from ioito/automated-cherry-pick-of-#3684-upstream-release-2.13
Automated cherry pick of #3684: fix: 避免有些云不能创建default名称安全组
2019-11-15 11:00:19 +08:00
yunion-ci-robot
60ce26c1dd Merge pull request #3683 from swordqiu/automated-cherry-pick-of-#3681-upstream-release-2.13
Automated cherry pick of #3681: fix: baremetal server rebuild root fail to cache image
2019-11-15 10:32:21 +08:00
Qu Xuan
4bb9685a2f fix: 避免有些云不能创建default名称安全组 2019-11-15 10:31:05 +08:00
yunion-ci-robot
1f51836bf9 Merge pull request #3658 from tb365/automated-cherry-pick-of-#3657-upstream-release-2.13
Automated cherry pick of #3657: user-project create api bugfix
2019-11-15 09:35:21 +08:00
Qiu Jian
5830db6f4f fix: baremetal server rebuild root fail to cache image 2019-11-15 02:35:27 +08:00
yunion-ci-robot
d96750c86c Merge pull request #3667 from wanyaoqi/automated-cherry-pick-of-#3666-upstream-release-2.13
Automated cherry pick of #3666: gpu add export keys
2019-11-14 23:57:20 +08:00
yunion-ci-robot
2cff53caca Merge pull request #3674 from ioito/automated-cherry-pick-of-#3673-upstream-release-2.13
Automated cherry pick of #3673: fix: 避免region同名问题
2019-11-14 22:09:20 +08:00
yunion-ci-robot
ba271c64ce Merge pull request #3664 from ioito/automated-cherry-pick-of-#3663-upstream-release-2.13
Automated cherry pick of #3663: fix: aws 安全组desc为必传字段
2019-11-14 22:00:21 +08:00
Qu Xuan
84314bbdbf fix: 避免region同名问题 2019-11-14 18:30:36 +08:00
wanyaoqi
3c7daad157 gpu add export keys 2019-11-14 16:23:11 +08:00
Qu Xuan
1c5afe7743 fix: aws 安全组desc为必传字段 2019-11-14 14:36:50 +08:00
Zexi Li
a77688f243 Merge pull request #3662 from swordqiu/automated-cherry-pick-of-#3660-upstream-release-2.13
Automated cherry pick of #3660: fix: check password complexity even if password length is zero
2019-11-14 13:32:51 +08:00
yunion-ci-robot
36db90f3bb Merge pull request #3656 from swordqiu/automated-cherry-pick-of-#3654-upstream-release-2.13
Automated cherry pick of #3654: fix: send full reason body for *_fail_reason
2019-11-14 12:40:21 +08:00
yunion-ci-robot
8a87d2b366 Merge pull request #3653 from swordqiu/automated-cherry-pick-of-#3649-upstream-release-2.13
Automated cherry pick of #3649: fix: agent-list show zone info
2019-11-14 12:39:20 +08:00
yunion-ci-robot
e16a0210e2 Merge pull request #3646 from wanyaoqi/automated-cherry-pick-of-#3645-upstream-release-2.13
Automated cherry pick of #3645: baremetal register optimize
2019-11-14 12:37:20 +08:00
Qiu Jian
2df33ed471 fix: check password complexity even if password length is zero 2019-11-14 12:03:25 +08:00
TangBin
f571986ab6 user-project create api bugfix 2019-11-14 11:56:01 +08:00
Qiu Jian
2e614d2cea fix: send full reason body for *_fail_reason 2019-11-14 11:35:45 +08:00
wanyaoqi
8437c9ce53 host arm support
- host register
- vm create, delete, vnc ...
2019-11-14 10:51:19 +08:00
yunion-ci-robot
8909d8d1f9 Merge pull request #3627 from wanyaoqi/automated-cherry-pick-of-#3589-upstream-release-2.13
Automated cherry pick of #3589: split brands capabilities
2019-11-14 01:03:22 +08:00
yunion-ci-robot
952fa51087 Merge pull request #3607 from yousong/automated-cherry-pick-of-#3606-upstream-release-2.13
Automated cherry pick of #3606: influxdb: 记录结果中的tags
2019-11-14 00:26:19 +08:00
yunion-ci-robot
4553ee70bb Merge pull request #3637 from ioito/automated-cherry-pick-of-#3636-upstream-release-2.13
Automated cherry pick of #3636: fix: 避免associationtype异常
2019-11-14 00:12:20 +08:00
Qiu Jian
9bdfa178f6 fix: agent-list show zone info 2019-11-13 23:34:08 +08:00
yunion-ci-robot
2d4e97d7f4 Merge pull request #3579 from ioito/automated-cherry-pick-of-#3578-upstream-release-2.13
Automated cherry pick of #3578: fix: 创建数据库时指定账号权限时,避免数据库出现中间状态
2019-11-13 20:32:21 +08:00
wanyaoqi
fafafcedac baremetal register optimize 2019-11-13 20:23:45 +08:00
Qu Xuan
fc55536bbd fix: 避免associationtype异常 2019-11-13 19:56:52 +08:00
yunion-ci-robot
bf063d5c37 Merge pull request #3597 from tb365/automated-cherry-pick-of-#3595-upstream-release-2.13
Automated cherry pick of #3595: elastic cache sync bugfix
2019-11-13 19:48:19 +08:00
yunion-ci-robot
2be0424703 Merge pull request #3632 from ioito/automated-cherry-pick-of-#3631-upstream-release-2.13
Automated cherry pick of #3631: fix: 避免匹配到64导致version是6
2019-11-13 19:46:20 +08:00
yunion-ci-robot
4d394eb3dd Merge pull request #3622 from swordqiu/automated-cherry-pick-of-#3621-upstream-release-2.13
Automated cherry pick of #3621: fix: nic teaming/bonding not working properly
2019-11-13 17:48:20 +08:00
Zexi Li
3197801d00 Merge pull request #3644 from zexi/automated-cherry-pick-of-#3641-upstream-release-2.13
Automated cherry pick of #3641: climc: fix k8s sa not register
2019-11-13 16:50:18 +08:00
Zexi Li
63cb1194c5 climc: fix k8s sa not register 2019-11-13 16:49:24 +08:00
Qu Xuan
e3d69c00f1 fix: 避免匹配到64导致version是6 2019-11-13 14:49:54 +08:00
Zexi Li
53eb2cdb05 Merge pull request #3630 from rainzm/automated-cherry-pick-of-#3628-upstream-release-2.13
Automated cherry pick of #3628: fix(region): Init database table 'guestgroup_tbl'
2019-11-13 11:38:30 +08:00
郑雨
ba89129e82 fix(region): Init database table 'guestgroup_tbl'
That delete models.GroupguestManager in the second loop of InitHandlers
because of useless Groupguest's api cause table 'guestgroup_tbl' will
not init in a new system. So add models.GroupguestManager to the first
loop to accomplish the goal.
2019-11-13 11:34:37 +08:00
wanyaoqi
3f694430a9 split brands capabilities 2019-11-13 11:10:02 +08:00
TangBin
c5103ca6af elastic cache sync bugfix 2019-11-13 11:09:35 +08:00
Yousong Zhou
007400fa65 climc: 添加lblistener{,rule}-backend-status命令 2019-11-13 02:41:42 +00:00
Yousong Zhou
198ef3add0 lblis, lbr: 增加查询后端状态接口 2019-11-13 02:41:42 +00:00
Yousong Zhou
ece60f8379 lbbackends: 使用yunion.io/pkg/errors 2019-11-13 02:41:42 +00:00
Yousong Zhou
6e6626d019 influxdb: 记录结果中的tags 2019-11-13 02:41:42 +00:00
Qu Xuan
ef6ae357c7 fix: 创建数据库时指定账号权限时,避免数据库出现中间状态 2019-11-13 10:22:06 +08:00
yunion-ci-robot
5dcb8fbbb7 Merge pull request #3612 from wanyaoqi/automated-cherry-pick-of-#3611-upstream-release-2.13
Automated cherry pick of #3611: fix resie fs
2019-11-13 01:42:19 +08:00
yunion-ci-robot
0f54f14fb0 Merge pull request #3599 from ioito/automated-cherry-pick-of-#3598-upstream-release-2.13
Automated cherry pick of #3598: fix: 支持创建时指定多个安全组
2019-11-13 01:31:18 +08:00
yunion-ci-robot
27b8773391 Merge pull request #3591 from wanyaoqi/automated-cherry-pick-of-#3577-upstream-release-2.13
Automated cherry pick of #3577: postpaid expire support premise
2019-11-13 01:19:19 +08:00
yunion-ci-robot
ec5970301f Merge pull request #3616 from yousong/automated-cherry-pick-of-#3523-upstream-release-2.13
Automated cherry pick of #3523: lockman: log bug with Errorf
2019-11-13 00:51:19 +08:00
yunion-ci-robot
51df386fd3 Merge pull request #3575 from ioito/automated-cherry-pick-of-#3569-upstream-release-2.13
Automated cherry pick of #3569: fix: avolid duplicate secgroup name error when create secgroup
2019-11-13 00:40:18 +08:00
Qiu Jian
b92a7c2979 fix: nic teaming/bonding not working properly 2019-11-13 00:06:06 +08:00
yunion-ci-robot
a998e71c74 Merge pull request #3581 from ioito/automated-cherry-pick-of-#3501-upstream-release-2.13
Automated cherry pick of #3501: 云上操作日志同步
2019-11-12 23:33:22 +08:00
yunion-ci-robot
7e5aedebe2 Merge pull request #3605 from swordqiu/automated-cherry-pick-of-#3603-upstream-release-2.13
Automated cherry pick of #3603: fix: create baremetal server with iso, baremetal register support redfish
2019-11-12 21:44:26 +08:00
yunion-ci-robot
067532d78e Merge pull request #3583 from ioito/automated-cherry-pick-of-#3582-upstream-release-2.13
Automated cherry pick of #3582: fix: 避免Openstack越过存储检查
2019-11-12 21:43:33 +08:00
Yousong Zhou
9a6054819a vendor: restore a few files to locally managed version 2019-11-12 13:25:14 +00:00
Yousong Zhou
7708ee1536 vendor: update 2019-11-12 13:25:14 +00:00
Yousong Zhou
d8bbf372c5 lockman: test multiple lockman 2019-11-12 13:25:14 +00:00
Yousong Zhou
99e2d93373 cloudcommon: options: new options for etcd lockman 2019-11-12 13:25:14 +00:00
Yousong Zhou
71feb3d0e3 lockman: distributed lockman with etcd 2019-11-12 13:25:13 +00:00
Yousong Zhou
bb980c1860 lockman: log bug with Errorf 2019-11-12 13:25:13 +00:00
wanyaoqi
832543fe52 fix resie fs 2019-11-12 21:06:45 +08:00
Qiu Jian
36d596b038 fix: create baremetal server with iso, baremetal register support redfish 2019-11-12 20:17:04 +08:00
Qu Xuan
6a2d074823 fix: 支持创建时指定多个安全组 2019-11-12 20:01:59 +08:00
Zexi Li
cecf95011d Merge pull request #3588 from rainzm/automated-cherry-pick-of-#3576-upstream-release-2.13
Automated cherry pick of #3576: fix(region): Check if group and guest belong to same project
2019-11-12 17:48:10 +08:00
wanyaoqi
720d258e40 postpaid expire support premise 2019-11-12 17:25:06 +08:00
郑雨
c7dd31807f fix(region): Check if group and guest belong to same project
If group and guest belong to different projects, return httperrors.ForbiddenError.
Fix the bug that disabled instance group can be binded.
2019-11-12 16:42:13 +08:00
Qu Xuan
550269592a fix: 避免Openstack越过存储检查 2019-11-12 15:16:30 +08:00
ioito
64b5fbbb45 云上操作日志同步 2019-11-12 14:59:11 +08:00
yunion-ci-robot
3bf464506e Merge pull request #3573 from swordqiu/automated-cherry-pick-of-#3559-upstream-release-2.13
Automated cherry pick of #3559: fix: recode error handling to make conform with error handling standard
2019-11-12 13:28:19 +08:00
Qu Xuan
5379b1de8a fix: avolid duplicate secgroup name error when create secgroup 2019-11-12 10:13:52 +08:00
Qiu Jian
f01722e960 update vendor 2019-11-12 01:24:42 +08:00
Qiu Jian
24fa32cd69 fix: recode error handling to make conform with error handling standard 2019-11-12 01:24:42 +08:00
1614 changed files with 140705 additions and 18950 deletions

1
.gitignore vendored
View File

@@ -33,3 +33,4 @@ _output
GPATH
GRTAGS
GTAGS
pkg/generated

View File

@@ -182,7 +182,6 @@ dep:
mod:
go get $(patsubst %,%@master,$(shell GO111MODULE=on go mod edit -print | sed -n -e 's|.*\(yunion.io/x/[a-z].*\) v.*|\1|p'))
go get github.com/Azure/azure-sdk-for-go@latest
go mod tidy
go mod vendor -v
@@ -233,3 +232,21 @@ endef
help: export helpText:=$(helpText)
help:
@echo "$$helpText"
gen-model-api-check:
which model-api-gen || (GO111MODULE=off go get -u yunion.io/x/code-generator/cmd/model-api-gen)
gen-model-api: gen-model-api-check
./scripts/codegen.py model-api
gen-swagger-check:
which swagger || (GO111MODULE=off go get -u github.com/go-swagger/go-swagger/cmd/swagger)
which swagger-gen || (GO111MODULE=off go get -u yunion.io/x/code-generator/cmd/swagger-gen)
which swagger-serve || (GO111MODULE=off go get -u yunion.io/x/code-generator/cmd/swagger-serve)
gen-swagger: gen-swagger-check
./scripts/codegen.py swagger-code
./scripts/codegen.py swagger-yaml
swagger-serve: gen-swagger
./scripts/codegen.py swagger-serve

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/cloudevent/vars Normal file
View File

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

1
build/devtool/vars Normal file
View File

@@ -0,0 +1 @@
DESCRIPTION="Yunion DevTools Server"

File diff suppressed because one or more lines are too long

View File

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

View File

@@ -0,0 +1,44 @@
// 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/onecloud/pkg/mcclient"
"yunion.io/x/onecloud/pkg/mcclient/modules"
"yunion.io/x/onecloud/pkg/mcclient/options"
)
func init() {
type AssociatedBillListOptions struct {
options.BaseListOptions
StartDay int `help:"time range of the associated bills, example: 20060102" required:"true"`
EndDay int `help:"time range of the associated bills, example: 20060102" required:"true"`
ResourceId string `help:"resource id"`
}
R(&AssociatedBillListOptions{}, "associated-bill-list", "List associated bills",
func(s *mcclient.ClientSession, args *AssociatedBillListOptions) error {
params, err := options.ListStructToParams(args)
if err != nil {
return err
}
result, err := modules.AssociatedBills.List(s, params)
if err != nil {
return err
}
printList(result, modules.AssociatedBills.GetColumns(s))
return nil
})
}

View File

@@ -0,0 +1,46 @@
// 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"
"yunion.io/x/onecloud/pkg/mcclient/options"
)
func init() {
type BucketOptionsVerifyOptions struct {
options.BaseListOptions
CloudaccountId string `help:"cloudaccount Id" required:"true"`
BillingReportBucket string `help:"S3 bucket that stores account billing report"`
BillingFilePrefix string `help:"prefix of billing file name"`
BillingBucketAccount string `help:"Id of cloudaccount that can access billing bucket"`
UsageReportBucket string `help:"S3 bucket that stores account usage report"`
UsageFilePrefix string `help:"prefix of usage file name"`
UsageBucketAccount string `help:"Id of cloudaccount that can access usage bucket"`
}
R(&BucketOptionsVerifyOptions{}, "bucket-options-verify", "billing bucket connection test",
func(s *mcclient.ClientSession, args *BucketOptionsVerifyOptions) error {
params := jsonutils.Marshal(args)
result, err := modules.BucketOptions.PerformAction(s, args.CloudaccountId, "verify", params)
if err != nil {
return err
}
printObject(result)
return nil
})
}

View File

@@ -21,10 +21,12 @@ import (
"yunion.io/x/jsonutils"
api "yunion.io/x/onecloud/pkg/apis/compute"
"yunion.io/x/onecloud/pkg/mcclient"
"yunion.io/x/onecloud/pkg/mcclient/modulebase"
"yunion.io/x/onecloud/pkg/mcclient/modules"
"yunion.io/x/onecloud/pkg/mcclient/options"
objectshell "yunion.io/x/onecloud/pkg/multicloud/objectstore"
)
func init() {
@@ -105,9 +107,11 @@ func init() {
})
type BucketListObjectsOptions struct {
ID string `help:"ID or name of bucket" json:"-"`
Prefix string `help:"List objects with prefix"`
Recursive bool `help:"List objects recursively"`
ID string `help:"ID or name of bucket" json:"-"`
Prefix string `help:"List objects with prefix"`
Recursive bool `help:"List objects recursively"`
Limit int `help:"maximal items per request"`
PagingMarker string `help:"paging marker"`
}
R(&BucketListObjectsOptions{}, "bucket-object-list", "List objects in a bucket", func(s *mcclient.ClientSession, args *BucketListObjectsOptions) error {
params, err := options.StructToParams(args)
@@ -119,8 +123,11 @@ func init() {
return err
}
arrays, _ := result.GetArray("objects")
listResult := modulebase.ListResult{Data: arrays}
listResult := modulebase.ListResult{}
err = result.Unmarshal(&listResult)
if err != nil {
return err
}
printList(&listResult, []string{})
return nil
})
@@ -159,9 +166,10 @@ func init() {
Path string `help:"Path to file to upload" required:"true"`
ContentLength int64 `help:"Content lenght (bytes)" default:"-1"`
ContentType string `help:"Content type"`
StorageClass string `help:"storage CLass"`
Acl string `help:"object acl." choices:"private|public-read|public-read-write"`
objectshell.ObjectHeaderOptions
}
R(&BucketUploadObjectsOptions{}, "bucket-object-upload", "Upload an object into a bucket", func(s *mcclient.ClientSession, args *BucketUploadObjectsOptions) error {
var body io.Reader
@@ -187,7 +195,9 @@ func init() {
return fmt.Errorf("required content-length")
}
err := modules.Buckets.Upload(s, args.ID, args.KEY, body, args.ContentLength, args.ContentType, args.StorageClass, args.Acl)
meta := args.ObjectHeaderOptions.Options2Header()
err := modules.Buckets.Upload(s, args.ID, args.KEY, body, args.ContentLength, args.StorageClass, args.Acl, meta)
if err != nil {
return err
}
@@ -290,4 +300,27 @@ func init() {
printObject(result)
return nil
})
type BucketSetMetadataOptions struct {
ID string `help:"ID or name of bucket" json:"-"`
Key []string `help:"Optional object key" json:"key"`
objectshell.ObjectHeaderOptions
}
R(&BucketSetMetadataOptions{}, "bucket-set-metadata", "Set metadata of object", func(s *mcclient.ClientSession, args *BucketSetMetadataOptions) error {
input := api.BucketMetadataInput{}
input.Key = args.Key
input.Metadata = args.ObjectHeaderOptions.Options2Header()
err := input.Validate()
if err != nil {
return err
}
result, err := modules.Buckets.PerformAction(s, args.ID, "metadata", jsonutils.Marshal(input))
if err != nil {
return err
}
printObject(result)
return nil
})
}

View File

@@ -16,14 +16,38 @@ package shell
import (
"fmt"
"io/ioutil"
"yunion.io/x/jsonutils"
api "yunion.io/x/onecloud/pkg/apis/compute"
"yunion.io/x/onecloud/pkg/mcclient"
"yunion.io/x/onecloud/pkg/mcclient/modules"
"yunion.io/x/onecloud/pkg/mcclient/options"
)
func parseGcpCredential(filename string) (jsonutils.JSONObject, error) {
data, err := ioutil.ReadFile(filename)
if err != nil {
return nil, err
}
authParams, err := jsonutils.Parse(data)
if err != nil {
return nil, err
}
ret := jsonutils.NewDict()
for _, k := range []string{
"client_email",
"project_id",
"private_key_id",
"private_key",
} {
v, _ := authParams.Get(k)
ret.Add(v, fmt.Sprintf("gcp_%s", k))
}
return ret, nil
}
func init() {
type CloudaccountListOptions struct {
@@ -86,6 +110,19 @@ func init() {
R(&options.SAliyunCloudAccountCreateOptions{}, "cloud-account-create-aliyun", "Create an Aliyun cloud account", func(s *mcclient.ClientSession, args *options.SAliyunCloudAccountCreateOptions) error {
params := jsonutils.Marshal(args)
params.(*jsonutils.JSONDict).Add(jsonutils.NewString("Aliyun"), "provider")
options := jsonutils.NewDict()
if len(args.OptionsBillingReportBucket) > 0 {
options.Add(jsonutils.NewString(args.OptionsBillingReportBucket), "billing_report_bucket")
}
if len(args.OptionsBillingBucketAccount) > 0 {
options.Add(jsonutils.NewString(args.OptionsBillingBucketAccount), "billing_bucket_account")
}
if len(args.OptionsBillingFilePrefix) > 0 {
options.Add(jsonutils.NewString(args.OptionsBillingFilePrefix), "billing_file_prefix")
}
if options.Size() > 0 {
params.(*jsonutils.JSONDict).Add(options, "options")
}
result, err := modules.Cloudaccounts.Create(s, params)
if err != nil {
return err
@@ -116,12 +153,37 @@ func init() {
return nil
})
R(&options.SGoogleCloudAccountCreateOptions{}, "cloud-account-create-google", "Create a Google cloud account", func(s *mcclient.ClientSession, args *options.SGoogleCloudAccountCreateOptions) error {
params := jsonutils.Marshal(args)
params.(*jsonutils.JSONDict).Add(jsonutils.NewString("Google"), "provider")
authParams, err := parseGcpCredential(args.GoogleJsonFile)
if err != nil {
return err
}
err = jsonutils.Update(params, authParams)
if err != nil {
return err
}
result, err := modules.Cloudaccounts.Create(s, params)
if err != nil {
return err
}
printObject(result)
return nil
})
R(&options.SAWSCloudAccountCreateOptions{}, "cloud-account-create-aws", "Create an AWS cloud account", func(s *mcclient.ClientSession, args *options.SAWSCloudAccountCreateOptions) error {
params := jsonutils.Marshal(args).(*jsonutils.JSONDict)
options := jsonutils.NewDict()
if len(args.OptionsBillingReportBucket) > 0 {
options.Add(jsonutils.NewString(args.OptionsBillingReportBucket), "billing_report_bucket")
}
if len(args.OptionsBillingBucketAccount) > 0 {
options.Add(jsonutils.NewString(args.OptionsBillingBucketAccount), "billing_bucket_account")
}
if len(args.OptionsBillingFilePrefix) > 0 {
options.Add(jsonutils.NewString(args.OptionsBillingFilePrefix), "billing_file_prefix")
}
if options.Size() > 0 {
params.Add(options, "options")
}
@@ -211,6 +273,17 @@ func init() {
return nil
})
R(&options.SCtyunCloudAccountCreateOptions{}, "cloud-account-create-ctyun", "Create a Ctyun cloud account", func(s *mcclient.ClientSession, args *options.SCtyunCloudAccountCreateOptions) error {
params := jsonutils.Marshal(args)
params.(*jsonutils.JSONDict).Add(jsonutils.NewString("Ctyun"), "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"`
@@ -244,6 +317,34 @@ func init() {
if params.Size() == 0 {
return InvalidUpdateError()
}
options := jsonutils.NewDict()
if len(args.OptionsBillingReportBucket) > 0 {
options.Add(jsonutils.NewString(args.OptionsBillingReportBucket), "billing_report_bucket")
}
if len(args.OptionsBillingBucketAccount) > 0 {
options.Add(jsonutils.NewString(args.OptionsBillingBucketAccount), "billing_bucket_account")
}
if len(args.OptionsBillingFilePrefix) > 0 {
options.Add(jsonutils.NewString(args.OptionsBillingFilePrefix), "billing_file_prefix")
}
if options.Size() > 0 {
params.Add(options, "options")
}
removeOptions := make([]string, 0)
if args.RemoveOptionsBillingReportBucket {
removeOptions = append(removeOptions, "billing_report_bucket")
}
if args.RemoveOptionsBillingBucketAccount {
removeOptions = append(removeOptions, "billing_bucket_account")
}
if args.RemoveOptionsBillingFilePrefix {
removeOptions = append(removeOptions, "billing_file_prefix")
}
if len(removeOptions) > 0 {
params.Add(jsonutils.NewStringArray(removeOptions), "remove_options")
}
result, err := modules.Cloudaccounts.Update(s, args.ID, params)
if err != nil {
return err
@@ -301,6 +402,12 @@ func init() {
if len(args.OptionsBillingReportBucket) > 0 {
options.Add(jsonutils.NewString(args.OptionsBillingReportBucket), "billing_report_bucket")
}
if len(args.OptionsBillingBucketAccount) > 0 {
options.Add(jsonutils.NewString(args.OptionsBillingBucketAccount), "billing_bucket_account")
}
if len(args.OptionsBillingFilePrefix) > 0 {
options.Add(jsonutils.NewString(args.OptionsBillingFilePrefix), "billing_file_prefix")
}
if options.Size() > 0 {
params.Add(options, "options")
}
@@ -308,6 +415,12 @@ func init() {
if args.RemoveOptionsBillingReportBucket {
removeOptions = append(removeOptions, "billing_report_bucket")
}
if args.RemoveOptionsBillingBucketAccount {
removeOptions = append(removeOptions, "billing_bucket_account")
}
if args.RemoveOptionsBillingFilePrefix {
removeOptions = append(removeOptions, "billing_file_prefix")
}
if len(removeOptions) > 0 {
params.Add(jsonutils.NewStringArray(removeOptions), "remove_options")
}
@@ -388,6 +501,19 @@ func init() {
return nil
})
R(&options.SCtyunCloudAccountUpdateOptions{}, "cloud-account-update-ctyun", "update a Ctyun cloud account", func(s *mcclient.ClientSession, args *options.SCtyunCloudAccountUpdateOptions) error {
params := jsonutils.Marshal(args).(*jsonutils.JSONDict)
if params.Size() == 0 {
return InvalidUpdateError()
}
result, err := modules.Cloudaccounts.Update(s, args.ID, params)
if err != nil {
return err
}
printObject(result)
return nil
})
type CloudaccountShowOptions struct {
ID string `help:"ID or Name of cloud account"`
}
@@ -572,6 +698,16 @@ func init() {
return nil
})
R(&options.SCtyunCloudAccountUpdateCredentialOptions{}, "cloud-account-update-credential-ctyun", "Update credential of an Ctyun cloud account", func(s *mcclient.ClientSession, args *options.SCtyunCloudAccountUpdateCredentialOptions) error {
params := jsonutils.Marshal(args)
result, err := modules.Cloudaccounts.PerformAction(s, args.ID, "update-credential", params)
if err != nil {
return err
}
printObject(result)
return nil
})
type CloudaccountSyncOptions struct {
ID string `help:"ID or Name of cloud account"`
Force bool `help:"Force sync no matter what"`
@@ -653,4 +789,49 @@ func init() {
printObject(result)
return nil
})
type CloudaccountShareModeOptions struct {
ID string `help:"ID or name of cloud account"`
MODE string `help:"cloud account share mode" choices:"account_domain|system|provider_domain"`
}
R(&CloudaccountShareModeOptions{}, "cloud-account-share-mode", "Set share_mode of a cloud account", func(s *mcclient.ClientSession, args *CloudaccountShareModeOptions) error {
input := api.CloudaccountShareModeInput{}
input.ShareMode = args.MODE
result, err := modules.Cloudaccounts.PerformAction(s, args.ID, "share-mode", jsonutils.Marshal(input))
if err != nil {
return err
}
printObject(result)
return nil
})
type CloudaccountSyncSkusOptions struct {
ID string `help:"ID or Name of cloud account"`
RESOURCE string `help:"Resource of skus" choices:"serversku|elasticcachesku|dbinstance_sku"`
Force bool `help:"Force sync no matter what"`
Provider string `help:"provider to sync"`
Region string `help:"region to sync"`
}
R(&CloudaccountSyncSkusOptions{}, "cloud-account-sync-skus", "Sync skus of a cloud account", func(s *mcclient.ClientSession, args *CloudaccountSyncSkusOptions) error {
params := jsonutils.NewDict()
params.Set("resource", jsonutils.NewString(args.RESOURCE))
if args.Force {
params.Add(jsonutils.JSONTrue, "force")
}
if len(args.Provider) > 0 {
params.Add(jsonutils.NewString(args.Provider), "cloudprovider")
}
if len(args.Region) > 0 {
params.Add(jsonutils.NewString(args.Region), "cloudregion")
}
result, err := modules.Cloudaccounts.PerformAction(s, args.ID, "sync-skus", params)
if err != nil {
return err
}
printObject(result)
return nil
})
}

View File

@@ -0,0 +1,43 @@
// 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/onecloud/pkg/mcclient"
"yunion.io/x/onecloud/pkg/mcclient/modules"
"yunion.io/x/onecloud/pkg/mcclient/options"
)
func init() {
type CloudeventListOptions struct {
options.BaseListOptions
Since string `help:"since time"`
Until string `hlep:"until time"`
}
R(&CloudeventListOptions{}, "cloud-event-list", "List cloud events", func(s *mcclient.ClientSession, opts *CloudeventListOptions) error {
params, err := options.ListStructToParams(opts)
if err != nil {
return err
}
result, err := modules.Cloudevents.List(s, params)
if err != nil {
return err
}
printList(result, modules.Cloudevents.GetColumns(s))
return nil
})
}

View File

@@ -49,7 +49,7 @@ func init() {
type CloudregionCityListOptions struct {
Manager string `help:"List objects belonging to the cloud provider"`
Account string `help:"List objects belonging to the cloud account"`
Provider string `help:"List objects from the provider" choices:"VMware|Aliyun|Qcloud|Azure|Aws|Huawei|Openstack|Ucloud|ZStack"`
Provider string `help:"List objects from the provider" choices:"VMware|Aliyun|Qcloud|Azure|Aws|Huawei|Openstack|Ucloud|ZStack|Google|Ctyun"`
City string `help:"List regions in the specified city"`
PublicCloud *bool `help:"List objects belonging to public cloud" json:"public_cloud"`

View File

@@ -29,11 +29,11 @@ func init() {
* 操作用户的通信地址(如果用户的通信地址不存在则进行添加;如果已存在则进行修改;如果设置空则进行删除。)
*/
type ContactsUpdateOptions struct {
UID string `help:"The user you wanna add contact to (Keystone User ID)"`
CONTACTTYPE string `help:"The contact type email|mobile" choices:"email|mobile|dingtalk"`
CONTACT string `help:"The contacts details mobile number or email address or dingtalk's userid, if set it the empty str means delete"`
Status string `help:"Enabled or disabled contact status" choices:"enable|disable"`
UpdateDingtalk bool `help:"if update dingtalk"`
UID string `help:"The user you wanna add contact to (Keystone User ID)"`
CONTACTTYPE string `help:"The contact type email|mobile" choices:"email|mobile|dingtalk"`
CONTACT string `help:"The contacts details mobile number or email address or dingtalk's userid, if set it the empty str means delete"`
Status string `help:"Enabled or disabled contact status" choices:"enable|disable"`
Pull []string `help:"pull some subcontacts(e.g., dingtalk, feishu, etc) related to mobile"`
}
R(&ContactsUpdateOptions{}, "contact-update", "Create, delete or update contact for user", func(s *mcclient.ClientSession, args *ContactsUpdateOptions) error {
arr := jsonutils.NewArray()
@@ -52,12 +52,14 @@ func init() {
params := jsonutils.NewDict()
params.Add(arr, "contacts")
if args.UpdateDingtalk {
params.Add(jsonutils.JSONTrue, "update_dingtalk")
pulls := jsonutils.NewArray()
for _, pull := range args.Pull {
pulls.Add(jsonutils.NewString(pull))
}
params.Add(pulls, "pull")
contact, err := modules.Contacts.PerformAction(s, args.UID, "update-contact", params)
contact, err := modules.Contacts.CustomizedPerformAction(s, args.UID, "update-contact", params)
if err != nil {
return err
}
@@ -66,6 +68,22 @@ func init() {
return nil
})
type ContactsPullOptions struct {
UID string `help:"The user you wanna pull contact"`
CONTACTTYPE string `help:"The contact type"`
}
R(&ContactsPullOptions{}, "contact-pull", "Pull contact", func(s *mcclient.ClientSession, args *ContactsPullOptions) error {
params := jsonutils.NewDict()
params.Set("contacts", jsonutils.NewArray())
params.Set("pull", jsonutils.NewArray(jsonutils.NewString(args.CONTACTTYPE)))
contact, err := modules.Contacts.CustomizedPerformAction(s, args.UID, "update-contact", params)
if err != nil {
return err
}
printObject(contact)
return nil
})
type ContactsDeleteOptions struct {
UID string `help:"The user you wanna add contact to (Keystone User ID)"`
CONTACTTYPE string `help:"The contact type email|mobile|dingtalk" choices:"email|mobile|dingtalk"`
@@ -78,7 +96,7 @@ func init() {
arr.Add(tmpObj)
params := jsonutils.NewDict()
params.Add(arr, "contacts")
contact, err := modules.Contacts.PerformAction(s, args.UID, "update-contact", params)
contact, err := modules.Contacts.CustomizedPerformAction(s, args.UID, "update-contact", params)
if err != nil {
return err
}
@@ -133,7 +151,7 @@ func init() {
params.Add(jsonutils.JSONTrue, "details")
result, err := modules.Contacts.Get(s, args.UID, params)
result, err := modules.Contacts.CustomizedGet(s, args.UID, params)
if err != nil {
return err
}
@@ -166,19 +184,10 @@ func init() {
CONTACT string `help:"The contacts details mobile number or email address"`
}
R(&ContactsVerifyOptions{}, "contact-verify-trigger", "Trigger contact verify", func(s *mcclient.ClientSession, args *ContactsVerifyOptions) error {
params := jsonutils.NewDict()
params.Add(jsonutils.NewString(args.CONTACT_TYPE), "contact_type")
params.Add(jsonutils.NewString(args.CONTACT), "contact")
/*
if len(args.Email) > 0 {
params.Add(jsonutils.NewString(args.Email), "email")
}
if len(args.Mobile) > 0 {
params.Add(jsonutils.NewString(args.Mobile), "mobile")
}
*/
_, err := modules.Contacts.PerformAction(s, args.UID, "verify", params)
tmpDict := jsonutils.NewDict()
tmpDict.Add(jsonutils.NewString(args.CONTACT_TYPE), "contact_type")
tmpDict.Add(jsonutils.NewString(args.CONTACT), "contact")
_, err := modules.Contacts.CustomizedPerformAction(s, args.UID, "verify", tmpDict)
if err != nil {
return err
}

View File

@@ -0,0 +1,64 @@
// 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/onecloud/pkg/mcclient"
"yunion.io/x/onecloud/pkg/mcclient/modules"
"yunion.io/x/onecloud/pkg/mcclient/options"
)
func init() {
type DBInstanceAccountListOptions struct {
options.BaseListOptions
DBInstance string `help:"ID or Name of DBInstance" json:"dbinstance"`
}
R(&DBInstanceAccountListOptions{}, "dbinstance-account-list", "List DB instance accounts", func(s *mcclient.ClientSession, opts *DBInstanceAccountListOptions) error {
params, err := options.ListStructToParams(opts)
if err != nil {
return err
}
result, err := modules.DBInstanceAccounts.List(s, params)
if err != nil {
return err
}
printList(result, modules.DBInstanceAccounts.GetColumns(s))
return nil
})
type DBInstanceAccountIdOptions struct {
ID string `help:"ID or Name of DBInstanceaccount"`
}
R(&DBInstanceAccountIdOptions{}, "dbinstance-account-show", "Show DB instance account", func(s *mcclient.ClientSession, opts *DBInstanceAccountIdOptions) error {
account, err := modules.DBInstanceAccounts.Get(s, opts.ID, nil)
if err != nil {
return err
}
printObject(account)
return nil
})
R(&DBInstanceAccountIdOptions{}, "dbinstance-account-delete", "Delete DB instance account", func(s *mcclient.ClientSession, opts *DBInstanceAccountIdOptions) error {
account, err := modules.DBInstanceAccounts.Delete(s, opts.ID, nil)
if err != nil {
return err
}
printObject(account)
return nil
})
}

View File

@@ -312,37 +312,6 @@ func init() {
return nil
})
type DBInstanceAccountListOptions struct {
options.BaseListOptions
DBInstance string `help:"ID or Name of DBInstance" json:"dbinstance"`
}
R(&DBInstanceAccountListOptions{}, "dbinstance-account-list", "List DB instance accounts", func(s *mcclient.ClientSession, opts *DBInstanceAccountListOptions) error {
params, err := options.ListStructToParams(opts)
if err != nil {
return err
}
result, err := modules.DBInstanceAccounts.List(s, params)
if err != nil {
return err
}
printList(result, modules.DBInstanceAccounts.GetColumns(s))
return nil
})
type DBInstanceAccountIdOptions struct {
ID string `help:"ID or Name of DBInstanceaccount"`
}
R(&DBInstanceAccountIdOptions{}, "dbinstance-account-show", "Show DB instance account", func(s *mcclient.ClientSession, opts *DBInstanceAccountIdOptions) error {
account, err := modules.DBInstanceAccounts.Get(s, opts.ID, nil)
if err != nil {
return err
}
printObject(account)
return nil
})
type DBInstancePrivilegeListOptions struct {
options.BaseListOptions
DBInstanceaccount string `help:"ID or Name of DBInstanceaccount" json:"dbinstanceaccount"`
@@ -362,4 +331,21 @@ func init() {
return nil
})
type DBInstanceChangeOwnerOptions struct {
ID string `help:"DBInstance to change owner" json:"-"`
PROJECT string `help:"Project ID or change" json:"tenant"`
}
R(&DBInstanceChangeOwnerOptions{}, "dbinstance-change-owner", "Change owner porject of a dbinstance", func(s *mcclient.ClientSession, opts *DBInstanceChangeOwnerOptions) error {
params, err := options.StructToParams(opts)
if err != nil {
return err
}
result, err := modules.DBInstance.PerformAction(s, opts.ID, "change-owner", params)
if err != nil {
return err
}
printObject(result)
return nil
})
}

View File

@@ -0,0 +1,222 @@
// 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 (
"fmt"
"yunion.io/x/jsonutils"
"yunion.io/x/log"
"yunion.io/x/onecloud/pkg/mcclient"
"yunion.io/x/onecloud/pkg/mcclient/modulebase"
"yunion.io/x/onecloud/pkg/mcclient/modules"
"yunion.io/x/onecloud/pkg/mcclient/options"
)
func paramValidator(param jsonutils.JSONObject) (bool, error) {
// TODO 移到 server 端
log.Infof("paramValidator: param: %+v", param)
interval, err := param.Int("interval")
if err != nil {
return true, nil
}
day, err := param.Int("day")
if err != nil {
return true, nil
}
if interval == 0 && day == 0 {
return false, fmt.Errorf("interval and day can not be 0 at the same time")
}
return true, nil
}
func init() {
type CronjobListOptions struct {
options.BaseListOptions
Name string `help:"cloud region ID or Name" json:"-"`
}
R(&CronjobListOptions{}, "devtoolcronjob-list", "List Devtool Cronjobs", func(s *mcclient.ClientSession, args *CronjobListOptions) error {
params, err := options.ListStructToParams(args)
if err != nil {
return err
}
var result *modulebase.ListResult
result, err = modules.DevToolCronjobs.List(s, params)
printList(result, modules.DevToolCronjobs.GetColumns(s))
return nil
})
type CronjobCreateOptions struct {
NAME string `help:"Ansible Playbook ID or Name" json:"-"`
Day int `help:"Cronjob runs at given day" default:"0"`
Hour int `help:"Cronjob runs at given hour" default:"0"`
Min int `help:"Cronjob runs at given min" default:"0"`
Sec int `help:"Cronjob runs at given sec" default:"0"`
Interval int64 `help:"Cronjob runs at given interval" default:"0"`
Start bool `help:"start job when created" default:"false"`
Enabled bool `help:"Set job status enabled" default:"false"`
}
R(
&CronjobCreateOptions{},
"devtoolcronjob-create",
"Create a cronjob repo component",
func(s *mcclient.ClientSession, args *CronjobCreateOptions) error {
result, err := modules.AnsiblePlaybooks.Get(s, args.NAME, nil)
if err != nil {
return err
}
ansiblePlaybookName, err := result.GetString("name")
if err != nil {
return err
}
ansiblePlaybookID, err := result.GetString("id")
if err != nil {
return err
}
params := jsonutils.NewDict()
params.Add(jsonutils.NewString(ansiblePlaybookName), "name")
params.Add(jsonutils.NewString(ansiblePlaybookID), "ansible_playbook_id")
if args.Start {
params.Add(jsonutils.JSONTrue, "start")
}
if args.Enabled {
params.Add(jsonutils.JSONTrue, "enabled")
} else if args.Interval > 0 {
params.Add(jsonutils.NewInt(int64(args.Interval)), "interval")
} else {
params.Add(jsonutils.NewInt(int64(0)), "interval")
params.Add(jsonutils.NewInt(int64(args.Day)), "day")
params.Add(jsonutils.NewInt(int64(args.Hour)), "hour")
params.Add(jsonutils.NewInt(int64(args.Min)), "min")
params.Add(jsonutils.NewInt(int64(args.Sec)), "sec")
}
ok, err := paramValidator(params)
if err != nil || !ok {
log.Infof("paramValidator error %s", err)
return err
}
cronjob, err := modules.DevToolCronjobs.Create(s, params)
if err != nil {
log.Errorf("modules.DevToolCronjobs.Create error %s", err)
return err
}
printObject(cronjob)
return nil
},
)
type DevToolCronjobShowOptions struct {
ID string `help:"ID or Name of the DevToolCronjob to show"`
}
R(&DevToolCronjobShowOptions{}, "devtoolcronjob-show", "Show cronjob details", func(s *mcclient.ClientSession, args *DevToolCronjobShowOptions) error {
result, err := modules.DevToolCronjobs.Get(s, args.ID, nil)
if err != nil {
return err
}
printObject(result)
return nil
})
type DevToolCronjobUpdateOptions struct {
ID string `help:"ID or Name of DevToolCronjob to update"`
Day int `help:"Cronjob runs at given day" json:"-" default:"-1"`
Hour int `help:"Cronjob runs at given hour" json:"-" default:"-1"`
Min int `help:"Cronjob runs at given min" default:"-1"`
Sec int `help:"Cronjob runs at given sec" default:"-1"`
Interval int `help:"Cronjob runs at given interval" default:"-1"`
Start bool `help:"start job when created"`
Stop bool `help:"start job when created"`
Enable bool `help:"Set job status enabled"`
Disable bool `help:"Set job status enabled"`
}
R(&DevToolCronjobUpdateOptions{}, "devtoolcronjob-update", "Update DevToolCronjob", func(s *mcclient.ClientSession, args *DevToolCronjobUpdateOptions) error {
result, err := modules.DevToolCronjobs.Get(s, args.ID, nil)
if err != nil {
return err
}
params := jsonutils.NewDict()
interval, _ := result.Int("interval")
day, _ := result.Int("day")
params.Add(jsonutils.NewString(args.ID), "id")
params.Add(jsonutils.NewInt(int64(interval)), "interval")
params.Add(jsonutils.NewInt(int64(day)), "day")
log.Infof("DevToolCronjobUpdateOptions args: %+v", args)
if args.Interval >= 0 {
params.Add(jsonutils.NewInt(int64(args.Interval)), "interval")
if args.Interval > 0 {
params.Add(jsonutils.NewInt(0), "day")
}
} else if args.Day >= 0 {
params.Add(jsonutils.NewInt(int64(args.Day)), "day")
if args.Day > 0 {
params.Add(jsonutils.NewInt(0), "interval")
}
}
if args.Hour >= 0 {
params.Add(jsonutils.NewInt(int64(args.Hour)), "hour")
}
if args.Min >= 0 {
params.Add(jsonutils.NewInt(int64(args.Min)), "min")
}
if args.Sec >= 0 {
params.Add(jsonutils.NewInt(int64(args.Sec)), "sec")
}
ok, err := paramValidator(params)
if err != nil || !ok {
return err
}
if args.Start && args.Stop {
return fmt.Errorf("can not set job start and stop at the same time")
} else if args.Start {
params.Add(jsonutils.JSONTrue, "start")
} else if args.Stop {
params.Add(jsonutils.JSONFalse, "start")
}
if args.Enable && args.Disable {
return fmt.Errorf("can not set job enabled and disabled at the same time")
} else if args.Enable {
params.Add(jsonutils.JSONTrue, "enabled")
} else if args.Disable {
params.Add(jsonutils.JSONFalse, "enabled")
}
result, err = modules.DevToolCronjobs.Update(s, args.ID, params)
if err != nil {
return err
}
printObject(result)
return nil
})
R(&DevToolCronjobShowOptions{}, "devtoolcronjob-delete", "Delete DevToolCronjob", func(s *mcclient.ClientSession, args *DevToolCronjobShowOptions) error {
result, err := modules.DevToolCronjobs.Delete(s, args.ID, nil)
if err != nil {
return err
}
printObject(result)
return nil
})
}

View File

@@ -0,0 +1,154 @@
// 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/log"
"yunion.io/x/onecloud/pkg/mcclient"
"yunion.io/x/onecloud/pkg/mcclient/modulebase"
"yunion.io/x/onecloud/pkg/mcclient/modules"
"yunion.io/x/onecloud/pkg/mcclient/options"
)
func init() {
printAnsiblePlaybookObject := func(obj jsonutils.JSONObject) {
dict := obj.(*jsonutils.JSONDict)
pbJson, err := dict.Get("playbook")
if err != nil {
printObject(obj)
return
}
pbStr := pbJson.YAMLString()
dict.Set("playbook", jsonutils.NewString(pbStr))
printObject(obj)
}
type TemplateListOptions struct {
options.BaseListOptions
Name string `help:"cloud region ID or Name" json:"-"`
}
R(&TemplateListOptions{}, "devtooltemplate-list", "List Devtool Templates", func(s *mcclient.ClientSession, args *TemplateListOptions) error {
params, err := options.ListStructToParams(args)
if err != nil {
return err
}
var result *modulebase.ListResult
result, err = modules.DevToolTemplates.List(s, params)
printList(result, modules.DevToolTemplates.GetColumns(s))
return nil
})
R(
&options.DevtoolTemplateCreateOptions{},
"devtooltemplate-create",
"Create a template repo component",
func(s *mcclient.ClientSession, opts *options.DevtoolTemplateCreateOptions) error {
params, err := opts.Params()
if err != nil {
return err
}
log.Infof("devtool playbook create opts: %+v", params)
apb, err := modules.DevToolTemplates.Create(s, params)
if err != nil {
return err
}
printAnsiblePlaybookObject(apb)
return nil
},
)
R(
&options.DevtoolTemplateIdOptions{},
"devtooltemplate-show",
"Show devtool template",
func(s *mcclient.ClientSession, opts *options.DevtoolTemplateIdOptions) error {
apb, err := modules.DevToolTemplates.Get(s, opts.ID, nil)
if err != nil {
return err
}
printAnsiblePlaybookObject(apb)
return nil
},
)
R(
&options.DevtoolTemplateBindingOptions{},
"devtooltemplate-bind",
"Binding devtool template to a host/vm",
func(s *mcclient.ClientSession, opts *options.DevtoolTemplateBindingOptions) error {
params := jsonutils.NewDict()
params.Set("server_id", jsonutils.NewString(opts.ServerID))
apb, err := modules.DevToolTemplates.PerformAction(s, opts.ID, "bind", params)
if err != nil {
return err
}
printAnsiblePlaybookObject(apb)
return nil
},
)
R(
&options.DevtoolTemplateBindingOptions{},
"devtooltemplate-unbind",
"Binding devtool template to a host/vm",
func(s *mcclient.ClientSession, opts *options.DevtoolTemplateBindingOptions) error {
params := jsonutils.NewDict()
params.Set("server_id", jsonutils.NewString(opts.ServerID))
apb, err := modules.DevToolTemplates.PerformAction(s, opts.ID, "unbind", params)
if err != nil {
return err
}
printAnsiblePlaybookObject(apb)
return nil
},
)
R(
&options.DevtoolTemplateIdOptions{},
"devtooltemplate-delete",
"Delete devtool template",
func(s *mcclient.ClientSession, opts *options.DevtoolTemplateIdOptions) error {
apb, err := modules.DevToolTemplates.Delete(s, opts.ID, nil)
if err != nil {
return err
}
printAnsiblePlaybookObject(apb)
return nil
},
)
R(
&options.DevtoolTemplateUpdateOptions{},
"devtooltemplate-update",
"Update ansible playbook",
func(s *mcclient.ClientSession, opts *options.DevtoolTemplateUpdateOptions) error {
params, err := opts.Params()
if err != nil {
return err
}
apb, err := modules.DevToolTemplates.Update(s, opts.ID, params)
if err != nil {
return err
}
printAnsiblePlaybookObject(apb)
return nil
},
)
}

View File

@@ -0,0 +1,51 @@
// 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/onecloud/pkg/mcclient"
"yunion.io/x/onecloud/pkg/mcclient/modules"
"yunion.io/x/onecloud/pkg/mcclient/options"
)
func init() {
type GlobalVpcListOptions struct {
options.BaseListOptions
}
R(&GlobalVpcListOptions{}, "global-vpc-list", "List global vpcs", func(s *mcclient.ClientSession, args *GlobalVpcListOptions) error {
params, err := options.ListStructToParams(args)
if err != nil {
return err
}
result, err := modules.GlobalVpcs.List(s, params)
if err != nil {
return err
}
printList(result, modules.GlobalVpcs.GetColumns(s))
return nil
})
type GlobalVpcShowOptions struct {
ID string `help:"ID or Name of globalvpc"`
}
R(&GlobalVpcShowOptions{}, "global-vpc-show", "Show details of a global vpc", func(s *mcclient.ClientSession, args *GlobalVpcShowOptions) error {
result, err := modules.GlobalVpcs.GetById(s, args.ID, nil)
if err != nil {
return err
}
printObject(result)
return nil
})
}

View File

@@ -79,7 +79,7 @@ func init() {
if err != nil {
return err
}
users, err := modules.Groups.GetUsers(s, grpId)
users, err := modules.Groups.GetUsers(s, grpId, nil)
if err != nil {
return err
}

View File

@@ -0,0 +1,168 @@
// 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 (
"fmt"
"yunion.io/x/jsonutils"
"yunion.io/x/onecloud/pkg/mcclient"
"yunion.io/x/onecloud/pkg/mcclient/modules"
"yunion.io/x/onecloud/pkg/mcclient/options"
)
func init() {
type GuestTemplateListOptions struct {
options.BaseListOptions
}
R(&GuestTemplateListOptions{}, "server-template-list", "List server template", func(s *mcclient.ClientSession,
opts *GuestTemplateListOptions) error {
params, err := options.ListStructToParams(opts)
if err != nil {
return err
}
result, err := modules.GuestTemplate.List(s, params)
if err != nil {
return err
}
printList(result, modules.GuestTemplate.GetColumns(s))
return nil
})
type GuestTemplateCreateOptions struct {
options.ServerCreateOptionalOptions
NAME string `help:"Name of server template" json:"-"`
}
R(&GuestTemplateCreateOptions{}, "server-template-create", "Create a server template",
func(s *mcclient.ClientSession,
opts *GuestTemplateCreateOptions) error {
params, err := opts.OptionalParams()
if err != nil {
return err
}
if options.BoolV(opts.DryRun) {
fmt.Println("no support operator")
return nil
}
dict := jsonutils.NewDict()
if opts.GenerateName {
dict.Add(jsonutils.NewString(opts.NAME), "generate_name")
} else {
dict.Add(jsonutils.NewString(opts.NAME), "name")
}
dict.Add(params.JSON(params), "content")
tem, err := modules.GuestTemplate.Create(s, dict)
if err != nil {
return err
}
printObject(tem)
return nil
})
type GuestTemplateUpdateOptions struct {
options.ServerCreateOptionalOptions
ID string `help:"ID of server template"`
name string `help:"name of server template"`
}
R(&GuestTemplateUpdateOptions{}, "server-template-update", "Update a server template",
func(s *mcclient.ClientSession, opts *GuestTemplateUpdateOptions) error {
params, err := opts.OptionalParams()
if err != nil {
return err
}
if options.BoolV(opts.DryRun) {
fmt.Println("no support operator")
return nil
}
dict := jsonutils.NewDict()
if len(opts.name) != 0 {
dict.Add(jsonutils.NewString(opts.name), "name")
}
dict.Add(params.JSON(params), "content")
tem, err := modules.GuestTemplate.Update(s, opts.ID, dict)
if err != nil {
return err
}
printObject(tem)
return nil
})
type GuestTemplateOptions struct {
ID string `help:"ID or Name of server template"`
}
R(&GuestTemplateOptions{}, "server-template-show", "Show a server template",
func(s *mcclient.ClientSession, opts *GuestTemplateOptions) error {
tem, err := modules.GuestTemplate.Get(s, opts.ID, jsonutils.JSONNull)
if err != nil {
return err
}
printObject(tem)
return nil
})
R(&GuestTemplateOptions{}, "server-tempalte-delete", "Delete a server template",
func(s *mcclient.ClientSession, opts *GuestTemplateOptions) error {
tem, err := modules.GuestTemplate.Delete(s, opts.ID, jsonutils.JSONNull)
if err != nil {
return err
}
printObject(tem)
return nil
},
)
R(&GuestTemplateOptions{}, "server-template-private", "Private server template",
func(s *mcclient.ClientSession, opts *GuestTemplateOptions) error {
tem, err := modules.GuestTemplate.PerformAction(s, opts.ID, "private", jsonutils.JSONNull)
if err != nil {
return err
}
printObject(tem)
return nil
},
)
type GuestTemplatePublicOptions struct {
ID string `help:"ID or Name of server template"`
PublicScope string `help:"public scope"`
}
R(&GuestTemplatePublicOptions{}, "server-template-public", "Public server template",
func(s *mcclient.ClientSession, opts *GuestTemplatePublicOptions) error {
dict := jsonutils.NewDict()
if len(opts.PublicScope) != 0 {
dict.Add(jsonutils.NewString(opts.PublicScope), "public_scope")
}
tem, err := modules.GuestTemplate.PerformAction(s, opts.ID, "public", dict)
if err != nil {
return err
}
printObject(tem)
return nil
},
)
}

View File

@@ -38,7 +38,7 @@ func init() {
Occupied bool `help:"show occupid host" json:"-"`
Enabled bool `help:"Show enabled host only" json:"-"`
Disabled bool `help:"Show disabled host only" json:"-"`
HostType string `help:"Host type filter" choices:"baremetal|hypervisor|esxi|kubelet|hyperv|aliyun|azure|qcloud|aws|huawei|ucloud"`
HostType string `help:"Host type filter" choices:"baremetal|hypervisor|esxi|kubelet|hyperv|aliyun|azure|qcloud|aws|huawei|ucloud|google|ctyun"`
AnyMac string `help:"Mac matches one of the host's interface"`
IsBaremetal *bool `help:"filter host list by is_baremetal=true|false"`
@@ -53,6 +53,10 @@ func init() {
Uuid string `help:"find host with given system uuid"`
CdromBoot *bool `help:"filter hosts list by cdrom_boot=true|false"`
Sn string `help:"find host by sn"`
options.BaseListOptions
}
R(&HostListOptions{}, "host-list", "List hosts", func(s *mcclient.ClientSession, opts *HostListOptions) error {
@@ -74,6 +78,9 @@ func init() {
if len(opts.Uuid) > 0 {
params.Add(jsonutils.NewString(opts.Uuid), "uuid")
}
if len(opts.Sn) > 0 {
params.Add(jsonutils.NewString(opts.Sn), "sn")
}
result, err := modules.Hosts.List(s, params)
if err != nil {
return err
@@ -133,6 +140,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))
@@ -200,6 +213,10 @@ func init() {
// AccessIp string `help:"Change access ip, CAUTION!!!!"`
AccessMac string `help:"Change baremetal access MAC, CAUTION!!!!"`
Uuid string `help:"Change baremetal UUID, 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()
@@ -230,6 +247,15 @@ func init() {
if len(args.Uuid) > 0 {
params.Add(jsonutils.NewString(args.Uuid), "uuid")
}
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")
}
@@ -352,16 +378,16 @@ 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"`
Index int64 `help:"nic index" default:"-1"`
}
R(&HostAddNetIfOptions{}, "host-add-netif", "Host add a NIC", func(s *mcclient.ClientSession, args *HostAddNetIfOptions) error {
params := jsonutils.NewDict()
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")
params.Add(jsonutils.NewInt(args.INDEX), "index")
if len(args.Type) > 0 {
params.Add(jsonutils.NewString(args.Type), "nic_type")
}

View File

@@ -16,6 +16,7 @@ package shell
import (
"yunion.io/x/jsonutils"
"yunion.io/x/pkg/errors"
"yunion.io/x/onecloud/pkg/mcclient"
"yunion.io/x/onecloud/pkg/mcclient/modules"
@@ -165,8 +166,8 @@ func init() {
}
printObject(result)
return nil
},
)
})
R(&GuestImageOptions{}, "guest-image-mark-unprotected", "Mark image protected", func(s *mcclient.ClientSession,
args *GuestImageOptions) error {
@@ -178,7 +179,55 @@ func init() {
}
printObject(result)
return nil
},
})
type GuestImageOperationOptions struct {
ID []string `help:"Guest Image ID or Name"`
}
type GuestImagePublicOptions struct {
GuestImageOperationOptions
Scope string `help:"sharing scope" choices:"system|domain"`
ShareToProject []string `help:"Share to prject"`
}
R(&GuestImageOperationOptions{}, "guest-image-private", "Make a guest image private",
func(s *mcclient.ClientSession, args *GuestImageOperationOptions) error {
if len(args.ID) == 0 {
return errors.Error("No guest image ID provided")
} else if len(args.ID) == 1 {
result, err := modules.GuestImages.PerformAction(s, args.ID[0], "private", nil)
if err != nil {
return err
}
printObject(result)
} else {
results := modules.GuestImages.BatchPerformAction(s, args.ID, "private", nil)
printBatchResults(results, modules.GuestImages.GetColumns(s))
}
return nil
},
)
R(&GuestImagePublicOptions{}, "guest-image-public", "Make a guest image public",
func(s *mcclient.ClientSession, args *GuestImagePublicOptions) error {
params, err := options.StructToParams(args)
if err != nil {
return err
}
if len(args.ID) == 0 {
return errors.Error("No guest image ID provided")
} else if len(args.ID) == 1 {
result, err := modules.GuestImages.PerformAction(s, args.ID[0], "public", params)
if err != nil {
return err
}
printObject(result)
} else {
results := modules.GuestImages.BatchPerformAction(s, args.ID, "public", params)
printBatchResults(results, modules.GuestImages.GetColumns(s))
}
return nil
},
)
}

View File

@@ -46,7 +46,7 @@ type ImageOptionalOptions struct {
OsDist string `help:"Distribution name of OS" metavar:"OS_DISTRIBUTION"`
OsVersion string `help:"Version of OS"`
OsCodename string `help:"Codename of OS"`
OsArch string `help:"Os hardware architecture" choices:"x86|x86_64"`
OsArch string `help:"Os hardware architecture" choices:"x86|x86_64|aarch32|aarch64"`
OsLang string `help:"OS Language" choices:"zh_CN|en_US"`
Preference int64 `help:"Disk preferences"`
Notes string `help:"Notes about the image"`
@@ -138,6 +138,7 @@ func init() {
IsPublic string `help:"filter images public or not(True, False or None)" choices:"true|false"`
IsStandard string `help:"filter images standard or non-standard" choices:"true|false"`
Protected string `help:"filter images by protected" choices:"true|false"`
IsUefi bool `help:"list uefi image"`
Format []string `help:"Disk formats"`
Name string `help:"Name filter"`
}
@@ -155,6 +156,9 @@ func init() {
if len(args.Protected) > 0 {
params.Add(jsonutils.NewString(args.Protected), "protected")
}
if args.IsUefi {
params.Add(jsonutils.JSONTrue, "uefi")
}
if len(args.Tenant) > 0 {
tid, e := modules.Projects.GetId(s, args.Tenant, nil)
if e != nil {
@@ -217,9 +221,9 @@ func init() {
})
type ImageUpdateOptions struct {
ID string `help:"ID or Name of Image"`
Name string `help:"New name of the image"`
Description string `help:"Description of image"`
ID []string `help:"ID or Name of Image"`
Name string `help:"New name of the image"`
Description string `help:"Description of image"`
ImageOptionalOptions
}
@@ -235,11 +239,8 @@ func init() {
if err != nil {
return err
}
img, err := modules.Images.Update(s, args.ID, params)
if err != nil {
return err
}
printObject(img)
result := modules.Images.BatchUpdate(s, args.ID, params)
printBatchResults(result, modules.Images.GetColumns(s))
return nil
})

View File

@@ -29,7 +29,7 @@ func init() {
ServiceType string `help:"Service Type"`
ParentId string `help:"Parent ID"`
ZoneId string `help:"Zone ID"`
Guest string `help:"Guest ID or Name"`
Server string `help:"Guest ID or Name"`
}
R(&InstanceGroupListOptions{}, "instance-group-list", "List instance group", func(s *mcclient.ClientSession,

View File

@@ -205,4 +205,70 @@ func initKubeCluster() {
printObject(ret)
return nil
})
R(&o.IdentOptions{}, cmdN("components-status"), "Get cluster component status", func(s *mcclient.ClientSession, args *o.IdentOptions) error {
ret, err := k8s.KubeClusters.GetSpecific(s, args.ID, "components-status", nil)
if err != nil {
return err
}
printObject(ret)
return nil
})
R(&o.ClusterComponentTypeOptions{}, cmdN("component-setting"), "Get cluster component setting", func(s *mcclient.ClientSession, args *o.ClusterComponentTypeOptions) error {
q := jsonutils.NewDict()
q.Add(jsonutils.NewString(args.TYPE), "type")
ret, err := k8s.KubeClusters.GetSpecific(s, args.ID, "component-setting", q)
if err != nil {
return err
}
printObject(ret)
return nil
})
R(&o.ClusterEnableComponentCephCSIOpt{}, cmdN("component-enable-ceph-csi"), "Enable cluster component", func(s *mcclient.ClientSession, args *o.ClusterEnableComponentCephCSIOpt) error {
params, err := args.Params()
if err != nil {
return err
}
ret, err := k8s.KubeClusters.PerformAction(s, args.ID, "enable-component", params)
if err != nil {
return err
}
printObject(ret)
return nil
})
R(&o.ClusterDisableComponent{}, cmdN("component-disable"), "Enable cluster component", func(s *mcclient.ClientSession, args *o.ClusterDisableComponent) error {
params := args.Params()
ret, err := k8s.KubeClusters.PerformAction(s, args.ID, "disable-component", params)
if err != nil {
return err
}
printObject(ret)
return nil
})
R(&o.ClusterDisableComponent{}, cmdN("component-delete"), "Delete cluster component", func(s *mcclient.ClientSession, args *o.ClusterDisableComponent) error {
params := args.Params()
ret, err := k8s.KubeClusters.PerformAction(s, args.ID, "delete-component", params)
if err != nil {
return err
}
printObject(ret)
return nil
})
R(&o.ClusterUpdateComponentCephCSIOpt{}, cmdN("component-update-ceph-csi"), "Update cluster component", func(s *mcclient.ClientSession, args *o.ClusterUpdateComponentCephCSIOpt) error {
params, err := args.Params()
if err != nil {
return err
}
ret, err := k8s.KubeClusters.PerformAction(s, args.ID, "update-component", params)
if err != nil {
return err
}
printObject(ret)
return nil
})
}

View File

@@ -0,0 +1,9 @@
package k8s
import (
"yunion.io/x/onecloud/pkg/mcclient/modules/k8s"
)
func initEvent() {
initK8sNamespaceResource("event", k8s.Events)
}

View File

@@ -16,6 +16,11 @@ package k8s
import (
"fmt"
"io/ioutil"
"os"
"os/exec"
"github.com/ghodss/yaml"
"yunion.io/x/jsonutils"
@@ -57,7 +62,7 @@ func init() {
initPVC()
initJob()
initCronJob()
initEvent()
initRbac()
initApp()
@@ -217,6 +222,71 @@ func NewK8sNsResourceGetCmd(cmdN CmdNameFactory, manager modulebase.Manager) *Cm
)
}
func NewK8sNsResourceGetRawCmd(cmdN CmdNameFactory, manager k8s.IClusterResourceManager) *Cmd {
return NewCommand(
&o.NamespaceResourceGetOptions{},
cmdN.Do("show-raw"),
fmt.Sprintf("Show k8s %s raw data", cmdN.Kind),
func(s *mcclient.ClientSession, args *o.NamespaceResourceGetOptions) error {
ret, err := manager.GetRaw(s, args.NAME, args.Params())
if err != nil {
return err
}
printObjectYAML(ret)
return nil
},
)
}
func NewK8sResourceEditRawCmd(cmdN CmdNameFactory, manager k8s.IClusterResourceManager) *Cmd {
return NewCommand(
&o.NamespaceResourceGetOptions{},
cmdN.Do("edit-raw"),
fmt.Sprintf("Edit and update k8s %s raw data", cmdN.Kind),
func(s *mcclient.ClientSession, args *o.NamespaceResourceGetOptions) error {
rawData, err := manager.GetRaw(s, args.NAME, args.Params())
if err != nil {
return err
}
yamlBytes := rawData.YAMLString()
tempfile, err := ioutil.TempFile("", fmt.Sprintf("k8s-%s-%s*.yaml", cmdN.Kind, args.NAME))
if err != nil {
return err
}
defer os.Remove(tempfile.Name())
if _, err := tempfile.Write([]byte(yamlBytes)); 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
}
content, err := ioutil.ReadFile(tempfile.Name())
if err != nil {
return err
}
jsonBytes, err := yaml.YAMLToJSON(content)
if err != nil {
return err
}
body, err := jsonutils.Parse(jsonBytes)
if err != nil {
return err
}
if _, err := manager.UpdateRaw(s, args.NAME, args.Params(), body.(*jsonutils.JSONDict)); err != nil {
return err
}
return nil
},
)
}
func NewK8sResourceDeleteCmd(cmdN CmdNameFactory, manager modulebase.Manager) *Cmd {
return NewCommand(
&o.ResourceDeleteOptions{},
@@ -244,11 +314,13 @@ func NewK8sNsResourceDeleteCmd(cmdN CmdNameFactory, manager modulebase.Manager)
return deleteCmd
}
func initK8sNamespaceResource(kind string, manager modulebase.Manager) *ShellCommands {
func initK8sNamespaceResource(kind string, manager k8s.IClusterResourceManager) *ShellCommands {
cmdN := NewCmdNameFactory(kind)
return NewShellCommands(cmdN.Do).AddR(
NewK8sNsResourceListCmd(cmdN, manager),
NewK8sNsResourceGetCmd(cmdN, manager),
NewK8sNsResourceDeleteCmd(cmdN, manager),
NewK8sNsResourceGetRawCmd(cmdN, manager),
NewK8sResourceEditRawCmd(cmdN, manager),
)
}

View File

@@ -58,4 +58,23 @@ func initSecret() {
return nil
})
registryCmd.AddR(createCmd)
cephCSICmd := NewCmdNameFactory("secret-ceph-csi")
cephCSICreateCmd := NewCommand(
&o.CephCSISecretCreateOptions{},
cephCSICmd.Do("create"),
"Create ceph csi user secret",
func(s *mcclient.ClientSession, args *o.CephCSISecretCreateOptions) error {
params, err := args.Params()
if err != nil {
return err
}
ret, err := k8s.Secrets.Create(s, params)
if err != nil {
return err
}
printObject(ret)
return nil
})
secretCmd.AddR(cephCSICreateCmd)
}

View File

@@ -15,9 +15,70 @@
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 initStorageClass() {
initK8sClusterResource("storageclass", k8s.Storageclass)
cmdN := NewCmdNameFactory("storageclass")
scCmd := initK8sClusterResource("storageclass", k8s.Storageclass)
setDefaultCmd := NewCommand(
&o.ClusterResourceBaseOptions{},
cmdN.Do("set-default"),
"Set storageclass as default",
func(s *mcclient.ClientSession, args *o.ClusterResourceBaseOptions) error {
ret, err := k8s.Storageclass.PerformAction(s, args.NAME, "set-default", args.Params())
if err != nil {
return err
}
printObject(ret)
return nil
},
)
scCmd.AddR(setDefaultCmd)
addStorageClassCephCSI(scCmd)
}
func addStorageClassCephCSI(cmd *ShellCommands) {
rbdN := NewCmdNameFactory("storageclass-ceph-csi-rbd")
rbdCreateCmd := NewCommand(
&o.StorageClassCephCSIRBDCreateOptions{},
rbdN.Do("create"),
"Create ceph csi rbd",
func(s *mcclient.ClientSession, args *o.StorageClassCephCSIRBDCreateOptions) error {
params, err := args.Params()
if err != nil {
return err
}
ret, err := k8s.Storageclass.Create(s, params)
if err != nil {
return err
}
printObject(ret)
return nil
},
)
testConnCmd := NewCommand(
&o.StorageClassCephCSIRBDTestOptions{},
rbdN.Do("connection-test"),
"Test storageclass connection",
func(s *mcclient.ClientSession, args *o.StorageClassCephCSIRBDTestOptions) error {
params, err := args.Params()
if err != nil {
return err
}
ret, err := k8s.Storageclass.PerformClassAction(s, "connection-test", params)
if err != nil {
return err
}
printObject(ret)
return nil
},
)
cmd.AddR(rbdCreateCmd, testConnCmd)
}

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,13 +15,44 @@
package shell
import (
"fmt"
"yunion.io/x/jsonutils"
"yunion.io/x/onecloud/pkg/mcclient"
"yunion.io/x/onecloud/pkg/mcclient/modulebase"
"yunion.io/x/onecloud/pkg/mcclient/modules"
"yunion.io/x/onecloud/pkg/mcclient/options"
)
func 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 := &modulebase.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 +130,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

@@ -46,4 +46,5 @@ func init() {
printObject(result)
return nil
})
}

View File

@@ -418,7 +418,7 @@ func init() {
})
type NetworkAddressOptions struct {
NETWORK string `help:"if of network to query"`
NETWORK string `help:"id or name of network to query"`
}
R(&NetworkAddressOptions{}, "network-addresses", "Query used addresses of network", func(s *mcclient.ClientSession, args *NetworkAddressOptions) error {
result, err := modules.Networks.GetSpecific(s, args.NETWORK, "addresses", nil)
@@ -433,4 +433,31 @@ func init() {
printList(&listResult, nil)
return nil
})
type NetworkSyncOptions struct {
NETWORK string `help:"id or name of network to sync"`
}
R(&NetworkSyncOptions{}, "network-sync", "Sync network status", func(s *mcclient.ClientSession, args *NetworkSyncOptions) error {
result, err := modules.Networks.PerformAction(s, args.NETWORK, "sync", nil)
if err != nil {
return err
}
printObject(result)
return nil
})
type NetworkStatusOptions struct {
NETWORK string `help:"id or name of network to sync" json:"-"`
STATUS string `help:"status of network" choices:"available|unavailable" json:"status"`
Reason string `help:"reason to change status" json:"reason"`
}
R(&NetworkStatusOptions{}, "network-status", "Set on-premise network status", func(s *mcclient.ClientSession, args *NetworkStatusOptions) error {
params := jsonutils.Marshal(args)
result, err := modules.Networks.PerformAction(s, args.NETWORK, "status", params)
if err != nil {
return err
}
printObject(result)
return nil
})
}

View File

@@ -29,20 +29,26 @@ func init() {
*/
type NotificationCreateOptions struct {
Uid []string `help:"The user you wanna sent to (Keystone User ID)"`
CONTACTTYPE string `help:"User's contacts type" choices:"email|mobile|dingtalk|webconsole"`
TOPIC string `help:"Title or topic of the notification"`
PRIORITY string `help:"Priority of the notification" choices:"normal|important|fatal"`
MSG string `help:"The content of the notification"`
Remark string `help:"Remark or description of the notification"`
Group bool `help:"Send to group"`
CONTACTTYPE string `help:"User's contacts type"`
TOPIC string `help:"Title or topic of the notification"`
PRIORITY string `help:"Priority of the notification" choices:"normal|important|fatal"`
MSG string `help:"The content of the notification"`
Remark string `help:"Remark or description of the notification"`
Group bool `help:"Send to group"`
}
R(&NotificationCreateOptions{}, "notify", "Send a notification to sb", func(s *mcclient.ClientSession, args *NotificationCreateOptions) error {
type NotificationCreateSingleOptions struct {
UID string `help:"The user you wanna sent to (Keystone User ID)"`
NotificationCreateOptions
}
R(&NotificationCreateSingleOptions{}, "notify", "Send a notification to someone", func(s *mcclient.ClientSession,
args *NotificationCreateSingleOptions) error {
msg := notify.SNotifyMessage{}
if args.Group {
msg.Gid = args.Uid
msg.Gid = []string{args.UID}
} else {
msg.Uid = args.Uid
msg.Uid = []string{args.UID}
}
msg.ContactType = notify.TNotifyChannel(args.CONTACTTYPE)
@@ -57,6 +63,35 @@ func init() {
}
return nil
})
type NotificationCreateMultiOptions struct {
Uid []string `help:"The user you wanna sent to (Keystone User ID)"`
NotificationCreateOptions
}
R(&NotificationCreateMultiOptions{}, "notify-batch", "Send a notification to someones",
func(s *mcclient.ClientSession, args *NotificationCreateMultiOptions) error {
msg := notify.SNotifyMessage{}
if args.Group {
msg.Gid = args.Uid
} else {
msg.Uid = args.Uid
}
msg.ContactType = notify.TNotifyChannel(args.CONTACTTYPE)
msg.Topic = args.TOPIC
msg.Priority = notify.TNotifyPriority(args.PRIORITY)
msg.Msg = args.MSG
msg.Remark = args.Remark
err := notify.Notifications.Send(s, msg)
if err != nil {
return err
}
return nil
})
/**
* 发送全局通知
*/
@@ -72,7 +107,7 @@ func init() {
R(&NotificationBroadcastOptions{}, "notify-broadcast", "Send a notification to all online users", func(s *mcclient.ClientSession, args *NotificationBroadcastOptions) error {
msg := notify.SNotifyMessage{}
msg.Broadcast = true
msg.ContactType = notify.TNotifyChannel("webconsole")
msg.ContactType = notify.NotifyByWebConsole
msg.Topic = args.Topic
msg.Priority = notify.TNotifyPriority(args.Priority)
msg.Msg = args.Msg

View File

@@ -34,7 +34,24 @@ func init() {
}
body := jsonutils.NewDict()
body.Add(tmp, args.CONTACTTYPE)
modules.Configs.Create(s, body)
ret, err := modules.Configs.Create(s, body)
if err != nil {
return err
}
printObject(ret)
return nil
})
R(&ConfigCreate2Options{}, "notify-config-validate", "config validate", func(s *mcclient.ClientSession,
args *ConfigCreate2Options) error {
tmp := jsonutils.NewDict()
for i := 0; i+1 < len(args.CONFIGS); i += 2 {
tmp.Add(jsonutils.NewString(args.CONFIGS[i+1]), args.CONFIGS[i])
}
ret, err := modules.Configs.PerformAction(s, args.CONTACTTYPE, "validate", tmp)
if err != nil {
return err
}
printObject(ret)
return nil
})

View File

@@ -0,0 +1,90 @@
// 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"
"yunion.io/x/onecloud/pkg/mcclient/options"
)
func init() {
type NotifyTemplateUpdateOptions struct {
CONTACTTYPE string `help:"the contanct type, such as 'email', 'mobile'"`
TOPIC string `help:"the topic of temlate, such as 'VERIFY', 'ALARM'"`
TEMPLATETYPE string `help:"the type of template" choices:"content|title|remote"`
CONTENT string `help:"the content of template"`
}
R(&NotifyTemplateUpdateOptions{}, "notify-template-update", "Create, update contact for user", func(s *mcclient.ClientSession,
args *NotifyTemplateUpdateOptions) error {
arr := jsonutils.NewArray()
tmpObj := jsonutils.NewDict()
tmpObj.Add(jsonutils.NewString(args.TOPIC), "topic")
tmpObj.Add(jsonutils.NewString(args.TEMPLATETYPE), "template_type")
tmpObj.Add(jsonutils.NewString(args.CONTENT), "content")
arr.Add(tmpObj)
params := jsonutils.NewDict()
params.Add(arr, "notifytemplates")
contact, err := modules.NotifyTemplates.PerformAction(s, args.CONTACTTYPE, "update-template", params)
if err != nil {
return err
}
printObject(contact)
return nil
})
type NotifyTemplateDeleteOptions struct {
CONTACTTYPE string `help:"the contanct type, such as 'email', 'mobile'"`
Topic string `help:"the topic of temlate, such as 'VERIFY', 'ALARM'"`
}
R(&NotifyTemplateDeleteOptions{}, "notify-template-delete", "delete notify template",
func(s *mcclient.ClientSession, args *NotifyTemplateDeleteOptions) error {
tmpObj := jsonutils.NewDict()
tmpObj.Add(jsonutils.NewString(args.CONTACTTYPE), "contact_type")
tmpObj.Add(jsonutils.NewString(args.Topic), "topic")
_, err := modules.NotifyTemplates.DeleteContents(s, tmpObj)
if err != nil {
return err
}
return nil
})
type NotifyTemplateListOptions struct {
options.BaseListOptions
}
R(&NotifyTemplateListOptions{}, "notify-template-list", "List all notify template",
func(s *mcclient.ClientSession, args *NotifyTemplateListOptions) error {
params, err := args.BaseListOptions.Params()
if err != nil {
return err
}
result, err := modules.NotifyTemplates.List(s, params)
if err != nil {
return err
}
printList(result, modules.NotifyTemplates.GetColumns(s))
return nil
})
}

View File

@@ -17,8 +17,6 @@ package shell
import (
"fmt"
"io/ioutil"
"os"
"os/exec"
"strings"
"time"
@@ -32,6 +30,7 @@ import (
"yunion.io/x/onecloud/pkg/mcclient/modules"
"yunion.io/x/onecloud/pkg/mcclient/options"
"yunion.io/x/onecloud/pkg/util/rbacutils"
"yunion.io/x/onecloud/pkg/util/shellutils"
)
func init() {
@@ -135,7 +134,7 @@ func init() {
return nil
}
R(&PolicyPatchOptions{}, "policy-patch", "Patch policy", updateFunc)
R(&PolicyPatchOptions{}, "policy-update", "Patch policy", updateFunc)
R(&PolicyPatchOptions{}, "policy-update", "Update policy", updateFunc)
type PolicyPerformOptions struct {
ID string `help:"ID of policy to update"`
@@ -212,33 +211,13 @@ func init() {
return err
}
tmpfile, err := ioutil.TempFile("", "policy-blob")
if err != nil {
return err
}
defer os.Remove(tmpfile.Name()) // clean up
if _, err := tmpfile.Write([]byte(yaml)); err != nil {
return err
}
if err := tmpfile.Close(); err != nil {
return err
}
cmd := exec.Command("vim", tmpfile.Name())
cmd.Stdin = os.Stdin
cmd.Stdout = os.Stdout
err = cmd.Run()
yaml, err = shellutils.Edit(yaml)
if err != nil {
return err
}
params := jsonutils.NewDict()
policyBytes, err := ioutil.ReadFile(tmpfile.Name())
if err != nil {
return err
}
params.Add(jsonutils.NewString(string(policyBytes)), "policy")
params.Add(jsonutils.NewString(yaml), "policy")
result, err = modules.Policies.Patch(s, policyId, params)
if err != nil {
@@ -306,12 +285,30 @@ func init() {
if err != nil {
log.Fatalf("Set log level %q: %v", "debug", err)
}
if args.Debug {
rbacutils.ShowMatchRuleDebug = true
}
auth.InitFromClientSession(s)
policy.EnableGlobalRbac(15*time.Second, 15*time.Second, false)
if args.Debug {
consts.EnableRbacDebug()
}
findPolicy := false
for !findPolicy {
all := policy.PolicyManager.AllPolicies()
for _, allP := range all {
if len(allP) > 0 {
findPolicy = true
break
}
}
if findPolicy {
break
}
time.Sleep(time.Second)
}
req := jsonutils.NewDict()
for i := 0; i < len(args.Request); i += 1 {
parts := strings.Split(args.Request[i], ":")
@@ -377,6 +374,7 @@ func init() {
Context: mcclient.SAuthContext{
Ip: args.Ip,
},
Token: "faketoken",
}
} else {
token = s.GetToken()
@@ -388,6 +386,10 @@ func init() {
}
printObject(result)
for _, r := range args.Role {
fmt.Println("role", r, "matched policies:", policy.PolicyManager.RoleMatchPolicies(r))
}
fmt.Println("userCred:", token)
for _, scope := range []rbacutils.TRbacScope{
rbacutils.ScopeSystem,
@@ -396,7 +398,7 @@ func init() {
rbacutils.ScopeUser,
rbacutils.ScopeNone,
} {
m := policy.PolicyManager.MatchedPolicies(scope, token)
m := policy.PolicyManager.MatchedPolicyNames(scope, token)
fmt.Println("matched", scope, "policies:", m)
}

View File

@@ -16,73 +16,232 @@ package shell
import (
"yunion.io/x/jsonutils"
"yunion.io/x/log"
"yunion.io/x/onecloud/pkg/mcclient"
"yunion.io/x/onecloud/pkg/mcclient/modulebase"
"yunion.io/x/onecloud/pkg/mcclient/modules"
)
type QuotaBaseOptions struct {
type ComputeQuotaKeys struct {
ZoneQuotaKeys
Hypervisor string `help:"hypervisor" choices:"kvm|baremetal"`
}
type ComputeQuotaOptions struct {
ComputeQuotaKeys
Count int64 `help:"server count" json:"count,omitzero"`
Cpu int64 `help:"CPU count" json:"cpu,omitzero"`
Memory int64 `help:"Memory size in MB" json:"memory,omitzero"`
Storage int64 `help:"Storage size in MB" json:"storage,omitzero"`
Port int64 `help:"Internal NIC count" json:"port,omitzero"`
Eport int64 `help:"External NIC count" json:"eport,omitzero"`
Eip int64 `help:"Elastic IP count" json:"eip,omitzero"`
Bw int64 `help:"Internal bandwidth in Mbps" json:"bw,omitzero"`
Ebw int64 `help:"External bandwidth in Mbps" json:"ebw,omitzero"`
IsolatedDevice int64 `help:"Isolated device count" json:"isolated_device,omitzero"`
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"`
}
type RegionQuotaKeys struct {
Provider string `help:"cloud provider" json:"provider,omitempty"`
Brand string `help:"cloud brand" json:"brand,omitempty"`
CloudEnv string `help:"cloud environment" json:"cloud_env,omitempty" choices:"onpremise|private|public"`
AccountId string `help:"cloud account id" json:"account_id,omitempty"`
ManagerId string `help:"cloud provider id" json:"manager_id,omitempty"`
RegionId string `help:"region id" json:"region_id,omitempty"`
}
type RegionQuotaOptions struct {
RegionQuotaKeys
Port int64 `help:"Internal NIC count" json:"port,omitzero"`
Eport int64 `help:"External NIC count" json:"eport,omitzero"`
// Bw int64 `help:"Internal bandwidth in Mbps" json:"bw,omitzero"`
// Ebw int64 `help:"External bandwidth in Mbps" json:"ebw,omitzero"`
Eip int64 `help:"Elastic IP count" json:"eip,omitzero"`
Snapshot int64 `help:"Snapshot count" json:"snapshot,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"`
Rds int64 `help:"Rds count" json:"rds,omitzero"`
Cache int64 `help:"redis count" json:"cache,omitzero"`
Loadbalancer int64 `help:"loadbalancer instance count" json:"loadbalancer,omitzero"`
}
type ZoneQuotaKeys struct {
RegionQuotaKeys
ZoneId string `help:"zone id" json:"zone_id,omitempty"`
}
type ZoneQuotaOptions struct {
ZoneQuotaKeys
}
type ProjectQuotaOptions struct {
Secgroup int64 `help:"Secgroup count" json:"secgroup,omitzero"`
}
type ImageQuotaKeys struct {
Type string `help:"image type, either iso or image" choices:"iso|image" json:"type,omitempty"`
}
type ImageQuotaOptions struct {
ImageQuotaKeys
Image int64 `help:"Template count" json:"image,omitzero"`
}
type QuotaSetBaseOptions struct {
Project string `help:"Tenant name or ID to set quota" json:"tenant,omitempty"`
Domain string `help:"Domain name or ID to set quota" json:"domain,omitempty"`
Action string `help:"quota set action" choices:"add|sub|reset|replace|delete|update"`
}
func printQuotaList(result jsonutils.JSONObject) {
printList(modulebase.JSON2ListResult(result), nil)
}
func init() {
type QuotaOptions struct {
Tenant string `help:"Tenant name or ID"`
ProjectDomain string `help:"Domain name or ID"`
Scope string `help:"scope" choices:"domain|project"`
Project string `help:"Tenant name or ID" json:"tenant"`
Domain string `help:"Domain name or ID" json:"domain"`
Refresh bool `help:"refresh" json:"refresh,omitfalse"`
Primary bool `help:"get primary quota ONLY" json:"primary,omitfalse"`
}
R(&QuotaOptions{}, "quota", "Show quota for current user or tenant", func(s *mcclient.ClientSession, args *QuotaOptions) error {
params := jsonutils.Marshal(args)
result, err := modules.Quotas.GetQuota(s, params)
log.Debugf("%s", params)
quotas, err := modules.Quotas.GetQuota(s, params)
if err != nil {
return err
}
printObject(result)
printQuotaList(quotas)
return nil
})
R(&QuotaOptions{}, "project-quota", "Show project-quota for current user or tenant", func(s *mcclient.ClientSession, args *QuotaOptions) error {
params := jsonutils.Marshal(args)
quotas, err := modules.ProjectQuotas.GetQuota(s, params)
if err != nil {
return err
}
printQuotaList(quotas)
return nil
})
R(&QuotaOptions{}, "region-quota", "Show region-quota for current user or tenant", func(s *mcclient.ClientSession, args *QuotaOptions) error {
params := jsonutils.Marshal(args)
quotas, err := modules.RegionQuotas.GetQuota(s, params)
if err != nil {
return err
}
printQuotaList(quotas)
return nil
})
R(&QuotaOptions{}, "zone-quota", "Show zone-quota for current user or tenant", func(s *mcclient.ClientSession, args *QuotaOptions) error {
params := jsonutils.Marshal(args)
quotas, err := modules.ZoneQuotas.GetQuota(s, params)
if err != nil {
return err
}
printQuotaList(quotas)
return nil
})
R(&QuotaOptions{}, "project-quota", "Show project-quota for current user or tenant", func(s *mcclient.ClientSession, args *QuotaOptions) error {
params := jsonutils.Marshal(args)
result, err := modules.ProjectQuotas.GetQuota(s, params)
if err != nil {
return err
}
printQuotaList(result)
return nil
})
R(&QuotaOptions{}, "image-quota", "Show image quota for current user or tenant", func(s *mcclient.ClientSession, args *QuotaOptions) error {
params := jsonutils.Marshal(args)
result, err := modules.ImageQuotas.GetQuota(s, params)
quotas, err := modules.ImageQuotas.GetQuota(s, params)
if err != nil {
return err
}
printObject(result)
printQuotaList(quotas)
return nil
})
type QuotaSetOptions struct {
Tenant string `help:"Tenant name or ID to set quota" json:"tenant,omitempty"`
ProjectDomain string `help:"Domain name or ID to set quota" json:",omitempty"`
Action string `help:"quota set action" choices:"add|reset|replace"`
Cascade bool `help:"cascade set quota so that auto increment domain quota if total project quota exceeds parent domain quota"`
QuotaBaseOptions
type ComputeQuotaSetOptions struct {
QuotaSetBaseOptions
ComputeQuotaOptions
}
R(&QuotaSetOptions{}, "quota-set", "Set quota for tenant", func(s *mcclient.ClientSession, args *QuotaSetOptions) error {
R(&ComputeQuotaSetOptions{}, "quota-set", "Set quota for tenant", func(s *mcclient.ClientSession, args *ComputeQuotaSetOptions) error {
params := jsonutils.Marshal(args)
result, e := modules.Quotas.DoQuotaSet(s, params)
quotas, e := modules.Quotas.DoQuotaSet(s, params)
if e != nil {
return e
}
printObject(result)
printQuotaList(quotas)
return nil
})
type RegionQuotaSetOptions struct {
QuotaSetBaseOptions
RegionQuotaOptions
}
R(&RegionQuotaSetOptions{}, "region-quota-set", "Set regional quota for tenant", func(s *mcclient.ClientSession, args *RegionQuotaSetOptions) error {
params := jsonutils.Marshal(args)
quotas, e := modules.RegionQuotas.DoQuotaSet(s, params)
if e != nil {
return e
}
printQuotaList(quotas)
return nil
})
type ZoneQuotaSetOptions struct {
QuotaSetBaseOptions
ZoneQuotaOptions
}
R(&ZoneQuotaSetOptions{}, "zone-quota-set", "Set zonal quota for tenant", func(s *mcclient.ClientSession, args *ZoneQuotaSetOptions) error {
params := jsonutils.Marshal(args)
quotas, e := modules.ZoneQuotas.DoQuotaSet(s, params)
if e != nil {
return e
}
printQuotaList(quotas)
return nil
})
type ProjectQuotaSetOptions struct {
QuotaSetBaseOptions
ProjectQuotaOptions
}
R(&ProjectQuotaSetOptions{}, "project-quota-set", "Set project quota for tenant", func(s *mcclient.ClientSession, args *ProjectQuotaSetOptions) error {
params := jsonutils.Marshal(args)
quotas, e := modules.ProjectQuotas.DoQuotaSet(s, params)
if e != nil {
return e
}
printQuotaList(quotas)
return nil
})
type ImageQuotaSetOptions struct {
QuotaSetBaseOptions
ImageQuotaOptions
}
R(&ImageQuotaSetOptions{}, "image-quota-set", "Set image quota for tenant", func(s *mcclient.ClientSession, args *ImageQuotaSetOptions) error {
params := jsonutils.Marshal(args)
quotas, e := modules.ImageQuotas.DoQuotaSet(s, params)
if e != nil {
return e
}
printQuotaList(quotas)
return nil
})
type QuotaListOptions struct {
ProjectDomain string `help:"domain name or ID to query project quotas"`
Refresh bool `help:"refresh" json:"refresh,omitfalse"`
Primary bool `help:"list primary quota ONLY" json:"primary,omitfalse"`
}
R(&QuotaListOptions{}, "quota-list", "List quota of domains or projects of a domain", func(s *mcclient.ClientSession, args *QuotaListOptions) error {
params := jsonutils.Marshal(args)
@@ -90,22 +249,98 @@ func init() {
if e != nil {
return e
}
printList(modulebase.JSON2ListResult(result), nil)
printQuotaList(result)
return nil
})
/*type QuotaCheckOptions struct {
TENANT string `help:"Tenant name or ID to check quota" json:"tenant,omitempty"`
QuotaBaseOptions
}
R(&QuotaCheckOptions{}, "quota-check", "Check quota for tenant", func(s *mcclient.ClientSession, args *QuotaCheckOptions) error {
R(&QuotaListOptions{}, "region-quota-list", "List region quota of domains or projects of a domain", func(s *mcclient.ClientSession, args *QuotaListOptions) error {
params := jsonutils.Marshal(args)
result, e := modules.Quotas.DoQuotaCheck(s, params)
result, e := modules.RegionQuotas.GetQuotaList(s, params)
if e != nil {
return e
}
printObject(result)
printQuotaList(result)
return nil
})*/
})
R(&QuotaListOptions{}, "zone-quota-list", "List zone quota of domains or projects of a domain", func(s *mcclient.ClientSession, args *QuotaListOptions) error {
params := jsonutils.Marshal(args)
result, e := modules.ZoneQuotas.GetQuotaList(s, params)
if e != nil {
return e
}
printQuotaList(result)
return nil
})
R(&QuotaListOptions{}, "project-quota-list", "List project quota of domains or projects of a domain", func(s *mcclient.ClientSession, args *QuotaListOptions) error {
params := jsonutils.Marshal(args)
result, e := modules.ProjectQuotas.GetQuotaList(s, params)
if e != nil {
return e
}
printQuotaList(result)
return nil
})
R(&QuotaListOptions{}, "image-quota-list", "List image quota of domains or projects of a domain", func(s *mcclient.ClientSession, args *QuotaListOptions) error {
params := jsonutils.Marshal(args)
result, e := modules.ImageQuotas.GetQuotaList(s, params)
if e != nil {
return e
}
printQuotaList(result)
return nil
})
type CleanPendingUsageOptions struct {
Scope string `help:"scope" choices:"domain|project"`
Project string `help:"Tenant name or ID" json:"tenant"`
Domain string `help:"Domain name or ID" json:"domain"`
}
R(&CleanPendingUsageOptions{}, "clean-pending-usage", "Clean pending usage for project or domain", func(s *mcclient.ClientSession, args *CleanPendingUsageOptions) error {
params := jsonutils.Marshal(args)
_, err := modules.Quotas.DoCleanPendingUsage(s, params)
if err != nil {
return err
}
return nil
})
R(&CleanPendingUsageOptions{}, "clean-region-pending-usage", "Clean pending usage for project or domain", func(s *mcclient.ClientSession, args *CleanPendingUsageOptions) error {
params := jsonutils.Marshal(args)
_, err := modules.RegionQuotas.DoCleanPendingUsage(s, params)
if err != nil {
return err
}
return nil
})
R(&CleanPendingUsageOptions{}, "clean-zone-pending-usage", "Clean pending usage for project or domain", func(s *mcclient.ClientSession, args *CleanPendingUsageOptions) error {
params := jsonutils.Marshal(args)
_, err := modules.ZoneQuotas.DoCleanPendingUsage(s, params)
if err != nil {
return err
}
return nil
})
R(&CleanPendingUsageOptions{}, "clean-project-pending-usage", "Clean pending usage for project or domain", func(s *mcclient.ClientSession, args *CleanPendingUsageOptions) error {
params := jsonutils.Marshal(args)
_, err := modules.ProjectQuotas.DoCleanPendingUsage(s, params)
if err != nil {
return err
}
return nil
})
R(&CleanPendingUsageOptions{}, "clean-image-pending-usage", "Clean pending usage for project or domain", func(s *mcclient.ClientSession, args *CleanPendingUsageOptions) error {
params := jsonutils.Marshal(args)
_, err := modules.ImageQuotas.DoCleanPendingUsage(s, params)
if err != nil {
return err
}
return nil
})
}

View File

@@ -28,6 +28,7 @@ func init() {
NOTES string `help:"Why reserve this IP"`
IPS []string `help:"IPs to reserve"`
Duration string `help:"reservation duration, e.g. 1I, 1H, 2M"`
Status string `help:"ip status"`
}
R(&NetworkReserveIPOptions{}, "network-reserve-ip", "Reserve an IP address from pool", func(s *mcclient.ClientSession, args *NetworkReserveIPOptions) error {
params := jsonutils.NewDict()
@@ -36,6 +37,9 @@ func init() {
if len(args.Duration) > 0 {
params.Add(jsonutils.NewString(args.Duration), "duration")
}
if len(args.Status) > 0 {
params.Add(jsonutils.NewString(args.Status), "status")
}
net, err := modules.Networks.PerformAction(s, args.NETWORK, "reserve-ip", params)
if err != nil {
return err

View File

@@ -27,6 +27,7 @@ import (
func init() {
type SecGroupsListOptions struct {
Equals string `help:"Secgroup ID or Name, filter secgroups whose rules equals the specified one"`
Server string `help:"Filter secgroups bound to specified server"`
options.BaseListOptions
}
@@ -43,6 +44,9 @@ func init() {
if len(args.Equals) > 0 {
params.Add(jsonutils.NewString(args.Equals), "equals")
}
if len(args.Server) > 0 {
params.Add(jsonutils.NewString(args.Server), "server")
}
result, err := modules.SecGroups.List(s, params)
if err != nil {
return err

View File

@@ -37,6 +37,7 @@ import (
)
func init() {
R(&options.ServerListOptions{}, "server-list", "List virtual servers", func(s *mcclient.ClientSession, opts *options.ServerListOptions) error {
params, err := options.ListStructToParams(opts)
if err != nil {
@@ -177,6 +178,19 @@ func init() {
},
)
R(&options.ServerCreateOptions{}, "server-check-create-data", "Check create server data", func(s *mcclient.ClientSession, opts *options.ServerCreateOptions) error {
params, err := opts.Params()
if err != nil {
return err
}
server, err := modules.Servers.PerformClassAction(s, "check-create-data", params.JSON(params))
if err != nil {
return err
}
printObject(server)
return nil
})
R(&options.ServerCreateOptions{}, "server-create", "Create a server", func(s *mcclient.ClientSession, opts *options.ServerCreateOptions) error {
params, err := opts.Params()
if err != nil {
@@ -318,6 +332,13 @@ func init() {
return nil
})
R(&options.ServerIdsOptions{}, "server-resume", "Resume servers", func(s *mcclient.ClientSession,
opts *options.ServerIdsOptions) error {
ret := modules.Servers.BatchPerformAction(s, opts.ID, "resume", nil)
printBatchResults(ret, modules.Servers.GetColumns(s))
return nil
})
R(&options.ServerMigrateOptions{}, "server-migrate", "Migrate server", func(s *mcclient.ClientSession, opts *options.ServerMigrateOptions) error {
params, err := options.StructToParams(opts)
if err != nil {
@@ -452,6 +473,19 @@ func init() {
return nil
})
R(&options.ServerModifySrcCheckOptions{}, "server-modify-src-check", "Modify src ip, mac check settings", func(s *mcclient.ClientSession, opts *options.ServerModifySrcCheckOptions) error {
params, err := options.StructToParams(opts)
if err != nil {
return err
}
srv, err := modules.Servers.PerformAction(s, opts.ID, "modify-src-check", params)
if err != nil {
return err
}
printObject(srv)
return nil
})
R(&options.ServerSecGroupsOptions{}, "server-set-secgroup", "Set security groups to a VM", func(s *mcclient.ClientSession, opts *options.ServerSecGroupsOptions) error {
params, err := options.StructToParams(opts)
if err != nil {
@@ -953,6 +987,7 @@ func init() {
config.Hosts[i].HostIp = yamlConfig.Hosts[i].HostIp
config.Hosts[i].XmlFilePath = yamlConfig.Hosts[i].XmlFilePath
config.Hosts[i].Servers = make([]compute.SLibvirtServerConfig, len(yamlConfig.Hosts[i].Servers))
config.Hosts[i].MonitorPath = yamlConfig.Hosts[i].MonitorPath
for j := 0; j < len(yamlConfig.Hosts[i].Servers); j++ {
config.Hosts[i].Servers[j].MacIp = make(map[string]string)
mac := yamlConfig.Hosts[i].Servers[j].Mac
@@ -975,11 +1010,11 @@ func init() {
if err != nil {
return err
}
for i := 0; i < len(params); i++ {
val := jsonutils.NewDict()
val.Set(modules.Servers.KeywordPlural, params[i])
params[i] = val
}
//for i := 0; i < len(params); i++ {
// val := jsonutils.NewDict()
// val.Set(modules.Servers.KeywordPlural, params[i])
// params[i] = val
//}
results := modules.Servers.BatchPerformClassAction(s, "import-from-libvirt", params)
printBatchResults(results, modules.Servers.GetColumns(s))

View File

@@ -0,0 +1,162 @@
// 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"
"yunion.io/x/onecloud/pkg/mcclient/options"
)
func init() {
type ServiceCatalogListOpions struct {
options.BaseListOptions
}
R(&ServiceCatalogListOpions{}, "service-catalog-list", "List service catalog", func(s *mcclient.ClientSession,
opts *ServiceCatalogListOpions) error {
params, err := options.ListStructToParams(opts)
if err != nil {
return err
}
ret, err := modules.ServiceCatalog.List(s, params)
if err != nil {
return err
}
printList(ret, modules.ServiceCatalog.GetColumns(s))
return nil
})
type ServiceCatalogCreateOptions struct {
NAME string `help:"Name of service catalog"`
GuestTemplate string `help:"guest template of service catalog"`
IconUrl string `help:"icon url of service catalog"`
GenerateName bool `help:"whether to generate name"`
}
R(&ServiceCatalogCreateOptions{}, "service-catalog-create", "Create a service catalog",
func(s *mcclient.ClientSession, opts *ServiceCatalogCreateOptions) error {
params := jsonutils.NewDict()
if opts.GenerateName {
params.Add(jsonutils.NewString(opts.NAME), "generate_name")
} else {
params.Add(jsonutils.NewString(opts.NAME), "name")
}
if len(opts.GuestTemplate) != 0 {
params.Add(jsonutils.NewString(opts.GuestTemplate), "guest_template")
}
if len(opts.IconUrl) != 0 {
params.Add(jsonutils.NewString(opts.IconUrl), "icon_url")
}
serviceCatalog, err := modules.ServiceCatalog.Create(s, params)
if err != nil {
return err
}
printObject(serviceCatalog)
return nil
},
)
type ServiceCatalogOptions struct {
ID string `help:"ID or name of service catalog"`
}
R(&ServiceCatalogOptions{}, "service-catalog-show", "show a service catalog", func(s *mcclient.ClientSession,
opts *ServiceCatalogOptions) error {
sc, err := modules.ServiceCatalog.Get(s, opts.ID, jsonutils.JSONNull)
if err != nil {
return err
}
printObject(sc)
return nil
})
R(&ServiceCatalogOptions{}, "service-catalog-delete", "delete a service catalog", func(s *mcclient.ClientSession,
opts *ServiceCatalogOptions) error {
sc, err := modules.ServiceCatalog.Delete(s, opts.ID, jsonutils.JSONNull)
if err != nil {
return err
}
printObject(sc)
return nil
})
type ServiceCatalogUpdateOptions struct {
ServiceCatalogOptions
Name string `help:"Name of service catalog"`
GuestTemplate string `help:"guest template of service catalog"`
IconUrl string `help:"icon url of service catalog"`
}
R(&ServiceCatalogUpdateOptions{}, "service-catalog-update", "update a service catalog",
func(s *mcclient.ClientSession, opts *ServiceCatalogUpdateOptions) error {
params := jsonutils.NewDict()
if len(opts.Name) > 0 {
params.Add(jsonutils.NewString(opts.Name), "name")
}
if len(opts.GuestTemplate) > 0 {
params.Add(jsonutils.NewString(opts.GuestTemplate), "guest_template")
}
if len(opts.IconUrl) > 0 {
params.Add(jsonutils.NewString(opts.IconUrl), "icon_url")
}
sc, err := modules.ServiceCatalog.Update(s, opts.ID, params)
if err != nil {
return err
}
printObject(sc)
return nil
},
)
type ServiceCatalogDeployOptions struct {
ServiceCatalogOptions
Name string `help:"Name of guest"`
GenerateName bool `help:"whether to generate name for guest"`
Count int `help:"count of guest"`
ProjectID string `help:"project id of guest"`
}
R(&ServiceCatalogDeployOptions{}, "service-catalog-deploy", "deploy", func(s *mcclient.ClientSession,
opts *ServiceCatalogDeployOptions) error {
params := jsonutils.NewDict()
if opts.GenerateName {
params.Add(jsonutils.NewString(opts.Name), "generate_name")
} else {
params.Add(jsonutils.NewString(opts.Name), "name")
}
if opts.Count != 0 {
params.Add(jsonutils.NewInt(int64(opts.Count)), "count")
}
if len(opts.ProjectID) > 0 {
params.Add(jsonutils.NewString(opts.ProjectID), "project_id")
}
sc, err := modules.ServiceCatalog.PerformAction(s, opts.ID, "deploy", params)
if err != nil {
return err
}
printObject(sc)
return nil
})
}

View File

@@ -23,6 +23,7 @@ import (
"yunion.io/x/onecloud/pkg/mcclient"
"yunion.io/x/onecloud/pkg/mcclient/modules"
"yunion.io/x/onecloud/pkg/util/fileutils2"
"yunion.io/x/onecloud/pkg/util/shellutils"
)
func init() {
@@ -163,8 +164,16 @@ func init() {
type ServiceConfigOptions struct {
SERVICE string `help:"service name or id"`
Config []string `help:"config key=value pair"`
Remove bool `help:"remove config"`
Config []string `help:"config options, can be a JSON, a YAML or a key=value pair, e.g:
* JSON
'{\"default\":{\"password_expiration_seconds\":300}}'
* YAML
default:
password_expiration_seconds: 300
* A key=value pair (under default section)
password_expiration_seconds=300
"`
Remove bool `help:"remove config"`
}
R(&ServiceConfigOptions{}, "service-config", "Add config to service", func(s *mcclient.ClientSession, args *ServiceConfigOptions) error {
config := jsonutils.NewDict()
@@ -174,6 +183,24 @@ func init() {
config.Add(jsonutils.NewString("update"), "action")
}
for _, c := range args.Config {
json, _ := jsonutils.ParseString(c)
if json != nil {
if _, ok := json.(*jsonutils.JSONDict); ok {
subconf := jsonutils.NewDict()
subconf.Add(json, "config")
config.Update(subconf)
continue
}
}
yaml, _ := jsonutils.ParseYAML(c)
if yaml != nil {
if _, ok := yaml.(*jsonutils.JSONDict); ok {
subconf := jsonutils.NewDict()
subconf.Add(yaml, "config")
config.Update(subconf)
continue
}
}
pos := strings.IndexByte(c, '=')
if pos < 0 {
return fmt.Errorf("%s is not a key=value pair", c)
@@ -213,4 +240,34 @@ func init() {
return nil
})
type ServiceConfigEditOptions struct {
SERVICE string `help:"service name or id"`
}
R(&ServiceConfigEditOptions{}, "service-config-edit", "Edit config yaml of a service", func(s *mcclient.ClientSession, args *ServiceConfigEditOptions) error {
conf, err := modules.ServicesV3.GetSpecific(s, args.SERVICE, "config", nil)
if err != nil {
return err
}
confJson, err := conf.Get("config")
if err != nil {
return err
}
content, err := shellutils.Edit(confJson.YAMLString())
if err != nil {
return err
}
yamlJson, err := jsonutils.ParseYAML(content)
if err != nil {
return err
}
config := jsonutils.NewDict()
config.Add(yamlJson, "config")
nconf, err := modules.ServicesV3.PerformAction(s, args.SERVICE, "config", config)
if err != nil {
return err
}
fmt.Println(nconf.PrettyString())
return nil
})
}

View File

@@ -44,16 +44,13 @@ func init() {
return nil
})
R(&TaskListOptions{}, "region-task-list", "List tasks on region server", func(s *mcclient.ClientSession, suboptions *TaskListOptions) error {
var params *jsonutils.JSONDict
{
var err error
params, err = suboptions.BaseListOptions.Params()
if err != nil {
return err
}
}
type RegionTaskListOptions struct {
ObjName string `help:"object name"`
ObjId string `help:"object id"`
TaskName string `help:"task name"`
}
R(&RegionTaskListOptions{}, "region-task-list", "List tasks on region server", func(s *mcclient.ClientSession, args *RegionTaskListOptions) error {
params := jsonutils.Marshal(args)
result, err := modules.ComputeTasks.List(s, params)
if err != nil {
return err

View File

@@ -22,9 +22,9 @@ import (
)
type GeneralUsageOptions struct {
HostType []string `help:"Host types" choices:"hypervisor|baremetal|esxi|xen|kubelet|hyperv|aliyun|azure|aws|huawei|qcloud|openstack|ucloud|zstack"`
Provider []string `help:"Provider" choices:"OneCloud|VMware|Aliyun|Azure|Aws|Qcloud|Huawei|OpenStack|Ucloud|ZStack"`
Brand []string `help:"Brands" choices:"OneCloud|VMware|Aliyun|Azure|Aws|Qcloud|Huawei|OpenStack|Ucloud|ZStack|DStack"`
HostType []string `help:"Host types" choices:"hypervisor|baremetal|esxi|xen|kubelet|hyperv|aliyun|azure|aws|huawei|qcloud|openstack|ucloud|zstack|google|ctyun"`
Provider []string `help:"Provider" choices:"OneCloud|VMware|Aliyun|Azure|Aws|Qcloud|Huawei|OpenStack|Ucloud|ZStack|Google|Ctyun"`
Brand []string `help:"Brands" choices:"OneCloud|VMware|Aliyun|Azure|Aws|Qcloud|Huawei|OpenStack|Ucloud|ZStack|DStack|Google|Ctyun"`
Project string `help:"show usage of specified project"`
ProjectDomain string `help:"show usage of specified domain"`

View File

@@ -149,15 +149,17 @@ func init() {
})
type UserCreateOptions struct {
NAME string `help:"Name of the new user"`
Domain string `help:"Domain"`
Desc string `help:"Description"`
Password string `help:"Password"`
Displayname string `help:"Displayname"`
Email string `help:"Email"`
Mobile string `help:"Mobile"`
Enabled bool `help:"Enabled"`
Disabled bool `help:"Disabled"`
NAME string `help:"Name of the new user"`
Domain string `help:"Domain"`
Desc string `help:"Description"`
Password *string `help:"Password"`
Displayname string `help:"Displayname"`
Email string `help:"Email"`
Mobile string `help:"Mobile"`
Enabled bool `help:"Enabled"`
Disabled bool `help:"Disabled"`
SkipPasswordComplexityCheck bool `help:"do password complexity check, default is false"`
// DefaultProject string `help:"Default project"`
SystemAccount bool `help:"is a system account?"`
@@ -174,8 +176,11 @@ func init() {
}
params.Add(jsonutils.NewString(domainId), "domain_id")
}
if len(args.Password) > 0 {
params.Add(jsonutils.NewString(args.Password), "password")
if args.Password != nil {
params.Add(jsonutils.NewString(*args.Password), "password")
if args.SkipPasswordComplexityCheck {
params.Add(jsonutils.JSONTrue, "skip_password_complexity_check")
}
}
if len(args.Displayname) > 0 {
params.Add(jsonutils.NewString(args.Displayname), "displayname")
@@ -222,16 +227,16 @@ func init() {
})
type UserUpdateOptions struct {
ID string `help:"ID or name of the user"`
Domain string `help:"Domain"`
Name string `help:"New name of the user"`
Password string `help:"New password"`
Desc string `help:"Description"`
Displayname string `help:"Displayname"`
Email string `help:"Email"`
Mobile string `help:"Mobile"`
Enabled bool `help:"Enabled"`
Disabled bool `help:"Disabled"`
ID string `help:"ID or name of the user"`
Domain string `help:"Domain"`
Name string `help:"New name of the user"`
Password *string `help:"New password"`
Desc string `help:"Description"`
Displayname string `help:"Displayname"`
Email string `help:"Email"`
Mobile string `help:"Mobile"`
Enabled bool `help:"Enabled"`
Disabled bool `help:"Disabled"`
SystemAccount bool `help:"Turn on is_system_account"`
NotSystemAccount bool `help:"Turn off is_system_account"`
@@ -262,8 +267,8 @@ func init() {
if len(args.Name) > 0 {
params.Add(jsonutils.NewString(args.Name), "name")
}
if len(args.Password) > 0 {
params.Add(jsonutils.NewString(args.Password), "password")
if args.Password != nil {
params.Add(jsonutils.NewString(*args.Password), "password")
}
if len(args.Displayname) > 0 {
params.Add(jsonutils.NewString(args.Displayname), "displayname")

View File

@@ -27,8 +27,9 @@ func init() {
type VpcListOptions struct {
options.BaseListOptions
Usable *bool `help:"Filter usable vpcs"`
Region string `help:"ID or Name of region" json:"-"`
Usable *bool `help:"Filter usable vpcs"`
Region string `help:"ID or Name of region" json:"-"`
Globalvpc string `help:"Filter by globalvpc"`
}
R(&VpcListOptions{}, "vpc-list", "List VPCs", func(s *mcclient.ClientSession, opts *VpcListOptions) error {
params, err := options.ListStructToParams(opts)
@@ -158,4 +159,13 @@ func init() {
printObject(result)
return nil
})
R(&VpcUpdateStatusOptions{}, "vpc-sync", "Synchronize the status of a vpc", func(s *mcclient.ClientSession, args *VpcUpdateStatusOptions) error {
result, err := modules.Vpcs.PerformAction(s, args.ID, "sync", nil)
if err != nil {
return err
}
printObject(result)
return nil
})
}

23
cmd/cloudevent/main.go Normal file
View File

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

138
cmd/ctyuncli/main.go Normal file
View File

@@ -0,0 +1,138 @@
// Copyright 2019 Yunion
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package main
import (
"fmt"
"os"
"yunion.io/x/structarg"
"yunion.io/x/onecloud/pkg/multicloud/ctyun"
_ "yunion.io/x/onecloud/pkg/multicloud/ctyun/shell"
"yunion.io/x/onecloud/pkg/util/shellutils"
)
type BaseOptions struct {
Help bool `help:"Show help" default:"false"`
Debug bool `help:"Show debug" default:"false"`
AccessKey string `help:"Access key" default:"$CTYUN_ACCESS_KEY"`
Secret string `help:"Secret" default:"$CTYUN_SECRET"`
RegionId string `help:"RegionId" default:"$CTYUN_REGION"`
SUBCOMMAND string `help:"ctyuncli subcommand" subcommand:"true"`
}
func getSubcommandParser() (*structarg.ArgumentParser, error) {
parse, e := structarg.NewArgumentParser(&BaseOptions{},
"ctyuncli",
"Command-line interface to ctyun API.",
`See "ctyuncli help COMMAND" for help on a specific command.`)
if e != nil {
return nil, e
}
subcmd := parse.GetSubcommand()
if subcmd == nil {
return nil, fmt.Errorf("No subcommand argument.")
}
type HelpOptions struct {
SUBCOMMAND string `help:"sub-command name"`
}
shellutils.R(&HelpOptions{}, "help", "Show help of a subcommand", func(args *HelpOptions) error {
helpstr, e := subcmd.SubHelpString(args.SUBCOMMAND)
if e != nil {
return e
} else {
fmt.Print(helpstr)
return nil
}
})
for _, v := range shellutils.CommandTable {
_, e := subcmd.AddSubParser(v.Options, v.Command, v.Desc, v.Callback)
if e != nil {
return nil, e
}
}
return parse, nil
}
func showErrorAndExit(e error) {
fmt.Fprintf(os.Stderr, "%s", e)
fmt.Fprintln(os.Stderr)
os.Exit(1)
}
func newClient(options *BaseOptions) (*ctyun.SRegion, error) {
if len(options.AccessKey) == 0 {
return nil, fmt.Errorf("Missing accessKey")
}
if len(options.Secret) == 0 {
return nil, fmt.Errorf("Missing secret")
}
cli, err := ctyun.NewSCtyunClient("", "", "",
options.AccessKey, options.Secret, options.Debug)
if err != nil {
return nil, err
}
region := cli.GetRegion(options.RegionId)
if region == nil {
return nil, fmt.Errorf("No such region %s", options.RegionId)
}
return region, nil
}
func main() {
parser, e := getSubcommandParser()
if e != nil {
showErrorAndExit(e)
}
e = parser.ParseArgs(os.Args[1:], false)
options := parser.Options().(*BaseOptions)
if options.Help {
fmt.Print(parser.HelpString())
} else {
subcmd := parser.GetSubcommand()
subparser := subcmd.GetSubParser()
if e != nil {
if subparser != nil {
fmt.Print(subparser.Usage())
} else {
fmt.Print(parser.Usage())
}
showErrorAndExit(e)
} else {
suboptions := subparser.Options()
if options.SUBCOMMAND == "help" {
e = subcmd.Invoke(suboptions)
} else {
var region *ctyun.SRegion
region, e = newClient(options)
if e != nil {
showErrorAndExit(e)
}
e = subcmd.Invoke(region, suboptions)
}
if e != nil {
showErrorAndExit(e)
}
}
}
}

26
cmd/devtool/main.go Normal file
View File

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

147
cmd/googlecli/main.go Normal file
View File

@@ -0,0 +1,147 @@
// Copyright 2019 Yunion
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package main
import (
"fmt"
"os"
"yunion.io/x/log"
"yunion.io/x/structarg"
"yunion.io/x/onecloud/pkg/multicloud/google"
_ "yunion.io/x/onecloud/pkg/multicloud/google/shell"
"yunion.io/x/onecloud/pkg/util/shellutils"
)
type BaseOptions struct {
Debug bool `help:"debug mode"`
Help bool `help:"Show help"`
ClientEmail string `help:"Client email" default:"$GOOGLE_CLIENT_EMAIL"`
ProjectID string `help:"Project ID" default:"$GOOGLE_PROJECT_ID"`
PrivateKeyID string `help:"Private Key ID" default:"$GOOGLE_PRIVATE_KEY_ID"`
PrivateKey string `help:"Private Key" default:"$GOOGLE_PRIVATE_KEY"`
RegionID string `help:"RegionID" default:"$GOOGLE_REGION"`
SUBCOMMAND string `help:"googlecli subcommand" subcommand:"true"`
}
func getSubcommandParser() (*structarg.ArgumentParser, error) {
parse, e := structarg.NewArgumentParser(&BaseOptions{},
"googlecli",
"Command-line interface to google API.",
`See "googlecli help COMMAND" for help on a specific command.`)
if e != nil {
return nil, e
}
subcmd := parse.GetSubcommand()
if subcmd == nil {
return nil, fmt.Errorf("No subcommand argument.")
}
type HelpOptions struct {
SUBCOMMAND string `help:"sub-command name"`
}
shellutils.R(&HelpOptions{}, "help", "Show help of a subcommand", func(args *HelpOptions) error {
helpstr, e := subcmd.SubHelpString(args.SUBCOMMAND)
if e != nil {
return e
} else {
fmt.Print(helpstr)
return nil
}
})
for _, v := range shellutils.CommandTable {
_, e := subcmd.AddSubParser(v.Options, v.Command, v.Desc, v.Callback)
if e != nil {
return nil, e
}
}
return parse, nil
}
func showErrorAndExit(e error) {
log.Errorf("%s", e)
os.Exit(1)
}
func newClient(options *BaseOptions) (*google.SRegion, error) {
if len(options.ClientEmail) == 0 {
return nil, fmt.Errorf("Missing ClientEmail")
}
if len(options.PrivateKeyID) == 0 {
return nil, fmt.Errorf("Missing PrivateKeyID")
}
if len(options.PrivateKey) == 0 {
return nil, fmt.Errorf("Missing PrivateKey")
}
if len(options.ProjectID) == 0 {
return nil, fmt.Errorf("Missing ProjectID")
}
cli, err := google.NewGoogleClient("", "", options.ProjectID, options.ClientEmail, options.PrivateKeyID, options.PrivateKey, options.Debug)
if err != nil {
return nil, err
}
region := cli.GetRegion(options.RegionID)
if region == nil {
return nil, fmt.Errorf("No such region %s", options.RegionID)
}
return region, nil
}
func main() {
parser, e := getSubcommandParser()
if e != nil {
showErrorAndExit(e)
}
e = parser.ParseArgs(os.Args[1:], false)
options := parser.Options().(*BaseOptions)
if options.Help {
fmt.Print(parser.HelpString())
return
}
subcmd := parser.GetSubcommand()
subparser := subcmd.GetSubParser()
if e != nil {
if subparser != nil {
fmt.Print(subparser.Usage())
} else {
fmt.Print(parser.Usage())
}
showErrorAndExit(e)
return
}
suboptions := subparser.Options()
if options.SUBCOMMAND == "help" {
e = subcmd.Invoke(suboptions)
} else {
var region *google.SRegion
region, e = newClient(options)
if e != nil {
showErrorAndExit(e)
}
e = subcmd.Invoke(region, suboptions)
}
if e != nil {
showErrorAndExit(e)
}
}

View File

@@ -0,0 +1,30 @@
secgroupId:
name: secgroupId
required: true
in: path
type: string
description: 安全组名称或者ID
scope:
name: scope
in: body
type: string
enum: [project, domain, system]
default: system
description: specify scope, either project, domain or system
shared_projects:
name: shared_projects
in: body
type: array
items:
type: string
example: test-project
description: 项目名称或ID
description: 共享到的项目列表, 仅scope=project有效
server:
name: server
in: query
type: string
description: Filter secgroups bound to specified server

View File

@@ -661,6 +661,13 @@ InstanceCreate:
items:
type: string
description: 主机组的ID或者Name
secgroups:
type: array
description: 安全组列表
items:
type: string
example: default
description: 安全组名称或ID,建议使用ID
InstanceDisk:

48
go.mod
View File

@@ -3,8 +3,9 @@ module yunion.io/x/onecloud
go 1.12
require (
cloud.google.com/go v0.38.0
github.com/360EntSecGroup-Skylar/excelize v1.4.0
github.com/Azure/azure-sdk-for-go v34.4.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
@@ -13,7 +14,7 @@ require (
github.com/Shopify/sarama v1.20.0 // indirect
github.com/StackExchange/wmi v0.0.0-20180116203802-5d049714c4a6 // indirect
github.com/aliyun/alibaba-cloud-sdk-go v0.0.0-20180112035716-b5829a0278c8
github.com/aliyun/aliyun-oss-go-sdk v0.0.0-20181116160301-c6838fdc33ed
github.com/aliyun/aliyun-oss-go-sdk v2.0.4+incompatible
github.com/anacrolix/dht v0.0.0-20181129074040-b09db78595aa // indirect
github.com/anacrolix/go-libutp v0.0.0-20180808010927-aebbeb60ea05 // indirect
github.com/anacrolix/log v0.0.0-20180808012509-286fcf906b48 // indirect
@@ -27,13 +28,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
@@ -57,10 +55,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
@@ -70,9 +65,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
@@ -80,8 +72,6 @@ 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
@@ -95,11 +85,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,30 +101,28 @@ 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 v1.1.0 // indirect
github.com/spf13/pflag v1.0.3 // indirect
github.com/stretchr/testify v1.3.0
github.com/stretchr/testify v1.4.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-20191002192127-34f69633bfdc
golang.org/x/net v0.0.0-20191007182048-72f939374954
golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6
golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45
golang.org/x/sync v0.0.0-20190423024810-112230192c58
golang.org/x/sys v0.0.0-20191008105621-543471e840be
golang.zx2c4.com/wireguard/wgctrl v0.0.0-20191008142428-8d021180e987
google.golang.org/grpc v1.19.0
google.golang.org/api v0.13.0 // indirect
google.golang.org/genproto v0.0.0-20190502173448-54afdca5d873
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
@@ -150,12 +135,11 @@ 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-20191005115334-bb1c187fc0e7
yunion.io/x/log v0.0.0-20190629062853-9f6483a7103d
yunion.io/x/pkg v0.0.0-20191024065906-00964c53d82f
yunion.io/x/jsonutils v0.0.0-20200303051356-aa609aba0cda
yunion.io/x/log v0.0.0-20200313080802-57a4ce5966b3
yunion.io/x/pkg v0.0.0-20200312093207-f07f4cb157e0
yunion.io/x/s3cli v0.0.0-20190917004522-13ac36d8687e
yunion.io/x/sqlchemy v0.0.0-20191008135637-33eb2e4f6cc7
yunion.io/x/sqlchemy v0.0.0-20200312002602-1177cd8fbc57
yunion.io/x/structarg v0.0.0-20190809075558-115bed041de3
)

158
go.sum
View File

@@ -3,11 +3,13 @@ cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMT
cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw=
cloud.google.com/go v0.37.4 h1:glPeL3BQJsbF6aIIYfZizMwc5LTYz250bDMjttbBGAU=
cloud.google.com/go v0.37.4/go.mod h1:NHPJ89PdicEuT9hdPXMROBD91xc5uRDxsMtSB16k7hw=
cloud.google.com/go v0.38.0 h1:ROfEUZz+Gh5pa62DJWXSaonyu3StP6EA6lPEXPI6mCo=
cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU=
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 v34.4.0+incompatible h1:NQG6PyG1+y9lL5SLWy+urw+VYMQloAKwmdqAzg8ZorM=
github.com/Azure/azure-sdk-for-go v34.4.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 +19,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=
@@ -32,8 +35,8 @@ github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuy
github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0=
github.com/aliyun/alibaba-cloud-sdk-go v0.0.0-20180112035716-b5829a0278c8 h1:mb7rn6WX8viizO36Nv6VVCBrgwaq01HPrZv1qq07/Yg=
github.com/aliyun/alibaba-cloud-sdk-go v0.0.0-20180112035716-b5829a0278c8/go.mod h1:T9M45xf79ahXVelWoOBmH0y4aC1t5kXO5BxwyakgIGA=
github.com/aliyun/aliyun-oss-go-sdk v0.0.0-20181116160301-c6838fdc33ed h1:8Nj1ihALo/UVM2EnOVQ1EY/kwNKRwLx1GW/z3Y65czY=
github.com/aliyun/aliyun-oss-go-sdk v0.0.0-20181116160301-c6838fdc33ed/go.mod h1:T/Aws4fEfogEE9v+HPhhw+CntffsBHJ8nXQCwKr0/g8=
github.com/aliyun/aliyun-oss-go-sdk v2.0.4+incompatible h1:EaK5256H3ELiyaq5O/Zwd6fnghD6DqmZDQmmzzJklUU=
github.com/aliyun/aliyun-oss-go-sdk v2.0.4+incompatible/go.mod h1:T/Aws4fEfogEE9v+HPhhw+CntffsBHJ8nXQCwKr0/g8=
github.com/anacrolix/dht v0.0.0-20180412060941-24cbf25b72a4/go.mod h1:hQfX2BrtuQsLQMYQwsypFAab/GvHg8qxwVi4OJdR1WI=
github.com/anacrolix/dht v0.0.0-20181127122252-acaa69c368bb/go.mod h1:Z/mP+H70xwnUv957UXVkTrzYRhKs0mGjS0lyqS331g4=
github.com/anacrolix/dht v0.0.0-20181129074040-b09db78595aa h1:5RyX9Tvqa9oewlJhFihkxe8biS0ojTlrNU3ryqm5g2s=
@@ -76,8 +79,10 @@ github.com/aws/aws-sdk-go v1.21.4 h1:1xB+x6Dzev8ETmeHEiSfUVbIzmC/0EyFfXMkJpzKPCE
github.com/aws/aws-sdk-go v1.21.4/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo=
github.com/baiyubin/aliyun-sts-go-sdk v0.0.0-20180326062324-cfa1a18b161f h1:ZNv7On9kyUzm7fvRZumSyy/IUiSC7AzL0I1jKKtwooA=
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=
@@ -91,18 +96,20 @@ github.com/bradfitz/iter v0.0.0-20140124041915-454541ec3da2/go.mod h1:PyRFw1Lt2w
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/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=
@@ -117,6 +124,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=
@@ -169,8 +177,9 @@ github.com/go-yaml/yaml v2.1.0+incompatible/go.mod h1:w2MrLa16VYP0jy6N7M5kHaCkaL
github.com/gofrs/uuid v3.2.0+incompatible h1:y12jRkkFxsd7GpqdSZ+/KCs/fJbqpEXSGd4+jfEaewE=
github.com/gofrs/uuid v3.2.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM=
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,14 +188,15 @@ 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=
github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A=
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=
@@ -194,28 +204,29 @@ github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Z
github.com/google/btree v1.0.0 h1:0udJVsspx3VBr5FwtLhQQtuAsVc79tTq0ocGIPAU6qo=
github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ=
github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M=
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-cmp v0.3.1 h1:Xye71clBPdm5HgqGwUkwhbynsUJZhDbS20FvLhQ2izg=
github.com/google/go-cmp v0.3.1/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=
github.com/googleapis/gax-go/v2 v2.0.5 h1:sjZBwGj9Jlw33ImPtvFviGYvseOtDM7hkSKB7+Tv3SM=
github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk=
github.com/googleapis/gnostic v0.2.0 h1:l6N3VoaVzTncYYW+9yOz2LJJammFZGBO13sqgEhpy9g=
github.com/googleapis/gnostic v0.2.0/go.mod h1:sJBsCZ4ayReDTBIg8b9dl28c5xFWyhBTVRp3pOg5EKY=
github.com/googollee/go-engine.io v0.0.0-20180829091931-e2f255711dcb h1:n22Aukg/TjoypWc37dbKIpCsz0VMFPD36HQk1WKvg3A=
github.com/googollee/go-engine.io v0.0.0-20180829091931-e2f255711dcb/go.mod h1:MBpz1MS3P4HtRcBpQU4HcjvWXZ9q+JWacMEh2/BFYbg=
github.com/googollee/go-socket.io v0.0.0-20181214084611-0ad7206c347a h1:NMY2a78Z98wdhMHJTJxTc9BFfnGGc5ZWfgY9a23zeck=
github.com/googollee/go-socket.io v0.0.0-20181214084611-0ad7206c347a/go.mod h1:ftBGBMhSYToR5oV4ImIPKvAIsNaTkLC+tTvoNafqxlQ=
github.com/gopherjs/gopherjs v0.0.0-20180628210949-0892b62f0d9f h1:FDM3EtwZLyhW48YRiyqjivNlNZjAObv4xt4NnJaU+NQ=
github.com/gopherjs/gopherjs v0.0.0-20180628210949-0892b62f0d9f/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY=
github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1 h1:EGx4pi6eqNxGaHF6qqu48+N2wcFQ5qg5FXgOdqsJ5d8=
github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY=
@@ -223,6 +234,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=
@@ -231,23 +243,26 @@ 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=
github.com/hako/durafmt v0.0.0-20180520121703-7b7ae1e72ead/go.mod h1:5Scbynm8dF1XAPwIwkGPqzkM/shndPm79Jd1003hTjE=
github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8=
github.com/hashicorp/golang-lru v0.5.1 h1:0hERBMJE1eitiLkihrMvRVBYAkpHzc/J3QdDN+dAcgU=
github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8=
github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU=
github.com/huandu/xstrings v1.0.0/go.mod h1:4qWG/gcEcfX4z/mBDHJ++3ReCw9ibxbsNJbcucJdbSo=
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/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=
@@ -260,14 +275,15 @@ github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af/go.mod h1:Nht
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/jsimonetti/rtnetlink v0.0.0-20190606172950-9527aa82566a/go.mod h1:Oz+70psSo5OFh8DBl0Zv2ACw7Esh6pPUphlvZG9x7uw=
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=
@@ -286,11 +302,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/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=
@@ -327,10 +346,12 @@ 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=
@@ -342,6 +363,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=
@@ -370,17 +392,20 @@ github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZN
github.com/pquerna/otp v1.2.0 h1:/A3+Jn+cagqayeR3iHs/L62m5ue7710D35zl1zJ1kok=
github.com/pquerna/otp v1.2.0/go.mod h1:dkJfzwRKNiegxyNb54X/3fLwhCynbMspSyWKnvi1AEg=
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_model v0.0.0-20180712105110-5c3871d89910 h1:idejC8f05m9MGOsuEi1ATq9shN03HrxNkD/luQvxCv8=
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/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/common v0.2.0 h1:kUZDBDTdBVBYBj5Tmh2NZLlF60mfjA27rM34b+cVwNU=
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/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=
@@ -399,22 +424,20 @@ github.com/sirupsen/logrus v1.4.2 h1:SPIRibHv4MatM3XXNO2BJeFLZwZ2LvZgfQ5+UNI2im4
github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE=
github.com/skip2/go-qrcode v0.0.0-20190110000554-dc11ecdae0a9 h1:lpEzuenPuO1XNTeikEmvqYFcU37GVLl8SRNblzyvGBE=
github.com/skip2/go-qrcode v0.0.0-20190110000554-dc11ecdae0a9/go.mod h1:PLPIyL7ikehBD1OAjmKKiOEhbvWyHGaNDjquXMcYABo=
github.com/smartystreets/assertions v0.0.0-20180607162144-eb5b59917fa2 h1:hjkfjJKpNSPqJZJKSrHbQgBz+eEui8ivYlorRc9DR64=
github.com/smartystreets/assertions v0.0.0-20180607162144-eb5b59917fa2/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc=
github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d h1:zE9ykElWQ6/NYmHa3jpm/yHnI4xSofP+UP6SpjHcSeM=
github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc=
github.com/smartystreets/goconvey v0.0.0-20180222194500-ef6db91d284a h1:JSvGDIbmil4Ui/dDdFBExb7/cmkNjyX5F97oglmvCDo=
github.com/smartystreets/goconvey v0.0.0-20180222194500-ef6db91d284a/go.mod h1:XDJAKZRPZ1CvBcN2aX5YOUTYGHki24fSF0Iv48Ibg0s=
github.com/smartystreets/goconvey v0.0.0-20190330032615-68dc04aab96a h1:pa8hGb/2YqsZKovtsgrwcDH1RZhVbTKCjLp47XpqCDs=
github.com/smartystreets/goconvey v0.0.0-20190330032615-68dc04aab96a/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA=
github.com/smartystreets/gunit v0.0.0-20180314194857-6f0d6275bdcd h1:p5kvxG4NHogJX1brTLtvUSGdW0/aBvIyqDSW7tmnsmQ=
github.com/smartystreets/gunit v0.0.0-20180314194857-6f0d6275bdcd/go.mod h1:XUKj4gbqj2QvJk/OdLWzyZ3FYli0f+MdpngyryX0gcw=
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/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=
@@ -422,24 +445,27 @@ github.com/stretchr/objx v0.1.1 h1:2vfRuCMp5sSVIDSqO8oNnWJq7mPa6KVP3iPIwFBuy8A=
github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/testify v1.2.1/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=
github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=
github.com/stretchr/testify v1.3.0 h1:TivCn/peBQ7UY8ooIcPgZFpTNSz0Q2U6UrFlUfqbe0Q=
github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
github.com/stretchr/testify v1.4.0 h1:2E4SXV/wtOkTonXsotYi4li6zVWxYlZuYNCXe9XRJyk=
github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4=
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=
@@ -456,9 +482,12 @@ github.com/yunionio/go-ceph v0.0.0-20190912101231-6f05a06b3859 h1:wu596gn6sV3j5w
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.opencensus.io v0.21.0 h1:mU6zScU4U1YAFPHEHYk+3JC4SY7JxgkqS10ZOSyksNg=
go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU=
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=
@@ -467,12 +496,10 @@ go.uber.org/zap v1.10.0 h1:ORx85nbTijNz8ljznvCMR1ZBIPKFn3jQrag10X2AsuM=
go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q=
golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
golang.org/x/crypto v0.0.0-20190103213133-ff983b9c42bc/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2 h1:VklqNMn3ovrHsnt90PveolxSbWFaJdECFbxSq0Mqo2M=
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
golang.org/x/crypto v0.0.0-20190325154230-a5d413f7728c/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
golang.org/x/crypto v0.0.0-20190513172903-22d7a77e9e5f/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
golang.org/x/crypto v0.0.0-20190621222207-cc06ce4a13d4 h1:ydJNl0ENAG67pFbB+9tfhiL2pYqLhfoaZFw/cjLhY4A=
golang.org/x/crypto v0.0.0-20190621222207-cc06ce4a13d4/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
golang.org/x/crypto v0.0.0-20190829043050-9756ffdc2472/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
golang.org/x/crypto v0.0.0-20191002192127-34f69633bfdc h1:c0o/qxkaO2LF5t6fQrT4b5hzyggAkLLlCUjqfRxd8Q4=
@@ -481,6 +508,8 @@ 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/lint v0.0.0-20190409202823-959b441ac422/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=
@@ -494,9 +523,10 @@ golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn
golang.org/x/net v0.0.0-20190313220215-9f648a60d977/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
golang.org/x/net v0.0.0-20190419010253-1f3472d942ba/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
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/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
golang.org/x/net v0.0.0-20190827160401-ba9fcec4b297/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
golang.org/x/net v0.0.0-20191003171128-d98b1b443823/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
golang.org/x/net v0.0.0-20191007182048-72f939374954 h1:JGZucVF/L/TotR719NbujzadOZ2AgnYlqphQGHDCKaU=
@@ -504,12 +534,14 @@ golang.org/x/net v0.0.0-20191007182048-72f939374954/go.mod h1:z5CRVTTTmAJ677TzLL
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=
golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45 h1:SVwTIAaPC2U/AvvLNZ2a7OVsmBpC8L5BlwK1whH3hm0=
golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20181108010431-42b317875d0f h1:Bl/8QSvNqXvPGPGXa2z5xUTmV7VDcZyvRZ+QQXkXTZQ=
golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
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=
@@ -526,48 +558,62 @@ golang.org/x/sys v0.0.0-20190411185658-b44545bcd369/go.mod h1:h1NjWce9XRLGQEsW7w
golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
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-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20190606122018-79a91cf218c4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20190826190057-c7b8b68b1456/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20190830023255-19e00faab6ad/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20191003212358-c178f38b412c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20191008105621-543471e840be h1:QAcqgptGM8IQBC9K/RC4o+O9YmqEm0diQn9QmZw/0mU=
golang.org/x/sys v0.0.0-20191008105621-543471e840be/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=
golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.2 h1:tW2bmiBqwgJj/UpqtC8EpXEZVYOwU0yG4iWbprSVAcs=
golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk=
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-20180917221912-90fa682c2a6e/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-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q=
golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q=
golang.zx2c4.com/wireguard v0.0.20190908 h1:SUoXDdwSMtomLdvke+zz83/u9tNvl4hHmcTIWp38tow=
golang.zx2c4.com/wireguard v0.0.20190908/go.mod h1:LhfXh5z6bLC2lW2ve6BzYZFwnnsXK3OQjySR0Yh2dO8=
golang.zx2c4.com/wireguard/wgctrl v0.0.0-20191008142428-8d021180e987 h1:26OAgqBTufVr8WKonCEhhjO1oKsYhHv0iM5Dg92G1TM=
golang.zx2c4.com/wireguard/wgctrl v0.0.0-20191008142428-8d021180e987/go.mod h1:7hq1rEDsx7/FWl8IEEnfH2Xhs6M2MNnjUfN0PeI8Rm0=
google.golang.org/api v0.3.1/go.mod h1:6wY9I6uQWHQ8EM57III9mq/AjF+i8G65rmVagqKMtkk=
google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE=
google.golang.org/api v0.13.0 h1:Q3Ui3V3/CVinFWFiW39Iw0kMuVrRzYX0wN6OPFp0lTA=
google.golang.org/api v0.13.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI=
google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM=
google.golang.org/appengine v1.4.0 h1:/wp5JvzpHIxhs/dumFmF7BXTf3Z+dd4uXta4kVyO508=
google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4=
google.golang.org/appengine v1.5.0 h1:KxkO13IPW4Lslp2bz+KHP2E3gtFlrIGNThxkZQ3g+4c=
google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4=
google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc=
google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE=
google.golang.org/genproto v0.0.0-20190404172233-64821d5d2107 h1:xtNn7qFlagY2mQNFHMSRPjT2RkOV4OXM7P5TVy9xATo=
google.golang.org/genproto v0.0.0-20190404172233-64821d5d2107/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE=
google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE=
google.golang.org/genproto v0.0.0-20190502173448-54afdca5d873 h1:nfPFGzJkUDX6uBmpN/pSw7MbOAWegH5QDQuoXFHedLg=
google.golang.org/genproto v0.0.0-20190502173448-54afdca5d873/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE=
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.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38=
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=
@@ -591,6 +637,8 @@ 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-20190418001031-e561f6794a2a/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=
@@ -605,19 +653,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/jsonutils v0.0.0-20200303051356-aa609aba0cda h1:wSwQj3MDGchGYM2RAo1riYhrTz4apH+5XyBnchuDi84=
yunion.io/x/jsonutils v0.0.0-20200303051356-aa609aba0cda/go.mod h1:T7kxQJR13+t7z0TuT+Wzd7MTxBOk2H9c0pO1ONQSv90=
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/log v0.0.0-20200313080802-57a4ce5966b3 h1:5Wc5hkB8PtMudmHuzCyok960RuOa9I55imIGrigSdjs=
yunion.io/x/log v0.0.0-20200313080802-57a4ce5966b3/go.mod h1:LC6f/4FozL0iaAbnFt2eDX9jlsyo3WiOUPm03d7+U4U=
yunion.io/x/pkg v0.0.0-20190620104149-945c25821dbf/go.mod h1:t6rEGG2sQ4J7DhFxSZVOTjNd0YO/KlfWQyK1W4tog+E=
yunion.io/x/pkg v0.0.0-20191024065906-00964c53d82f h1:rliduzLUj5k4kuY9kxbMDvMtxAANAOZ/hrsslpGK+fA=
yunion.io/x/pkg v0.0.0-20191024065906-00964c53d82f/go.mod h1:t6rEGG2sQ4J7DhFxSZVOTjNd0YO/KlfWQyK1W4tog+E=
yunion.io/x/pkg v0.0.0-20200302034534-fdf44d54b070/go.mod h1:t6rEGG2sQ4J7DhFxSZVOTjNd0YO/KlfWQyK1W4tog+E=
yunion.io/x/pkg v0.0.0-20200312093207-f07f4cb157e0 h1:ZgNhWrnxnVjw53rjx5uV5yQCYcwM8lpVHsrchmHWQI4=
yunion.io/x/pkg v0.0.0-20200312093207-f07f4cb157e0/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-20191008135637-33eb2e4f6cc7 h1:9bxOxNLNN18mJoR8GDPVtRJIpDBgA3dYmEBsuVDy0O4=
yunion.io/x/sqlchemy v0.0.0-20191008135637-33eb2e4f6cc7/go.mod h1:FTdwPdGhMgh4E+UFXc9klI1Ok34fMuybTT+jLhOaIjI=
yunion.io/x/sqlchemy v0.0.0-20200312002602-1177cd8fbc57 h1:KtQAuLJ00RSUVqkiRmJ1DiDABiw0U3xxXnzD3lGavaY=
yunion.io/x/sqlchemy v0.0.0-20200312002602-1177cd8fbc57/go.mod h1:FTdwPdGhMgh4E+UFXc9klI1Ok34fMuybTT+jLhOaIjI=
yunion.io/x/structarg v0.0.0-20190809075558-115bed041de3 h1:bfC8EhXYvyGYldRWlzxiCM39Zfj3s3+zham9mW2h2LE=
yunion.io/x/structarg v0.0.0-20190809075558-115bed041de3/go.mod h1:EP6NSv2C0zzqBDTKumv8hPWLb3XvgMZDHQRfyuOrQng=

View File

@@ -20,12 +20,13 @@ import (
"sync"
"time"
"github.com/pkg/errors"
"yunion.io/x/jsonutils"
"yunion.io/x/log"
"yunion.io/x/pkg/errors"
"yunion.io/x/sqlchemy"
"yunion.io/x/onecloud/pkg/apis"
api "yunion.io/x/onecloud/pkg/apis/ansible"
"yunion.io/x/onecloud/pkg/cloudcommon/db"
"yunion.io/x/onecloud/pkg/httperrors"
"yunion.io/x/onecloud/pkg/mcclient"
@@ -75,8 +76,19 @@ func (man *SAnsiblePlaybookManager) ValidateCreateData(ctx context.Context, user
if err := pbV.Validate(data); err != nil {
return nil, err
}
data.Set("status", jsonutils.NewString(AnsiblePlaybookStatusInit))
return man.SVirtualResourceBaseManager.ValidateCreateData(ctx, userCred, ownerId, query, data)
data.Set("status", jsonutils.NewString(api.AnsiblePlaybookStatusInit))
var err error
input := apis.VirtualResourceCreateInput{}
err = data.Unmarshal(&input)
if err != nil {
return nil, httperrors.NewInternalServerError("unmarshal VirtualResourceCreateInput fail %s", err)
}
input, err = man.SVirtualResourceBaseManager.ValidateCreateData(ctx, userCred, ownerId, query, input)
if err != nil {
return nil, err
}
data.Update(jsonutils.Marshal(input))
return data, nil
}
func (apb *SAnsiblePlaybook) PostCreate(ctx context.Context, userCred mcclient.TokenCredential, ownerId mcclient.IIdentityProvider, query jsonutils.JSONObject, data jsonutils.JSONObject) {
@@ -90,14 +102,14 @@ func (apb *SAnsiblePlaybook) PostCreate(ctx context.Context, userCred mcclient.T
func (man *SAnsiblePlaybookManager) InitializeData() error {
pbs := []SAnsiblePlaybook{}
q := AnsiblePlaybookManager.Query()
q = q.Filter(sqlchemy.Equals(q.Field("status"), AnsiblePlaybookStatusRunning))
q = q.Filter(sqlchemy.Equals(q.Field("status"), api.AnsiblePlaybookStatusRunning))
if err := db.FetchModelObjects(AnsiblePlaybookManager, q, &pbs); err != nil {
return errors.WithMessage(err, "fetch running playbooks")
return errors.Wrap(err, "fetch running playbooks")
}
for i := 0; i < len(pbs); i++ {
pb := &pbs[i]
_, err := db.Update(pb, func() error {
pb.Status = AnsiblePlaybookStatusUnknown
pb.Status = api.AnsiblePlaybookStatusUnknown
return nil
})
if err != nil {
@@ -108,14 +120,14 @@ func (man *SAnsiblePlaybookManager) InitializeData() error {
}
func (apb *SAnsiblePlaybook) ValidateDeleteCondition(ctx context.Context) error {
if apb.Status == AnsiblePlaybookStatusRunning {
if apb.Status == api.AnsiblePlaybookStatusRunning {
return httperrors.NewConflictError("playbook is in running state")
}
return nil
}
func (apb *SAnsiblePlaybook) ValidateUpdateCondition(ctx context.Context) error {
if apb.Status == AnsiblePlaybookStatusRunning {
if apb.Status == api.AnsiblePlaybookStatusRunning {
return httperrors.NewConflictError("playbook is in running state")
}
return nil
@@ -127,7 +139,7 @@ func (apb *SAnsiblePlaybook) ValidateUpdateData(ctx context.Context, userCred mc
return nil, err
}
apb.Playbook = pbV.Playbook // Update as a whole
data.Set("status", jsonutils.NewString(AnsiblePlaybookStatusInit))
data.Set("status", jsonutils.NewString(api.AnsiblePlaybookStatusInit))
return data, nil
}
@@ -184,7 +196,7 @@ func (apb *SAnsiblePlaybook) runPlaybook(ctx context.Context, userCred mcclient.
apb.StartTime = time.Now()
apb.EndTime = time.Time{}
apb.Output = ""
apb.Status = AnsiblePlaybookStatusRunning
apb.Status = api.AnsiblePlaybookStatusRunning
return nil
})
if err != nil {
@@ -204,12 +216,12 @@ func (apb *SAnsiblePlaybook) runPlaybook(ctx context.Context, userCred mcclient.
_, err := db.Update(apb, func() error {
err := man.sessions.Err(apb.Id)
if err != nil {
apb.Status = AnsiblePlaybookStatusCanceled
apb.Status = api.AnsiblePlaybookStatusCanceled
} else if runErr != nil {
log.Warningf("playbook %s(%s) failed: %v", apb.Name, apb.Id, runErr)
apb.Status = AnsiblePlaybookStatusFailed
apb.Status = api.AnsiblePlaybookStatusFailed
} else {
apb.Status = AnsiblePlaybookStatusSucceeded
apb.Status = api.AnsiblePlaybookStatusSucceeded
}
apb.EndTime = time.Now()
return nil
@@ -226,9 +238,9 @@ 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 {
if apb.Status == api.AnsiblePlaybookStatusRunning {
_, err := db.Update(apb, func() error {
apb.Status = AnsiblePlaybookStatusUnknown
apb.Status = api.AnsiblePlaybookStatusUnknown
return nil
})
if err != nil {

View File

@@ -26,6 +26,8 @@ import (
"yunion.io/x/log"
"yunion.io/x/sqlchemy"
"yunion.io/x/onecloud/pkg/apis"
api "yunion.io/x/onecloud/pkg/apis/ansible"
"yunion.io/x/onecloud/pkg/cloudcommon/db"
"yunion.io/x/onecloud/pkg/httperrors"
"yunion.io/x/onecloud/pkg/mcclient"
@@ -71,8 +73,18 @@ func init() {
}
func (man *SAnsiblePlaybookV2Manager) ValidateCreateData(ctx context.Context, userCred mcclient.TokenCredential, ownerId mcclient.IIdentityProvider, query jsonutils.JSONObject, data *jsonutils.JSONDict) (*jsonutils.JSONDict, error) {
data.Set("status", jsonutils.NewString(AnsiblePlaybookStatusInit))
return man.SVirtualResourceBaseManager.ValidateCreateData(ctx, userCred, ownerId, query, data)
data.Set("status", jsonutils.NewString(api.AnsiblePlaybookStatusInit))
input := apis.VirtualResourceCreateInput{}
err := data.Unmarshal(&input)
if err != nil {
return nil, httperrors.NewInternalServerError("unmarshal StandaloneResourceCreateInput fail %s", err)
}
input, err = man.SVirtualResourceBaseManager.ValidateCreateData(ctx, userCred, ownerId, query, input)
if err != nil {
return nil, err
}
data.Update(jsonutils.Marshal(input))
return data, nil
}
func (apb *SAnsiblePlaybookV2) PostCreate(ctx context.Context, userCred mcclient.TokenCredential, ownerId mcclient.IIdentityProvider, query jsonutils.JSONObject, data jsonutils.JSONObject) {
@@ -86,14 +98,14 @@ func (apb *SAnsiblePlaybookV2) PostCreate(ctx context.Context, userCred mcclient
func (man *SAnsiblePlaybookV2Manager) InitializeData() error {
pbs := []SAnsiblePlaybookV2{}
q := AnsiblePlaybookV2Manager.Query()
q = q.Filter(sqlchemy.Equals(q.Field("status"), AnsiblePlaybookStatusRunning))
q = q.Filter(sqlchemy.Equals(q.Field("status"), api.AnsiblePlaybookStatusRunning))
if err := db.FetchModelObjects(AnsiblePlaybookV2Manager, q, &pbs); err != nil {
return errors.WithMessage(err, "fetch running playbooks")
}
for i := 0; i < len(pbs); i++ {
pb := &pbs[i]
_, err := db.Update(pb, func() error {
pb.Status = AnsiblePlaybookStatusUnknown
pb.Status = api.AnsiblePlaybookStatusUnknown
return nil
})
if err != nil {
@@ -104,7 +116,7 @@ func (man *SAnsiblePlaybookV2Manager) InitializeData() error {
}
func (apb *SAnsiblePlaybookV2) ValidateDeleteCondition(ctx context.Context) error {
if apb.Status == AnsiblePlaybookStatusRunning {
if apb.Status == api.AnsiblePlaybookStatusRunning {
return httperrors.NewConflictError("playbook is in running state")
}
return nil
@@ -173,7 +185,7 @@ func (apb *SAnsiblePlaybookV2) runPlaybook(ctx context.Context, userCred mcclien
apb.StartTime = time.Now()
apb.EndTime = time.Time{}
apb.Output = ""
apb.Status = AnsiblePlaybookStatusRunning
apb.Status = api.AnsiblePlaybookStatusRunning
return nil
})
if err != nil {
@@ -200,12 +212,12 @@ func (apb *SAnsiblePlaybookV2) runPlaybook(ctx context.Context, userCred mcclien
_, err := db.Update(apb, func() error {
err := man.sessions.Err(apb.Id)
if err != nil {
apb.Status = AnsiblePlaybookStatusCanceled
apb.Status = api.AnsiblePlaybookStatusCanceled
} else if runErr != nil {
log.Warningf("playbook %s(%s) failed: %v", apb.Name, apb.Id, runErr)
apb.Status = AnsiblePlaybookStatusFailed
apb.Status = api.AnsiblePlaybookStatusFailed
} else {
apb.Status = AnsiblePlaybookStatusSucceeded
apb.Status = api.AnsiblePlaybookStatusSucceeded
}
apb.EndTime = time.Now()
return nil

View File

@@ -29,6 +29,7 @@ import (
"yunion.io/x/onecloud/pkg/apigateway/constants"
"yunion.io/x/onecloud/pkg/apigateway/options"
policytool "yunion.io/x/onecloud/pkg/apigateway/policy"
"yunion.io/x/onecloud/pkg/apis/compute"
"yunion.io/x/onecloud/pkg/appctx"
"yunion.io/x/onecloud/pkg/appsrv"
"yunion.io/x/onecloud/pkg/cloudcommon/policy"
@@ -569,6 +570,7 @@ func (this *projectRoles) add(roleId, roleName string) {
func (this *projectRoles) getToken(scope rbacutils.TRbacScope, user, userId, domain, domainId string, ip string) mcclient.TokenCredential {
return &mcclient.SSimpleToken{
Token: "faketoken",
Domain: domain,
DomainId: domainId,
User: user,
@@ -608,12 +610,12 @@ func (this *projectRoles) json(user, userId, domain, domainId string, ip string)
}
obj.Add(roles, "roles")
for _, scope := range []rbacutils.TRbacScope{
rbacutils.ScopeSystem,
rbacutils.ScopeDomain,
rbacutils.ScopeProject,
rbacutils.ScopeDomain,
rbacutils.ScopeSystem,
} {
token := this.getToken(scope, user, userId, domain, domainId, ip)
matches := policy.PolicyManager.MatchedPolicies(scope, token)
matches := policy.PolicyManager.MatchedPolicyNames(scope, token)
obj.Add(jsonutils.NewStringArray(matches), fmt.Sprintf("%s_policies", scope))
if len(matches) > 0 {
obj.Add(jsonutils.JSONTrue, fmt.Sprintf("%s_capable", scope))
@@ -646,8 +648,11 @@ func getUserAuthCookie(ctx context.Context, s *mcclient.ClientSession, token mcc
}
func getLBAgentInfo(s *mcclient.ClientSession, token mcclient.TokenCredential) (*jsonutils.JSONDict, error) {
lbagents, err := modules.LoadbalancerAgents.List(s, nil)
params := jsonutils.NewDict()
params.Add(jsonutils.NewString("hb_last_seen.isnotempty()"), "filter.0")
params.Add(jsonutils.NewInt(1), "limit")
params.Add(jsonutils.JSONFalse, "details")
lbagents, err := modules.LoadbalancerAgents.List(s, params)
if err != nil {
return nil, errors.Wrapf(err, "user %s get lbagent", token.GetUserName())
}
@@ -665,6 +670,7 @@ func getLBAgentInfo(s *mcclient.ClientSession, token mcclient.TokenCredential) (
}
func getUserInfo(ctx context.Context, s *mcclient.ClientSession, token mcclient.TokenCredential, req *http.Request) (*jsonutils.JSONDict, error) {
log.Infof("getUserInfo modules.UsersV3.Get")
usr, err := modules.UsersV3.Get(s, token.GetUserId(), nil)
if err != nil {
log.Errorf("modules.UsersV3.Get fail %s", err)
@@ -693,6 +699,7 @@ func getUserInfo(ctx context.Context, s *mcclient.ClientSession, token mcclient.
data.Add(jsonutils.NewString(token.GetProjectDomain()), "projectDomain")
data.Add(jsonutils.NewString(token.GetProjectDomainId()), "projectDomainId")
log.Infof("getUserInfo modules.RoleAssignments.List")
query := jsonutils.NewDict()
query.Add(jsonutils.JSONNull, "effective")
query.Add(jsonutils.JSONNull, "include_names")
@@ -735,7 +742,7 @@ func getUserInfo(ctx context.Context, s *mcclient.ClientSession, token mcclient.
rbacutils.ScopeDomain,
rbacutils.ScopeProject,
} {
p := policy.PolicyManager.MatchedPolicies(scope, token)
p := policy.PolicyManager.MatchedPolicyNames(scope, token)
data.Add(jsonutils.NewStringArray(p), fmt.Sprintf("%s_policies", scope))
if scope == rbacutils.ScopeSystem {
data.Add(jsonutils.NewStringArray(p), "admin_policies")
@@ -772,6 +779,7 @@ func getUserInfo(ctx context.Context, s *mcclient.ClientSession, token mcclient.
log.Errorf("fail to find services????: %#v %s", adminToken, curReg)
}
log.Infof("getUserInfo getLBAgentInfo")
lb, err := getLBAgentInfo(s, adminToken)
if err != nil {
log.Errorf("getLBAgentInfo fail %s", err)
@@ -788,13 +796,23 @@ func getUserInfo(ctx context.Context, s *mcclient.ClientSession, token mcclient.
}
}
log.Infof("getUserInfo modules.Hosts.Get")
s2 := auth.GetSession(ctx, token, FetchRegion(req), "v2")
cap, err := modules.Capabilities.List(s2, nil)
params := jsonutils.NewDict()
params.Add(jsonutils.NewString("host_type"), "field")
params.Add(jsonutils.NewString("system"), "scope")
params.Add(jsonutils.JSONTrue, "usable")
params.Add(jsonutils.JSONTrue, "show_emulated")
cap, err := modules.Hosts.Get(s2, "distinct-field", params)
if err != nil {
log.Errorf("modules.Capabilities.List fail %s", err)
log.Errorf("modules.Servers.Get distinct-field fail %s", err)
} else {
hypervisors, _ := cap.Data[0].Get("hypervisors")
data.Add(hypervisors, "hypervisors")
hostTypes, _ := jsonutils.GetStringArray(cap, "host_type")
hypervisors := make([]string, len(hostTypes))
for i, hostType := range hostTypes {
hypervisors[i] = compute.HOSTTYPE_HYPERVISOR[hostType]
}
data.Add(jsonutils.NewStringArray(hypervisors), "hypervisors")
}
data.Add(menus, "menus")

View File

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

View File

@@ -24,16 +24,39 @@ import (
"time"
"github.com/360EntSecGroup-Skylar/excelize"
"golang.org/x/sync/errgroup"
"yunion.io/x/jsonutils"
"yunion.io/x/log"
"yunion.io/x/pkg/utils"
"yunion.io/x/onecloud/pkg/apigateway/options"
"yunion.io/x/onecloud/pkg/appctx"
"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/mcclient/modulebase"
"yunion.io/x/onecloud/pkg/mcclient/modules"
"yunion.io/x/onecloud/pkg/util/httputils"
)
const (
HOST_MAC = "*MAC地址"
HOST_NAME = "*名称"
HOST_IPMI_ADDR = "*IPMI地址"
HOST_IPMI_USERNAME = "*IPMI用户名"
HOST_IPMI_PASSWORD = "*IPMI密码"
HOST_MNG_IP_ADDR = "*管理口IP地址"
HOST_IPMI_ADDR_OPTIONAL = "IPMI地址"
HOST_IPMI_USERNAME_OPTIONAL = "IPMI用户名"
HOST_IPMI_PASSWORD_OPTIONAL = "IPMI密码"
HOST_MNG_IP_ADDR_OPTIONAL = "管理口IP地址"
)
const (
BATCH_USER_REGISTER_QUANTITY_LIMITATION = 1000
BATCH_HOST_REGISTER_QUANTITY_LIMITATION = 1000
)
func FetchSession(ctx context.Context, r *http.Request, apiVersion string) *mcclient.ClientSession {
@@ -96,6 +119,10 @@ func (mh *MiscHandler) PostUploads(ctx context.Context, w http.ResponseWriter, r
case "BatchHostRegister":
mh.DoBatchHostRegister(ctx, w, req)
return
// 用户批量注册
case "BatchUserRegister":
mh.DoBatchUserRegister(ctx, w, req)
return
default:
err := httperrors.NewInputParameterError("Unsupported action %s", actions[0])
httperrors.JsonClientError(w, err)
@@ -135,29 +162,236 @@ func (mh *MiscHandler) DoBatchHostRegister(ctx context.Context, w http.ResponseW
log.Errorf(err.Error())
e := httperrors.NewInternalServerError("can't parse file")
httperrors.JsonClientError(w, e)
return
}
rows := xlsx.GetRows("hosts")
if len(rows) == 0 {
e := httperrors.NewGeneralError(fmt.Errorf("empty file content"))
httperrors.JsonClientError(w, e)
return
}
paramKeys := []string{}
i1 := -1
i2 := -1
for i, title := range rows[0] {
switch title {
case HOST_MAC:
paramKeys = append(paramKeys, "access_mac")
case HOST_NAME:
paramKeys = append(paramKeys, "name")
case HOST_IPMI_ADDR, HOST_IPMI_ADDR_OPTIONAL:
i1 = i
paramKeys = append(paramKeys, "ipmi_ip_addr")
case HOST_IPMI_USERNAME, HOST_IPMI_USERNAME_OPTIONAL:
paramKeys = append(paramKeys, "ipmi_username")
case HOST_IPMI_PASSWORD, HOST_IPMI_PASSWORD_OPTIONAL:
paramKeys = append(paramKeys, "ipmi_password")
case HOST_MNG_IP_ADDR, HOST_MNG_IP_ADDR_OPTIONAL:
i2 = i
paramKeys = append(paramKeys, "access_ip")
default:
e := httperrors.NewInternalServerError("empty file content")
httperrors.JsonClientError(w, e)
return
}
}
h := ""
// skipped header row
for _, row := range xlsx.GetRows("hosts")[1:] {
if len(row) < 4 {
log.Debugf("batchHostRegister row length too short (less than 4) %s", row)
if len(rows) > BATCH_HOST_REGISTER_QUANTITY_LIMITATION {
e := httperrors.NewInputParameterError(fmt.Sprintf("beyond limitation. excel file rows must less than %d", BATCH_HOST_REGISTER_QUANTITY_LIMITATION))
httperrors.JsonClientError(w, e)
return
}
ips := []string{}
hosts := bytes.Buffer{}
for _, row := range rows[1:] {
var e *httputils.JSONClientError
if i1 >= 0 && len(row[i1]) > 0 {
i1Ip := fmt.Sprintf("%d-%s", i1, row[i1])
if utils.IsInStringArray(i1Ip, ips) {
e = httperrors.NewDuplicateIdError("ip", row[i1])
} else {
ips = append(ips, i1Ip)
}
}
h = h + strings.Join(row, ",") + "\n"
if i2 >= 0 && len(row[i2]) > 0 {
i2Ip := fmt.Sprintf("%d-%s", i2, row[i2])
if utils.IsInStringArray(i2Ip, ips) {
e = httperrors.NewDuplicateIdError("ip", row[i2])
} else {
ips = append(ips, i2Ip)
}
}
if e != nil {
httperrors.JsonClientError(w, e)
return
}
hosts.WriteString(strings.Join(row, ",") + "\n")
}
s := FetchSession(ctx, req, "")
params := jsonutils.NewDict()
params.Set("hosts", jsonutils.NewString(h))
resp, err := modules.Hosts.DoBatchRegister(s, params)
s := FetchSession(ctx, req, "")
params.Set("hosts", jsonutils.NewString(hosts.String()))
// extra params
for k, values := range req.MultipartForm.Value {
if len(values) > 0 && k != "action" {
params.Set(k, jsonutils.NewString(values[0]))
}
}
submitResult, err := modules.Hosts.BatchRegister(s, paramKeys, params)
if err != nil {
e := httperrors.NewGeneralError(err)
httperrors.JsonClientError(w, e)
return
}
appsrv.SendJSON(w, resp)
w.WriteHeader(207)
appsrv.SendJSON(w, modulebase.SubmitResults2JSON(submitResult))
}
func (mh *MiscHandler) DoBatchUserRegister(ctx context.Context, w http.ResponseWriter, req *http.Request) {
adminS := auth.GetAdminSession(ctx, FetchRegion(req), "")
s := FetchSession(ctx, req, "")
files := req.MultipartForm.File
userfiles, ok := files["users"]
if !ok || len(userfiles) == 0 || userfiles[0] == nil {
e := httperrors.NewInputParameterError("Missing parameter %s", "users")
httperrors.JsonClientError(w, e)
return
}
fileHeader := userfiles[0].Header
contentType := fileHeader.Get("Content-Type")
if contentType != "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" {
e := httperrors.NewInputParameterError("Wrong content type %s, required application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", contentType)
httperrors.JsonClientError(w, e)
return
}
file, err := userfiles[0].Open()
defer file.Close()
if err != nil {
log.Errorf(err.Error())
e := httperrors.NewInternalServerError("can't open file")
httperrors.JsonClientError(w, e)
return
}
xlsx, err := excelize.OpenReader(file)
if err != nil {
log.Errorf(err.Error())
e := httperrors.NewInternalServerError("can't parse file")
httperrors.JsonClientError(w, e)
return
}
// skipped header row
rows := xlsx.GetRows("users")
if len(rows) <= 1 {
e := httperrors.NewInputParameterError("empty file")
httperrors.JsonClientError(w, e)
return
} else if len(rows) > BATCH_USER_REGISTER_QUANTITY_LIMITATION {
e := httperrors.NewInputParameterError(fmt.Sprintf("beyond limitation.excel file rows must less than %d", BATCH_USER_REGISTER_QUANTITY_LIMITATION))
httperrors.JsonClientError(w, e)
return
}
users := []jsonutils.JSONObject{}
names := map[string]bool{}
domains := map[string]string{}
for i, row := range rows[1:] {
rowIdx := i + 2
name := row[0]
password := row[1]
domain := row[2]
allowWebConsole := strings.ToLower(row[3])
// 忽略空白行
rowStr := strings.Join(row, "")
if len(strings.TrimSpace(rowStr)) == 0 {
continue
}
if len(name) == 0 {
e := httperrors.NewClientError("row %d name is empty", rowIdx)
httperrors.JsonClientError(w, e)
return
}
if _, ok := names[name]; ok {
e := httperrors.NewClientError("row %d duplicate name %s", rowIdx, name)
httperrors.JsonClientError(w, e)
return
} else {
names[name] = true
_, err := modules.UsersV3.Get(s, name, nil)
if err == nil {
continue
}
}
domainId, ok := domains[domain]
if !ok {
if len(domain) == 0 {
e := httperrors.NewClientError("row %d domain is empty", rowIdx)
httperrors.JsonClientError(w, e)
return
}
id, err := modules.Domains.GetId(adminS, domain, nil)
if err != nil {
httperrors.JsonClientError(w, httperrors.NewGeneralError(err))
return
}
domainId = id
domains[domain] = id
}
user := jsonutils.NewDict()
user.Add(jsonutils.NewString(name), "name")
user.Add(jsonutils.NewString(domainId), "domain_id")
if len(password) > 0 {
user.Add(jsonutils.NewString(password), "password")
user.Add(jsonutils.JSONTrue, "skip_password_complexity_check")
}
if allowWebConsole == "true" || allowWebConsole == "1" {
user.Add(jsonutils.JSONTrue, "allow_web_console")
} else {
user.Add(jsonutils.JSONFalse, "allow_web_console")
}
users = append(users, user)
}
// batch create
var userG errgroup.Group
for i := range users {
user := users[i]
userG.Go(func() error {
_, err := modules.UsersV3.Create(s, user)
return err
})
}
if err := userG.Wait(); err != nil {
e := httperrors.NewGeneralError(err)
httperrors.GeneralServerError(w, e)
return
}
appsrv.SendJSON(w, jsonutils.NewDict())
}
func (mh *MiscHandler) getDownloadsHandler(ctx context.Context, w http.ResponseWriter, req *http.Request) {
@@ -168,23 +402,60 @@ func (mh *MiscHandler) getDownloadsHandler(ctx context.Context, w http.ResponseW
return
}
var err error
var content bytes.Buffer
switch template {
case "BatchHostRegister":
records := [][]string{{"MAC地址", "名称", "IPMI地址", "IPMI用户名", "IPMI密码"}}
content, err := writeXlsx("hosts", records)
records := [][]string{{HOST_MAC, HOST_NAME, HOST_IPMI_ADDR_OPTIONAL, HOST_IPMI_USERNAME_OPTIONAL, HOST_IPMI_PASSWORD_OPTIONAL}}
content, err = writeXlsx("hosts", records)
if err != nil {
httperrors.InternalServerError(w, "internal server error")
return
}
case "BatchHostISORegister":
records := [][]string{{HOST_NAME, HOST_IPMI_ADDR, HOST_IPMI_USERNAME, HOST_IPMI_PASSWORD, HOST_MNG_IP_ADDR}}
content, err = writeXlsx("hosts", records)
if err != nil {
httperrors.InternalServerError(w, "internal server error")
return
}
case "BatchHostPXERegister":
records := [][]string{{HOST_NAME, HOST_IPMI_ADDR, HOST_IPMI_USERNAME, HOST_IPMI_PASSWORD, HOST_MNG_IP_ADDR_OPTIONAL}}
content, err = writeXlsx("hosts", records)
if err != nil {
httperrors.InternalServerError(w, "internal server error")
return
}
case "BatchUserRegister":
records := [][]string{{"*用户名user", "用户密码password", "*部门/域domain", "*是否登录控制台allow_web_consoletrue、false"}}
content, err = writeXlsx("users", records)
if err != nil {
httperrors.InternalServerError(w, "internal server error")
return
}
case "BatchProjectRegister":
var titles []string
if options.Options.NonDefaultDomainProjects {
titles = []string{"项目名称", "域", "配额"}
} else {
titles = []string{"项目名称", "域"}
}
w.Header().Set("Content-Type", "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet")
w.Header().Set("Content-Disposition", "Attachment; filename=hosts_template.xlsx")
w.Write(content.Bytes())
return
records := [][]string{titles}
content, err = writeXlsx("projects", records)
if err != nil {
httperrors.InternalServerError(w, "internal server error")
return
}
default:
httperrors.InputParameterError(w, "template not found %s", template)
return
}
w.Header().Set("Content-Type", "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet")
w.Header().Set("Content-Disposition", "Attachment; filename=template.xlsx")
w.Write(content.Bytes())
return
}
func (mh *MiscHandler) postPIUploads(ctx context.Context, w http.ResponseWriter, req *http.Request) {

View File

@@ -606,28 +606,45 @@ func (f *ResourceHandlers) patchJointHandler(ctx context.Context, w http.Respons
}
}
// batch update Joint
// * batch update Joint
// * put specific
// /<resname>/<resid>/<resname2>
// /<resname>/<resid>/<spec>
func (f *ResourceHandlers) batchUpdateJointHandler(ctx context.Context, w http.ResponseWriter, r *http.Request) {
req := newRequest(ctx, w, r).WithMod1().WithMod2()
req := newRequest(ctx, w, r).WithMod1()
if err := req.Error(); err != nil {
httperrors.GeneralServerError(w, err)
return
}
session := req.Session()
module := req.Mod1()
module2 := req.Mod2()
body := req.Body()
query := req.Query()
idlist := fetchIdList(query, w)
if idlist == nil {
if idlist, _ := query.GetArray("id"); len(idlist) == 0 {
// do put specific
spec := req.ResName2()
obj, e := module.PutSpecific(session, req.ResID(), spec, query, body)
if e != nil {
httperrors.GeneralServerError(w, e)
} else {
appsrv.SendJSON(w, obj)
}
return
}
req = req.WithMod2()
if err := req.Error(); err != nil {
httperrors.GeneralServerError(w, err)
return
}
module2 := req.Mod2()
jmod, e := modulebase.GetJointModule2(session, module, module2)
if e != nil { // update joint
httperrors.GeneralServerError(w, e)
return
}
idlist := fetchIdList(query, w)
ret := jmod.BatchUpdate(session, req.ResID(), idlist, query, body)
w.WriteHeader(207)
appsrv.SendJSON(w, modulebase.SubmitResults2JSON(ret))

View File

@@ -117,15 +117,24 @@ func rpcHandler(ctx context.Context, w http.ResponseWriter, req *http.Request) {
v, ok := retobj.Interface().(jsonutils.JSONObject)
if ok {
appsrv.SendJSON(w, v)
} else {
httperrors.BadGatewayError(w, "recv invalid data")
return
}
v2, ok := retobj.Interface().([]modulebase.SubmitResult)
if ok {
w.WriteHeader(207)
appsrv.SendJSON(w, modulebase.SubmitResults2JSON(v2))
return
}
httperrors.BadGatewayError(w, "recv invalid data")
} else {
v, ok := reterr.Interface().(*httputils.JSONClientError)
if ok {
httperrors.JsonClientError(w, v)
} else {
httperrors.BadGatewayError(w, fmt.Sprintf("%s", reterr.Interface()))
return
}
httperrors.BadGatewayError(w, fmt.Sprintf("%s", reterr.Interface()))
}
}

View File

@@ -29,9 +29,21 @@ type GatewayOptions struct {
SqlitePath string `help:"sqlite db path" default:"/etc/yunion/data/yunionapi.db"`
common_options.CommonOptions
common_options.CommonOptions `"request_worker_count->default":"32"`
}
var (
Options GatewayOptions
Options *GatewayOptions
)
func OnOptionsChange(oldO, newO interface{}) bool {
oldOpts := oldO.(*GatewayOptions)
newOpts := newO.(*GatewayOptions)
changed := false
if common_options.OnCommonOptionsChange(&oldOpts.CommonOptions, &newOpts.CommonOptions) {
changed = true
}
return changed
}

View File

@@ -25,6 +25,7 @@ import (
"yunion.io/x/onecloud/pkg/apigateway/app"
"yunion.io/x/onecloud/pkg/apigateway/clientman"
"yunion.io/x/onecloud/pkg/apigateway/options"
api "yunion.io/x/onecloud/pkg/apis/apigateway"
app_common "yunion.io/x/onecloud/pkg/cloudcommon/app"
common_options "yunion.io/x/onecloud/pkg/cloudcommon/options"
"yunion.io/x/onecloud/pkg/mcclient"
@@ -32,14 +33,17 @@ import (
)
func StartService() {
opts := &options.Options
options.Options = &options.GatewayOptions{}
opts := options.Options
baseOpts := &opts.BaseOptions
commonOpts := &opts.CommonOptions
common_options.ParseOptions(opts, os.Args, "apigateway.conf", "apigateway")
common_options.ParseOptions(opts, os.Args, "apigateway.conf", api.SERVICE_TYPE)
app_common.InitAuth(commonOpts, func() {
log.Infof("Auth complete.")
})
common_options.StartOptionManager(opts, opts.ConfigSyncPeriodSeconds, api.SERVICE_TYPE, api.SERVICE_VERSION, options.OnOptionsChange)
if opts.DisableModuleApiVersion {
mcclient.DisableApiVersionByModule()
}

View File

@@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
package models
package ansible
const (
AnsiblePlaybookStatusInit = "init"

View File

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

View File

@@ -0,0 +1,15 @@
// 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 apigateway // import "yunion.io/x/onecloud/pkg/apis/apigateway"

View File

@@ -0,0 +1,38 @@
// Copyright 2019 Yunion
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package cloudevent
import (
"time"
"yunion.io/x/onecloud/pkg/apis"
)
type CloudeventListInput struct {
apis.BaseListInput
// 根据平台过滤
Providers []string `json:"providers"`
// 根据品牌过滤
Brands []string `json:"brands"`
// swagger:ignore
// Deprecated
Brand []string `json:"brand" deprecated-by:"brands"`
// 操作日志起始时间
Since time.Time `json:"since"`
// 操作日志截止时间
Until time.Time `json:"until"`
}

View File

@@ -0,0 +1,47 @@
// Copyright 2019 Yunion
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package cloudevent
const (
CLOUD_EVENT_SERVICE_COMPUTE = "compute"
CLOUD_EVENT_SERVICE_UNKNOWN = "unknown"
CLOUD_EVENT_RESOURCE_TYPE_SERVER = "server"
CLOUD_EVENT_RESOURCE_TYPE_BUCKET = "bucket"
CLOUD_EVENT_RESOURCE_TYPE_DBINSTANCEACCOUNT = "dbinstanceaccount"
CLOUD_EVENT_RESOURCE_TYPE_DBINSTANCEBACKUP = "dbinstancebackup"
CLOUD_EVENT_RESOURCE_TYPE_DBINSTANCEDATABASE = "dbinstancedatabase"
CLOUD_EVENT_RESOURCE_TYPE_DBINSTANCEPARAMETER = "dbinstanceparameter"
CLOUD_EVENT_RESOURCE_TYPE_DBINSTANCEPRIVILEGE = "dbinstanceprivilege"
CLOUD_EVENT_RESOURCE_TYPE_DBINSTANCE = "dbinstance"
CLOUD_EVENT_RESOURCE_TYPE_DISK = "disk"
CLOUD_EVENT_RESOURCE_TYPE_EIP = "eip"
CLOUD_EVENT_RESOURCE_TYPE_HOST = "host"
CLOUD_EVENT_RESOURCE_TYPE_IMAGE = "image"
CLOUD_EVENT_RESOURCE_TYPE_LOADBALANCERBACKENDGROUP = "loadbalancerbackendgroup"
CLOUD_EVENT_RESOURCE_TYPE_LOADBALANCERBACKEND = "loadbalancerbackend"
CLOUD_EVENT_RESOURCE_TYPE_LOADBALANCERLISTENERRULE = "loadbalancerlistenerrule"
CLOUD_EVENT_RESOURCE_TYPE_LOADBALANCERLISTENER = "loadbalancerlistener"
CLOUD_EVENT_RESOURCE_TYPE_LOADBALANCER = "loadbalancer"
CLOUD_EVENT_RESOURCE_TYPE_NATDENTRY = "natdentry"
CLOUD_EVENT_RESOURCE_TYPE_NATGATEWAY = "natgateway"
CLOUD_EVENT_RESOURCE_TYPE_NATSENTRY = "natsentry"
CLOUD_EVENT_RESOURCE_TYPE_NETWORKINTERFACE = "networkinterface"
CLOUD_EVENT_RESOURCE_TYPE_NETWORK = "network"
CLOUD_EVENT_RESOURCE_TYPE_SECGROUPCACHE = "secgroupcache"
CLOUD_EVENT_RESOURCE_TYPE_SNAPSHOTPOLICY = "snapshotpolicy"
CLOUD_EVENT_RESOURCE_TYPE_SNAPSHOT = "snapshot"
CLOUD_EVENT_RESOURCE_TYPE_VPC = "vpc"
)

View File

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

View File

@@ -0,0 +1,15 @@
// 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 cloudprovider // import "yunion.io/x/onecloud/pkg/apis/cloudprovider"

View File

@@ -0,0 +1,23 @@
// 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.
// Code generated by model-api-gen. DO NOT EDIT.
package cloudprovider
// SGeographicInfo is an autogenerated struct via yunion.io/x/onecloud/pkg/cloudprovider.SGeographicInfo.
type SGeographicInfo struct {
Latitude float32 `json:"latitude"`
Longitude float32 `json:"longitude"`
City string `json:"city"`
CountryCode string `json:"country_code"`
}

View File

@@ -121,8 +121,6 @@ type ServerConfigs struct {
// ResourceType "shared|prepaid|dedicated"`
ResourceType string `json:"resource_type"`
InstanceType string `json:"instance_type"`
Project string `json:"project_id"`
Domain string `json:"domain_id"`
Backup bool `json:"backup"`
Count int `json:"count"`
@@ -156,38 +154,41 @@ type DeployConfig struct {
}
type ServerCreateInput struct {
apis.Meta
apis.VirtualResourceCreateInput
DeletePreventableCreateInput
*ServerConfigs
Name string `json:"name"`
GenerateName string `json:"generate_name"`
VmemSize int `json:"vmem_size"`
VcpuCount int `json:"vcpu_count"`
UserData string `json:"user_data"`
VmemSize int `json:"vmem_size"`
VcpuCount int `json:"vcpu_count"`
UserData string `json:"user_data"`
Metadata map[string]string `json:"__meta__"`
KeypairId string `json:"keypair_id"`
Password string `json:"password"`
Cdrom string `json:"cdrom"`
Vga string `json:"vga"`
Vdi string `json:"vdi"`
Bios string `json:"bios"`
Description string `json:"description"`
BootOrder string `json:"boot_order"`
EnableCloudInit bool `json:"enable_cloud_init"`
ResetPassword *bool `json:"reset_password"`
DisableDelete *bool `json:"disable_delete"`
ShutdownBehavior string `json:"shutdown_behavior"`
AutoStart bool `json:"auto_start"`
DeployConfigs []*DeployConfig `json:"deploy_configs"`
IsSystem bool `json:"is_system"`
Duration string `json:"duration"`
AutoPrepaidRecycle bool `json:"auto_prepaid_recycle,omitfalse"`
SecgroupId string `json:"secgrp_id"`
EipBw int `json:"eip_bw,omitzero"`
EipChargeType string `json:"eip_charge_type,omitempty"`
Eip string `json:"eip,omitempty"`
InstanceSnapshotId string `json:"instance_snapshot_id,omitempty"`
// swagger:ignore
Keypair string `json:"keypair" deprecated-by:"keypair_id"`
KeypairId string `json:"keypair_id"`
Password string `json:"password"`
Cdrom string `json:"cdrom"`
Vga string `json:"vga"`
Vdi string `json:"vdi"`
Bios string `json:"bios"`
// Description string `json:"description"`
BootOrder string `json:"boot_order"`
EnableCloudInit bool `json:"enable_cloud_init"`
ResetPassword *bool `json:"reset_password"`
// DisableDelete *bool `json:"disable_delete"`
ShutdownBehavior string `json:"shutdown_behavior"`
AutoStart bool `json:"auto_start"`
DeployConfigs []*DeployConfig `json:"deploy_configs"`
// IsSystem bool `json:"is_system"`
Duration string `json:"duration"`
AutoPrepaidRecycle bool `json:"auto_prepaid_recycle,omitfalse"`
SecgroupId string `json:"secgrp_id"`
EipBw int `json:"eip_bw,omitzero"`
EipChargeType string `json:"eip_charge_type,omitempty"`
Eip string `json:"eip,omitempty"`
InstanceSnapshotId string `json:"instance_snapshot_id,omitempty"`
Secgroups []string `json:"secgroups"`
OsType string `json:"os_type"`
// Fill by server

View File

@@ -14,6 +14,16 @@
package compute
import (
"net/http"
"yunion.io/x/pkg/errors"
"yunion.io/x/onecloud/pkg/apis"
"yunion.io/x/onecloud/pkg/cloudprovider"
"yunion.io/x/onecloud/pkg/httperrors"
)
const (
BUCKET_OPS_STATS_CHANGE = "stats_change"
@@ -30,3 +40,53 @@ const (
BUCKET_UPLOAD_OBJECT_ACL_HEADER = "X-Yunion-Bucket-Upload-Acl"
BUCKET_UPLOAD_OBJECT_STORAGECLASS_HEADER = "X-Yunion-Bucket-Upload-Storageclass"
)
type BucketCreateInput struct {
apis.VirtualResourceCreateInput
RegionalResourceCreateInput
ManagedResourceCreateInput
StorageClass string `json:"storage_class"`
}
type BucketDetail struct {
apis.Meta
SBucket
CloudproviderDetails
}
type BucketObjectsActionInput struct {
Key []string
}
type BucketAclInput struct {
BucketObjectsActionInput
Acl cloudprovider.TBucketACLType
}
func (input *BucketAclInput) Validate() error {
switch input.Acl {
case cloudprovider.ACLPrivate, cloudprovider.ACLAuthRead, cloudprovider.ACLPublicRead, cloudprovider.ACLPublicReadWrite:
// do nothing
default:
return errors.Wrap(httperrors.ErrInputParameter, "acl")
}
return nil
}
type BucketMetadataInput struct {
BucketObjectsActionInput
Metadata http.Header
}
func (input *BucketMetadataInput) Validate() error {
if len(input.Key) == 0 {
return errors.Wrap(httperrors.ErrEmptyRequest, "key")
}
if len(input.Metadata) == 0 {
return errors.Wrap(httperrors.ErrEmptyRequest, "metadata")
}
return nil
}

View File

@@ -16,49 +16,44 @@ package compute
import (
"yunion.io/x/jsonutils"
"yunion.io/x/pkg/utils"
"yunion.io/x/onecloud/pkg/apis"
"yunion.io/x/onecloud/pkg/cloudprovider"
"yunion.io/x/onecloud/pkg/httperrors"
)
type CloudaccountCreateInput struct {
apis.Meta
apis.EnabledStatusStandaloneResourceCreateInput
Provider string
AccountId string
Brand string
IsPublicCloud bool
IsOnPremise bool
Account string
Secret string
AccessUrl string
Tenant string
TenantId string
Name string
Description string
Enabled bool
EnableAutoSync bool
SyncIntervalSeconds int
AutoCreateProject bool
Options *jsonutils.JSONObject
ProjectName string //OpenStack
DomainName string //OpenStack
Username string //OpenStack Esxi ZStack
Password string //OpenStack Esxi ZStack
AuthUrl string //OpenStack ZStack
AccessKeyId string //Huawei Aliyun Ucloud Aws
AccessKeySecret string //Huawei Aliyun Ucloud Aws
Environment string //Huawei Azure Aws
DirectoryId string //Azure
ClientId string //Azure
ClientSecret string //Azure
Host string //Esxi
Port int //Esxi
Endpoint string
AppId string //Qcloud
SecretId string //Qcloud
SecretKey string //Qcloud
cloudprovider.SCloudaccount
cloudprovider.SCloudaccountCredential
}
type CloudaccountShareModeInput struct {
apis.Meta
ShareMode string
}
func (i CloudaccountShareModeInput) Validate() error {
if len(i.ShareMode) == 0 {
return httperrors.NewMissingParameterError("share_mode")
}
if !utils.IsInStringArray(i.ShareMode, CLOUD_ACCOUNT_SHARE_MODES) {
return httperrors.NewInputParameterError("invalid share_mode %s", i.ShareMode)
}
return nil
}

View File

@@ -39,6 +39,8 @@ const (
CLOUD_PROVIDER_OPENSTACK = "OpenStack"
CLOUD_PROVIDER_UCLOUD = "Ucloud"
CLOUD_PROVIDER_ZSTACK = "ZStack"
CLOUD_PROVIDER_GOOGLE = "Google"
CLOUD_PROVIDER_CTYUN = "Ctyun"
CLOUD_PROVIDER_GENERICS3 = "S3"
CLOUD_PROVIDER_CEPH = "Ceph"
@@ -64,6 +66,7 @@ const (
CLOUD_ACCESS_ENV_AZURE_CHINA = CLOUD_PROVIDER_AZURE
CLOUD_ACCESS_ENV_HUAWEI_GLOBAL = CLOUD_PROVIDER_HUAWEI + "-int"
CLOUD_ACCESS_ENV_HUAWEI_CHINA = CLOUD_PROVIDER_HUAWEI
CLOUD_ACCESS_ENV_CTYUN_CHINA = CLOUD_PROVIDER_CTYUN
)
var (
@@ -82,6 +85,8 @@ var (
CLOUD_PROVIDER_OPENSTACK,
CLOUD_PROVIDER_UCLOUD,
CLOUD_PROVIDER_ZSTACK,
CLOUD_PROVIDER_GOOGLE,
CLOUD_PROVIDER_CTYUN,
}
)
@@ -92,3 +97,17 @@ const (
CLOUD_ENV_PRIVATE_ON_PREMISE = "private_or_onpremise"
)
const (
CLOUD_ACCOUNT_SHARE_MODE_ACCOUNT_DOMAIN = "account_domain"
CLOUD_ACCOUNT_SHARE_MODE_SYSTEM = "system"
CLOUD_ACCOUNT_SHARE_MODE_PROVIDER_DOMAIN = "provider_domain"
)
var (
CLOUD_ACCOUNT_SHARE_MODES = []string{
CLOUD_ACCOUNT_SHARE_MODE_ACCOUNT_DOMAIN,
CLOUD_ACCOUNT_SHARE_MODE_SYSTEM,
CLOUD_ACCOUNT_SHARE_MODE_PROVIDER_DOMAIN,
}
)

View File

@@ -0,0 +1,98 @@
// Copyright 2019 Yunion
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package compute
type CloudproviderDetails struct {
Provider string `json:"provider,omitempty"`
Brand string `json:"brand,omitempty"`
Account string `json:"account,omitempty"`
AccountId string `json:"account_id,omitempty"`
Manager string `json:"manager,omitempty"`
ManagerId string `json:"manager_id,omitempty"`
ManagerProject string `json:"manager_project,omitempty"`
ManagerProjectId string `json:"manager_project_id,omitempty"`
ManagerDomain string `json:"manager_domain,omitempty"`
ManagerDomainId string `json:"manager_domain_id,omitempty"`
Region string `json:"region,omitempty"`
RegionId string `json:"region_id,omitempty"`
CloudregionId string `json:"cloudregion_id,omitempty"`
RegionExternalId string `json:"region_external_id,omitempty"`
RegionExtId string `json:"region_ext_id,omitempty"`
Zone string `json:"zone,omitempty"`
ZoneId string `json:"zone_id,omitempty"`
ZoneExtId string `json:"zone_ext_id,omitempty"`
CloudEnv string `json:"cloud_env,omitempty"`
}
type CloudaccountListInput struct {
// List objects belonging to the cloud provider
Cloudprovider string `json:"cloudprovider"`
// List objects belonging to the cloud provider
// deprecate:true
// description: this param will be deprecate at 3.0
Manager string `json:"manager"`
// deprecate:true
// description: this param will be deprecate at 3.0
ManagerId string `json:"manager_id"`
// deprecate:true
// description: this param will be deprecate at 3.0
CloudproviderId string `json:"cloudprovider_id"`
// List objects belonging to the cloud account
Cloudaccount string `json:"cloudaccount"`
// deprecate:true
// description: this param will be deprecate at 3.0
CloudaccountId string `json:"cloudaccount_id"`
// deprecate:true
// description: this param will be deprecate at 3.0
Account string `json:"account"`
// deprecate:true
// description: this param will be deprecate at 3.0
AccountId string `json:"account_id"`
// List objects from the providers, choices:"OneCloud|VMware|Aliyun|Qcloud|Azure|Aws|Huawei|OpenStack|Ucloud|ZStack|Google"
Providers []string `json:"provider"`
// List objects belonging to brands
Brands []string `json:"brand"`
}
type CloudTypeListInput struct {
// enum: public_cloud,private_cloud,on_premise
CloudEnv string `json:"cloud_env"`
// deprecate:true
// description: this param will be deprecate at 3.0
PublicCloud bool `json:"public_cloud"`
// deprecate:true
// description: this param will be deprecate at 3.0
IsPublic bool `json:"is_public"`
// deprecate:true
// description: this param will be deprecate at 3.0
PrivateCloud bool `json:"private_cloud"`
// deprecate:true
// description: this param will be deprecate at 3.0
IsPrivate bool `json:"is_private"`
// deprecate:true
// description: this param will be deprecate at 3.0
IsOnPremise bool `json:"is_on_premise"`
// List objects managed by external providers
// default: false
IsManaged bool `json:"is_managed"`
}

View File

@@ -31,11 +31,31 @@ const (
CITY_HONG_KONG = "Hongkong" //香港
CITY_NING_XIA = "Ningxia" //宁夏
CITY_GUANG_ZHOU = "Guangzhou" //广州
CITY_TAI_WAN = "Taiwan" //台湾
CITY_GUI_YANG = "Guiyang" //贵阳
CITY_TAIPEI = "Taipei" //台北市
CITY_KAOHSIUNG = "Kaohsiung" //高雄市
CITY_CHENG_DU = "Chengdu" //成都
CITY_HE_YUAN = "HeYuan" //河源
CITY_CHONG_QING = "Chongqing" //重庆
CITY_LAN_ZHOU = "Lanzhou" //兰州
CITY_TAI_YUAN = "Taiyuan" //太原
CITY_TIAN_JIN = "Tianjin" //天津
CITY_WU_LU_MU_QI = "Wulumuqi" //乌鲁木齐
CITY_NAN_NING = "Nanning" //南宁
CITY_ZHENG_ZHOU = "Zhengzhou" //郑州
CITY_KUN_MING = "Kunming" //昆明
CITY_XI_AN = "Xian" //西安
CITY_HAI_KOU = "Haikou" //海口
CITY_WU_HU = "Wuhu" //芜湖
CITY_FU_ZHOU = "Fuzhou" //福州
CITY_WU_HAN = "Wuhan" //武汉
CITY_CHANG_SHA = "Changsha" //长沙
CITY_SHU_ZHOU = "Shuzhou" //苏州
CITY_BAO_DING = "Baoding" //保定
CITY_NAN_JING = "Nanjing" //南京
CITY_FO_SHAN = "Foshan" //佛山
CITY_QUAN_ZHOU = "Quanzhou" //泉州
// 日本
CITY_TOKYO = "Tokyo" //东京
@@ -49,6 +69,20 @@ const (
CITY_YARRALUMLA = "Yarralumla" //亚拉伦拉
CITY_MELBOURNE = "Melbourne" //墨尔本
//芬兰
CITY_FINLAND = "Finland"
//比利时
CITY_BELGIUM = "Belgium" //比利时
//瑞士
CITY_ZURICH = "Zurich" //苏黎世
CITY_GENEVA = "Geneva" //日内瓦
// 挪威
CITY_STAVANGER = "Stavanger" //斯塔万格
CITY_OSLO = "Oslo" // 奥斯陆
// 马来西亚
CITY_KUALA_LUMPUR = "Kuala Lumpur" //吉隆坡
@@ -61,20 +95,23 @@ const (
CITY_MAHARASHTRA = "Maharashtra" //马哈拉施特拉邦
// 美国
CITY_VIRGINIA = "Virginia" //弗吉尼亚
CITY_SILICONVALLEY = "Siliconvalley" //硅谷
CITY_OHIO = "Ohio" //俄亥俄州
CITY_N_VIRGINIA = "N. Virginia" //北弗吉尼亚
CITY_N_CALIFORNIA = "N. California" //北加州
CITY_OREGON = "Oregon" //俄勒冈州
CITY_LOS_ANGELES = "Los Angeles" //洛杉矶
CITY_SAN_FRANCISCO = "San Francisco" //旧金山
CITY_UTAH = "Utah" //犹他州
CITY_WASHINGTON = "Washington" //华盛顿
CITY_TEXAS = "Texas" //德克萨斯
CITY_CHICAGO = "Chicago" //芝加哥
CITY_IOWA = "Iowa" //爱荷华
CITY_US_GOV_WEST = "us-gov-west" //???
CITY_VIRGINIA = "Virginia" //弗吉尼亚
CITY_SILICONVALLEY = "Siliconvalley" //硅谷
CITY_OHIO = "Ohio" //俄亥俄州
CITY_N_VIRGINIA = "N. Virginia" //北弗吉尼亚
CITY_N_CALIFORNIA = "N. California" //北加州
CITY_OREGON = "Oregon" //俄勒冈州
CITY_LOS_ANGELES = "Los Angeles" //洛杉矶
CITY_SAN_FRANCISCO = "San Francisco" //旧金山
CITY_UTAH = "Utah" //犹他州
CITY_WASHINGTON = "Washington" //华盛顿
CITY_TEXAS = "Texas" //德克萨斯
CITY_CHICAGO = "Chicago" //芝加哥
CITY_IOWA = "Iowa" //爱荷华
CITY_US_GOV_WEST = "us-gov-west" //???
CITY_SOUTH_CAROLINA = "South Carolina" //南卡罗来纳州
CITY_SALT_LAKE_CITY = "Salt Lake City" //盐湖城
CITY_LAS_VEGAS = "Las Vegas" //拉斯维加斯
// 英国
CITY_LONDON = "London" //伦敦
@@ -85,7 +122,8 @@ const (
CITY_DUBAI = "Dubai" //迪拜
// 德国
CITY_FRANKFURT = "Frankfurt" //法兰克福
CITY_FRANKFURT = "Frankfurt" // 法兰克福
CITY_DELMENHORST = "Delmenhorst" // 代尔门霍斯特
// 韩国
CITY_SEOUL = "Seoul" //首尔
@@ -95,6 +133,7 @@ const (
CITY_CANADA_CENTRAL = "Canada Central" //加拿大中部
CITY_QUEBEC = "Quebec" //魁北克市
CITY_TORONTO = "Toronto" //多伦多
CITY_MONTREAL = "Montreal" //蒙特利尔
// 爱尔兰
CITY_IRELAND = "Ireland" //爱尔兰
@@ -154,4 +193,6 @@ const (
COUNTRY_CODE_RU = "RU" //俄罗斯
COUNTRY_CODE_NG = "NG" //尼日利亚
COUNTRY_CODE_VN = "VN" //越南
COUNTRY_CODE_CH = "CH" //瑞士
COUNTRY_CODE_NO = "NO" //挪威
)

View File

@@ -56,11 +56,12 @@ const (
BACKUP_MODE_MANUAL = "manual" //手动
//实例数据库状态
DBINSTANCE_DATABASE_CREATING = "creating" //创建中
DBINSTANCE_DATABASE_CREATE_FAILE = "create_failed" //创建失败
DBINSTANCE_DATABASE_RUNNING = "running" //正常
DBINSTANCE_DATABASE_DELETING = "deleting" //删除
DBINSTANCE_DATABASE_DELETE_FAILED = "delete_failed" //删除失败
DBINSTANCE_DATABASE_CREATING = "creating" //创建中
DBINSTANCE_DATABASE_CREATE_FAILE = "create_failed" //创建失败
DBINSTANCE_DATABASE_RUNNING = "running" //正常
DBINSTANCE_DATABASE_GRANT_PRIVILEGE = "grant_privilege" //赋予权限
DBINSTANCE_DATABASE_DELETING = "deleting" //删除
DBINSTANCE_DATABASE_DELETE_FAILED = "delete_failed" //删除失败
//实例用户状态
DBINSTANCE_USER_UNAVAILABLE = "unavailable" //不可用
@@ -107,10 +108,10 @@ const (
ALIYUN_DBINSTANCE_STORAGE_TYPE_CLOUD_SSD = "cloud_ssd" //SSD云盘
//华为云存储类型
HUAWEI_DBINSTANCE_STORAGE_TYPE_SSD = "SSD" //超高IO云硬盘
HUAWEI_DBINSTANCE_STORAGE_TYPE_SAS = "SAS" //高IO云硬盘
HUAWEI_DBINSTANCE_STORAGE_TYPE_SATA = "SATA" //普通IO云硬盘
HUAWEI_DBINSTANCE_STORAGE_TYPE_ULTRAHIGH = "ULTRAHIGH" //超高IO云硬盘
HUAWEI_DBINSTANCE_STORAGE_TYPE_ULTRAHIGHPRO = "ULTRAHIGHPRO"
HUAWEI_DBINSTANCE_STORAGE_TYPE_COMMON = "COMMON"
HUAWEI_DBINSTANCE_STORAGE_TYPE_HIGH = "HIGH"
)
var (

View File

@@ -18,7 +18,7 @@ import "yunion.io/x/onecloud/pkg/apis"
type SDBInstanceDatabasePrivilege struct {
Account string
DBInstancedccountId string
DBInstanceaccountId string
Privilege string
}

View File

@@ -19,7 +19,7 @@ import (
)
type DiskCreateInput struct {
apis.Meta
apis.VirtualResourceCreateInput
*DiskConfig
@@ -29,16 +29,14 @@ type DiskCreateInput struct {
PreferWire string `json:"prefer_wire_id"`
PreferHost string `json:"prefer_host_id"`
Name string `json:"name"`
Description string `json:"description"`
Hypervisor string `json:"hypervisor"`
Project string `json:"project"`
Domain string `json:"domain_id"`
Hypervisor string `json:"hypervisor"`
// Project string `json:"project"`
// Domain string `json:"domain_id"`
}
// ToServerCreateInput used by disk schedule
func (req *DiskCreateInput) ToServerCreateInput() *ServerCreateInput {
return &ServerCreateInput{
input := ServerCreateInput{
ServerConfigs: &ServerConfigs{
PreferRegion: req.PreferRegion,
PreferZone: req.PreferZone,
@@ -46,22 +44,29 @@ func (req *DiskCreateInput) ToServerCreateInput() *ServerCreateInput {
PreferHost: req.PreferHost,
Hypervisor: req.Hypervisor,
Disks: []*DiskConfig{req.DiskConfig},
Project: req.Project,
Domain: req.Domain,
// Project: req.Project,
// Domain: req.Domain,
},
Name: req.Name,
}
input.Name = req.Name
input.Project = req.Project
input.ProjectId = req.ProjectId
input.Domain = req.Domain
input.DomainId = req.DomainId
return &input
}
func (req *ServerCreateInput) ToDiskCreateInput() *DiskCreateInput {
return &DiskCreateInput{
input := DiskCreateInput{
DiskConfig: req.Disks[0],
PreferRegion: req.PreferRegion,
PreferHost: req.PreferHost,
PreferZone: req.PreferZone,
PreferWire: req.PreferWire,
Name: req.Name,
Project: req.Project,
Hypervisor: req.Hypervisor,
}
input.Name = req.Name
input.Project = req.Project
input.Domain = req.Domain
return &input
}

View File

@@ -21,6 +21,7 @@ const (
EIP_ASSOCIATE_TYPE_SERVER = "server"
EIP_ASSOCIATE_TYPE_NAT_GATEWAY = "natgateway"
EIP_ASSOCIATE_TYPE_LOADBALANCER = "loadbalancer"
EIP_ASSOCIATE_TYPE_UNKNOWN = "unknown"
EIP_STATUS_READY = "ready"
EIP_STATUS_UNKNOWN = "unknown"
@@ -38,10 +39,6 @@ const (
EIP_CHARGE_TYPE_BY_TRAFFIC = "traffic"
EIP_CHARGE_TYPE_BY_BANDWIDTH = "bandwidth"
EIP_CHARGE_TYPE_DEFAULT = EIP_CHARGE_TYPE_BY_TRAFFIC
// EIP associate resource type
EIP_ASSOCIATE_TYPE_VM = "server"
EIP_ASSOCIATE_TYPE_ELB = "elb"
)
var (

View File

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

View File

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

View File

@@ -59,6 +59,9 @@ const (
VM_SUSPEND = "suspend"
VM_SUSPEND_FAILED = "suspend_failed"
VM_RESUMING = "resuming"
VM_RESUME_FAILED = "resume_failed"
VM_START_DELETE = "start_delete"
VM_DELETE_FAIL = "delete_fail"
VM_DELETING = "deleting"
@@ -140,11 +143,18 @@ const (
HYPERVISOR_OPENSTACK = "openstack"
HYPERVISOR_UCLOUD = "ucloud"
HYPERVISOR_ZSTACK = "zstack"
HYPERVISOR_GOOGLE = "google"
HYPERVISOR_CTYUN = "ctyun"
// HYPERVISOR_DEFAULT = HYPERVISOR_KVM
HYPERVISOR_DEFAULT = HYPERVISOR_KVM
)
const (
CPU_MODE_QEMU = "qemu"
CPU_MODE_HOST = "host"
)
var VM_RUNNING_STATUS = []string{VM_START_START, VM_STARTING, VM_RUNNING, VM_BLOCK_STREAM}
var VM_CREATING_STATUS = []string{VM_CREATE_NETWORK, VM_CREATE_DISK, VM_START_DEPLOY, VM_DEPLOYING}
@@ -161,6 +171,8 @@ var HYPERVISORS = []string{
HYPERVISOR_OPENSTACK,
HYPERVISOR_UCLOUD,
HYPERVISOR_ZSTACK,
HYPERVISOR_GOOGLE,
HYPERVISOR_CTYUN,
}
var ONECLOUD_HYPERVISORS = []string{
@@ -176,6 +188,8 @@ var PUBLIC_CLOUD_HYPERVISORS = []string{
HYPERVISOR_QCLOUD,
HYPERVISOR_HUAWEI,
HYPERVISOR_UCLOUD,
HYPERVISOR_GOOGLE,
HYPERVISOR_CTYUN,
}
var PRIVATE_CLOUD_HYPERVISORS = []string{
@@ -198,6 +212,8 @@ var HYPERVISOR_HOSTTYPE = map[string]string{
HYPERVISOR_OPENSTACK: HOST_TYPE_OPENSTACK,
HYPERVISOR_UCLOUD: HOST_TYPE_UCLOUD,
HYPERVISOR_ZSTACK: HOST_TYPE_ZSTACK,
HYPERVISOR_GOOGLE: HOST_TYPE_GOOGLE,
HYPERVISOR_CTYUN: HOST_TYPE_CTYUN,
}
var HOSTTYPE_HYPERVISOR = map[string]string{
@@ -213,6 +229,8 @@ var HOSTTYPE_HYPERVISOR = map[string]string{
HOST_TYPE_OPENSTACK: HYPERVISOR_OPENSTACK,
HOST_TYPE_UCLOUD: HYPERVISOR_UCLOUD,
HOST_TYPE_ZSTACK: HYPERVISOR_ZSTACK,
HOST_TYPE_GOOGLE: HYPERVISOR_GOOGLE,
HOST_TYPE_CTYUN: HYPERVISOR_CTYUN,
}
const (
@@ -224,9 +242,18 @@ const (
VM_METADATA_CREATE_PARAMS = "create_params"
VM_METADATA_LOGIN_ACCOUNT = "login_account"
VM_METADATA_LOGIN_KEY = "login_key"
VM_METADATA_LAST_LOGIN_KEY = "last_login_key"
VM_METADATA_LOGIN_KEY_TIMESTAMP = "login_key_timestamp"
VM_METADATA_OS_ARCH = "os_arch"
VM_METADATA_OS_DISTRO = "os_distribution"
VM_METADATA_OS_NAME = "os_name"
VM_METADATA_OS_VERSION = "os_version"
)
func Hypervisors2HostTypes(hypervisors []string) []string {
hostTypes := make([]string, len(hypervisors))
for i := range hypervisors {
hostTypes[i] = HYPERVISOR_HOSTTYPE[hypervisors[i]]
}
return hostTypes
}

110
pkg/apis/compute/guests.go Normal file
View File

@@ -0,0 +1,110 @@
// Copyright 2019 Yunion
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package compute
import (
"yunion.io/x/onecloud/pkg/apis"
)
type ServerListInput struct {
apis.BaseListInput
// 过滤可用区底下的资源
Zone string `json:"zone"`
// 过滤连接此二层网络的资源
Wire string `json:"wire"`
// 过滤关联此网络的资源
Network string `json:"network"`
// Disk ID or Name
Disk string `json:"disk"`
// Host ID or Name
Host string `json:"host"`
// Show baremetal servers
Baremetal *bool `json:"baremetal"`
// Show gpu servers
Gpu *bool `json:"gpu"`
// Secgroup ID or Name
Secgroup string `json:"secgroup"`
// AdminSecgroup ID or Name
AdminSecgroup string `json:"admin_security"`
// Show server of hypervisor choices:"kvm|esxi|container|baremetal|aliyun|azure|aws|huawei|ucloud|zstack|openstack"`
Hypervisor string `json:"hypervisor"`
// Show servers in cloudregion
Region string `json:"region"`
// Show Servers with EIP
WithEip *bool `json:"with_eip"`
// Show Servers without EIP
WithoutEip *bool `json:"without_eip"`
// OS Type choices:"linux|windows|vmware"`
OsType string `json:"os_type"`
// Order by disk size choices:"asc|desc"
OrderByDisk string `json:"order_by_disk"`
// Order by host name choices:"asc|desc"
OrderByHost string `json:"order_by_host"`
// Vpc id or name
Vpc string `json:"vpc"`
// Eip id or name
UsableServerForEip string `json:"usable_server_for_eip"`
// Show Servers without user metadata
WithoutUserMeta *bool `json:"without_user_meta"`
// Instance Group ID or Name
Group string `json:"group"`
// Resource type choices:"shared|prepaid|dedicated"
ResourceType string `json:"resource_type"`
// Billing type choices:"postpaid|prepaid"
BillingType string `json:"billing_type"`
// 根据宿主机 SN 过滤
HostSn string `json:"host_sn"`
}
type ServerRebuildRootInput struct {
apis.Meta
// 镜像名称
Image string `json:"image"`
// 镜像 id
// required: true
ImageId string `json:"image_id"`
Keypair string `json:"keypair"`
KeypairId string `json:"keypair_id"`
ResetPassword *bool `json:"reset_password"`
Password string `json:"password"`
AutoStart *bool `json:"auto_start"`
AllDisks *bool `json:"all_disks"`
}
func (i ServerRebuildRootInput) GetImageName() string {
if len(i.Image) > 0 {
return i.Image
}
if len(i.ImageId) > 0 {
return i.ImageId
}
return ""
}
func (i ServerRebuildRootInput) GetKeypairName() string {
if len(i.Keypair) > 0 {
return i.Keypair
}
if len(i.KeypairId) > 0 {
return i.KeypairId
}
return ""
}
type ServerResumeInput struct {
apis.Meta
}

View File

@@ -0,0 +1,91 @@
// Copyright 2019 Yunion
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package compute
import (
"yunion.io/x/jsonutils"
"yunion.io/x/onecloud/pkg/apis"
)
type GuesttemplateCreateInput struct {
apis.SharableVirtualResourceCreateInput
// description: the content of guest template
// required: true
Content jsonutils.JSONObject `json:"content"`
VmemSize int `json:"vmem_size"`
VcpuCount int `json:"vcpu_count"`
OsType string `json:"os_type"`
Hypervisor string `json:"hypervisor"`
ImageType string `json:"image_type"`
ImageId string `json:"image_id"`
}
type GuesttemplateDetails struct {
apis.Meta
apis.SharableVirtualResourceDetails
SGuestTemplate
ConfigInfo GuesttemplateConfigInfo `json:"config_info"`
}
type GuesttemplateConfigInfo struct {
Region string `json:"region"`
Zone string `json:"zone"`
Hypervisor string `json:"hypervisor"`
OsType string `json:"os_type"`
Sku GuesttemplateSku `json:"sku"`
Disks []GuesttemplateDisk `json:"disks"`
Keypair string `json:"keypair"`
Nets []GuesttemplateNetwork `json:"nets"`
Secgroup string `json:"secgroup"`
IsolatedDeviceConfig []IsolatedDeviceConfig `json:"isolated_device_config"`
Image string `json:"image"`
ResetPassword bool `json:"reset_password"`
}
type GuesttemplateDisk struct {
Backend string `json:"backend"`
DiskType string `json:"disk_type"`
Index int `json:"index"`
SizeMb int `json:"size_mb"`
}
type GuesttemplateNetwork struct {
ID string `json:"id"`
Name string `json:"name"`
GuestIpStart string `json:"guest_ip_start"`
GuestIpEnd string `json:"guest_ip_end"`
VlanId int `json:"vlan_id"`
}
type GuesttemplateSku struct {
Name string `json:"name"`
CpuCoreCount int `json:"cpu_core_count"`
MemorySizeMb int `json:"memory_size_mb"`
InstanceTypeCategory string `json:"instance_type_category`
InstanceTypeFamily string `json:"instance_type_family"`
}
type GuesttemplatePublicInput struct {
apis.Meta
// description: the scope about public operator
// required: true
// example: system
Scope string `json:"scope"`
}

View File

@@ -31,6 +31,8 @@ const (
HOST_TYPE_OPENSTACK = "openstack"
HOST_TYPE_UCLOUD = "ucloud"
HOST_TYPE_ZSTACK = "zstack"
HOST_TYPE_GOOGLE = "google"
HOST_TYPE_CTYUN = "ctyun"
HOST_TYPE_DEFAULT = HOST_TYPE_HYPERVISOR
@@ -107,6 +109,7 @@ var HOST_TYPES = []string{
HOST_TYPE_OPENSTACK,
HOST_TYPE_UCLOUD,
HOST_TYPE_ZSTACK,
HOST_TYPE_CTYUN,
}
var NIC_TYPES = []string{NIC_TYPE_IPMI, NIC_TYPE_ADMIN}

29
pkg/apis/compute/input.go Normal file
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 compute
type RegionalResourceCreateInput struct {
Cloudregion string `json:"cloudregion"`
CloudregionId string `json:"cloudregion_id"`
}
type ManagedResourceCreateInput struct {
Manager string `json:"manager"`
ManagerId string `json:"manager_id"`
}
type DeletePreventableCreateInput struct {
DisableDelete *bool `json:"disable_delete"`
}

View File

@@ -0,0 +1,36 @@
// Copyright 2019 Yunion
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package compute
import "yunion.io/x/onecloud/pkg/apis"
type InstanceGroupListInput struct {
apis.BaseListInput
// Filter by service type
ServiceType string `json:"service_type"`
// Filter by parent id
ParentId string `json:"parent_id"`
// Filter by zone id
ZoneId string `json:"zone_id"`
// Filter by guest id or name
Server string `json:"server"`
}
type InstanceGroupDetail struct {
apis.Meta
SGroup
GuestCount int64 `json:"guest_count"`
}

200
pkg/apis/compute/network.go Normal file
View File

@@ -0,0 +1,200 @@
// Copyright 2019 Yunion
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package compute
import (
"yunion.io/x/onecloud/pkg/apis"
)
type NetworkListInput struct {
apis.BaseListInput
apis.SharableVirtualResourceListInput
CloudaccountListInput
CloudTypeListInput
Zone string `json:"zone"`
Zones []string `json:"zones"`
Vpc string `json:"vpc"`
Cloudregion string `json:"cloudregion"`
// deprecate:true
// description: this param will be deprecate at 3.0
CloudregionId string `json:"cloudregion_id"`
// deprecate:true
// description: this param will be deprecate at 3.0
Region string `json:"region"`
// deprecate:true
// description: this param will be deprecate at 3.0
RegionId string `json:"region_id"`
Usable bool `json:"usable"`
Host string `json:"host"`
City string `json:"city"`
}
type NetworkCreateInput struct {
apis.SharableVirtualResourceCreateInput
// description: ip range of guest, if not set, you shoud set guest_ip_start,guest_ip_end and guest_ip_mask params
// example: 10.168.222.1/24
GuestIpPrefix string `json:"guest_ip_prefix"`
// description: ip range of guest ip start, if set guest_ip_prefix, this parameter will be useless
// example: 10.168.222.1
GuestIpStart string `json:"guest_ip_start"`
// description: ip range of guest ip end, if set guest_ip_prefix, this parameter will be useless
// example: 10.168.222.100
GuestIpEnd string `json:"guest_ip_end"`
// description: ip range of guest ip mask, if set guest_ip_prefix, this parameter will be useless
// example: 24
// maximum: 30
// minimum: 12
GuestIpMask int64 `json:"guest_ip_mask"`
IfnameHint string `json:"ifname_hint"`
// description: guest gateway
// example: 192.168.222.1
GuestGateway string `json:"guest_gateway"`
// description: guest dns
// example: 114.114.114.114
GuestDns string `json:"guest_dns"`
// description: guest dhcp
// example: 192.168.222.1,192.168.222.4
GuestDHCP string `json:"guest_dhcp"`
// swagger:ignore
WireId string `json:"wire_id"`
// description: wire id or name
Wire string `json:"wire"`
// description: zone id or name
Zone string `json:"zone"`
// description: vpc id or name
Vpc string `json:"vpc"`
// description: server type
// enum: guest,baremetal,pxe,ipmi
// default: guest
ServerType string `json:"server_type"`
}
type NetworkDetails struct {
apis.Meta
apis.SharableVirtualResourceDetails
CloudproviderDetails
SNetwork
Wire string `json:"wire"`
Exit bool `json:"exit"`
Ports int `json:"ports"`
PortsUsed int `json:"ports_used"`
Vnics int `json:"vnics"`
BmVnics int `json:"bm_nics"`
LbVnics int `json:"lb_vnics"`
EipVnics int `json:"eip_vnics"`
GroupVnics int `json:"group_vnics"`
ReserveVnics int `json:"reserve_vnics"`
Vpc string `json:"vpc"`
VpcId string `json:"vpc_id"`
VpcExtId string `json:"vpc_ext_id"`
Routes [][]string `json:"routes"`
Schedtags []SchedtagShortDescDetails `json:"schedtags"`
}
type NetworkReserveIpInput struct {
apis.Meta
// description: reserved ip list
// required: true
// example: [10.168.222.131, 10.168.222.134]
Ips []string `json:"ips"`
// description: the comment
// example: reserve ip for test
Notes string `json:"notes"`
Status string `json:"status"`
// description: The reserved cycle
// required: false
Duration string `json:"duration"`
}
type NetworkReleaseReservedIpInput struct {
apis.Meta
// description: IP to be released
// required: true
// example: 10.168.222.121
Ip string `json:"ip"`
}
type NetworkPurgeInput struct {
apis.Meta
}
type NetworkMergeInput struct {
apis.Meta
// description: network id or name to be merged
// required: true
// example: test-network
Target string `json:"target"`
}
type NetworkSplitInput struct {
apis.Meta
// description: The middle - separated IP must belong to the network
// required: true
// example: 10.168.222.181
SplitIp string `json:"split_ip"`
// description: another network name after split
// required: false
Name string `json:"name"`
}
type NetworkTryCreateNetworkInput struct {
apis.Meta
Ip string `json:"ip"`
Mask int `json:"mask"`
ServerType string `json:"server_type"`
IsOnPremise bool `json:"is_on_premise"`
}
type NetworkSyncInput struct {
apis.Meta
}
type NetworkStatusInput struct {
apis.Meta
// description: network status
// required: true
// example: available
// enum: available,unavailable
Status string `json:"status"`
}

View File

@@ -14,6 +14,10 @@
package compute
import (
"time"
)
const (
// # DEFAULT_BANDWIDTH = options.default_bandwidth
MAX_BANDWIDTH = 100000
@@ -40,6 +44,8 @@ const (
NETWORK_STATUS_DELETING = "deleting"
NETWORK_STATUS_DELETED = "deleted"
NETWORK_STATUS_DELETE_FAILED = "delete_failed"
NETWORK_STATUS_START_SYNC = "start_sync"
NETWORK_STATUS_SYNCING = "sync"
)
var (
@@ -53,7 +59,9 @@ var (
REGIONAL_NETWORK_PROVIDERS = []string{
CLOUD_PROVIDER_HUAWEI,
CLOUD_PROVIDER_CTYUN,
CLOUD_PROVIDER_UCLOUD,
CLOUD_PROVIDER_GOOGLE,
}
)
@@ -75,4 +83,5 @@ type SNetworkAddress struct {
OwnerType string
AssociateId string
AssociateType string
CreatedAt time.Time
}

View File

@@ -0,0 +1,23 @@
package compute
const (
ROUTE_TABLE_TYPE_VPC = "VPC" // VPC路由器
ROUTE_TABLE_TYPE_VBR = "VBR" // 边界路由器
)
const (
ROUTE_ENTRY_TYPE_CUSTOM = "Custom" // 自定义路由
ROUTE_ENTRY_TYPE_SYSTEM = "System" // 系统路由
)
const (
Next_HOP_TYPE_INSTANCE = "Instance" // ECS实例。
Next_HOP_TYPE_HAVIP = "HaVip" // 高可用虚拟IP。
Next_HOP_TYPE_VPN = "VpnGateway" // VPN网关。
Next_HOP_TYPE_NAT = "NatGateway" // NAT网关。
Next_HOP_TYPE_NETWORK = "NetworkInterface" // 辅助弹性网卡。
Next_HOP_TYPE_ROUTER = "RouterInterface" // 路由器接口。
Next_HOP_TYPE_IPV6 = "IPv6Gateway" // IPv6网关。
Next_HOP_TYPE_INTERNET = "InternetGateway" // Internet网关。
Next_HOP_TYPE_EGRESS_INTERNET = "EgressInternetGateway" // egress only Internet网关。
)

View File

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

View File

@@ -26,7 +26,7 @@ import (
)
type SSecgroupRuleCreateInput struct {
apis.Meta
apis.ResourceBaseCreateInput
Priority int
Protocol string
@@ -37,6 +37,7 @@ type SSecgroupRuleCreateInput struct {
CIDR string
Action string
Description string
Secgroup string
SecgroupId string
}
@@ -70,10 +71,14 @@ func (input *SSecgroupRuleCreateInput) Check() error {
}
type SSecgroupCreateInput struct {
apis.Meta
apis.SharableVirtualResourceCreateInput
Name string
Status string
Description string
Rules []SSecgroupRuleCreateInput
Rules []SSecgroupRuleCreateInput `json:"rules"`
}
type SSecgroupListFilterInput struct {
apis.BaseListInput
Equals string
Server string
}

View File

@@ -0,0 +1,60 @@
// Copyright 2019 Yunion
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package compute
import "yunion.io/x/onecloud/pkg/apis"
type ServiceCatalogCreateInput struct {
apis.SharableVirtualResourceCreateInput
// description: service catalog icon url
// example: https://yunion.io/files/hello.png
IconUrl string `json:"icon_url"`
// description: the id or name of guest template
// example: good
// required: true
GuestTemplate string `json:"guest_template"`
}
type ServiceCatalogUpdateInput struct {
// description: resource name
// unique: true
// example: test-network
Name string `json:"name"`
// description: service catalog icon url
// example: https://yunion.io/files/hello.png
IconUrl string `json:"icon_url"`
// description: the id or name of guest template
// example: good
GuestTemplate string `json:"guest_template"`
}
type ServiceCatalogDeploy struct {
// description: name of the new vm
// example: hello
Name string `json:"name"`
// description: generate name automatically if name is repeated, and only one of name and this shoudle be given
// example: hello
GenerateName string `json:"generate_name"`
// description: the count of the new vm
// example: 1
Count int `json:"count"`
}

View File

@@ -22,6 +22,7 @@ type SSnapshotCreateInput struct {
Name string `json:"name"`
Description string `json:"description"`
Disk string `json:"disk"`
DiskId string `json:"disk_id"`
StorageId string `json:"storage_id"`
CreatedBy string `json:"created_by"`

View File

@@ -49,6 +49,7 @@ const (
// STORAGE_CLOUD_SSD ="cloud_ssd"
STORAGE_LOCAL_BASIC = "local_basic"
STORAGE_LOCAL_SSD = "local_ssd"
STORAGE_LOCAL_PRO = "local_pro"
STORAGE_CLOUD_BASIC = "cloud_basic"
STORAGE_CLOUD_PREMIUM = "cloud_premium"
@@ -59,6 +60,7 @@ const (
// openstack
STORAGE_OPENSTACK_ISCSI = "iscsi"
STORAGE_OPENSTACK_NOVA = "nova"
// Ucloud storage type
STORAGE_UCLOUD_CLOUD_NORMAL = "CLOUD_NORMAL" // 普通云盘
@@ -70,6 +72,16 @@ const (
// Zstack storage type
STORAGE_ZSTACK_LOCAL_STORAGE = "localstorage"
STORAGE_ZSTACK_CEPH = "ceph"
// Google storage type
STORAGE_GOOGLE_LOCAL_SSD = "local-ssd" //本地SSD暂存盘 (最多8个)
STORAGE_GOOGLE_PD_STANDARD = "pd-standard" //标准永久性磁盘
STORAGE_GOOGLE_PD_SSD = "pd-ssd" //SSD永久性磁盘
// ctyun storage type
STORAGE_CTYUN_SSD = "SSD" // 超高IO云硬盘
STORAGE_CTYUN_SAS = "SAS" // 高IO云硬盘
STORAGE_CTYUN_SATA = "SATA" // 普通IO云硬盘
)
const (

View File

@@ -24,6 +24,8 @@ const (
VPC_STATUS_DELETE_FAILED = "delete_failed"
VPC_STATUS_DELETED = "deleted"
VPC_STATUS_UNKNOWN = "unknown"
VPC_STATUS_START_SYNC = "start_sync"
VPC_STATUS_SYNCING = "sync"
MAX_VPC_PER_REGION = 3

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