Compare commits

...

862 Commits

Author SHA1 Message Date
yunion-ci-robot
1296f7292e Merge pull request #8223 from yousong/automated-cherry-pick-of-#8222-upstream-release-3.0
Automated cherry pick of #8222: webconsole: ssh: each argument on its own line
2020-10-10 15:40:17 +08:00
Yousong Zhou
44b560adba webconsole: ssh: add keyboard-interactive as an option
For ESXi 6.0

  Authentications that can continue: publickey,keyboard-interactive
2020-10-10 14:48:59 +08:00
Yousong Zhou
7b2c63b60b webconsole: ssh: each argument on its own line 2020-10-10 14:48:59 +08:00
Zexi Li
af6d97823a Merge pull request #7875 from rainzm/automated-cherry-pick-of-#7870-upstream-release-3.0
Automated cherry pick of #7870: fix(esxiagent): add HostDelayTaskWorkerCount
2020-09-11 20:56:21 +08:00
Zexi Li
e67837c5b8 Merge pull request #7867 from wanyaoqi/automated-cherry-pick-of-#7836-upstream-release-3.0
Automated cherry pick of #7836: host: fix rbd storage cache iso image
2020-09-11 20:54:40 +08:00
rainzm
99381ac86f fix(esxiagent): add HostDelayTaskWorkerCount
之前,HostDelayWorker 是通过 hostutils.InitWorkerManager 来初始化,
worker的数量依赖于options.HostOptions.DefaultRequestWorkerCount, 因为
这个options没有经过初始化,所以就是0,导致worker count的数量变为1。

