Compare commits

...

640 Commits

Author SHA1 Message Date
yunion-ci-robot
8db574e7ca Merge pull request #8283 from ioito/automated-cherry-pick-of-#8281-upstream-release-3.3
Automated cherry pick of #8281: fix: sync huawei bucket project info
2020-10-14 10:51:31 +08:00
yunion-ci-robot
7969e533b0 Merge pull request #8255 from ioito/automated-cherry-pick-of-#8253-upstream-release-3.3
Automated cherry pick of #8253: fix: qcloud eip with bandwidth attr
2020-10-14 10:44:30 +08:00
Qu Xuan
3fbf7d033f fix: sync huawei bucket project info 2020-10-13 20:56:08 +08:00
Zexi Li
9330c0cbb7 Merge pull request #8269 from ioito/automated-cherry-pick-of-#8267-upstream-release-3.3
Automated cherry pick of #8267: fix: trans google new region name
2020-10-13 17:34:49 +08:00
Zexi Li
874347269c Merge pull request #8272 from ioito/automated-cherry-pick-of-#8270-upstream-release-3.3
Automated cherry pick of #8270: fix: 支持带宽包用户
2020-10-13 17:34:39 +08:00
Qu Xuan
1bdce8f88b fix: 支持带宽包用户 2020-10-13 15:34:27 +08:00
Qu Xuan
53522134df fix: trans google new region name 2020-10-13 14:18:29 +08:00
Qu Xuan
8e994e9fb8 fix: qcloud eip with bandwidth attr 2020-10-13 10:54:59 +08:00
yunion-ci-robot
dc911c0821 Merge pull request #8244 from zexi/automated-cherry-pick-of-#8242-upstream-release-3.3
Automated cherry pick of #8242: baremetal: fix pxe filter network by guest_dhcp
2020-10-13 10:31:29 +08:00
Zexi Li
407317175a Merge pull request #8230 from yousong/automated-cherry-pick-of-#8228-upstream-release-3.3
Automated cherry pick of #8228: eip: construct a pointer type
2020-10-13 10:14:09 +08:00
Zexi Li
db78cf3f4a Merge pull request #8260 from rainzm/automated-cherry-pick-of-#8232-upstream-release-3.3
Automated cherry pick of #8232: fix(esxi): search template from whole vCenter
2020-10-13 10:09:50 +08:00
Zexi Li
723ea60853 Merge pull request #8212 from ioito/automated-cherry-pick-of-#8210-upstream-release-3.3
Automated cherry pick of #8210: fix: validate secgroup purge condition
2020-10-13 10:02:39 +08:00
Zexi Li
9499c9ede3 Merge pull request #8250 from ioito/automated-cherry-pick-of-#8248-upstream-release-3.3
Automated cherry pick of #8248: fix: qcloud instance with max bandwidth
2020-10-13 09:57:49 +08:00
Yousong Zhou
d81ed410df eip: NewEipForVMOnHost: add opslog 2020-10-12 18:39:36 +08:00
Yousong Zhou
8e4f04ffae eip: construct a pointer type 2020-10-12 18:39:36 +08:00
rainzm
fa70835a82 fix(esxi): use system disk of template only when cloning vm
1. Create a driver if necessary.
2. After cloning the virtual machine, remove all data disks.
3. Create new data disks.
2020-10-12 17:48:56 +08:00
rainzm
2ce77ac21f fix(esxi): search template from whole vCenter 2020-10-12 17:48:56 +08:00
Qu Xuan
a0ab506a68 fix: qcloud instance with max bandwidth 2020-10-12 15:09:32 +08:00
yunion-ci-robot
115de69bc7 Merge pull request #8240 from swordqiu/automated-cherry-pick-of-#8238-upstream-release-3.3
Automated cherry pick of #8238: fix: ldap sync not update user's phone and email
2020-10-12 11:54:19 +08:00
Zexi Li
c1b5fa1da9 baremetal: fix pxe filter network by guest_dhcp 2020-10-12 11:37:24 +08:00
Qiu Jian
89669c8cb2 fix: ldap sync not update user's phone and email 2020-10-11 05:47:23 +08:00
yunion-ci-robot
856e61d55a Merge pull request #8196 from rainzm/automated-cherry-pick-of-#8194-upstream-release-3.3
Automated cherry pick of #8194: fix(esxi): check nil value when NewVirtualMachine
2020-10-10 19:09:16 +08:00
yunion-ci-robot
e1f48cde66 Merge pull request #8216 from tb365/automated-cherry-pick-of-#8214-upstream-release-3.3
Automated cherry pick of #8214: remove aws lbbg cache metedata
2020-10-10 18:54:20 +08:00
yunion-ci-robot
b751b9cde4 Merge pull request #8220 from yousong/automated-cherry-pick-of-#8218-upstream-release-3.3
Automated cherry pick of #8218: webconsole: ssh: each argument on its own line
2020-10-10 15:34:52 +08:00
Yousong Zhou
861bc56a95 webconsole: ssh: add keyboard-interactive as an option
For ESXi 6.0

  Authentications that can continue: publickey,keyboard-interactive
2020-10-10 14:44:02 +08:00
Yousong Zhou
bba99aef9e webconsole: ssh: each argument on its own line 2020-10-10 14:44:02 +08:00
TangBin
c01b06d0e0 remove aws lbbg cache metedata 2020-10-10 14:27:56 +08:00
yunion-ci-robot
b40806fc2d Merge pull request #8201 from rainzm/automated-cherry-pick-of-#8199-upstream-release-3.3
Automated cherry pick of #8199: fix(esxi): check whether some fields of vm are nil
2020-10-10 12:55:08 +08:00
yunion-ci-robot
76cb015918 Merge pull request #8192 from wanyaoqi/automated-cherry-pick-of-#7621-upstream-release-3.3
Automated cherry pick of #7621: separate guest doamin and dns
2020-10-10 12:15:08 +08:00
yunion-ci-robot
962cb29ca9 Merge pull request #8209 from ioito/automated-cherry-pick-of-#8207-upstream-release-3.3
Automated cherry pick of #8207: fix: qcloud set hostname for instance
2020-10-10 12:08:09 +08:00
yunion-ci-robot
41ada934f3 Merge pull request #8185 from yousong/automated-cherry-pick-of-#8183-upstream-release-3.3
Automated cherry pick of #8183: vpcagent: ovn: increase dhcp lease, renew, rebind time
2020-10-10 11:56:13 +08:00
Qu Xuan
ae261321ec fix: validate secgroup purge condition 2020-10-10 11:54:59 +08:00
rainzm
d06e6927ca fix: avoid slice out of bounds 2020-10-10 11:53:15 +08:00
rainzm
18d19006d4 fix(esxi): filter linkLocalAddress 2020-10-10 11:53:15 +08:00
rainzm
71a6b6d14c fix(esxi): check whether some fields of vm are nil 2020-10-10 11:53:15 +08:00
Qu Xuan
324e7a7ee4 fix: qcloud set hostname for instance 2020-10-10 11:41:36 +08:00
yunion-ci-robot
d9939a84b6 Merge pull request #8204 from swordqiu/automated-cherry-pick-of-#8202-upstream-release-3.3
Automated cherry pick of #8202: fix: server name auto index should start from 1
2020-10-10 11:36:08 +08:00
rainzm
ed29844d4a fix(esxi): check nil value when NewVirtualMachine 2020-10-10 11:32:22 +08:00
Qiu Jian
75260982bc fix: server name auto index should start from 1 2020-10-10 06:26:56 +08:00
wanyaoqi
4bf21e32b4 separate guest doamin and dns 2020-10-09 15:19:31 +08:00
Yousong Zhou
d097a7637a vpcagent: ovn: increase dhcp lease, renew, rebind time 2020-10-09 10:25:22 +08:00
yunion-ci-robot
80cf064a2b Merge pull request #8180 from swordqiu/automated-cherry-pick-of-#8178-upstream-release-3.3
Automated cherry pick of #8178: fix: error code of external bucket not found error should be 404
2020-10-09 09:11:59 +08:00
Qiu Jian
0fc0630c7a fix: error code of external bucket not found error should be 404 2020-09-30 18:33:32 +08:00
yunion-ci-robot
1bd034e3b7 Merge pull request #8175 from yousong/automated-cherry-pick-of-#8173-upstream-release-3.3
Automated cherry pick of #8173: dns: isMyDomain: match only strict subdomain of dns_domain
2020-09-30 16:53:46 +08:00
yunion-ci-robot
4b2c25a0c6 Merge pull request #8170 from swordqiu/automated-cherry-pick-of-#8168-upstream-release-3.3
Automated cherry pick of #8168: fix: emulated wire not sync vpc shared info
2020-09-30 16:29:46 +08:00
Yousong Zhou
b6f5229f8a dns: isMyDomain: match only strict subdomain of dns_domain 2020-09-30 16:16:19 +08:00
Qiu Jian
6a6489f68a fix: emulated wire not sync vpc shared info 2020-09-30 15:55:10 +08:00
yunion-ci-robot
f25815da16 Merge pull request #8161 from tb365/automated-cherry-pick-of-#8159-upstream-release-3.3
Automated cherry pick of #8159: aliyun public elb region fix
2020-09-29 23:28:49 +08:00
TangBin
acf49c4493 aliyun public elb region fix 2020-09-29 22:05:19 +08:00
yunion-ci-robot
a8e8b11a66 Merge pull request #8156 from tb365/automated-cherry-pick-of-#8154-upstream-release-3.3
Automated cherry pick of #8154: aliyun public elb brand fix
2020-09-29 18:18:34 +08:00
TangBin
97acce2c22 aliyun public elb brand fix 2020-09-29 16:48:54 +08:00
yunion-ci-robot
737b5ba17a Merge pull request #8103 from rainzm/automated-cherry-pick-of-#8101-upstream-release-3.3
Automated cherry pick of #8101: fix(region): set ownerId as userCred when can't FetchOwnerId
2020-09-29 10:41:39 +08:00
Zexi Li
89bb30b3ab Merge pull request #8131 from tb365/automated-cherry-pick-of-#8129-upstream-release-3.3
Automated cherry pick of #8129: aliyun create public lb fix
2020-09-28 16:24:32 +08:00
TangBin
62beb58fc7 aliyun create public lb fix 2020-09-28 14:20:25 +08:00
yunion-ci-robot
71e5b5ddf1 Merge pull request #8118 from wanyaoqi/automated-cherry-pick-of-#8116-upstream-release-3.3
Automated cherry pick of #8116: umount nfs on detach storage
2020-09-27 21:03:37 +08:00
wanyaoqi
36e089e633 increase rbd check timeout 2020-09-27 20:21:23 +08:00
wanyaoqi
ea0ccfa0d6 umount nfs on detach storage 2020-09-27 20:21:23 +08:00
yunion-ci-robot
729e790f08 Merge pull request #8093 from tb365/automated-cherry-pick-of-#8087-upstream-release-3.3
Automated cherry pick of #8087: huawei snapshot delete fix
2020-09-27 15:09:33 +08:00
Zexi Li
7f58628b94 Merge pull request #8090 from wanyaoqi/automated-cherry-pick-of-#8088-upstream-release-3.3
Automated cherry pick of #8088: set stagefail on clean fail
2020-09-27 14:46:05 +08:00
wanyaoqi
80de477a8c set stagefail on clean fail 2020-09-27 11:45:44 +08:00
yunion-ci-robot
cf32344af9 Merge pull request #8061 from ioito/automated-cherry-pick-of-#8059-upstream-release-3.3
Automated cherry pick of #8059: fix: avoid serial vm creation
2020-09-26 23:20:34 +08:00
yunion-ci-robot
750c71ad90 Merge pull request #8106 from zexi/automated-cherry-pick-of-#8104-upstream-release-3.3
Automated cherry pick of #8104: region: fix schedtag joint resource master/slave field wrong order
2020-09-26 08:48:31 +08:00
Zexi Li
e1214375b3 Merge pull request #8097 from ioito/automated-cherry-pick-of-#8095-upstream-release-3.3
Automated cherry pick of #8095: fix: avoid purge storages
2020-09-25 20:54:47 +08:00
Zexi Li
98f65243da region: fix schedtag joint resource master/slave field wrong order 2020-09-25 20:51:19 +08:00
rainzm
1a6f9bc710 fix(region): set ownerId as userCred when can't FetchOwnerId 2020-09-25 20:39:59 +08:00
Qu Xuan
4fbea0dcab fix: avoid purge storages 2020-09-25 19:17:40 +08:00
TangBin
d690110793 huawei client request add throttling control 2020-09-25 18:55:09 +08:00
TangBin
42a24640a4 huawei elb get params log 2020-09-25 18:55:09 +08:00
TangBin
9d4d17f40c qcloud elb create listener fix 2020-09-25 18:55:09 +08:00
TangBin
999c315ce0 huawei snapshot delete fix 2020-09-25 18:55:09 +08:00
Zexi Li
4c05026d7f Merge pull request #8079 from ioito/automated-cherry-pick-of-#8077-upstream-release-3.3
Automated cherry pick of #8077: fix: avoid account delete failed
2020-09-25 12:11:47 +08:00
ioito
b5cdd84b59 fix: avoid account delete failed 2020-09-25 10:55:52 +08:00
Zexi Li
8b6c5b0b2d Merge pull request #8058 from ioito/automated-cherry-pick-of-#8056-upstream-release-3.3
Automated cherry pick of #8056: fix: 仅在可用区故障时可强制挂载磁盘
2020-09-25 01:40:59 +08:00
Zexi Li
12d972ab0c Merge pull request #8070 from ioito/automated-cherry-pick-of-#8068-upstream-release-3.3
Automated cherry pick of #8068: fix: avoid compare err with cloudprovider.ErrNotFound direct
2020-09-25 01:38:33 +08:00
Zexi Li
be5eb4143b Merge pull request #8065 from rainzm/automated-cherry-pick-of-#8063-upstream-release-3.3
Automated cherry pick of #8063: fix(region): fetch correct ownerId in PerformPrepareNets
2020-09-24 21:22:28 +08:00
Zexi Li
96d0f8b479 Merge pull request #8073 from ioito/automated-cherry-pick-of-#8071-upstream-release-3.3
Automated cherry pick of #8071: fix: sql err
2020-09-24 21:19:32 +08:00
ioito
95a5ec092f fix: sql err 2020-09-24 20:23:10 +08:00
ioito
f16b8dbc08 fix: avoid compare err with cloudprovider.ErrNotFound direct 2020-09-24 20:16:13 +08:00
rainzm
912d7a6978 fix(region): fetch correct ownerId in PerformPrepareNets 2020-09-24 17:27:33 +08:00
ioito
05ba352c8b fix: avoid serial vm creation 2020-09-24 16:41:25 +08:00
ioito
f7f0a7e302 fix: 仅在可用区故障时可强制挂载磁盘 2020-09-24 15:40:16 +08:00
Zexi Li
4371ce22f0 Merge pull request #8047 from ioito/automated-cherry-pick-of-#8029-upstream-release-3.3
Automated cherry pick of #8029: fix: avoid account delete failed
2020-09-23 23:51:52 +08:00
ioito
812f50f6a5 fix: avoid account delete failed 2020-09-23 20:59:23 +08:00
yunion-ci-robot
a698237915 Merge pull request #8038 from rainzm/automated-cherry-pick-of-#8036-upstream-release-3.3
Automated cherry pick of #8036: fix(region): add GetSlaveFieldName for ScalingGroupGuest
2020-09-23 20:51:31 +08:00
yunion-ci-robot
5bb73f439b Merge pull request #8028 from ioito/automated-cherry-pick-of-#8026-upstream-release-3.3
Automated cherry pick of #8026: fix: 避免腾讯云同步虚拟机ip异常
2020-09-23 20:50:19 +08:00
yunion-ci-robot
13607dbe70 Merge pull request #8043 from zhaoxiangchun/automated-cherry-pick-of-#8041-upstream-release-3.3
Automated cherry pick of #8041: bugfix:esxi collect metric
2020-09-23 20:41:20 +08:00
zhaoxiangchun
fda1e1f0f8 bugfix:esxi collect metric 2020-09-23 19:50:04 +08:00
rainzm
dea65a5a11 fix(region): add GetSlaveFieldName for ScalingGroupGuest 2020-09-23 18:39:57 +08:00
ioito
b59696a691 fix: 避免腾讯云同步虚拟机ip异常 2020-09-23 18:18:07 +08:00
yunion-ci-robot
b7381571b7 Merge pull request #8023 from yousong/automated-cherry-pick-of-#8021-upstream-release-3.3
Automated cherry pick of #8021: elasticips: fix calling FilterByOwner
2020-09-23 17:28:17 +08:00
Yousong Zhou
15a1e76721 elasticips: error when we have no usable eip network 2020-09-23 16:23:21 +08:00
Yousong Zhou
c71a2e6ca6 elasticips: fix calling FilterByOwner 2020-09-23 16:23:21 +08:00
yunion-ci-robot
62bd5840ba Merge pull request #8005 from tb365/automated-cherry-pick-of-#8003-upstream-release-3.3
Automated cherry pick of #8003: regional network filter bugfix
2020-09-22 21:18:23 +08:00
yunion-ci-robot
c0859fd49d Merge pull request #8000 from ioito/automated-cherry-pick-of-#7998-upstream-release-3.3
Automated cherry pick of #7998: optimized: create eip params
2020-09-22 21:10:20 +08:00
TangBin
a16b7a2f32 regional network filter bugfix 2020-09-22 20:04:53 +08:00
Qu Xuan
2eaedeafaf optimized: create eip params 2020-09-22 16:48:10 +08:00
yunion-ci-robot
0996f3fd87 Merge pull request #7993 from zhaoxiangchun/automated-cherry-pick-of-#7991-upstream-release-3.3
Automated cherry pick of #7991: bugfix: collect esxi metric timout
2020-09-22 14:16:20 +08:00
yunion-ci-robot
0fa78c6af2 Merge pull request #7996 from tb365/automated-cherry-pick-of-#7994-upstream-release-3.3
Automated cherry pick of #7994: ctyun sync secgroup fix & cloudaccount delete fix
2020-09-22 14:08:19 +08:00
TangBin
5bd27fed64 ctyun sync secgroup fix & cloudaccount delete fix 2020-09-22 13:55:56 +08:00
zhaoxiangchun
e5fb2771bb bugfix: collect esxi metric timout
1.增加批量获取esxi中metric的接口
2020-09-22 11:13:53 +08:00
yunion-ci-robot
1d9eab7fa2 Merge pull request #7934 from swordqiu/automated-cherry-pick-of-#7916-upstream-release-3.3
Automated cherry pick of #7916: fix: keystone initialize data skip nil extra fields
2020-09-21 19:53:12 +08:00
yunion-ci-robot
7fa2e43881 Merge pull request #7920 from swordqiu/automated-cherry-pick-of-#7918-upstream-release-3.3
Automated cherry pick of #7918: fix: lock/unlock cleanup
2020-09-21 19:52:14 +08:00
yunion-ci-robot
c8737d4567 Merge pull request #7976 from swordqiu/automated-cherry-pick-of-#7975-upstream-release-3.3
Automated cherry pick of #7975: fix: get jnlp xml from dell idrac6,7,9
2020-09-21 10:12:17 +08:00
Qiu Jian
f27a461f08 fix: get jnlp xml from dell idrac6,7,9 2020-09-19 00:10:37 +08:00
Zexi Li
3f9445e40e Merge pull request #7968 from tb365/automated-cherry-pick-of-#7966-upstream-release-3.3
Automated cherry pick of #7966: ctyun add region cn-bj1
2020-09-18 21:05:10 +08:00
yunion-ci-robot
4b525a59e5 Merge pull request #7972 from swordqiu/automated-cherry-pick-of-#7970-upstream-release-3.3
Automated cherry pick of #7970: fix: add esxicli vmrc/webmks command
2020-09-18 21:04:11 +08:00
Qiu Jian
6a459ec41d fix: add esxicli vmrc/webmks command 2020-09-18 14:42:06 +08:00
TangBin
93f16973d5 ctyun add region cn-bj1 2020-09-18 14:24:16 +08:00
Zexi Li
14cdf78db5 Merge pull request #7963 from zexi/automated-cherry-pick-of-#7961-upstream-release-3.3
Automated cherry pick of #7961: region: fix network schedtag not cleanup when network deleted
2020-09-18 12:45:03 +08:00
Zexi Li
86189f981c region: fix network schedtag not cleanup when network deleted 2020-09-18 10:39:03 +08:00
Zexi Li
55c1206f97 Merge pull request #7957 from wanyaoqi/automated-cherry-pick-of-#7953-upstream-release-3.3
Automated cherry pick of #7953: fix set host image cache properties
2020-09-16 21:38:05 +08:00
Zexi Li
961a907af4 Merge pull request #7914 from ioito/automated-cherry-pick-of-#7912-upstream-release-3.3
Automated cherry pick of #7912: fix: 支持自动根据云上项目修改本地项目名称
2020-09-16 21:35:06 +08:00
yunion-ci-robot
1de22ab086 Merge pull request #7950 from wanyaoqi/automated-cherry-pick-of-#7948-upstream-release-3.3
Automated cherry pick of #7948: fix update image status after save failed
2020-09-16 21:04:51 +08:00
wanyaoqi
33a18462ee fix set host image cache properties 2020-09-16 20:52:26 +08:00
wanyaoqi
9aeb802af9 fix update image status after save failed 2020-09-16 19:14:35 +08:00
Zexi Li
ffd665aa59 Merge pull request #7939 from zhaoxiangchun/automated-cherry-pick-of-#7938-upstream-release-3.3
Automated cherry pick of #7938: bugfix vmware monitor
2020-09-16 11:35:01 +08:00
Zexi Li
903e86662a Merge pull request #7937 from swordqiu/automated-cherry-pick-of-#7935-upstream-release-3.3
Automated cherry pick of #7935: fix: disable qcloud verifyAppId temporarily
2020-09-16 11:33:58 +08:00
Zexi Li
ed120d143a Merge pull request #7923 from ioito/automated-cherry-pick-of-#7921-upstream-release-3.3
Automated cherry pick of #7921: fix: bucket object cnt fix
2020-09-16 11:30:09 +08:00
zhaoxiangchun
43add1b097 bugfix vmware monitor 2020-09-16 10:28:29 +08:00
Qiu Jian
8ebaf8bf2d fix: disable qcloud verifyAppId temporarily 2020-09-16 02:21:47 +08:00
Qiu Jian
91634336c6 fix: keystone initialize data skip nil extra fields 2020-09-16 01:59:50 +08:00
Qu Xuan
6d31c44ef3 fix: bucket object cnt fix 2020-09-15 19:14:04 +08:00
Qiu Jian
d86534c16b fix: lock/unlock cleanup 2020-09-15 12:29:28 +08:00
yunion-ci-robot
a5ec90abdb Merge pull request #7907 from wanyaoqi/automated-cherry-pick-of-#7905-upstream-release-3.3
Automated cherry pick of #7905: webconsole: fix defer order to release zombie process
2020-09-15 10:26:11 +08:00
Qu Xuan
ecade9a3de fix: 支持自动根据云上项目修改本地项目名称 2020-09-14 21:13:54 +08:00
wanyaoqi
77c3e490c2 webconsole: fix defer order to release zombie process 2020-09-14 18:21:38 +08:00
Zexi Li
12aef33055 Merge pull request #7904 from rainzm/automated-cherry-pick-of-#7902-upstream-release-3.3
Automated cherry pick of #7902: fix(esxi): return when host.Vm is empty
2020-09-14 16:28:11 +08:00
rainzm
c4180811b5 fix(esxi): return when host.Vm is empty 2020-09-14 16:27:04 +08:00
yunion-ci-robot
8d8439db4f Merge pull request #7901 from ioito/automated-cherry-pick-of-#7899-upstream-release-3.3
Automated cherry pick of #7899: fix: cos use proxy
2020-09-14 14:03:15 +08:00
Zexi Li
871df54d3b Merge pull request #7897 from wanyaoqi/automated-cherry-pick-of-#7895-upstream-release-3.3
Automated cherry pick of #7895: disk: check disk is need renew on guest set renew
2020-09-14 13:02:11 +08:00
Qu Xuan
24e3da7818 fix: cos use proxy 2020-09-14 13:01:36 +08:00
wanyaoqi
6f5bb55ea0 disk: check disk is need renew on guest set renew 2020-09-14 12:08:17 +08:00
yunion-ci-robot
1d006efc78 Merge pull request #7892 from swordqiu/automated-cherry-pick-of-#7890-upstream-release-3.3
Automated cherry pick of #7890: fix: disable webkms for esxi older than 6.5
2020-09-12 23:55:16 +08:00
yunion-ci-robot
5a91d66939 Merge pull request #7889 from yousong/automated-cherry-pick-of-#7887-upstream-release-3.3
Automated cherry pick of #7887: elasticips: filter by owner when doing auto allocation
2020-09-12 23:54:10 +08:00
Qiu Jian
c2fbe4faf1 fix: disable webkms for esxi older than 6.5 2020-09-12 17:32:41 +08:00
Yousong Zhou
ef8b9e6aea elasticips: filter by owner when doing auto allocation 2020-09-12 17:15:02 +08:00
yunion-ci-robot
2a3464e8e7 Merge pull request #7878 from ioito/automated-cherry-pick-of-#7876-upstream-release-3.3
Automated cherry pick of #7876: fix: 默认不自动合并安全组
2020-09-11 21:03:55 +08:00
Zexi Li
db596b0db1 Merge pull request #7881 from ioito/automated-cherry-pick-of-#7879-upstream-release-3.3
Automated cherry pick of #7879: fix: avoid sync natgateway eip panic
2020-09-11 21:03:50 +08:00
Zexi Li
c766696df9 Merge pull request #7872 from rainzm/automated-cherry-pick-of-#7870-upstream-release-3.3
Automated cherry pick of #7870: fix(esxiagent): add HostDelayTaskWorkerCount
2020-09-11 20:55:42 +08:00
Zexi Li
bc4540649a Merge pull request #7864 from wanyaoqi/automated-cherry-pick-of-#7836-upstream-release-3.3
Automated cherry pick of #7836: host: fix rbd storage cache iso image
2020-09-11 20:54:12 +08:00
Zexi Li
c3a2349f41 Merge pull request #7861 from ioito/automated-cherry-pick-of-#7859-upstream-release-3.3
Automated cherry pick of #7859: fix: 平滑迁移数据
2020-09-11 20:52:22 +08:00
Qu Xuan
9920e3b50d fix: avoid sync natgateway eip panic 2020-09-11 19:17:52 +08:00
Qu Xuan
e5d7fee933 fix: 默认不自动合并安全组 2020-09-11 17:38:16 +08:00
rainzm
da0246e667 fix(esxiagent): add HostDelayTaskWorkerCount
之前,HostDelayWorker 是通过 hostutils.InitWorkerManager 来初始化,
worker的数量依赖于options.HostOptions.DefaultRequestWorkerCount, 因为
这个options没有经过初始化,所以就是0,导致worker count的数量变为1。

