Compare commits

...

800 Commits

Author SHA1 Message Date
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
Zexi Li
4cb9304d4c Merge pull request #9702 from swordqiu/automated-cherry-pick-of-#9701-upstream-release-3.6
Automated cherry pick of #9701: fix(region): omit vpc quota check if vpc created by owner
2020-12-29 09:35:53 +08:00
Zexi Li
db198f06d6 Merge pull request #9700 from zhaoxiangchun/automated-cherry-pick-of-#9698-upstream-release-3.6
Automated cherry pick of #9698: fix(monitor): sore reture info:resourceType,measurement
2020-12-29 09:35:02 +08:00
Qiu Jian
e38ea05c21 fix(region): omit vpc quota check if vpc created by owner
Vpc quota check is omitted if vpc is create by owner user
2020-12-29 01:18:44 +08:00
--global
ba22334382 fix(monitor): sore reture info:resourceType,measurement
1.对资源类型和对应的measurement进行排序输出
2020-12-28 21:44:04 +08:00
Zexi Li
4020c6dd9e Merge pull request #9695 from zhaoxiangchun/automated-cherry-pick-of-#9694-upstream-release-3.6
Automated cherry pick of #9694: fix(monitor): add resType   filter
2020-12-28 21:22:27 +08:00
--global
ccf0653581 fix(monitor): add resType filter
1.修复资源类型过滤失效的问题
2020-12-28 17:21:01 +08:00
Zexi Li
5f566f517c Merge pull request #9541 from ioito/automated-cherry-pick-of-#9540-upstream-release-3.6
Automated cherry pick of #9540: fix(region): openstack network is regional
2020-12-28 10:20:30 +08:00
Zexi Li
787a0a61d0 Merge pull request #9683 from rainzm/automated-cherry-pick-of-#9681-upstream-release-3.6
Automated cherry pick of #9681: feat(region): make DeleteSnapshotExpiredRelease applies to postpaid vm
2020-12-27 21:06:12 +08:00
Zexi Li
60392d84aa Merge pull request #9679 from ioito/automated-cherry-pick-of-#9677-upstream-release-3.6
Automated cherry pick of #9677: optimized(region): qcloud bucket policy set and get operation
2020-12-26 20:01:08 +08:00
rainzm
be042a0758 feat(region): make DeleteSnapshotExpiredRelease applies to postpaid vm 2020-12-26 18:43:10 +08:00
Zexi Li
ea3bdba3c6 Merge pull request #9588 from tb365/automated-cherry-pick-of-#9587-upstream-release-3.6
Automated cherry pick of #9587: fix(region): cloudregion&zone add namei18n
2020-12-26 18:42:58 +08:00
Qu Xuan
c0bcfa9a53 optimized(region): qcloud bucket policy set and get operation 2020-12-26 17:42:49 +08:00
TangBin
e289553015 fix(region): remove i18n fix & zone &region name support i18n 2020-12-26 17:34:55 +08:00
TangBin
834f5a97de fix(region): aws sync vpc access mode bugfix 2020-12-26 17:34:55 +08:00
TangBin
2a4a762f24 fix(region): cloudregion&zone add namei18n 2020-12-26 17:34:54 +08:00
Zexi Li
eae0c59eb3 Merge pull request #9662 from rainzm/automated-cherry-pick-of-#9660-upstream-release-3.6
Automated cherry pick of #9660: feat(region): add options DeleteSnapshotExpiredRelease
2020-12-26 15:12:32 +08:00
Zexi Li
5368888dd8 Merge pull request #9650 from ioito/automated-cherry-pick-of-#9627-upstream-release-3.6
Automated cherry pick of #9627: fix(region): support rds secgroup operation
2020-12-26 12:20:10 +08:00
Zexi Li
85c2ea5ccc Merge pull request #9649 from lvyangyang/automated-cherry-pick-of-#9636-upstream-release-3.6
Automated cherry pick of #9636: fix(region): aws lb create tags param
2020-12-26 12:18:29 +08:00
Zexi Li
f9da623770 Merge pull request #9641 from ioito/automated-cherry-pick-of-#9640-upstream-release-3.6
Automated cherry pick of #9640: fix(region): purge private cloud sku
2020-12-26 12:15:08 +08:00
Zexi Li
4a2ef4163e Merge pull request #9643 from ioito/automated-cherry-pick-of-#9642-upstream-release-3.6
Automated cherry pick of #9642: fix(region): apsara optimized
2020-12-26 12:13:51 +08:00
Zexi Li
a192d40495 Merge pull request #9645 from swordqiu/automated-cherry-pick-of-#9644-upstream-release-3.6
Automated cherry pick of #9644: feature(climc): policy save data into file
2020-12-26 12:09:23 +08:00
Zexi Li
1ab4b68080 Merge pull request #9655 from ioito/automated-cherry-pick-of-#9654-upstream-release-3.6
Automated cherry pick of #9654: fix(region): optimized azure rebuild root
2020-12-26 12:06:41 +08:00
Zexi Li
c829c02325 Merge pull request #9653 from swordqiu/automated-cherry-pick-of-#9652-upstream-release-3.6
Automated cherry pick of #9652: fix(cloudevent): adjust cloudevents resource scope
2020-12-26 12:04:56 +08:00
rainzm
e4efbdc336 feat(region): add options DeleteSnapshotExpiredRelease 2020-12-26 11:09:19 +08:00
yunion-ci-robot
22e318b6c1 Merge pull request #9658 from zhaoxiangchun/automated-cherry-pick-of-#9657-upstream-release-3.6
Automated cherry pick of #9657: fix(monitor): monitor notify international and 3.6 bugfix
2020-12-26 11:06:58 +08:00
--global
ab14706ff5 fix(monitor): monitor notify international and 3.6 bugfix
1.修复项目下无法查看报警记录
2.修复报警策略切换所属范围signature失败
3.国际化问题处理
2020-12-26 09:54:08 +08:00
Qu Xuan
0252c00efc fix(region): optimized azure rebuild root 2020-12-25 20:56:29 +08:00
Qiu Jian
540af1a3af fix(cloudevent): adjust cloudevents resource scope
Change cloudevents resource scope from system to project.
2020-12-25 20:41:57 +08:00
Qu Xuan
c5a974e744 fix(region): support rds secgroup operation 2020-12-25 19:13:11 +08:00
lvyangyang
4cb9c936cd fix(region): aws lb create tags param 2020-12-25 18:24:41 +08:00
Zexi Li
22d31a39c1 Merge pull request #9638 from ioito/automated-cherry-pick-of-#9637-upstream-release-3.6
Automated cherry pick of #9637: fix(cloudid): optimized system policy sync
2020-12-25 17:24:07 +08:00
Qiu Jian
94dd5c5777 feature(climc): policy save data into file
Allow saveing policy data into file
2020-12-25 17:02:02 +08:00
Qu Xuan
8a5e682b06 fix(cloudid): optimized system policy sync 2020-12-25 15:04:17 +08:00
Qu Xuan
38a0b76a58 fix(region): apsara optimized 2020-12-25 14:21:35 +08:00
Qu Xuan
a2b15c596c fix(region): purge private cloud sku 2020-12-25 11:23:46 +08:00
Zexi Li
64ed1d4e88 Merge pull request #9634 from ioito/automated-cherry-pick-of-#9633-upstream-release-3.6
Automated cherry pick of #9633: fix(region): sku.meta use global proxy
2020-12-25 01:26:21 +08:00
Zexi Li
f8e228502f Merge pull request #9630 from ioito/automated-cherry-pick-of-#9629-upstream-release-3.6
Automated cherry pick of #9629: fix(region): optimized disk allocate sched failed log
2020-12-24 17:47:59 +08:00
Zexi Li
a0cecc801e Merge pull request #9623 from ioito/automated-cherry-pick-of-#9622-upstream-release-3.6
Automated cherry pick of #9622: fix(region): avoid openstack change config error
2020-12-24 17:42:14 +08:00
Zexi Li
916692b992 Merge pull request #9626 from ioito/automated-cherry-pick-of-#9593-upstream-release-3.6
Automated cherry pick of #9593: fix(region): private cloud sku create
2020-12-24 17:41:15 +08:00
Zexi Li
244a63aa24 Merge pull request #9620 from ioito/automated-cherry-pick-of-#9619-upstream-release-3.6
Automated cherry pick of #9619: fix(region): avolid panic when list role's policies
2020-12-24 17:35:18 +08:00
Zexi Li
1f6e01592e Merge pull request #9610 from wanyaoqi/automated-cherry-pick-of-#9609-upstream-release-3.6
Automated cherry pick of #9609: fix(glance): list image by os arch use startwith
2020-12-24 17:34:32 +08:00
Qu Xuan
14bdbea3e2 fix(region): sku.meta use global proxy 2020-12-24 17:24:38 +08:00
Qu Xuan
27a2d36ff5 fix(region): optimized disk allocate sched failed log 2020-12-24 16:59:09 +08:00
Qu Xuan
1aec7ab259 fix(region): private cloud sku create 2020-12-24 15:33:03 +08:00
Qu Xuan
059cd75273 fix(region): avolid panic when list role's policies 2020-12-24 15:31:26 +08:00
Zexi Li
4c97c6ad3b Merge pull request #9618 from lvyangyang/automated-cherry-pick-of-#9596-upstream-release-3.6
Automated cherry pick of #9596: feat(region): azure tags
2020-12-24 14:33:14 +08:00
Qu Xuan
b60d18c060 fix(region): avoid openstack change config error 2020-12-24 11:52:05 +08:00
lvyangyang
950e75f8b0 feat(region): azure tags 2020-12-24 10:18:10 +08:00
Zexi Li
65781bfe06 Merge pull request #9617 from swordqiu/automated-cherry-pick-of-#9616-upstream-release-3.6
Automated cherry pick of #9616: fix(keystone): add i18n description for policy and role
2020-12-24 02:14:11 +08:00
Qiu Jian
334b347eb9 fix(keystone): add i18n description for policy and role
Add i18n support for descriptions of system policy and role
2020-12-23 23:34:58 +08:00
Zexi Li
d9c38a8550 Merge pull request #9595 from wanyaoqi/automated-cherry-pick-of-#9594-upstream-release-3.6
Automated cherry pick of #9594: chore(util): update centos build version to 1.1-3
2020-12-23 22:15:26 +08:00
Zexi Li
35cc29f86c Merge pull request #9604 from rainzm/automated-cherry-pick-of-#9603-upstream-release-3.6
Automated cherry pick of #9603: feat(webhook): send webhook notification when c/d loadbalancerlisterrule
2020-12-23 22:15:01 +08:00
Zexi Li
50d83a75e5 Merge pull request #9598 from zhaoxiangchun/automated-cherry-pick-of-#9597-upstream-release-3.6
Automated cherry pick of #9597: fix(cloudmon): deal cannot get  azure metric
2020-12-23 22:14:29 +08:00
Zexi Li
2ef96a9b26 Merge pull request #9600 from yousong/automated-cherry-pick-of-#9599-upstream-release-3.6
Automated cherry pick of #9599: Bugfix/yousong climc ssh
2020-12-23 22:13:27 +08:00
Zexi Li
daabb5b411 Merge pull request #9607 from zhaoxiangchun/automated-cherry-pick-of-#9605-upstream-release-3.6
Automated cherry pick of #9605: fix(monitor): fix nodata alertresource list
2020-12-23 22:10:15 +08:00
Zexi Li
9dd09504cd Merge pull request #9614 from rainzm/automated-cherry-pick-of-#9613-upstream-release-3.6
Automated cherry pick of #9613: fix(notify): fit correctly when send notification via contact
2020-12-23 22:03:29 +08:00
Zexi Li
b9560c6765 Merge pull request #9612 from rainzm/automated-cherry-pick-of-#9611-upstream-release-3.6
Automated cherry pick of #9611: feat(cloudcommon): determine the notification template based on the user’s language preference
2020-12-23 20:32:36 +08:00
rainzm
cdf7825379 fix(notify): fit correctly when send notification via contact 2020-12-23 17:50:45 +08:00
rainzm
7d75620d6d feat(cloudcommon): determine the notification template based on the user’s language preference 2020-12-23 17:44:07 +08:00
wanyaoqi
f3404f678c fix(glance): list image by os arch use startwith 2020-12-23 16:25:39 +08:00
--global
cdcfc79232 fix(monitor): fix nodata alertresource list
1.修复nodata报警资源列表无法根据nodata策略正确刷新和删除
2020-12-23 14:52:26 +08:00
rainzm
24f4a684a5 feat(webhook): send webhook notification when c/d loadbalancerlisterrule 2020-12-23 14:51:41 +08:00
Yousong Zhou
8a4c1a0bbe fix(mcclient): options: webconsole: fix passing ssh port 2020-12-23 13:31:40 +08:00
Yousong Zhou
ce00a17614 refactor(climc): webconsole: use helper methods of response struct 2020-12-23 13:31:40 +08:00
Yousong Zhou
8e9b4aed2f refactor(webconsole): api: add helper methods for response struct 2020-12-23 13:31:40 +08:00
Yousong Zhou
5959a204f7 refactor(webconsole): use structured response 2020-12-23 13:31:40 +08:00
--global
d2459a5cc0 fix(cloudmon): deal cannot get azure metric
1.azure重构代码导致监控uri路径出错
2020-12-23 13:17:42 +08:00
wanyaoqi
d980604920 chore(util): update centos build version to 1.1-3 2020-12-23 11:15:15 +08:00
Zexi Li
c5c370d6a2 Merge pull request #9550 from tb365/automated-cherry-pick-of-#9548-upstream-release-3.6
Automated cherry pick of #9548: Bugfix/tb bugfix 121801
2020-12-23 09:48:07 +08:00
Zexi Li
d442f842f2 Merge pull request #9578 from zhaoxiangchun/automated-cherry-pick-of-#9577-upstream-release-3.6
Automated cherry pick of #9577: feat(monitor): add global alertrecord
2020-12-23 09:46:02 +08:00
Zexi Li
347e2f0828 Merge pull request #9571 from ioito/automated-cherry-pick-of-#9570-upstream-release-3.6
Automated cherry pick of #9570: fix(region): 避免从云上同步下来的主机,创建相同配置时network_id为空
2020-12-23 09:41:49 +08:00
Zexi Li
9fe732619d Merge pull request #9574 from ioito/automated-cherry-pick-of-#9573-upstream-release-3.6
Automated cherry pick of #9573: fix(region): add huawei gpssd desc
2020-12-23 09:37:05 +08:00
Zexi Li
540b21cfd4 Merge pull request #9582 from zhaoxiangchun/automated-cherry-pick-of-#9579-upstream-release-3.6
Automated cherry pick of #9579: fix(monitor): other servier create alert add used_by param as a agreement
2020-12-23 09:35:20 +08:00
Zexi Li
7fd9b0f47e Merge pull request #9585 from rainzm/automated-cherry-pick-of-#9584-upstream-release-3.6
Automated cherry pick of #9584: more convenient debugging and role isolation
2020-12-23 09:09:48 +08:00
Zexi Li
60724356ec Merge pull request #9590 from swordqiu/automated-cherry-pick-of-#9589-upstream-release-3.6
Automated cherry pick of #9589: fix(cloudevent,devtool): missing metadata table
2020-12-23 09:06:48 +08:00
Qiu Jian
5d298e71bb fix(cloudevent,devtool): missing metadata table 2020-12-23 03:12:10 +08:00
rainzm
deb3758bfa feat: download the role to tmpdir not system role dir 2020-12-22 20:21:38 +08:00
rainzm
1eaf2eaff0 feat: add keep_tmpdir options
Setting 'keep_tmpdir' as true will keep tmpdir as used by executing
ansible playbook for debugging
2020-12-22 20:21:38 +08:00
Qu Xuan
ea41bb4f18 fix(region): openstack network is regional 2020-12-22 16:26:36 +08:00
--global
e2ca41a5f5 feat(monitor): add global alertrecord
1.支持时间、资源类型、报警级别、报警状态的过滤
2.报警记录删除时,删除关联的报警记录
2020-12-22 16:22:50 +08:00
--global
2ba98e7cee fix(monitor): other servier create alert add used_by param as a agreement
1.解决notify,meter中创建的对应的策略也展示在统一报警策略页面。通过used_by
  进行区分
2020-12-22 16:18:21 +08:00
Qu Xuan
a9c6579b6a fix(region): add huawei gpssd desc 2020-12-22 11:33:03 +08:00
Qu Xuan
f150da6d98 fix(region): 避免从云上同步下来的主机,创建相同配置时network_id为空 2020-12-22 11:18:32 +08:00
Zexi Li
dcf2a3f66c Merge pull request #9499 from wanyaoqi/automated-cherry-pick-of-#9498-upstream-release-3.6
Automated cherry pick of #9498: server migrate misc fix
2020-12-22 10:06:11 +08:00
yunion-ci-robot
eb2f782fd2 Merge pull request #9565 from zexi/automated-cherry-pick-of-#9564-upstream-release-3.6
Automated cherry pick of #9564: Hotfix/baremetal pxe net alloc
2020-12-21 23:50:49 +08:00
Zexi Li
f86e26fec2 Merge pull request #9545 from yousong/automated-cherry-pick-of-#9544-upstream-release-3.6
Automated cherry pick of #9544: fix(region): lbbackend: better error reporting for finding influxdb info
2020-12-21 21:08:35 +08:00
Zexi Li
3effc3ea38 Merge pull request #9556 from ioito/automated-cherry-pick-of-#9555-upstream-release-3.6
Automated cherry pick of #9555: fix(region): fix openstack instance os type
2020-12-21 21:02:06 +08:00
Zexi Li
b023c24250 Merge pull request #9560 from rainzm/automated-cherry-pick-of-#9559-upstream-release-3.6
Automated cherry pick of #9559: feat(scripts): add export DOCKER_BUILDKIT=1
2020-12-21 21:00:26 +08:00
Zexi Li
5d1d8dc145 Merge pull request #9562 from ioito/automated-cherry-pick-of-#9561-upstream-release-3.6
Automated cherry pick of #9561: fix(cloudid): add <br> for notify templete
2020-12-21 20:59:24 +08:00
Zexi Li
9f2b137f08 fix(region,baremetal): choose candidate network not according by types 2020-12-21 20:48:31 +08:00
Zexi Li
829faa1ab6 fix(region,baremetal): pxe net reuse converted server access ip 2020-12-21 20:48:31 +08:00
Qu Xuan
2faead462b fix(cloudid): add <br> for notify templete 2020-12-21 20:42:31 +08:00
rainzm
4135e62f6f feat(scripts): add export DOCKER_BUILDKIT=1 2020-12-21 19:56:39 +08:00
Qu Xuan
9c0ce58a06 fix(region): fix openstack instance os type 2020-12-21 19:49:56 +08:00
TangBin
5a10db10cd fix(region): lbacl &lbcert default share scope 2020-12-21 17:33:21 +08:00
TangBin
0c3a1986f6 fix(region): elb acl validate create data fix 2020-12-21 17:33:21 +08:00
TangBin
1a4faf4101 fix(region): aliyun elb listener&lbbg sync project 2020-12-21 17:33:21 +08:00
TangBin
c4eda6b5af fix(region): cert&acl cache delete condition check 2020-12-21 17:33:21 +08:00
Yousong Zhou
48f1cf12ae fix(region): lbbackend: better error reporting for finding influxdb info 2020-12-21 16:51:44 +08:00
Zexi Li
74d050292f Merge pull request #9370 from ioito/automated-cherry-pick-of-#9360-upstream-release-3.6
Automated cherry pick of #9360: fix(region): sync servers
2020-12-21 10:40:39 +08:00
Zexi Li
db9b653b29 Merge pull request #9539 from swordqiu/automated-cherry-pick-of-#9538-upstream-release-3.6
Automated cherry pick of #9538: fix(cloudcommon): query string may be modified in listItemQuery
2020-12-21 01:32:00 +08:00
Zexi Li
7726efa305 Merge pull request #9537 from swordqiu/automated-cherry-pick-of-#9536-upstream-release-3.6
Automated cherry pick of #9536: fix(keystone): ignore deleted policies when matching policies
2020-12-21 01:30:40 +08:00
Qiu Jian
41b694ad3e fix(cloudcommon): query filter ineffective for splitable
query string may be modified in listItemQuery routine, which cause some query
filter is removed and hence ineffective when query over splitable
2020-12-20 20:31:43 +08:00
Qiu Jian
86476c22a9 fix(keystone): ignore deleted policies when matching policies
ignore deleted policies when matching policies
2020-12-20 14:18:59 +08:00
Zexi Li
495a0283ce Merge pull request #9535 from swordqiu/automated-cherry-pick-of-#9534-upstream-release-3.6
Automated cherry pick of #9534: fix(cloudcommon): add rbac_policy_refresh_internval_seconds option
2020-12-20 02:08:37 +08:00
Zexi Li
f6329cbc71 Merge pull request #9528 from swordqiu/automated-cherry-pick-of-#9527-upstream-release-3.6
Automated cherry pick of #9527: fix(cloudcommon): panic when query a splitable model manager
2020-12-20 02:07:56 +08:00
Zexi Li
742ac46cab Merge pull request #9530 from swordqiu/automated-cherry-pick-of-#9529-upstream-release-3.6
Automated cherry pick of #9529: fix(taskman): use admin token if task userCred token expired
2020-12-20 02:05:55 +08:00
Qiu Jian
6caec234a9 fix(cloudcommon): add rbac_policy_refresh_internval_seconds option
Add new option rbac_policy_refresh_interval_seconds to control the
valid duration of a policy cache. The option is introduced at 3.6.
Replace option rbac_policy_sync_period_seconds.
2020-12-20 01:34:33 +08:00
Qiu Jian
b3c90a8049 fix(taskman): use admin token if task userCred token expired
Use admin credential token if task cached userCred token expired
2020-12-20 01:21:40 +08:00
Qiu Jian
ba8754687a fix(cloudcommon): panic when query an empty splitable model manager
fix panic when querying an empty splitable model manager, e.g. action-show
2020-12-20 00:25:49 +08:00
yunion-ci-robot
5c5178985e Merge pull request #9524 from zexi/automated-cherry-pick-of-#9521-upstream-release-3.6
Automated cherry pick of #9521: Storage actual size filter
2020-12-19 23:56:03 +08:00
Zexi Li
47e739d612 Merge pull request #9495 from wanyaoqi/automated-cherry-pick-of-#9494-upstream-release-3.6
Automated cherry pick of #9494: fix(region): guest to create input keep billing info
2020-12-19 20:06:10 +08:00
Zexi Li
b70ab17dcb Merge pull request #9506 from ioito/automated-cherry-pick-of-#9159-upstream-release-3.6
Automated cherry pick of #9159: feat(region): add instance storage capability
2020-12-19 20:04:27 +08:00
Zexi Li
5010a9154d Merge pull request #9510 from ioito/automated-cherry-pick-of-#9509-upstream-release-3.6
Automated cherry pick of #9509: fix(region): azure async task
2020-12-19 20:02:37 +08:00
Zexi Li
0ac658c2ca Merge pull request #9513 from ioito/automated-cherry-pick-of-#9512-upstream-release-3.6
Automated cherry pick of #9512: fix(region): azure secgroup rule not allow with same priority and dir…
2020-12-19 20:01:01 +08:00
Zexi Li
e7dd6bba0c fix(scheduler): storage predicate add actualCapacity filter 2020-12-19 19:58:10 +08:00
Zexi Li
7a3ad28fd6 Merge pull request #9517 from swordqiu/automated-cherry-pick-of-#9515-upstream-release-3.6
Automated cherry pick of #9515: fix(host): telegraf listen on local ipv4 address explicitly
2020-12-19 18:11:49 +08:00
Zexi Li
bd212de4f7 Merge pull request #9516 from swordqiu/automated-cherry-pick-of-#9501-upstream-release-3.6
Automated cherry pick of #9501: feature(keystone): user add language attribute
2020-12-19 18:11:39 +08:00
Qiu Jian
4606458719 fix(host): telegraf listen on local ipv4 address explicitly
Ensure telegraf listen on local IPv4 address explicityly and host send
metrics to telegraf local IPv4 address explicityly.
2020-12-19 15:37:03 +08:00
Qiu Jian
768c88d28d feature(keystone): user add language attribute
User add language attribute, notify and alarm will use this attribute to
send message in proper language
2020-12-19 15:36:37 +08:00
Qu Xuan
2b0e8afe0f fix(region): azure secgroup rule not allow with same priority and direction 2020-12-19 14:48:57 +08:00
Qu Xuan
09adc5f60f fix(region): azure async task 2020-12-19 14:02:15 +08:00
Qu Xuan
8779895298 feat(region): add instance storage capability 2020-12-19 11:14:58 +08:00
Qu Xuan
d2d96b1229 fix(region): sync servers 2020-12-19 10:26:10 +08:00
Zexi Li
3e74921627 Merge pull request #9503 from swordqiu/automated-cherry-pick-of-#9502-upstream-release-3.6
Automated cherry pick of #9502: fix(keystone): always upload&refresh service config whenever service …
2020-12-19 09:32:47 +08:00
Qiu Jian
97eb6e7bc7 fix(keystone): always upload&refresh service config whenever service restart
Always upload&refresh service config whenever service restart
2020-12-19 00:53:14 +08:00
yunion-ci-robot
54337fe93b Merge pull request #9491 from zexi/automated-cherry-pick-of-#9490-upstream-release-3.6
Automated cherry pick of #9490: Hotfix/baremetal pd makegood
2020-12-18 20:49:19 +08:00
Zexi Li
c8a007d9b3 Merge pull request #9484 from rainzm/automated-cherry-pick-of-#9483-upstream-release-3.6
Automated cherry pick of #9483: Webhook better describe the life cycle of the guest
2020-12-18 20:37:51 +08:00
wanyaoqi
6c96e6d1f8 fix(host): add print migrate progress info 2020-12-18 18:29:36 +08:00
wanyaoqi
e26fb5cc1d fix(region): do not change disk status on migrating 2020-12-18 18:29:36 +08:00
Zexi Li
547df8a171 Merge pull request #9489 from tb365/automated-cherry-pick-of-#9488-upstream-release-3.6
Automated cherry pick of #9488: Bugfix/tb bugfix 121702
2020-12-18 16:36:20 +08:00
Zexi Li
7da3869e24 Merge pull request #9466 from zhaoxiangchun/automated-cherry-pick-of-#9459-upstream-release-3.6
Automated cherry pick of #9459: feat(monitor): add alert slience time and modify scoperesource FetchUniqValues func
2020-12-18 16:33:48 +08:00
Zexi Li
012a84d187 Merge pull request #9487 from wanyaoqi/automated-cherry-pick-of-#9486-upstream-release-3.6
Automated cherry pick of #9486: fix(region): fix change config forecast
2020-12-18 16:31:15 +08:00
Zexi Li
adc27a53f3 Merge pull request #9482 from wanyaoqi/automated-cherry-pick-of-#9481-upstream-release-3.6
Automated cherry pick of #9481: fix(keystone): service config ignore deploy server socket path
2020-12-18 16:29:29 +08:00
wanyaoqi
f8c4c008f8 fix(region): guest to create input keep billing info 2020-12-18 16:18:27 +08:00
Zexi Li
f6bf3050fa fix(baremetal): clear jbod disks do PDMakeGood 2020-12-18 15:50:15 +08:00
TangBin
e4f372ba55 fix(region): remove unnecessary vpc validate create date error wrap 2020-12-18 15:19:54 +08:00
TangBin
755f4a93a3 fix(region): network create mask length validate 2020-12-18 15:19:54 +08:00
TangBin
ad39e790d9 fix(region): vpc create data cird validate 2020-12-18 15:19:54 +08:00
TangBin
bc3fdb890f fix(region): ctyun delete server bugfix
6642
2020-12-18 15:19:54 +08:00
TangBin
2e401b5664 fix(region): create vm with eip task fix 2020-12-18 15:19:53 +08:00
wanyaoqi
52f0afda00 fix(region): fix change config forecast 2020-12-18 14:58:57 +08:00
--global
1a1df0f075 feat(monitor): add alert slience time and modify scoperesource FetchUniqValues func
1.增加报警静默时间
2.后端修改 scoperesource FetchUniqValues :回显scope 属性
2020-12-18 14:40:46 +08:00
rainzm
79eacb5b45 feat(region): send webhook server_create when canceling pending delete 2020-12-18 13:10:21 +08:00
rainzm
0c72872330 feat(region): distinguish between pending delete and delete notification 2020-12-18 13:10:21 +08:00
wanyaoqi
8287f3767e fix(keystone): service config ignore deploy server socket path 2020-12-18 12:52:52 +08:00
Zexi Li
3ab9d15bf0 Merge pull request #9478 from yousong/automated-cherry-pick-of-#9458-upstream-release-3.6
Automated cherry pick of #9458: Bugfix/yousong eip ipaddr
2020-12-18 12:51:32 +08:00
Zexi Li
854d160875 Merge pull request #9473 from yousong/automated-cherry-pick-of-#9472-upstream-release-3.6
Automated cherry pick of #9472: Bugfix/yousong host mtu
2020-12-18 00:19:22 +08:00
Zexi Li
bb23fc8ae9 Merge pull request #9477 from wanyaoqi/automated-cherry-pick-of-#9476-upstream-release-3.6
Automated cherry pick of #9476: fix(host-deployer): probe image info umount rootfs first
2020-12-18 00:17:39 +08:00
Yousong Zhou
bb0568d18a fix(region): eip_allocate_task: set eip status allocate_fail on task failure 2020-12-17 22:01:02 +08:00
Yousong Zhou
baff004838 fix(region,climc): eips: rename arg name for requested eip addr 2020-12-17 22:01:02 +08:00
Yousong Zhou
6e449c123b fix(region): guestnetworks: use net calculated mtu 2020-12-17 21:51:23 +08:00
Yousong Zhou
80efc97c69 feat(region): networks: add getMtu method 2020-12-17 21:51:23 +08:00
Yousong Zhou
aaec97470b feat(apis): add const VPC_OVN_ENCAP_COST 2020-12-17 21:51:22 +08:00
Yousong Zhou
206ae7f9e8 feat(host): startvm: set vpc nic mtu
Windows DHCP client does not respect DHCP MTU option
2020-12-17 21:51:22 +08:00
Yousong Zhou
005fad402c feat(host): startvm: add nic_mtu shell func 2020-12-17 21:51:22 +08:00
Yousong Zhou
c2d173ae1c refactor(host): startvm: for compat
QEMU 2.12 outputs device help on stderr in the following style

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

