Compare commits

...

1012 Commits

Author SHA1 Message Date
Zexi Li
caa530bd60 Merge pull request #9789 from yousong/automated-cherry-pick-of-#9785-upstream-release-3.4
Automated cherry pick of #9785: guest_deploy_task: log other deploy details with i18n
2021-01-07 21:16:57 +08:00
Yousong Zhou
559d30afa8 guest_deploy_task: log other deploy details with i18n
Fixes 9f350392 ("add service tag for actionlog")
2021-01-07 11:47:12 +08:00
Zexi Li
b8c10b8e7c Merge pull request #9766 from wanyaoqi/automated-cherry-pick-of-#9762-upstream-release-3.4
Automated cherry pick of #9762: feat(region): stop guest before freeze
2021-01-05 18:33:42 +08:00
wanyaoqi
b3285aebce feat(region): stop guest before freeze 2021-01-05 15:49:25 +08:00
Zexi Li
ad01c895cf Merge pull request #9739 from wanyaoqi/automated-cherry-pick-of-#9731-upstream-release-3.4
Automated cherry pick of #9731: fix(region): server start check host memory is enough
2020-12-30 21:40:07 +08:00
Zexi Li
b2aa6dd321 Merge pull request #9748 from rainzm/automated-cherry-pick-of-#9744-upstream-release-3.4
Automated cherry pick of #9744: fix(esxiagent): nicIndex should be incremented
2020-12-30 21:36:07 +08:00
rainzm
a4dcc91d0d fix(esxiagent): nicIndex should be incremented 2020-12-30 19:04:00 +08:00
wanyaoqi
18a751548c fix(region): server start check host memory is enough 2020-12-30 15:59:07 +08:00
Zexi Li
b53b09ebb5 Merge pull request #9718 from wanyaoqi/automated-cherry-pick-of-#9711-upstream-release-3.4
Automated cherry pick of #9711: fix(region,host,host-deployer): sync status chekc block jobs
2020-12-29 20:43:49 +08:00
Zexi Li
c6941536b7 Merge pull request #9714 from rainzm/automated-cherry-pick-of-#9693-upstream-release-3.4
Automated cherry pick of #9693: Solve the permission problem of notify to create receiver
2020-12-29 20:41:56 +08:00
wanyaoqi
edba3c3dfc fix(region,host): sync status check block jobs 2020-12-29 15:39:34 +08:00
wanyaoqi
a66c1aa1ba fix(host-deployer): add log line on blkid failed 2020-12-29 15:38:59 +08:00
wanyaoqi
c5dd4389d3 fix(climc): host add netif add params bridge/interface 2020-12-29 15:38:59 +08:00
rainzm
0e4ea782e1 feat(db): progressive inspection when determining the required scope 2020-12-29 15:14:28 +08:00
rainzm
9b993f1a99 fix(notify): inject domain info in ReceiverManager.FetchOwnerId 2020-12-29 15:14:28 +08:00
Zexi Li
8a62c46a92 Merge pull request #9704 from swordqiu/automated-cherry-pick-of-#9701-upstream-release-3.4
Automated cherry pick of #9701: fix(region): omit vpc quota check if vpc created by owner
2020-12-29 09:36:04 +08:00
Qiu Jian
d3ad4967a9 fix(region): omit vpc quota check if vpc created by owner
Vpc quota check is omitted if vpc is create by owner user
2020-12-29 01:21:47 +08:00
Zexi Li
37897cadc7 Merge pull request #9543 from ioito/automated-cherry-pick-of-#9540-upstream-release-3.4
Automated cherry pick of #9540: fix(region): openstack network is regional
2020-12-28 10:20:41 +08:00
Zexi Li
9a8111de6c Merge pull request #9647 from swordqiu/automated-cherry-pick-of-#9644-upstream-release-3.4
Automated cherry pick of #9644: feature(climc): policy save data into file
2020-12-26 12:09:35 +08:00
Qiu Jian
9cdd7dd2da feature(climc): policy save data into file
Allow saveing policy data into file
2020-12-25 17:13:41 +08:00
Zexi Li
8549df1a00 Merge pull request #9632 from ioito/automated-cherry-pick-of-#9629-upstream-release-3.4
Automated cherry pick of #9629: fix(region): optimized disk allocate sched failed log
2020-12-24 17:48:17 +08:00
Qu Xuan
cd9b632d08 fix(region): optimized disk allocate sched failed log 2020-12-24 17:02:14 +08:00
Zexi Li
ac8ba1e86d Merge pull request #9602 from yousong/automated-cherry-pick-of-#9599-upstream-release-3.4
Automated cherry pick of #9599: Bugfix/yousong climc ssh
2020-12-23 22:13:12 +08:00
Yousong Zhou
2add6fc1f5 fix(mcclient): options: webconsole: fix passing ssh port 2020-12-23 13:32:25 +08:00
Yousong Zhou
45eda7c703 refactor(climc): webconsole: use helper methods of response struct 2020-12-23 13:32:25 +08:00
Yousong Zhou
85008a7b0c refactor(webconsole): api: add helper methods for response struct 2020-12-23 13:32:25 +08:00
Yousong Zhou
2f9cfae375 refactor(webconsole): use structured response 2020-12-23 13:32:25 +08:00
Zexi Li
410782cffc Merge pull request #9576 from ioito/automated-cherry-pick-of-#9573-upstream-release-3.4
Automated cherry pick of #9573: fix(region): add huawei gpssd desc
2020-12-23 09:37:26 +08:00
Zexi Li
9342ccf9c3 Merge pull request #9580 from zhaoxiangchun/automated-cherry-pick-of-#9579-upstream-release-3.4
Automated cherry pick of #9579: fix(monitor): other servier create alert add used_by param as a agreement
2020-12-23 09:35:08 +08:00
Zexi Li
29c96f2d2b Merge pull request #9592 from swordqiu/automated-cherry-pick-of-#9589-upstream-release-3.4
Automated cherry pick of #9589: fix(cloudevent,devtool): missing metadata table
2020-12-23 09:08:00 +08:00
Qiu Jian
df7d68e404 fix(cloudevent,devtool): missing metadata table 2020-12-23 03:13:02 +08:00
Qu Xuan
869744d1bb fix(region): openstack network is regional 2020-12-22 16:27:28 +08:00
--global
b01a477cb2 fix(monitor): other servier create alert add used_by param as a agreement
1.解决notify,meter中创建的对应的策略也展示在统一报警策略页面。通过used_by
  进行区分
2020-12-22 16:17:09 +08:00
Qu Xuan
1ec3d6ddf0 fix(region): add huawei gpssd desc 2020-12-22 11:34:13 +08:00
Zexi Li
984006ea31 Merge pull request #9569 from wanyaoqi/automated-cherry-pick-of-#9498-upstream-release-3.4
Automated cherry pick of #9498: server migrate misc fix
2020-12-22 10:06:19 +08:00
yunion-ci-robot
1bc2c75e06 Merge pull request #9567 from zexi/automated-cherry-pick-of-#9564-upstream-release-3.4
Automated cherry pick of #9564: Hotfix/baremetal pxe net alloc
2020-12-21 23:47:46 +08:00
wanyaoqi
cf8b548392 fix(host): add print migrate progress info 2020-12-21 21:08:04 +08:00
wanyaoqi
a898d76094 fix(region): do not change disk status on migrating 2020-12-21 21:08:04 +08:00
Zexi Li
30ee4056e1 Merge pull request #9547 from yousong/automated-cherry-pick-of-#9544-upstream-release-3.4
Automated cherry pick of #9544: fix(region): lbbackend: better error reporting for finding influxdb info
2020-12-21 21:08:02 +08:00
Zexi Li
7d64b9fffc Merge pull request #9558 from ioito/automated-cherry-pick-of-#9555-upstream-release-3.4
Automated cherry pick of #9555: fix(region): fix openstack instance os type
2020-12-21 21:04:14 +08:00
Zexi Li
3da4dd1953 fix(region,baremetal): choose candidate network not according by types 2020-12-21 20:50:03 +08:00
Zexi Li
014170e74a fix(region,baremetal): pxe net reuse converted server access ip 2020-12-21 20:50:02 +08:00
Qu Xuan
db60e37c4d fix(region): fix openstack instance os type 2020-12-21 19:50:58 +08:00
Yousong Zhou
4ac56f7fc3 fix(region): lbbackend: better error reporting for finding influxdb info 2020-12-21 16:52:50 +08:00
Zexi Li
9494c0939a Merge pull request #9372 from ioito/automated-cherry-pick-of-#9360-upstream-release-3.4
Automated cherry pick of #9360: fix(region): sync servers
2020-12-21 10:41:11 +08:00
Zexi Li
1e1941cd7b Merge pull request #9532 from swordqiu/automated-cherry-pick-of-#9529-upstream-release-3.4
Automated cherry pick of #9529: fix(taskman): use admin token if task userCred token expired
2020-12-20 02:06:22 +08:00
Qiu Jian
70d2e5c84d fix(taskman): use admin token if task userCred token expired
Use admin credential token if task cached userCred token expired
2020-12-20 01:22:37 +08:00
yunion-ci-robot
4e864a7a86 Merge pull request #9522 from zexi/automated-cherry-pick-of-#9521-upstream-release-3.4
Automated cherry pick of #9521: Storage actual size filter
2020-12-20 00:02:09 +08:00
Zexi Li
5bce2bd959 fix(scheduler): storage predicate add actualCapacity filter 2020-12-19 22:05:05 +08:00
Zexi Li
8089afa122 Merge pull request #9525 from zexi/fix/remove-sched-k8s-extender
fix(scheduler): remove unused k8s extender
2020-12-19 22:03:31 +08:00
Zexi Li
da66f26503 fix(scheduler): remove unused k8s extender 2020-12-19 21:44:57 +08:00
Zexi Li
8450fe9ea0 Merge pull request #9497 from wanyaoqi/automated-cherry-pick-of-#9494-upstream-release-3.4
Automated cherry pick of #9494: fix(region): guest to create input keep billing info
2020-12-19 20:06:31 +08:00
Zexi Li
b0163b6a70 Merge pull request #9508 from ioito/automated-cherry-pick-of-#9159-upstream-release-3.4
Automated cherry pick of #9159: feat(region): add instance storage capability
2020-12-19 20:04:41 +08:00
Zexi Li
b19762e1a9 Merge pull request #9519 from swordqiu/automated-cherry-pick-of-#9515-upstream-release-3.4
Automated cherry pick of #9515: fix(host): telegraf listen on local ipv4 address explicitly
2020-12-19 18:11:58 +08:00
Qiu Jian
c3fd4937d3 fix(host): telegraf listen on local ipv4 address explicitly
Ensure telegraf listen on local IPv4 address explicityly and host send
metrics to telegraf local IPv4 address explicityly.
2020-12-19 15:38:15 +08:00
Zexi Li
77e19e79a0 Merge pull request #9505 from swordqiu/automated-cherry-pick-of-#9502-upstream-release-3.4
Automated cherry pick of #9502: fix(keystone): always upload&refresh service config whenever service …
2020-12-19 11:39:35 +08:00
Qu Xuan
c069179adc fix(region): sync servers 2020-12-19 10:27:55 +08:00
Zexi Li
fdf51560a3 Merge pull request #9505 from swordqiu/automated-cherry-pick-of-#9502-upstream-release-3.4
Automated cherry pick of #9502: fix(keystone): always upload&refresh service config whenever service …
2020-12-19 09:32:59 +08:00
Qiu Jian
9561c0c8d4 fix(keystone): always upload&refresh service config whenever service restart
Always upload&refresh service config whenever service restart
2020-12-19 00:54:54 +08:00
yunion-ci-robot
b0d7d2f912 Merge pull request #9493 from zexi/automated-cherry-pick-of-#9490-upstream-release-3.4
Automated cherry pick of #9490: Hotfix/baremetal pd makegood
2020-12-18 20:47:01 +08:00
wanyaoqi
35c0e52de9 fix(region): guest to create input keep billing info 2020-12-18 16:41:50 +08:00
Zexi Li
ec5995da4b fix(baremetal): clear jbod disks do PDMakeGood 2020-12-18 15:51:02 +08:00
Zexi Li
21567833fd Merge pull request #9480 from yousong/automated-cherry-pick-of-#9458-upstream-release-3.4
Automated cherry pick of #9458: Bugfix/yousong eip ipaddr
2020-12-18 12:51:42 +08:00
Zexi Li
159fba33b6 Merge pull request #9475 from yousong/automated-cherry-pick-of-#9472-upstream-release-3.4
Automated cherry pick of #9472: Bugfix/yousong host mtu
2020-12-18 00:19:44 +08:00
Yousong Zhou
5b0247a35f fix(region): eip_allocate_task: set eip status allocate_fail on task failure 2020-12-17 22:03:29 +08:00
Yousong Zhou
62c39c62cd fix(region,climc): eips: rename arg name for requested eip addr 2020-12-17 22:03:29 +08:00
Yousong Zhou
995b24c319 fix(region): guestnetworks: use net calculated mtu 2020-12-17 21:52:04 +08:00
Yousong Zhou
82e1234ed4 feat(region): networks: add getMtu method 2020-12-17 21:52:04 +08:00
Yousong Zhou
208a49e3d4 feat(apis): add const VPC_OVN_ENCAP_COST 2020-12-17 21:52:04 +08:00
Yousong Zhou
c8388cab1a feat(host): startvm: set vpc nic mtu
Windows DHCP client does not respect DHCP MTU option
2020-12-17 21:52:04 +08:00
Yousong Zhou
45b538bd2a feat(host): startvm: add nic_mtu shell func 2020-12-17 21:52:04 +08:00
Yousong Zhou
f2e3766bee refactor(host): startvm: for compat
QEMU 2.12 outputs device help on stderr in the following style

```
virtio-net-pci.speed=int32
```

QEMU 5.2.0 outputs it to stdout and in the following format

```
  speed=<int32>          -  (default: -1)
```
2020-12-17 21:52:04 +08:00
Yousong Zhou
2154e7c18b refactor(host): startvm: nic_speed: use raw string 2020-12-17 21:52:03 +08:00
Yousong Zhou
27dc7b6296 refactor(host): startvm: add QEMU_CMD_KVM_ARG 2020-12-17 21:52:03 +08:00
Zexi Li
ae64d437f2 Merge pull request #9462 from swordqiu/hotfix/qj-3.4-quota-check-default-on
fix(cloudcommon): quota checkout turnd on by default at release/3.4
2020-12-17 09:31:49 +08:00
Qiu Jian
8d842b0d2f fix(cloudcommon): quota checkout turnd on by default at release/3.4 2020-12-17 08:51:49 +08:00
Zexi Li
34d0478af1 Merge pull request #9457 from zexi/automated-cherry-pick-of-#9454-upstream-release-3.4
Automated cherry pick of #9454: fix(scheduler): fetch input network when specified
2020-12-16 18:24:58 +08:00
Zexi Li
b1bec7337f fix(scheduler): fetch input network when specified 2020-12-16 17:51:40 +08:00
Zexi Li
de77edc357 Merge pull request #9423 from zexi/automated-cherry-pick-of-#9418-upstream-release-3.4
Automated cherry pick of #9418: fix(region): baremetal post update related server
2020-12-16 10:41:03 +08:00
yunion-ci-robot
2ce7f7b9fe Merge pull request #9438 from wanyaoqi/automated-cherry-pick-of-#9435-upstream-release-3.4
Automated cherry pick of #9435: fix(host): fix set windows password with escape charater
2020-12-15 20:52:14 +08:00
wanyaoqi
e6206944dd fix(host): fix set windows password with escape charater 2020-12-15 16:58:11 +08:00
Zexi Li
02bac8b9ae Merge pull request #9434 from zexi/automated-cherry-pick-of-#9431-upstream-release-3.4
Automated cherry pick of #9431: Fix/climc server create desc
2020-12-15 11:54:35 +08:00
Zexi Li
78c10c78cc Merge pull request #9429 from yousong/automated-cherry-pick-of-#9426-upstream-release-3.4
Automated cherry pick of #9426: fix(vpcagent): ovn: stable dns A record value
2020-12-15 11:45:28 +08:00
Zexi Li
433807432a fix(climc): server-create --desc not work 2020-12-15 11:37:07 +08:00
Yousong Zhou
0f973234b8 fix(vpcagent): ovn: stable dns A record value 2020-12-15 11:10:36 +08:00
Zexi Li
58810cde95 Merge pull request #9424 from wanyaoqi/automated-cherry-pick-of-#9417-upstream-release-3.4
Automated cherry pick of #9417: fix(region,host): fix hot remove nic
2020-12-15 00:08:14 +08:00
Zexi Li
36a9314427 fix(region): baremetal post update related server 2020-12-14 19:16:00 +08:00
wanyaoqi
2864b15ecc fix(region,host): fix hot remove nic
- region: check is hot remove nic enable
- host: del qemu device after del netdev
2020-12-14 19:04:04 +08:00
wanyaoqi
0ee2cbcf60 fix(host): fix check hugepage enabled 2020-12-14 19:02:21 +08:00
Zexi Li
44252983e9 Merge pull request #9414 from zexi/automated-cherry-pick-of-#9411-upstream-release-3.4
Automated cherry pick of #9411: fix(scheduler): sku filter check zone if only prefer region specified
2020-12-14 17:56:55 +08:00
Zexi Li
532ada4bf9 fix(scheduler): sku filter check zone if only prefer region specified 2020-12-14 17:27:08 +08:00
Zexi Li
df4a02ac49 Merge pull request #9408 from zexi/automated-cherry-pick-of-#9405-upstream-release-3.4
Automated cherry pick of #9405: Hotfix/webconsole trim url
2020-12-14 17:23:36 +08:00
Zexi Li
6d5941eaad Merge pull request #9397 from zexi/automated-cherry-pick-of-#9394-upstream-release-3.4
Automated cherry pick of #9394: fix(scheduler): get candidates error more info
2020-12-14 15:52:35 +08:00
yunion-ci-robot
f77c4d078a Merge pull request #9398 from wanyaoqi/bugfix/wyq/fix-unmarshal-perform-params
fix(climc): fix marshal perform params
2020-12-14 15:50:05 +08:00
Zexi Li
5364ba5641 fix(webconsole): trim api_server url if end with slashes 2020-12-14 15:48:30 +08:00
Zexi Li
f4d8225a10 Merge pull request #9402 from rainzm/automated-cherry-pick-of-#9399-upstream-release-3.4
Automated cherry pick of #9399: fix(notify): avoid deadlock
2020-12-14 15:45:41 +08:00
rainzm
9122c7e10d fix(notify): avoid deadlock 2020-12-14 15:06:53 +08:00
wanyaoqi
3e3d356ffc fix(climc): fix marshal perform params 2020-12-14 14:55:02 +08:00
Zexi Li
1c86c0d73a fix(scheduler): get candidates error more info 2020-12-14 14:39:52 +08:00
Zexi Li
aa937e6966 Merge pull request #9387 from tb365/automated-cherry-pick-of-#9386-upstream-release-3.4
Automated cherry pick of #9386: feat(region): support sync skus by cloudregion
2020-12-13 13:51:51 +08:00
Zexi Li
706980e233 Merge pull request #9393 from swordqiu/automated-cherry-pick-of-#9390-upstream-release-3.4
Automated cherry pick of #9390: fix(region): network reserved ip count not consider expiration of reserved ips
2020-12-13 12:09:31 +08:00
Qiu Jian
47fdfc78c9 fix(region): network reserved ip count not consider expiration of reserved ips
network reserved ip count not consider expiration of reserved ips
2020-12-12 19:48:51 +08:00
TangBin
96d199724e feat(region): support sync skus by cloudregion 2020-12-12 19:08:29 +08:00
Zexi Li
50a36e3906 Merge pull request #9376 from tb365/automated-cherry-pick-of-#9359-upstream-release-3.4
Automated cherry pick of #9359: Bugfix/tb bugfix cmb 1210
2020-12-12 18:28:53 +08:00
TangBin
3817b9e6ad fix(region): goimports check fix 2020-12-12 17:54:42 +08:00
TangBin
e4c07c0304 feat(region): support sync skus by cloudregion 2020-12-12 17:45:59 +08:00
TangBin
2ff318a5b8 fix(region): server login info& keypair import input parameter trimspace 2020-12-12 17:28:16 +08:00
Zexi Li
e8605a1758 Merge pull request #9369 from swordqiu/automated-cherry-pick-of-#9366-upstream-release-3.4
Automated cherry pick of #9366: fix(keystone): ignore service config update without changes
2020-12-12 00:14:21 +08:00
Qiu Jian
ee391ed98a fix(keystone): ignore service config update without changes
ignore service config updates that no changes happen. prevent service
config change infomrer messages from flushing the log.
2020-12-11 22:22:42 +08:00
yunion-ci-robot
d2702b67f9 Merge pull request #9338 from zexi/automated-cherry-pick-of-#9335-upstream-release-3.4
Automated cherry pick of #9335: Hotfix/baremetal convert host
2020-12-11 13:32:15 +08:00
Zexi Li
deae194d43 Merge pull request #9355 from zexi/automated-cherry-pick-of-#9352-upstream-release-3.4
Automated cherry pick of #9352: Bugfix/scheduler SKU net
2020-12-11 09:18:31 +08:00
Zexi Li
aad036a822 fix(scheduler): sku by region and fill onecloud vpc networks 2020-12-10 21:14:37 +08:00
Zexi Li
16f59a2f2c Merge pull request #9334 from ioito/automated-cherry-pick-of-#9331-upstream-release-3.4
Automated cherry pick of #9331: fix(region): openstack hosts sync
2020-12-10 20:40:19 +08:00
Zexi Li
4aec6e7e36 Merge pull request #9350 from swordqiu/automated-cherry-pick-of-#9347-upstream-release-3.4
Automated cherry pick of #9347: fix(cloudcommon): perform public should check the sharing scope of
2020-12-10 20:38:12 +08:00
Qiu Jian
c553099588 fix(cloudcommon): perform public should check the sharing scope of resource
perform public should check the sharing scope of resource
2020-12-10 19:16:16 +08:00
Qu Xuan
5863e4a73d fix(region): openstack hosts sync 2020-12-10 18:23:54 +08:00
Zexi Li
bc3aa5432f Merge pull request #9327 from rainzm/automated-cherry-pick-of-#9325-upstream-release-3.4
Automated cherry pick of #9325: refactor(notify): add StartSubcontactPullTask for receiver
2020-12-10 17:22:21 +08:00
Zexi Li
bd666ee815 Merge pull request #9301 from ioito/automated-cherry-pick-of-#9298-upstream-release-3.4
Automated cherry pick of #9298: fix(region): support openstack subnet allocation pools
2020-12-10 17:18:08 +08:00
Zexi Li
2ad30a0872 Merge pull request #9323 from swordqiu/automated-cherry-pick-of-#9320-upstream-release-3.4
Automated cherry pick of #9320: fix(cloudcommon): disable quota check by default
2020-12-10 17:08:50 +08:00
Zexi Li
c5655ed2ba fix(baremetal): convert to host failed
- convert schedule should include converting status
- auto register name should lowercase
- finish convert set host name by guest
2020-12-10 16:59:41 +08:00
rainzm
3d99fe914d fix(notify): repull subcontact after changing config 2020-12-10 10:31:12 +08:00
rainzm
d357f03757 fix(notify): check for changes before updating config 2020-12-10 10:31:12 +08:00
rainzm
28e5b39fff refactor(notify): add StartSubcontactPullTask for receiver 2020-12-10 10:31:12 +08:00
Qiu Jian
2d248612e0 fix(cloudcommon): disable quota check by default
1. add enable_quota_check common option
2. disable quota check by default
3. specify scope of quota limit in OutOfQuota error message
2020-12-10 01:29:08 +08:00
Zexi Li
0ebde53d20 Merge pull request #9262 from wanyaoqi/automated-cherry-pick-of-#9259-upstream-release-3.4
Automated cherry pick of #9259: fix(region): attach network on register baremetal server
2020-12-09 20:40:56 +08:00
Zexi Li
8ac922480e Merge pull request #9311 from yousong/automated-cherry-pick-of-#9308-upstream-release-3.4
Automated cherry pick of #9308: Bugfix/yousong eip chargetype
2020-12-09 20:35:14 +08:00
Zexi Li
212bdc0907 Merge pull request #9318 from wanyaoqi/automated-cherry-pick-of-#9315-upstream-release-3.4
Automated cherry pick of #9315: fix(host): check lease living on restart etcd session
2020-12-09 20:33:23 +08:00
wanyaoqi
31436641cc fix(host): check lease living on restart etcd session 2020-12-09 16:57:19 +08:00
Yousong Zhou
5e3861b28b refactor(apis): compute: remove EIP_CHARGE_TYPE_DEFAULT
The default is now cloud provider specific
2020-12-09 12:26:58 +08:00
Yousong Zhou
475842e818 fix(region): sanitize eip charge type on all callsites 2020-12-09 12:26:58 +08:00
Yousong Zhou
f3fee11711 feat(region): regiondriver: add methods on eip charge type 2020-12-09 12:18:25 +08:00
Qu Xuan
d1d62de884 fix(region): support openstack subnet allocation pools 2020-12-09 10:33:04 +08:00
Zexi Li
20f2ed2b1f Merge pull request #9267 from ioito/automated-cherry-pick-of-#9266-upstream-release-3.4
Automated cherry pick of #9266: [WIP]fix(region): openstack available zones
2020-12-08 21:37:42 +08:00
Zexi Li
529da18451 Merge pull request #9280 from wanyaoqi/automated-cherry-pick-of-#9277-upstream-release-3.4
Automated cherry pick of #9277: fix(region): validate isolated devices on migrate
2020-12-08 21:36:12 +08:00
Zexi Li
ee5351b536 Merge pull request #9289 from zhasm/automated-cherry-pick-of-#9288-upstream-release-3.4
Automated cherry pick of #9288: fix(git,make): 更新获取 git branch 的规则
2020-12-08 18:11:22 +08:00
Zhang Dongliang
f82e51af65 fix(git,make): 更新获取 git branch 的规则 2020-12-08 18:00:34 +08:00
yunion-ci-robot
91680e5fca Merge pull request #9275 from wanyaoqi/automated-cherry-pick-of-#9272-upstream-release-3.4
Automated cherry pick of #9272: fix(host-deployer): cancel rename centos vgname
2020-12-08 17:07:40 +08:00
wanyaoqi
c74b89332d fix(region): validate isolated devices on migrate 2020-12-08 16:52:07 +08:00
Zexi Li
b8e6b5db7b Merge pull request #9271 from zhasm/automated-cherry-pick-of-#9268-upstream-release-3.4
Automated cherry pick of #9268: fix(git,make): git branch 获取方式优化
2020-12-08 16:35:45 +08:00
wanyaoqi
8471421b87 fix(host-deployer): cancel rename centos vgname 2020-12-08 16:30:48 +08:00
Qu Xuan
ab6d57afea fix(region): openstack available zones 2020-12-08 16:18:53 +08:00
Zhang Dongliang
5920af6aee fix(git,make): git branch 获取方式优化 2020-12-08 15:52:35 +08:00
Zexi Li
df6d774d69 Merge pull request #9256 from zhasm/automated-cherry-pick-of-#9230-upstream-release-3.4
Automated cherry pick of #9230: fix(git,make): 修正 gitbranch 变量的获取方式,解决自动升级版本 tag 不统一的问题
2020-12-08 12:50:51 +08:00
wanyaoqi
5d69ae9a02 fix(region): attach network on register baremetal server 2020-12-08 12:08:17 +08:00
Zhang Dongliang
c3be526988 fix(git,make): 修正 gitbranch 变量的获取方式,允许外部传入,解决自动升级版本 tag 不统一的问题 2020-12-08 11:50:47 +08:00
Zexi Li
9d1267b0f7 Merge pull request #9188 from rainzm/automated-cherry-pick-of-#9183-upstream-release-3.4
Automated cherry pick of #9183: fix(region): inspect invalid guest template
2020-12-04 10:21:23 +08:00
rainzm
e762b2e2e0 fix(region): inspect invalid guest template
The glance service hangs and other external reasons may cause the guest template to be judged as invalid.
Therefore, health inspection should be performed on time for invalid guest templates.
2020-12-03 20:45:20 +08:00
Zexi Li
cfefa015fd Merge pull request #9177 from zexi/automated-cherry-pick-of-#9176-upstream-release-3.4
Automated cherry pick of #9176: fix(scheduler): select resource unordered
2020-12-03 19:55:25 +08:00
Zexi Li
986fa9881f fix(scheduler): select resource unordered 2020-12-03 18:42:50 +08:00
Zexi Li
ffe1c9050b Merge pull request #9175 from yousong/automated-cherry-pick-of-#8483-upstream-release-3.4
Automated cherry pick of #8483: fix: climc vpc-create missing cloudregion_id
2020-12-03 18:39:20 +08:00
Qiu Jian
07bcf6a7a7 fix: climc vpc-create missing cloudregion_id 2020-12-03 18:18:46 +08:00
Zexi Li
0e01df9200 Merge pull request #9166 from wanyaoqi/automated-cherry-pick-of-#9163-upstream-release-3.4
Automated cherry pick of #9163: bugfix(region): fix list by srever type normal
2020-12-03 14:43:27 +08:00
Zexi Li
9e5667c50a Merge pull request #9168 from zhaoxiangchun/automated-cherry-pick-of-#9138-upstream-release-3.4
Automated cherry pick of #9138: fix(monitor): modify influxdbSuggestDriver query err
2020-12-03 14:42:26 +08:00
zhaoxiangchun
fd7fe62930 fix(monitor): modify influxdbSuggestDriver query err
1.修复influxdb相关的建议规则查询数据失败的问题
2020-12-03 14:16:21 +08:00
wanyaoqi
eba5bd84df bugfix(region): fix list by srever type normal
server list by normal shouldn't contains gpu and backup servers

cherrypick: release/3.4
2020-12-03 12:54:28 +08:00
Zexi Li
9080fdbde3 Merge pull request #9157 from wanyaoqi/automated-cherry-pick-of-#9154-upstream-release-3.4
Automated cherry pick of #9154: feat(region): add list filter server type
2020-12-03 09:34:12 +08:00
Zexi Li
ec76d129f6 Merge pull request #9153 from ioito/automated-cherry-pick-of-#9150-upstream-release-3.4
Automated cherry pick of #9150: fix(region): avoid qcloud sync local disk error
2020-12-02 21:05:23 +08:00
wanyaoqi
ee9e59df88 feat(region): add list filter server type
list server by specific server type: normal, gpu, backup

cherrypick: release/3.4
2020-12-02 20:31:44 +08:00
Qu Xuan
c2765f5fda fix(region): avoid qcloud sync local disk error 2020-12-02 20:27:54 +08:00
Zexi Li
8cd9d39155 Merge pull request #9143 from swordqiu/automated-cherry-pick-of-#9140-upstream-release-3.4
Automated cherry pick of #9140: fix(keystone): not allow to disable sql driver
2020-12-02 17:08:49 +08:00
Qiu Jian
e77ca84876 fix(keystone): not allow to disable sql driver
not allow to disable default SQL identity_provider driver
2020-12-02 16:42:35 +08:00
Zexi Li
76ca993e8a Merge pull request #9107 from rainzm/automated-cherry-pick-of-#9104-upstream-release-3.4
Automated cherry pick of #9104: fix(notify): return the result of the second attempt to execute the rpc call
2020-12-01 21:03:29 +08:00
Zexi Li
aa96758354 Merge pull request #9112 from yousong/automated-cherry-pick-of-#9109-upstream-release-3.4
Automated cherry pick of #9109: fix(host): make sure it won't match vpc guests by accident
2020-12-01 20:21:11 +08:00
Zexi Li
8a35ef6bcc Merge pull request #9119 from rainzm/automated-cherry-pick-of-#9116-upstream-release-3.4
Automated cherry pick of #9116: fix(region): delete guest without 'purge' in GuestDetachScalingGroupTask
2020-12-01 19:32:16 +08:00
rainzm
e2ab5190c6 fix(notify): return the result of the second attempt to execute the rpc call 2020-12-01 18:25:37 +08:00
rainzm
af006498f8 fix(region): delete guest without 'purge' in GuestDetachScalingGroupTask 2020-12-01 16:03:36 +08:00
Yousong Zhou
b54ebf45f3 fix(host): make sure it won't match vpc guests by accident 2020-12-01 15:33:31 +08:00
Zexi Li
639e1f045c Merge pull request #9099 from yousong/automated-cherry-pick-of-#9096-upstream-release-3.4
Automated cherry pick of #9096: Bugfix/yousong informer
2020-12-01 09:34:11 +08:00
Yousong Zhou
1c68b97c86 fix(taskman): SSubTask: set model manager 2020-11-30 23:13:04 +08:00
Yousong Zhou
ec47e47734 fix(region): secgrouprule: set model manager 2020-11-30 23:13:04 +08:00
Zexi Li
76fd4945bd Merge pull request #9082 from yousong/automated-cherry-pick-of-#9079-upstream-release-3.4
Automated cherry pick of #9079: feat(region): options: allow setting default vpc external access mode
2020-11-30 21:49:15 +08:00
Zexi Li
60ca1f7266 Merge pull request #9090 from rainzm/automated-cherry-pick-of-#9086-upstream-release-3.4
Automated cherry pick of #9086: fix(region): sort excludedNets correctly
2020-11-30 21:47:44 +08:00
rainzm
220fb5bca5 fix(region): sort excludedNets correctly
之前,excludedNets 内部表示起始 IP 的字段是 string 类型,直接使用 <
比较是错误的。
现在,把 excludedNets 表示起始 IP 的字段改为了
netutils.IPV4Addr,这样就可以正确地进行比较排序了。
2020-11-30 19:06:12 +08:00
Yousong Zhou
0ea12ffcc6 feat(region): options: allow setting default vpc external access mode 2020-11-30 18:30:31 +08:00
Yousong Zhou
f80c6a214a fix(region): pass up error from InitializeData 2020-11-30 18:30:31 +08:00
Zexi Li
29343a6828 Merge pull request #9060 from ioito/automated-cherry-pick-of-#8995-upstream-release-3.4
Automated cherry pick of #8995: fix(cloudid): avoid new public account sync system policy delay 1 day
2020-11-30 14:13:01 +08:00
Qu Xuan
b9d08c74a3 fix(cloudid): avoid new public account sync system policy delay 1 day 2020-11-27 20:18:26 +08:00
Zexi Li
4b06ee94d0 Merge pull request #9031 from ioito/automated-cherry-pick-of-#9021-upstream-release-3.4
Automated cherry pick of #9021: fix(region): auto sync cloudaccount resources
2020-11-27 20:14:05 +08:00
yunion-ci-robot
bf625de12d Merge pull request #9039 from yousong/automated-cherry-pick-of-#9036-upstream-release-3.4
Automated cherry pick of #9036: feat(region): search server by substr of ip or mac
2020-11-27 18:46:36 +08:00
Zexi Li
60dbb28022 Merge pull request #9053 from wanyaoqi/automated-cherry-pick-of-#9049-upstream-release-3.4
Automated cherry pick of #9049: fix(region,scheduler): fix netwrok predicate
2020-11-27 18:44:08 +08:00
wanyaoqi
43407d3d77 fix(region,scheduler): fix netwrok predicate
1. Guest config to schedule input should include network exit propertites.
2. Guest migrate and create backup server should not check network count,
because of migrate and create backup server will not allocate new network to guest.