现在增加了 HostDelayTaskWorkerCount 来管理这个count,默认值为8。
2020-09-11 17:22:30 +08:00
wanyaoqi
f017daafc2 host: fix rbd storage cache iso image 2020-09-10 23:17:08 +08:00
yunion-ci-robot
bd4d0e11b2 Merge pull request #7857 from ioito/automated-cherry-pick-of-#7855-upstream-release-3.3
Automated cherry pick of #7855: fix: optimized qcloud keypair
2020-09-10 21:34:33 +08:00
Qu Xuan
0428425011 fix: 平滑迁移数据 2020-09-10 17:40:07 +08:00
Qu Xuan
dfafa03364 fix: 腾讯云不支持同时设置秘钥和密码,若设置秘钥,则将密码置空 2020-09-10 17:26:22 +08:00
Qu Xuan
a1aafa67df fix: optimized qcloud keypair 2020-09-10 17:26:22 +08:00
yunion-ci-robot
1041d6e017 Merge pull request #7833 from rainzm/automated-cherry-pick-of-#7832-upstream-release-3.3
Automated cherry pick of #7832: refactor(region): optimize preparenet of cloudaccount
2020-09-10 16:04:56 +08:00
rainzm
df64b90805 refactor(region): optimize preparenet of cloudaccount
1. 从vcenter中获取host和vm的信息时,只需要获取网络相关的字段就可以了。
2. 每个host的vms,单独启用一个goroutine。
3. 优化了处理vms ip的逻辑,现在的时间复杂度是O(n)。
2020-09-10 15:48:40 +08:00
yunion-ci-robot
c90ee3522f Merge pull request #7850 from ioito/automated-cherry-pick-of-#7834-upstream-release-3.3
Automated cherry pick of #7834: fix: uniform cachedimage active status
2020-09-10 14:36:04 +08:00
Qu Xuan
cb288f65eb fix: uniform cachedimage active status 2020-09-10 10:22:57 +08:00
yunion-ci-robot
e073fab189 Merge pull request #7847 from rainzm/automated-cherry-pick-of-#7845-upstream-release-3.3
Automated cherry pick of #7845: Feat & Fix & Refactor for ESXi
2020-09-10 09:41:58 +08:00
rainzm
13608b43e7 fix(region): add RequestSyncstatusOnHost for SESXiGuestDriver
esxi 平台 Guest 进行 syncstatus 和其他平台有所区别,Vcenter 可能会更改
 VM 所在的 Host,所以在 Host 上寻找 VM 可能会出现 ErrNotFound。此时,应该
