Compare commits

...

417 Commits

Author SHA1 Message Date
Zexi Li
e1b2e2b508 Merge pull request #10752 from yousong/automated-cherry-pick-of-#10750-upstream-release-3.6
Automated cherry pick of #10750: vpcagent: ovn: fix port match condition formation
2021-04-16 10:07:11 +08:00
Zexi Li
eb4b22eaec Merge pull request #10770 from rainzm/automated-cherry-pick-of-#10763-upstream-release-3.6
Automated cherry pick of #10763: fix(region): purge instancesnapshot when purging guest
2021-04-16 10:02:52 +08:00
rainzm
a14ab9820d fix(region): purge instancesnapshot when purging guest
fix #10760
2021-04-15 20:27:13 +08:00
Yousong Zhou
94d2bc456d vpcagent: ovn: fix port match condition formation 2021-04-15 16:08:59 +08:00
Zexi Li
5cd48cec5f Merge pull request #10725 from ioito/automated-cherry-pick-of-#10723-upstream-release-3.6
Automated cherry pick of #10723: fix: aliyun lb charge type
2021-04-15 12:42:08 +08:00
Zexi Li
c039a56be1 Merge pull request #10731 from rainzm/automated-cherry-pick-of-#10729-upstream-release-3.6
Automated cherry pick of #10729: fix(esxi): correctly set the imagePath outside the if block
2021-04-15 12:41:14 +08:00
Zexi Li
c24235c137 Merge pull request #10736 from zexi/automated-cherry-pick-of-#10734-upstream-release-3.6
Automated cherry pick of #10734: fix(cloudcommon): unify OS_ARCH constants
2021-04-15 12:21:48 +08:00
Zexi Li
85f85e394d fix(cloudcommon): unify OS_ARCH constants 2021-04-15 11:06:55 +08:00
rainzm
5fdde01bea fix(esxi): correctly set the imagePath outside the if block 2021-04-14 19:04:34 +08:00
Qu Xuan
59e1534222 fix: aliyun lb charge type 2021-04-14 18:05:59 +08:00
yunion-ci-robot
f6da9ad66a Merge pull request #10721 from zexi/automated-cherry-pick-of-#10718-upstream-release-3.6
Automated cherry pick of #10718: fix(baremetal): use command timeout context replace timeout command
2021-04-14 17:56:47 +08:00
Zexi Li
b55c2f7d21 fix(baremetal): use command timeout context replace timeout command 2021-04-14 17:16:05 +08:00
Zexi Li
24e29349bf Merge pull request #10712 from zexi/automated-cherry-pick-of-#10710-upstream-release-3.6
Automated cherry pick of #10710: fix(region): decouple region and etcd service
2021-04-14 16:58:52 +08:00
Zexi Li
aa7c5f1b1a fix(region): decouple region and etcd service 2021-04-13 18:36:47 +08:00
Zexi Li
a3b1b99cc4 Merge pull request #10707 from rainzm/automated-cherry-pick-of-#10705-upstream-release-3.6
Automated cherry pick of #10705: fix(cloudcommon): use rbac authentication dedicated to the list interface in GetModelProperty
2021-04-13 16:56:13 +08:00
Zexi Li
899afd7065 Merge pull request #10704 from zexi/automated-cherry-pick-of-#10702-upstream-release-3.6
Automated cherry pick of #10702: fix(host-deployer): mkfs.ext4 add '-T largefile' option
2021-04-13 15:44:30 +08:00
rainzm
2bf31dbd3a fix(cloudcommon): use rbac authentication dedicated to the list interface in GetModelProperty 2021-04-13 14:46:24 +08:00
Zexi Li
35d8cba97f fix(host-deployer): mkfs.ext4 add '-T largefile' option 2021-04-13 11:50:14 +08:00
Zexi Li
8a1be0852d Merge pull request #10697 from rainzm/automated-cherry-pick-of-#10695-upstream-release-3.6
Automated cherry pick of #10695: feat(region): allow to update account with provider vmware
2021-04-13 10:25:52 +08:00
Zexi Li
ef29136266 Merge pull request #10700 from zexi/automated-cherry-pick-of-#10699-upstream-release-3.6
Automated cherry pick of #10699: feat(fetcherfs): make rpm and deb package
2021-04-13 10:25:07 +08:00
Zexi Li
adaa7fa2ce feat(fetcherfs): make rpm and deb package 2021-04-12 21:31:10 +08:00
rainzm
62a4bce191 feat(region): allow to update account with provider vmware 2021-04-12 15:58:54 +08:00
Zexi Li
1ecbb46e59 Merge pull request #10690 from ioito/automated-cherry-pick-of-#10688-upstream-release-3.6
Automated cherry pick of #10688: fix: actions domain filter by project doamin id
2021-04-12 13:17:11 +08:00
Zexi Li
58ca8180b6 Merge pull request #10685 from swordqiu/automated-cherry-pick-of-#10683-upstream-release-3.6
Automated cherry pick of #10683: fix(baremetal-agent): baremetal will probe status in status unknown
2021-04-12 13:16:08 +08:00
Zexi Li
08819e2201 Merge pull request #10694 from zexi/automated-cherry-pick-of-#10692-upstream-release-3.6
Automated cherry pick of #10692: fix(readme): rename OneCloud to YunionCloud
2021-04-12 13:15:59 +08:00
Zexi Li
b4f5f1a996 fix(readme): rename OneCloud to YunionCloud 2021-04-12 13:14:48 +08:00
Qu Xuan
85f6e95c18 fix: actions domain filter by project doamin id 2021-04-12 11:42:21 +08:00
Qiu Jian
8a71e73afd fix(baremetal-agent): baremetal will probe status in status unknown 2021-04-12 00:23:33 +08:00
Zexi Li
407f155df1 Merge pull request #10680 from zexi/automated-cherry-pick-of-#10678-upstream-release-3.6
Automated cherry pick of #10678: fix(host): detect ovs version
2021-04-09 17:19:54 +08:00
Zexi Li
ab0c6f1284 fix(host): detect ovs version 2021-04-09 17:01:30 +08:00
Zexi Li
99d1137805 Merge pull request #10593 from zhaoxiangchun/automated-cherry-pick-of-#10592-upstream-release-3.6
Automated cherry pick of #10592: fix(host): update host metric tags when server or host  changeowner
2021-04-08 18:13:17 +08:00
zhaoxiangchun
95a03ad58b fix(host): update host metric tags when server or host changeowner 2021-04-08 17:18:22 +08:00
Zexi Li
659022c792 Merge pull request #10621 from swordqiu/automated-cherry-pick-of-#10619-upstream-release-3.6
Automated cherry pick of #10619: fix(region): remove i18n lock and logs
2021-04-08 10:34:22 +08:00
Zexi Li
b55ac81e2a Merge pull request #10660 from swordqiu/automated-cherry-pick-of-#10658-upstream-release-3.6
Automated cherry pick of #10658: fix(region): sync baremetal desc before do ipmi probing
2021-04-08 10:14:28 +08:00
Qiu Jian
bd69dc44d7 fix(region): sync baremetal desc before do ipmi probing 2021-04-08 01:29:55 +08:00
Zexi Li
06c303c648 Merge pull request #10646 from swordqiu/automated-cherry-pick-of-#10644-upstream-release-3.6
Automated cherry pick of #10644: fix(region): allow ipmi probe in status unknown
2021-04-07 17:55:57 +08:00
Zexi Li
15fbc035ab Merge pull request #10649 from rainzm/automated-cherry-pick-of-#10647-upstream-release-3.6
Automated cherry pick of #10647: fix(region): avoid refreshing when checking the image
2021-04-07 17:37:34 +08:00
yunion-ci-robot
a25de48df9 Merge pull request #10642 from tb365/automated-cherry-pick-of-#10637-upstream-release-3.6
Automated cherry pick of #10637: fix(region): guest associate eip checking fix
2021-04-07 16:14:47 +08:00
rainzm
be065e872d fix(region): avoid refreshing when checking the image 2021-04-07 10:59:26 +08:00
Qiu Jian
4c27add0ba fix(region): allow ipmi probe in status unknown 2021-04-07 01:00:53 +08:00
tangbin
d238540dcb fix(region): guest sync eip fix 2021-04-06 18:58:44 +08:00
tangbin
fdd0bf77e6 fix(region): guest associate eip checking fix 2021-04-06 18:58:44 +08:00
Zexi Li
ab5fcdad3d Merge pull request #10635 from ioito/automated-cherry-pick-of-#10633-upstream-release-3.6
Automated cherry pick of #10633: fix: private cloud sku attached disk count
2021-04-06 17:08:42 +08:00
Qu Xuan
38d23b0739 fix: private cloud sku attached disk count 2021-04-06 15:03:26 +08:00
Zexi Li
b45811166b Merge pull request #10624 from swordqiu/automated-cherry-pick-of-#10622-upstream-release-3.6
Automated cherry pick of #10622: fix(keystone): role_assignment effective list ignore groups without user
2021-04-06 10:18:29 +08:00
Qiu Jian
2ee1af186d fix(keystone): role_assignment effective list ignore groups without user 2021-04-05 17:21:40 +08:00
Qiu Jian
14e537fc65 fix(region): remove i18n lock and logs 2021-04-05 16:40:10 +08:00
Zexi Li
f3e503e8a6 Merge pull request #10614 from swordqiu/automated-cherry-pick-of-#10612-upstream-release-3.6
Automated cherry pick of #10612: fix(region): add usage cache, speedup response
2021-04-05 00:55:29 +08:00
yunion-ci-robot
10ad815d6d Merge pull request #10618 from ioito/automated-cherry-pick-of-#10616-upstream-release-3.6
Automated cherry pick of #10616: fix(region): new aws region
2021-04-04 20:14:44 +08:00
yunion-ci-robot
01a17c952d Merge pull request #10610 from ioito/automated-cherry-pick-of-#10608-upstream-release-3.6
Automated cherry pick of #10608: fix: time sync duration
2021-04-04 20:12:46 +08:00
Qiu Jian
dcb8898c06 response scope-specific metrics 2021-04-04 20:08:37 +08:00
Qiu Jian
d7ff1314e6 fix(region): add usage cache, speedup response 2021-04-04 20:08:37 +08:00
Qu Xuan
d6a0764b29 fix: new aws region 2021-04-03 12:31:33 +08:00
Qu Xuan
e841a42143 fix: time sync duration 2021-04-02 20:55:34 +08:00
Zexi Li
c55d5d0cf2 Merge pull request #10605 from zexi/automated-cherry-pick-of-#10603-upstream-release-3.6
Automated cherry pick of #10603: fix(baremetal): sas2iru parse line
2021-04-02 20:04:01 +08:00
Zexi Li
76df031884 Merge pull request #10580 from swordqiu/automated-cherry-pick-of-#10576-upstream-release-3.6
Automated cherry pick of #10576: fix(region): allow ipmi probe when probe fail
2021-04-02 19:44:43 +08:00
Zexi Li
f46dfc6d6a Merge pull request #10583 from swordqiu/automated-cherry-pick-of-#10581-upstream-release-3.6
Automated cherry pick of #10581: fix(hostman): recycle local disk file when rebuilding root
2021-04-02 19:42:51 +08:00
Zexi Li
1fc2503812 Merge pull request #10598 from rainzm/automated-cherry-pick-of-#10595-upstream-release-3.6
Automated cherry pick of #10595: Fixes problem of Esxi Disk with iso creating
2021-04-02 19:40:17 +08:00
Zexi Li
aa9ad9fe00 fix(baremetal): sas2iru parse line 2021-04-02 19:28:54 +08:00
rainzm
4cf674992c fix(esxi): determine whether the disk is a root disk more reasonably
The order of the device is often sorted according to the size of the
key. The disk pointed to by the smallest key is not necessarily the
root disk or the first disk which often has the label of 'Hard disk 1'.
We try to find the label, if not, use the Key again to determine who
is the root disk.
2021-04-02 18:49:13 +08:00
rainzm
5565bb3064 feat(esxi): change parameters for NewDiskDev and avoid unnecessary deploy
1. The fields UnitNumber and Index should be independent
2. Avoid unnecessary deploy, such create vm with iso not image
2021-04-02 18:49:13 +08:00
rainzm
aede49450e fix(esxi): add ListPath for storage and use it to check iso
When remote iso file is used, CheckFile will failed.
2021-04-02 18:41:14 +08:00
Zexi Li
c7efbc3124 Merge pull request #10589 from swordqiu/automated-cherry-pick-of-#7047-upstream-release-3.6
Automated cherry pick of #7047: fix: adjust primary key length when sqlchemy utf8 default to utf8mb4
2021-04-02 15:10:52 +08:00
Qiu Jian
d090d76f92 fix: adjust primary key length when sqlchemy utf8 default to utf8mb4 2021-04-02 15:06:44 +08:00
Qiu Jian
1333d39c60 fix(hostman): recycle local disk file when rebuilding root 2021-04-02 02:17:04 +08:00
Qiu Jian
615cb1e331 fix(region): allow ipmi probe when probe fail 2021-04-01 22:38:54 +08:00
yunion-ci-robot
923e8ea742 Merge pull request #10570 from ioito/automated-cherry-pick-of-#10568-upstream-release-3.6
Automated cherry pick of #10568: fix: avoid listener worker leak
2021-04-01 22:35:54 +08:00
Zexi Li
50b50d57dc Merge pull request #10548 from zexi/automated-cherry-pick-of-#10546-upstream-release-3.6
Automated cherry pick of #10546: fix(host): arm vm virtio-net-pci without addr
2021-04-01 20:52:55 +08:00
Zexi Li
67a4893534 Merge pull request #10551 from swordqiu/automated-cherry-pick-of-#10549-upstream-release-3.6
Automated cherry pick of #10549: fix(image): update min_disk of iso image
2021-04-01 20:52:05 +08:00
Zexi Li
e6d8dbe4a4 Merge pull request #10554 from zhaoxiangchun/automated-cherry-pick-of-#10552-upstream-release-3.6
Automated cherry pick of #10552: fix(monitor):修复监控总览图标钻取后返回数据异常的问题
2021-04-01 20:51:08 +08:00
Zexi Li
6c3c2f76c2 Merge pull request #10559 from ioito/automated-cherry-pick-of-#10557-upstream-release-3.6
Automated cherry pick of #10557: fix: cloudaccount auto sync
2021-04-01 20:50:01 +08:00
Zexi Li
a5cd56f3d7 Merge pull request #10563 from ioito/automated-cherry-pick-of-#10561-upstream-release-3.6
Automated cherry pick of #10561: fix: vendor update
2021-04-01 20:48:57 +08:00
Zexi Li
d691775beb Merge pull request #10567 from rainzm/automated-cherry-pick-of-#10565-upstream-release-3.6
Automated cherry pick of #10565: fix(esxi): be compatible with disconnected host
2021-04-01 20:47:58 +08:00
Qu Xuan
73cda1d909 fix: vendor update 2021-04-01 17:40:48 +08:00
Qu Xuan
0c904591c0 fix: avoid listener worker leak 2021-04-01 17:27:05 +08:00
rainzm
5e8549b30f fix(esxi): be compatible with disconnected host 2021-04-01 17:22:23 +08:00
Qu Xuan
1c1fab0ef6 fix: cloudaccount auto sync 2021-04-01 16:18:56 +08:00
zhaoxiangchun
88d1f93e31 fix(monitor):修复监控总览图标钻取后返回数据异常的问题 2021-04-01 10:05:36 +08:00
Qiu Jian
65748b374c fix(image): update min_disk of iso image 2021-03-31 23:25:58 +08:00
Zexi Li
4c83b1af48 fix(host): arm vm virtio-net-pci without addr 2021-03-31 18:53:39 +08:00
Yousong Zhou
f29d07dbd4 Merge pull request #10545 from zhaoxiangchun/automated-cherry-pick-of-#10543-upstream-release-3.6
Automated cherry pick of #10543: fix(host): modification of netio collection field  of local virtual machine
2021-03-31 15:17:12 +08:00
yunion-ci-robot
420e912c65 Merge pull request #10542 from ioito/automated-cherry-pick-of-#9108-upstream-release-3.6
Automated cherry pick of #9108: Hotfix/qx guest delete
2021-03-31 15:13:40 +08:00
yunion-ci-robot
35d15a23c6 Merge pull request #10540 from swordqiu/automated-cherry-pick-of-#10538-upstream-release-3.6
Automated cherry pick of #10538: fix(region): add more usage metrics, e.g. ports.eip, servers.last_week, pending_delete_servers.last_week
2021-03-31 15:12:42 +08:00
Qu Xuan
44ed684930 feat(region): disks and eip delete with server 2021-03-31 14:45:12 +08:00
zhaoxiangchun
2889279284 fix(host): modification of netio collection field of local virtual machine
1.本地虚拟机指标保存时field存在转换关系
bits_recv
bits_sent
2021-03-31 10:32:26 +08:00
Qu Xuan
1b1cccab94 feat(region): add server delete options 2021-03-31 10:19:05 +08:00
Qiu Jian
5261b52b84 fix(region): add more usage metrics, e.g. ports.eip, servers.last_week, pending_delete_servers.last_week 2021-03-31 03:39:14 +08:00
Zexi Li
6068ea04a2 Merge pull request #10535 from zhaoxiangchun/automated-cherry-pick-of-#10534-upstream-release-3.6
Automated cherry pick of #10534: fix(monitor): alertQuery fix
2021-03-30 19:44:14 +08:00
zhaoxiangchun
d7380f3ecc fix(monitor): alertQuery fix
1.兼容meter相关的监控数据查询
2.根据groupby
  确定resType,从而确定云管中对应的资源,然后进行属性填充,解决资源属性修改的问题