cherrypick: release/3.5
2020-11-27 18:41:17 +08:00
Yousong Zhou
9e5018b147 feat(region): search server by substr of ip or mac 2020-11-27 15:16:47 +08:00
Qu Xuan
43f5c84955 fix(region): auto sync cloudaccount resources 2020-11-27 09:51:48 +08:00
Zexi Li
91dd66b5a8 Merge pull request #9008 from yousong/automated-cherry-pick-of-#9005-upstream-release-3.4
Automated cherry pick of #9005: Feature/yousong ovn encap ip
2020-11-26 21:29:31 +08:00
Yousong Zhou
1615426f29 feat(host): add option OvnEncapIpDetectionMethod can-reach:xx 2020-11-26 17:12:18 +08:00
Yousong Zhou
3df0be2fd4 feat(netutils2): add MyIPTo 2020-11-26 17:12:18 +08:00
Zexi Li
7d9a3c04b1 Merge pull request #8986 from swordqiu/automated-cherry-pick-of-#8968-upstream-release-3.4
Automated cherry pick of #8968: fix(region,esxiagent): allow host behind a nat
2020-11-26 12:11:25 +08:00
Zexi Li
1a2204d146 Merge pull request #8923 from zhaoxiangchun/automated-cherry-pick-of-#8920-upstream-release-3.4
Automated cherry pick of #8920: fix(monitor): modify notify alertInfo and alertOk detach resource
2020-11-26 11:45:32 +08:00
yunion-ci-robot
ed6c42ae37 Merge pull request #8994 from zexi/automated-cherry-pick-of-#8991-upstream-release-3.4
Automated cherry pick of #8991: fix(scheduler): clean expire cache before schedule
2020-11-26 11:43:31 +08:00
Zexi Li
372c9a393f fix(region): wire get vpc releated hosts is empty 2020-11-26 11:03:52 +08:00
Zexi Li
37f648bfb8 fix(region): network clean schedule cache after real deleted 2020-11-26 11:03:52 +08:00
Zexi Li
1818d4853a fix(scheduler): clean expire cache before schedule 2020-11-26 11:03:52 +08:00
zhaoxiangchun
ff5396b909 fix(monitor): modify notify alertInfo and alertOk detach resource
1.修复报警信息中>等被转义的问题
2.针对:host_raid.adapter和smart_device.exit_status
  只能出现alerting和nodata
两种报警状态。在queryCondition的查询逻辑下,nodata情况也进行detach操作
3.修复报警记录中报警策略翻译异常的问题
2020-11-26 09:46:34 +08:00
Zexi Li
b2854aff23 Merge pull request #8956 from tb365/automated-cherry-pick-of-#8955-upstream-release-3.4
Automated cherry pick of #8955: fix(region): allow reset huawei system disk
2020-11-25 22:01:28 +08:00
Zexi Li
da30ae5efd Merge pull request #8964 from ioito/automated-cherry-pick-of-#8961-upstream-release-3.4
Automated cherry pick of #8961: fix(region): valid qcloud hssd for system disk
2020-11-25 21:59:40 +08:00
Zexi Li
17face8f52 Merge pull request #8981 from zhaoxiangchun/automated-cherry-pick-of-#8977-upstream-release-3.4
Automated cherry pick of #8977: fix(monitor): modify monitor serviceType in StartService()
2020-11-25 21:57:11 +08:00
Zexi Li
9a8277ff20 Merge pull request #8990 from rainzm/automated-cherry-pick-of-#8987-upstream-release-3.4
Automated cherry pick of #8987: fix(region): allow delete storagecachedimage with 'cache_failed' status
2020-11-25 21:55:55 +08:00
rainzm
61eaea8099 fix(region): allow delete storagecachedimage with 'cache_failed' status
Having status 'cache_failed' means this storagecachedimage does not actually exist.
2020-11-25 20:48:02 +08:00
Qiu Jian
6f0d6cbeac fix(region,esxiagent): allow host behind a nat
check host by ip may fail if host is behind a nat. ignore this case.
2020-11-25 20:34:42 +08:00
zhaoxiangchun
09ed698ae8 fix(monitor): modify monitor serviceType in StartService()
1.修改monitor服务在service代码中注册的serviceType:
   alerter ===> monitor
2020-11-25 20:31:19 +08:00
TangBin
7bf1bef04a fix(region): update translations 2020-11-25 18:17:40 +08:00
TangBin
024a17de83 fix(region): allow reset huawei system disk 2020-11-25 18:11:26 +08:00
Qu Xuan
0f5a8b6407 fix(region): valid qcloud hssd for system disk 2020-11-25 11:53:04 +08:00
Zexi Li
cd4ce681b0 Merge pull request #8954 from ioito/automated-cherry-pick-of-#8895-upstream-release-3.4
Automated cherry pick of #8895: fix(region): 避免OneCloud密码校验通过,公有云厂商密码校验不通过
2020-11-25 10:06:19 +08:00
Qu Xuan
fc16c37eab fix(region): 避免OneCloud密码校验通过,公有云厂商密码校验不通过 2020-11-25 09:56:37 +08:00
Zexi Li
3dfd086a27 Merge pull request #8950 from yousong/automated-cherry-pick-of-#8947-upstream-release-3.4
Automated cherry pick of #8947: fix(region): change_ipaddr: retain eip_id on detach and attach
2020-11-25 09:28:23 +08:00
yunion-ci-robot
8e2cd5112d Merge pull request #8945 from yousong/automated-cherry-pick-of-#8942-upstream-release-3.4
Automated cherry pick of #8942: feat(cloudcommon): db: jointbase: add list:"user" for RowId
2020-11-25 09:17:18 +08:00
Yousong Zhou
a5d82922bd fix(region): change_ipaddr: retain eip_id on detach and attach 2020-11-24 21:59:33 +08:00
Yousong Zhou
9d19bf34b0 fix(vpcagent): models: guestnetworks: accomodate change_ipaddr
change_ipaddr does detach, then attach of network.  It's not solely an
update of ipaddr, but a combination of deletion then creation.
2020-11-24 21:56:05 +08:00
Yousong Zhou
e4bf0fa8dc feat(cloudcommon): db: jointbase: add list:"user" for RowId 2020-11-24 21:56:05 +08:00
Zexi Li
6bd82d216d Merge pull request #8932 from tb365/bugfix/tb-elasticcache-empty-error-fix
fix(region): elastic cache task fail message fix
2020-11-24 21:31:09 +08:00
Zexi Li
60138f6401 Merge pull request #8927 from zhaoxiangchun/automated-cherry-pick-of-#8926-upstream-release-3.4
Automated cherry pick of #8926: fix(monitor): modify suggestrule  process influxdb data
2020-11-24 21:29:36 +08:00
yunion-ci-robot
a43f747bdc Merge pull request #8936 from ioito/automated-cherry-pick-of-#8933-upstream-release-3.4
Automated cherry pick of #8933: fix(region): avoid public ip bandwidth is zero
2020-11-24 20:25:27 +08:00
Qu Xuan
2560198943 fix(region): avoid public ip bandwidth is zero 2020-11-24 18:11:38 +08:00
zhaoxiangchun
6e0d4cb35c fix(monitor): modify suggestrule process influxdb data
1. 调整与监控相关的时间范围的判断逻辑:不再要求时间范围内必须都有数据
2020-11-24 17:48:05 +08:00
TangBin
71535f670e fix(region): elastic cache task fail message fix
#6399
2020-11-24 17:07:30 +08:00
Zexi Li
5e47566b42 Merge pull request #8900 from wanyaoqi/automated-cherry-pick-of-#8889-upstream-release-3.4
Automated cherry pick of #8889: fix(host): wait put host offline success
2020-11-23 13:04:31 +08:00
wanyaoqi
c325d8355c fix(host): wait put host offline success
Unregister host wait for host offline success,
in case region is in upgrading.

cherrypick: release/3.4
2020-11-22 15:30:56 +08:00
Zexi Li
206dc2a62d Merge pull request #8894 from yousong/automated-cherry-pick-of-#8892-upstream-release-3.4
Automated cherry pick of #8892: fix(locales): fix translation text
2020-11-22 11:00:07 +08:00
yunion-ci-robot
55a7de9ba6 Merge pull request #8867 from swordqiu/automated-cherry-pick-of-#8865-upstream-release-3.4
Automated cherry pick of #8865: fix: allow disk attach to multiple guests
2020-11-21 19:25:00 +08:00
Yousong Zhou
3b2938380a fix(region): elasticcache_instances: fix error fmt 2020-11-21 17:36:36 +08:00
Yousong Zhou
3774549979 fix(locales): fix translation text 2020-11-21 17:35:45 +08:00
Zexi Li
9c2cc664f6 Merge pull request #8883 from ioito/hotfix/qx-rds-network-params
fix(region): compatible rds network params
2020-11-20 12:03:19 +08:00
Qu Xuan
42582043ee fix(region): compatible rds network params 2020-11-20 11:44:10 +08:00
Zexi Li
690aef8f4e Merge pull request #8875 from ioito/automated-cherry-pick-of-#8873-upstream-release-3.4
Automated cherry pick of #8873: optimized: server delete log and wait time
2020-11-20 10:04:32 +08:00
Zexi Li
eb7173085e Merge pull request #8880 from ioito/automated-cherry-pick-of-#8876-upstream-release-3.4
Automated cherry pick of #8876: feat: rds recovery new instance from backup supported
2020-11-19 20:53:14 +08:00
Qu Xuan
b6917c5604 feat: rds recovery new instance from backup supported 2020-11-19 20:39:56 +08:00
Qu Xuan
47349e71b9 optimized: server delete log and wait time 2020-11-19 16:27:18 +08:00
Qiu Jian
3d2b24a351 fix: allow disk attach to multiple guests 2020-11-19 13:27:30 +08:00
Zexi Li
b9565f288a Merge pull request #8862 from swordqiu/automated-cherry-pick-of-#8860-upstream-release-3.4
Automated cherry pick of #8860: fix: add host.memoty.total and host.cpu.total usage stats
2020-11-19 11:03:21 +08:00
Qiu Jian
6b0ae74acb fix: add host.memoty.total and host.cpu.total usage stats 2020-11-19 01:26:37 +08:00
Zexi Li
438a0cb0b7 Merge pull request #8846 from zhaoxiangchun/automated-cherry-pick-of-#8844-upstream-release-3.4
Automated cherry pick of #8844: detach AlertResource on alertDisable
2020-11-18 21:16:36 +08:00
Zexi Li
3fb97c99b6 Merge pull request #8852 from swordqiu/automated-cherry-pick-of-#8850-upstream-release-3.4
Automated cherry pick of #8850: fix: add host-joint resources into domain level resources
2020-11-18 21:15:07 +08:00
yunion-ci-robot
ad8459053f Merge pull request #8855 from zhasm/automated-cherry-pick-of-#8849-upstream-release-3.4
Automated cherry pick of #8849: docker 交叉编译规则更新
2020-11-18 16:36:13 +08:00
Zhang Dongliang
491a9ece55 docker 交叉编译规则更新 2020-11-18 16:14:31 +08:00
Qiu Jian
ba2a188f0d fix: add host-joint resources into domain level resources 2020-11-18 15:26:39 +08:00
zhaoxiangchun
ea793d9902 detach AlertResource on alertDisable
1. 报警规则禁用时,detach 关联的报警资源

影响范围:报警规则的禁用;logger日志服务i18n的日志展示
2020-11-18 12:21:25 +08:00
Zexi Li
4b4964e58e Merge pull request #8840 from rainzm/automated-cherry-pick-of-#8827-upstream-release-3.4
Automated cherry pick of #8827: fix(notify): be compatible with keystone's UsersV3.GetById
2020-11-17 17:52:11 +08:00
rainzm
4a06b38da8 fix: add err handler for notifyRobot 2020-11-17 17:13:15 +08:00
rainzm
96400124ba feat(notify): enable watching user in keystone 2020-11-17 17:13:15 +08:00
rainzm
aee0299d71 fix(notify): be compatible with keystone's UsersV3.GetById
Fill UsersV3.GetById with user's name, it will return user's info.
2020-11-17 17:13:15 +08:00
Zexi Li
cbea17b4c4 Merge pull request #8835 from ioito/automated-cherry-pick-of-#8823-upstream-release-3.4
Automated cherry pick of #8823: optimized: aliyun create rds backup
2020-11-17 14:52:30 +08:00
Zexi Li
4acb237f70 Merge pull request #8833 from zhaoxiangchun/automated-cherry-pick-of-#8816-upstream-release-3.4
Automated cherry pick of #8816: modify  alertResource ws info
2020-11-17 14:51:29 +08:00
Qu Xuan
3a8e998718 optimized: aliyun create rds backup 2020-11-17 14:30:42 +08:00
zhaoxiangchun
bef9af4c3b modify alertResource ws info
ignore_alert:ture 前端不再进行弹窗提示
2020-11-17 14:23:28 +08:00
Zexi Li
3e17ee7519 Merge pull request #8805 from wanyaoqi/automated-cherry-pick-of-#8803-upstream-release-3.4
Automated cherry pick of #8803: host: restart etcd session on keepalive failed
2020-11-17 14:20:24 +08:00
yunion-ci-robot
d3aba7285a Merge pull request #8819 from ioito/automated-cherry-pick-of-#8817-upstream-release-3.4
Automated cherry pick of #8817: fix: add error cause
2020-11-16 21:42:06 +08:00
Qu Xuan
43f4f5f946 fix: add error cause 2020-11-16 14:57:37 +08:00
Zexi Li
4d3c7f3059 Merge pull request #8785 from tb365/automated-cherry-pick-of-#8783-upstream-release-3.4
Automated cherry pick of #8783: aliyun finance cloud region add suffix
2020-11-15 08:00:55 +08:00
Zexi Li
fd26fc1947 Merge pull request #8808 from zhaoxiangchun/automated-cherry-pick-of-#8806-upstream-release-3.4
Automated cherry pick of #8806: commonalert bugfix:
2020-11-15 07:55:32 +08:00
Zexi Li
b74f61fe1d Merge pull request #8811 from swordqiu/automated-cherry-pick-of-#8809-upstream-release-3.4
Automated cherry pick of #8809: fix: baremetal usage should exclude converted hypervisor
2020-11-15 07:52:46 +08:00
Qiu Jian
dc19e7b035 fix: baremetal usage should exclude converted hypervisor 2020-11-15 01:42:32 +08:00
zhaoxiangchun
37272588fa commonalert bugfix:
1.修改消息模版内容:对matches信息进行聚合只返回对应的name信息。解决body消息超过限制
2.报警资源:每次以策略匹配的最新matches为标准。进行updateOrCreate 和
  delete操作。

影响范围:消息模版、报警资源数量
2020-11-14 18:44:14 +08:00
wanyaoqi
029530ac34 host: restart etcd session on keepalive failed 2020-11-14 15:27:10 +08:00
yunion-ci-robot
c047d69a53 Merge pull request #8802 from swordqiu/automated-cherry-pick-of-#8800-upstream-release-3.4
Automated cherry pick of #8800: fix: host memory usage status not correct
2020-11-14 11:22:04 +08:00
yunion-ci-robot
6f76c5d670 Merge pull request #8798 from yousong/automated-cherry-pick-of-#8796-upstream-release-3.4
Automated cherry pick of #8796: vendor: update yunion.io/x/jsonutils
2020-11-14 00:11:06 +08:00
Qiu Jian
71ddac232d fix: host memory usage status not correct 2020-11-13 23:59:51 +08:00
Yousong Zhou
ca9859f126 vendor: update yunion.io/x/jsonutils
See yunionio/onecloud#8357
2020-11-13 18:46:27 +08:00
Zexi Li
7db6ad9a01 Merge pull request #8788 from swordqiu/automated-cherry-pick-of-#8786-upstream-release-3.4
Automated cherry pick of #8786: fix: keystone init empty catalogy cause panic
2020-11-13 15:24:09 +08:00
Qiu Jian
b545066e05 fix: keystone init empty catalogy cause panic 2020-11-13 14:56:24 +08:00
TangBin
befef016dc aliyun finance cloud zone add suffix 2020-11-13 14:44:30 +08:00
TangBin
c32ad0ac5b aliyun finance cloud region add suffix 2020-11-13 14:44:29 +08:00
Zexi Li
ecc75aa231 Merge pull request #8773 from swordqiu/automated-cherry-pick-of-#8771-upstream-release-3.4
Automated cherry pick of #8771: feature: allow join project across domain
2020-11-13 10:39:50 +08:00
Zexi Li
202e0bf266 Merge pull request #8778 from zhaoxiangchun/automated-cherry-pick-of-#8776-upstream-release-3.4
Automated cherry pick of #8776: suggestalet bugfix
2020-11-13 10:39:14 +08:00
zhaoxiangchun
c4d4700d26 suggestalet bugfix
1.安全组规则的in规则为全开放的主机 筛选逻辑修改
2.修复无法正确过滤用户所属资源的bug
2020-11-12 21:32:15 +08:00
Qiu Jian
1fce2ec30c feature: allow join project across domain 2020-11-12 20:41:27 +08:00
Zexi Li
dfe7661c61 Merge pull request #8762 from ioito/automated-cherry-pick-of-#8760-upstream-release-3.4
Automated cherry pick of #8760: fix: avoid panic
2020-11-12 19:31:31 +08:00
Zexi Li
5a28b3c13e Merge pull request #8766 from ioito/automated-cherry-pick-of-#8764-upstream-release-3.4
Automated cherry pick of #8764: fix: support resize qcloud hssd disk
2020-11-12 18:51:40 +08:00
Qu Xuan
27c8861b64 fix: support resize qcloud hssd disk 2020-11-12 16:48:17 +08:00
Qu Xuan
e9459b4a7d fix: avoid panic 2020-11-12 16:20:16 +08:00
yunion-ci-robot
5861a18051 Merge pull request #8755 from rainzm/automated-cherry-pick-of-#8753-upstream-release-3.4
Automated cherry pick of #8753: fix(region): prevent infinite recursion
2020-11-12 11:54:03 +08:00
rainzm
0bbe2e7590 fix(region): prevent infinite recursion
When weekDays is [1,2,3,4,5,6,7] and timePoints is [0], It will recurse infinitely.
2020-11-12 11:39:58 +08:00
Zexi Li
b93d695fe9 Merge pull request #8751 from ioito/automated-cherry-pick-of-#8749-upstream-release-3.4
Automated cherry pick of #8749: fix: renew rds
2020-11-12 00:49:52 +08:00
Qu Xuan
39fe8b2133 fix: renew rds 2020-11-11 20:20:25 +08:00
Zexi Li
c357d61add Merge pull request #8725 from tb365/automated-cherry-pick-of-#8723-upstream-release-3.4
Automated cherry pick of #8723: batch user create bugifx
2020-11-11 11:57:08 +08:00
Zexi Li
749ca9dc63 Merge pull request #8745 from wanyaoqi/automated-cherry-pick-of-#8722-upstream-release-3.4
Automated cherry pick of #8722: add success note on guest start and stop
2020-11-11 11:55:48 +08:00
Zexi Li
5aa0bbb091 Merge pull request #8721 from tb365/automated-cherry-pick-of-#8719-upstream-release-3.4
Automated cherry pick of #8719: huawei create disk bugfix
2020-11-11 11:54:17 +08:00
wanyaoqi
7d35397d50 host: specifie bash for start guest 2020-11-11 11:05:30 +08:00
wanyaoqi
30776fc707 usage: host show isolated dev reserved memory 2020-11-11 11:05:30 +08:00
wanyaoqi
ea70090f6b add success note on guest start and stop 2020-11-11 11:05:30 +08:00
TangBin
e9a4a6380e batch user create bugifx 2020-11-10 16:49:49 +08:00
TangBin
642b137332 huawei create disk bugfix 2020-11-10 16:18:05 +08:00
Zexi Li
ce60116ba3 Merge pull request #8717 from ioito/automated-cherry-pick-of-#8715-upstream-release-3.4
Automated cherry pick of #8715: fix: aws secgroup out rule is deny any
2020-11-10 12:54:34 +08:00
Qu Xuan
1ee8fd05b3 fix: aws secgroup out rule is deny any 2020-11-10 11:04:58 +08:00
Zexi Li
e1d1ef0dd8 Merge pull request #8695 from lvyangyang/automated-cherry-pick-of-#8694-upstream-release-3.4
Automated cherry pick of #8694: fix:修复dns record name校验的问题
2020-11-07 18:42:59 +08:00
lvyangyang
e108d17556 fix:修复dns record name校验的问题 2020-11-06 19:59:52 +08:00
yunion-ci-robot
fe6cb8a9cf Merge pull request #8691 from swordqiu/automated-cherry-pick-of-#8689-upstream-release-3.4
Automated cherry pick of #8689: fix: change owner should update quota usages
2020-11-06 15:11:19 +08:00
yunion-ci-robot
9a9f77c9d9 Merge pull request #8688 from rainzm/automated-cherry-pick-of-#8686-upstream-release-3.4
Automated cherry pick of #8686: feat(region): add option NoCheckOsTypeForCachedImage
2020-11-06 15:07:17 +08:00
yunion-ci-robot
35ac1f9fdd Merge pull request #8685 from ioito/automated-cherry-pick-of-#8683-upstream-release-3.4
Automated cherry pick of #8683: fix: aliyun eip api
2020-11-06 15:04:20 +08:00
Qiu Jian
6927652a65 fix: change owner should update quota usages 2020-11-06 14:48:29 +08:00
Zexi Li
c4afca7187 Merge pull request #8682 from ioito/automated-cherry-pick-of-#8680-upstream-release-3.4
Automated cherry pick of #8680: fix: 支持多内存过滤套餐
2020-11-06 13:50:07 +08:00
Zexi Li
a49d0b280c Merge pull request #8679 from swordqiu/automated-cherry-pick-of-#8677-upstream-release-3.4
Automated cherry pick of #8677: fix: missing column error when order by extra fields
2020-11-06 13:49:42 +08:00
Zexi Li
f797f062f8 Merge pull request #8674 from zexi/automated-cherry-pick-of-#8672-upstream-release-3.4
Automated cherry pick of #8672: scheduler: ignore non running guests only exclude ready status
2020-11-06 13:48:23 +08:00
rainzm
6f60f1a48b fix(esxi): don't specify spec.Identity when osName is empty 2020-11-06 12:58:51 +08:00
rainzm
c3b8e7bbd4 fix(esxi): add device after cloning vm 2020-11-06 12:57:19 +08:00
rainzm
edc651a308 refactor(region): faster GetIImageById 2020-11-06 12:01:41 +08:00
rainzm
76b1796c7e refactor(region): faster sync CapacityUsed for Storage
1. replace cronjob SyncCapacityUsedForStorage with
SyncCapacityUsedForEsxiStorage
2. do not sync capacityUsed for storage when deleting and creating vm
for now because of performance issues。
2020-11-06 12:01:41 +08:00
rainzm
b5201a352f feat(region): add option NoCheckOsTypeForCachedImage 2020-11-06 12:01:41 +08:00
Qu Xuan
fc4460fa39 fix: aliyun eip api 2020-11-06 11:10:32 +08:00
Qu Xuan
e975fc6713 fix: 支持多内存过滤套餐 2020-11-06 10:32:20 +08:00
Qiu Jian
c8ddd7653f fix: missing column error when order by extra fields 2020-11-05 23:52:32 +08:00
Zexi Li
827be9167e scheduler: ignore non running guests only exclude ready status 2020-11-05 18:23:51 +08:00
Zexi Li
f55022a26d Merge pull request #8666 from swordqiu/automated-cherry-pick-of-#8664-upstream-release-3.4
Automated cherry pick of #8664: update vendor for jsonutils
2020-11-05 13:10:35 +08:00
Qiu Jian
aae3da8c2b update vendor for jsonutils 2020-11-05 11:34:28 +08:00
yunion-ci-robot
e6828a1665 Merge pull request #8656 from lvyangyang/automated-cherry-pick-of-#8655-upstream-release-3.4
Automated cherry pick of #8655: fix:域名正则校验dnsrecord name,同步中文域名取punycode
2020-11-04 18:42:10 +08:00
lvyangyang
6bfff8b70d fix:域名正则校验dnsrecord name,同步中文域名取punycode 2020-11-04 17:38:27 +08:00
Zexi Li
a3753fc311 Merge pull request #8634 from tb365/automated-cherry-pick-of-#8633-upstream-release-3.4
Automated cherry pick of #8633: aws create bugfix
2020-11-04 11:19:57 +08:00
Zexi Li
2b7ba4df63 Merge pull request #8642 from rainzm/automated-cherry-pick-of-#8640-upstream-release-3.4
Automated cherry pick of #8640: fix(notify): customize the title of the verification email based on the copyright
2020-11-04 10:57:16 +08:00
Zexi Li
4fde5eab04 Merge pull request #8639 from ioito/automated-cherry-pick-of-#8636-upstream-release-3.4
Automated cherry pick of #8636: fix: add qcloud hssd
2020-11-03 20:41:32 +08:00
rainzm
58c5514a01 fix(notify): customize the title of the verification email based on the copyright 2020-11-03 20:26:52 +08:00
Qu Xuan
0c19c21efa fix: add qcloud hssd 2020-11-03 20:22:07 +08:00
TangBin
41dd48e8fa lbcert cache delete bugfix 2020-11-03 16:40:37 +08:00
TangBin
3ceb0e2dc1 aws create bugfix 2020-11-03 16:40:37 +08:00
Zexi Li
ab479aea26 Merge pull request #8623 from wanyaoqi/automated-cherry-pick-of-#8619-upstream-release-3.4
Automated cherry pick of #8619: fix stream disk on add disk from snapshot
2020-11-03 10:40:01 +08:00
wanyaoqi
82f5b9ccb0 fix stream disk on add disk from snapshot 2020-11-02 19:32:37 +08:00
Zexi Li
4d7b6ef36d Merge pull request #8615 from ioito/automated-cherry-pick-of-#8613-upstream-release-3.4
Automated cherry pick of #8613: optimized: rds zone sync
2020-11-02 19:12:44 +08:00
Qu Xuan
83d0a3ce0c optimized: rds zone sync 2020-11-02 16:52:08 +08:00
yunion-ci-robot
10b4ebfd01 Merge pull request #8606 from rainzm/automated-cherry-pick-of-#8603-upstream-release-3.4
Automated cherry pick of #8603: fix(region): compute NextSyncTime for snapshotpolicydisk
2020-11-02 01:43:45 +08:00
yunion-ci-robot
bc5f255bc7 Merge pull request #8610 from swordqiu/automated-cherry-pick-of-#8608-upstream-release-3.4
Automated cherry pick of #8608: fix: save service config changes may send invalid action log
2020-11-01 11:48:48 +08:00
Qiu Jian
c8138c291b fix: save service config changes may send invalid action log 2020-10-31 19:06:22 +08:00
Rain Zheng
f290aa5d58 fix(region): compute NextSyncTime for snapshotpolicydisk
1. 如果计算出来的 NextSyncTime 和 base 相等,可以将 base 加1一个小时递归处理。
2. 对于 retentionday 有效的快照策略,比如某一个 snaphsotpolicy
是每周一生效,并且打的快照自动保留 3 天,那么,就应该在每周一(打快照)
和每周四(释放快照)进行快照的同步。
2020-10-31 15:50:51 +08:00
yunion-ci-robot
a6f97fc759 Merge pull request #8595 from rainzm/automated-cherry-pick-of-#8593-upstream-release-3.4
Automated cherry pick of #8593: fix(region): prevent dirty data when syncing snapshot
2020-10-30 19:38:45 +08:00
yunion-ci-robot
dfeee78717 Merge pull request #8592 from ioito/automated-cherry-pick-of-#8590-upstream-release-3.4
Automated cherry pick of #8590: fix: secgroup cache tenant_id
2020-10-30 19:34:56 +08:00
rainzm
7460ea1461 fix(region): clear dirty data of snapshotpolicydisks when start up 2020-10-30 15:24:56 +08:00
rainzm
250ad41c7b fix(region): detach all snapshotpolicy when realdeleting disk 2020-10-30 15:24:56 +08:00
rainzm
a53a44cb2e fix(region): prevent dirty data when syncing snapshot 2020-10-30 15:24:56 +08:00
Qu Xuan
4cbe931635 fix: secgroup cache tenant_id 2020-10-30 15:04:25 +08:00
yunion-ci-robot
45fc6d0ff1 Merge pull request #8578 from rainzm/automated-cherry-pick-of-#8576-upstream-release-3.4
Automated cherry pick of #8576: fix(region): sync automatically snapshot for external disk
2020-10-30 09:11:44 +08:00
yunion-ci-robot
a1b72712ec Merge pull request #8561 from zexi/automated-cherry-pick-of-#8558-upstream-release-3.4
Automated cherry pick of #8558: informer: ignore outside context cancel when worker run
2020-10-30 00:37:44 +08:00
yunion-ci-robot
8e474c5961 Merge pull request #8579 from tb365/automated-cherry-pick-of-#8573-upstream-release-3.4
Automated cherry pick of #8573: qcloud elb cert duplicate fix
2020-10-29 23:28:43 +08:00
TangBin
8f2f78b4ed qcloud elb cert duplicate fix 2020-10-29 22:37:09 +08:00
rainzm
a3f01f1330 fix(region): sync automatically snapshot for external disk 2020-10-29 22:32:21 +08:00
Zexi Li
a0f495db93 informer: ignore outside context cancel when worker run 2020-10-29 20:54:00 +08:00
yunion-ci-robot
605f3fea26 Merge pull request #8566 from rainzm/automated-cherry-pick-of-#8564-upstream-release-3.4
Automated cherry pick of #8564: update vendor
2020-10-29 20:08:43 +08:00
rainzm
52a72952c9 update vendor 2020-10-29 17:25:58 +08:00
Yousong Zhou
4eb1292a2d Merge pull request #8550 from swordqiu/automated-cherry-pick-of-#8548-upstream-release-3.4
Automated cherry pick of #8548: fix: fail to delete public_ip eip
2020-10-29 10:18:33 +08:00
Qiu Jian
b1e91c1c27 fix: fail to delete public_ip eip 2020-10-28 23:46:20 +08:00
yunion-ci-robot
a1760d7b86 Merge pull request #8537 from rainzm/automated-cherry-pick-of-#8535-upstream-release-3.4
Automated cherry pick of #8535: refactor(region): faster list for cachedimage
2020-10-28 17:58:42 +08:00
rainzm
c456586860 refactor(region): faster list for cachedimage
Pro version of #8440 with checking the necessity of id filtering
2020-10-28 15:36:03 +08:00
yunion-ci-robot
71e759a032 Merge pull request #8527 from rainzm/automated-cherry-pick-of-#8525-upstream-release-3.4
Automated cherry pick of #8525: fix(esxi): no callback in uploadHandler
2020-10-28 00:59:42 +08:00
yunion-ci-robot
96ce64d5f0 Merge pull request #8514 from ioito/automated-cherry-pick-of-#8512-upstream-release-3.4
Automated cherry pick of #8512: fix: avoid sync project panic
2020-10-28 00:48:42 +08:00
rainzm
d31802c87b fix(esxi): filter vmdk item in lease.info 2020-10-27 21:32:21 +08:00
rainzm
d3964bf0d1 fix(esxi): use correct device index
1. Sort devices via their Key.
2. There is no relationship between vdisk index and vnics length.
2020-10-27 21:32:21 +08:00
rainzm
57dad6281a fix(esxi): no callback in uploadHandler 2020-10-27 21:32:21 +08:00
Zexi Li
b74130903e Merge pull request #8519 from ioito/automated-cherry-pick-of-#8517-upstream-release-3.4
Automated cherry pick of #8517: fix: set secgroup status
2020-10-27 17:28:39 +08:00
Qu Xuan
44046f2861 fix: set secgroup status 2020-10-27 16:20:06 +08:00
Qu Xuan
95f7600b67 fix: avoid sync project panic 2020-10-27 16:13:48 +08:00
yunion-ci-robot
749b819a62 Merge pull request #8501 from yousong/automated-cherry-pick-of-#8499-upstream-release-3.4
Automated cherry pick of #8499: lockman: test: add prefix setting
2020-10-26 21:24:40 +08:00
Yousong Zhou
f7f7c7be81 lockman: test: add prefix setting 2020-10-26 20:36:32 +08:00
yunion-ci-robot
6a221dbc1e Merge pull request #8498 from zhaoxiangchun/automated-cherry-pick-of-#8496-upstream-release-3.4
Automated cherry pick of #8496: commalertUpdateInput increat param:
2020-10-26 19:55:47 +08:00
zhaoxiangchun
002a2af272 commalertUpdateInput increat param:
1.处理operator对alertType == system的报警策略的update请求
2020-10-26 18:21:11 +08:00
yunion-ci-robot
1757d3d6a9 Merge pull request #8494 from rainzm/automated-cherry-pick-of-#8493-upstream-release-3.4
Automated cherry pick of #8493: fix(region): roll back the optimization of cachedimage list
2020-10-26 18:17:39 +08:00
rainzm
be5a6a93cc fix(region): roll back the optimization of cachedimage list 2020-10-26 17:37:59 +08:00
yunion-ci-robot
bbbe78dbef Merge pull request #8489 from ioito/automated-cherry-pick-of-#8487-upstream-release-3.4
Automated cherry pick of #8487: fix: avoid delete public ip when sync eip list
2020-10-26 17:02:42 +08:00
Qu Xuan
a851e01330 fix: avoid delete public ip when sync eip list 2020-10-26 16:18:46 +08:00
yunion-ci-robot
29d06d52dd Merge pull request #8466 from wanyaoqi/automated-cherry-pick-of-#8464-upstream-release-3.4
Automated cherry pick of #8464: check disk is in reset before delete snapshot
2020-10-25 10:54:39 +08:00
yunion-ci-robot
1a6d4d1035 Merge pull request #8486 from swordqiu/automated-cherry-pick-of-#8484-upstream-release-3.4
Automated cherry pick of #8484: fix: server usage status not correct
2020-10-25 10:52:41 +08:00
Qiu Jian
90d649aef9 fix: server usage status not correct 2020-10-25 08:38:48 +08:00
Zexi Li
23b99a6232 Merge pull request #8472 from wanyaoqi/automated-cherry-pick-of-#8470-upstream-release-3.4
Automated cherry pick of #8470: fix on stream disk complete snapshots refcount not update
2020-10-24 13:09:42 +08:00
Zexi Li
16c38fe6be Merge pull request #8476 from zexi/automated-cherry-pick-of-#8474-upstream-release-3.4
Automated cherry pick of #8474: monitor: set default influxdb datasource by endpoint type
2020-10-24 13:07:07 +08:00
Zexi Li
b43f8b3fac monitor: set default influxdb datasource by endpoint type 2020-10-23 20:10:08 +08:00
wanyaoqi
8e5b74a3f6 fix on stream disk complete snapshots refcount not update 2020-10-23 19:11:32 +08:00
yunion-ci-robot
b0cd3bf999 Merge pull request #8414 from zhaoxiangchun/automated-cherry-pick-of-#8412-upstream-release-3.4
Automated cherry pick of #8412: bugfix:
2020-10-23 18:35:17 +08:00
yunion-ci-robot
4a15284684 Merge pull request #8463 from rainzm/automated-cherry-pick-of-#8461-upstream-release-3.4
Automated cherry pick of #8461: fix(glance): allow public and private operations of guestimage
2020-10-23 18:29:15 +08:00
wanyaoqi
d78068d43a check disk is in reset before delete snapshot 2020-10-23 18:26:22 +08:00
yunion-ci-robot
80dce5eafb Merge pull request #8452 from wanyaoqi/automated-cherry-pick-of-#8450-upstream-release-3.4
Automated cherry pick of #8450: host increase cpu mem max size
2020-10-23 18:18:20 +08:00
yunion-ci-robot
950696ddb9 Merge pull request #8458 from rainzm/automated-cherry-pick-of-#8456-upstream-release-3.4
Automated cherry pick of #8456: fix(esxi): resize root disk after cloning vm
2020-10-23 18:17:20 +08:00
zhaoxiangchun
e7674116e1 bugfix:
1.资源报警增加websocket 消息通知:admin用户
2.统一influxdb中查询到的tag展示
2020-10-23 17:58:20 +08:00
rainzm
3fae388db5 fix(glance): allow public and private operations of guestimage
The public and private operations of the guest image depends on these operations of the subimage.
2020-10-23 17:57:48 +08:00
rainzm
8f3b8c7ff1 fix(esxi): resize root disk after cloning vm
The root disk size set when the machine is cloned does not take effect,
so set the root disk size after the machine is cloned.
2020-10-23 17:03:52 +08:00
wanyaoqi
a4b1d3952d host increase cpu mem max size 2020-10-23 15:15:55 +08:00
yunion-ci-robot
a5ef16243d Merge pull request #8442 from rainzm/automated-cherry-pick-of-#8440-upstream-release-3.4
Automated cherry pick of #8440: refactor(region): faster list for cachedimage
2020-10-22 21:25:14 +08:00
rainzm
b0823a09bb refactor(region): faster list for cachedimage
修改之前:
诸如provider, zone, host_schedtag_id, valid
等过滤条件,是通过过滤出符合条件的 storagecachedimage 然后使用 cachedimage_id 来过滤 cachedimge,
问题是,每一个过滤条件都会独立的去执行上面的过程,这样同样的查询可能要经过很多次,并且如果遇到
弱的过滤条件,比如 valid ,过滤出来的 storagecachedimage
非常之多,然后在使用 cachedimage_id 去过滤 cachedimage,会非常慢。