主动去整个 datacenter 中寻找 VM,然后更改 Host,进行同步。
2020-09-09 21:57:11 +08:00
rainzm
be4a95ca80 fix(esxi): fetch templatevm from datacenter before clone vm
这里应该和image_cache那里保持一直,对template的获取应该从datacenter
中获取,而不是host。
2020-09-09 21:56:20 +08:00
rainzm
35919e1ece refactor(esxi): replace GetTemplateVMById with FetchTemplateVMById
FetchTemplateVMById 更好,因为它更轻量,更快。
2020-09-09 21:56:20 +08:00
rainzm
af76ae975e feat(esxicli): better vm operator
现在,可以通过Datacenter来获取vm,不一定要指定HostIp,
Datacenter和HostIp必须指定一个。
2020-09-09 21:56:20 +08:00
rainzm
3a8c90d7df feat(esxi): support fetchVM form datacenter 2020-09-09 21:56:20 +08:00
rainzm
86c0af8ca5 refactor(esxi): fetchVms and fetchHardwareInfo
1. fetchHardwareInfo 只有一种error,原因是moVM的某些字段为nil,这种情况下,完全可以打印日志直接返回。
2. fetchVms 现在只返回[]*SVirtualMachine, 进一步的过滤(是不是template)交给调用者。
2020-09-09 21:56:20 +08:00
yunion-ci-robot
44313bb394 Merge pull request #7830 from swordqiu/automated-cherry-pick-of-#7828-upstream-release-3.3
Automated cherry pick of #7828: fix: wire usage stats incorrect
2020-09-08 20:28:56 +08:00
yunion-ci-robot
2be6a06580 Merge pull request #7824 from swordqiu/automated-cherry-pick-of-#7820-upstream-release-3.3
Automated cherry pick of #7820: fix: ignore 409 error when doing redfish power on
2020-09-08 20:24:53 +08:00
yunion-ci-robot
8fe49104cb Merge pull request #7823 from rainzm/automated-cherry-pick-of-#7821-upstream-release-3.3
Automated cherry pick of #7821: fix(esxiagent): return image extid not id
2020-09-08 20:23:55 +08:00
Qiu Jian
45d6686a39 fix: wire usage stats incorrect 2020-09-08 16:43:44 +08:00
rainzm
171c95bf55 fix(esxiagent): return image extid not id
调用 disk/image_cache 接口的Task StorageCacheImageTask 会根据回调
回来数据中的 image_id,来设置 storagecachedimage 中的 externalid,
所以这里的 image_id 应该是 externalid。
2020-09-08 15:33:48 +08:00
Qiu Jian
508c934e8a fix: ignore 409 error when doing redfish power on 2020-09-08 15:22:48 +08:00
yunion-ci-robot
dc5eb6c09e Merge pull request #7806 from yousong/automated-cherry-pick-of-#7804-upstream-release-3.3
Automated cherry pick of #7804: vpcagent: guard against foul eip records
2020-09-08 10:07:51 +08:00
yunion-ci-robot
af0e87bd54 Merge pull request #7800 from wanyaoqi/automated-cherry-pick-of-#7798-upstream-release-3.3
Automated cherry pick of #7798: guest short desc add backup host id
2020-09-07 21:01:51 +08:00
yunion-ci-robot
d77616fb5f Merge pull request #7791 from wanyaoqi/automated-cherry-pick-of-#7789-upstream-release-3.3
Automated cherry pick of #7789: fix get ubuntu version
2020-09-07 20:59:45 +08:00
Zexi Li
def5bad5f5 Merge pull request #7795 from ioito/automated-cherry-pick-of-#7793-upstream-release-3.3
Automated cherry pick of #7793: fix: aliyun wulanchabu region
2020-09-07 20:55:42 +08:00
yunion-ci-robot
15ec57cad6 Merge pull request #7812 from swordqiu/automated-cherry-pick-of-#7811-upstream-release-3.3
Automated cherry pick of #7811: fix: prevent users in disabled idp from login
2020-09-07 20:55:13 +08:00
Qiu Jian
e64af28e89 fix: prevent users in disabled idp from login 2020-09-07 18:25:12 +08:00
Yousong Zhou
96058b4afe vpcagent: guard against foul eip records 2020-09-07 17:27:36 +08:00
wanyaoqi
b120b87c4f guest short desc add backup host id 2020-09-07 17:06:02 +08:00
Qu Xuan
fb9ae22fec fix: aliyun wulanchabu region 2020-09-07 16:11:02 +08:00
wanyaoqi
22e4181b37 fix get ubuntu version 2020-09-07 16:00:56 +08:00
yunion-ci-robot
6fef273e9c Merge pull request #7788 from rainzm/automated-cherry-pick-of-#7786-upstream-release-3.3
Automated cherry pick of #7786: fix(scheduler): fix array out of bounds when sorting hosts
2020-09-07 15:33:41 +08:00
yunion-ci-robot
cf1b81c70e Merge pull request #7784 from rainzm/automated-cherry-pick-of-#7782-upstream-release-3.3
Automated cherry pick of #7782: fix(notify): Replace String() with GetString()
2020-09-07 15:26:42 +08:00
rainzm
6874b94404 fix(scheduler): fix array out of bounds when sorting hosts 2020-09-07 15:21:58 +08:00
rainzm
4da5a00422 fix(notify): Replace String() with GetString()
The String() of jsonutils.JSONObject will add a pair of
double quotes around the content. The GetString() will
get a clean content.
2020-09-07 15:11:25 +08:00
yunion-ci-robot
92c99fe828 Merge pull request #7779 from ioito/automated-cherry-pick-of-#7729-upstream-release-3.3
Automated cherry pick of #7729: optimized cachedimages sync
2020-09-07 11:08:42 +08:00
Qu Xuan
23b02045a1 optimized cachedimages sync 2020-09-07 10:18:15 +08:00
yunion-ci-robot
86dca4ec62 Merge pull request #7771 from swordqiu/automated-cherry-pick-of-#7769-upstream-release-3.3
Automated cherry pick of #7769: fix: network address list respect privilige of user
2020-09-05 15:50:43 +08:00
yunion-ci-robot
9c71b76e79 Merge pull request #7774 from swordqiu/automated-cherry-pick-of-#7772-upstream-release-3.3
Automated cherry pick of #7772: fix: skup syncing lb, rds, redis instances in tasks
2020-09-05 15:47:42 +08:00
Qiu Jian
ec659ddd44 fix: skup syncing lb, rds, redis instances in tasks 2020-09-05 14:30:40 +08:00
Qiu Jian
e2d98a4ce3 fix: network address list respect privilige of user 2020-09-05 12:02:35 +08:00
yunion-ci-robot
47e515cb1f Merge pull request #7765 from tb365/automated-cherry-pick-of-#7764-upstream-release-3.3
Automated cherry pick of #7764: pex register add optional column mac_access
2020-09-04 20:15:41 +08:00
TangBin
6eb7c39d3b pex register add optional column mac_access 2020-09-04 15:57:07 +08:00
Zexi Li
52d06ec9c4 Merge pull request #7749 from rainzm/automated-cherry-pick-of-#7748-upstream-release-3.3
Automated cherry pick of #7748: feat(esxi): correctly judge whether inet is nil
2020-09-04 10:32:27 +08:00
Zexi Li
d8fcdaa023 Merge pull request #7756 from swordqiu/automated-cherry-pick-of-#7740-upstream-release-3.3
Automated cherry pick of #7740: fix: find correct esxi host access ip
2020-09-04 10:32:01 +08:00
Zexi Li
b4e57895f6 Merge pull request #7759 from swordqiu/automated-cherry-pick-of-#7757-upstream-release-3.3
Automated cherry pick of #7757: fix: support VirtualDiskRawDiskMappingVer1BackingInfo
2020-09-04 10:31:23 +08:00
Zexi Li
015bb265d3 Merge pull request #7746 from wanyaoqi/automated-cherry-pick-of-#7744-upstream-release-3.3
Automated cherry pick of #7744: glance: check min disk size on update
2020-09-04 10:29:54 +08:00
Zexi Li
8ee2bc0153 Merge pull request #7743 from swordqiu/automated-cherry-pick-of-#7741-upstream-release-3.3
Automated cherry pick of #7741: fix: search by chs projectname or domainname
2020-09-04 10:29:07 +08:00
Zexi Li
3077c49255 Merge pull request #7737 from rainzm/automated-cherry-pick-of-#7735-upstream-release-3.3
Automated cherry pick of #7735: fix(compute): return InputParameterError while ValidateCreateData
2020-09-04 10:27:51 +08:00
Qiu Jian
79ef55b4f6 fix: support VirtualDiskRawDiskMappingVer1BackingInfo 2020-09-04 00:15:40 +08:00
Qiu Jian
c7c1082e94 fix: find correct esxi host access ip 2020-09-03 23:56:53 +08:00
yunion-ci-robot
78eb02e501 Merge pull request #7732 from swordqiu/automated-cherry-pick-of-#7730-upstream-release-3.3
Automated cherry pick of #7730: fix: compatiblity fixes with lenovo RD620 and huawei 2288 fix: compatiblity fixes with lenovo RD620 and huawei 2288
2020-09-03 21:54:51 +08:00
rainzm
03590d9f9b feat(esxi): correctly judge whether inet is nil 2020-09-03 20:33:35 +08:00
wanyaoqi
a0246b410f glance: check min disk size on update 2020-09-03 20:01:43 +08:00
Qiu Jian
03de172d85 fix: search by chs projectname or domainname 2020-09-03 18:42:34 +08:00
rainzm
94409c25cc fix(compute): return InputParameterError while ValidateCreateData 2020-09-03 15:24:56 +08:00
Qiu Jian
6ea402b576 fix: compatiblity fixes with lenovo RD620 and huawei 2288 2020-09-03 11:53:27 +08:00
yunion-ci-robot
7b7b3a9416 Merge pull request #7727 from tb365/automated-cherry-pick-of-#7725-upstream-release-3.3
Automated cherry pick of #7725: create classic vpc fix
2020-09-03 10:32:41 +08:00
TangBin
142b1bee29 create classic vpc fix 2020-09-02 18:25:49 +08:00
yunion-ci-robot
c0dc06d15d Merge pull request #7720 from wanyaoqi/automated-cherry-pick-of-#7718-upstream-release-3.3
Automated cherry pick of #7718: vmware disk support deploy lvm partition
2020-09-02 16:31:44 +08:00
yunion-ci-robot
1100892f10 Merge pull request #7724 from wanyaoqi/automated-cherry-pick-of-#7722-upstream-release-3.3
Automated cherry pick of #7722: update host status to unknown on host offline
2020-09-02 16:27:38 +08:00
wanyaoqi
8a3d9e7d0d update host status to unknown on host offline 2020-09-02 13:10:00 +08:00
wanyaoqi
e52415a73a vmware disk support deploy lvm partition 2020-09-02 10:32:00 +08:00
屈轩
32195ed702 fix: add details for account delete (#7704)
Co-authored-by: Qu Xuan <quxuan@yunionyun.com>
2020-09-01 20:09:48 +08:00
wanyaoqi
d5251af976 hostinfo: try create network add is_on_premise (#7708) 2020-09-01 20:01:41 +08:00
屈轩
3c7c7c1721 fix: avoid delete aws iam user failed (#7666)
Co-authored-by: Qu Xuan <quxuan@yunionyun.com>
2020-09-01 11:38:35 +08:00
Jian Qiu
f15d7d8f3e fix: vmware esxi host detects vnic portgroup info (#7659)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2020-09-01 10:51:40 +08:00
Rain Zheng
938c9a6817 Automated cherry pick of #7661: fix(host-deployer): Exit correctly after mounting (#7673)
* fix(esxi): Fetch full templates of datastoreImageCache

Datastore 和 DatastoreImageCache 是一对一的关系。
每一个 Datastore 可能有多个对应的 Host,所以 GetIIMages 里面获取
Templates 的逻辑应该尝试去获取所有 Host 的 Templates。

* fix(host-deployer): Exit correctly after mounting

MountRootfs的返回值为nil时,还是需要Umount的操作来正确退出(比如VDDK)。
VDDK的Mount分为两步,第一步会挂在remote
disk到fuse下,然后挂载fuse/xxx/flat
到块设备上。第一步成功,第二部失败也应该正确退出。

* fix(host-deployer): Kill process

* opt(host-deployer): Increase timeout of waiting mount

* opt(host-deployer): Add debug log print command to mount

* fix(esxi): Support multi agent in different zone
2020-09-01 10:47:39 +08:00
Jian Qiu
589d7d48a0 fix: server purge may fail (#7697)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2020-09-01 10:21:39 +08:00
屈轩
9424de9cf7 fix: 不限制openstack系统盘类型 (#7676)
Co-authored-by: Qu Xuan <quxuan@yunionyun.com>
2020-09-01 01:22:35 +08:00
wanyaoqi
9272b43991 fix host get guests (#7684) 2020-09-01 01:11:36 +08:00
wanyaoqi
cc051942d7 fix get storage capacity on init' (#7688) 2020-09-01 01:02:36 +08:00
Yousong Zhou
3268e59d20 vpcagent: respect guest src check settings (#7679)
mac   ip    dhcp    ping    xipping    xmacping
  on    on    y       y       n          n
  on    off   y       y       y          n
  off   off   y       y       y          y

external access depends on source routing, changing ip address will
fail that

note dst mac address of reply packet when changing only mac address
with vpc ip remains the same
2020-08-31 16:31:37 +08:00
Jian Qiu
f142206652 fix: cleanup logic for nics of pending_deleted guests (#7670)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2020-08-31 09:33:36 +08:00
wanyaoqi
d8275fa79a remove backup metadata on delete backup (#7655) 2020-08-28 12:04:05 +08:00
tb365
9ec851df2a eip & vpc manager match fix (#7651)
Co-authored-by: TangBin <tangbin@yunion.cn>
2020-08-28 11:59:40 +08:00
屈轩
c5e616b196 fix: aovid truncated data (#7645)
Co-authored-by: Qu Xuan <quxuan@yunionyun.com>
2020-08-26 21:39:44 +08:00
Jian Qiu
23d01a1e3c fix: turn off some default project policies (#7638)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2020-08-26 18:42:36 +08:00
屈轩
ac18702727 fix: avoid openstack image-list failed (#7642)
Co-authored-by: Qu Xuan <quxuan@yunionyun.com>
2020-08-26 18:33:33 +08:00
Yousong Zhou
3a966df659 vpcagent: ignore network without wire ids (#7630) 2020-08-26 10:02:33 +08:00
Zexi Li
cf313dd2cc Merge pull request #7624 from wanyaoqi/automated-cherry-pick-of-#7623-upstream-release-3.3
Automated cherry pick of #7623: fix gpfs check mountpoint
2020-08-25 17:41:18 +08:00
wanyaoqi
a04ee820f6 fix gpfs check mountpoint 2020-08-25 15:51:38 +08:00
屈轩
64d0b4f8c8 fix: ignore invalid zone sku for rds sku sync (#7618)
Co-authored-by: Qu Xuan <quxuan@yunionyun.com>
2020-08-25 10:28:30 +08:00
屈轩
9f3b937e6a fix: avoid storage=nil, dis can not delete (#7609)
Co-authored-by: Qu Xuan <quxuan@yunionyun.com>
2020-08-22 12:33:36 +08:00
Jian Qiu
99818a7c0f fix: opslog filter by owner_project_ids and owner_domain_ids (#7601)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2020-08-21 10:57:24 +08:00
屈轩
6cab61ecb8 fix: member user only can get user & domain resource (#7598)
Co-authored-by: Qu Xuan <quxuan@yunionyun.com>
2020-08-20 20:54:21 +08:00
Jian Qiu
01a8384071 fix: dns record create ignore is_public field (#7590)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2020-08-18 10:51:56 +08:00
Zexi Li
b5875e00d1 Merge pull request #7582 from swordqiu/automated-cherry-pick-of-#7580-upstream-release-3.3
Automated cherry pick of #7580: fix: allow delete shared role and policy
2020-08-16 23:43:31 +08:00
Yousong Zhou
d91f5fa87e Automated cherry pick of #7585: apis: vpcs_ovn: alloc for interconnects (#7586)
* apis: vpcs_ovn: alloc for interconnects

* vpcagent: names: add vpc ext names

* vpcagent: use var hasXxxgw

* vpcagent: add switch and router for ext access

Link: https://github.com/yunionio/onecloud/issues/7583
2020-08-16 23:41:53 +08:00
Zexi Li
a346fd47fe Merge pull request #7576 from rainzm/automated-cherry-pick-of-#7575-upstream-release-3.3
Automated cherry pick of #7575: fix: GetIImages correctly without 'image_cache' dir
2020-08-16 23:41:50 +08:00
Qiu Jian
cedd4ccdfa fix: allow delete shared role and policy 2020-08-15 21:05:16 +08:00
rainzm
f5d1adcbd0 fix: GetIImages correctly without 'image_cache' dir
After creating vms, there is no dir named 'image_cache' exists in
storage of esxi. So handle this case to not affecte the synchronization of the
VMware Template.
2020-08-14 20:36:26 +08:00
屈轩
66a5410e7d fix: aovid duplicate sku name (#7573)
Co-authored-by: Qu Xuan <quxuan@yunionyun.com>
2020-08-14 20:35:49 +08:00
Zexi Li
3637b671ed Merge pull request #7570 from zexi/hotfix/jsontag-syntax-v33
fix: json TAG_PREFIX invalid syntax
2020-08-14 17:41:42 +08:00
Jian Qiu
7a58d9f197 fix: init wire domain_id for local vpc (#7567)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2020-08-14 17:29:49 +08:00
Zexi Li
5c8a7769e3 fix: json TAG_PREFIX invalid syntax 2020-08-14 16:54:44 +08:00
屈轩
ebe1eb603b fix: avoid virtual resource project id is empty when cloudaccount with no project (#7561)
Co-authored-by: Qu Xuan <quxuan@yunionyun.com>
2020-08-14 10:37:49 +08:00
Rain Zheng
eb67c681d3 fix: Merge the host network correctly when preparenet (#7558) 2020-08-14 10:36:51 +08:00
Jian Qiu
e099f006fa fix: network port count stat recode (#7555)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2020-08-14 10:33:48 +08:00
Zexi Li
c9b485b9f3 Merge pull request #7548 from wanyaoqi/automated-cherry-pick-of-#7547-upstream-release-3.3
Automated cherry pick of #7547: support diable usb kbd
2020-08-11 18:41:28 +08:00
Zexi Li
22231edba6 Merge pull request #7542 from ioito/automated-cherry-pick-of-#7541-upstream-release-3.3
Automated cherry pick of #7541: fix: separete enabled and status field
2020-08-11 18:39:18 +08:00
wanyaoqi
0742afb487 support diable usb kbd 2020-08-11 15:32:31 +08:00
Qu Xuan
3b036e6c30 fix: separete enabled and status field 2020-08-11 14:54:31 +08:00
Zexi Li
227fa57883 Merge pull request #7536 from wanyaoqi/automated-cherry-pick-of-#7530-upstream-release-3.3
Automated cherry pick of #7530: fix mount xfs
2020-08-11 11:16:20 +08:00
wanyaoqi
5439457bb4 fix usage get storage capbility (#7528) 2020-08-10 20:07:57 +08:00
wanyaoqi
57cd48354f fix mount xfs 2020-08-10 20:03:24 +08:00
屈轩
3c63af8de0 fix: optimized huawei security group get and create operation (#7521)
Co-authored-by: Qu Xuan <quxuan@yunionyun.com>
2020-08-10 15:37:44 +08:00
wanyaoqi
52488eeb50 set disk status on disk detached (#7518) 2020-08-10 12:05:45 +08:00
Zexi Li
9114556da3 Merge pull request #7516 from zhaoxiangchun/automated-cherry-pick-of-#7512-upstream-release-3.3
Automated cherry pick of #7512: nodealert bugfix:
2020-08-10 11:14:22 +08:00
zhaoxiangchun
abe44154ba nodealert bugfix:
1.重名判断:后端通过resType, nodeName, metric 限制前端可以创建相同metric的报警记录
2020-08-10 10:33:41 +08:00
Zexi Li
89de86a243 Merge pull request #7509 from ioito/automated-cherry-pick-of-#7508-upstream-release-3.3
Automated cherry pick of #7508: fix: avoid nil pointer
2020-08-10 10:24:53 +08:00
tb365
6cdbae22a4 add image upload& s3 upload api (#7515)
Co-authored-by: TangBin <tangbin@yunion.cn>
2020-08-10 10:21:44 +08:00
Qu Xuan
6f5be444c3 fix: avoid nil pointer 2020-08-07 11:16:00 +08:00
Zexi Li
13d165e3c1 Merge pull request #7504 from ioito/hotfix/qx-auto-create-project-fix
fix: backport fix
2020-08-07 11:06:57 +08:00
Zexi Li
d3d977a359 Merge pull request #7499 from ioito/automated-cherry-pick-of-#7498-upstream-release-3.3
Automated cherry pick of #7498: fix: 隐藏auzre经典类型存储
2020-08-07 11:06:07 +08:00
Zexi Li
0f37875b40 Merge pull request #7502 from ioito/automated-cherry-pick-of-#7501-upstream-release-3.3
Automated cherry pick of #7501: fix: 提高zstack认证兼容性
2020-08-07 11:05:14 +08:00
Qu Xuan
bb1752fb7b fix: backport fix 2020-08-06 20:48:49 +08:00
Qu Xuan
b152aa3337 fix: 提高zstack认证兼容性 2020-08-06 19:25:01 +08:00
Qu Xuan
bb01236942 fix: 隐藏auzre经典类型存储 2020-08-06 18:01:11 +08:00
屈轩
7a81820cd3 fix: 增加openstack兼容性 (#7493)
Co-authored-by: Qu Xuan <quxuan@yunionyun.com>
2020-08-06 11:56:18 +08:00
Zexi Li
525a18dde2 Merge pull request #7485 from wanyaoqi/automated-cherry-pick-of-#7484-upstream-release-3.3
Automated cherry pick of #7484: fix host info get sshkey
2020-08-04 13:51:17 +08:00
wanyaoqi
39bcc36c2d fix host info get sshkey 2020-08-04 10:36:40 +08:00
Zexi Li
138088027e Merge pull request #7481 from swordqiu/automated-cherry-pick-of-#7479-upstream-release-3.3
Automated cherry pick of #7479: fix: typo running_geusts => running_guests
2020-08-03 16:58:40 +08:00
Zexi Li
a023cf56e4 Merge pull request #7475 from ioito/automated-cherry-pick-of-#7474-upstream-release-3.3
Automated cherry pick of #7474: fix: typo
2020-08-03 16:57:44 +08:00
Zexi Li
a17e90ed3b Merge pull request #7478 from swordqiu/automated-cherry-pick-of-#7477-upstream-release-3.3
Automated cherry pick of #7477: fix: filter public network count by zone and region
2020-08-03 16:56:34 +08:00
Qiu Jian
2153a79dcb fix: typo running_geusts => running_guests 2020-08-03 16:33:23 +08:00
Qiu Jian
780cf826c7 fix: filter public network count by zone and region 2020-08-03 15:21:16 +08:00
Qu Xuan
62d2a732e2 fix: typo 2020-08-03 10:56:56 +08:00
Zexi Li
f6409e8511 Merge pull request #7472 from swordqiu/automated-cherry-pick-of-#7470-upstream-release-3.3
Automated cherry pick of #7470: fix: ignore bucket-set-acl not implemented error
2020-08-03 09:25:04 +08:00
Qiu Jian
4cbe29d0c5 fix: ignore bucket-set-acl not implemented error 2020-08-03 02:25:20 +08:00
Zexi Li
221fb3f527 Merge pull request #7469 from zexi/hotfix/update-apis
update apis generate model
2020-08-02 11:15:25 +08:00
Zexi Li
042cd597f6 update apis generate model 2020-08-02 11:13:29 +08:00
Zexi Li
aae065f06f Merge pull request #7468 from zexi/automated-cherry-pick-of-#7455-upstream-release-3.3
Automated cherry pick of #7455: fix: avoid generated codes having duplicate PerformSetScope methods
2020-08-02 10:53:12 +08:00
Qiu Jian
d834f3331e fix: avoid generated codes having duplicate PerformSetScope methods 2020-08-02 10:50:43 +08:00
Zexi Li
703f59760e Merge pull request #7448 from tb365/automated-cherry-pick-of-#7447-upstream-release-3.3
Automated cherry pick of #7447: aws elb listener&rule name too long fix
2020-08-02 10:07:56 +08:00
Zexi Li
5a1935bd54 Merge pull request #7454 from rainzm/automated-cherry-pick-of-#7453-upstream-release-3.3
Automated cherry pick of #7453: opt(scheduler): better sort for hosts when selectHost
2020-08-02 10:04:50 +08:00
屈轩
6e64fc4caa fix: avoid host globalid change (#7466)
Co-authored-by: Qu Xuan <quxuan@yunionyun.com>
2020-08-02 03:03:03 +08:00
wanyaoqi
8172a551bb fix reauth condition on influxdb not found (#7457) 2020-08-01 21:27:04 +08:00
wanyaoqi
381a2796ba fix cache non lvm disks (#7460) 2020-08-01 21:16:04 +08:00
rainzm
49b0a01b08 opt(scheduler): better sort for hosts when selectHost 2020-08-01 17:35:49 +08:00
Jian Qiu
88497da742 fix: elasticcache_account_reset_password_task.go cherry pick build fail (#7452)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2020-08-01 16:44:33 +08:00
tangbin
38e02db07f aws elb listener&rule name too long fix 2020-08-01 11:12:39 +08:00
Zexi Li
fbda89ce2a Merge pull request #7419 from rainzm/automated-cherry-pick-of-#7416-upstream-release-3.3
Automated cherry pick of #7416: fix(region): Don't allow address conflicts under vpc
2020-08-01 11:05:54 +08:00
Zexi Li
c11ee3ed56 Merge pull request #7437 from tb365/automated-cherry-pick-of-#7435-upstream-release-3.3
Automated cherry pick of #7435: loadblancer listener modify name fix
2020-08-01 10:58:00 +08:00
rainzm
18f5f9cb8c fix(region): Don't allow address conflicts under vpc
Except for default vpc, vpc and wire have a one-to-one correspondence.
So prohibiting the address conflict of wire does not avoid
the address conflict of default vpc.
2020-08-01 10:51:52 +08:00
tangbin
bb500edc81 fix redis reset account password action log 2020-08-01 10:51:21 +08:00
tangbin
d9488f552e loadblancer listener modify name fix 2020-08-01 10:50:24 +08:00
Zexi Li
b39e4e37e3 Merge pull request #7440 from swordqiu/automated-cherry-pick-of-#7438-upstream-release-3.3
Automated cherry pick of #7438: fix: sync share mode between vpc and wire
2020-08-01 10:39:43 +08:00
Zexi Li
880f889d4a Merge pull request #7442 from wanyaoqi/automated-cherry-pick-of-#7441-upstream-release-3.3
Automated cherry pick of #7441: fix deploy admin auth key
2020-08-01 00:05:55 +08:00
wanyaoqi
7ad7774f80 fix deploy admin auth key 2020-07-31 23:23:06 +08:00
Zexi Li
e64f249453 baremetal: fix hpssactl split last LV size out of limit (#7427) 2020-07-31 22:49:03 +08:00
Qiu Jian
9dfed28459 fix: sync share mode between vpc and wire 2020-07-31 22:31:06 +08:00
Zexi Li
dd7967dd65 Merge pull request #7434 from zexi/automated-cherry-pick-of-#7433-upstream-release-3.3
Automated cherry pick of #7433: capability: public network count filter by default vpc
2020-07-31 20:42:35 +08:00
Zexi Li
80ae1b6cde capability: public network count filter by default vpc 2020-07-31 20:29:57 +08:00
Zexi Li
b513216421 Merge pull request #7418 from ioito/automated-cherry-pick-of-#7417-upstream-release-3.3
Automated cherry pick of #7417: fix: avoid lost backend params
2020-07-31 18:07:39 +08:00
Zexi Li
a0b464b8d6 Merge pull request #7414 from ioito/automated-cherry-pick-of-#7413-upstream-release-3.3
Automated cherry pick of #7413: fix: openstack win image user data need encode
2020-07-31 18:06:41 +08:00
Zexi Li
d29b105efc Merge pull request #7406 from ioito/automated-cherry-pick-of-#7405-upstream-release-3.3
Automated cherry pick of #7405: fix: avoid account sync deadlock
2020-07-31 18:05:24 +08:00
Zexi Li
1cf42ccfcc Merge pull request #7409 from swordqiu/automated-cherry-pick-of-#7400-upstream-release-3.3
Automated cherry pick of #7400: fix: ignore general s3 set acl not implemented error
2020-07-31 18:04:12 +08:00
Zexi Li
353384f32a Merge pull request #7396 from yousong/automated-cherry-pick-of-#7395-upstream-release-3.3
Automated cherry pick of #7395: apis: compute: move struct defs
2020-07-31 18:03:26 +08:00
屈轩
92d8437c45 fix: 避免glance metadata-list project scope无权限 (#7403)
Co-authored-by: Qu Xuan <quxuan@yunionyun.com>
2020-07-31 18:01:39 +08:00
屈轩
65cd074ffa fix: 优化openstack项目认证 (#7398)
Co-authored-by: Qu Xuan <quxuan@yunionyun.com>
2020-07-31 18:00:09 +08:00
屈轩
5dc8296332 fix: 避免在仅调整虚拟机磁盘时opslog日志记录mem cpu异常 (#7393)
Co-authored-by: Qu Xuan <quxuan@yunionyun.com>
2020-07-31 17:56:57 +08:00
Qu Xuan
46fa77b29b fix: avoid lost backend params 2020-07-31 17:19:20 +08:00
Qu Xuan
c39de392c3 fix: openstack win image user data need encode 2020-07-31 16:54:47 +08:00
wanyaoqi
a2d562ccaa fix panic on storage failed get host (#7391) 2020-07-31 16:43:33 +08:00
Qiu Jian
7e47d7aeb4 fix: ignore general s3 set acl not implemented error 2020-07-31 16:38:51 +08:00
Qu Xuan
01f384cf80 fix: avoid account sync deadlock 2020-07-31 16:32:31 +08:00
Yousong Zhou
5833f1a905 lblisteners: remove unused acl_name field 2020-07-30 20:51:54 +08:00
Yousong Zhou
04abe448f1 lblisteners: list: show acl name 2020-07-30 20:51:54 +08:00
Yousong Zhou
ab71f5e6c6 lblisteners: list: show certificate name 2020-07-30 20:51:54 +08:00
Yousong Zhou
8a79c0f708 apis: compute: move struct defs 2020-07-30 20:51:53 +08:00
Zexi Li
c3bab46d23 Merge pull request #7388 from rainzm/automated-cherry-pick-of-#7387-upstream-release-3.3
Automated cherry pick of #7387: fix(region): zone from guesttemplate's preferzone maybe nil
2020-07-30 17:41:39 +08:00
rainzm
5ee9698218 fix(region): zone from guesttemplate's preferzone maybe nil 2020-07-30 16:12:03 +08:00
Zexi Li
925caf9111 Merge pull request #7352 from ioito/automated-cherry-pick-of-#7318-upstream-release-3.3
Automated cherry pick of #7318: fix: openstack多项目问题
2020-07-30 15:53:36 +08:00
Zexi Li
cc6f22d9d7 Merge pull request #7385 from ioito/automated-cherry-pick-of-#7384-upstream-release-3.3
Automated cherry pick of #7384: fix: avoid parse json err nil pointer
2020-07-30 15:15:33 +08:00
Qu Xuan
816b29267c fix: openstack多项目问题 2020-07-30 14:43:55 +08:00
Qu Xuan
f9b51a9f54 fix: avoid parse json err nil pointer 2020-07-30 11:31:57 +08:00
Zexi Li
14ddc69b40 Merge pull request #7379 from ioito/automated-cherry-pick-of-#7378-upstream-release-3.3
Automated cherry pick of #7378: fix: 添加阿里云rds备份恢复限制条件
2020-07-29 21:38:42 +08:00
Zexi Li
d1a2fe39a7 Merge pull request #7377 from swordqiu/automated-cherry-pick-of-#7375-upstream-release-3.3
Automated cherry pick of #7375: fix: change owner should check required domain list
2020-07-29 17:31:52 +08:00
Qu Xuan
ba953f20ce fix: 添加阿里云rds备份恢复限制条件 2020-07-29 16:55:41 +08:00
Qiu Jian
04b4ab3760 fix: change owner should check required domain list 2020-07-29 13:01:54 +08:00
Zexi Li
8fa3e77995 Merge pull request #7373 from ioito/automated-cherry-pick-of-#7358-upstream-release-3.3
Automated cherry pick of #7358: fix: 普通视图下,安全组仅统计可看到的vm count
2020-07-29 10:27:14 +08:00
Zexi Li
583d783ce6 Merge pull request #7372 from zexi/automated-cherry-pick-of-#7371-upstream-release-3.3
Automated cherry pick of #7371: region: schedtag list support resource_types
2020-07-28 20:57:33 +08:00
Zexi Li
fecb127100 Merge pull request #7360 from ioito/automated-cherry-pick-of-#7359-upstream-release-3.3
Automated cherry pick of #7359: fix: 修复vm绑定重复安全组
2020-07-28 20:55:54 +08:00
Qu Xuan
6b2cb20f4c fix: 普通视图下,安全组仅统计可看到的vm count 2020-07-28 20:53:10 +08:00
Zexi Li
632aef4fab Merge pull request #7369 from ioito/automated-cherry-pick-of-#7368-upstream-release-3.3
Automated cherry pick of #7368: fix: 同步sku与磁盘类型关系
2020-07-28 20:48:04 +08:00
Zexi Li
65562c25f5 region: schedtag list support resource_types 2020-07-28 20:46:27 +08:00
Qu Xuan
28a80ac52e fix: 同步sku与磁盘类型关系 2020-07-28 19:47:26 +08:00
Zexi Li
843c52c221 Merge pull request #7365 from zexi/automated-cherry-pick-of-#7364-upstream-release-3.3
Automated cherry pick of #7364: adjust schedule resource condition width
2020-07-28 18:50:23 +08:00
屈轩
bd6b45aaef fix: 避免创建rds备份时对rds进行一些操作 (#7355)
Co-authored-by: Qu Xuan <quxuan@yunionyun.com>
2020-07-28 18:47:58 +08:00
Zexi Li
7103f4e716 adjust schedule resource condition width 2020-07-28 18:36:58 +08:00
Qu Xuan
f03d021aa5 fix: 修复vm绑定重复安全组 2020-07-28 18:12:55 +08:00
Zexi Li
0b8baeef6a Merge pull request #7349 from wanyaoqi/automated-cherry-pick-of-#7348-upstream-release-3.3
Automated cherry pick of #7348: fix schedtag list output
2020-07-27 20:26:55 +08:00
wanyaoqi
2ac39e704a fix schedtag list output 2020-07-27 20:24:40 +08:00
Zexi Li
df63c8ddde Merge pull request #7339 from rainzm/automated-cherry-pick-of-#7338-upstream-release-3.3
Automated cherry pick of #7338: fix(region): Remove default secgroup for esxi guest
2020-07-27 19:49:19 +08:00
Zexi Li
e0b9cec7e8 Merge pull request #7344 from rainzm/automated-cherry-pick-of-#7343-upstream-release-3.3
Automated cherry pick of #7343: fix: modify list details for guesttemplate
2020-07-27 19:48:22 +08:00
Zexi Li
4d96c8fc75 Merge pull request #7347 from swordqiu/automated-cherry-pick-of-#7346-upstream-release-3.3
Automated cherry pick of #7346: fix: add default perform allow policy to sysadmin
2020-07-27 19:47:24 +08:00
Qiu Jian
3f09d00198 fix: add default perform allow policy to sysadmin 2020-07-27 19:11:17 +08:00
Zexi Li
738425170b Merge pull request #7337 from yousong/automated-cherry-pick-of-#7336-upstream-release-3.3
Automated cherry pick of #7336: guests: guests with vpc nics are available for eip association
2020-07-27 15:54:58 +08:00
Zexi Li
27a4696a6d Merge pull request #7323 from swordqiu/automated-cherry-pick-of-#7321-upstream-release-3.3
Automated cherry pick of #7321: fix: choose candidate list from the list returned from backend
2020-07-27 15:54:03 +08:00
Zexi Li
ce13c0cbe9 Merge pull request #7320 from ioito/automated-cherry-pick-of-#7319-upstream-release-3.3
Automated cherry pick of #7319: fix: 单独添加更新账单文件日志
2020-07-27 15:52:53 +08:00
Zexi Li
3617855bcb Merge pull request #7317 from zhaoxiangchun/automated-cherry-pick-of-#7316-upstream-release-3.3
Automated cherry pick of #7316: 修复统一报警bug
2020-07-27 15:51:55 +08:00
Zexi Li
0d66aaa734 Merge pull request #7326 from swordqiu/automated-cherry-pick-of-#7324-upstream-release-3.3
Automated cherry pick of #7324: fix: schedtag should be system resource
2020-07-27 15:50:04 +08:00
Zexi Li
b68c40e5a5 Merge pull request #7331 from swordqiu/automated-cherry-pick-of-#7330-upstream-release-3.3
Automated cherry pick of #7330: fix: do accessibility check when dissociate eip from resource
2020-07-27 15:22:23 +08:00
Zexi Li
c40ececb34 Merge pull request #7329 from tb365/automated-cherry-pick-of-#7327-upstream-release-3.3
Automated cherry pick of #7327: huawei fetch regions&projects fix
2020-07-27 15:22:00 +08:00
rainzm
a66ba3f391 Add metadata for GuestTempalte details 2020-07-27 15:17:55 +08:00
rainzm
02b30326fd Add network info when list scalingGroup details 2020-07-27 15:17:55 +08:00
rainzm
d06d2026f4 fix: modify list details for guesttemplate 2020-07-27 15:17:55 +08:00
Zexi Li
35ddf5da65 Merge pull request #7334 from swordqiu/automated-cherry-pick-of-#7332-upstream-release-3.3
Automated cherry pick of #7332: fix: cloud account delete may fail due to inconsistent status
2020-07-27 15:13:09 +08:00
rainzm
cd01258555 fix(region): Remove default secgroup for esxi guest
1. InitializeData remove all secgroup_id of esxi guest from database
2. Set input.SecgroupId as empty for guest whose GetMaxSecurityGroupCount
return 0
2020-07-27 14:53:45 +08:00
Yousong Zhou
2270704c4f guests: guests with vpc nics are available for eip association 2020-07-27 11:01:47 +08:00
屈轩
f2456d2364 fix: 避免status_code>=400并且resp为空时err为nil (#7265)
Co-authored-by: Qu Xuan <quxuan@yunionyun.com>
2020-07-27 04:42:52 +08:00
yunion-ci-robot
8d1d9ece01 Merge pull request #7312 from ioito/automated-cherry-pick-of-#7310-upstream-release-3.3
Automated cherry pick of #7310: fix: 支持多项目安全组规则过滤
2020-07-26 00:03:54 +08:00
Qiu Jian
f624ab1529 fix: cloud account delete may fail due to inconsistent status 2020-07-25 23:10:24 +08:00
Qiu Jian
ded8da0016 fix: do accessibility check when dissociate eip from resource 2020-07-24 22:54:41 +08:00
yunion-ci-robot
58ed07b4e3 Merge pull request #7304 from wanyaoqi/automated-cherry-pick-of-#7302-upstream-release-3.3
Automated cherry pick of #7302: fix clone clean pending usage
2020-07-24 22:52:43 +08:00
zhaoxiangchun
6193221764 修改报警消息模版:
1.模版中使用ftm.sprintf
  对float类型进行转换,避免消息中数值以十进制的指数次格式显示,提高可读性
2.增加text/tempalte,解决飞书等消息中消息内容被编码的问题
2020-07-24 22:41:11 +08:00
zhaoxiangchun
bb66e2d197 修复统一报警bug
1.对系统内置的规则的处理,可以进行正确判断推送消息
2.一些初始化,validate的判断逻辑的修改
2020-07-24 22:41:11 +08:00
tangbin
92fbc44b6d go fmt 2020-07-24 18:29:15 +08:00
tangbin
d93edbe427 go fmt 2020-07-24 18:29:14 +08:00
tangbin
a4d89b1f6c host upload template check 2020-07-24 18:29:14 +08:00
tangbin
5255df021e huawei fetch regions&projects fix 2020-07-24 18:29:14 +08:00
Qiu Jian
4d33d1a703 fix: schedtag should be system resource 2020-07-24 17:04:45 +08:00
Qiu Jian
c90c0944c1 fix: choose candidate list from the list returned from backend 2020-07-24 16:44:23 +08:00
Qu Xuan
e7fc9b94b0 fix: 单独添加更新账单文件日志 2020-07-24 14:31:36 +08:00
Zexi Li
7512e48236 Merge pull request #7292 from wanyaoqi/automated-cherry-pick-of-#7143-upstream-release-3.3
Automated cherry pick of #7143: - add precheck for perform action
2020-07-24 10:48:14 +08:00
Zexi Li
bb6e4b4610 Merge pull request #7315 from wanyaoqi/automated-cherry-pick-of-#7314-upstream-release-3.3
Automated cherry pick of #7314: rename vgname centos
2020-07-24 10:47:01 +08:00
wanyaoqi
7ef340fb68 rename vgname centos 2020-07-23 21:33:26 +08:00
Qu Xuan
fef5147ae4 fix: 支持多项目安全组规则过滤 2020-07-23 20:36:27 +08:00
Zexi Li
afed84a502 Merge pull request #7309 from swordqiu/automated-cherry-pick-of-#7303-upstream-release-3.3
Automated cherry pick of #7303: fix: domain resource domain share to system when non_default_domain_projects off
2020-07-23 20:34:08 +08:00
wanyaoqi
a329cd536b fix clone clean pending usage 2020-07-23 18:38:34 +08:00
wanyaoqi
32b36ee10e capabilites add available host count 2020-07-23 18:16:23 +08:00
Qiu Jian
671d202271 fix: domain resource domain share to system when non_default_domain_projects off 2020-07-23 17:57:59 +08:00
Zexi Li
7e629b3c80 Merge pull request #7295 from wanyaoqi/automated-cherry-pick-of-#7294-upstream-release-3.3
Automated cherry pick of #7294: fix snapshot clean pending usage
2020-07-23 13:48:03 +08:00
Zexi Li
3d3ff3f866 Merge pull request #7280 from rainzm/automated-cherry-pick-of-#7279-upstream-release-3.3
Automated cherry pick of #7279: feat(scheduler): Change the action for guests with backup and instanceGroup
2020-07-23 13:36:20 +08:00
wanyaoqi
2c27db42c2 fix snapshot clean pending usage 2020-07-23 11:35:39 +08:00
Zexi Li
18dd47c713 Merge pull request #7287 from tb365/automated-cherry-pick-of-#7286-upstream-release-3.3
Automated cherry pick of #7286: apigateway host imports data validate
2020-07-22 21:43:39 +08:00
wanyaoqi
ec933e4805 - add precheck for perform action
- auto switch to backup

- add sync cleand schedule cache

- add reconcile with backup

- add manual reconcile backup
2020-07-22 21:12:32 +08:00
tangbin
2ff5d2aaf4 format fix 2020-07-22 17:50:13 +08:00
tangbin
b5aceb67f9 fix empty else 2020-07-22 17:50:13 +08:00
tangbin
2794c84ac0 fix host import 2020-07-22 17:50:11 +08:00
tangbin
ce9646f9e9 fix huawei delete resource 2020-07-22 17:50:10 +08:00
tangbin
be8da39ce1 fix huawei elb disable healthcheck 2020-07-22 17:50:10 +08:00
tangbin
dacc8adce1 lb sync project fix 2020-07-22 17:50:10 +08:00
tangbin
b79c410b0e add more log 2020-07-22 17:50:09 +08:00
tangbin
b5754d2e3d apigateway host imports data validate 2020-07-22 17:50:09 +08:00
Zexi Li
8a6ee6c9ab Merge pull request #7277 from ioito/automated-cherry-pick-of-#7276-upstream-release-3.3
Automated cherry pick of #7276: fix: 避免未能导出共享安全组规则
2020-07-22 13:55:41 +08:00
Zexi Li
309c1ca3f1 Merge pull request #7274 from swordqiu/automated-cherry-pick-of-#7273-upstream-release-3.3
Automated cherry pick of #7273: fix: image upload not clean pending usage
2020-07-22 13:54:37 +08:00
Zexi Li
f3bc3ca51d Merge pull request #7282 from rainzm/automated-cherry-pick-of-#7281-upstream-release-3.3
Automated cherry pick of #7281: fix(esxi): Select correct unitNumber for ide control when creating disk
2020-07-22 13:52:22 +08:00
Rain Zheng
7c82002903 fix(esxi): Select correct unitNumber for ide control when creating disk 2020-07-21 20:48:39 +08:00
rainzm
2a0c16c6f3 feat(scheduler): Change the action for guests with backup and instanceGroup
1. 对于主机组的打散功能,放在调度的最后单独处理。
2. 主备机的调度,通过在主机和备机之间设置一个粒度为1的主机组来实现。
3. 虚拟机的调度默认打散,在打散的基础上,选择容量大的宿主机。
3. 主备机中,主机和备机的默认打散流程分散开,互不影响。
2020-07-21 20:34:36 +08:00
Qu Xuan
1c4e9e00a5 fix: 避免未能导出共享安全组规则 2020-07-21 17:14:18 +08:00
yunion-ci-robot
3599904eee Merge pull request #7271 from zexi/automated-cherry-pick-of-#7270-upstream-release-3.3
Automated cherry pick of #7270: baremetal: set zone when enable netif
2020-07-21 11:48:24 +08:00
Qiu Jian
ba983df32b fix: image upload not clean pending usage 2020-07-21 01:43:04 +08:00
yunion-ci-robot
194105f4d3 Merge pull request #7268 from tb365/automated-cherry-pick-of-#7267-upstream-release-3.3
Automated cherry pick of #7267: fix GetOrCreateVpcForClassicNetwork
2020-07-20 20:49:28 +08:00
Zexi Li
ea374ac0c0 Merge pull request #7263 from tb365/automated-cherry-pick-of-#7237-upstream-release-3.3
Automated cherry pick of #7237: huawei eip delete fix
2020-07-20 20:47:39 +08:00
Zexi Li
df4d88e195 baremetal: set zone when enable netif 2020-07-20 20:45:06 +08:00
tangbin
f9c4221125 fix GetOrCreateVpcForClassicNetwork 2020-07-20 18:28:48 +08:00
Zexi Li
f246c47a33 Merge pull request #7258 from yousong/bugfix/yousong-lbagent-create-influxdb
[3.3] region: lbagents: skip tls check for default influxdb endpoint url
2020-07-20 12:21:51 +08:00
tangbin
fdcaa1c8e7 huawei eip delete fix 2020-07-20 10:52:31 +08:00
Yousong Zhou
7f7aef031a region: lbagents: skip tls check for default influxdb endpoint url 2020-07-20 09:01:50 +08:00
Zexi Li
1451a75646 Merge pull request #7239 from rainzm/automated-cherry-pick-of-#7238-upstream-release-3.3
Automated cherry pick of #7238: fix: default vpc must be shared globally
2020-07-20 02:09:39 +08:00
Zexi Li
5c57493f5b Merge pull request #7240 from ioito/automated-cherry-pick-of-#7225-upstream-release-3.3
Automated cherry pick of #7225: fix: rds备份恢复优化
2020-07-20 02:07:41 +08:00
Zexi Li
af2bf4e8cd Merge pull request #7229 from wanyaoqi/automated-cherry-pick-of-#7228-upstream-release-3.3
Automated cherry pick of #7228: fix server sync status
2020-07-20 02:06:28 +08:00
Zexi Li
42fbf12d66 Merge pull request #7235 from ioito/automated-cherry-pick-of-#7234-upstream-release-3.3
Automated cherry pick of #7234: fix: globalvpc跟随云账号共享
2020-07-20 02:05:09 +08:00
Zexi Li
1ec53dbf7f Merge pull request #7257 from zhaoxiangchun/automated-cherry-pick-of-#7256-upstream-release-3.3
Automated cherry pick of #7256: 修复监控报警规则删除的问题
2020-07-20 02:03:50 +08:00
Zexi Li
37c2e004fb Merge pull request #7233 from tb365/automated-cherry-pick-of-#7231-upstream-release-3.3
Automated cherry pick of #7231: acl delete condition fix
2020-07-20 02:02:36 +08:00
zhaoxiangchun
c65fc0f1dc 修复监控报警规则删除的问题 2020-07-19 21:29:13 +08:00
Zexi Li
c371e04aaf Merge pull request #7249 from wanyaoqi/automated-cherry-pick-of-#7248-upstream-release-3.3
Automated cherry pick of #7248: fix error output
2020-07-19 20:53:47 +08:00
Zexi Li
9c61ce86cc Merge pull request #7255 from zexi/automated-cherry-pick-of-#7254-upstream-release-3.3
Automated cherry pick of #7254: scheduler: fix storage filter duplicate error message
2020-07-19 20:52:53 +08:00
Zexi Li
d6b1fa02d8 scheduler: fix storage filter duplicate error message 2020-07-19 20:26:56 +08:00
Zexi Li
e3cd4be117 Merge pull request #7253 from swordqiu/automated-cherry-pick-of-#7251-upstream-release-3.3
Automated cherry pick of #7251: fix: quota usage not updated after disk resizing
2020-07-19 20:25:12 +08:00
Qiu Jian
508f30901a fix: quota usage not updated after disk resizing 2020-07-19 13:25:04 +08:00
wanyaoqi
18bae18498 fix error output 2020-07-19 12:35:04 +08:00
Qu Xuan
ecb7249a1d fix: rds备份恢复优化 2020-07-18 20:47:47 +08:00
rainzm
fa67bd8312 fix: default vpc must be shared globally
1. For default vpc, prohibit private operation.
2. For default vpc, prohibit public operation without scope 'system'.
2020-07-18 19:42:19 +08:00
Qu Xuan
f8471832e9 fix: globalvpc跟随云账号共享 2020-07-17 20:46:32 +08:00
tangbin
3e5eceeefa acl delete condition fix 2020-07-17 20:44:52 +08:00
wanyaoqi
0e617ec137 fix server sync status 2020-07-17 20:25:16 +08:00
Zexi Li
9b1ea9f303 Merge pull request #7226 from ioito/automated-cherry-pick-of-#7224-upstream-release-3.3
Automated cherry pick of #7224: fix: 过滤可用eip
2020-07-17 20:25:09 +08:00
Zexi Li
94555e348c Merge pull request #7222 from ioito/automated-cherry-pick-of-#7221-upstream-release-3.3
Automated cherry pick of #7221: fix: 避免乌兰察布区域拉取资源异常
2020-07-17 20:24:01 +08:00
Qu Xuan
23e17fe0a1 fix: 过滤可用eip 2020-07-17 20:16:27 +08:00
Qu Xuan
a443975f7e fix: 避免乌兰察布区域拉取资源异常 2020-07-17 18:52:52 +08:00
Zexi Li
5cd0873ee8 Merge pull request #7217 from rainzm/automated-cherry-pick-of-#7216-upstream-release-3.3
Automated cherry pick of #7216: fix: prefetch image error when create guest with vmware template
2020-07-17 10:16:36 +08:00
Zexi Li
7e796affb3 Merge pull request #7214 from tb365/automated-cherry-pick-of-#7213-upstream-release-3.3
Automated cherry pick of #7213: sync classic redis fix
2020-07-17 10:15:48 +08:00
Zexi Li
4b2cb45b0c Merge pull request #7204 from yousong/automated-cherry-pick-of-#7202-upstream-release-3.3
Automated cherry pick of #7202: mcclient: options: loadbalanceragents: yum as the default deploy method
2020-07-17 10:15:10 +08:00
Zexi Li
dde94aa754 Merge pull request #7199 from yousong/automated-cherry-pick-of-#7198-upstream-release-3.3
Automated cherry pick of #7198: ansibleserver: register metadata manager
2020-07-17 10:11:56 +08:00
Zexi Li
771d8b42aa Merge pull request #7196 from ioito/automated-cherry-pick-of-#7195-upstream-release-3.3
Automated cherry pick of #7195: fix: sec rule export missing fields
2020-07-17 10:10:23 +08:00
Zexi Li
544b62c683 Merge pull request #7193 from wanyaoqi/automated-cherry-pick-of-#7192-upstream-release-3.3
Automated cherry pick of #7192: add params auto_migrate_on_host_down
2020-07-17 10:09:09 +08:00
Zexi Li
1c2c0c75f4 Merge pull request #7211 from ioito/automated-cherry-pick-of-#7210-upstream-release-3.3
Automated cherry pick of #7210: fix: not work for network-list --zones
2020-07-17 10:08:15 +08:00
rainzm
4ef5267a85 fix: prefetch image error when create guest with vmware template
1. Only need the corresponding vmware template in the vcenter where the host is
located.
2. Chose storagecache which cacheimage is ready before deploying.
2020-07-16 21:37:14 +08:00
tangbin
30aa75e047 sync classic redis fix 2020-07-16 20:29:20 +08:00
yunion-ci-robot
1b29a59d8f Merge pull request #7203 from zexi/automated-cherry-pick-of-#7201-upstream-release-3.3
Automated cherry pick of #7201: webconsole: fix old session make new session closed
2020-07-16 20:22:18 +08:00
Qu Xuan
d6b83fbbf8 fix: not work for network-list --zones 2020-07-16 19:06:04 +08:00
Yousong Zhou
f30b191d05 region: lbagents: turn off guest src check 2020-07-16 18:50:05 +08:00
Yousong Zhou
4a0d019b6e region: loadbalanceragents: yum as the default method 2020-07-16 18:50:05 +08:00
Yousong Zhou
5218f8aab3 mcclient: options: loadbalanceragents: yum as the default deploy method 2020-07-16 18:50:05 +08:00
Zexi Li
37ee6f8446 webconsole: fix old session make new session closed 2020-07-16 18:49:54 +08:00
Yousong Zhou
e5dd8efd7a build: ansibleserver: use native alpine, include openssh 2020-07-16 18:09:52 +08:00
Yousong Zhou
916943a7c2 ansibleserver: register metadata manager
To quash the following error in log

  [E 200716 15:20:40 db.(*SMetadataResourceBaseModelManager).FetchCustomizeColumns(metadataresource.go:136)] FetchQueryObjectsByIds metadata fail Error 1146: Table 'yunionansible.metadata_tbl' doesn't exist
2020-07-16 18:09:52 +08:00
Qu Xuan
cee24b2a7d fix: sec rule export missing fields 2020-07-16 17:14:17 +08:00
wanyaoqi
b806e536f1 add params auto_migrate_on_host_down 2020-07-16 15:03:05 +08:00
Zexi Li
0bfba15dfc Merge pull request #7172 from ioito/automated-cherry-pick-of-#7171-upstream-release-3.3
Automated cherry pick of #7171: fix: 修复cloudid get权限问题
2020-07-16 11:19:23 +08:00
Zexi Li
a933d5d7a8 Merge pull request #7175 from ioito/automated-cherry-pick-of-#7174-upstream-release-3.3
Automated cherry pick of #7174: fix: 添加secgroup rule过滤参数
2020-07-16 11:18:49 +08:00
Zexi Li
c09174dd39 Merge pull request #7187 from ioito/automated-cherry-pick-of-#7186-upstream-release-3.3
Automated cherry pick of #7186: fix: clouduser's cloudgroups info
2020-07-16 11:18:09 +08:00
Zexi Li
1a36e3a512 Merge pull request #7189 from ioito/automated-cherry-pick-of-#7188-upstream-release-3.3
Automated cherry pick of #7188: fix: check azure image format when rebuild root
2020-07-16 11:09:31 +08:00
Zexi Li
cac1db5391 Merge pull request #7178 from ioito/automated-cherry-pick-of-#7177-upstream-release-3.3
Automated cherry pick of #7177: fix: 避免华为云安全组规则删除失败
2020-07-16 10:15:30 +08:00
Qu Xuan
1b5b8081f1 fix: check azure image format when rebuild root 2020-07-15 18:48:00 +08:00
Zexi Li
52e02d85b9 Merge pull request #7184 from wanyaoqi/automated-cherry-pick-of-#7151-upstream-release-3.3
Automated cherry pick of #7151: disable procutils print error info
2020-07-15 17:43:06 +08:00
Zexi Li
14f10307c1 Merge pull request #7182 from wanyaoqi/automated-cherry-pick-of-#7181-upstream-release-3.3
Automated cherry pick of #7181: misc ha guest fix
2020-07-15 17:42:44 +08:00
Qu Xuan
64599b4819 fix: 避免华为云安全组规则删除失败 2020-07-15 17:13:55 +08:00
Qu Xuan
fb229f6c79 fix: clouduser's cloudgroups info 2020-07-15 17:09:23 +08:00
wanyaoqi
65408519ae misc ha guest fix 2020-07-15 17:06:02 +08:00
wanyaoqi
4831aee2dc disable procutils print error info 2020-07-15 17:02:11 +08:00
Qu Xuan
a5fc7c807c fix: 添加secgroup rule过滤参数 2020-07-15 14:31:43 +08:00
Qu Xuan
09f2b2af26 fix: 修复cloudid get权限问题 2020-07-15 11:08:17 +08:00
Zexi Li
2b923eb5b7 Merge pull request #7169 from wanyaoqi/automated-cherry-pick-of-#7168-upstream-release-3.3
Automated cherry pick of #7168: fix list guests on host
2020-07-15 10:45:59 +08:00
Zexi Li
ebe81b9c51 Merge pull request #7167 from ioito/automated-cherry-pick-of-#7166-upstream-release-3.3
Automated cherry pick of #7166: fix: 修复cloudid用户列表权限问题
2020-07-15 10:35:58 +08:00
Zexi Li
b31f35ba26 Merge pull request #7159 from yousong/automated-cherry-pick-of-#7158-upstream-release-3.3
Automated cherry pick of #7158: iproute2: address: make Exact idempotent
2020-07-15 10:34:36 +08:00
Zexi Li
f9c6a23280 Merge pull request #7165 from tb365/automated-cherry-pick-of-#7163-upstream-release-3.3
Automated cherry pick of #7163: cloudprovider usable filter with zone
2020-07-15 10:33:59 +08:00
wanyaoqi
f09eb6690d fix list guests on host 2020-07-14 22:34:48 +08:00
Qu Xuan
c003f78f62 fix: azure 支持权限 2020-07-14 21:24:24 +08:00
Qu Xuan
26434683c4 fix: 修复cloudid用户列表权限问题 2020-07-14 21:10:59 +08:00
tangbin
26757cb8d8 cloudprovider usable filter with zone 2020-07-14 19:55:51 +08:00
Zexi Li
c90420b61f Merge pull request #7156 from ioito/automated-cherry-pick-of-#7155-upstream-release-3.3
Automated cherry pick of #7155: fix: 优化webconsole代码&bugfix
2020-07-14 17:53:04 +08:00
Yousong Zhou
4b6d385e1a iproute2: address: make Exact idempotent
Idempotence against address not available for Exact is not a bad idea if
we look at the name of that func

This should accomodate the race condition where keepalived will remove
vips should the primary address used for vrrp comms is removed, causing
later addr del to fail with "cannot assign requested address"
2020-07-14 16:41:48 +08:00
Qu Xuan
ea3097240e fix: 优化webconsole代码&bugfix 2020-07-14 15:08:58 +08:00
Zexi Li
1881789981 Merge pull request #7153 from zexi/automated-cherry-pick-of-#7152-upstream-release-3.3
Automated cherry pick of #7152: climc: refactor k8s resource
2020-07-14 12:19:35 +08:00
Zexi Li
a6db3d353c climc: refactor k8s resource 2020-07-14 11:45:39 +08:00
Zexi Li
4882ead845 Merge pull request #7146 from rainzm/automated-cherry-pick-of-#7145-upstream-release-3.3
Automated cherry pick of #7145: fix guest template health check
2020-07-14 11:35:43 +08:00
Zexi Li
8a8d0e1cb3 Merge pull request #7148 from rainzm/automated-cherry-pick-of-#7147-upstream-release-3.3
Automated cherry pick of #7147: fix: mo.VirtualMachine's Config maybe nil
2020-07-14 11:34:43 +08:00
Zexi Li
bb2e014514 Merge pull request #7144 from zexi/hotfix/remove-informer-informer-3.3
remove informer code for release/3.3
2020-07-14 11:34:08 +08:00
rainzm
0420266b7d fix: mo.VirtualMachine's Config maybe nil 2020-07-13 23:09:57 +08:00
rainzm
550883197f fix guest template health check 2020-07-13 22:56:18 +08:00
Zexi Li
a365a0f459 remove informer code for release/3.3 2020-07-13 21:40:02 +08:00
Zexi Li
5d82212284 Merge pull request #7137 from tb365/automated-cherry-pick-of-#7135-upstream-release-3.3
Automated cherry pick of #7135: user batch register bugfix
2020-07-13 21:28:44 +08:00
Zexi Li
99caf7b142 Merge pull request #7141 from ioito/automated-cherry-pick-of-#7140-upstream-release-3.3
Automated cherry pick of #7140: fix: 修复阿里云同步安全组规则异常问题
2020-07-13 21:24:31 +08:00
Qu Xuan
2f42e9e5f4 fix: 修复阿里云同步安全组规则异常问题 2020-07-13 20:45:41 +08:00
tangbin
b52eb8491c user batch register bugfix 2020-07-13 14:58:26 +08:00
Zexi Li
32638ac3c0 Merge pull request #7131 from wanyaoqi/automated-cherry-pick-of-#7130-upstream-release-3.3
Automated cherry pick of #7130: vendor update: update jsonutils
2020-07-10 20:18:12 +08:00
Zexi Li
2bc5db8d20 Merge pull request #7126 from wanyaoqi/automated-cherry-pick-of-#7125-upstream-release-3.3
Automated cherry pick of #7125: - fix local storage init local man
2020-07-10 20:15:39 +08:00
wanyaoqi
d335c570c6 vendor update: update jsonutils 2020-07-10 16:18:54 +08:00
wanyaoqi
fe472cbf49 - fix local storage init local man
- fix rbd set storage info
2020-07-10 14:48:58 +08:00
Zexi Li
c17436cdb0 Merge pull request #7124 from swordqiu/automated-cherry-pick-of-#7123-upstream-release-3.3
Automated cherry pick of #7123: hotfix: vpc change owners with wire
2020-07-10 10:27:44 +08:00
Zexi Li
a2d7854fb7 Merge pull request #7122 from wanyaoqi/automated-cherry-pick-of-#7121-upstream-release-3.3
Automated cherry pick of #7121: misc fix
2020-07-10 10:27:15 +08:00
Zexi Li
39776f339a Merge pull request #7120 from ioito/automated-cherry-pick-of-#7119-upstream-release-3.3
Automated cherry pick of #7119: fix: 避免google clouduser同步权限异常
2020-07-10 10:26:51 +08:00
Qiu Jian
c97e2ab1c2 hotfix: vpc change owners with wire 2020-07-10 01:50:28 +08:00
wanyaoqi
5070775cd3 misc fix 2020-07-09 22:22:12 +08:00
Qu Xuan
7056fa01b4 fix: 避免google clouduser同步权限异常 2020-07-09 21:37:33 +08:00
Zexi Li
3f391649c6 Merge pull request #7117 from ioito/automated-cherry-pick-of-#7116-upstream-release-3.3
Automated cherry pick of #7116: fix: 修复vpc同步异常问题
2020-07-09 21:23:11 +08:00
Zexi Li
f73e11b0bd Merge pull request #7107 from wanyaoqi/automated-cherry-pick-of-#7106-upstream-release-3.3
Automated cherry pick of #7106: fix set storage info bind mount
2020-07-09 21:23:00 +08:00
Zexi Li
99cf724d2c Merge pull request #7114 from ioito/automated-cherry-pick-of-#7113-upstream-release-3.3
Automated cherry pick of #7113: fix: 避免越界访问
2020-07-09 21:21:17 +08:00
Qu Xuan
ef6d0c2adc fix: 修复vpc同步异常问题 2020-07-09 21:05:09 +08:00
Qu Xuan
09ccf107cb fix: 避免越界访问 2020-07-09 20:24:41 +08:00
yunion-ci-robot
cea59e8794 Merge pull request #7105 from tb365/automated-cherry-pick-of-#7096-upstream-release-3.3
Automated cherry pick of #7096: update vendor
2020-07-09 16:13:57 +08:00
wanyaoqi
18a023f2fb fix set storage info bind mount 2020-07-09 14:54:53 +08:00
Zexi Li
4c1d9e5e0f Merge pull request #7103 from swordqiu/automated-cherry-pick-of-#7102-upstream-release-3.3
Automated cherry pick of #7102: fix: opslog show the owners operation logs only
2020-07-09 14:18:55 +08:00
Zexi Li
db43b87568 Merge pull request #7101 from swordqiu/automated-cherry-pick-of-#7100-upstream-release-3.3
Automated cherry pick of #7100: fix: remove default allow policy for storages
2020-07-09 14:06:59 +08:00
Zexi Li
25d34f34b0 Merge pull request #7099 from ioito/automated-cherry-pick-of-#7098-upstream-release-3.3
Automated cherry pick of #7098: fix: cloudid 权限修复
2020-07-09 14:03:37 +08:00
tangbin
13f44debcd update vendor 2020-07-09 13:42:03 +08:00
Qiu Jian
a186f25871 fix: opslog show the owners operation logs only 2020-07-09 11:26:13 +08:00
Qiu Jian
8f7223b1d6 fix: remove default allow policy for storages 2020-07-09 11:15:19 +08:00
Qu Xuan
05c730acea fix: cloudid 权限修复 2020-07-09 10:46:50 +08:00
Zexi Li
b921d993ab Merge pull request #7097 from ioito/automated-cherry-pick-of-#7083-upstream-release-3.3
Automated cherry pick of #7083: fix: cloudid 异常修复
2020-07-08 21:26:09 +08:00
Zexi Li
434e0d8be2 Merge pull request #7094 from ioito/automated-cherry-pick-of-#7093-upstream-release-3.3
Automated cherry pick of #7093: fix: 修复资源组云上同步异常问题
2020-07-08 21:24:25 +08:00
Qu Xuan
b4ed259633 fix: cloudid 异常修复 2020-07-08 21:01:19 +08:00
Qu Xuan
89cb75bfeb fix: 修复资源组云上同步异常问题 2020-07-08 16:25:41 +08:00
Zexi Li
1ca0859d51 Merge pull request #7092 from ioito/automated-cherry-pick-of-#7091-upstream-release-3.3
Automated cherry pick of #7091: fix: 修复qcloud同步权限组异常问题
2020-07-08 14:10:42 +08:00
Zexi Li
f62bd8968e Merge pull request #7086 from ioito/automated-cherry-pick-of-#7085-upstream-release-3.3
Automated cherry pick of #7085: fix: 避免请求中国区iam异常
2020-07-08 14:10:19 +08:00
Zexi Li
136f2c547d Merge pull request #7080 from ioito/automated-cherry-pick-of-#7079-upstream-release-3.3
Automated cherry pick of #7079: fix: 修复腾讯云操作日志时间异常问题
2020-07-08 14:09:32 +08:00
Zexi Li
1caf8b6c0b Merge pull request #7089 from ioito/automated-cherry-pick-of-#7088-upstream-release-3.3
Automated cherry pick of #7088: fix: 修复azure 项目同步问题
2020-07-08 01:38:02 +08:00
Zexi Li
8f6b72bb82 Merge pull request #7084 from swordqiu/automated-cherry-pick-of-#7069-upstream-release-3.3
Automated cherry pick of #7069: fix: perform private on vpc will private all wires if no networks in wires
2020-07-07 22:37:45 +08:00
Qu Xuan
21178638f0 fix: 修复qcloud同步权限组异常问题 2020-07-07 19:48:53 +08:00
Qu Xuan
e8ff39a011 fix: 修复azure 项目同步问题 2020-07-07 18:44:09 +08:00
Qu Xuan
5f9b6622f0 fix: 避免请求中国区iam异常 2020-07-07 16:56:45 +08:00
Qiu Jian
2286ef19b4 fix: perform private on vpc will private all wires if no networks in wires 2020-07-07 16:14:28 +08:00
Qu Xuan
8a1d2d1eaf fix: 修复腾讯云操作日志时间异常问题 2020-07-07 14:58:49 +08:00
Zexi Li
adc50ec864 Merge pull request #7055 from ioito/automated-cherry-pick-of-#7054-upstream-release-3.3
Automated cherry pick of #7054: fix: 避免cloudprovider同步缺失
2020-07-07 14:49:03 +08:00
Zexi Li
4963d750fb Merge pull request #7060 from ioito/automated-cherry-pick-of-#7059-upstream-release-3.3
Automated cherry pick of #7059: fix: cloud poilcy count
2020-07-07 14:48:17 +08:00
Zexi Li
8bc891590d Merge pull request #7072 from ioito/automated-cherry-pick-of-#7066-upstream-release-3.3
Automated cherry pick of #7066: fix: json request 支持自定义匹配err
2020-07-07 14:46:44 +08:00
Zexi Li
efbf033c2d Merge pull request #7052 from ioito/automated-cherry-pick-of-#7050-upstream-release-3.3
Automated cherry pick of #7050: fix: google rds regional and zonal
2020-07-07 14:45:44 +08:00
Zexi Li
4fe7006920 Merge pull request #7078 from ioito/automated-cherry-pick-of-#7077-upstream-release-3.3
Automated cherry pick of #7077: fix: 修复elastic cache sku zone_id异常问题
2020-07-07 14:44:12 +08:00
Zexi Li
5e0d66d5df Merge pull request #7075 from ioito/automated-cherry-pick-of-#7074-upstream-release-3.3
Automated cherry pick of #7074: fix: 分开统计安全组关联虚拟机数量
2020-07-07 14:43:35 +08:00
Qu Xuan
76906efea2 fix: 修复elastic cache sku zone_id异常问题 2020-07-07 12:11:58 +08:00
Qu Xuan
a997cf4982 fix: 分开统计安全组关联虚拟机数量 2020-07-07 11:49:11 +08:00
Qu Xuan
6ac6768e36 fix: json request 支持自定义匹配err 2020-07-07 11:16:58 +08:00
Zexi Li
acdc1dafd3 Merge pull request #7068 from swordqiu/automated-cherry-pick-of-#7067-upstream-release-3.3
Automated cherry pick of #7067: fix: remove default host list policy
2020-07-07 11:14:44 +08:00
Zexi Li
b60c97822d Merge pull request #7057 from yousong/automated-cherry-pick-of-#7056-upstream-release-3.3
Automated cherry pick of #7056: vpcagent: ClaimVpcGuestDnsRecords: guard against pending_deleted guests
2020-07-07 11:13:53 +08:00
Zexi Li
279d1398cc Merge pull request #7062 from rainzm/automated-cherry-pick-of-#7061-upstream-release-3.3
Automated cherry pick of #7061: Update docker image onecloud-base and its references
2020-07-07 11:12:46 +08:00
Qiu Jian
eb342a70ab fix: remove default host list policy 2020-07-06 22:05:40 +08:00
rainzm
eb7b055ca2 Update docker image onecloud-base and its references 2020-07-06 21:00:22 +08:00
Qu Xuan
367d3f1470 fix: cloud poilcy count 2020-07-06 17:17:32 +08:00
Yousong Zhou
821283952d vpcagent: ClaimVpcGuestDnsRecords: guard against pending_deleted guests 2020-07-06 16:45:22 +08:00
Qu Xuan
e7cd84275e fix: 避免cloudprovider同步缺失 2020-07-06 16:27:06 +08:00
Zexi Li
4bd60ccd38 Merge pull request #7051 from zhaoxiangchun/automated-cherry-pick-of-#7046-upstream-release-3.3
Automated cherry pick of #7046: 增加influxdb的tag 的一些filter
2020-07-06 11:47:14 +08:00
Qu Xuan
79d0169855 fix: google rds regional and zonal 2020-07-06 11:18:25 +08:00
zhaoxiangchun
5db35871eb 增加influxdb的tag 的一些filter 2020-07-06 11:09:29 +08:00
Zexi Li
21d67a4297 Merge pull request #7043 from swordqiu/automated-cherry-pick-of-#7042-upstream-release-3.3
Automated cherry pick of #7042: feature: project filter that list jointable projects for user or group
2020-07-04 12:11:27 +08:00
Zexi Li
dcf4e3ebf2 Merge pull request #7032 from ioito/automated-cherry-pick-of-#7031-upstream-release-3.3
Automated cherry pick of #7031: fix: 避免azure同步资源组异常
2020-07-04 12:10:34 +08:00
Zexi Li
d15259cd5e Merge pull request #7037 from swordqiu/automated-cherry-pick-of-#7036-upstream-release-3.3
Automated cherry pick of #7036: fix: cloud account sync may block
2020-07-04 12:04:53 +08:00
Qiu Jian
b49272eb35 feature: project filter that list jointable projects for user or group 2020-07-04 11:35:13 +08:00
Qiu Jian
6133b1a5cc fix: cloud account sync may block 2020-07-04 10:23:39 +08:00
Qu Xuan
fcf1e193b9 fix: 避免azure同步资源组异常 2020-07-03 20:49:12 +08:00
Zexi Li
35f75db920 Merge pull request #7010 from ioito/automated-cherry-pick-of-#7009-upstream-release-3.3
Automated cherry pick of #7009: fix: 取消aliyun lb scheduler创建限制
2020-07-03 19:24:33 +08:00
Zexi Li
42ad035e56 Merge pull request #7030 from ioito/automated-cherry-pick-of-#7029-upstream-release-3.3
Automated cherry pick of #7029: fix: 避免slave zoneid异常
2020-07-03 19:23:55 +08:00
Qu Xuan
f303512a7c fix: 避免slave zoneid异常 2020-07-03 19:06:15 +08:00
Zexi Li
5ff0613ef3 Merge pull request #7026 from ioito/automated-cherry-pick-of-#7025-upstream-release-3.3
Automated cherry pick of #7025: fix: clouduser can_delete always be false
2020-07-03 18:43:37 +08:00
yunion-ci-robot
c5d448cbb3 Merge pull request #7028 from rainzm/automated-cherry-pick-of-#7027-upstream-release-3.3
Automated cherry pick of #7027: Update Dockerfile.ansibleserver
2020-07-03 18:33:44 +08:00
rainzm
69a4b12724 Update Dockerfile.ansibleserver 2020-07-03 18:22:59 +08:00
Zexi Li
b63dc0f91d Merge pull request #7021 from ioito/automated-cherry-pick-of-#7020-upstream-release-3.3
Automated cherry pick of #7020: fix: 优化安全组list速度,并发挥rule规则信息
2020-07-03 17:39:33 +08:00
Qu Xuan
acf641be26 fix: 同步不需要判断账号是否有iam权限 2020-07-03 17:38:09 +08:00
Qu Xuan
a54a9c05b1 fix: clouduser can_delete always be false 2020-07-03 17:18:58 +08:00
yunion-ci-robot
1ace096c5b Merge pull request #6987 from swordqiu/automated-cherry-pick-of-#6986-upstream-release-3.3
Automated cherry pick of #6986: fix: validate candiate ip for sync-fix-nics
2020-07-03 16:35:27 +08:00
Qu Xuan
dc3ef5c61e fix: 优化安全组list速度,并发挥rule规则信息 2020-07-03 15:53:02 +08:00
Zexi Li
5533d5131b Merge pull request #7003 from ioito/automated-cherry-pick-of-#6961-upstream-release-3.3
Automated cherry pick of #6961: fix: 优化sku同步逻辑
2020-07-03 11:40:19 +08:00
Zexi Li
31a4822aea Merge pull request #7019 from ioito/automated-cherry-pick-of-#7017-upstream-release-3.3
Automated cherry pick of #7017: fix: 修复cloudid同步问题
2020-07-03 11:39:12 +08:00
Qu Xuan
9c62343075 fix: 公有云子账号加域属性 2020-07-03 11:15:19 +08:00
Qu Xuan
544c19f3ce fix: 修复cloudid同步问题 2020-07-03 11:15:19 +08:00
yunion-ci-robot
7e30803175 Merge pull request #7002 from tb365/automated-cherry-pick-of-#7000-upstream-release-3.3
Automated cherry pick of #7000: cluster_d required->optional
2020-07-02 20:29:27 +08:00
Zexi Li
25c20ec6f8 Merge pull request #7004 from ioito/automated-cherry-pick-of-#6998-upstream-release-3.3
Automated cherry pick of #6998: fix: manager_id资源隔离获取
2020-07-02 20:20:35 +08:00
Zexi Li
4b2086e0b4 Merge pull request #7013 from zexi/automated-cherry-pick-of-#7012-upstream-release-3.3
Automated cherry pick of #7012: monitor: reduce subscription mysql usage
2020-07-02 20:19:25 +08:00
Zexi Li
220fc57201 Merge pull request #7007 from wanyaoqi/automated-cherry-pick-of-#7006-upstream-release-3.3
Automated cherry pick of #7006: bind mount nfs storage path
2020-07-02 17:35:25 +08:00
Zexi Li
de889ec6cc monitor: reduce subscription mysql usage 2020-07-02 17:34:26 +08:00
Qu Xuan
82d0f5c03f fix: 取消aliyun lb scheduler创建限制 2020-07-02 15:44:19 +08:00
wanyaoqi
5db73a6670 bind mount nfs storage path 2020-07-02 14:34:16 +08:00
Qu Xuan
66fc71cc81 fix: manager_id资源隔离获取 2020-07-02 14:27:53 +08:00
Qu Xuan
04427515fa fix: 优化sku同步逻辑 2020-07-02 14:26:46 +08:00
tangbin
87cf251d2d cluster_d required->optional 2020-07-02 11:55:15 +08:00
Zexi Li
029233a5a4 Merge pull request #6995 from rainzm/automated-cherry-pick-of-#6994-upstream-release-3.3
Automated cherry pick of #6994: fix: Override Master and Slave for scalinggroup_guest
2020-07-02 10:34:50 +08:00
Zexi Li
57ae145034 Merge pull request #6989 from rainzm/automated-cherry-pick-of-#6988-upstream-release-3.3
Automated cherry pick of #6988: update jsonutils
2020-07-02 10:34:20 +08:00
Zexi Li
6f72aadf39 Merge pull request #6997 from tb365/automated-cherry-pick-of-#6996-upstream-release-3.3
Automated cherry pick of #6996: copyright api update
2020-07-02 10:24:25 +08:00
tangbin
a3245195ab copyright api update 2020-07-01 20:02:25 +08:00
Zexi Li
eb6d0ed5f0 Merge pull request #6985 from lvyangyang/automated-cherry-pick-of-#6913-upstream-release-3.3
Automated cherry pick of #6913: add: region/openstack 迁移接入
2020-07-01 19:29:56 +08:00
Zexi Li
160a315d7b Merge pull request #6991 from rainzm/automated-cherry-pick-of-#6990-upstream-release-3.3
Automated cherry pick of #6990: fix the bug introduced in #6643
2020-07-01 19:26:28 +08:00
rainzm
23c76dc796 fix: Override Master and Slave for scalinggroup_guest 2020-07-01 17:23:59 +08:00
rainzm
9685684876 fix the bug introduced in #6643 2020-07-01 16:52:27 +08:00
rainzm
b4884e3dde update jsonutils 2020-07-01 16:32:03 +08:00
Zexi Li
22c915d617 Merge pull request #6968 from ioito/automated-cherry-pick-of-#6903-upstream-release-3.3
Automated cherry pick of #6903: fix: 修正项目映射同步
2020-07-01 16:29:55 +08:00
lvyangyang
386746365d add: region/openstack 迁移接入 2020-07-01 16:28:29 +08:00
Zexi Li
f97c397b13 Merge pull request #6983 from ioito/automated-cherry-pick-of-#6982-upstream-release-3.3
Automated cherry pick of #6982: fix: capability for cloudid
2020-07-01 14:36:54 +08:00
Qiu Jian
41a9d92421 fix: validate candiate ip for sync-fix-nics 2020-07-01 14:17:58 +08:00
Qu Xuan
781cc3ed6b fix: capability for cloudid 2020-07-01 11:21:10 +08:00
Zexi Li
f8938b819c Merge pull request #6973 from ioito/automated-cherry-pick-of-#6972-upstream-release-3.3
Automated cherry pick of #6972: fix: 修复cloudid问题
2020-06-30 23:08:10 +08:00
Zexi Li
87043ebb5c Merge pull request #6976 from wanyaoqi/automated-cherry-pick-of-#6975-upstream-release-3.3
Automated cherry pick of #6975: fix deploy backup server order
2020-06-30 23:07:28 +08:00
wanyaoqi
207cd93fe0 fix deploy backup server order 2020-06-30 22:02:40 +08:00
Qu Xuan
45819e6c12 fix: 避免未本地缓存usercache 2020-06-30 21:09:24 +08:00
Qu Xuan
223c9439b1 fix: 修复cloudid问题 2020-06-30 21:09:23 +08:00
Zexi Li
9fb62eb504 Merge pull request #6955 from wanyaoqi/automated-cherry-pick-of-#6954-upstream-release-3.3
Automated cherry pick of #6954: include system usage
2020-06-30 12:07:58 +08:00
Zexi Li
8842b97ca0 Merge pull request #6963 from ioito/automated-cherry-pick-of-#6962-upstream-release-3.3
Automated cherry pick of #6962: fix: 避免同步不到其他域的云账号
2020-06-30 12:06:42 +08:00
Zexi Li
5ecb97d532 Merge pull request #6967 from ioito/automated-cherry-pick-of-#6966-upstream-release-3.3
Automated cherry pick of #6966: fix: 修复权限组权限同步异常问题
2020-06-30 12:03:38 +08:00
Zexi Li
e20e308ac6 Merge pull request #6965 from swordqiu/automated-cherry-pick-of-#6964-upstream-release-3.3
Automated cherry pick of #6964: fix: reduce totp verification overhead
2020-06-30 12:01:39 +08:00
Zexi Li
10052eb330 Merge pull request #6971 from yousong/automated-cherry-pick-of-#6970-upstream-release-3.3
Automated cherry pick of #6970: cloudcommon: taskman: fix table insert
2020-06-30 11:59:57 +08:00
Yousong Zhou
986878289e cloudcommon: taskman: fix table insert
Fix the following error

	run error: reflect: NumField of non-struct type *taskman.STask

Fixes 08cd41b60d ("cloudcommon: taskman: SetModelManager")

Reported-by: Qu Xuan <quxuan@yunionyun.com>
2020-06-30 11:55:49 +08:00
Qu Xuan
e31334b471 fix: 支持同步project标签到本地资源 2020-06-30 11:51:26 +08:00
Qu Xuan
b25295bf03 fix: 修正项目映射同步 2020-06-30 11:51:26 +08:00
Qu Xuan
21a09d29d6 fix: 修复权限组权限同步异常问题 2020-06-30 10:55:23 +08:00
Zexi Li
5de04ebdf4 Merge pull request #6948 from swordqiu/automated-cherry-pick-of-#6947-upstream-release-3.3
Automated cherry pick of #6947: fix: disable domain sharing if non_default_domain_projects turned off
2020-06-30 10:48:18 +08:00
Qiu Jian
265bbc6e77 fix: reduce totp verification overhead 2020-06-30 02:32:25 +08:00
Qu Xuan
ef0242d15b fix: 避免同步不到其他域的云账号 2020-06-29 20:35:07 +08:00
Zexi Li
0d1826644b Merge pull request #6958 from yousong/automated-cherry-pick-of-#6957-upstream-release-3.3
Automated cherry pick of #6957: cloudcommon: taskman: SetModelManager
2020-06-29 19:36:59 +08:00
Zexi Li
77d1ac7056 Merge pull request #6956 from wanyaoqi/automated-cherry-pick-of-#6950-upstream-release-3.3
Automated cherry pick of #6950: - add server pending deleted for host details
2020-06-29 19:36:09 +08:00
Zexi Li
d20654575c Merge pull request #6953 from rainzm/automated-cherry-pick-of-#6952-upstream-release-3.3
Automated cherry pick of #6952: fix: Error occurs when suitableWire exists or all suitableNetwork exist.
2020-06-29 19:27:32 +08:00
Yousong Zhou
60293ef052 cloudcommon: tablespec: informer: use %#v to log bad obj
Fixes 145c88f79b ("cloudcommon: tablespec: informer: log obj type")
2020-06-29 14:47:14 +08:00
Yousong Zhou
db9789c868 cloudcommon: taskman: SetModelManager 2020-06-29 14:47:14 +08:00
wanyaoqi
8751082487 - add server pending deleted for host details
- host list by server networks

- guest networks return wire id
2020-06-29 11:41:00 +08:00
wanyaoqi
89ec83fec3 include system usage 2020-06-28 20:44:01 +08:00
rainzm
030a2edfb9 fix: Error occurs when suitableWire exists or all suitableNetwork exist. 2020-06-28 16:59:36 +08:00
Qiu Jian
a23f57da4d fix: disable domain sharing if non_default_domain_projects turned off 2020-06-28 13:25:38 +08:00
Zexi Li
561465e7e8 Merge pull request #6944 from yousong/automated-cherry-pick-of-#6943-upstream-release-3.3
Automated cherry pick of #6943: lb: include cluster name info in details
2020-06-28 09:01:37 +08:00
Yousong Zhou
5f49670e18 lb: include cluster name info in details 2020-06-24 18:54:10 +08:00
Zexi Li
fa521da2cd Merge pull request #6934 from wanyaoqi/automated-cherry-pick-of-#6933-upstream-release-3.3
Automated cherry pick of #6933: server name enable upper case
2020-06-24 17:42:22 +08:00
Zexi Li
fb0e4e093f Merge pull request #6919 from ioito/automated-cherry-pick-of-#6918-upstream-release-3.3
Automated cherry pick of #6918: fix: 避免azure同步项目失败
2020-06-24 12:59:34 +08:00
Zexi Li
6a64efb7e5 Merge pull request #6927 from ioito/automated-cherry-pick-of-#6926-upstream-release-3.3
Automated cherry pick of #6926: fix: google资源名称兼容处理
2020-06-23 23:29:32 +08:00
Zexi Li
2fa8e1b658 Merge pull request #6937 from swordqiu/automated-cherry-pick-of-#6936-upstream-release-3.3
Automated cherry pick of #6936: fix: sort quota list result by usage rate
2020-06-23 23:27:54 +08:00
Zexi Li
202f6b4be2 Merge pull request #6932 from swordqiu/automated-cherry-pick-of-#6931-upstream-release-3.3
Automated cherry pick of #6931: fix: keystone project resource count not accurate
2020-06-23 23:26:38 +08:00
Qiu Jian
9012180b60 fix: sort quota list result by usage rate 2020-06-23 22:23:34 +08:00
Zexi Li
33d9ef948a Merge pull request #6922 from swordqiu/automated-cherry-pick-of-#6921-upstream-release-3.3
Automated cherry pick of #6921: fix: simplify forbidden user login message
2020-06-23 21:25:58 +08:00
wanyaoqi
6f20638f8b server name enable upper case 2020-06-23 21:05:30 +08:00
Qiu Jian
161db6d95f fix: keystone project resource count not accurate 2020-06-23 21:03:30 +08:00
Qu Xuan
4f5a2ff433 fix: google资源名称兼容处理 2020-06-23 20:30:31 +08:00
Qiu Jian
611b9e9b5e fix: simplify forbidden user login message 2020-06-23 17:47:20 +08:00
Qu Xuan
f8cce28926 fix: 避免azure同步项目失败 2020-06-23 17:32:25 +08:00
Zexi Li
965b51c633 Merge pull request #6914 from wanyaoqi/automated-cherry-pick-of-#6904-upstream-release-3.3
Automated cherry pick of #6904: fix get storage capabilities with null field
2020-06-23 11:53:52 +08:00
Zexi Li
20443286f6 Merge pull request #6915 from ioito/automated-cherry-pick-of-#6912-upstream-release-3.3
Automated cherry pick of #6912: optimized: 支持ip和端口过滤安全组
2020-06-23 11:52:27 +08:00
Qu Xuan
f12192f1c4 optimized: 支持ip和端口过滤安全组 2020-06-23 11:26:09 +08:00
wanyaoqi
615fe1da8b fix get storage capabilities with null field 2020-06-23 10:54:27 +08:00
yunion-ci-robot
0ec55c87c1 Merge pull request #6907 from wanyaoqi/automated-cherry-pick-of-#6906-upstream-release-3.3
Automated cherry pick of #6906: disable dhclient
2020-06-22 23:42:03 +08:00
wanyaoqi
9a6c26de1c disable dhclient 2020-06-22 21:30:27 +08:00
Zexi Li
c44a8e0b77 Merge pull request #6894 from yousong/automated-cherry-pick-of-#6893-upstream-release-3.3
Automated cherry pick of #6893: cloudcommon: app: cosmetic change
2020-06-22 09:15:19 +08:00
Zexi Li
afaf9406e8 Merge pull request #6900 from yousong/automated-cherry-pick-of-#6899-upstream-release-3.3
Automated cherry pick of #6899: cloudcommon: tablespec: informer: log obj type
2020-06-22 09:10:18 +08:00
Yousong Zhou
f1dfcd5e06 keystone: passwords: SetModelManager
To quash avoid informer error "virtual object is nil"
2020-06-21 18:53:28 +08:00
Yousong Zhou
7d47ac4dd7 keystone: config: SetModelManager for whitelisted config
To quash avoid informer error "virtual object is nil"
2020-06-21 18:53:28 +08:00
Yousong Zhou
2f79c99dc7 cloudcommon: tablespec: informer: log obj type 2020-06-21 18:53:28 +08:00
Yousong Zhou
aeba29c4b3 cloudcommon: policy: fix interval and oneshot sync
Reduce CPU utilization caused by queued time.AfterFunc calls
2020-06-21 18:33:41 +08:00
Yousong Zhou
28e83a3125 cloudcommon: app: cosmetic change 2020-06-21 18:33:41 +08:00
677 changed files with 16360 additions and 7190 deletions

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@@ -28,6 +28,7 @@ func init() {
ClouduserId string `json:"clouduser_id"`
CloudpolicyId string `json:"cloudpolicy_id"`
Usable bool `json:"usable"`
}
R(&CloudgroupListOptions{}, "cloud-group-list", "List cloud groups", func(s *mcclient.ClientSession, opts *CloudgroupListOptions) error {
params, err := options.ListStructToParams(opts)

View File

@@ -15,6 +15,8 @@
package compute
import (
"fmt"
"yunion.io/x/jsonutils"
"yunion.io/x/onecloud/pkg/mcclient"
@@ -78,4 +80,30 @@ func init() {
printObject(result)
return nil
})
R(&GlobalVpcShowOptions{}, "global-vpc-change-owner-candidate-domains", "Show candiate domains of a global vpc for changing owner", func(s *mcclient.ClientSession, args *GlobalVpcShowOptions) error {
result, err := modules.GlobalVpcs.GetSpecific(s, args.ID, "change-owner-candidate-domains", nil)
if err != nil {
return err
}
printObject(result)
return nil
})
type GlobalVpcChangeOwnerOptions struct {
ID string `help:"ID or name of vpc" json:"-"`
ProjectDomain string `json:"project_domain" help:"target domain"`
}
R(&GlobalVpcChangeOwnerOptions{}, "global-vpc-change-owner", "Change owner domain of a global vpc", func(s *mcclient.ClientSession, args *GlobalVpcChangeOwnerOptions) error {
if len(args.ProjectDomain) == 0 {
return fmt.Errorf("empty project_domain")
}
params := jsonutils.Marshal(args)
ret, err := modules.GlobalVpcs.PerformAction(s, args.ID, "change-owner", params)
if err != nil {
return err
}
printObject(ret)
return nil
})
}

View File

@@ -145,6 +145,15 @@ func init() {
},
)
R(&GuestTemplateOptions{}, "server-template-inspect", "Inspect server template", func(s *mcclient.ClientSession, opts *GuestTemplateOptions) error {
tem, err := modules.GuestTemplate.PerformAction(s, opts.ID, "inspect", jsonutils.JSONNull)
if err != nil {
return err
}
printObject(tem)
return nil
})
type GuestTemplatePublicOptions struct {
ID string `help:"ID or Name of server template"`
PublicScope string `help:"public scope"`

View File

@@ -19,6 +19,7 @@ import (
"yunion.io/x/jsonutils"
api "yunion.io/x/onecloud/pkg/apis/compute"
"yunion.io/x/onecloud/pkg/mcclient"
"yunion.io/x/onecloud/pkg/mcclient/modulebase"
"yunion.io/x/onecloud/pkg/mcclient/modules"
@@ -360,15 +361,18 @@ func init() {
type NetworkAddressOptions struct {
NETWORK string `help:"id or name of network to query"`
api.GetNetworkAddressesInput
}
R(&NetworkAddressOptions{}, "network-addresses", "Query used addresses of network", func(s *mcclient.ClientSession, args *NetworkAddressOptions) error {
result, err := modules.Networks.GetSpecific(s, args.NETWORK, "addresses", nil)
result, err := modules.Networks.GetSpecific(s, args.NETWORK, "addresses", jsonutils.Marshal(args.GetNetworkAddressesInput))
if err != nil {
return err
}
addrList, err := result.GetArray("addresses")
if err != nil {
return err
addrList, _ := result.GetArray("addresses")
if addrList == nil {
fmt.Println("no result")
return nil
}
listResult := modulebase.ListResult{Data: addrList}
printList(&listResult, nil)

View File

@@ -111,10 +111,11 @@ func init() {
type SchedulerCleanCacheOptions struct {
HostId string `help:"ID of host" short-token:"h"`
SessionId string `help:"Session id" short-token:"s"`
Sync bool `help:"Sync do clean sched cache"`
}
R(&SchedulerCleanCacheOptions{}, "scheduler-clean-cache", "Clean scheduler hosts cache",
func(s *mcclient.ClientSession, args *SchedulerCleanCacheOptions) error {
err := modules.SchedManager.CleanCache(s, args.HostId, args.SessionId)
err := modules.SchedManager.CleanCache(s, args.HostId, args.SessionId, args.Sync)
if err != nil {
return err
}

View File

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

View File

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

View File

@@ -298,6 +298,12 @@ func init() {
return nil
})
R(&options.ServerIdsOptions{}, "server-reconcile-backup", "Reconcile backup server", func(s *mcclient.ClientSession, opts *options.ServerIdsOptions) error {
ret := modules.Servers.BatchPerformAction(s, opts.ID, "reconcile-backup", nil)
printBatchResults(ret, modules.Servers.GetColumns(s))
return nil
})
R(&options.ServerIdsOptions{}, "server-create-backup", "Create backup guest", func(s *mcclient.ClientSession, opts *options.ServerIdsOptions) error {
ret := modules.Servers.BatchPerformAction(s, opts.ID, "create-backup", nil)
printBatchResults(ret, modules.Servers.GetColumns(s))
@@ -1146,6 +1152,7 @@ func init() {
ID string `help:"ID or name of VM"`
DisableIsaSerial string `help:"disable isa serial device" choices:"true|false"`
DisablePvpanic string `help:"disable pvpanic device" choices:"true|false"`
DisableUsbKbd string `help:"disable usb kbd" choices:"true|false"`
}
R(&ServerQemuParams{}, "server-set-qemu-params", "config qemu params", func(s *mcclient.ClientSession,
@@ -1157,6 +1164,9 @@ func init() {
if len(opts.DisablePvpanic) > 0 {
params.Set("disable_pvpanic", jsonutils.NewString(opts.DisablePvpanic))
}
if len(opts.DisableUsbKbd) > 0 {
params.Set("disable_usb_kbd", jsonutils.NewString(opts.DisableUsbKbd))
}
result, err := modules.Servers.PerformAction(s, opts.ID, "set-qemu-params", params)
if err != nil {
return err

View File

@@ -35,7 +35,10 @@ type BaseEventListOptions struct {
Action []string `help:"Log action"`
User string `help:"filter by operator user"`
Project string `help:"filter by owner project"`
Project string `help:"filter by operator user's project"`
OwnerProjectIds []string `help:"filter by owner project ids"`
OwnerDomainIds []string `help:"filter by owner domain ids"`
PagingMarker string `help:"marker for pagination"`
}
@@ -107,6 +110,12 @@ func doEventList(man modulebase.ResourceManager, s *mcclient.ClientSession, args
if len(args.Scope) > 0 {
params.Add(jsonutils.NewString(args.Scope), "scope")
}
if len(args.OwnerProjectIds) > 0 {
params.Add(jsonutils.NewStringArray(args.OwnerProjectIds), "owner_project_ids")
}
if len(args.OwnerDomainIds) > 0 {
params.Add(jsonutils.NewStringArray(args.OwnerDomainIds), "owner_domain_ids")
}
if len(args.PagingMarker) > 0 {
params.Add(jsonutils.NewString(args.PagingMarker), "paging_marker")
}

View File

@@ -54,6 +54,7 @@ type ImageOptionalOptions struct {
Hypervisor []string `help:"Prefer hypervisor type" choices:"kvm|esxi|baremetal|container|openstack|ctyun"`
DiskDriver string `help:"Perfer disk driver" choices:"virtio|scsi|pvscsi|ide|sata"`
NetDriver string `help:"Preferred network driver" choices:"virtio|e1000|vmxnet3"`
DisableUsbKbd bool `help:"Disable usb keyboard on this image(for hypervisor kvm)"`
}
func addImageOptionalOptions(s *mcclient.ClientSession, params *jsonutils.JSONDict, args ImageOptionalOptions) error {
@@ -131,6 +132,9 @@ func addImageOptionalOptions(s *mcclient.ClientSession, params *jsonutils.JSONDi
if len(args.Hypervisor) > 0 {
params.Add(jsonutils.NewString(strings.Join(args.Hypervisor, ",")), "properties", "hypervisor")
}
if args.DisableUsbKbd {
params.Add(jsonutils.NewString("true"), "properties", "disable_usb_kbd")
}
return nil
}
@@ -252,7 +256,7 @@ func init() {
}
type ImageDeleteOptions struct {
ID []string `help:"Image ID or name"`
ID []string `help:"Image ID or name" json:"-"`
OverridePendingDelete *bool `help:"Delete image directly instead of pending delete" short-token:"f"`
}
R(&ImageDeleteOptions{}, "image-delete", "Delete a image", func(s *mcclient.ClientSession, args *ImageDeleteOptions) error {

View File

@@ -188,6 +188,19 @@ func initKubeCluster() {
return nil
})
R(&o.ClusterSyncOptions{}, cmdN("sync"), "Sync cluster k8s resources", func(s *mcclient.ClientSession, args *o.ClusterSyncOptions) error {
param, err := args.Params()
if err != nil {
return err
}
ret, err := k8s.KubeClusters.PerformAction(s, args.ID, "sync", param)
if err != nil {
return err
}
printObject(ret)
return nil
})
R(&o.IdentOptions{}, cmdN("public"), "Make cluster public", func(s *mcclient.ClientSession, args *o.IdentOptions) error {
ret, err := k8s.KubeClusters.PerformAction(s, args.ID, "public", nil)
if err != nil {

View File

@@ -43,7 +43,6 @@ func init() {
initRepo()
initChart()
initRelease()
initReleaseApps()
// kubernetes original resources
initRaw()

View File

@@ -30,7 +30,7 @@ import (
)
func getPrinterRowValue(printer k8s.ListPrinter, obj jsonutils.JSONObject, col string) interface{} {
getFuncName := fmt.Sprintf("Get%s", strings.Title(col))
getFuncName := fmt.Sprintf("Get_%s", strings.Title(col))
manValue := reflect.ValueOf(printer)
funcValue := manValue.MethodByName(getFuncName)
if !funcValue.IsValid() || funcValue.IsNil() {

View File

@@ -22,8 +22,10 @@ import (
func initRbac() {
//cmdRole := initK8sNamespaceResource("rbacrole", k8s.RbacRoles)
initK8sNamespaceResource("rbacrole", k8s.RbacRoles)
initK8sNamespaceResource("rbacrolebinding", k8s.RbacRoleBindings)
initK8sNamespaceResource("rbac-role", k8s.RbacRoles)
initK8sNamespaceResource("rbac-rolebinding", k8s.RbacRoleBindings)
initK8sClusterResource("rbac-clusterrole", k8s.RbacClusterRoles)
initK8sClusterResource("rbac-clusterrolebinding", k8s.RbacClusterRoleBindings)
initK8sNamespaceResource("serviceaccount", k8s.ServiceAccounts)
//cmdRoleN := cmdRole.CommandNameFactory
}

View File

@@ -1,67 +0,0 @@
// Copyright 2019 Yunion
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package k8s
import (
"fmt"
"yunion.io/x/onecloud/pkg/mcclient"
"yunion.io/x/onecloud/pkg/mcclient/modules/k8s"
o "yunion.io/x/onecloud/pkg/mcclient/options/k8s"
)
func initReleaseApps() {
cmdN := func(app string) string {
return resourceCmdN(fmt.Sprintf("app-%s", app), "create")
}
R(&o.AppCreateOptions{}, cmdN("meter"), "Create yunion meter helm release", func(s *mcclient.ClientSession, args *o.AppCreateOptions) error {
params, err := args.Params()
if err != nil {
return err
}
ret, err := k8s.MeterReleaseApps.Create(s, params)
if err != nil {
return err
}
printObject(ret)
return nil
})
R(&o.AppCreateOptions{}, cmdN("servicetree"), "Create yunion servicetree helm release", func(s *mcclient.ClientSession, args *o.AppCreateOptions) error {
params, err := args.Params()
if err != nil {
return err
}
ret, err := k8s.ServicetreeReleaseApps.Create(s, params)
if err != nil {
return err
}
printObject(ret)
return nil
})
R(&o.AppCreateOptions{}, cmdN("notify"), "Create yunion notify helm release", func(s *mcclient.ClientSession, args *o.AppCreateOptions) error {
params, err := args.Params()
if err != nil {
return err
}
ret, err := k8s.NotifyReleaseApps.Create(s, params)
if err != nil {
return err
}
printObject(ret)
return nil
})
}

View File

@@ -35,6 +35,7 @@ func init() {
Copyright string `help:"The copyright"`
Email string `help:"The Email"`
Docs *string `help:"the Docs website address"`
License *string `help:"the license generator website address"`
}
R(&CopyrightUpdateOptions{}, "copyright-update", "update copyright", func(s *mcclient.ClientSession, args *CopyrightUpdateOptions) error {
@@ -47,6 +48,10 @@ func init() {
params.Add(jsonutils.NewString(*args.Docs), "docs")
}
if args.License != nil {
params.Add(jsonutils.NewString(*args.License), "license")
}
if len(args.Copyright) > 0 {
params.Add(jsonutils.NewString(args.Copyright), "copyright")
}

View File

@@ -0,0 +1,47 @@
package monitor
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 CommonAlertListOptions struct {
options.BaseListOptions
// 报警类型
AlertType string `help:"common alert type" choices:"normal|system"`
Level string `help:"common alert notify level" choices:"normal|important|fatal"`
}
R(&CommonAlertListOptions{}, "commonalert-list", "List commonalert", func(s *mcclient.ClientSession,
args *CommonAlertListOptions) error {
params, err := options.ListStructToParams(args)
if err != nil {
return err
}
result, err := modules.CommonAlertManager.List(s, params)
if err != nil {
return nil
}
printList(result, modules.CommonAlertManager.GetColumns(s))
return nil
})
type CommonAlertDeleteOptions struct {
ID string `help:"ID of alart"`
Force bool `help:"force to delete alert"`
}
R(&CommonAlertDeleteOptions{}, "commonalert-delete", "List commonalert", func(s *mcclient.ClientSession,
args *CommonAlertDeleteOptions) error {
params := jsonutils.NewDict()
params.Add(jsonutils.NewBool(args.Force), "force")
object, err := modules.CommonAlertManager.Delete(s, args.ID, params)
if err != nil {
return err
}
printObject(object)
return nil
})
}

View File

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

167
cmd/raidcli/main.go Normal file
View File

@@ -0,0 +1,167 @@
// Copyright 2019 Yunion
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package main
import (
"fmt"
"os"
"yunion.io/x/structarg"
_ "yunion.io/x/onecloud/cmd/raidcli/shell"
"yunion.io/x/onecloud/pkg/baremetal/utils/raid"
"yunion.io/x/onecloud/pkg/baremetal/utils/raid/drivers"
"yunion.io/x/onecloud/pkg/util/shellutils"
"yunion.io/x/onecloud/pkg/util/ssh"
)
type BaseOptions struct {
Debug bool `help:"debug mode"`
Help bool `help:"Show help"`
Host string `help:"SSH Host IP" default:"$RAID_HOST" metavar:"RAID_HOST"`
Username string `help:"Username, usually root" default:"$RAID_USERNAME" metavar:"RAID_USERNAME"`
Password string `help:"Password" default:"$RAID_PASSWORD" metavar:"RAID_PASSWORD"`
Driver string `help:"Password" default:"$RAID_DRIVER" metavar:"RAID_DRIVER" choices:"MegaRaid|HPSARaid|Mpt2SAS|MarvelRaid"`
SUBCOMMAND string `help:"s3cli subcommand" subcommand:"true"`
}
var (
options = &BaseOptions{}
)
func getSubcommandParser() (*structarg.ArgumentParser, error) {
parse, e := structarg.NewArgumentParser(options,
"raidcli",
"Command-line interface to test RAID drivers.",
`See "raidcli help COMMAND" for help on a specific command.`)
if e != nil {
return nil, e
}
subcmd := parse.GetSubcommand()
if subcmd == nil {
return nil, fmt.Errorf("No subcommand argument.")
}
type HelpOptions struct {
SUBCOMMAND string `help:"sub-command name"`
}
shellutils.R(&HelpOptions{}, "help", "Show help of a subcommand", func(args *HelpOptions) error {
helpstr, e := subcmd.SubHelpString(args.SUBCOMMAND)
if e != nil {
return e
} else {
fmt.Print(helpstr)
return nil
}
})
for _, v := range shellutils.CommandTable {
_, e := subcmd.AddSubParser(v.Options, v.Command, v.Desc, v.Callback)
if e != nil {
return nil, e
}
}
return parse, nil
}
func showErrorAndExit(e error) {
fmt.Fprintf(os.Stderr, "%s", e)
fmt.Fprintln(os.Stderr)
os.Exit(1)
}
func newClient() (raid.IRaidDriver, error) {
if len(options.Host) == 0 {
return nil, fmt.Errorf("Missing host")
}
if len(options.Username) == 0 {
return nil, fmt.Errorf("Missing username")
}
if len(options.Password) == 0 {
return nil, fmt.Errorf("Missing password")
}
if len(options.Driver) == 0 {
return nil, fmt.Errorf("Missing driver")
}
if options.Debug {
raid.Debug = true
}
sshClient, err := ssh.NewClient(
options.Host,
22,
options.Username,
options.Password,
"",
)
if err != nil {
return nil, fmt.Errorf("ssh client init fail: %s", err)
}
drv := drivers.GetDriver(options.Driver, sshClient)
if drv == nil {
return nil, fmt.Errorf("not supported driver %s", options.Driver)
}
err = drv.ParsePhyDevs()
if err != nil {
return nil, fmt.Errorf("parse phyical devices error %s", err)
}
return drv, nil
}
func main() {
parser, e := getSubcommandParser()
if e != nil {
showErrorAndExit(e)
}
e = parser.ParseArgs(os.Args[1:], false)
// options := parser.Options().(*BaseOptions)
if options.Help {
fmt.Print(parser.HelpString())
} else {
subcmd := parser.GetSubcommand()
subparser := subcmd.GetSubParser()
if e != nil {
if subparser != nil {
fmt.Print(subparser.Usage())
} else {
fmt.Print(parser.Usage())
}
showErrorAndExit(e)
} else {
suboptions := subparser.Options()
if options.SUBCOMMAND == "help" {
e = subcmd.Invoke(suboptions)
} else {
var client raid.IRaidDriver
client, e = newClient()
if e != nil {
showErrorAndExit(e)
}
e = subcmd.Invoke(client, suboptions)
}
if e != nil {
showErrorAndExit(e)
}
}
}
}

37
cmd/raidcli/shell/raid.go Normal file
View File

@@ -0,0 +1,37 @@
// Copyright 2019 Yunion
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package shell
import (
"fmt"
"yunion.io/x/jsonutils"
"yunion.io/x/onecloud/pkg/baremetal/utils/raid"
"yunion.io/x/onecloud/pkg/util/shellutils"
)
func init() {
type ShowOptions struct {
}
shellutils.R(&ShowOptions{}, "show", "show raid info", func(drv raid.IRaidDriver, args *ShowOptions) error {
adpts := drv.GetAdapters()
for i := range adpts {
fmt.Println("Index:", i)
fmt.Println(jsonutils.Marshal(adpts[i].GetDevices()).PrettyString())
}
return nil
})
}

View File

@@ -17,12 +17,16 @@ package main
import (
"context"
"fmt"
"net/url"
"os"
"strings"
"yunion.io/x/structarg"
_ "yunion.io/x/onecloud/cmd/redfishcli/shell"
"yunion.io/x/onecloud/pkg/util/fileutils2"
"yunion.io/x/onecloud/pkg/util/redfish"
"yunion.io/x/onecloud/pkg/util/redfish/bmconsole"
_ "yunion.io/x/onecloud/pkg/util/redfish/loader"
"yunion.io/x/onecloud/pkg/util/shellutils"
)
@@ -36,8 +40,12 @@ type BaseOptions struct {
SUBCOMMAND string `help:"s3cli subcommand" subcommand:"true"`
}
var (
options = &BaseOptions{}
)
func getSubcommandParser() (*structarg.ArgumentParser, error) {
parse, e := structarg.NewArgumentParser(&BaseOptions{},
parse, e := structarg.NewArgumentParser(options,
"redfishcli",
"Command-line interface to redfish API.",
`See "redfishcli help COMMAND" for help on a specific command.`)
@@ -62,6 +70,7 @@ func getSubcommandParser() (*structarg.ArgumentParser, error) {
return nil
}
})
bmcJnlp()
for _, v := range shellutils.CommandTable {
_, e := subcmd.AddSubParser(v.Options, v.Command, v.Desc, v.Callback)
if e != nil {
@@ -71,13 +80,57 @@ func getSubcommandParser() (*structarg.ArgumentParser, error) {
return parse, nil
}
func bmcJnlp() {
type BmcGetOptions struct {
BRAND string `help:"brand of baremetal" choices:"Lenovo|Huawei|HPE|Dell|Supermicro|Dell6|Dell7|Dell9"`
Save string `help:"save to file"`
Debug bool `help:"turn on debug mode"`
Sku string `help:"sku"`
Model string `help:"model"`
}
shellutils.R(&BmcGetOptions{}, "bmc-jnlp", "Get Java Console JNLP file", func(args *BmcGetOptions) error {
ctx := context.Background()
parts, err := url.Parse(options.Endpoint)
if err != nil {
return err
}
bmc := bmconsole.NewBMCConsole(parts.Hostname(), options.Username, options.Password, args.Debug)
var jnlp string
switch strings.ToLower(args.BRAND) {
case "hp", "hpe":
jnlp, err = bmc.GetIloConsoleJNLP(ctx)
case "dell", "dell inc.":
jnlp, err = bmc.GetIdracConsoleJNLP(ctx, args.Sku, args.Model)
case "dell6":
jnlp, err = bmc.GetIdrac6ConsoleJNLP(ctx, args.Sku, args.Model)
case "dell7":
jnlp, err = bmc.GetIdrac7ConsoleJNLP(ctx, args.Sku, args.Model)
case "dell9":
jnlp, err = bmc.GetIdrac9ConsoleJNLP(ctx)
case "supermicro":
jnlp, err = bmc.GetSupermicroConsoleJNLP(ctx)
case "lenovo":
jnlp, err = bmc.GetLenovoConsoleJNLP(ctx)
}
if err != nil {
return err
}
if len(args.Save) > 0 {
return fileutils2.FilePutContents(args.Save, jnlp, false)
} else {
fmt.Println(jnlp)
return nil
}
})
}
func showErrorAndExit(e error) {
fmt.Fprintf(os.Stderr, "%s", e)
fmt.Fprintln(os.Stderr)
os.Exit(1)
}
func newClient(options *BaseOptions) (redfish.IRedfishDriver, error) {
func newClient() (redfish.IRedfishDriver, error) {
if len(options.Endpoint) == 0 {
return nil, fmt.Errorf("Missing endpoint")
}
@@ -104,7 +157,7 @@ func main() {
showErrorAndExit(e)
}
e = parser.ParseArgs(os.Args[1:], false)
options := parser.Options().(*BaseOptions)
// options := parser.Options().(*BaseOptions)
if options.Help {
fmt.Print(parser.HelpString())
@@ -122,9 +175,11 @@ func main() {
suboptions := subparser.Options()
if options.SUBCOMMAND == "help" {
e = subcmd.Invoke(suboptions)
} else if options.SUBCOMMAND == "bmc-jnlp" {
e = subcmd.Invoke(suboptions)
} else {
var client redfish.IRedfishDriver
client, e = newClient(options)
client, e = newClient()
if e != nil {
showErrorAndExit(e)
}

8
go.mod
View File

@@ -131,13 +131,13 @@ require (
k8s.io/cluster-bootstrap v0.17.3
k8s.io/kubernetes v1.16.0
yunion.io/x/executor v0.0.0-20200227030256-a18417815e74
yunion.io/x/jsonutils v0.0.0-20200615014624-f9c3576579c9
yunion.io/x/jsonutils v0.0.0-20200814075449-927b118adbd8
yunion.io/x/log v0.0.0-20200313080802-57a4ce5966b3
yunion.io/x/ovsdb v0.0.0-20200526071744-27bf0940cbc7
yunion.io/x/pkg v0.0.0-20200615071345-60a252beb982
yunion.io/x/pkg v0.0.0-20200814072949-4f1b541857d6
yunion.io/x/s3cli v0.0.0-20190917004522-13ac36d8687e
yunion.io/x/sqlchemy v0.0.0-20200608080702-9b6683aa048c
yunion.io/x/structarg v0.0.0-20200619020316-f93fbe32ffc7
yunion.io/x/sqlchemy v0.0.0-20200814052348-164f1f20f8a6
yunion.io/x/structarg v0.0.0-20200720093445-9f850fa222ce
)
replace (

21
go.sum
View File

@@ -94,7 +94,9 @@ github.com/Shopify/toxiproxy v2.1.4+incompatible/go.mod h1:OXgGpZ6Cli1/URJOF1DMx
github.com/StackExchange/wmi v0.0.0-20180116203802-5d049714c4a6 h1:fLjPD/aNc3UIOA6tDi6QXUemppXK3P9BI7mr2hd6gx8=
github.com/StackExchange/wmi v0.0.0-20180116203802-5d049714c4a6/go.mod h1:3eOhrUMpNV+6aFIbp5/iudMxNCF27Vw2OZgy4xEx0Fg=
github.com/a8m/mark v0.1.1-0.20170507133748-44f2db618845/go.mod h1:c8Mh99Cw82nrsAnPgxQSZHkswVOJF7/MqZb1ZdvriLM=
github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc h1:cAKDfWh5VpdgMhJosfJnn5/FoN2SRZ4p7fJNX58YPaU=
github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc=
github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf h1:qet1QNfXsQxTZqLG4oE62mJzwPIB8+Tee4RNCL9ulrY=
github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0=
github.com/aliyun/alibaba-cloud-sdk-go v0.0.0-20180112035716-b5829a0278c8 h1:mb7rn6WX8viizO36Nv6VVCBrgwaq01HPrZv1qq07/Yg=
github.com/aliyun/alibaba-cloud-sdk-go v0.0.0-20180112035716-b5829a0278c8/go.mod h1:T9M45xf79ahXVelWoOBmH0y4aC1t5kXO5BxwyakgIGA=
@@ -1016,6 +1018,7 @@ google.golang.org/grpc v1.23.1/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyac
google.golang.org/grpc v1.26.0 h1:2dTRdpdFEEhJYQD8EMLB61nnrzSCTbG38PhqdhvOltg=
google.golang.org/grpc v1.26.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk=
gopkg.in/airbrake/gobrake.v2 v2.0.9/go.mod h1:/h5ZAUhDkGaJfjzjKLSjv6zCL6O0LLBxU4K+aSYdM/U=
gopkg.in/alecthomas/kingpin.v2 v2.2.6 h1:jMFz6MfLP0/4fUyZle81rXUoxOBFi19VUFKVDOQfozc=
gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw=
gopkg.in/asn1-ber.v1 v1.0.0-20181015200546-f715ec2f112d h1:TxyelI5cVkbREznMhfzycHdkp5cLA7DpE+GKjSslYhM=
gopkg.in/asn1-ber.v1 v1.0.0-20181015200546-f715ec2f112d/go.mod h1:cuepJuh7vyXfUyUwEgHQXw849cJrilpS5NeIjOWESAw=
@@ -1123,10 +1126,9 @@ vbom.ml/util v0.0.0-20160121211510-db5cfe13f5cc/go.mod h1:so/NYdZXCz+E3ZpW0uAoCj
yunion.io/x/executor v0.0.0-20200227030256-a18417815e74 h1:A15C6VdVRWvmQ9pAJHrUs9yan5qKlYH7uaRxHg1kRbk=
yunion.io/x/executor v0.0.0-20200227030256-a18417815e74/go.mod h1:Uxuou9WQIeJXNpy7t2fPLL0BYLvLiMvGQwY7Qc6aSws=
yunion.io/x/jsonutils v0.0.0-20190625054549-a964e1e8a051/go.mod h1:4N0/RVzsYL3kH3WE/H1BjUQdFiWu50JGCFQuuy+Z634=
yunion.io/x/jsonutils v0.0.0-20200615014624-f9c3576579c9 h1:s7sobXxn4ckRHdjIaA91Rnfy2kreV/+dN3P2pQLg7F0=
yunion.io/x/jsonutils v0.0.0-20200615014624-f9c3576579c9/go.mod h1:T7kxQJR13+t7z0TuT+Wzd7MTxBOk2H9c0pO1ONQSv90=
yunion.io/x/jsonutils v0.0.0-20200814075449-927b118adbd8 h1:KQVw5EmohJCqBDMdZ3fAcOQNNMIYgVuNCNWNwg4EM3A=
yunion.io/x/jsonutils v0.0.0-20200814075449-927b118adbd8/go.mod h1:p0nyMqGA/apTxxyLIU/o1k4V7Vujl2O6ey30L594sYE=
yunion.io/x/log v0.0.0-20190514041436-04ce53b17c6b/go.mod h1:+gauLs73omeJAPlsXcevLsJLKixV+sR/E7WSYTSx1fE=
yunion.io/x/log v0.0.0-20190629062853-9f6483a7103d h1:59zrDL7Ft+hDukguJRmLr/Gdu/9V75x+yX99ovZwfaA=
yunion.io/x/log v0.0.0-20190629062853-9f6483a7103d/go.mod h1:LC6f/4FozL0iaAbnFt2eDX9jlsyo3WiOUPm03d7+U4U=
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=
@@ -1134,12 +1136,11 @@ yunion.io/x/ovsdb v0.0.0-20200526071744-27bf0940cbc7 h1:gjqNa2uQzIEXyySsbvVz0Ult
yunion.io/x/ovsdb v0.0.0-20200526071744-27bf0940cbc7/go.mod h1:0vLkNEhlmA64HViPBAnSTUMrx5QP1CLsxXmxDKQ80tc=
yunion.io/x/pkg v0.0.0-20190620104149-945c25821dbf/go.mod h1:t6rEGG2sQ4J7DhFxSZVOTjNd0YO/KlfWQyK1W4tog+E=
yunion.io/x/pkg v0.0.0-20190628082551-f4033ba2ea30/go.mod h1:t6rEGG2sQ4J7DhFxSZVOTjNd0YO/KlfWQyK1W4tog+E=
yunion.io/x/pkg v0.0.0-20200302034534-fdf44d54b070/go.mod h1:t6rEGG2sQ4J7DhFxSZVOTjNd0YO/KlfWQyK1W4tog+E=
yunion.io/x/pkg v0.0.0-20200615071345-60a252beb982 h1:VnE92PZ2DOBn7qOKHHHPrwo4tPsjrxET/xDyWfMFQHI=
yunion.io/x/pkg v0.0.0-20200615071345-60a252beb982/go.mod h1:t6rEGG2sQ4J7DhFxSZVOTjNd0YO/KlfWQyK1W4tog+E=
yunion.io/x/pkg v0.0.0-20200814072949-4f1b541857d6 h1:UarEDTBGkgcgc+nc+PZ75uo9M9+jiOGd5P2B90TxDNw=
yunion.io/x/pkg v0.0.0-20200814072949-4f1b541857d6/go.mod h1:t6rEGG2sQ4J7DhFxSZVOTjNd0YO/KlfWQyK1W4tog+E=
yunion.io/x/s3cli v0.0.0-20190917004522-13ac36d8687e h1:v+EzIadodSwkdZ/7bremd7J8J50Cise/HCylsOJngmo=
yunion.io/x/s3cli v0.0.0-20190917004522-13ac36d8687e/go.mod h1:0iFKpOs1y4lbCxeOmq3Xx/0AcQoewVPwj62eRluioEo=
yunion.io/x/sqlchemy v0.0.0-20200608080702-9b6683aa048c h1:/i93mWSKLYUq8RsaXGbMpwwnkGi09wL/HdCBiexL/+c=
yunion.io/x/sqlchemy v0.0.0-20200608080702-9b6683aa048c/go.mod h1:FTdwPdGhMgh4E+UFXc9klI1Ok34fMuybTT+jLhOaIjI=
yunion.io/x/structarg v0.0.0-20200619020316-f93fbe32ffc7 h1:HjWH0gG/5KzvCxItnzRxizfAnMOvGcxPfsEOFwOGBhQ=
yunion.io/x/structarg v0.0.0-20200619020316-f93fbe32ffc7/go.mod h1:EP6NSv2C0zzqBDTKumv8hPWLb3XvgMZDHQRfyuOrQng=
yunion.io/x/sqlchemy v0.0.0-20200814052348-164f1f20f8a6 h1:k7E8Zjwzyk/lo1dDO0jtLbODwYRNv+w/zsUJrKWCXvo=
yunion.io/x/sqlchemy v0.0.0-20200814052348-164f1f20f8a6/go.mod h1:FTdwPdGhMgh4E+UFXc9klI1Ok34fMuybTT+jLhOaIjI=
yunion.io/x/structarg v0.0.0-20200720093445-9f850fa222ce h1:kU8xE7O5uZ1GSJVMZHoJ+jrNL7csUQHYGyAPW9QfNpE=
yunion.io/x/structarg v0.0.0-20200720093445-9f850fa222ce/go.mod h1:EP6NSv2C0zzqBDTKumv8hPWLb3XvgMZDHQRfyuOrQng=

View File

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

View File

@@ -230,6 +230,9 @@ func doTenantLogin(ctx context.Context, w http.ResponseWriter, req *http.Request
} else {
otpVerified = true
}
} else {
// if totp disabled, then assume totp been verified
otpVerified = true
}
token, e = auth.Client().SetProject(tenantId, "", "", token)
@@ -396,7 +399,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
@@ -536,6 +539,11 @@ func (h *AuthHandlers) postLoginHandler(ctx context.Context, w http.ResponseWrit
httperrors.GeneralServerError(w, err)
return
}
} else {
// if totp is disabled, assume totp been verified
totp := clientman.TokenMan.GetTotp(tid)
totp.MarkVerified()
clientman.TokenMan.SaveTotp(tid)
}
appsrv.Send(w, qrcode)

View File

@@ -0,0 +1,129 @@
package handler
import (
"bytes"
"context"
"fmt"
"io"
"mime/multipart"
"net/http"
"strconv"
"time"
"yunion.io/x/jsonutils"
"yunion.io/x/log"
"yunion.io/x/onecloud/pkg/appsrv"
"yunion.io/x/onecloud/pkg/httperrors"
"yunion.io/x/onecloud/pkg/mcclient/auth"
"yunion.io/x/onecloud/pkg/mcclient/modules"
)
func readImageForm(r *multipart.Reader) (map[string]string, *multipart.Part, error) {
params := make(map[string]string)
maxValueBytes := int64(10 << 20)
for {
p, err := r.NextPart()
if err == io.EOF {
break
}
if err != nil {
return nil, nil, err
}
name := p.FormName()
if name == "" {
continue
}
filename := p.FileName()
var b bytes.Buffer
_, hasContentTypeHeader := p.Header["Content-Type"]
if !hasContentTypeHeader && filename == "" {
// value, store as string in memory
n, err := io.CopyN(&b, p, maxValueBytes+1)
if err != nil && err != io.EOF {
return nil, nil, err
}
maxValueBytes -= n
if maxValueBytes < 0 {
return nil, nil, multipart.ErrMessageTooLarge
}
params[name] = b.String()
continue
}
if name == "image" || name == "file" {
return params, p, nil
} else {
return nil, nil, fmt.Errorf("no file uploaded")
}
}
return nil, nil, fmt.Errorf("empty form")
}
func imageUploadHandler(ctx context.Context, w http.ResponseWriter, r *http.Request) {
reader, e := r.MultipartReader()
if e != nil {
httperrors.InvalidInputError(w, "无效的表单")
return
}
p, f, e := readImageForm(reader)
if e != nil {
httperrors.InvalidInputError(w, "无效的表单")
return
}
params := jsonutils.NewDict()
name, ok := p["name"]
if !ok {
httperrors.InvalidInputError(w, "缺少镜像名称")
return
}
params.Add(jsonutils.NewString(name), "name")
_imageSize, ok := p["image_size"]
if !ok {
httperrors.InvalidInputError(w, "缺少文件信息")
return
}
imageSize, e := strconv.ParseInt(_imageSize, 10, 64)
if e != nil {
httperrors.InvalidInputError(w, "文件信息错误")
return
}
// add all other params
for k, v := range p {
if k == "name" || k == "image_size" {
continue
}
params.Add(jsonutils.NewString(v), k)
}
token := AppContextToken(ctx)
s := auth.GetSession(ctx, token, FetchRegion(r), "")
res, e := modules.Images.Upload(s, params, f, imageSize)
if e != nil {
httperrors.GeneralServerError(w, e)
return
} else {
appsrv.SendJSON(w, res)
}
}
func uploadHandlerInfo(method, prefix string, handler func(context.Context, http.ResponseWriter, *http.Request)) *appsrv.SHandlerInfo {
log.Debugf("%s - %s", method, prefix)
hi := appsrv.SHandlerInfo{}
hi.SetMethod(method)
hi.SetPath(prefix)
hi.SetHandler(handler)
hi.SetProcessTimeout(6 * time.Hour)
hi.SetWorkerManager(GetUploaderWorker())
return &hi
}

View File

@@ -112,15 +112,15 @@ func FetchAuthToken(f func(context.Context, http.ResponseWriter, *http.Request))
return
}
// 启用双因子认证
t := AppContextToken(ctx)
if isUserEnableTotp(ctx, r, t) {
tid := getAuthToken(r)
totp := clientman.TokenMan.GetTotp(tid)
if !totp.IsVerified() {
httperrors.UnauthorizedError(w, "TOTP authentication failed")
return
}
// t := AppContextToken(ctx)
// if isUserEnableTotp(ctx, r, t) {
tid := getAuthToken(r)
totp := clientman.TokenMan.GetTotp(tid)
if !totp.IsVerified() {
httperrors.UnauthorizedError(w, "TOTP authentication failed")
return
}
// }
f(ctx, w, r)
}

View File

@@ -20,6 +20,7 @@ import (
"encoding/csv"
"fmt"
"net/http"
"strconv"
"strings"
"time"
@@ -28,6 +29,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 +39,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 (
@@ -50,6 +53,7 @@ const (
HOST_IPMI_USERNAME_OPTIONAL = "IPMI用户名"
HOST_IPMI_PASSWORD_OPTIONAL = "IPMI密码"
HOST_MNG_IP_ADDR_OPTIONAL = "管理口IP地址"
HOST_MNG_MAC_ADDR_OPTIONAL = "管理口MAC地址"
)
const (
@@ -57,6 +61,12 @@ const (
BATCH_HOST_REGISTER_QUANTITY_LIMITATION = 1000
)
var (
BatchHostRegisterTemplate = []string{HOST_MAC, HOST_NAME, HOST_IPMI_ADDR_OPTIONAL, HOST_IPMI_USERNAME_OPTIONAL, HOST_IPMI_PASSWORD_OPTIONAL}
BatchHostISORegisterTemplate = []string{HOST_NAME, HOST_IPMI_ADDR, HOST_IPMI_USERNAME, HOST_IPMI_PASSWORD, HOST_MNG_IP_ADDR}
BatchHostPXERegisterTemplate = []string{HOST_NAME, HOST_IPMI_ADDR, HOST_IPMI_USERNAME, HOST_IPMI_PASSWORD, HOST_MNG_MAC_ADDR_OPTIONAL, HOST_MNG_IP_ADDR_OPTIONAL}
)
func FetchSession(ctx context.Context, r *http.Request, apiVersion string) *mcclient.ClientSession {
token := AppContextToken(ctx)
session := auth.GetSession(ctx, token, FetchRegion(r), apiVersion)
@@ -82,6 +92,10 @@ func (h *MiscHandler) Bind(app *appsrv.Application) {
app.AddHandler3(uploader)
app.AddHandler(GET, prefix+"downloads/<template_id>", FetchAuthToken(h.getDownloadsHandler))
app.AddHandler(POST, prefix+"piuploads", FetchAuthToken(h.postPIUploads)) // itsm process instances upload api
imageUploader := uploadHandlerInfo("POST", prefix+"/imageutils/upload", FetchAuthToken(imageUploadHandler))
app.AddHandler3(imageUploader)
s3upload := uploadHandlerInfo(POST, prefix+"s3uploads", FetchAuthToken(h.postS3UploadHandler))
app.AddHandler3(s3upload)
}
func UploadHandlerInfo(method, prefix string, handler func(context.Context, http.ResponseWriter, *http.Request)) *appsrv.SHandlerInfo {
@@ -170,20 +184,43 @@ func (mh *MiscHandler) DoBatchHostRegister(ctx context.Context, w http.ResponseW
return
}
// check header line
titlesOk := false
for _, t := range [][]string{BatchHostRegisterTemplate, BatchHostISORegisterTemplate, BatchHostPXERegisterTemplate} {
if len(t) == len(rows[0]) {
for _, title := range rows[0] {
if !utils.IsInStringArray(title, t) {
break
}
}
titlesOk = true
}
}
if !titlesOk {
httperrors.InputParameterError(w, "template file is invalid.please check.")
return
}
paramKeys := []string{}
for _, title := range rows[0] {
i1 := -1
i2 := -1
for i, title := range rows[0] {
switch title {
case HOST_MAC:
case HOST_MAC, HOST_MNG_MAC_ADDR_OPTIONAL:
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 +236,33 @@ func (mh *MiscHandler) DoBatchHostRegister(ctx context.Context, w http.ResponseW
return
}
ips := []string{}
hosts := bytes.Buffer{}
for _, row := range rows[1:] {
var e *httputils.JSONClientError
if i1 >= 0 && len(row[i1]) > 0 {
i1Ip := fmt.Sprintf("%d-%s", i1, row[i1])
if utils.IsInStringArray(i1Ip, ips) {
e = httperrors.NewDuplicateIdError("ip", row[i1])
} else {
ips = append(ips, i1Ip)
}
}
if i2 >= 0 && len(row[i2]) > 0 {
i2Ip := fmt.Sprintf("%d-%s", i2, row[i2])
if utils.IsInStringArray(i2Ip, ips) {
e = httperrors.NewDuplicateIdError("ip", row[i2])
} else {
ips = append(ips, i2Ip)
}
}
if e != nil {
httperrors.JsonClientError(w, e)
return
}
hosts.WriteString(strings.Join(row, ",") + "\n")
}
@@ -297,18 +359,6 @@ func (mh *MiscHandler) DoBatchUserRegister(ctx context.Context, w http.ResponseW
return
}
if _, ok := names[name]; ok {
e := httperrors.NewClientError("row %d duplicate name %s", rowIdx, name)
httperrors.JsonClientError(w, e)
return
} else {
names[name] = true
_, err := modules.UsersV3.Get(s, name, nil)
if err == nil {
continue
}
}
domainId, ok := domains[domain]
if !ok {
if len(domain) == 0 {
@@ -327,6 +377,18 @@ func (mh *MiscHandler) DoBatchUserRegister(ctx context.Context, w http.ResponseW
domains[domain] = id
}
if _, ok := names[name+"/"+domainId]; ok {
e := httperrors.NewClientError("row %d duplicate name %s", rowIdx, name)
httperrors.JsonClientError(w, e)
return
} else {
names[name+"/"+domainId] = true
_, err := modules.UsersV3.Get(s, name, nil)
if err == nil {
continue
}
}
user := jsonutils.NewDict()
user.Add(jsonutils.NewString(name), "name")
user.Add(jsonutils.NewString(domainId), "domain_id")
@@ -375,21 +437,21 @@ func (mh *MiscHandler) getDownloadsHandler(ctx context.Context, w http.ResponseW
var content bytes.Buffer
switch template {
case "BatchHostRegister":
records := [][]string{{HOST_MAC, HOST_NAME, HOST_IPMI_ADDR_OPTIONAL, HOST_IPMI_USERNAME_OPTIONAL, HOST_IPMI_PASSWORD_OPTIONAL}}
records := [][]string{BatchHostRegisterTemplate}
content, err = writeXlsx("hosts", records)
if err != nil {
httperrors.InternalServerError(w, "internal server error")
return
}
case "BatchHostISORegister":
records := [][]string{{HOST_NAME, HOST_IPMI_ADDR, HOST_IPMI_USERNAME, HOST_IPMI_PASSWORD, HOST_MNG_IP_ADDR}}
records := [][]string{BatchHostISORegisterTemplate}
content, err = writeXlsx("hosts", records)
if err != nil {
httperrors.InternalServerError(w, "internal server error")
return
}
case "BatchHostPXERegister":
records := [][]string{{HOST_NAME, HOST_IPMI_ADDR, HOST_IPMI_USERNAME, HOST_IPMI_PASSWORD, HOST_MNG_IP_ADDR_OPTIONAL}}
records := [][]string{BatchHostPXERegisterTemplate}
content, err = writeXlsx("hosts", records)
if err != nil {
httperrors.InternalServerError(w, "internal server error")
@@ -453,6 +515,61 @@ func (mh *MiscHandler) postPIUploads(ctx context.Context, w http.ResponseWriter,
appsrv.SendJSON(w, resp)
}
func (mh *MiscHandler) postS3UploadHandler(ctx context.Context, w http.ResponseWriter, r *http.Request) {
reader, e := r.MultipartReader()
if e != nil {
log.Debugf("postS3UploadHandler.MultipartReader %s", e)
httperrors.InvalidInputError(w, "invalid form")
return
}
p, f, e := readImageForm(reader)
if e != nil {
log.Debugf("postS3UploadHandler.readImageForm %s", e)
httperrors.InvalidInputError(w, "invalid form")
return
}
bucket_id, ok := p["bucket_id"]
if !ok {
httperrors.MissingParameterError(w, "bucket_id")
return
}
key, ok := p["key"]
if !ok {
httperrors.MissingParameterError(w, "key")
return
}
_content_length, ok := p["content_length"]
if !ok {
httperrors.MissingParameterError(w, "content_length")
return
}
content_length, e := strconv.ParseInt(_content_length, 10, 64)
if e != nil {
httperrors.InvalidInputError(w, "invalid content_length %s", _content_length)
return
}
storage_class, _ := p["storage_class"]
acl, _ := p["acl"]
token := AppContextToken(ctx)
s := auth.GetSession(ctx, token, FetchRegion(r), "")
meta := http.Header{}
meta.Set("Content-Type", "application/octet-stream")
e = modules.Buckets.Upload(s, bucket_id, key, f, content_length, storage_class, acl, meta)
if e != nil {
httperrors.GeneralServerError(w, e)
return
}
appsrv.SendJSON(w, jsonutils.NewDict())
}
func writeCsv(records [][]string) (bytes.Buffer, error) {
var content bytes.Buffer
content.WriteString("\xEF\xBB\xBF") // 写入UTF-8 BOM, 防止office打开后中文乱码

View File

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

View File

@@ -22,7 +22,7 @@ type CloudaccountResourceListInput struct {
Provider []string `json:"provider"`
// swagger:ignore
CloudaccountId string `json:"cloudaccount_id" "yunion:deprecated-by":"cloudaccount"`
CloudaccountId string `json:"cloudaccount_id" yunion-deprecated-by:"cloudaccount"`
}
type CloudproviderResourceListInput struct {
@@ -30,7 +30,7 @@ type CloudproviderResourceListInput struct {
Cloudprovider string `json:"cloudprovider"`
// swagger:ignore
CloudproviderId string `json:"cloudprovider_id" "yunion:deprecated-by":"cloudprovider"`
CloudproviderId string `json:"cloudprovider_id" yunion-deprecated-by:"cloudprovider"`
}
type CloudaccountResourceDetails struct {

View File

@@ -37,7 +37,7 @@ type CloudgroupJointsListInput struct {
// 根据公有云用户组过滤资源
Cloudgroup string `json:"cloudgroup"`
// swagger:ignore
CloudgroupId string `json:"cloudgroup_id" "yunion:deprecated-by":"cloudgroup"`
CloudgroupId string `json:"cloudgroup_id" yunion-deprecated-by:"cloudgroup"`
}
type CloudgroupJointBaseUpdateInput struct {
@@ -80,6 +80,9 @@ type CloudgroupListInput struct {
// 根据权限过滤权限组
CloudpolicyId string `json:"cloudpolicy_id"`
// 是否可用
Usable *bool `json:"usable"`
}
type SCloudIdBaseResource struct {
@@ -105,15 +108,7 @@ type CloudgroupDetails struct {
type CloudgroupCreateInput struct {
apis.StatusInfrasResourceBaseCreateInput
// 平台
//
// | 云平台 | 说明 |
// |----------|---------------------------------------------|
// | Google | 支持 |
// | Aliyun | 支持 |
// | Huawei | 支持 |
// | Azure | 支持 |
// | Qcloud | 支持 |
// 平台, 目前支持Qcloud,Google,Azure,Aliyun,Huawei,Aws
Provider string `json:"provider"`
// 权限Id列表, 权限provider必须和权限组provider一致
@@ -123,84 +118,36 @@ type CloudgroupCreateInput struct {
type CloudgroupAddUserInput struct {
// 用户Id
//
// | 云平台 | 说明 |
// |----------|---------------------------------------------|
// | Google | 不支持 |
// | Aliyun | 支持 |
// | Huawei | 支持 |
// | Azure | 支持 |
// | 腾讯云 | 支持 |
ClouduserId string `json:"clouduser_id"`
}
type CloudgroupRemoveUserInput struct {
// 用户Id
//
// | 云平台 | 说明 |
// |----------|---------------------------------------------|
// | Google | 不支持 |
// | Aliyun | 支持 |
// | Huawei | 支持 |
// | Azure | 支持 |
// | 腾讯云 | 支持 |
ClouduserId string `json:"clouduser_id"`
}
type CloudgroupAttachPolicyInput struct {
// 权限Id
//
// | 云平台 | 说明 |
// |----------|---------------------------------------------|
// | Google | 不支持 |
// | Aliyun | 支持 |
// | Huawei | 支持 |
// | Azure | 不支持 |
// | 腾讯云 | 支持 |
CloudpolicyId string `json:"cloudpolicy_id"`
}
type CloudgroupSetUsersInput struct {
// 公有云子账号Ids
//
// | 云平台 | 说明 |
// |----------|---------------------------------------------|
// | Google | 支持 |
// | Aliyun | 支持 |
// | Huawei | 支持 |
// | Azure | 支持 |
// | 腾讯云 | 支持 |
ClouduserIds []string `json:"clouduser_ids"`
}
type CloudgroupSetPoliciesInput struct {
// 权限Ids
//
// | 云平台 | 说明 |
// |----------|---------------------------------------------|
// | Google | 支持 |
// | Aliyun | 支持 |
// | Huawei | 支持 |
// | Azure | 不支持 |
// | 腾讯云 | 支持 |
CloudpolicyIds []string `json:"cloudpolicy_ids"`
}
type CloudgroupDetachPolicyInput struct {
// 权限Id
//
// | 云平台 | 说明 |
// |----------|---------------------------------------------|
// | Google | 不支持 |
// | Aliyun | 支持 |
// | Huawei | 支持 |
// | Azure | 不支持 |
// | 腾讯云 | 支持 |
CloudpolicyId string `json:"cloudpolicy_id"`
}

View File

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

View File

@@ -56,7 +56,7 @@ type CloudpolicyResourceListInput struct {
Cloudpolicy string `json:"cloudpolicy"`
// swagger:ignore
CloudpolicyId string `json:"cloudpolicy_id" "yunion:deprecated-by":"cloudpolicy"`
CloudpolicyId string `json:"cloudpolicy_id" yunion-deprecated-by:"cloudpolicy"`
}
type CloudpolicyResourceDetails struct {

View File

@@ -35,7 +35,7 @@ const (
)
type ClouduserCreateInput struct {
apis.StatusUserResourceCreateInput
apis.StatusDomainLevelUserResourceCreateInput
apis.StatusBaseResourceCreateInput
// 云订阅ID
@@ -88,7 +88,7 @@ type ClouduserCreateInput struct {
// | Google | 至少需要一个初始权限 |
// | Aliyun | 支持 |
// | Huawei | 不支持 |
// | Azure | 支持 |
// | Azure | 支持 |
// | 腾讯云 | 支持 |
CloudpolicyIds []string `json:"cloudpolicy_ids"`
@@ -100,7 +100,7 @@ type ClouduserCreateInput struct {
}
type ClouduserListInput struct {
apis.StatusUserResourceListInput
apis.StatusDomainLevelUserResourceListInput
CloudaccountResourceListInput
CloudproviderResourceListInput
@@ -113,7 +113,7 @@ type ClouduserListInput struct {
}
type ClouduserDetails struct {
apis.StatusUserResourceDetails
apis.StatusDomainLevelUserResourceDetails
SClouduser
CloudaccountResourceDetails
@@ -162,7 +162,7 @@ type ClouduserResourceListInput struct {
Clouduser string `json:"clouduser"`
// swagger:ignore
ClouduserId string `json:"clouduser_id" "yunion:deprecated-by":"clouduser"`
ClouduserId string `json:"clouduser_id" yunion-deprecated-by:"clouduser"`
}
type ClouduserResourceDetails struct {

View File

@@ -22,10 +22,9 @@ import (
type SCloudaccount struct {
apis.SStandaloneResourceBase
apis.SDomainizedResourceBase
Provider string `json:"provider"`
Brand string `json:"brand"`
IamLoginUrl string `json:"iam_login_url"`
IsSupportCloudId *bool `json:"is_support_cloud_id,omitempty"`
Provider string `json:"provider"`
Brand string `json:"brand"`
IamLoginUrl string `json:"iam_login_url"`
}
// SCloudaccountResourceBase is an autogenerated struct via yunion.io/x/onecloud/pkg/cloudid/models.SCloudaccountResourceBase.
@@ -103,7 +102,7 @@ type SCloudproviderResourceBase struct {
// SClouduser is an autogenerated struct via yunion.io/x/onecloud/pkg/cloudid/models.SClouduser.
type SClouduser struct {
apis.SStatusUserResourceBase
apis.SStatusDomainLevelUserResourceBase
apis.SExternalizedResourceBase
SCloudproviderResourceBase
SCloudaccountResourceBase

View File

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

View File

@@ -27,7 +27,7 @@ type CachedImageUncacheImageInput struct {
}
type CachedimageDetails struct {
apis.StandaloneResourceDetails
apis.SharableVirtualResourceDetails
SCachedimage

View File

@@ -18,7 +18,7 @@ const (
CACHED_IMAGE_STATUS_INIT = "init"
CACHED_IMAGE_STATUS_SAVING = "saving"
CACHED_IMAGE_STATUS_CACHING = "caching"
CACHED_IMAGE_STATUS_READY = "ready"
CACHED_IMAGE_STATUS_ACTIVE = "active"
CACHED_IMAGE_STATUS_DELETING = "deleting"
CACHED_IMAGE_STATUS_CACHE_FAILED = "cache_fail"

View File

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

View File

@@ -31,24 +31,3 @@ type CachedLoadbalancerCertificateListInput struct {
RegionalFilterListInput
LoadbalancerCertificateFilterListInput
}
type LoadbalancerCertificateResourceInfo struct {
// 负载均衡证书名称
Certificate string `json:"certificate"`
}
type LoadbalancerCertificateResourceInput struct {
// 证书名称或ID
Certificate string `json:"certificate"`
// swagger:ignore
// Deprecated
CertificateId string `json:"certificate_id" "yunion:deprecated-by":"certificate"`
}
type LoadbalancerCertificateFilterListInput struct {
LoadbalancerCertificateResourceInput
// 以证书名称排序
OrderByCertificate string `json:"order_by_certificate"`
}

View File

@@ -66,7 +66,7 @@ type CloudenvResourceListInput struct {
Providers []string `json:"providers"`
// swagger:ignore
// Deprecated
Provider []string `json:"provider" "yunion:deprecated-by":"providers"`
Provider []string `json:"provider" yunion-deprecated-by:"providers"`
// 列出指定云平台品牌的资源一般来说brand和provider相同除了以上支持的provider之外还支持以下band
//
@@ -77,7 +77,7 @@ type CloudenvResourceListInput struct {
Brands []string `json:"brands"`
// swagger:ignore
// Deprecated
Brand []string `json:"brand" "yunion:deprecated-by":"brands"`
Brand []string `json:"brand" yunion-deprecated-by:"brands"`
// 列出指定云环境的资源,支持云环境如下:
//
@@ -180,9 +180,9 @@ type CloudaccountCreateInput struct {
// 自动同步间隔时间
SyncIntervalSeconds int `json:"sync_interval_seconds"`
// 自动根据云上项目或订阅创建本地项目
// 自动根据云上项目或订阅创建本地项目, OpenStack此参数为true
// default: false
AutoCreateProject bool `json:"auto_create_project"`
AutoCreateProject *bool `json:"auto_create_project"`
// 额外信息,例如账单的access key
Options *jsonutils.JSONDict `json:"options"`
@@ -227,7 +227,7 @@ type CloudaccountListInput struct {
// 代理
ProxySetting string `json:"proxy_setting"`
// swagger:ignore
ProxySettingId string `json:"proxy_setting_id" "yunion:deprecated-by":"proxy_setting"`
ProxySettingId string `json:"proxy_setting_id" yunion-deprecated-by:"proxy_setting"`
}
type ProviderProject struct {

View File

@@ -147,15 +147,15 @@ type CloudproviderResourceInput struct {
// swagger:ignore
// Deprecated
// description: this param will be deprecate at 3.0
Manager string `json:"manager" "yunion:deprecated-by":"cloudprovider"`
Manager string `json:"manager" yunion-deprecated-by:"cloudprovider"`
// swagger:ignore
// Deprecated
// description: this param will be deprecate at 3.0
ManagerId string `json:"manager_id" "yunion:deprecated-by":"cloudprovider"`
ManagerId string `json:"manager_id" yunion-deprecated-by:"cloudprovider"`
// swagger:ignore
// Deprecated
// description: this param will be deprecate at 3.0
CloudproviderId string `json:"cloudprovider_id" "yunion:deprecated-by":"cloudprovider"`
CloudproviderId string `json:"cloudprovider_id" yunion-deprecated-by:"cloudprovider"`
}
type ManagedResourceListInput struct {
@@ -169,15 +169,15 @@ type ManagedResourceListInput struct {
// swagger:ignore
// Deprecated
// description: this param will be deprecate at 3.0
CloudaccountId string `json:"cloudaccount_id" "yunion:deprecated-by":"cloudaccount"`
CloudaccountId string `json:"cloudaccount_id" yunion-deprecated-by:"cloudaccount"`
// swagger:ignore
// Deprecated
// description: this param will be deprecate at 3.0
Account string `json:"account" "yunion:deprecated-by":"cloudaccount"`
Account string `json:"account" yunion-deprecated-by:"cloudaccount"`
// swagger:ignore
// Deprecated
// description: this param will be deprecate at 3.0
AccountId string `json:"account_id" "yunion:deprecated-by":"cloudaccount"`
AccountId string `json:"account_id" yunion-deprecated-by:"cloudaccount"`
// 过滤资源是否为非OneCloud内置私有云管理的资源
// default: false
@@ -251,3 +251,23 @@ type CloudproviderUpdateInput struct {
type CloudproviderCreateInput struct {
}
type CloudproviderGetStorageClassInput struct {
CloudregionResourceInput
}
type CloudproviderGetStorageClassOutput struct {
// 对象存储存储类型
StorageClasses []string `json:"storage_classes"`
}
type CloudproviderGetCannedAclInput struct {
CloudregionResourceInput
}
type CloudproviderGetCannedAclOutput struct {
// Bucket支持的预置ACL列表
BucketCannedAcls []string `json:"bucket_canned_acls"`
// Object支持的预置ACL列表
ObjectCannedAcls []string `json:"object_canned_acls"`
}

View File

@@ -57,6 +57,7 @@ const (
CITY_FO_SHAN = "Foshan" //佛山
CITY_QUAN_ZHOU = "Quanzhou" //泉州
CITY_NEI_MENG_GU = "Neimenggu" //内蒙古
CITY_WU_LAN_CHA_BU = "Wulanchabu" //乌兰察布
// 日本
CITY_TOKYO = "Tokyo" //东京

View File

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

View File

@@ -70,13 +70,13 @@ type SDBInstanceSetPrivilegesInput struct {
type DBInstancePrivilege struct {
// 数据库名称
Database string
Database string `json:"database"`
// 账号名称
Account string
Account string `json:"account"`
// 数据库Id
DBInstancedatabaseId string
DBInstancedatabaseId string `json:"dbinstancedatabase_id"`
// 权限
Privileges string
Privileges string `json:"privileges"`
}
type DBInstanceAccountDetails struct {

View File

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

View File

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

View File

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

View File

@@ -53,7 +53,7 @@ type ELasticcacheResourceInput struct {
// swagger:ignore
// Deprecated
ElasticcacheId string `json:"elasticcache_id" "yunion:deprecated-by":"elasticcache"`
ElasticcacheId string `json:"elasticcache_id" yunion-deprecated-by:"elasticcache"`
}
type ElasticcacheFilterListInput struct {

View File

@@ -21,23 +21,22 @@ type SElasticipCreateInput struct {
// 区域名称或Id, 建议使用Id
// 在指定区域内创建弹性公网ip
Cloudregion string `json:"cloudregion"`
CloudregionId string `json:"cloudregion_id"`
// swagger:ignore
Cloudregion string `json:"cloudregion" yunion-deprecated-by:"cloudregion_id"`
// swagger:ignore
Region string `json:"region" yunion-deprecated-by:"cloudregion_id"`
// swagger:ignore
RegionId string `json:"region_id" yunion-deprecated-by:"cloudregion_id"`
// swagger:ignore
Region string
Cloudprovider string `json:"cloudprovider" yunion-deprecated-by:"manager_id"`
// swagger:ignore
RegionId string
// swagger:ignore
CloudregionId string
Manager string `json:"manager" yunion-deprecated-by:"manager_id"`
// 子订阅Id, 建议使用Id
// 使用指定子订阅创建弹性公网ip
// 弹性公网ip和虚拟机在同一区域同一子订阅底下才可以进行绑定操作
Cloudprovider string `json:"cloudprovider"`
// swagger:ignore
Manager string
// swagger:ignore
ManagerId string
ManagerId string `json:"manager_id"`
// 计费类型: 流量或带宽
//
@@ -63,11 +62,11 @@ type SElasticipCreateInput struct {
Mode string `json:"mode"`
// 子网名称或Id
// 私有云创建此参数必传,例如Openstack, ZStack
Network string `json:"network"`
// swagger:ignore
NetworkId string
Network string `json:"network" yunion-deprecated-by:"network_id"`
// 子网Id
// 私有云创建此参数必传,例如Openstack, ZStack
NetworkId string `json:"network_id"`
}
type ElasticipDetails struct {

View File

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

View File

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

View File

@@ -42,7 +42,7 @@ type GlobalVpcResourceInput struct {
// swagger:ignore
// Deprecated
GlobalvpcId string `json:"globalvpc_id" "yunion:deprecated-by":"globalvpc"`
GlobalvpcId string `json:"globalvpc_id" yunion-deprecated-by:"globalvpc"`
}
type GlobalVpcResourceListInput struct {

View File

@@ -21,6 +21,8 @@ type GuestnetworkDetails struct {
// IP子网名称
Network string `json:"network"`
// 所属Wire
WireId string `json:"wire_id"`
}
type GuestnetworkShortDesc struct {

View File

@@ -28,13 +28,13 @@ type ServerListInput struct {
HostFilterListInput
NetworkFilterListInput `"yunion:ambiguous-prefix":"vpc_"`
NetworkFilterListInput `yunion-ambiguous-prefix:"vpc_"`
billing.BillingResourceListInput
GroupFilterListInput
SecgroupFilterListInput
//DiskFilterListInput `"yunion:ambiguous-prefix":"storage_"`
//DiskFilterListInput `yunion-ambiguous-prefix:"storage_"`
ScalingGroupFilterListInput
// 只列出裸金属主机
@@ -64,13 +64,13 @@ type ServerListInput struct {
// 列出可以挂载磁盘的主机
AttachableServersForDisk string `json:"attachable_servers_for_disk"`
// Deprecated:列出可以挂载磁盘的主机
Disk string `json:"disk" "yunion:deprecated-by":"attachable_servers_for_disk"`
Disk string `json:"disk" yunion-deprecated-by:"attachable_servers_for_disk"`
// 按主机资源类型进行排序
// enum: shared,prepaid,dedicated
ResourceType string `json:"resource_type"`
// 返回开启主备机功能的主
GetBackupGuestsOnHost *bool `json:"get_backup_guests_on_host"`
// 返回该宿主机上的所有虚拟机,包括备份
GetAllGuestsOnHost string `json:"get_all_guests_on_host"`
// 根据宿主机 SN 过滤
// HostSn string `json:"host_sn"`
@@ -285,15 +285,15 @@ type ServerResourceInput struct {
// swagger:ignore
// Deprecated
// Filter by guest Id
ServerId string `json:"server_id" "yunion:deprecated-by":"server"`
ServerId string `json:"server_id" yunion-deprecated-by:"server"`
// swagger:ignore
// Deprecated
// Filter by guest Id
Guest string `json:"guest" "yunion:deprecated-by":"server"`
Guest string `json:"guest" yunion-deprecated-by:"server"`
// swagger:ignore
// Deprecated
// Filter by guest Id
GuestId string `json:"guest_id" "yunion:deprecated-by":"server"`
GuestId string `json:"guest_id" yunion-deprecated-by:"server"`
}
type ServerFilterListInput struct {
@@ -340,3 +340,8 @@ type GuestSaveToTemplateInput struct {
// The generate name of guest template
GenerateName string `json:"generate_name"`
}
type GuestSyncFixNicsInput struct {
// 需要修正的IP地址列表
Ip []string `json:"ip"`
}

View File

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

View File

@@ -108,6 +108,8 @@ type HostListInput struct {
Uuid []string `json:"uuid"`
// 主机启动模式, 可能值位PXE和ISO
BootMode []string `json:"boot_mode"`
// 虚拟机所在的二层网络
ServerIdForNetwork string `json:"server_id_for_network"`
}
type HostDetails struct {
@@ -119,9 +121,10 @@ type HostDetails struct {
Schedtags []SchedtagShortDescDetails `json:"schedtags"`
ServerId string `json:"server_id"`
Server string `json:"server"`
ServerIps string `json:"server_ips"`
ServerId string `json:"server_id"`
Server string `json:"server"`
ServerIps string `json:"server_ips"`
ServerPendingDeleted bool `json:"server_pending_deleted"`
// 网卡数量
NicCount int `json:"nic_count"`
// 网卡详情
@@ -138,7 +141,7 @@ type HostDetails struct {
NonsystemGuests int `json:"nonsystem_guests"`
// 运行中云主机数量
// example: 2
RunningGuests int `json:"running_geusts"`
RunningGuests int `json:"running_guests"`
// CPU超分率
CpuCommitRate float64 `json:"cpu_commit_rate"`
// 内存超分率
@@ -164,7 +167,8 @@ type HostDetails struct {
CanPrepare bool `json:"can_prepare"`
PrepareFailReason string `json:"prepare_fail_reason"`
// 允许开启宿主机健康检查
AllowHealthCheck bool `json:"allow_health_check"`
AllowHealthCheck bool `json:"allow_health_check"`
AutoMigrateOnHostDown bool `json:"auto_migrate_on_host_down"`
// reserved resource for isolated device
ReservedResourceForGpu IsolatedDeviceReservedResourceInput `json:"reserved_resource_for_gpu"`
@@ -228,7 +232,7 @@ type HostResourceInput struct {
// swagger:ignore
// Deprecated
// filter by host_id
HostId string `json:"host_id" "yunion:deprecated-by":"host"`
HostId string `json:"host_id" yunion-deprecated-by:"host"`
}
type HostRegisterMetadata struct {

View File

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

View File

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

View File

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

View File

@@ -50,6 +50,9 @@ type InstanceSnapshotDetails struct {
// 快照列表
Snapshots []SimpleSnapshot `json:"snapshots"`
Properties map[string]string `json:"properties"`
// 主机快照大小
Size int `json:"size"`
}
type InstanceSnapshotListInput struct {

View File

@@ -170,6 +170,8 @@ type LoadbalancerDetails struct {
ManagedResourceInfo
CloudregionResourceInfo
LoadbalancerClusterResourceInfo
VpcResourceInfoBase
ZoneResourceInfoBase
NetworkResourceInfoBase
@@ -199,7 +201,10 @@ type LoadbalancerResourceInfo struct {
// 可用区ID
ZoneId string `json:"zone_id"`
ZoneResourceInfoBase
ZoneResourceInfo
// cloud provider info
ManagedResourceInfo
}
type LoadbalancerResourceInput struct {
@@ -208,7 +213,7 @@ type LoadbalancerResourceInput struct {
// swagger:ignore
// Deprecated
LoadbalancerId string `json:"loadbalancer_id" "yunion:deprecated-by":"loadbalancer"`
LoadbalancerId string `json:"loadbalancer_id" yunion-deprecated-by:"loadbalancer"`
}
type LoadbalancerFilterListInput struct {

View File

@@ -23,3 +23,24 @@ type LoadbalancerAclDetails struct {
SLoadbalancerAcl
}
type LoadbalancerAclResourceInfo struct {
// 负载均衡ACL名称
Acl string `json:"acl"`
}
type LoadbalancerAclResourceInput struct {
// ACL名称或ID
AclId string `json:"acl_id"`
// swagger:ignore
// Deprecated
Acl string `json:"acl" yunion-deprecated-by:"acl_id"`
}
type LoadbalancerAclFilterListInput struct {
LoadbalancerAclResourceInput
// 以ACL名称排序
OrderByAcl string `json:"order_by_acl"`
}

View File

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

View File

@@ -20,3 +20,24 @@ type LoadbalancerCertificateDetails struct {
apis.VirtualResourceDetails
SLoadbalancerCertificate
}
type LoadbalancerCertificateResourceInfo struct {
// 负载均衡证书名称
Certificate string `json:"certificate"`
}
type LoadbalancerCertificateResourceInput struct {
// 证书名称或ID
Certificate string `json:"certificate"`
// swagger:ignore
// Deprecated
CertificateId string `json:"certificate_id" yunion-deprecated-by:"certificate"`
}
type LoadbalancerCertificateFilterListInput struct {
LoadbalancerCertificateResourceInput
// 以证书名称排序
OrderByCertificate string `json:"order_by_certificate"`
}

View File

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

View File

@@ -19,11 +19,12 @@ import "yunion.io/x/onecloud/pkg/apis"
type LoadbalancerListenerDetails struct {
apis.VirtualResourceDetails
LoadbalancerResourceInfo
LoadbalancerAclResourceInfo
LoadbalancerCertificateResourceInfo
SLoadbalancerListener
BackendGroup string `json:"backend_group"`
AclName string `json:"acl_name"`
CertificateName string `json:"certificate_name"`
OriginCertificateId string `json:"origin_certificate_id"`
}
@@ -45,7 +46,7 @@ type LoadbalancerListenerResourceInput struct {
// 负载均衡监听器ID
// swagger:ignore
// Deprecated
ListenerId string `json:"listener_id" "yunion:deprecated-by":"listener"`
ListenerId string `json:"listener_id" yunion-deprecated-by:"listener"`
}
type LoadbalancerListenerFilterListInput struct {

View File

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

View File

@@ -24,7 +24,7 @@ type WireResourceInput struct {
// swagger:ignore
// Deprecated
// fitler by wire id
WireId string `json:"wire_id" "yunion:deprecated-by":"wire"`
WireId string `json:"wire_id" yunion-deprecated-by:"wire"`
}
type WireFilterListBase struct {
@@ -47,7 +47,7 @@ type NetworkResourceInput struct {
// swagger:ignore
// Deprecated
// filter by networkId
NetworkId string `json:"network_id" "yunion:deprecated-by":"network"`
NetworkId string `json:"network_id" yunion-deprecated-by:"network"`
}
type NetworkFilterListBase struct {
@@ -300,3 +300,13 @@ type NetworkUpdateInput struct {
// 分配策略
AllocPolicy string `json:"alloc_policy"`
}
type GetNetworkAddressesInput struct {
// 获取资源的范围,例如 project|domain|system
Scope string `json:"scope"`
}
type GetNetworkAddressesOutput struct {
// IP子网地址记录
Addresses []SNetworkAddress `json:"addresses"`
}

View File

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

View File

@@ -45,7 +45,7 @@ type SchedtagResourceInput struct {
// swagger:ignore
// Deprecated
// filter by schedtag_id
SchedtagId string `json:"schedtag_id" "yunion:deprecated-by":"schedtag"`
SchedtagId string `json:"schedtag_id" yunion-deprecated-by:"schedtag"`
}
type SchedtagFilterListInput struct {
@@ -65,11 +65,11 @@ type SchedtagListInput struct {
apis.ScopedResourceBaseListInput
// fitler by resource_type
ResourceType string `json:"resource_type"`
ResourceType []string `json:"resource_type"`
// swagger:ignore
// Deprecated
// filter by type, alias for resource_type
Type string `json:"type" "yunion:deprecated-by":"resource_type"`
Type string `json:"type" yunion-deprecated-by:"resource_type"`
DefaultStrategy []string `json:"default_strategy"`
}
@@ -86,6 +86,7 @@ type SchedtagDetails struct {
HostCount int `json:"host_count"`
ServerCount int `json:"server_count"`
OtherCount int `json:"other_count"`
ResourceCount int `json:"resource_count"`
JoinModelKeyword string `json:"join_model_keyword"`
}

View File

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

View File

@@ -127,7 +127,7 @@ var (
STORAGE_ZSTACK_LOCAL_STORAGE, STORAGE_ZSTACK_CEPH, STORAGE_GPFS,
}
HOST_STORAGE_LOCAL_TYPES = []string{STORAGE_LOCAL, STORAGE_BAREMETAL, STORAGE_ZSTACK_LOCAL_STORAGE}
HOST_STORAGE_LOCAL_TYPES = []string{STORAGE_LOCAL, STORAGE_BAREMETAL, STORAGE_ZSTACK_LOCAL_STORAGE, STORAGE_OPENSTACK_NOVA}
STORAGE_LIMITED_TYPES = []string{STORAGE_LOCAL, STORAGE_BAREMETAL, STORAGE_NAS, STORAGE_RBD, STORAGE_NFS, STORAGE_GPFS}
@@ -144,7 +144,7 @@ type StorageResourceInput struct {
// swagger:ignore
// Deprecated
// filter by storage_id
StorageId string `json:"storage_id" "yunion:deprecated-by":"storage"`
StorageId string `json:"storage_id" yunion-deprecated-by:"storage"`
}
type StorageFilterListInputBase struct {

View File

@@ -48,13 +48,13 @@ type StoragecachedimageListInput struct {
Storagecache string `json:"storagecache"`
// Deprecated
// swagger:ignore
StoragecacheId string `json:"storagecache_id" "yunion:deprecated-by":"storagecache"`
StoragecacheId string `json:"storagecache_id" yunion-deprecated-by:"storagecache"`
// 以镜像缓存过滤
Cachedimage string `json:"cachedimage"`
// Deprecated
// swagger:ignore
CachedimageId string `json:"cachedimage_id" "yunion:deprecated-by":"cachedimage"`
CachedimageId string `json:"cachedimage_id" yunion-deprecated-by:"cachedimage"`
// 镜像状态
Status []string `json:"status"`

View File

@@ -90,7 +90,7 @@ type VpcResourceInput struct {
// swagger:ignore
// Deprecated
// filter by vpc Id
VpcId string `json:"vpc_id" "yunion:deprecated-by":"vpc"`
VpcId string `json:"vpc_id" yunion-deprecated-by:"vpc"`
// Vpc外网访问模式
ExternalAccessMode string `json:"external_access_mode"`

View File

@@ -32,6 +32,34 @@ var (
}
)
const (
sVpcInterCidr = "100.65.0.0/17"
sVpcInterExtCidr = "100.65.0.0/30"
VpcInterExtMask = 30
sVpcInterExtIP1 = "100.65.0.1"
sVpcInterExtIP2 = "100.65.0.2"
VpcInterExtMac1 = "ee:ee:ee:ee:ee:f0"
VpcInterExtMac2 = "ee:ee:ee:ee:ee:f1"
)
var (
vpcInterCidr netutils.IPV4Prefix
vpcInterExtIP1 netutils.IPV4Addr
vpcInterExtIP2 netutils.IPV4Addr
)
func VpcInterCidr() netutils.IPV4Prefix {
return vpcInterCidr
}
func VpcInterExtIP1() netutils.IPV4Addr {
return vpcInterExtIP1
}
func VpcInterExtIP2() netutils.IPV4Addr {
return vpcInterExtIP2
}
const (
sVpcMappedCidr = "100.64.0.0/17"
VpcMappedIPMask = 17
@@ -92,6 +120,10 @@ func init() {
return v
}
vpcInterCidr = mp(netutils.NewIPV4Prefix(sVpcInterCidr))
vpcInterExtIP1 = mi(netutils.NewIPV4Addr(sVpcInterExtIP1))
vpcInterExtIP2 = mi(netutils.NewIPV4Addr(sVpcInterExtIP2))
vpcMappedCidr = mp(netutils.NewIPV4Prefix(sVpcMappedCidr))
vpcMappedGatewayIP = mi(netutils.NewIPV4Addr(sVpcMappedGatewayIP))

View File

@@ -202,8 +202,6 @@ type SCloudaccount struct {
ProxySettingId string `json:"proxy_setting_id"`
// 公有云子账号登录地址
IamLoginUrl string `json:"iam_login_url"`
// 是否支持创建公有云子账号
IsSupportCloudId *bool `json:"is_support_cloud_id,omitempty"`
}
// SCloudprovider is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SCloudprovider.
@@ -731,10 +729,11 @@ type SElasticip struct {
// SExternalProject is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SExternalProject.
type SExternalProject struct {
apis.SStandaloneResourceBase
apis.SProjectizedResourceBase
apis.SVirtualResourceBase
apis.SExternalizedResourceBase
SManagedResourceBase
// 归属云账号ID
CloudaccountId string `json:"cloudaccount_id"`
}
// SGlobalVpc is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SGlobalVpc.
@@ -868,6 +867,20 @@ type SGuestTemplateResourceBase struct {
GuestTemplateId string `json:"guest_template_id"`
}
// SGuestcdrom is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SGuestcdrom.
type SGuestcdrom struct {
Id string `json:"id"`
// = Column(VARCHAR(36, charset='ascii'), primary_key=True)
ImageId string `json:"image_id"`
// Column(VARCHAR(36, charset='ascii'), nullable=True)
Name string `json:"name"`
// Column(VARCHAR(64, charset='ascii'), nullable=True)
Path string `json:"path"`
// Column(VARCHAR(256, charset='ascii'), nullable=True)
Size int `json:"size"`
UpdateVersion int `json:"update_version"`
}
// SGuestdisk is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SGuestdisk.
type SGuestdisk struct {
SGuestJointsBase
@@ -987,11 +1000,10 @@ type SHost struct {
OvnVersion string `json:"ovn_version"`
IsBaremetal bool `json:"is_baremetal"`
// 是否处于维护状态
IsMaintenance bool `json:"is_maintenance"`
LastPingAt time.Time `json:"last_ping_at"`
EnableHealthCheck bool `json:"enable_health_check"`
ResourceType string `json:"resource_type"`
RealExternalId string `json:"real_external_id"`
IsMaintenance bool `json:"is_maintenance"`
EnableHealthCheck bool `json:"enable_health_check"`
ResourceType string `json:"resource_type"`
RealExternalId string `json:"real_external_id"`
// 是否为导入的宿主机
IsImport bool `json:"is_import"`
// 是否允许PXE启动
@@ -1179,8 +1191,7 @@ type SLoadbalancer struct {
AddressType string `json:"address_type"`
// 网络类型
NetworkType string `json:"network_type"`
// 负载均衡集群Id
ClusterId string `json:"cluster_id"`
SLoadbalancerClusterResourceBase
// 计费类型
ChargeType string `json:"charge_type"`
// 套餐名称
@@ -1246,12 +1257,9 @@ type SLoadbalancerAgentDeployment struct {
// SLoadbalancerAgentParams is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SLoadbalancerAgentParams.
type SLoadbalancerAgentParams struct {
KeepalivedConfTmpl string `json:"keepalived_conf_tmpl"`
HaproxyConfTmpl string `json:"haproxy_conf_tmpl"`
TelegrafConfTmpl string `json:"telegraf_conf_tmpl"`
Vrrp SLoadbalancerAgentParamsVrrp `json:"vrrp"`
Haproxy SLoadbalancerAgentParamsHaproxy `json:"haproxy"`
Telegraf SLoadbalancerAgentParamsTelegraf `json:"telegraf"`
KeepalivedConfTmpl string `json:"keepalived_conf_tmpl"`
HaproxyConfTmpl string `json:"haproxy_conf_tmpl"`
TelegrafConfTmpl string `json:"telegraf_conf_tmpl"`
}
// SLoadbalancerAgentParamsHaproxy is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SLoadbalancerAgentParamsHaproxy.
@@ -1377,7 +1385,7 @@ type SLoadbalancerHTTPRedirect struct {
// SLoadbalancerHTTPSListener is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SLoadbalancerHTTPSListener.
type SLoadbalancerHTTPSListener struct {
CertificateId string `json:"certificate_id"`
SLoadbalancerCertificateResourceBase
CachedCertificateId string `json:"cached_certificate_id"`
TLSCipherPolicy string `json:"tls_cipher_policy"`
EnableHttp2 bool `json:"enable_http2"`
@@ -1425,8 +1433,8 @@ type SLoadbalancerListener struct {
BackendIdleTimeout int `json:"backend_idle_timeout"`
AclStatus string `json:"acl_status"`
AclType string `json:"acl_type"`
AclId string `json:"acl_id"`
CachedAclId string `json:"cached_acl_id"`
SLoadbalancerAclResourceBase
CachedAclId string `json:"cached_acl_id"`
SLoadbalancerRateLimiter
SLoadbalancerTCPListener
SLoadbalancerUDPListener
@@ -1493,6 +1501,16 @@ type SManagedResourceBase struct {
ManagerId string `json:"manager_id"`
}
// SNatDEntry is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SNatDEntry.
type SNatDEntry struct {
SNatEntry
ExternalIP string `json:"external_ip"`
ExternalPort int `json:"external_port"`
InternalIP string `json:"internal_ip"`
InternalPort int `json:"internal_port"`
IpProtocol string `json:"ip_protocol"`
}
// SNatEntry is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SNatEntry.
type SNatEntry struct {
apis.SStatusInfrasResourceBase
@@ -1523,6 +1541,25 @@ type SNatgatewayResourceBase struct {
NatgatewayId string `json:"natgateway_id"`
}
// SNetInterface is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SNetInterface.
type SNetInterface struct {
Mac string `json:"mac"`
// Column(VARCHAR(36, charset='ascii'), primary_key=True)
BaremetalId string `json:"baremetal_id"`
// Column(VARCHAR(36, charset='ascii'), nullable=True)
WireId string `json:"wire_id"`
// Column(VARCHAR(36, charset='ascii'), nullable=True)
Rate int `json:"rate"`
// Column(Integer, nullable=True) # Mbps
NicType string `json:"nic_type"`
// Column(VARCHAR(36, charset='ascii'), nullable=True)
Index byte `json:"index"`
// Column(TINYINT, nullable=True)
LinkUp bool `json:"link_up"`
// Column(Boolean, nullable=True)
Mtu int16 `json:"mtu"`
}
// SNetwork is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SNetwork.
type SNetwork struct {
apis.SSharableVirtualResourceBase
@@ -1697,8 +1734,6 @@ type SScalingAlarm struct {
Value float64 `json:"value"`
// Real-time cumulate number
RealCumulate int `json:"real_cumulate"`
// Last trigger time
LastTriggerTime time.Time `json:"last_trigger_time"`
}
// SScalingGroup is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SScalingGroup.
@@ -1729,10 +1764,6 @@ type SScalingGroup struct {
HealthCheckGov int `json:"health_check_gov"`
LoadbalancerBackendPort int `json:"loadbalancer_backend_port"`
LoadbalancerBackendWeight int `json:"loadbalancer_backend_weight"`
// Time to allow scale
AllowScaleTime time.Time `json:"allow_scale_time"`
// NextCheckTime descripe the next time to check instance's health
NextCheckTime time.Time `json:"next_check_time"`
}
// SScalingGroupGuest is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SScalingGroupGuest.
@@ -1856,7 +1887,8 @@ type SSecurityGroupCache struct {
SManagedResourceBase
SSecurityGroupResourceBase
// 虚拟私有网络外部Id
VpcId string `json:"vpc_id"`
VpcId string `json:"vpc_id"`
ExternalProjectId string `json:"external_project_id"`
}
// SSecurityGroupResourceBase is an autogenerated struct via yunion.io/x/onecloud/pkg/compute/models.SSecurityGroupResourceBase.

View File

@@ -73,7 +73,7 @@ type IdentityProviderCreateInput struct {
TargetDomain string `json:"target_domain"`
// swagger:ignore
// Deprecated
TargetDomainId string `json:"target_domain_id" "yunion:deprecated-by":"target_domain"`
TargetDomainId string `json:"target_domain_id" yunion-deprecated-by:"target_domain"`
// 新建域的时候是否自动新建第一个项目
AutoCreateProject *bool `json:"auto_create_project"`

View File

@@ -49,22 +49,22 @@ type ProjectFilterListInput struct {
ProjectDomain string `json:"project_domain"`
// swagger:ignore
// Deprecated
ProjectDomainId string `json:"project_domain_id" "yunion:deprecated-by":"project-domain"`
ProjectDomainId string `json:"project_domain_id" yunion-deprecated-by:"project-domain"`
// 以项目ID或Name过滤列表结果
Project string `json:"project"`
// swagger:ignore
// Deprecated
// filter by project_id
ProjectId string `json:"project_id" "yunion:deprecated-by":"project"`
ProjectId string `json:"project_id" yunion-deprecated-by:"project"`
// swagger:ignore
// Deprecated
// filter by tenant
Tenant string `json:"tenant" "yunion:deprecated-by":"project"`
Tenant string `json:"tenant" yunion-deprecated-by:"project"`
// swagger:ignore
// Deprecated
// filter by tenant_id
TenantId string `json:"tenant_id" "yunion:deprecated-by":"project"`
TenantId string `json:"tenant_id" yunion-deprecated-by:"project"`
}
type UserFilterListInput struct {
@@ -79,7 +79,7 @@ type UserFilterListInput struct {
// swagger:ignore
// Deprecated
// filter by user_id
UserId string `json:"user_id" "yunion:deprecated-by":"user"`
UserId string `json:"user_id" yunion-deprecated-by:"user"`
}
type GroupFilterListInput struct {
@@ -94,7 +94,7 @@ type GroupFilterListInput struct {
// swagger:ignore
// Deprecated
// filter by group_id
GroupId string `json:"group_id" "yunion:deprecated-by":"group"`
GroupId string `json:"group_id" yunion-deprecated-by:"group"`
}
type RoleFilterListInput struct {
@@ -109,7 +109,7 @@ type RoleFilterListInput struct {
// swagger:ignore
// Deprecated
// filter by role_id
RoleId string `json:"role_id" "yunion:deprecated-by":"role"`
RoleId string `json:"role_id" yunion-deprecated-by:"role"`
}
type ServiceFilterListInput struct {
@@ -121,7 +121,7 @@ type ServiceFilterListInput struct {
// swagger:ignore
// Deprecated
// filter by service_id
ServiceId string `json:"service_id" "yunion:deprecated-by":"service"`
ServiceId string `json:"service_id" yunion-deprecated-by:"service"`
// 以服务名称排序
OrderByService string `json:"order_by_service"`
@@ -151,6 +151,9 @@ type ProjectListInput struct {
UserFilterListInput
GroupFilterListInput
// 过滤出指定用户或者组可以加入的项目
Jointable *bool `json:"jointable"`
}
type DomainListInput struct {
@@ -322,7 +325,7 @@ type RegionFilterListInput struct {
Region string `json:"region"`
// swagger:ignore
// Deprecated
RegionId string `json:"region_id" "yunion:deprecated-by":"region"`
RegionId string `json:"region_id" yunion-deprecated-by:"region"`
}
type RegionListInput struct {

View File

@@ -92,6 +92,20 @@ type SFederatedUser struct {
DisplayName string `json:"display_name"`
}
// SFederationProtocol is an autogenerated struct via yunion.io/x/onecloud/pkg/keystone/models.SFederationProtocol.
type SFederationProtocol struct {
Id string `json:"id"`
IdpId string `json:"idp_id"`
MappingId string `json:"mapping_id"`
}
// SFernetKey is an autogenerated struct via yunion.io/x/onecloud/pkg/keystone/models.SFernetKey.
type SFernetKey struct {
Type string `json:"type"`
Index int `json:"index"`
Key string `json:"key"`
}
// SGroup is an autogenerated struct via yunion.io/x/onecloud/pkg/keystone/models.SGroup.
type SGroup struct {
SIdentityBaseResource
@@ -129,28 +143,45 @@ type SIdmapping struct {
EntityType string `json:"entity_type"`
}
// SIdpRemoteIds is an autogenerated struct via yunion.io/x/onecloud/pkg/keystone/models.SIdpRemoteIds.
type SIdpRemoteIds struct {
IdpId string `json:"idp_id"`
RemoteId string `json:"remote_id"`
}
// SImpliedRole is an autogenerated struct via yunion.io/x/onecloud/pkg/keystone/models.SImpliedRole.
type SImpliedRole struct {
PriorRoleId string `json:"prior_role_id"`
ImpliedRoleId string `json:"implied_role_id"`
}
// SLocalUser is an autogenerated struct via yunion.io/x/onecloud/pkg/keystone/models.SLocalUser.
type SLocalUser struct {
apis.SResourceBase
Id int `json:"id"`
UserId string `json:"user_id"`
DomainId string `json:"domain_id"`
Name string `json:"name"`
FailedAuthCount int `json:"failed_auth_count"`
FailedAuthAt time.Time `json:"failed_auth_at"`
Id int `json:"id"`
UserId string `json:"user_id"`
DomainId string `json:"domain_id"`
Name string `json:"name"`
FailedAuthCount int `json:"failed_auth_count"`
}
// SNonlocalUser is an autogenerated struct via yunion.io/x/onecloud/pkg/keystone/models.SNonlocalUser.
type SNonlocalUser struct {
DomainId string `json:"domain_id"`
Name string `json:"name"`
UserId string `json:"user_id"`
}
// SPassword is an autogenerated struct via yunion.io/x/onecloud/pkg/keystone/models.SPassword.
type SPassword struct {
apis.SResourceBase
Id int `json:"id"`
LocalUserId int `json:"local_user_id"`
Password string `json:"password"`
ExpiresAt time.Time `json:"expires_at"`
SelfService bool `json:"self_service"`
PasswordHash string `json:"password_hash"`
CreatedAtInt int64 `json:"created_at_int"`
ExpiresAtInt int64 `json:"expires_at_int"`
Id int `json:"id"`
LocalUserId int `json:"local_user_id"`
Password string `json:"password"`
SelfService bool `json:"self_service"`
PasswordHash string `json:"password_hash"`
CreatedAtInt int64 `json:"created_at_int"`
ExpiresAtInt int64 `json:"expires_at_int"`
}
// SPolicy is an autogenerated struct via yunion.io/x/onecloud/pkg/keystone/models.SPolicy.
@@ -168,6 +199,12 @@ type SProject struct {
IsDomain *bool `json:"is_domain,omitempty"`
}
// SProjectExtended is an autogenerated struct via yunion.io/x/onecloud/pkg/keystone/models.SProjectExtended.
type SProjectExtended struct {
SProject
DomainName string `json:"domain_name"`
}
// SRegion is an autogenerated struct via yunion.io/x/onecloud/pkg/keystone/models.SRegion.
type SRegion struct {
apis.SStandaloneResourceBase
@@ -181,6 +218,17 @@ type SRole struct {
apis.SSharableBaseResource
}
// SScopeResource is an autogenerated struct via yunion.io/x/onecloud/pkg/keystone/models.SScopeResource.
type SScopeResource struct {
DomainId string `json:"domain_id"`
ProjectId string `json:"project_id"`
OwnerId string `json:"owner_id"`
RegionId string `json:"region_id"`
ServiceId string `json:"service_id"`
Resource string `json:"resource"`
Count int `json:"count"`
}
// SService is an autogenerated struct via yunion.io/x/onecloud/pkg/keystone/models.SService.
type SService struct {
apis.SStandaloneResourceBase
@@ -213,6 +261,13 @@ type SUser struct {
EnableMfa *bool `json:"enable_mfa,omitempty"`
}
// SUserOption is an autogenerated struct via yunion.io/x/onecloud/pkg/keystone/models.SUserOption.
type SUserOption struct {
UserId string `json:"user_id"`
OptionId string `json:"option_id"`
OptionValue string `json:"option_value"`
}
// SUsergroupMembership is an autogenerated struct via yunion.io/x/onecloud/pkg/keystone/models.SUsergroupMembership.
type SUsergroupMembership struct {
apis.SResourceBase

View File

@@ -50,6 +50,7 @@ const (
IMAGE_IS_READONLY = "is_readonly"
IMAGE_PARTITION_TYPE = "partition_type"
IMAGE_INSTALLED_CLOUDINIT = "installed_cloud_init"
IMAGE_DISABLE_USB_KBD = "disable_usb_kbd"
IMAGE_STATUS_UPDATING = "updating"
)

View File

@@ -88,3 +88,12 @@ type ImageCreateInput struct {
// 镜像属性
Properties map[string]string `json:"properties"`
}
type ImageUpdateStatusInput struct {
apis.Meta
// 镜像状态
Status string `json:"status"`
// 更新镜像状态原因
Reason string `json:"reason"`
}

View File

@@ -62,9 +62,44 @@ type SImage struct {
OssChecksum string `json:"oss_checksum"`
}
// SImageMember is an autogenerated struct via yunion.io/x/onecloud/pkg/image/models.SImageMember.
type SImageMember struct {
SImagePeripheral
Member string `json:"member"`
CanShare bool `json:"can_share"`
}
// SImagePeripheral is an autogenerated struct via yunion.io/x/onecloud/pkg/image/models.SImagePeripheral.
type SImagePeripheral struct {
apis.SResourceBase
Id int `json:"id"`
ImageId string `json:"image_id"`
}
// SImageProperty is an autogenerated struct via yunion.io/x/onecloud/pkg/image/models.SImageProperty.
type SImageProperty struct {
SImagePeripheral
Name string `json:"name"`
Value string `json:"value"`
}
// SImageSubformat is an autogenerated struct via yunion.io/x/onecloud/pkg/image/models.SImageSubformat.
type SImageSubformat struct {
SImagePeripheral
Format string `json:"format"`
Size int64 `json:"size"`
Location string `json:"location"`
Checksum string `json:"checksum"`
FastHash string `json:"fast_hash"`
Status string `json:"status"`
TorrentSize int64 `json:"torrent_size"`
TorrentLocation string `json:"torrent_location"`
TorrentChecksum string `json:"torrent_checksum"`
TorrentStatus string `json:"torrent_status"`
}
// SImageTag is an autogenerated struct via yunion.io/x/onecloud/pkg/image/models.SImageTag.
type SImageTag struct {
SImagePeripheral
Value string `json:"value"`
}

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