2021-03-30 18:22:24 +08:00
Zexi Li
01eeff06a1 Merge pull request #10533 from swordqiu/automated-cherry-pick-of-#10531-upstream-release-3.6
Automated cherry pick of #10531: fix(region): show storage capacity to project users
2021-03-30 15:53:58 +08:00
Qiu Jian
45d219ac51 fix(region): show storage capacity to project users 2021-03-30 12:29:29 +08:00
Zexi Li
8cc8d101b5 Merge pull request #10518 from zhaoxiangchun/automated-cherry-pick-of-#10516-upstream-release-3.6
Automated cherry pick of #10516: fix(monitor): filter alertquery result according to onecloud resources
2021-03-29 17:15:59 +08:00
zhaoxiangchun
2df45f0a3c fix(monitor): filter alertquery result according to onecloud resources
1.排除已经删除的资源
2.对已经删除的资源不再持续报警
2021-03-29 16:50:16 +08:00
Zexi Li
d397ac8608 Merge pull request #10523 from ioito/automated-cherry-pick-of-#10521-upstream-release-3.6
Automated cherry pick of #10521: fix: account auto sync time
2021-03-29 12:13:37 +08:00
Qu Xuan
71171ed0d9 fix: account auto sync time 2021-03-29 11:22:54 +08:00
yunion-ci-robot
c399153f14 Merge pull request #10512 from ioito/automated-cherry-pick-of-#10510-upstream-release-3.6
Automated cherry pick of #10510: fix: sku zone
2021-03-26 17:27:53 +08:00
Qu Xuan
2f7ee9fc79 fix: sku zone 2021-03-26 16:45:54 +08:00
Zexi Li
630284c2ae Merge pull request #10501 from yousong/automated-cherry-pick-of-#10499-upstream-release-3.6
Automated cherry pick of #10499: vpcagent: ovn: fix qos for eip upload
2021-03-26 15:18:13 +08:00
Zexi Li
b1a4507325 Merge pull request #10507 from swordqiu/automated-cherry-pick-of-#10505-upstream-release-3.6
Automated cherry pick of #10505: fix(baremetal): megactl driver fail to find device by key
2021-03-26 15:16:49 +08:00
Yousong Zhou
5b21958587 vpcagent: ovn: fix qos for eip upload 2021-03-26 10:28:10 +08:00
Qiu Jian
be71185b17 fix(baremetal): megactl driver fail to find device by key 2021-03-26 03:20:29 +08:00
Zexi Li
5981783ea4 Merge pull request #10496 from zhaoxiangchun/automated-cherry-pick-of-#10494-upstream-release-3.6
Automated cherry pick of #10494: fix(monitor): modify onecloud replacement code
2021-03-24 19:34:56 +08:00
zhaoxiangchun
04f4d036cf fix(monitor): modify onecloud replacement code
1.增加copyright api查询逻辑
2021-03-24 18:53:00 +08:00
Zexi Li
c615675ad9 Merge pull request #10485 from tb365/automated-cherry-pick-of-#10483-upstream-release-3.6
Automated cherry pick of #10483: (fix) region: qcloud elb https listener create fix
2021-03-24 18:51:46 +08:00
Zexi Li
4735edff60 Merge pull request #10489 from ioito/automated-cherry-pick-of-#10487-upstream-release-3.6
Automated cherry pick of #10487: fix: remove qcloud region and zone prefix
2021-03-24 12:22:28 +08:00
Zexi Li
4e099b72ad Merge pull request #10492 from zexi/automated-cherry-pick-of-#10491-upstream-release-3.6
Automated cherry pick of #10491: fix(build): build telegraf-raid-plugin
2021-03-24 12:21:41 +08:00
Zexi Li
14bd5def5d fix(build): build telegraf-raid-plugin 2021-03-24 12:20:06 +08:00
Qu Xuan
0ee42cffea fix: remove qcloud region and zone prefix 2021-03-23 17:44:36 +08:00
tangbin
08b74642f8 (fix) region: qcloud elb https listener create fix 2021-03-23 15:48:41 +08:00
Zexi Li
c6433d0a09 Merge pull request #10476 from yousong/automated-cherry-pick-of-#10474-upstream-release-3.6
Automated cherry pick of #10474: Bugfix/yousong guestnic
2021-03-23 10:39:44 +08:00
Zexi Li
db20a5e334 Merge pull request #10479 from zexi/hotfix/resize-disk
fix(host): ignore parted resize disk unknown partition table error
2021-03-23 10:38:20 +08:00
Zexi Li
546f2fcfae fix(host): ignore parted resize disk unknown partition table error 2021-03-23 09:51:02 +08:00
Yousong Zhou
b4a4cd61d9 region: fix setting nic index
When a guest has two nics, changing ip address of the 1st will cause
the new nic after detach then attach to be "1", colliding with the
original nic of index 1
2021-03-22 19:34:22 +08:00
Yousong Zhou
02022c4c29 region: attachnetwork: allow attach by network name
isValidNetworkInfo allows names.  Otherwise the code will panic when
a named was passed and nil was returned by the fetch call
2021-03-22 19:34:22 +08:00
Zexi Li
4377337a4a Merge pull request #10470 from swordqiu/automated-cherry-pick-of-#10468-upstream-release-3.6
Automated cherry pick of #10468: fix(log): add filters to baremetal event logs
2021-03-22 16:09:18 +08:00
Qiu Jian
b9e0c22b2a fix(log): add filters to baremetal event logs 2021-03-22 10:53:45 +08:00
Zexi Li
d8a1e35571 Merge pull request #10464 from ioito/automated-cherry-pick-of-#10462-upstream-release-3.6
Automated cherry pick of #10462: fix: add index for image_type
2021-03-22 10:45:25 +08:00
Zexi Li
13f6a0907f Merge pull request #10454 from ioito/automated-cherry-pick-of-#10452-upstream-release-3.6
Automated cherry pick of #10452: fix: avoid panic when use idc vpc
2021-03-22 10:40:43 +08:00
Zexi Li
99dc612991 Merge pull request #10457 from swordqiu/automated-cherry-pick-of-#10455-upstream-release-3.6
Automated cherry pick of #10455: fix(keystone): allow joint projects across domains by default
2021-03-22 10:39:23 +08:00
Qu Xuan
c5c00f38ba fix: add index for image_type 2021-03-19 14:29:42 +08:00
Zexi Li
b25043be1b Merge pull request #10459 from rainzm/webhook/more1
Notify webhook
2021-03-19 14:27:36 +08:00
Qiu Jian
7de3adac3a fix(keystone): allow joint projects across domains by default 2021-03-19 00:00:42 +08:00
Qu Xuan
be2e979c94 fix: avoid panic when use idc vpc 2021-03-18 21:04:52 +08:00
rainzm
33cb189cb1 feat(region): send webhook message when changing ipaddr 2021-03-18 17:48:01 +08:00
rainzm
10f0e0c8bb fix(region): Compatible with messages that have no recipient and contact information
such as robots
2021-03-18 17:48:01 +08:00
Zexi Li
686d314fa5 Merge pull request #10446 from zexi/feature/host-arm-support
feat(host): adjust qemu args to support aarch64
2021-03-18 15:22:33 +08:00
Zexi Li
ab00f01403 feat(host): adjust qemu args to support aarch64 2021-03-18 14:57:27 +08:00
Zexi Li
fc736bc4ca Merge pull request #10439 from swordqiu/automated-cherry-pick-of-#10437-upstream-release-3.6
Automated cherry pick of #10437: fix(region): scoped policy filter by project id
2021-03-18 10:24:00 +08:00
Zexi Li
a31e8734d0 Merge pull request #10443 from swordqiu/automated-cherry-pick-of-#10441-upstream-release-3.6
Automated cherry pick of #10441: fix(region): including domain info in project-role results
2021-03-18 10:23:30 +08:00
Zexi Li
53494b7764 Merge pull request #10435 from ioito/automated-cherry-pick-of-#10433-upstream-release-3.6
Automated cherry pick of #10433: fix: avoid stop or start vm failed
2021-03-18 10:17:33 +08:00
Qiu Jian
538097ef7c fix(region): including domain info in project-role results 2021-03-18 00:33:36 +08:00
Qiu Jian
6afe83e479 fix(region): scoped policy filter by project id 2021-03-17 23:02:08 +08:00
Qu Xuan
a7b3b1cf46 fix: avoid stop or start vm failed 2021-03-17 20:03:19 +08:00
Zexi Li
3cea602ba4 Merge pull request #10427 from ioito/automated-cherry-pick-of-#10425-upstream-release-3.6
Automated cherry pick of #10425: fix: change rds config skip zone check
2021-03-17 11:43:19 +08:00
Zexi Li
6499250b15 Merge pull request #10419 from zhaoxiangchun/automated-cherry-pick-of-#10418-upstream-release-3.6
Automated cherry pick of #10418: fix(telegraf): megactl raid  add rebuild status
2021-03-15 18:45:57 +08:00
Zexi Li
ace1d353b9 Merge pull request #10423 from ioito/automated-cherry-pick-of-#10421-upstream-release-3.6
Automated cherry pick of #10421: fix: qcloud bucket refer
2021-03-15 17:53:26 +08:00
Qu Xuan
0285e77352 fix: change rds config skip zone check 2021-03-15 17:42:56 +08:00
Qu Xuan
cdd209b59a fix: qcloud bucket refer 2021-03-15 15:47:35 +08:00
zhaoxiangchun
9da39105fb fix(telegraf): megactl raid add rebuild status 2021-03-15 10:04:25 +08:00
yunion-ci-robot
cd4cddc34c Merge pull request #10416 from ioito/automated-cherry-pick-of-#10414-upstream-release-3.6
Automated cherry pick of #10414: fix: sync cloud tags when set tags
2021-03-14 01:25:31 +08:00
Qu Xuan
9d1c0dbd95 fix: sync cloud tags when set tags 2021-03-13 20:48:39 +08:00
yunion-ci-robot
006ce9dc87 Merge pull request #10412 from ioito/automated-cherry-pick-of-#10410-upstream-release-3.6
Automated cherry pick of #10410: fix: skip zone check when rds change config
2021-03-13 19:22:23 +08:00
yunion-ci-robot
6c9c8d25e9 Merge pull request #10407 from ioito/hotfix/qx-bucket-metadata
fix: tag sync
2021-03-13 19:02:25 +08:00
Qu Xuan
32623f7c73 fix: skip zone check when rds change config 2021-03-13 19:00:40 +08:00
Qu Xuan
0b29451319 fix: tag sync 2021-03-13 17:37:11 +08:00
Zexi Li
aae4fae0c1 Merge pull request #10404 from swordqiu/automated-cherry-pick-of-#10402-upstream-release-3.6
Automated cherry pick of #10402: fix(region): cloud provider filter by domain_id ignore private case
2021-03-12 21:17:19 +08:00
Qiu Jian
0f9f2f6ee5 fix(region): cloud provider filter by domain_id ignore private case 2021-03-12 20:15:04 +08:00
Zexi Li
5cfeffcd70 Merge pull request #10389 from swordqiu/automated-cherry-pick-of-#10387-upstream-release-3.6
Automated cherry pick of #10387: fix(region): fail to update network gateway
2021-03-12 17:38:04 +08:00
Zexi Li
6b7355a9ce Merge pull request #10393 from ioito/automated-cherry-pick-of-#10391-upstream-release-3.6
Automated cherry pick of #10391: fix: sync new project for azure resource group
2021-03-12 17:35:28 +08:00
Zexi Li
f531c60e1d Merge pull request #10397 from rainzm/automated-cherry-pick-of-#10395-upstream-release-3.6
Automated cherry pick of #10395: feat(esxi): update guest os info
2021-03-12 17:34:03 +08:00
rainzm
bfb01f5630 feat(esxi): update guest os info 2021-03-11 16:44:25 +08:00
Qu Xuan
d7a7388431 fix: sync new project for azure resource group 2021-03-11 15:02:27 +08:00
Qiu Jian
112e7aac84 fix(region): fail to update network gateway 2021-03-11 14:54:26 +08:00
Zexi Li
f9d1d28d85 Merge pull request #10384 from swordqiu/automated-cherry-pick-of-#10382-upstream-release-3.6
Automated cherry pick of #10382: fix(region): cloud provider filter by domain
2021-03-11 11:39:19 +08:00
Zexi Li
5d7b73f21e Merge pull request #10373 from rainzm/automated-cherry-pick-of-#10365-upstream-release-3.6
Automated cherry pick of #10365: feat(region): filter schedtags from cloudaccount_id
2021-03-11 11:37:49 +08:00
yunion-ci-robot
2b2b502d64 Merge pull request #10376 from tb365/automated-cherry-pick-of-#10357-upstream-release-3.6
Automated cherry pick of #10357: qcloud redis support multi zones
2021-03-11 10:22:24 +08:00
Qiu Jian
22486c31bd fix(region): cloud provider filter by domain 2021-03-11 01:08:23 +08:00
rainzm
9d3c44fe91 feat(region): filter schedtags from cloudprovider_id 2021-03-10 19:45:15 +08:00
tangbin
5145f1250b fix(region) qcloud multi zone instance sync account fix 2021-03-10 19:11:58 +08:00
tangbin
acd7765b33 feat(region) qcloud redis support multi zones 2021-03-10 19:11:58 +08:00
Zexi Li
8636a26418 Merge pull request #10353 from swordqiu/automated-cherry-pick-of-#10351-upstream-release-3.6
Automated cherry pick of #10351: fix(region): network eip stats not correct
2021-03-10 16:30:58 +08:00
Zexi Li
84664f77cf Merge pull request #10369 from zexi/automated-cherry-pick-of-#10367-upstream-release-3.6
Automated cherry pick of #10367: fix(build): DOCKER_CLI_EXPERIMENTAL=enabled
2021-03-10 16:29:05 +08:00
Zexi Li
2d53b542d3 fix(build): DOCKER_CLI_EXPERIMENTAL=enabled 2021-03-10 16:28:02 +08:00
Zexi Li
e63a207c29 Merge pull request #10363 from swordqiu/automated-cherry-pick-of-#10361-upstream-release-3.6
Automated cherry pick of #10361: fix(keystone): update default role associated policy name
2021-03-09 18:06:43 +08:00
Qiu Jian
845d9a1dc0 fix(keystone): update default role associated policy name 2021-03-09 17:50:34 +08:00
Zexi Li
de6ce2cd77 Merge pull request #10360 from zexi/fix/arm64-build
fix(build): build arm64 image
2021-03-09 17:43:22 +08:00
Zexi Li
4032ae669d fix(build): build arm64 image 2021-03-09 17:42:15 +08:00
Zexi Li
0d436306ad Merge pull request #10355 from zexi/automated-cherry-pick-of-#10189-upstream-release-3.6
Automated cherry pick of #10189: host 编译跨平台兼容
2021-03-09 10:24:53 +08:00
Zhang Dongliang
ec3909af50 host 编译跨平台兼容 2021-03-09 10:24:00 +08:00
Qiu Jian
d443279986 fix(region): network eip stats not correct 2021-03-09 02:48:32 +08:00
yunion-ci-robot
9088996b32 Merge pull request #10347 from zexi/automated-cherry-pick-of-#10345-upstream-release-3.6
Automated cherry pick of #10345: feat(build): make multi arch manifest docker image
2021-03-08 20:20:05 +08:00
Zexi Li
9ac72ed678 Merge pull request #10282 from rainzm/vmware/net_boundary
feat(region): increase the network number and host number limit when recommending the network
2021-03-08 15:06:29 +08:00
Zexi Li
72ee6ff899 Merge pull request #10342 from yousong/automated-cherry-pick-of-#10340-upstream-release-3.6
Automated cherry pick of #10340: etcd: fix "fatal error: concurrent map writes"
2021-03-08 14:18:54 +08:00
Zexi Li
49a7ab8670 Merge pull request #10331 from ioito/automated-cherry-pick-of-#10329-upstream-release-3.6
Automated cherry pick of #10329: fix: optimized bucket tag
2021-03-08 14:13:46 +08:00
Zexi Li
55431b87bb feat(build): make multi arch manifest docker image 2021-03-08 12:53:37 +08:00
Yousong Zhou
bc50f09483 etcd: fix "fatal error: concurrent map writes"
Trace

	goroutine 1270434 [running]:
	runtime.throw(0x4b0cc5e, 0x15)
		/home/yousong/.usr/go/goroot-1.15.6/src/runtime/panic.go:1116 +0x72 fp=0xc0011151f8 sp=0xc0011151c8 pc=0x439292
	runtime.mapdelete_faststr(0x40876e0, 0xc0006a54a0, 0xc001e84200, 0x3e)
		/home/yousong/.usr/go/goroot-1.15.6/src/runtime/map_faststr.go:377 +0x34c fp=0xc001115260 sp=0xc0011151f8 pc=0x41664c
	yunion.io/x/onecloud/pkg/cloudcommon/etcd.(*SEtcdClient).Unwatch(0xc0003130e0, 0xc001e84200, 0x3e)
		/home/yousong/go/src/yunion.io/x/onecloud/pkg/cloudcommon/etcd/etcd.go:353 +0x134 fp=0xc0011152d0 sp=0xc001115260 pc=0x10031f4
	yunion.io/x/onecloud/pkg/compute/models.(*SHostHealthChecker).WatchHost(0xc000c222a0, 0x5229ca0, 0xc000122000, 0xc001fbc4e0, 0x24)
		/home/yousong/go/src/yunion.io/x/onecloud/pkg/compute/models/host_health.go:149 +0xd5 fp=0xc001115338 sp=0xc0011152d0 pc=0x1816395
	yunion.io/x/onecloud/pkg/compute/models.(*SHost).PerformOnline(0xc001fd8400, 0x5229d20, 0xc001c4d440, 0x52a0c60, 0xc000957c40, 0x5298900, 0xc001629aa0, 0x5298900, 0xc001629ae0, 0xc000957c40, ...)
		/home/yousong/go/src/yunion.io/x/onecloud/pkg/compute/models/hosts.go:3829 +0x227 fp=0xc0011153a0 sp=0xc001115338 pc=0x185a387
	yunion.io/x/onecloud/pkg/compute/models.(*SHost).PerformPing(0xc001fd8400, 0x5229d20, 0xc001c4d440, 0x52a0c60, 0xc000957c40, 0x5298900, 0xc001629aa0, 0x5298900, 0xc001629ae0, 0x0, ...)
		/home/yousong/go/src/yunion.io/x/onecloud/pkg/compute/models/hosts.go:3891 +0xbd fp=0xc001115430 sp=0xc0011153a0 pc=0x185acbd