修改之后:
过滤条件的相似的逻辑合并起来,只需要向 subQuery 中添加 filter,使用 subQuery 一次把 storagecachedimage
过滤出来,然后使用 cachedimage_id 过滤 cachedimage。
2020-10-22 20:18:40 +08:00
yunion-ci-robot
492920ac7c Merge pull request #8428 from ioito/automated-cherry-pick-of-#8426-upstream-release-3.4
Automated cherry pick of #8426: fix: 避免冲掉设置的到期释放时间
2020-10-22 20:13:22 +08:00
yunion-ci-robot
f96ac33175 Merge pull request #8433 from lvyangyang/automated-cherry-pick-of-#8416-upstream-release-3.4
Automated cherry pick of #8416: fix:get all project dns resource
2020-10-22 20:10:19 +08:00
yunion-ci-robot
1bc16d6f2e Merge pull request #8439 from rainzm/automated-cherry-pick-of-#8437-upstream-release-3.4
Automated cherry pick of #8437: fix(region): add suffix 'display' for time_points and repeat_weekdays
2020-10-22 20:07:17 +08:00
rainzm
0ba8cb7fbd fix: don't update NextSyncTime when snapshots that should be added has not 2020-10-22 19:42:26 +08:00
rainzm
93bb4022f2 fix(region): init NextSyncTimeiwhen create snapshotpolicydisks 2020-10-22 19:42:26 +08:00
rainzm
bbfb9db90a fix(region): add suffix 'display' for time_points and repeat_weekdays
TimePoints and RepeatWeekdays in SnapshotPolicyDetails is duplicated
with thess in SnapshotPolicy, which result in the fault of reponse for
request GET.
2020-10-22 19:42:26 +08:00
lvyangyang
66c81ee548 fix:get all project dns resource 2020-10-22 17:06:00 +08:00
Qu Xuan
8f3cb9cdbb fix: 避免冲掉设置的到期释放时间 2020-10-22 15:41:19 +08:00
yunion-ci-robot
1ac71d0016 Merge pull request #8409 from wanyaoqi/automated-cherry-pick-of-#8407-upstream-release-3.4
Automated cherry pick of #8407: fix informer backend
2020-10-22 15:04:16 +08:00
yunion-ci-robot
e8238a2cf5 Merge pull request #8425 from ioito/automated-cherry-pick-of-#8423-upstream-release-3.4
Automated cherry pick of #8423: fix: add aliyun new region
2020-10-22 14:31:17 +08:00
Qu Xuan
22349276d9 fix: add aliyun new region 2020-10-22 11:53:08 +08:00
wanyaoqi
d6a9b5dac2 fix informer backend 2020-10-21 10:54:14 +08:00
yunion-ci-robot
0e3aa96f77 Merge pull request #8406 from rainzm/automated-cherry-pick-of-#8404-upstream-release-3.4
Automated cherry pick of #8404: fix(notify): add AllOkContactTypes in where permanently enabled and verified ContactType
2020-10-21 10:51:16 +08:00
rainzm
5306add70a feat(notify): add IntelliNotify
IntelliNotify will try to create receiver nonexistent if createReceiver is set to true
2020-10-20 20:38:17 +08:00
rainzm
f367f1abef fix(notify): add AllOkContactTypes in where permanently enabled and verified ContactType 2020-10-20 20:38:17 +08:00
Zexi Li
93dc36134d Merge pull request #8402 from wanyaoqi/automated-cherry-pick-of-#8400-upstream-release-3.4
Automated cherry pick of #8400: fix fetch customize columns
2020-10-20 18:52:56 +08:00
wanyaoqi
f706d59ac5 fix fetch customize columns 2020-10-20 18:43:52 +08:00
Zexi Li
7438bcab23 Merge pull request #8339 from tb365/automated-cherry-pick-of-#8338-upstream-release-3.4
Automated cherry pick of #8338: add aliyun finance environment
2020-10-20 13:33:47 +08:00
yunion-ci-robot
e038eebeb7 Merge pull request #8263 from rainzm/automated-cherry-pick-of-#8258-upstream-release-3.4
Automated cherry pick of #8258: feat: add a retry mechanism to AutoSyncExtDiskSnapshot
2020-10-20 13:31:13 +08:00
Zexi Li
bd7d84aebd Merge pull request #8396 from tb365/automated-cherry-pick-of-#8395-upstream-release-3.4
Automated cherry pick of #8395: lbcert delete bugfix
2020-10-20 13:28:31 +08:00
Zexi Li
5f6f554464 Merge pull request #8398 from zexi/automated-cherry-pick-of-#8397-upstream-release-3.4
Automated cherry pick of #8397: fix: monitor commonalert not detach alert resource
2020-10-20 13:26:51 +08:00
Zexi Li
d99d93d046 fix: monitor commonalert not detach alert resource 2020-10-20 13:21:22 +08:00
Zexi Li
4a856ac688 Merge pull request #8393 from rainzm/automated-cherry-pick-of-#8392-upstream-release-3.4
Automated cherry pick of #8392: fix(region): compute binded disk count when deleting snapshotpolicy
2020-10-20 11:49:52 +08:00
TangBin
7da0a67af5 lbcert delete bugfix 2020-10-20 11:27:53 +08:00
rainzm
37c14d756d feat: use details data to cover obj data in FetchCustomizeColumns 2020-10-20 11:20:45 +08:00
rainzm
6f1417d268 fix(region): compute binded disk count when deleting snapshotpolicy 2020-10-20 11:20:45 +08:00
Zexi Li
b3105a05d3 Merge pull request #8322 from ioito/automated-cherry-pick-of-#8321-upstream-release-3.4
Automated cherry pick of #8321: fix: sync dns records after sync vpcs
2020-10-20 11:19:50 +08:00
rainzm
93ac3260a1 feat: add a retry mechanism to AutoSyncExtDiskSnapshot 2020-10-20 09:54:53 +08:00
yunion-ci-robot
3d39c20c91 Merge pull request #8391 from zhaoxiangchun/automated-cherry-pick-of-#8390-upstream-release-3.4
Automated cherry pick of #8390: bugfix: commonalert
2020-10-19 23:19:23 +08:00
zhaoxiangchun
8a0eeb7d67 bugfix: commonalert
1.报警消息中取消返回sql信息
2.commonalert 中支持top bottom 结构influxdb 查询
2020-10-19 23:06:29 +08:00
yunion-ci-robot
163be04dbb Merge pull request #8364 from zhaoxiangchun/automated-cherry-pick-of-#8357-upstream-release-3.4
Automated cherry pick of #8357: bugfix: qcloud pull metric
2020-10-19 22:34:14 +08:00
zhaoxiangchun
06db7339e4 bugfix: qcloud pull metric
get请求中增加region参数
2020-10-19 22:26:52 +08:00
yunion-ci-robot
e5b3f4673d Merge pull request #8387 from zexi/automated-cherry-pick-of-#8346-upstream-release-3.4
Automated cherry pick of #8346: monitor: add alert resource
2020-10-19 22:13:12 +08:00
yunion-ci-robot
3a6e910580 Merge pull request #8380 from yousong/automated-cherry-pick-of-#8379-upstream-release-3.4
Automated cherry pick of #8379: logger: actionlog: readability change
2020-10-19 22:07:12 +08:00
Zexi Li
0317fad04e Merge pull request #8389 from wanyaoqi/automated-cherry-pick-of-#8388-upstream-release-3.4
Automated cherry pick of #8388: remove try set informer backend
2020-10-19 22:02:39 +08:00
Zexi Li
af11737e79 monitor: add alert resource 2020-10-19 21:48:35 +08:00
wanyaoqi
15bd6bacd6 remove try set informer backend 2020-10-19 21:33:49 +08:00
Zexi Li
28ba60f630 Merge pull request #8386 from wanyaoqi/automated-cherry-pick-of-#8385-upstream-release-3.4
Automated cherry pick of #8385: telegraf-raid-plugin: update raid state to lower case
2020-10-19 21:00:06 +08:00
yunion-ci-robot
8799a0bcf9 Merge pull request #8384 from wanyaoqi/automated-cherry-pick-of-#8383-upstream-release-3.4
Automated cherry pick of #8383: keystone init etcd backend
2020-10-19 20:58:13 +08:00
wanyaoqi
6706c39f85 telegraf-raid-plugin: update raid state to lower case 2020-10-19 20:12:47 +08:00
wanyaoqi
8ce183eaf5 keystone init etcd backend 2020-10-19 20:04:42 +08:00
yunion-ci-robot
a5bec974f1 Merge pull request #8345 from rainzm/automated-cherry-pick-of-#8344-upstream-release-3.4
Automated cherry pick of #8344: feat(notify): support webhook contact type
2020-10-19 18:25:11 +08:00
Zexi Li
ac15981b5d Merge pull request #8377 from swordqiu/automated-cherry-pick-of-#8350-upstream-release-3.4
Automated cherry pick of #8350: fix: missing authenticate action log for user web login
2020-10-19 17:44:44 +08:00
Zexi Li
3c447a32f6 Merge pull request #8342 from swordqiu/automated-cherry-pick-of-#8337-upstream-release-3.4
Automated cherry pick of #8337: fix: cancel pending-delete should increase resource quota usages
2020-10-19 17:44:03 +08:00
yunion-ci-robot
3a8809e060 Merge pull request #8341 from rainzm/automated-cherry-pick-of-#8340-upstream-release-3.4
Automated cherry pick of #8340: feat: add valid filter for cachedimage list
2020-10-19 17:13:11 +08:00
Yousong Zhou
0964c6ad82 logger: actionlog: i18n for distinct-field 2020-10-19 16:42:24 +08:00
Yousong Zhou
5d0fd14cb3 cloudcommon: db: GET: i18n for result of get property calls 2020-10-19 16:42:24 +08:00
Yousong Zhou
cd123e007d cloudcommon: db: add man.GetI18N 2020-10-19 16:42:24 +08:00
Yousong Zhou
91736710ba cloudcommon: db: modelbase: distinct-field: readability change 2020-10-19 16:42:24 +08:00
Yousong Zhou
c2589e7352 logger: actionlog: readability change 2020-10-19 16:42:24 +08:00
rainzm
d454b0a792 feat: add valid filter for cachedimage list
Use the 'valid' switch to control whether to filter out
the cachedimage corresponding to invalid storage
2020-10-19 16:28:04 +08:00
Qiu Jian
2a1a640f6b fix: cancel pending-delete should increase resource quota usages 2020-10-19 16:03:26 +08:00
rainzm
9dee4c1b90 feat(region): call NotifyWebhook in the life cycle of guests 2020-10-19 16:02:55 +08:00
rainzm
0fd6481e4d feat: add NotifyWebhook in notifyclient 2020-10-19 16:02:55 +08:00
rainzm
d799a71fdb feat(notify): allow empty receivers for robot or webhook contact type 2020-10-19 16:02:55 +08:00
rainzm
436f1e5cb9 feat(notify): support webhook contact type 2020-10-19 16:02:55 +08:00
Qiu Jian
a92a0e2d05 fix: missing authenticate action log for user web login 2020-10-19 15:54:10 +08:00
yunion-ci-robot
0cafa996d7 Merge pull request #8362 from swordqiu/automated-cherry-pick-of-#8361-upstream-release-3.4
Automated cherry pick of #8361: fix: do not lock guest after lock eip, to prevent possible dead lock
2020-10-19 15:20:12 +08:00
yunion-ci-robot
2a10b72f98 Merge pull request #8348 from swordqiu/automated-cherry-pick-of-#8347-upstream-release-3.4
Automated cherry pick of #8347: fix: remote update metadata may cause metadata update loop
2020-10-19 15:19:16 +08:00
yunion-ci-robot
31c2b6270a Merge pull request #8354 from swordqiu/automated-cherry-pick-of-#8353-upstream-release-3.4
Automated cherry pick of #8353: fix: reduce change config logs
2020-10-19 15:18:18 +08:00
yunion-ci-robot
a6397d18c2 Merge pull request #8351 from swordqiu/automated-cherry-pick-of-#8350-upstream-release-3.4
Automated cherry pick of #8350: fix: missing authenticate action log for user web login
2020-10-19 15:17:12 +08:00
Zexi Li
203bf44639 Merge pull request #8367 from ioito/automated-cherry-pick-of-#8366-upstream-release-3.4
Automated cherry pick of #8366: fix: add rds cpu and memory usage
2020-10-19 15:11:56 +08:00
Zexi Li
d7a4e52b15 Merge pull request #8374 from ioito/automated-cherry-pick-of-#8373-upstream-release-3.4
Automated cherry pick of #8373: fix: 新增google存储类型
2020-10-19 15:11:08 +08:00
Zexi Li
7946dcef3f Merge pull request #8370 from ioito/automated-cherry-pick-of-#8369-upstream-release-3.4
Automated cherry pick of #8369: fix: use correct worker
2020-10-19 15:10:00 +08:00
Qu Xuan
f77bcd3bbf fix: 新增google存储类型 2020-10-19 14:16:51 +08:00
yunion-ci-robot
4841fbb843 Merge pull request #8356 from wanyaoqi/automated-cherry-pick-of-#8355-upstream-release-3.4
Automated cherry pick of #8355: host: fix sync storage info duration'
2020-10-19 11:57:12 +08:00
Qiu Jian
9b8758e191 fix: reduce change config logs 2020-10-19 11:51:38 +08:00
Qiu Jian
62f5355b11 fix: remote update metadata may cause metadata update loop 2020-10-19 11:46:20 +08:00
Qiu Jian
d774581a23 fix: do not lock guest after lock eip, to prevent possible dead lock 2020-10-19 11:43:22 +08:00
Qu Xuan
062301f54a fix: use correct worker 2020-10-19 11:42:25 +08:00
Qu Xuan
16d13941ce fix: add rds cpu and memory usage 2020-10-19 11:23:21 +08:00
yunion-ci-robot
a10b1945f6 Merge pull request #8359 from yousong/automated-cherry-pick-of-#8358-upstream-release-3.4
Automated cherry pick of #8358: .circleci: build: make with parallel level 2
2020-10-19 10:50:16 +08:00
Yousong Zhou
3aadaf15b7 .circleci: build: make with parallel level 2 2020-10-19 10:29:50 +08:00
wanyaoqi
7a9b491d13 host: fix sync storage info duration' 2020-10-18 01:02:12 +08:00
Qiu Jian
ecbe76e9ff fix: missing authenticate action log for user web login 2020-10-17 22:09:55 +08:00
yunion-ci-robot
41bdfffd57 Merge pull request #8333 from rainzm/automated-cherry-pick-of-#8332-upstream-release-3.4
Automated cherry pick of #8332: feat: support lock storage from selected cachedimage
2020-10-17 18:23:10 +08:00
TangBin
a9c44ed304 add aliyun finance environment 2020-10-17 17:41:57 +08:00
rainzm
7a2c2b8047 refactor: find the most suitable storage 2020-10-17 17:40:08 +08:00
rainzm
a35a6f3c11 feat(esxiagent): try to customize vm if deployfs failed 2020-10-17 17:40:08 +08:00
rainzm
5a7876ae47 feat: support lock storage from selected cachedimage 2020-10-17 17:40:08 +08:00
yunion-ci-robot
31de731cbd Merge pull request #8336 from wanyaoqi/automated-cherry-pick-of-#8325-upstream-release-3.4
Automated cherry pick of #8325: telegraf raid plugin
2020-10-17 11:23:11 +08:00
wanyaoqi
8b2680ed56 telegraf raid plugin 2020-10-17 11:11:30 +08:00
yunion-ci-robot
39c35359aa Merge pull request #8329 from swordqiu/automated-cherry-pick-of-#8304-upstream-release-3.4
Automated cherry pick of #8304: feature: qcloud create VM with tags
2020-10-16 22:19:05 +08:00
Qiu Jian
a764a64696 feature: remote update qcloud instance metadata and name 2020-10-16 21:41:33 +08:00
Qiu Jian
f05a56aadd feature: qcloud create VM with tags 2020-10-16 21:41:33 +08:00
yunion-ci-robot
6cd69d3587 Merge pull request #8335 from rainzm/automated-cherry-pick-of-#8334-upstream-release-3.4
Automated cherry pick of #8334: fix(compute): filter cachedimage with health storage
2020-10-16 19:41:45 +08:00
rainzm
2a1bbfd574 fix(compute): filter cachedimage with health storage 2020-10-16 18:38:44 +08:00
Zexi Li
301006e213 Merge pull request #8331 from ioito/automated-cherry-pick-of-#8330-upstream-release-3.4
Automated cherry pick of #8330: fix: hostname for instance
2020-10-16 17:43:22 +08:00
Qu Xuan
950a2c29fb fix: hostname for instance 2020-10-16 17:12:40 +08:00
yunion-ci-robot
558872db27 Merge pull request #8324 from zhasm/automated-cherry-pick-of-#8323-upstream-release-3.4
Automated cherry pick of #8323: remove alpine build cache before make image
2020-10-16 15:14:46 +08:00
yunion-ci-robot
6386391bf4 Merge pull request #8327 from zexi/automated-cherry-pick-of-#8326-upstream-release-3.4
Automated cherry pick of #8326: fix: get images distinct field
2020-10-16 14:35:40 +08:00
Zexi Li
d298c75448 fix: get images distinct field 2020-10-16 12:01:01 +08:00
Zhang Dongliang
28cb75f41b remove alpine build cache before make image 2020-10-16 12:00:10 +08:00
yunion-ci-robot
560a68d379 Merge pull request #8320 from swordqiu/automated-cherry-pick-of-#8319-upstream-release-3.4
Automated cherry pick of #8319: fix: resolve with_meta filter conflict
2020-10-16 11:39:33 +08:00
Qu Xuan
11f8e4f71f fix: sync dns records after sync vpcs 2020-10-16 11:14:44 +08:00
yunion-ci-robot
9e597db90a Merge pull request #8315 from rainzm/automated-cherry-pick-of-#8314-upstream-release-3.4
Automated cherry pick of #8314: feat(esxi): do not specify portkey in NewVNIC
2020-10-16 10:38:34 +08:00
Qiu Jian
9c9cb17d32 fix: resolve with_meta filter conflict 2020-10-16 10:34:04 +08:00
rainzm
cc96c01c00 feat(esxi): do not specify portkey in NewVNIC 2020-10-16 08:22:58 +08:00
yunion-ci-robot
cb22077722 Merge pull request #8313 from swordqiu/automated-cherry-pick-of-#8312-upstream-release-3.4
Automated cherry pick of #8312: feature: filter storages by image
2020-10-15 23:10:33 +08:00
yunion-ci-robot
8e3c173373 Merge pull request #8309 from ioito/automated-cherry-pick-of-#8308-upstream-release-3.4
Automated cherry pick of #8308: fix: 避免并发同步安全组导致规则混乱
2020-10-15 23:02:32 +08:00
Qiu Jian
45e092bd2d feature: filter storages by image 2020-10-15 22:57:13 +08:00
Qu Xuan
4b2d67de42 fix: 避免并发同步安全组导致规则混乱 2020-10-15 22:26:54 +08:00
yunion-ci-robot
6677c30a5d Merge pull request #8306 from zexi/automated-cherry-pick-of-#8305-upstream-release-3.4
Automated cherry pick of #8305: stringutils2: add RemoveUtf8Strings func
2020-10-15 21:46:36 +08:00
Zexi Li
64593fc882 stringutils2: add RemoveUtf8Strings func 2020-10-15 19:37:00 +08:00
Zexi Li
0d7e1a2517 Merge pull request #8303 from swordqiu/automated-cherry-pick-of-#8302-upstream-release-3.4
Automated cherry pick of #8302: fix: allwo filter resource by with-meta and with-user-meta filter
2020-10-15 15:17:18 +08:00
Zexi Li
6fc835abb9 Merge pull request #8300 from ioito/automated-cherry-pick-of-#8299-upstream-release-3.4
Automated cherry pick of #8299: fix: support filter rds sku by provider
2020-10-15 15:16:04 +08:00
Zexi Li
44a9cc5adb Merge pull request #8293 from lvyangyang/automated-cherry-pick-of-#8289-upstream-release-3.4
Automated cherry pick of #8289: fix:openstack lb 后端ip无法映射到主机的异常处理
2020-10-15 15:15:09 +08:00
Qiu Jian
ff2b7eb345 fix: allwo filter resource by with-meta and with-user-meta filter 2020-10-15 14:46:48 +08:00
Qu Xuan
7b5d822373 fix: support filter rds sku by provider 2020-10-15 14:29:59 +08:00
yunion-ci-robot
f5a45fc16e Merge pull request #8298 from swordqiu/automated-cherry-pick-of-#8297-upstream-release-3.4
Automated cherry pick of #8297: fix: filter role assignments by project domains id or name
2020-10-15 14:24:33 +08:00
yunion-ci-robot
a583bbc74b Merge pull request #8295 from ioito/automated-cherry-pick-of-#8294-upstream-release-3.4
Automated cherry pick of #8294: fix: use new api
2020-10-15 14:22:37 +08:00
yunion-ci-robot
ece82cce42 Merge pull request #8266 from rainzm/automated-cherry-pick-of-#8265-upstream-release-3.4
Automated cherry pick of #8265: feat(esxiagent): sync and use of ESXi template
2020-10-15 13:14:31 +08:00
Qiu Jian
8042b9430c fix: filter project role with system=true 2020-10-15 13:10:54 +08:00
Qiu Jian
d1cbaead09 fix: filter role assignments by project domains id or name 2020-10-15 13:10:54 +08:00
Qu Xuan
1768d1e7db fix: use new api 2020-10-15 11:32:56 +08:00
rainzm
ff34e93862 feat: add 'vlan_id' param when creating network 2020-10-15 10:50:25 +08:00
rainzm
a891d1d876 feat: change templateid as <providerId>/<uuid> in esxi 2020-10-15 10:50:25 +08:00
Rain
c7d6bb7811 fix: support fake tempalte when searching template vm 2020-10-15 10:50:25 +08:00
rainzm
2076a75113 fix(esxiagent): check whether regexp is nil 2020-10-15 10:50:25 +08:00
rainzm
5d0d6d960b feat(esxiagent): keep data disks when cloning vm 2020-10-15 10:50:25 +08:00
lvyangyang
cf89e8a23a fix:openstack lb 后端ip无法映射到主机的异常处理 2020-10-15 10:09:53 +08:00
yunion-ci-robot
45994b59d5 Merge pull request #8291 from ioito/automated-cherry-pick-of-#8290-upstream-release-3.4
Automated cherry pick of #8290: fix: 优化安全组规则同步
2020-10-15 09:10:33 +08:00
Qu Xuan
d2d2934e80 fix: 优化安全组规则同步 2020-10-14 21:19:15 +08:00
yunion-ci-robot
0ec0c8e703 Merge pull request #8286 from lvyangyang/automated-cherry-pick-of-#8275-upstream-release-3.4
Automated cherry pick of #8275: fix:aliyun jsonRequest 增加i/o timeout retry
2020-10-14 17:53:30 +08:00
yunion-ci-robot
3347d6c1e1 Merge pull request #8285 from swordqiu/automated-cherry-pick-of-#8284-upstream-release-3.4
Automated cherry pick of #8284: feature: qcloud create VM with tags
2020-10-14 17:52:29 +08:00
yunion-ci-robot
dce9d5e4a1 Merge pull request #8288 from wanyaoqi/automated-cherry-pick-of-#8287-upstream-release-3.4
Automated cherry pick of #8287: make mode
2020-10-14 16:52:33 +08:00
Qiu Jian
ef9b64990e feature: qcloud create VM with tags 2020-10-14 15:22:30 +08:00
wanyaoqi
f19fe2178c replace NewFloat by NewFloat64 and NewFloat32 2020-10-14 11:56:49 +08:00
wanyaoqi
2265c9422f make mode 2020-10-14 11:56:49 +08:00
yunion-ci-robot
cf3717557a Merge pull request #8282 from ioito/automated-cherry-pick-of-#8281-upstream-release-3.4
Automated cherry pick of #8281: fix: sync huawei bucket project info
2020-10-14 10:51:30 +08:00
yunion-ci-robot
0bbdcb9278 Merge pull request #8280 from ioito/automated-cherry-pick-of-#8264-upstream-release-3.4
Automated cherry pick of #8264: fix: support public ip create
2020-10-14 10:50:30 +08:00
lvyangyang
d72081770e fix:aliyun jsonRequest 增加i/o timeout retry 2020-10-14 10:48:50 +08:00
yunion-ci-robot
0f874d8f07 Merge pull request #8254 from ioito/automated-cherry-pick-of-#8253-upstream-release-3.4
Automated cherry pick of #8253: fix: qcloud eip with bandwidth attr
2020-10-14 10:44:30 +08:00
yunion-ci-robot
dd5dd15a76 Merge pull request #8241 from wanyaoqi/automated-cherry-pick-of-#8231-upstream-release-3.4
Automated cherry pick of #8231: add interface freeze virtual resource
2020-10-14 10:42:30 +08:00
Qu Xuan
cb36572c1c fix: sync huawei bucket project info 2020-10-13 20:55:39 +08:00
Qu Xuan
2a210407a5 fix: support public ip create 2020-10-13 20:01:01 +08:00
Zexi Li
82c59154c5 Merge pull request #8268 from ioito/automated-cherry-pick-of-#8267-upstream-release-3.4
Automated cherry pick of #8267: fix: trans google new region name
2020-10-13 17:34:44 +08:00
Zexi Li
041ee6f904 Merge pull request #8271 from ioito/automated-cherry-pick-of-#8270-upstream-release-3.4
Automated cherry pick of #8270: fix: 支持带宽包用户
2020-10-13 17:34:35 +08:00
yunion-ci-robot
4317fac6da Merge pull request #8279 from wanyaoqi/automated-cherry-pick-of-#8278-upstream-release-3.4
Automated cherry pick of #8278: fix host-deployer base image
2020-10-13 17:04:29 +08:00
yunion-ci-robot
a022f99851 Merge pull request #8277 from zhasm/automated-cherry-pick-of-#8276-upstream-release-3.4
Automated cherry pick of #8276: 在 docker push 脚本里创建_output 目录,以便容错
2020-10-13 17:01:30 +08:00
wanyaoqi
407251975e fix host-deployer base image 2020-10-13 16:59:24 +08:00
Zhang Dongliang
b7fd879e44 在 docker push 脚本里创建_output 目录,以便容错 2020-10-13 16:47:33 +08:00
yunion-ci-robot
0a7ccbe958 Merge pull request #8274 from zhasm/automated-cherry-pick-of-#8273-upstream-release-3.4
Automated cherry pick of #8273: 在 docker push 脚本里创建_output 目录,以便容错
2020-10-13 16:18:31 +08:00
Zhang Dongliang
7efb85ba04 在 docker push 脚本里创建_output 目录,以便容错 2020-10-13 15:37:25 +08:00
Qu Xuan
84e8e4e6c8 fix: 支持带宽包用户 2020-10-13 15:34:03 +08:00
Qu Xuan
3fe15d2675 fix: trans google new region name 2020-10-13 14:18:09 +08:00
Qu Xuan
d574a823ba fix: qcloud eip with bandwidth attr 2020-10-13 10:42:25 +08:00
yunion-ci-robot
a2c8ad13ab Merge pull request #8191 from ioito/automated-cherry-pick-of-#8188-upstream-release-3.4
Automated cherry pick of #8188: fix: avoid qcloud secgroup cache name not sync
2020-10-13 10:41:31 +08:00
yunion-ci-robot
de8f57f625 Merge pull request #8243 from zexi/automated-cherry-pick-of-#8242-upstream-release-3.4
Automated cherry pick of #8242: baremetal: fix pxe filter network by guest_dhcp
2020-10-13 10:32:29 +08:00
Zexi Li
658159b18e Merge pull request #8229 from yousong/automated-cherry-pick-of-#8228-upstream-release-3.4
Automated cherry pick of #8228: eip: construct a pointer type
2020-10-13 10:13:49 +08:00
Zexi Li
67cc7b8747 Merge pull request #8259 from rainzm/automated-cherry-pick-of-#8232-upstream-release-3.4
Automated cherry pick of #8232: fix(esxi): search template from whole vCenter
2020-10-13 10:06:22 +08:00
Zexi Li
ce694ff638 Merge pull request #8247 from swordqiu/automated-cherry-pick-of-#8246-upstream-release-3.4
Automated cherry pick of #8246: fix: project_id in resource details not correct
2020-10-13 10:00:34 +08:00
Zexi Li
98702c2470 Merge pull request #8249 from ioito/automated-cherry-pick-of-#8248-upstream-release-3.4
Automated cherry pick of #8248: fix: qcloud instance with max bandwidth
2020-10-13 09:58:37 +08:00
yunion-ci-robot
9ac5265c07 Merge pull request #8257 from zhasm/automated-cherry-pick-of-#8256-upstream-release-3.4
Automated cherry pick of #8256: 解决编译之后 output 的 owerner 问题
2020-10-12 19:24:28 +08:00
Yousong Zhou
896bec8f43 eip: NewEipForVMOnHost: add opslog 2020-10-12 18:39:17 +08:00
Yousong Zhou
a8426482bf eip: construct a pointer type 2020-10-12 18:39:17 +08:00
Zhang Dongliang
d7316b26aa resolve conflict 2020-10-12 18:12:41 +08:00
rainzm
d16affc9a6 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:46:38 +08:00
rainzm
2259fe1195 fix(esxi): search template from whole vCenter 2020-10-12 17:46:38 +08:00
yunion-ci-robot
09e37de117 Merge pull request #8251 from swordqiu/automated-cherry-pick-of-#8237-upstream-release-3.4
Automated cherry pick of #8237: fix: format errors that block make test
2020-10-12 16:09:22 +08:00
Qu Xuan
715db28e3e fix: qcloud instance with max bandwidth 2020-10-12 15:09:09 +08:00
Qiu Jian
152ea54f36 fix: format errors that block make test 2020-10-12 15:06:44 +08:00
yunion-ci-robot
865b433bb0 Merge pull request #8236 from swordqiu/automated-cherry-pick-of-#8235-upstream-release-3.4
Automated cherry pick of #8235: fix: not clean pending domain usage
2020-10-12 15:04:21 +08:00
yunion-ci-robot
f04a37d0a3 Merge pull request #8233 from rainzm/automated-cherry-pick-of-#8126-upstream-release-3.4
Automated cherry pick of #8126: Feats for ESXi Manage
2020-10-12 15:02:18 +08:00
rainzm
7edcd151e3 feat: add vlanId for suggested network 2020-10-12 14:25:05 +08:00
rainzm
df90d99bc5 feat(esxi): support fake template vm via regex filter 2020-10-12 14:25:05 +08:00
rainzm
552ce3b2ea feat: filter esxi ip by CIDR 2020-10-12 14:25:05 +08:00
rainzm
91c852676a feat(region): make address recommendations more precise
1. 虚拟机的网络推荐不再是一整个C段网络,而是存在的连续IP组成的网段,
这样更准确,用户可以根据自己的需要,合并或者扩充建议的网段
2. 使用 DefaultNetworkGatewayAddressEsxi 来配置子网默认的网关地址。
2020-10-12 14:25:05 +08:00
rainzm
8528d79817 feat: add 'ip-list' for esxicli 2020-10-12 14:25:05 +08:00
Qiu Jian
d2aacafa4c fix: project_id in resource details not correct 2020-10-12 14:20:22 +08:00
yunion-ci-robot
8714503087 Merge pull request #8239 from swordqiu/automated-cherry-pick-of-#8238-upstream-release-3.4
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
d0d3d8e333 baremetal: fix pxe filter network by guest_dhcp 2020-10-12 11:36:56 +08:00
wanyaoqi
dee1aa26dc genreate api models 2020-10-12 10:45:50 +08:00
wanyaoqi
c973bf1632 add interface freeze virtual resource 2020-10-12 10:45:50 +08:00
Qiu Jian
1aa82ae950 fix: ldap sync not update user's phone and email 2020-10-11 05:44:53 +08:00
Qiu Jian
488e7e56a6 fix: not clean pending domain usage 2020-10-11 04:37:04 +08:00
yunion-ci-robot
6a2ebdc123 Merge pull request #8195 from rainzm/automated-cherry-pick-of-#8194-upstream-release-3.4
Automated cherry pick of #8194: fix(esxi): check nil value when NewVirtualMachine
2020-10-10 19:10:17 +08:00
yunion-ci-robot
4105284718 Merge pull request #8217 from tb365/automated-cherry-pick-of-#8214-upstream-release-3.4
Automated cherry pick of #8214: remove aws lbbg cache metedata
2020-10-10 18:55:20 +08:00
yunion-ci-robot
ac5f29bc0c Merge pull request #8226 from zhaoxiangchun/automated-cherry-pick-of-#8213-upstream-release-3.4
Automated cherry pick of #8213: bugfix:scoperesource FilterByOwner
2020-10-10 17:11:18 +08:00
zhaoxiangchun
58d52d947c Add web url to alarm template 2020-10-10 16:24:29 +08:00
zhaoxiangchun
c5ef564d35 bugfix:scoperesource FilterByOwner
1.调度标签 和 优化建议 FilterByOwner 逻辑调整
2020-10-10 16:24:29 +08:00
yunion-ci-robot
1cacf1068f Merge pull request #8219 from yousong/automated-cherry-pick-of-#8218-upstream-release-3.4
Automated cherry pick of #8218: webconsole: ssh: each argument on its own line
2020-10-10 15:34:49 +08:00
Yousong Zhou
63b0d0c071 webconsole: ssh: add keyboard-interactive as an option
For ESXi 6.0

  Authentications that can continue: publickey,keyboard-interactive