QEMU 5.2.0 outputs it to stdout and in the following format

```
  speed=<int32>          -  (default: -1)
```
2020-12-17 21:51:22 +08:00
Yousong Zhou
38492014b5 refactor(host): startvm: nic_speed: use raw string 2020-12-17 21:51:22 +08:00
Yousong Zhou
4cf3565b29 refactor(host): startvm: add QEMU_CMD_KVM_ARG 2020-12-17 21:51:22 +08:00
wanyaoqi
7ed96af338 fix(host-deployer): probe image info umount rootfs first 2020-12-17 20:34:07 +08:00
Zexi Li
7fcd0fc28a Merge pull request #9471 from ioito/automated-cherry-pick-of-#9470-upstream-release-3.6
Automated cherry pick of #9470: fix(region): apsara metrics fix
2020-12-17 16:03:31 +08:00
Qu Xuan
a67b096686 fix(region): apsara metrics fix 2020-12-17 16:01:58 +08:00
Zexi Li
b2e6c1bd55 Merge pull request #9464 from rainzm/automated-cherry-pick-of-#9463-upstream-release-3.6
Automated cherry pick of #9463: fix(region): exclude network recommended for host when suggesting net…
2020-12-17 11:22:03 +08:00
Zexi Li
fb181a47a1 Merge pull request #9469 from tb365/automated-cherry-pick-of-#9467-upstream-release-3.6
Automated cherry pick of #9467: fix(region): skus add cloudenv
2020-12-17 11:17:46 +08:00
TangBin
f17593d3f4 fix(region): skus add cloudenv 2020-12-17 11:05:14 +08:00
rainzm
930c643153 fix(region): exclude network recommended for host when suggesting network for guest 2020-12-17 10:12:42 +08:00
Zexi Li
6f44812520 Merge pull request #9442 from wanyaoqi/automated-cherry-pick-of-#9441-upstream-release-3.6
Automated cherry pick of #9441: bugfix(region): server change config rebase to sched task
2020-12-17 09:50:45 +08:00
Zexi Li
347857f40e Merge pull request #9455 from zexi/automated-cherry-pick-of-#9454-upstream-release-3.6
Automated cherry pick of #9454: fix(scheduler): fetch input network when specified
2020-12-16 18:24:38 +08:00
wanyaoqi
5314ce98b0 bugfix(region): server change config rebase to sched task 2020-12-16 18:07:50 +08:00
Zexi Li
9644513728 Merge pull request #9453 from swordqiu/automated-cherry-pick-of-#9452-upstream-release-3.6
Automated cherry pick of #9452: fix(keystone): panic if request with an invalid token
2020-12-16 17:57:31 +08:00
Zexi Li
5cfd7f0401 fix(scheduler): fetch input network when specified 2020-12-16 17:50:25 +08:00
Qiu Jian
5a71931982 fix(keystone): panic if request with an invalid token
service report nil pointer panic if request with an invalid token string
2020-12-16 16:47:03 +08:00
Zexi Li
e877b081ea Merge pull request #9445 from tb365/automated-cherry-pick-of-#9443-upstream-release-3.6
Automated cherry pick of #9443: Bugfix/tb bugfix 121501
2020-12-16 12:25:50 +08:00
Zexi Li
5de1f1c3ff Merge pull request #9419 from zexi/automated-cherry-pick-of-#9418-upstream-release-3.6
Automated cherry pick of #9418: fix(region): baremetal post update related server
2020-12-16 10:40:55 +08:00
Zexi Li
f65b3499d9 Merge pull request #9448 from swordqiu/automated-cherry-pick-of-#9447-upstream-release-3.6
Automated cherry pick of #9447: fix(log): fail to submit action log
2020-12-16 09:32:56 +08:00
Zexi Li
903367ce61 Merge pull request #9440 from zhaoxiangchun/automated-cherry-pick-of-#9439-upstream-release-3.6
Automated cherry pick of #9439: feat(monitor): support create nodata alert from web
2020-12-16 09:27:18 +08:00
Qiu Jian
1a2a40a811 fix(log): fail to submit action log
Because splitable not implement InsertOrMethod method, fail to submit
action log
2020-12-16 00:25:58 +08:00
TangBin
eee13a549b fix(awscli): instance-rebuild-root fix 2020-12-15 21:05:06 +08:00
TangBin
cef3d52f08 fix(region): vpc sync external access mode fix 2020-12-15 20:57:39 +08:00
TangBin
596b376d85 fix(region): vpc usable fix 2020-12-15 20:57:39 +08:00
TangBin
efb4368716 fix(region): aws create vpc with igw add defaultroute 2020-12-15 20:57:38 +08:00
TangBin
ac89394947 fix(region): aws delete vpc skipped delete main route table 2020-12-15 20:57:38 +08:00
TangBin
5ff27734bc fix(region): aws vpc delete skip delete default secgroup 2020-12-15 20:57:38 +08:00
TangBin
9f52afdf94 fix(region): aws vpc delete related route table & internet gateway 2020-12-15 20:57:38 +08:00
TangBin
72153ecf58 fix(region): sku list query print missing error info 2020-12-15 20:57:38 +08:00
TangBin
9218c9e0b6 fix(region): aws create storage type fix 2020-12-15 20:57:37 +08:00
TangBin
68a2111bfd fix(region): aws create root device name fix 2020-12-15 20:56:57 +08:00
TangBin
b46d51d1e3 fix(region): vpc create validate cidr mask length 2020-12-15 20:56:57 +08:00
TangBin
da82328076 fix(region): aws detach igw before delete vpc 2020-12-15 20:56:57 +08:00
TangBin
b30a40d707 fix(region): vpc list usable fix 2020-12-15 20:56:57 +08:00
TangBin
8a1d15eba1 feat(region): server list add parameter eip_associable 2020-12-15 20:56:57 +08:00
yunion-ci-robot
007ad2cdc7 Merge pull request #9436 from wanyaoqi/automated-cherry-pick-of-#9435-upstream-release-3.6
Automated cherry pick of #9435: fix(host): fix set windows password with escape charater
2020-12-15 20:51:19 +08:00
zhaoxiangchun
c2b8f6a832 feat(monitor): support create nodata alert from web
1.支持从前端页面创建nodata报警策略,对于nodata的情况给出对应的resource
2020-12-15 18:21:37 +08:00
wanyaoqi
539baf7ba1 fix(host): fix set windows password with escape charater 2020-12-15 16:57:08 +08:00
Zexi Li
5f610498e8 Merge pull request #9416 from swordqiu/automated-cherry-pick-of-#9415-upstream-release-3.6
Automated cherry pick of #9415: fix(keystone): update user attributes whenever user login
2020-12-15 11:54:59 +08:00
Zexi Li
cd798b9094 Merge pull request #9432 from zexi/automated-cherry-pick-of-#9431-upstream-release-3.6
Automated cherry pick of #9431: Fix/climc server create desc
2020-12-15 11:51:56 +08:00
Zexi Li
d86d91dfcc Merge pull request #9427 from yousong/automated-cherry-pick-of-#9426-upstream-release-3.6
Automated cherry pick of #9426: fix(vpcagent): ovn: stable dns A record value
2020-12-15 11:44:49 +08:00
Zexi Li
df45ced78b fix(climc): server-create --desc not work 2020-12-15 11:36:01 +08:00
Yousong Zhou
b3e196950e fix(vpcagent): ovn: stable dns A record value 2020-12-15 10:47:16 +08:00
Zexi Li
d1f09e0799 Merge pull request #9420 from wanyaoqi/automated-cherry-pick-of-#9417-upstream-release-3.6
Automated cherry pick of #9417: fix(region,host): fix hot remove nic
2020-12-15 00:08:57 +08:00
Zexi Li
d001e0ec8f fix(region): baremetal post update related server 2020-12-14 19:16:44 +08:00
wanyaoqi
7c1923abf0 fix(region,host): fix hot remove nic
- region: check is hot remove nic enable
- host: del qemu device after del netdev
2020-12-14 19:01:14 +08:00
wanyaoqi
fbd53b4934 fix(host): fix check hugepage enabled 2020-12-14 19:01:14 +08:00
Qiu Jian
a4b4a1d16e fix(keystone): update user attributes whenever user login
update user attribtues whenever user login
2020-12-14 18:19:46 +08:00
Zexi Li
0210763ca0 Merge pull request #9412 from zexi/automated-cherry-pick-of-#9411-upstream-release-3.6
Automated cherry pick of #9411: fix(scheduler): sku filter check zone if only prefer region specified
2020-12-14 17:56:40 +08:00
yunion-ci-robot
fddf03a3ba Merge pull request #9410 from wanyaoqi/automated-cherry-pick-of-#9409-upstream-release-3.6
Automated cherry pick of #9409: feat(region): export user tags support virtual resources
2020-12-14 17:55:05 +08:00
Zexi Li
019c034133 fix(scheduler): sku filter check zone if only prefer region specified 2020-12-14 17:26:17 +08:00
Zexi Li
b1f2d7f379 Merge pull request #9407 from zexi/automated-cherry-pick-of-#9405-upstream-release-3.6
Automated cherry pick of #9405: Hotfix/webconsole trim url
2020-12-14 17:21:29 +08:00
Zexi Li
db9799c7f5 Merge pull request #9374 from rainzm/automated-cherry-pick-of-#9373-upstream-release-3.6
Automated cherry pick of #9373: feat(region): larger suggest network and more complete vlanid
2020-12-14 15:57:59 +08:00
wanyaoqi
d76915893d feat(region): export user tags support virtual resources 2020-12-14 15:56:46 +08:00
Zexi Li
64f94bd928 Merge pull request #9395 from zexi/automated-cherry-pick-of-#9394-upstream-release-3.6
Automated cherry pick of #9394: fix(scheduler): get candidates error more info
2020-12-14 15:52:27 +08:00
Zexi Li
f6713aab33 Merge pull request #9404 from wanyaoqi/automated-cherry-pick-of-#9403-upstream-release-3.6
Automated cherry pick of #9403: fix(region,glance): list by os arch adapt to empty strings
2020-12-14 15:50:56 +08:00
Zexi Li
1236a03269 fix(webconsole): trim api_server url if end with slashes 2020-12-14 15:47:53 +08:00
Zexi Li
4ef482dbc9 Merge pull request #9400 from rainzm/automated-cherry-pick-of-#9399-upstream-release-3.6
Automated cherry pick of #9399: fix(notify): avoid deadlock
2020-12-14 15:45:34 +08:00
wanyaoqi
027a9439cd fix(region,glance): list by os arch adapt to empty strings 2020-12-14 15:15:26 +08:00
rainzm
b1abb353a9 fix(notify): avoid deadlock 2020-12-14 15:05:46 +08:00
Zexi Li
01124b3128 fix(scheduler): get candidates error more info 2020-12-14 14:40:44 +08:00
rainzm
ae94914a7e feat(region): add test for CloudaccountManger.PerformPrepareNets 2020-12-14 14:17:58 +08:00
rainzm
cc26752697 feat(region): larger suggest network and more complete vlanid
1. 抓取标准 PortGroup 的 vlanid,以前只有分布式 PortGroup 的 vlanid
2. 提供的建议网络会尽可能的大
2020-12-14 14:17:58 +08:00
Zexi Li
d1a4a52915 Merge pull request #9389 from tb365/automated-cherry-pick-of-#9386-upstream-release-3.6
Automated cherry pick of #9386: feat(region): support sync skus by cloudregion
2020-12-13 13:51:46 +08:00
Zexi Li
7837a760b5 Merge pull request #9379 from ioito/automated-cherry-pick-of-#9351-upstream-release-3.6
Automated cherry pick of #9351: feat(cloudid): support aliyun saml auth
2020-12-13 12:13:53 +08:00
Zexi Li
08b436e90d Merge pull request #9385 from ioito/automated-cherry-pick-of-#9384-upstream-release-3.6
Automated cherry pick of #9384: fix(region): optimized server stop code
2020-12-13 12:12:28 +08:00
Zexi Li
5ca9493a55 Merge pull request #9391 from swordqiu/automated-cherry-pick-of-#9390-upstream-release-3.6
Automated cherry pick of #9390: fix(region): network reserved ip count not consider expiration of reserved ips
2020-12-13 12:09:22 +08:00
Qiu Jian
d8684ea5a0 fix(region): network reserved ip count not consider expiration of reserved ips
network reserved ip count not consider expiration of reserved ips
2020-12-12 19:42:05 +08:00
TangBin
d86f9a2009 feat(region): support sync skus by cloudregion 2020-12-12 19:11:21 +08:00
Qu Xuan
0a8348a364 fix(region): optimized server stop code 2020-12-12 18:54:27 +08:00
Zexi Li
9b5f8ae892 Merge pull request #9378 from tb365/automated-cherry-pick-of-#9359-upstream-release-3.6
Automated cherry pick of #9359: Bugfix/tb bugfix cmb 1210
2020-12-12 18:29:02 +08:00
Qu Xuan
592ae29d7e feat(cloudid): support aliyun saml auth 2020-12-12 18:06:54 +08:00
TangBin
86838db6d3 feat(region): support sync skus by cloudregion 2020-12-12 17:48:04 +08:00
TangBin
f20ca8b9c9 fix(region): server login info& keypair import input parameter trimspace 2020-12-12 17:48:04 +08:00
Zexi Li
474831d983 Merge pull request #9314 from zhaoxiangchun/automated-cherry-pick-of-#9313-upstream-release-3.6
Automated cherry pick of #9313: feat(monitor): add metric description
2020-12-12 00:17:54 +08:00
Zexi Li
84c89654ef Merge pull request #9364 from swordqiu/automated-cherry-pick-of-#9361-upstream-release-3.6
Automated cherry pick of #9361: fix(keystone): allow unlink a domain from an IDP
2020-12-12 00:16:36 +08:00
Zexi Li
d6735144c6 Merge pull request #9363 from swordqiu/automated-cherry-pick-of-#9362-upstream-release-3.6
Automated cherry pick of #9362: fix(util): update vendor for log
2020-12-12 00:15:02 +08:00
Zexi Li
6aeb3a77cb Merge pull request #9367 from swordqiu/automated-cherry-pick-of-#9366-upstream-release-3.6
Automated cherry pick of #9366: fix(keystone): ignore service config update without changes
2020-12-12 00:13:46 +08:00
Qiu Jian
e817076c6c fix(keystone): ignore service config update without changes
ignore service config updates that no changes happen. prevent service
config change infomrer messages from flushing the log.
2020-12-11 22:21:51 +08:00
Qiu Jian
253fba47f5 fix(keystone): allow unlink a domain from an IDP
allow unlink a domain from an IDP
2020-12-11 21:50:53 +08:00
Qiu Jian
b4d5400e65 update vendor 2020-12-11 20:50:50 +08:00
zhaoxiangchun
09660da0a9 feat(monitor): add metric description
1.添加oss、rds、redis、vm_netio metric description
2.修改hostmetrics vm_netio 指标:
  bits_sent ==> bps_sent
  bits_recv ==> bps_recv
3.对metric中field进行排序