现在增加了 HostDelayTaskWorkerCount 来管理这个count,默认值为8。
2020-09-11 17:24:18 +08:00
wanyaoqi
73be2088d1 host: fix rbd storage cache iso image 2020-09-10 23:30:05 +08:00
wanyaoqi
1aef4c5435 fix get storage capacity on init' (#7691) 2020-09-01 00:59:36 +08:00
Zexi Li
23cc8eff96 Merge pull request #7627 from wanyaoqi/automated-cherry-pick-of-#7623-upstream-release-3.0
Automated cherry pick of #7623: fix gpfs check mountpoint
2020-08-25 17:41:32 +08:00
wanyaoqi
718cd4527a fix gpfs check mountpoint 2020-08-25 15:54:06 +08:00
Zexi Li
1e0cfa9509 Merge pull request #7539 from wanyaoqi/automated-cherry-pick-of-#7530-upstream-release-3.0
Automated cherry pick of #7530: fix mount xfs
2020-08-11 11:16:48 +08:00
wanyaoqi
014feeb399 fix mount xfs 2020-08-10 20:07:11 +08:00
Zexi Li
e7f2dc5d86 Merge pull request #7451 from tb365/automated-cherry-pick-of-#7447-upstream-release-3.0
Automated cherry pick of #7447: aws elb listener&rule name too long fix
2020-08-02 10:09:01 +08:00
wanyaoqi
3e22345216 fix cache non lvm disks (#7463) 2020-08-01 21:12:03 +08:00
tangbin
4ed140e796 aws elb listener&rule name too long fix 2020-08-01 11:13:42 +08:00
Zexi Li
a793e617bb Merge pull request #7445 from wanyaoqi/automated-cherry-pick-of-#7441-upstream-release-3.0
Automated cherry pick of #7441: fix deploy admin auth key
2020-08-01 00:08:34 +08:00
wanyaoqi
6f41845086 fix deploy admin auth key 2020-07-31 23:27:57 +08:00
Zexi Li
d2c10534cf baremetal: fix hpssactl split last LV size out of limit (#7430) 2020-07-31 22:37:02 +08:00
Zexi Li
e1e3f69e45 Merge pull request #7423 from ioito/automated-cherry-pick-of-#7417-upstream-release-3.0
Automated cherry pick of #7417: fix: avoid lost backend params
2020-07-31 18:08:14 +08:00
Zexi Li
c6a7064f24 Merge pull request #7411 from ioito/automated-cherry-pick-of-#7405-upstream-release-3.0
Automated cherry pick of #7405: fix: avoid account sync deadlock
2020-07-31 18:05:40 +08:00
Qu Xuan
07efbb4e16 fix: avoid lost backend params 2020-07-31 17:20:48 +08:00
Qu Xuan
89147a4243 fix: avoid account sync deadlock 2020-07-31 16:41:24 +08:00
Zexi Li
eaaf2d976a Merge pull request #7363 from ioito/automated-cherry-pick-of-#7359-upstream-release-3.0
Automated cherry pick of #7359: fix: 修复vm绑定重复安全组
2020-07-28 20:56:14 +08:00
Qu Xuan
bf3c3befec fix: 修复vm绑定重复安全组 2020-07-28 18:17:42 +08:00
yunion-ci-robot
85f3f0ac56 Merge pull request #7307 from wanyaoqi/automated-cherry-pick-of-#7302-upstream-release-3.0
Automated cherry pick of #7302: fix clone clean pending usage
2020-07-24 22:50:41 +08:00
wanyaoqi
a0235d6bb5 fix clone clean pending usage 2020-07-23 18:39:40 +08:00
Zexi Li
f8189a0623 Merge pull request #7298 from wanyaoqi/automated-cherry-pick-of-#7294-upstream-release-3.0
Automated cherry pick of #7294: fix snapshot clean pending usage
2020-07-23 13:48:22 +08:00
wanyaoqi
f3ff18ea2f fix snapshot clean pending usage 2020-07-23 11:41:41 +08:00
Zexi Li
86eaefa0db Merge pull request #7290 from tb365/automated-cherry-pick-of-#7286-upstream-release-3.0
Automated cherry pick of #7286: apigateway host imports data validate
2020-07-22 21:44:28 +08:00
tangbin
53f76e2ea7 format fix 2020-07-22 18:12:14 +08:00
tangbin
6b4a8cd866 fix empty else 2020-07-22 18:12:13 +08:00
tangbin
731082303e fix host import 2020-07-22 18:12:13 +08:00
tangbin
ec4e466c50 fix huawei delete resource 2020-07-22 18:12:13 +08:00
tangbin
1a6030beee fix huawei elb disable healthcheck 2020-07-22 18:12:13 +08:00
tangbin
07bef07ac8 lb sync project fix 2020-07-22 18:12:12 +08:00
tangbin
1bbdfc9199 add more log 2020-07-22 18:05:56 +08:00
tangbin
2afeece9ba apigateway host imports data validate 2020-07-22 18:05:56 +08:00
Zexi Li
e737314cb2 Merge pull request #7285 from rainzm/automated-cherry-pick-of-#7281-upstream-release-3.0
Automated cherry pick of #7281: fix(esxi): Select correct unitNumber for ide control when creating disk
2020-07-22 13:52:49 +08:00
Rain Zheng
87f65c5fa7 fix(esxi): Select correct unitNumber for ide control when creating disk 2020-07-21 20:52:32 +08:00
Zexi Li
0d71f5da1c Merge pull request #7260 from tb365/automated-cherry-pick-of-#7237-upstream-release-3.0
Automated cherry pick of #7237: huawei eip delete fix
2020-07-20 20:47:26 +08:00
tangbin
0e606419ee huawei eip delete fix 2020-07-20 10:50:33 +08:00
yunion-ci-robot
c465b511f4 Merge pull request #7208 from zexi/automated-cherry-pick-of-#7201-upstream-release-3.0
Automated cherry pick of #7201: webconsole: fix old session make new session closed
2020-07-16 20:16:20 +08:00
Zexi Li
02298c8450 webconsole: fix old session make new session closed 2020-07-16 18:51:52 +08:00
Zexi Li
07b088e549 Merge pull request #7185 from ioito/automated-cherry-pick-of-#7177-upstream-release-3.0
Automated cherry pick of #7177: fix: 避免华为云安全组规则删除失败
2020-07-16 10:16:45 +08:00
Qu Xuan
7a70c19ce3 fix: 避免华为云安全组规则删除失败 2020-07-15 17:15:14 +08:00
Zexi Li
0d980e51f6 Merge pull request #7129 from wanyaoqi/bugfix/wyq/cherry-pick-7125-3.0
Manual cherry pick of #7125: fix rbd storage set storage info
2020-07-10 20:16:11 +08:00
wanyaoqi
62375a75c9 fix rbd storage set storage info 2020-07-10 15:00:18 +08:00
Zexi Li
7b0dd1e7a3 Merge pull request #7110 from wanyaoqi/automated-cherry-pick-of-#7106-upstream-release-3.0
Automated cherry pick of #7106: fix set storage info bind mount
2020-07-09 21:20:07 +08:00
wanyaoqi
ad095330bf fix set storage info bind mount 2020-07-09 14:57:39 +08:00
Zexi Li
b13e3230d8 Merge pull request #7065 from rainzm/automated-cherry-pick-of-#7061-upstream-release-3.0
Automated cherry pick of #7061: Update docker image onecloud-base and its references
2020-07-07 11:13:00 +08:00
rainzm
ca8709ee08 Update docker image onecloud-base and its references 2020-07-06 21:08:25 +08:00
Zexi Li
617ee1c461 Merge pull request #7040 from swordqiu/automated-cherry-pick-of-#7036-upstream-release-3.0
Automated cherry pick of #7036: fix: cloud account sync may block
2020-07-04 12:09:37 +08:00
Qiu Jian
3e4b0894a7 fix: cloud account sync may block 2020-07-04 10:26:16 +08:00
Zexi Li
370037f561 Merge pull request #7016 from wanyaoqi/automated-cherry-pick-of-#7006-upstream-release-3.0
Automated cherry pick of #7006: bind mount nfs storage path
2020-07-02 17:42:35 +08:00
wanyaoqi
8ebf1d44e8 bind mount nfs storage path 2020-07-02 17:38:33 +08:00
Zexi Li
a8a7edda6e Merge pull request #6979 from wanyaoqi/automated-cherry-pick-of-#6975-upstream-release-3.0
Automated cherry pick of #6975: fix deploy backup server order
2020-06-30 23:08:55 +08:00
wanyaoqi
880686d690 fix deploy backup server order 2020-06-30 22:11:04 +08:00
Zexi Li
aea5736f14 Merge pull request #6940 from swordqiu/automated-cherry-pick-of-#6936-upstream-release-3.0
Automated cherry pick of #6936: fix: sort quota list result by usage rate
2020-06-23 23:28:18 +08:00
Qiu Jian
0feebf0b69 fix: sort quota list result by usage rate 2020-06-23 22:28:00 +08:00
Zexi Li
5fed98ec31 Merge pull request #6925 from swordqiu/automated-cherry-pick-of-#6921-upstream-release-3.0
Automated cherry pick of #6921: fix: simplify forbidden user login message
2020-06-23 21:26:11 +08:00
Qiu Jian
3276f8e387 fix: simplify forbidden user login message 2020-06-23 17:48:50 +08:00
yunion-ci-robot
7a9c8de48f Merge pull request #6910 from wanyaoqi/automated-cherry-pick-of-#6906-upstream-release-3.0
Automated cherry pick of #6906: disable dhclient
2020-06-22 23:38:00 +08:00
wanyaoqi
40f23eeef3 disable dhclient 2020-06-22 21:32:02 +08:00
Zexi Li
a953c56e50 Merge pull request #6897 from yousong/automated-cherry-pick-of-#6893-upstream-release-3.0
Automated cherry pick of #6893: cloudcommon: app: cosmetic change
2020-06-22 09:17:39 +08:00
Yousong Zhou
afbc7a9096 cloudcommon: policy: fix interval and oneshot sync
Reduce CPU utilization caused by queued time.AfterFunc calls
2020-06-21 18:34:41 +08:00
Yousong Zhou
32995e2acf cloudcommon: app: cosmetic change 2020-06-21 18:34:41 +08:00
yunion-ci-robot
10b767b6c6 Merge pull request #6888 from swordqiu/automated-cherry-pick-of-#6885-upstream-release-3.0
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
b0c58216b2 fix: wrong cloud provider status when sync disconnected cloud account 2020-06-19 01:23:49 +08:00
yunion-ci-robot
776551f9e6 Merge pull request #6867 from yousong/automated-cherry-pick-of-#6859-upstream-release-3.0
Automated cherry pick of #6859: cloudaccounts: one sync task in queue per cloudaccount
2020-06-18 23:17:04 +08:00
Zexi Li
efd481bc83 Merge pull request #6874 from ioito/automated-cherry-pick-of-#6871-upstream-release-3.0
Automated cherry pick of #6871: fix: 避免同步删除失败
2020-06-18 19:06:01 +08:00
Qu Xuan
6815918e04 fix: 避免同步删除失败 2020-06-18 17:23:13 +08:00
Yousong Zhou
9b94f70804 cloudaccounts: one sync task in queue per cloudaccount 2020-06-18 17:12:58 +08:00
Zexi Li
cdf41a6c81 Merge pull request #6843 from zexi/automated-cherry-pick-of-#6840-upstream-release-3.0
Automated cherry pick of #6840: scheduler: fix memory over committed
2020-06-17 18:49:45 +08:00
Zexi Li
eaada436b9 Merge pull request #6857 from yousong/automated-cherry-pick-of-#6837-upstream-release-3.0
Automated cherry pick of #6837: appsrv: ring: release ring content on pop
2020-06-17 11:24:44 +08:00
Yousong Zhou
ec0264f807 appsrv: rework TestRing 2020-06-17 10:54:15 +08:00
Yousong Zhou
6faaf905a0 appsrv: ring: release ring content on pop 2020-06-17 10:54:15 +08:00
Zexi Li
4138871ceb Merge pull request #6852 from swordqiu/automated-cherry-pick-of-#6849-upstream-release-3.0
Automated cherry pick of #6849: fix: disable policy rule compaction
2020-06-17 10:29:14 +08:00
Qiu Jian
3b9cd6da73 fix: policy allow if one of the matching rules is allow 2020-06-16 23:12:07 +08:00
Qiu Jian
9be75f2368 fix: disable policy rule compaction 2020-06-16 23:12:07 +08:00
Zexi Li
78b70d950d Merge pull request #6847 from wanyaoqi/automated-cherry-pick-of-#6844-upstream-release-3.0
Automated cherry pick of #6844: fix cpu usage metrics
2020-06-16 21:00:55 +08:00
wanyaoqi
99f058aad0 fix cpu usage metrics 2020-06-16 20:45:40 +08:00
Zexi Li
9451b707ae Merge pull request #6827 from wanyaoqi/automated-cherry-pick-of-#6824-upstream-release-3.0
Automated cherry pick of #6824: fix windows install regedit record
2020-06-16 20:12:40 +08:00
Zexi Li
03565249a3 scheduler: fix memory over committed 2020-06-16 19:19:13 +08:00
wanyaoqi
7f7ea28684 fix windows install regedit record 2020-06-15 10:59:21 +08:00
Zexi Li
b62340a032 Merge pull request #6820 from yousong/automated-cherry-pick-of-#6817-upstream-release-3.0
Automated cherry pick of #6817: guestnetworks: use math/rand instead of crypto/rand
2020-06-12 10:09:33 +08:00
Yousong Zhou
a889c585e7 guestnetworks: reduce odds of collision seeded by epoch seconds 2020-06-11 21:23:19 +08:00
Yousong Zhou
5b59e1cc5f guestnetworks: use math/rand instead of crypto/rand 2020-06-11 21:23:18 +08:00
Zexi Li
4f6dac72ff Merge pull request #6814 from ioito/automated-cherry-pick-of-#6810-upstream-release-3.0
Automated cherry pick of #6810: fix: 避免openstack磁盘和存储窜位
2020-06-11 17:52:28 +08:00
Zexi Li
037c3dd4c3 Merge pull request #6806 from zexi/automated-cherry-pick-of-#6803-upstream-release-3.0
Automated cherry pick of #6803: webconsole: fix version and others handler not handle
2020-06-11 17:50:19 +08:00
Qu Xuan
3ac79f8d0a fix: 避免openstack磁盘和存储窜位 2020-06-11 14:15:12 +08:00
Zexi Li
55cde2abc0 Merge pull request #6800 from wanyaoqi/automated-cherry-pick-of-#6797-upstream-release-3.0
Automated cherry pick of #6797: fix host list servers filter
2020-06-10 17:06:09 +08:00
Zexi Li
fbbf738a1c webconsole: fix version and others handler not handle 2020-06-10 17:03:41 +08:00
wanyaoqi
8c670a116d fix host list servers filter 2020-06-10 14:09:09 +08:00
Zexi Li
7a1ce75307 Merge pull request #6789 from rainzm/automated-cherry-pick-of-#6786-upstream-release-3.0
Automated cherry pick of #6786: fix: Hanle the error of vdisk.GetIStorage in syncCloudDisk
2020-06-10 11:28:12 +08:00
Zexi Li
fc825b87c2 Merge pull request #6766 from ioito/automated-cherry-pick-of-#6663-upstream-release-3.0
Automated cherry pick of #6663: fix: 优化安全组同步逻辑
2020-06-10 11:19:08 +08:00
Zexi Li
0265f6eed4 Merge pull request #6785 from rainzm/automated-cherry-pick-of-#6782-upstream-release-3.0
Automated cherry pick of #6782: fix: Add '/version' handler for notify
2020-06-10 10:19:01 +08:00
Zexi Li
a3e8dd22c1 Merge pull request #6794 from swordqiu/automated-cherry-pick-of-#6791-upstream-release-3.0
Automated cherry pick of #6791: fix: policy-explain not working properly
2020-06-10 09:53:09 +08:00
Qiu Jian
422793d4b4 fix: policy-explain not working properly 2020-06-09 22:31:06 +08:00
rainzm
474c78a61a fix: Hanle the error of vdisk.GetIStorage in syncCloudDisk 2020-06-09 19:50:58 +08:00
rainzm
9a58765d18 fix: Add '/version' handler for notify 2020-06-09 18:56:03 +08:00
Qu Xuan
b0f33a8b2c fix: 优化安全组同步逻辑 2020-06-08 16:57:29 +08:00
yunion-ci-robot
5ca6eecc01 Merge pull request #6695 from ioito/automated-cherry-pick-of-#6692-upstream-release-3.0
Automated cherry pick of #6692: fix: 返回object默认acl
2020-06-06 10:59:48 +08:00
Qu Xuan
0c6323bc26 fix: 返回object默认acl 2020-06-05 11:01:18 +08:00
Zexi Li
679385dc82 Merge pull request #6747 from wanyaoqi/automated-cherry-pick-of-#6744-upstream-release-3.0
Automated cherry pick of #6744: bind mount local image path to container path
2020-06-04 21:24:25 +08:00
wanyaoqi
fe819b30b1 bind mount local image path to container path 2020-06-04 20:23:58 +08:00
Zexi Li
b51daa01d5 Merge pull request #6725 from ioito/automated-cherry-pick-of-#6722-upstream-release-3.0
Automated cherry pick of #6722: fix: 添加region翻译
2020-06-04 10:28:36 +08:00
Qu Xuan
a94ef0ac31 fix: 添加region翻译 2020-06-03 20:42:07 +08:00
Zexi Li
920cfef241 Merge pull request #6716 from wanyaoqi/automated-cherry-pick-of-#6713-upstream-release-3.0
Automated cherry pick of #6713: isolated device manager:
2020-06-03 17:25:23 +08:00
wanyaoqi
78e55702ac isolated device manager:
- fix find boot_vga got No such file or dirtory
2020-06-03 15:53:43 +08:00
yunion-ci-robot
ad3c1b01a7 Merge pull request #6689 from ioito/automated-cherry-pick-of-#6686-upstream-release-3.0
Automated cherry pick of #6686: fix: 避免锁超时
2020-06-02 13:59:42 +08:00
Qu Xuan
4588fdabad fix: 避免锁超时 2020-06-02 11:15:43 +08:00
Zexi Li
266f684581 Merge pull request #6678 from ioito/automated-cherry-pick-of-#6675-upstream-release-3.0
Automated cherry pick of #6675: fix: add us-west4 for google region
2020-06-02 10:00:28 +08:00
Zexi Li
5f5097058a Merge pull request #6673 from wanyaoqi/automated-cherry-pick-of-#6670-upstream-release-3.0
Automated cherry pick of #6670: get snapshots order by created at asc
2020-06-02 09:58:46 +08:00
Qu Xuan
51f64a9605 fix: add us-west4 for google region 2020-06-01 18:29:21 +08:00
wanyaoqi
e81d1848c4 get snapshots order by created at asc 2020-06-01 15:10:59 +08:00
Zexi Li
18c4bcd9db Merge pull request #6656 from swordqiu/automated-cherry-pick-of-#6636-upstream-release-3.0
Automated cherry pick of #6636: fix: ignore match weights when searching matched policysets
2020-05-29 14:20:40 +08:00
Zexi Li
807d5ca119 Merge pull request #6653 from wanyaoqi/automated-cherry-pick-of-#6650-upstream-release-3.0
Automated cherry pick of #6650: fix migrate with multi local storage
2020-05-29 14:19:06 +08:00
Qiu Jian
df9c9431a6 fix: ignore match weights when searching matched policysets 2020-05-29 12:52:54 +08:00
wanyaoqi
d90c2eef70 fix migrate with multi local storage 2020-05-29 11:55:19 +08:00
Zexi Li
fba3067090 Merge pull request #6624 from ioito/automated-cherry-pick-of-#6619-upstream-release-3.0
Automated cherry pick of #6619: fix: 避免azure卸载磁盘失败
2020-05-27 17:52:18 +08:00
Qu Xuan
6a5e6b2920 fix: 避免azure卸载磁盘失败 2020-05-27 15:57:21 +08:00
Zexi Li
e1bda8042e Merge pull request #6601 from wanyaoqi/automated-cherry-pick-of-#6598-upstream-release-3.0
Automated cherry pick of #6598: fix remotefile fetch image propertites
2020-05-26 17:15:26 +08:00
Zexi Li
ec587c668e Merge pull request #6597 from ioito/automated-cherry-pick-of-#6594-upstream-release-3.0
Automated cherry pick of #6594: fix: bucket信息修正
2020-05-26 17:14:20 +08:00
wanyaoqi
0f27e97b60 fix remotefile fetch image propertites 2020-05-26 15:55:24 +08:00
Qu Xuan
56efaf297d fix: bucket信息修正 2020-05-26 15:10:57 +08:00
Zexi Li
67b3bfe1d7 Merge pull request #6585 from zexi/automated-cherry-pick-of-#6584-upstream-release-3.0
Automated cherry pick of #6584: fix k8s repo wrong privilege
2020-05-25 18:28:12 +08:00
Zexi Li
e697c9a7a5 fix k8s repo wrong privilege 2020-05-25 16:59:45 +08:00
Zexi Li
ac23daea23 Merge pull request #6575 from zhaoxiangchun/automated-cherry-pick-of-#6573-upstream-release-3.0
Automated cherry pick of #6573: zstack宿主机监控中增加参数信息进行Unmarshal
2020-05-25 12:18:03 +08:00
zhaoxiangchun
0ab2b4fea6 zstack宿主机监控中增加参数信息进行Unmarshal 2020-05-24 17:18:52 +08:00
Zexi Li
7fc1319622 Merge pull request #6570 from swordqiu/automated-cherry-pick-of-#6567-upstream-release-3.0
Automated cherry pick of #6567: fix: default policy not effective
2020-05-22 22:48:41 +08:00
Zexi Li
87c538e3fa Merge pull request #6561 from ioito/automated-cherry-pick-of-#6558-upstream-release-3.0
Automated cherry pick of #6558: fix: 避免openstack以镜像做系统盘创建失败
2020-05-22 22:45:33 +08:00
Qiu Jian
b227baf505 fix: default policy not effective 2020-05-22 22:39:47 +08:00
Qu Xuan
010518b352 fix: 避免openstack以镜像做系统盘创建失败 2020-05-22 20:18:26 +08:00
Zexi Li
55528fc19e Merge pull request #6554 from swordqiu/automated-cherry-pick-of-#6551-upstream-release-3.0
Automated cherry pick of #6551: fix: empty matched policies list for roles
2020-05-22 19:32:46 +08:00
Qiu Jian
11d51cbab3 fix: empty matched policies list for roles 2020-05-22 18:57:15 +08:00
Zexi Li
b7b38cad6f Merge pull request #6539 from ioito/automated-cherry-pick-of-#6530-upstream-release-3.0
Automated cherry pick of #6530: fix: aliyun rds backup create fix
2020-05-22 12:36:39 +08:00
Qu Xuan
46c916098f fix: aliyun rds backup create fix 2020-05-22 10:32:23 +08:00
Zexi Li
12d76c782d Merge pull request #6514 from ioito/automated-cherry-pick-of-#6511-upstream-release-3.0
Automated cherry pick of #6511: fix: 避免忽略本地allow any云上deny any安全组规则同步
2020-05-22 10:22:47 +08:00
Zexi Li
cfbfda82f7 Merge pull request #6523 from swordqiu/automated-cherry-pick-of-#6516-upstream-release-3.0
Automated cherry pick of #6516: fix: system privileges user cannot access system console
2020-05-22 10:15:29 +08:00
yunion-ci-robot
473ae778ff Merge pull request #6520 from zexi/automated-cherry-pick-of-#6481-upstream-release-3.0
Automated cherry pick of #6481: region: fix get resource details panic
2020-05-21 23:31:50 +08:00
yunion-ci-robot
76671e0ba0 Merge pull request #6508 from ioito/automated-cherry-pick-of-#6505-upstream-release-3.0
Automated cherry pick of #6505: fix: 上传镜像为转换列表之外时,subformat状态异常
2020-05-21 23:05:58 +08:00
yunion-ci-robot
2e4be413be Merge pull request #6521 from zexi/automated-cherry-pick-of-#6491-upstream-release-3.0
Automated cherry pick of #6491: keystone: fix db not sync
2020-05-21 22:48:52 +08:00
Qiu Jian
e8898952b3 fix: system privileges user cannot access system console 2020-05-21 18:45:42 +08:00
Zexi Li
8bc6397142 keystone: fix db not sync 2020-05-21 18:44:41 +08:00
Zexi Li
28e726d847 region: fix get resource details panic 2020-05-21 18:44:13 +08:00
Qu Xuan
f96d39e9fc fix: 避免忽略本地allow any云上deny any安全组规则同步 2020-05-21 18:31:26 +08:00
Qu Xuan
52d299d227 fix: 上传镜像为转换列表之外时,subformat状态异常 2020-05-21 17:42:19 +08:00
Zexi Li
051de2f7ee Merge pull request #6488 from rainzm/automated-cherry-pick-of-#6487-upstream-release-3.0
Automated cherry pick of #6487: Fix/esxi
2020-05-21 16:33:05 +08:00
rainzm
28d3ed0d84 fix(esxi): Modify the disk size correctly when creating vm 2020-05-21 10:56:47 +08:00
rainzm
9962104c1b fix(esxi): Detach all disk first when deleting vm 2020-05-21 10:53:57 +08:00
rainzm
2708277112 Kill processes in time & Add debug info 2020-05-21 10:53:57 +08:00
rainzm
70d2acdc5d fix(esxi): Remove 'Destory' operation that is unnecessary for VirtualDiskManager 2020-05-21 10:53:57 +08:00
rainzm
3946fc2b74 fix(esxi): Separate detach disk and delete disk when rebuilding.
In previous versions, set
`removeSpec.FileOperation = types.VirtualDeviceConfigSpecFileOperationDestroy'
to delete disk indirectly.

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

Now, detach disk without deleteing backing file and then remove backing
2020-05-21 10:53:57 +08:00
Zexi Li
9490fb2011 Merge pull request #6477 from yousong/bugfix/yousong-region-3.0
Bugfix/yousong region 3.0
2020-05-20 12:53:33 +08:00
Yousong Zhou
559e448459 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:11:12 +08:00
Yousong Zhou
f63d10594e networks: eliminate a variable 2020-05-20 11:09:23 +08:00
Yousong Zhou
6093bf2eca guestdrivers: managed: use const api.EIP_STATUS_ASSOCIATE 2020-05-20 11:07:25 +08:00
Yousong Zhou
82b7b3ebe9 cloudprovider: fix typo 2020-05-20 11:07:24 +08:00
Yousong Zhou
cb65ca44f5 cloudcommon: rbac: fix typo 2020-05-20 11:07:24 +08:00
Zexi Li
f26e83de1b Merge pull request #6466 from zexi/automated-cherry-pick-of-#6462-upstream-release-3.0
Automated cherry pick of #6462: region: fix server create params not include specified resource
2020-05-19 19:09:00 +08:00
Zexi Li
ee778d68d6 region: fix server create params not include specified resource 2020-05-19 17:39:08 +08:00
Zexi Li
939d21c5a3 Merge pull request #6446 from swordqiu/automated-cherry-pick-of-#6443-upstream-release-3.0
Automated cherry pick of #6443: fix: anonymous user may list resources
2020-05-19 10:18:04 +08:00
Zexi Li
d2c008cbd9 Merge pull request #6438 from zexi/automated-cherry-pick-of-#6436-upstream-release-3.0
Automated cherry pick of #6436: baremetal: fix ssh put empty content file not created
2020-05-19 10:16:07 +08:00
Qiu Jian
b78dcfb5c3 fix: anonymous user may list resources 2020-05-19 01:26:32 +08:00
Zexi Li
901cf1aac4 Merge pull request #6426 from ioito/automated-cherry-pick-of-#6423-upstream-release-3.0
Automated cherry pick of #6423: fix: 避免仅同步一个region时,其余region状态变为准备中
2020-05-18 21:49:24 +08:00
Zexi Li
96b43a126d Merge pull request #6431 from ioito/automated-cherry-pick-of-#6428-upstream-release-3.0
Automated cherry pick of #6428: fix: 避免设置自动释放后磁盘的expired_at失效
2020-05-18 21:48:04 +08:00
Zexi Li
d37b6550d1 baremetal: fix ssh put empty content file not created 2020-05-18 21:45:41 +08:00
Qu Xuan
6ef689a183 fix: 避免设置自动释放后磁盘的expired_at失效 2020-05-18 20:09:21 +08:00
Qu Xuan
575545da50 fix: 避免仅同步一个region时,其余region状态变为准备中 2020-05-18 19:38:54 +08:00
Zexi Li
6627a3365e Merge pull request #6412 from zhaoxiangchun/automated-cherry-pick-of-#6410-upstream-release-3.0
Automated cherry pick of #6410: 修复无法获取vmware宿主机监控数据的问题
2020-05-17 14:16:54 +08:00
yunion-ci-robot
4cfd27a39f Merge pull request #6416 from rainzm/release/3.0
update vendor for release/3.0
2020-05-16 23:33:38 +08:00
rainzm
11d7b58886 update vendor 2020-05-16 21:40:42 +08:00
zhaoxiangchun
6bdca14dd9 修复无法获取vmware宿主机监控数据的问题 2020-05-16 21:21:44 +08:00
yunion-ci-robot
6f164905d8 Merge pull request #6391 from zexi/automated-cherry-pick-of-#6388-upstream-release-3.0
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
be14f22f17 Merge pull request #6398 from swordqiu/automated-cherry-pick-of-#6395-upstream-release-3.0
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:00 +08:00
Zexi Li
1b7a646197 Merge pull request #6378 from rainzm/automated-cherry-pick-of-#6375-upstream-release-3.0
Automated cherry pick of #6375: Fix/esxi
2020-05-16 17:41:48 +08:00
Zexi Li
53a04060db region: fix baremetal can't enable public baremetal type network 2020-05-16 17:36:50 +08:00
Qiu Jian
79b38223e1 fix: server-sync-fix-nics should return errors if vnics ip is not reachable on host 2020-05-15 22:27:36 +08:00
rainzm
87bc30ba2a fix(esxi): Add usb to support mouse in vnc viewer 2020-05-15 21:39:42 +08:00
rainzm
9cb95cfc0a fix(esxi): Fix GetDriver and add driver log for vdisk.
In GetDriver, return 'name' directly if driverMap is empty.
2020-05-15 21:38:40 +08:00
rainzm
47db06ef4d fix(esxi): Set 'WindowsDefaultAdminUser' as true when deploy vm.
'WindowsDefaultAdminUser' means that the default admin account is
'Administrator' when deploy windows vm.
2020-05-15 21:37:19 +08:00
rainzm
8694d85611 fix(region): Set default value if rootdisk's driver is empty. 2020-05-15 21:37:19 +08:00
rainzm
dcb07fa598 fix(esxi): Disable automatically add host to the dvs 2020-05-15 21:37:19 +08:00
rainzm
5731072086 fix(esxi): Set 'IsInit' as true when rebuildroot
IsInit is true will cause cloudinit enable. When rebuilding root, if there is cloudinit service in the image, it will cover the initialization work we did on the rebuilding.
2020-05-15 21:37:19 +08:00
Zexi Li
c038a92dac Merge pull request #6382 from zexi/automated-cherry-pick-of-#6381-upstream-release-3.0
Automated cherry pick of #6381: scheduler: fix min counter get count not correct
2020-05-15 15:28:22 +08:00
Zexi Li
18b21748cb scheduler: fix min counter get count not correct 2020-05-15 15:05:28 +08:00
Zexi Li
4bcd817fa6 Merge pull request #6355 from zexi/automated-cherry-pick-of-#6353-upstream-release-3.0
Automated cherry pick of #6353: scheduler: filter disabled cloudprovider
2020-05-14 18:59:19 +08:00
Zexi Li
1aaf3085a4 Merge pull request #6341 from swordqiu/automated-cherry-pick-of-#6338-upstream-release-3.0
Automated cherry pick of #6338: fix: avoid using background context
2020-05-14 18:19:04 +08:00
Zexi Li
8303918c0e scheduler: filter disabled cloudprovider 2020-05-14 18:14:21 +08:00
Zexi Li
261976d90d Merge pull request #6350 from zexi/automated-cherry-pick-of-#6347-upstream-release-3.0
Automated cherry pick of #6347: scheduler: set schedtag default strategy if input empty
2020-05-14 17:49:27 +08:00
Zexi Li
01edd43400 scheduler: set schedtag default strategy if input empty 2020-05-14 17:26:53 +08:00
Qiu Jian
1eca2fc8ed fix: avoid using background context 2020-05-14 17:06:07 +08:00
yunion-ci-robot
6e7bcf05d4 Merge pull request #6322 from wanyaoqi/automated-cherry-pick-of-#6319-upstream-release-3.0
Automated cherry pick of #6319: do not close worker chan
2020-05-13 20:17:00 +08:00
wanyaoqi
ddc69e575d do not close worker chan
don't close worker chan after put work, will cause dead loop
2020-05-13 18:59:32 +08:00
Zexi Li
587aecde18 Merge pull request #6309 from ioito/automated-cherry-pick-of-#6306-upstream-release-3.0
Automated cherry pick of #6306: fix: openstack 安全组规则同步
2020-05-13 12:41:34 +08:00
Zexi Li
d25c879d1c Merge pull request #6295 from ioito/automated-cherry-pick-of-#6292-upstream-release-3.0
Automated cherry pick of #6292: fix: 优化openstack错误处理
2020-05-13 10:42:57 +08:00
Qu Xuan
98ddfda02b fix: openstack 安全组规则同步 2020-05-12 17:56:35 +08:00
Qu Xuan
55fc5d9be2 fix: 优化openstack错误处理 2020-05-12 14:09:55 +08:00
Zexi Li
cd82204a7f Merge pull request #6290 from yousong/automated-cherry-pick-of-#6287-upstream-release-3.0
Automated cherry pick of #6287: region: lbagent: undeploy: make it idempotent
2020-05-12 11:50:39 +08:00
Zexi Li
31cc718842 Merge pull request #6285 from yousong/automated-cherry-pick-of-#6282-upstream-release-3.0
Automated cherry pick of #6282: region: lbagents: fix deleting pending_deleted objects
2020-05-12 11:43:51 +08:00
Yousong Zhou
88b2e7fa0c 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:39:40 +08:00
Yousong Zhou
14a0027ea6 region: lbagents: fix deleting pending_deleted objects
This was broken since the introduction of virtual object
2020-05-12 10:11:45 +08:00
Zexi Li
bb7926bccc Merge pull request #6273 from zexi/automated-cherry-pick-of-#6270-upstream-release-3.0
Automated cherry pick of #6270: scheduler: get region nil panic
2020-05-11 21:07:49 +08:00
Zexi Li
e51bb96d42 Merge pull request #6261 from ioito/automated-cherry-pick-of-#6258-upstream-release-3.0
Automated cherry pick of #6258: fix: 避免aliyun磁盘计费类型多次转换
2020-05-11 18:17:15 +08:00
Zexi Li
d03c255ddd scheduler: get region nil panic 2020-05-11 18:05:24 +08:00
Qu Xuan
33fda0e75a fix: 避免aliyun磁盘计费类型多次转换 2020-05-11 14:06:51 +08:00
Zexi Li
a1a4a03579 Merge pull request #6254 from swordqiu/automated-cherry-pick-of-#6252-upstream-release-3.0
Automated cherry pick of #6252: fix: panic when disk has no valid storage_id
2020-05-11 10:01:37 +08:00
Qiu Jian
03de2989cc fix: panic when disk has no valid storage_id 2020-05-11 02:57:20 +08:00
Zexi Li
2bc3e418c9 Merge pull request #6250 from wanyaoqi/automated-cherry-pick-of-#6247-upstream-release-3.0
Automated cherry pick of #6247: fix import from libvirt
2020-05-10 21:35:23 +08:00
Zexi Li
5bd3503a57 Merge pull request #6234 from tb365/automated-cherry-pick-of-#6232-upstream-release-3.0
Automated cherry pick of #6232: huawei network id fix
2020-05-10 21:33:35 +08:00
wanyaoqi
3f826aeb65 fix import from libvirt 2020-05-10 20:45:17 +08:00
Zexi Li
ea88c439ab Merge pull request #6245 from yousong/automated-cherry-pick-of-#6242-upstream-release-3.0
Automated cherry pick of #6242: disks: reword error message on bad DiskConfig struct
2020-05-10 11:29:16 +08:00
Yousong Zhou
ef5c87b268 disks: reword error message on bad DiskConfig struct 2020-05-10 00:19:07 +08:00
tangbin
b0f7661d97 huawei network id fix 2020-05-09 20:10:17 +08:00
Zexi Li
3832cf5569 Merge pull request #6228 from yousong/automated-cherry-pick-of-#6225-upstream-release-3.0
Automated cherry pick of #6225: apigateway: handlers: register cloudnet modules
2020-05-09 18:47:52 +08:00
Yousong Zhou
6736f26c97 apigateway: handlers: register cloudnet modules 2020-05-09 16:41:48 +08:00
Zexi Li
7370fbae2c Merge pull request #6187 from zhaoxiangchun/automated-cherry-pick-of-#6185-upstream-release-3.0
Automated cherry pick of #6185: 修复谷歌监控无法获取的问题
2020-05-07 17:21:28 +08:00
zhaoxiangchun
c748528323 修复谷歌监控无法获取的问题
直接返回调用RestAPI的json格式数据
2020-05-07 11:27:35 +08:00
Zexi Li
5796cbab2f Merge pull request #6171 from yousong/automated-cherry-pick-of-#6168-upstream-release-3.0
Automated cherry pick of #6168: dnsrecords: note that DnsRecordManager is a IAdminSharableVirtualModelManager
2020-05-07 11:23:24 +08:00
Zexi Li
72ce0c4999 Merge pull request #6177 from swordqiu/automated-cherry-pick-of-#6174-upstream-release-3.0
Automated cherry pick of #6174: fix: fail to fetch real client ip from httprequest
2020-05-07 11:16:31 +08:00
Qiu Jian
6ff01f6025 fix: fail to fetch real client ip from httprequest 2020-05-06 22:27:58 +08:00
Yousong Zhou
a9d2dfd1ed 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:19 +08:00
Yousong Zhou
6aa03b2931 dnsrecords: note that DnsRecordManager is a IAdminSharableVirtualModelManager 2020-05-06 18:43:18 +08:00
yunion-ci-robot
4125b0e217 Merge pull request #6161 from zhaoxiangchun/automated-cherry-pick-of-#6158-upstream-release-3.0
Automated cherry pick of #6158: bugfix mem paginate
2020-05-06 15:44:44 +08:00
zhaoxiangchun
c8f0ee4475 bugfix mem paginate
通过totoal和offset 与limit比较确定最后返回数据
2020-05-06 11:05:15 +08:00
Zexi Li
459332cf72 Merge pull request #6156 from ioito/automated-cherry-pick-of-#6153-upstream-release-3.0
Automated cherry pick of #6153: fix: secgroupcache权限问题修复
2020-04-30 20:14:12 +08:00
Qu Xuan
3649a8521b fix: secgroupcache权限问题修复 2020-04-30 15:44:23 +08:00
Zexi Li
24d35cff50 Merge pull request #6130 from swordqiu/automated-cherry-pick-of-#6120-upstream-release-3.0
Automated cherry pick of #6120: fix: sysadmin can override policy violation check
2020-04-29 21:15:53 +08:00
Zexi Li
b52a606b70 Merge pull request #6133 from tb365/automated-cherry-pick-of-#6132-upstream-release-3.0
Automated cherry pick of #6132: fix: FindAnonymousStructPoint needs input as a pointer to struct
2020-04-29 19:29:44 +08:00
Qiu Jian
2100133a67 fix: FindAnonymousStructPoint needs input as a pointer to struct 2020-04-29 18:30:40 +08:00
Qiu Jian
e04850d990 fix: sysadmin can override policy violation check 2020-04-29 18:00:14 +08:00
Zexi Li
f9d43f6977 Merge pull request #6114 from swordqiu/automated-cherry-pick-of-#6111-upstream-release-3.0
Automated cherry pick of #6111: fix: prevent policy violation
2020-04-29 13:10:16 +08:00
Zexi Li
df94c1c844 Merge pull request #6098 from ioito/automated-cherry-pick-of-#6095-upstream-release-3.0
Automated cherry pick of #6095: fix: 普通用户可获取rds账号密码
2020-04-29 13:08:18 +08:00
Qiu Jian
412f6abdfa fix: prevent policy violation 2020-04-29 00:07:59 +08:00
yunion-ci-robot
297629da22 Merge pull request #6106 from ioito/automated-cherry-pick-of-#6103-upstream-release-3.0
Automated cherry pick of #6103: fix: 修复openstack存储同步问题
2020-04-28 23:37:35 +08:00
Qu Xuan
f01fb15375 fix: 修复openstack存储同步问题 2020-04-28 14:48:23 +08:00
Qu Xuan
2a1c3802cd fix: 普通用户可获取rds账号密码 2020-04-28 10:43:36 +08:00
Zexi Li
bd374ab962 Merge pull request #6071 from ioito/automated-cherry-pick-of-#6068-upstream-release-3.0
Automated cherry pick of #6068: fix: gcp use project name for cloudprovider
2020-04-27 16:03:29 +08:00
Qu Xuan
6232adda22 fix: gcp use project name for cloudprovider 2020-04-27 14:17:36 +08:00
Zexi Li
9384137bf7 Merge pull request #6065 from rainzm/automated-cherry-pick-of-#6062-upstream-release-3.0
Automated cherry pick of #6062: fix/notify: Add deadline for rpc client
2020-04-27 12:48:11 +08:00
Rain
5a1192601b fix/notify: Add deadline for rpc client 2020-04-27 10:44:57 +08:00
Zexi Li
3b25e37ad6 Merge pull request #6057 from swordqiu/automated-cherry-pick-of-#6006-upstream-release-3.0
Automated cherry pick of #6006: fix: resolve parameter name conflict in google cloud account create input
2020-04-26 23:04:04 +08:00
Qiu Jian
4352752ed0 fix: resolve parameter name conflict in google cloud account create input 2020-04-26 21:53:51 +08:00
Zexi Li
77c3071463 Merge pull request #6048 from tb365/automated-cherry-pick-of-#6042-upstream-release-3.0
Automated cherry pick of #6042: huawei elb cookie timeout fix
2020-04-26 21:06:31 +08:00
tangbin
36d9cb4315 aws elb health check type fix 2020-04-26 20:10:52 +08:00
tangbin
73338fb693 huawei elb cookie timeout fix 2020-04-26 20:10:52 +08:00
yunion-ci-robot
7d97eecc80 Merge pull request #6010 from swordqiu/automated-cherry-pick-of-#6008-upstream-release-3.0
Automated cherry pick of #6008: fix: GetOnPremiseNetworkOfIP should return underlay networks
2020-04-26 19:49:32 +08:00
Zexi Li
17d046ed3a Merge pull request #6031 from ioito/automated-cherry-pick-of-#6028-upstream-release-3.0
Automated cherry pick of #6028: fix: json unmarshal
2020-04-26 18:19:30 +08:00
Qu Xuan
05ae1a345b fix: json unmarshal 2020-04-26 15:52:35 +08:00
yunion-ci-robot
0b93b48c57 Merge pull request #6017 from zexi/automated-cherry-pick-of-#6014-upstream-release-3.0
Automated cherry pick of #6014: scheduler: fix network predicate get wrong free port
2020-04-26 00:30:31 +08:00
Zexi Li
1c5f35b07b scheduler: fix network predicate get wrong free port 2020-04-25 23:28:51 +08:00
Qiu Jian
e02fea3bd2 fix: GetOnPremiseNetworkOfIP should return underlay networks 2020-04-25 16:30:30 +08:00
Zexi Li
76ec5ebec4 Merge pull request #5998 from yousong/automated-cherry-pick-of-#5995-upstream-release-3.0
Automated cherry pick of #5995: lblistener: fix updating lblistener without backend_group field
2020-04-24 18:17:27 +08:00
Yousong Zhou
1a333c4cdb lblistener: fix updating lblistener without backend_group field
Fixes dd01610931 ("lblistener: allow setting http/https listener
backendgroup to empty")
2020-04-24 14:23:24 +08:00
Zexi Li
c5a6b2c988 Merge pull request #5968 from swordqiu/automated-cherry-pick-of-#5966-upstream-release-3.0
Automated cherry pick of #5966: supermicro redfish support
2020-04-23 09:54:39 +08:00
Qiu Jian
83e524e26d remote errors import 2020-04-23 09:30:49 +08:00
Qiu Jian
fdef0e4b51 supermicro redfish support 2020-04-23 09:29:57 +08:00
Zexi Li
198d88394c Merge pull request #5964 from swordqiu/automated-cherry-pick-of-#5961-upstream-release-3.0
Automated cherry pick of #5961: fix: clean pending usage caused by pre-validate-create-data
2020-04-23 00:03:22 +08:00
Zexi Li
eb330da807 Merge pull request #5923 from ioito/automated-cherry-pick-of-#5919-upstream-release-3.0
Automated cherry pick of #5919: fix: 非私有云同步region name
2020-04-22 23:59:53 +08:00
Zexi Li
aff6bf30ab Merge pull request #5934 from ioito/automated-cherry-pick-of-#5931-upstream-release-3.0
Automated cherry pick of #5931: fix: 转换非标准存储类型到lrs
2020-04-22 23:57:32 +08:00
Zexi Li
6a54cc8139 Merge pull request #5949 from tb365/automated-cherry-pick-of-#5945-upstream-release-3.0
Automated cherry pick of #5945: huawei elb sync vpc
2020-04-22 23:56:00 +08:00
Zexi Li
99bdbb37a9 Merge pull request #5953 from zexi/automated-cherry-pick-of-#5951-upstream-release-3.0
Automated cherry pick of #5951: baremetal: ensure power up add retries
2020-04-22 23:52:19 +08:00
Qiu Jian
5635dc65ce fix: clean pending usage caused by pre-validate-create-data 2020-04-22 23:48:54 +08:00
yunion-ci-robot
cae673bee9 Merge pull request #5940 from tb365/automated-cherry-pick-of-#5927-upstream-release-3.0
Automated cherry pick of #5927: remove aws invalid backendgroup
2020-04-22 23:05:06 +08:00
Zexi Li
da6b918399 baremetal: ensure power up add retries 2020-04-22 22:12:50 +08:00
tangbin
fcf1fbc3e8 huawei elb sync vpc 2020-04-22 20:31:11 +08:00
tangbin
033947c780 remove aws invalid backendgroup 2020-04-22 18:58:38 +08:00
Qu Xuan
91c807b4ef fix: 转换非标准存储类型到lrs 2020-04-22 18:54:26 +08:00
Qu Xuan
0f5655db69 fix: 非私有云同步region name 2020-04-22 18:00:26 +08:00
Zexi Li
430ce468ef Merge pull request #5909 from swordqiu/automated-cherry-pick-of-#5906-upstream-release-3.0
Automated cherry pick of #5906: fix: blacklist keystone reset admin password
2020-04-22 15:09:38 +08:00
Qiu Jian
2cd04a148c fix: blacklist keystone reset admin password 2020-04-22 15:03:39 +08:00
Zexi Li
aec1eb7409 Merge pull request #5892 from swordqiu/automated-cherry-pick-of-#5890-upstream-release-3.0
Automated cherry pick of #5890: fix: policy details should carry updated_at and created_at fields
2020-04-22 10:34:40 +08:00
Zexi Li
bf66f68ab4 Merge pull request #5897 from swordqiu/automated-cherry-pick-of-#5895-upstream-release-3.0
Automated cherry pick of #5895: fix: delete idp also delete users/groups in target domain
2020-04-22 10:34:03 +08:00
Zexi Li
53bbc81832 Merge pull request #5887 from ioito/automated-cherry-pick-of-#5884-upstream-release-3.0
Automated cherry pick of #5884: fix: 仅当变更domainId时才需要更新projectId
2020-04-22 10:32:43 +08:00
Qiu Jian
a3776d9f7e fix: delete idp also delete users/groups in target domain 2020-04-22 10:13:51 +08:00
Qiu Jian
0ee4ab61e0 fix: policy details should carry updated_at and created_at fields 2020-04-21 22:42:09 +08:00
Qu Xuan
cd7bc57647 fix: 仅当变更domainId时才需要更新projectId 2020-04-21 21:14:59 +08:00
Zexi Li
21e803237a Merge pull request #5867 from tb365/automated-cherry-pick-of-#5865-upstream-release-3.0
Automated cherry pick of #5865: lblis & lbbg & lbr & lbb create add fetch owner id
2020-04-20 20:51:19 +08:00
tangbin
07cd34b501 lblis & lbbg & lbr & lbb create add fetch owner id 2020-04-20 19:26:28 +08:00
Zexi Li
fc9237c5ec Merge pull request #5847 from swordqiu/automated-cherry-pick-of-#5845-upstream-release-3.0
Automated cherry pick of #5845: fix: cloudproviderregion sync ignore panic
2020-04-18 12:02:22 +08:00
Zexi Li
8c78a7627a Merge pull request #5842 from tb365/automated-cherry-pick-of-#5840-upstream-release-3.0
Automated cherry pick of #5840: aws elb create bugfix
2020-04-18 11:59:59 +08:00
Qiu Jian
199b1a2510 fix: cloudproviderregion sync ignore panic 2020-04-17 22:07:10 +08:00
TangBin
9b604cd353 huawei oss client bugfix 2020-04-17 20:47:06 +08:00
TangBin
90889695fe huawei oss client fix & huawei client init fix 2020-04-17 20:47:06 +08:00
tangbin
5149f507d4 aws elb create bugfix 2020-04-17 20:42:02 +08:00
Zexi Li
8c3338454e Merge pull request #5820 from swordqiu/automated-cherry-pick-of-#5818-upstream-release-3.0
Automated cherry pick of #5818: fix: non-redfish baremetal might support jnlp console
2020-04-17 00:05:10 +08:00
Zexi Li
f2c604fd70 Merge pull request #5827 from ioito/automated-cherry-pick-of-#5825-upstream-release-3.0
Automated cherry pick of #5825: fix: 尽量避免secgroup重名问题
2020-04-17 00:03:06 +08:00
Zexi Li
5075c6c471 Merge pull request #5834 from zhaoxiangchun/automated-cherry-pick-of-#5831-upstream-release-3.0
Automated cherry pick of #5831: 修复azure获取不到监控数据的问题
2020-04-17 00:01:17 +08:00
zhaoxiangchun
be5fcc57ca 修复azure获取不到监控数据的问题 2020-04-16 20:12:51 +08:00
Zexi Li
338f5dd681 Merge pull request #5807 from ioito/automated-cherry-pick-of-#5805-upstream-release-3.0
Automated cherry pick of #5805: fix: 优化rds sku list查询速度
2020-04-16 18:01:34 +08:00
Qu Xuan
f0e192f394 fix: 尽量避免secgroup重名问题 2020-04-16 16:41:07 +08:00
Qiu Jian
b94fc93304 fix: non-redfish baremetal might support jnlp console 2020-04-15 23:55:10 +08:00
Qu Xuan
d3ca6cd0a7 fix: 优化rds sku list查询速度 2020-04-15 18:02:16 +08:00
Zexi Li
7647330e24 Merge pull request #5802 from zexi/automated-cherry-pick-of-#5798-upstream-release-3.0
Automated cherry pick of #5798: climc: support k8s service v3.2
2020-04-15 10:38:11 +08:00
Zexi Li
c3f393b244 climc: support k8s service v3.2 2020-04-15 10:37:29 +08:00
Zexi Li
20f0ff7ae0 Merge pull request #5787 from ioito/automated-cherry-pick-of-#5785-upstream-release-3.0
Automated cherry pick of #5785: fix: 避免aliyun access key不可用时返回NotFoundError错误
2020-04-14 10:45:06 +08:00
Qu Xuan
8cedb0711b fix: 避免aliyun access key不可用时返回NotFoundError错误 2020-04-13 18:49:39 +08:00
Zexi Li
ae36b4ef51 Merge pull request #5771 from wanyaoqi/automated-cherry-pick-of-#5769-upstream-release-3.0
Automated cherry pick of #5769: fix host init generate network config
2020-04-13 11:28:56 +08:00
Zexi Li
3803377446 Merge pull request #5762 from tb365/automated-cherry-pick-of-#5759-upstream-release-3.0
Automated cherry pick of #5759: aws elb bugfix
2020-04-13 11:27:38 +08:00
tangbin
68b6259374 aws elb bugfix 2020-04-13 10:28:50 +08:00
Zexi Li
006436ad3f Merge pull request #5782 from swordqiu/automated-cherry-pick-of-#5780-upstream-release-3.0
Automated cherry pick of #5780: fix: host jnlp request fail for idrac9
2020-04-13 09:49:16 +08:00
Qiu Jian
0eaa58cd3e fix: host jnlp request fail for idrac9 2020-04-13 00:10:43 +08:00
yunion-ci-robot
baf91bfa63 Merge pull request #5776 from ioito/automated-cherry-pick-of-#5774-upstream-release-3.0
Automated cherry pick of #5774: fix: azure重装系统删除不必要的参数
2020-04-12 00:37:54 +08:00
Qu Xuan
dcbb72c042 fix: azure重装系统删除不必要的参数 2020-04-11 15:11:34 +08:00
Zexi Li
65edf1e4c8 Merge pull request #5754 from swordqiu/automated-cherry-pick-of-#5745-upstream-release-3.0
Automated cherry pick of #5745: feature: redfish support IDRAC9 baremetal
2020-04-11 13:12:33 +08:00
Zexi Li
9a0b008921 Merge pull request #5767 from yousong/automated-cherry-pick-of-#5765-upstream-release-3.0
Automated cherry pick of #5765: region: lbagent: vrrp.advert_int must be the same inside cluster
2020-04-11 13:04:55 +08:00
Yousong Zhou
737d42aea5 region: lbagent: vrrp.advert_int must be the same inside cluster 2020-04-10 15:55:35 +08:00
wanyaoqi
3a778c0ad2 fix host init generate network config 2020-04-10 15:50:12 +08:00
yunion-ci-robot
52e461dc86 Merge pull request #5742 from yousong/automated-cherry-pick-of-#5740-upstream-release-3.0
Automated cherry pick of #5740: region: lbagents: fix returning error when glob has no match
2020-04-10 09:52:42 +08:00
Qiu Jian
9ea831b4fe feature: redfish support IDRAC9 baremetal 2020-04-09 22:57:12 +08:00
Yousong Zhou
5b35704b62 region: lbagents: fix returning error when glob has no match 2020-04-09 11:08:27 +08:00
Zexi Li
0fa48e0af5 Merge pull request #5728 from tb365/automated-cherry-pick-of-#5726-upstream-release-3.0
Automated cherry pick of #5726: huawei&qcloud&huawei elb bugfix
2020-04-08 21:53:55 +08:00
Zexi Li
bbd0d5ea35 Merge pull request #5735 from swordqiu/automated-cherry-pick-of-#5733-upstream-release-3.0
Automated cherry pick of #5733: fix: idp log connected/disconnected event
2020-04-08 21:51:44 +08:00
Qiu Jian
32a2da0106 fix: idp log connected/disconnected event 2020-04-08 21:26:36 +08:00
tangbin
bba3d575d3 huawei&qcloud&huawei elb bugfix 2020-04-08 20:08:13 +08:00
Zexi Li
ca205ffe94 Merge pull request #5716 from swordqiu/automated-cherry-pick-of-#5714-upstream-release-3.0
Automated cherry pick of #5714: fix: decouple getUserInfo at apigateway from capabilities call
2020-04-08 02:26:14 +08:00
Qiu Jian
01d9cb4ccf fix: decouple getUserInfo at apigateway from capabilities call 2020-04-08 00:05:35 +08:00
Zexi Li
fcabafc742 Merge pull request #5700 from swordqiu/automated-cherry-pick-of-#5698-upstream-release-3.0
Automated cherry pick of #5698: fix: service config changes not effective
2020-04-07 10:38:36 +08:00
Zexi Li
e19c91788c Merge pull request #5706 from wanyaoqi/automated-cherry-pick-of-#5704-upstream-release-3.0
Automated cherry pick of #5704: fix migrate cache cdrom
2020-04-07 10:37:24 +08:00
wanyaoqi
5b9a89d81b fix migrate cache cdrom 2020-04-06 23:19:08 +08:00
Qiu Jian
f685c1b391 fix: service config changes not effective 2020-04-06 16:11:24 +08:00
Zexi Li
089fa77540 Merge pull request #5692 from rainzm/automated-cherry-pick-of-#5691-upstream-release-3.0
Automated cherry pick of #5691: fix(esxi): Fix some question of CheckAndSetCacheImage.
2020-04-05 13:53:07 +08:00
Zexi Li
bf6b6e3f2d Merge pull request #5696 from swordqiu/automated-cherry-pick-of-#5694-upstream-release-3.0
Automated cherry pick of #5694: fix: misc bugs in usage data
2020-04-05 13:52:14 +08:00
Qiu Jian
a53e4d0220 fix: misc bugs in usage data 2020-04-05 08:00:48 +08:00
Rain
fc7240469c fix(esxi): Fix some question of CheckAndSetCacheImage.
1. If there is storagecachedimage in this host's storagecache, use is
instead of another host's one.
2. SrcStorage should be found from srcHost instead host.
2020-04-04 21:53:45 +08:00
Zexi Li
f3e89cc91a Merge pull request #5688 from ioito/automated-cherry-pick-of-#5686-upstream-release-3.0
Automated cherry pick of #5686: fix: 修复重装系统时未能更换指定image问题
2020-04-03 19:43:30 +08:00
Zexi Li
ac14001b1d Merge pull request #5673 from ioito/automated-cherry-pick-of-#5671-upstream-release-3.0
Automated cherry pick of #5671: fix: 华为云rds使用自身的存储类型
2020-04-03 19:41:46 +08:00
Qu Xuan
7451e9cadb fix: 修复重装系统时未能更换指定image问题 2020-04-03 11:35:55 +08:00
Zexi Li
b0774713a1 Merge pull request #5678 from wanyaoqi/automated-cherry-pick-of-#5676-upstream-release-3.0
Automated cherry pick of #5676: host do not set hostname
2020-04-02 19:07:28 +08:00
wanyaoqi
dde3fd44bf host do not set hostname 2020-04-02 18:13:22 +08:00
Qu Xuan
d08bb2700c fix: 华为云rds使用自身的存储类型 2020-04-02 17:30:06 +08:00
Zexi Li
517bca61c0 Merge pull request #5637 from tb365/automated-cherry-pick-of-#5631-upstream-release-3.0
Automated cherry pick of #5631: elb bugfix
2020-04-02 12:47:36 +08:00
Zexi Li
8465defe65 Merge pull request #5665 from swordqiu/automated-cherry-pick-of-#5662-upstream-release-3.0
Automated cherry pick of #5662: fix: disk/nics usage should exclude those pending_deleted
2020-04-02 12:45:49 +08:00
Zexi Li
129c2195e9 Merge pull request #5661 from wanyaoqi/automated-cherry-pick-of-#5659-upstream-release-3.0
Automated cherry pick of #5659: host session use internal endpoint
2020-04-02 12:43:21 +08:00
Qiu Jian
cebee78ee5 fix: disk/nics usage should exclude those pending_deleted 2020-04-02 01:54:45 +08:00
tangbin
c84f5730df elb bugfix 2020-04-01 20:27:36 +08:00
wanyaoqi
0219383e8d host session use internal endpoint 2020-04-01 20:01:30 +08:00
Zexi Li
f4cf25d3e5 Merge pull request #5655 from swordqiu/automated-cherry-pick-of-#5653-upstream-release-3.0
Automated cherry pick of #5653: fix: allow list cloudprovider by default
2020-04-01 18:13:53 +08:00
Zexi Li
28c5dbd1ab Merge pull request #5650 from swordqiu/automated-cherry-pick-of-#5648-upstream-release-3.0
Automated cherry pick of #5648: fix: cancel pending usage might not need to update usage
2020-04-01 18:11:29 +08:00
Qiu Jian
dcc7f2ba5c fix: allow list cloudprovider by default 2020-04-01 17:46:16 +08:00
Qiu Jian
3c4e953843 fix: cancel pending usage might not need to update usage 2020-04-01 16:53:17 +08:00
Zexi Li
bee1582654 Merge pull request #5642 from swordqiu/automated-cherry-pick-of-#5640-upstream-release-3.0
Automated cherry pick of #5640: fix: changes to request_work_count cause apigateway restart
2020-04-01 10:23:32 +08:00
Qiu Jian
f0a6c20c43 fix: changes to request_work_count cause apigateway restart 2020-04-01 10:20:05 +08:00
yunion-ci-robot
3dfce69dbc Merge pull request #5627 from swordqiu/automated-cherry-pick-of-#5623-upstream-release-3.0
Automated cherry pick of #5623: fix: worker may block by worker_chan
2020-03-31 10:29:45 +08:00
Qiu Jian
8c4f18b11f fix: worker may block by worker_chan 2020-03-31 09:52:00 +08:00
Zexi Li
69c2de1fd9 Merge pull request #5621 from swordqiu/automated-cherry-pick-of-#5616-upstream-release-3.0
Automated cherry pick of #5616: fix: increase apigateway default worker count to 32
2020-03-30 19:22:49 +08:00
Qiu Jian
c5ecdd6a42 fix: increase apigateway default worker count to 32 2020-03-30 19:08:43 +08:00
yunion-ci-robot
a79aaaedc7 Merge pull request #5611 from swordqiu/automated-cherry-pick-of-#5608-upstream-release-3.0
Automated cherry pick of #5608: fix: allow list loadbalancer cluster by default
2020-03-28 09:47:41 +08:00
Qiu Jian
b58f78a0c9 fix: allow list loadbalancer cluster by default 2020-03-28 09:05:08 +08:00
Zexi Li
8d9a76e3b3 Merge pull request #5603 from ioito/automated-cherry-pick-of-#5601-upstream-release-3.0
Automated cherry pick of #5601: fix: 修正gcp不支持预付费资源
2020-03-26 20:33:13 +08:00
Qu Xuan
173a8d6d4f fix: 修正gcp不支持预付费资源 2020-03-26 20:02:06 +08:00
Zexi Li
08bf822d17 Merge pull request #5596 from ioito/hotfix/qx-lb-provider
fix: 避免onecloud lb未返回provider及brand信息
2020-03-26 10:41:41 +08:00
Qu Xuan
2bd5b61b61 fix: 避免onecloud lb未返回provider及brand信息 2020-03-25 18:25:29 +08:00
Zexi Li
41d61a77ce Merge pull request #5583 from yousong/automated-cherry-pick-of-#5581-upstream-release-3.0
Automated cherry pick of #5581: webconsole: typo fix accessable -> accessible
2020-03-23 21:14:24 +08:00
Yousong Zhou
ce86a155f8 httperrors: fix passing "params" argument 2020-03-23 16:41:53 +08:00
Yousong Zhou
503b6f0a2a webconsole: typo fix accessable -> accessible 2020-03-23 16:41:53 +08:00
Zexi Li
a5dc903c13 Merge pull request #5580 from zexi/automated-cherry-pick-of-#5577-upstream-release-3.0
Automated cherry pick of #5577: climc: k8s storageclass support
2020-03-23 10:53:14 +08:00
Zexi Li
f8dcc93262 climc: k8s storageclass support 2020-03-23 10:53:41 +08:00
Zexi Li
8085764f20 Merge pull request #5573 from wanyaoqi/automated-cherry-pick-of-#5571-upstream-release-3.0
Automated cherry pick of #5571: guest add metadata cpu mode
2020-03-20 19:39:31 +08:00
wanyaoqi
e8b342dfb2 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:14:36 +08:00
Zexi Li
1a58515573 Merge pull request #5557 from rainzm/automated-cherry-pick-of-#5555-upstream-release-3.0
Automated cherry pick of #5555: feat(notify): Compatibility and repair
2020-03-19 10:06:25 +08:00
yunion-ci-robot
439a02d9c8 Merge pull request #5492 from ioito/automated-cherry-pick-of-#5490-upstream-release-3.0
Automated cherry pick of #5490: fix: class action 统一使用keywords包裹
2020-03-19 08:48:20 +08:00
Rain
8e767cc984 feat(notify): Compatibility and repair 2020-03-18 20:59:25 +08:00
Zexi Li
e444d5e797 Merge pull request #5547 from swordqiu/automated-cherry-pick-of-#5545-upstream-release-3.0
Automated cherry pick of #5545: fix: policy fetcher not retry after initial failure
2020-03-18 10:53:08 +08:00
Qu Xuan
6022e2da2e fix: class action 统一使用keywords包裹 2020-03-17 18:44:31 +08:00
Qiu Jian
dc51ab2ee0 fix: policy fetcher not retry after initial failure 2020-03-17 18:31:00 +08:00
Zexi Li
105c0a1714 Merge pull request #5508 from swordqiu/automated-cherry-pick-of-#5506-upstream-release-3.0
Automated cherry pick of #5506: fix: recode cloudprovider usable filter
2020-03-17 11:39:52 +08:00
yunion-ci-robot
69029c088a Merge pull request #5531 from ioito/automated-cherry-pick-of-#5529-upstream-release-3.0
Automated cherry pick of #5529: fix: 避免重装系统失败后imageId依然发生改变
2020-03-17 08:21:15 +08:00
yunion-ci-robot
cd996659ac Merge pull request #5538 from ioito/automated-cherry-pick-of-#5536-upstream-release-3.0
Automated cherry pick of #5536: fix: 修复谷歌云 cloud-provider-clirc 显示错误问题
2020-03-17 08:12:15 +08:00
Qu Xuan
439e9c23f8 fix: 修复谷歌云 cloud-provider-clirc 显示错误问题 2020-03-16 20:10:04 +08:00
Zexi Li
a259eb1112 Merge pull request #5525 from ioito/automated-cherry-pick-of-#5452-upstream-release-3.0
Automated cherry pick of #5452: fix: 优化rds sku同步逻辑
2020-03-16 18:25:35 +08:00
Zexi Li
c76ca51af5 Merge pull request #5499 from zhaoxiangchun/automated-cherry-pick-of-#5496-upstream-release-3.0
Automated cherry pick of #5496: vmware 宿主机监控信息获取
2020-03-16 12:57:40 +08:00
Qu Xuan
286e001dac fix: 避免重装系统失败后imageId依然发生改变 2020-03-16 11:30:16 +08:00
Qu Xuan
1eb3abf5a1 fix: 优化rds sku同步逻辑 2020-03-16 10:34:13 +08:00
yunion-ci-robot
f51e7d0c7f Merge pull request #5521 from ioito/automated-cherry-pick-of-#5519-upstream-release-3.0
Automated cherry pick of #5519: fix: 避免未传递prority参数导致校验未通过
2020-03-16 09:08:12 +08:00
Qu Xuan
b927fa5708 fix: 避免未传递prority参数导致校验未通过 2020-03-15 13:13:16 +08:00
yunion-ci-robot
9211beb905 Merge pull request #5514 from zexi/automated-cherry-pick-of-#5511-upstream-release-3.0
Automated cherry pick of #5511: scheduler: fix disk allocated not balanced
2020-03-14 17:50:05 +08:00
Zexi Li
8d60b07d80 scheduler: fix disk allocated not balanced 2020-03-14 16:51:15 +08:00
Qiu Jian
39b5d08f14 fix: recode cloudprovider usable filter 2020-03-14 09:06:32 +08:00
Zexi Li
5b4ab09678 Merge pull request #5503 from zexi/automated-cherry-pick-of-#5501-upstream-release-3.0
Automated cherry pick of #5501: auth: check isAuthed if nil
2020-03-13 19:18:22 +08:00
Zexi Li
26802683ce auth: check isAuthed if nil 2020-03-13 19:19:44 +08:00
zhaoxiangchun
25a537c743 vmware 宿主机监控信息获取 2020-03-13 17:22:59 +08:00
yunion-ci-robot
4538ee2487 Merge pull request #5477 from rainzm/automated-cherry-pick-of-#5454-upstream-release-3.0
Automated cherry pick of #5454: fix(glance): Structured subimage info and add 'created_at' field
2020-03-13 15:34:02 +08:00
yunion-ci-robot
e2e33ef7af Merge pull request #5487 from wanyaoqi/automated-cherry-pick-of-#5484-upstream-release-3.0
Automated cherry pick of #5484: download handler set no timeout
2020-03-13 14:33:02 +08:00
wanyaoqi
5e3270b7f4 download handler set no timeout 2020-03-13 11:42:14 +08:00
Zexi Li
f282022f9e Merge pull request #5482 from rainzm/automated-cherry-pick-of-#5480-upstream-release-3.0
Automated cherry pick of #5480: fix(esxi): VlanID '1' is default value
2020-03-13 11:11:23 +08:00
Rain
d02dae88f2 fix(esxi): VlanID '1' is default value 2020-03-12 20:59:03 +08:00
Rain
650745ef1f fix(glance): Structured subimage info and add 'created_at' field 2020-03-12 19:24:18 +08:00
Zexi Li
40cdc198c8 Merge pull request #5461 from bistuzx/automated-cherry-pick-of-#5459-upstream-release-3.0
Automated cherry pick of #5459: add bucket connection test
2020-03-12 16:20:26 +08:00
张旭
a4ef41c5bb change climc bucket options import 2020-03-12 12:27:31 +08:00
张旭
698fc0e1cb add bucket connection test 2020-03-12 12:27:31 +08:00
Zexi Li
2c35de74c8 Merge pull request #5465 from rainzm/feat/vendor_3.0
feat: Update Vendor for release/3.0
2020-03-12 11:48:34 +08:00
Rain
f70d781f0d feat: Update Vendor for release/3.0 2020-03-12 11:46:31 +08:00
yunion-ci-robot
a8ea730823 Merge pull request #5445 from rainzm/automated-cherry-pick-of-#5444-upstream-release-3.0
Automated cherry pick of #5444: fix(esxi): UnitNumber 7 is unavailable for scsi controller
2020-03-12 02:54:01 +08:00
yunion-ci-robot
f4f34c1c3d Merge pull request #5440 from rainzm/automated-cherry-pick-of-#5439-upstream-release-3.0
Automated cherry pick of #5439: fix(esxi): Fix bugs when using network with vlanID
2020-03-12 02:48:01 +08:00
Zexi Li
05ea4797d8 Merge pull request #5449 from zexi/automated-cherry-pick-of-#5447-upstream-release-3.0
Automated cherry pick of #5447: region: host update storage set enabled
2020-03-11 15:58:28 +08:00
Zexi Li
494c540ac1 region: host update storage set enabled 2020-03-11 15:59:05 +08:00
Rain
e0838efff8 fix(esxi): UnitNumber 7 is unavailable for scsi controller
By default, the virtual SCSI controller is assigned to virtual device node (z:7),
so that device node is unavailable for hard disks or other devices.
https://docs.vmware.com/en/VMware-vSphere/6.7/com.vmware.vsphere.vm_admin.doc/GUID-5872D173-A076-42FE-8D0B-9DB0EB0E7362.html
2020-03-11 15:17:33 +08:00
Rain
f3f449f27a fix(esxi): Fix bugs when using network with vlanID 2020-03-11 11:02:31 +08:00
Zexi Li
ce74310ca1 Merge pull request #5421 from swordqiu/automated-cherry-pick-of-#5419-upstream-release-3.0
Automated cherry pick of #5419: fix: fail to find esxi admin vnic, use vnic with default IPv4 route
2020-03-10 14:46:02 +08:00
yunion-ci-robot
4ee1079d95 Merge pull request #5431 from ioito/automated-cherry-pick-of-#5429-upstream-release-3.0
Automated cherry pick of #5429: fix: typo for sku sync
2020-03-10 11:14:57 +08:00
yunion-ci-robot
3dbaa6daba Merge pull request #5427 from rainzm/automated-cherry-pick-of-#5424-upstream-release-3.0
Automated cherry pick of #5424: fix(esxi): Add two account with same account name
2020-03-10 11:03:59 +08:00
Qu Xuan
64b9bac4a9 fix: typo for sku sync 2020-03-09 19:59:04 +08:00
Rain
75410934fe fix(esxi): Add two account with same account name 2020-03-09 17:58:56 +08:00
Qiu Jian
fae4cf63e2 fix: fail to find esxi admin vnic, use vnic with default IPv4 route 2020-03-09 15:58:13 +08:00
Zexi Li
0cd71ca469 Merge pull request #5416 from zexi/automated-cherry-pick-of-#5414-upstream-release-3.0
Automated cherry pick of #5414: opslog: notes use text column
2020-03-09 12:36:28 +08:00
Zexi Li
2326f8e397 Merge pull request #5400 from swordqiu/automated-cherry-pick-of-#5398-upstream-release-3.0
Automated cherry pick of #5398: fix: not check domain quota if non_default_domain_project is off
2020-03-09 12:31:54 +08:00
Zexi Li
5e39414807 opslog: notes use text column 2020-03-09 12:31:28 +08:00
Zexi Li
2c3340db6d Merge pull request #5405 from swordqiu/automated-cherry-pick-of-#5403-upstream-release-3.0
Automated cherry pick of #5403: fix: cloudprovider performEnable should also enable its cloudaccount
2020-03-09 12:30:34 +08:00
Zexi Li
54aff23fd2 Merge pull request #5410 from swordqiu/automated-cherry-pick-of-#5408-upstream-release-3.0
Automated cherry pick of #5408: feature: climc docker image add vim
2020-03-09 09:28:01 +08:00
Qiu Jian
c500036b1a feature: climc docker image add vim 2020-03-08 22:47:29 +08:00
Qiu Jian
51fdaed08c fix: cloudprovider performEnable should also enable its cloudaccount 2020-03-08 16:14:10 +08:00
Qiu Jian
1e58907468 fix: not check domain quota if non_default_domain_project is off 2020-03-07 18:17:15 +08:00
Zexi Li
4e7202af40 Merge pull request #5394 from swordqiu/automated-cherry-pick-of-#5392-upstream-release-3.0
Automated cherry pick of #5392: fix: scoped resource should override FetchOwnerId
2020-03-07 15:51:45 +08:00
Qiu Jian
444c2bc56e fix: scoped resource should override FetchOwnerId 2020-03-07 15:42:13 +08:00
Zexi Li
ae5f1e308b Merge pull request #5390 from swordqiu/automated-cherry-pick-of-#5388-upstream-release-3.0
Automated cherry pick of #5388: fix: keystone prefers internal endpoint type
2020-03-06 22:22:55 +08:00
Qiu Jian
12ce1a0056 fix: keystone prefers internal endpoint type 2020-03-06 21:46:30 +08:00
yunion-ci-robot
90008ff727 Merge pull request #5384 from rainzm/automated-cherry-pick-of-#5378-upstream-release-3.0
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
565696ca54 Merge pull request #5374 from swordqiu/automated-cherry-pick-of-#5372-upstream-release-3.0
Automated cherry pick of #5372: fix: no scope shcedtag should be visible to all
2020-03-06 18:32:33 +08:00
yunion-ci-robot
ae0de12280 Merge pull request #5381 from tb365/automated-cherry-pick-of-#5379-upstream-release-3.0
Automated cherry pick of #5379: huawei reset password bugfix
2020-03-06 18:12:51 +08:00
Rain
bf4ca9c7f4 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:16:23 +08:00
TangBin
f50ffc31a7 ctyun region name fix 2020-03-06 16:51:58 +08:00
TangBin
9a7cad2507 huawei reset password bugfix 2020-03-06 16:51:57 +08:00
Qiu Jian
4efe569446 fix: no scope shcedtag should be visible to all 2020-03-06 15:23:51 +08:00
Zexi Li
ed512d2881 Merge pull request #5368 from rainzm/automated-cherry-pick-of-#5366-upstream-release-3.0
Automated cherry pick of #5366: fix/notify: Fix the resend mechanism
2020-03-06 12:46:08 +08:00
Rain
61d9bd3da9 fix/notify: Fix the resend mechanism 2020-03-06 11:12:59 +08:00
yunion-ci-robot
8e9cd48302 Merge pull request #5356 from rainzm/automated-cherry-pick-of-#5353-upstream-release-3.0
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
897410d87f fix the conflict 2020-03-05 17:44:38 +08:00
Rain
cf1ae4cac3 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:43:28 +08:00
Zexi Li
f8358cdde2 Merge pull request #5348 from swordqiu/hotfix/qj-update-autogen-struct-json-fieldname-for-3.0
fix: update autogen struct json fieldname for release/3.0
2020-03-05 14:08:02 +08:00
Qiu Jian
2e51e8d7e8 update autogen struct with comment lines 2020-03-04 21:24:48 +08:00
yunion-ci-robot
7b7d197939 Merge pull request #5345 from ioito/automated-cherry-pick-of-#5343-upstream-release-3.0
Automated cherry pick of #5343: fix: 支持aws rds sync
2020-03-04 20:50:12 +08:00
Qiu Jian
d019dded59 fix: update autogen struct json fieldname for release/3.0 2020-03-04 20:29:55 +08:00
Qu Xuan
6ee9a428d4 fix: 支持aws rds sync 2020-03-04 20:10:43 +08:00
Zexi Li
fe096bc117 Merge pull request #5337 from swordqiu/automated-cherry-pick-of-#5336-upstream-release-3.0
Automated cherry pick of #5336: fix: keystone user password history check should skip system account
2020-03-04 19:16:22 +08:00
Qiu Jian
bf9bcb191d fix: keystone user password history check should skip system account 2020-03-04 18:37:57 +08:00
Zexi Li
cc0377dafb Merge pull request #5326 from swordqiu/automated-cherry-pick-of-#5324-upstream-release-3.0
Automated cherry pick of #5324: fix: clean up pending usage no matter whether object upload is success
2020-03-03 13:14:23 +08:00
yunion-ci-robot
dce85ee9ee Merge pull request #5317 from ioito/automated-cherry-pick-of-#5315-upstream-release-3.0
Automated cherry pick of #5315: fix: 避免旧套餐下架zone信息未知,导致同步rds异常
2020-03-03 02:22:43 +08:00
Qiu Jian
bc3ce3d2a1 fix: clean up pending usage no matter whether object upload is success 2020-03-03 02:13:15 +08:00
Qu Xuan
27bb5eaa2b fix: 避免旧套餐下架zone信息未知,导致同步rds异常 2020-03-02 17:09:37 +08:00
Zexi Li
c630607066 Merge pull request #5314 from wanyaoqi/automated-cherry-pick-of-#5312-upstream-release-3.0
Automated cherry pick of #5312: fix get remote address because of request is proxyed by k8s
2020-02-28 23:57:25 +08:00
yunion-ci-robot
e2762d75ca Merge pull request #5272 from zhaoxiangchun/automated-cherry-pick-of-#5268-upstream-release-3.0
Automated cherry pick of #5268: 谷歌云multicloud监控
2020-02-28 23:17:29 +08:00
wanyaoqi
03f4cf19ed fix get remote address because of request is proxyed by k8s 2020-02-28 22:27:47 +08:00
yunion-ci-robot
c4bbd519bc Merge pull request #5309 from ioito/automated-cherry-pick-of-#5307-upstream-release-3.0
Automated cherry pick of #5307: 修复aliyun没有权限获取余额问题
2020-02-28 22:02:28 +08:00
yunion-ci-robot
79b03d99c6 Merge pull request #5288 from wanyaoqi/automated-cherry-pick-of-#5286-upstream-release-3.0
Automated cherry pick of #5286: host register use default vpc
2020-02-28 21:54:21 +08:00
yunion-ci-robot
32da0918ba Merge pull request #5300 from tb365/bugfix/tb-bugfix-022803
vpc list add param vpc_usable
2020-02-28 21:23:19 +08:00
yunion-ci-robot
e6128db1a4 Merge pull request #5283 from wanyaoqi/automated-cherry-pick-of-#5255-upstream-release-3.0
Automated cherry pick of #5255: fix nic get pci address
2020-02-28 21:08:21 +08:00
yunion-ci-robot
fe5a701849 Merge pull request #5279 from ioito/automated-cherry-pick-of-#5277-upstream-release-3.0
Automated cherry pick of #5277: fix: 新加gcp region 翻译
2020-02-28 20:50:20 +08:00
Qu Xuan
9d2bf8556c 修复aliyun没有权限获取余额问题 2020-02-28 19:55:53 +08:00
wanyaoqi
90ee7c2934 host register use default vpc 2020-02-28 18:37:31 +08:00
TangBin
bff54a22fd vpc list add param vpc_usable 2020-02-28 14:47:56 +08:00
yunion-ci-robot
a166467f75 Merge pull request #5292 from ioito/automated-cherry-pick-of-#5290-upstream-release-3.0
Automated cherry pick of #5290: 添加azure region city信息
2020-02-28 13:16:20 +08:00
Qu Xuan
87377deee7 添加azure region city信息 2020-02-28 11:37:23 +08:00
wanyaoqi
1ade0a645f fix nic get pci address 2020-02-27 22:56:04 +08:00
zhaoxiangchun
ad79f8a557 谷歌云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 19:34:34 +08:00
Qu Xuan
4b1e038ac6 fix: 新加gcp region 翻译 2020-02-27 18:55:07 +08:00
yunion-ci-robot
cf8426fad0 Merge pull request #5264 from rainzm/automated-cherry-pick-of-#5263-upstream-release-3.0
Automated cherry pick of #5263: fix(esxiagent): SSHKey was not unmarshalled correctly
2020-02-27 07:13:13 +08:00
yunion-ci-robot
3cf9b22ae4 Merge pull request #5240 from wanyaoqi/automated-cherry-pick-of-#5238-upstream-release-3.0
Automated cherry pick of #5238: fix host init set reserve memory
2020-02-26 23:03:15 +08:00
yunion-ci-robot
bb8b474b59 Merge pull request #5253 from swordqiu/automated-cherry-pick-of-#5252-upstream-release-3.0
Automated cherry pick of #5252: fix: use globalEndpointType as default endpoint type
2020-02-26 21:03:17 +08:00
wanyaoqi
1a2826d37b makesure /etc/ceph created before connect 2020-02-26 20:45:47 +08:00
Rain
02758cf5e2 fix(esxiagent): SSHKey was not unmarshalled correctly 2020-02-26 20:11:33 +08:00
yunion-ci-robot
5ebf23518d Merge pull request #5233 from ioito/automated-cherry-pick-of-#5231-upstream-release-3.0
Automated cherry pick of #5231: fix: 添加磁盘回滚snapshot日志
2020-02-26 16:00:15 +08:00
yunion-ci-robot
90a6b15c79 Merge pull request #5244 from ioito/automated-cherry-pick-of-#5242-upstream-release-3.0
Automated cherry pick of #5242: fix: 避免根磁盘小于镜像大小导致创建失败
2020-02-26 10:18:13 +08:00
yunion-ci-robot
ac6a4169c3 Merge pull request #5249 from ioito/automated-cherry-pick-of-#5247-upstream-release-3.0
Automated cherry pick of #5247: fix: 返回azure api 错误信息
2020-02-25 21:06:22 +08:00
Qiu Jian
9082f913c2 fix: use globalEndpointType as default endpoint type 2020-02-25 20:46:50 +08:00
Qu Xuan
c05188ef50 fix: 返回azure api 错误信息 2020-02-25 19:31:30 +08:00
Qu Xuan
b69f4b50fb fix: 避免根磁盘小于镜像大小导致创建失败 2020-02-25 15:40:30 +08:00
wanyaoqi
b3b80fbeef fix host register get network filter: add server_type baremetal 2020-02-25 11:33:01 +08:00
wanyaoqi
9bd0d49baa fix guest network get desc 2020-02-25 11:33:01 +08:00
wanyaoqi
23bfba422d fix host init set reserve memory 2020-02-25 11:28:32 +08:00
Qu Xuan
6fa93c25ad fix: 添加磁盘回滚snapshot日志 2020-02-24 16:07:52 +08:00
yunion-ci-robot
12f3df951e Merge pull request #5228 from rainzm/automated-cherry-pick-of-#5186-upstream-release-3.0
Automated cherry pick of #5186: feature(notify): Validate config
2020-02-24 15:27:08 +08:00
Rain
eabed8d47d feature(notify): Validate config 2020-02-24 14:11:56 +08:00
Zexi Li
09e63478c6 Merge pull request #5211 from swordqiu/automated-cherry-pick-of-#5208-upstream-release-3.0
Automated cherry pick of #5208: fix: reset paging limit to 2048 from 20
2020-02-21 16:46:09 +08:00
Zexi Li
3590253480 Merge pull request #5219 from rainzm/automated-cherry-pick-of-#5217-upstream-release-3.0
Automated cherry pick of #5217: fix: Storage filter not work for Esxi
2020-02-21 16:44:42 +08:00
yunion-ci-robot
cd02610f23 Merge pull request #5206 from tb365/automated-cherry-pick-of-#5199-upstream-release-3.0
Automated cherry pick of #5199: cloud region city list add default limit 2048
2020-02-21 15:56:39 +08:00
Rain
d2d551e6cd 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:13:49 +08:00
yunion-ci-robot
0d5dbf62b8 Merge pull request #5215 from ioito/automated-cherry-pick-of-#5213-upstream-release-3.0
Automated cherry pick of #5213: fix: 添加gcp region中文翻译
2020-02-20 21:16:33 +08:00
yunion-ci-robot
de59d8895a Merge pull request #5201 from ioito/automated-cherry-pick-of-#5198-upstream-release-3.0
Automated cherry pick of #5198: fix: 修复azure坐标问题,添加新的azure region城市信息
2020-02-20 21:01:28 +08:00
yunion-ci-robot
f9573c4cbf Merge pull request #5193 from ioito/automated-cherry-pick-of-#5191-upstream-release-3.0
Automated cherry pick of #5191: fix: add aliyun new region info
2020-02-20 18:19:28 +08:00
Qu Xuan
b3d1bfea0c fix: 添加gcp region中文翻译 2020-02-20 17:39:05 +08:00
TangBin
7667ed425e huawei cloud create bugfix 2020-02-20 15:40:17 +08:00
TangBin
20ce2ca01f huawei cloud create bugfix 2020-02-20 15:39:43 +08:00
TangBin
32cdc3e2cd cloud region city list add default limit 2048 2020-02-20 15:39:43 +08:00
yunion-ci-robot
9fb1f6c224 Merge pull request #5189 from ioito/automated-cherry-pick-of-#5187-upstream-release-3.0
Automated cherry pick of #5187: fix: 填充gcp disk_format字段
2020-02-20 15:30:31 +08:00
Qiu Jian
4d44569f40 fix: reset paging limit to 2048 from 20 2020-02-20 15:21:03 +08:00
Qu Xuan
5a14e40ba4 fix: 修复azure坐标问题,添加新的azure region城市信息 2020-02-20 14:55:51 +08:00
Qu Xuan
1081410846 fix: add aliyun new region info 2020-02-20 11:07:36 +08:00
Qu Xuan
942ff1d661 fix: 填充gcp disk_format字段 2020-02-20 10:46:11 +08:00
yunion-ci-robot
ef6e90f9cb Merge pull request #5184 from tb365/automated-cherry-pick-of-#5181-upstream-release-3.0
Automated cherry pick of #5181: aws listener sync fix
2020-02-19 19:18:28 +08:00
tangbin
8bdf8807de huawei http listener sync fix 2020-02-19 18:47:56 +08:00
tangbin
81eab50f3b aws rebuild root fix 2020-02-19 18:47:56 +08:00
tangbin
8c21e3313e aws listener sync fix 2020-02-19 18:47:56 +08:00
yunion-ci-robot
91d09aeba4 Merge pull request #5179 from rainzm/automated-cherry-pick-of-#5178-upstream-release-3.0
Automated cherry pick of #5178: fix(esxi): No distinction between ordinary scsi and pvscsi when creating disks
2020-02-19 17:51:29 +08:00
Rain
c040ed5d74 fix(esxi): No distinction between ordinary scsi and pvscsi when creating disks
parascsi 是 vmware 中一种高性能的 scsi 控制器。

在此之前,scsi 只包括 "lsilogic", "lsilogicsas", "buslogic"; 而别名为 pvscsi
的 parascsi 没有被包含进来;并且,一个 pci controller只能挂一个 scsi controller,
这会导致如果在一个拥有 pvscsi 的机器上添加普通scsi驱动类型的磁盘,就会替换驱动;
反之亦然。这会导致驱动的 key 不是我们指定的key,并且在添加磁盘的时候替换驱动的
类型有些随意。再者,我们的驱动类型的选择其实并没有暴露给前端。

所以,在寻找相应的controller时,将 parascsi 也纳入 scsi 类型。
尽量避免在创建磁盘的时候做硬件的改动,所以在创建磁盘的时候不区分 scsi
还是 pvscsi,如果两种 controller 均没有,就按照请求的类型创建一个。

此外,在 CloneVM 的时候,如果支持,优先使用 parascsi。
2020-02-19 16:58:27 +08:00
yunion-ci-robot
8b8f57e0f7 Merge pull request #5149 from tb365/automated-cherry-pick-of-#5145-upstream-release-3.0
Automated cherry pick of #5145: qcloud elb sync
2020-02-19 16:07:29 +08:00
Yousong Zhou
5c098c6445 Merge pull request #5176 from swordqiu/automated-cherry-pick-of-#5173-upstream-release-3.0
Automated cherry pick of #5173: fix: sync cloud provider should change its cloud account's sync_status
2020-02-19 16:02:43 +08:00
yunion-ci-robot
f4673ee5fc Merge pull request #5165 from tb365/automated-cherry-pick-of-#5162-upstream-release-3.0
Automated cherry pick of #5162: huawei elb backend vpc validate fix
2020-02-19 13:43:29 +08:00
yunion-ci-robot
410e575d8a Merge pull request #5169 from ioito/automated-cherry-pick-of-#5167-upstream-release-3.0
Automated cherry pick of #5167: fix: 避免将虚拟机ip同步到弹性网卡
2020-02-19 12:35:27 +08:00
yunion-ci-robot
16b053349b Merge pull request #5172 from yousong/automated-cherry-pick-of-#5159-upstream-release-3.0
Automated cherry pick of #5159: region: lbagent: deploy: use 'public' endpoint type
2020-02-19 12:04:27 +08:00
Qiu Jian
4937dec5f3 fix: sync cloud provider should change its cloud account's sync_status 2020-02-19 12:02:14 +08:00
Zexi Li
19b98799a0 Merge pull request #5157 from swordqiu/automated-cherry-pick-of-#5156-upstream-release-3.0
Automated cherry pick of #5156: fix: add climc helper scripts into docker images
2020-02-19 02:32:51 +08:00
Zexi Li
ce44e085f8 Merge pull request #5154 from swordqiu/automated-cherry-pick-of-#5151-upstream-release-3.0
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:30:04 +08:00
Yousong Zhou
349c26f39a lbagent: fix config for sticky session cookie
- account for user specific cookie name for insert mode
 - dont tamper cache instructions from backend server for server mode
2020-02-18 20:55:34 +08:00
Yousong Zhou
76d40b0ceb region: lbagent: deploy: use 'public' endpoint type 2020-02-18 20:55:34 +08:00
Qu Xuan
095b70af37 fix: 避免将虚拟机ip同步到弹性网卡 2020-02-18 15:39:26 +08:00
yunion-ci-robot
d090073168 Merge pull request #5140 from ioito/automated-cherry-pick-of-#5138-upstream-release-3.0
Automated cherry pick of #5138: fix: 避免未过滤掉同一个network底下的guest
2020-02-18 14:45:39 +08:00
tangbin
19fda5387f huawei elb backend vpc validate fix 2020-02-18 14:21:02 +08:00
yunion-ci-robot
617cd67b1c Merge pull request #5134 from zhaoxiangchun/automated-cherry-pick-of-#5132-upstream-release-3.0
Automated cherry pick of #5132: zstack监控功能
2020-02-18 12:06:44 +08:00
Qiu Jian
ae63c797d4 fix: add climc helper scripts into docker images 2020-02-18 10:16:56 +08:00
Qiu Jian
51e2c1114a fix: 1. adjust default response header timer to 30 seconds 2. set default paging limit to 20 2020-02-18 08:55:23 +08:00
TangBin
518405e0ca qcloud elb sync 2020-02-17 22:32:25 +08:00
Qu Xuan
e75c0e0fbf fix: 避免未过滤掉同一个network底下的guest 2020-02-17 20:52:34 +08:00
zhaoxiangchun
0c8fc8cf77 zstack监控功能
monitor.go中GetMonitorData函数通过传入的参数拼装请求参数,然后调用zstack.go中的getMonitor(),通过GET请求,获取相应的指标监控数据
2020-02-17 12:02:37 +08:00
yunion-ci-robot
5a2ecc2a1e Merge pull request #5122 from rainzm/automated-cherry-pick-of-#5121-upstream-release-3.0
Automated cherry pick of #5121: fix(esxiagent): Delete image backup file after saving to glance instead of before
2020-02-14 17:42:05 +08:00
Rain
8437d918de fix(esxiagent): Delete image backup file after saving to glance instead of before 2020-02-14 17:16:42 +08:00
yunion-ci-robot
ad9f85ede8 Merge pull request #5119 from ioito/automated-cherry-pick-of-#5117-upstream-release-3.0
Automated cherry pick of #5117: fix: 谷歌新加region翻译
2020-02-14 16:11:04 +08:00
Qu Xuan
e21994d9eb fix: 谷歌新加region翻译 2020-02-14 14:45:00 +08:00
yunion-ci-robot
8eca54f6a7 Merge pull request #5109 from rainzm/automated-cherry-pick-of-#5106-upstream-release-3.0
Automated cherry pick of #5106: fix(notify): Set some default template
2020-02-14 12:21:04 +08:00
yunion-ci-robot
7db5fe8ef7 Merge pull request #5113 from zexi/automated-cherry-pick-of-#5111-upstream-release-3.0
Automated cherry pick of #5111: region: server list by host sn
2020-02-14 12:08:05 +08:00
Zexi Li
320a233155 region: server list by host sn 2020-02-13 21:15:01 +08:00
Rain
60861d4983 fix(notify): Set some default template 2020-02-13 16:53:52 +08:00
yunion-ci-robot
599345c5f0 Merge pull request #5091 from rainzm/automated-cherry-pick-of-#5087-upstream-release-3.0
Automated cherry pick of #5087: fix(esxi): Create one if no suitable driver when creating disk
2020-02-13 14:37:02 +08:00
yunion-ci-robot
9159eae068 Merge pull request #5095 from bistuzx/automated-cherry-pick-of-#5092-upstream-release-3.0
Automated cherry pick of #5092: update account bucket options
2020-02-13 03:48:03 +08:00
张旭
8dc56cd712 update account bucket options 2020-02-12 18:28:58 +08:00
Rain
06ef435ffc fix: resolve compatibility issues 2020-02-12 17:18:10 +08:00
Rain
af4cab0d4e fix(esxi): Create one if no suitable driver when creating disk 2020-02-12 17:16:54 +08:00
yunion-ci-robot
1d4ea408a5 Merge pull request #5063 from zhaoxiangchun/automated-cherry-pick-of-#5061-upstream-release-3.0
Automated cherry pick of #5061: multicloud的vmware监控功能
2020-02-12 15:22:03 +08:00
yunion-ci-robot
b8f05c4ead Merge pull request #5079 from ioito/automated-cherry-pick-of-#5077-upstream-release-3.0
Automated cherry pick of #5077: fix: 修复gcp出方向规则同步问题
2020-02-11 17:39:59 +08:00
yunion-ci-robot
5c587212bc Merge pull request #5074 from ioito/automated-cherry-pick-of-#5072-upstream-release-3.0
Automated cherry pick of #5072: fix: 忽略无权限的资源标签
2020-02-11 17:22:02 +08:00
zhaoxiangchun
133fe47634 multicloud的vmware监控功能
monitor.go中GetMonitorData()函数获取监控数据
2020-02-11 00:45:28 +08:00
Qu Xuan
8efe1c5b45 fix: 修复gcp出方向规则同步问题 2020-02-10 18:48:18 +08:00
Qu Xuan
91ca20d540 fix: 忽略无权限的资源标签 2020-02-10 16:44:56 +08:00
yunion-ci-robot
4d320a22db Merge pull request #5070 from swordqiu/automated-cherry-pick-of-#5065-upstream-release-3.0
Automated cherry pick of #5065: fix: allow empty domain for windows deployment
2020-02-10 10:32:57 +08:00
Qiu Jian
16702ba2f6 fix: allow empty domain for windows deployment 2020-02-10 09:24:35 +08:00
yunion-ci-robot
e227380071 Merge pull request #5056 from swordqiu/automated-cherry-pick-of-#5054-upstream-release-3.0
Automated cherry pick of #5054: fix: createdAt should not be synced when update
2020-02-09 22:08:57 +08:00
Qiu Jian
b5aa5f3682 fix: createdAt should not be synced when update 2020-02-08 21:29:42 +08:00
yunion-ci-robot
7a56e6b74b Merge pull request #5046 from ioito/automated-cherry-pick-of-#5044-upstream-release-3.0
Automated cherry pick of #5044: fix: guest创建兼容keypair参数
2020-02-07 16:03:51 +08:00
Qu Xuan
4fd186a0c0 fix: guest创建兼容keypair参数 2020-02-07 15:12:29 +08:00
Zexi Li
88e4de7b52 Merge pull request #5028 from swordqiu/automated-cherry-pick-of-#5026-upstream-release-3.0
Automated cherry pick of #5026: fix: api gateway rpc handler redudant response
2020-02-07 13:03:31 +08:00
yunion-ci-robot
8bcbd08741 Merge pull request #5040 from ioito/automated-cherry-pick-of-#5038-upstream-release-3.0
Automated cherry pick of #5038: fix: 避免因tenantcache未缓存tenant导致创建云账号失败
2020-02-07 04:54:51 +08:00
yunion-ci-robot
3dc838d47d Merge pull request #5036 from tb365/automated-cherry-pick-of-#5032-upstream-release-3.0
Automated cherry pick of #5032: aws create with eip fix
2020-02-07 04:50:51 +08:00
Qu Xuan
abb954c6c9 fix: 避免因tenantcache未缓存tenant导致创建云账号失败 2020-02-06 18:29:36 +08:00
tangbin
b70a1e5a05 aws create with eip fix 2020-02-06 17:57:55 +08:00
Qiu Jian
5afb250467 fix: api gateway rpc handler redudant response 2020-02-06 17:02:42 +08:00
yunion-ci-robot
394a6f061c Merge pull request #5023 from ioito/automated-cherry-pick-of-#5021-upstream-release-3.0
Automated cherry pick of #5021: fix: 避免因大小写导致linux未注入默认用户
2020-02-06 13:50:52 +08:00
Qu Xuan
fa0cb45ea3 fix: 避免因大小写导致linux未注入默认用户 2020-02-06 12:03:48 +08:00
yunion-ci-robot
1113dfe17b Merge pull request #5019 from swordqiu/automated-cherry-pick-of-#5014-upstream-release-3.0
Automated cherry pick of #5014: fix: support empty dns domain
2020-02-06 09:42:49 +08:00
Qiu Jian
81c31c8c1c fix: support empty dns domain 2020-02-06 03:27:59 +08:00
yunion-ci-robot
8dfad23c2c Merge pull request #4998 from zhaoxiangchun/automated-cherry-pick-of-#4996-upstream-release-3.0
Automated cherry pick of #4996: azure的主机监控信息的获取
2020-02-05 02:11:45 +08:00
zhaoxiangchun
019287b16a modify files by github comments 2020-02-04 10:25:42 +08:00
zhaoxiangchun
ff1dc42c47 azure的主机监控信息的获取
monitor.go中的GetMonitorData函数完成参数的组装,查询获取监控信息
2020-02-04 10:25:42 +08:00
yunion-ci-robot
a3faf13ce7 Merge pull request #5000 from ioito/automated-cherry-pick-of-#4999-upstream-release-3.0
Automated cherry pick of #4999: fix: 避免私有云调整配置匹配不到sku
2020-02-03 16:18:44 +08:00
Qu Xuan
78d7317daa fix: 避免私有云调整配置匹配不到sku 2020-02-03 12:20:54 +08:00
yunion-ci-robot
dc6eab6cd1 Merge pull request #4995 from rainzm/automated-cherry-pick-of-#4994-upstream-release-3.0
Automated cherry pick of #4994: fix(esxiagent): Lead to vCenter server '503' when deleting vm'disk
2020-01-19 23:50:20 +08:00
Rain
48008e1a41 fix(esxiagent): Lead to vCenter server '503' when deleting vm'disk 2020-01-19 18:10:31 +08:00
Zexi Li
8f971c9ce4 Merge pull request #4993 from swordqiu/automated-cherry-pick-of-#4991-upstream-release-3.0
Automated cherry pick of #4991: update vendor
2020-01-19 17:35:33 +08:00
Qiu Jian
dbb4912325 fix: increment paging list order by multiple columns 2020-01-19 17:25:30 +08:00
Qiu Jian
9fdb7cf895 update vendor 2020-01-19 17:25:30 +08:00
yunion-ci-robot
05465b9cbb Merge pull request #4990 from swordqiu/automated-cherry-pick-of-#4988-upstream-release-3.0
Automated cherry pick of #4988: fix: cloudevent_tbl use new primary column event_id
2020-01-19 14:24:14 +08:00
Qiu Jian
e0ee61b94e fix: cloudevent_tbl use new primary column event_id 2020-01-19 12:56:40 +08:00
yunion-ci-robot
6032301cb8 Merge pull request #4979 from tb365/automated-cherry-pick-of-#4977-upstream-release-3.0
Automated cherry pick of #4977: get login-info add 404 return & elasticcache account reset password api add input params
2020-01-19 11:43:12 +08:00
Zexi Li
3894d23991 Merge pull request #4986 from swordqiu/automated-cherry-pick-of-#4983-upstream-release-3.0
Automated cherry pick of #4983: fix: try allocate host access ip from reserved pool
2020-01-19 10:37:40 +08:00
yunion-ci-robot
ae01139c37 Merge pull request #4900 from yousong/automated-cherry-pick-of-#4899-upstream-release-3.0
Automated cherry pick of #4899: validators: ValidatorModelIdOrName: allow empty
2020-01-19 10:29:11 +08:00
yunion-ci-robot
cb9e156628 Merge pull request #4890 from yousong/automated-cherry-pick-of-#4885-upstream-release-3.0
Automated cherry pick of #4885: lb: regiondrivers: remove unneeded Optional(true) call
2020-01-19 10:24:12 +08:00
Qiu Jian
57c266e977 fix: try allocate host access ip from reserved pool 2020-01-19 00:26:42 +08:00
Zexi Li
b1b9c08ea2 Merge pull request #4981 from wanyaoqi/automated-cherry-pick-of-#4980-upstream-release-3.0
Automated cherry pick of #4980: is standard domain optional
2020-01-18 19:16:33 +08:00
wanyaoqi
cc3f382cb8 is standard domain optional 2020-01-18 19:12:21 +08:00
TangBin
f2380b293e get login-info add 404 return & elasticcache account reset password api add input params 2020-01-18 18:39:53 +08:00
yunion-ci-robot
46a7e670b2 Merge pull request #4966 from ioito/automated-cherry-pick-of-#4965-upstream-release-3.0
Automated cherry pick of #4965: fix: 公有云日志添加brand字段
2020-01-18 16:26:10 +08:00
Zexi Li
af7aaff4c9 Merge pull request #4975 from swordqiu/automated-cherry-pick-of-#4973-upstream-release-3.0
Automated cherry pick of #4973: fix: bucket get details missing cloudprovider info
2020-01-18 16:03:58 +08:00
Qu Xuan
7c5f0727b3 fix: 公有云日志添加brand字段 2020-01-18 16:01:00 +08:00
Qiu Jian
c4f6199890 fix: bucket get details missing cloudprovider info 2020-01-18 15:42:59 +08:00
Zexi Li
5f3faf8cb8 Merge pull request #4971 from swordqiu/automated-cherry-pick-of-#4968-upstream-release-3.0
Automated cherry pick of #4968: fix: network-reserve-ip ignores expired reserved ips
2020-01-18 14:25:00 +08:00
Qiu Jian
d7becf89e8 fix: network-reserve-ip ignores expired reserved ips 2020-01-18 11:10:49 +08:00
Zexi Li
d35e6f8fea Merge pull request #4963 from wanyaoqi/automated-cherry-pick-of-#4962-upstream-release-3.0
Automated cherry pick of #4962: fix models renew
2020-01-17 21:55:27 +08:00
wanyaoqi
a3332344a0 fix models renew 2020-01-17 21:51:30 +08:00
yunion-ci-robot
5826a36de4 Merge pull request #4961 from yousong/automated-cherry-pick-of-#4960-upstream-release-3.0
Automated cherry pick of #4960: hostman: linux_bridge: flush addr on member iface down
2020-01-17 21:50:09 +08:00
yunion-ci-robot
b61befef30 Merge pull request #4947 from ioito/automated-cherry-pick-of-#4946-upstream-release-3.0
Automated cherry pick of #4946: fix: 腾讯云主机带宽跟随eip带宽变化而变化
2020-01-17 19:46:09 +08:00
yunion-ci-robot
4bdf3e8404 Merge pull request #4793 from zhaoxiangchun/automated-cherry-pick-of-#4775-upstream-release-3.0
Automated cherry pick of #4775: 新增aws监控代码,GetMonitorData函数,获取监控信息
2020-01-17 19:26:08 +08:00
Zexi Li
00e1911d30 Merge pull request #4958 from wanyaoqi/automated-cherry-pick-of-#4957-upstream-release-3.0
Automated cherry pick of #4957: fix postpaid expire
2020-01-17 18:57:04 +08:00
Yousong Zhou
d26c428b68 hostman: linux_bridge: flush addr on member iface down
Previously it was done by "ifconfig xx 0.0.0.0 down"

Fixes 4d8d20f ("hostman: use package iproute2")
2020-01-17 18:13:10 +08:00
yunion-ci-robot
dc634ad9d0 Merge pull request #4956 from yousong/automated-cherry-pick-of-#4955-upstream-release-3.0
Automated cherry pick of #4955: esxi: dont import hostman pkgs
2020-01-17 18:07:09 +08:00
wanyaoqi
e691d63910 fix postpaid expire 2020-01-17 17:53:27 +08:00
Yousong Zhou
5c325bc6b7 esxi: dont import hostman pkgs
Fix building region on darwin
2020-01-17 16:54:54 +08:00
Zexi Li
00f07f128f Merge pull request #4952 from wanyaoqi/automated-cherry-pick-of-#4950-upstream-release-3.0
Automated cherry pick of #4950: host deployer base version up
2020-01-17 16:39:07 +08:00
wanyaoqi
fdc1bef92e host deployer base version up 2020-01-17 14:44:00 +08:00
yunion-ci-robot
181c1099fe Merge pull request #4936 from yousong/automated-cherry-pick-of-#4935-upstream-release-3.0
Automated cherry pick of #4935: iproute2: test against non-nil dst of routes returned by List4()
2020-01-17 13:48:10 +08:00
Qu Xuan
e20a6a35df fix: 腾讯云主机带宽跟随eip带宽变化而变化 2020-01-17 13:35:10 +08:00
yunion-ci-robot
a4db9de855 Merge pull request #4944 from wanyaoqi/automated-cherry-pick-of-#4943-upstream-release-3.0
Automated cherry pick of #4943: fix snapshot list filter by disk type
2020-01-17 12:59:08 +08:00
wanyaoqi
4e9ca42347 fix snapshot list filter by disk type 2020-01-17 11:59:22 +08:00
yunion-ci-robot
10a04b0005 Merge pull request #4884 from tb365/automated-cherry-pick-of-#4880-upstream-release-3.0
Automated cherry pick of #4880: huawei remove backend group bugfix
2020-01-17 11:01:10 +08:00
yunion-ci-robot
f36f275dc6 Merge pull request #4923 from wanyaoqi/automated-cherry-pick-of-#4922-upstream-release-3.0
Automated cherry pick of #4922: fix detect host info
2020-01-17 10:55:09 +08:00
yunion-ci-robot
4f644f1d80 Merge pull request #4937 from rainzm/automated-cherry-pick-of-#4931-upstream-release-3.0
Automated cherry pick of #4931: bugfix(esxiagent): PrefetchImageCacheByCopy & SHost.FileUrlPathToDsPath
2020-01-17 10:54:10 +08:00
zhaoxiangchun
e1020530e2 add License Head 2020-01-17 10:48:35 +08:00
zhaoxiangchun
a94f55ba91 vendor: update 2020-01-17 10:48:35 +08:00
zhaoxiangchun
b769399a79 新增aws监控代码,GetMonitorData函数,获取监控信息
首先通过monitor.go文件中的GetMonitorData函数组装查询参数,然后通过SRegion中cloudWatchRequest函数组装request信息,
进行查询返回
2020-01-17 10:48:35 +08:00
Rain
0ba856004f bugfix(esxiagent): PrefetchImageCacheByCopy & SHost.FileUrlPathToDsPath
1. Fix the bug when preparing remote image by copy
2. SHost.FileUrlPathToDsPath will not work when shost has multiple storage.
2020-01-17 10:41:00 +08:00
Rain
afefb9464d bugfix(esxiagent): PrefetchImageCacheByCopy & SHost.FileUrlPathToDsPath
1. Fix the bug when preparing remote image by copy
2. SHost.FileUrlPathToDsPath will not work when shost has multiple storage.
2020-01-17 10:41:00 +08:00
yunion-ci-robot
039d7b43f6 Merge pull request #4927 from ioito/automated-cherry-pick-of-#4926-upstream-release-3.0
Automated cherry pick of #4926: cloudevent 支持since until参数过滤
2020-01-17 09:21:07 +08:00
Yousong Zhou
6a4b39085c netutils2: guard against possible nil members 2020-01-16 22:50:01 +08:00
Yousong Zhou
db75a24f73 netutils: DefaultSrcIpDev: use iproute2.RouteGetByDst 2020-01-16 22:50:01 +08:00
Yousong Zhou
ff0e50cce0 iproute2: add RouteGetByDst() 2020-01-16 22:50:01 +08:00
Yousong Zhou
217670326b iproute2: test against non-nil dst of routes returned by List4() 2020-01-16 22:50:01 +08:00
yunion-ci-robot
a655afbbde Merge pull request #4934 from rainzm/automated-cherry-pick-of-#4933-upstream-release-3.0
Automated cherry pick of #4933: fix(hostdeployer): Umount VDDKDisk when IRootFsDriver is nil
2020-01-16 21:48:11 +08:00
yunion-ci-robot
e276ba9582 Merge pull request #4930 from yousong/automated-cherry-pick-of-#4929-upstream-release-3.0
Automated cherry pick of #4929: hostman: fix removing addresses on slave ifaces
2020-01-16 21:24:11 +08:00
Rain
93c5a79afa fix(hostdeployer): Umount VDDKDisk when IRootFsDriver is nil 2020-01-16 21:21:19 +08:00
Yousong Zhou
53f95f775d hostman: replace route command dep with netlink call 2020-01-16 20:48:10 +08:00
Yousong Zhou
b9bab969cb netutils2: replace GetRoutes with netlink call 2020-01-16 20:48:10 +08:00
Yousong Zhou
7835ee1063 iproute2: route operations 2020-01-16 20:48:10 +08:00
Yousong Zhou
675f111084 hostman: add secondary addresses with one iproute2 call 2020-01-16 20:48:10 +08:00
Yousong Zhou
9ccd97a236 hostman: up bridge interface in SetupAddresses
Previously it was done implicitly by ifconfig addr config command
2020-01-16 20:48:10 +08:00
Yousong Zhou
2ea614d38d hostman: fix removing addresses on slave ifaces
Previously it was done with "ifconfig xxx 0 up"

Fixes 4d8d20f ("hostman: use package iproute2")
2020-01-16 20:48:10 +08:00
Qu Xuan
8028577a0b cloudevent 支持since until参数过滤 2020-01-16 19:44:38 +08:00
yunion-ci-robot
7c60fbf66c Merge pull request #4920 from yousong/automated-cherry-pick-of-#4919-upstream-release-3.0
Automated cherry pick of #4919: iproute2: skip setting addrs on parse error
2020-01-16 16:53:07 +08:00
wanyaoqi
bd560a07b6 fix detect host info 2020-01-16 16:50:30 +08:00
Yousong Zhou
a4507e169a netutils: isolate linux dependent parts 2020-01-16 16:35:12 +08:00
Yousong Zhou
a71292cabc iproute2: skip setting addrs on parse error 2020-01-16 16:35:12 +08:00
Yousong Zhou
b8d93a0db7 hostman: fix setting address
Fixes 4d8d20f ("hostman: use package iproute2")
2020-01-16 16:35:12 +08:00
Zexi Li
352800c78d Merge pull request #4915 from wanyaoqi/automated-cherry-pick-of-#4914-upstream-release-3.0
Automated cherry pick of #4914: fix deploy iso failed
2020-01-16 15:33:02 +08:00
yunion-ci-robot
a5ace62220 Merge pull request #4918 from tb365/automated-cherry-pick-of-#4916-upstream-release-3.0
Automated cherry pick of #4916: ctyun bugfix
2020-01-16 15:08:08 +08:00
TangBin
7f20eed8ef comment fix 2020-01-16 14:51:25 +08:00
TangBin
e2b1b53e3e ctyun bugfix 2020-01-16 14:51:25 +08:00
yunion-ci-robot
089652074e Merge pull request #4863 from yousong/automated-cherry-pick-of-#4836-upstream-release-3.0
Automated cherry pick of #4836: iproute2: initial version
2020-01-16 09:59:06 +08:00
yunion-ci-robot
77494e5889 Merge pull request #4913 from tb365/automated-cherry-pick-of-#4911-upstream-release-3.0
Automated cherry pick of #4911: server get login info 404 not found
2020-01-16 09:52:06 +08:00
yunion-ci-robot
ba8142559c Merge pull request #4905 from ioito/automated-cherry-pick-of-#4904-upstream-release-3.0
Automated cherry pick of #4904: fix: 避免创建azure时指定高级ssd失效
2020-01-16 09:51:06 +08:00
wanyaoqi
23515d0c87 fix deploy iso failed 2020-01-15 20:58:36 +08:00
yunion-ci-robot
3a853545ca Merge pull request #4891 from wanyaoqi/automated-cherry-pick-of-#4887-upstream-release-3.0
Automated cherry pick of #4887: validate share on delete, update pulibc scope on mark standard
2020-01-15 20:57:17 +08:00
TangBin
45d1c3c7dd server get login info 404 not found 2020-01-15 19:34:25 +08:00
Qu Xuan
277a1066cd fix: 避免创建azure时指定高级ssd失效 2020-01-15 18:01:25 +08:00
Zexi Li
cb29e4f045 Merge pull request #4903 from wanyaoqi/automated-cherry-pick-of-#4902-upstream-release-3.0
Automated cherry pick of #4902: use executor probe kernel mods
2020-01-15 17:30:23 +08:00
wanyaoqi
753566d3a9 use executor probe kernel mods 2020-01-15 17:20:29 +08:00
Yousong Zhou
4008c25b0a lbagent: tunable tune.http.maxhdr 2020-01-15 12:14:56 +08:00
Yousong Zhou
dad753aaf5 lbagent: fix not logging https listener 2020-01-15 12:14:56 +08:00
Yousong Zhou
6672c2357e lbagent: support accessing backend with tls 2020-01-15 12:14:56 +08:00
Yousong Zhou
5865e393f5 climc: lbbackend: support ssl related options 2020-01-15 12:14:56 +08:00
Yousong Zhou
3d6a14b89b lb: support accessing backend with tls 2020-01-15 12:14:56 +08:00
Yousong Zhou
3af6da558f lb: regiondrivers: remove unneeded Optional(true) call 2020-01-15 12:14:56 +08:00
Yousong Zhou
1e1811c0de hostman: use package iproute2 2020-01-14 21:42:21 +08:00
Yousong Zhou
5b09a45437 hostman: fix setting mtu for tunnel padding 2020-01-14 21:42:21 +08:00
Yousong Zhou
c72322cd5b hostman: hostinfo: use netutils2.DefaultSrcIpDev() 2020-01-14 21:42:21 +08:00
Yousong Zhou
bf5f1f524e vendor: add github.com/vishvananda/netlink 2020-01-14 21:42:21 +08:00
Yousong Zhou
e910967798 netutils2: use netlink to GetAddresses() 2020-01-14 21:42:20 +08:00
Yousong Zhou
aa27f4eeca netutils2: add DefaultSrcIpDev() 2020-01-14 21:42:20 +08:00
Yousong Zhou
232df7b869 iproute2: initial version 2020-01-14 21:42:20 +08:00
Yousong Zhou
88def49fcc climc: lblistener: allow setting backendgroup to empty 2020-01-14 21:38:34 +08:00
Yousong Zhou
fc3aa2acbf mcclient: options: test marshal string ptr 2020-01-14 21:38:34 +08:00
Yousong Zhou
7bb8f0f968 lblistener: allow setting http/https listener backendgroup to empty 2020-01-14 21:38:34 +08:00
Yousong Zhou
79d8abd1ab validators: ValidatorModelIdOrName: allow empty 2020-01-14 21:38:34 +08:00
Zexi Li
101d5de95a Merge pull request #4898 from rainzm/automated-cherry-pick-of-#4895-upstream-release-3.0
Automated cherry pick of #4895: fix(notify): Update template
2020-01-14 18:23:52 +08:00
Rain
11ccfdd5c9 fix(notify): Update template 2020-01-14 18:17:06 +08:00
wanyaoqi
05c85e898d validate share on delete, update pulibc scope on mark standard 2020-01-14 17:41:42 +08:00
Zexi Li
30a4d16628 Merge pull request #4889 from wanyaoqi/automated-cherry-pick-of-#4888-upstream-release-3.0
Automated cherry pick of #4888: host fix env path
2020-01-14 17:35:25 +08:00
wanyaoqi
f9b9856768 host fix env path 2020-01-14 17:20:52 +08:00
TangBin
60b0634e27 aliyun backendgroup bugfix 2020-01-14 15:53:24 +08:00
TangBin
8f574c255d aws backendgroup delete bugfix 2020-01-14 15:53:24 +08:00
TangBin
37ece22817 aws sync routetable 2020-01-14 15:53:24 +08:00
TangBin
e25142ed70 huawei remove backend group bugfix 2020-01-14 15:53:24 +08:00
Zexi Li
e59189d0f5 Merge pull request #4875 from yousong/automated-cherry-pick-of-#4874-upstream-release-3.0
Automated cherry pick of #4874: vendor: update sqlchemy
2020-01-14 13:58:00 +08:00
Zexi Li
5e166849ef Merge pull request #4879 from yousong/automated-cherry-pick-of-#4878-upstream-release-3.0
Automated cherry pick of #4878: lb: fix setting default redirect type
2020-01-14 13:57:23 +08:00
Yousong Zhou
f5af866b39 lb: fix setting default redirect type 2020-01-14 13:32:39 +08:00
Yousong Zhou
5773663e5d vendor: update sqlchemy 2020-01-14 13:26:14 +08:00
Zexi Li
b65ab0361a Merge pull request #4872 from swordqiu/automated-cherry-pick-of-#4869-upstream-release-3.0
Automated cherry pick of #4869: fix: first load of service config not effective
2020-01-14 10:23:49 +08:00
Qiu Jian
eb30360856 fix: first load of service config not effective 2020-01-14 03:04:19 +08:00
yunion-ci-robot
08b7a96309 Merge pull request #4864 from ioito/automated-cherry-pick-of-#4862-upstream-release-3.0
Automated cherry pick of #4862: fix: 仅kvm需要去判断是否需要关机调整配置,公有云私有云默认不需要
2020-01-14 03:02:01 +08:00
yunion-ci-robot
fe99ec0649 Merge pull request #4838 from ioito/automated-cherry-pick-of-#4837-upstream-release-3.0
Automated cherry pick of #4837: fix: 添加磁盘创建失败日志
2020-01-14 02:58:01 +08:00
yunion-ci-robot
f885cfcc4a Merge pull request #4859 from ioito/automated-cherry-pick-of-#4858-upstream-release-3.0
Automated cherry pick of #4858: fix: 恢复公有云日志name
2020-01-14 02:51:02 +08:00
yunion-ci-robot
9b3491cc4e Merge pull request #4830 from ioito/automated-cherry-pick-of-#4829-upstream-release-3.0
Automated cherry pick of #4829: fix: 公有云日志权限列表
2020-01-14 02:31:01 +08:00
yunion-ci-robot
5317b43e13 Merge pull request #4850 from ioito/automated-cherry-pick-of-#4849-upstream-release-3.0
Automated cherry pick of #4849: fix: aliyun rule fix
2020-01-14 02:24:01 +08:00
yunion-ci-robot
633c2c9439 Merge pull request #4800 from yousong/automated-cherry-pick-of-#4799-upstream-release-3.0
Automated cherry pick of #4799: validators: remove unused defaultVal member
2020-01-14 02:04:01 +08:00
Zexi Li
3f15fa2c58 Merge pull request #4843 from ioito/automated-cherry-pick-of-#4842-upstream-release-3.0
Automated cherry pick of #4842: fix: 添加安全组操作日志
2020-01-13 20:50:49 +08:00
Zexi Li
b822c58fc2 Merge pull request #4857 from rainzm/automated-cherry-pick-of-#4856-upstream-release-3.0
Automated cherry pick of #4856: fix(esxi-agent): Export CGO_ENABLED=0 when building esxi-agent
2020-01-13 20:49:25 +08:00
Rain
5171eca046 fix(esxi-agent): Export CGO_ENABLED=0 when building esxi-agent 2020-01-13 20:45:24 +08:00
Qu Xuan
bec1776d7e fix: 仅kvm需要去判断是否需要关机调整配置,公有云私有云默认不需要 2020-01-13 18:53:04 +08:00
Qu Xuan
5ba580878d fix: 恢复公有云日志name 2020-01-13 17:58:03 +08:00
Qu Xuan
7ee21d12ce fix: aliyun rule fix 2020-01-13 17:44:07 +08:00
Qu Xuan
abef1a9f9b fix: 添加安全组操作日志 2020-01-13 15:26:31 +08:00
Qu Xuan
ccd187220c fix: 添加磁盘创建失败日志 2020-01-13 14:54:29 +08:00
yunion-ci-robot
40a211144c Merge pull request #4835 from zexi/automated-cherry-pick-of-#4834-upstream-release-3.0
Automated cherry pick of #4834: action: add esxi agent
2020-01-13 13:28:02 +08:00
Zexi Li
7648c26d75 action: add esxi agent 2020-01-13 13:24:37 +08:00
Qu Xuan
2ee7dca684 fix: 公有云日志权限列表 2020-01-13 11:21:34 +08:00
Zexi Li
f764e5b394 Merge pull request #4820 from swordqiu/automated-cherry-pick-of-#4817-upstream-release-3.0
Automated cherry pick of #4817: fix: non-default-domain-projects changes not take effects after changing through service-config
2020-01-13 10:57:07 +08:00
Zexi Li
c260d81610 Merge pull request #4816 from swordqiu/automated-cherry-pick-of-#4813-upstream-release-3.0
Automated cherry pick of #4813: fix: set default read privileges for reading all quotas
2020-01-13 10:55:15 +08:00
yunion-ci-robot
ef813e062a Merge pull request #4825 from tb365/automated-cherry-pick-of-#4823-upstream-release-3.0
Automated cherry pick of #4823: sku domain filter bugfix
2020-01-13 09:26:59 +08:00
TangBin
2062489bec sku domain filter bugfix 2020-01-12 12:03:49 +08:00
Qiu Jian
0ae98e64ea fix: non-default-domain-projects changes not take effects after changing through service-config 2020-01-12 00:06:34 +08:00
yunion-ci-robot
a1ccae2e23 Merge pull request #4810 from tb365/automated-cherry-pick-of-#4809-upstream-release-3.0
Automated cherry pick of #4809: sku domain filter bugfix
2020-01-11 23:30:03 +08:00
TangBin
0b4a141199 sku domain filter bugfix 2020-01-11 21:29:05 +08:00
Qiu Jian
25f8c71d18 fix: set default read privileges for reading all quotas 2020-01-11 18:01:16 +08:00
Yousong Zhou
1a0df04c83 climc: lb: allow setting redirect parameters 2020-01-10 21:34:32 +08:00
Yousong Zhou
f5c534cb71 climc: lblistenerrule: allow setting request rate 2020-01-10 21:34:32 +08:00
Yousong Zhou
7d1174efad lbagent: support http redirect 2020-01-10 21:34:32 +08:00
Yousong Zhou
e3f654994a lb: support redirect type listener & rule 2020-01-10 21:34:32 +08:00
Yousong Zhou
0dbd73b60b lblistenerrule: validate domain and path on creation 2020-01-10 21:34:31 +08:00
Yousong Zhou
f75ef27fe0 validators: add ValidatorHostPort 2020-01-10 21:34:31 +08:00
Yousong Zhou
dca8b8a9f5 validators: add ValidatorIntChoices 2020-01-10 21:34:31 +08:00
Yousong Zhou
9df932505c validators: remove unused defaultVal member 2020-01-10 21:34:30 +08:00
yunion-ci-robot
423777c775 Merge pull request #4796 from tb365/automated-cherry-pick-of-#4795-upstream-release-3.0
Automated cherry pick of #4795: add filter skus by domain id
2020-01-10 20:25:58 +08:00
yunion-ci-robot
52f2a1f3b4 Merge pull request #4722 from tb365/automated-cherry-pick-of-#4712-upstream-release-3.0
Automated cherry pick of #4712: cloud account support manually sync skus
2020-01-10 20:06:59 +08:00
yunion-ci-robot
dd0ced571d Merge pull request #4806 from tb365/automated-cherry-pick-of-#4801-upstream-release-3.0
Automated cherry pick of #4801: kvm elb listener update bugfix
2020-01-10 19:50:58 +08:00
yunion-ci-robot
dbd959d040 Merge pull request #4767 from tb365/automated-cherry-pick-of-#4766-upstream-release-3.0
Automated cherry pick of #4766: _getModule fix
2020-01-10 19:22:59 +08:00
TangBin
9be50f0007 kvm elb listener update bugfix 2020-01-10 18:52:00 +08:00
TangBin
840b6e9a16 spelling mistakes fix 2020-01-10 17:17:25 +08:00
TangBin
ec83f583c2 user register ingore blank row 2020-01-10 17:17:25 +08:00
TangBin
2983659c53 add filter skus by domain id 2020-01-10 17:17:25 +08:00
Zexi Li
af20c84a50 Merge pull request #4794 from rainzm/automated-cherry-pick-of-#4779-upstream-release-3.0
Automated cherry pick of #4779: fix(esxi-agent): Avoid redundant agent & Adjust workspace path
2020-01-10 11:51:57 +08:00
Rain
5cee576fc4 fix(esxi-agent): Avoid redundant agent & Adjust workspace path
1. There is only one esxi agent needed in OneCloud.
2. Workspace path shoule be EsxiAgentPath not the parent directory of this.
3. The VM name is too long for vcenter when importing VM so that shrink
it.
2020-01-10 11:01:37 +08:00
yunion-ci-robot
ba89e19f3e Merge pull request #4778 from rainzm/automated-cherry-pick-of-#4754-upstream-release-3.0
Automated cherry pick of #4754: fix(region): Sync HostStorage in syncOnPremiseCloudProviderInfo
2020-01-10 10:36:58 +08:00
yunion-ci-robot
73faf76bbb Merge pull request #4762 from wanyaoqi/automated-cherry-pick-of-#4761-upstream-release-3.0
Automated cherry pick of #4761: image-properties-add-disable-delete
2020-01-10 10:28:58 +08:00
yunion-ci-robot
17bd125542 Merge pull request #4769 from wanyaoqi/automated-cherry-pick-of-#4768-upstream-release-3.0
Automated cherry pick of #4768: fix guest start no task complete
2020-01-10 10:22:58 +08:00
yunion-ci-robot
3b14136705 Merge pull request #4783 from swordqiu/automated-cherry-pick-of-#4780-upstream-release-3.0
Automated cherry pick of #4780: fix: initialize service config on keystone when service boot
2020-01-10 10:19:58 +08:00
yunion-ci-robot
a968e3544c Merge pull request #4785 from yousong/automated-cherry-pick-of-#4784-upstream-release-3.0
Automated cherry pick of #4784: dnsrecords: add helper methods
2020-01-10 10:15:57 +08:00
Yousong Zhou
9d20a58a85 dns: chain load records for cname 2020-01-09 23:23:34 +08:00
Yousong Zhou
a719ad6d82 dns: prepare for responding with A record of cname value 2020-01-09 23:23:34 +08:00
Yousong Zhou
2f9e3f7da0 dnsrecords: add helper methods 2020-01-09 23:23:34 +08:00
Qiu Jian
5f8758e5c4 fix: initialize service config on keystone when service boot 2020-01-09 22:15:27 +08:00
Rain
ae2369befd 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:04:32 +08:00
wanyaoqi
a4a7d004c8 fix guest start no task complete 2020-01-09 17:13:03 +08:00
TangBin
9a7d223311 _getModule fix 2020-01-09 16:42:16 +08:00
wanyaoqi
d9910a0364 image-properties-add-disable-delete 2020-01-09 15:42:02 +08:00
TangBin
6ad8ff188d cloud account support manually sync skus 2020-01-09 11:17:04 +08:00
yunion-ci-robot
641cd05a9a Merge pull request #4756 from rainzm/automated-cherry-pick-of-#4755-upstream-release-3.0
Automated cherry pick of #4755: fix(esxi-agent): Adjust the VM Path in Datastore
2020-01-09 10:28:57 +08:00
Zexi Li
570a6bbab7 Merge pull request #4760 from swordqiu/automated-cherry-pick-of-#4757-upstream-release-3.0
Automated cherry pick of #4757: fix: brand of compute quota key should be fixed
2020-01-09 09:58:54 +08:00
yunion-ci-robot
01a466b989 Merge pull request #4710 from wanyaoqi/automated-cherry-pick-of-#4709-upstream-release-3.0
Automated cherry pick of #4709: host misc fix
2020-01-09 00:05:58 +08:00
yunion-ci-robot
4fd7e6fcf0 Merge pull request #4725 from yousong/automated-cherry-pick-of-#4724-upstream-release-3.0
Automated cherry pick of #4724: wires: lift name length, charset constraint
2020-01-08 23:44:59 +08:00
Qiu Jian
8a2841f672 fix: brand of compute quota key should be fixed 2020-01-08 23:36:12 +08:00
yunion-ci-robot
0adccb5c8b Merge pull request #4751 from ioito/automated-cherry-pick-of-#4750-upstream-release-3.0
Automated cherry pick of #4750: fix: cloudevent 成功条件补充
2020-01-08 23:33:59 +08:00
Rain
a712df096a fix(esxi-agent): Adjust the VM Path in Datastore 2020-01-08 21:09:44 +08:00
Qu Xuan
ed75a7262b fix: cloudevent 成功条件补充 2020-01-08 20:44:13 +08:00
Zexi Li
adea5e3441 Merge pull request #4738 from swordqiu/automated-cherry-pick-of-#4735-upstream-release-3.0
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:40 +08:00
Yousong Zhou
64f29934f0 wires: lift name length, charset constraint 2020-01-08 19:15:17 +08:00
yunion-ci-robot
6cc5c4d942 Merge pull request #4729 from ioito/automated-cherry-pick-of-#4728-upstream-release-3.0
Automated cherry pick of #4728: fix: eip duplicate name
2020-01-08 19:05:57 +08:00
Qiu Jian
e817fb0920 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:53:36 +08:00
Qu Xuan
2c412db6c8 fix: eip duplicate name 2020-01-08 18:11:15 +08:00
yunion-ci-robot
d08761095c Merge pull request #4699 from rainzm/automated-cherry-pick-of-#4695-upstream-release-3.0
Automated cherry pick of #4695: fix(glance): Cancel pending usage of image quota correctly
2020-01-08 16:11:58 +08:00
yunion-ci-robot
03cf19f1db Merge pull request #4705 from tb365/automated-cherry-pick-of-#4701-upstream-release-3.0
Automated cherry pick of #4701: azure skus sync fix
2020-01-08 15:53:59 +08:00
Zexi Li
3c77aa38ff Merge pull request #4715 from wanyaoqi/automated-cherry-pick-of-#4714-upstream-release-3.0
Automated cherry pick of #4714: set subimage some field nullable
2020-01-08 15:42:48 +08:00
wanyaoqi
d3a2ebeacb set subimage some field nullable 2020-01-08 15:36:44 +08:00
yunion-ci-robot
d868952b0d Merge pull request #4706 from ioito/automated-cherry-pick-of-#4655-upstream-release-3.0
Automated cherry pick of #4655: optimized: 优化公有云日志查询
2020-01-08 14:56:57 +08:00
wanyaoqi
9ac505c907 host misc fix 2020-01-08 14:22:18 +08:00
yunion-ci-robot
05ee08e411 Merge pull request #4684 from yousong/automated-cherry-pick-of-#4683-upstream-release-3.0
Automated cherry pick of #4683: hostman: distro name OpenWrt instead of OpenWRT
2020-01-08 12:57:59 +08:00
Qu Xuan
ef39ed3d0c optimized: 优化公有云日志查询 2020-01-08 11:46:38 +08:00
yunion-ci-robot
85ac87b7c9 Merge pull request #4651 from ioito/automated-cherry-pick-of-#4650-upstream-release-3.0
Automated cherry pick of #4650: fix: 避免创建rds account, database后未设置exteranl_id
2020-01-08 11:42:56 +08:00
yunion-ci-robot
3b3480b29b Merge pull request #4637 from ioito/automated-cherry-pick-of-#4636-upstream-release-3.0
Automated cherry pick of #4636: fix: 加强密码校验
2020-01-08 11:38:58 +08:00
TangBin
6628f15ab0 huawei redis sync fix 2020-01-08 11:34:42 +08:00
TangBin
9f55497161 ctyun default gateway fix 2020-01-08 11:34:42 +08:00
TangBin
9e96e4f7e4 huawei network default gateway fix 2020-01-08 11:34:42 +08:00
TangBin
12c87f630a network create GuestIpPrefix fix 2020-01-08 11:34:42 +08:00
TangBin
5d2fb3bf56 azure skus sync fix 2020-01-08 11:34:42 +08:00
Rain
af5b218377 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:33:32 +08:00
yunion-ci-robot
802197f161 Merge pull request #4642 from tb365/automated-cherry-pick-of-#4634-upstream-release-3.0
Automated cherry pick of #4634: huawei image delete bugfix
2020-01-08 11:26:59 +08:00
yunion-ci-robot
45f3ee7989 Merge pull request #4690 from ioito/automated-cherry-pick-of-#4685-upstream-release-3.0
Automated cherry pick of #4685: fix: next marker format
2020-01-08 10:09:57 +08:00
Zexi Li
d9a43ae92a Merge pull request #4682 from swordqiu/automated-cherry-pick-of-#4676-upstream-release-3.0
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:44 +08:00
Zexi Li
8ae4e5bcec Merge pull request #4675 from swordqiu/automated-cherry-pick-of-#4666-upstream-release-3.0
Automated cherry pick of #4666: fix: guess brand on guest create
2020-01-07 19:28:49 +08:00
yunion-ci-robot
67dd167835 Merge pull request #4665 from ioito/automated-cherry-pick-of-#4656-upstream-release-3.0
Automated cherry pick of #4656: fix: 避免拥有带宽包的腾讯云创建机器失败
2020-01-07 18:08:59 +08:00
Qu Xuan
2d1d8db96a fix: next marker format 2020-01-07 18:02:23 +08:00
Yousong Zhou
9e42b83406 hostman: openwrt: deploy public key for root 2020-01-07 18:00:34 +08:00
Yousong Zhou
1a16fbd9cf hostman: split DeployAuthorizedKeys() 2020-01-07 18:00:34 +08:00
Yousong Zhou
77d19d2ec3 hostman: openwrt: support deploy networking scripts 2020-01-07 18:00:34 +08:00
Yousong Zhou
5391943537 hostman: openwrt: deploy hostname with board config 2020-01-07 18:00:34 +08:00
Yousong Zhou
5c1044a1f6 hostman: distro name OpenWrt instead of OpenWRT 2020-01-07 18:00:34 +08:00
yunion-ci-robot
6e87e25b38 Merge pull request #4659 from ioito/automated-cherry-pick-of-#4658-upstream-release-3.0
Automated cherry pick of #4658: fix: 避免同步安全组失败后,没有任何日志记录
2020-01-07 17:09:57 +08:00
Qiu Jian
95565e4b6d fix: guest network default share scope should be system if non-default-domain-projects is off 2020-01-07 16:58:36 +08:00
Qiu Jian
6c0bdeac49 fix: guess brand on guest create 2020-01-07 15:13:40 +08:00
Qu Xuan
5100ced74c fix: 避免拥有带宽包的腾讯云创建机器失败 2020-01-07 14:59:11 +08:00
Qu Xuan
f022f4138e fix: 避免同步安全组失败后,没有任何日志记录 2020-01-07 11:48:43 +08:00
yunion-ci-robot
6ecf644277 Merge pull request #4639 from rainzm/automated-cherry-pick-of-#4635-upstream-release-3.0
Automated cherry pick of #4635: fix: Workmanager delayTaskWithoutReqctx
2020-01-07 09:33:56 +08:00
Rain
ee34fbdafe fix: Workmanager delayTaskWithoutReqctx
The context of delayTaskWithoutReqctx should have 'taskid' value.
2020-01-06 15:21:04 +08:00
yunion-ci-robot
61ff4ddbc8 Merge pull request #4649 from swordqiu/automated-cherry-pick-of-#4645-upstream-release-3.0
Automated cherry pick of #4645: fix: comment out TestDialTimeout
2020-01-06 15:12:59 +08:00
Qu Xuan
ec7bc017dd fix: 避免创建rds account, database后未设置exteranl_id 2020-01-06 13:38:09 +08:00
Qiu Jian
a96d17efcc fix: comment out TestDialTimeout 2020-01-06 13:12:04 +08:00
TangBin
ac1d08d619 huawei image delete bugfix 2020-01-06 11:52:49 +08:00
Qu Xuan
d032dccd91 fix: 加强密码校验 2020-01-06 11:45:03 +08:00
yunion-ci-robot
987495c463 Merge pull request #4633 from wanyaoqi/automated-cherry-pick-of-#4632-upstream-release-3.0
Automated cherry pick of #4632: host image support container deploy:
2020-01-05 19:10:39 +08:00
wanyaoqi
dc2fd237f0 host image support container deploy: 2020-01-05 18:52:11 +08:00
Zexi Li
03cca94b0c Merge pull request #4630 from swordqiu/automated-cherry-pick-of-#4627-upstream-release-3.0
Automated cherry pick of #4627: fix: increase default sync worker count from 2 to 5
2020-01-05 12:22:58 +08:00
Qiu Jian
3365161fa5 fix: increase default sync worker count from 2 to 5 2020-01-05 12:21:27 +08:00
Zexi Li
e810d4567e Merge pull request #4625 from swordqiu/automated-cherry-pick-of-#4601-upstream-release-3.0
Automated cherry pick of #4601: fix: remove bw/ebw quota limit
2020-01-04 23:59:38 +08:00
Qiu Jian
954341e4ab remove bw/ebw quota from scheduler 2020-01-04 23:35:42 +08:00
Qiu Jian
becfe078d5 fix: remove bw/ebw quota limit 2020-01-04 23:35:42 +08:00
Zexi Li
8915b934b1 Merge pull request #4622 from zexi/automated-cherry-pick-of-#4621-upstream-release-3.0
Automated cherry pick of #4621: fix: fmt error
2020-01-04 23:21:01 +08:00
Zexi Li
b67da6996f Merge pull request #4620 from swordqiu/automated-cherry-pick-of-#4616-upstream-release-3.0
Automated cherry pick of #4616: fix: huawei uncache image fail
2020-01-04 23:20:19 +08:00
Zexi Li
ce40f6378f Merge pull request #4610 from ioito/automated-cherry-pick-of-#4609-upstream-release-3.0
Automated cherry pick of #4609: fix: 避免仅删除value时,行为演变为删除标签
2020-01-04 23:17:56 +08:00
Zexi Li
2c2b1544c6 fix: fmt error 2020-01-04 23:12:39 +08:00
Qiu Jian
44114e8d94 fix: huawei uncache image fail 2020-01-04 23:03:53 +08:00
Zexi Li
b9405e72e7 Merge pull request #4608 from rainzm/automated-cherry-pick-of-#4602-upstream-release-3.0
Automated cherry pick of #4602: fix(notify): Fix the error of filter about contacts
2020-01-04 22:29:57 +08:00
Rain
3a5b32fc60 fix(notify): Fix the error of filter about contacts 2020-01-04 22:26:43 +08:00
Qu Xuan
9bbba1a3cc fix: 避免仅删除value时,行为演变为删除标签 2020-01-04 22:16:07 +08:00
Zexi Li
25277900d4 Merge pull request #4600 from rainzm/automated-cherry-pick-of-#4597-upstream-release-3.0
Automated cherry pick of #4597: fix(region): Add reset_password in guest template's ConfigInfo
2020-01-04 22:03:25 +08:00
Rain
4cdf779700 fix(region): Cancel the check about project when creating service catlog 2020-01-04 21:40:16 +08:00
Rain
dc09cb88c4 fix(region): Add reset_password in guest template's ConfigInfo 2020-01-04 21:40:16 +08:00
Zexi Li
155ef44d8f Merge pull request #4595 from rainzm/automated-cherry-pick-of-#4592-upstream-release-3.0
Automated cherry pick of #4592: fix(region): Fix that 'Can_delete' disappears due to parameter structuring
2020-01-04 21:10:02 +08:00
Zexi Li
e08b7ff91d Merge pull request #4591 from rainzm/automated-cherry-pick-of-#4588-upstream-release-3.0
Automated cherry pick of #4588: fix(region): Set normal's snapshotpolicy's status as ready
2020-01-04 21:09:41 +08:00
yunion-ci-robot
fa544dbdc7 Merge pull request #4596 from rainzm/automated-cherry-pick-of-#4419-upstream-release-3.0
Automated cherry pick of #4419: feature(esxi-agent): Esxi Agent Golang
2020-01-04 21:08:41 +08:00
Rain
67f0dc3f8b feature(esxi-agent): Esxi Agent Golang
1. 修改了host-deployer 使其支持 vmware vddk 的 deploy guest fs 操作。
2. esxi agent python ==> Go

fix(esxi-agent): Fix some bugs and irregular contents

fix(esxi-agent): Partial parameter structure

fix(esxi-agent): Add ovf template and remove some binary file

fix(esxi-agent): Format Code

fix(esxi-agent): fix based on reviewers' comments

fix(esxi-agent): fix host-deployer because of occasional unknown panic

fix: DelayTask should have a new Context

fix(esxi-agent): call hostutils.DelayTask

change '_interface' package to 'iagent' package

fix(esxi-agent): Fix some irregular code
2020-01-04 21:04:29 +08:00
Rain
d333e30d52 fix(region): Fix that 'Can_delete' disappears due to parameter structuring 2020-01-04 21:03:56 +08:00
Rain
94068ce53e feature(region): Add bind/unbind-snapshotpolicy api for disk 2020-01-04 21:00:33 +08:00
Rain
7a0b6fd2ee fix(region): Set normal's snapshotpolicy's status as ready 2020-01-04 21:00:33 +08:00
屈轩
c0115d5a9c fix: 子网删除忽略弹性网卡 (#4575) 2020-01-04 20:52:54 +08:00
Jian Qiu
50ea8fc5a8 Automated cherry pick of #4527: fix: httpclient timeout value cleanup, use notimeout client for oss (#4531)
* 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
2020-01-04 20:52:25 +08:00
yunion-ci-robot
fec4cb1804 Merge pull request #4570 from bistuzx/automated-cherry-pick-of-#4557-upstream-release-3.0
Automated cherry pick of #4557: add cloud account create&update options
2020-01-04 20:28:43 +08:00
yunion-ci-robot
49b3bf2dce Merge pull request #4582 from ioito/automated-cherry-pick-of-#4581-upstream-release-3.0
Automated cherry pick of #4581: fix: 修复zstack安全组创建失败问题
2020-01-04 20:12:39 +08:00
yunion-ci-robot
b89a445451 Merge pull request #4559 from ioito/automated-cherry-pick-of-#4558-upstream-release-3.0
Automated cherry pick of #4558: fix: openstack eip dissociate optimized
2020-01-04 20:02:36 +08:00
Qu Xuan
d3a0e345d9 fix: 修复zstack安全组创建失败问题 2020-01-04 20:01:21 +08:00
Zexi Li
0542deef75 Merge pull request #4568 from swordqiu/automated-cherry-pick-of-#4564-upstream-release-3.0
Automated cherry pick of #4564: fix: minio fail to set object metadata
2020-01-04 19:52:52 +08:00
Zexi Li
0db77fc304 Merge pull request #4552 from swordqiu/automated-cherry-pick-of-#4549-upstream-release-3.0
Automated cherry pick of #4549: fix: domain quota-list include domain's own quota
2020-01-04 19:46:26 +08:00
Zexi Li
c6a8eae499 Merge pull request #4580 from zexi/automated-cherry-pick-of-#4579-upstream-release-3.0
Automated cherry pick of #4579: dockerfile: component use base image
2020-01-04 19:28:01 +08:00
Zexi Li
62f0a84a83 dockerfile: component use base image 2020-01-04 19:28:35 +08:00
张旭
aa6e9a8107 add cloud account create&update options 2020-01-04 19:19:06 +08:00
yunion-ci-robot
8528410bf8 Merge pull request #4554 from tb365/automated-cherry-pick-of-#4553-upstream-release-3.0
Automated cherry pick of #4553: elastic account add random password
2020-01-04 19:05:36 +08:00
Qu Xuan
d2f33742a0 fix: openstack eip dissociate optimized 2020-01-04 18:43:30 +08:00
Qiu Jian
b4b1494e1c fix: minio fail to set object metadata 2020-01-04 18:37:42 +08:00
TangBin
bb8c9d1b47 get eip bugfix 2020-01-04 18:23:22 +08:00
TangBin
ab1d2c0c24 get eip bugfix 2020-01-04 18:23:22 +08:00
TangBin
ef1b8f5245 host batch register bugfix 2020-01-04 18:23:22 +08:00
TangBin
8d1f755b4e elastic cache account add login info api 2020-01-04 18:23:22 +08:00
TangBin
ad32d9063a elastic account add random password 2020-01-04 18:23:22 +08:00
yunion-ci-robot
7ca467e35b Merge pull request #4538 from wanyaoqi/automated-cherry-pick-of-#4535-upstream-release-3.0
Automated cherry pick of #4535: fix disk filter by guest
2020-01-04 18:20:36 +08:00
Qiu Jian
8270238116 fix: domain quota-list include domain's own quota 2020-01-04 17:18:50 +08:00
Zexi Li
ac4f897510 Merge pull request #4544 from swordqiu/automated-cherry-pick-of-#4539-upstream-release-3.0
Automated cherry pick of #4539: fix: add cloudprovider capabilities
2020-01-04 17:03:35 +08:00
wanyaoqi
0eef43bb0a add recover on guest suddenly shotdown 2020-01-04 16:51:59 +08:00
Qiu Jian
5096ee9de3 minor fixes 2020-01-04 16:21:41 +08:00
Qiu Jian
34e0d8dd27 minor fixes 2020-01-04 16:21:41 +08:00
Qiu Jian
975154b98a minor fixes 2020-01-04 16:21:41 +08:00
Qiu Jian
1b23d6c755 add cloudevent capabilities 2020-01-04 16:21:41 +08:00
Qiu Jian
cdbc49a1a8 fix: add cloudprovider capabilities 2020-01-04 16:21:41 +08:00
wanyaoqi
86df323603 fix disk filter by guest 2020-01-04 15:19:16 +08:00
Zexi Li
422dcf8020 Merge pull request #4534 from zexi/automated-cherry-pick-of-#4533-upstream-release-3.0
Automated cherry pick of #4533: devtool: use public influxdb endpoint
2020-01-04 14:50:40 +08:00
Zexi Li
a47bdf3566 devtool: use public influxdb endpoint 2020-01-04 14:37:00 +08:00
yunion-ci-robot
275832f438 Merge pull request #4512 from tb365/automated-cherry-pick-of-#4509-upstream-release-3.0
Automated cherry pick of #4509: account create bugfix
2020-01-04 12:55:36 +08:00
TangBin
dbbe173e51 InitPendingUsagesInContext fix 2020-01-04 12:42:09 +08:00
TangBin
f0276d1a01 account&provider health status check 2020-01-04 12:42:09 +08:00
TangBin
0cfb8dbd5a elastic skus add region_ext_id & zone_ext_id 2020-01-04 12:42:09 +08:00
TangBin
ad0ddf6dd9 disk delete condition validator 2020-01-04 12:42:09 +08:00
TangBin
3b1c4dc2e5 huawei oss client read http ProxyFromEnvironment 2020-01-04 12:42:09 +08:00
TangBin
4d907584e2 network operations add action log 2020-01-04 12:42:09 +08:00
TangBin
2b9a995b13 account create bugfix 2020-01-04 12:42:09 +08:00
Zexi Li
6dc2ccee60 Merge pull request #4521 from zexi/automated-cherry-pick-of-#4520-upstream-release-3.0
Automated cherry pick of #4520: baremetal: fix megaraid check jbod always disabled
2020-01-03 21:51:22 +08:00
yunion-ci-robot
2bd77ec202 Merge pull request #4514 from ioito/automated-cherry-pick-of-#4513-upstream-release-3.0
Automated cherry pick of #4513: fix: 腾讯云不支持描述字段参数
2020-01-03 21:28:39 +08:00
Zexi Li
30fab89baa baremetal: fix megaraid check jbod always disabled 2020-01-03 21:21:33 +08:00
Qu Xuan
8d47608e4e fix: 腾讯云不支持描述字段参数 2020-01-03 20:41:28 +08:00
Zexi Li
eeeb81bf3f Merge pull request #4502 from swordqiu/automated-cherry-pick-of-#4498-upstream-release-3.0
Automated cherry pick of #4498: fix: allow delete cloudaccount with auto-sync enabled
2020-01-03 19:06:20 +08:00
yunion-ci-robot
78d68a023b Merge pull request #4505 from rainzm/automated-cherry-pick-of-#4497-upstream-release-3.0
Automated cherry pick of #4497: fix(huawei): Add 'X-Project-ID' header for huawei nat reuqest
2020-01-03 19:03:36 +08:00
yunion-ci-robot
6534a7c6a5 Merge pull request #4493 from ioito/automated-cherry-pick-of-#4492-upstream-release-3.0
Automated cherry pick of #4492: fix: 修复provider为空的套餐
2020-01-03 18:38:36 +08:00
Rain
9d60403817 fix(huawei): Add 'X-Project-ID' header for huawei nat reuqest 2020-01-03 17:23:52 +08:00
Qiu Jian
6ba7cbbb37 fix: allow delete cloudaccount with auto-sync enabled 2020-01-03 17:17:24 +08:00
Zexi Li
047bf47534 Merge pull request #4491 from swordqiu/automated-cherry-pick-of-#4488-upstream-release-3.0
Automated cherry pick of #4488: scheduler schedule according to quota limit
2020-01-03 17:13:42 +08:00
Qiu Jian
243590995f fix: OutOfQuota error code 500 2020-01-03 16:02:44 +08:00
Qiu Jian
53a9c010cb automatically save pendingUsage in context 2020-01-03 16:02:44 +08:00
Qiu Jian
9a6d9df76d remove obsolete codes 2020-01-03 16:02:44 +08:00
Qiu Jian
8870fe2d1f bug fixes 2020-01-03 16:02:43 +08:00
Qiu Jian
d2d8a7eeaa move lb from zonequota to regionquota 2020-01-03 16:02:43 +08:00
Qiu Jian
56be0bb3c5 scheduler schedule according to quota limit 2020-01-03 16:02:43 +08:00
Qu Xuan
d9956a9445 fix: 修复provider为空的套餐 2020-01-03 15:54:18 +08:00
Zexi Li
0702803b52 Merge pull request #4487 from rainzm/automated-cherry-pick-of-#4483-upstream-release-3.0
Automated cherry pick of #4483: fix(notify): Always update websocket config
2020-01-03 11:22:47 +08:00
Zexi Li
f12c77ca4c Merge pull request #4479 from swordqiu/automated-cherry-pick-of-#4478-upstream-release-3.0
Automated cherry pick of #4478: fix: bucket list object may skip first matched object
2020-01-03 11:01:21 +08:00
Rain
e0e72f4dc2 fix(notify): Always update websocket config 2020-01-02 19:15:23 +08:00
Qiu Jian
1cd4472073 fix: sort objects and directories 2020-01-02 17:47:07 +08:00
Qiu Jian
71c877428e fix: bucket list object may skip first matched object 2020-01-02 17:47:07 +08:00
rainzm
20a2dc5bf3 fix(region): Add support for suspend when syncing status of guest (#4477) 2020-01-02 16:34:22 +08:00
Zexi Li
e00f4a1f7d Merge pull request #4473 from zexi/automated-cherry-pick-of-#4411-upstream-release-3.0
Automated cherry pick of #4411: host misc fix
2020-01-02 12:32:16 +08:00
wanyaoqi
72c489140d host misc fix
- host check not require ntpd
- create host record use generate name
2020-01-02 12:32:32 +08:00
838 changed files with 63943 additions and 6522 deletions

View File

@@ -39,6 +39,7 @@ jobs:
make cmd/baremetal-agent && ./scripts/bundle_libraries.sh _output/bin/bundles/baremetal-agent _output/bin/baremetal-agent
make cmd/cloudevent cmd/devtool
make cmd/*cli
make cmd/esxi-agent
- name: Image baremetal-agent
uses: elgohr/Publish-Docker-Github-Action@master
@@ -50,6 +51,16 @@ jobs:
snapshot: true
dockerfile: build/docker/Dockerfile.baremetal-agent
- name: Image esxi-agent
uses: elgohr/Publish-Docker-Github-Action@master
with:
name: registry.cn-beijing.aliyuncs.com/yunionio/esxi-agent
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
registry: registry.cn-beijing.aliyuncs.com
snapshot: true
dockerfile: build/docker/Dockerfile.esxi-agent
- name: Image climc
uses: elgohr/Publish-Docker-Github-Action@master
with:
@@ -180,7 +191,7 @@ jobs:
snapshot: true
dockerfile: build/docker/Dockerfile.host-deployer
- name: Image cloudevent
- name: Image cloudevent
uses: elgohr/Publish-Docker-Github-Action@master
with:
name: registry.cn-beijing.aliyuncs.com/yunionio/cloudevent

View File

@@ -83,6 +83,9 @@ test:
vet:
go vet ./...
cmd/esxi-agent: prepare_dir
CGO_ENABLED=0 $(GO_BUILD) -o $(BIN_DIR)/$(shell basename $@) $(REPO_PREFIX)/$@
cmd/%: prepare_dir
$(GO_BUILD) -o $(BIN_DIR)/$(shell basename $@) $(REPO_PREFIX)/$@

View File

@@ -0,0 +1,42 @@
#!/bin/bash
set -e
pushd $(dirname $BASH_SOURCE) > /dev/null
CUR_DIR=$(pwd -P)
popd > /dev/null
ACCOUNT=$1
if [ -z "$ACCOUNT" ]; then
echo "Usage: $0 <cloud-acount-id-or-name>"
exit 1
fi
ACCOUNT_ID=$(climc cloud-account-show $ACCOUNT | grep -w " id " | awk '{print $4}')
ACCOUNT_NAME=$(climc cloud-account-show $ACCOUNT | grep -w " name " | awk '{print $4}')
if [ -z "$ACCOUNT_ID" ]; then
echo "Cloud account $ACCOUNT not found"
exit 1
fi
echo "Ready to clean cloud account $ACCOUNT_NAME($ACCOUNT_ID)..."
echo "1. Disable cloud account $ACCOUNT_NAME($ACCOUNT_ID) ..."
climc cloud-account-disable $ACCOUNT_ID
echo "2. Clean all providers ..."
for provider_id in $(climc cloud-provider-list --account $ACCOUNT_ID --limit 0 | egrep '[0-9a-f]{8}-([0-9a-f]{4}-){3}[0-9a-f]{12}' | awk '{print $2}')
do
echo "### to clean cloud provider $provider_id ..."
$CUR_DIR/clean_provider.sh $provider_id
done
echo "3. Delete cloud account ..."
climc cloud-account-delete $ACCOUNT_ID

View File

@@ -0,0 +1,27 @@
#/bin/bash
set -e
EIP=$1
if [ -z "$EIP" ]; then
echo "Usage: $0 <eip_id_or_name>"
exit 1
fi
EIP_NAME=$(climc eip-show $EIP | grep -w " name " | awk '{print $4}')
EIP_ID=$(climc eip-show $EIP | grep -w " id " | awk '{print $4}')
if [ -z "$EIP_ID" ]; then
echo "Cannot find eip $EIP_ID"
exit 1
fi
echo "To clean eip $EIP_NAME($EIP_ID)..."
clean_eip() {
local EID=$1
climc eip-purge $EID
}
clean_eip $EIP_ID

View File

@@ -0,0 +1,80 @@
#!/bin/bash
set -e
HOST=$1
if [ -z "$HOST" ]; then
echo "Usage: $0 <host_id_or_name>"
exit 1
fi
error_exit() {
echo "Error: $1"
exit 1
}
HOSTID=$(climc host-show $HOST | grep -w " id " | awk '{print $4}')
HOSTNAME=$(climc host-show $HOST | grep -w " name " | awk '{print $4}')
if [ -z "$HOSTNAME" ]; then
error_exit "Cannot find host $HOST"
fi
if [ -z "$HOSTID" ]; then
error_exit "Cannot find host $HOST"
fi
echo "Ready to purge host $HOSTNAME($HOSTID)..."
echo "1. Disable $HOSTNAME($HOSTID)"
if ! climc host-disable $HOSTID > /dev/null; then
error_exit "Fail to disable $HOST"
fi
echo "2. Clean servers on $HOSTNAME($HOSTID)"
for i in $(climc server-list --host $HOSTID --admin --limit 2048 --system | egrep '[0-9a-f]{8}-([0-9a-f]{4}-){3}[0-9a-f]{12}' | awk '{print $2}')
do
climc server-update --delete enable $i > /dev/null
climc server-purge $i > /dev/null
done
for i in $(climc server-list --host $HOSTID --admin --limit 2048 --pending-delete --system | egrep '[0-9a-f]{8}-([0-9a-f]{4}-){3}[0-9a-f]{12}' | awk '{print $2}')
do
climc server-purge $i > /dev/null
done
echo "3. Clean disks on $HOSTNAME($HOSTID)"
for storageid in $(climc host-storage-list --host $HOSTID --show-emulated | egrep '[0-9a-f]{8}-([0-9a-f]{4}-){3}[0-9a-f]{12}' | awk '{print $4}')
do
STORAGENAME=$(climc storage-show $storageid | grep -w " name " | awk '{print $4}')
STORAGE_TYPE=$(climc storage-show $storageid | grep -w " storage_type " | awk '{print $4}')
if [ "$STORAGE_TYPE" == "local" ]; then
for diskid in $(climc disk-list --admin --system --details --search $storageid --limit 2048 | egrep '[0-9a-f]{8}-([0-9a-f]{4}-){3}[0-9a-f]{12}' | awk '{print $2}')
do
climc disk-purge $diskid > /dev/null
done
for diskid in $(climc disk-list --admin --system --details --search $storageid --pending-delete --limit 2048 | egrep '[0-9a-f]{8}-([0-9a-f]{4}-){3}[0-9a-f]{12}' | awk '{print $2}')
do
climc disk-purge $diskid > /dev/null
done
fi
done
echo "4. Remove host $HOSTNAME($HOSTID)"
BAREMETAL=$(climc host-show $HOSTID | grep -w " is_baremetal " | awk '{print $4}')
HOSTTYPE=$(climc host-show $HOSTID | grep -w " host_type " | awk '{print $4}')
if [ "$BAREMETAL" == "true" ] && [ "$HOSTTYPE" != "baremetal" ]; then
climc host-update --host-type baremetal $HOSTID > /dev/null
fi
climc host-delete $HOSTID > /dev/null
echo "DONE."

View File

@@ -0,0 +1,27 @@
#!/bin/bash
set -e
LB=$1
if [ -z "$LB" ]; then
echo "Usage: $0 <loadbalancer_id_or_name>"
exit 1
fi
LB_ID=$(climc lb-show $LB | grep -w " id " | awk '{print $4}')
LB_NAME=$(climc lb-show $LB | grep -w " name " | awk '{print $4}')
if [ -z "$LB_ID" ]; then
echo "Loadbalancer $LB not found"
exit 1
fi
echo "Ready to remove loadbalancer $LB_NAME($LB_ID) ..."
clean_loadbalancer() {
local LID=$1
climc lb-purge $LID
}
clean_loadbalancer $LB_ID

View File

@@ -0,0 +1,27 @@
#!/bin/bash
set -e
LB_ACL=$1
if [ -z "$LB_ACL" ]; then
echo "Usage: $0 <loadbalancer_id_or_name>"
exit 1
fi
LB_ACL_ID=$(climc lbacl-show $LB_ACL | grep -w " id " | awk '{print $4}')
LB_ACL_NAME=$(climc lbacl-show $LB_ACL | grep -w " name " | awk '{print $4}')
if [ -z "$LB_ACL_ID" ]; then
echo "Loadbalancer ACL $LB_ACL_ID not found"
exit 1
fi
echo "Ready to remove loadbalancer acl $LB_ACL_NAME($LB_ACL_ID) ..."
clean_loadbalancer_acl() {
local LID=$1
climc lbacl-purge $LID
}
clean_loadbalancer_acl $LB_ACL_ID

View File

@@ -0,0 +1,27 @@
#!/bin/bash
set -e
LB_CERT=$1
if [ -z "$LB_CERT" ]; then
echo "Usage: $0 <loadbalancer_id_or_name>"
exit 1
fi
LB_CERT_ID=$(climc lbcert-show $LB_CERT | grep -w " id " | awk '{print $4}')
LB_CERT_NAME=$(climc lbcert-show $LB_CERT | grep -w " name " | awk '{print $4}')
if [ -z "$LB_CERT_ID" ]; then
echo "Loadbalancer certificate $LB_CERT_ID not found"
exit 1
fi
echo "Ready to remove loadbalancer certificate $LB_CERT_NAME($LB_CERT_ID) ..."
clean_loadbalancer_cert() {
local LID=$1
climc lbcert-purge $LID
}
clean_loadbalancer_cert $LB_CERT_ID

View File

@@ -0,0 +1,96 @@
#!/bin/bash
set -e
pushd $(dirname $BASH_SOURCE) > /dev/null
CUR_DIR=$(pwd -P)
popd > /dev/null
PROVIDER=$1
if [ -z "$PROVIDER" ]; then
echo "Usage: $0 <cloud-provider-id-or-name>"
exit 1
fi
PROVIDER_ID=$(climc cloud-provider-show $PROVIDER | grep -w " id " | awk '{print $4}')
PROVIDER_NAME=$(climc cloud-provider-show $PROVIDER | grep -w " name " | awk '{print $4}')
if [ -z "$PROVIDER_ID" ]; then
echo "Cloud provider $PROVIDER not found"
exit 1
fi
echo "Ready to clean cloud provider $PROVIDER_NAME($PROVIDER_ID)..."
echo "1. Disable cloud provider $PROVIDER_NAME($PROVIDER_ID) ..."
climc cloud-provider-disable $PROVIDER_ID
echo "2. Clean all hosts ..."
for hostid in $(climc host-list --manager $PROVIDER_ID --admin --show-emulated --limit 0 | egrep '[0-9a-f]{8}-([0-9a-f]{4}-){3}[0-9a-f]{12}' | awk '{print $2}')
do
$CUR_DIR/clean_host.sh $hostid
done
echo "3. Clean all loadbalancer ..."
for lbid in $(climc lb-list --manager $PROVIDER_ID --admin --show-emulated --limit 0 | egrep '[0-9a-f]{8}-([0-9a-f]{4}-){3}[0-9a-f]{12}' | awk '{print $2}')
do
$CUR_DIR/clean_loadbalancer.sh $lbid
done
echo "4. Clean all loadbalancer acl ..."
for lbaclid in $(climc lbacl-list --manager $PROVIDER_ID --admin --show-emulated --limit 0 | egrep '[0-9a-f]{8}-([0-9a-f]{4}-){3}[0-9a-f]{12}' | awk '{print $2}')
do
$CUR_DIR/clean_loadbalancer_acl.sh $lbaclid
done
echo "5. Clean all loadbalancer certificate ..."
for lbcertid in $(climc lbcert-list --manager $PROVIDER_ID --admin --show-emulated --limit 0 | egrep '[0-9a-f]{8}-([0-9a-f]{4}-){3}[0-9a-f]{12}' | awk '{print $2}')
do
$CUR_DIR/clean_loadbalancer_certificate.sh $lbcertid
done
echo "6. Clean all vpc ..."
for vpcid in $(climc vpc-list --manager $PROVIDER_ID --admin --show-emulated --limit 0 | egrep '[0-9a-f]{8}-([0-9a-f]{4}-){3}[0-9a-f]{12}' | awk '{print $2}')
do
$CUR_DIR/clean_vpc.sh $vpcid
done
echo "7. Clean all eips ..."
for eipid in $(climc eip-list --admin --manager $PROVIDER_ID --admin --show-emulated --limit 0 | egrep '[0-9a-f]{8}-([0-9a-f]{4}-){3}[0-9a-f]{12}' | awk '{print $2}')
do
$CUR_DIR/clean_eip.sh $eipid
done
echo "8. Clean all snapshots ..."
for snapid in $(climc snapshot-list --admin --manager $PROVIDER_ID --admin --show-emulated --limit 0 | egrep '[0-9a-f]{8}-([0-9a-f]{4}-){3}[0-9a-f]{12}' | awk '{print $2}')
do
echo "to clean snapshot $snapid ..."
$CUR_DIR/clean_snapshot.sh $snapid
done
echo "9. Clean all storagecache ..."
for cacheid in $(climc storage-cache-list --manager $PROVIDER_ID --admin --show-emulated --limit 0 | egrep '[0-9a-f]{8}-([0-9a-f]{4}-){3}[0-9a-f]{12}' | awk '{print $2}')
do
$CUR_DIR/clean_storagecache.sh $cacheid
done
echo "10. Clean all storages ..."
for storeid in $(climc storage-list --manager $PROVIDER_ID --admin --show-emulated --limit 0 | egrep '[0-9a-f]{8}-([0-9a-f]{4}-){3}[0-9a-f]{12}' | awk '{print $2}')
do
$CUR_DIR/clean_storage.sh $storeid
done
echo "Delete cloud provider ..."
climc cloud-provider-delete $PROVIDER_ID

View File

@@ -0,0 +1,27 @@
#/bin/bash
set -e
SNAPSHOT=$1
if [ -z "$SNAPSHOT" ]; then
echo "Usage: $0 <snapshot_id_or_name>"
exit 1
fi
SNAPSHOT_NAME=$(climc snapshot-show $SNAPSHOT | grep -w " name " | awk '{print $4}')
SNAPSHOT_ID=$(climc snapshot-show $SNAPSHOT | grep -w " id " | awk '{print $4}')
if [ -z "$SNAPSHOT_ID" ]; then
echo "Cannot find snapshot $SNAPSHOT_ID"
exit 1
fi
echo "To clean snapshot $SNAPSHOT_NAME($SNAPSHOT_ID)..."
clean_snapshot() {
local SNAP_ID=$1
climc snapshot-purge $SNAP_ID > /dev/null
}
clean_snapshot $SNAPSHOT_ID

View File

@@ -0,0 +1,34 @@
#!/bin/bash
set -e
STORAGE=$1
if [ -z "$STORAGE" ]; then
echo "Usage: $0 <storage_id_or_name>"
exit 1
fi
STORAGE_ID=$(climc storage-show $STORAGE | grep -w " id " | awk '{print $4}')
STORAGE_NAME=$(climc storage-show $STORAGE | grep -w " name " | awk '{print $4}')
if [ -z "$STORAGE_ID" ]; then
echo "Storage $STORAGE not found"
exit 1
fi
echo "Clean disks on storage $STORAGE_NAME($STORAGE_ID) ..."
for disk_id in $(climc disk-list --admin --storage $STORAGE_ID --show-emulated --limit 2048 | egrep '[0-9a-f]{8}-([0-9a-f]{4}-){3}[0-9a-f]{12}' | awk '{print $2}')
do
climc disk-purge $disk_id > /dev/null
done
for disk_id in $(climc disk-list --admin --storage $STORAGE_ID --show-emulated --pending-delete --limit 2048 | egrep '[0-9a-f]{8}-([0-9a-f]{4}-){3}[0-9a-f]{12}' | awk '{print $2}')
do
climc disk-purge $disk_id > /dev/null
done
# CACHE_ID=$(climc storage-show $STORAGE_ID | grep -w " storagecache_id " | awk '{print $4}')
climc storage-delete $STORAGE_ID > /dev/null

View File

@@ -0,0 +1,28 @@
#!/bin/bash
set -e
CACHE=$1
if [ -z "$CACHE" ]; then
echo "Usage: $0 <storage_cache_id_or_name>"
exit 1
fi
CACHE_ID=$(climc storage-cache-show $CACHE | grep -w " id " | awk '{print $4}')
CACHE_NAME=$(climc storage-cache-show $CACHE | grep -w " name " | awk '{print $4}')
if [ -z "$CACHE_ID" ]; then
echo "Storage cache $CACHE not found"
exit 1
fi
echo "Ready to remove storagecache $CACHE_NAME($CACHE_ID) ..."
for imgid in $(climc storage-cached-image-list --storagecache $CACHE_ID --show-emulated --limit 0 | egrep '[0-9a-f]{8}-([0-9a-f]{4}-){3}[0-9a-f]{12}' | awk '{print $4}')
do
climc storagecache-uncache-image $CACHE_ID $imgid --force # > /dev/null
done
climc storage-cache-delete $CACHE_ID > /dev/null

View File

@@ -0,0 +1,55 @@
#/bin/bash
set -e
VPC=$1
if [ -z "$VPC" ]; then
echo "Usage: $0 <vpc_id_or_name>"
exit 1
fi
VPC_NAME=$(climc vpc-show $VPC | grep -w " name " | awk '{print $4}')
VPC_ID=$(climc vpc-show $VPC | grep -w " id " | awk '{print $4}')
if [ -z "$VPC_ID" ]; then
echo "Cannot find vpc $VPC"
exit 1
fi
echo "To clean vpc $VPC_NAME($VPC_ID)..."
clean_network() {
climc network-purge $1 > /dev/null
}
clean_wire() {
local WIRE_ID=$1
for net_id in $(climc network-list --admin --wire $WIRE_ID --show-emulated | egrep '[0-9a-f]{8}-([0-9a-f]{4}-){3}[0-9a-f]{12}' | awk '{print $2}')
do
clean_network $net_id
done
climc wire-delete $wire_id > /dev/null
}
clean_vpc() {
local VPC_ID=$1
climc vpc-purge $VPC_ID > /dev/null
}
echo "1. Clean wires ..."
for wire_id in $(climc wire-list --vpc $VPC_ID --show-emulated | egrep '[0-9a-f]{8}-([0-9a-f]{4}-){3}[0-9a-f]{12}' | awk '{print $2}')
do
clean_wire $wire_id
done
echo "2. Clean route tables ..."
for routetable_id in $(climc routetable-list --vpc $VPC_ID --show-emulated | egrep '[0-9a-f]{8}-([0-9a-f]{4}-){3}[0-9a-f]{12}' | awk '{print $2}')
do
climc routetable-purge $routetable_id >/dev/null
done
echo "3. clean vpc ..."
clean_vpc $VPC_ID

View File

@@ -1,15 +1,3 @@
FROM frolvlad/alpine-glibc:glibc-2.28
MAINTAINER "Zexi Li <lizexi@yunionyun.com>"
ENV TZ Asia/Shanghai
RUN mkdir -p /opt/yunion/bin
RUN apk update && \
apk add --no-cache tzdata ansible ca-certificates && \
rm -rf /var/cache/apk/*
RUN cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
FROM registry.cn-beijing.aliyuncs.com/yunionio/ansibleserver-base:latest
ADD ./_output/bin/ansibleserver /opt/yunion/bin/ansibleserver

View File

@@ -0,0 +1,13 @@
FROM frolvlad/alpine-glibc:glibc-2.28
MAINTAINER "Zexi Li <lizexi@yunionyun.com>"
ENV TZ Asia/Shanghai
RUN mkdir -p /opt/yunion/bin
RUN apk update && \
apk add --no-cache tzdata ansible ca-certificates && \
rm -rf /var/cache/apk/*
RUN cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime

View File

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

View File

@@ -1,4 +1,4 @@
FROM registry.cn-beijing.aliyuncs.com/yunionio/baremetal-base:latest
FROM registry.cn-beijing.aliyuncs.com/yunionio/baremetal-base:v0.0.1
MAINTAINER "Zexi Li <lizexi@yunionyun.com>"

View File

@@ -27,3 +27,8 @@ COPY ./opt/cloud/yunion/baremetal/libutil.c32 /opt/cloud/yunion/baremetal
COPY ./opt/cloud/yunion/baremetal/lpxelinux.0 /opt/cloud/yunion/baremetal
COPY ./opt/cloud/yunion/baremetal/menu.c32 /opt/cloud/yunion/baremetal
COPY ./opt/cloud/yunion/baremetal/pxelinux.0 /opt/cloud/yunion/baremetal
# add mkisofs with bundles libraries
ADD ./mkisofs /bin/mkisofs
ADD ./.mkisofs.bin /bin/.mkisofs.bin
ADD ./bundles/mkisofs /bin/bundles/mkisofs

View File

@@ -1,16 +1,5 @@
FROM frolvlad/alpine-glibc:glibc-2.28
FROM registry.cn-beijing.aliyuncs.com/yunionio/climc-base:v20200308
MAINTAINER "Zexi Li <lizexi@yunionyun.com>"
ENV TZ Asia/Shanghai
RUN apk add --no-cache bash bash-completion tzdata ca-certificates && \
rm -rf /var/cache/apk/*
RUN cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
ENV PATH="/opt/yunion/bin:${PATH}"
RUN mkdir -p /opt/yunion/bin
ADD ./build/climc/root/opt /opt
ADD ./_output/bin/climc ./_output/bin/*cli /opt/yunion/bin/

View File

@@ -0,0 +1,16 @@
FROM frolvlad/alpine-glibc:glibc-2.28
MAINTAINER "Zexi Li <lizexi@yunionyun.com>"
ENV TZ Asia/Shanghai
RUN mkdir -p /opt/yunion/bin
RUN apk add --no-cache bash bash-completion tzdata ca-certificates vim && \
rm -rf /var/cache/apk/*
RUN cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
ENV PATH="/opt/yunion/bin:${PATH}"
RUN mkdir -p /opt/yunion/bin

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@@ -1,14 +1,3 @@
FROM yunion/kubectl:1.14.3
MAINTAINER "Zexi Li <lizexi@yunionyun.com>"
ENV TZ Asia/Shanghai
RUN mkdir -p /opt/yunion/bin
RUN apk add --no-cache sshpass ipmitool openssh-client tzdata ca-certificates && \
rm -rf /var/cache/apk/*
RUN cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
FROM registry.cn-beijing.aliyuncs.com/yunionio/webconsole-base:latest
ADD ./_output/bin/webconsole /opt/yunion/bin/webconsole

View File

@@ -0,0 +1,12 @@
FROM yunion/kubectl:1.14.3
MAINTAINER "Zexi Li <lizexi@yunionyun.com>"
ENV TZ Asia/Shanghai
RUN mkdir -p /opt/yunion/bin
RUN apk add --no-cache sshpass ipmitool openssh-client tzdata ca-certificates && \
rm -rf /var/cache/apk/*
RUN cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime

View File

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

View File

@@ -0,0 +1,65 @@
<?xml version="1.0" encoding="UTF-8"?>
<Envelope xmlns="http://schemas.dmtf.org/ovf/envelope/1"
xmlns:ovf="http://schemas.dmtf.org/ovf/envelope/1"
xmlns:cim="http://schemas.dmtf.org/wbem/wscim/1/common"
xmlns:rasd="http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_ResourceAllocationSettingData"
xmlns:vmw="http://www.vmware.com/schema/ovf"
xmlns:vssd="http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_VirtualSystemSettingData"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<References>
<File ovf:href="{{ .Name }}" ovf:id="file1" ovf:size="{{ .Size }}"/>
</References>
<DiskSection>
<Info>Virtual disk information</Info>
<Disk ovf:capacity="{{ .Capacity }}" ovf:capacityAllocationUnits="byte" ovf:diskId="vmdisk1" ovf:fileRef="file1" ovf:format="http://www.vmware.com/interfaces/specifications/vmdk.html#streamOptimized" ovf:populatedSize="0"/>
</DiskSection>
<VirtualSystem ovf:id="{{ .ImportName }}">
<Info>A virtual machine</Info>
<Name>{{ .ImportName }}</Name>
<OperatingSystemSection ovf:id="100" vmw:osType="other26xLinux64Guest">
<Info>The kind of installed guest operating system</Info>
</OperatingSystemSection>
<VirtualHardwareSection>
<Info>Virtual hardware requirements</Info>
<System>
<vssd:ElementName>Virtual Hardware Family</vssd:ElementName>
<vssd:InstanceID>0</vssd:InstanceID>
<vssd:VirtualSystemIdentifier>{{ .ImportName }}</vssd:VirtualSystemIdentifier>
<vssd:VirtualSystemType>vmx-07</vssd:VirtualSystemType>
</System>
<Item>
<rasd:AllocationUnits>hertz * 10^6</rasd:AllocationUnits>
<rasd:Description>Number of Virtual CPUs</rasd:Description>
<rasd:ElementName>1 virtual CPU(s)</rasd:ElementName>
<rasd:InstanceID>1</rasd:InstanceID>
<rasd:ResourceType>3</rasd:ResourceType>
<rasd:VirtualQuantity>1</rasd:VirtualQuantity>
</Item>
<Item>
<rasd:AllocationUnits>byte * 2^20</rasd:AllocationUnits>
<rasd:Description>Memory Size</rasd:Description>
<rasd:ElementName>1024MB of memory</rasd:ElementName>
<rasd:InstanceID>2</rasd:InstanceID>
<rasd:ResourceType>4</rasd:ResourceType>
<rasd:VirtualQuantity>1024</rasd:VirtualQuantity>
</Item>
<Item>
<rasd:Address>0</rasd:Address>
<rasd:Description>SCSI Controller</rasd:Description>
<rasd:ElementName>SCSI Controller 0</rasd:ElementName>
<rasd:InstanceID>3</rasd:InstanceID>
<rasd:ResourceSubType>VirtualSCSI</rasd:ResourceSubType>
<rasd:ResourceType>6</rasd:ResourceType>
</Item>
<Item>
<rasd:AddressOnParent>0</rasd:AddressOnParent>
<rasd:ElementName>Hard Disk 1</rasd:ElementName>
<rasd:HostResource>ovf:/disk/vmdisk1</rasd:HostResource>
<rasd:InstanceID>9</rasd:InstanceID>
<rasd:Parent>3</rasd:Parent>
<rasd:ResourceType>17</rasd:ResourceType>
<vmw:Config ovf:required="false" vmw:key="backing.writeThrough" vmw:value="false"/>
</Item>
</VirtualHardwareSection>
</VirtualSystem>
</Envelope>

2
build/esxi-agent/vars Normal file
View File

@@ -0,0 +1,2 @@
DESCRIPTION="Esxi Agent"
# SERVICE="yes"

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

@@ -26,6 +26,28 @@ import (
"yunion.io/x/onecloud/pkg/mcclient/options"
)
func parseGcpCredential(filename string) (jsonutils.JSONObject, error) {
data, err := ioutil.ReadFile(filename)
if err != nil {
return nil, err
}
authParams, err := jsonutils.Parse(data)
if err != nil {
return nil, err
}
ret := jsonutils.NewDict()
for _, k := range []string{
"client_email",
"project_id",
"private_key_id",
"private_key",
} {
v, _ := authParams.Get(k)
ret.Add(v, fmt.Sprintf("gcp_%s", k))
}
return ret, nil
}
func init() {
type CloudaccountListOptions struct {
@@ -88,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
@@ -121,11 +156,7 @@ func init() {
R(&options.SGoogleCloudAccountCreateOptions{}, "cloud-account-create-google", "Create a Google cloud account", func(s *mcclient.ClientSession, args *options.SGoogleCloudAccountCreateOptions) error {
params := jsonutils.Marshal(args)
params.(*jsonutils.JSONDict).Add(jsonutils.NewString("Google"), "provider")
data, err := ioutil.ReadFile(args.GoogleJsonFile)
if err != nil {
return err
}
authParams, err := jsonutils.Parse(data)
authParams, err := parseGcpCredential(args.GoogleJsonFile)
if err != nil {
return err
}
@@ -147,6 +178,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")
}
@@ -280,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
@@ -337,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")
}
@@ -344,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")
}
@@ -727,4 +804,34 @@ func init() {
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

@@ -24,6 +24,9 @@ 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)

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.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"`

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

@@ -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"`
@@ -55,6 +55,8 @@ func init() {
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 {
@@ -76,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

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

@@ -29,7 +29,7 @@ func init() {
*/
type NotificationCreateOptions struct {
CONTACTTYPE string `help:"User's contacts type" choices:"email|mobile|dingtalk|webconsole"`
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"`
@@ -41,7 +41,7 @@ func init() {
NotificationCreateOptions
}
R(&NotificationCreateSingleOptions{}, "notify", "Send a notification to someones", func(s *mcclient.ClientSession,
R(&NotificationCreateSingleOptions{}, "notify", "Send a notification to someone", func(s *mcclient.ClientSession,
args *NotificationCreateSingleOptions) error {
msg := notify.SNotifyMessage{}

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

@@ -134,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"`
@@ -285,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], ":")
@@ -356,6 +374,7 @@ func init() {
Context: mcclient.SAuthContext{
Ip: args.Ip,
},
Token: "faketoken",
}
} else {
token = s.GetToken()
@@ -367,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,
@@ -375,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

@@ -24,7 +24,7 @@ import (
)
type ComputeQuotaKeys struct {
RegionQuotaKeys
ZoneQuotaKeys
Hypervisor string `help:"hypervisor" choices:"kvm|baremetal"`
}
@@ -53,8 +53,8 @@ type RegionQuotaOptions struct {
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"`
// 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"`
@@ -110,6 +110,7 @@ func init() {
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)
@@ -239,6 +240,8 @@ func init() {
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)

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

@@ -178,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 {
@@ -974,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
@@ -996,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

@@ -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"`

26
cmd/esxi-agent/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/esxi/service"
"yunion.io/x/onecloud/pkg/util/atexit"
)
func main() {
defer atexit.Handle()
service.New().StartService()
}

19
go.mod
View File

@@ -3,6 +3,7 @@ module yunion.io/x/onecloud
go 1.12
require (
cloud.google.com/go v0.38.0 // indirect
github.com/360EntSecGroup-Skylar/excelize v1.4.0
github.com/Azure/azure-sdk-for-go v36.1.0+incompatible
github.com/Azure/go-autorest v10.15.5+incompatible
@@ -109,16 +110,20 @@ require (
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/vishvananda/netlink v1.0.0
github.com/vishvananda/netns v0.0.0-20191106174202-0a2b9b5464df // indirect
github.com/vmihailenco/msgpack v4.0.4+incompatible
github.com/vmware/govmomi v0.19.0
go.etcd.io/etcd v0.5.0-alpha.5.0.20191023171146-3cf2f69b5738
go.uber.org/atomic v1.4.0 // indirect
golang.org/x/crypto v0.0.0-20191002192127-34f69633bfdc
golang.org/x/net v0.0.0-20191007182048-72f939374954
golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421
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/appengine v1.5.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
@@ -132,13 +137,13 @@ require (
k8s.io/client-go v9.0.0+incompatible
k8s.io/klog v0.1.0 // indirect
k8s.io/kubernetes v1.12.3
yunion.io/x/executor v0.0.0-20191202093616-92e2e6119257
yunion.io/x/jsonutils v0.0.0-20191220095028-7fef3b75f64d
yunion.io/x/log v0.0.0-20190629062853-9f6483a7103d
yunion.io/x/pkg v0.0.0-20191221094533-5097f12f41ac
yunion.io/x/executor v0.0.0-20200227030256-a18417815e74
yunion.io/x/jsonutils v0.0.0-20200415132054-2bf8a5e94501
yunion.io/x/log v0.0.0-20200313080802-57a4ce5966b3
yunion.io/x/pkg v0.0.0-20200516092703-0a53bc9270aa
yunion.io/x/s3cli v0.0.0-20190917004522-13ac36d8687e
yunion.io/x/sqlchemy v0.0.0-20191226074733-6eb73845bfb7
yunion.io/x/structarg v0.0.0-20190809075558-115bed041de3
yunion.io/x/sqlchemy v0.0.0-20200312002602-1177cd8fbc57
yunion.io/x/structarg v0.0.0-20200423163001-168d0687be7e
)
replace github.com/ceph/go-ceph v0.0.0-20181217221554-e32f9f0f2e94 => github.com/yunionio/go-ceph v0.0.0-20190912101231-6f05a06b3859

43
go.sum
View File

@@ -3,6 +3,8 @@ 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=
@@ -222,6 +224,7 @@ github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OI
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 h1:hU4mGcQI4DaAYW+IbTun+2qEZVFxK0ySjQLTbS0VQKc=
github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg=
github.com/googleapis/gnostic v0.2.0 h1:l6N3VoaVzTncYYW+9yOz2LJJammFZGBO13sqgEhpy9g=
github.com/googleapis/gnostic v0.2.0/go.mod h1:sJBsCZ4ayReDTBIg8b9dl28c5xFWyhBTVRp3pOg5EKY=
@@ -256,6 +259,7 @@ github.com/grpc-ecosystem/grpc-opentracing v0.0.0-20180507213350-8e809c8a8645 h1
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 h1:CL2msUPvZTLb5O648aiLNJw3hnBxN2+1Jq8rCOH9wdo=
github.com/hashicorp/golang-lru v0.5.0/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=
@@ -481,6 +485,10 @@ github.com/tredoe/osutil v0.0.0-20161130133508-7d3ee1afa71c/go.mod h1:M/I710pXKQ
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/vishvananda/netlink v1.0.0 h1:bqNY2lgheFIu1meHUFSH3d7vG93AFyqg3oGbJCOJgSM=
github.com/vishvananda/netlink v1.0.0/go.mod h1:+SR5DhBJrl6ZM7CoCKvpw5BKroDKQ+PJqOg65H/2ktk=
github.com/vishvananda/netns v0.0.0-20191106174202-0a2b9b5464df h1:OviZH7qLw/7ZovXvuNyL3XQl8UFofeikI1NW1Gypu7k=
github.com/vishvananda/netns v0.0.0-20191106174202-0a2b9b5464df/go.mod h1:JP3t17pCcGlemwknint6hfoeCVQrEMVwxRLRjXpq+BU=
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=
@@ -499,7 +507,10 @@ 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 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 h1:pMEjRZ1M4ebWGikflH7nQpV6+Zr88KBMA2XJD3sbijw=
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=
@@ -548,6 +559,8 @@ 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=
@@ -601,14 +614,21 @@ golang.zx2c4.com/wireguard v0.0.20190908 h1:SUoXDdwSMtomLdvke+zz83/u9tNvl4hHmcTI
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 h1:oJra/lMfmtm13/rgY/8i3MzjFWYXvQIAKjQ3HqofMk8=
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/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=
@@ -658,24 +678,27 @@ k8s.io/kubernetes v1.12.3 h1:5GPfYyyBylqcZUqL+ApYpYTm2IYjH56JUewYC0GbetU=
k8s.io/kubernetes v1.12.3/go.mod h1:ocZa8+6APFNC2tX1DZASIbocyYT5jHzqFVsY5aoB7Jk=
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/executor v0.0.0-20191202093616-92e2e6119257 h1:LZ6eC1uoLDAp7NQlaCy+DKnF31Mgd3LDKlIithziEmY=
yunion.io/x/executor v0.0.0-20191202093616-92e2e6119257/go.mod h1:Uxuou9WQIeJXNpy7t2fPLL0BYLvLiMvGQwY7Qc6aSws=
yunion.io/x/executor v0.0.0-20200227030256-a18417815e74 h1:A15C6VdVRWvmQ9pAJHrUs9yan5qKlYH7uaRxHg1kRbk=
yunion.io/x/executor v0.0.0-20200227030256-a18417815e74/go.mod h1:Uxuou9WQIeJXNpy7t2fPLL0BYLvLiMvGQwY7Qc6aSws=
yunion.io/x/jsonutils v0.0.0-20190625054549-a964e1e8a051 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-20191220095028-7fef3b75f64d h1:58hs2hyO2DgeVQ5i2fAKjg/ooPH0q4+ALEnqtxjn7DA=
yunion.io/x/jsonutils v0.0.0-20191220095028-7fef3b75f64d/go.mod h1:4N0/RVzsYL3kH3WE/H1BjUQdFiWu50JGCFQuuy+Z634=
yunion.io/x/jsonutils v0.0.0-20200415132054-2bf8a5e94501 h1:i1r9XvbdxH3FgTCLmTaRi3MzQqhiQimXJRlUOPgrxnU=
yunion.io/x/jsonutils v0.0.0-20200415132054-2bf8a5e94501/go.mod h1:T7kxQJR13+t7z0TuT+Wzd7MTxBOk2H9c0pO1ONQSv90=
yunion.io/x/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/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 h1:OsKC+2ghZHwp+Ztm/MwKlLKKRiE7QcPG8eTp0GmsHbg=
yunion.io/x/pkg v0.0.0-20190620104149-945c25821dbf/go.mod h1:t6rEGG2sQ4J7DhFxSZVOTjNd0YO/KlfWQyK1W4tog+E=
yunion.io/x/pkg v0.0.0-20190628082551-f4033ba2ea30/go.mod h1:t6rEGG2sQ4J7DhFxSZVOTjNd0YO/KlfWQyK1W4tog+E=
yunion.io/x/pkg v0.0.0-20191221094533-5097f12f41ac h1:upUF6LBhCKx9c/OUzSUwfv50oCtU4LLmO+UtnKEQsg8=
yunion.io/x/pkg v0.0.0-20191221094533-5097f12f41ac/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-20200516092703-0a53bc9270aa h1:VizPfW8+mLFEE7W/97zxQJbfdxchi2dn1M/Y7YBwTTc=
yunion.io/x/pkg v0.0.0-20200516092703-0a53bc9270aa/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-20191226074733-6eb73845bfb7 h1:nK047S9fIjIBkB9Yyo2e6itUA7TpmFsd7/a6mGKjNU0=
yunion.io/x/sqlchemy v0.0.0-20191226074733-6eb73845bfb7/go.mod h1:FTdwPdGhMgh4E+UFXc9klI1Ok34fMuybTT+jLhOaIjI=
yunion.io/x/structarg v0.0.0-20190809075558-115bed041de3 h1:bfC8EhXYvyGYldRWlzxiCM39Zfj3s3+zham9mW2h2LE=
yunion.io/x/structarg v0.0.0-20190809075558-115bed041de3/go.mod h1:EP6NSv2C0zzqBDTKumv8hPWLb3XvgMZDHQRfyuOrQng=
yunion.io/x/sqlchemy v0.0.0-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-20200423163001-168d0687be7e h1:pctCe/EPel3F1B83pJ2q9b34Umd1NdbLW1Yd+Lzur2s=
yunion.io/x/structarg v0.0.0-20200423163001-168d0687be7e/go.mod h1:EP6NSv2C0zzqBDTKumv8hPWLb3XvgMZDHQRfyuOrQng=

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"
@@ -360,7 +361,7 @@ func isUserAllowWebconsole(ctx context.Context, w http.ResponseWriter, req *http
return false
}
if !jsonutils.QueryBoolean(usr, "allow_web_console", true) {
httperrors.ForbiddenError(w, "forbidden user %q login from web", usr.String())
httperrors.ForbiddenError(w, "user forbidden login from web")
return false
}
return true
@@ -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

@@ -28,6 +28,7 @@ import (
"yunion.io/x/jsonutils"
"yunion.io/x/log"
"yunion.io/x/pkg/utils"
"yunion.io/x/onecloud/pkg/apigateway/options"
"yunion.io/x/onecloud/pkg/appctx"
@@ -37,6 +38,7 @@ import (
"yunion.io/x/onecloud/pkg/mcclient/auth"
"yunion.io/x/onecloud/pkg/mcclient/modulebase"
"yunion.io/x/onecloud/pkg/mcclient/modules"
"yunion.io/x/onecloud/pkg/util/httputils"
)
const (
@@ -171,19 +173,23 @@ func (mh *MiscHandler) DoBatchHostRegister(ctx context.Context, w http.ResponseW
}
paramKeys := []string{}
for _, title := range rows[0] {
i1 := -1
i2 := -1
for i, title := range rows[0] {
switch title {
case HOST_MAC:
paramKeys = append(paramKeys, "access_mac")
case HOST_NAME:
paramKeys = append(paramKeys, "name")
case HOST_IPMI_ADDR, HOST_IPMI_ADDR_OPTIONAL:
i1 = i
paramKeys = append(paramKeys, "ipmi_ip_addr")
case HOST_IPMI_USERNAME, HOST_IPMI_USERNAME_OPTIONAL:
paramKeys = append(paramKeys, "ipmi_username")
case HOST_IPMI_PASSWORD, HOST_IPMI_PASSWORD_OPTIONAL:
paramKeys = append(paramKeys, "ipmi_password")
case HOST_MNG_IP_ADDR, HOST_MNG_IP_ADDR_OPTIONAL:
i2 = i
paramKeys = append(paramKeys, "access_ip")
default:
e := httperrors.NewInternalServerError("empty file content")
@@ -199,8 +205,33 @@ func (mh *MiscHandler) DoBatchHostRegister(ctx context.Context, w http.ResponseW
return
}
ips := []string{}
hosts := bytes.Buffer{}
for _, row := range rows[1:] {
var e *httputils.JSONClientError
if i1 >= 0 && len(row[i1]) > 0 {
i1Ip := fmt.Sprintf("%d-%s", i1, row[i1])
if utils.IsInStringArray(i1Ip, ips) {
e = httperrors.NewDuplicateIdError("ip", row[i1])
} else {
ips = append(ips, i1Ip)
}
}
if i2 >= 0 && len(row[i2]) > 0 {
i2Ip := fmt.Sprintf("%d-%s", i2, row[i2])
if utils.IsInStringArray(i2Ip, ips) {
e = httperrors.NewDuplicateIdError("ip", row[i2])
} else {
ips = append(ips, i2Ip)
}
}
if e != nil {
httperrors.JsonClientError(w, e)
return
}
hosts.WriteString(strings.Join(row, ",") + "\n")
}
@@ -285,6 +316,12 @@ func (mh *MiscHandler) DoBatchUserRegister(ctx context.Context, w http.ResponseW
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)

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,21 +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)
return
}
v2, ok := retobj.Interface().([]modulebase.SubmitResult)
if ok {
w.WriteHeader(207)
appsrv.SendJSON(w, modulebase.SubmitResults2JSON(v2))
} else {
httperrors.BadGatewayError(w, "recv invalid data")
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,7 +29,7 @@ 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 (
@@ -40,9 +40,10 @@ func OnOptionsChange(oldO, newO interface{}) bool {
oldOpts := oldO.(*GatewayOptions)
newOpts := newO.(*GatewayOptions)
changed := false
if common_options.OnCommonOptionsChange(&oldOpts.CommonOptions, &newOpts.CommonOptions) {
return true
changed = true
}
return false
return changed
}

View File

@@ -15,15 +15,24 @@
package cloudevent
import (
"time"
"yunion.io/x/onecloud/pkg/apis"
)
type CloudeventListInput struct {
apis.BaseListInput
apis.SharableVirtualResourceListInput
Cloudprovider string `json:"cloudprovider"`
// 根据平台过滤
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

@@ -164,6 +164,8 @@ type ServerCreateInput struct {
UserData string `json:"user_data"`
Metadata map[string]string `json:"__meta__"`
// swagger:ignore
Keypair string `json:"keypair" deprecated-by:"keypair_id"`
KeypairId string `json:"keypair_id"`
Password string `json:"password"`
Cdrom string `json:"cdrom"`

View File

@@ -52,6 +52,7 @@ type BucketCreateInput struct {
type BucketDetail struct {
apis.Meta
SBucket
CloudproviderDetails
}
type BucketObjectsActionInput struct {

View File

@@ -27,6 +27,7 @@ type CloudaccountCreateInput struct {
apis.EnabledStatusStandaloneResourceCreateInput
Provider string
AccountId string
Brand string
IsPublicCloud bool
IsOnPremise bool

View File

@@ -36,6 +36,7 @@ const (
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" //太原
@@ -55,6 +56,7 @@ const (
CITY_NAN_JING = "Nanjing" //南京
CITY_FO_SHAN = "Foshan" //佛山
CITY_QUAN_ZHOU = "Quanzhou" //泉州
CITY_NEI_MENG_GU = "Neimenggu" //内蒙古
// 日本
CITY_TOKYO = "Tokyo" //东京
@@ -76,6 +78,11 @@ const (
//瑞士
CITY_ZURICH = "Zurich" //苏黎世
CITY_GENEVA = "Geneva" //日内瓦
// 挪威
CITY_STAVANGER = "Stavanger" //斯塔万格
CITY_OSLO = "Oslo" // 奥斯陆
// 马来西亚
CITY_KUALA_LUMPUR = "Kuala Lumpur" //吉隆坡
@@ -104,6 +111,8 @@ const (
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" //伦敦
@@ -114,7 +123,8 @@ const (
CITY_DUBAI = "Dubai" //迪拜
// 德国
CITY_FRANKFURT = "Frankfurt" //法兰克福
CITY_FRANKFURT = "Frankfurt" // 法兰克福
CITY_DELMENHORST = "Delmenhorst" // 代尔门霍斯特
// 韩国
CITY_SEOUL = "Seoul" //首尔
@@ -141,6 +151,12 @@ const (
// 巴西
CITY_SAO_PAULO = "Sao Paulo" //圣保罗
// 智利
CITY_SANTIAGO = "Santiago" // 圣地亚哥
// 墨西哥
CITY_MEXICO = "Mexico" // 墨西哥
// 荷兰
CITY_HOLLAND = "Holland" //荷兰
@@ -185,4 +201,7 @@ const (
COUNTRY_CODE_NG = "NG" //尼日利亚
COUNTRY_CODE_VN = "VN" //越南
COUNTRY_CODE_CH = "CH" //瑞士
COUNTRY_CODE_NO = "NO" //挪威
COUNTRY_CODE_MX = "MX" //墨西哥
COUNTRY_CODE_CL = "CL" //智利
)

View File

@@ -108,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

@@ -39,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

@@ -150,7 +150,13 @@ const (
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}
var HYPERVISORS = []string{

View File

@@ -65,6 +65,8 @@ type ServerListInput struct {
ResourceType string `json:"resource_type"`
// Billing type choices:"postpaid|prepaid"
BillingType string `json:"billing_type"`
// 根据宿主机 SN 过滤
HostSn string `json:"host_sn"`
}
type ServerRebuildRootInput struct {

View File

@@ -55,6 +55,7 @@ type GuesttemplateConfigInfo struct {
Secgroup string `json:"secgroup"`
IsolatedDeviceConfig []IsolatedDeviceConfig `json:"isolated_device_config"`
Image string `json:"image"`
ResetPassword bool `json:"reset_password"`
}
type GuesttemplateDisk struct {

View File

@@ -275,6 +275,38 @@ var LB_HEALTH_CHECK_HTTP_CODES = choices.NewChoices(
LB_HEALTH_CHECK_HTTP_CODE_5xx,
)
const (
LB_REDIRECT_OFF = "off"
LB_REDIRECT_RAW = "raw"
)
var LB_REDIRECT_TYPES = choices.NewChoices(
LB_REDIRECT_OFF,
LB_REDIRECT_RAW,
)
const (
LB_REDIRECT_CODE_301 = int64(301) // Moved Permanently
LB_REDIRECT_CODE_302 = int64(302) // Found
LB_REDIRECT_CODE_307 = int64(307) // Temporary Redirect
)
var LB_REDIRECT_CODES = []int64{
LB_REDIRECT_CODE_301,
LB_REDIRECT_CODE_302,
LB_REDIRECT_CODE_307,
}
const (
LB_REDIRECT_SCHEME_HTTP = "http"
LB_REDIRECT_SCHEME_HTTPS = "https"
)
var LB_REDIRECT_SCHEMES = choices.NewChoices(
LB_REDIRECT_SCHEME_HTTP,
LB_REDIRECT_SCHEME_HTTPS,
)
const (
LB_BOOL_ON = "on"
LB_BOOL_OFF = "off"

View File

@@ -59,6 +59,7 @@ var (
REGIONAL_NETWORK_PROVIDERS = []string{
CLOUD_PROVIDER_HUAWEI,
CLOUD_PROVIDER_CTYUN,
CLOUD_PROVIDER_UCLOUD,
CLOUD_PROVIDER_GOOGLE,
}

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网关。
)

File diff suppressed because it is too large Load Diff

View File

@@ -62,3 +62,7 @@ func (ra *SRoleAssignment) GetRoles() []string {
func (ra *SRoleAssignment) GetLoginIp() string {
return ""
}
func (ra *SRoleAssignment) GetTokenString() string {
return "faketoken"
}

View File

@@ -144,6 +144,10 @@ var (
"etcd_cacert",
"etcd_cert",
"etcd_key",
"bootstrap_admin_user_password",
"reset_admin_user_password",
"fernet_key_repository",
},
}
)

View File

@@ -34,7 +34,7 @@ type SAssignment struct {
type SConfigOption struct {
apis.SResourceBase
ResType string `json:"res_type"`
ResId string `json:"res_id"`
ResId string `json:"domain_id"`
Group string `json:"group"`
Option string `json:"option"`
Value interface{} `json:"value"`
@@ -91,6 +91,12 @@ type SFederatedUser struct {
DisplayName string `json:"display_name"`
}
// SGroup is an autogenerated struct via yunion.io/x/onecloud/pkg/keystone/models.SGroup.
type SGroup struct {
SIdentityBaseResource
Displayname string `json:"displayname"`
}
// SIdentityBaseResource is an autogenerated struct via yunion.io/x/onecloud/pkg/keystone/models.SIdentityBaseResource.
type SIdentityBaseResource struct {
apis.SStandaloneResourceBase
@@ -101,13 +107,14 @@ type SIdentityBaseResource struct {
// SIdentityProvider is an autogenerated struct via yunion.io/x/onecloud/pkg/keystone/models.SIdentityProvider.
type SIdentityProvider struct {
apis.SEnabledStatusStandaloneResourceBase
Driver string `json:"driver"`
Template string `json:"template"`
TargetDomainId string `json:"target_domain_id"`
AutoCreateProject *bool `json:"auto_create_project,omitempty"`
ErrorCount int `json:"error_count"`
SyncStatus string `json:"sync_status"`
LastSync time.Time `json:"last_sync"`
Driver string `json:"driver"`
Template string `json:"template"`
TargetDomainId string `json:"target_domain_id"`
AutoCreateProject *bool `json:"auto_create_project,omitempty"`
ErrorCount int `json:"error_count"`
SyncStatus string `json:"sync_status"`
LastSync time.Time `json:"last_sync"`
// = Column(DateTime, nullable=True)
LastSyncEndAt time.Time `json:"last_sync_end_at"`
SyncIntervalSeconds int `json:"sync_interval_seconds"`
}
@@ -116,8 +123,8 @@ type SIdentityProvider struct {
type SIdmapping struct {
apis.SResourceBase
PublicId string `json:"public_id"`
IdpId string `json:"idp_id"`
IdpEntityId string `json:"idp_entity_id"`
IdpId string `json:"domain_id"`
IdpEntityId string `json:"local_id"`
EntityType string `json:"entity_type"`
}
@@ -153,6 +160,13 @@ type SPolicy struct {
Blob interface{} `json:"blob"`
}
// SProject is an autogenerated struct via yunion.io/x/onecloud/pkg/keystone/models.SProject.
type SProject struct {
SIdentityBaseResource
ParentId string `json:"parent_id"`
IsDomain *bool `json:"is_domain,omitempty"`
}
// SRegion is an autogenerated struct via yunion.io/x/onecloud/pkg/keystone/models.SRegion.
type SRegion struct {
apis.SStandaloneResourceBase
@@ -174,6 +188,22 @@ type SService struct {
Extra interface{} `json:"extra"`
}
// SUser is an autogenerated struct via yunion.io/x/onecloud/pkg/keystone/models.SUser.
type SUser struct {
SEnabledIdentityBaseResource
Email string `json:"email"`
Mobile string `json:"mobile"`
Displayname string `json:"displayname"`
LastActiveAt time.Time `json:"last_active_at"`
LastLoginIp string `json:"last_login_ip"`
LastLoginSource string `json:"last_login_source"`
IsSystemAccount *bool `json:"is_system_account,omitempty"`
// deprecated
DefaultProjectId string `json:"default_project_id"`
AllowWebConsole *bool `json:"allow_web_console,omitempty"`
EnableMfa *bool `json:"enable_mfa,omitempty"`
}
// SUsergroupMembership is an autogenerated struct via yunion.io/x/onecloud/pkg/keystone/models.SUsergroupMembership.
type SUsergroupMembership struct {
apis.SResourceBase

View File

@@ -21,7 +21,7 @@ import (
// SGuestImage is an autogenerated struct via yunion.io/x/onecloud/pkg/image/models.SGuestImage.
type SGuestImage struct {
apis.SSharableVirtualResourceBase
Protected *bool `json:"omitempty,protected"`
Protected *bool `json:"protected,omitempty"`
}
// SGuestImageJoint is an autogenerated struct via yunion.io/x/onecloud/pkg/image/models.SGuestImageJoint.
@@ -34,19 +34,22 @@ type SGuestImageJoint struct {
// SImage is an autogenerated struct via yunion.io/x/onecloud/pkg/image/models.SImage.
type SImage struct {
apis.SSharableVirtualResourceBase
Size int64 `json:"size"`
Location string `json:"location"`
DiskFormat string `json:"disk_format"`
Size int64 `json:"size"`
// VirtualSize int64 `nullable:"true" list:"user" create:"optional"`
Location string `json:"location"`
DiskFormat string `json:"disk_format"`
// Column(VARCHAR(32, charset='ascii'), nullable=False, default='qcow2')
Checksum string `json:"checksum"`
FastHash string `json:"fast_hash"`
Owner string `json:"owner"`
MinDiskMB int32 `json:"min_disk_mb"`
MinRamMB int32 `json:"min_ram_mb"`
Protected *bool `json:"omitempty,protected"`
MinDiskMB int32 `json:"min_disk"`
MinRamMB int32 `json:"min_ram"`
Protected *bool `json:"protected,omitempty"`
IsStandard *bool `json:"is_standard,omitempty"`
IsGuestImage *bool `json:"is_guest_image,omitempty"`
IsData *bool `json:"is_data,omitempty"`
OssChecksum string `json:"oss_checksum"`
// image copy from url, save origin checksum before probe
OssChecksum string `json:"oss_checksum"`
}
// SImagePeripheral is an autogenerated struct via yunion.io/x/onecloud/pkg/image/models.SImagePeripheral.

View File

@@ -77,6 +77,9 @@ type ScheduleInput struct {
LiveMigrate bool `json:"live_migrate"`
CpuDesc string `json:"cpu_desc"`
CpuMicrocode string `json:"cpu_microcode"`
CpuMode string `json:"cpu_mode"`
PendingUsages []jsonutils.JSONObject
}
func (input ScheduleInput) ToConditionInput() *jsonutils.JSONDict {
@@ -91,6 +94,17 @@ type CandidateDisk struct {
StorageIds []string `json:"storage_ids"`
}
type CandidateDiskV2 struct {
Index int `json:"index"`
Storages []*CandidateStorage `json:"storages"`
}
type CandidateStorage struct {
Id string
Name string
FreeCapacity int64
}
type CandidateNet struct {
Index int `json:"index"`
NetworkIds []string `json:"network_ids"`

View File

@@ -57,7 +57,7 @@ type SKeystoneCacheObject struct {
// SProjectizedResourceBase is an autogenerated struct via yunion.io/x/onecloud/pkg/cloudcommon/db.SProjectizedResourceBase.
type SProjectizedResourceBase struct {
SDomainizedResourceBase
ProjectId string `json:"project_id"`
ProjectId string `json:"tenant_id"`
}
// SResourceBase is an autogenerated struct via yunion.io/x/onecloud/pkg/cloudcommon/db.SResourceBase.
@@ -72,7 +72,7 @@ type SResourceBase struct {
// SScopedResourceBase is an autogenerated struct via yunion.io/x/onecloud/pkg/cloudcommon/db.SScopedResourceBase.
type SScopedResourceBase struct {
DomainId string `json:"domain_id"`
ProjectId string `json:"project_id"`
ProjectId string `json:"tenant_id"`
}
// SSharableBaseResource is an autogenerated struct via yunion.io/x/onecloud/pkg/cloudcommon/db.SSharableBaseResource.

View File

@@ -268,7 +268,7 @@ func (app *Application) defaultHandle(w http.ResponseWriter, r *http.Request, ri
hand, ok := handler.(*SHandlerInfo)
if ok {
fw := newResponseWriterChannel(w)
worker := make(chan *SWorker)
currentWorker := make(chan *SWorker, 1) // make it a buffered channel
to := hand.FetchProcessTimeout(r)
if to == 0 {
to = app.processTimeout
@@ -320,13 +320,13 @@ func (app *Application) defaultHandle(w http.ResponseWriter, r *http.Request, ri
} // otherwise, the task has been timeout
fw.closeChannels()
},
worker,
currentWorker,
func(err error) {
httperrors.InternalServerError(&fw, "Internal server error: %s", err)
fw.closeChannels()
},
)
runErr := fw.wait(ctx, worker)
runErr := fw.wait(ctx, currentWorker)
if runErr != nil {
switch runErr.(type) {
case *httputils.JSONClientError:

View File

@@ -100,7 +100,12 @@ func (w *responseWriterChannel) wait(ctx context.Context, workerChan chan *SWork
stop := false
for !stop {
select {
case worker = <-workerChan:
case curWorker, more := <-workerChan:
if more {
worker = curWorker
} else {
// ignore, worker is responsible for close the channel
}
case <-ctx.Done():
// ctx deadline reached, timeout
if worker != nil {

View File

@@ -25,10 +25,12 @@ type Ring struct {
}
func NewRing(size int) *Ring {
r := Ring{buffer: make([]interface{}, size+1),
r := Ring{
buffer: make([]interface{}, size+1),
header: 0,
tail: 0,
lock: &sync.Mutex{}}
lock: &sync.Mutex{},
}
return &r
}
@@ -58,6 +60,7 @@ func (r *Ring) Pop() interface{} {
return nil
}
ret := r.buffer[r.tail]
r.buffer[r.tail] = nil
r.tail = nextPointer(r.tail, len(r.buffer))
return ret
}

View File

@@ -19,28 +19,33 @@ import (
)
func TestRing(t *testing.T) {
r := NewRing(10)
var v int32 = 10
r.Push(v)
v = 20
r.Push(v)
v = 30
r.Push(v)
v1 := r.Pop().(int32)
if v1 != 10 {
t.Error("Fail")
}
v2 := r.Pop().(int32)
if v2 != 20 {
t.Error("Fail")
}
v3 := r.Pop().(int32)
if v3 != 30 {
t.Error("Fail")
}
v4 := r.Pop()
if v4 != nil {
t.Error("Fail")
var (
r = NewRing(10)
push = func(v int32) {
r.Push(v)
}
pop = func(want int32) {
got := r.Pop().(int32)
if got != want {
t.Fatalf("got %d, want %d", got, want)
}
for i := r.header; i != r.tail; i = nextPointer(i, len(r.buffer)) {
if r.buffer[i] != nil {
t.Fatalf("head %d, tail %d, index %d not nil",
r.header, r.tail, i)
}
}
}
)
push(10)
push(20)
push(30)
pop(10)
pop(20)
pop(30)
if v := r.Pop(); v != nil {
t.Fatalf("want nil, got %#v", v)
}
}

View File

@@ -189,10 +189,11 @@ func (job *SLogFetchJob) Do(ctx context.Context, now time.Time) error {
if err != nil {
return errors.Wrap(err, "fetchLogs api.EVENT_TYPE_SYSTEM")
}
err = fetchLogs(job.baremetal, ctx, redfish.EVENT_TYPE_MANAGER)
if err != nil {
return errors.Wrap(err, "fetchLogs api.EVENT_TYPE_MANAGER")
}
// no longer fetch management logs
// err = fetchLogs(job.baremetal, ctx, redfish.EVENT_TYPE_MANAGER)
// if err != nil {
// return errors.Wrap(err, "fetchLogs api.EVENT_TYPE_MANAGER")
// }
job.lastTime = now
return nil
}

View File

@@ -21,6 +21,7 @@ import (
"yunion.io/x/jsonutils"
"yunion.io/x/log"
"yunion.io/x/pkg/errors"
"yunion.io/x/onecloud/pkg/appsrv"
"yunion.io/x/onecloud/pkg/baremetal"
@@ -71,6 +72,7 @@ func initBaremetalsHandler(app *appsrv.Application) {
AddHandler(app, "POST", bmActionPrefix("reset-bmc"), bmObjMiddleware(handleBaremetalResetBMC))
AddHandler(app, "POST", bmActionPrefix("ipmi-probe"), bmObjMiddleware(handleBaremetalIpmiProbe))
AddHandler(app, "POST", bmActionPrefix("cdrom"), bmObjMiddleware(handleBaremetalCdromTask))
AddHandler(app, "POST", bmActionPrefix("jnlp"), bmObjMiddleware(handleBaremetalJnlpTask))
// server actions handler
AddHandler(app, "POST", srvActionPrefix("create"), srvClassMiddleware(handleServerCreate))
@@ -160,6 +162,17 @@ func handleBaremetalCdromTask(ctx *Context, bm *baremetal.SBaremetalInstance) {
ctx.ResponseOk()
}
func handleBaremetalJnlpTask(ctx *Context, bm *baremetal.SBaremetalInstance) {
jnlp, err := bm.GetConsoleJNLP(ctx)
if err != nil {
ctx.ResponseError(errors.Wrap(err, "GetConsoleJNLP"))
return
}
result := jsonutils.NewDict()
result.Add(jsonutils.NewString(jnlp), "jnlp")
ctx.ResponseJson(result)
}
func handleServerCreate(ctx *Context, bm *baremetal.SBaremetalInstance) {
err := bm.StartServerCreateTask(ctx.UserCred(), ctx.TaskId(), ctx.Data())
if err != nil {

View File

@@ -156,11 +156,15 @@ func bmRegisterMiddleware(h bmRegisterFunc) appsrv.FilterHandler {
newCtx.ResponseError(httperrors.NewMissingParameterError("hostname"))
return
}
remoteIp, _, err := net.SplitHostPort(r.RemoteAddr)
if err != nil {
newCtx.ResponseError(httperrors.NewInternalServerError("Parse ip error %s", err))
return
remoteIp, _ := newCtx.Data().GetString("ssh_ip")
if len(remoteIp) == 0 {
remoteIp, _, err = net.SplitHostPort(r.RemoteAddr)
if err != nil {
newCtx.ResponseError(httperrors.NewInternalServerError("Parse ip error %s", err))
return
}
}
sshPort, err := newCtx.Data().Int("ssh_port")
if err != nil {
newCtx.ResponseError(httperrors.NewMissingParameterError("ssh_port"))

View File

@@ -64,6 +64,7 @@ import (
"yunion.io/x/onecloud/pkg/util/influxdb"
"yunion.io/x/onecloud/pkg/util/procutils"
"yunion.io/x/onecloud/pkg/util/redfish"
"yunion.io/x/onecloud/pkg/util/redfish/bmconsole"
"yunion.io/x/onecloud/pkg/util/ssh"
"yunion.io/x/onecloud/pkg/util/sysutils"
)
@@ -1232,7 +1233,12 @@ func (b *SBaremetalInstance) enableWire(mac net.HardwareAddr, ipAddr string, nic
func (b *SBaremetalInstance) GetIPMIConfig() *types.SIPMIInfo {
conf := b.GetRawIPMIConfig()
if conf == nil || conf.Password == "" {
if conf == nil {
log.Debugf("GetIPMIConfig conf is nil")
return nil
}
if conf.Password == "" {
log.Debugf("GetIPMIConfig password is nil")
return nil
}
if conf.Username == "" {
@@ -1251,6 +1257,7 @@ func (b *SBaremetalInstance) GetIPMIConfig() *types.SIPMIInfo {
}
conf.Password = utils.Unquote(conf.Password) // XXX: remove quotes!!!
if conf.IpAddr == "" {
log.Debugf("GetIPMIConfig ipaddr s nil")
return nil
}
return conf
@@ -1333,6 +1340,7 @@ func (b *SBaremetalInstance) SetExistingIPMIIPAddr(ipAddr string) {
func (b *SBaremetalInstance) GetIPMITool() *ipmitool.LanPlusIPMI {
conf := b.GetIPMIConfig()
if conf == nil {
log.Debugf("GetIPMIConfig is nil")
return nil
}
return ipmitool.NewLanPlusIPMI(conf.IpAddr, conf.Username, conf.Password)
@@ -1629,6 +1637,10 @@ func (b *SBaremetalInstance) DelayedSyncIPMIInfo(data jsonutils.JSONObject) (jso
}
func (b *SBaremetalInstance) DelayedSyncDesc(data jsonutils.JSONObject) (jsonutils.JSONObject, error) {
if data == nil {
session := b.manager.GetClientSession()
data, _ = b.manager.fetchBaremetal(session, b.GetId())
}
err := b.SaveDesc(data)
return nil, err
}
@@ -1921,6 +1933,25 @@ func (b *SBaremetalInstance) fetchPowerThermalMetrics(ctx context.Context) ([]in
return powerMetrics, thermalMetrics, nil
}
func (b *SBaremetalInstance) GetConsoleJNLP(ctx context.Context) (string, error) {
cli := b.GetRedfishCli(ctx)
if cli != nil {
return cli.GetConsoleJNLP(ctx)
}
conf := b.GetIPMIConfig()
bmc := bmconsole.NewBMCConsole(conf.IpAddr, conf.Username, conf.Password, false)
manufacture := b.GetManufacture()
switch strings.ToLower(manufacture) {
case "hp", "hpe":
return bmc.GetIloConsoleJNLP(ctx)
case "dell", "dell inc.":
return bmc.GetIdracConsoleJNLP(ctx, "", "")
case "supermicro":
return bmc.GetSupermicroConsoleJNLP(ctx)
}
return "", httperrors.NewNotImplementedError("Unsupported manufacture %s", manufacture)
}
func (b *SBaremetalInstance) getTags() []influxdb.SKeyValue {
tags := []influxdb.SKeyValue{
{

View File

@@ -43,7 +43,7 @@ func InspurProfile() IPMIProfile {
func LenovoProfile() IPMIProfile {
return IPMIProfile{
LanChannel: []int{8},
LanChannel: []int{1, 8},
RootName: "root",
RootId: 2,
}
@@ -51,7 +51,7 @@ func LenovoProfile() IPMIProfile {
func HpProfile() IPMIProfile {
return IPMIProfile{
LanChannel: []int{2},
LanChannel: []int{1, 2},
RootName: "root",
RootId: 1,
}

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