2020-10-10 14:43:39 +08:00
Yousong Zhou
39a45229af webconsole: ssh: each argument on its own line 2020-10-10 14:43:39 +08:00
TangBin
e82cf184f1 remove aws lbbg cache metedata 2020-10-10 14:28:27 +08:00
yunion-ci-robot
afa16944c0 Merge pull request #8211 from ioito/automated-cherry-pick-of-#8210-upstream-release-3.4
Automated cherry pick of #8210: fix: validate secgroup purge condition
2020-10-10 14:02:15 +08:00
yunion-ci-robot
8f953e41da Merge pull request #8200 from rainzm/automated-cherry-pick-of-#8199-upstream-release-3.4
Automated cherry pick of #8199: fix(esxi): check whether some fields of vm are nil
2020-10-10 12:53:09 +08:00
yunion-ci-robot
6e0180656d Merge pull request #8208 from ioito/automated-cherry-pick-of-#8207-upstream-release-3.4
Automated cherry pick of #8207: fix: qcloud set hostname for instance
2020-10-10 12:08:09 +08:00
yunion-ci-robot
718bf0d537 Merge pull request #8184 from yousong/automated-cherry-pick-of-#8183-upstream-release-3.4
Automated cherry pick of #8183: vpcagent: ovn: increase dhcp lease, renew, rebind time
2020-10-10 11:56:13 +08:00
Qu Xuan
9fbd4f0599 fix: validate secgroup purge condition 2020-10-10 11:54:38 +08:00
rainzm
078b1d635a fix: avoid slice out of bounds 2020-10-10 11:52:06 +08:00
rainzm
b8e0599e3f fix(esxi): filter linkLocalAddress 2020-10-10 11:52:06 +08:00
rainzm
27bd564d2d fix(esxi): check whether some fields of vm are nil 2020-10-10 11:52:06 +08:00
Qu Xuan
5b79ba5607 fix: qcloud set hostname for instance 2020-10-10 11:41:15 +08:00
yunion-ci-robot
c9d20d13f1 Merge pull request #8206 from swordqiu/automated-cherry-pick-of-#8205-upstream-release-3.4
Automated cherry pick of #8205: fix: filter cached images with host schedtag
2020-10-10 11:35:09 +08:00
yunion-ci-robot
779d4a9acf Merge pull request #8203 from swordqiu/automated-cherry-pick-of-#8202-upstream-release-3.4
Automated cherry pick of #8202: fix: server name auto index should start from 1
2020-10-10 11:35:04 +08:00
rainzm
1bc4b3cb90 fix(esxi): check nil value when NewVirtualMachine 2020-10-10 11:24:12 +08:00
Qiu Jian
49887e540a fix: filter cached images with host schedtag 2020-10-10 06:57:57 +08:00
Qiu Jian
7ce0d7b44b fix: server name auto index should start from 1 2020-10-10 06:26:31 +08:00
Qu Xuan
e8d737ff6c fix: avoid qcloud secgroup cache name not sync 2020-10-09 14:58:10 +08:00
yunion-ci-robot
fd954efcf2 Merge pull request #8177 from zhaoxiangchun/automated-cherry-pick-of-#8176-upstream-release-3.4
Automated cherry pick of #8176: modify suggest rule cli
2020-10-09 10:35:01 +08:00
Yousong Zhou
e9415ae49e vpcagent: ovn: increase dhcp lease, renew, rebind time 2020-10-09 10:24:55 +08:00
yunion-ci-robot
5b0afbdc6b Merge pull request #8179 from swordqiu/automated-cherry-pick-of-#8178-upstream-release-3.4
Automated cherry pick of #8178: fix: error code of external bucket not found error should be 404
2020-10-09 09:13:00 +08:00
yunion-ci-robot
ec393a6e3c Merge pull request #8182 from swordqiu/automated-cherry-pick-of-#8181-upstream-release-3.4
Automated cherry pick of #8181: hotfix: 1. allow merge networks without continuous addresses 2. filter guest_ip_start and guest_ip_end with contains operator
2020-10-09 09:09:00 +08:00
Qiu Jian
adccad3487 hotfix: 1. allow merge networks without continuous addresses 2. filter guest_ip_start and guest_ip_end with contains operator 2020-10-07 23:32:32 +08:00
Qiu Jian
76f794d1a2 fix: error code of external bucket not found error should be 404 2020-09-30 18:01:44 +08:00
zhaoxiangchun
bba2cf23fd modify suggest rule cli
1.增加perform config方法,方便修改默认规则:执行周期,扫描窗口的属性
2020-09-30 17:18:18 +08:00
yunion-ci-robot
b8f8c3bae4 Merge pull request #8174 from yousong/automated-cherry-pick-of-#8173-upstream-release-3.4
Automated cherry pick of #8173: dns: isMyDomain: match only strict subdomain of dns_domain
2020-09-30 16:31:49 +08:00
yunion-ci-robot
7f3c0103d0 Merge pull request #8167 from lvyangyang/automated-cherry-pick-of-#8153-upstream-release-3.4
Automated cherry pick of #8153: fix:允许cname record通过policy多值
2020-09-30 16:30:46 +08:00
yunion-ci-robot
499ddeba32 Merge pull request #8169 from swordqiu/automated-cherry-pick-of-#8168-upstream-release-3.4
Automated cherry pick of #8168: fix: emulated wire not sync vpc shared info
2020-09-30 16:17:47 +08:00
Yousong Zhou
7e191a503c dns: isMyDomain: match only strict subdomain of dns_domain 2020-09-30 16:15:59 +08:00
yunion-ci-robot
94eb72fb3c Merge pull request #8172 from ioito/automated-cherry-pick-of-#8171-upstream-release-3.4
Automated cherry pick of #8171: fix: 允许域管理员可以看到共享的dns zone cache列表
2020-09-30 16:13:47 +08:00
Qu Xuan
02bcce195c fix: 允许域管理员可以看到共享的dns zone cache列表 2020-09-30 15:57:51 +08:00
Qiu Jian
5c4423bcbe fix: emulated wire not sync vpc shared info 2020-09-30 15:54:34 +08:00
lvyangyang
9b7fbf33b8 fix:允许cname record通过policy多值 2020-09-30 15:50:13 +08:00
yunion-ci-robot
a7a8ad1931 Merge pull request #8164 from swordqiu/automated-cherry-pick-of-#8163-upstream-release-3.4
Automated cherry pick of #8163: fix: oidc response user's info
2020-09-30 12:11:46 +08:00
yunion-ci-robot
6c8b30e1be Merge pull request #8166 from swordqiu/automated-cherry-pick-of-#8165-upstream-release-3.4
Automated cherry pick of #8165: fix: revert filter-by-owner changes of scoped resource
2020-09-30 12:07:51 +08:00
Qiu Jian
8cdab93c15 fix: oidc response user's info 2020-09-30 11:57:21 +08:00
Qiu Jian
8a28d26271 fix: revert filter-by-owner changes of scoped resource 2020-09-30 11:34:56 +08:00
yunion-ci-robot
29fa258c6e Merge pull request #8162 from tb365/automated-cherry-pick-of-#8159-upstream-release-3.4
Automated cherry pick of #8159: aliyun public elb region fix
2020-09-29 23:28:41 +08:00
TangBin
7a61d77b06 aliyun public elb region fix 2020-09-29 22:05:47 +08:00
yunion-ci-robot
552dd2bfd1 Merge pull request #8148 from lvyangyang/automated-cherry-pick-of-#8145-upstream-release-3.4
Automated cherry pick of #8145: fix:forbid top level public domain name
2020-09-29 20:21:36 +08:00
yunion-ci-robot
60c42975a8 Merge pull request #8158 from zhaoxiangchun/automated-cherry-pick-of-#8076-upstream-release-3.4
Automated cherry pick of #8076: bugfix:commonalert
2020-09-29 19:17:34 +08:00
yunion-ci-robot
ad53ddd84b Merge pull request #8157 from tb365/automated-cherry-pick-of-#8154-upstream-release-3.4
Automated cherry pick of #8154: aliyun public elb brand fix
2020-09-29 18:19:33 +08:00
zhaoxiangchun
e87d2c0e86 bugfix commalert 3.4
1.后端先隐藏rds,redis,oss等相关信息
2.报警通知中规则描述增加单位信息
3.调整优化建议规则相关逻辑
2020-09-29 18:14:05 +08:00
zhaoxiangchun
a9c95cf363 bugfix:commonalert
1.suggestrule cli 调整
2020-09-29 18:14:05 +08:00
TangBin
540f4631f4 aliyun public elb brand fix 2020-09-29 16:49:41 +08:00
yunion-ci-robot
6db3ec81ea Merge pull request #8150 from ioito/automated-cherry-pick-of-#8149-upstream-release-3.4
Automated cherry pick of #8149: fix: allow domain admin view shared dns zone records
2020-09-29 12:23:33 +08:00
yunion-ci-robot
abc2be7e5e Merge pull request #8147 from ioito/automated-cherry-pick-of-#8146-upstream-release-3.4
Automated cherry pick of #8146: fix: avoid sync dns zone cache status is init
2020-09-29 12:20:34 +08:00
Qu Xuan
b0e1d0de23 fix: allow domain admin view shared dns zone records 2020-09-29 11:20:35 +08:00
lvyangyang
fba8349e84 fix:forbid top level public domain name 2020-09-29 11:04:10 +08:00
yunion-ci-robot
9bd70e3cb6 Merge pull request #8102 from rainzm/automated-cherry-pick-of-#8101-upstream-release-3.4
Automated cherry pick of #8101: fix(region): set ownerId as userCred when can't FetchOwnerId
2020-09-29 10:41:39 +08:00
Qu Xuan
f931deb41f fix: avoid sync dns zone cache status is init 2020-09-29 10:39:54 +08:00
yunion-ci-robot
324e7435ac Merge pull request #8144 from zexi/automated-cherry-pick-of-#8143-upstream-release-3.4
Automated cherry pick of #8143: mcclient modules: fix k8s fed rolebinding joint wrong resource manager
2020-09-29 10:35:36 +08:00
Zexi Li
1a1d7c70ad mcclient modules: fix k8s fed rolebinding joint wrong resource manager 2020-09-29 08:28:05 +08:00
yunion-ci-robot
3a773f87d3 Merge pull request #8142 from swordqiu/automated-cherry-pick-of-#8141-upstream-release-3.4
Automated cherry pick of #8141: fix: filter storages by host schedtag
2020-09-29 01:20:35 +08:00
Qiu Jian
11ea89795a fix: filter storages by host schedtag 2020-09-29 00:20:26 +08:00
yunion-ci-robot
288b9e02af Merge pull request #8140 from zhaoxiangchun/automated-cherry-pick-of-#8139-upstream-release-3.4
Automated cherry pick of #8139: bugfix :esxi 多机器环境下拉取监控超时
2020-09-28 18:27:33 +08:00
zhaoxiangchun
b88c114ba6 bugfix :esxi 多机器环境下拉取监控超时
1.简化mo.virtualMachine 实体中的属性
2.批量获取cloudprovider下所有的虚拟机的监控信息
2020-09-28 18:13:27 +08:00
Zexi Li
aa3ff8ac5b Merge pull request #8138 from zexi/automated-cherry-pick-of-#8137-upstream-release-3.4
Automated cherry pick of #8137: region: host specs replace space char to '_'
2020-09-28 17:46:58 +08:00
Zexi Li
3b0ba2caa9 region: host specs replace space char to '_' 2020-09-28 17:38:54 +08:00
Zexi Li
4dff79bdd0 Merge pull request #8136 from zexi/automated-cherry-pick-of-#8135-upstream-release-3.4
Automated cherry pick of #8135: specs: fix specKey url not escape
2020-09-28 17:01:44 +08:00
Zexi Li
a4d7b2b4b3 specs: fix specKey url not escape 2020-09-28 16:55:56 +08:00
yunion-ci-robot
f2b0fa1911 Merge pull request #8134 from rainzm/automated-cherry-pick-of-#8133-upstream-release-3.4
Automated cherry pick of #8133: fix(scheduler): filter InstanceGroup whose enabled is false
2020-09-28 16:40:35 +08:00
yunion-ci-robot
c1a963801f Merge pull request #8128 from lvyangyang/automated-cherry-pick-of-#8086-upstream-release-3.4
Automated cherry pick of #8086: fix:/dnsrecordset重复检查,dnszonevpc数量
2020-09-28 16:30:33 +08:00
yunion-ci-robot
95456e3e08 Merge pull request #8124 from rainzm/automated-cherry-pick-of-#8123-upstream-release-3.4
Automated cherry pick of #8123: fix: suffix template cache key
2020-09-28 16:28:35 +08:00
Zexi Li
41c84ca8ec Merge pull request #8132 from tb365/automated-cherry-pick-of-#8129-upstream-release-3.4
Automated cherry pick of #8129: aliyun create public lb fix
2020-09-28 16:24:36 +08:00
Rain
e6de7be7e1 fix(scheduler): filter InstanceGroup whose enabled is false 2020-09-28 16:06:17 +08:00
TangBin
3ddce26aa0 aliyun create public lb fix 2020-09-28 14:20:57 +08:00
lvyangyang
d94e55501a fix:/dnsrecordset重复检查,dnszonevpc数量 2020-09-28 11:08:41 +08:00
yunion-ci-robot
a9ca6e0a8a Merge pull request #8122 from zexi/automated-cherry-pick-of-#8121-upstream-release-3.4
Automated cherry pick of #8121: region: fix query object by spec not include details
2020-09-27 22:10:35 +08:00
rainzm
ad22483113 fix: suffix template cache key 2020-09-27 21:10:03 +08:00
yunion-ci-robot
4e9af39d73 Merge pull request #8117 from wanyaoqi/automated-cherry-pick-of-#8116-upstream-release-3.4
Automated cherry pick of #8116: umount nfs on detach storage
2020-09-27 21:03:37 +08:00
Zexi Li
a05f50dbf0 region: fix query object by spec not include details 2020-09-27 20:48:47 +08:00
wanyaoqi
adbe292f48 increase rbd check timeout 2020-09-27 20:19:50 +08:00
wanyaoqi
61cc180101 umount nfs on detach storage 2020-09-27 20:19:50 +08:00
yunion-ci-robot
1fd043c99b Merge pull request #8115 from swordqiu/automated-cherry-pick-of-#8114-upstream-release-3.4
Automated cherry pick of #8114: fix: filter cloudprovider/network by host-schedtag-id
2020-09-27 19:56:38 +08:00
Qiu Jian
82c0dcfb38 fix: filter cloudprovider/network by host-schedtag-id 2020-09-27 18:30:36 +08:00
yunion-ci-robot
ea5fbef0c2 Merge pull request #8111 from ioito/automated-cherry-pick-of-#8110-upstream-release-3.4
Automated cherry pick of #8110: fix: dns zone cache owner info
2020-09-27 16:51:34 +08:00
yunion-ci-robot
c1d66fc4e7 Merge pull request #8094 from tb365/automated-cherry-pick-of-#8087-upstream-release-3.4
Automated cherry pick of #8087: huawei snapshot delete fix
2020-09-27 15:11:32 +08:00
Zexi Li
b7423baf1f Merge pull request #8085 from ioito/automated-cherry-pick-of-#8084-upstream-release-3.4
Automated cherry pick of #8084: fix: openstack zone not emulated
2020-09-27 14:46:55 +08:00
Zexi Li
0ca3349d58 Merge pull request #8089 from wanyaoqi/automated-cherry-pick-of-#8088-upstream-release-3.4
Automated cherry pick of #8088: set stagefail on clean fail
2020-09-27 14:46:00 +08:00
yunion-ci-robot
8dde6a6ac4 Merge pull request #8100 from rainzm/automated-cherry-pick-of-#8099-upstream-release-3.4
Automated cherry pick of #8099: fix(esxi): Guarantee the uniqueness of the schedtag for esxi host
2020-09-27 14:45:34 +08:00
yunion-ci-robot
0d2d5b0728 Merge pull request #8108 from ioito/automated-cherry-pick-of-#8107-upstream-release-3.4
Automated cherry pick of #8107: fix: allow create disk prefer manager
2020-09-27 14:44:35 +08:00
Qu Xuan
da8529a00a fix: dns zone cache owner info 2020-09-27 14:35:49 +08:00
Qu Xuan
73aee11474 fix: allow create disk prefer manager 2020-09-27 14:18:44 +08:00
yunion-ci-robot
5229c06dfc Merge pull request #8060 from ioito/automated-cherry-pick-of-#8059-upstream-release-3.4
Automated cherry pick of #8059: fix: avoid serial vm creation
2020-09-26 23:18:33 +08:00
yunion-ci-robot
37b2b30af5 Merge pull request #8105 from zexi/automated-cherry-pick-of-#8104-upstream-release-3.4
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
7baaf23f84 Merge pull request #8096 from ioito/automated-cherry-pick-of-#8095-upstream-release-3.4
Automated cherry pick of #8095: fix: avoid purge storages
2020-09-25 20:54:42 +08:00
Zexi Li
1b6ac9bc48 region: fix schedtag joint resource master/slave field wrong order 2020-09-25 20:50:49 +08:00
rainzm
1215d723af fix(region): set ownerId as userCred when can't FetchOwnerId 2020-09-25 20:38:23 +08:00
rainzm
4586c82cb2 fix:(region) correct syncSchedtags
1.把extTagName存到metadata里面,这样就算修改tag的name,也能在metadata里面拿到。
2.已经创建的schedtag就不要重复创建了。
2020-09-25 20:28:27 +08:00
rainzm
5460f22444 fix(esxi): Guarantee the uniqueness of the schedtag for esxi host
Replace 'cluster:<clustername>' with
'cluster:/<cloudprovidername>/<dcname>/<clustername>'.
2020-09-25 20:28:27 +08:00
Qu Xuan
f5cf093e0f fix: avoid purge storages 2020-09-25 19:16:21 +08:00
TangBin
77865d894e huawei client request add throttling control 2020-09-25 19:07:41 +08:00
TangBin
454aabca75 huawei elb get params log 2020-09-25 19:07:41 +08:00
TangBin
c6d2149914 qcloud elb create listener fix 2020-09-25 19:07:41 +08:00
TangBin
ebee608109 huawei snapshot delete fix 2020-09-25 19:07:41 +08:00
wanyaoqi
7e2e7ade19 set stagefail on clean fail 2020-09-25 18:42:57 +08:00
Zexi Li
5d39338d60 Merge pull request #8083 from ioito/automated-cherry-pick-of-#8075-upstream-release-3.4
Automated cherry pick of #8075: fix: allow cross doamin resource sync
2020-09-25 16:56:36 +08:00
ioito
3903af786b fix: openstack zone not emulated 2020-09-25 16:15:34 +08:00
ioito
91cac5c217 fix: allow cross doamin resource sync 2020-09-25 15:49:57 +08:00
Zexi Li
12ef953b70 Merge pull request #8078 from ioito/automated-cherry-pick-of-#8077-upstream-release-3.4
Automated cherry pick of #8077: fix: avoid account delete failed
2020-09-25 12:11:43 +08:00
Zexi Li
d029dc22c0 Merge pull request #8018 from rainzm/automated-cherry-pick-of-#8017-upstream-release-3.4
Automated cherry pick of #8017: refactor(region): replace 'ActualCapacity' with 'ActualCapacityUsed'
2020-09-25 12:08:29 +08:00
Zexi Li
0deb8ea928 Merge pull request #8055 from rainzm/automated-cherry-pick-of-#8054-upstream-release-3.4
Automated cherry pick of #8054: feat: add GetSchedtags for ICloudHost
2020-09-25 12:07:13 +08:00
Zexi Li
1ffa6f5295 Merge pull request #8081 from zexi/automated-cherry-pick-of-#8080-upstream-release-3.4
Automated cherry pick of #8080: climc: add k8s fed resource sync action
2020-09-25 12:06:18 +08:00
Zexi Li
37b9a2e53d climc: add k8s fed resource sync action 2020-09-25 11:52:20 +08:00
yunion-ci-robot
f6a620ac46 Merge pull request #8067 from lvyangyang/automated-cherry-pick-of-#8002-upstream-release-3.4
Automated cherry pick of #8002: wait deleted
2020-09-25 11:13:30 +08:00
ioito
5f50314df6 fix: avoid account delete failed 2020-09-25 10:54:25 +08:00
rainzm
9ded6e43f1 feat(region): sync capacityUsed for storage after deploying or deleting guest 2020-09-25 10:35:01 +08:00
rainzm
547b2960b1 feat(region): sync CapacityUsed for Storage 2020-09-25 10:35:01 +08:00
rainzm
116d347c88 feat: add GetCapacityUsedMB for ICloudStorage 2020-09-25 10:35:01 +08:00
rainzm
e0c94daaf7 refactor(region): replace 'ActualCapacity' with 'ActualCapacityUsed' 2020-09-25 10:35:01 +08:00
rainzm
679ccb825a feat(region): sync schedtags when syncing host 2020-09-25 10:31:49 +08:00
rainzm
857e76ab78 feat(esxi): add GetSchedtags implementation for esxi.SHost 2020-09-25 10:31:49 +08:00
rainzm
0d05f9ee18 feat: add GetSchedtags for ICloudHost 2020-09-25 10:31:49 +08:00
Zexi Li
7e362cae3d Merge pull request #8057 from ioito/automated-cherry-pick-of-#8056-upstream-release-3.4
Automated cherry pick of #8056: fix: 仅在可用区故障时可强制挂载磁盘
2020-09-25 01:40:52 +08:00
Zexi Li
54ee77db03 Merge pull request #8066 from lvyangyang/automated-cherry-pick-of-#8013-upstream-release-3.4
Automated cherry pick of #8013: fix: dns 错误信息补全
2020-09-25 01:39:40 +08:00
Zexi Li
95b82d299d Merge pull request #8069 from ioito/automated-cherry-pick-of-#8068-upstream-release-3.4
Automated cherry pick of #8068: fix: avoid compare err with cloudprovider.ErrNotFound direct
2020-09-25 01:38:22 +08:00
Zexi Li
e4605d8c3b Merge pull request #8064 from rainzm/automated-cherry-pick-of-#8063-upstream-release-3.4
Automated cherry pick of #8063: fix(region): fetch correct ownerId in PerformPrepareNets
2020-09-24 21:22:00 +08:00
Zexi Li
652eb65252 Merge pull request #8072 from ioito/automated-cherry-pick-of-#8071-upstream-release-3.4
Automated cherry pick of #8071: fix: sql err
2020-09-24 21:19:26 +08:00
ioito
310baa266b fix: sql err 2020-09-24 20:22:39 +08:00
ioito
5f2c771f73 fix: avoid compare err with cloudprovider.ErrNotFound direct 2020-09-24 20:15:48 +08:00
lvyangyang
d90b661f7e wait deleted 2020-09-24 17:40:21 +08:00
lvyangyang
8d28bfc6d2 fix: dns 错误信息补全 2020-09-24 17:36:58 +08:00
rainzm
c7b8e84ffe fix(region): fetch correct ownerId in PerformPrepareNets 2020-09-24 17:26:17 +08:00
ioito
b5088230bf fix: avoid serial vm creation 2020-09-24 16:41:02 +08:00
ioito
4038bfb8a1 fix: 仅在可用区故障时可强制挂载磁盘 2020-09-24 15:39:09 +08:00
yunion-ci-robot
afb8924762 Merge pull request #8050 from zexi/automated-cherry-pick-of-#8049-upstream-release-3.4
Automated cherry pick of #8049: climc: refactor k8s sub command
2020-09-24 10:59:19 +08:00
yunion-ci-robot
796c3d1d48 Merge pull request #8008 from rainzm/automated-cherry-pick-of-#8007-upstream-release-3.4
Automated cherry pick of #8007: Fix & Feat of Notify or Lang
2020-09-24 10:43:19 +08:00
yunion-ci-robot
57a2258d94 Merge pull request #8053 from zhaoxiangchun/automated-cherry-pick-of-#8051-upstream-release-3.4
Automated cherry pick of #8051: commonalert bugfix 3.4
2020-09-24 10:24:20 +08:00
zhaoxiangchun
365e555c98 commonalert bugfix 3.4 2020-09-24 10:20:58 +08:00
Zexi Li
63603359e7 Merge pull request #8046 from ioito/automated-cherry-pick-of-#8029-upstream-release-3.4
Automated cherry pick of #8029: fix: avoid account delete failed
2020-09-23 23:51:44 +08:00
Zexi Li
fc3b794515 Merge pull request #8052 from swordqiu/automated-cherry-pick-of-#8048-upstream-release-3.4
Automated cherry pick of #8048: fix: scope resource filter by owner
2020-09-23 23:49:38 +08:00
Zexi Li
51020aac04 climc: refactor k8s sub command 2020-09-23 23:43:55 +08:00
yunion-ci-robot
32470e2ad3 Merge pull request #8032 from wanyaoqi/automated-cherry-pick-of-#8031-upstream-release-3.4
Automated cherry pick of #8031: support mutli params
2020-09-23 23:13:23 +08:00
Qiu Jian
975e7fb1e8 fix: scope resource filter by owner 2020-09-23 22:58:52 +08:00
rainzm
1c786a034b fix: use i18n.Table to handle Chinese-English conversion 2020-09-23 21:26:35 +08:00
rainzm
2d5055c908 feat: log err when sending notification via notifyclient 2020-09-23 21:26:35 +08:00
rainzm
471e2b4f13 fix(region): split brand as 'YunionCloud' and '云联壹云' when notify server event 2020-09-23 21:26:35 +08:00
rainzm
8da2d5ff7a feat: inherit lang from ctx fro Task 2020-09-23 21:26:35 +08:00
rainzm
043fdcfec2 fix(notify): modify name of notification to avoid duplication 2020-09-23 21:26:35 +08:00
rainzm
09bebcf5f4 fix(notify): clean verifyNote when mark verified 2020-09-23 21:26:35 +08:00
rainzm
d917e8e386 fix(notify): return correct value when sortContactType 2020-09-23 21:26:35 +08:00
yunion-ci-robot
7d163f63a1 Merge pull request #8025 from swordqiu/automated-cherry-pick-of-#8024-upstream-release-3.4
Automated cherry pick of #8024: fix: apigateway userinfo includes project metadata
2020-09-23 21:24:25 +08:00
yunion-ci-robot
8ce445487b Merge pull request #8015 from wanyaoqi/automated-cherry-pick-of-#8014-upstream-release-3.4
Automated cherry pick of #8014: support search ip
2020-09-23 21:22:21 +08:00
Zexi Li
6cff31add6 Merge pull request #8012 from ioito/automated-cherry-pick-of-#8011-upstream-release-3.4
Automated cherry pick of #8011: fix: 避免添加新账号后长时间未同步iam用户
2020-09-23 21:10:26 +08:00
Zexi Li
7698dcf506 Merge pull request #8010 from ioito/automated-cherry-pick-of-#8009-upstream-release-3.4
Automated cherry pick of #8009: fix: 优化提取显示主账号名
2020-09-23 21:08:35 +08:00
yunion-ci-robot
a7e537f4df Merge pull request #8045 from lvyangyang/automated-cherry-pick-of-#8044-upstream-release-3.4
Automated cherry pick of #8044: fix: error 值重叠
2020-09-23 21:08:22 +08:00
yunion-ci-robot
d23ffbb997 Merge pull request #8035 from swordqiu/automated-cherry-pick-of-#8034-upstream-release-3.4
Automated cherry pick of #8034: fix: role assignment filter by users not working for effective users in groups
2020-09-23 20:59:20 +08:00
ioito
c38cb271f8 fix: avoid account delete failed 2020-09-23 20:58:41 +08:00
yunion-ci-robot
c4c07c4e9d Merge pull request #8033 from yousong/automated-cherry-pick-of-#8030-upstream-release-3.4
Automated cherry pick of #8030: monitor: error fmt
2020-09-23 20:56:19 +08:00
yunion-ci-robot
682fa5e5bd Merge pull request #8037 from rainzm/automated-cherry-pick-of-#8036-upstream-release-3.4
Automated cherry pick of #8036: fix(region): add GetSlaveFieldName for ScalingGroupGuest
2020-09-23 20:52:19 +08:00
yunion-ci-robot
cefe057dc8 Merge pull request #8027 from ioito/automated-cherry-pick-of-#8026-upstream-release-3.4
Automated cherry pick of #8026: fix: 避免腾讯云同步虚拟机ip异常
2020-09-23 20:51:31 +08:00
yunion-ci-robot
1026b74e65 Merge pull request #8042 from zhaoxiangchun/automated-cherry-pick-of-#8041-upstream-release-3.4
Automated cherry pick of #8041: bugfix:esxi collect metric
2020-09-23 20:42:20 +08:00
yunion-ci-robot
ccce0a4be5 Merge pull request #8040 from zhasm/automated-cherry-pick-of-#8039-upstream-release-3.4
Automated cherry pick of #8039: fix esxi-agent dockerfile typo
2020-09-23 20:41:20 +08:00
lvyangyang
9a04238b77 fix: error 值重叠 2020-09-23 20:11:25 +08:00
zhaoxiangchun
a7198dc21b bugfix:esxi collect metric 2020-09-23 19:49:28 +08:00
Zhang Dongliang
78fc35d3a6 fix esxi-agent dockerfile typo 2020-09-23 18:56:28 +08:00
Yousong Zhou
70fd9dfb70 locales: monitor: add translations 2020-09-23 18:43:17 +08:00
Yousong Zhou
572e45968d monitor: error fmt 2020-09-23 18:43:17 +08:00
rainzm
35842df1bd fix(region): add GetSlaveFieldName for ScalingGroupGuest 2020-09-23 18:39:16 +08:00
Qiu Jian
b32eddce03 fix: role assignment filter by users not working for effective users in groups 2020-09-23 18:31:00 +08:00
wanyaoqi
8102e7ed00 support mutli params 2020-09-23 18:25:06 +08:00
ioito
f659ccd0d5 fix: 避免腾讯云同步虚拟机ip异常 2020-09-23 18:17:36 +08:00
yunion-ci-robot
27fe6bc38d Merge pull request #8022 from yousong/automated-cherry-pick-of-#8021-upstream-release-3.4
Automated cherry pick of #8021: elasticips: fix calling FilterByOwner
2020-09-23 17:27:19 +08:00
yunion-ci-robot
b118f341bc Merge pull request #8020 from zhasm/automated-cherry-pick-of-#8019-upstream-release-3.4
Automated cherry pick of #8019: make with ARCH argument
2020-09-23 16:38:18 +08:00
Yousong Zhou
59a5e9201e elasticips: error when we have no usable eip network 2020-09-23 16:22:49 +08:00
Yousong Zhou
430e9cd0fc elasticips: fix calling FilterByOwner 2020-09-23 16:22:49 +08:00
Qiu Jian
5b6b5eeb7d fix: apigateway userinfo includes project metadata 2020-09-23 16:07:00 +08:00
Zhang Dongliang
384e866649 make with ARCH argument 2020-09-23 15:57:49 +08:00
wanyaoqi
884e82a150 support search ip 2020-09-23 14:26:43 +08:00
ioito
b3c235fe30 fix: 避免添加新账号后长时间未同步iam用户 2020-09-23 10:34:04 +08:00
ioito
686df64ea9 fix: 优化提取显示主账号名 2020-09-22 21:24:33 +08:00
yunion-ci-robot
d8fa8a49fb Merge pull request #8006 from tb365/automated-cherry-pick-of-#8003-upstream-release-3.4
Automated cherry pick of #8003: regional network filter bugfix
2020-09-22 21:18:23 +08:00
yunion-ci-robot
1afeca5687 Merge pull request #8001 from ioito/automated-cherry-pick-of-#7990-upstream-release-3.4
Automated cherry pick of #7990: fix: avoid not reture cloudprovider.ErrNotFound error
2020-09-22 21:12:18 +08:00
yunion-ci-robot
304457a3b4 Merge pull request #7999 from ioito/automated-cherry-pick-of-#7998-upstream-release-3.4
Automated cherry pick of #7998: optimized: create eip params
2020-09-22 21:10:18 +08:00
TangBin
0bba6e63f0 regional network filter bugfix 2020-09-22 20:06:48 +08:00
Qu Xuan
bb3317cc32 fix: avoid not reture cloudprovider.ErrNotFound error 2020-09-22 16:49:38 +08:00
Qu Xuan
becf92f6bf optimized: create eip params 2020-09-22 16:47:42 +08:00
yunion-ci-robot
632ab6c2f9 Merge pull request #7987 from zhaoxiangchun/automated-cherry-pick-of-#7986-upstream-release-3.4
Automated cherry pick of #7986: common alert bugfix/3.4
2020-09-22 14:40:18 +08:00
yunion-ci-robot
cb0b0bea41 Merge pull request #7992 from zhaoxiangchun/automated-cherry-pick-of-#7991-upstream-release-3.4
Automated cherry pick of #7991: bugfix: collect esxi metric timout
2020-09-22 14:16:20 +08:00
yunion-ci-robot
6f324b0ea1 Merge pull request #7997 from tb365/automated-cherry-pick-of-#7994-upstream-release-3.4
Automated cherry pick of #7994: ctyun sync secgroup fix & cloudaccount delete fix
2020-09-22 14:08:19 +08:00
TangBin
0acbfc89f3 ctyun sync secgroup fix & cloudaccount delete fix 2020-09-22 13:58:22 +08:00
zhaoxiangchun
477d36f827 common alert bugfix/3.4 2020-09-22 11:37:14 +08:00
zhaoxiangchun
caa26b7567 bugfix: collect esxi metric timout
1.增加批量获取esxi中metric的接口
2020-09-22 11:13:25 +08:00
yunion-ci-robot
d0bb0afa2d Merge pull request #7933 from swordqiu/automated-cherry-pick-of-#7916-upstream-release-3.4
Automated cherry pick of #7916: fix: keystone initialize data skip nil extra fields
2020-09-21 19:54:14 +08:00
yunion-ci-robot
cb3884b1c5 Merge pull request #7919 from swordqiu/automated-cherry-pick-of-#7918-upstream-release-3.4
Automated cherry pick of #7918: fix: lock/unlock cleanup
2020-09-21 19:48:12 +08:00
yunion-ci-robot
10524ecc9a Merge pull request #7989 from wanyaoqi/automated-cherry-pick-of-#7988-upstream-release-3.4
Automated cherry pick of #7988: fix host deployer base image
2020-09-21 18:33:16 +08:00
wanyaoqi
33fb33a589 fix host deployer base image 2020-09-21 17:55:46 +08:00
yunion-ci-robot
a4b2af90c5 Merge pull request #7981 from yousong/automated-cherry-pick-of-#7980-upstream-release-3.4
Automated cherry pick of #7980: httputils: preserve format val types
2020-09-21 16:40:17 +08:00
Yousong Zhou
3f7155c39c logger: actionlog: add GetI18N 2020-09-21 15:22:06 +08:00
Yousong Zhou
b13d0f6035 logger: actionlog: remove redundant comments 2020-09-21 15:22:06 +08:00
Yousong Zhou
62c0c11c30 db: IModel: add GetI18N() method 2020-09-21 15:22:06 +08:00
Yousong Zhou
6bff7caf9b logclient: i18n: en for const 2020-09-21 15:22:06 +08:00
Yousong Zhou
27d0452faf logclient: i18n: cn for const 2020-09-21 15:22:06 +08:00
Yousong Zhou
b1a332fec1 logclient: convert const val to use latin chars 2020-09-21 15:22:06 +08:00
Yousong Zhou
bc066edc09 logclient: move ws list to separate file 2020-09-21 15:22:06 +08:00
Yousong Zhou
0b878134b6 logclient: separate lines 2020-09-21 15:22:06 +08:00
Yousong Zhou
986031fc97 opslog: move const to separate file 2020-09-21 15:22:06 +08:00
Yousong Zhou
8164854fd0 i18n: add ITable 2020-09-21 15:22:06 +08:00
Yousong Zhou
8dc1796768 i18n: move out from httperrors pkg 2020-09-21 15:22:06 +08:00
Yousong Zhou
a54d0e5920 locales: update translation 2020-09-21 15:22:06 +08:00
Yousong Zhou
822fae0095 treewide: avoid variable fmt str 2020-09-21 15:22:06 +08:00
Yousong Zhou
23b9991a7b treewide: fmt error 2020-09-21 15:22:06 +08:00
Yousong Zhou
4fb45676a4 httputils: preserve format val types 2020-09-21 15:22:06 +08:00
yunion-ci-robot
93e5f8ec97 Merge pull request #7977 from swordqiu/automated-cherry-pick-of-#7975-upstream-release-3.4
Automated cherry pick of #7975: fix: get jnlp xml from dell idrac6,7,9
2020-09-21 10:16:12 +08:00
yunion-ci-robot
29dde04145 Merge pull request #7979 from swordqiu/automated-cherry-pick-of-#7978-upstream-release-3.4
Automated cherry pick of #7978: fix: reset user password without check
2020-09-21 10:12:17 +08:00
yunion-ci-robot
b69d04ee20 Merge pull request #7985 from swordqiu/automated-cherry-pick-of-#7984-upstream-release-3.4
Automated cherry pick of #7984: fix: scheduler token not support policy
2020-09-21 10:09:12 +08:00
yunion-ci-robot
d0af7f9b23 Merge pull request #7983 from yousong/automated-cherry-pick-of-#7982-upstream-release-3.4
Automated cherry pick of #7982: locales: update translations
2020-09-20 00:22:14 +08:00
Qiu Jian
e444ab7a15 fix: scheduler token not support policy 2020-09-19 23:47:29 +08:00
Yousong Zhou
c4f4e7d30b locales: update translations 2020-09-19 23:45:19 +08:00
Qiu Jian
5f35bba0d0 fix: reset user password without check 2020-09-19 00:51:02 +08:00
Qiu Jian
760ac9900f fix: get jnlp xml from dell idrac6,7,9 2020-09-19 00:11:02 +08:00
Zexi Li
be00107c12 Merge pull request #7969 from tb365/automated-cherry-pick-of-#7966-upstream-release-3.4
Automated cherry pick of #7966: ctyun add region cn-bj1
2020-09-18 21:05:31 +08:00
yunion-ci-robot
17cd333b64 Merge pull request #7971 from swordqiu/automated-cherry-pick-of-#7970-upstream-release-3.4
Automated cherry pick of #7970: fix: add esxicli vmrc/webmks command
2020-09-18 21:04:11 +08:00
Zexi Li
346c8ec564 Merge pull request #7974 from rainzm/automated-cherry-pick-of-#7973-upstream-release-3.4
Automated cherry pick of #7973: fix(notify): allow normal user create their receiver
2020-09-18 21:04:08 +08:00
rainzm
aecf977801 fix(notify): allow normal user create their receiver 2020-09-18 17:17:38 +08:00
yunion-ci-robot
7a044d1ac1 Merge pull request #7947 from wanyaoqi/automated-cherry-pick-of-#7927-upstream-release-3.4
Automated cherry pick of #7927: host sync storage size
2020-09-18 16:53:48 +08:00
Qiu Jian
5f9088d240 fix: add esxicli vmrc/webmks command 2020-09-18 14:41:38 +08:00
TangBin
12bd187ec9 ctyun add region cn-bj1 2020-09-18 14:26:17 +08:00
Zexi Li
c1a0b8a8b5 Merge pull request #7962 from zexi/automated-cherry-pick-of-#7961-upstream-release-3.4
Automated cherry pick of #7961: region: fix network schedtag not cleanup when network deleted
2020-09-18 12:44:58 +08:00
Zexi Li
1d7ffc704e region: fix network schedtag not cleanup when network deleted 2020-09-18 10:38:33 +08:00
Zexi Li
ebdefa1f23 Merge pull request #7960 from zexi/automated-cherry-pick-of-#7959-upstream-release-3.4
Automated cherry pick of #7959: climc: add k8s federated resource cmd
2020-09-17 15:43:37 +08:00
Zexi Li
02dc68f20d climc: add k8s federated resource cmd 2020-09-17 15:29:55 +08:00
Zexi Li
9047c8de39 Merge pull request #7956 from zexi/automated-cherry-pick-of-#7954-upstream-release-3.4
Automated cherry pick of #7954: cloudcommon: get joint model should aware fieldname
2020-09-17 10:33:57 +08:00
yunion-ci-robot
ae3073da48 Merge pull request #7942 from zhaoxiangchun/automated-cherry-pick-of-#7941-upstream-release-3.4
Automated cherry pick of #7941: suggest rule modify:
2020-09-16 21:42:20 +08:00
Zexi Li
ab2567d17d Merge pull request #7955 from wanyaoqi/automated-cherry-pick-of-#7953-upstream-release-3.4
Automated cherry pick of #7953: fix set host image cache properties
2020-09-16 21:38:16 +08:00
Zexi Li
ba03954e50 Merge pull request #7949 from wanyaoqi/automated-cherry-pick-of-#7948-upstream-release-3.4
Automated cherry pick of #7948: fix update image status after save failed
2020-09-16 21:36:15 +08:00
Zexi Li
6c6b7bb6fa Merge pull request #7913 from ioito/automated-cherry-pick-of-#7912-upstream-release-3.4
Automated cherry pick of #7912: fix: 支持自动根据云上项目修改本地项目名称
2020-09-16 21:35:01 +08:00
yunion-ci-robot
b3f62ee186 Merge pull request #7944 from lvyangyang/automated-cherry-pick-of-#7943-upstream-release-3.4
Automated cherry pick of #7943: dup record process
2020-09-16 21:04:51 +08:00
yunion-ci-robot
bc66fd558a Merge pull request #7946 from wanyaoqi/automated-cherry-pick-of-#7945-upstream-release-3.4
Automated cherry pick of #7945: scheduler: fix fillter isolated device
2020-09-16 20:58:12 +08:00
Zexi Li
4164bf58c1 cloudcommon: get joint model should aware fieldname 2020-09-16 20:52:19 +08:00
wanyaoqi
5593b88e98 fix set host image cache properties 2020-09-16 20:51:52 +08:00
wanyaoqi
785da09d62 fix update image status after save failed 2020-09-16 19:14:07 +08:00
wanyaoqi
585ef58332 host sync storage size 2020-09-16 19:02:27 +08:00
wanyaoqi
8e0f47aa0c scheduler: fix fillter isolated device 2020-09-16 18:32:05 +08:00
lvyangyang
4487867f53 dup record process 2020-09-16 18:31:12 +08:00
zhaoxiangchun
9b12c675d2 suggest rule modify:
1.规则由后端初始化,默认禁用
2.规则period默认为12h,扫描范围timeFrom默认为14d
3.增加notify相关的模版文件
4.更改消息重复发送的问题
2020-09-16 12:56:58 +08:00
Zexi Li
a2d7bd16a2 Merge pull request #7940 from zhaoxiangchun/automated-cherry-pick-of-#7938-upstream-release-3.4
Automated cherry pick of #7938: bugfix vmware monitor
2020-09-16 11:35:06 +08:00
Zexi Li
10625a4b26 Merge pull request #7936 from swordqiu/automated-cherry-pick-of-#7935-upstream-release-3.4
Automated cherry pick of #7935: fix: disable qcloud verifyAppId temporarily
2020-09-16 11:33:53 +08:00
Zexi Li
e64ac81f87 Merge pull request #7911 from rainzm/automated-cherry-pick-of-#7910-upstream-release-3.4
Automated cherry pick of #7910: Feat & Fix of Notify
2020-09-16 11:32:46 +08:00
Zexi Li
e42afce6f3 Merge pull request #7926 from ioito/automated-cherry-pick-of-#7925-upstream-release-3.4
Automated cherry pick of #7925: fix: 避免名称重复
2020-09-16 11:31:52 +08:00
Zexi Li
ad0b9e3bd3 Merge pull request #7932 from swordqiu/automated-cherry-pick-of-#7931-upstream-release-3.4
Automated cherry pick of #7931: fix: omit empty fail reason
2020-09-16 11:31:20 +08:00
yunion-ci-robot
d4e2158caf Merge pull request #7930 from swordqiu/automated-cherry-pick-of-#7929-upstream-release-3.4
Automated cherry pick of #7929: fix: enable generate name caused compability issue
2020-09-16 11:30:09 +08:00
Zexi Li
a09932d8ac Merge pull request #7922 from ioito/automated-cherry-pick-of-#7921-upstream-release-3.4
Automated cherry pick of #7921: fix: bucket object cnt fix
2020-09-16 11:30:04 +08:00
zhaoxiangchun
2a680f99a7 bugfix vmware monitor 2020-09-16 10:28:59 +08:00
Qiu Jian
7601ca437a fix: disable qcloud verifyAppId temporarily 2020-09-16 02:21:22 +08:00
Qiu Jian
967d46bbf6 fix: keystone initialize data skip nil extra fields 2020-09-16 01:59:27 +08:00
Qiu Jian
a475a7b416 fix: omit empty fail reason 2020-09-16 01:56:02 +08:00
Qiu Jian
0d798412e1 fix: enable generate name caused compability issue 2020-09-16 01:36:33 +08:00
Qu Xuan
a1ba06a927 fix: 避免名称重复 2020-09-15 19:30:24 +08:00
Qu Xuan
cc5e0cd7ca fix: bucket object cnt fix 2020-09-15 19:13:38 +08:00
Qiu Jian
ada7352469 fix: lock/unlock cleanup 2020-09-15 12:26:47 +08:00
yunion-ci-robot
ef9dac1a86 Merge pull request #7917 from zexi/automated-cherry-pick-of-#7915-upstream-release-3.4
Automated cherry pick of #7915: cloudcommon: joint model list should add field_name into query
2020-09-15 10:27:12 +08:00
yunion-ci-robot
f71d26d2b2 Merge pull request #7906 from wanyaoqi/automated-cherry-pick-of-#7905-upstream-release-3.4
Automated cherry pick of #7905: webconsole: fix defer order to release zombie process
2020-09-15 10:26:10 +08:00
Zexi Li
82e38b8f51 cloudcommon: joint model list should add field_name into query 2020-09-14 23:38:11 +08:00
Qu Xuan
5c71349fe2 fix: 支持自动根据云上项目修改本地项目名称 2020-09-14 21:13:27 +08:00
rainzm
f24950da96 feat(notify): sort the returned contact type array 2020-09-14 20:35:12 +08:00
rainzm
0308ce2882 feat: notify user when failing to change config 2020-09-14 20:35:12 +08:00
rainzm
cee07e7861 feat: add NotifyError in notifyclient
NotifyError send error message to user from userCred.
2020-09-14 20:35:12 +08:00
rainzm
8eba2c369f feat: add WithCtx version to notifyclient function 2020-09-14 20:35:12 +08:00
rainzm
5a10f9dd9c feat(region): divide notify templates into Chinese and English versions
Chinese version: content@cn, title@cn
English version: content@en, title@en
2020-09-14 20:35:12 +08:00
rainzm
c542249c7c feat(region): replace 虚拟机 with 主机 or 云主机 2020-09-14 20:35:12 +08:00
wanyaoqi
fa2d8723a6 webconsole: fix defer order to release zombie process 2020-09-14 18:20:47 +08:00
Zexi Li
523b0d132f Merge pull request #7903 from rainzm/automated-cherry-pick-of-#7902-upstream-release-3.4
Automated cherry pick of #7902: fix(esxi): return when host.Vm is empty
2020-09-14 16:28:08 +08:00
rainzm
6bfca36cb7 fix(esxi): return when host.Vm is empty 2020-09-14 16:26:34 +08:00
yunion-ci-robot
e41c29e6d0 Merge pull request #7900 from ioito/automated-cherry-pick-of-#7899-upstream-release-3.4
Automated cherry pick of #7899: fix: cos use proxy
2020-09-14 14:03:14 +08:00
Zexi Li
6010b253f2 Merge pull request #7896 from wanyaoqi/automated-cherry-pick-of-#7895-upstream-release-3.4
Automated cherry pick of #7895: disk: check disk is need renew on guest set renew
2020-09-14 13:02:07 +08:00
Qu Xuan
0a5ee4ca67 fix: cos use proxy 2020-09-14 13:01:07 +08:00
wanyaoqi
77f479ce60 disk: check disk is need renew on guest set renew 2020-09-14 12:07:48 +08:00
yunion-ci-robot
f8b7d96c62 Merge pull request #7894 from swordqiu/automated-cherry-pick-of-#7893-upstream-release-3.4
Automated cherry pick of #7893: fix: check host sharing status when considering whether a host is assignable
2020-09-12 23:58:08 +08:00
yunion-ci-robot
fda5c3aaa5 Merge pull request #7891 from swordqiu/automated-cherry-pick-of-#7890-upstream-release-3.4
Automated cherry pick of #7890: fix: disable webkms for esxi older than 6.5
2020-09-12 23:55:21 +08:00
yunion-ci-robot
0e88ac81c3 Merge pull request #7888 from yousong/automated-cherry-pick-of-#7887-upstream-release-3.4
Automated cherry pick of #7887: elasticips: filter by owner when doing auto allocation
2020-09-12 23:54:09 +08:00
Qiu Jian
6b5339900b fix: check host sharing status when considering whether a host is assignable 2020-09-12 20:52:09 +08:00
yunion-ci-robot
60b1eddfd8 Merge pull request #7886 from zexi/automated-cherry-pick-of-#7885-upstream-release-3.4
Automated cherry pick of #7885: scheduler: ignore network type when specified
2020-09-12 17:34:08 +08:00
Qiu Jian
7cf5ad9133 fix: disable webkms for esxi older than 6.5 2020-09-12 17:29:50 +08:00
Yousong Zhou
8a0f940b38 elasticips: filter by owner when doing auto allocation 2020-09-12 17:14:41 +08:00
Zexi Li
a1c7a291d5 scheduler: ignore network type when specified 2020-09-12 15:59:17 +08:00
Zexi Li
891b7223f1 Merge pull request #7884 from rainzm/automated-cherry-pick-of-#7883-upstream-release-3.4
Automated cherry pick of #7883: feat(region): change fomat 'id' to 'name(id)' in scheduledtasks' log
2020-09-11 21:06:38 +08:00
yunion-ci-robot
9ef5a43513 Merge pull request #7877 from ioito/automated-cherry-pick-of-#7876-upstream-release-3.4
Automated cherry pick of #7876: fix: 默认不自动合并安全组
2020-09-11 21:05:58 +08:00
Zexi Li
490a0a7fe5 Merge pull request #7880 from ioito/automated-cherry-pick-of-#7879-upstream-release-3.4
Automated cherry pick of #7879: fix: avoid sync natgateway eip panic
2020-09-11 21:03:40 +08:00
Zexi Li
06c27791bb Merge pull request #7871 from rainzm/automated-cherry-pick-of-#7870-upstream-release-3.4
Automated cherry pick of #7870: fix(esxiagent): add HostDelayTaskWorkerCount
2020-09-11 20:55:33 +08:00
Zexi Li
690c3b23a4 Merge pull request #7863 from wanyaoqi/automated-cherry-pick-of-#7836-upstream-release-3.4
Automated cherry pick of #7836: host: fix rbd storage cache iso image
2020-09-11 20:54:17 +08:00
Zexi Li
6bc6309253 Merge pull request #7868 from ioito/automated-cherry-pick-of-#7862-upstream-release-3.4
Automated cherry pick of #7862: fix: add dns recordset dns value check
2020-09-11 20:53:28 +08:00
rainzm
7b67554dcc feat(region): change fomat 'id' to 'name(id)' in scheduledtasks' log 2020-09-11 20:37:54 +08:00
Qu Xuan
ce777855a2 fix: 默认不自动合并安全组 2020-09-11 19:23:15 +08:00
Qu Xuan
9607420298 fix: avoid sync natgateway eip panic 2020-09-11 19:17:25 +08:00
rainzm
4e7e8a59dc fix(esxiagent): add HostDelayTaskWorkerCount
之前,HostDelayWorker 是通过 hostutils.InitWorkerManager 来初始化,
worker的数量依赖于options.HostOptions.DefaultRequestWorkerCount, 因为
这个options没有经过初始化,所以就是0,导致worker count的数量变为1。