https://bug.yunion.io/zentao/task-view-2358.html
2020-12-11 20:17:13 +08:00
Zexi Li
6748a36e0c Merge pull request #9357 from ioito/automated-cherry-pick-of-#9356-upstream-release-3.6
Automated cherry pick of #9356: fix(region): sku enabled
2020-12-11 19:37:15 +08:00
Zexi Li
6c57580a8e Merge pull request #9297 from swordqiu/automated-cherry-pick-of-#9160-upstream-release-3.6
Automated cherry pick of #9160: feature(cloudcommon): split opslog table
2020-12-11 19:31:12 +08:00
Qu Xuan
92fee001e8 fix(region): sku enabled 2020-12-11 17:08:50 +08:00
yunion-ci-robot
ce247ab817 Merge pull request #9336 from zexi/automated-cherry-pick-of-#9335-upstream-release-3.6
Automated cherry pick of #9335: Hotfix/baremetal convert host
2020-12-11 13:32:15 +08:00
Zexi Li
8e964f3c3c Merge pull request #9343 from ioito/automated-cherry-pick-of-#9339-upstream-release-3.6
Automated cherry pick of #9339: fix(region,yunionapi,glance): using global proxy
2020-12-11 11:40:48 +08:00
Zexi Li
1f23060475 Merge pull request #9353 from zexi/automated-cherry-pick-of-#9352-upstream-release-3.6
Automated cherry pick of #9352: Bugfix/scheduler SKU net
2020-12-11 09:18:22 +08:00
Zexi Li
24fdb6e84e fix(scheduler): sku by region and fill onecloud vpc networks 2020-12-10 21:13:51 +08:00
Zexi Li
d06c049cd9 Merge pull request #9332 from ioito/automated-cherry-pick-of-#9331-upstream-release-3.6
Automated cherry pick of #9331: fix(region): openstack hosts sync
2020-12-10 20:40:07 +08:00
Zexi Li
1f5916fd7f Merge pull request #9348 from swordqiu/automated-cherry-pick-of-#9347-upstream-release-3.6
Automated cherry pick of #9347: fix(cloudcommon): perform public should check the sharing scope of
2020-12-10 20:38:02 +08:00
Zexi Li
8114d1a292 Merge pull request #9341 from ioito/automated-cherry-pick-of-#9340-upstream-release-3.6
Automated cherry pick of #9340: fix(region): import rule error hint
2020-12-10 20:33:28 +08:00
Zexi Li
ff1b6a1de0 Merge pull request #9346 from wanyaoqi/automated-cherry-pick-of-#9345-upstream-release-3.6
Automated cherry pick of #9345: fix(region): gpu server change config use reserved resources
2020-12-10 20:32:31 +08:00
Qiu Jian
de47e4a69b fix(cloudcommon): perform public should check the sharing scope of resource
perform public should check the sharing scope of resource
2020-12-10 19:15:24 +08:00
wanyaoqi
b07387b57a fix(region): gpu server change config use reserved resources 2020-12-10 18:40:59 +08:00
Qu Xuan
c1ecb63309 fix(region,yunionapi,glance): using global proxy 2020-12-10 18:33:40 +08:00
Qu Xuan
a8116b5252 fix(region): import rule error hint 2020-12-10 18:29:34 +08:00
Zexi Li
24a5cf7a7c Merge pull request #9330 from ioito/automated-cherry-pick-of-#9329-upstream-release-3.6
Automated cherry pick of #9329: fix(region): aws default account
2020-12-10 17:23:38 +08:00
Zexi Li
1e15c450c8 Merge pull request #9326 from rainzm/automated-cherry-pick-of-#9325-upstream-release-3.6
Automated cherry pick of #9325: Try to repull contacts when changing notify config
2020-12-10 17:22:17 +08:00
Zexi Li
1f63971f77 Merge pull request #9299 from ioito/automated-cherry-pick-of-#9298-upstream-release-3.6
Automated cherry pick of #9298: fix(region): support openstack subnet allocation pools
2020-12-10 17:17:53 +08:00
Zexi Li
504feb9504 Merge pull request #9321 from swordqiu/automated-cherry-pick-of-#9320-upstream-release-3.6
Automated cherry pick of #9320: fix(cloudcommon): disable quota check by default
2020-12-10 17:08:39 +08:00
Zexi Li
eb857594f2 fix(baremetal): convert to host failed
- convert schedule should include converting status
- auto register name should lowercase
- finish convert set host name by guest
2020-12-10 16:58:42 +08:00
Qu Xuan
8692498cbd fix(region): openstack hosts sync 2020-12-10 16:55:41 +08:00
Qu Xuan
97eab67f0a fix(region): aws default account 2020-12-10 16:24:48 +08:00
rainzm
c5acc1b482 fix(notify): repull subcontact after changing config 2020-12-10 10:26:09 +08:00
rainzm
6591ccedc5 fix(notify): check for changes before updating config 2020-12-10 10:26:09 +08:00
rainzm
8d6defe227 refactor(notify): add StartSubcontactPullTask for receiver 2020-12-10 10:26:09 +08:00
Qiu Jian
6f7a3cf8a5 fix(cloudcommon): disable quota check by default
1. add enable_quota_check common option
2. disable quota check by default
3. specify scope of quota limit in OutOfQuota error message
2020-12-10 01:23:36 +08:00
Qiu Jian
93ceb707b7 update vendor 2020-12-09 23:05:49 +08:00
Qiu Jian
ec14f9a6bb feature(cloudcommon): split opslog table
automatically split opslog table, so as to delete obsolete event logs
2020-12-09 23:05:49 +08:00
Zexi Li
8570eec751 Merge pull request #9296 from swordqiu/automated-cherry-pick-of-#9295-upstream-release-3.6
Automated cherry pick of #9295: fix(cloudcommon): supplement i18n translations
2020-12-09 20:44:22 +08:00
Zexi Li
689b622066 Merge pull request #9293 from rainzm/automated-cherry-pick-of-#9292-upstream-release-3.6
Automated cherry pick of #9292: feat(notify): add intellij-get for receiver
2020-12-09 20:43:26 +08:00
Zexi Li
c901acb721 Merge pull request #9236 from wanyaoqi/automated-cherry-pick-of-#8848-upstream-release-3.6
Automated cherry pick of #8848: host-deployer: add deploy driver libguestfs
2020-12-09 20:41:37 +08:00
Zexi Li
81ca10b5f7 Merge pull request #9260 from wanyaoqi/automated-cherry-pick-of-#9259-upstream-release-3.6
Automated cherry pick of #9259: fix(region): attach network on register baremetal server
2020-12-09 20:40:06 +08:00
Zexi Li
5a0432fbc9 Merge pull request #9303 from ioito/automated-cherry-pick-of-#9302-upstream-release-3.6
Automated cherry pick of #9302: fix(region): optimized qcloud prepaid instance delete
2020-12-09 20:37:31 +08:00
Zexi Li
d8d6ca8611 Merge pull request #9307 from ioito/automated-cherry-pick-of-#9305-upstream-release-3.6
Automated cherry pick of #9305: fix(region): optimized openstack change config
2020-12-09 20:36:33 +08:00
Zexi Li
27fb34c3d4 Merge pull request #9309 from yousong/automated-cherry-pick-of-#9308-upstream-release-3.6
Automated cherry pick of #9308: Bugfix/yousong eip chargetype
2020-12-09 20:35:00 +08:00
Zexi Li
2ee09e4581 Merge pull request #9316 from wanyaoqi/automated-cherry-pick-of-#9315-upstream-release-3.6
Automated cherry pick of #9315: fix(host): check lease living on restart etcd session
2020-12-09 20:33:35 +08:00
rainzm
e17768fbc2 feat(notify): user cmdline helpler for climc notify-receiver-xxx 2020-12-09 17:03:36 +08:00
rainzm
75b0889c30 feat(notify): add intellij-get for receiver 2020-12-09 17:03:36 +08:00
wanyaoqi
1611ddfcdf fix(host): check lease living on restart etcd session 2020-12-09 16:55:53 +08:00
Yousong Zhou
a28fa3cf40 refactor(apis): compute: remove EIP_CHARGE_TYPE_DEFAULT
The default is now cloud provider specific
2020-12-09 12:16:49 +08:00
Yousong Zhou
14d6c9d6ed fix(region): sanitize eip charge type on all callsites 2020-12-09 12:16:49 +08:00
Yousong Zhou
8d7d240b30 feat(region): regiondriver: add methods on eip charge type 2020-12-09 12:16:49 +08:00
Qu Xuan
0d32c5d8e2 fix(region): optimized openstack change config 2020-12-09 11:51:47 +08:00
Qu Xuan
b5b7e89c6a fix(region): optimized qcloud prepaid instance delete 2020-12-09 11:48:57 +08:00
Qu Xuan
edcff8045f fix(region): support openstack subnet allocation pools 2020-12-09 10:29:52 +08:00
Qiu Jian
83a5f95b0e fix(cloudcommon): supplement i18n translations 2020-12-09 00:57:03 +08:00
Zexi Li
5878ce8bf5 Merge pull request #9254 from ioito/automated-cherry-pick-of-#9253-upstream-release-3.6
Automated cherry pick of #9253: fix(region): temp url sign wrong
2020-12-08 21:39:45 +08:00
Zexi Li
b63a1a0811 Merge pull request #9264 from ioito/automated-cherry-pick-of-#9263-upstream-release-3.6
Automated cherry pick of #9263: fix(region): azure instance data disk storage type
2020-12-08 21:38:49 +08:00
Zexi Li
f99acd1aeb Merge pull request #9276 from ioito/automated-cherry-pick-of-#9266-upstream-release-3.6
Automated cherry pick of #9266: fix(region): openstack available zones
2020-12-08 21:37:30 +08:00
Zexi Li
6cb5b3314d Merge pull request #9278 from wanyaoqi/automated-cherry-pick-of-#9277-upstream-release-3.6
Automated cherry pick of #9277: fix(region): validate isolated devices on migrate
2020-12-08 21:35:59 +08:00
Zexi Li
bb3ed50e5d Merge pull request #9283 from ioito/automated-cherry-pick-of-#9282-upstream-release-3.6
Automated cherry pick of #9282: fix(region): restore password validate condition
2020-12-08 21:35:11 +08:00
Zexi Li
7120df1e22 Merge pull request #9286 from ioito/automated-cherry-pick-of-#9285-upstream-release-3.6
Automated cherry pick of #9285: fix(region): sync account id
2020-12-08 21:34:16 +08:00
Zexi Li
38d561dee8 Merge pull request #9291 from zhasm/automated-cherry-pick-of-#9288-upstream-release-3.6
Automated cherry pick of #9288: fix(git,make): 更新获取 git branch 的规则
2020-12-08 18:11:44 +08:00
Zhang Dongliang
e8376f9981 fix(git,make): 更新获取 git branch 的规则 2020-12-08 18:01:15 +08:00
Qu Xuan
e540e6561a fix(region): sync account id 2020-12-08 17:58:43 +08:00
wanyaoqi
cfa1a4ee4f feat(host-deployer): add deploy driver libguestfs
Add drvier libguestfs to support deploy more operator system,
you can use it by edit host config file add 'image_deploy_driver: libguestfs'.
By the default host-deploy support run three guestfish at the same time.
And host deployer will recycle free guestfish every ten minitues.

cherrypick: release/3.6
2020-12-08 17:50:39 +08:00
Qu Xuan
acedb4a4f4 fix(region): restore password validate condition 2020-12-08 17:45:42 +08:00
yunion-ci-robot
3851497bad Merge pull request #9273 from wanyaoqi/automated-cherry-pick-of-#9272-upstream-release-3.6
Automated cherry pick of #9272: fix(host-deployer): cancel rename centos vgname
2020-12-08 17:07:39 +08:00
wanyaoqi
78e8d2f35e fix(region): validate isolated devices on migrate 2020-12-08 16:51:12 +08:00
Qu Xuan
7abd40c545 fix(region): openstack available zones 2020-12-08 16:47:17 +08:00
Zexi Li
1a2ed75cfa Merge pull request #9269 from zhasm/automated-cherry-pick-of-#9268-upstream-release-3.6
Automated cherry pick of #9268: fix(git,make): git branch 获取方式优化
2020-12-08 16:35:33 +08:00
wanyaoqi
41631ec09d fix(host-deployer): cancel rename centos vgname 2020-12-08 16:29:40 +08:00
wanyaoqi
dcd8936927 fix(region): attach network on register baremetal server 2020-12-08 16:08:19 +08:00
Zhang Dongliang
d7d4e6bf6e fix(git,make): git branch 获取方式优化 2020-12-08 15:51:43 +08:00
Qu Xuan
3633baaa2b fix(region): azure instance data disk storage type 2020-12-08 15:03:00 +08:00
Zexi Li
71c4b03644 Merge pull request #9258 from zhasm/automated-cherry-pick-of-#9230-upstream-release-3.6
Automated cherry pick of #9230: fix(git,make): 修正 gitbranch 变量的获取方式,解决自动升级版本 tag 不统一的问题
2020-12-08 12:51:01 +08:00
Zhang Dongliang
b0a95cbbe6 fix(git,make): 修正 gitbranch 变量的获取方式,允许外部传入,解决自动升级版本 tag 不统一的问题 2020-12-08 11:51:34 +08:00
Qu Xuan
c6a7a87014 fix(region): temp url sign wrong 2020-12-08 11:36:14 +08:00
Zexi Li
db0eda7986 Merge pull request #9148 from ioito/automated-cherry-pick-of-#9146-upstream-release-3.6
Automated cherry pick of #9146: fix(keystone): allow refresh scope resource
2020-12-08 09:40:20 +08:00
Zexi Li
9cac40775a Merge pull request #9247 from wanyaoqi/automated-cherry-pick-of-#9246-upstream-release-3.6
Automated cherry pick of #9246: fix(region): fix backup server start task
2020-12-08 09:35:26 +08:00
Zexi Li
3158a5c06b Merge pull request #9252 from swordqiu/automated-cherry-pick-of-#9251-upstream-release-3.6
Automated cherry pick of #9251: fix(keystone): rolepolicies list panic if filter by domain scope
2020-12-08 09:34:23 +08:00
Zexi Li
e8bdb396e9 Merge pull request #9249 from swordqiu/automated-cherry-pick-of-#9248-upstream-release-3.6
Automated cherry pick of #9248: fix(keystone): oidc driver turn on debug mode if log-level is debug
2020-12-08 09:29:00 +08:00
Qiu Jian
695075a853 fix(keystone): rolepolicies list panic if filter by domain scope
rolepolicies list panic if filter by scope=domain
2020-12-08 03:15:56 +08:00
Qiu Jian
e826239abf fix(keystone): oidc driver turn on debug mode if log-level is debug
oidc driver turn on debug mode if log-level is debug
2020-12-08 02:55:36 +08:00
Zexi Li
690efe5ec1 Merge pull request #9244 from ioito/automated-cherry-pick-of-#9243-upstream-release-3.6
Automated cherry pick of #9243: fix(region): azure reset windows os password
2020-12-07 22:18:57 +08:00
wanyaoqi
735f10a508 fix(region): fix backup server start task 2020-12-07 21:08:03 +08:00
Zexi Li
0d537a1dbb Merge pull request #9241 from ioito/automated-cherry-pick-of-#9240-upstream-release-3.6
Automated cherry pick of #9240: fix(region): avoid timeout for waiting azure async task
2020-12-07 20:41:15 +08:00
Zexi Li
b3f4b135ec Merge pull request #9226 from tb365/automated-cherry-pick-of-#9224-upstream-release-3.6
Automated cherry pick of #9224: Bugfix/tb bugfix 1207
2020-12-07 20:37:52 +08:00
Qu Xuan
81b31b2fe1 fix(region): azure reset windows os password 2020-12-07 20:20:01 +08:00
Zexi Li
03c4a66beb Merge pull request #9221 from ioito/automated-cherry-pick-of-#9220-upstream-release-3.6
Automated cherry pick of #9220: fix(region): region qcloud secgroup project id
2020-12-07 20:18:18 +08:00
Zexi Li
923c03e530 Merge pull request #9228 from ioito/automated-cherry-pick-of-#9227-upstream-release-3.6
Automated cherry pick of #9227: fix(region): avoid resize azure disk error
2020-12-07 20:16:49 +08:00
Zexi Li
23faa02b07 Merge pull request #9232 from wanyaoqi/automated-cherry-pick-of-#9231-upstream-release-3.6
Automated cherry pick of #9231: fix(host): update telegraf conf adapter to container environment
2020-12-07 19:59:21 +08:00
Zexi Li
81d37b74dd Merge pull request #9238 from rainzm/automated-cherry-pick-of-#9237-upstream-release-3.6
Automated cherry pick of #9237: feat(notify): add webconsole in enabled contact types
2020-12-07 19:57:48 +08:00
Qu Xuan
f22fe4fe36 fix(region): avoid timeout for waiting azure async task 2020-12-07 19:50:41 +08:00
rainzm
bce332272c feat(notify): add webconsole in enabled contact types 2020-12-07 19:13:59 +08:00
TangBin
7b96d2593d fix(region): lbcert&lbacl releated listener count bugfix 2020-12-07 17:37:38 +08:00
TangBin
08dda723b4 fix(region): lb listener filter by acl_id 2020-12-07 17:37:38 +08:00
TangBin
76eb124896 fix(region): redis master zone empty fix 2020-12-07 17:37:38 +08:00
TangBin
8bdcc83a8f fix(region): elastic cache name is empty fix
#6527
2020-12-07 17:37:38 +08:00
wanyaoqi
cbc2859248 fix(host): update telegraf conf adapter to container environment 2020-12-07 17:14:36 +08:00
Qu Xuan
0bfa488acd fix(region): avoid resize azure disk error 2020-12-07 15:25:59 +08:00
Zexi Li
23c5ba2b68 Merge pull request #9208 from ioito/automated-cherry-pick-of-#9205-upstream-release-3.6
Automated cherry pick of #9205: fix(region): validate invalid character for password
2020-12-07 10:52:09 +08:00
Qu Xuan
3e7d3c829a fix(keystone): allow refresh scope resource 2020-12-07 10:48:06 +08:00
Qu Xuan
45a3ce82da fix(region): region qcloud secgroup project id 2020-12-07 10:27:36 +08:00
Zexi Li
ca8e69c981 Merge pull request #9203 from tb365/automated-cherry-pick-of-#9202-upstream-release-3.6
Automated cherry pick of #9202: Bugfix/tb bugfix 1204
2020-12-07 10:23:59 +08:00
Qu Xuan
35544a7c2f fix(region): validate invalid character for password 2020-12-07 10:07:58 +08:00
TangBin
133ba01e94 fix(region): change dbinstance sku sync info log to warn 2020-12-07 10:01:08 +08:00
TangBin
7be898fbca fix(region): dbinstance skus sync log level fix 2020-12-07 10:01:08 +08:00
TangBin
d39b3e820a fix(region): server skus add cloud_env 2020-12-07 10:01:08 +08:00
Zexi Li
43522bbe97 Merge pull request #9218 from ioito/automated-cherry-pick-of-#9217-upstream-release-3.6
Automated cherry pick of #9217: fix(region): optimized qcloud secgroup sync, only redis need secgroup be in same project
2020-12-04 20:31:33 +08:00
Zexi Li
e33c96c2f7 Merge pull request #9216 from zhaoxiangchun/automated-cherry-pick-of-#9215-upstream-release-3.6
Automated cherry pick of #9215: chore(monitor): delete suggestion files
2020-12-04 20:27:26 +08:00
Qu Xuan
a84ed01f2f fix(region): optimized qcloud secgroup sync, only redis need secgroup be in same project 2020-12-04 19:43:45 +08:00
zhaoxiangchun
83e899d9a9 chore(monitor): delete suggestion files
1. 移除优化建议相关内容
2. mcclient中新增baseManager:SuggestionManager,修改优化建议相关的manager
2020-12-04 19:28:45 +08:00
Zexi Li
c2b0c57454 Merge pull request #9214 from zexi/automated-cherry-pick-of-#9213-upstream-release-3.6
Automated cherry pick of #9213: refactor(scheduler): remove unused k8s predicates code
2020-12-04 18:01:36 +08:00
Zexi Li
89f110f635 Merge pull request #9211 from ioito/automated-cherry-pick-of-#9210-upstream-release-3.6
Automated cherry pick of #9210: fix(region): azure metric request path
2020-12-04 18:00:53 +08:00
Zexi Li
2a2867daac refactor(scheduler): remove unused k8s predicates code 2020-12-04 17:25:12 +08:00
Qu Xuan
a79a61c417 fix(region): azure metric request path 2020-12-04 17:14:18 +08:00
Zexi Li
8c78bf5ca0 Merge pull request #9207 from zexi/automated-cherry-pick-of-#9204-upstream-release-3.6
Automated cherry pick of #9204: Hotfix/remove kubernetes depend
2020-12-04 17:02:53 +08:00
Zexi Li
8675c7b4f0 Merge pull request #9200 from lvyangyang/automated-cherry-pick-of-#9196-upstream-release-3.6
Automated cherry pick of #9196: feat(region): add bucket cloud tags support
2020-12-04 16:57:53 +08:00
Zexi Li
734be7c147 fix(go.mod): remove k8s.io/kubernetes dependency 2020-12-04 16:50:01 +08:00
Zexi Li
aab59e899b Merge pull request #9067 from rainzm/automated-cherry-pick-of-#9066-upstream-release-3.6
Automated cherry pick of #9066: feat(region): add wire level for preparing network
2020-12-04 14:53:10 +08:00
lvyangyang
66412faf96 feat(region): add bucket cloud tags support 2020-12-04 14:38:38 +08:00
lvyangyang
de67ee5a26 fix(region): fix modify tags log 2020-12-04 14:38:38 +08:00
rainzm
67788b1790 feat(climc): add cloud-account-preparenets-vmware command 2020-12-04 14:32:19 +08:00
rainzm
aad9aba489 feat(region): allow prepare nets for existed cloudaccounts
纳管云账号 -> 合并网段 -> 为vmware集群添加新的宿主机 ->
如何获取网络信息?

如果重新纳管,那么合并网段的工作又得做一次,很不方便。
最好的方法是,preparenets 接口支持已经存在的 cloudaccount,这样
就可以根据推荐的网络手动设置新设备的网络。
2020-12-04 14:32:19 +08:00
rainzm
5a186dbb3c feat(region): add wire level for preparing network
There are three wire level for vmware: vcenter, datacenter and cluster.
According to different wire levels, the recommended network has a different structure.
2020-12-04 14:32:19 +08:00
Zexi Li
64b9355954 Merge pull request #9190 from rainzm/automated-cherry-pick-of-#9189-upstream-release-3.6
Automated cherry pick of #9189: fix(region): remove default value of diskConfig.Medium
2020-12-04 10:41:27 +08:00
Zexi Li
ef8de3f8ac Merge pull request #9173 from ioito/automated-cherry-pick-of-#9134-upstream-release-3.6
Automated cherry pick of #9134: fix(region): azure win os defualt user
2020-12-04 10:24:31 +08:00
Zexi Li
a3b8f9e1c4 Merge pull request #9145 from yousong/automated-cherry-pick-of-#9144-upstream-release-3.6
Automated cherry pick of #9144: Feature/yousong vpc md
2020-12-04 10:23:34 +08:00
Zexi Li
e93a047b43 Merge pull request #9185 from rainzm/automated-cherry-pick-of-#9183-upstream-release-3.6
Automated cherry pick of #9183: fix(region): inspect invalid guest template
2020-12-04 10:21:09 +08:00
Zexi Li
ca2bfb6f16 Merge pull request #9182 from tb365/automated-cherry-pick-of-#9180-upstream-release-3.6
Automated cherry pick of #9180: Bugfix/tb bugfix 1203
2020-12-04 10:18:48 +08:00
Zexi Li
477edc200b Merge pull request #9193 from swordqiu/automated-cherry-pick-of-#9192-upstream-release-3.6
Automated cherry pick of #9192: fix(apigateway): allow logout by get method
2020-12-04 10:16:33 +08:00
Zexi Li
e1c61f0aae Merge pull request #9187 from zexi/automated-cherry-pick-of-#9184-upstream-release-3.6
Automated cherry pick of #9184: Hotfix/scheduler tag nil
2020-12-04 10:15:37 +08:00
rainzm
216e11f291 fix(region): remove default value of diskConfig.Medium
#8830 中,对调度器增加了通过请求磁盘的介质类型过滤存储的功能。

如果使用 climc 创建虚拟机且不要求磁盘有固定的介质类型,将
只能分配到 hybrid 的存储;进一步,如果没有 hybrid 的存储,将会调度失败。
2020-12-04 09:59:07 +08:00
Qiu Jian
ff24d4a3e3 fix(apigateway): allow logout by get method
All visit logout URL by GET method
2020-12-04 01:13:08 +08:00
Zexi Li
66eee7f72f fix(scheduler): check candidate tag resource is nil 2020-12-03 20:43:50 +08:00
rainzm
5602db8f5e fix(region): inspect invalid guest template
The glance service hangs and other external reasons may cause the guest template to be judged as invalid.
Therefore, health inspection should be performed on time for invalid guest templates.
2020-12-03 20:42:39 +08:00
TangBin
8db56d90f3 fix(region): huawei vnc protocal fix 2020-12-03 20:01:25 +08:00
TangBin
6e0acab93b feat(webconsole): add huawei vnc support 2020-12-03 20:01:25 +08:00
TangBin
69fa370b04 fix(region): elb cached acl sync 2020-12-03 20:01:25 +08:00
Zexi Li
a24d3c478b Merge pull request #9178 from zexi/automated-cherry-pick-of-#9176-upstream-release-3.6
Automated cherry pick of #9176: fix(scheduler): select resource unordered
2020-12-03 19:55:31 +08:00
Zexi Li
4a0aadae45 Merge pull request #9170 from lvyangyang/automated-cherry-pick-of-#9147-upstream-release-3.6
Automated cherry pick of #9147: feat(region): 多云 bucket  website.cors,referer 配置
2020-12-03 19:00:19 +08:00
Zexi Li
5b170650f8 fix(scheduler): select resource unordered 2020-12-03 18:43:16 +08:00
Qu Xuan
a823273884 fix(region): azure win os defualt user 2020-12-03 16:31:43 +08:00
lvyangyang
c9185a43c7 feat(region): 多云 bucket website.cors,referer 配置 2020-12-03 15:22:58 +08:00
Zexi Li
edd10faaf8 Merge pull request #9136 from ioito/automated-cherry-pick-of-#9135-upstream-release-3.6
Automated cherry pick of #9135: feat(cloudid): notify clouduser created
2020-12-03 15:17:11 +08:00
Zexi Li
ced5217f55 Merge pull request #9162 from ioito/automated-cherry-pick-of-#9161-upstream-release-3.6
Automated cherry pick of #9161: feat(region): huawei recovery new rds
2020-12-03 14:44:18 +08:00
Zexi Li
f23fa030ed Merge pull request #9164 from wanyaoqi/automated-cherry-pick-of-#9163-upstream-release-3.6
Automated cherry pick of #9163: bugfix(region): fix list by srever type normal
2020-12-03 14:43:15 +08:00
Zexi Li
ac64afa6b3 Merge pull request #9139 from zhaoxiangchun/automated-cherry-pick-of-#9138-upstream-release-3.6
Automated cherry pick of #9138: fix(monitor): modify influxdbSuggestDriver query err
2020-12-03 14:42:12 +08:00
zhaoxiangchun
96d0f0e63c fix(monitor): modify influxdbSuggestDriver query err
1.修复influxdb相关的建议规则查询数据失败的问题
2020-12-03 13:01:13 +08:00
wanyaoqi
3756993c98 bugfix(region): fix list by srever type normal
server list by normal shouldn't contains gpu and backup servers

cherrypick: release/3.4
2020-12-03 12:06:30 +08:00
Qu Xuan
551aa2f91f feat(region): huawei recovery new rds 2020-12-03 10:51:52 +08:00
Zexi Li
fb2a68bdb1 Merge pull request #9155 from wanyaoqi/automated-cherry-pick-of-#9154-upstream-release-3.6
Automated cherry pick of #9154: feat(region): add list filter server type
2020-12-03 09:33:24 +08:00
Zexi Li
311bc0f4d6 Merge pull request #9151 from ioito/automated-cherry-pick-of-#9150-upstream-release-3.6
Automated cherry pick of #9150: fix(region): avoid qcloud sync local disk error
2020-12-02 21:05:14 +08:00
wanyaoqi
6c4ba17371 feat(region): add list filter server type
list server by specific server type: normal, gpu, backup