2021-03-08 09:56:07 +08:00
yunion-ci-robot
30acf67d5c Merge pull request #10338 from rainzm/automated-cherry-pick-of-#10336-upstream-release-3.6
Automated cherry pick of #10336: fix(notify): enable filter of contact type 'email' and 'mobile'
2021-03-06 10:57:27 +08:00
rainzm
a2faac7692 fix(notify): enable filter of contact type 'email' and 'mobile' 2021-03-06 03:02:20 +08:00
Qu Xuan
5910ac16cd fix: optimized bucket tag 2021-03-05 15:36:34 +08:00
rainzm
4f462d614c feat(region): increase the network number and host number limit when recommending the network 2021-03-05 11:14:30 +08:00
Zexi Li
ef0387a023 Merge pull request #10326 from tb365/automated-cherry-pick-of-#10322-upstream-release-3.6
Automated cherry pick of #10322: copyright update brand_cn&brand_en fix
2021-03-05 10:15:50 +08:00
tangbin
31fce9fb78 copyright update brand_cn&brand_en fix 2021-03-05 10:01:23 +08:00
Zexi Li
f774e23248 Merge pull request #10318 from rainzm/automated-cherry-pick-of-#10316-upstream-release-3.6
Automated cherry pick of #10316: fix(region): check whether guest is nil
2021-03-04 19:39:06 +08:00
rainzm
024c14d962 fix(region): check whether guest is nil 2021-03-04 17:55:43 +08:00
Zexi Li
b3ac1d0641 Merge pull request #10308 from tb365/automated-cherry-pick-of-#10305-upstream-release-3.6
Automated cherry pick of #10305: infos copyright add brand_en&brand_cn
2021-03-04 15:25:53 +08:00
tangbin
695139c04e infos copyright add brand_en&brand_cn 2021-03-04 11:20:53 +08:00
Zexi Li
26802d4427 Merge pull request #10294 from zhaoxiangchun/automated-cherry-pick-of-#10292-upstream-release-3.6
Automated cherry pick of #10292: fix(monitor): fix monitor export err
2021-03-02 14:29:51 +08:00
zhaoxiangchun
b46f95ae79 fix(monitor): fix monitor export err
1.修复监控导出报错
2.db_dispatcher.ListItems 方法中对exportKeys的处理新增了一个方法
2021-03-02 11:58:06 +08:00
Zexi Li
7e538b255c Merge pull request #10291 from swordqiu/automated-cherry-pick-of-#10289-upstream-release-3.6
Automated cherry pick of #10289: fix(keystone): adjust default system policy names
2021-03-02 10:17:03 +08:00
yunion-ci-robot
9db72f0722 Merge pull request #10288 from zexi/automated-cherry-pick-of-#10286-upstream-release-3.6
Automated cherry pick of #10286: fix(hostdeployer): windows rootfs umount leak
2021-03-02 10:11:21 +08:00
Zexi Li
cc1b6a2d60 fix(hostdeployer): windows rootfs umount leak 2021-03-02 09:52:49 +08:00
Qiu Jian
1411961035 fix(keystone): adjust default system policy names 2021-03-01 21:30:56 +08:00
Zexi Li
33c979d227 Merge pull request #10280 from swordqiu/automated-cherry-pick-of-#10278-upstream-release-3.6
Automated cherry pick of #10278: fix(baremetal-agent): baremetal fail to stop due to power off soft failed
2021-03-01 10:13:39 +08:00
Qiu Jian
a3621b4707 fix(baremetal-agent): baremetal fail to stop due to power off soft failed 2021-02-27 21:50:50 +08:00
Zexi Li
0bece9d948 Merge pull request #10272 from ioito/automated-cherry-pick-of-#10270-upstream-release-3.6
Automated cherry pick of #10270: fix(cloudevent): optimized cloudevent sql
2021-02-25 11:36:00 +08:00
Qu Xuan
14dcb91758 fix(cloudevent): optimized cloudevent sql 2021-02-25 11:34:07 +08:00
Zexi Li
3d869c69bb Merge pull request #10264 from swordqiu/automated-cherry-pick-of-#10262-upstream-release-3.6
Automated cherry pick of #10262: fix(keystone): ensure comparing id with non-utf8 string
2021-02-25 11:24:22 +08:00
Zexi Li
09ef280e33 Merge pull request #10267 from ioito/automated-cherry-pick-of-#10265-upstream-release-3.6
Automated cherry pick of #10265: fix(region): add azure new region
2021-02-25 11:23:09 +08:00
Qu Xuan
4332008c3f fix(region): add azure new region 2021-02-25 10:23:45 +08:00
Qiu Jian
73c0f0350f fix(keystone): ensure comparing id with non-utf8 string 2021-02-25 02:29:55 +08:00
Zexi Li
48a894efdf Merge pull request #10251 from ioito/automated-cherry-pick-of-#10247-upstream-release-3.6
Automated cherry pick of #10247: Automated cherry pick of #10233: fix(region): support peer secgroup
2021-02-24 18:15:41 +08:00
Zexi Li
fc274d5da6 Merge pull request #10260 from tb365/automated-cherry-pick-of-#10258-upstream-release-3.6
Automated cherry pick of #10258: fix(region): redis change spec bugfix
2021-02-24 16:06:40 +08:00
tangbin
e39015fa45 fix(region): redis change spec bugfix 2021-02-24 11:49:23 +08:00
Zexi Li
1bb9801666 Merge pull request #10249 from zexi/automated-cherry-pick-of-#10223-upstream-release-3.6
Automated cherry pick of #10223: fix(host-deployer): mount may fail to lock /etc/mtab, add retrier
2021-02-23 10:36:22 +08:00
Qiu Jian
c22c4f8ef6 fix(host-deployer): mount may fail to lock /etc/mtab, add retrier 2021-02-23 10:25:14 +08:00
Qu Xuan
5584e9af1a fix(region): support peer secgroup 2021-02-23 10:08:54 +08:00
Zexi Li
44e360dcdd Merge pull request #10229 from ioito/automated-cherry-pick-of-#10227-upstream-release-3.6
Automated cherry pick of #10227: fix(region): qcloud quota sync
2021-02-22 20:52:07 +08:00
Zexi Li
a216ef28dd Merge pull request #10243 from zexi/automated-cherry-pick-of-#6083-upstream-release-3.6
Automated cherry pick of #6083: climc: add k8s monitor component
2021-02-22 19:55:51 +08:00
Zexi Li
3b12892172 Merge pull request #10236 from ioito/automated-cherry-pick-of-#10234-upstream-release-3.6
Automated cherry pick of #10234: fix(region): avoid not sync dns zone
2021-02-22 19:49:40 +08:00
Zexi Li
704cce8392 Merge pull request #10242 from tb365/automated-cherry-pick-of-#10240-upstream-release-3.6
Automated cherry pick of #10240: fix(region): set redis reboot timeout to 30 mins
2021-02-22 19:48:17 +08:00
Zexi Li
2fc04497b2 climc: add k8s monitor component 2021-02-22 19:45:40 +08:00
tangbin
bd64be4d8a fix(region): set redis reboot timeout to 30 mins 2021-02-22 18:52:05 +08:00
Qu Xuan
8dd1a897fc fix(region): avoid not sync dns zone 2021-02-22 16:15:12 +08:00
Qu Xuan
57eef5ede6 fix(region): qcloud quota sync 2021-02-22 14:55:54 +08:00
Zexi Li
ff7fa0a520 Merge pull request #10204 from swordqiu/automated-cherry-pick-of-#10202-upstream-release-3.6
Automated cherry pick of #10202: feature(compute): allow live migration without checking Host CPU modes
2021-02-22 08:59:29 +08:00
Zexi Li
0994e8c1ea Merge pull request #10207 from swordqiu/automated-cherry-pick-of-#10205-upstream-release-3.6
Automated cherry pick of #10205: fix(region): host search by any ip
2021-02-18 11:18:33 +08:00
Jian Qiu
d7dc89ccb3 fix(keystone): policy name duplication (#10201)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2021-02-14 19:14:33 +08:00
Qiu Jian
8610731af3 fix(region): host search by any ip 2021-02-13 23:13:43 +08:00
Qiu Jian
3cc72fac65 feature(compute): allow live migration with checking Host CPU modes 2021-02-13 16:33:59 +08:00
Jian Qiu
f7e8c20f43 fix(keystone): hide system scope policies in domain scope view (#10196)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2021-02-08 12:17:18 -03:00
Jian Qiu
dbf8fde45b fix(scheduler): storage medium type should not exact match (#10192)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2021-02-08 12:15:04 -03:00
yunion-ci-robot
a6a3332e64 Merge pull request #10151 from wanyaoqi/automated-cherry-pick-of-#10149-upstream-release-3.6
Automated cherry pick of #10149: chore(utils): add deb build script
2021-02-08 05:51:59 +08:00
yunion-ci-robot
ca55fbd641 Merge pull request #10186 from swordqiu/automated-cherry-pick-of-#10158-upstream-release-3.6
Automated cherry pick of #10158: fix(apigateway): add enable_quota_check and return-domain-list
2021-02-08 05:49:59 +08:00
Qiu Jian
4ee32ef454 fix(apigateway): add enable_quota_check and return-domain-list attributes to fe params 2021-02-07 17:00:17 +08:00
yunion-ci-robot
eeb2fcfbc8 Merge pull request #10185 from zhaoxiangchun/automated-cherry-pick-of-#10183-upstream-release-3.6
Automated cherry pick of #10183: fix(monitor,host): replace space to '+' when write to influxdb and replace '+' to space  when query
2021-02-07 16:07:59 +08:00
zhaoxiangchun
8612095454 fix(monitor,host): replace space to '+' when write to influxdb and replace '+' to space when query
1.写入influxdb时tag 中不允许存在空格
2021-02-07 14:57:51 +08:00
yunion-ci-robot
7612f85c6a Merge pull request #10148 from zexi/automated-cherry-pick-of-#10146-upstream-release-3.6
Automated cherry pick of #10146: Feature/baremetal h3c oem
2021-02-06 13:33:22 +08:00
Zexi Li
c09c5cac79 Merge pull request #10175 from swordqiu/automated-cherry-pick-of-#10173-upstream-release-3.6
Automated cherry pick of #10173: fix(keystone): cas sso may create new project whenever user login
2021-02-06 10:35:56 +08:00
Qiu Jian
50473268f9 fix(keystone): cas sso may create new project whenever user login 2021-02-06 03:21:01 +08:00
Zexi Li
010ed4f9ad Merge pull request #10145 from swordqiu/automated-cherry-pick-of-#10143-upstream-release-3.6
Automated cherry pick of #10143: fix(baremetal): try channel 8 for default profile
2021-02-05 14:54:31 +08:00
Zexi Li
eefe0aa8cb Merge pull request #10165 from ioito/automated-cherry-pick-of-#10163-upstream-release-3.6
Automated cherry pick of #10163: fix(cloudid): sync role policy
2021-02-05 14:36:18 +08:00
Qu Xuan
a11e5d14de fix(cloudid): sync role policy 2021-02-05 14:00:20 +08:00
wanyaoqi
a1eed47e66 chore(utils): add deb build script 2021-02-04 15:13:56 +08:00
Zexi Li
50fe044cfc feat(baremetal): support H3C oem baremetal 2021-02-04 14:11:50 +08:00
Qiu Jian
cdb97511c3 fix(baremetal): try channel 8 for default profile 2021-02-04 13:23:57 +08:00
yunion-ci-robot
6be7e015d3 Merge pull request #10142 from swordqiu/automated-cherry-pick-of-#10140-upstream-release-3.6
Automated cherry pick of #10140: fix(region): bucket size stats should not count invalid sizes of -1
2021-02-04 13:16:51 +08:00
Zexi Li
0eef67fafb Merge pull request #10139 from ioito/automated-cherry-pick-of-#10137-upstream-release-3.6
Automated cherry pick of #10137: fix(region): delete not exist disk failed
2021-02-04 11:37:10 +08:00
Qiu Jian
bbb538b93d fix(region): bucket size stats should not count invalid sizes of -1 2021-02-04 11:24:43 +08:00
Qu Xuan
4acb2757a9 fix(region): delete not exist disk failed 2021-02-04 11:03:56 +08:00
Zexi Li
d85883780d Merge pull request #10132 from ioito/automated-cherry-pick-of-#10130-upstream-release-3.6
Automated cherry pick of #10130: fix(hostman): fix kvm create disk failed error
2021-02-03 20:38:50 +08:00
Qu Xuan
e76abe883b fix(hostman): fix kvm create disk failed error 2021-02-03 20:17:25 +08:00
Zexi Li
a82f00aae7 Merge pull request #10098 from ioito/automated-cherry-pick-of-#10096-upstream-release-3.6
Automated cherry pick of #10096: fix(region): filter resource by classic vpc
2021-02-03 09:48:26 +08:00
Zexi Li
1bfa27bc49 Merge pull request #10101 from ioito/automated-cherry-pick-of-#10099-upstream-release-3.6
Automated cherry pick of #10099: fix(hostman): avoid panic when disk is nil
2021-02-03 09:47:37 +08:00
Zexi Li
ec688fd206 Merge pull request #10111 from ioito/automated-cherry-pick-of-#10109-upstream-release-3.6
Automated cherry pick of #10109: fix(region): avoid sync huawei unusable account
2021-02-02 22:06:29 +08:00
Zexi Li
20f55fe992 Merge pull request #10106 from ioito/automated-cherry-pick-of-#10104-upstream-release-3.6
Automated cherry pick of #10104: fix(region): delete virtual nics with network
2021-02-02 21:04:11 +08:00
Zexi Li
1fe7a54218 Merge pull request #10119 from wanyaoqi/automated-cherry-pick-of-#10117-upstream-release-3.6
Automated cherry pick of #10117: fix(region): add option auto reconcile backup servers
2021-02-02 20:11:12 +08:00
Zexi Li
24bf2a163a Merge pull request #10124 from rainzm/automated-cherry-pick-of-#10122-upstream-release-3.6
Automated cherry pick of #10122: fix(region): check the global network situation when expanding the network
2021-02-02 20:06:19 +08:00
rainzm
ea4505ae55 fix(region): check the global network situation when expanding the network 2021-02-02 19:49:53 +08:00
wanyaoqi
3bcb337a4b fix(region): add option auto reconcile backup servers 2021-02-02 18:32:01 +08:00
Qu Xuan
7ee2026b21 fix(region): avoid sync huawei unusable account 2021-02-02 14:39:28 +08:00
Qu Xuan
ebe79b12d1 fix(region): delete virtual nics with network 2021-02-02 10:53:52 +08:00
Qu Xuan
650ccdd7c7 fix(hostman): avoid panic when disk is nil 2021-02-01 22:02:49 +08:00
Zexi Li
68e006b71c Merge pull request #10095 from ioito/automated-cherry-pick-of-#10093-upstream-release-3.6
Automated cherry pick of #10093: fix(region): avoid update tags task loop
2021-02-01 20:34:48 +08:00
Qu Xuan
57efd8a86b fix(region): filter resource by classic vpc 2021-02-01 20:16:28 +08:00
Qu Xuan
3aa83bb86d fix(region): avoid update tags task loop 2021-02-01 19:59:10 +08:00
Zexi Li
de926037dc Merge pull request #10069 from swordqiu/automated-cherry-pick-of-#10067-upstream-release-3.6
Automated cherry pick of #10067: fix(keystone): SSO created user name may be duplicated
2021-01-30 10:42:03 +08:00
Zexi Li
df4f30ac47 Merge pull request #10075 from wanyaoqi/automated-cherry-pick-of-#10073-upstream-release-3.6
Automated cherry pick of #10073: fix(host-deployer): remove escape character on windows passwd
2021-01-30 10:40:17 +08:00
Zexi Li
96e443f90b Merge pull request #10085 from zhaoxiangchun/automated-cherry-pick-of-#10083-upstream-release-3.6
Automated cherry pick of #10083: fix(monitor): fix alert notify info do not contain resourceName
2021-01-30 10:37:16 +08:00
Zexi Li
dfa4d87702 Merge pull request #10089 from rainzm/automated-cherry-pick-of-#10086-upstream-release-3.6
Automated cherry pick of #10086: fix(notify): be compatible with member's permission changes
2021-01-30 10:36:27 +08:00
rainzm
4e199b84eb fix(notify): be compatible with member's permission changes
every user can create, modify and delete their own receiver info
2021-01-29 20:13:31 +08:00
zhaoxiangchun
c17fe2df22 fix(monitor): fix alert notify info do not contain resourceName 2021-01-29 18:17:47 +08:00
wanyaoqi
754d046d3a fix(host-deployer): remove escape character on windows passwd 2021-01-29 11:57:24 +08:00
Qiu Jian
20380ae9e6 fix(keystone): SSO created user name may be duplicated 2021-01-29 00:01:29 +08:00
Zexi Li
47d38a253a Merge pull request #10046 from rainzm/automated-cherry-pick-of-#10042-upstream-release-3.6
Automated cherry pick of #10042: Optimize the error message when logging in
2021-01-28 20:48:13 +08:00
Zexi Li
d366048e51 Merge pull request #10057 from ioito/automated-cherry-pick-of-#10055-upstream-release-3.6
Automated cherry pick of #10055: fix(region): add aliyun credit amount check
2021-01-28 20:47:00 +08:00
Zexi Li
410fd2936f Merge pull request #10061 from ioito/automated-cherry-pick-of-#10059-upstream-release-3.6
Automated cherry pick of #10059: fix(region): add huawei credit amount check
2021-01-28 20:46:14 +08:00
Zexi Li
90e10db57c Merge pull request #10065 from ioito/automated-cherry-pick-of-#10063-upstream-release-3.6
Automated cherry pick of #10063: fix(region): avoid stuck at http request
2021-01-28 20:04:03 +08:00
Qu Xuan
9975543ddb fix(region): avoid stuck at http request 2021-01-28 18:24:11 +08:00
Qu Xuan
0c658ec53f fix(region): add huawei credit amount check 2021-01-28 16:59:34 +08:00
Qu Xuan
58fb3fc9e2 fix(region): add aliyun credit amount check 2021-01-28 16:01:46 +08:00
Zexi Li
f74635f3da Merge pull request #10050 from ioito/automated-cherry-pick-of-#10048-upstream-release-3.6
Automated cherry pick of #10048: fix(region): secgroup priority fix
2021-01-28 15:12:13 +08:00
Qu Xuan
f4972c22ba fix(region): secgroup priority fix 2021-01-28 14:21:28 +08:00
rainzm
6f2bdfa22f feat(locale): update 2021-01-28 10:26:56 +08:00
rainzm
e3d3c1f029 feat(apigateway): differentiate error messages when logging in 2021-01-28 10:08:35 +08:00
rainzm
2fd40396c4 feat(keystone): more specific error return during authentication
add error class UserNotFound, UserLocked, UserDisabled and WrongPassword
2021-01-28 10:08:35 +08:00
Zexi Li
f416fe126c Merge pull request #10044 from rainzm/automated-cherry-pick-of-#9948-upstream-release-3.6
Automated cherry pick of #9948: feat(keystone,apigateway): return a readable message when the user is locked or disabled
2021-01-28 10:02:01 +08:00
rainzm
cb7956f1f1 feat(keystone,apigateway): return a readable message when the user is locked or disabled 2021-01-28 09:59:35 +08:00
Yousong Zhou
8ca6cfa3d3 Merge pull request #10034 from yousong/automated-cherry-pick-of-#10032-upstream-release-3.6
Automated cherry pick of #10032: Feature/yousong wire bw filter
2021-01-27 18:54:16 +08:00
Yousong Zhou
e467ef6ec7 feat(climc): wires: allow filter by bandwidth 2021-01-27 10:34:49 +08:00
Yousong Zhou
861cd47e62 feat(region): wire: allow filter by bandwidth 2021-01-27 10:34:49 +08:00
Zexi Li
d515e5e32c Merge pull request #9946 from rainzm/automated-cherry-pick-of-#9944-upstream-release-3.6
Automated cherry pick of #9944: fix(notify): add index fro receiver_notification
2021-01-27 09:06:34 +08:00
Zexi Li
71c0cc65ee Merge pull request #10027 from ioito/automated-cherry-pick-of-#10025-upstream-release-3.6
Automated cherry pick of #10025: fix(region): purge snapshot with not status check
2021-01-27 09:03:05 +08:00
Zexi Li
86896da1f6 Merge pull request #10022 from ioito/automated-cherry-pick-of-#10018-upstream-release-3.6
Automated cherry pick of #10018: fix(region): optimized secgroup rule sync
2021-01-26 14:53:34 +08:00
Qu Xuan
67082f32d3 fix(region): purge snapshot with not status check 2021-01-26 14:49:14 +08:00
Qu Xuan
b96b2f0b53 fix(region): optimized secgroup rule sync 2021-01-26 14:11:30 +08:00
Zexi Li
a8a2a248df Merge pull request #10012 from swordqiu/automated-cherry-pick-of-#10010-upstream-release-3.6
Automated cherry pick of #10010: fix(region): exported number of vpcs less than listed
2021-01-25 21:06:33 +08:00
Zexi Li
3997f6fbe6 Merge pull request #10005 from wanyaoqi/automated-cherry-pick-of-#10003-upstream-release-3.6
Automated cherry pick of #10003: fix(host): fix wait time after execute mount fuse fs
2021-01-25 21:05:47 +08:00
Zexi Li
05efb17d35 Merge pull request #10015 from swordqiu/automated-cherry-pick-of-#10013-upstream-release-3.6
Automated cherry pick of #10013: fix(keystone): user create without password can login with any password
2021-01-25 21:03:31 +08:00
Qiu Jian
2af9104d96 fix(keystone): user create without password can login with any password 2021-01-23 23:51:31 +08:00
yunion-ci-robot
a0d99cf879 Merge pull request #9997 from ioito/automated-cherry-pick-of-#9995-upstream-release-3.6
Automated cherry pick of #9995: fix(region): aws not support create server with public ip
2021-01-23 22:47:37 +08:00
Qiu Jian
a8d550d4d8 fix(region): exported number of vpcs less than listed 2021-01-23 20:11:33 +08:00
wanyaoqi
5ccece54ac fix(host): fix wait time after mount fuse fs 2021-01-22 19:19:36 +08:00
Qu Xuan
180b122167 fix(region): aws not support create server with public ip 2021-01-22 10:45:15 +08:00
Zexi Li
78ba5e2fd8 Merge pull request #9968 from ioito/automated-cherry-pick-of-#9966-upstream-release-3.6
Automated cherry pick of #9966: fix(cloudevent): update aliyun lookupevent api
2021-01-22 02:53:38 +08:00
Zexi Li
9f5256c344 Merge pull request #9976 from yousong/automated-cherry-pick-of-#9974-upstream-release-3.6
Automated cherry pick of #9974: fix(region): cloudaccount: allow only one sync func in flight
2021-01-22 02:47:17 +08:00
Zexi Li
cdd032c711 Merge pull request #9986 from ioito/automated-cherry-pick-of-#9973-upstream-release-3.6
Automated cherry pick of #9973: fix(region): avoid clean all rules when sync secgroups
2021-01-22 00:39:04 +08:00
Zexi Li
81133a53a2 Merge pull request #9983 from rainzm/automated-cherry-pick-of-#9981-upstream-release-3.6
Automated cherry pick of #9981: fix(notify): send websocket messages according to language preference
2021-01-21 21:33:49 +08:00
Qu Xuan
c6893892d9 fix(region): avoid clean all rules when sync secgroups 2021-01-21 21:30:47 +08:00
rainzm
8a9f3e09ea fix(notify): send websocket messages according to language preference 2021-01-21 19:51:03 +08:00
Yousong Zhou
606b241b0d fix(region): cloudaccount: allow only one sync func in flight
Ref https://github.com/yunionio/onecloud/pull/6859
2021-01-21 16:23:05 +08:00
Qu Xuan
178a7071f0 fix(cloudevent): update aliyun lookupevent api 2021-01-21 15:18:27 +08:00
Zexi Li
27e5ff8635 Merge pull request #9962 from zhaoxiangchun/automated-cherry-pick-of-#9960-upstream-release-3.6
Automated cherry pick of #9960: fix(monitor): domain view can list scope is domain or project alertrecords; fix nodata alert return info
2021-01-21 12:45:04 +08:00
zhaoxiangchun
5dc1486e7f fix(monitor): domain view can list scope is domain or project alertrecords; fix nodata alert return info 2021-01-20 11:51:46 +08:00
Zexi Li
6a50fce0ab Merge pull request #9936 from rainzm/automated-cherry-pick-of-#9934-upstream-release-3.6
Automated cherry pick of #9934: feat(notify): clean data for receiver_notifications
2021-01-20 03:19:29 +08:00
Zexi Li
132a00d8e0 Merge pull request #9954 from ioito/automated-cherry-pick-of-#9952-upstream-release-3.6
Automated cherry pick of #9952: fix(region): fix zstack delete server with local disks
2021-01-20 02:25:35 +08:00
Qu Xuan
fed6395132 fix(region): fix zstack delete server with local disks 2021-01-19 18:10:38 +08:00
rainzm
7c87d73d95 fix(notify): add index fro receiver_notification 2021-01-19 15:54:04 +08:00
yunion-ci-robot
a73c3c8d0e Merge pull request #9940 from ioito/automated-cherry-pick-of-#9938-upstream-release-3.6
Automated cherry pick of #9938: fix(region): azure default subscription id
2021-01-18 21:41:23 +08:00
Qu Xuan
f3a567f630 fix(region): azure default subscription id 2021-01-18 21:25:20 +08:00
rainzm
5160669550 feat(notify): clean data for receiver_notifications 2021-01-18 19:48:45 +08:00
Zexi Li
e1c5ebc29c Merge pull request #9927 from rainzm/automated-cherry-pick-of-#9925-upstream-release-3.6
Automated cherry pick of #9925: Notify Optimization
2021-01-18 11:47:06 +08:00
rainzm
de1553770c fix(notify): add a time limit for resending notifications 2021-01-18 11:14:45 +08:00
rainzm
928c0602dd feat(notify): delete the notification 1 month ago and remove the data migration 2021-01-18 11:14:45 +08:00
Zexi Li
6cc34c6fb1 Merge pull request #9924 from rainzm/automated-cherry-pick-of-#9922-upstream-release-3.6
Automated cherry pick of #9922: fix(notify): remote 'lang' filter when contact type is 'mobile'
2021-01-18 10:24:23 +08:00
rainzm
4885025618 fix(notify): remote 'lang' filter when contact type is 'mobile' 2021-01-17 20:56:55 +08:00
yunion-ci-robot
68ebbbcbcc Merge pull request #9912 from ioito/automated-cherry-pick-of-#9910-upstream-release-3.6
Automated cherry pick of #9910: fix(region): avoid azure detach disk failed
2021-01-17 11:40:31 +08:00
Jian Qiu
040a45aa46 fix(cloudcommon): missing set_meta opslog (#9916)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2021-01-17 11:33:28 +08:00
Qu Xuan
299d3bed6e fix(region): avoid azure detach disk failed 2021-01-16 18:38:07 +08:00
yunion-ci-robot
c4c302236f Merge pull request #9909 from zhaoxiangchun/automated-cherry-pick-of-#9907-upstream-release-3.6
Automated cherry pick of #9907: feat(monitor): influxQuery add P95 reduce
2021-01-16 12:42:29 +08:00
zhaoxiangchun
88bcb82197 feat(monitor): query reduce percentile
1.增加reduce.type == percentile ,进行对应数值处理
2021-01-16 12:01:15 +08:00
Zexi Li
80a9ed9a79 Merge pull request #9890 from ioito/automated-cherry-pick-of-#9888-upstream-release-3.6
Automated cherry pick of #9888: fix(cloudid): optimized saml sso
2021-01-15 09:08:31 +08:00
Zexi Li
f4f973429d Merge pull request #9897 from ioito/automated-cherry-pick-of-#9895-upstream-release-3.6
Automated cherry pick of #9895: fix(region): update google latitude and langtitude
2021-01-14 23:50:03 +08:00
Qu Xuan
863a28f294 fix(region): update google latitude and langtitude 2021-01-14 20:53:14 +08:00
Qu Xuan
8858e7913c fix(cloudid): optimized saml sso 2021-01-14 18:14:29 +08:00
Zexi Li
6254b64d5d Merge pull request #9886 from ioito/automated-cherry-pick-of-#9856-upstream-release-3.6
Automated cherry pick of #9856: fix(region): optimized azure reset linux pasword
2021-01-14 17:39:46 +08:00
Zexi Li
43f8ac0027 Merge pull request #9884 from rainzm/automated-cherry-pick-of-#9882-upstream-release-3.6
Automated cherry pick of #9882: Fix Notifition about Panic_Error Send too much
2021-01-14 14:50:07 +08:00
Qu Xuan
36bd1baafe fix(region): optimized azure reset linux pasword 2021-01-14 14:44:20 +08:00
rainzm
98ca80e630 feat(notify): change default verify expire interval 5m => 2m 2021-01-14 14:26:04 +08:00
rainzm
a2613e6bce fix(notify): update receiver's lang when update event occurs 2021-01-14 14:26:04 +08:00
rainzm
a8b14bb739 fix(notify): panic for err 2021-01-14 14:26:04 +08:00
Zexi Li
4850c4f8e2 Merge pull request #9880 from zhaoxiangchun/automated-cherry-pick-of-#9879-upstream-release-3.6
Automated cherry pick of #9879: feat(monitor): influxQuery add P95 reduce
2021-01-14 11:05:29 +08:00
zhaoxiangchun
64dec4254f feat(monitor): influxQuery add P95 reduce 2021-01-14 10:48:34 +08:00
Zexi Li
ada90754f9 Merge pull request #9874 from swordqiu/automated-cherry-pick-of-#9872-upstream-release-3.6
Automated cherry pick of #9872: fix(region): AWS buckets in us-east-1 have null location
2021-01-14 09:36:28 +08:00
Qiu Jian
fb3456c42d fix(region): AWS buckets in us-east-1 have null location 2021-01-14 09:12:35 +08:00
Zexi Li
cefbeb7a14 Merge pull request #9867 from zhaoxiangchun/automated-cherry-pick-of-#9865-upstream-release-3.6
Automated cherry pick of #9865: feat(monitor): support monitor overview influxdb query pass through
2021-01-13 21:12:20 +08:00
zhaoxiangchun
1fc01ebe94 feat(monitor): support monitor overview influxdb query pass through
1.监控总览支持查询穿透
2021-01-13 16:19:55 +08:00
Zexi Li
ff0606f166 Merge pull request #9864 from rainzm/automated-cherry-pick-of-#9862-upstream-release-3.6
Automated cherry pick of #9862: fix(notify): set status after sending
2021-01-13 16:10:46 +08:00
rainzm
83dd534241 fix(notify): set status after sending 2021-01-13 15:49:15 +08:00
Zexi Li
a7771885cf Merge pull request #9859 from rainzm/automated-cherry-pick-of-#9857-upstream-release-3.6
Automated cherry pick of #9857: fix(notify): set ModelManager in Receiver()
2021-01-13 14:41:34 +08:00
rainzm
88fa743e4e fix(notify): set ModelManager in Receiver() 2021-01-13 09:56:28 +08:00
Zexi Li
0e917bb275 Merge pull request #9849 from rainzm/automated-cherry-pick-of-#9847-upstream-release-3.6
Automated cherry pick of #9847: feat(notify): send notifications of different templates according to language
2021-01-12 10:29:51 +08:00
Zexi Li
cd76ce27c3 Merge pull request #9838 from swordqiu/automated-cherry-pick-of-#9836-upstream-release-3.6
Automated cherry pick of #9836: fix(keystone): add suggestion previliges to meter admin
2021-01-12 10:26:35 +08:00
Zexi Li
114de75e7e Merge pull request #9834 from ioito/automated-cherry-pick-of-#9833-upstream-release-3.6
Automated cherry pick of #9833: fix(cloudid): multi cloudaccount with saml user
2021-01-12 10:25:25 +08:00
Zexi Li
047509ebb8 Merge pull request #9843 from tb365/automated-cherry-pick-of-#9841-upstream-release-3.6
Automated cherry pick of #9841: server skus filter by mem size fix
2021-01-11 22:37:36 +08:00
Zexi Li
71e79e5a7b Merge pull request #9846 from yousong/automated-cherry-pick-of-#9844-upstream-release-3.6
Automated cherry pick of #9844: Feature/yousong i18n apigateway
2021-01-11 22:27:49 +08:00
Zexi Li
4c62508b01 Merge pull request #9852 from zhaoxiangchun/automated-cherry-pick-of-#9851-upstream-release-3.6
Automated cherry pick of #9851: fix(monitor): monitor overview throw err
2021-01-11 22:25:39 +08:00
zhaoxiangchun
e5b637906c fix(monitor): monitor overview throw err 2021-01-11 21:26:16 +08:00
rainzm
dd7d34402f feat(notify): send notifications of different templates according to language 2021-01-11 19:46:03 +08:00
Yousong Zhou
157bfb696b apigateway: try return httperrors 2021-01-11 18:35:51 +08:00
Yousong Zhou
464e0450f9 locales: generate 2021-01-11 18:35:51 +08:00
Yousong Zhou
a4b5562bd0 locales: zh-CN: add some translations 2021-01-11 18:35:51 +08:00
Yousong Zhou
f0354d0c9b locales: generate 2021-01-11 18:29:14 +08:00
Yousong Zhou
c3c3c00759 locales: zh-CN: extract current 2021-01-11 18:27:30 +08:00
Yousong Zhou
83adeaae4e apigateway: reword error messages 2021-01-11 17:51:33 +08:00
Yousong Zhou
d7f05e983f keystone: reword error messages 2021-01-11 17:51:33 +08:00
tangbin
5d075bbaaf server skus filter by mem size fix 2021-01-11 14:41:51 +08:00
Qiu Jian
86fda0f7d0 fix(keystone): add suggestion previliges to meter admin 2021-01-11 02:07:44 +08:00
Qu Xuan
53c8c16052 fix(cloudid): multi cloudaccount with saml user 2021-01-10 20:00:25 +08:00
Zexi Li
46ba9cd424 Merge pull request #9831 from tb365/automated-cherry-pick-of-#9830-upstream-release-3.6
Automated cherry pick of #9830: loadbalancer add lb purge validate
2021-01-09 19:58:29 +08:00
Zexi Li
ee59f2a410 Merge pull request #9795 from tb365/automated-cherry-pick-of-#9793-upstream-release-3.6
Automated cherry pick of #9793: feat(region): server sku os_arch & cpu_arch checking
2021-01-09 19:57:17 +08:00
Zexi Li
5cfbb416b3 Merge pull request #9818 from zhaoxiangchun/automated-cherry-pick-of-#9817-upstream-release-3.6
Automated cherry pick of #9817: fix(monitor): fix monitoroverview and meter send alerting info to  notify
2021-01-09 19:56:05 +08:00
Zexi Li
a711f832e6 Merge pull request #9827 from rainzm/automated-cherry-pick-of-#9825-upstream-release-3.6
Automated cherry pick of #9825: fix(notify): avoid duplication of notification names
2021-01-09 19:54:51 +08:00
tangbin
f31216be0e loadbalancer add lb purge validate 2021-01-09 19:20:36 +08:00
rainzm
bc0106902a fix(notify): avoid duplication of notification names 2021-01-09 18:46:52 +08:00
yunion-ci-robot
2dbfc80fac Merge pull request #9810 from tb365/automated-cherry-pick-of-#9808-upstream-release-3.6
Automated cherry pick of #9808: fix(region): aws elb backendgroup sync bugfix
2021-01-09 16:55:09 +08:00
tangbin
4fa95bf608 fix(region): aws elb backendgroup sync bugfix 2021-01-09 16:12:44 +08:00
zhaoxiangchun
af0813cd09 fix(monitor): fix monitoroverview and meter send alerting info to notify
1.调整报警总览中今日报警数量计算逻辑
2.报警模版的web路径支持跳转到不同web页面:监控报警和meter
3.nodata 前端可配制功能fix
2021-01-09 15:34:04 +08:00
Zexi Li
3b5602e1ea Merge pull request #9800 from ioito/automated-cherry-pick-of-#9798-upstream-release-3.6
Automated cherry pick of #9798: fix(region): optimized for qcloud prepaid instance delete
2021-01-09 15:33:14 +08:00
Zexi Li
e4f7d3233c Merge pull request #9815 from rainzm/automated-cherry-pick-of-#9813-upstream-release-3.6
Automated cherry pick of #9813: fix(notify): loose phone number rules in updating receiver
2021-01-09 13:03:52 +08:00
rainzm
287f98ac86 fix(notify): loose phone number rules in updating receiver 2021-01-09 11:32:31 +08:00
Zexi Li
bb44f1cdfb Merge pull request #9804 from rainzm/automated-cherry-pick-of-#9802-upstream-release-3.6
Automated cherry pick of #9802: fix(notify): loose mobile phone number matching rules
2021-01-08 14:19:50 +08:00
rainzm
644ab6f925 fix(notify): loose mobile phone number matching rules 2021-01-08 12:03:00 +08:00
Qu Xuan
e775e798aa fix(region): optimized for qcloud prepaid instance delete 2021-01-08 11:32:58 +08:00
tangbin
331d9d2a67 feat(region): server sku os_arch & cpu_arch checking 2021-01-08 10:35:08 +08:00
Zexi Li
d5ed96a651 Merge pull request #9792 from wanyaoqi/automated-cherry-pick-of-#9790-upstream-release-3.6
Automated cherry pick of #9790: fix(host-deployer): add retry on check is vgactived
2021-01-07 21:18:13 +08:00
Zexi Li
4ce85f310b Merge pull request #9787 from yousong/automated-cherry-pick-of-#9785-upstream-release-3.6
Automated cherry pick of #9785: guest_deploy_task: log other deploy details with i18n
2021-01-07 21:16:39 +08:00
Zexi Li
3f6e669324 Merge pull request #9784 from zhaoxiangchun/automated-cherry-pick-of-#9782-upstream-release-3.6
Automated cherry pick of #9782: fix(monitor,suggestion): order commonalert metric and modify alertresoruce type value and add suggestion models climc
2021-01-07 21:14:46 +08:00
wanyaoqi
3f4b2163f3 fix(host-deployer): add retry on check is vgactived 2021-01-07 19:28:09 +08:00
Yousong Zhou
78b6f85662 guest_deploy_task: log other deploy details with i18n
Fixes 9f350392 ("add service tag for actionlog")
2021-01-07 11:40:27 +08:00
zhaoxiangchun
3124113e2f fix(monitor,suggestion): order commonalert metric and modify alertresoruce type value and add suggestion models climc
1.修改监控metric排序
2.统一报警资源type和监控报警中res_type 进行统一,前端可以统一展示
3.增加suggestion服务相关climc
2021-01-06 21:31:31 +08:00
Zexi Li
38b34239cd Merge pull request #9780 from ioito/automated-cherry-pick-of-#9778-upstream-release-3.6
Automated cherry pick of #9778: fix(region): avoid auzre request timeout
2021-01-06 21:23:27 +08:00
Zexi Li
370b35852c Merge pull request #9777 from ioito/automated-cherry-pick-of-#9775-upstream-release-3.6
Automated cherry pick of #9775: fix(cloudevent): default policy
2021-01-06 21:23:08 +08:00
Zexi Li
f7c8bbc00b Merge pull request #9773 from ioito/automated-cherry-pick-of-#9771-upstream-release-3.6
Automated cherry pick of #9771: fix(region): avoid panic when register service not work
2021-01-06 21:21:47 +08:00
Qu Xuan
f64c6c54da fix(region): avoid auzre request timeout 2021-01-06 15:34:14 +08:00
Qu Xuan
c4db4bc43e fix(cloudevent): default policy 2021-01-06 14:05:35 +08:00
Qu Xuan
1afe6ef41b fix(region): avoid panic when register service not work 2021-01-05 21:20:04 +08:00
Zexi Li
83896cdcc3 Merge pull request #9764 from wanyaoqi/automated-cherry-pick-of-#9762-upstream-release-3.6
Automated cherry pick of #9762: feat(region): stop guest before freeze
2021-01-05 18:33:32 +08:00
wanyaoqi
38914b967d feat(region): stop guest before freeze 2021-01-05 15:19:13 +08:00
Zexi Li
7695eb905c Merge pull request #9758 from zhaoxiangchun/automated-cherry-pick-of-#9757-upstream-release-3.6
Automated cherry pick of #9757: fix(monitor): modify totalrecord query
2021-01-04 15:57:09 +08:00
zhaoxiangchun
562aefda85 fix(monitor): modify totalrecord query
1. influxdb 增加abs function
2. 调整total报警记录接口query
2021-01-04 15:40:57 +08:00
Zexi Li
0143d271e1 Merge pull request #9756 from zhaoxiangchun/automated-cherry-pick-of-#9754-upstream-release-3.6
Automated cherry pick of #9754: feat(monitor): get today alerting resource info
2020-12-31 20:23:52 +08:00
zhaoxiangchun
de2b95cab7 feat(monitor): get today alerting resource info
1.提供接口获取当前时间发生报警的资源统计
2020-12-31 20:09:16 +08:00
Zexi Li
fc5a78c7e3 Merge pull request #9751 from rainzm/automated-cherry-pick-of-#9750-upstream-release-3.6
Automated cherry pick of #9750: feat(region): be compatible with changes in monitor api in scaling group
2020-12-30 21:45:01 +08:00
Zexi Li
3986dbc434 Merge pull request #9740 from zhaoxiangchun/automated-cherry-pick-of-#9735-upstream-release-3.6
Automated cherry pick of #9735: fix(monitor): modify rds,redis,oss field descriptions
2020-12-30 21:43:16 +08:00
Zexi Li
192e03fcd7 Merge pull request #9734 from ioito/automated-cherry-pick-of-#9730-upstream-release-3.6
Automated cherry pick of #9730: fix(cloudevent): cloudevent is domain level resource
2020-12-30 21:42:32 +08:00
Zexi Li
44db018039 Merge pull request #9729 from ioito/automated-cherry-pick-of-#9727-upstream-release-3.6
Automated cherry pick of #9727: fix(region): rds list with secgorups info
2020-12-30 21:41:49 +08:00
Zexi Li
6751d1d3af Merge pull request #9736 from wanyaoqi/automated-cherry-pick-of-#9731-upstream-release-3.6
Automated cherry pick of #9731: fix(region): server start check host memory is enough
2020-12-30 21:40:24 +08:00
Zexi Li
5ea100865d Merge pull request #9746 from rainzm/automated-cherry-pick-of-#9744-upstream-release-3.6
Automated cherry pick of #9744: fix(esxiagent): nicIndex should be incremented
2020-12-30 21:35:56 +08:00
rainzm
987b641bd0 feat(region): be compatible with changes in monitor api in scaling group 2020-12-30 19:16:47 +08:00
rainzm
77e56db095 fix(esxiagent): nicIndex should be incremented 2020-12-30 19:02:54 +08:00
Zexi Li
b7629422f7 Merge pull request #9725 from zhaoxiangchun/automated-cherry-pick-of-#9724-upstream-release-3.6
Automated cherry pick of #9724: feat(suggestion,apigateway): add analysispredict climc
2020-12-30 18:54:41 +08:00
zhaoxiangchun
589daf5063 fix(monitor): modify rds,redis,oss field descriptions
1.修改后端redis,rds,oss desc 信息,和前端索引进行对应
2020-12-30 16:09:17 +08:00
wanyaoqi
a066301ae2 fix(region): server start check host memory is enough 2020-12-30 15:50:52 +08:00
Qu Xuan
7d07b4aa5f fix(cloudevent): cloudevent is domain level resource 2020-12-30 15:48:33 +08:00
Qu Xuan
b96f225274 fix(region): rds list with secgorups info 2020-12-30 14:20:03 +08:00
zhaoxiangchun
40c8b54cba feat(suggestion,apigateway): add analysispredict climc 2020-12-30 14:09:02 +08:00
Zexi Li
93879980f5 Merge pull request #9720 from swordqiu/automated-cherry-pick-of-#9719-upstream-release-3.6
Automated cherry pick of #9719: fix(cloudcommon): splitable may not initialize underlying table
2020-12-29 21:17:17 +08:00
Zexi Li
5bb13e48b7 Merge pull request #9716 from wanyaoqi/automated-cherry-pick-of-#9711-upstream-release-3.6
Automated cherry pick of #9711: fix(region,host,host-deployer): sync status chekc block jobs
2020-12-29 20:43:37 +08:00
Zexi Li
64fcdea2b0 Merge pull request #9712 from rainzm/automated-cherry-pick-of-#9693-upstream-release-3.6
Automated cherry pick of #9693: Solve the permission problem of notify to create receiver
2020-12-29 20:41:44 +08:00
Zexi Li
57fa6361fc Merge pull request #9708 from rainzm/automated-cherry-pick-of-#9706-upstream-release-3.6
Automated cherry pick of #9706: feat(region): multilingual timer description
2020-12-29 20:39:31 +08:00
Qiu Jian
732159137b fix(cloudcommon): splitable may not initialize underlying table 2020-12-29 18:54:26 +08:00
wanyaoqi
d2ec564ccc fix(region,host): sync status check block jobs 2020-12-29 15:31:54 +08:00
wanyaoqi
a4323eab43 fix(host-deployer): add log line on blkid failed 2020-12-29 15:31:54 +08:00
wanyaoqi
7335875ef1 fix(climc): host add netif add params bridge/interface 2020-12-29 15:31:54 +08:00
rainzm
8d98218f06 feat(region): multilingual timer description 2020-12-29 15:23:45 +08:00
rainzm
af274d7ad2 feat(db): progressive inspection when determining the required scope 2020-12-29 15:04:28 +08:00
rainzm
25baa6f509 fix(notify): inject domain info in ReceiverManager.FetchOwnerId 2020-12-29 15:04:28 +08:00
407 changed files with 12603 additions and 16723 deletions

View File

@@ -6,6 +6,7 @@ ROOT_DIR := $(CURDIR)
BUILD_DIR := $(ROOT_DIR)/_output
BIN_DIR := $(BUILD_DIR)/bin
BUILD_SCRIPT := $(ROOT_DIR)/build/build.sh
DEB_BUILD_SCRIPT := $(ROOT_DIR)/build/build_deb.sh
ifeq ($(ONECLOUD_CI_BUILD),)
GIT_COMMIT := $(shell git rev-parse --short HEAD)
@@ -64,6 +65,7 @@ endif
cmdTargets:=$(filter-out cmd/host-image,$(wildcard cmd/*))
rpmTargets:=$(foreach b,$(patsubst cmd/%,%,$(cmdTargets)),$(if $(shell [ -f "$(CURDIR)/build/$(b)/vars" ] && echo 1),rpm/$(b)))
debTargets:=$(foreach b,$(patsubst cmd/%,%,$(cmdTargets)),$(if $(shell [ -f "$(CURDIR)/build/$(b)/vars" ] && echo 1),deb/$(b)))
all: build
@@ -87,21 +89,45 @@ vet:
cmd/esxi-agent: prepare_dir
CGO_ENABLED=0 $(GO_BUILD) -o $(BIN_DIR)/$(shell basename $@) $(REPO_PREFIX)/$@
cmd/fetcherfs: prepare_dir
CGO_ENABLED=0 $(GO_BUILD) -o $(BIN_DIR)/$(shell basename $@) $(REPO_PREFIX)/$@
cmd/%: prepare_dir
$(GO_BUILD) -o $(BIN_DIR)/$(shell basename $@) $(REPO_PREFIX)/$@
rpm/%: cmd/%
$(BUILD_SCRIPT) $*
deb/%: cmd/%
$(DEB_BUILD_SCRIPT) $*
pkg/%: prepare_dir
$(GO_INSTALL) $(REPO_PREFIX)/$@
rpm/fetcherfs: cmd/fetcherfs
docker run --rm \
--name docker-centos-build-fetcherfs \
-v $(CURDIR):/data \
registry.cn-beijing.aliyuncs.com/yunionio/centos-build:1.1-4 \
/bin/bash -c "VERSION=3.6 /data/build/build.sh fetcherfs /opt/yunion/fetchclient/bin"
deb/fetcherfs: rpm/fetcherfs
#VERSION=3.6 $(DEB_BUILD_SCRIPT) fetcherfs /opt/yunion/fetchclient/bin
docker run --rm \
--name docker-debian-build-fetcherfs \
-v $(CURDIR):/data \
registry.cn-beijing.aliyuncs.com/yunionio/debian10-base:1.0 \
/data/build/convert_rpm2deb.sh
build:
$(MAKE) $(cmdTargets)
rpm:
$(MAKE) $(rpmTargets)
deb:
$(MAKE) $(debTargets)
rpmclean:
rm -fr $(BUILD_DIR)/rpms
@@ -126,6 +152,11 @@ clean:
fmt:
@git ls-files --exclude '*' '*.go' \
| grep -v '^vendor/' \
| while read f; do \
if ! grep -m1 -q '^// Code generated .* DO NOT EDIT\.$$' "$$f"; then \
echo "$$f"; \
fi ; \
done \
| xargs $(XARGS_FLAGS) gofmt -w
fmt-check: fmt
@@ -198,70 +229,6 @@ mod:
go mod tidy
go mod vendor -v
DOCKER_CENTOS_BUILD_IMAGE?=registry.cn-beijing.aliyuncs.com/yunionio/centos-build:1.1-3
define dockerCentOSBuildCmd
set -o xtrace
set -o errexit
set -o pipefail
cd /root/onecloud
export GOFLAGS=-mod=vendor
make $(1)
chown -R $(shell id -u):$(shell id -g) _output
endef
docker-centos-build: export dockerCentOSBuildCmd:=$(call dockerCentOSBuildCmd,$(F))
docker-centos-build:
docker rm --force onecloud-ci-build &>/dev/null || true
docker run \
--name onecloud-docker-centos-build \
--rm \
--volume $(CURDIR):/root/onecloud \
--volume $(CURDIR)/_output/_cache:/root/.cache \
$(DOCKER_CENTOS_BUILD_IMAGE) \
/bin/bash -c "$$dockerCentOSBuildCmd"
chown -R $$(id -u):$$(id -g) _output
ls -lh _output/bin
# NOTE we need a way to stop and remove the container started by docker-build.
# No --tty, --stop-signal won't work
docker-centos-build-stop:
docker stop --time 0 onecloud-docker-centos-build || true
.PHONY: docker-centos-build
.PHONY: docker-centos-build-stop
DOCKER_ALPINE_BUILD_IMAGE?=registry.cn-beijing.aliyuncs.com/yunionio/alpine-build:1.0-5
define dockerAlpineBuildCmd
set -o xtrace
set -o errexit
set -o pipefail
cd /root/go/src/yunion.io/x/onecloud
export GOFLAGS=-mod=vendor
make $(1)
chown -R $(shell id -u):$(shell id -g) _output
endef
docker-alpine-build: export dockerAlpineBuildCmd:=$(call dockerAlpineBuildCmd,$(F))
docker-alpine-build:
docker rm --force onecloud-docker-alpine-build &>/dev/null || true
docker run --rm \
--name onecloud-docker-alpine-build \
-v $(CURDIR):/root/go/src/yunion.io/x/onecloud \
-v $(CURDIR)/_output/alpine-build:/root/go/src/yunion.io/x/onecloud/_output \
-v $(CURDIR)/_output/alpine-build/_cache:/root/.cache \
$(DOCKER_ALPINE_BUILD_IMAGE) \
/bin/sh -c "$$dockerAlpineBuildCmd"
ls -lh _output/alpine-build/bin
docker-alpine-build-stop:
docker stop --time 0 onecloud-docker-alpine-build || true
.PHONY: docker-alpine-build
.PHONY: docker-alpine-build-stop
define helpText
Build with docker
@@ -321,3 +288,6 @@ image:
%:
@:
ModName:=yunion.io/x/onecloud
include $(CURDIR)/Makefile.common.mk

83
Makefile.common.mk Normal file
View File

@@ -0,0 +1,83 @@
ifeq ($(__inc_Makefile_common_mk),)
__inc_Makefile_common_mk:=1
ifeq ($(ModName),)
$(error ModName must be set, e.g. yunion.io/x/onecloud)
endif
ModBaseName:=$(notdir $(ModName))
DockerImageRegistry?=registry.cn-beijing.aliyuncs.com
DockerImageAlpineBuild?=$(DockerImageRegistry)/yunionio/alpine-build:1.0-5
DockerImageCentOSBuild?=$(DockerImageRegistry)/yunionio/centos-build:1.1-4
EnvIf=$(if $($(1)),$(1)=$($(1)))
define dockerCentOSBuildCmd
set -o xtrace
set -o errexit
set -o pipefail
cd /root/go/src/yunion.io/x/$(ModBaseName)
env \
$(call EnvIf,GOARCH) \
$(call EnvIf,GOOS) \
$(call EnvIf,CGO_ENABLED) \
make $(1)
chown -R $(shell id -u):$(shell id -g) _output
endef
docker-centos-build: export dockerCentOSBuildCmd:=$(call dockerCentOSBuildCmd,$(F))
docker-centos-build:
docker rm --force docker-centos-build-$(ModBaseName) &>/dev/null || true
docker run \
--rm \
--name docker-centos-build-$(ModBaseName) \
-v $(CURDIR):/root/go/src/yunion.io/x/$(ModBaseName) \
-v $(CURDIR)/_output/centos-build:/root/go/src/yunion.io/x/$(ModBaseName)/_output \
-v $(CURDIR)/_output/centos-build/_cache:/root/.cache \
$(DockerImageCentOSBuild) \
/bin/bash -c "$$dockerCentOSBuildCmd"
ls -lh _output/centos-build/bin
# NOTE we need a way to stop and remove the container started by docker-build.
# No --tty, --stop-signal won't work
docker-centos-build-stop:
docker stop --time 0 docker-centos-build-$(ModBaseName) || true
.PHONY: docker-centos-build
.PHONY: docker-centos-build-stop
define dockerAlpineBuildCmd
set -o xtrace
set -o errexit
set -o pipefail
cd /root/go/src/yunion.io/x/$(ModBaseName)
env \
$(call EnvIf,GOARCH) \
$(call EnvIf,GOOS) \
$(call EnvIf,CGO_ENABLED) \
make $(1)
chown -R $(shell id -u):$(shell id -g) _output
endef
docker-alpine-build: export dockerAlpineBuildCmd:=$(call dockerAlpineBuildCmd,$(F))
docker-alpine-build:
docker rm --force docker-alpine-build-$(ModBaseName) &>/dev/null || true
docker run \
--rm \
--name docker-alpine-build-$(ModBaseName) \
-v $(CURDIR):/root/go/src/yunion.io/x/$(ModBaseName) \
-v $(CURDIR)/_output/alpine-build:/root/go/src/yunion.io/x/$(ModBaseName)/_output \
-v $(CURDIR)/_output/alpine-build/_cache:/root/.cache \
$(DockerImageAlpineBuild) \
/bin/sh -c "$$dockerAlpineBuildCmd"
ls -lh _output/alpine-build/bin
docker-alpine-build-stop:
docker stop --time 0 docker-alpine-build-$(ModBaseName) || true
.PHONY: docker-alpine-build
.PHONY: docker-alpine-build-stop
endif # __inc_Makefile_common_mk

View File

@@ -1,12 +1,12 @@
# Yunion OneCloud (云联融合云)
# Yunion Cloud (云联融合云)
[![CircleCI](https://circleci.com/gh/yunionio/onecloud.svg?style=svg)](https://circleci.com/gh/yunionio/onecloud)
[![Build Status](https://travis-ci.com/yunionio/onecloud.svg?branch=master)](https://travis-ci.org/yunionio/onecloud)
[![Go Report Card](https://goreportcard.com/badge/github.com/yunionio/onecloud)](https://goreportcard.com/report/github.com/yunionio/onecloud)
[![CircleCI](https://circleci.com/gh/yunionio/yunioncloud.svg?style=svg)](https://circleci.com/gh/yunionio/yunioncloud)
[![Build Status](https://travis-ci.com/yunionio/yunioncloud.svg?branch=master)](https://travis-ci.org/yunionio/yunioncloud)
[![Go Report Card](https://goreportcard.com/badge/github.com/yunionio/yunioncloud)](https://goreportcard.com/report/github.com/yunionio/yunioncloud)
## 什么是云联融合云?
云联融合云Yunion OneCloud是一个开源的多云平台。融合云构建在用户分布于多云基础设施之上通过技术手段将分布于多云的异构IT资源统一管理将多底层多云的差异向用户屏蔽并通过网络和调度实现资源的融合与打通在多云之上进行抽象向用户呈现统一的使用界面和API接口让用户就像使用一个云平台一样使用分布于多云的资源实现一个统一的“云上之云”的云平台。
云联融合云Yunion Cloud是一个开源的多云平台。融合云构建在用户分布于多云基础设施之上通过技术手段将分布于多云的异构IT资源统一管理将多底层多云的差异向用户屏蔽并通过网络和调度实现资源的融合与打通在多云之上进行抽象向用户呈现统一的使用界面和API接口让用户就像使用一个云平台一样使用分布于多云的资源实现一个统一的“云上之云”的云平台。
鉴于企业IT基础设施的两个趋势1. 企业使用多云基础设施并且公有云是最主要的基础设施提供者2. 企业应用将逐步云原生化企业IT基础设施需要为Kubernetes优化。融合云为此架构而设计。一方面抽象管理底层的多云基础设施另一方面为多云Kubernetes提供运行环境。融合云为企业未来的的IT基础设施架构而设计。
@@ -18,18 +18,18 @@
- 内置私有云
OneCloud内置完备的私有云实现提供对用户本地IDC的虚拟机、物理机和负载均衡等资源管理。
YunionCloud 内置完备的私有云实现提供对用户本地IDC的虚拟机、物理机和负载均衡等资源管理。
- 为多云Kubernetes提供运行环境
OneCloud自身为运行在Kubernetes的云原生应用并且能在多云环境部署运行Kubernetes集群。
YunionCloud 自身为运行在Kubernetes的云原生应用并且能在多云环境部署运行Kubernetes集群。
欢迎安装部署云联融合云,期待大家的反馈!
## 部署
请参考文档 [安装部署](https://docs.yunion.io/docs/setup/) 搭建 OneCloud 集群。
请参考文档 [安装部署](https://docs.yunion.io/docs/setup/) 搭建 YunionCloud 集群。
## 文档
@@ -51,4 +51,4 @@
## License
OneCloud 使用 Apache license 2.0. 详情请看 [LICENSE](./LICENSE) 。
YunionCloud 使用 Apache license 2.0. 详情请看 [LICENSE](./LICENSE) 。

View File

@@ -1,22 +1,22 @@
# Yunion OneCloud
# Yunion Cloud
[![CircleCI](https://circleci.com/gh/yunionio/onecloud.svg?style=svg)](https://circleci.com/gh/yunionio/onecloud)
[![Build Status](https://travis-ci.com/yunionio/onecloud.svg?branch=master)](https://travis-ci.com/yunionio/onecloud/branches)
[![Go Report Card](https://goreportcard.com/badge/github.com/yunionio/onecloud)](https://goreportcard.com/report/github.com/yunionio/onecloud)
[![CircleCI](https://circleci.com/gh/yunionio/yunioncloud.svg?style=svg)](https://circleci.com/gh/yunionio/yunioncloud)
[![Build Status](https://travis-ci.com/yunionio/yunioncloud.svg?branch=master)](https://travis-ci.com/yunionio/yunioncloud/branches)
[![Go Report Card](https://goreportcard.com/badge/github.com/yunionio/yunioncloud)](https://goreportcard.com/report/github.com/yunionio/yunioncloud)
### [README in Chinese](./README-CN.md)
## What is Yunion OneCloud?
## What is Yunion Cloud?
Yunion OneCloud is an open source unified-IaaS cloud platform.
Yunion Cloud is an open source unified-IaaS cloud platform.
As its name sugguests, 'Yun' means 'cloud' in Chinese and 'Yunion OneCloud' means to unify many distinct clouds into the one that behaves like an integral cloud platform.
As its name sugguests, 'Yun' means 'cloud' in Chinese and 'Yunion Cloud' means to unify many distinct clouds into the one that behaves like an integral cloud platform.
As trends show, the enterprise IT infrastructure in the future would be unavoidably heterogeneous and the public clouds should be the major infrastructure providers for many enterprises. Further, the infrastructure would most likely be prepared for the cloud-native applications running on Kubernetes. Yunion OneCloud is built to provide the cloud architecture for this scenario such that it is the middle layer between the underlying cloud infrustructures and the overlay kubernetes clusters across many clouds.
As trends show, the enterprise IT infrastructure in the future would be unavoidably heterogeneous and the public clouds should be the major infrastructure providers for many enterprises. Further, the infrastructure would most likely be prepared for the cloud-native applications running on Kubernetes. Yunion Cloud is built to provide the cloud architecture for this scenario such that it is the middle layer between the underlying cloud infrustructures and the overlay kubernetes clusters across many clouds.
Many may consider Yunion OneCloud as a multi-cloud management platform (MCMP). Rather, we would view it as an IaaS platform as it does not only manage the resources and services from many clouds, but also hides the differences of underlying technologies and exposes one set of APIs that allow programatically interacting with the compute/storage/networking resources across many clouds.
Many may consider Yunion Cloud as a multi-cloud management platform (MCMP). Rather, we would view it as an IaaS platform as it does not only manage the resources and services from many clouds, but also hides the differences of underlying technologies and exposes one set of APIs that allow programatically interacting with the compute/storage/networking resources across many clouds.
Yunion OneCloud is working on abstracting APIs for the following resources:
Yunion Cloud is working on abstracting APIs for the following resources:
* Compute, including virtual machines, images, etc.
* Storage, including disks, snapshots, object storages, etc.
@@ -30,7 +30,7 @@ over the following many cloud providers:
* Private clouds, including OpenStack, etc.
* Public clouds, including Aliyun, AWS, Azure, Tencent Cloud, Huawei Cloud, etc.
You are welcome to install and try Yunion OneCloud. Looking forward to your feedback.
You are welcome to install and try Yunion Cloud. Looking forward to your feedback.
## Installation
@@ -38,7 +38,7 @@ Please refers to [install & deployment](https://docs.yunion.io/docs/setup/) (cur
## Documentations
- [Yunion OneCloud Documents](https://docs.yunion.io/)
- [Yunion Cloud Documents](https://docs.yunion.io/)
- [Swagger API](https://docs.yunion.cn/apiv2/)

76
build/build_deb.sh Executable file
View File

@@ -0,0 +1,76 @@
#!/bin/bash
set -e
if [ -z "$ROOT_DIR" ]; then
pushd $(dirname $(readlink -f "$BASH_SOURCE")) > /dev/null
ROOT_DIR=$(cd .. && pwd)
popd > /dev/null
fi
SRC_BIN=$ROOT_DIR/_output/bin
SRC_BUILD=$ROOT_DIR/build
OUTPUT_DIR=$ROOT_DIR/_output/debs
PKG=$1
BIN_PATH=${2:-/opt/yunion/bin}
if [ -z "$PKG" ]; then
echo "Usage: $0 <package>"
exit 1
fi
BIN="$SRC_BIN/$PKG"
ROOT="$SRC_BUILD/$PKG"
if [ ! -x "$BIN" ]; then
echo "$BIN not exists"
exit 1
fi
if [ ! -x "$ROOT" ]; then
echo "$ROOT not exists"
exit 1
fi
. $ROOT/vars
if [ -z "$VERSION" ]; then
TAG=$(git describe --abbrev=0 --tags || echo 000000)
VERSION=${TAG/\//-}
VERSION=${VERSION/v/}
fi
RELEASE=`date +"%y%m%d%H"`
FULL_VERSION=$VERSION-$RELEASE
BUILDROOT=$OUTPUT_DIR/yunion-$1-$FULL_VERSION
rm -rf $BUILDROOT
mkdir -p $BUILDROOT/DEBIAN
mkdir -p $BUILDROOT/$BIN_PATH
cp -rf $BIN $BUILDROOT/$BIN_PATH
cp -rf $ROOT/root/* $BUILDROOT/
echo "Build root ${BUILDROOT}"
case $(uname -m) in
x86_64)
CURRENT_ARCH=amd64
;;
aarch64)
CURRENT_ARCH=arm64
;;
esac
echo "Package: yunion-$1
Version: $FULL_VERSION
Section: base
Priority: optional
Architecture: $CURRENT_ARCH
Maintainer: wanyaoqi@yunionyun.com
Description: Yunion $1
" > $BUILDROOT/DEBIAN/control
chmod 0755 $BUILDROOT/DEBIAN/control
dpkg-deb --build $BUILDROOT

23
build/convert_rpm2deb.sh Executable file
View File

@@ -0,0 +1,23 @@
#!/bin/bash
set -e
if [ -z "$ROOT_DIR" ]; then
ROOT_DIR=$(dirname $(dirname $(readlink -f "$BASH_SOURCE")))
fi
RPMS_DIR=$ROOT_DIR/_output/rpms
DEBS_DIR=$ROOT_DIR/_output/debs
case $(uname -m) in
x86_64)
CURRENT_ARCH=amd64
;;
aarch64)
CURRENT_ARCH=arm64
;;
esac
mkdir -p $DEBS_DIR && cd $DEBS_DIR
find $RPMS_DIR -type f -name *.rpm -exec alien --target=$CURRENT_ARCH {} \;

View File

@@ -1,3 +1,6 @@
FROM registry.cn-beijing.aliyuncs.com/yunionio/centos-build:1.1-4 as build
RUN yum install -y https://iso.yunion.cn/3.6/rpms/packages/host/baremetal-pxerom-1.1.0-20072810.x86_64.rpm
FROM frolvlad/alpine-glibc:glibc-2.28
MAINTAINER "Yaoqi Wan <wanyaoqi@yunionyun.com>"
@@ -16,17 +19,17 @@ RUN mkdir -p /opt/cloud/yunion/baremetal
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
COPY ./opt/cloud/yunion/baremetal/chain.c32 /opt/cloud/yunion/baremetal
COPY ./opt/cloud/yunion/baremetal/initramfs /opt/cloud/yunion/baremetal
COPY ./opt/cloud/yunion/baremetal/isolinux.bin /opt/cloud/yunion/baremetal
COPY ./opt/cloud/yunion/baremetal/kernel /opt/cloud/yunion/baremetal
COPY ./opt/cloud/yunion/baremetal/ldlinux.c32 /opt/cloud/yunion/baremetal
COPY ./opt/cloud/yunion/baremetal/ldlinux.e32 /opt/cloud/yunion/baremetal
COPY ./opt/cloud/yunion/baremetal/ldlinux.e64 /opt/cloud/yunion/baremetal
COPY ./opt/cloud/yunion/baremetal/libcom32.c32 /opt/cloud/yunion/baremetal
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
COPY --from=build /opt/cloud/yunion/baremetal/bootia32.efi /opt/cloud/yunion/baremetal
COPY --from=build /opt/cloud/yunion/baremetal/bootx64.efi /opt/cloud/yunion/baremetal
COPY --from=build /opt/cloud/yunion/baremetal/chain.c32 /opt/cloud/yunion/baremetal
COPY --from=build ./opt/cloud/yunion/baremetal/initramfs /opt/cloud/yunion/baremetal
COPY --from=build ./opt/cloud/yunion/baremetal/isolinux.bin /opt/cloud/yunion/baremetal
COPY --from=build ./opt/cloud/yunion/baremetal/kernel /opt/cloud/yunion/baremetal
COPY --from=build ./opt/cloud/yunion/baremetal/ldlinux.c32 /opt/cloud/yunion/baremetal
COPY --from=build ./opt/cloud/yunion/baremetal/ldlinux.e32 /opt/cloud/yunion/baremetal
COPY --from=build ./opt/cloud/yunion/baremetal/ldlinux.e64 /opt/cloud/yunion/baremetal
COPY --from=build ./opt/cloud/yunion/baremetal/libcom32.c32 /opt/cloud/yunion/baremetal
COPY --from=build ./opt/cloud/yunion/baremetal/libutil.c32 /opt/cloud/yunion/baremetal
COPY --from=build ./opt/cloud/yunion/baremetal/lpxelinux.0 /opt/cloud/yunion/baremetal
COPY --from=build ./opt/cloud/yunion/baremetal/menu.c32 /opt/cloud/yunion/baremetal
COPY --from=build ./opt/cloud/yunion/baremetal/pxelinux.0 /opt/cloud/yunion/baremetal

View File

@@ -0,0 +1,9 @@
# registry.cn-beijing.aliyuncs.com/yunionio/debian10-base:1.0
FROM debian:10
RUN apt update && apt install -y alien
RUN apt-get clean autoclean && \
apt-get autoremove --yes && \
rm -rf /var/lib/{apt,dpkg,cache,log}/

View File

@@ -6,4 +6,4 @@ ENV TZ Asia/Shanghai
RUN mkdir -p /opt/yunion/bin
ADD ./_output/alpine-build/bin/host-deployer /opt/yunion/bin/host-deployer
ADD ./_output/centos-build/bin/host-deployer /opt/yunion/bin/host-deployer

View File

@@ -1,3 +0,0 @@
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

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

3
build/docker/Makefile Normal file
View File

@@ -0,0 +1,3 @@
debian10-base:
docker buildx build --platform linux/arm64,linux/amd64 --push \
-t registry.cn-beijing.aliyuncs.com/yunionio/debian10-base:1.0 -f ./Dockerfile.debian-base .

View File

@@ -0,0 +1,2 @@
_output/alpine-build/_cache

View File

@@ -47,7 +47,7 @@
</td>
</tr>
<tr>
<td style="padding-bottom: 10px;">您正在验证邮箱,请在验证码输入框中输入:{{.code}}完成验证。</td>
<td style="padding-bottom: 10px;">您正在验证邮箱,请在验证码输入框中输入:{{.code}}完成验证。</td>
</tr>
</table>
</td>

View File

@@ -0,0 +1 @@
{{.os_type}} image {{.name}} upload completed

View File

@@ -0,0 +1,66 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Document</title>
</head>
<body>
<table style="width: 650px; margin-bottom: 20px;" border="0" cellpadding="0" cellspacing="0" align="center">
<tr style="height: 50px; background: #333; overflow: hidden;">
<td>
<table style="margin-left: 20px;">
<tr>
<td>
<img src="data:{{.login_logo_format}};base64,{{.login_logo}}" alt="" style="color: #fff; height: 32px; vertical-align: middle;">
</td>
</tr>
</table>
</td>
<td>
<table style="float: right;">
<tr>
<td style="padding-left: 20px; padding-right: 20px;">
<a href="" style="text-decoration: none; color: #20A0FF; font-size: 12px; display: none;">Product</a>
</td>
<td style="padding-left: 20px; padding-right: 20px;">
<a href="" style="text-decoration: none; color: #20A0FF; font-size: 12px; display: none;">Solution</a>
</td>
<td style="padding-left: 20px; padding-right: 20px;">
<a href="" style="text-decoration: none; color: #20A0FF; font-size: 12px; display: none;">Service</a>
</td>
<td style="padding-left: 20px; padding-right: 20px;">
<a href="" style="text-decoration: none; color: #20A0FF; font-size: 12px; display: none;">Help and Documentation</a>
</td>
<td style="padding-left: 20px; padding-right: 20px;">
<a href="" style="text-decoration: none; color: #20A0FF; font-size: 12px; display: none;">About</a>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td style="width: 100%;" colspan="2">
<table style="padding: 20px 10px; width: 100%;">
<tr>
<td style="padding-bottom: 13px;">
Dear {{.name}}
</td>
</tr>
<tr>
<td style="padding-bottom: 13px;">You are verifying your email, please enter the following code on the email verification page:</td>
</tr>
<tr>
<td style="padding-bottom: 10px; font-size: large">{{.code}}</td>
</tr>
</table>
</td>
</tr>
<tr style="width: 96%;">
<td colspan="2" style="border-top: 1px dashed #ccc; color: #333; font-size: 12px; padding-bottom: 10px; font-weight: 100;">If you are not operating by yourself, please log in to the platform in time and change your password to ensure the security of your account.</td>
</tr>
<tr>
<td colspan="2" style="background: #333; text-align: right; padding-right: 20px; font-size: 12px; color: #fff; height: 50px;">Copyrights © {{.copyright}}. All rights reserved.</td>
</tr>
</table>
</body>
</html>

View File

@@ -0,0 +1 @@
Image {{.name}} upload completed

View File

@@ -0,0 +1 @@
{{.copyright}} Verify

View File

@@ -34,6 +34,7 @@ import (
_ "yunion.io/x/onecloud/cmd/climc/shell/monitor"
_ "yunion.io/x/onecloud/cmd/climc/shell/notifyv2"
_ "yunion.io/x/onecloud/cmd/climc/shell/servicetree"
_ "yunion.io/x/onecloud/cmd/climc/shell/suggestion"
_ "yunion.io/x/onecloud/cmd/climc/shell/yunionconf"
)

View File

@@ -452,11 +452,15 @@ func init() {
DomainList []string
// 是否允许空referer 访问
AllowEmptyRefer bool `help:"all empty refer access"`
Enabled bool
RerererType string `help:"Referer type" choices:"Black-List|White-List"`
}
R(&BucketSetRefererOption{}, "bucket-set-referer", "Set bucket referer", func(s *mcclient.ClientSession, args *BucketSetRefererOption) error {
conf := api.BucketRefererConf{
WhiteList: args.DomainList,
Enabled: args.Enabled,
AllowEmptyRefer: args.AllowEmptyRefer,
RefererType: args.RerererType,
DomainList: args.DomainList,
}
result, err := modules.Buckets.PerformAction(s, args.ID, "set-referer", jsonutils.Marshal(conf))
if err != nil {

View File

@@ -42,6 +42,7 @@ func init() {
Disabled bool `help:"Show disabled host only" json:"-"`
HostType string `help:"Host type filter" choices:"baremetal|hypervisor|esxi|kubelet|hyperv|aliyun|azure|qcloud|aws|huawei|ucloud|google|ctyun"`
AnyMac string `help:"Mac matches one of the host's interface"`
AnyIp string `help:"IP matches one of the host's interface"`
IsBaremetal *bool `help:"filter host list by is_baremetal=true|false"`
@@ -407,12 +408,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 +429,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

@@ -15,142 +15,17 @@
package compute
import (
"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"
"yunion.io/x/onecloud/pkg/mcclient/options/compute"
)
func init() {
type SecGroupRulesListOptions struct {
options.BaseListOptions
Secgroup string `help:"Secgroup ID or Name"`
SecgroupName string `help:"Search rules by fuzzy secgroup name"`
Projects []string `help:"Filter rules by project"`
Direction string `help:"filter Direction of rule" choices:"in|out"`
Protocol string `help:"filter Protocol of rule" choices:"any|tcp|udp|icmp"`
Action string `help:"filter Actin of rule" choices:"allow|deny"`
Ports string `help:"filter Ports of rule"`
Ip string `help:"filter cidr of rule"`
}
R(&SecGroupRulesListOptions{}, "secgroup-rule-list", "List all security group", func(s *mcclient.ClientSession, args *SecGroupRulesListOptions) error {
params, err := options.ListStructToParams(args)
if err != nil {
return err
}
result, err := modules.SecGroupRules.List(s, params)
if err != nil {
return err
}
printList(result, modules.SecGroupRules.GetColumns(s))
return nil
})
type SecGroupRuleDetailOptions struct {
ID string `help:"ID or Name of security group rule"`
}
R(&SecGroupRuleDetailOptions{}, "secgroup-rule-show", "Show details of rule", func(s *mcclient.ClientSession, args *SecGroupRuleDetailOptions) error {
if rule, e := modules.SecGroupRules.Get(s, args.ID, nil); e != nil {
return e
} else {
printObject(rule)
}
return nil
})
R(&SecGroupRuleDetailOptions{}, "secgroup-rule-delete", "Delete a secgroup rule", func(s *mcclient.ClientSession, args *SecGroupRuleDetailOptions) error {
if rule, e := modules.SecGroupRules.Delete(s, args.ID, nil); e != nil {
return e
} else {
printObject(rule)
}
return nil
})
type SecGroupRulesCreateOptions struct {
SECGROUP string `help:"Secgroup ID or Name" metavar:"Secgroup"`
Direction string `help:"Direction of rule" choices:"in|out"`
Action string `help:"Action of rule" choices:"allow|deny"`
Protocol string `help:"Protocol of rule" choices:"tcp|udp|icmp|any"`
Ports string `help:"Ports of rule"`
Cidr string `help:"Cidr of rule"`
Priority int64 `help:"priority of Rule"`
Desc string `help:"Description"`
}
R(&SecGroupRulesCreateOptions{}, "secgroup-rule-create", "Create all security group rule", func(s *mcclient.ClientSession, args *SecGroupRulesCreateOptions) error {
params := jsonutils.NewDict()
if len(args.Desc) > 0 {
params.Add(jsonutils.NewString(args.Desc), "description")
}
if args.Priority > 0 {
params.Add(jsonutils.NewInt(args.Priority), "priority")
}
if len(args.Direction) > 0 {
params.Add(jsonutils.NewString(args.Direction), "direction")
}
if len(args.Action) > 0 {
params.Add(jsonutils.NewString(args.Action), "action")
}
if len(args.Protocol) > 0 {
params.Add(jsonutils.NewString(args.Protocol), "protocol")
}
if len(args.Ports) > 0 {
params.Add(jsonutils.NewString(args.Ports), "ports")
}
if len(args.Cidr) > 0 {
params.Add(jsonutils.NewString(args.Cidr), "cidr")
}
params.Add(jsonutils.NewString(args.SECGROUP), "secgroup")
secgrouprules, err := modules.SecGroupRules.Create(s, params)
if err != nil {
return err
}
printObject(secgrouprules)
return nil
})
type SecGroupRulesUpdateOptions struct {
ID string `help:"ID or name of rule"`
Name string `help:"New name of rule"`
Priority int64 `help:"priority of Rule"`
Protocol string `help:"Protocol of rule" choices:"any|tcp|udp|icmp"`
Ports string `help:"Ports of rule"`
Cidr string `help:"Cidr of rule"`
Action string `help:"filter Actin of rule" choices:"allow|deny"`
Desc string `help:"Description" metavar:"Description"`
}
R(&SecGroupRulesUpdateOptions{}, "secgroup-rule-update", "Update property of a security group rule", func(s *mcclient.ClientSession, args *SecGroupRulesUpdateOptions) 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")
}
if args.Priority > 0 {
params.Add(jsonutils.NewInt(args.Priority), "priority")
}
if len(args.Protocol) > 0 {
params.Add(jsonutils.NewString(args.Protocol), "protocol")
}
if len(args.Ports) > 0 {
params.Add(jsonutils.NewString(args.Ports), "ports")
}
if len(args.Cidr) > 0 {
params.Add(jsonutils.NewString(args.Cidr), "cidr")
}
if len(args.Action) > 0 {
params.Add(jsonutils.NewString(args.Action), "action")
}
if rule, e := modules.SecGroupRules.Update(s, args.ID, params); e != nil {
return e
} else {
printObject(rule)
}
return nil
})
cmd := shell.NewResourceCmd(&modules.SecGroupRules).WithKeyword("secgroup-rule")
cmd.List(&compute.SecGroupRulesListOptions{})
cmd.Show(&options.BaseShowOptions{})
cmd.Delete(&options.BaseIdOptions{})
cmd.Create(&compute.SecGroupRulesCreateOptions{})
cmd.Update(&compute.SecGroupRulesUpdateOptions{})
}

View File

@@ -32,6 +32,8 @@ type GeneralUsageOptions struct {
CloudEnv string `help:"show usage of specified cloudenv" choices:"public|private|onpremise"`
Scope string `help:"show usage of specified privilege scope" choices:"system|domain|project"`
Refresh bool `help:"force refresh usage statistics"`
}
func fetchHostTypeOptions(args *GeneralUsageOptions) *jsonutils.JSONDict {
@@ -48,6 +50,9 @@ func fetchHostTypeOptions(args *GeneralUsageOptions) *jsonutils.JSONDict {
if len(args.CloudEnv) > 0 {
params.Add(jsonutils.NewString(args.CloudEnv), "cloud_env")
}
if args.Refresh {
params.Add(jsonutils.JSONTrue, "refresh")
}
return params
}

View File

@@ -27,6 +27,8 @@ func init() {
type WireListOptions struct {
options.BaseListOptions
Bandwidth *int `help:"List wires by bandwidth"`
Region string `help:"List wires in region"`
Zone string `help:"list wires in zone" json:"-"`
Vpc string `help:"List wires in vpc"`

View File

@@ -32,6 +32,7 @@ import (
func init() {
type IdentityProviderListOptions struct {
options.BaseListOptions
SsoDomain string `help:"Filter SSO IDP by domain" json:"sso_domain"`
}
R(&IdentityProviderListOptions{}, "idp-list", "List all identity provider", func(s *mcclient.ClientSession, args *IdentityProviderListOptions) error {
params, err := options.ListStructToParams(args)

View File

@@ -115,7 +115,9 @@ func init() {
Enabled bool `help:"update policy enabled"`
Disabled bool `help:"update policy disabled"`
Desc string `help:"Description"`
IsSystem *bool `help:"is_system"`
IsSystem bool `help:"is_system"`
IsNotSystem bool `help:"negative is_system"`
}
updateFunc := func(s *mcclient.ClientSession, args *PolicyPatchOptions) error {
policyId, err := modules.Policies.GetId(s, args.ID, nil)
@@ -141,14 +143,13 @@ func init() {
if len(args.Desc) > 0 {
params.Add(jsonutils.NewString(args.Desc), "description")
}
if args.IsSystem != nil {
if *args.IsSystem {
params.Add(jsonutils.JSONTrue, "is_system")
} else {
params.Add(jsonutils.JSONFalse, "is_system")
}
if args.IsSystem {
params.Add(jsonutils.JSONTrue, "is_system")
}
result, err := modules.Policies.Patch(s, policyId, params)
if args.IsNotSystem {
params.Add(jsonutils.JSONFalse, "is_system")
}
result, err := modules.Policies.Update(s, policyId, params)
if err != nil {
return err
}

View File

@@ -167,6 +167,32 @@ func initKubeCluster() {
return nil
})
R(&o.ClusterEnableComponentCephCSIOpt{}, cmdN("component-enable-ceph-csi"), "Enable cluster ceph csi component", func(s *mcclient.ClientSession, args *o.ClusterEnableComponentCephCSIOpt) error {
params, err := args.Params()
if err != nil {
return err
}
ret, err := k8s.KubeClusters.PerformAction(s, args.ID, "enable-component", params)
if err != nil {
return err
}
printObject(ret)
return nil
})
R(&o.ClusterEnableComponentMonitorOpt{}, cmdN("component-enable-monitor"), "Enable cluster monitor component", func(s *mcclient.ClientSession, args *o.ClusterEnableComponentMonitorOpt) error {
params, err := args.Params()
if err != nil {
return err
}
ret, err := k8s.KubeClusters.PerformAction(s, args.ID, "enable-component", params)
if err != nil {
return err
}
printObject(ret)
return nil
})
R(&o.ClusterEnableComponentFluentBitOpt{}, cmdN("component-enable-fluentbit"), "Enable cluster fluentbit component", func(s *mcclient.ClientSession, args *o.ClusterEnableComponentFluentBitOpt) error {
params, err := args.Params()
if err != nil {

View File

@@ -36,6 +36,8 @@ func init() {
Email string `help:"The Email"`
Docs *string `help:"the Docs website address"`
License *string `help:"the license generator website address"`
BrandCn *string `help:"the brand name in Chinese"`
BrandEn *string `help:"the brand name in English"`
}
R(&CopyrightUpdateOptions{}, "copyright-update", "update copyright", func(s *mcclient.ClientSession, args *CopyrightUpdateOptions) error {
@@ -52,6 +54,14 @@ func init() {
params.Add(jsonutils.NewString(*args.License), "license")
}
if args.BrandCn != nil {
params.Add(jsonutils.NewString(*args.BrandCn), "brand_cn")
}
if args.BrandEn != nil {
params.Add(jsonutils.NewString(*args.BrandEn), "brand_en")
}
if len(args.Copyright) > 0 {
params.Add(jsonutils.NewString(args.Copyright), "copyright")
}

View File

@@ -10,4 +10,5 @@ func init() {
cmd := shell.NewResourceCmd(modules.AlertRecordManager)
cmd.List(new(options.AlertRecordListOptions))
cmd.Show(new(options.AlertRecordShowOptions))
cmd.Get("", new(options.AlertRecordTotalOptions))
}

View File

@@ -1,67 +0,0 @@
// Copyright 2019 Yunion
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package monitor
import (
"yunion.io/x/jsonutils"
"yunion.io/x/onecloud/pkg/mcclient"
"yunion.io/x/onecloud/pkg/mcclient/modules/monitor"
options "yunion.io/x/onecloud/pkg/mcclient/options/monitor"
)
func init() {
aN := cmdN("suggestsysalert")
R(&options.SuggestSysAlertListOptions{}, aN("list"), "List all suggestsysrules",
func(s *mcclient.ClientSession, args *options.SuggestSysAlertListOptions) error {
params, err := args.Params()
if err != nil {
return err
}
if len(args.Type) > 0 {
params.Add(jsonutils.NewString(args.Type), "type")
}
ret, err := monitor.SuggestSysAlertManager.List(s, params)
if err != nil {
return err
}
printList(ret, monitor.SuggestSysAlertManager.GetColumns(s))
return nil
})
R(&options.SSuggestAlertShowOptions{}, aN("show"), "Show details of a alert rule",
func(s *mcclient.ClientSession, args *options.SSuggestAlertShowOptions) error {
ret, err := monitor.SuggestSysAlertManager.Get(s, args.ID, nil)
if err != nil {
return err
}
printObject(ret)
return nil
})
R(&options.SuggestAlertIgnoreOptions{}, aN("ignore"), "Ignore alert result",
func(s *mcclient.ClientSession, args *options.SuggestAlertIgnoreOptions) error {
params, err := args.Params()
if err != nil {
return err
}
ret, err := monitor.SuggestSysAlertManager.PerformAction(s, args.ID, "ignore", params)
if err != nil {
return err
}
printObject(ret)
return nil
})
}

View File

@@ -111,7 +111,7 @@ func init() {
}
R(&ConfigGetTypesOptions{}, "notify-config-get-types", "Get all Config types", func(s *mcclient.ClientSession, args *ConfigGetTypesOptions) error {
param := jsonutils.Marshal(args)
result, err := modules.NotifyConfig.PerformClassAction(s, "get-types", param)
result, err := modules.NotifyReceiver.PerformClassAction(s, "get-types", param)
if err != nil {
return err
}

View File

@@ -0,0 +1,12 @@
package suggestion
import (
"yunion.io/x/onecloud/cmd/climc/shell"
"yunion.io/x/onecloud/pkg/mcclient/modules"
options "yunion.io/x/onecloud/pkg/mcclient/options/suggestion"
)
func init() {
cmd := shell.NewResourceCmd(modules.AnalysisPredictManager)
cmd.Get("", new(options.AnalysisPredictConfigOptions))
}

View File

@@ -0,0 +1,30 @@
// 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 suggestion
import (
"yunion.io/x/onecloud/cmd/climc/shell"
"yunion.io/x/onecloud/pkg/mcclient/modules/monitor"
options "yunion.io/x/onecloud/pkg/mcclient/options/monitor"
)
func init() {
cmd := shell.NewResourceCmd(monitor.SuggestSysAlertManager)
cmd.List(new(options.SuggestSysAlertListOptions))
cmd.Show(new(options.SSuggestAlertShowOptions))
cmd.Perform("ignore", new(options.SuggestAlertIgnoreOptions))
cmd_ := shell.NewResourceCmd(monitor.SuggestSysAlertCostManager)
cmd_.Get("", new(options.SuggestAlertCostOptions))
}

View File

@@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
package monitor
package suggestion
import (
"yunion.io/x/onecloud/cmd/climc/shell"

8
go.mod
View File

@@ -109,7 +109,7 @@ require (
github.com/spaolacci/murmur3 v1.1.0 // indirect
github.com/stretchr/testify v1.5.1
github.com/tencentcloud/tencentcloud-sdk-go v3.0.135+incompatible
github.com/tencentyun/cos-go-sdk-v5 v0.7.10
github.com/tencentyun/cos-go-sdk-v5 v0.7.24
github.com/tinylib/msgp v1.1.0 // indirect
github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5 // indirect
github.com/tredoe/osutil v0.0.0-20161130133508-7d3ee1afa71c
@@ -140,13 +140,13 @@ require (
k8s.io/apimachinery v0.19.3
k8s.io/client-go v0.19.3
k8s.io/cluster-bootstrap v0.19.3
yunion.io/x/executor v0.0.0-20201201131200-44fa553abd9e
yunion.io/x/executor v0.0.0-20210310041834-3fcd1574f68e
yunion.io/x/jsonutils v0.0.0-20201110084044-3e4e1cb49769
yunion.io/x/log v0.0.0-20201210064738-43181789dc74
yunion.io/x/ovsdb v0.0.0-20200526071744-27bf0940cbc7
yunion.io/x/pkg v0.0.0-20201123083159-ca3aea986ff2
yunion.io/x/pkg v0.0.0-20210218105412-13a69f60034c
yunion.io/x/s3cli v0.0.0-20190917004522-13ac36d8687e
yunion.io/x/sqlchemy v0.0.0-20201219153152-2d901261898c
yunion.io/x/sqlchemy v0.0.0-20210329171939-2c520f93aee3
yunion.io/x/structarg v0.0.0-20200720093445-9f850fa222ce
)

17
go.sum
View File

@@ -583,8 +583,8 @@ github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5
github.com/syncthing/syncthing v0.14.48-rc.4/go.mod h1:nw3siZwHPA6M8iSfjDCWQ402eqvEIasMQOE8nFOxy7M=
github.com/tencentcloud/tencentcloud-sdk-go v3.0.135+incompatible h1:QIMoFqKCmNp4HPLiTR+couZbHsIZfoOllncHYvtqse8=
github.com/tencentcloud/tencentcloud-sdk-go v3.0.135+incompatible/go.mod h1:0PfYow01SHPMhKY31xa+EFz2RStxIqj6JFAJS+IkCi4=
github.com/tencentyun/cos-go-sdk-v5 v0.7.10 h1:hJPLdR4RPsnubB3M9qXNBeUbcOJMVANnO/L6Att/PZU=
github.com/tencentyun/cos-go-sdk-v5 v0.7.10/go.mod h1:wQBO5HdAkLjj2q6XQiIfDSP8DXDNrppDRw2Kp/1BODA=
github.com/tencentyun/cos-go-sdk-v5 v0.7.24 h1:ZsZij764lOaPsj7mEAlyxXvslGt6/m312Tzqj/zeRpo=
github.com/tencentyun/cos-go-sdk-v5 v0.7.24/go.mod h1:wQBO5HdAkLjj2q6XQiIfDSP8DXDNrppDRw2Kp/1BODA=
github.com/texttheater/golang-levenshtein v0.0.0-20180516184445-d188e65d659e h1:T5PdfK/M1xyrHwynxMIVMWLS7f/qHwfslZphxtGnw7s=
github.com/texttheater/golang-levenshtein v0.0.0-20180516184445-d188e65d659e/go.mod h1:XDKHRm5ThF8YJjx001LtgelzsoaEcvnA7lVWz9EeX3g=
github.com/tinylib/msgp v1.0.2/go.mod h1:+d+yLhGm8mzTaHzB+wgMYrodPfmZrzkirds8fDWklFE=
@@ -912,8 +912,8 @@ sigs.k8s.io/yaml v1.1.0 h1:4A07+ZFc2wgJwo8YNlQpr1rVlgUDlxXHhPJciaPY5gs=
sigs.k8s.io/yaml v1.1.0/go.mod h1:UJmg0vDUVViEyp3mgSv9WPwZCDxu4rQW1olrI1uml+o=
sigs.k8s.io/yaml v1.2.0 h1:kr/MCeFWJWTwyaHoR9c8EjH9OumOmoF9YGiZd7lFm/Q=
sigs.k8s.io/yaml v1.2.0/go.mod h1:yfXDCHCao9+ENCvLSE62v9VSji2MKu5jeNfTrofGhJc=
yunion.io/x/executor v0.0.0-20201201131200-44fa553abd9e h1:NRtqiegW4NME0v10rpChORZnJnuAUbpv31R5DsqqczQ=
yunion.io/x/executor v0.0.0-20201201131200-44fa553abd9e/go.mod h1:Uxuou9WQIeJXNpy7t2fPLL0BYLvLiMvGQwY7Qc6aSws=
yunion.io/x/executor v0.0.0-20210310041834-3fcd1574f68e h1:uGmKmmHm4zeLXhc/MEbAFtEDtGtyEYhC0OaBRGFi+fQ=
yunion.io/x/executor v0.0.0-20210310041834-3fcd1574f68e/go.mod h1:Uxuou9WQIeJXNpy7t2fPLL0BYLvLiMvGQwY7Qc6aSws=
yunion.io/x/jsonutils v0.0.0-20190625054549-a964e1e8a051/go.mod h1:4N0/RVzsYL3kH3WE/H1BjUQdFiWu50JGCFQuuy+Z634=
yunion.io/x/jsonutils v0.0.0-20201110084044-3e4e1cb49769 h1:LIQ4hhLGQuQK+XxlV+8JrKBuL37WUT+5ZTVxBwHOTD4=
yunion.io/x/jsonutils v0.0.0-20201110084044-3e4e1cb49769/go.mod h1:p0nyMqGA/apTxxyLIU/o1k4V7Vujl2O6ey30L594sYE=
@@ -925,13 +925,12 @@ yunion.io/x/ovsdb v0.0.0-20200526071744-27bf0940cbc7 h1:gjqNa2uQzIEXyySsbvVz0Ult
yunion.io/x/ovsdb v0.0.0-20200526071744-27bf0940cbc7/go.mod h1:0vLkNEhlmA64HViPBAnSTUMrx5QP1CLsxXmxDKQ80tc=
yunion.io/x/pkg v0.0.0-20190620104149-945c25821dbf/go.mod h1:t6rEGG2sQ4J7DhFxSZVOTjNd0YO/KlfWQyK1W4tog+E=
yunion.io/x/pkg v0.0.0-20190628082551-f4033ba2ea30/go.mod h1:t6rEGG2sQ4J7DhFxSZVOTjNd0YO/KlfWQyK1W4tog+E=
yunion.io/x/pkg v0.0.0-20200814072949-4f1b541857d6 h1:UarEDTBGkgcgc+nc+PZ75uo9M9+jiOGd5P2B90TxDNw=
yunion.io/x/pkg v0.0.0-20200814072949-4f1b541857d6/go.mod h1:t6rEGG2sQ4J7DhFxSZVOTjNd0YO/KlfWQyK1W4tog+E=
yunion.io/x/pkg v0.0.0-20201123083159-ca3aea986ff2 h1:NeCr2J8HjcIuJvEhP0rwWA1UKP8ReOv6HVf5k9YPtyA=
yunion.io/x/pkg v0.0.0-20201123083159-ca3aea986ff2/go.mod h1:t6rEGG2sQ4J7DhFxSZVOTjNd0YO/KlfWQyK1W4tog+E=
yunion.io/x/pkg v0.0.0-20210218105412-13a69f60034c h1:J/joqbA1N2mAlOl0Uqd4LpAq3+DK5aoFMdz+p9Ld7pQ=
yunion.io/x/pkg v0.0.0-20210218105412-13a69f60034c/go.mod h1:t6rEGG2sQ4J7DhFxSZVOTjNd0YO/KlfWQyK1W4tog+E=
yunion.io/x/s3cli v0.0.0-20190917004522-13ac36d8687e h1:v+EzIadodSwkdZ/7bremd7J8J50Cise/HCylsOJngmo=
yunion.io/x/s3cli v0.0.0-20190917004522-13ac36d8687e/go.mod h1:0iFKpOs1y4lbCxeOmq3Xx/0AcQoewVPwj62eRluioEo=
yunion.io/x/sqlchemy v0.0.0-20201219153152-2d901261898c h1:71nVDQq1oUjvZknEUNfetdiOB1jZMEfmoQlMUaoPIJs=
yunion.io/x/sqlchemy v0.0.0-20201219153152-2d901261898c/go.mod h1:FTdwPdGhMgh4E+UFXc9klI1Ok34fMuybTT+jLhOaIjI=
yunion.io/x/sqlchemy v0.0.0-20210329171939-2c520f93aee3 h1:C4yasW3gXronDIlIVUqHSbkA38PM1X9gxUWTYGsuIuI=
yunion.io/x/sqlchemy v0.0.0-20210329171939-2c520f93aee3/go.mod h1:FTdwPdGhMgh4E+UFXc9klI1Ok34fMuybTT+jLhOaIjI=
yunion.io/x/structarg v0.0.0-20200720093445-9f850fa222ce h1:kU8xE7O5uZ1GSJVMZHoJ+jrNL7csUQHYGyAPW9QfNpE=
yunion.io/x/structarg v0.0.0-20200720093445-9f850fa222ce/go.mod h1:EP6NSv2C0zzqBDTKumv8hPWLb3XvgMZDHQRfyuOrQng=

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -157,6 +157,9 @@ func (h *AuthHandlers) GetRegionsResponse(ctx context.Context, w http.ResponseWr
}
}
resp.Add(domains, "domains")
resp.Add(jsonutils.JSONTrue, "return_full_domains")
} else {
resp.Add(jsonutils.JSONFalse, "return_full_domains")
}
filters := jsonutils.NewDict()
@@ -309,9 +312,20 @@ func (h *AuthHandlers) doCredentialLogin(ctx context.Context, req *http.Request,
if err != nil {
switch httperr := err.(type) {
case *httputils.JSONClientError:
if httperr.Code >= 500 {
return nil, err
}
if httperr.Code == 409 || httperr.Code == 429 {
return nil, err
}
switch httperr.Class {
case "UserNotFound", "WrongPassword":
return nil, httperrors.NewJsonClientError(httperrors.ErrIncorrectUsernameOrPassword, "incorrect username or password")
case "UserLocked":
return nil, httperrors.NewJsonClientError(httperrors.ErrUserLocked, "The user has been locked, please contact the administrator")
case "UserDisabled":
return nil, httperrors.NewJsonClientError(httperrors.ErrUserDisabled, "The user has been disabled, please contact the administrator")
}
}
return nil, httperrors.NewInvalidCredentialError("invalid credential")
}
@@ -501,34 +515,34 @@ func (h *AuthHandlers) doLogin(ctx context.Context, w http.ResponseWriter, req *
if body.Contains("tenantId") { // switch project
token, authToken, err = doTenantLogin(ctx, req, body)
if err != nil {
return errors.Wrap(err, "doTenantLogin")
return err
}
userInfo, err = fetchUserInfoFromToken(ctx, req, token)
if err != nil {
return errors.Wrap(err, "fetchUserInfoFromToken")
return err
}
} else {
// user/password authenticate
// SSO authentication
token, err = h.doCredentialLogin(ctx, req, body)
if err != nil {
return errors.Wrap(err, "doCredentialLogin")
return err
}
userInfo, err = fetchUserInfoFromToken(ctx, req, token)
if err != nil {
return errors.Wrap(err, "fetchUserInfoFromToken")
return err
}
s := auth.GetAdminSession(ctx, FetchRegion(req), "")
isTotpInit, err := isUserTotpCredInitialed(s, token.GetUserId())
if err != nil {
return errors.Wrap(err, "isUserTotpCredInitialed")
return err
}
isIdpLogin := body.Contains("idp_driver")
authToken = clientman.NewAuthToken(token.GetTokenString(), isUserEnableTotp(userInfo), isTotpInit, isIdpLogin)
}
if !isUserAllowWebconsole(userInfo) {
return errors.Wrap(httperrors.ErrForbidden, "user forbidden login from web")
return httperrors.NewForbiddenError("user forbidden login from web")
}
saveAuthCookie(w, authToken, token)
@@ -986,6 +1000,12 @@ func getUserInfo2(s *mcclient.ClientSession, uid string, pid string, loginIp str
data.Add(jsonutils.JSONFalse, "non_default_domain_projects")
}
if options.Options.EnableQuotaCheck {
data.Add(jsonutils.JSONTrue, "enable_quota_check")
} else {
data.Add(jsonutils.JSONFalse, "enable_quota_check")
}
data.Add(jsonutils.NewString(getSsoCallbackUrl()), "sso_callback_url")
return data, nil
@@ -996,7 +1016,7 @@ func (h *AuthHandlers) getPermissionDetails(ctx context.Context, w http.Response
_, query, body := appsrv.FetchEnv(ctx, w, req)
if body == nil {
httperrors.InvalidInputError(ctx, w, "body is empty")
httperrors.InvalidInputError(ctx, w, "request body is empty")
return
}
var name string
@@ -1030,7 +1050,7 @@ func (h *AuthHandlers) doCreatePolicies(ctx context.Context, w http.ResponseWrit
// }
_, _, body := appsrv.FetchEnv(ctx, w, req)
if body == nil {
httperrors.InvalidInputError(ctx, w, "body is empty")
httperrors.InvalidInputError(ctx, w, "request body is empty")
return
}
s := auth.GetSession(ctx, t, FetchRegion(req), "")
@@ -1114,7 +1134,7 @@ func (h *AuthHandlers) resetUserPassword(ctx context.Context, w http.ResponseWri
_, _, body := appsrv.FetchEnv(ctx, w, req)
if body == nil {
httperrors.InvalidInputError(ctx, w, "body is empty")
httperrors.InvalidInputError(ctx, w, "request body is empty")
return
}
@@ -1150,7 +1170,7 @@ func (h *AuthHandlers) resetUserPassword(ctx context.Context, w http.ResponseWri
return
}
}
httperrors.InputParameterError(ctx, w, "密码错误")
httperrors.InputParameterError(ctx, w, "wrong password")
return
}

View File

@@ -205,7 +205,7 @@ func validateTotpRecoverySecrets(s *mcclient.ClientSession, uid string, question
func initTotpSecrets(ctx context.Context, w http.ResponseWriter, req *http.Request) {
t, authToken, err := fetchAuthInfo(ctx, req)
if err != nil {
httperrors.InvalidCredentialError(ctx, w, "fetchAuthInfo fail %s", err)
httperrors.InvalidCredentialError(ctx, w, "fetchAuthInfo fail: %s", err)
return
}
if authToken.IsTotpInitialized() {
@@ -232,14 +232,14 @@ func initTotpSecrets(ctx context.Context, w http.ResponseWriter, req *http.Reque
func validatePasscodeHandler(ctx context.Context, w http.ResponseWriter, req *http.Request) {
t, authToken, err := fetchAuthInfo(ctx, req)
if err != nil {
httperrors.InvalidCredentialError(ctx, w, "fetchAuthInfo fail %s", err)
httperrors.InvalidCredentialError(ctx, w, "fetchAuthInfo fail: %s", err)
return
}
s := auth.GetAdminSession(ctx, FetchRegion(req), "")
_, _, body := appsrv.FetchEnv(ctx, w, req)
if body == nil {
httperrors.InvalidInputError(ctx, w, "body is empty")
httperrors.InvalidInputError(ctx, w, "request body is empty")
return
}
@@ -271,14 +271,14 @@ func validatePasscodeHandler(ctx context.Context, w http.ResponseWriter, req *ht
func resetTotpSecrets(ctx context.Context, w http.ResponseWriter, req *http.Request) {
t, _, err := fetchAuthInfo(ctx, req)
if err != nil {
httperrors.InvalidCredentialError(ctx, w, "fetchAuthInfo fail %s", err)
httperrors.InvalidCredentialError(ctx, w, "fetchAuthInfo fail: %s", err)
return
}
s := auth.GetAdminSession(ctx, FetchRegion(req), "")
_, _, body := appsrv.FetchEnv(ctx, w, req)
if body == nil {
httperrors.InvalidInputError(ctx, w, "body is empty")
httperrors.InvalidInputError(ctx, w, "request body is empty")
return
}
@@ -309,7 +309,7 @@ func resetTotpSecrets(ctx context.Context, w http.ResponseWriter, req *http.Requ
func listTotpRecoveryQuestions(ctx context.Context, w http.ResponseWriter, req *http.Request) {
t, _, err := fetchAuthInfo(ctx, req)
if err != nil {
httperrors.InvalidCredentialError(ctx, w, "fetchAuthInfo fail %s", err)
httperrors.InvalidCredentialError(ctx, w, "fetchAuthInfo fail: %s", err)
return
}
@@ -335,14 +335,14 @@ func listTotpRecoveryQuestions(ctx context.Context, w http.ResponseWriter, req *
func resetTotpRecoveryQuestions(ctx context.Context, w http.ResponseWriter, req *http.Request) {
t, _, err := fetchAuthInfo(ctx, req)
if err != nil {
httperrors.InvalidCredentialError(ctx, w, "fetchAuthInfo fail %s", err)
httperrors.InvalidCredentialError(ctx, w, "fetchAuthInfo fail: %s", err)
return
}
s := auth.GetAdminSession(ctx, FetchRegion(req), "")
_, _, body := appsrv.FetchEnv(ctx, w, req)
if body == nil {
httperrors.InvalidInputError(ctx, w, "body is empty")
httperrors.InvalidInputError(ctx, w, "request body is empty")
return
}

View File

@@ -170,7 +170,7 @@ func (h *AuthHandlers) handleSsoLogin(ctx context.Context, w http.ResponseWriter
case "POST":
formData, err := appsrv.Fetch(req)
if err != nil {
httperrors.InputParameterError(ctx, w, "fetch formdata error: %s", err)
httperrors.InputParameterError(ctx, w, "fetch form data error: %s", err)
}
body, err = jsonutils.ParseQueryString(string(formData))
if err != nil {

View File

@@ -42,6 +42,8 @@ import (
"yunion.io/x/onecloud/pkg/util/httputils"
)
const contentTypeSpreadsheet = "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"
const (
HOST_MAC = "*MAC地址"
HOST_NAME = "*名称"
@@ -154,8 +156,8 @@ func (mh *MiscHandler) DoBatchHostRegister(ctx context.Context, w http.ResponseW
fileHeader := hostfiles[0].Header
contentType := fileHeader.Get("Content-Type")
if contentType != "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" {
e := httperrors.NewInputParameterError("Wrong content type %s, required application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", contentType)
if contentType != contentTypeSpreadsheet {
e := httperrors.NewInputParameterError("Wrong content type %s, want %s", contentType, contentTypeSpreadsheet)
httperrors.JsonClientError(ctx, w, e)
return
}
@@ -199,7 +201,7 @@ func (mh *MiscHandler) DoBatchHostRegister(ctx context.Context, w http.ResponseW
}
if !titlesOk {
httperrors.InputParameterError(ctx, w, "template file is invalid.please check.")
httperrors.InputParameterError(ctx, w, "template file is invalid. please check.")
return
}
@@ -302,8 +304,8 @@ func (mh *MiscHandler) DoBatchUserRegister(ctx context.Context, w http.ResponseW
fileHeader := userfiles[0].Header
contentType := fileHeader.Get("Content-Type")
if contentType != "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" {
e := httperrors.NewInputParameterError("Wrong content type %s, required application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", contentType)
if contentType != contentTypeSpreadsheet {
e := httperrors.NewInputParameterError("Wrong content type %s, want %s", contentType, contentTypeSpreadsheet)
httperrors.JsonClientError(ctx, w, e)
return
}
@@ -328,7 +330,7 @@ func (mh *MiscHandler) DoBatchUserRegister(ctx context.Context, w http.ResponseW
// skipped header row
rows := xlsx.GetRows("users")
if len(rows) <= 1 {
e := httperrors.NewInputParameterError("empty file")
e := httperrors.NewInputParameterError("empty file content")
httperrors.JsonClientError(ctx, w, e)
return
} else if len(rows) > BATCH_USER_REGISTER_QUANTITY_LIMITATION {
@@ -431,7 +433,7 @@ func (mh *MiscHandler) getDownloadsHandler(ctx context.Context, w http.ResponseW
params := appctx.AppContextParams(ctx)
template, ok := params["<template_id>"]
if !ok || len(template) == 0 {
httperrors.InvalidInputError(ctx, w, "not found")
httperrors.InvalidInputError(ctx, w, "template_id")
return
}

View File

@@ -142,11 +142,11 @@ func fetchIdList(ctx context.Context, query jsonutils.JSONObject, w http.Respons
if e == nil && len(idlist) > 0 {
queryDict := query.(*jsonutils.JSONDict)
queryDict.Remove("id")
log.Debugf("Get idlist: %s", idlist)
log.Debugf("Get id list: %s", idlist)
return jsonutils.JSONArray2StringArray(idlist)
} else {
log.Debugf("Cannot find idlist in query: %s", query)
httperrors.InvalidInputError(ctx, w, "No idlist found")
log.Debugf("Cannot find id list in query: %s", query)
httperrors.InvalidInputError(ctx, w, "No id list found")
return nil
}
}

View File

@@ -23,7 +23,7 @@ import (
type CloudeventListInput struct {
apis.ModelBaseListInput
apis.ProjectizedResourceListInput
apis.DomainizedResourceListInput
compute.CloudenvResourceListInput
@@ -47,6 +47,6 @@ type CloudeventListInput struct {
type CloudeventDetails struct {
apis.ModelBaseDetails
apis.ProjectizedResourceInfo
apis.DomainizedResourceInfo
SCloudevent
}

View File

@@ -27,6 +27,7 @@ type CloudroleListInput struct {
apis.StatusInfrasResourceBaseListInput
CloudaccountResourceListInput
CloudgroupResourceListInput
}
type CloudroleDetails struct {

View File

@@ -320,12 +320,16 @@ func (input *BucketCORSRules) Validate() error {
}
type BucketRefererConf struct {
// 白名单域名列表
WhiteList []string
// 黑名单域名列表
BlackList []string
// Referer Type
// enmu: Black-List, White-List
RefererType string
// 域名列表
DomainList []string
// 是否允许空referer 访问
AllowEmptyRefer bool
// 是否开启
Enabled bool `json:"enabled"`
}
func (input *BucketRefererConf) Validate() error {

View File

@@ -335,6 +335,15 @@ type CloudaccountPerformPublicInput struct {
type CloudaccountPerformPrepareNetsInput struct {
CloudaccountCreateInput
// description: Recommended network subnet mask
// example: 24
NetworkBits *int8 `json:"network_bits"`
// description: The upper limit of host number
// example: 254
HostNumberUpperLimit *int `json:"host_number_upper_limit"`
// description: The lower limit of host number
// example: 2
HostNumberLowerLimit *int `json:"host_number_lower_limit"`
// enum: vcenter,datacenter,cluster
WireLevelForVmware string `json:"wire_level_for_vmware"`
}
@@ -427,3 +436,9 @@ type GetCloudaccountSamlOutput struct {
// initial SAML SSO login URL for this cloudaccount
InitLoginUrl string `json:"init_login_url,allowempty"`
}
type CloudaccountEnableAutoSyncInput struct {
// 云账号状态必须是connected
// 最小值为region服务的minimal_sync_interval_seconds
SyncIntervalSeconds int `json:"sync_interval_seconds"`
}

View File

@@ -101,6 +101,50 @@ var (
CLOUD_PROVIDER_GOOGLE,
CLOUD_PROVIDER_CTYUN,
}
CLOUD_PROVIDER_HOST_TYPE_MAP = map[string][]string{
CLOUD_PROVIDER_ONECLOUD: []string{
HOST_TYPE_KVM,
HOST_TYPE_BAREMETAL,
HOST_TYPE_HYPERVISOR,
},
CLOUD_PROVIDER_VMWARE: []string{
HOST_TYPE_ESXI,
},
CLOUD_PROVIDER_ALIYUN: []string{
HOST_TYPE_ALIYUN,
},
CLOUD_PROVIDER_APSARA: []string{
HOST_TYPE_APSARA,
},
CLOUD_PROVIDER_QCLOUD: []string{
HOST_TYPE_QCLOUD,
},
CLOUD_PROVIDER_AZURE: []string{
HOST_TYPE_AZURE,
},
CLOUD_PROVIDER_AWS: []string{
HOST_TYPE_AWS,
},
CLOUD_PROVIDER_HUAWEI: []string{
HOST_TYPE_HUAWEI,
},
CLOUD_PROVIDER_OPENSTACK: []string{
HOST_TYPE_OPENSTACK,
},
CLOUD_PROVIDER_UCLOUD: []string{
HOST_TYPE_UCLOUD,
},
CLOUD_PROVIDER_ZSTACK: []string{
HOST_TYPE_ZSTACK,
},
CLOUD_PROVIDER_GOOGLE: []string{
HOST_TYPE_GOOGLE,
},
CLOUD_PROVIDER_CTYUN: []string{
HOST_TYPE_CTYUN,
},
}
)
const (

View File

@@ -114,6 +114,7 @@ const (
CITY_SOUTH_CAROLINA = "South Carolina" //南卡罗来纳州
CITY_SALT_LAKE_CITY = "Salt Lake City" //盐湖城
CITY_LAS_VEGAS = "Las Vegas" //拉斯维加斯
CITY_PHOENIX = "Phoenix" //菲尼克斯
// 英国
CITY_LONDON = "London" //伦敦
@@ -150,7 +151,8 @@ const (
CITY_STOCKHOLM = "Stockholm" //斯德哥尔摩
// 巴西
CITY_SAO_PAULO = "Sao Paulo" //圣保罗
CITY_SAO_PAULO = "Sao Paulo" //圣保罗
CITY_RIO_DE_JANEIRO = "Rio de Janeiro" // 里约热内卢
// 智利
CITY_SANTIAGO = "Santiago" // 圣地亚哥
@@ -175,6 +177,9 @@ const (
// 尼日利亚
CITY_LAGOS = "Lagos" //拉哥斯
// 巴林王国 (中东国家)
CITY_BAHRAIN = "Bahrain" // 巴林
// 越南
CITY_HO_CHI_MINH = "Ho Chi Minh" //???
@@ -205,4 +210,5 @@ const (
COUNTRY_CODE_NO = "NO" //挪威
COUNTRY_CODE_MX = "MX" //墨西哥
COUNTRY_CODE_CL = "CL" //智利
COUNTRY_CODE_BH = "BH" //巴林
)

View File

@@ -166,11 +166,7 @@ type SDBInstanceChangeConfigInput struct {
apis.Meta
InstanceType string
VCpuCount int
VmemSizeMb int
StorageType string
DiskSizeGB int
Category string
}
type SDBInstanceRecoveryConfigInput struct {
@@ -294,6 +290,8 @@ type DBInstanceDetails struct {
SDBInstance
Secgroups []apis.StandaloneShortDesc `json:"secgroups"`
// 安全组名称
// example: Default
Secgroup string `json:"secgroup"`

View File

@@ -106,6 +106,7 @@ type DiskListInput struct {
apis.VirtualResourceListInput
apis.ExternalizedResourceBaseListInput
apis.MultiArchResourceBaseListInput
apis.AutoDeleteResourceBaseListInput
billing.BillingResourceListInput
StorageFilterListInput
@@ -134,8 +135,6 @@ type DiskListInput struct {
DiskSize int `json:"disk_size"`
AutoDelete *bool `json:"auto_delete"`
FsFormat string `json:"fs_format"`
// 镜像

View File

@@ -159,6 +159,12 @@ type ElasticcacheCreateInput struct {
// 主可用区名称或Id
Zone string `json:"zone"`
// 备可用区名称或Id列表
// 默认副本与主可用区一致
// 支持此参数的云厂商: 腾讯云
// required: false
SlaveZones []string `json:"slave_zones"`
// Ip子网名称或Id,建议使用Id
// required: true
Network string `json:"network"`

View File

@@ -171,11 +171,6 @@ const (
CPU_MODE_HOST = "host"
)
const (
OS_ARCH_X86 = "x86"
OS_ARCH_ARM = "arm"
)
var VM_RUNNING_STATUS = []string{VM_START_START, VM_STARTING, VM_RUNNING, VM_BLOCK_STREAM, VM_BLOCK_STREAM_FAIL}
var VM_CREATING_STATUS = []string{VM_CREATE_NETWORK, VM_CREATE_DISK, VM_START_DEPLOY, VM_DEPLOYING}

View File

@@ -372,7 +372,10 @@ type GuestMigrateInput struct {
}
type GuestLiveMigrateInput struct {
// 指定期望的迁移目标宿主机
PreferHost string `json:"prefer_host"`
// 是否跳过CPU检查默认要做CPU检查
SkipCpuCheck *bool `json:"skip_cpu_check"`
}
type GuestSetSecgroupInput struct {
@@ -457,3 +460,25 @@ type ServerStopInput struct {
// 目前仅阿里云,腾讯云此参数生效
StopCharging bool `json:"stop_charging"`
}
type ServerDeleteInput struct {
// 是否越过回收站直接删除
// default: false
OverridePendingDelete bool
// 是否仅删除本地资源
// default: false
Purge bool
// 是否删除快照
// default: false
DeleteSnapshots bool
// 是否删除关联的EIP
// default: false
DeleteEip bool
// 是否删除关联的数据盘
// default: false
DeleteDisks bool
}

View File

@@ -72,6 +72,8 @@ type HostListInput struct {
ResourceType string `json:"resource_type"`
// filter by mac of any network interface
AnyMac string `json:"any_mac"`
// filter by ip of any network interface
AnyIp string `json:"any_ip"`
// filter storages not attached to this host
StorageNotAttached *bool `json:"storage_not_attached"`
// filter by Hypervisor

View File

@@ -131,7 +131,3 @@ const (
HOST_HEALTH_STATUS_RUNNING = "running"
HOST_HEALTH_LOCK_PREFIX = "host-health"
)
const (
CPU_ARCH_AARCH64 = "aarch64"
)

View File

@@ -59,6 +59,7 @@ type SchedtagFilterListInput struct {
type SchedtagListInput struct {
apis.StandaloneResourceListInput
apis.ScopedResourceBaseListInput
CloudproviderResourceInput
// fitler by resource_type
ResourceType []string `json:"resource_type"`

View File

@@ -23,6 +23,9 @@ import (
type ScheduledTaskDetails struct {
apis.VirtualResourceDetails
SScheduledTask
// 描述
TimerDesc string `json:"timer_desc"`
// 定时方式触发
Timer TimerDetails `json:"timer"`
// 周期方式触发

View File

@@ -24,14 +24,12 @@ import (
"yunion.io/x/onecloud/pkg/apis"
)
type SSecgroupRuleCreateInput struct {
apis.ResourceBaseCreateInput
type SSecgroupRuleResource struct {
// 优先级, 数字越大优先级越高
// minimum: 1
// maximum: 100
// required: true
Priority int `json:"priority"`
Priority *int `json:"priority"`
// 协议
// required: true
@@ -68,7 +66,7 @@ type SSecgroupRuleCreateInput struct {
// required: true
Direction string `json:"direction"`
// ip或cidr地址
// ip或cidr地址, 若指定peer_secgroup_id此参数不生效
// example: 192.168.222.121
CIDR string `json:"cidr"`
@@ -84,17 +82,36 @@ type SSecgroupRuleCreateInput struct {
// example: test to create rule
Description string `json:"description"`
// 仅单独创建安全组规则时需要指定安全组
// required: true
Secgroup string `json:"secgroup"`
// swagger:ignore
SecgroupId string
// 对端安全组Id, 此参数和cidr参数互斥并且优先级高于cidr, 同事peer_secgroup_id不能和它所在的安全组ID相同
// required: false
PeerSecgroupId string `json:"peer_secgroup_id"`
}
func (input *SSecgroupRuleCreateInput) Check() error {
type SSecgroupRuleCreateInput struct {
apis.ResourceBaseCreateInput
SSecgroupRuleResource
// swagger:ignore
Secgroup string `json:"secgroup" yunion-deprecated-by:"secgroup_id"`
// 安全组ID
// required: true
SecgroupId string `json:"secgroup_id"`
}
type SSecgroupRuleUpdateInput struct {
apis.ResourceBaseUpdateInput
SSecgroupRuleResource
}
func (input *SSecgroupRuleResource) Check() error {
priority := 1
if input.Priority != nil {
priority = *input.Priority
}
rule := secrules.SecurityRule{
Priority: input.Priority,
Priority: priority,
Direction: secrules.TSecurityRuleDirection(input.Direction),
Action: secrules.TSecurityRuleAction(input.Action),
Protocol: input.Protocol,

View File

@@ -22,5 +22,6 @@ type SecgroupRuleDetails struct {
SSecurityGroupRule
SecurityGroupResourceInfo
ProjectId string `json:"tenant_id"`
ProjectId string `json:"tenant_id"`
PeerSecgroup string `json:"peer_secgroup"`
}

View File

@@ -19,12 +19,13 @@ const (
SNAPSHOT_MANUAL = "manual"
SNAPSHOT_AUTO = "auto"
SNAPSHOT_CREATING = "creating"
SNAPSHOT_ROLLBACKING = "rollbacking"
SNAPSHOT_FAILED = "create_failed"
SNAPSHOT_READY = "ready"
SNAPSHOT_DELETING = "deleting"
SNAPSHOT_UNKNOWN = "unknown"
SNAPSHOT_CREATING = "creating"
SNAPSHOT_ROLLBACKING = "rollbacking"
SNAPSHOT_FAILED = "create_failed"
SNAPSHOT_READY = "ready"
SNAPSHOT_DELETE_FAILED = "delete_failed"
SNAPSHOT_DELETING = "deleting"
SNAPSHOT_UNKNOWN = "unknown"
SNAPSHOT_POLICY_CREATING = "creating"

View File

@@ -146,6 +146,25 @@ var (
SHARED_STORAGE = []string{STORAGE_NFS, STORAGE_GPFS, STORAGE_RBD}
)
func IsDiskTypeMatch(t1, t2 string) bool {
switch t1 {
case DISK_TYPE_ROTATE:
if t2 == DISK_TYPE_SSD {
return false
} else {
return true
}
case DISK_TYPE_SSD:
if t2 == DISK_TYPE_ROTATE {
return false
} else {
return true
}
default:
return true
}
}
type StorageResourceInput struct {
// 存储ID或Name
StorageId string `json:"storage_id"`

View File

@@ -33,6 +33,8 @@ const (
DEFAULT_VPC_ID = "default"
NORMAL_VPC_ID = "normal" // 没有关联VPC的安全组统一使用normal
CLASSIC_VPC_NAME = "-"
)
type UsableResourceListInput struct {

View File

@@ -87,4 +87,6 @@ type WireListInput struct {
ZonalFilterListBase
HostResourceInput
Bandwidth *int `json:"bandwidth"`
}

View File

@@ -2068,7 +2068,6 @@ type SScheduledTask struct {
apis.SEnabledResourceBase
ScheduledType string `json:"scheduled_type"`
STimer
TimerDesc string `json:"timer_desc"`
ResourceType string `json:"resource_type"`
Operation string `json:"operation"`
LabelType string `json:"label_type"`

View File

@@ -14,6 +14,8 @@
package apis
import "yunion.io/x/pkg/utils"
const (
SERVICE_TYPE_IMAGE = "image"
SERVICE_TYPE_OFFLINE_CLOUDMETA = "offlinecloudmeta"
@@ -60,3 +62,22 @@ var (
SERVICE_TYPE_INFLUXDB,
}
)
const (
OS_ARCH_X86 = "x86"
OS_ARCH_ARM = "arm"
OS_ARCH_I386 = "i386"
OS_ARCH_X86_32 = "x86_32"
OS_ARCH_X86_64 = "x86_64"
OS_ARCH_AARCH32 = "aarch32"
OS_ARCH_AARCH64 = "aarch64"
)
func IsARM(osArch string) bool {
return utils.IsInStringArray(osArch, []string{
OS_ARCH_ARM,
OS_ARCH_AARCH32,
OS_ARCH_AARCH64,
})
}

View File

@@ -31,11 +31,12 @@ type SUserExtended struct {
Email string
Mobile string
LocalId int
LocalName string
DomainName string
DomainEnabled bool
IsLocal bool
LocalId int
LocalName string
LocalFailedAuthCount int
DomainName string
DomainEnabled bool
IsLocal bool
// IdpId string
// IdpName string
}

View File

@@ -205,6 +205,8 @@ type PerformStatusInput struct {
// 更改的目标状态值
// required:true
Status string `json:"status"`
// swagger:ignore
BlockJobsCount int `json:"block_jobs_count"`
// 更改状态的原因描述
// required:false

View File

@@ -319,3 +319,7 @@ type EnabledStatusInfrasResourceBaseListInput struct {
type MultiArchResourceBaseListInput struct {
OsArch string `json:"os_arch"`
}
type AutoDeleteResourceBaseListInput struct {
AutoDelete *bool
}

View File

@@ -27,4 +27,14 @@ type BaremetalEventListInput struct {
Since time.Time `json:"since"`
// until
Until time.Time `json:"until"`
// host_id
HostId []string `json:"host_id"`
// id
Id []int64 `json:"id"`
// EventId
EventId []string `json:"event_id"`
// Type
Type []string `json:"type"`
// ipmi_ip
IpmiIp []string `json:"ipmi_ip"`
}

View File

@@ -0,0 +1,147 @@
package monitor
var (
ServerTags = map[string]string{
"host": "host",
"host_id": "host_id",
"vm_id": "id",
"vm_ip": "ips",
"vm_name": "name",
"zone": "zone",
"zone_id": "zone_id",
"zone_ext_id": "zone_ext_id",
"os_type": "os_type",
"status": "status",
"cloudregion": "cloudregion",
"cloudregion_id": "cloudregion_id",
"region_ext_id": "region_ext_id",
"tenant": "tenant",
"tenant_id": "tenant_id",
"brand": "brand",
"scaling_group_id": "vm_scaling_group_id",
"domain_id": "domain_id",
"project_domain": "project_domain",
}
HostTags = map[string]string{
"host_id": "id",
"host_ip": "ips",
"host": "name",
"zone": "zone",
"zone_id": "zone_id",
"zone_ext_id": "zone_ext_id",
"os_type": "os_type",
"status": "status",
"cloudregion": "cloudregion",
"cloudregion_id": "cloudregion_id",
"region_ext_id": "region_ext_id",
"tenant": "tenant",
"tenant_id": "tenant_id",
"brand": "brand",
"domain_id": "domain_id",
"project_domain": "project_domain",
}
RdsTags = map[string]string{
"host": "host",
"host_id": "host_id",
"rds_id": "id",
"rds_ip": "ips",
"rds_name": "name",
"zone": "zone",
"zone_id": "zone_id",
"zone_ext_id": "zone_ext_id",
"os_type": "os_type",
"status": "status",
"cloudregion": "cloudregion",
"cloudregion_id": "cloudregion_id",
"region_ext_id": "region_ext_id",
"tenant": "tenant",
"tenant_id": "tenant_id",
"brand": "brand",
"domain_id": "domain_id",
"project_domain": "project_domain",
}
RedisTags = map[string]string{
"host": "host",
"host_id": "host_id",
"redis_id": "id",
"redis_ip": "ips",
"redis_name": "name",
"zone": "zone",
"zone_id": "zone_id",
"zone_ext_id": "zone_ext_id",
"os_type": "os_type",
"status": "status",
"cloudregion": "cloudregion",
"cloudregion_id": "cloudregion_id",
"region_ext_id": "region_ext_id",
"tenant": "tenant",
"tenant_id": "tenant_id",
"brand": "brand",
"domain_id": "domain_id",
"project_domain": "project_domain",
}
OssTags = map[string]string{
"host": "host",
"host_id": "host_id",
"oss_id": "id",
"oss_ip": "ips",
"oss_name": "name",
"zone": "zone",
"zone_id": "zone_id",
"zone_ext_id": "zone_ext_id",
"os_type": "os_type",
"status": "status",
"cloudregion": "cloudregion",
"cloudregion_id": "cloudregion_id",
"region_ext_id": "region_ext_id",
"tenant": "tenant",
"tenant_id": "tenant_id",
"brand": "brand",
"domain_id": "domain_id",
"project_domain": "project_domain",
}
ElbTags = map[string]string{
"host": "host",
"host_id": "host_id",
"elb_id": "id",
"elb_ip": "ips",
"elb_name": "name",
"zone": "zone",
"zone_id": "zone_id",
"zone_ext_id": "zone_ext_id",
"os_type": "os_type",
"status": "status",
"region": "region",
"cloudregion": "cloudregion",
"cloudregion_id": "cloudregion_id",
"tenant": "tenant",
"tenant_id": "tenant_id",
"brand": "brand",
"domain_id": "domain_id",
"project_domain": "project_domain",
}
CloudAccountTags = map[string]string{
"cloudaccount_id": "id",
"cloudaccount_name": "name",
"brand": "brand",
"domain_id": "domain_id",
"project_domain": "project_domain",
}
TenantTags = map[string]string{
"tenant_id": "id",
"tenant": "name",
"domain_id": "domain_id",
"project_domain": "project_domain",
}
DomainTags = map[string]string{
"domain_id": "id",
"project_domain": "name",
}
)

View File

@@ -22,7 +22,7 @@ type AlertResourceType string
const (
// AlertResourceTypeNode means onecloud system infrastructure controller or host node
AlertResourceTypeNode AlertResourceType = "node"
AlertResourceTypeNode AlertResourceType = "host"
// AlertResourceTypeCloudaccount means cloudaccount resource
AlertResourceTypeCloudaccount AlertResourceType = "cloudaccount"
// AlertResourceTypeVM means virtual machine guest resource

View File

@@ -120,10 +120,11 @@ type CommonAlertDetails struct {
}
type CommonAlertMetricDetails struct {
Comparator string `json:"comparator"`
Threshold float64 `json:"threshold"`
ConditionType string `json:"condition_type"`
ThresholdStr string `json:"threshold_str"`
Comparator string `json:"comparator"`
Threshold float64 `json:"threshold"`
WithinRange []float64 `json:"within_range"`
ConditionType string `json:"condition_type"`
ThresholdStr string `json:"threshold_str"`
// metric points'value的运算方式
Reduce string `json:"reduce"`
DB string `json:"db"`

View File

@@ -9,6 +9,8 @@ const (
METRIC_RES_TYPE_OSS = "oss"
METRIC_RES_TYPE_RDS = "rds"
METRIC_RES_TYPE_CLOUDACCOUNT = "cloudaccount"
METRIC_RES_TYPE_TENANT = "tenant"
METRIC_RES_TYPE_DOMAIN = "domain"
METRIC_UNIT_PERCENT = "%"
METRIC_UNIT_BPS = "bps"
@@ -30,8 +32,8 @@ var (
MetricUnit = []string{METRIC_UNIT_PERCENT, METRIC_UNIT_BPS, METRIC_UNIT_MBPS, METRIC_UNIT_BYTEPS, "count/s",
METRIC_UNIT_COUNT, METRIC_UNIT_MS, METRIC_UNIT_BYTE, METRIC_UNIT_RMB}
ResTypeScoreMap = map[string]int{
METRIC_RES_TYPE_HOST: 1,
METRIC_RES_TYPE_GUEST: 2,
METRIC_RES_TYPE_GUEST: 1,
METRIC_RES_TYPE_HOST: 2,
METRIC_RES_TYPE_OSS: 3,
METRIC_RES_TYPE_RDS: 4,
METRIC_RES_TYPE_REDIS: 5,

View File

@@ -21,12 +21,14 @@ var (
"cloudaccount": "cloudaccount_name",
}
MEASUREMENT_TAG_ID = map[string]string{
"host": "host_id",
"guest": "vm_id",
"redis": "redis_id",
"rds": "rds_id",
"oss": "oss_id",
"cloudaccount": "cloudaccount_id",
METRIC_RES_TYPE_HOST: "host_id",
METRIC_RES_TYPE_GUEST: "vm_id",
METRIC_RES_TYPE_REDIS: "redis_id",
METRIC_RES_TYPE_RDS: "rds_id",
METRIC_RES_TYPE_OSS: "oss_id",
METRIC_RES_TYPE_CLOUDACCOUNT: "cloudaccount_id",
METRIC_RES_TYPE_TENANT: "tenant_id",
METRIC_RES_TYPE_DOMAIN: "domain_id",
}
AlertReduceFunc = map[string]string{
"avg": "average value",

View File

@@ -62,6 +62,9 @@ const (
TEMPLATE_TYPE_CONTENT = "content"
TEMPLATE_TYPE_REMOTE = "remote"
TEMPLATE_LANG_EN = "en"
TEMPLATE_LANG_CN = "cn"
CTYPE_ROBOT_YES = "yes"
CTYPE_ROBOT_ONLY = "only"
)

View File

@@ -82,6 +82,8 @@ type ScheduleInput struct {
CpuMode string `json:"cpu_mode"`
OsArch string `json:"os_arch"`
SkipCpuCheck *bool `json:"skip_cpu_check"`
// In the migrate and create backup cases
// we don't need reallocate network
ReuseNetwork bool `json:"reuse_network"`

View File

@@ -93,7 +93,7 @@ func (job *SStatusProbeJob) Name() string {
func (job *SStatusProbeJob) Do(ctx context.Context, now time.Time) error {
bStatus := job.baremetal.GetStatus()
if bStatus == api.BAREMETAL_READY || bStatus == api.BAREMETAL_RUNNING {
if bStatus == api.BAREMETAL_READY || bStatus == api.BAREMETAL_RUNNING || bStatus == api.BAREMETAL_UNKNOWN {
ps, err := job.baremetal.GetPowerStatus()
if err != nil {
return errors.Wrap(err, "GetPowerStatus")

View File

@@ -1550,6 +1550,11 @@ func (b *SBaremetalInstance) StartBaremetalResetBMCTask(userCred mcclient.TokenC
}
func (b *SBaremetalInstance) StartBaremetalIpmiProbeTask(userCred mcclient.TokenCredential, taskId string, data jsonutils.JSONObject) error {
session := b.manager.GetClientSession()
data, _ = b.manager.fetchBaremetal(session, b.GetId())
if err := b.SaveDesc(data); err != nil {
return err
}
b.StartNewTask(tasks.NewBaremetalIpmiProbeTask, userCred, taskId, data)
return nil
}

View File

@@ -27,7 +27,7 @@ type IPMIProfile struct {
func DefaultProfile() IPMIProfile {
return IPMIProfile{
LanChannel: []int{1},
LanChannel: []int{1, 2, 8},
RootName: "root",
RootId: 2,
}
@@ -84,14 +84,24 @@ func QemuProfile() IPMIProfile {
}
}
func H3CProfile() IPMIProfile {
return IPMIProfile{
LanChannel: []int{8, 1},
RootName: "root",
RootId: 2,
StrongPass: true,
}
}
var (
PROFILES map[string]IPMIProfile = map[string]IPMIProfile{
"inspur": InspurProfile(),
"lenovo": LenovoProfile(),
"hp": HpProfile(),
"huawei": HuaweiProfile(),
"foxconn": FoxconnProfile(),
"qemu": QemuProfile(),
types.OEM_NAME_INSPUR: InspurProfile(),
types.OEM_NAME_LENOVO: LenovoProfile(),
types.OEM_NAME_HP: HpProfile(),
types.OEM_NAME_HUAWEI: HuaweiProfile(),
types.OEM_NAME_FOXCONN: FoxconnProfile(),
types.OEM_NAME_QEMU: QemuProfile(),
types.OEM_NAME_H3C: H3CProfile(),
}
)

View File

@@ -19,6 +19,7 @@ import (
"time"
"yunion.io/x/jsonutils"
"yunion.io/x/log"
"yunion.io/x/pkg/errors"
"yunion.io/x/onecloud/pkg/cloudcommon/types"
@@ -47,7 +48,7 @@ func NewBaremetalServerStopTask(
func (task *SBaremetalServerStopTask) DoStop(ctx context.Context, args interface{}) error {
task.SetStage(task.WaitForStop)
if err := task.Baremetal.DoPowerShutdown(true); err != nil {
return errors.Wrap(err, "Do power shutdown error")
log.Errorf("Do power shutdown error: %s", err)
}
task.startTime = time.Now()
ExecuteTask(task, nil)
@@ -73,7 +74,7 @@ func (self *SBaremetalServerStopTask) WaitForStop(ctx context.Context, args inte
isSoft = false
}
if err := self.Baremetal.DoPowerShutdown(isSoft); err != nil {
return errors.Wrap(err, "DoPowerShutdown")
log.Errorf("DoPowerShutdown soft=%v error: %s", isSoft, err)
}
time.Sleep(10 * time.Second)
ExecuteTask(self, nil)

View File

@@ -15,6 +15,7 @@
package ipmitool
import (
"context"
"fmt"
"net"
"strconv"
@@ -115,21 +116,21 @@ func (ipmi *LanPlusIPMI) GetMode() string {
return "rmcp"
}
func (ipmi *LanPlusIPMI) GetCommand(args ...string) *procutils.Command {
func (ipmi *LanPlusIPMI) GetCommand(args ...string) (*procutils.Command, context.CancelFunc) {
nArgs := []string{
"--signal=KILL",
fmt.Sprintf("%s", ipmi.GetDefaultTimeout()),
"ipmitool", "-I", "lanplus", "-H", ipmi.host,
"-I", "lanplus", "-H", ipmi.host,
"-p", fmt.Sprintf("%d", ipmi.port),
"-U", ipmi.user,
"-P", ipmi.password,
}
nArgs = append(nArgs, args...)
return procutils.NewCommand("timeout", nArgs...)
ctx, cancel := context.WithTimeout(context.Background(), ipmi.GetDefaultTimeout())
return procutils.NewCommandContext(ctx, "ipmitool", nArgs...), cancel
}
func (ipmi *LanPlusIPMI) ExecuteCommand(args ...string) ([]string, error) {
cmd := ipmi.GetCommand(args...)
cmd, cancel := ipmi.GetCommand(args...)
defer cancel()
log.Debugf("[LanPlusIPMI] execute command: %s", cmd.String())
out, err := cmd.Output()
if err != nil {

View File

@@ -115,6 +115,8 @@ func (dev *MegaRaidPhyDev) parseLine(line string) bool {
dev.Status = "jbod"
} else if strings.Contains(strings.ToLower(val), "online") {
dev.Status = "online"
} else if val == "Rebuild" {
dev.Status = "rebuild"
} else {
dev.Status = "offline"
}
@@ -624,7 +626,7 @@ func (a StorcliAdaptor) key() string {
}
func (a *StorcliAdaptor) isComplete() bool {
return a.Controller >= 0 && a.key() != ""
return a.Controller >= 0 && a.name != "" && a.sn != ""
}
func (a *StorcliAdaptor) parseLine(l string) {

View File

@@ -56,7 +56,7 @@ func (dev *Mpt2SASRaidPhyDev) parseLine(line string) bool {
}
switch key {
case "Drive Type":
if strings.HasSuffix("_HDD", val) {
if strings.HasSuffix(val, "_HDD") {
dev.Rotate = tristate.True
} else {
dev.Rotate = tristate.False

View File

@@ -20,7 +20,6 @@ import (
"yunion.io/x/sqlchemy"
"yunion.io/x/onecloud/pkg/apis"
"yunion.io/x/onecloud/pkg/apis/compute"
"yunion.io/x/onecloud/pkg/mcclient"
)
@@ -40,11 +39,16 @@ func (manager *SMultiArchResourceBaseManager) ListItemFilter(
query apis.MultiArchResourceBaseListInput,
) (*sqlchemy.SQuery, error) {
if len(query.OsArch) > 0 {
if query.OsArch == compute.OS_ARCH_X86 {
if query.OsArch == apis.OS_ARCH_X86 {
q = q.Filter(sqlchemy.OR(
sqlchemy.Startswith(q.Field("os_arch"), query.OsArch),
sqlchemy.IsNullOrEmpty(q.Field("os_arch")),
))
} else if query.OsArch == apis.OS_ARCH_ARM {
q = q.Filter(sqlchemy.OR(
sqlchemy.Startswith(q.Field("os_arch"), query.OsArch),
sqlchemy.Equals(q.Field("os_arch"), apis.OS_ARCH_AARCH64),
))
} else {
q = q.Startswith("os_arch", query.OsArch)
}

View File

@@ -0,0 +1,54 @@
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// Code generated by model-api-gen. DO NOT EDIT.
package db
import (
"context"
"yunion.io/x/sqlchemy"
"yunion.io/x/onecloud/pkg/apis"
"yunion.io/x/onecloud/pkg/mcclient"
)
// +onecloud:model-api-gen
type SAutoDeleteResourceBase struct {
// 是否跟随资源自动删除
// example: false
AutoDelete bool `nullable:"false" default:"false" get:"user" update:"user" json:"auto_delete"`
}
type SAutoDeleteResourceBaseManager struct{}
func (manager *SAutoDeleteResourceBaseManager) ListItemFilter(
ctx context.Context,
q *sqlchemy.SQuery,
userCred mcclient.TokenCredential,
query apis.AutoDeleteResourceBaseListInput,
) (*sqlchemy.SQuery, error) {
if query.AutoDelete != nil {
q = q.Equals("auto_delete", *query.AutoDelete)
}
return q, nil
}
func (self *SAutoDeleteResourceBase) SetAutoDelete(model IModel, userCred mcclient.TokenCredential, autoDelete bool) error {
_, err := Update(model, func() error {
self.AutoDelete = autoDelete
return nil
})
return err
}

View File

@@ -425,9 +425,6 @@ func Query2List(manager IModelManager, ctx context.Context, userCred mcclient.To
extraResults[i].Update(jsonDict)
jsonDict = extraResults[i]
}
if len(exportKeys) > 0 {
jsonDict = jsonDict.CopyIncludes(exportKeys...)
}
if len(fieldFilter) > 0 {
jsonDict = jsonDict.CopyIncludes(fieldFilter...)
}
@@ -791,6 +788,9 @@ func ListItems(manager IModelManager, ctx context.Context, userCred mcclient.Tok
if len(retList) != retCount {
totalCnt = len(retList)
}
if query.Contains("export_keys") {
retList = getExportCols(query, retList)
}
paginate := false
if !customizeFilters.IsEmpty() {
// query not use Limit and Offset, do manual pagination
@@ -822,6 +822,18 @@ func calculateListResult(data []jsonutils.JSONObject, total, limit, offset int64
return &retResult
}
func getExportCols(query jsonutils.JSONObject, retList []jsonutils.JSONObject) []jsonutils.JSONObject {
var exportKeys stringutils2.SSortedStrings
exportKeyStr, _ := query.GetString("export_keys")
exportKeys = stringutils2.NewSortedStrings(strings.Split(exportKeyStr, ","))
for i := range retList {
if len(exportKeys) > 0 {
retList[i] = retList[i].(*jsonutils.JSONDict).CopyIncludes(exportKeys...)
}
}
return retList
}
func (dispatcher *DBModelDispatcher) List(ctx context.Context, query jsonutils.JSONObject, ctxIds []dispatcher.SResourceContext) (*modulebase.ListResult, error) {
userCred := fetchUserCredential(ctx)
@@ -920,11 +932,7 @@ func (dispatcher *DBModelDispatcher) tryGetModelProperty(ctx context.Context, pr
}
if consts.IsRbacEnabled() {
ownerId, err := fetchOwnerId(ctx, dispatcher.modelManager, userCred, query)
if err != nil {
return nil, httperrors.NewGeneralError(err)
}
err = isClassRbacAllowed(dispatcher.modelManager, userCred, ownerId, policy.PolicyActionList, property)
_, _, err := FetchCheckQueryOwnerScope(ctx, userCred, query, dispatcher.modelManager, policy.PolicyActionList, true)
if err != nil {
return nil, err
}

View File

@@ -8,7 +8,6 @@ import (
"yunion.io/x/log"
"yunion.io/x/pkg/util/compare"
"yunion.io/x/onecloud/pkg/cloudcommon/db/lockman"
"yunion.io/x/onecloud/pkg/i18n"
"yunion.io/x/onecloud/pkg/mcclient"
)
@@ -177,8 +176,10 @@ func (manager *SI18nManager) RemoveI18ns(ctx context.Context, userCred mcclient.
}
func (manager *SI18nManager) SyncI18ns(ctx context.Context, userCred mcclient.TokenCredential, model IModel, table IModelI18nTable) ([]SI18n, []IModelI18nEntry, compare.SyncResult) {
lockman.LockClass(ctx, manager, "")
defer lockman.ReleaseClass(ctx, manager, "")
//// No need to lock SI18nManager, the resources has been lock in the upper layer - QIU Jian, 20210405
// lockman.LockClass(ctx, manager, "")
// defer lockman.ReleaseClass(ctx, manager, "")
syncResult := compare.SyncResult{}
extItems := manager.getExternalI18nItems(ctx, table)
@@ -257,7 +258,7 @@ func (manager *SI18nManager) newFromI18n(ctx context.Context, userCred mcclient.
}
func (self *SI18n) updateFromI18n(ctx context.Context, userCred mcclient.TokenCredential, entry IModelI18nEntry) error {
_, err := UpdateWithLock(ctx, self, func() error {
_, err := Update(self, func() error {
self.KeyValue = entry.GetKeyValue()
self.Cn = entry.Lookup(i18n.I18N_TAG_CHINESE)
self.En = entry.Lookup(i18n.I18N_TAG_ENGLISH)
@@ -273,8 +274,8 @@ func (self *SI18n) updateFromI18n(ctx context.Context, userCred mcclient.TokenCr
}
func (self *SI18n) removeI18n(ctx context.Context, userCred mcclient.TokenCredential) error {
lockman.LockObject(ctx, self)
defer lockman.ReleaseObject(ctx, self)
// lockman.LockObject(ctx, self)
// defer lockman.ReleaseObject(ctx, self)
err := self.Delete(ctx, userCred)
return err

View File

@@ -459,17 +459,17 @@ func (manager *SMetadataManager) SetValue(ctx context.Context, obj IModel, key s
}
func (manager *SMetadataManager) SetValuesWithLog(ctx context.Context, obj IModel, store map[string]interface{}, userCred mcclient.TokenCredential) error {
changes, err := manager.SetValues(ctx, obj, store, userCred)
changes, err := manager.setValues(ctx, obj, store, userCred)
if err != nil {
return err
}
if len(changes) > 0 {
OpsLog.LogEvent(obj, ACT_SET_METADATA, jsonutils.Marshal(changes), userCred)
OpsLog.LogEvent(obj.GetIModel(), ACT_SET_METADATA, jsonutils.Marshal(changes), userCred)
}
return nil
}
func (manager *SMetadataManager) SetValues(ctx context.Context, obj IModel, store map[string]interface{}, userCred mcclient.TokenCredential) ([]sMetadataChange, error) {
func (manager *SMetadataManager) setValues(ctx context.Context, obj IModel, store map[string]interface{}, userCred mcclient.TokenCredential) ([]sMetadataChange, error) {
idStr := GetObjectIdstr(obj)
// no need to lock
@@ -546,9 +546,9 @@ func (manager *SMetadataManager) SetValues(ctx context.Context, obj IModel, stor
}
func (manager *SMetadataManager) SetAll(ctx context.Context, obj IModel, store map[string]interface{}, userCred mcclient.TokenCredential, delRange string) error {
changes, err := manager.SetValues(ctx, obj, store, userCred)
changes, err := manager.setValues(ctx, obj, store, userCred)
if err != nil {
return err
return errors.Wrap(err, "setValues")
}
idStr := GetObjectIdstr(obj)
@@ -565,9 +565,9 @@ func (manager *SMetadataManager) SetAll(ctx context.Context, obj IModel, store m
q := manager.Query().Equals("id", idStr).NotLike("key", `\_\_%`) //避免删除系统内置的metadata, _ 在mysql里面有特殊含义,需要转义
switch delRange {
case USER_TAG_PREFIX:
q = q.Like("key", USER_TAG_PREFIX+"%")
q = q.Startswith("key", USER_TAG_PREFIX)
case CLOUD_TAG_PREFIX:
q = q.Like("key", CLOUD_TAG_PREFIX+"%")
q = q.Startswith("key", CLOUD_TAG_PREFIX)
}
q = q.Filter(sqlchemy.NOT(sqlchemy.In(q.Field("key"), keys)))
if err := FetchModelObjects(manager, q, &records); err != nil {
@@ -581,7 +581,7 @@ func (manager *SMetadataManager) SetAll(ctx context.Context, obj IModel, store m
changes = append(changes, sMetadataChange{Key: rec.Key, OValue: rec.Value})
}
if len(changes) > 0 {
OpsLog.LogEvent(obj, ACT_SET_METADATA, jsonutils.Marshal(changes), userCred)
OpsLog.LogEvent(obj.GetIModel(), ACT_SET_METADATA, jsonutils.Marshal(changes), userCred)
}
return nil
}
@@ -603,7 +603,7 @@ func (manager *SMetadataManager) GetAll(obj IModel, keys []string, keyPrefix str
ret := make(map[string]string)
for _, rec := range records {
if len(rec.Value) > 0 || strings.HasPrefix(rec.Key, USER_TAG_PREFIX) {
ret[rec.Key] = rec.Value
ret[strings.ToLower(rec.Key)] = rec.Value
}
}
return ret, nil

View File

@@ -126,7 +126,8 @@ func (manager *SOpsLogManager) LogEvent(model IModel, action string, notes inter
if !consts.OpsLogEnabled() {
return
}
if len(model.GetId()) == 0 || len(model.GetName()) == 0 {
if len(model.GetId()) == 0 {
log.Errorf("logevent for an object without ID???")
return
}
if action == ACT_UPDATE {
@@ -384,7 +385,7 @@ func (self *SOpsLogManager) FilterByOwner(q *sqlchemy.SQuery, ownerId mcclient.I
}
case rbacutils.ScopeDomain:
if len(ownerId.GetProjectDomainId()) > 0 {
q = q.Filter(sqlchemy.Equals(q.Field("domain_id"), ownerId.GetProjectDomainId()))
q = q.Filter(sqlchemy.Equals(q.Field("project_domain_id"), ownerId.GetProjectDomainId()))
}
default:
// systemScope, no filter

View File

@@ -47,8 +47,9 @@ const (
ACT_BACKUP_START = "backup_start"
ACT_BACKUP_START_FAILED = "backup_start_fail"
ACT_FREEZE = "freeze"
ACT_UNFREEZE = "unfreeze"
ACT_FREEZE = "freeze"
ACT_FREEZE_FAIL = "freeze_fail"
ACT_UNFREEZE = "unfreeze"
ACT_RESTARING = "restarting"
ACT_RESTART_FAIL = "restart_fail"

View File

@@ -51,6 +51,8 @@ func isObjectRbacAllowed(model IModel, userCred mcclient.TokenCredential, action
case rbacutils.ScopeUser:
if ownerId != nil && objOwnerId != nil && (ownerId.GetUserId() == objOwnerId.GetUserId() || objOwnerId.GetUserId() == "" || (model.IsSharable(ownerId) && action == policy.PolicyActionGet)) {
requireScope = rbacutils.ScopeUser
} else if ownerId != nil && objOwnerId != nil && ownerId.GetProjectDomainId() == objOwnerId.GetProjectDomainId() {
requireScope = rbacutils.ScopeDomain
} else {
requireScope = rbacutils.ScopeSystem
}
@@ -103,6 +105,8 @@ func isClassRbacAllowed(manager IModelManager, userCred mcclient.TokenCredential
case rbacutils.ScopeUser:
if ownerId != nil && ownerId.GetUserId() == objOwnerId.GetUserId() {
requireScope = rbacutils.ScopeUser
} else if ownerId != nil && ownerId.GetProjectDomainId() == objOwnerId.GetProjectDomainId() {
requireScope = rbacutils.ScopeDomain
} else {
requireScope = rbacutils.ScopeSystem
}

View File

@@ -18,6 +18,7 @@ import (
"context"
"crypto/tls"
"fmt"
"sync"
"time"
"go.etcd.io/etcd/clientv3"
@@ -45,7 +46,8 @@ type SEtcdClient struct {
onKeepaliveFailure func()
leaseLiving bool
watchers map[string]*SEtcdWatcher
watchers map[string]*SEtcdWatcher
watchersMu *sync.Mutex
}
func defaultOnKeepAliveFailed() {
@@ -115,6 +117,7 @@ func NewEtcdClient(opt *SEtcdOptions, onKeepaliveFailure func()) (*SEtcdClient,
etcdClient.leaseTtlTimeout = timeoutSeconds
etcdClient.watchers = make(map[string]*SEtcdWatcher)
etcdClient.watchersMu = &sync.Mutex{}
etcdClient.namespace = opt.EtcdNamspace
@@ -306,8 +309,10 @@ func (cli *SEtcdClient) Watch(
onModify TEtcdModifyEventFunc,
onDelete TEtcdDeleteEventFunc,
) error {
cli.watchersMu.Lock()
_, ok := cli.watchers[prefix]
if ok {
cli.watchersMu.Unlock()
return errors.Errorf("watch prefix %s already registered", prefix)
}
@@ -318,6 +323,7 @@ func (cli *SEtcdClient) Watch(
watcher: watcher,
cancel: cancel,
}
cli.watchersMu.Unlock()
prefix = cli.getKey(prefix)
@@ -346,6 +352,8 @@ func (cli *SEtcdClient) Watch(
}
func (cli *SEtcdClient) Unwatch(prefix string) {
cli.watchersMu.Lock()
defer cli.watchersMu.Unlock()
watcher, ok := cli.watchers[prefix]
if ok {
log.Debugf("unwatch %s", prefix)

View File

@@ -47,6 +47,7 @@ var (
ActionPendingDelete SAction = "pending_delete"
ActionRebuildRoot SAction = "rebuild_root"
ActionChangeConfig SAction = "change_config"
ActionChangeIpaddr SAction = "change_ipaddr"
)
type SEvent struct {

View File

@@ -339,7 +339,11 @@ func genMsgViaLang(ctx context.Context, p sNotifyParams) ([]npk.SNotifyMessage,
}
func intelliNotify(ctx context.Context, p sNotifyParams) {
log.Infof("recipientId: %v, contacts: %v, event %s priority %s", p.recipientId, p.contacts, p.event, p.priority)
log.Infof("recipientId: %v, contactType: %s, contacts: %v, event %s priority %s", p.recipientId, p.channel, p.contacts, p.event, p.priority)
// hack
if len(p.recipientId) == 0 && len(p.contacts) == 0 {
p.contacts = []string{""}
}
msgs, err := genMsgViaLang(ctx, p)
if err != nil {
log.Errorf("unable send notification: %v", err)
@@ -433,14 +437,9 @@ func notifyWithChannel(ctx context.Context, p sNotifyParams, channels ...npk.TNo
p.recipientId = []string{}
p.contacts = []string{}
p.channel = c
if c == npk.NotifyByWebConsole {
p.contacts = reps
} else {
p.recipientId = reps
}
p.recipientId = reps
rawNotify(ctx, p)
}
}
func NotifyImportant(recipientId []string, isGroup bool, event string, data jsonutils.JSONObject) {
@@ -519,7 +518,7 @@ func notifyRobot(ctx context.Context, robot string, recipientId []string, isGrou
s := auth.GetAdminSession(ctx, consts.GetRegion(), "")
params := jsonutils.NewDict()
params.Set("robot", jsonutils.NewString(robot))
result, err := modules.NotifyConfig.PerformClassAction(s, "get-types", params)
result, err := modules.NotifyReceiver.PerformClassAction(s, "get-types", params)
if err != nil {
return err
}

View File

@@ -35,6 +35,7 @@ const (
OEM_NAME_FOXCONN = "foxconn"
OEM_NAME_QEMU = "qemu"
OEM_NAME_SUPERMICRO = "supermicro"
OEM_NAME_H3C = "h3c"
)
var (
@@ -48,6 +49,7 @@ var (
OEM_NAME_FOXCONN,
OEM_NAME_QEMU,
OEM_NAME_SUPERMICRO,
OEM_NAME_H3C,
}
)

View File

@@ -829,6 +829,9 @@ var ValidateModel = func(userCred mcclient.TokenCredential, manager db.IStandalo
if errors.Cause(err) == sql.ErrNoRows {
return nil, httperrors.NewResourceNotFoundError2(manager.Keyword(), *id)
}
if errors.Cause(err) == sqlchemy.ErrDuplicateEntry {
return nil, httperrors.NewDuplicateResourceError(manager.Keyword(), *id)
}
return nil, httperrors.NewGeneralError(err)
}
*id = model.GetId()

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