现在增加了 HostDelayTaskWorkerCount 来管理这个count,默认值为8。
2020-09-11 17:19:46 +08:00
Qu Xuan
2e93ee3d6d fix: add dns recordset dns value check 2020-09-11 14:26:01 +08:00
wanyaoqi
6a7cf0608d host: fix rbd storage cache iso image 2020-09-10 23:13:58 +08:00
yunion-ci-robot
5f7734b0c3 Merge pull request #7860 from ioito/automated-cherry-pick-of-#7859-upstream-release-3.4
Automated cherry pick of #7859: fix: 平滑迁移数据
2020-09-10 21:42:53 +08:00
yunion-ci-robot
413ba9ddd4 Merge pull request #7858 from lvyangyang/automated-cherry-pick-of-#7762-upstream-release-3.4
Automated cherry pick of #7762: dns access
2020-09-10 21:37:56 +08:00
yunion-ci-robot
0048507211 Merge pull request #7856 from ioito/automated-cherry-pick-of-#7855-upstream-release-3.4
Automated cherry pick of #7855: fix: optimized qcloud keypair
2020-09-10 21:34:33 +08:00
Qu Xuan
d6d490af6c fix: 平滑迁移数据 2020-09-10 17:39:40 +08:00
lvyangyang
70297e3130 dns access 2020-09-10 17:33:17 +08:00
Qu Xuan
5576819f01 fix: 腾讯云不支持同时设置秘钥和密码,若设置秘钥,则将密码置空 2020-09-10 17:25:32 +08:00
Qu Xuan
dc20313ef5 fix: optimized qcloud keypair 2020-09-10 17:25:32 +08:00
yunion-ci-robot
fb7b5d5a95 Merge pull request #7854 from rainzm/automated-cherry-pick-of-#7832-upstream-release-3.4
Automated cherry pick of #7832: refactor(region): optimize preparenet of cloudaccount
2020-09-10 16:04:55 +08:00
rainzm
3f77c01e6b refactor(region): optimize preparenet of cloudaccount
1. 从vcenter中获取host和vm的信息时,只需要获取网络相关的字段就可以了。
2. 每个host的vms,单独启用一个goroutine。
3. 优化了处理vms ip的逻辑,现在的时间复杂度是O(n)。
2020-09-10 15:41:13 +08:00
yunion-ci-robot
5ec2490be5 Merge pull request #7853 from rainzm/automated-cherry-pick-of-#7852-upstream-release-3.4
Automated cherry pick of #7852: fix(notify): pull contact for workwx, dingtalk and feishu
2020-09-10 15:18:01 +08:00
rainzm
dba92d4b0b fix(notify): pull contact for workwx, dingtalk and feishu 2020-09-10 14:41:27 +08:00
yunion-ci-robot
6f77c22573 Merge pull request #7835 from ioito/automated-cherry-pick-of-#7834-upstream-release-3.4
Automated cherry pick of #7834: fix: uniform cachedimage active status
2020-09-10 14:36:02 +08:00
yunion-ci-robot
f653b36733 Merge pull request #7851 from ioito/automated-cherry-pick-of-#7837-upstream-release-3.4
Automated cherry pick of #7837: fix: optimzed clouduser password
2020-09-10 14:33:55 +08:00
Qu Xuan
aa26c6ec99 fix: optimzed clouduser password 2020-09-10 10:24:21 +08:00
yunion-ci-robot
0e0df0999b Merge pull request #7844 from ioito/automated-cherry-pick-of-#7843-upstream-release-3.4
Automated cherry pick of #7843: fix: optimzed clouduser
2020-09-10 09:49:23 +08:00
yunion-ci-robot
5f0b86950b Merge pull request #7842 from ioito/automated-cherry-pick-of-#7841-upstream-release-3.4
Automated cherry pick of #7841: fix: avoid create public zone failed
2020-09-10 09:47:56 +08:00
yunion-ci-robot
d1660c83a9 Merge pull request #7839 from swordqiu/automated-cherry-pick-of-#7831-upstream-release-3.4
Automated cherry pick of #7831: fix: recode project-role rpc handle to support group role assignment results by user or project
2020-09-10 09:46:54 +08:00
yunion-ci-robot
f302756eda Merge pull request #7840 from zhaoxiangchun/automated-cherry-pick-of-#7838-upstream-release-3.4
Automated cherry pick of #7838: commonalert bugfix:
2020-09-10 09:44:53 +08:00
yunion-ci-robot
90185c0074 Merge pull request #7846 from rainzm/automated-cherry-pick-of-#7845-upstream-release-3.4
Automated cherry pick of #7845: Feat & Fix & Refactor for ESXi
2020-09-10 09:41:58 +08:00
rainzm
55b2b29001 fix(region): add RequestSyncstatusOnHost for SESXiGuestDriver
esxi 平台 Guest 进行 syncstatus 和其他平台有所区别,Vcenter 可能会更改
 VM 所在的 Host,所以在 Host 上寻找 VM 可能会出现 ErrNotFound。此时,应该
主动去整个 datacenter 中寻找 VM,然后更改 Host,进行同步。
2020-09-09 21:53:51 +08:00
rainzm
ac69f8a590 fix(esxi): fetch templatevm from datacenter before clone vm
这里应该和image_cache那里保持一直,对template的获取应该从datacenter
中获取,而不是host。
2020-09-09 21:53:51 +08:00
rainzm
42faf34f15 refactor(esxi): replace GetTemplateVMById with FetchTemplateVMById
FetchTemplateVMById 更好,因为它更轻量,更快。
2020-09-09 21:53:51 +08:00
rainzm
3f8f9e6c56 feat(esxicli): better vm operator
现在,可以通过Datacenter来获取vm,不一定要指定HostIp,
Datacenter和HostIp必须指定一个。
2020-09-09 21:53:51 +08:00
rainzm
6b340264e4 feat(esxi): support fetchVM form datacenter 2020-09-09 21:53:51 +08:00
rainzm
ef8768fcef refactor(esxi): fetchVms and fetchHardwareInfo
1. fetchHardwareInfo 只有一种error,原因是moVM的某些字段为nil,这种情况下,完全可以打印日志直接返回。
2. fetchVms 现在只返回[]*SVirtualMachine, 进一步的过滤(是不是template)交给调用者。
2020-09-09 21:53:51 +08:00
Qu Xuan
9281c54294 fix: optimzed clouduser 2020-09-09 20:12:40 +08:00
Qu Xuan
2ad1a4afe5 fix: avoid create public zone failed 2020-09-09 19:54:45 +08:00
zhaoxiangchun
1a323667ad commonalet bugfix:
1.报警接受人通知渠道调整:由notify中解释发送到对应的channel
2.报警恢复增加对应的evalmatch,保存对应的metricvalue
3.报警记录中增加description相关信息
4.其他代码调整
2020-09-09 18:32:56 +08:00
Qiu Jian
0268d95853 fix: recode project-role rpc handle to support group role assignment results by user or project 2020-09-09 18:19:36 +08:00
Qu Xuan
025eca548f fix: uniform cachedimage active status 2020-09-09 15:21:43 +08:00
yunion-ci-robot
4cea5a1c9f Merge pull request #7829 from swordqiu/automated-cherry-pick-of-#7828-upstream-release-3.4
Automated cherry pick of #7828: fix: wire usage stats incorrect
2020-09-08 20:28:56 +08:00
yunion-ci-robot
cb1c8d7961 Merge pull request #7827 from swordqiu/automated-cherry-pick-of-#7820-upstream-release-3.4
Automated cherry pick of #7820: fix: ignore 409 error when doing redfish power on
2020-09-08 20:26:52 +08:00
yunion-ci-robot
408f975f40 Merge pull request #7822 from rainzm/automated-cherry-pick-of-#7821-upstream-release-3.4
Automated cherry pick of #7821: fix(esxiagent): return image extid not id
2020-09-08 20:23:55 +08:00
Qiu Jian
621c2796d6 fix: wire usage stats incorrect 2020-09-08 16:41:48 +08:00
Qiu Jian
d10adf22d7 fix: ignore 409 error when doing redfish power on 2020-09-08 15:34:59 +08:00
rainzm
3ef91f92e5 fix(esxiagent): return image extid not id
调用 disk/image_cache 接口的Task StorageCacheImageTask 会根据回调
回来数据中的 image_id,来设置 storagecachedimage 中的 externalid,
所以这里的 image_id 应该是 externalid。
2020-09-08 15:33:18 +08:00
yunion-ci-robot
e75e5a9b95 Merge pull request #7803 from rainzm/automated-cherry-pick-of-#7802-upstream-release-3.4
Automated cherry pick of #7802: Optimization of the scheduler
2020-09-08 14:59:53 +08:00
rainzm
348ca46a08 fix(scheduler): more standardized testing 2020-09-08 14:28:09 +08:00
rainzm
6000874b3c refactor(scheduler): make forcast result clearer
forcast 的返回值包括:
1. CanCreate: 是否可以创建
2. FilteredCandidate: 被过滤掉的candidate(宿主机),并记录了
   过滤其的 filter 的名字以及给出的原因。
3. ReqCount: 请求的机器数量
4. AllowCount: 允许的机器数量
5. NotAllowReasons: 不允许的原因,每一个不被允许的都会被列出原因。
2020-09-08 14:28:09 +08:00
rainzm
89980b6267 Add mock test for genericScheudler.Schedule 2020-09-08 14:28:09 +08:00
rainzm
d086161a68 feat: Add method 'Sku' to CandidatePropertyGetter 2020-09-08 14:28:09 +08:00
rainzm
39fed764fe feat: Add IResultHelper
1. Adjust the package structure about pkg/scheduler/core and
pkg/scheduler/manager

2. Add IResultHelper