cherrypick: release/3.4
2020-12-02 20:30:41 +08:00
Qu Xuan
0c7adedaad fix(region): avoid qcloud sync local disk error 2020-12-02 20:27:07 +08:00
Yousong Zhou
7d0828410a feat(appsrv): Application: add Stop method for shutdown behaviour 2020-12-02 18:04:58 +08:00
Yousong Zhou
6a2136f6c2 refactor(hostman): metadata: eliminate import of guestman 2020-12-02 18:04:58 +08:00
Yousong Zhou
de7eb162fc refactor(hostman): use metadata.DescGetterFunc 2020-12-02 18:04:58 +08:00
Yousong Zhou
0f1fc0fa58 refactor(host): metadata: eliminate ref of guestNic 2020-12-02 18:04:58 +08:00
Yousong Zhou
8f1f1f55c6 feat(host): metadata: make vpc aware metadata handler 2020-12-02 18:04:58 +08:00
Yousong Zhou
9288c2fd81 feat(vpcagent): export subnet mac gen funcs 2020-12-02 18:04:58 +08:00
Zexi Li
45dbd119a4 Merge pull request #9141 from swordqiu/automated-cherry-pick-of-#9140-upstream-release-3.6
Automated cherry pick of #9140: fix(keystone): not allow to disable sql driver
2020-12-02 17:08:37 +08:00
Qiu Jian
695aa81f70 fix(keystone): not allow to disable sql driver
not allow to disable default SQL identity_provider driver
2020-12-02 16:40:21 +08:00
Zexi Li
d8d4cbbdc7 Merge pull request #9062 from zhaoxiangchun/automated-cherry-pick-of-#9061-upstream-release-3.6
Automated cherry pick of #9061: fix(monitor): delete suggestConfig auto init data
2020-12-02 14:52:03 +08:00
Qu Xuan
618d07f456 feat(cloudid): notify clouduser created 2020-12-02 14:46:23 +08:00
zhaoxiangchun
815e16eca0 fix(monitor): delete suggestConfig auto init data
1.删除忽略列表之前逻辑初始化生成的配置config
2.忽略列表默认查询ignore=true的数据
3.修复建议列表 忽略一类建议不生效的问题
2020-12-02 11:19:19 +08:00
Zexi Li
266aa51044 Merge pull request #9132 from ioito/automated-cherry-pick-of-#9131-upstream-release-3.6
Automated cherry pick of #9131: fix(cloudid): sync qcloud collaborators user
2020-12-01 21:08:00 +08:00
Zexi Li
58da48eb52 Merge pull request #9092 from tb365/automated-cherry-pick-of-#9091-upstream-release-3.6
Automated cherry pick of #9091: fix(region): reserved name checking while create redis account
2020-12-01 21:06:10 +08:00
Zexi Li
afa183c026 Merge pull request #9124 from ioito/automated-cherry-pick-of-#9123-upstream-release-3.6
Automated cherry pick of #9123: fix(region): allow delete resource which status is unknown
2020-12-01 21:04:56 +08:00
Zexi Li
c8ddc63b39 Merge pull request #9105 from rainzm/automated-cherry-pick-of-#9104-upstream-release-3.6
Automated cherry pick of #9104: fix(notify): return the result of the second attempt to execute the rpc call
2020-12-01 21:03:16 +08:00
Qu Xuan
82dc179074 fix(cloudid): sync qcloud collaborators user 2020-12-01 20:36:20 +08:00
Zexi Li
c2201a031f Merge pull request #9110 from yousong/automated-cherry-pick-of-#9109-upstream-release-3.6
Automated cherry pick of #9109: fix(host): make sure it won't match vpc guests by accident
2020-12-01 20:13:32 +08:00
Zexi Li
0785c58286 Merge pull request #9121 from ioito/automated-cherry-pick-of-#9120-upstream-release-3.6
Automated cherry pick of #9120: fix(region): allow update rds account and database desc
2020-12-01 19:33:04 +08:00
Zexi Li
1cd298ba6a Merge pull request #9117 from rainzm/automated-cherry-pick-of-#9116-upstream-release-3.6
Automated cherry pick of #9116: fix(region): delete guest without 'purge' in GuestDetachScalingGroupTask
2020-12-01 19:32:04 +08:00
rainzm
b1ef8865b8 fix(notify): return the result of the second attempt to execute the rpc call 2020-12-01 18:23:22 +08:00
Qu Xuan
f35be97569 fix(region): allow delete resource which status is unknown 2020-12-01 17:17:12 +08:00
Qu Xuan
e483d1901e fix(region): allow update rds account and database desc 2020-12-01 16:38:59 +08:00
rainzm
0edec40b22 fix(region): delete guest without 'purge' in GuestDetachScalingGroupTask 2020-12-01 16:02:16 +08:00
Yousong Zhou
428e3ab1f5 fix(host): make sure it won't match vpc guests by accident 2020-12-01 15:32:53 +08:00
yunion-ci-robot
9013ab785a Merge pull request #9101 from yousong/automated-cherry-pick-of-#9100-upstream-release-3.6
Automated cherry pick of #9100: Bugfix/yousong qcloud nic
2020-12-01 12:57:57 +08:00
Zexi Li
fb94e7fd28 Merge pull request #9103 from ioito/automated-cherry-pick-of-#9102-upstream-release-3.6
Automated cherry pick of #9102: fix(region): code gen api error
2020-12-01 11:59:41 +08:00
Qu Xuan
b6ace002d7 fix(region): code gen api error 2020-12-01 11:27:00 +08:00
Yousong Zhou
e8ef92ad23 multicloud: qcloud: fix instancenic 2020-12-01 11:17:13 +08:00
Yousong Zhou
5f1fd6c7f9 multicloud: qcloud: add ptr deref func 2020-12-01 11:17:13 +08:00
Yousong Zhou
0e0f8bfa94 multicloud: qcloud: add apiDomainByRegion 2020-12-01 11:17:13 +08:00
Yousong Zhou
1ab4d40497 multicloud: qcloud: add getVpcClient 2020-12-01 11:17:13 +08:00
Yousong Zhou
9dcd0d2db1 multicloud: qcloud: add getSdkClient 2020-12-01 11:17:13 +08:00
Yousong Zhou
4a45ca59df vendor: add tencentcloud-sdk-go vpc 2020-12-01 11:17:13 +08:00
Zexi Li
fef43d3567 Merge pull request #9097 from yousong/automated-cherry-pick-of-#9096-upstream-release-3.6
Automated cherry pick of #9096: Bugfix/yousong informer
2020-12-01 09:34:02 +08:00
Yousong Zhou
a51a0845b4 fix(taskman): SSubTask: set model manager 2020-11-30 23:12:25 +08:00
Yousong Zhou
73f434e034 fix(region): secgrouprule: set model manager 2020-11-30 23:12:25 +08:00
Zexi Li
a4575fa51d Merge pull request #9073 from ioito/automated-cherry-pick-of-#9072-upstream-release-3.6
Automated cherry pick of #9072: fix(cloudid): huawei saml provider create issue
2020-11-30 21:56:22 +08:00
Zexi Li
3fa0f9d37c Merge pull request #9016 from tb365/automated-cherry-pick-of-#9015-upstream-release-3.6
Automated cherry pick of #9015: fix(region): huawei sync storages bugfix
2020-11-30 21:54:53 +08:00
Zexi Li
2a1d1a1cbc Merge pull request #9065 from ioito/automated-cherry-pick-of-#9064-upstream-release-3.6
Automated cherry pick of #9064: fix(region): apsara is private cloud
2020-11-30 21:53:25 +08:00
Zexi Li
f9080330e1 Merge pull request #9085 from yousong/automated-cherry-pick-of-#9084-upstream-release-3.6
Automated cherry pick of #9084: feat(region): networkaddresses: filter by guest ids
2020-11-30 21:52:45 +08:00
Zexi Li
7230c65f8d Merge pull request #9077 from rainzm/automated-cherry-pick-of-#9076-upstream-release-3.6
Automated cherry pick of #9076: Notify via contact skip receiver
2020-11-30 21:50:18 +08:00
Zexi Li
3226f99a33 Merge pull request #9080 from yousong/automated-cherry-pick-of-#9079-upstream-release-3.6
Automated cherry pick of #9079: feat(region): options: allow setting default vpc external access mode
2020-11-30 21:49:31 +08:00
Zexi Li
e62d3fb0be Merge pull request #9088 from rainzm/automated-cherry-pick-of-#9086-upstream-release-3.6
Automated cherry pick of #9086: fix(region): sort excludedNets correctly
2020-11-30 21:47:35 +08:00
yunion-ci-robot
0900860ca0 Merge pull request #9094 from ioito/automated-cherry-pick-of-#9075-upstream-release-3.6
Automated cherry pick of #9075: fix(region): optimized rds backup create
2020-11-30 21:30:08 +08:00
Qu Xuan
2a6421258a fix(region): optimized rds backup create 2020-11-30 20:00:24 +08:00
rainzm
474bd1440f feat(cloudcommon): add NotifyWithContact 2020-11-30 19:59:38 +08:00
rainzm
cff5b8b656 feat(cloudcommon): allways send webconsole notification via contacts
For notification with webconsole type, receiverId is same with contacts.
2020-11-30 19:59:38 +08:00
rainzm
cb663f460f feat(notify): permit admin sending notification via contact
In this way, you can easily send notification to non-existent receiver.
2020-11-30 19:59:38 +08:00
TangBin
a924c9552b fix(region): reserved name checking while create redis account 2020-11-30 19:17:15 +08:00
rainzm
c1d95bc313 fix(region): sort excludedNets correctly
之前,excludedNets 内部表示起始 IP 的字段是 string 类型,直接使用 <
比较是错误的。
现在,把 excludedNets 表示起始 IP 的字段改为了
netutils.IPV4Addr,这样就可以正确地进行比较排序了。
2020-11-30 19:05:19 +08:00
Yousong Zhou
b46d50ae3a feat(region): networkaddresses: filter by guest ids 2020-11-30 19:02:55 +08:00
Yousong Zhou
05c95295b3 feat(region): options: allow setting default vpc external access mode 2020-11-30 18:29:55 +08:00
Yousong Zhou
d2e304bae0 fix(region): pass up error from InitializeData 2020-11-30 18:29:55 +08:00
Qu Xuan
b460a73b0d fix(cloudid): huawei saml provider create issue 2020-11-30 16:31:09 +08:00
Zexi Li
c8d4a33f45 Merge pull request #8996 from ioito/automated-cherry-pick-of-#8995-upstream-release-3.6
Automated cherry pick of #8995: fix(cloudid): avoid new public account sync system policy delay 1 day
2020-11-30 14:13:42 +08:00
Qu Xuan
21d9edcfa6 fix(region): apsara is private cloud 2020-11-30 10:40:52 +08:00
Zexi Li
e2833b0760 Merge pull request #9059 from ioito/automated-cherry-pick-of-#8434-upstream-release-3.6
Automated cherry pick of #8434: fix: add panic log for worker task
2020-11-27 20:41:33 +08:00
Zexi Li
012b0f2c6a Merge pull request #8969 from yousong/automated-cherry-pick-of-#8575-upstream-release-3.6
Automated cherry pick of #8575: vendor: bump yunion.io/x/sqlchemy
2020-11-27 20:18:33 +08:00
Qu Xuan
f05fc18941 fix(cloudid): avoid new public account sync system policy delay 1 day 2020-11-27 20:17:42 +08:00
Zexi Li
74ca7830aa Merge pull request #9029 from ioito/automated-cherry-pick-of-#9021-upstream-release-3.6
Automated cherry pick of #9021: fix(region): auto sync cloudaccount resources
2020-11-27 20:13:55 +08:00
Zexi Li
bd101e19eb Merge pull request #9037 from yousong/automated-cherry-pick-of-#9036-upstream-release-3.6
Automated cherry pick of #9036: feat(region): search server by substr of ip or mac
2020-11-27 20:09:08 +08:00
Zexi Li
1d7e1938e6 Merge pull request #9055 from zhaoxiangchun/automated-cherry-pick-of-#9054-upstream-release-3.6
Automated cherry pick of #9054: fix(monitor): modify monitor nodata alert matching onecloud host func
2020-11-27 20:07:27 +08:00
Qu Xuan
e97cd02b5b fix: add panic log for worker task 2020-11-27 20:05:07 +08:00
Zexi Li
727c526d3d Merge pull request #9058 from lvyangyang/automated-cherry-pick-of-#9056-upstream-release-3.6
Automated cherry pick of #9056: fix(region): bucket get referer fix
2020-11-27 20:04:03 +08:00
lvyangyang
0174e686df fix(region): bucket get referer fix 2020-11-27 19:44:13 +08:00
zhaoxiangchun
2564f3c060 fix(monitor): modify monitor nodata alert matching onecloud host func 2020-11-27 19:07:12 +08:00
Zexi Li
b5dd92f042 Merge pull request #9050 from wanyaoqi/automated-cherry-pick-of-#9049-upstream-release-3.6
Automated cherry pick of #9049: fix(region,scheduler): fix netwrok predicate
2020-11-27 18:43:37 +08:00
wanyaoqi
c8ca855cbc fix(region,scheduler): fix netwrok predicate
1. Guest config to schedule input should include network exit propertites.
2. Guest migrate and create backup server should not check network count,
because of migrate and create backup server will not allocate new network to guest.

cherrypick: release/3.5
2020-11-27 18:17:15 +08:00
yunion-ci-robot
1e59cd4b84 Merge pull request #9047 from rainzm/automated-cherry-pick-of-#9046-upstream-release-3.6
Automated cherry pick of #9046: fix(region): get provider name via GetProviderName
2020-11-27 18:05:54 +08:00
rainzm
843534c298 fix(region): get provider name via GetProviderName 2020-11-27 17:34:47 +08:00
rainzm
1c475b0912 fix(region): get provider name via GetProviderName 2020-11-27 17:34:47 +08:00
Zexi Li
4ab73f0b1c Merge pull request #9035 from lvyangyang/automated-cherry-pick-of-#9033-upstream-release-3.6
Automated cherry pick of #9033: fix(region): fix set bucket referer
2020-11-27 16:29:56 +08:00
Yousong Zhou
ca21bcf564 feat(region): search server by substr of ip or mac 2020-11-27 15:16:08 +08:00
lvyangyang
9872a05be9 feat(region): set qcloud bucket policy 2020-11-27 14:50:17 +08:00
lvyangyang
6f3cabda6e fix(region): fix set bucket referer 2020-11-27 14:50:17 +08:00
yunion-ci-robot
23c4abedbb Merge pull request #9025 from ioito/automated-cherry-pick-of-#9024-upstream-release-3.6
Automated cherry pick of #9024: fix(cloudid): avoid use invalid character for role name
2020-11-27 09:51:35 +08:00
Qu Xuan
e056bb1028 fix(region): auto sync cloudaccount resources 2020-11-27 09:38:25 +08:00
yunion-ci-robot
5de39adaf7 Merge pull request #9023 from swordqiu/automated-cherry-pick-of-#9022-upstream-release-3.6
Automated cherry pick of #9022: fix(cloudcommon): adjust policy refresh to default 30 seconds
2020-11-26 21:58:32 +08:00
Zexi Li
3bfc6d928a Merge pull request #8999 from ioito/automated-cherry-pick-of-#8998-upstream-release-3.6
Automated cherry pick of #8998: fix(region): allow member user get saml auth addr
2020-11-26 21:39:43 +08:00
Qu Xuan
fd948b8cc5 fix(cloudid): avoid use invalid character for role name 2020-11-26 21:38:50 +08:00
Zexi Li
c64d98f769 Merge pull request #9019 from ioito/automated-cherry-pick-of-#9018-upstream-release-3.6
Automated cherry pick of #9018: fix(cloudid): auto update saml provider metadata
2020-11-26 21:38:21 +08:00
Zexi Li
22e2c2e3ef Merge pull request #9003 from ioito/automated-cherry-pick-of-#9002-upstream-release-3.6
Automated cherry pick of #9002: fix(region): avolid aliyun fin bucket list objects error
2020-11-26 21:36:38 +08:00
Qiu Jian
b9d30c08a2 fix(cloudcommon): adjust policy refresh to default 30 seconds
Cache policy check result for 30 seconds by default
2020-11-26 21:33:15 +08:00
Zexi Li
7a2c8722d5 Merge pull request #9013 from ioito/automated-cherry-pick-of-#9012-upstream-release-3.6
Automated cherry pick of #9012: fix(region): qcloud request retry
2020-11-26 21:31:51 +08:00
Zexi Li
de624a5af9 Merge pull request #9006 from yousong/automated-cherry-pick-of-#9005-upstream-release-3.6
Automated cherry pick of #9005: Feature/yousong ovn encap ip
2020-11-26 21:29:50 +08:00
Zexi Li
fefbd436e0 Merge pull request #9010 from ioito/automated-cherry-pick-of-#9009-upstream-release-3.6
Automated cherry pick of #9009: fix(climc): replace ' -> "
2020-11-26 21:26:59 +08:00
Yousong Zhou
c3b4edae1b vpcagent: ovn: make aware of sub ips 2020-11-26 21:20:01 +08:00
Yousong Zhou
314f9fcc0f vpcagent: models: join network addresses 2020-11-26 21:20:01 +08:00
Yousong Zhou
f699f7cb55 vpcagent: apihelper: filter by cloud_env=onpremise 2020-11-26 21:20:01 +08:00
Yousong Zhou
a3d6a039ac multicloud: aliyun: instancenic: handle InvalidOperation.Ipv4CountExceeded 2020-11-26 21:20:01 +08:00
Yousong Zhou
eec81e73e7 networkaddresses: handle cloudprovider.ErrAddressCountExceed 2020-11-26 21:20:01 +08:00
Yousong Zhou
444e666472 cloudprovider: add ErrAddressCountExceed 2020-11-26 21:20:01 +08:00
Yousong Zhou
159453eceb networkaddresses: do server sync for on premise servers 2020-11-26 21:20:01 +08:00
Yousong Zhou
05984b49a7 networkaddresses: disallow batch create for external resources 2020-11-26 21:20:01 +08:00
Yousong Zhou
7343be04b1 networkaddresses: cloudprovider support 2020-11-26 21:20:01 +08:00
Yousong Zhou
1b6275f803 multicloud: aws: subaddress management 2020-11-26 21:20:01 +08:00
Yousong Zhou
3159f6d6d7 multicloud: aws: instancenic: add interface id attribute 2020-11-26 21:20:01 +08:00
Yousong Zhou
0fe90abea8 multicloud: aliyun: instancenic: secondary address management 2020-11-26 21:20:01 +08:00
Yousong Zhou
47a2d07634 vendor: bump alibaba-cloud-sdk-go to v1.61.684
For commit [1]

 [1] 6313cc407e
2020-11-26 21:20:01 +08:00
Yousong Zhou
edbddb38b6 vendor: add github.com/aliyun/alibaba-cloud-sdk-go/services/ecs 2020-11-26 21:20:01 +08:00
Yousong Zhou
9840d7cf77 cloudprovider: ICloudNic: add methods for secondary addresses 2020-11-26 21:20:01 +08:00
Yousong Zhou
2afa068d71 multicloud: ICloudNic: add GetId() 2020-11-26 21:20:01 +08:00
Yousong Zhou
956bc945a9 multicloud: ICloudNic: fix GetMAC() 2020-11-26 21:20:01 +08:00
Yousong Zhou
adb998ff55 hostman: metadata: add handler for /local-sub-ipv4s 2020-11-26 21:20:01 +08:00
Yousong Zhou
0c8d8358e6 networkaddresses: add to nics field of guest desc 2020-11-26 21:20:01 +08:00
Yousong Zhou
87ed4e9a55 networkaddresses: add parent_type guestnetwork 2020-11-26 21:20:01 +08:00
Yousong Zhou
8ed18fbf34 networks: usedAddressQuery: rename with baseq, ownerq, retq 2020-11-26 21:20:01 +08:00
Yousong Zhou
1609496f9c networks: split getUsedAddressQuery as method of each manager 2020-11-26 21:20:01 +08:00
Yousong Zhou
f54de809b2 networks: fix typo in log 2020-11-26 21:20:01 +08:00
Yousong Zhou
c389aaaeb7 db_dispatcher: allow batch create for models without name 2020-11-26 21:20:01 +08:00
Yousong Zhou
ed1999efaf db: interface: manager: add HasName() method 2020-11-26 21:20:01 +08:00
Yousong Zhou
c8ad511744 db: standalone_anon: empty result for name query 2020-11-26 21:20:01 +08:00
Yousong Zhou
c45550ef63 db: add standalone_anon 2020-11-26 21:20:00 +08:00
Yousong Zhou
b79915d407 schedtags: add ListItemExportKeys 2020-11-26 21:20:00 +08:00
Yousong Zhou
d8ab874ef2 db: add manager methods appliers 2020-11-26 21:20:00 +08:00
Yousong Zhou
f62dddda51 db_dispatcher: delay compute to where needed 2020-11-26 21:20:00 +08:00
Yousong Zhou
0c8ab90f7e db_dispatcher: remove unused GetExtraDetails call 2020-11-26 21:20:00 +08:00
Yousong Zhou
79120f3de3 db: virtualjoint: add FilterById on RowId 2020-11-26 21:20:00 +08:00
Yousong Zhou
0e0a394907 db: modelbase: BatchCreateValidateCreateData: return orig data 2020-11-26 21:20:00 +08:00
Yousong Zhou
3b32ce56cc db: check funcs required by dispatcher 2020-11-26 21:20:00 +08:00
Yousong Zhou
d8cfba9217 region: networks: attach func use struct args 2020-11-26 21:20:00 +08:00
Yousong Zhou
f87d094580 region: networkresource: fix signature of GetExtraDetails 2020-11-26 21:20:00 +08:00
Yousong Zhou
9072a69aec multicloud: aliyun: make getSdkClient proxy aware 2020-11-26 21:20:00 +08:00
Yousong Zhou
91fab12172 climc: helper: add BatchCreate helper 2020-11-26 21:20:00 +08:00
Yousong Zhou
f6f4fc125a climc: helper: create call as a standalone method 2020-11-26 21:20:00 +08:00
Yousong Zhou
9228b17928 climc: s/Keyworkd/Keyword/ 2020-11-26 21:20:00 +08:00
Yousong Zhou
46088408bc vendor: bump yunion.io/x/pkg 2020-11-26 21:20:00 +08:00
Yousong Zhou
f0fba9aa20 vendor: bump yunion.io/x/sqlchemy 2020-11-26 21:20:00 +08:00
Qu Xuan
61d21d2b46 fix(cloudid): auto update saml provider metadata 2020-11-26 20:20:02 +08:00
TangBin
d5973135d2 fix(region): huawei sync storages bugfix 2020-11-26 19:34:49 +08:00
Qu Xuan
e52fb3260f fix(region): qcloud request retry 2020-11-26 19:03:39 +08:00
Qu Xuan
cb594298d4 fix(climc): replace ' -> " 2020-11-26 17:36:48 +08:00
Yousong Zhou
8db93257d6 feat(host): add option OvnEncapIpDetectionMethod can-reach:xx 2020-11-26 17:11:38 +08:00
Yousong Zhou
e53bdd5f94 feat(netutils2): add MyIPTo 2020-11-26 17:11:38 +08:00
yunion-ci-robot
28ff7c29b2 Merge pull request #9001 from wanyaoqi/automated-cherry-pick-of-#8828-upstream-release-3.6
Automated cherry pick of #8828: feature: update cpu arch apis
2020-11-26 16:37:34 +08:00
Qu Xuan
061c5d6dd9 fix(region): avolid aliyun fin bucket list objects error 2020-11-26 16:17:42 +08:00
wanyaoqi
59102f2dda feat(region/glance): update cpu arch apis
add multi arch resourcebase manager
update multi arch resource list apis

cherrypick: release/3.6
2020-11-26 15:33:40 +08:00
Qu Xuan
dea1f29aa1 fix(region): allow member user get saml auth addr 2020-11-26 15:02:49 +08:00
Zexi Li
b479f23a4f Merge pull request #8984 from swordqiu/automated-cherry-pick-of-#8968-upstream-release-3.6
Automated cherry pick of #8968: fix(region,esxiagent): allow host behind a nat
2020-11-26 12:11:09 +08:00
yunion-ci-robot
d974440dec Merge pull request #8992 from zexi/automated-cherry-pick-of-#8991-upstream-release-3.6
Automated cherry pick of #8991: fix(scheduler): clean expire cache before schedule
2020-11-26 11:44:39 +08:00
Zexi Li
bcfb050193 fix(region): wire get vpc releated hosts is empty 2020-11-26 11:03:07 +08:00
Zexi Li
3c85ed11b9 fix(region): network clean schedule cache after real deleted 2020-11-26 11:03:07 +08:00
Zexi Li
a16899c9bf fix(scheduler): clean expire cache before schedule 2020-11-26 11:03:07 +08:00
yunion-ci-robot
761874423f Merge pull request #8931 from tb365/automated-cherry-pick-of-#8779-upstream-release-3.6
Automated cherry pick of #8779: 负载均衡ACL&证书增加项目和共享
2020-11-26 10:47:34 +08:00
TangBin
4d4c84801f fix(region): climc add base projects options 2020-11-26 10:33:36 +08:00
TangBin
670a06d53d 负载均衡ACL&证书增加项目和共享 2020-11-26 10:33:36 +08:00
Zexi Li
8f9015475b Merge pull request #8938 from yousong/automated-cherry-pick-of-#8937-upstream-release-3.6
Automated cherry pick of #8937: fix(treewide): fix task error recording
2020-11-26 09:25:07 +08:00
Zexi Li
4891f16959 Merge pull request #8940 from rainzm/automated-cherry-pick-of-#8925-upstream-release-3.6
Automated cherry pick of #8925: feat(region): add SCloudregionResourceBase for SInstanceSnapshot
2020-11-25 22:04:33 +08:00
Zexi Li
3b7ef422ee Merge pull request #8967 from zhaoxiangchun/automated-cherry-pick-of-#8902-upstream-release-3.6
Automated cherry pick of #8902: feat(monitor): add nodata alert policy
2020-11-25 22:02:38 +08:00
Zexi Li
2e7d107232 Merge pull request #8976 from tb365/automated-cherry-pick-of-#8955-upstream-release-3.6
Automated cherry pick of #8955: fix(region): allow reset huawei system disk
2020-11-25 22:01:48 +08:00
Zexi Li
0676b48513 Merge pull request #8962 from ioito/automated-cherry-pick-of-#8961-upstream-release-3.6
Automated cherry pick of #8961: fix(region): valid qcloud hssd for system disk
2020-11-25 21:59:30 +08:00
Zexi Li
84da1058b2 Merge pull request #8983 from zhaoxiangchun/automated-cherry-pick-of-#8977-upstream-release-3.6
Automated cherry pick of #8977: fix(monitor): modify monitor serviceType in StartService()
2020-11-25 21:57:21 +08:00
Zexi Li
a62d51a681 Merge pull request #8988 from rainzm/automated-cherry-pick-of-#8987-upstream-release-3.6
Automated cherry pick of #8987: fix(region): allow delete storagecachedimage with 'cache_failed' status
2020-11-25 21:55:42 +08:00
rainzm
ed2a867748 fix(region): allow delete storagecachedimage with 'cache_failed' status
Having status 'cache_failed' means this storagecachedimage does not actually exist.
2020-11-25 20:47:10 +08:00
zhaoxiangchun
db565fe0cd fix(monitor): modify monitor serviceType in StartService()
1.修改monitor服务在service代码中注册的serviceType:
   alerter ===> monitor