3. Change the signature of genericScheduler.Schedule
func (*Unit, []Candidater) (*SchedResultItemList, error) ==>
func (*Unit, []Candidater, IResultHelper) (*ScheduleResult, error)
2020-09-08 14:28:09 +08:00
yunion-ci-robot
426699ada9 Merge pull request #7819 from wanyaoqi/automated-cherry-pick-of-#7810-upstream-release-3.4
Automated cherry pick of #7810: fix host error output
2020-09-08 10:03:18 +08:00
yunion-ci-robot
82d297eb77 Merge pull request #7809 from swordqiu/automated-cherry-pick-of-#7808-upstream-release-3.4
Automated cherry pick of #7808: fix: check assign-host previliges
2020-09-08 10:01:56 +08:00
yunion-ci-robot
92ecdb5f8d Merge pull request #7818 from wanyaoqi/automated-cherry-pick-of-#7817-upstream-release-3.4
Automated cherry pick of #7817: isolated devices info reenterable
2020-09-08 09:59:54 +08:00
wanyaoqi
ada6c870d8 fix host error output 2020-09-07 21:08:13 +08:00
yunion-ci-robot
86dd4804a3 Merge pull request #7816 from rainzm/automated-cherry-pick-of-#7807-upstream-release-3.4
Automated cherry pick of #7807: fix(notify): break down permissions of notifyconfigs
2020-09-07 21:06:03 +08:00
yunion-ci-robot
cecaa127ea Merge pull request #7805 from yousong/automated-cherry-pick-of-#7804-upstream-release-3.4
Automated cherry pick of #7804: vpcagent: guard against foul eip records
2020-09-07 21:05:46 +08:00
yunion-ci-robot
4d68b5fb61 Merge pull request #7797 from ioito/automated-cherry-pick-of-#7796-upstream-release-3.4
Automated cherry pick of #7796: fix: sync groups for user
2020-09-07 21:03:50 +08:00
yunion-ci-robot
8a329b2b29 Merge pull request #7790 from wanyaoqi/automated-cherry-pick-of-#7789-upstream-release-3.4
Automated cherry pick of #7789: fix get ubuntu version
2020-09-07 21:01:53 +08:00
yunion-ci-robot
c50659a1e4 Merge pull request #7815 from yousong/automated-cherry-pick-of-#7814-upstream-release-3.4
Automated cherry pick of #7814: httperrors: add Error type
2020-09-07 20:59:46 +08:00
yunion-ci-robot
a30df54cb9 Merge pull request #7799 from wanyaoqi/automated-cherry-pick-of-#7798-upstream-release-3.4
Automated cherry pick of #7798: guest short desc add backup host id
2020-09-07 20:57:45 +08:00
yunion-ci-robot
b192e949de Merge pull request #7813 from swordqiu/automated-cherry-pick-of-#7811-upstream-release-3.4
Automated cherry pick of #7811: fix: prevent users in disabled idp from login
2020-09-07 20:55:43 +08:00
yunion-ci-robot
a33a21f712 Merge pull request #7794 from ioito/automated-cherry-pick-of-#7793-upstream-release-3.4
Automated cherry pick of #7793: fix: aliyun wulanchabu region
2020-09-07 20:55:14 +08:00
wanyaoqi
78f9db1ba0 isolated devices info reenterable 2020-09-07 20:46:26 +08:00
rainzm
72276d038d fix(notify): break down permissions of notifyconfigs
1. Only allow admin to create, list, update or delete.
2. Allow user to get types.
2020-09-07 18:56:59 +08:00
Yousong Zhou
f1995a46d8 treewide: DeleteFailReason as an object with translated details 2020-09-07 18:53:07 +08:00
Yousong Zhou
918dce80e8 httperrors: HTTPError: use Error type 2020-09-07 18:53:07 +08:00
Yousong Zhou
12899ab007 httperrors: add Error type 2020-09-07 18:53:07 +08:00
Qiu Jian
e758c4aa97 fix: prevent users in disabled idp from login 2020-09-07 18:25:39 +08:00
Qiu Jian
623c71b143 fix: check assign-host previliges 2020-09-07 18:15:03 +08:00
Yousong Zhou
f0faf07b61 vpcagent: guard against foul eip records 2020-09-07 17:27:12 +08:00
wanyaoqi
8c4941ea70 guest short desc add backup host id 2020-09-07 17:05:34 +08:00
Qu Xuan
4cd73c16ca fix: sync groups for user 2020-09-07 16:35:47 +08:00
Qu Xuan
0a79d1d23e fix: aliyun wulanchabu region 2020-09-07 16:10:37 +08:00
wanyaoqi
d22676906c fix get ubuntu version 2020-09-07 15:40:33 +08:00
yunion-ci-robot
74b3bf2c6a Merge pull request #7787 from rainzm/automated-cherry-pick-of-#7786-upstream-release-3.4
Automated cherry pick of #7786: fix(scheduler): fix array out of bounds when sorting hosts
2020-09-07 15:31:43 +08:00
yunion-ci-robot
c94a90398e Merge pull request #7783 from rainzm/automated-cherry-pick-of-#7782-upstream-release-3.4
Automated cherry pick of #7782: fix(notify): Replace String() with GetString()
2020-09-07 15:28:41 +08:00
yunion-ci-robot
b57bbc66c7 Merge pull request #7781 from swordqiu/automated-cherry-pick-of-#7780-upstream-release-3.4
Automated cherry pick of #7780: fix: user idps attributes includes template name
2020-09-07 15:24:41 +08:00
rainzm
4f9c37239e fix(scheduler): fix array out of bounds when sorting hosts 2020-09-07 15:18:51 +08:00
rainzm
8524fda7f8 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:10:54 +08:00
Qiu Jian
bfa4ce38e0 fix: user idps attributes includes template name 2020-09-07 13:01:23 +08:00
yunion-ci-robot
70d790187e Merge pull request #7778 from ioito/automated-cherry-pick-of-#7729-upstream-release-3.4
Automated cherry pick of #7729: optimized cachedimages sync
2020-09-07 11:08:42 +08:00
Qu Xuan
7095ea8f8b optimized cachedimages sync 2020-09-07 10:16:33 +08:00
yunion-ci-robot
4edff8ae34 Merge pull request #7770 from swordqiu/automated-cherry-pick-of-#7769-upstream-release-3.4
Automated cherry pick of #7769: fix: network address list respect privilige of user
2020-09-05 15:50:42 +08:00
yunion-ci-robot
fd750e0a9c Merge pull request #7773 from swordqiu/automated-cherry-pick-of-#7772-upstream-release-3.4
Automated cherry pick of #7772: fix: skup syncing lb, rds, redis instances in tasks
2020-09-05 15:48:43 +08:00
Zexi Li
f0ae739747 Merge pull request #7777 from zexi/automated-cherry-pick-of-#7776-upstream-release-3.4
Automated cherry pick of #7776: climc: k8s cluster grafana componet support subpath
2020-09-05 15:37:48 +08:00
Zexi Li
7f5124bdf2 climc: k8s cluster grafana componet support subpath 2020-09-05 14:47:04 +08:00
Qiu Jian
c5c2b4b699 fix: skup syncing lb, rds, redis instances in tasks 2020-09-05 14:30:07 +08:00
Qiu Jian
29edf83293 fix: network address list respect privilige of user 2020-09-05 12:01:01 +08:00
yunion-ci-robot
1c3bbb70a3 Merge pull request #7768 from ioito/automated-cherry-pick-of-#7767-upstream-release-3.4
Automated cherry pick of #7767: fix: cloudid optimized
2020-09-05 10:32:46 +08:00
Qu Xuan
390d6f07e1 fix: cloudid optimized 2020-09-04 20:23:18 +08:00
yunion-ci-robot
41e2757973 Merge pull request #7766 from tb365/automated-cherry-pick-of-#7764-upstream-release-3.4
Automated cherry pick of #7764: pex register add optional column mac_access
2020-09-04 20:15:41 +08:00
yunion-ci-robot
a7160e7518 Merge pull request #7763 from ioito/automated-cherry-pick-of-#7739-upstream-release-3.4
Automated cherry pick of #7739: fix: valid update name and update dns recordset
2020-09-04 20:14:14 +08:00
yunion-ci-robot
01f07c6044 Merge pull request #7761 from swordqiu/automated-cherry-pick-of-#7760-upstream-release-3.4
Automated cherry pick of #7760: fix: scheduler aware policy
2020-09-04 16:20:40 +08:00
TangBin
24af17757d pex register add optional column mac_access 2020-09-04 15:57:38 +08:00
Qu Xuan
b4252c7c25 fix: valid update name and update dns recordset 2020-09-04 14:10:14 +08:00
Qiu Jian
4853883947 fix: scheduler aware policy 2020-09-04 11:10:36 +08:00
Zexi Li
82795f2daf Merge pull request #7752 from ioito/automated-cherry-pick-of-#7751-upstream-release-3.4
Automated cherry pick of #7751: fix: optimized cloudid
2020-09-04 10:33:20 +08:00
Zexi Li
cf056fe42a Merge pull request #7750 from rainzm/automated-cherry-pick-of-#7748-upstream-release-3.4
Automated cherry pick of #7748: feat(esxi): correctly judge whether inet is nil
2020-09-04 10:32:32 +08:00
Zexi Li
1aa16871eb Merge pull request #7755 from swordqiu/automated-cherry-pick-of-#7740-upstream-release-3.4
Automated cherry pick of #7740: fix: find correct esxi host access ip
2020-09-04 10:31:54 +08:00
Zexi Li
4dfd459b14 Merge pull request #7758 from swordqiu/automated-cherry-pick-of-#7757-upstream-release-3.4
Automated cherry pick of #7757: fix: support VirtualDiskRawDiskMappingVer1BackingInfo
2020-09-04 10:31:17 +08:00
Zexi Li
3d1bce5f51 Merge pull request #7754 from swordqiu/automated-cherry-pick-of-#7753-upstream-release-3.4
Automated cherry pick of #7753: fix: remove redundant auth cookie in sso login
2020-09-04 10:30:47 +08:00
Zexi Li
5ff14eb618 Merge pull request #7745 from wanyaoqi/automated-cherry-pick-of-#7744-upstream-release-3.4
Automated cherry pick of #7744: glance: check min disk size on update
2020-09-04 10:29:49 +08:00
Zexi Li
57c0706d9e Merge pull request #7742 from swordqiu/automated-cherry-pick-of-#7741-upstream-release-3.4
Automated cherry pick of #7741: fix: search by chs projectname or domainname
2020-09-04 10:29:00 +08:00
Zexi Li
4dfa6f8b19 Merge pull request #7736 from rainzm/automated-cherry-pick-of-#7735-upstream-release-3.4
Automated cherry pick of #7735: fix(compute): return InputParameterError while ValidateCreateData
2020-09-04 10:27:46 +08:00
Qiu Jian
0619da6f14 fix: support VirtualDiskRawDiskMappingVer1BackingInfo 2020-09-04 00:15:14 +08:00
yunion-ci-robot
f62912dd5b Merge pull request #7734 from rainzm/automated-cherry-pick-of-#7733-upstream-release-3.4
Automated cherry pick of #7733: Feature & Fix for Notify
2020-09-04 00:03:42 +08:00
Qiu Jian
29a3db9ff6 fix: find correct esxi host access ip 2020-09-03 23:56:30 +08:00
Qiu Jian
c50497090e fix: remove redundant auth cookie in sso login 2020-09-03 23:54:15 +08:00
yunion-ci-robot
47f5f9edc1 Merge pull request #7731 from swordqiu/automated-cherry-pick-of-#7730-upstream-release-3.4
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
ff52e00448 feat(notify): Allow use topic to filter notification 2020-09-03 21:25:05 +08:00
rainzm
7c6e053a08 feat(notify): Add TNotifyChannel const of robot 2020-09-03 21:25:05 +08:00
rainzm
8c6fdd1106 feat(notify): replace VerifiedContactTypes with VerifiedInfos in ReceiverDetails
VerifiedInfos will provide Note to display.
2020-09-03 21:25:05 +08:00
rainzm
beee6e2c9f feat(notify): Support trigger-verify for feishu, dingtalk and workwx 2020-09-03 21:25:04 +08:00
rainzm
60412cf7e8 feat(notify): Add VerifiedNote for SSubContact
VerifiedNote will be 'ok' if SSubContact verified successfully.
Otherwise, there will be there value for VerifiedNote:
1. no such mobile: mobile is not exist, change and try again.
2. incomplete config: tell admin to improve the configuration.
3. service exceptions: try again or connect to admin.
2020-09-03 21:25:04 +08:00
rainzm
90b84e995b feat(notify): break down error from UseridByMobile 2020-09-03 21:25:04 +08:00
rainzm
851b2d4bb7 fix(notify): Set default priority 'normal' when creating notification 2020-09-03 21:25:04 +08:00
rainzm
ab02e166e9 fix(notify): Mark verified not enabled in MarkContactTypeVerified 2020-09-03 21:25:04 +08:00
rainzm
10caff1d9c refactor(notify): hide SSunContact webconsole
Every receiver has webconsole type contact that is equal with
receiverid.
Now, make webconsole invisible, and it does exist.
2020-09-03 21:25:04 +08:00
rainzm
82b7e659ad fix(notify): Allow user list receivers 2020-09-03 21:25:04 +08:00
rainzm
9e1a7c5e12 fix(notify): use AfterSend for contact with succuessful sending 2020-09-03 21:25:04 +08:00
Qu Xuan
5cc25ae10a fix: optimzed sync 2020-09-03 21:18:30 +08:00
Qu Xuan
cfd76b23a3 fix: optimized cloudid 2020-09-03 21:18:30 +08:00
rainzm
65ca3ace74 feat(esxi): correctly judge whether inet is nil 2020-09-03 20:35:32 +08:00
wanyaoqi
00265fedda glance: check min disk size on update 2020-09-03 20:00:45 +08:00
Qiu Jian
976dbd7796 fix: search by chs projectname or domainname 2020-09-03 18:38:48 +08:00
rainzm
c050629ba2 fix(compute): return InputParameterError while ValidateCreateData 2020-09-03 15:24:03 +08:00
Qiu Jian
949e2ebed9 fix: compatiblity fixes with lenovo RD620 and huawei 2288 2020-09-03 11:50:00 +08:00
yunion-ci-robot
dc19a10323 Merge pull request #7728 from tb365/automated-cherry-pick-of-#7725-upstream-release-3.4
Automated cherry pick of #7725: create classic vpc fix
2020-09-03 10:32:41 +08:00
TangBin
612ad9286b create classic vpc fix 2020-09-02 18:26:16 +08:00
yunion-ci-robot
32bc9b45a1 Merge pull request #7721 from ioito/automated-cherry-pick-of-#7587-upstream-release-3.4
Automated cherry pick of #7587: feature: add dns interface
2020-09-02 18:00:06 +08:00
Qu Xuan
03456eaaa9 fix: avoid nil panic 2020-09-02 17:27:24 +08:00
Qu Xuan
d03fddcd7d fix: avoid policy value not save 2020-09-02 17:27:24 +08:00
Qu Xuan
893085a2c6 fix: climc params 2020-09-02 17:27:24 +08:00
Qu Xuan
a85a1aecd4 feature: add dns interface 2020-09-02 17:27:24 +08:00
yunion-ci-robot
c3d7168622 Merge pull request #7717 from zhaoxiangchun/automated-cherry-pick-of-#7716-upstream-release-3.4
Automated cherry pick of #7716: alert record bugfix
2020-09-02 16:33:42 +08:00
yunion-ci-robot
06c0ada74c Merge pull request #7719 from wanyaoqi/automated-cherry-pick-of-#7718-upstream-release-3.4
Automated cherry pick of #7718: vmware disk support deploy lvm partition
2020-09-02 16:31:45 +08:00
yunion-ci-robot
6e5f5b2ea3 Merge pull request #7723 from wanyaoqi/automated-cherry-pick-of-#7722-upstream-release-3.4
Automated cherry pick of #7722: update host status to unknown on host offline
2020-09-02 16:28:40 +08:00
Rain Zheng
eb9d794fab Automated cherry pick of #7714: Feature & Fix for Notify (#7715)
* feat(notify): Add 'get-types' action for ConfigManager

The List interface is only open to administrators,
because we don't want anyone other than administrators
to see the details of the notify configuration.
To let general user to kown available notification channels,
add 'get-types' actions of ConfigManager.

* feat(notify): Check the availability of contact type before creating notification

Creating notification with unconfigured contact type will fail at
sending message. Now, prevent creation in advance.

* feat(notify): Add workwx for NotifyNormal/Important/Critical

* feat(notify): Add Notify about robot in notifyclient

* fix(notify): Init ParentContactType for SSubContact

1. ParentContactType of SSubContact with webconsole type is empty.
2. ParentContactType of others SSubContact is mobile.

* fix(notify): Unverify SSubContact when ParentContactType match

* fix(notify): When no data is initialized, exit directly
2020-09-02 16:10:38 +08:00
wanyaoqi
20b949091e update host status to unknown on host offline 2020-09-02 13:09:24 +08:00
wanyaoqi
43ce3b5455 vmware disk support deploy lvm partition 2020-09-01 21:15:22 +08:00
zhaoxiangchun
d95e64e593 listfilter by alert_id 2020-09-01 20:47:18 +08:00
zhaoxiangchun
06bd735f0b alert record bugfix
1.return details fix
2020-09-01 20:47:18 +08:00
wanyaoqi
607e3d8fdc hostinfo: try create network add is_on_premise (#7707) 2020-09-01 20:10:37 +08:00
屈轩
800dd26c60 fix: add details for account delete (#7703)
Co-authored-by: Qu Xuan <quxuan@yunionyun.com>
2020-09-01 20:09:47 +08:00
Yousong Zhou
77a5c1ff85 Automated cherry pick of #7712: httperrors: support setting lang with X-Yunion-Lang (#7713)
* httperrors: support setting lang with X-Yunion-Lang

* mcclient: session: set lang
2020-09-01 19:52:38 +08:00
Yousong Zhou
bde5e1b96a httperrors: use existing details if id is not present (#7711) 2020-09-01 18:32:37 +08:00
Zexi Li
82942006b6 Merge pull request #7665 from ioito/automated-cherry-pick-of-#7664-upstream-release-3.4
Automated cherry pick of #7664: fix: avoid delete aws iam user failed
2020-09-01 12:19:25 +08:00
Jian Qiu
836151eee3 fix: vmware esxi host detects vnic portgroup info (#7660)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2020-09-01 10:51:41 +08:00
Jian Qiu
0566e1dec7 fix: apigateway user info add is_local attribtue (#7695)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2020-09-01 10:49:36 +08:00
Rain Zheng
b03c8ce506 Automated cherry pick of #7692: feat(notify): Support update for notify config (#7693)
* feat(notify): Support update for notify config

* fix(notify): Be compatible with the email configuration

Email config key text changed:
mail.username => username
mail.password => password
mail.smtp.hostname => hostname
mail.smtp.hostport => hostport

* fix(notify): Give users permission to operate receiver

* fix(notify): Allow negative update for receiver

Now, input.Email and input.Mobile can be empty which means
that do not update the corresponding field.

* feat(notify): Support for triggering validation on feishu, dingtalk and worwx

Triggering validation on these contact types means repulling a Contact about them.

* feat(notify): Adds validity period for verify

Verification beyond the expiration date will fail.

* fix(notify): SQuery of scopedomain in FilterByOwner
2020-09-01 10:48:37 +08:00
Rain Zheng
c914dafa75 Automated cherry pick of #7661: fix(host-deployer): Exit correctly after mounting (#7672)
* 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
Zexi Li
6c30c1c789 Merge pull request #7681 from wanyaoqi/automated-cherry-pick-of-#7680-upstream-release-3.4
Automated cherry pick of #7680: snapshot list by guest
2020-09-01 10:47:14 +08:00
Zexi Li
adf8885a7a Merge pull request #7671 from zhaoxiangchun/automated-cherry-pick-of-#7667-upstream-release-3.4
Automated cherry pick of #7667: monitor commonalert bugfix
2020-09-01 10:46:24 +08:00
Jian Qiu
cca2267389 fix: server purge may fail (#7698)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2020-09-01 10:33:06 +08:00
Jian Qiu
538bc873a0 fix: http error limit request body length fix: http error limit request body length (#7700)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2020-09-01 10:18:36 +08:00
屈轩
9812864bce fix: 不限制openstack系统盘类型 (#7675)
Co-authored-by: Qu Xuan <quxuan@yunionyun.com>
2020-09-01 01:24:36 +08:00
wanyaoqi
4af4bcb963 fix host get guests (#7683) 2020-09-01 01:14:09 +08:00
wanyaoqi
b85fb98297 fix get storage capacity on init' (#7687) 2020-09-01 01:03:37 +08:00
Yousong Zhou
19ba4b9755 vpcagent: respect guest src check settings (#7678)
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:39:37 +08:00
wanyaoqi
438c1ced5f snapshot list by guest 2020-08-31 15:27:27 +08:00
zhaoxiangchun
be5bf11ebe commonalert bugfix 2020-08-31 10:28:23 +08:00
zhaoxiangchun
6cea2883ab 统一监控查询面板保存 2020-08-31 10:28:23 +08:00
Jian Qiu
5647a6842d fix: cleanup logic for nics of pending_deleted guests (#7669)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2020-08-31 09:33:35 +08:00
Zexi Li
fba76c6392 Merge pull request #7663 from wanyaoqi/automated-cherry-pick-of-#7662-upstream-release-3.4
Automated cherry pick of #7662: update host deployer base image version
2020-08-28 20:36:42 +08:00
Qu Xuan
6ed3a48333 fix: avoid delete aws iam user failed 2020-08-28 20:24:53 +08:00
wanyaoqi
53a6c40a8a update host deployer base image version 2020-08-28 20:19:15 +08:00
wanyaoqi
eee193165e baremetal colloct isolated devices info (#7658) 2020-08-28 12:10:34 +08:00
Zexi Li
5987b56297 Merge pull request #7652 from tb365/automated-cherry-pick-of-#7650-upstream-release-3.4
Automated cherry pick of #7650: eip & vpc manager match fix
2020-08-28 12:09:20 +08:00
wanyaoqi
8e83ab4768 fix mount fetcher fs (#7657) 2020-08-28 12:08:35 +08:00
wanyaoqi
b977641336 remove backup metadata on delete backup (#7654) 2020-08-28 12:01:37 +08:00
TangBin
132c583790 eip & vpc manager match fix 2020-08-28 10:20:24 +08:00
wanyaoqi
557240155d fix build baremetal agent image (#7647) 2020-08-27 11:02:34 +08:00
屈轩
3243e5a035 fix: aovid truncated data (#7644)
Co-authored-by: Qu Xuan <quxuan@yunionyun.com>
2020-08-26 21:45:34 +08:00
Jian Qiu
e3fe66e8eb fix: add keystone sync user debug info (#7639)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2020-08-26 18:42:37 +08:00
Jian Qiu
de80f17053 fix: turn off some default project policies (#7637)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2020-08-26 18:41:35 +08:00
屈轩
aef249ea8e fix: avoid openstack image-list failed (#7641)
Co-authored-by: Qu Xuan <quxuan@yunionyun.com>
2020-08-26 18:33:33 +08:00
1215 changed files with 96995 additions and 17033 deletions

View File

@@ -38,7 +38,7 @@ jobs:
command: |
targets="$(circleci tests glob "cmd/*" | grep -v cmd/host-image | circleci tests split)"
echo $targets | tr ' ' '\n'
make -j3 $targets
make -j2 $targets
ls -lh _output/bin/
- save_cache:
key: onecloud-build-cache-{{ checksum "go.mod" }}-{{ checksum "Makefile" }}

1
.gitignore vendored
View File

@@ -31,6 +31,7 @@ _output
/structargtest
.idea
.vscode
intellij.yaml
GPATH
GRTAGS
GTAGS

View File

@@ -9,7 +9,7 @@ BUILD_SCRIPT := $(ROOT_DIR)/build/build.sh
ifeq ($(ONECLOUD_CI_BUILD),)
GIT_COMMIT := $(shell git rev-parse --short HEAD)
GIT_BRANCH := $(shell git name-rev --name-only HEAD)
GIT_BRANCH := $(shell git branch -r --contains | head -1 | sed -E -e "s%(HEAD ->|origin|upstream)/?%%g" | xargs)
GIT_VERSION := $(shell git describe --always --tags --abbrev=14 $(GIT_COMMIT)^{commit})
GIT_TREE_STATE := $(shell s=`git status --porcelain 2>/dev/null`; if [ -z "$$s" ]; then echo "clean"; else echo "dirty"; fi)
BUILD_DATE := $(shell date -u +'%Y-%m-%dT%H:%M:%SZ')
@@ -314,7 +314,8 @@ VERSION ?= $(shell git describe --exact-match 2> /dev/null || \
git describe --match=$(git rev-parse --short=8 HEAD) --always --dirty --abbrev=8)
image:
TAG=$(VERSION) REGISTRY=$(REGISTRY) $(ROOT_DIR)/scripts/docker_push.sh $(filter-out $@,$(MAKECMDGOALS))
mkdir -p $(ROOT_DIR)/_output
DEBUG=$(DEBUG) ARCH=$(ARCH) TAG=$(VERSION) REGISTRY=$(REGISTRY) $(ROOT_DIR)/scripts/docker_push.sh $(filter-out $@,$(MAKECMDGOALS))
.PHONY: image

View File

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

View File

@@ -5,13 +5,16 @@ MAINTAINER "Yaoqi Wan <wanyaoqi@yunionyun.com>"
RUN mkdir -p /opt/yunion/bin
RUN apk update && \
apk add --no-cache ipmitool ethtool tzdata ca-certificates && \
apk add --no-cache ipmitool ethtool tzdata ca-certificates cdrkit coreutils && \
rm -rf /var/cache/apk/*
RUN cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
RUN mkdir -p /opt/cloud/yunion/baremetal
# udpate latest pci.ids
RUN wget -O /opt/cloud/yunion/baremetal/pci.ids http://pci-ids.ucw.cz/v2.2/pci.ids
# download baremetal-pxerom-*.x86_64.rpm and unpack rpm in current directory
COPY ./opt/cloud/yunion/baremetal/bootia32.efi /opt/cloud/yunion/baremetal
COPY ./opt/cloud/yunion/baremetal/bootx64.efi /opt/cloud/yunion/baremetal
@@ -27,13 +30,3 @@ COPY ./opt/cloud/yunion/baremetal/libutil.c32 /opt/cloud/yunion/baremetal
COPY ./opt/cloud/yunion/baremetal/lpxelinux.0 /opt/cloud/yunion/baremetal
COPY ./opt/cloud/yunion/baremetal/menu.c32 /opt/cloud/yunion/baremetal
COPY ./opt/cloud/yunion/baremetal/pxelinux.0 /opt/cloud/yunion/baremetal
# add mkisofs with bundles libraries
ADD ./mkisofs /bin/mkisofs
ADD ./.mkisofs.bin /bin/.mkisofs.bin
ADD ./bundles/mkisofs /bin/bundles/mkisofs
# use GNU timeout command replace busybox timeout command
RUN rm /usr/bin/timeout
ADD ./timeout /bin/timeout
ADD ./.timeout.bin /bin/.timeout.bin
ADD ./bundles/timeout /bin/bundles/timeout

View File

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

View File

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

View File

@@ -0,0 +1,3 @@
FROM registry.cn-beijing.aliyuncs.com/yunionio/yunion-rootfs:v1.0
ADD ./_output/bin/telegraf-raid-plugin /opt/yunion/bin/telegraf-raid-plugin

View File

@@ -7,7 +7,7 @@ COPY . /root/go/src/yunion.io/x/onecloud
WORKDIR /root/go/src/yunion.io/x/onecloud
RUN make cmd/esxi-agent
FROM FROM registry.cn-beijing.aliyuncs.com/yunionio/onecloud-base:v0.2
FROM registry.cn-beijing.aliyuncs.com/yunionio/onecloud-base:v0.2
MAINTAINER "Yaoqi Wan wanyaoqi@yunionyun.com"

View File

@@ -0,0 +1,9 @@
{{.title}}
策略名称: {{.name}}
触发时间: {{.start_time}}
报警级别: {{.level}}
触发条件: {{.description | unescaped}}
资源数量:{{len .matches}}
资源名称:{{.resource_name}}
详情地址: {{.web_url}}/commonalerts

View File

@@ -0,0 +1,138 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>{{.Title}}</title>
</head>
<style>
.title {
height: 40px;
line-height: 40px;
width: 960px;
background-color: #4da1ff;
color: #fff;
font-size: 16px;
text-align: center;
margin: 0 auto;
}
.table {
width: 960px;
margin: 0 auto;
padding: 10px 30px 0px 30px;
font-family:'微软雅黑',Helvetica,Arial,sans-serif;
font-size:14px;
background-color: #fbfbfb;
}
.tr-title {
height: 10px;
border-left: 5px solid #4da1ff;
margin-left: 10px;
padding: 3px 8px;
font-weight: bold;
}
.td {
width: 80px;
padding-left: 20px;
height: 35px;
font-weight: 400;
}
.link {
text-decoration: none;
color: #3591FF;
}
.thead-tr td {
border-left: 1px solid #d7d7d7;
border-top: 1px solid #d7d7d7;
height: 32px;
font-size: 14px;
background-color: #d7d7d7;
text-align: center;
}
.tbody-tr td {
border-left: 1px solid #d7d7d7;
border-top: 1px solid #d7d7d7;
height: 32px;
font-size: 14px;
font-weight: 400;
text-align: center;
}
.pb-3 {
padding-bottom: 30px;
}
.resouce-table {
width: 98%;
color: #717171;
border-right: 1px solid #d7d7d7;
border-bottom: 1px solid #d7d7d7;
}
</style>
<body>
<h3 class="title">报警提醒</h3>
<table border="0" cellspacing="0" cellpadding="0" class="table">
<tr><td colspan="4" class="tr-title">报警信息</td></tr>
<tr><td style="height: 10px;"></td></tr>
<tr>
<td class="td">报警策略:</td>
<td>{{.name}}</td>
</tr>
<tr>
<td class="td">报警级别:</td>
<td>{{.level}}</td>
</tr>
<tr>
<td class="td">报警时间:</td>
<td>{{.start_time}}</td>
</tr>
<tr>
<td class="td">策略详情:</td>
<td>{{.description}}</td>
</tr>
</table>
<table class="table" style="padding-top: 6px; padding-bottom: 10px;">
<tr>
<td style="padding-left: 20px; font-size: 14px;">若要查看详情信息,<a class="link" target="_blank" href="{{.web_url}}/commonalerts
">请登录平台进行查看</a></td>
</tr>
</table>
<table border="0" cellspacing="0" cellpadding="0" class="table pb-3">
<tr><td colspan="4" class="tr-title">报警资源</td></tr>
<tr><td style="height: 10px;"></td></tr>
<tr>
<td colspan="4" style="padding: 10px 0 0 20px;">
<table cellspacing="0" cellpadding="0" class="resouce-table">
<thead>
<tr class="thead-tr">
<td>名称</td>
<td>IP</td>
<td>平台</td>
<td>触发值</td>
</tr>
</thead>
<tbody>
{{- range $i, $Matche := .matches}}
<tr class="tbody-tr">
<td>
{{- index .tags "name"}}
</td>
<td>
{{ index .tags "ip" }}
</td>
<td>
{{ index .tags "brand" }}
</td>
<td>{{$Matche.value_str}}</td>
</tr>
{{end}}
</tbody>
</table>
</td>
</tr>
<tr><td style="height: 10px;"></td></tr>
</table>
<p style="width: 960px; height: 40px; line-height: 40px; margin: 0 auto; background-color: #4da1ff; color: #fff; font-size: 12px; text-align: center; ">本邮件由系统自动发送,请勿直接回复!</p>
</body>
</html>

View File

@@ -0,0 +1,9 @@
{{.title}}
AlertName: {{.name}}
Time: {{.start_time}}
Level: {{.level}}
TriggerCondition: {{.description | unescaped}}
ResourceCount: {{len .matches}}
ResourceName: {{.resource_name}}
WebUrl: {{.web_url}}/commonalerts

View File

@@ -0,0 +1,145 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>{{.Title}}</title>
</head>
<style>
.title {
height: 40px;
line-height: 40px;
width: 960px;
background-color: #4da1ff;
color: #fff;
font-size: 16px;
text-align: center;
margin: 0 auto;
}
.table {
width: 960px;
margin: 0 auto;
padding: 10px 30px 0px 30px;
font-family:'微软雅黑',Helvetica,Arial,sans-serif;
font-size:14px;
background-color: #fbfbfb;
}
.tr-title {
height: 10px;
border-left: 5px solid #4da1ff;
margin-left: 10px;
padding: 3px 8px;
font-weight: bold;
}
.td {
width: 80px;
padding-left: 20px;
height: 35px;
font-weight: 400;
}
.link {
text-decoration: none;
color: #3591FF;
}
.thead-tr td {
border-left: 1px solid #d7d7d7;
border-top: 1px solid #d7d7d7;
height: 32px;
font-size: 14px;
background-color: #d7d7d7;
text-align: center;
}
.tbody-tr td {
border-left: 1px solid #d7d7d7;
border-top: 1px solid #d7d7d7;
height: 32px;
font-size: 14px;
font-weight: 400;
text-align: center;
}
.pb-3 {
padding-bottom: 30px;
}
.resouce-table {
width: 98%;
color: #717171;
border-right: 1px solid #d7d7d7;
border-bottom: 1px solid #d7d7d7;
}
</style>
<body>
<h3 class="title">Alert</h3>
<table border="0" cellspacing="0" cellpadding="0" class="table">
<tr><td colspan="4" class="tr-title">Alert info</td></tr>
<tr><td style="height: 10px;"></td></tr>
<tr>
<td class="td">Alarm strategy</td>
<td>{{.name}}</td>
</tr>
<tr>
<td class="td">Alarm level</td>
<td>{{.level}}</td>
</tr>
<tr>
<td class="td">Alarm time</td>
<td>{{.start_time}}</td>
</tr>
<tr>
<td class="td">Strategy details</td>
<td>{{.description}}</td>
</tr>
</table>
<table class="table" style="padding-top: 6px; padding-bottom: 10px;">
<tr>
<td style="padding-left: 20px; font-size: 14px;">To view details<a class="link" target="_blank" href="{{.web_url}}/commonalerts
">Please log in to the platform to view</a></td>
</tr>
</table>
<table border="0" cellspacing="0" cellpadding="0" class="table pb-3">
<tr><td colspan="4" class="tr-title">Alarm resources</td></tr>
<tr><td style="height: 10px;"></td></tr>
<tr>
<td colspan="4" style="padding: 10px 0 0 20px;">
<table cellspacing="0" cellpadding="0" class="resouce-table">
<thead>
<tr class="thead-tr">
<td>Name</td>
<td>IP</td>
<td>Brand</td>
<td>Trigger value</td>
</tr>
</thead>
<tbody>
{{- range $i, $Matche := .matches}}
<tr class="tbody-tr">
<td>
{{- index .tags "name"}}
</td>
<td>
{{ index .tags "ip" }}
</td>
<td>
{{ index .tags "brand" }}
</td>
<td>{{$Matche.value_str}}</td>
</tr>
{{end}}
</tbody>
</table>
</td>
</tr>
<tr><td style="height: 10px;"></td></tr>
</table>
<p style="width: 960px; height: 40px; line-height: 40px; margin: 0 auto; background-color: #4da1ff; color: #fff; font-size: 12px; text-align: center; ">This email is sent automatically by the system. Please do not reply directly</p>
</body>
</html>

View File

@@ -0,0 +1 @@
{{.title}}

View File

@@ -0,0 +1 @@
{{.title}}

View File

@@ -1 +1 @@
Yunion Verify
{{.copyright}} Verify

View File

@@ -1 +0,0 @@
您的{{ .brand }}主机{{ .name }}的套餐类型已经更改为 CPU:{{ index .flavor_info "cpu" }}核,内存:{{ index .flavor_info "memory" }}M数据盘:{{ index .flavor_info "datadisk" }}G带宽: {{ index .flavor_info "ebw" }}M。

View File

@@ -1 +0,0 @@
您的{{ .brand }}主机{{ .name }}已经创建成功服务器IP地址为{{ .ips }}{{ if .account }}初始帐号为{{ .account }}{{ end }}{{ if .keypair }}访问ssh密钥为{{ .keypair }}{{ end }}{{ if .password }}初始密码为{{ .password }}{{ end }}请使用{{ if .windows }}远程桌面连接器(RDC){{ else }}SSH{{ end }}或控制面板控制台访问云主机。

View File

@@ -1 +0,0 @@
项目{{ .tenant }}的{{ .brand }}主机{{ .name }}已经创建成功。

View File

@@ -1 +0,0 @@
您的{{ .brand }}主机{{ .name }}已经删除。

View File

@@ -1 +0,0 @@
项目{{ .tenant }}的{{ .brand }}主机{{ .name }}已经删除。

View File

@@ -1 +0,0 @@
您的{{ .brand }}主机{{ .name }}系统崩溃了: {{ .reason }}

View File

@@ -1 +0,0 @@
您的{{ .brand }}主机{{ .name }}重装系统成功,{{ if .account }}初始帐号为{{ .account }}{{ end }}{{ if .keypair }}访问密钥为{{ .keypair }}{{ end }}{{ if .password }}初始密码为{{ .password }}{{ end }}请使用{{ if .windows }}远程桌面连接器(RDC){{ else }}SSH{{ end }}或控制面板控制台访问云主机。

View File

@@ -0,0 +1 @@
您的{{ .brand }}虚拟机{{ .name }}的套餐类型已经更改为 CPU:{{ index .flavor_info "cpu" }}核,内存:{{ index .flavor_info "memory" }}M数据盘:{{ index .flavor_info "datadisk" }}G带宽: {{ index .flavor_info "ebw" }}M。

View File

@@ -0,0 +1 @@
您的{{ .brand }}虚拟机{{ .name }}已经创建成功虚拟机IP地址为{{ .ips }}{{ if .account }}初始帐号为{{ .account }}{{ end }}{{ if .keypair }}访问ssh密钥为{{ .keypair }}{{ end }}{{ if .password }}初始密码为{{ .password }}{{ end }}请使用{{ if .windows }}远程桌面连接器(RDC){{ else }}SSH{{ end }}或控制面板控制台访问虚拟机。

View File

@@ -0,0 +1 @@
项目{{ .tenant }}的{{ .brand }}虚拟机{{ .name }}已经创建成功。

View File

@@ -0,0 +1 @@
您的{{ .brand }}虚拟机{{ .name }}已经删除。

View File

@@ -0,0 +1 @@
项目{{ .tenant }}的{{ .brand }}虚拟机{{ .name }}已经删除。

View File

@@ -0,0 +1 @@
您的{{ .brand }}虚拟机{{ .name }}系统崩溃了: {{ .reason }}

View File

@@ -0,0 +1 @@
您的{{ .brand }}虚拟机{{ .name }}重装系统成功,{{ if .account }}初始帐号为{{ .account }}{{ end }}{{ if .keypair }}访问密钥为{{ .keypair }}{{ end }}{{ if .password }}初始密码为{{ .password }}{{ end }}请使用{{ if .windows }}远程桌面连接器(RDC){{ else }}SSH{{ end }}或控制面板控制台访问虚拟机。

View File

@@ -0,0 +1 @@
The instance type of your {{ .brand }} virtual machine {{ .name }} has been changed to: {{ index .flavor_info "cpu" }}-core CPU, {{ index .flavor_info "memory" }}M memory, {{ index .flavor_info "datadisk" }}G data disk, {{ index .flavor_info "ebw" }}M bandwidth.

View File

@@ -0,0 +1 @@
Your {{ .brand }} virtual machine {{ .name }} has been created successfully. The VM's IP address is {{ .ips }}, {{ if .account }}initial account is {{ .account }}, {{ end }}{{ if .keypair }}the access ssh key is {{ .keypair }}, {{ end }}{{ if .password }}the initial password is {{ .password }}, {{ end }}and please use {{ if .windows }}Remote Desktop Connector (RDC){{ else }}SSH{{ end }} or the control panel console to access the VM.

View File

@@ -0,0 +1 @@
The {{ .brand }} virtual machine {{ .name }} of the project {{ .tenant }} has been created successfully.

View File

@@ -0,0 +1 @@
Your {{ .brand }} virtual machine {{ .name }} has been deleted.

View File

@@ -0,0 +1 @@
The {{ .brand }} virtual machine {{ .name }} of the project {{ .tenant }} has been deleted.

View File

@@ -0,0 +1 @@
Your {{ .brand }} virtual machine {{ .name }} system crashed: {{ .reason }}

View File

@@ -0,0 +1 @@
Your {{ .brand }} virtual machine {{ .name }} is successfully reinstalled. The VM's {{ if .account }}initial account is {{ .account }}, {{ end }}{{ if .keypair }}the access key is {{ .keypair }}, {{ end }}{{ if .password }}the initial password is {{ .password }}, {{ end }}and please use {{ if .windows }}remote desktop connection (RDC){{ else }}SSH{{ end }} or the control panel console to access the virtual machine.

View File

@@ -0,0 +1,6 @@
System error message
Resource: {{ .name}}
Resource ID: {{ .id }}
Event: {{ .event }}
Reason: {{ .reason }}
Time: {{ .created }}

View File

@@ -0,0 +1,6 @@
System warning message
Resource: {{ .name}}
Resource ID: {{ .id }}
Event: {{ .event }}
Reason: {{ .reason }}
Time: {{ .created }}

View File

@@ -1 +0,0 @@
您的{{ .brand }}主机{{ .name }}的套餐类型已经更改为 CPU:{{ index .flavor_info "cpu" }}核,内存:{{ index .flavor_info "memory" }}M数据盘:{{ index .flavor_info "datadisk" }}G带宽: {{ index .flavor_info "ebw" }}M。

View File

@@ -1 +0,0 @@
{{ .brand }}主机{{ .Name }}创建成功

View File

@@ -1 +0,0 @@
项目{{ .tenant }}的{{ .brand }}主机{{ .name }}已经创建成功

View File

@@ -1 +0,0 @@
{{ .brand }}主机{{ .name }}删除通知

View File

@@ -1 +0,0 @@
项目{{ .tenant }}的{{ .brand }}主机{{ .name }}已经删除

View File

@@ -1 +0,0 @@
您的{{ .brand }}主机{{ .name }}系统崩溃了

View File

@@ -1 +0,0 @@
{{ .brand }}主机{{ .name }}重装系统成功

View File

@@ -0,0 +1 @@
您的{{ .brand }}虚拟机{{ .name }}的套餐类型已经更改为 CPU:{{ index .flavor_info "cpu" }}核,内存:{{ index .flavor_info "memory" }}M数据盘:{{ index .flavor_info "datadisk" }}G带宽: {{ index .flavor_info "ebw" }}M。

View File

@@ -0,0 +1 @@
{{ .brand }}虚拟机{{ .Name }}创建成功

View File

@@ -0,0 +1 @@
项目{{ .tenant }}的{{ .brand }}虚拟机{{ .name }}已经创建成功

View File

@@ -0,0 +1 @@
{{ .brand }}虚拟机{{ .name }}删除通知

View File

@@ -0,0 +1 @@
项目{{ .tenant }}的{{ .brand }}虚拟机{{ .name }}已经删除

View File

@@ -0,0 +1 @@
您的{{ .brand }}虚拟机{{ .name }}系统崩溃了

View File

@@ -0,0 +1 @@
{{ .brand }}虚拟机{{ .name }}重装系统成功

View File

@@ -0,0 +1 @@
The instance type of your {{ .brand }} virtual machine {{ .name }} has been changed to: {{ index .flavor_info "cpu" }}-core CPU, {{ index .flavor_info "memory" }}M memory, {{ index .flavor_info "datadisk" }}G data disk, {{ index .flavor_info "ebw" }}M bandwidth

View File

@@ -0,0 +1 @@
The {{ .brand }} virtual machine {{ .Name }} created successfully

View File

@@ -0,0 +1 @@
The {{ .brand }} virtual machine {{ .name }} of the project {{ .tenant }} has been created successfully

View File

@@ -0,0 +1 @@
The {{ .brand }} virtual machine {{ .name }} has been deleted

View File

@@ -0,0 +1 @@
The {{ .brand }} virtual machine {{ .name }} of the project {{ .tenant }} has been deleted

View File

@@ -0,0 +1 @@
Your {{ .brand }} virtual machine {{ .name }} system crashed

View File

@@ -0,0 +1 @@
The {{ .brand }} virtual machine {{ .name }} successfully reinstalled the system

View File

@@ -0,0 +1 @@
System error message {{ .name }} {{ .event }}

View File

@@ -0,0 +1 @@
System warning message {{ .name }} {{ .event }}

View File

@@ -28,6 +28,7 @@ import (
type BaseOptions struct {
Debug bool `help:"debug mode"`
Help bool `help:"Show help"`
CloudEnv string `help:"Cloud environment" default:"$ALIYUN_CLOUD_ENV" choices:"InternationalCloud|FinanceCloud" metavar:"ALIYUN_CLOUD_ENV"`
AccessKey string `help:"Access key" default:"$ALIYUN_ACCESS_KEY" metavar:"ALIYUN_ACCESS_KEY"`
Secret string `help:"Secret" default:"$ALIYUN_SECRET" metavar:"ALIYUN_SECRET"`
RegionId string `help:"RegionId" default:"$ALIYUN_REGION" metavar:"ALIYUN_REGION"`
@@ -86,7 +87,9 @@ func newClient(options *BaseOptions) (*aliyun.SRegion, error) {
cli, err := aliyun.NewAliyunClient(
aliyun.NewAliyunClientConfig(
options.AccessKey, options.Secret,
options.CloudEnv,
options.AccessKey,
options.Secret,
).Debug(options.Debug),
)
if err != nil {

View File

@@ -32,6 +32,7 @@ func init() {
cmd.Perform("attach-policy", &options.ClouduserPolicyOptions{})
cmd.Perform("detach-policy", &options.ClouduserPolicyOptions{})
cmd.Perform("change-owner", &options.ClouduserChangeOwnerOptions{})
cmd.Perform("reset-password", &options.ClouduserResetPasswordOptions{})
cmd.Perform("cloud-user-join-group", &options.ClouduserGroupOptions{})
cmd.Perform("cloud-user-leave-group", &options.ClouduserGroupOptions{})
}

View File

@@ -27,6 +27,9 @@ func init() {
Region string `help:"show images cached at cloud region"`
Zone string `help:"show images cached at zone"`
HostSchedtagId string `help:"filter cached image with host schedtag"`
Valid *bool `help:"valid cachedimage"`
}
R(&CachedImageListOptions{}, "cached-image-list", "List cached images", func(s *mcclient.ClientSession, args *CachedImageListOptions) error {
params, err := options.ListStructToParams(args)

View File

@@ -35,6 +35,8 @@ func init() {
NoObjectStorage bool `help:"filter cloudproviders that has no object storage"`
Capability []string `help:"capability filter" choices:"project|compute|network|loadbalancer|objectstore|rds|cache|event"`
Cloudregion string `help:"filter cloudproviders by cloudregion"`
HostSchedtagId string `help:"filter by host schedtag"`
}
R(&CloudproviderListOptions{}, "cloud-provider-list", "List cloud providers", func(s *mcclient.ClientSession, args *CloudproviderListOptions) error {
var params *jsonutils.JSONDict
@@ -62,6 +64,10 @@ func init() {
if len(args.Cloudregion) > 0 {
params.Add(jsonutils.NewString(args.Cloudregion), "cloudregion")
}
if len(args.HostSchedtagId) > 0 {
params.Add(jsonutils.NewString(args.HostSchedtagId), "host_schedtag_id")
}
}
result, err := modules.Cloudproviders.List(s, params)
if err != nil {

View File

@@ -19,6 +19,7 @@ import (
"yunion.io/x/jsonutils"
"yunion.io/x/onecloud/cmd/climc/shell"
"yunion.io/x/onecloud/pkg/mcclient"
"yunion.io/x/onecloud/pkg/mcclient/modulebase"
"yunion.io/x/onecloud/pkg/mcclient/modules"
@@ -26,6 +27,23 @@ import (
)
func init() {
cmd := shell.NewResourceCmd(&modules.Cloudregions).WithKeyword("cloud-region")
cmd.PerformClass("sync-skus", &options.CloudregionSkuSyncOptions{})
R(&options.SkuTaskQueryOptions{}, "cloud-region-sync-task-show", "Show details of skus sync tasks", func(s *mcclient.ClientSession, args *options.SkuTaskQueryOptions) error {
params, err := args.Params()
if err != nil {
return err
}
result, err := modules.Cloudregions.Get(s, "sync-tasks", params)
if err != nil {
return err
}
printObject(result)
return nil
})
type CloudregionListOptions struct {
options.BaseListOptions

View File

@@ -15,12 +15,30 @@
package compute
import (
"yunion.io/x/onecloud/cmd/climc/shell"
"yunion.io/x/onecloud/pkg/mcclient"
"yunion.io/x/onecloud/pkg/mcclient/modules"
"yunion.io/x/onecloud/pkg/mcclient/options"
)
func init() {
cmd := shell.NewResourceCmd(&modules.DBInstanceSkus).WithKeyword("dbinstance-sku")
cmd.PerformClass("sync-skus", &options.SkuSyncOptions{})
R(&options.SkuTaskQueryOptions{}, "dbinstance-sku-sync-task-show", "Show details of skus sync tasks", func(s *mcclient.ClientSession, args *options.SkuTaskQueryOptions) error {
params, err := args.Params()
if err != nil {
return err
}
result, err := modules.DBInstanceSkus.Get(s, "sync-tasks", params)
if err != nil {
return err
}
printObject(result)
return nil
})
type DBInstanceSkuListOption struct {
options.BaseListOptions
Engine string
@@ -54,5 +72,4 @@ func init() {
printObject(result)
return nil
})
}

View File

@@ -0,0 +1,33 @@
// Copyright 2019 Yunion
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package compute
import (
"yunion.io/x/onecloud/cmd/climc/shell"
"yunion.io/x/onecloud/pkg/mcclient/modules"
"yunion.io/x/onecloud/pkg/mcclient/options"
)
func init() {
cmd := shell.NewResourceCmd(&modules.DnsRecordSets).WithKeyword("dns-recordset")
cmd.List(&options.DnsRecordSetListOptions{})
cmd.Create(&options.DnsRecordSetCreateOptions{})
cmd.Update(&options.DnsRecordSetUpdateOptions{})
cmd.Show(&options.DnsRecordSetIdOptions{})
cmd.Delete(&options.DnsRecordSetIdOptions{})
cmd.Perform("enable", &options.DnsRecordSetIdOptions{})
cmd.Perform("disable", &options.DnsRecordSetIdOptions{})
cmd.Perform("set-traffic-policies", &options.DnsRecordSetTrafficPolicyOptions{})
}

View File

@@ -0,0 +1,27 @@
// Copyright 2019 Yunion
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package compute
import (
"yunion.io/x/onecloud/cmd/climc/shell"
"yunion.io/x/onecloud/pkg/mcclient/modules"
"yunion.io/x/onecloud/pkg/mcclient/options"
)
func init() {
cmd := shell.NewResourceCmd(&modules.DnsTrafficPolicies).WithKeyword("dns-trafficpolicy")
cmd.List(&options.DnsTrafficPolicyListOptions{})
cmd.Create(&options.DnsTrafficPolicyCreateOptions{})
}

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 compute
import (
"yunion.io/x/onecloud/cmd/climc/shell"
"yunion.io/x/onecloud/pkg/mcclient/modules"
"yunion.io/x/onecloud/pkg/mcclient/options"
)
func init() {
cmd := shell.NewResourceCmd(&modules.DnsZones).WithKeyword("dns-zone")
cmd.List(&options.SDnsZoneListOptions{})
cmd.Show(&options.SDnsZoneIdOptions{})
cmd.ClassShow(&options.DnsZoneCapabilitiesOptions{})
cmd.Delete(&options.SDnsZoneIdOptions{})
cmd.Create(&options.DnsZoneCreateOptions{})
cmd.Perform("syncstatus", &options.SDnsZoneIdOptions{})
cmd.Perform("sync-recordsets", &options.SDnsZoneIdOptions{})
cmd.Perform("cache", &options.DnsZoneCacheOptions{})
cmd.Perform("uncache", &options.DnsZoneUncacheOptions{})
cmd.Perform("purge", &options.SDnsZoneIdOptions{})
cmd.Perform("add-vpcs", &options.DnsZoneAddVpcsOptions{})
cmd.Perform("remove-vpcs", &options.DnsZoneRemoveVpcsOptions{})
}

View File

@@ -0,0 +1,28 @@
// Copyright 2019 Yunion
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package compute
import (
"yunion.io/x/onecloud/cmd/climc/shell"
"yunion.io/x/onecloud/pkg/mcclient/modules"
"yunion.io/x/onecloud/pkg/mcclient/options"
)
func init() {
cmd := shell.NewResourceCmd(&modules.DnsZoneCaches).WithKeyword("dns-zone-cache")
cmd.List(&options.DnsZoneCacheListOptions{})
cmd.Show(&options.DnsZoneCacheIdOptions{})
cmd.Delete(&options.DnsZoneCacheIdOptions{})
}

View File

@@ -19,12 +19,30 @@ import (
"yunion.io/x/jsonutils"
"yunion.io/x/onecloud/cmd/climc/shell"
"yunion.io/x/onecloud/pkg/mcclient"
"yunion.io/x/onecloud/pkg/mcclient/modules"
"yunion.io/x/onecloud/pkg/mcclient/options"
)
func init() {
cmd := shell.NewResourceCmd(&modules.ElasticcacheSkus).WithKeyword("elastic-cache-sku")
cmd.PerformClass("sync-skus", &options.SkuSyncOptions{})
R(&options.SkuTaskQueryOptions{}, "elastic-cache-sku-sync-task-show", "Show details of skus sync tasks", func(s *mcclient.ClientSession, args *options.SkuTaskQueryOptions) error {
params, err := args.Params()
if err != nil {
return err
}
result, err := modules.ElasticcacheSkus.Get(s, "sync-tasks", params)
if err != nil {
return err
}
printObject(result)
return nil
})
R(&options.BaseListOptions{}, "elastic-cache-list", "List elastisc cache instance", func(s *mcclient.ClientSession, opts *options.BaseListOptions) error {
params, err := options.ListStructToParams(opts)
if err != nil {

View File

@@ -50,7 +50,7 @@ func init() {
Manager string `help:"cloud provider"`
Region string `help:"cloud region in which EIP is allocated"`
Bandwidth int `help:"Bandwidth in Mbps"`
Ip string `help:"IP address of the EIP"`
IpAddr string `help:"IP address of the EIP" json:"ip_addr"`
Network string `help:"Network of the EIP"`
ChargeType string `help:"bandwidth charge type" choices:"traffic|bandwidth"`
}
@@ -75,8 +75,8 @@ func init() {
params.Add(jsonutils.NewString(args.Network), "network")
}
if len(args.Ip) > 0 {
params.Add(jsonutils.NewString(args.Ip), "ip")
if len(args.IpAddr) > 0 {
params.Add(jsonutils.NewString(args.IpAddr), "ip_addr")
}
result, err := modules.Elasticips.Create(s, params)

View File

@@ -259,10 +259,10 @@ func init() {
params.Add(jsonutils.NewString(args.Desc), "description")
}
if args.CpuCommitBound > 0.0 {
params.Add(jsonutils.NewFloat(args.CpuCommitBound), "cpu_cmtbound")
params.Add(jsonutils.NewFloat64(args.CpuCommitBound), "cpu_cmtbound")
}
if args.MemoryCommitBound > 0.0 {
params.Add(jsonutils.NewFloat(args.MemoryCommitBound), "mem_cmtbound")
params.Add(jsonutils.NewFloat64(args.MemoryCommitBound), "mem_cmtbound")
}
if len(args.MemoryReserved) > 0 {
params.Add(jsonutils.NewString(args.MemoryReserved), "mem_reserved")
@@ -407,12 +407,14 @@ func init() {
})
type HostAddNetIfOptions struct {
ID string `help:"ID or Name of host"`
WIRE string `help:"ID or Name of wire to attach"`
MAC string `help:"Mac address of NIC"`
INDEX int64 `help:"nic index"`
Type string `help:"Nic type" choices:"admin|ipmi"`
IpAddr string `help:"IP address"`
ID string `help:"ID or Name of host"`
WIRE string `help:"ID or Name of wire to attach"`
MAC string `help:"Mac address of NIC"`
INDEX int64 `help:"nic index"`
Type string `help:"Nic type" choices:"admin|ipmi"`
IpAddr string `help:"IP address"`
Bridge string `help:"Bridge of hostwire"`
Interface string `help:"Interface name, eg:eth0, en0"`
}
R(&HostAddNetIfOptions{}, "host-add-netif", "Host add a NIC", func(s *mcclient.ClientSession, args *HostAddNetIfOptions) error {
params := jsonutils.NewDict()
@@ -426,6 +428,12 @@ func init() {
if len(args.IpAddr) > 0 {
params.Add(jsonutils.NewString(args.IpAddr), "ip_addr")
}
if len(args.Bridge) > 0 {
params.Add(jsonutils.NewString(args.Bridge), "bridge")
}
if len(args.Interface) > 0 {
params.Add(jsonutils.NewString(args.Interface), "interface")
}
result, err := modules.Hosts.PerformAction(s, args.ID, "add-netif", params)
if err != nil {
return err

View File

@@ -20,6 +20,7 @@ import (
"yunion.io/x/jsonutils"
"yunion.io/x/onecloud/cmd/climc/shell"
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"
@@ -203,15 +204,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

@@ -316,7 +316,7 @@ func init() {
QuotaSetBaseOptions
IdentityQuotaOptions
}
R(&IdentityQuotaSetOptions{}, "identity-quota-set", "Set identity quota for domain", func(s *mcclient.ClientSession, args *InfrasQuotaSetOptions) error {
R(&IdentityQuotaSetOptions{}, "identity-quota-set", "Set identity quota for domain", func(s *mcclient.ClientSession, args *IdentityQuotaSetOptions) error {
params := jsonutils.Marshal(args)
quotas, e := modules.IdentityQuotas.DoQuotaSet(s, params)
if e != nil {

View File

@@ -123,9 +123,10 @@ func init() {
})
type SchedulerHistoryListOptions struct {
Limit int `default:"50" help:"Page limit"`
Offset int `default:"0" help:"Page offset"`
All bool `help:"Show all histories, including scheduler-test"`
Limit int `default:"50" help:"Page limit"`
Offset int `default:"0" help:"Page offset"`
All bool `help:"Show all histories, including scheduler-test"`
IsSuggestion bool `help:"Only show forcast suggestion history"`
}
R(&SchedulerHistoryListOptions{}, "scheduler-history-list", "Show scheduler history list",
func(s *mcclient.ClientSession, args *SchedulerHistoryListOptions) error {
@@ -138,17 +139,14 @@ func init() {
if args.Offset > 0 {
params.Add(jsonutils.NewInt(int64(args.Offset)), "offset")
}
if args.All {
params.Add(jsonutils.JSONTrue, "all")
} else {
params.Add(jsonutils.JSONFalse, "all")
}
params.Add(jsonutils.NewBool(args.All), "all")
params.Add(jsonutils.NewBool(args.IsSuggestion), "is_suggestion")
result, err := modules.SchedManager.HistoryList(s, params)
if err != nil {
return err
}
printList(modulebase.JSON2ListResult(result), []string{
"session_id", "time", "status", "consuming",
"session_id", "time", "status", "consuming", "is_suggestion",
})
return nil
})

View File

@@ -15,194 +15,24 @@
package compute
import (
"fmt"
"yunion.io/x/jsonutils"
"yunion.io/x/onecloud/pkg/mcclient"
"yunion.io/x/onecloud/cmd/climc/shell"
"yunion.io/x/onecloud/pkg/mcclient/modules"
"yunion.io/x/onecloud/pkg/mcclient/options"
)
func init() {
type SecGroupsListOptions struct {
Equals string `help:"Secgroup ID or Name, filter secgroups whose rules equals the specified one"`
Server string `help:"Filter secgroups bound to specified server"`
options.BaseListOptions
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 {
params, err := options.ListStructToParams(args)
if err != nil {
return err
}
result, err := modules.SecGroups.List(s, params)
if err != nil {
return err
}
printList(result, modules.SecGroups.GetColumns(s))
return nil
})
type SecGroupsCreateOptions struct {
NAME string `help:"Name of security group to create"`
RULES []string `help:"security rule to create"`
Desc string `help:"Description"`
}
R(&SecGroupsCreateOptions{}, "secgroup-create", "Create a security group", func(s *mcclient.ClientSession, args *SecGroupsCreateOptions) error {
params := jsonutils.NewDict()
params.Add(jsonutils.NewString(args.NAME), "name")
if len(args.Desc) > 0 {
params.Add(jsonutils.NewString(args.Desc), "description")
}
for i, a := range args.RULES {
params.Add(jsonutils.NewString(a), fmt.Sprintf("rule.%d", i))
}
secgroups, err := modules.SecGroups.Create(s, params)
if err != nil {
return err
}
printObject(secgroups)
return nil
})
type SecGroupsUnionOptions struct {
ID string `help:"ID or Name of security group destination"`
SECGROUPS []string `help:"source IDs or Names of secgroup"`
}
R(&SecGroupsUnionOptions{}, "secgroup-union", "Union secgroups to one secgroup", func(s *mcclient.ClientSession, args *SecGroupsUnionOptions) error {
params := jsonutils.NewDict()
secgroups := jsonutils.NewArray()
for i := 0; i < len(args.SECGROUPS); i++ {
secgroups.Add(jsonutils.NewString(args.SECGROUPS[i]))
}
params.Add(secgroups, "secgroups")
secgroup, err := modules.SecGroups.PerformAction(s, args.ID, "union", params)
if err != nil {
return err
}
printObject(secgroup)
return nil
})
type SecGroupsDetailOptions struct {
ID string `help:"ID or Name of security group"`
}
R(&SecGroupsDetailOptions{}, "secgroup-show", "Show details of a security group", func(s *mcclient.ClientSession, args *SecGroupsDetailOptions) error {
result, err := modules.SecGroups.Get(s, args.ID, nil)
if err != nil {
return err
}
printObject(result)
return nil
})
R(&SecGroupsDetailOptions{}, "secgroup-delete", "Delete a security group", func(s *mcclient.ClientSession, args *SecGroupsDetailOptions) error {
secgroups, err := modules.SecGroups.Delete(s, args.ID, nil)
if err != nil {
return err
}
printObject(secgroups)
return nil
})
R(&SecGroupsDetailOptions{}, "secgroup-public", "Make a security group publicly available", func(s *mcclient.ClientSession, args *SecGroupsDetailOptions) error {
result, err := modules.SecGroups.PerformAction(s, args.ID, "public", nil)
if err != nil {
return err
}
printObject(result)
return nil
})
R(&SecGroupsDetailOptions{}, "secgroup-private", "Make a security group private", func(s *mcclient.ClientSession, args *SecGroupsDetailOptions) error {
result, err := modules.SecGroups.PerformAction(s, args.ID, "private", nil)
if err != nil {
return err
}
printObject(result)
return nil
})
type SecGroupsUpdateOptions struct {
ID string `help:"ID of security group"`
Name string `help:"Name of security group to update"`
Desc string `help:"Description of security groups"`
}
R(&SecGroupsUpdateOptions{}, "secgroup-update", "Update details of a security group", func(s *mcclient.ClientSession, args *SecGroupsUpdateOptions) error {
params := jsonutils.NewDict()
if len(args.Name) > 0 {
params.Add(jsonutils.NewString(args.Name), "name")
}
if len(args.Desc) > 0 {
params.Add(jsonutils.NewString(args.Desc), "description")
}
secgroups, err := modules.SecGroups.Update(s, args.ID, params)
if err != nil {
return err
}
printObject(secgroups)
return nil
})
type SecGroupsAddRuleOptions struct {
ID string `help:"ID or Name of security group"`
DIRECTION string `help:"Direction of rule" choices:"in|out"`
PROTOCOL string `help:"Protocol of rule" choices:"any|tcp|udp|icmp"`
ACTION string `help:"Actin of rule" choices:"allow|deny"`
PRIORITY int `help:"Priority for rule, range 1 ~ 100"`
Cidr string `help:"IP or CIRD for rule"`
Description string `help:"Desciption for rule"`
Ports string `help:"Port for rule"`
}
R(&SecGroupsAddRuleOptions{}, "secgroup-add-rule", "Add rule for a security group", func(s *mcclient.ClientSession, args *SecGroupsAddRuleOptions) error {
params, err := options.StructToParams(args)
secgroups, err := modules.SecGroups.PerformAction(s, args.ID, "add-rule", params)
if err != nil {
return err
}
printObject(secgroups)
return nil
})
type SecurityGroupCacheSecurityGroup struct {
ID string `help:"ID or Name of security group"`
VPC string `help:"ID or Name of vpc"`
Classic *bool `help:"Is classic vpc"`
}
R(&SecurityGroupCacheSecurityGroup{}, "secgroup-cache-secgroup", "Cache security group for special vpc", func(s *mcclient.ClientSession, args *SecurityGroupCacheSecurityGroup) error {
params, err := options.StructToParams(args)
secgroups, err := modules.SecGroups.PerformAction(s, args.ID, "cache-secgroup", params)
if err != nil {
return err
}
printObject(secgroups)
return nil
})
type SecurityGroupUncacheSecurityGroup struct {
ID string `help:"ID or Name of security group"`
CACHE string `help:"ID of secgroup cache"`
}
R(&SecurityGroupUncacheSecurityGroup{}, "secgroup-uncache-secgroup", "Unache special secgroup cache", func(s *mcclient.ClientSession, args *SecurityGroupUncacheSecurityGroup) error {
params := jsonutils.NewDict()
params.Add(jsonutils.NewString(args.CACHE), "secgroupcache")
secgroups, err := modules.SecGroups.PerformAction(s, args.ID, "uncache-secgroup", params)
if err != nil {
return err
}
printObject(secgroups)
return nil
})
cmd := shell.NewResourceCmd(&modules.SecGroups)
cmd.List(&options.SecgroupListOptions{})
cmd.Create(&options.SecgroupCreateOptions{})
cmd.Show(&options.SecgroupIdOptions{})
cmd.Update(&options.BaseUpdateOptions{})
cmd.Delete(&options.SecgroupIdOptions{})
cmd.Perform("merge", &options.SecgroupMergeOptions{})
cmd.Perform("public", &options.SecgroupIdOptions{})
cmd.Perform("private", &options.SecgroupIdOptions{})
cmd.Perform("add-rule", &options.SecgroupsAddRuleOptions{})
cmd.Perform("cache-secgroup", &options.SecurityGroupCacheOptions{})
cmd.Perform("uncache-secgroup", &options.SecurityGroupUncacheSecurityGroup{})
cmd.Perform("purge", &options.SecgroupIdOptions{})
cmd.Perform("change-owner", &options.SecgroupChangeOwnerOptions{})
}

View File

@@ -83,6 +83,7 @@ func init() {
cmd.Perform("publicip-to-eip", new(options.ServerPublicipToEip))
cmd.Perform("set-auto-renew", new(options.ServerSetAutoRenew))
cmd.Perform("save-template", new(options.ServerSaveImageOptions))
cmd.Perform("remote-update", new(options.ServerRemoteUpdateOptions))
cmd.Get("vnc", new(options.ServerIdOptions))
cmd.Get("desc", new(options.ServerIdOptions))

View File

@@ -17,12 +17,30 @@ package compute
import (
"yunion.io/x/jsonutils"
"yunion.io/x/onecloud/cmd/climc/shell"
"yunion.io/x/onecloud/pkg/mcclient"
"yunion.io/x/onecloud/pkg/mcclient/modules"
"yunion.io/x/onecloud/pkg/mcclient/options"
)
func init() {
cmd := shell.NewResourceCmd(&modules.ServerSkus).WithKeyword("server-sku")
cmd.PerformClass("sync-skus", &options.SkuSyncOptions{})
R(&options.SkuTaskQueryOptions{}, "server-sku-sync-task-show", "Show details of skus sync tasks", func(s *mcclient.ClientSession, args *options.SkuTaskQueryOptions) error {
params, err := args.Params()
if err != nil {
return err
}
result, err := modules.ServerSkus.Get(s, "sync-tasks", params)
if err != nil {
return err
}
printObject(result)
return nil
})
type ServerSkusListOptions struct {
options.BaseListOptions
Cloudregion string `help:"region Id or name"`

View File

@@ -31,6 +31,7 @@ func init() {
Local *bool `help:"Show local snapshots"`
Share *bool `help:"Show shared snapshots"`
DiskType string `help:"Filter by disk type" choices:"sys|data"`
Server string `help:"Filter by server" json:"server_id"`
}
R(&SnapshotsListOptions{}, "snapshot-list", "Show snapshots", func(s *mcclient.ClientSession, args *SnapshotsListOptions) error {
params, err := options.ListStructToParams(args)

View File

@@ -70,13 +70,15 @@ func init() {
type HostsQueryOptions struct {
options.BaseListOptions
HostType string `help:"Host type filter" choices:"baremetal|hypervisor|esxi|kubelet|hyperv"`
Ncpu int64 `help:"#CPU count of host" metavar:"<CPU_COUNT>"`
MemSize int64 `help:"Memory MB size"`
DiskSpec []string `help:"Disk spec string, like 'Linux_adapter0_HDD_111Gx4'"`
Nic int64 `help:"#Nics count of host" metavar:"<NIC_COUNT>"`
GpuModel []string `help:"GPU model, like 'GeForce GTX 1050 Ti'"`
Occupied bool `help:"show occupid host" json:"-"`
HostType string `help:"Host type filter" choices:"baremetal|hypervisor|esxi|kubelet|hyperv"`
Ncpu int64 `help:"#CPU count of host" metavar:"<CPU_COUNT>"`
MemSize int64 `help:"Memory MB size"`
DiskSpec []string `help:"Disk spec string, like 'Linux_adapter0_HDD_111Gx4'"`
Nic int64 `help:"#Nics count of host" metavar:"<NIC_COUNT>"`
GpuModel []string `help:"GPU model, like 'GeForce GTX 1050 Ti'"`
Occupied bool `help:"Show occupid host" json:"-"`
Manufacture string `help:"Manufacture of host"`
Model string `help:"Model of host"`
}
R(&HostsQueryOptions{}, "spec-hosts-list", "List hosts according by specs", func(s *mcclient.ClientSession, args *HostsQueryOptions) error {
newHostSpecKeys := func() []string {
@@ -90,6 +92,12 @@ func init() {
if args.Nic > 0 {
keys = append(keys, fmt.Sprintf("nic:%d", args.Nic))
}
if args.Manufacture != "" {
keys = append(keys, fmt.Sprintf("manufacture:%s", args.Manufacture))
}
if args.Model != "" {
keys = append(keys, fmt.Sprintf("model:%s", args.Model))
}
for _, gm := range args.GpuModel {
keys = append(keys, fmt.Sprintf("gpu_model:%s", gm))
}

View File

@@ -35,6 +35,9 @@ func init() {
Zone string `help:"List storages in zone" json:"-"`
Region string `help:"List storages in region"`
Schedtag string `help:"filter storage by schedtag"`
HostSchedtagId string `help:"filter storage by host schedtag"`
ImageId string `help:"filter storage by image"`
}
R(&StorageListOptions{}, "storage-list", "List storages", func(s *mcclient.ClientSession, opts *StorageListOptions) error {
params, err := options.ListStructToParams(opts)
@@ -58,13 +61,14 @@ func init() {
ID string `help:"ID or Name of storage to update"`
Name string `help:"New Name of storage"`
Desc string `help:"Description"`
CommitBound float64 `help:"Upper bound of storage overcommit rate"`
CommitBound float64 `help:"Upper bound of storage overcommit rate" json:"cmtbound"`
MediumType string `help:"Medium type" choices:"ssd|rotate"`
RbdRadosMonOpTimeout int64 `help:"ceph rados_mon_op_timeout"`
RbdRadosOsdOpTimeout int64 `help:"ceph rados_osd_op_timeout"`
RbdClientMountTimeout int64 `help:"ceph client_mount_timeout"`
RbdKey string `help:"ceph rbd key"`
Reserved string `help:"Reserved storage space"`
Capacity int `help:"Capacity for storage"`
}
R(&StorageUpdateOptions{}, "storage-update", "Update a storage", func(s *mcclient.ClientSession, args *StorageUpdateOptions) error {
params, err := options.StructToParams(args)

View File

@@ -15,235 +15,24 @@
package compute
import (
"fmt"
"yunion.io/x/jsonutils"
"yunion.io/x/onecloud/pkg/mcclient"
"yunion.io/x/onecloud/pkg/mcclient/modulebase"
"yunion.io/x/onecloud/cmd/climc/shell"
"yunion.io/x/onecloud/pkg/mcclient/modules"
"yunion.io/x/onecloud/pkg/mcclient/options"
)
func init() {
type VpcListOptions struct {
options.BaseListOptions
Usable *bool `help:"Filter usable vpcs"`
Region string `help:"ID or Name of region" json:"-"`
Globalvpc string `help:"Filter by globalvpc"`
ExternalAccessMode string `help:"Filter by external access mode" choices:"distgw|eip|eip-distgw"`
}
R(&VpcListOptions{}, "vpc-list", "List VPCs", func(s *mcclient.ClientSession, opts *VpcListOptions) error {
params, err := options.ListStructToParams(opts)
if err != nil {
return err
}
var result *modulebase.ListResult
if len(opts.Region) > 0 {
result, err = modules.Vpcs.ListInContext(s, params, &modules.Cloudregions, opts.Region)
} else {
result, err = modules.Vpcs.List(s, params)
}
if err != nil {
return err
}
if len(opts.ExportFile) > 0 {
exportList(result, opts.ExportFile, opts.ExportKeys, opts.ExportTexts, modules.Vpcs.GetColumns(s))
} else {
printList(result, modules.Vpcs.GetColumns(s))
}
return nil
})
type VpcCreateOptions struct {
REGION string `help:"ID or name of the region where the VPC is created"`
Id string `help:"ID of the new VPC"`
NAME string `help:"Name of the VPC"`
CIDR string `help:"CIDR block"`
Default bool `help:"default VPC for the region" default:"false"`
Desc string `help:"Description of the VPC"`
Manager string `help:"ID or Name of Cloud provider"`
ExternalAccessMode string `help:"Filter by external access mode" choices:"distgw|eip|eip-distgw" default:"eip-distgw"`
}
R(&VpcCreateOptions{}, "vpc-create", "Create a VPC", func(s *mcclient.ClientSession, args *VpcCreateOptions) error {
params := jsonutils.NewDict()
params.Add(jsonutils.NewString(args.NAME), "name")
params.Add(jsonutils.NewString(args.CIDR), "cidr_block")
if len(args.Id) > 0 {
params.Add(jsonutils.NewString(args.Id), "id")
}
if len(args.ExternalAccessMode) > 0 {
params.Add(jsonutils.NewString(args.ExternalAccessMode), "external_access_mode")
}
if len(args.Desc) > 0 {
params.Add(jsonutils.NewString(args.Desc), "description")
}
if args.Default {
params.Add(jsonutils.JSONTrue, "is_default")
}
if len(args.Manager) > 0 {
params.Add(jsonutils.NewString(args.Manager), "manager")
}
results, err := modules.Vpcs.CreateInContext(s, params, &modules.Cloudregions, args.REGION)
if err != nil {
return err
}
printObject(results)
return nil
})
type VpcShowOptions struct {
ID string `help:"ID or name of the region"`
}
R(&VpcShowOptions{}, "vpc-show", "Show a VPC", func(s *mcclient.ClientSession, args *VpcShowOptions) error {
results, err := modules.Vpcs.Get(s, args.ID, nil)
if err != nil {
return err
}
printObject(results)
return nil
})
R(&VpcShowOptions{}, "vpc-delete", "Delete a VPC", func(s *mcclient.ClientSession, args *VpcShowOptions) error {
results, err := modules.Vpcs.Delete(s, args.ID, nil)
if err != nil {
return err
}
printObject(results)
return nil
})
type VpcUpdateOptions struct {
ID string `help:"ID or name of the VPC"`
Name string `help:"New name of the VPC"`
Desc string `help:"Description of the VPC"`
ExternalAccessMode string `help:"Filter by external access mode" choices:"distgw|eip|eip-distgw"`
}
R(&VpcUpdateOptions{}, "vpc-update", "Update a VPC", func(s *mcclient.ClientSession, args *VpcUpdateOptions) error {
params := jsonutils.NewDict()
if len(args.Name) > 0 {
params.Add(jsonutils.NewString(args.Name), "name")
}
if len(args.ExternalAccessMode) > 0 {
params.Add(jsonutils.NewString(args.ExternalAccessMode), "external_access_mode")
}
if len(args.Desc) > 0 {
params.Add(jsonutils.NewString(args.Desc), "description")
}
results, err := modules.Vpcs.Update(s, args.ID, params)
if err != nil {
return err
}
printObject(results)
return nil
})
type VpcUpdateStatusOptions struct {
ID string `help:"ID or name of the VPC"`
}
R(&VpcUpdateStatusOptions{}, "vpc-available", "Make vpc status available", func(s *mcclient.ClientSession, args *VpcUpdateStatusOptions) error {
params := jsonutils.NewDict()
params.Add(jsonutils.NewString("available"), "status")
result, err := modules.Vpcs.PerformAction(s, args.ID, "status", params)
if err != nil {
return err
}
printObject(result)
return nil
})
R(&VpcUpdateStatusOptions{}, "vpc-pending", "Make vpc status pending", func(s *mcclient.ClientSession, args *VpcUpdateStatusOptions) error {
params := jsonutils.NewDict()
params.Add(jsonutils.NewString("pending"), "status")
result, err := modules.Vpcs.PerformAction(s, args.ID, "status", params)
if err != nil {
return err
}
printObject(result)
return nil
})
R(&VpcUpdateStatusOptions{}, "vpc-purge", "Purge a managed VPC, not delete the remote entity", func(s *mcclient.ClientSession, args *VpcUpdateStatusOptions) error {
result, err := modules.Vpcs.PerformAction(s, args.ID, "purge", nil)
if err != nil {
return err
}
printObject(result)
return nil
})
R(&VpcUpdateStatusOptions{}, "vpc-sync", "Synchronize the status of a vpc", func(s *mcclient.ClientSession, args *VpcUpdateStatusOptions) error {
result, err := modules.Vpcs.PerformAction(s, args.ID, "sync", nil)
if err != nil {
return err
}
printObject(result)
return nil
})
R(&VpcUpdateStatusOptions{}, "vpc-syncstatus", "Sync the status of a vpc", func(s *mcclient.ClientSession, args *VpcUpdateStatusOptions) error {
result, err := modules.Vpcs.PerformAction(s, args.ID, "syncstatus", nil)
if err != nil {
return err
}
printObject(result)
return nil
})
type VpcPublicOptions struct {
ID string `help:"ID or name of vpc" json:"-"`
Scope string `help:"sharing scope" choices:"system|domain"`
SharedDomains []string `help:"share to domains"`
}
R(&VpcPublicOptions{}, "vpc-public", "Make vpc public", func(s *mcclient.ClientSession, args *VpcPublicOptions) error {
params := jsonutils.Marshal(args)
result, err := modules.Vpcs.PerformAction(s, args.ID, "public", params)
if err != nil {
return err
}
printObject(result)
return nil
})
type VpcPrivateOptions struct {
ID string `help:"ID or name of vpc" json:"-"`
}
R(&VpcPrivateOptions{}, "vpc-private", "Make vpc private", func(s *mcclient.ClientSession, args *VpcPrivateOptions) error {
params := jsonutils.Marshal(args)
result, err := modules.Vpcs.PerformAction(s, args.ID, "private", params)
if err != nil {
return err
}
printObject(result)
return nil
})
R(&VpcShowOptions{}, "vpc-change-owner-candidate-domains", "Show candiate domains of a vpc for changing owner", func(s *mcclient.ClientSession, args *VpcShowOptions) error {
result, err := modules.Vpcs.GetSpecific(s, args.ID, "change-owner-candidate-domains", nil)
if err != nil {
return err
}
printObject(result)
return nil
})
type VpcChangeOwnerOptions struct {
ID string `help:"ID or name of vpc" json:"-"`
ProjectDomain string `json:"project_domain" help:"target domain"`
}
R(&VpcChangeOwnerOptions{}, "vpc-change-owner", "Change owner domain of vpc", func(s *mcclient.ClientSession, args *VpcChangeOwnerOptions) error {
if len(args.ProjectDomain) == 0 {
return fmt.Errorf("empty project_domain")
}
params := jsonutils.Marshal(args)
ret, err := modules.Vpcs.PerformAction(s, args.ID, "change-owner", params)
if err != nil {
return err
}
printObject(ret)
return nil
})
cmd := shell.NewResourceCmd(&modules.Vpcs).WithContextManager(&modules.Cloudregions)
cmd.List(&options.VpcListOptions{})
cmd.Create(&options.VpcCreateOptions{})
cmd.Show(&options.VpcIdOptions{})
cmd.Delete(&options.VpcIdOptions{})
cmd.Update(&options.VpcUpdateOptions{})
cmd.Perform("status", &options.VpcStatusOptions{})
cmd.Perform("purge", &options.VpcIdOptions{})
cmd.Perform("sync", &options.VpcIdOptions{})
cmd.Perform("syncstatus", &options.VpcIdOptions{})
cmd.Perform("private", &options.VpcIdOptions{})
cmd.Perform("public", &options.BasePublicOptions{})
cmd.Perform("change-owner", &options.VpcChangeOwnerOptions{})
cmd.Get("vpc-change-owner-candidate-domains", &options.VpcIdOptions{})
}

View File

@@ -42,34 +42,24 @@ func init() {
if err != nil {
return err
}
connParams, err := obj.GetString("connect_params")
if err != nil {
resp := &webconsole_api.ServerRemoteConsoleResponse{}
if err := obj.Unmarshal(resp); err != nil {
return err
}
if decodeStr, err := base64.StdEncoding.DecodeString(connParams); err == nil {
connParams = string(decodeStr)
}
var query url.Values
connUrl, err := url.ParseRequestURI(connParams)
if err == nil {
query = connUrl.Query()
} else {
query, err = url.ParseQuery(connParams)
if err != nil {
return err
}
}
protocol := query.Get("protocol")
if !utils.IsInStringArray(protocol, []string{
connectParams := resp.GetConnectParams()
if protocol, err := resp.GetConnectProtocol(); err != nil {
return err
} else if !utils.IsInStringArray(protocol, []string{
command.PROTOCOL_TTY, webconsole_api.VNC,
webconsole_api.SPICE, webconsole_api.WMKS,
}) {
fmt.Println(connParams)
fmt.Println(connectParams)
return nil
}
newQuery := url.Values(make(map[string][]string))
newQuery.Set("data", base64.StdEncoding.EncodeToString([]byte(connParams)))
newQuery := url.Values{}
newQuery.Set("data", base64.StdEncoding.EncodeToString([]byte(connectParams)))
u.RawQuery = newQuery.Encode()
fmt.Println(u.String())
return nil

View File

@@ -20,7 +20,6 @@ import (
"yunion.io/x/onecloud/pkg/mcclient"
"yunion.io/x/onecloud/pkg/mcclient/modulebase"
"yunion.io/x/onecloud/pkg/mcclient/modules"
"yunion.io/x/onecloud/pkg/mcclient/modules/k8s"
)
type BaseEventListOptions struct {
@@ -54,23 +53,19 @@ type TypeEventListOptions struct {
ID string `help:"" metavar:"OBJ_ID"`
}
func doK8sEventList(s *mcclient.ClientSession, args *EventListOptions) error {
return doEventList(*k8s.Logs.ResourceManager, s, args)
}
func doComputeEventList(s *mcclient.ClientSession, args *EventListOptions) error {
return doEventList(modules.Logs, s, args)
return DoEventList(modules.Logs, s, args)
}
func doImageEventList(s *mcclient.ClientSession, args *EventListOptions) error {
return doEventList(modules.ImageLogs, s, args)
return DoEventList(modules.ImageLogs, s, args)
}
func doIdentityEventList(s *mcclient.ClientSession, args *EventListOptions) error {
return doEventList(modules.IdentityLogs, s, args)
return DoEventList(modules.IdentityLogs, s, args)
}
func doEventList(man modulebase.ResourceManager, s *mcclient.ClientSession, args *EventListOptions) error {
func DoEventList(man modulebase.ResourceManager, s *mcclient.ClientSession, args *EventListOptions) error {
params := jsonutils.NewDict()
if len(args.Type) > 0 {
params.Add(jsonutils.NewStringArray(args.Type), "obj_type")
@@ -190,16 +185,6 @@ func init() {
return doComputeEventList(s, &nargs)
})
R(&TypeEventListOptions{}, "kubecluster-event", "Show operation event logs of kubernetes cluster", func(s *mcclient.ClientSession, args *TypeEventListOptions) error {
nargs := EventListOptions{BaseEventListOptions: args.BaseEventListOptions, Id: args.ID, Type: []string{"kubecluster"}}
return doK8sEventList(s, &nargs)
})
R(&TypeEventListOptions{}, "kubemachine-event", "Show operation event logs of kubernetes machine", func(s *mcclient.ClientSession, args *TypeEventListOptions) error {
nargs := EventListOptions{BaseEventListOptions: args.BaseEventListOptions, Id: args.ID, Type: []string{"kubemachine"}}
return doK8sEventList(s, &nargs)
})
R(&TypeEventListOptions{}, "image-event", "Show operation event logs of glance images", func(s *mcclient.ClientSession, args *TypeEventListOptions) error {
nargs := EventListOptions{BaseEventListOptions: args.BaseEventListOptions, Id: args.ID, Type: []string{"image"}}
return doImageEventList(s, &nargs)

View File

@@ -78,7 +78,7 @@ type ICreateOpt interface {
IOpt
}
func (cmd ResourceCmd) runWithDesc(action, desc string, args interface{}, callback interface{}) {
func (cmd ResourceCmd) RunWithDesc(action, desc string, args interface{}, callback interface{}) {
man := cmd.manager
prefix := cmd.prefix
if prefix != "" {
@@ -98,8 +98,8 @@ func (cmd ResourceCmd) runWithDesc(action, desc string, args interface{}, callba
R(args, fmt.Sprintf("%s%s-%s", prefix, cmd.keyword, action), desc, callback)
}
func (cmd ResourceCmd) run(action string, args interface{}, callback interface{}) {
cmd.runWithDesc(action, "", args, callback)
func (cmd ResourceCmd) Run(action string, args interface{}, callback interface{}) {
cmd.RunWithDesc(action, "", args, callback)
}
func (cmd ResourceCmd) List(args IListOpt) {
@@ -130,7 +130,7 @@ func (cmd ResourceCmd) List(args IListOpt) {
printList(result, man.GetColumns(s))
return nil
}
cmd.run("list", args, callback)
cmd.Run("list", args, callback)
}
func (cmd ResourceCmd) Create(args ICreateOpt) {
@@ -147,7 +147,7 @@ func (cmd ResourceCmd) Create(args ICreateOpt) {
printObject(ret)
return nil
}
cmd.run("create", args, callback)
cmd.Run("create", args, callback)
}
type IIdOpt interface {
@@ -177,7 +177,24 @@ func (cmd ResourceCmd) Show(args IShowOpt) {
printObject(ret)
return nil
}
cmd.runWithDesc("show", fmt.Sprintf("Show details of a %s", man.GetKeyword()), args, callback)
cmd.RunWithDesc("show", fmt.Sprintf("Show details of a %s", man.GetKeyword()), args, callback)
}
func (cmd ResourceCmd) ClassShow(args IShowOpt) {
man := cmd.manager
callback := func(s *mcclient.ClientSession, args IShowOpt) error {
params, err := args.Params()
if err != nil {
return err
}
ret, err := man.(modulebase.Manager).Get(s, args.GetId(), params)
if err != nil {
return err
}
printObject(ret)
return nil
}
cmd.RunWithDesc(args.GetId(), fmt.Sprintf("Show %s of a %s", args.GetId(), man.GetKeyword()), args, callback)
}
type IGetActionOpt interface {
@@ -230,7 +247,7 @@ func (cmd ResourceCmd) Custom(action TCustomAction, funcname string, args IGetAc
}
return nil
}
cmd.runWithDesc(funcname, fmt.Sprintf("Get %s of a %s", funcname, man.GetKeyword()), args, callback)
cmd.RunWithDesc(funcname, fmt.Sprintf("Get %s of a %s", funcname, man.GetKeyword()), args, callback)
}
type IDeleteOpt interface {
@@ -252,7 +269,7 @@ func (cmd ResourceCmd) Delete(args IDeleteOpt) {
printObject(ret)
return nil
}
cmd.runWithDesc("delete", fmt.Sprintf("Delete %s", man.GetKeyword()), args, callback)
cmd.RunWithDesc("delete", fmt.Sprintf("Delete %s", man.GetKeyword()), args, callback)
}
type IWithDescOpt interface {
@@ -278,7 +295,7 @@ func (cmd ResourceCmd) Perform(action string, args IPerformOpt) {
printObject(ret)
return nil
}
cmd.run(action, args, callback)
cmd.Run(action, args, callback)
}
func (cmd ResourceCmd) PerformClass(action string, args IOpt) {
@@ -295,7 +312,7 @@ func (cmd ResourceCmd) PerformClass(action string, args IOpt) {
printObject(ret)
return nil
}
cmd.run(action, args, callback)
cmd.Run(action, args, callback)
}
type IBatchPerformOpt interface {
@@ -314,7 +331,7 @@ func (cmd ResourceCmd) BatchPerform(action string, args IBatchPerformOpt) {
printBatchResults(ret, man.GetColumns(s))
return nil
}
cmd.run(action, args, callback)
cmd.Run(action, args, callback)
}
type IGetOpt interface {
@@ -336,7 +353,7 @@ func (cmd ResourceCmd) Get(specific string, args IGetOpt) {
printObject(ret)
return nil
}
cmd.runWithDesc(specific, fmt.Sprintf("Get %s of a %s", specific, man.GetKeyword()), args, callback)
cmd.RunWithDesc(specific, fmt.Sprintf("Get %s of a %s", specific, man.GetKeyword()), args, callback)
}
type IUpdateOpt interface {
@@ -358,7 +375,7 @@ func (cmd ResourceCmd) Update(args IUpdateOpt) {
printObject(ret)
return nil
}
cmd.run("update", args, callback)
cmd.Run("update", args, callback)
}
type IMetadataOpt interface {
@@ -380,7 +397,7 @@ func (cmd ResourceCmd) GetMetadata(args IMetadataOpt) {
printObject(ret)
return nil
}
cmd.runWithDesc("metadata", fmt.Sprintf("Show metadata of a %s", man.GetKeyword()), args, callback)
cmd.RunWithDesc("metadata", fmt.Sprintf("Show metadata of a %s", man.GetKeyword()), args, callback)
}
type IBatchDeleteOpt interface {
@@ -399,7 +416,7 @@ func (cmd ResourceCmd) BatchDelete(args IBatchDeleteOpt) {
printBatchResults(ret, man.GetColumns(s))
return nil
}
cmd.run("delete", args, callback)
cmd.Run("delete", args, callback)
}
type IBatchDeleteWithParamOpt interface {
@@ -422,7 +439,7 @@ func (cmd ResourceCmd) BatchDeleteWithParam(args IBatchDeleteWithParamOpt) {
printBatchResults(ret, man.GetColumns(s))
return nil
}
cmd.run("delete", args, callback)
cmd.Run("delete", args, callback)
}
type IBatchPutOpt interface {
@@ -441,7 +458,7 @@ func (cmd ResourceCmd) BatchPut(args IBatchPutOpt) {
printBatchResults(ret, man.GetColumns(s))
return nil
}
cmd.run("update", args, callback)
cmd.Run("update", args, callback)
}
type JointCmd struct {
@@ -471,7 +488,7 @@ func (cmd JointCmd) List(args IJointListOpt) {
if len(args.GetMasterOpt()) > 0 {
result, err = man.ListDescendent(s, args.GetMasterOpt(), params)
} else if len(args.GetSlaveOpt()) > 0 {
result, err = man.ListDescendent2(s, args.GetMasterOpt(), params)
result, err = man.ListDescendent2(s, args.GetSlaveOpt(), params)
} else {
result, err = man.List(s, params)
}
@@ -481,7 +498,7 @@ func (cmd JointCmd) List(args IJointListOpt) {
printList(result, man.GetColumns(s))
return nil
}
cmd.runWithDesc("list", fmt.Sprintf("list %s %s pairs", man.MasterManager().KeyString(), man.SlaveManager().KeyString()), args, callback)
cmd.RunWithDesc("list", fmt.Sprintf("list %s %s pairs", man.MasterManager().KeyString(), man.SlaveManager().KeyString()), args, callback)
}
type IJointShowOpt interface {
@@ -504,5 +521,5 @@ func (cmd JointCmd) Show(args IJointShowOpt) {
printObject(result)
return nil
}
cmd.run("show", args, callback)
cmd.Run("show", args, callback)
}

View File

@@ -30,6 +30,7 @@ import (
"yunion.io/x/onecloud/pkg/mcclient/auth"
"yunion.io/x/onecloud/pkg/mcclient/modules"
"yunion.io/x/onecloud/pkg/mcclient/options"
"yunion.io/x/onecloud/pkg/util/fileutils2"
"yunion.io/x/onecloud/pkg/util/rbacutils"
"yunion.io/x/onecloud/pkg/util/shellutils"
)
@@ -183,6 +184,7 @@ func init() {
type PolicyShowOptions struct {
ID string `help:"ID of policy"`
Format string `help:"policy format, default yaml" default:"yaml" choices:"yaml|json"`
Save string `help:"save policy data into a file"`
}
R(&PolicyShowOptions{}, "policy-show", "Show policy", func(s *mcclient.ClientSession, args *PolicyShowOptions) error {
query := jsonutils.NewDict()
@@ -192,6 +194,15 @@ func init() {
return err
}
printObject(result)
if len(args.Save) > 0 {
if args.Format == "yaml" {
yaml, _ := result.GetString("policy")
fileutils2.FilePutContents(args.Save, yaml, false)
} else {
p, _ := result.Get("policy")
fileutils2.FilePutContents(args.Save, p.PrettyString(), false)
}
}
return nil
})

View File

@@ -23,20 +23,27 @@ import (
func init() {
type RoleAssignmentsOptions struct {
Effective bool `help:"Include role assignment of group members"`
System bool `help:"Include system user account"`
Policy bool `help:"Show matched policies"`
Domain string `help:"Role assignments for domain"`
User string `help:"For user"`
UserDomain string `help:"Domain for user"`
Group string `help:"For group"`
GroupDomain string `help:"Domain for group"`
Project string `help:"Role assignments for project"`
ProjectDomain string `help:"Domain for project"`
Role string `help:"Role assignments for role"`
RoleDomain string `help:"Domain for role"`
Limit int64 `help:"maximal returned number of rows"`
Offset int64 `help:"offset index of returned results"`
Effective bool `help:"Include role assignment of group members"`
System bool `help:"Include system user account"`
Policy bool `help:"Show matched policies"`
Domain string `help:"Role assignments for domain"`
User string `help:"For user"`
UserDomain string `help:"Domain for user"`
Group string `help:"For group"`
GroupDomain string `help:"Domain for group"`
Project string `help:"Role assignments for project"`
ProjectDomain string `help:"Domain for project"`
Role string `help:"Role assignments for role"`
RoleDomain string `help:"Domain for role"`
Limit int64 `help:"maximal returned number of rows"`
Offset int64 `help:"offset index of returned results"`
Users []string `help:"fitler by user id or name"`
Groups []string `help:"fitler by group id or name"`
Roles []string `help:"fitler by role id or name"`
Projects []string `help:"fitler by project id or name"`
Domains []string `help:"fitler by domain id or name"`
ProjectDomains []string `help:"filter by project's domain id or name"`
}
R(&RoleAssignmentsOptions{}, "role-assignments", "List all role assignments", func(s *mcclient.ClientSession, args *RoleAssignmentsOptions) error {
query := jsonutils.NewDict()
@@ -85,6 +92,24 @@ func init() {
}
query.Add(jsonutils.NewString(rid), "role", "id")
}
if len(args.Users) > 0 {
query.Add(jsonutils.NewStringArray(args.Users), "users")
}
if len(args.Groups) > 0 {
query.Add(jsonutils.NewStringArray(args.Groups), "groups")
}
if len(args.Roles) > 0 {
query.Add(jsonutils.NewStringArray(args.Roles), "roles")
}
if len(args.Projects) > 0 {
query.Add(jsonutils.NewStringArray(args.Projects), "projects")
}
if len(args.Domains) > 0 {
query.Add(jsonutils.NewStringArray(args.Domains), "domains")
}
if len(args.ProjectDomains) > 0 {
query.Add(jsonutils.NewStringArray(args.ProjectDomains), "project_domains")
}
if args.Limit > 0 {
query.Add(jsonutils.NewInt(args.Limit), "limit")
}

View File

@@ -262,6 +262,8 @@ func init() {
// DefaultProject string `help:"Default project"`
// Option []string `help:"User options"`
SkipPasswordComplexityCheck bool `help:"skip_password_complexity_check"`
}
R(&UserUpdateOptions{}, "user-update", "Update a user", func(s *mcclient.ClientSession, args *UserUpdateOptions) error {
query := jsonutils.NewDict()
@@ -282,6 +284,9 @@ func init() {
}
if args.Password != nil {
params.Add(jsonutils.NewString(*args.Password), "password")
if args.SkipPasswordComplexityCheck {
params.Add(jsonutils.JSONTrue, "skip_password_complexity_check")
}
}
if len(args.Displayname) > 0 {
params.Add(jsonutils.NewString(args.Displayname), "displayname")

View File

@@ -15,27 +15,11 @@
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 initKubeCerts() {
cmdN := func(action string) string {
return fmt.Sprintf("kubecert-%s", action)
}
R(&o.CertListOptions{}, cmdN("list"), "List k8s cluster certificates key pairs", func(s *mcclient.ClientSession, args *o.CertListOptions) error {
params, err := args.Params()
if err != nil {
return err
}
ret, err := k8s.KubeCerts.List(s, params)
if err != nil {
return err
}
printList(ret, k8s.KubeCerts.GetColumns(s))
return nil
})
cmd := NewK8sResourceCmd(k8s.KubeCerts)
cmd.List(new(o.CertListOptions))
}

View File

@@ -26,38 +26,24 @@ import (
func initKubeCluster() {
cmdN := func(action string) string {
return fmt.Sprintf("kubecluster-%s", action)
return fmt.Sprintf("k8s-cluster-%s", action)
}
R(&o.ClusterListOptions{}, cmdN("list"), "List k8s clusters", func(s *mcclient.ClientSession, args *o.ClusterListOptions) error {
result, err := k8s.KubeClusters.List(s, args.Params())
if err != nil {
return err
}
printList(result, k8s.KubeClusters.GetColumns(s))
return nil
})
R(&o.IdentOptions{}, cmdN("show"), "Show details of a cluster", func(s *mcclient.ClientSession, args *o.IdentOptions) error {
result, err := k8s.KubeClusters.Get(s, args.ID, nil)
if err != nil {
return err
}
printObject(result)
return nil
})
R(&o.KubeClusterCreateOptions{}, cmdN("create"), "Create k8s cluster", func(s *mcclient.ClientSession, args *o.KubeClusterCreateOptions) error {
params, err := args.Params()
if err != nil {
return err
}
cluster, err := k8s.KubeClusters.Create(s, params)
if err != nil {
return err
}
printObject(cluster)
return nil
})
cmd := NewK8sResourceCmd(k8s.KubeClusters)
cmd.SetKeyword("cluster")
cmd.ShowEvent()
cmd.List(new(o.ClusterListOptions))
cmd.Show(new(o.IdentOptions))
cmd.Create(new(o.KubeClusterCreateOptions))
cmd.Perform("sync", new(o.ClusterSyncOptions))
cmd.Perform("syncstatus", new(o.IdentOptions))
cmd.Get("components-status", new(o.IdentOptions))
cmd.Get("api-resources", new(o.IdentOptions))
cmd.Get("cluster-users", new(o.IdentOptions))
cmd.Get("cluster-user-groups", new(o.IdentOptions))
cmd.Perform("purge", new(o.ClusterPurgeOptions))
cmd.Perform("delete-machines", new(o.KubeClusterDeleteMachinesOptions))
cmd.Perform("add-machines", new(o.KubeClusterAddMachinesOptions))
cmd.PerformClass("gc", new(o.ClusterGCOpts))
R(&o.KubeClusterImportOptions{}, cmdN("import"), "Import k8s cluster", func(s *mcclient.ClientSession, args *o.KubeClusterImportOptions) error {
params, err := args.Params()
@@ -78,41 +64,6 @@ func initKubeCluster() {
return nil
})
R(&o.KubeClusterAddMachinesOptions{}, cmdN("add-machines"), "Add machines to cluster", func(s *mcclient.ClientSession, args *o.KubeClusterAddMachinesOptions) error {
params, err := args.Params()
if err != nil {
return err
}
ret, err := k8s.KubeClusters.PerformAction(s, args.ID, "add-machines", params)
if err != nil {
return err
}
printObject(ret)
return nil
})
R(&o.KubeClusterDeleteMachinesOptions{}, cmdN("delete-machines"), "Delete machines in cluster", func(s *mcclient.ClientSession, args *o.KubeClusterDeleteMachinesOptions) error {
params, err := args.Params()
if err != nil {
return err
}
ret, err := k8s.KubeClusters.PerformAction(s, args.ID, "delete-machines", params)
if err != nil {
return err
}
printObject(ret)
return nil
})
R(&o.IdentOptions{}, cmdN("terminate"), "Terminate cluster", func(s *mcclient.ClientSession, args *o.IdentOptions) error {
ret, err := k8s.KubeClusters.PerformAction(s, args.ID, "terminate", nil)
if err != nil {
return err
}
printObject(ret)
return nil
})
R(&o.IdentOptions{}, cmdN("kubeconfig"), "Generate kubeconfig of a cluster", func(s *mcclient.ClientSession, args *o.IdentOptions) error {
ret, err := k8s.KubeClusters.GetSpecific(s, args.ID, "kubeconfig", nil)
if err != nil {
@@ -179,55 +130,6 @@ func initKubeCluster() {
return nil
})
R(&o.IdentOptions{}, cmdN("syncstatus"), "Sync cluster status", func(s *mcclient.ClientSession, args *o.IdentOptions) error {
ret, err := k8s.KubeClusters.PerformAction(s, args.ID, "syncstatus", nil)
if err != nil {
return err
}
printObject(ret)
return nil
})
R(&o.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 {
return err
}
printObject(ret)
return nil
})
R(&o.IdentOptions{}, cmdN("private"), "Make cluster private", func(s *mcclient.ClientSession, args *o.IdentOptions) error {
ret, err := k8s.KubeClusters.PerformAction(s, args.ID, "private", nil)
if err != nil {
return err
}
printObject(ret)
return nil
})
R(&o.IdentOptions{}, cmdN("components-status"), "Get cluster component status", func(s *mcclient.ClientSession, args *o.IdentOptions) error {
ret, err := k8s.KubeClusters.GetSpecific(s, args.ID, "components-status", nil)
if err != nil {
return err
}
printObject(ret)
return nil
})
R(&o.ClusterComponentTypeOptions{}, cmdN("component-setting"), "Get cluster component setting", func(s *mcclient.ClientSession, args *o.ClusterComponentTypeOptions) error {
q := jsonutils.NewDict()
q.Add(jsonutils.NewString(args.TYPE), "type")

View File

@@ -16,8 +16,11 @@ package k8s
import (
"yunion.io/x/onecloud/pkg/mcclient/modules/k8s"
o "yunion.io/x/onecloud/pkg/mcclient/options/k8s"
)
func initConfigMap() {
initK8sNamespaceResource("configmap", k8s.ConfigMaps)
cmd := NewK8sResourceCmd(k8s.ConfigMaps)
cmd.Create(&o.ConfigMapCreateOptions{})
}

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