2020-11-25 20:30:29 +08:00
Qiu Jian
197049dcb7 fix(region,esxiagent): allow host behind a nat
check host by ip may fail if host is behind a nat. ignore this case.
2020-11-25 20:14:09 +08:00
Zexi Li
ec803b3681 Merge pull request #8966 from zhaoxiangchun/automated-cherry-pick-of-#8965-upstream-release-3.6
Automated cherry pick of #8965: fix(monitor): suggestalert ignore throw err
2020-11-25 19:46:46 +08:00
Zexi Li
8e7b812e4f Merge pull request #8974 from ioito/automated-cherry-pick-of-#8973-upstream-release-3.6
Automated cherry pick of #8973: fix(region): set qcloud instance del timeout to 20m
2020-11-25 19:37:46 +08:00
rainzm
4d13956bc6 fix(region): ignore params.Disks when cloning vm from snapshot 2020-11-25 18:26:30 +08:00
rainzm
6ea550d012 fix(region): add size and storageType for VMware InstanceSnapshot 2020-11-25 18:26:30 +08:00
rainzm
eb3da9369d fix(esxiagent): add humanized tips when searching vm failed 2020-11-25 18:26:29 +08:00
rainzm
727b89db5d fix(region): make project of instance snapshot be consistent with the instance 2020-11-25 18:26:29 +08:00
rainzm
6d2e914391 fix(region): save when canceling pendingUsage 2020-11-25 18:26:29 +08:00
rainzm
8627818e14 feat(region): set pendingUsage before creating instance snapshots 2020-11-25 18:26:29 +08:00
rainzm
23b1a2b143 feat(region): add instance_snapshot for regionquota 2020-11-25 18:26:29 +08:00
rainzm
1561d65395 fix(region): purge all instance snapshots when purging guest 2020-11-25 18:26:29 +08:00
rainzm
35fc62bbad feat(region): add SCloudregionResourceBase for SInstanceSnapshot
理论上,可以通过
SInstanceSnapshot->SGuest->SHost->SZone->SCloudregionResourceBase
拿到 cloudregion_id, 但是这样的效率太低了
2020-11-25 18:26:29 +08:00
TangBin
25eb67b373 fix(region): update translations 2020-11-25 18:18:49 +08:00
TangBin
3ed59afae4 fix(region): allow reset huawei system disk 2020-11-25 18:18:49 +08:00
Qu Xuan
2d7cdad8f2 fix(region): set qcloud instance del timeout to 20m 2020-11-25 17:17:06 +08:00
Zexi Li
726a0817ac Merge pull request #8971 from ioito/automated-cherry-pick-of-#8970-upstream-release-3.6
Automated cherry pick of #8970: fix(cloudid): avoid empty auth url
2020-11-25 17:16:50 +08:00
Qu Xuan
869740775c fix(cloudid): avoid empty auth url 2020-11-25 17:07:09 +08:00
Zexi Li
5c448811eb Merge pull request #8959 from ioito/automated-cherry-pick-of-#8958-upstream-release-3.6
Automated cherry pick of #8958: fix(region): validate cloudaccount saml auth params
2020-11-25 16:06:52 +08:00
zhaoxiangchun
7661189370 feat(monitor): add nodata alert policy
1.add queryConditon子类:nodataQueryCondition处理nodata类型策略
2.遍历Onecloud类型宿主机,得到nodata宿主机信息
2020-11-25 12:18:40 +08:00
zhaoxiangchun
81e4463abc fix(monitor): suggestalert ignore throw err
1.修复优化建议忽略操作报错
2020-11-25 12:03:42 +08:00
Qu Xuan
8281411680 fix(region): valid qcloud hssd for system disk 2020-11-25 11:52:04 +08:00
Qu Xuan
a9ef8a1e37 fix(region): validate cloudaccount saml auth params 2020-11-25 11:35:05 +08:00
Zexi Li
f0abdb9e77 Merge pull request #8952 from ioito/automated-cherry-pick-of-#8895-upstream-release-3.6
Automated cherry pick of #8895: fix(region): 避免OneCloud密码校验通过,公有云厂商密码校验不通过
2020-11-25 10:06:10 +08:00
Qu Xuan
782372c35e fix(region): 避免OneCloud密码校验通过,公有云厂商密码校验不通过 2020-11-25 09:54:51 +08:00
Zexi Li
da53fe1cf7 Merge pull request #8948 from yousong/automated-cherry-pick-of-#8947-upstream-release-3.6
Automated cherry pick of #8947: fix(region): change_ipaddr: retain eip_id on detach and attach
2020-11-25 09:28:05 +08:00
yunion-ci-robot
452d8e9caa Merge pull request #8943 from yousong/automated-cherry-pick-of-#8942-upstream-release-3.6
Automated cherry pick of #8942: feat(cloudcommon): db: jointbase: add list:"user" for RowId
2020-11-25 09:18:16 +08:00
Yousong Zhou
f33b9c7164 fix(region): change_ipaddr: retain eip_id on detach and attach 2020-11-24 21:58:57 +08:00
Yousong Zhou
d1f1eda985 fix(vpcagent): models: guestnetworks: accomodate change_ipaddr
change_ipaddr does detach, then attach of network.  It's not solely an
update of ipaddr, but a combination of deletion then creation.
2020-11-24 21:55:30 +08:00
Yousong Zhou
53125e6ed1 feat(cloudcommon): db: jointbase: add list:"user" for RowId 2020-11-24 21:55:30 +08:00
yunion-ci-robot
978677cc02 Merge pull request #8939 from zexi/automated-cherry-pick-of-#8930-upstream-release-3.6
Automated cherry pick of #8930: feat(region/schedtag): schedtag support set multi resources
2020-11-24 21:33:30 +08:00
yunion-ci-robot
20d0cfb95e Merge pull request #8941 from zhaoxiangchun/automated-cherry-pick-of-#8926-upstream-release-3.6
Automated cherry pick of #8926: fix(monitor): modify suggestrule process influxdb data
2020-11-24 21:29:15 +08:00
zhaoxiangchun
ed13fe9e14 fix(monitor): modify suggestrule process influxdb data
1. 调整与监控相关的时间范围的判断逻辑:不再要求时间范围内必须都有数据
2020-11-24 21:13:52 +08:00
Yousong Zhou
d868347773 fix(treewide): fix task error recording 2020-11-24 20:38:20 +08:00
yunion-ci-robot
0a4ddb861e Merge pull request #8934 from ioito/automated-cherry-pick-of-#8933-upstream-release-3.6
Automated cherry pick of #8933: fix(region): avoid public ip bandwidth is zero
2020-11-24 20:25:31 +08:00
Zexi Li
a16b048f96 feat(region/schedtag): schedtag support set multi resources 2020-11-24 20:25:10 +08:00
Qu Xuan
5dea11952f fix(region): avoid public ip bandwidth is zero 2020-11-24 18:10:52 +08:00
2691 changed files with 233228 additions and 200424 deletions

View File

@@ -6,10 +6,11 @@ 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)
GIT_BRANCH := $(shell git name-rev --name-only HEAD)
GIT_BRANCH := $(shell git branch -r --contains | head -1 | sed -E -e "s%(HEAD ->|origin|upstream)/?%%g" | xargs)
GIT_VERSION := $(shell git describe --always --tags --abbrev=14 $(GIT_COMMIT)^{commit})
GIT_TREE_STATE := $(shell s=`git status --porcelain 2>/dev/null`; if [ -z "$$s" ]; then echo "clean"; else echo "dirty"; fi)
BUILD_DATE := $(shell date -u +'%Y-%m-%dT%H:%M:%SZ')
@@ -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
@@ -93,6 +95,9 @@ cmd/%: prepare_dir
rpm/%: cmd/%
$(BUILD_SCRIPT) $*
deb/%: cmd/%
$(DEB_BUILD_SCRIPT) $*
pkg/%: prepare_dir
$(GO_INSTALL) $(REPO_PREFIX)/$@
@@ -102,6 +107,9 @@ build:
rpm:
$(MAKE) $(rpmTargets)
deb:
$(MAKE) $(debTargets)
rpmclean:
rm -fr $(BUILD_DIR)/rpms
@@ -199,7 +207,7 @@ mod:
go mod vendor -v
DOCKER_CENTOS_BUILD_IMAGE?=registry.cn-beijing.aliyuncs.com/yunionio/centos-build:1.1-1
DOCKER_CENTOS_BUILD_IMAGE?=registry.cn-beijing.aliyuncs.com/yunionio/centos-build:1.1-3
define dockerCentOSBuildCmd
set -o xtrace

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

View File

@@ -0,0 +1,6 @@
公有云子账号创建成功
主账号:{{ .account }}<br>
名称:{{ .name }}<br>
密码:{{ .password }}<br>
登录地址: {{ .iam_login_url }}<br>
资源ID: {{ .id }}<br>

View File

@@ -0,0 +1,6 @@
Clouduser has been created successfully
Root Account: {{ .account }}<br>
Name{{ .name }}<br>
Password{{ .password }}<br>
IAM Login URL: {{ .iam_login_url }}<br>
Resource ID: {{ .id }}<br>

View File

@@ -0,0 +1 @@
公有云子账号 {{ .name }} 创建成功

View File

@@ -0,0 +1 @@
The clouduser {{ .name }} created successfully

View File

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

View File

@@ -6,4 +6,4 @@
资源数量:{{len .matches}}
资源名称:{{.resource_name}}
详情地址: {{.web_url}}/commonalerts
详情地址: {{.web_url}}

View File

@@ -92,7 +92,7 @@
</table>
<table class="table" style="padding-top: 6px; padding-bottom: 10px;">
<tr>
<td style="padding-left: 20px; font-size: 14px;">若要查看详情信息,<a class="link" target="_blank" href="{{.web_url}}/commonalerts
<td style="padding-left: 20px; font-size: 14px;">若要查看详情信息,<a class="link" target="_blank" href="{{.web_url}}
">请登录平台进行查看</a></td>
</tr>
</table>

View File

@@ -6,4 +6,4 @@ TriggerCondition: {{.description | unescaped}}
ResourceCount: {{len .matches}}
ResourceName: {{.resource_name}}
WebUrl: {{.web_url}}/commonalerts
WebUrl: {{.web_url}}

View File

@@ -33,7 +33,7 @@
font-weight: bold;
}
.td {
width: 80px;
width: 120px;
padding-left: 20px;
height: 35px;
font-weight: 400;
@@ -92,8 +92,8 @@
</table>
<table class="table" style="padding-top: 6px; padding-bottom: 10px;">
<tr>
<td style="padding-left: 20px; font-size: 14px;">To view details<a class="link" target="_blank" href="{{.web_url}}/commonalerts
">Please log in to the platform to view</a></td>
<td style="padding-left: 20px; font-size: 14px;">To view details<a class="link" target="_blank" href="{{.web_url}}
">Please login to the platform to view</a></td>
</tr>
</table>
<table border="0" cellspacing="0" cellpadding="0" class="table pb-3">

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

@@ -32,6 +32,7 @@ type BaseOptions struct {
AccessKey string `help:"Access key" default:"$APSARA_ACCESS_KEY" metavar:"APSARA_ACCESS_KEY"`
Secret string `help:"Secret" default:"$APSARA_SECRET" metavar:"APSARA_SECRET"`
cloudprovider.SApsaraEndpoints `help:"Endpoints for Apsara"`
Endpoint string `help:"Apsara endpoint" default:"$APSARA_ENDPOINT" metavar:"APSARA_ENDPOINT"`
RegionId string `help:"RegionId" default:"$APSARA_REGION" metavar:"APSARA_REGION"`
SUBCOMMAND string `help:"apsaracli subcommand" subcommand:"true"`
}
@@ -90,6 +91,7 @@ func newClient(options *BaseOptions) (*apsara.SRegion, error) {
apsara.NewApsaraClientConfig(
options.AccessKey,
options.Secret,
options.Endpoint,
options.SApsaraEndpoints,
).Debug(options.Debug),
)

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

@@ -448,10 +448,6 @@ func init() {
type BucketSetRefererOption struct {
ID string `help:"ID or name of bucket" json:"-"`
// 是否开启防盗链
Enabled bool `help:"enable refer"`
// Black-List、White-List
Type string `help:"domain list type" choices:"Black-List|White-List"`
// 域名列表
DomainList []string
// 是否允许空referer 访问
@@ -459,9 +455,7 @@ func init() {
}
R(&BucketSetRefererOption{}, "bucket-set-referer", "Set bucket referer", func(s *mcclient.ClientSession, args *BucketSetRefererOption) error {
conf := api.BucketRefererConf{
Enabled: args.Enabled,
Type: args.Type,
DomainList: args.DomainList,
WhiteList: args.DomainList,
AllowEmptyRefer: args.AllowEmptyRefer,
}
result, err := modules.Buckets.PerformAction(s, args.ID, "set-referer", jsonutils.Marshal(conf))
@@ -496,4 +490,61 @@ func init() {
return nil
})
type BucketGetPolicyOption struct {
ID string `help:"ID or name of bucket" json:"-"`
}
R(&BucketGetPolicyOption{}, "bucket-get-policy", "get bucket policy", func(s *mcclient.ClientSession, args *BucketGetPolicyOption) error {
result, err := modules.Buckets.GetSpecific(s, args.ID, "policy", nil)
if err != nil {
return err
}
printObject(result)
return nil
})
type BucketSetPolicyOption struct {
ID string `help:"ID or name of bucket" json:"-"`
// 格式主账号id:子账号id
PrincipalId []string `help:"ext account id, accountId:subaccountId"`
// Read|ReadWrite|FullControl
CannedAction string `help:"authority action" choice:"Read|FullControl"`
// Allow|Deny
Effect string `help:"allow or deny" choice:"Allow|Deny"`
// 被授权的资源地址
ResourcePath []string
// ip 条件
IpEquals []string
IpNotEquals []string
}
R(&BucketSetPolicyOption{}, "bucket-set-policy", "set bucket policy", func(s *mcclient.ClientSession, args *BucketSetPolicyOption) error {
opts := api.BucketPolicyStatementInput{}
opts.CannedAction = args.CannedAction
opts.Effect = args.Effect
opts.IpEquals = args.IpEquals
opts.IpNotEquals = args.IpNotEquals
opts.ResourcePath = args.ResourcePath
opts.PrincipalId = args.PrincipalId
result, err := modules.Buckets.PerformAction(s, args.ID, "set-policy", jsonutils.Marshal(opts))
if err != nil {
return err
}
printObject(result)
return nil
})
type BucketDeletePolicyOption struct {
ID string `help:"ID or name of bucket" json:"-"`
Id []string
}
R(&BucketDeletePolicyOption{}, "bucket-delete-policy", "delete bucket policy", func(s *mcclient.ClientSession, args *BucketDeletePolicyOption) error {
input := api.BucketPolicyDeleteInput{}
input.Id = args.Id
result, err := modules.Buckets.PerformAction(s, args.ID, "delete-policy", jsonutils.Marshal(input))
if err != nil {
return err
}
printObject(result)
return nil
})
}

View File

@@ -27,23 +27,23 @@ func init() {
cmd.Show(&options.SCloudAccountIdOptions{})
cmd.Delete(&options.SCloudAccountIdOptions{})
cmd.Update(&options.SCloudAccountUpdateBaseOptions{})
cmd.PerformClass("prepare-nets", &options.SVMwareCloudAccountPrepareNetsOptions{})
cmd.PerformClassWithKeyword("preparenets-vmware", "prepare-nets", &options.SVMwareCloudAccountPrepareNetsOptions{})
cmd.CreateWithKeyworkd("create-vmware", &options.SVMwareCloudAccountCreateOptions{})
cmd.CreateWithKeyworkd("create-aliyun", &options.SAliyunCloudAccountCreateOptions{})
cmd.CreateWithKeyworkd("create-azure", &options.SAzureCloudAccountCreateOptions{})
cmd.CreateWithKeyworkd("create-qcloud", &options.SQcloudCloudAccountCreateOptions{})
cmd.CreateWithKeyworkd("create-google", &options.SGoogleCloudAccountCreateOptions{})
cmd.CreateWithKeyworkd("create-aws", &options.SAWSCloudAccountCreateOptions{})
cmd.CreateWithKeyworkd("create-openstack", &options.SOpenStackCloudAccountCreateOptions{})
cmd.CreateWithKeyworkd("create-huawei", &options.SHuaweiCloudAccountCreateOptions{})
cmd.CreateWithKeyworkd("create-ucloud", &options.SHuaweiCloudAccountCreateOptions{})
cmd.CreateWithKeyworkd("create-zstack", &options.SZStackCloudAccountCreateOptions{})
cmd.CreateWithKeyworkd("create-s3", &options.SS3CloudAccountCreateOptions{})
cmd.CreateWithKeyworkd("create-ceph", &options.SCephCloudAccountCreateOptions{})
cmd.CreateWithKeyworkd("create-xsky", &options.SXskyCloudAccountCreateOptions{})
cmd.CreateWithKeyworkd("create-ctyun", &options.SCtyunCloudAccountCreateOptions{})
cmd.CreateWithKeyworkd("create-apsara", &options.SApsaraCloudAccountCreateOptions{})
cmd.CreateWithKeyword("create-vmware", &options.SVMwareCloudAccountCreateOptions{})
cmd.CreateWithKeyword("create-aliyun", &options.SAliyunCloudAccountCreateOptions{})
cmd.CreateWithKeyword("create-azure", &options.SAzureCloudAccountCreateOptions{})
cmd.CreateWithKeyword("create-qcloud", &options.SQcloudCloudAccountCreateOptions{})
cmd.CreateWithKeyword("create-google", &options.SGoogleCloudAccountCreateOptions{})
cmd.CreateWithKeyword("create-aws", &options.SAWSCloudAccountCreateOptions{})
cmd.CreateWithKeyword("create-openstack", &options.SOpenStackCloudAccountCreateOptions{})
cmd.CreateWithKeyword("create-huawei", &options.SHuaweiCloudAccountCreateOptions{})
cmd.CreateWithKeyword("create-ucloud", &options.SUcloudCloudAccountCreateOptions{})
cmd.CreateWithKeyword("create-zstack", &options.SZStackCloudAccountCreateOptions{})
cmd.CreateWithKeyword("create-s3", &options.SS3CloudAccountCreateOptions{})
cmd.CreateWithKeyword("create-ceph", &options.SCephCloudAccountCreateOptions{})
cmd.CreateWithKeyword("create-xsky", &options.SXskyCloudAccountCreateOptions{})
cmd.CreateWithKeyword("create-ctyun", &options.SCtyunCloudAccountCreateOptions{})
cmd.CreateWithKeyword("create-apsara", &options.SApsaraCloudAccountCreateOptions{})
cmd.UpdateWithKeyword("update-vmware", &options.SVMwareCloudAccountUpdateOptions{})
cmd.UpdateWithKeyword("update-aliyun", &options.SAliyunCloudAccountUpdateOptions{})

View File

@@ -235,7 +235,7 @@ func init() {
return err
}
for k, v := range rc {
fmt.Printf("export %s='%s'\n", k, v)
fmt.Printf(`export %s="%s"`+"\n", k, v)
}
return nil
})

View File

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

View File

@@ -15,50 +15,15 @@
package compute
import (
"yunion.io/x/onecloud/pkg/mcclient"
"yunion.io/x/onecloud/cmd/climc/shell"
"yunion.io/x/onecloud/pkg/mcclient/modules"
"yunion.io/x/onecloud/pkg/mcclient/options"
)
func init() {
type DBInstanceAccountListOptions struct {
options.BaseListOptions
DBInstance string `help:"ID or Name of DBInstance" json:"dbinstance"`
}
R(&DBInstanceAccountListOptions{}, "dbinstance-account-list", "List DB instance accounts", func(s *mcclient.ClientSession, opts *DBInstanceAccountListOptions) error {
params, err := options.ListStructToParams(opts)
if err != nil {
return err
}
result, err := modules.DBInstanceAccounts.List(s, params)
if err != nil {
return err
}
printList(result, modules.DBInstanceAccounts.GetColumns(s))
return nil
})
type DBInstanceAccountIdOptions struct {
ID string `help:"ID or Name of DBInstanceaccount"`
}
R(&DBInstanceAccountIdOptions{}, "dbinstance-account-show", "Show DB instance account", func(s *mcclient.ClientSession, opts *DBInstanceAccountIdOptions) error {
account, err := modules.DBInstanceAccounts.Get(s, opts.ID, nil)
if err != nil {
return err
}
printObject(account)
return nil
})
R(&DBInstanceAccountIdOptions{}, "dbinstance-account-delete", "Delete DB instance account", func(s *mcclient.ClientSession, opts *DBInstanceAccountIdOptions) error {
account, err := modules.DBInstanceAccounts.Delete(s, opts.ID, nil)
if err != nil {
return err
}
printObject(account)
return nil
})
cmd := shell.NewResourceCmd(&modules.DBInstanceAccounts).WithKeyword("dbinstance-account")
cmd.List(&options.DBInstanceAccountListOptions{})
cmd.Update(&options.BaseUpdateOptions{})
cmd.Show(&options.DBInstanceAccountIdOptions{})
cmd.Delete(&options.DBInstanceAccountIdOptions{})
}

View File

@@ -15,60 +15,16 @@
package compute
import (
"yunion.io/x/onecloud/pkg/mcclient"
"yunion.io/x/onecloud/cmd/climc/shell"
"yunion.io/x/onecloud/pkg/mcclient/modules"
"yunion.io/x/onecloud/pkg/mcclient/options"
)
func init() {
type DBInstanceDatabaseListOptions struct {
options.BaseListOptions
DBInstance string `help:"ID or Name of DBInstance" json:"dbinstance"`
}
R(&DBInstanceDatabaseListOptions{}, "dbinstance-database-list", "List DB instance databases", func(s *mcclient.ClientSession, opts *DBInstanceDatabaseListOptions) error {
params, err := options.ListStructToParams(opts)
if err != nil {
return err
}
result, err := modules.DBInstanceDatabases.List(s, params)
if err != nil {
return err
}
printList(result, modules.DBInstanceDatabases.GetColumns(s))
return nil
})
type DBInstanceDatabaseCreateOptions struct {
NAME string
DBINSTANCE string `help:"ID or Name of DBInstance" json:"dbinstance"`
CharacterSet string `help:"CharacterSet for database"`
}
R(&DBInstanceDatabaseCreateOptions{}, "dbinstance-database-create", "Create DB instance databases", func(s *mcclient.ClientSession, opts *DBInstanceDatabaseCreateOptions) error {
params, err := options.ListStructToParams(opts)
if err != nil {
return err
}
result, err := modules.DBInstanceDatabases.Create(s, params)
if err != nil {
return err
}
printObject(result)
return nil
})
type DBInstanceDatabaseIdOptions struct {
ID string
}
R(&DBInstanceDatabaseIdOptions{}, "dbinstance-database-delete", "Delete DB instance databases", func(s *mcclient.ClientSession, opts *DBInstanceDatabaseIdOptions) error {
result, err := modules.DBInstanceDatabases.Delete(s, opts.ID, nil)
if err != nil {
return err
}
printObject(result)
return nil
})
cmd := shell.NewResourceCmd(&modules.DBInstanceDatabases).WithKeyword("dbinstance-database")
cmd.List(&options.DBInstanceDatabaseListOptions{})
cmd.Update(&options.BaseUpdateOptions{})
cmd.Delete(&options.DBInstanceDatabaseIdOptions{})
cmd.Show(&options.DBInstanceDatabaseIdOptions{})
cmd.Create(&options.DBInstanceDatabaseCreateOptions{})
}

View File

@@ -16,6 +16,7 @@ package compute
import (
"yunion.io/x/onecloud/cmd/climc/shell"
"yunion.io/x/onecloud/pkg/mcclient"
"yunion.io/x/onecloud/pkg/mcclient/modules"
"yunion.io/x/onecloud/pkg/mcclient/options"
)
@@ -24,4 +25,19 @@ func init() {
cmd := shell.NewResourceCmd(&modules.DBInstanceSkus).WithKeyword("dbinstance-sku")
cmd.List(&options.DBInstanceSkuListOption{})
cmd.Show(&options.DBInstanceSkuIdOption{})
cmd.PerformClass("sync-skus", &options.SkuSyncOptions{})
R(&options.SkuTaskQueryOptions{}, "dbinstance-sku-sync-task-show", "Show details of skus sync tasks", func(s *mcclient.ClientSession, args *options.SkuTaskQueryOptions) error {
params, err := args.Params()
if err != nil {
return err
}
result, err := modules.DBInstanceSkus.Get(s, "sync-tasks", params)
if err != nil {
return err
}
printObject(result)
return nil
})
}

View File

@@ -15,262 +15,34 @@
package compute
import (
"fmt"
"strings"
"yunion.io/x/jsonutils"
computeapi "yunion.io/x/onecloud/pkg/apis/compute"
"yunion.io/x/onecloud/cmd/climc/shell"
"yunion.io/x/onecloud/pkg/mcclient"
"yunion.io/x/onecloud/pkg/mcclient/modulebase"
"yunion.io/x/onecloud/pkg/mcclient/modules"
"yunion.io/x/onecloud/pkg/mcclient/options"
"yunion.io/x/onecloud/pkg/mcclient/options/compute"
)
func init() {
type DBInstanceListOptions struct {
options.BaseListOptions
BillingType string `help:"billing type" choices:"postpaid|prepaid"`
}
R(&DBInstanceListOptions{}, "dbinstance-list", "List DB instance", func(s *mcclient.ClientSession, opts *DBInstanceListOptions) error {
params, err := options.ListStructToParams(opts)
if err != nil {
return err
}
result, err := modules.DBInstance.List(s, params)
if err != nil {
return err
}
if len(opts.ExportFile) > 0 {
exportList(result, opts.ExportFile, opts.ExportKeys, opts.ExportTexts, modules.DBInstance.GetColumns(s))
} else {
printList(result, modules.DBInstance.GetColumns(s))
}
return nil
})
R(&options.DBInstanceCreateOptions{}, "dbinstance-create", "Create DB instance", func(s *mcclient.ClientSession, opts *options.DBInstanceCreateOptions) error {
params, err := opts.Params()
if err != nil {
return err
}
if opts.AllowDelete != nil && *opts.AllowDelete {
params.Add(jsonutils.JSONFalse, "disable_delete")
}
result, err := modules.DBInstance.Create(s, params)
if err != nil {
return err
}
printObject(result)
return nil
})
type DBInstanceRenewOptions struct {
ID string `help:"ID or name of server to renew"`
DURATION string `help:"Duration of renew, ADMIN only command"`
}
R(&DBInstanceRenewOptions{}, "dbinstance-renew", "Renew a dbinstance", func(s *mcclient.ClientSession, args *DBInstanceRenewOptions) error {
params := jsonutils.NewDict()
params.Add(jsonutils.NewString(args.DURATION), "duration")
result, err := modules.DBInstance.PerformAction(s, args.ID, "renew", params)
if err != nil {
return err
}
printObject(result)
return nil
})
type DBInstanceUpdateOptions struct {
ID string `help:"ID or name of server to renew"`
Name string
Description string
Delete string `help:"Lock or not lock dbinstance" choices:"enable|disable"`
}
R(&DBInstanceUpdateOptions{}, "dbinstance-update", "Update a dbinstance", func(s *mcclient.ClientSession, args *DBInstanceUpdateOptions) error {
params, err := options.StructToParams(args)
if err != nil {
return err
}
if len(args.Delete) > 0 {
if args.Delete == "disable" {
params.Add(jsonutils.JSONTrue, "disable_delete")
} else {
params.Add(jsonutils.JSONFalse, "disable_delete")
}
}
result, err := modules.DBInstance.Update(s, args.ID, params)
if err != nil {
return err
}
printObject(result)
return nil
})
type DBInstanceChangeConfigOptions struct {
ID string `help:"ID or name of server to renew"`
DiskSizeGb int64 `help:"Change DBInstance storage size"`
VcpuCount int64 `help:"Change DBInstance vcpu count"`
VmemSizeMb int64 `help:"Change DBInstance vmem size mb"`
InstanceType string `help:"Change DBInstance instanceType"`
Category string `help:"Change DBInstance category"`
}
R(&DBInstanceChangeConfigOptions{}, "dbinstance-change-config", "ChangeConfig a dbinstance", func(s *mcclient.ClientSession, args *DBInstanceChangeConfigOptions) error {
params := jsonutils.NewDict()
if len(args.Category) > 0 {
params.Add(jsonutils.NewString(args.Category), "category")
}
if len(args.InstanceType) > 0 {
params.Add(jsonutils.NewString(args.InstanceType), "instance_type")
}
if args.DiskSizeGb > 0 {
params.Add(jsonutils.NewInt(args.DiskSizeGb), "disk_size_gb")
}
if args.VcpuCount > 0 {
params.Add(jsonutils.NewInt(args.VcpuCount), "vcpu_count")
}
if args.VmemSizeMb > 0 {
params.Add(jsonutils.NewInt(args.VmemSizeMb), "vmeme_size_mb")
}
result, err := modules.DBInstance.PerformAction(s, args.ID, "change-config", params)
if err != nil {
return err
}
printObject(result)
return nil
})
type DBInstanceIdOptions struct {
ID string `help:"ID of dbinstance"`
}
R(&DBInstanceIdOptions{}, "dbinstance-open-public-connection", "Open DB instance public connection", func(s *mcclient.ClientSession, opts *DBInstanceIdOptions) error {
params := jsonutils.NewDict()
params.Add(jsonutils.JSONTrue, "open")
result, err := modules.DBInstance.PerformAction(s, opts.ID, "public-connection", params)
if err != nil {
return err
}
printObject(result)
return nil
})
R(&DBInstanceIdOptions{}, "dbinstance-close-public-connection", "Close DB instance public connection", func(s *mcclient.ClientSession, opts *DBInstanceIdOptions) error {
params := jsonutils.NewDict()
params.Add(jsonutils.JSONFalse, "open")
result, err := modules.DBInstance.PerformAction(s, opts.ID, "public-connection", params)
if err != nil {
return err
}
printObject(result)
return nil
})
type DBInstanceRecoveryOptions struct {
ID string
BACKUP string
Databases []string
}
R(&DBInstanceRecoveryOptions{}, "dbinstance-recovery", "Recovery DB instance database from backup", func(s *mcclient.ClientSession, opts *DBInstanceRecoveryOptions) error {
params := jsonutils.NewDict()
params.Set("dbinstancebackup", jsonutils.NewString(opts.BACKUP))
dbs := jsonutils.NewDict()
for _, database := range opts.Databases {
if len(database) > 0 {
dbInfo := strings.Split(database, ":")
if len(dbInfo) == 1 {
dbs.Add(jsonutils.NewString(dbInfo[0]), dbInfo[0])
} else if len(dbInfo) == 2 {
dbs.Add(jsonutils.NewString(dbInfo[1]), dbInfo[0])
} else {
return fmt.Errorf("Invalid dbinfo: %s", database)
}
}
}
if dbs.Length() > 0 {
params.Add(dbs, "databases")
}
result, err := modules.DBInstance.PerformAction(s, opts.ID, "recovery", params)
if err != nil {
return err
}
printObject(result)
return nil
})
R(&DBInstanceIdOptions{}, "dbinstance-show", "Show DB instance", func(s *mcclient.ClientSession, opts *DBInstanceIdOptions) error {
result, err := modules.DBInstance.Get(s, opts.ID, nil)
if err != nil {
return err
}
printObject(result)
return nil
})
R(&DBInstanceIdOptions{}, "dbinstance-reboot", "Reboot DB instance", func(s *mcclient.ClientSession, opts *DBInstanceIdOptions) error {
result, err := modules.DBInstance.PerformAction(s, opts.ID, "reboot", nil)
if err != nil {
return err
}
printObject(result)
return nil
})
type DBInstanceDeleteOptions struct {
ID string `help:"DBInstance Id or name"`
KeepBackup bool `help:"Keep dbinstance manual backup after delete dbinstance"`
}
R(&DBInstanceDeleteOptions{}, "dbinstance-delete", "Delete DB instance", func(s *mcclient.ClientSession, opts *DBInstanceDeleteOptions) error {
params := jsonutils.NewDict()
if opts.KeepBackup {
params.Add(jsonutils.JSONTrue, "keep_backup")
}
result, err := modules.DBInstance.Delete(s, opts.ID, params)
if err != nil {
return err
}
printObject(result)
return nil
})
R(&DBInstanceIdOptions{}, "dbinstance-purge", "Purge DB instance", func(s *mcclient.ClientSession, opts *DBInstanceIdOptions) error {
result, err := modules.DBInstance.PerformAction(s, opts.ID, "purge", nil)
if err != nil {
return err
}
printObject(result)
return nil
})
R(&DBInstanceIdOptions{}, "dbinstance-syncstatus", "Sync status for DB instance", func(s *mcclient.ClientSession, opts *DBInstanceIdOptions) error {
result, err := modules.DBInstance.PerformAction(s, opts.ID, "syncstatus", nil)
if err != nil {
return err
}
printObject(result)
return nil
})
R(&DBInstanceIdOptions{}, "dbinstance-sync", "Sync conf from cloud dbinstance", func(s *mcclient.ClientSession, opts *DBInstanceIdOptions) error {
result, err := modules.DBInstance.PerformAction(s, opts.ID, "sync", nil)
if err != nil {
return err
}
printObject(result)
return nil
})
R(&DBInstanceIdOptions{}, "dbinstance-sync-status", "Sync status for DB instance", func(s *mcclient.ClientSession, opts *DBInstanceIdOptions) error {
result, err := modules.DBInstance.PerformAction(s, opts.ID, "sync-status", nil)
if err != nil {
return err
}
printObject(result)
return nil
})
cmd := shell.NewResourceCmd(&modules.DBInstance) //.WithContextManager(&modules.Networks)
cmd.List(&compute.DBInstanceListOptions{})
cmd.Create(&compute.DBInstanceCreateOptions{})
cmd.Update(&compute.DBInstanceUpdateOptions{})
cmd.Show(&compute.DBInstanceIdOptions{})
cmd.Delete(&compute.DBInstanceDeleteOptions{})
cmd.Perform("renew", &compute.DBInstanceRenewOptions{})
cmd.Perform("change-config", &compute.DBInstanceChangeConfigOptions{})
cmd.Perform("public-connection", &compute.DBInstancePublicConnectionOptions{})
cmd.Perform("recovery", &compute.DBInstanceRecoveryOptions{})
cmd.Perform("reboot", &compute.DBInstanceIdOptions{})
cmd.Perform("purge", &compute.DBInstanceIdOptions{})
cmd.Perform("syncstatus", &compute.DBInstanceIdOptions{})
cmd.Perform("sync", &compute.DBInstanceIdOptions{})
cmd.Perform("change-owner", &compute.DBInstanceChangeOwnerOptions{})
cmd.PerformWithKeyword("add-tag", "user-metadata", &options.ResourceMetadataOptions{})
cmd.PerformWithKeyword("set-tag", "set-user-metadata", &options.ResourceMetadataOptions{})
cmd.Perform("remote-update", &compute.DBInstanceRemoteUpdateOptions{})
cmd.Perform("set-secgroup", &compute.DBInstanceSetSecgroupOptions{})
type DBInstanceNetworkListOptions struct {
options.BaseListOptions
@@ -336,64 +108,4 @@ func init() {
return nil
})
type DBInstanceChangeOwnerOptions struct {
ID string `help:"DBInstance to change owner" json:"-"`
PROJECT string `help:"Project ID or change" json:"tenant"`
}
R(&DBInstanceChangeOwnerOptions{}, "dbinstance-change-owner", "Change owner porject of a dbinstance", func(s *mcclient.ClientSession, opts *DBInstanceChangeOwnerOptions) error {
params, err := options.StructToParams(opts)
if err != nil {
return err
}
result, err := modules.DBInstance.PerformAction(s, opts.ID, "change-owner", params)
if err != nil {
return err
}
printObject(result)
return nil
})
R(&options.ResourceMetadataOptions{}, "dbinstance-add-tag", "Set tag of a dbinstance", func(s *mcclient.ClientSession, opts *options.ResourceMetadataOptions) error {
params, err := opts.Params()
if err != nil {
return err
}
result, err := modules.DBInstance.PerformAction(s, opts.ID, "user-metadata", params)
if err != nil {
return err
}
printObject(result)
return nil
})
R(&options.ResourceMetadataOptions{}, "dbinstance-set-tag", "Set tag of a dbinstance", func(s *mcclient.ClientSession, opts *options.ResourceMetadataOptions) error {
params, err := opts.Params()
if err != nil {
return err
}
result, err := modules.DBInstance.PerformAction(s, opts.ID, "set-user-metadata", params)
if err != nil {
return err
}
printObject(result)
return nil
})
type DBInstanceRemoteUpdateOptions struct {
ID string `json:"-"`
computeapi.DBInstanceRemoteUpdateInput
}
R(&DBInstanceRemoteUpdateOptions{}, "dbinstance-remote-update", "Change owner porject of a dbinstance", func(s *mcclient.ClientSession, opts *DBInstanceRemoteUpdateOptions) error {
params, err := options.StructToParams(opts)
if err != nil {
return err
}
result, err := modules.DBInstance.PerformAction(s, opts.ID, "remote-update", params)
if err != nil {
return err
}
printObject(result)
return nil
})
}

View File

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

View File

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

View File

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

@@ -137,4 +137,21 @@ func init() {
printLbAcl(lbacl)
return nil
})
R(&options.LoadbalancerAclPublicOptions{}, "lbacl-public", "Public lbacl", func(s *mcclient.ClientSession, opts *options.LoadbalancerAclPublicOptions) error {
params := jsonutils.Marshal(opts)
lbacl, err := modules.LoadbalancerAcls.PerformAction(s, opts.ID, "public", params)
if err != nil {
return err
}
printLbAcl(lbacl)
return nil
})
R(&options.LoadbalancerAclPrivateOptions{}, "lbacl-private", "Private lbacl", func(s *mcclient.ClientSession, opts *options.LoadbalancerAclPrivateOptions) error {
lbacl, err := modules.LoadbalancerAcls.PerformAction(s, opts.ID, "private", nil)
if err != nil {
return err
}
printLbAcl(lbacl)
return nil
})
}

View File

@@ -15,6 +15,8 @@
package compute
import (
"yunion.io/x/jsonutils"
"yunion.io/x/onecloud/pkg/mcclient"
"yunion.io/x/onecloud/pkg/mcclient/modules"
"yunion.io/x/onecloud/pkg/mcclient/options"
@@ -81,4 +83,21 @@ func init() {
printObject(lbcert)
return nil
})
R(&options.LoadbalancerCertificatePublicOptions{}, "lbcert-public", "Public lbcert", func(s *mcclient.ClientSession, opts *options.LoadbalancerCertificatePublicOptions) error {
params := jsonutils.Marshal(opts)
lbcert, err := modules.LoadbalancerCertificates.PerformAction(s, opts.ID, "public", params)
if err != nil {
return err
}
printObject(lbcert)
return nil
})
R(&options.LoadbalancerCertificatePrivateOptions{}, "lbcert-private", "Private lbcert", func(s *mcclient.ClientSession, opts *options.LoadbalancerCertificatePrivateOptions) error {
lbcert, err := modules.LoadbalancerCertificates.PerformAction(s, opts.ID, "private", nil)
if err != nil {
return err
}
printObject(lbcert)
return nil
})
}

View File

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

View File

@@ -58,7 +58,8 @@ type RegionQuotaOptions struct {
Eip int64 `help:"Elastic IP count" json:"eip,omitzero"`
Snapshot int64 `help:"Snapshot count" json:"snapshot,omitzero"`
Snapshot int64 `help:"Snapshot count" json:"snapshot,omitzero"`
InstanceSnapshot int64 `help:"Instance snapshot count" json:"instance_snapshot,omitzero"`
Bucket int64 `help:"bucket count" json:"bucket,omitzero"`
ObjectGB int64 `help:"object size in GB" json:"object_gb,omitzero"`
@@ -316,7 +317,7 @@ func init() {
QuotaSetBaseOptions
IdentityQuotaOptions
}
R(&IdentityQuotaSetOptions{}, "identity-quota-set", "Set identity quota for domain", func(s *mcclient.ClientSession, args *InfrasQuotaSetOptions) error {
R(&IdentityQuotaSetOptions{}, "identity-quota-set", "Set identity quota for domain", func(s *mcclient.ClientSession, args *IdentityQuotaSetOptions) error {
params := jsonutils.Marshal(args)
quotas, e := modules.IdentityQuotas.DoQuotaSet(s, params)
if e != nil {

View File

@@ -15,155 +15,20 @@
package compute
import (
"fmt"
"yunion.io/x/jsonutils"
"yunion.io/x/onecloud/pkg/mcclient"
"yunion.io/x/onecloud/cmd/climc/shell"
"yunion.io/x/onecloud/pkg/mcclient/modules"
"yunion.io/x/onecloud/pkg/mcclient/options"
)
func init() {
type SchedtagListOptions struct {
options.BaseListOptions
Type string `help:"Filter by resource type"`
}
R(&SchedtagListOptions{}, "schedtag-list", "List schedule tags", func(s *mcclient.ClientSession, args *SchedtagListOptions) error {
var params *jsonutils.JSONDict
{
var err error
params, err = args.BaseListOptions.Params()
if err != nil {
return err
cmd := shell.NewResourceCmd(&modules.Schedtags)
}
}
if len(args.Type) > 0 {
params.Add(jsonutils.NewString(args.Type), "resource_type")
}
result, err := modules.Schedtags.List(s, params)
if err != nil {
return err
}
printList(result, modules.Schedtags.GetColumns(s))
return nil
})
type SchedtagShowOptions struct {
ID string `help:"ID or Name of the scheduler tag to show"`
}
R(&SchedtagShowOptions{}, "schedtag-show", "Show scheduler tag details", func(s *mcclient.ClientSession, args *SchedtagShowOptions) error {
result, err := modules.Schedtags.Get(s, args.ID, nil)
if err != nil {
return err
}
printObject(result)
return nil
})
R(&SchedtagShowOptions{}, "schedtag-delete", "Delete a scheduler tag", func(s *mcclient.ClientSession, args *SchedtagShowOptions) error {
result, err := modules.Schedtags.Delete(s, args.ID, nil)
if err != nil {
return err
}
printObject(result)
return nil
})
type SchedtagCreateOptions struct {
NAME string `help:"Name of new schedtag"`
Strategy string `help:"Policy" choices:"require|exclude|prefer|avoid"`
Desc string `help:"Description"`
Scope string `help:"Resource scope" choices:"system|domain|project"`
Type string `help:"Resource type" choices:"hosts|storages|networks|cloudproviders|cloudregions|zones"`
}
R(&SchedtagCreateOptions{}, "schedtag-create", "Create a schedule tag", func(s *mcclient.ClientSession, args *SchedtagCreateOptions) error {
params := jsonutils.NewDict()
params.Add(jsonutils.NewString(args.NAME), "name")
if len(args.Strategy) > 0 {
params.Add(jsonutils.NewString(args.Strategy), "default_strategy")
}
if len(args.Desc) > 0 {
params.Add(jsonutils.NewString(args.Desc), "description")
}
if len(args.Type) > 0 {
params.Add(jsonutils.NewString(args.Type), "resource_type")
}
if len(args.Scope) > 0 {
params.Add(jsonutils.NewString(args.Scope), "scope")
}
schedtag, err := modules.Schedtags.Create(s, params)
if err != nil {
return err
}
printObject(schedtag)
return nil
})
type SchedtagUpdateOptions struct {
ID string `help:"ID or Name of schetag"`
Name string `help:"New name of schedtag"`
Strategy string `help:"Policy" choices:"require|exclude|prefer|avoid"`
Desc string `help:"Description"`
ClearStrategy bool `help:"Clear default schedule policy"`
}
R(&SchedtagUpdateOptions{}, "schedtag-update", "Update a schedule tag", func(s *mcclient.ClientSession, args *SchedtagUpdateOptions) error {
params := jsonutils.NewDict()
if len(args.Name) > 0 {
params.Add(jsonutils.NewString(args.Name), "name")
}
if len(args.Strategy) > 0 {
params.Add(jsonutils.NewString(args.Strategy), "default_strategy")
}
if len(args.Desc) > 0 {
params.Add(jsonutils.NewString(args.Desc), "description")
}
if args.ClearStrategy {
params.Add(jsonutils.NewString(""), "default_strategy")
}
if params.Size() == 0 {
return fmt.Errorf("No valid data to update")
}
schedtag, err := modules.Schedtags.Update(s, args.ID, params)
if err != nil {
return err
}
printObject(schedtag)
return nil
})
type SetScopeOptions struct {
ID []string `help:"ID or Name of schetag"`
Project string `help:"ID or Name of project"`
Domain string `help:"ID or Name of domain"`
System bool `help:"Set to system scope"`
}
R(&SetScopeOptions{}, "schedtag-set-scope", "Set schedtag scope", func(s *mcclient.ClientSession, args *SetScopeOptions) error {
params := jsonutils.NewDict()
domainId := args.Domain
projectId := args.Project
if args.System {
domainId = ""
projectId = ""
}
params.Add(jsonutils.NewString(domainId), "domain")
params.Add(jsonutils.NewString(projectId), "project")
ret := modules.Schedtags.BatchPerformAction(s, args.ID, "set-scope", params)
printBatchResults(ret, modules.Schedtags.GetColumns(s))
return nil
})
R(&options.ResourceMetadataOptions{}, "schedtag-set-user-metadata", "Set metadata of a server", func(s *mcclient.ClientSession, opts *options.ResourceMetadataOptions) error {
params, err := opts.Params()
if err != nil {
return err
}
result, err := modules.Schedtags.PerformAction(s, opts.ID, "user-metadata", params)
if err != nil {
return err
}
printObject(result)
return nil
})
cmd.List(new(options.SchedtagListOptions))
cmd.Show(new(options.SchedtagShowOptions))
cmd.Delete(new(options.SchedtagShowOptions))
cmd.Create(new(options.SchedtagCreateOptions))
cmd.Update(new(options.SchedtagUpdateOptions))
cmd.BatchPerform("set-scope", new(options.SchedtagSetScopeOptions))
cmd.PerformWithKeyword("set-user-metadata", "user-metadata", new(options.ResourceMetadataOptions))
cmd.Perform("set-resource", new(options.SchedtagSetResource))
}

View File

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

View File

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

@@ -15,194 +15,31 @@
package compute
import (
"yunion.io/x/jsonutils"
"yunion.io/x/onecloud/cmd/climc/shell"
"yunion.io/x/onecloud/pkg/mcclient"
"yunion.io/x/onecloud/pkg/mcclient/modules"
"yunion.io/x/onecloud/pkg/mcclient/options"
)
func init() {
type ServerSkusListOptions struct {
options.BaseListOptions
Cloudregion string `help:"region Id or name"`
Usable bool `help:"Filter usable sku"`
Zone string `help:"zone Id or name"`
City *string `help:"city name,eg. BeiJing"`
Cpu *int `help:"Cpu core count" json:"cpu_core_count"`
Mem *int `help:"Memory size in MB" json:"memory_size_mb"`
Name string `help:"Name of Sku"`
PostpaidStatus string `help:"Postpaid status" choices:"soldout|available"`
PrepaidStatus string `help:"Prepaid status" choices:"soldout|available"`
}
cmd := shell.NewResourceCmd(&modules.ServerSkus).WithKeyword("server-sku")
cmd.List(&options.ServerSkusListOptions{})
cmd.Show(&options.ServerSkusIdOptions{})
cmd.Delete(&options.ServerSkusIdOptions{})
cmd.Perform("enable", &options.ServerSkusIdOptions{})
cmd.Perform("disable", &options.ServerSkusIdOptions{})
cmd.Create(&options.ServerSkusCreateOptions{})
cmd.Update(&options.ServerSkusUpdateOptions{})
cmd.ClassShow(&options.ServerSkusListOptions{})
cmd.PerformClass("sync-skus", &options.SkuSyncOptions{})
R(&ServerSkusListOptions{}, "server-sku-list", "List all avaiable Server SKU", func(s *mcclient.ClientSession, args *ServerSkusListOptions) error {
params, err := options.ListStructToParams(args)
R(&options.SkuTaskQueryOptions{}, "server-sku-sync-task-show", "Show details of skus sync tasks", func(s *mcclient.ClientSession, args *options.SkuTaskQueryOptions) error {
params, err := args.Params()
if err != nil {
return err
}
results, err := modules.ServerSkus.List(s, params)
if err != nil {
return err
}
printList(results, modules.ServerSkus.GetColumns(s))
return nil
})
type ServerSkusIdOptions struct {
ID string `help:"ID or Name of SKU to show"`
}
R(&ServerSkusIdOptions{}, "server-sku-show", "show details of a avaiable Server SKU", func(s *mcclient.ClientSession, args *ServerSkusIdOptions) error {
result, err := modules.ServerSkus.Get(s, args.ID, nil)
if err != nil {
return err
}
printObject(result)
return nil
})
R(&ServerSkusIdOptions{}, "server-sku-enable", "Enable Server SKU", func(s *mcclient.ClientSession, args *ServerSkusIdOptions) error {
result, err := modules.ServerSkus.PerformAction(s, args.ID, "enable", nil)
if err != nil {
return err
}
printObject(result)
return nil
})
R(&ServerSkusIdOptions{}, "server-sku-disable", "Disable Server SKU", func(s *mcclient.ClientSession, args *ServerSkusIdOptions) error {
result, err := modules.ServerSkus.PerformAction(s, args.ID, "disable", nil)
if err != nil {
return err
}
printObject(result)
return nil
})
type ServerSkusCacheOptions struct {
REGION string `help:"Private cloud region"`
ID string `help:"ServerSku Id"`
}
R(&ServerSkusCacheOptions{}, "server-sku-cache", "Cache Server SKU for private cloud", func(s *mcclient.ClientSession, args *ServerSkusCacheOptions) error {
params := jsonutils.NewDict()
params.Add(jsonutils.NewString(args.REGION), "cloudregion")
result, err := modules.ServerSkus.PerformAction(s, args.ID, "cache-sku", params)
if err != nil {
return err
}
printObject(result)
return nil
})
type ServerSkusCreateOptions struct {
Name string `help:"ServerSku name"`
CpuCoreCount int `help:"Cpu Count" required:"true" positional:"true"`
MemorySizeMB int `help:"Memory MB" required:"true" positional:"true"`
OsName *string `help:"OS name/type" choices:"Linux|Windows|Any" default:"Any"`
InstanceTypeCategory *string `help:"instance type category" choices:"general_purpose|compute_optimized|memory_optimized|storage_optimized|hardware_accelerated|high_memory|high_storage"`
SysDiskResizable *bool `help:"system disk is resizable"`
SysDiskType *string `help:"system disk type" default:"local" choices:"local"`
SysDiskMaxSizeGB *int `help:"system disk maximal size in gb"`
AttachedDiskType *string `help:"attached data disk type"`
AttachedDiskSizeGB *int `help:"attached data disk size in GB"`
AttachedDiskCount *int `help:"attached data disk count"`
MaxDataDiskCount *int `help:"maximal allowed data disk count"`
NicType *string `help:"nic type"`
MaxNicCount *int `help:"maximal nic count"`
GPUSpec *string `help:"GPU spec"`
GPUCount *int `help:"GPU count"`
GPUAttachable *bool `help:"Allow attach GPU"`
Zone *string `help:"Zone ID or name"`
Cloudregion *string `help:"Cloudregion ID or name"`
Provider string `help:"provider"`
Brand string `help:"brand"`
}
R(&ServerSkusCreateOptions{}, "server-sku-create", "Create a server sku record", func(s *mcclient.ClientSession, args *ServerSkusCreateOptions) error {
params, err := options.StructToParams(args)
if err != nil {
return err
}
result, err := modules.ServerSkus.Create(s, params)
if err != nil {
return err
}
printObject(result)
return nil
})
type ServerSkusUpdateOptions struct {
ID string `help:"Name or ID of SKU" json:"-"`
PostpaidStatus *string `help:"skus available status for postpaid instance" choices:"available|soldout"`
PrepaidStatus *string `help:"skus available status for prepaid instance" choices:"available|soldout"`
CpuCoreCount *int `help:"Cpu Count"`
MemorySizeMB *int `help:"Memory MB"`
InstanceTypeCategory *string `help:"instance type category" choices:"general_purpose|compute_optimized|memory_optimized|storage_optimized|hardware_accelerated|high_memory|high_storage"`
SysDiskResizable *bool `help:"system disk is resizable"`
SysDiskMaxSizeGB *int `help:"system disk maximal size in gb"`
AttachedDiskType *string `help:"attached data disk type"`
AttachedDiskSizeGB *int `help:"attached data disk size in GB"`
AttachedDiskCount *int `help:"attached data disk count"`
MaxDataDiskCount *int `help:"maximal allowed data disk count"`
NicType *string `help:"nic type"`
MaxNicCount *int `help:"maximal nic count"`
GPUSpec *string `help:"GPU spec"`
GPUCount *int `help:"GPU count"`
GPUAttachable *bool `help:"Allow attach GPU"`
Zone *string `help:"Zone ID or name"`
Region *string `help:"Region ID or name"`
}
R(&ServerSkusUpdateOptions{}, "server-sku-update", "Update server sku attributes", func(s *mcclient.ClientSession, args *ServerSkusUpdateOptions) error {
params, err := options.StructToParams(args)
if err != nil {
return err
}
result, err := modules.ServerSkus.Update(s, args.ID, params)
if err != nil {
return err
}
printObject(result)
return nil
})
type ServerSkusDeleteOptions struct {
ID string `help:"Id or name of server sku"`
Purge bool `help:"purge sku"`
}
R(&ServerSkusDeleteOptions{}, "server-sku-delete", "Delete a server sku", func(s *mcclient.ClientSession, args *ServerSkusDeleteOptions) error {
params := jsonutils.NewDict()
if args.Purge {
params.Add(jsonutils.JSONTrue, "purge")
}
result, err := modules.ServerSkus.Delete(s, args.ID, params)
if err != nil {
return err
}
printObject(result)
return nil
})
R(&ServerSkusListOptions{}, "server-sku-specs-list", "List all avaiable Server SKU specifications", func(s *mcclient.ClientSession, args *ServerSkusListOptions) error {
params, err := options.ListStructToParams(args)
if err != nil {
return err
}
result, err := modules.ServerSkus.Get(s, "instance-specs", params)
result, err := modules.ServerSkus.Get(s, "sync-tasks", params)
if err != nil {
return err
}

View File

@@ -61,13 +61,14 @@ func init() {
ID string `help:"ID or Name of storage to update"`
Name string `help:"New Name of storage"`
Desc string `help:"Description"`
CommitBound float64 `help:"Upper bound of storage overcommit rate"`
CommitBound float64 `help:"Upper bound of storage overcommit rate" json:"cmtbound"`
MediumType string `help:"Medium type" choices:"ssd|rotate"`
RbdRadosMonOpTimeout int64 `help:"ceph rados_mon_op_timeout"`
RbdRadosOsdOpTimeout int64 `help:"ceph rados_osd_op_timeout"`
RbdClientMountTimeout int64 `help:"ceph client_mount_timeout"`
RbdKey string `help:"ceph rbd key"`
Reserved string `help:"Reserved storage space"`
Capacity int `help:"Capacity for storage"`
}
R(&StorageUpdateOptions{}, "storage-update", "Update a storage", func(s *mcclient.ClientSession, args *StorageUpdateOptions) error {
params, err := options.StructToParams(args)

View File

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

View File

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

@@ -0,0 +1,70 @@
// 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 events
import (
"yunion.io/x/jsonutils"
"yunion.io/x/onecloud/pkg/mcclient"
"yunion.io/x/onecloud/pkg/mcclient/modulebase"
"yunion.io/x/onecloud/pkg/mcclient/modules"
)
func init() {
type EventSplitableOptions struct {
Service string `help:"service" choices:"compute|identity|image" default:"compute"`
}
R(&EventSplitableOptions{}, "logs-splitable", "Show splitable info of event table", func(s *mcclient.ClientSession, args *EventSplitableOptions) error {
var results jsonutils.JSONObject
var err error
switch args.Service {
case "identity":
results, err = modules.IdentityLogs.Get(s, "splitable", nil)
case "image":
results, err = modules.ImageLogs.Get(s, "splitable", nil)
default:
results, err = modules.Logs.Get(s, "splitable", nil)
}
if err != nil {
return err
}
tables, err := results.GetArray()
if err != nil {
return err
}
listResult := &modulebase.ListResult{
Data: tables,
}
printList(listResult, nil)
return nil
})
R(&EventSplitableOptions{}, "logs-purge", "Purge obsolete splitable of event table", func(s *mcclient.ClientSession, args *EventSplitableOptions) error {
var results jsonutils.JSONObject
var err error
switch args.Service {
case "identity":
results, err = modules.IdentityLogs.PerformClassAction(s, "purge-splitable", nil)
case "image":
results, err = modules.ImageLogs.PerformClassAction(s, "purge-splitable", nil)
default:
results, err = modules.Logs.PerformClassAction(s, "purge-splitable", nil)
}
if err != nil {
return err
}
printObject(results)
return nil
})
}

View File

@@ -78,6 +78,11 @@ type ICreateOpt interface {
IOpt
}
type IBatchCreateOpt interface {
IOpt
GetCountParam() int
}
func (cmd ResourceCmd) RunWithDesc(action, desc string, args interface{}, callback interface{}) {
man := cmd.manager
prefix := cmd.prefix
@@ -134,24 +139,48 @@ func (cmd ResourceCmd) List(args IListOpt) {
}
func (cmd ResourceCmd) Create(args ICreateOpt) {
cmd.CreateWithKeyworkd("create", args)
cmd.CreateWithKeyword("create", args)
}
func (cmd ResourceCmd) CreateWithKeyworkd(keyword string, args ICreateOpt) {
func (cmd ResourceCmd) CreateWithKeyword(keyword string, args ICreateOpt) {
cmd.Run(keyword, args, cmd.create)
}
func (cmd ResourceCmd) create(s *mcclient.ClientSession, args ICreateOpt) error {
man := cmd.manager
callback := func(s *mcclient.ClientSession, args ICreateOpt) error {
params, err := args.Params()
if err != nil {
return err
}
ret, err := man.(modulebase.Manager).Create(s, params)
if err != nil {
return err
}
printObject(ret)
return nil
params, err := args.Params()
if err != nil {
return err
}
cmd.Run(keyword, args, callback)
ret, err := man.(modulebase.Manager).Create(s, params)
if err != nil {
return err
}
printObject(ret)
return nil
}
func (cmd ResourceCmd) BatchCreate(args IBatchCreateOpt) {
cmd.BatchCreateWithKeyword("create", args)
}
func (cmd ResourceCmd) BatchCreateWithKeyword(keyword string, args IBatchCreateOpt) {
cmd.Run(keyword, args, cmd.batchCreate)
}
func (cmd ResourceCmd) batchCreate(s *mcclient.ClientSession, args IBatchCreateOpt) error {
man := cmd.manager.(modulebase.Manager)
count := args.GetCountParam()
if count <= 1 {
return cmd.create(s, args)
}
params, err := args.Params()
if err != nil {
return err
}
rets := man.BatchCreate(s, params, count)
printBatchResults(rets, man.GetColumns(s))
return nil
}
type IIdOpt interface {
@@ -302,6 +331,23 @@ func (cmd ResourceCmd) PerformWithKeyword(keyword, action string, args IPerformO
cmd.Run(keyword, args, callback)
}
func (cmd ResourceCmd) PerformClassWithKeyword(keyword, action string, args IOpt) {
man := cmd.manager
callback := func(s *mcclient.ClientSession, args IOpt) error {
params, err := args.Params()
if err != nil {
return err
}
ret, err := man.(modulebase.Manager).PerformClassAction(s, action, params)
if err != nil {
return err
}
printObject(ret)
return nil
}
cmd.Run(keyword, args, callback)
}
func (cmd ResourceCmd) Perform(action string, args IPerformOpt) {
cmd.PerformWithKeyword(action, action, args)
}

View File

@@ -156,4 +156,16 @@ func init() {
return nil
})
type DomainUnlinkIdpOptions struct {
DOMAIN string `help:"ID or name of domain to operate" json:"-"`
}
R(&DomainUnlinkIdpOptions{}, "domain-unlink-idp", "Unlink domain from an entity in the speicified identity provider", func(s *mcclient.ClientSession, args *DomainUnlinkIdpOptions) error {
result, err := modules.Domains.PerformAction(s, args.DOMAIN, "unlink-idp", nil)
if err != nil {
return err
}
printObject(result)
return nil
})
}

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

@@ -12,26 +12,23 @@
// See the License for the specific language governing permissions and
// limitations under the License.
package suggestsysdrivers
package identity
import (
"yunion.io/x/onecloud/pkg/apis/monitor"
"yunion.io/x/onecloud/pkg/monitor/dbinit"
"yunion.io/x/onecloud/pkg/monitor/models"
"yunion.io/x/onecloud/pkg/mcclient"
"yunion.io/x/onecloud/pkg/mcclient/modules"
)
type ScaleDown struct {
*InfluxdbBaseDriver
}
func NewScaleDownDriver() models.ISuggestSysRuleDriver {
return &ScaleDown{
InfluxdbBaseDriver: NewInfluxdbBaseDriver(
monitor.SCALE_DOWN,
monitor.SCALE_MONTITOR_RES_TYPE,
monitor.SCALE_DOWN_DRIVER_ACTION,
monitor.SCALE_DOWN_MONITOR_SUGGEST,
*dbinit.ScaleDownCreateInput,
),
func init() {
type ScopeResourceRefreshOptions struct {
}
R(&ScopeResourceRefreshOptions{}, "scope-resource-refresh", "Refresh scope resource count", func(s *mcclient.ClientSession, args *ScopeResourceRefreshOptions) error {
result, err := modules.ScopeResource.PerformClassAction(s, "refresh", nil)
if err != nil {
return err
}
printObject(result)
return nil
})
}

View File

@@ -31,6 +31,7 @@ import (
"yunion.io/x/onecloud/pkg/mcclient/auth"
"yunion.io/x/onecloud/pkg/mcclient/modules"
"yunion.io/x/onecloud/pkg/mcclient/options"
"yunion.io/x/onecloud/pkg/util/fileutils2"
"yunion.io/x/onecloud/pkg/util/rbacutils"
"yunion.io/x/onecloud/pkg/util/shellutils"
)
@@ -63,6 +64,8 @@ func init() {
Enabled bool `help:"create policy enabled"`
Disabled bool `help:"create policy disabled"`
Desc string `help:"policy description"`
Scope string `help:"scope of policy"`
IsSystem *bool `help:"create system policy" negative:"no-system"`
}
R(&PolicyCreateOptions{}, "policy-create", "Create a new policy", func(s *mcclient.ClientSession, args *PolicyCreateOptions) error {
policyBytes, err := ioutil.ReadFile(args.FILE)
@@ -84,6 +87,16 @@ func init() {
if len(args.Desc) > 0 {
params.Add(jsonutils.NewString(args.Desc), "description")
}
if len(args.Scope) > 0 {
params.Add(jsonutils.NewString(args.Scope), "scope")
}
if args.IsSystem != nil {
if *args.IsSystem {
params.Add(jsonutils.JSONTrue, "is_system")
} else {
params.Add(jsonutils.JSONFalse, "is_system")
}
}
result, err := modules.Policies.Create(s, params)
if err != nil {
@@ -102,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)
@@ -128,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
}
@@ -193,6 +207,7 @@ func init() {
type PolicyShowOptions struct {
ID string `help:"ID of policy"`
Format string `help:"policy format, default yaml" default:"yaml" choices:"yaml|json"`
Save string `help:"save policy data into a file"`
}
R(&PolicyShowOptions{}, "policy-show", "Show policy", func(s *mcclient.ClientSession, args *PolicyShowOptions) error {
query := jsonutils.NewDict()
@@ -202,6 +217,15 @@ func init() {
return err
}
printObject(result)
if len(args.Save) > 0 {
if args.Format == "yaml" {
yaml, _ := result.GetString("policy")
fileutils2.FilePutContents(args.Save, yaml, false)
} else {
p, _ := result.Get("policy")
fileutils2.FilePutContents(args.Save, p.PrettyString(), false)
}
}
return nil
})

View File

@@ -174,6 +174,8 @@ func init() {
IdpId string `help:"Id of identity provider to link with"`
IdpEntityId string `help:"Entity id of identity provider to link with"`
Lang string `help:"user default language"`
}
R(&UserCreateOptions{}, "user-create", "Create a user", func(s *mcclient.ClientSession, args *UserCreateOptions) error {
params := jsonutils.NewDict()
@@ -224,6 +226,10 @@ func init() {
params.Add(jsonutils.NewString(args.IdpEntityId), "idp_entity_id")
}
if len(args.Lang) > 0 {
params.Add(jsonutils.NewString(args.Lang), "lang")
}
/*if len(args.DefaultProject) > 0 {
projId, err := modules.Projects.GetId(s, args.DefaultProject, nil)
if err != nil {
@@ -265,6 +271,8 @@ func init() {
// Option []string `help:"User options"`
SkipPasswordComplexityCheck bool `help:"skip_password_complexity_check"`
Lang string `help:"update user language"`
}
R(&UserUpdateOptions{}, "user-update", "Update a user", func(s *mcclient.ClientSession, args *UserUpdateOptions) error {
query := jsonutils.NewDict()
@@ -321,6 +329,9 @@ func init() {
} else if args.DisableMfa {
params.Add(jsonutils.JSONFalse, "enable_mfa")
}
if len(args.Lang) > 0 {
params.Add(jsonutils.NewString(args.Lang), "lang")
}
// if len(args.DefaultProject) > 0 {
// projId, err := modules.Projects.GetId(s, args.DefaultProject, nil)
// if err != nil {

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

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

@@ -15,151 +15,21 @@
package notifyv2
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"
options "yunion.io/x/onecloud/pkg/mcclient/options/notify"
)
func init() {
type ReceiverListOptions struct {
options.BaseListOptions
UId string `help:"user id in keystone"`
UName string `help:"user name in keystone"`
EnabledContactType string `help:"enabled contact type"`
VerifiedContactType string `help:"verified contact type"`
}
R(&ReceiverListOptions{}, "notify-receiver-list", "List notify receiver", func(s *mcclient.ClientSession, args *ReceiverListOptions) error {
params, err := options.ListStructToParams(args)
if err != nil {
return err
}
result, err := modules.NotifyReceiver.List(s, params)
if err != nil {
return err
}
printList(result, modules.NotifyReceiver.GetColumns(s))
return nil
})
type ReceiverCreateOptions struct {
UID string `help:"user id in keystone"`
Email string `help:"email of receiver"`
Mobile string `help:"mobile of receiver"`
EnabledContactTypes []string `help:"enabled contact type"`
}
R(&ReceiverCreateOptions{}, "notify-receiver-create", "Create notify receiver", func(s *mcclient.ClientSession, args *ReceiverCreateOptions) error {
params := jsonutils.Marshal(args).(*jsonutils.JSONDict)
receiver, err := modules.NotifyReceiver.Create(s, params)
if err != nil {
return err
}
printObject(receiver)
return nil
})
type ReceiverUpdateInput struct {
ID string `help:"Id or Name of receiver"`
Email string `help:"email of receiver"`
Mobile string `help:"mobile of receiver"`
EnabledContactType []string `help:"enabled contact type"`
}
R(&ReceiverUpdateInput{}, "notify-receiver-update", "Update notify receiver", func(s *mcclient.ClientSession, args *ReceiverUpdateInput) error {
params := jsonutils.NewDict()
if len(args.Email) > 0 {
params.Set("email", jsonutils.NewString(args.Email))
}
if len(args.Mobile) > 0 {
params.Set("mobile", jsonutils.NewString(args.Mobile))
}
if len(args.EnabledContactType) > 0 {
params.Set("enabled_contact_types", jsonutils.NewStringArray(args.EnabledContactType))
}
ret, err := modules.NotifyReceiver.Update(s, args.ID, params)
if err != nil {
return err
}
printObject(ret)
return nil
})
type ReceiverOptions struct {
ID string `help:"Id or Name of receiver"`
}
R(&ReceiverOptions{}, "notify-receiver-show", "Show notify receiver", func(s *mcclient.ClientSession, args *ReceiverOptions) error {
ret, err := modules.NotifyReceiver.Get(s, args.ID, nil)
if err != nil {
return err
}
printObject(ret)
return nil
})
R(&ReceiverOptions{}, "notify-receiver-delete", "Delete notify receiver", func(s *mcclient.ClientSession, args *ReceiverOptions) error {
receiver, err := modules.NotifyReceiver.Delete(s, args.ID, jsonutils.NewDict())
if err != nil {
return err
}
printObject(receiver)
return nil
})
R(&ReceiverOptions{}, "notify-receiver-enable", "Enable notify receiver", func(s *mcclient.ClientSession, args *ReceiverOptions) error {
ret, err := modules.NotifyReceiver.PerformAction(s, args.ID, "enable", jsonutils.NewDict())
if err != nil {
return err
}
printObject(ret)
return nil
})
R(&ReceiverOptions{}, "notify-receiver-disable", "Disable notify receiver", func(s *mcclient.ClientSession, args *ReceiverOptions) error {
ret, err := modules.NotifyReceiver.PerformAction(s, args.ID, "disable", jsonutils.NewDict())
if err != nil {
return err
}
printObject(ret)
return nil
})
type ReceiverTriggerVerifyInput struct {
ID string `help:"Id or Name of receiver"`
ContactType string `help:"Contact type to trigger verify" choices:"email|mobile"`
}
R(&ReceiverTriggerVerifyInput{}, "notify-receiver-trigger-verify", "Trigger verification for receiver about some contact", func(s *mcclient.ClientSession, args *ReceiverTriggerVerifyInput) error {
params := jsonutils.NewDict()
params.Set("contact_type", jsonutils.NewString(args.ContactType))
ret, err := modules.NotifyReceiver.PerformAction(s, args.ID, "trigger-verify", params)
if err != nil {
return err
}
printObject(ret)
return nil
})
type ReceiverVerifyInput struct {
ID string `help:"Id or Name of receiver"`
ContactType string `help:"Contact type to trigger verify" choices:"email|mobile"`
Token string `help:"Token from verify message sent to you"`
}
R(&ReceiverVerifyInput{}, "notify-receiver-verify", "Verify receiver about some contact type", func(s *mcclient.ClientSession, args *ReceiverVerifyInput) error {
params := jsonutils.NewDict()
params.Set("contact_type", jsonutils.NewString(args.ContactType))
params.Set("token", jsonutils.NewString(args.Token))
ret, err := modules.NotifyReceiver.PerformAction(s, args.ID, "verify", params)
if err != nil {
return err
}
printObject(ret)
return nil
})
R(&ReceiverOptions{}, "notify-receiver-enable", "Enable receiver", func(s *mcclient.ClientSession, args *ReceiverOptions) error {
ret, err := modules.NotifyReceiver.PerformAction(s, args.ID, "enable", nil)
if err != nil {
return err
}
printObject(ret)
return nil
})
R(&ReceiverOptions{}, "notify-receiver-disable", "Disable receiver", func(s *mcclient.ClientSession, args *ReceiverOptions) error {
ret, err := modules.NotifyReceiver.PerformAction(s, args.ID, "disable", nil)
if err != nil {
return err
}
printObject(ret)
return nil
})
cmd := shell.NewResourceCmd(&modules.NotifyReceiver).WithKeyword("notify-receiver")
cmd.List(new(options.ReceiverListOptions))
cmd.Create(new(options.ReceiverCreateOptions))
cmd.Update(new(options.ReceiverUpdateOptions))
cmd.Show(new(options.ReceiverOptions))
cmd.Delete(new(options.ReceiverOptions))
cmd.Perform("enable", new(options.ReceiverOptions))
cmd.Perform("disable", new(options.ReceiverOptions))
cmd.Perform("trigger-verify", new(options.ReceiverTriggerVerifyOptions))
cmd.Perform("verify", new(options.ReceiverVerifyOptions))
cmd.PerformClass("intellij-get", new(options.ReceiverIntellijGetOptions))
}

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"

View File

@@ -45,7 +45,7 @@ func main() {
log.Fatalf("Missing env nodename")
}
node, err := clientset.CoreV1().Nodes().Get(nodeName, metav1.GetOptions{})
node, err := clientset.CoreV1().Nodes().Get(context.Background(), nodeName, metav1.GetOptions{})
if err != nil {
log.Fatalln(err)
}

73
go.mod
View File

@@ -7,8 +7,9 @@ require (
cloud.google.com/go/storage v1.5.0
github.com/360EntSecGroup-Skylar/excelize v1.4.0
github.com/Azure/azure-sdk-for-go v36.1.0+incompatible
github.com/Azure/go-autorest/autorest v0.9.3
github.com/Azure/go-autorest/autorest v0.9.6
github.com/Azure/go-autorest/autorest/azure/auth v0.4.2
github.com/Azure/go-autorest/autorest/to v0.4.0 // indirect
github.com/DataDog/dd-trace-go v0.6.1 // indirect
github.com/DataDog/zstd v1.3.4 // indirect
github.com/Microsoft/azure-vhd-utils v0.0.0-20181115010904-44cbada2ece3
@@ -16,7 +17,7 @@ require (
github.com/Shopify/sarama v1.20.0 // indirect
github.com/Shopify/toxiproxy v2.1.4+incompatible // indirect
github.com/StackExchange/wmi v0.0.0-20180116203802-5d049714c4a6 // indirect
github.com/aliyun/alibaba-cloud-sdk-go v0.0.0-20181031125837-1b0ec6f46eb1
github.com/aliyun/alibaba-cloud-sdk-go v1.61.684
github.com/aliyun/aliyun-oss-go-sdk v2.0.4+incompatible
github.com/anacrolix/dht v0.0.0-20181129074040-b09db78595aa // indirect
github.com/anacrolix/go-libutp v0.0.0-20180808010927-aebbeb60ea05 // indirect
@@ -36,6 +37,7 @@ require (
github.com/coredns/coredns v1.3.0
github.com/coreos/go-systemd v0.0.0-20190620071333-e64a0ec8b42a // indirect
github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f // indirect
github.com/dnaeon/go-vcr v1.1.0 // indirect
github.com/dnstap/golang-dnstap v0.0.0-20170829151710-2cf77a2b5e11 // indirect
github.com/eapache/go-resiliency v1.1.0 // indirect
github.com/eapache/go-xerial-snappy v0.0.0-20180814174437-776d5712da21 // indirect
@@ -44,7 +46,8 @@ require (
github.com/farsightsec/golang-framestream v0.0.0-20181102145529-8a0cb8ba8710 // indirect
github.com/fatih/color v1.7.0
github.com/fernet/fernet-go v0.0.0-20180830025343-9eac43b88a5e
github.com/fsnotify/fsnotify v1.4.7
github.com/flynn/go-shlex v0.0.0-20150515145356-3f9db97f8568 // indirect
github.com/fsnotify/fsnotify v1.4.9
github.com/ghodss/yaml v1.0.0
github.com/gin-gonic/gin v1.5.0
github.com/glycerine/go-unsnap-stream v0.0.0-20181221182339-f9677308dec2 // indirect
@@ -57,9 +60,8 @@ require (
github.com/golang-plus/testing v1.0.0 // indirect
github.com/golang-plus/uuid v1.0.0
github.com/golang/mock v1.3.1
github.com/golang/protobuf v1.3.2
github.com/golang/protobuf v1.4.2
github.com/google/gopacket v1.1.17
github.com/googleapis/gnostic v0.2.0 // indirect
github.com/googollee/go-engine.io v0.0.0-20180829091931-e2f255711dcb // indirect
github.com/googollee/go-socket.io v0.0.0-20181214084611-0ad7206c347a
github.com/gorilla/mux v1.7.0
@@ -97,6 +99,7 @@ require (
github.com/pkg/term v0.0.0-20181116001808-27bbf2edb814 // indirect
github.com/pquerna/otp v1.2.0
github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a // indirect
github.com/satori/go.uuid v1.2.0 // indirect
github.com/serialx/hashring v0.0.0-20180504054112-49a4782e9908
github.com/sevlyar/go-daemon v0.1.5
github.com/shirou/gopsutil v2.18.10+incompatible
@@ -114,67 +117,37 @@ require (
github.com/vishvananda/netns v0.0.0-20191106174202-0a2b9b5464df // indirect
github.com/vmihailenco/msgpack v4.0.4+incompatible
github.com/vmware/govmomi v0.20.1
go.etcd.io/etcd v0.5.0-alpha.5.0.20191023171146-3cf2f69b5738
go.etcd.io/etcd v0.5.0-alpha.5.0.20200819165624-17cef6e3e9d5
go.uber.org/atomic v1.4.0 // indirect
golang.org/x/crypto v0.0.0-20191206172530-e9b2fee46413
golang.org/x/net v0.0.0-20200226121028-0de0cce0169b
golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9
golang.org/x/net v0.0.0-20200707034311-ab3426394381
golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6
golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e
golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8
golang.org/x/sys v0.0.0-20200622214017-ed371f2e16b4
golang.org/x/text v0.3.3
golang.org/x/tools v0.0.0-20200515220128-d3bf790afa53 // indirect
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543
golang.zx2c4.com/wireguard/wgctrl v0.0.0-20191008142428-8d021180e987
google.golang.org/genproto v0.0.0-20191230161307-f3c370f40bfb
google.golang.org/grpc v1.26.0
google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013
google.golang.org/grpc v1.27.0
gopkg.in/asn1-ber.v1 v1.0.0-20181015200546-f715ec2f112d // indirect
gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 // indirect
gopkg.in/fatih/set.v0 v0.2.1
gopkg.in/inf.v0 v0.9.1 // indirect
gopkg.in/ini.v1 v1.44.0 // indirect
gopkg.in/ldap.v3 v3.0.3
gopkg.in/yaml.v2 v2.2.8
honnef.co/go/tools v0.0.1-2020.1.4 // indirect
k8s.io/api v0.17.3
k8s.io/apimachinery v0.17.3
k8s.io/client-go v9.0.0+incompatible
k8s.io/cluster-bootstrap v0.17.3
k8s.io/kubernetes v1.16.0
yunion.io/x/executor v0.0.0-20200227030256-a18417815e74
k8s.io/api v0.19.3
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/jsonutils v0.0.0-20201110084044-3e4e1cb49769
yunion.io/x/log v0.0.0-20200313080802-57a4ce5966b3
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-20201028134817-3ed15ee169bc
yunion.io/x/pkg v0.0.0-20201123083159-ca3aea986ff2
yunion.io/x/s3cli v0.0.0-20190917004522-13ac36d8687e
yunion.io/x/sqlchemy v0.0.0-20201029091740-cd5e77b56d4b
yunion.io/x/sqlchemy v0.0.0-20210204013753-dbac29c9cedb
yunion.io/x/structarg v0.0.0-20200720093445-9f850fa222ce
)
replace (
github.com/ceph/go-ceph v0.0.0-20181217221554-e32f9f0f2e94 => github.com/yunionio/go-ceph v0.0.0-20190912101231-6f05a06b3859
k8s.io/api => k8s.io/api v0.0.0-20190918155943-95b840bb6a1f
k8s.io/apiextensions-apiserver => k8s.io/apiextensions-apiserver v0.0.0-20190918161926-8f644eb6e783
k8s.io/apimachinery => k8s.io/apimachinery v0.0.0-20190913080033-27d36303b655
k8s.io/apiserver => k8s.io/apiserver v0.0.0-20190918160949-bfa5e2e684ad
k8s.io/cli-runtime => k8s.io/cli-runtime v0.0.0-20190918162238-f783a3654da8
k8s.io/client-go => k8s.io/client-go v0.0.0-20190918160344-1fbdaa4c8d90
k8s.io/cloud-provider => k8s.io/cloud-provider v0.0.0-20190918163234-a9c1f33e9fb9
k8s.io/cluster-bootstrap => k8s.io/cluster-bootstrap v0.0.0-20190918163108-da9fdfce26bb
k8s.io/code-generator => k8s.io/code-generator v0.0.0-20190912054826-cd179ad6a269
k8s.io/component-base => k8s.io/component-base v0.0.0-20190918160511-547f6c5d7090
k8s.io/cri-api => k8s.io/cri-api v0.0.0-20190828162817-608eb1dad4ac
k8s.io/csi-translation-lib => k8s.io/csi-translation-lib v0.0.0-20190918163402-db86a8c7bb21
k8s.io/kube-aggregator => k8s.io/kube-aggregator v0.0.0-20190918161219-8c8f079fddc3
k8s.io/kube-controller-manager => k8s.io/kube-controller-manager v0.0.0-20190918162944-7a93a0ddadd8
k8s.io/kube-proxy => k8s.io/kube-proxy v0.0.0-20190918162534-de037b596c1e
k8s.io/kube-scheduler => k8s.io/kube-scheduler v0.0.0-20190918162820-3b5c1246eb18
k8s.io/kubectl => k8s.io/kubectl v0.0.0-20190918164019-21692a0861df
k8s.io/kubelet => k8s.io/kubelet v0.0.0-20190918162654-250a1838aa2c
k8s.io/legacy-cloud-providers => k8s.io/legacy-cloud-providers v0.0.0-20190918163543-cfa506e53441
k8s.io/metrics => k8s.io/metrics v0.0.0-20190918162108-227c654b2546
k8s.io/node-api => k8s.io/node-api v0.0.0-20190918163711-2299658ad911
k8s.io/sample-apiserver => k8s.io/sample-apiserver v0.0.0-20190918161442-d4c9c65c82af
k8s.io/sample-cli-plugin => k8s.io/sample-cli-plugin v0.0.0-20190918162410-e45c26d066f2
k8s.io/sample-controller => k8s.io/sample-controller v0.0.0-20190918161628-92eb3cb7496c
)
replace github.com/ceph/go-ceph v0.0.0-20181217221554-e32f9f0f2e94 => github.com/yunionio/go-ceph v0.0.0-20190912101231-6f05a06b3859

431
go.sum

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -26,6 +26,7 @@ import (
"yunion.io/x/log"
"yunion.io/x/sqlchemy"
"yunion.io/x/onecloud/pkg/ansibleserver/options"
"yunion.io/x/onecloud/pkg/apis"
api "yunion.io/x/onecloud/pkg/apis/ansible"
"yunion.io/x/onecloud/pkg/cloudcommon/db"
@@ -199,7 +200,8 @@ func (apb *SAnsiblePlaybookV2) runPlaybook(ctx context.Context, userCred mcclien
PrivateKey(privateKey).
Requirements(apb.Requirements).
Files(files).
OutputWriter(&ansiblePlaybookOutputWriter{apb})
OutputWriter(&ansiblePlaybookOutputWriter{apb}).
KeepTmpdir(options.Options.KeepTmpdir)
man.sessions.Add(apb.Id, sess)
// NOTE host state check? run only on online hosts and running guests, skip others

View File

@@ -19,6 +19,7 @@ import common_options "yunion.io/x/onecloud/pkg/cloudcommon/options"
type AnsibleServerOptions struct {
common_options.CommonOptions
common_options.DBOptions
KeepTmpdir bool `help:"Whether to save the tmp directory" json:"keep_tmpdir"`
}
var (

View File

@@ -67,6 +67,7 @@ func (h *AuthHandlers) AddMethods() {
NewHP(h.getIdpSsoRedirectUri, "sso", "redirect", "<idp_id>"),
NewHP(h.listTotpRecoveryQuestions, "recovery"),
NewHP(h.handleSsoLogin, "ssologin"),
NewHP(h.postLogoutHandler, "logout"),
// oidc auth
NewHP(handleOIDCAuth, "oidc", "auth"),
NewHP(handleOIDCConfiguration, "oidc", ".well-known", "openid-configuration"),
@@ -156,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()
@@ -308,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")
}
@@ -500,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)
@@ -559,6 +574,7 @@ func (h *AuthHandlers) doLogin(ctx context.Context, w http.ResponseWriter, req *
func (h *AuthHandlers) postLogoutHandler(ctx context.Context, w http.ResponseWriter, req *http.Request) {
clearAuthCookie(w)
appsrv.DisableClientCache(w)
appsrv.Send(w, "")
}
@@ -984,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
@@ -994,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
@@ -1028,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), "")
@@ -1112,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
}
@@ -1148,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

@@ -82,6 +82,10 @@ type ClouduserCreateInput struct {
// swagger:ignore
ExternalId string `json:"external_id"`
// 是否发送邮件通知(仅设置email不为空生效)
// default: false
Notify bool `json:"notify"`
}
type ClouduserListInput struct {

View File

@@ -17,14 +17,17 @@ package cloudid
import "yunion.io/x/onecloud/pkg/apis"
const (
SAML_PROVIDER_STATUS_AVAILABLE = "available"
SAML_PROVIDER_STATUS_NOT_MATCH = "not_match"
SAML_PROVIDER_STATUS_DELETING = "deleting"
SAML_PROVIDER_STATUS_DELETE_FAILED = "delete_failed"
SAML_PROVIDER_STATUS_UNKNOWN = "unknown"
SAML_PROVIDER_STATUS_CREATING = "creating"
SAML_PROVIDER_STATUS_CREATE_FAILED = "create_failed"
SAML_PROVIDER_STATUS_UNVALIABLE = "unavailable"
SAML_PROVIDER_STATUS_AVAILABLE = "available"
SAML_PROVIDER_STATUS_NOT_MATCH = "not_match"
SAML_PROVIDER_STATUS_DELETING = "deleting"
SAML_PROVIDER_STATUS_DELETE_FAILED = "delete_failed"
SAML_PROVIDER_STATUS_UNKNOWN = "unknown"
SAML_PROVIDER_STATUS_CREATING = "creating"
SAML_PROVIDER_STATUS_CREATE_FAILED = "create_failed"
SAML_PROVIDER_STATUS_UNVALIABLE = "unavailable"
SAML_PROVIDER_STATUS_UPDATE_METADATA = "update_metadata"
SAML_PROVIDER_STATUS_UPDATE_METADATA_FAILED = "update_metadata_failed"
SAML_PROVIDER_STATUS_SYNC = "sync"
)
type SAMLProviderListInput struct {

View File

@@ -18,6 +18,8 @@ import (
"net/http"
"yunion.io/x/pkg/errors"
"yunion.io/x/pkg/util/regutils"
"yunion.io/x/pkg/utils"
"yunion.io/x/onecloud/pkg/apis"
"yunion.io/x/onecloud/pkg/cloudprovider"
@@ -237,6 +239,74 @@ type BucketCORSRuleDeleteInput struct {
Id []string
}
type BucketPolicy struct {
Data []BucketPolicyStatement
}
type BucketPolicyStatement struct {
// 授权的目标主体
Principal map[string][]string `json:"Principal,omitempty"`
// 授权的行为
Action []string `json:"Action,omitempty"`
// Allow|Deny
Effect string `json:"Effect,omitempty"`
// 被授权的资源地址
Resource []string `json:"Resource,omitempty"`
// 触发授权的条件
Condition map[string]map[string]interface{} `json:"Condition,omitempty"`
// 解析字段主账号id:子账号id
PrincipalId []string
// map[主账号id:子账号id]子账号name
PrincipalNames map[string]string
// Read|ReadWrite|FullControl
CannedAction string
// 资源路径
ResourcePath []string
// 根据index 生成
Id string
}
type BucketPolicyStatementInput struct {
// 主账号id:子账号id
PrincipalId []string
// Read|ReadWrite|FullControl
CannedAction string
// Allow|Deny
Effect string
// 被授权的资源地址,/*
ResourcePath []string
// ip 条件
IpEquals []string
IpNotEquals []string
}
func (input *BucketPolicyStatementInput) Validate() error {
cannedAction := []string{"Read", "ReadWrite", "FullControl"}
if !utils.IsInStringArray(input.CannedAction, cannedAction) {
return httperrors.NewInputParameterError("invalid CannedAction %s ", input.CannedAction)
}
if input.Effect != "Allow" && input.Effect != "Deny" {
return httperrors.NewInputParameterError("invalid Effect %s ", input.Effect)
}
for i := range input.IpEquals {
if !regutils.MatchIP4Addr(input.IpEquals[i]) && !regutils.MatchCIDR(input.IpEquals[i]) {
return httperrors.NewInputParameterError("invalid ipv4 %s ", input.IpEquals[i])
}
}
for i := range input.IpNotEquals {
if !regutils.MatchIP4Addr(input.IpNotEquals[i]) && !regutils.MatchCIDR(input.IpNotEquals[i]) {
return httperrors.NewInputParameterError("invalid ipv4 %s ", input.IpNotEquals[i])
}
}
return nil
}
type BucketPolicyDeleteInput struct {
Id []string
}
func (input *BucketCORSRules) Validate() error {
for i := range input.Data {
if len(input.Data[i].AllowedOrigins) == 0 {
@@ -250,19 +320,14 @@ func (input *BucketCORSRules) Validate() error {
}
type BucketRefererConf struct {
// 是否开启防盗链
Enabled bool
// Black-List、White-List
Type string
// 域名列表
DomainList []string
// 是否允许空refer 访问
// 白名单域名列表
WhiteList []string
// 黑名单域名列表
BlackList []string
// 是否允许空referer 访问
AllowEmptyRefer bool
}
func (input *BucketRefererConf) Validate() error {
if len(input.DomainList) == 0 {
return httperrors.NewMissingParameterError("domain_list")
}
return nil
}

View File

@@ -17,7 +17,7 @@ package compute
import "yunion.io/x/onecloud/pkg/apis"
type CachedLoadbalancerAclDetails struct {
apis.SharableVirtualResourceDetails
apis.VirtualResourceDetails
CloudregionResourceInfo
ManagedResourceInfo
@@ -25,7 +25,7 @@ type CachedLoadbalancerAclDetails struct {
}
type CachedLoadbalancerAclListInput struct {
apis.SharableVirtualResourceListInput
apis.VirtualResourceListInput
RegionalFilterListInput
ManagedResourceListInput
LoadbalancerAclFilterListInput

View File

@@ -319,6 +319,8 @@ type CloudaccountUpdateInput struct {
// 带删除的options key
RemoveOptions []string `json:"remove_options"`
SAMLAuth *bool `json:"saml_auth"`
proxyapi.ProxySettingResourceInput
}
@@ -332,9 +334,16 @@ type CloudaccountPerformPublicInput struct {
type CloudaccountPerformPrepareNetsInput struct {
CloudaccountCreateInput
// enum: vcenter,datacenter,cluster
WireLevelForVmware string `json:"wire_level_for_vmware"`
}
type CloudaccountPerformPrepareNetsOutput struct {
CAWireNets []CAWireNet `json:"wire_networks"`
}
type CAWireNet struct {
SuggestedWire CAWireConf `json:"suggested_wire"`
SuitableWire string `json:"suitable_wire,allowempty"`
Hosts []CAHostNet `json:"hosts"`

View File

@@ -61,6 +61,10 @@ const (
ZSTACK_BRAND_DSTACK = "DStack"
ONECLOUD_BRAND_ONECLOUD = "OneCloud"
CLOUD_ACCOUNT_WIRE_LEVEL_VCENTER = "vcenter"
CLOUD_ACCOUNT_WIRE_LEVEL_DATACENTER = "datacenter"
CLOUD_ACCOUNT_WIRE_LEVEL_CLUSTER = "cluster"
)
const (
@@ -80,7 +84,7 @@ const (
var (
CLOUD_PROVIDER_VALID_STATUS = []string{CLOUD_PROVIDER_CONNECTED}
CLOUD_PROVIDER_VALID_HEALTH_STATUS = []string{CLOUD_PROVIDER_HEALTH_NORMAL, CLOUD_PROVIDER_HEALTH_NO_PERMISSION}
PRIVATE_CLOUD_PROVIDERS = []string{CLOUD_PROVIDER_ZSTACK, CLOUD_PROVIDER_OPENSTACK}
PRIVATE_CLOUD_PROVIDERS = []string{CLOUD_PROVIDER_ZSTACK, CLOUD_PROVIDER_OPENSTACK, CLOUD_PROVIDER_APSARA}
CLOUD_PROVIDERS = []string{
CLOUD_PROVIDER_ONECLOUD,
@@ -119,4 +123,37 @@ var (
CLOUD_ACCOUNT_SHARE_MODE_SYSTEM,
CLOUD_ACCOUNT_SHARE_MODE_PROVIDER_DOMAIN,
}
CLOUD_ENV_MAP = map[string]map[string]string{
CLOUD_PROVIDER_AZURE: map[string]string{
"AzureGermanCloud": CLOUD_ACCESS_ENV_AZURE_GERMAN,
"AzureChinaCloud": CLOUD_ACCESS_ENV_AZURE_CHINA,
"AzureUSGovernmentCloud": CLOUD_ACCESS_ENV_AZURE_US_GOVERNMENT,
"AzurePublicCloud": CLOUD_ACCESS_ENV_AZURE_GLOBAL,
},
CLOUD_PROVIDER_AWS: map[string]string{
"InternationalCloud": CLOUD_ACCESS_ENV_AWS_GLOBAL,
"ChinaCloud": CLOUD_ACCESS_ENV_AWS_CHINA,
},
CLOUD_PROVIDER_HUAWEI: map[string]string{
"InternationalCloud": CLOUD_ACCESS_ENV_HUAWEI_GLOBAL,
"ChinaCloud": CLOUD_ACCESS_ENV_HUAWEI_CHINA,
},
CLOUD_PROVIDER_ALIYUN: map[string]string{
"InternationalCloud": CLOUD_PROVIDER_ALIYUN,
"FinanceCloud": CLOUD_ACCESS_ENV_ALIYUN_FINANCE,
},
}
)
func GetCloudEnv(provider, accessUrl string) string {
envMap, ok := CLOUD_ENV_MAP[provider]
if !ok {
return provider
}
env, ok := envMap[accessUrl]
if !ok {
return provider
}
return env
}

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" // 圣地亚哥

View File

@@ -294,6 +294,8 @@ type DBInstanceDetails struct {
SDBInstance
Secgroups []apis.StandaloneShortDesc `json:"secgroups"`
// 安全组名称
// example: Default
Secgroup string `json:"secgroup"`
@@ -368,3 +370,7 @@ type DBInstanceAutoRenewInput struct {
// 是否自动续费
AutoRenew bool `json:"auto_renew"`
}
type DBInstanceSetSecgroupInput struct {
SecgroupIds []string `json:"secgroup_ids"`
}

View File

@@ -92,3 +92,7 @@ type DBInstanceAccountDetails struct {
ProjectId string `json:"tenant_id"`
}
type DBInstanceAccountUpdateInput struct {
apis.StatusStandaloneResourceBaseUpdateInput
}

View File

@@ -36,6 +36,7 @@ const (
DBINSTANCE_SET_AUTO_RENEW = "set_auto_renew" //设置自动续费中
DBINSTANCE_SET_AUTO_RENEW_FAILED = "set_auto_renew_failed" //设置自动续费失败
DBINSTANCE_UNKNOWN = "unknown"
DBINSTANCE_SYNC_SECGROUP_FAILED = "sync_secgroup_failed" // 同步安全组失败
DBINSTANCE_CHANGE_CONFIG = "change_config" //调整配置
DBINSTANCE_CHANGE_CONFIG_FAILED = "change_config_failed" //调整配置失败

View File

@@ -80,3 +80,7 @@ type DBInstanceparameterDetails struct {
SDBInstanceParameter
}
type DBInstanceDatabaseUpdateInput struct {
apis.StatusStandaloneResourceBaseUpdateInput
}

View File

@@ -21,6 +21,10 @@ type DBInstanceSkuDetails struct {
CloudregionResourceInfo
SDBInstanceSku
// 云环境
CloudEnv string `json:"cloud_env"`
Zone1Name string `json:"zone1_name"`
Zone2Name string `json:"zone2_name"`
Zone3Name string `json:"zone3_name"`

View File

@@ -105,6 +105,7 @@ type SnapshotPolicyFilterListInput struct {
type DiskListInput struct {
apis.VirtualResourceListInput
apis.ExternalizedResourceBaseListInput
apis.MultiArchResourceBaseListInput
billing.BillingResourceListInput
StorageFilterListInput

View File

@@ -23,4 +23,7 @@ type ElasticcacheSkuDetails struct {
SlaveZoneResourceInfoBase
SElasticcacheSku
// 云环境
CloudEnv string `json:"cloud_env"`
}

View File

@@ -67,6 +67,8 @@ type SElasticipCreateInput struct {
// 子网Id
// 私有云创建此参数必传,例如Openstack, ZStack
NetworkId string `json:"network_id"`
// 指定新建EIP的地址
IpAddr string `json:"ip_addr"`
// description: BgpType for the new eip
BgpType string `json:"bgp_type"`

View File

@@ -42,7 +42,6 @@ const (
EIP_CHARGE_TYPE_BY_TRAFFIC = "traffic"
EIP_CHARGE_TYPE_BY_BANDWIDTH = "bandwidth"
EIP_CHARGE_TYPE_DEFAULT = EIP_CHARGE_TYPE_BY_TRAFFIC
)
var (

View File

@@ -25,6 +25,7 @@ type ServerListInput struct {
apis.VirtualResourceListInput
apis.ExternalizedResourceBaseListInput
apis.DeletePreventableResourceBaseListInput
apis.MultiArchResourceBaseListInput
HostFilterListInput
@@ -41,6 +42,11 @@ type ServerListInput struct {
Baremetal *bool `json:"baremetal"`
// 只列出GPU主机
Gpu *bool `json:"gpu"`
// 只列出还有备份机的主机
Backup *bool `json:"bakcup"`
// 列出指定类型的主机
// enum: normal,gpu,backup
ServerType string `json:"server_type"`
// 列出管理安全组为指定安全组的主机
AdminSecgroup string `json:"admin_security"`
// 列出Hypervisor为指定值的主机
@@ -48,8 +54,10 @@ type ServerListInput struct {
Hypervisor []string `json:"hypervisor"`
// 列出绑定了弹性IPEIP的主机
WithEip *bool `json:"with_eip"`
// 列出未绑定弹性IPEIO)的主机
// 列出未绑定弹性IPEIP)的主机
WithoutEip *bool `json:"without_eip"`
// 列出可绑定弹性IP的主机
EipAssociable *bool `json:"eip_associable"`
// 列出操作系统为指定值的主机
// enum: linux,windows,vmware
OsType []string `json:"os_type"`
@@ -211,6 +219,8 @@ type ServerDetails struct {
Vpc string `json:"vpc"`
// 归属VPC ID
VpcId string `json:"vpc_id"`
// Vpc外网访问模式
VpcExternalAccessMode string `json:"vpc_external_access_mode"`
// 关联安全组列表
Secgroups []apis.StandaloneShortDesc `json:"secgroups"`
@@ -362,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 {

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
@@ -120,6 +122,8 @@ type HostListInput struct {
BootMode []string `json:"boot_mode"`
// 虚拟机所在的二层网络
ServerIdForNetwork string `json:"server_id_for_network"`
// 宿主机 cpu 架构
CpuArchitecture string `json:"cpu_architecture"`
}
type HostDetails struct {

View File

@@ -59,6 +59,8 @@ type InstanceSnapshotDetails struct {
type InstanceSnapshotListInput struct {
apis.VirtualResourceListInput
apis.ExternalizedResourceBaseListInput
apis.MultiArchResourceBaseListInput
ManagedResourceListInput
ServerFilterListInput

View File

@@ -37,11 +37,11 @@ type LoadbalancerListenerListInput struct {
apis.VirtualResourceListInput
apis.ExternalizedResourceBaseListInput
LoadbalancerFilterListInput
// filter by acl
LoadbalancerAclResourceInput
// filter by backend_group
BackendGroup string `json:"backend_group"`
// filter by acl
Acl string `json:"acl"`
ListenerType []string `json:"listener_type"`
ListenerPort []int `json:"listener_port"`
@@ -104,7 +104,7 @@ type LoadbalancerAgentListInput struct {
}
type LoadbalancerCertificateListInput struct {
apis.VirtualResourceListInput
apis.SharableVirtualResourceListInput
apis.ExternalizedResourceBaseListInput
UsableResourceListInput

View File

@@ -22,6 +22,8 @@ type LoadbalancerAclDetails struct {
CloudregionResourceInfo
SLoadbalancerAcl
LbListenerCount int `json:"lb_listener_count"`
}
type LoadbalancerAclResourceInfo struct {

View File

@@ -17,8 +17,10 @@ package compute
import "yunion.io/x/onecloud/pkg/apis"
type LoadbalancerCertificateDetails struct {
apis.VirtualResourceDetails
apis.SharableVirtualResourceDetails
SLoadbalancerCertificate
LbListenerCount int `json:"lb_listener_count"`
}
type LoadbalancerCertificateResourceInfo struct {

View File

@@ -334,7 +334,7 @@ type GetNetworkAddressesInput struct {
type GetNetworkAddressesOutput struct {
// IP子网地址记录
Addresses []SNetworkAddress `json:"addresses"`
Addresses []SNetworkUsedAddress `json:"addresses"`
}
type NetworkSetBgpTypeInput struct {

View File

@@ -62,6 +62,7 @@ var (
CLOUD_PROVIDER_CTYUN,
CLOUD_PROVIDER_UCLOUD,
CLOUD_PROVIDER_GOOGLE,
CLOUD_PROVIDER_OPENSTACK,
}
)
@@ -75,7 +76,7 @@ const (
IPAllocationDefault = ""
)
type SNetworkAddress struct {
type SNetworkUsedAddress struct {
IpAddr string
MacAddr string
Owner string

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