Compare commits

...

1200 Commits

Author SHA1 Message Date
Zexi Li
e0acd0fc01 Merge pull request #12897 from ioito/automated-cherry-pick-of-#12893-upstream-release-3.5
Automated cherry pick of #12893: fix(region): openstack use proxy
2021-12-14 21:08:59 +08:00
ioito
c698cf6dfa fix(region): openstack use proxy 2021-12-14 14:35:05 +08:00
yunion-ci-robot
2842284c7d Merge pull request #12188 from ioito/automated-cherry-pick-of-#12184-upstream-release-3.5
Automated cherry pick of #12184: fix(region): qcloud database sync
2021-09-10 19:30:29 +08:00
Zexi Li
ae5cecb6f3 Merge pull request #12180 from ioito/automated-cherry-pick-of-#12176-upstream-release-3.5
Automated cherry pick of #12176: fix(region): huawei region id with project name
2021-09-10 19:09:27 +08:00
Qu Xuan
f93b4ef6fc fix(region): qcloud database sync 2021-09-10 18:35:39 +08:00
Qu Xuan
92503db52a fix(region): 不能通过华为云用户创建时间判断云账号注册时间 2021-09-10 17:19:30 +08:00
Qu Xuan
cd455545d2 fix(region): huawei region id with project name 2021-09-10 17:19:08 +08:00
Zexi Li
b86d0ceffd Merge pull request #12013 from ioito/automated-cherry-pick-of-#12009-upstream-release-3.5
Automated cherry pick of #12009: fix(region): aliyun rds network sync
2021-08-25 20:19:10 +08:00
Qu Xuan
fdb9e20c64 fix(region): aliyun rds network sync 2021-08-25 18:56:29 +08:00
Zexi Li
c7cc8181f2 Merge pull request #11957 from ioito/automated-cherry-pick-of-#11954-upstream-release-3.5
Automated cherry pick of #11954: fix(region): sync with multi worker
2021-08-19 16:12:08 +08:00
Qu Xuan
a52f90cf56 fix(region): sync with multi worker 2021-08-19 15:37:50 +08:00
Zexi Li
8e543365ed Merge pull request #11886 from ioito/automated-cherry-pick-of-#11883-upstream-release-3.5
Automated cherry pick of #11883: fix(region): azure vm disk size
2021-08-12 21:03:42 +08:00
Qu Xuan
76101bf1bd fix(region): azure vm disk size 2021-08-12 20:39:41 +08:00
Zexi Li
96448eb289 Merge pull request #11836 from ioito/automated-cherry-pick-of-#11832-upstream-release-3.5
Automated cherry pick of #11832: fix(region): sync openstack multi zone storages
2021-08-07 14:29:45 +08:00
Qu Xuan
53c65c317f fix(region): sync openstack multi zone storages 2021-08-06 16:16:45 +08:00
Zexi Li
f8618b8732 Merge pull request #11811 from ioito/automated-cherry-pick-of-#11808-upstream-release-3.5
Automated cherry pick of #11808: fix(region): avoid get openstack hostid panic
2021-08-05 17:18:41 +08:00
Qu Xuan
d2f5acc1ce fix(region): avoid get openstack hostid panic 2021-08-05 14:20:36 +08:00
Zexi Li
0e9f95358b Merge pull request #11764 from rainzm/automated-cherry-pick-of-#11761-upstream-release-3.5
Automated cherry pick of #11761: fix: avoid double counting when compute networks nic count
2021-07-31 11:38:44 +08:00
rainzm
74038e6afb fix: avoid double counting when compute networks nic count 2021-07-30 20:08:46 +08:00
Zexi Li
d967dc80af Merge pull request #11723 from ioito/automated-cherry-pick-of-#11720-upstream-release-3.5
Automated cherry pick of #11720: fix(region): openstack ip pre allocate
2021-07-26 18:44:09 +08:00
Qu Xuan
9d65c20acd fix(region): openstack ip pre allocate 2021-07-26 15:28:55 +08:00
Zexi Li
da8f024041 Merge pull request #11718 from ioito/automated-cherry-pick-of-#11715-upstream-release-3.5
Automated cherry pick of #11715: fix(region): cpu desc too long
2021-07-26 14:36:14 +08:00
Qu Xuan
e6f32bb362 fix(region): cpu desc too long 2021-07-26 10:06:49 +08:00
Zexi Li
6d02364baa Merge pull request #11710 from ioito/automated-cherry-pick-of-#11707-upstream-release-3.5
Automated cherry pick of #11707: fix(region): update qcloud secgroup rule
2021-07-23 18:22:36 +08:00
Qu Xuan
627fb431c3 fix(region): update qcloud secgroup rule 2021-07-23 17:36:04 +08:00
Zexi Li
35749863f1 Merge pull request #11704 from ioito/automated-cherry-pick-of-#11701-upstream-release-3.5
Automated cherry pick of #11701: fix(region): azure quota sync
2021-07-23 14:22:30 +08:00
Zexi Li
f3181c842e Merge pull request #11706 from ioito/hotfix/qx-sec-sync
fix(region): v3.5 sec group fix
2021-07-23 14:20:42 +08:00
Qu Xuan
9361d9e570 fix(region): v3.5 sec group fix 2021-07-23 14:11:52 +08:00
Qu Xuan
ab508e0377 fix(region): azure quota sync 2021-07-22 19:36:11 +08:00
Zexi Li
6a2183f0fd Merge pull request #11677 from ioito/automated-cherry-pick-of-#11674-upstream-release-3.5
Automated cherry pick of #11674: fix(region): rds network sync
2021-07-20 21:14:13 +08:00
Qu Xuan
5ce6350055 fix(region): return rds networks info 2021-07-19 17:31:16 +08:00
Qu Xuan
48430eb37c fix(region): rds network sync 2021-07-19 17:31:16 +08:00
Zexi Li
6de175f4d3 Merge pull request #11670 from ioito/automated-cherry-pick-of-#11667-upstream-release-3.5
Automated cherry pick of #11667: fix(keystone): avoid sql error
2021-07-19 14:22:10 +08:00
Qu Xuan
507967d6dd fix(keystone): avoid sql error 2021-07-19 14:06:32 +08:00
Zexi Li
504d57929f Merge pull request #11656 from ioito/automated-cherry-pick-of-#11274-upstream-release-3.5
Automated cherry pick of #11274: fix(region): disable public cloud ip pre allocate
2021-07-15 17:26:05 +08:00
Qu Xuan
adfa1431a7 fix(region): disable public cloud ip pre allocate 2021-07-15 17:06:28 +08:00
yunion-ci-robot
002e433298 Merge pull request #11533 from ioito/automated-cherry-pick-of-#11530-upstream-release-3.5
Automated cherry pick of #11530: fix(webconsole): aliyun vnc windows ctl+alt+del
2021-06-30 23:58:12 +08:00
Qu Xuan
d948d60262 fix(webconsole): aliyun vnc windows ctl+alt+del 2021-06-30 21:04:59 +08:00
Zexi Li
aa491e1a03 Merge pull request #11512 from rainzm/automated-cherry-pick-of-#11509-upstream-release-3.5
Automated cherry pick of #11509: fix: get datacenter of host via GetDatacenter
2021-06-28 19:35:52 +08:00
rainzm
4d56241ddd fix: get datacenter of host via GetDatacenter 2021-06-28 18:18:10 +08:00
Zexi Li
4249aa3bdb Merge pull request #11497 from rainzm/automated-cherry-pick-of-#11496-upstream-release-3.5
Automated cherry pick of #11496: fix: Remove the nat gateway when computing network usage
2021-06-28 13:12:32 +08:00
rainzm
93fcbf0bf6 fix: Remove the nat gateway when computing network usage 2021-06-28 12:32:16 +08:00
Zexi Li
734df72154 Merge pull request #10971 from rainzm/automated-cherry-pick-of-#10970-upstream-release-3.5
Automated cherry pick of #10970: feat(scheduler): optimize the speed of network predicate
2021-06-25 18:28:02 +08:00
rainzm
c022bb2829 feat: add interface INetworkNicCountGetter 2021-06-25 16:00:19 +08:00
rainzm
4511fc39ba feat(scheduler): optimize the speed of network predicate 2021-06-25 16:00:19 +08:00
Zexi Li
2940581ea4 Merge pull request #11476 from rainzm/region/sync_faster_v3.5
Sync VMware resource faster For v3.5
2021-06-24 10:02:13 +08:00
rainzm
6aca7bfe12 feat(esxi): reduce the number of requests and the amount of data transferred 2021-06-23 17:10:47 +08:00
rainzm
4abe94dfc1 feat(region): add ProhibitRefreshingCloudImage for options 2021-06-23 17:10:47 +08:00
Zexi Li
982eed6d34 Merge pull request #11466 from ioito/automated-cherry-pick-of-#11463-upstream-release-3.5
Automated cherry pick of #11463: fix(hostman): show server status changed reason
2021-06-23 10:53:38 +08:00
Qu Xuan
4f4be386e5 fix(hostman): show server status changed reason 2021-06-22 17:57:16 +08:00
Zexi Li
a3c02cb76b Merge pull request #11405 from ioito/automated-cherry-pick-of-#11404-upstream-release-3.5
Automated cherry pick of #11404: fix(region): ignore qcloud bw pkg error
2021-06-16 20:09:53 +08:00
Zexi Li
35fdde9eb0 Merge pull request #11409 from yousong/automated-cherry-pick-of-#11406-upstream-release-3.5
Automated cherry pick of #11406: webconsole: wait zombies
2021-06-16 20:09:11 +08:00
Yousong Zhou
6d51dab0a3 webconsole: wait zombies 2021-06-16 19:34:42 +08:00
Yousong Zhou
a6d6155217 Merge pull request #11270 from yousong/automated-cherry-pick-of-#10849-upstream-release-3.5
Automated cherry pick of #10849: Feature/yousong zombie
2021-06-16 19:30:11 +08:00
Qu Xuan
3d0517fcee fix(region): ignore qcloud bw pkg error 2021-06-16 18:19:10 +08:00
Zexi Li
18bd3c02d2 Merge pull request #11395 from ioito/automated-cherry-pick-of-#11376-upstream-release-3.5
Automated cherry pick of #11376: fix(region): qcloud bandwidth pkg
2021-06-15 16:29:51 +08:00
Qu Xuan
c0674fd947 fix(region): qcloud bandwidth pkg 2021-06-11 19:18:35 +08:00
Zexi Li
5c1026c6ad Merge pull request #11344 from ioito/automated-cherry-pick-of-#11340-upstream-release-3.5
Automated cherry pick of #11340: fix(cloudid): huawei group role attach and detach
2021-06-08 23:15:23 +08:00
Zexi Li
38ff8d1ee1 Merge pull request #11352 from ioito/automated-cherry-pick-of-#11349-upstream-release-3.5
Automated cherry pick of #11349: fix(cloudid): avoid duplicate create saml provider
2021-06-08 23:14:08 +08:00
Zexi Li
767f9a84fc Merge pull request #11360 from ioito/automated-cherry-pick-of-#11359-upstream-release-3.5
Automated cherry pick of #11359: fix(region): avoid update storage conf not work
2021-06-08 23:09:50 +08:00
Zexi Li
e52ed0eb7a Merge pull request #11364 from ioito/automated-cherry-pick-of-#11361-upstream-release-3.5
Automated cherry pick of #11361: fix(region): validate disk status when create snapshot
2021-06-08 23:08:28 +08:00
Qu Xuan
81017e384d fix(region): validate disk status when create snapshot 2021-06-08 20:09:56 +08:00
Qu Xuan
3a6f4a18a7 fix(region): avoid update storage conf not work 2021-06-08 17:47:06 +08:00
Qu Xuan
315394dd26 fix(cloudid): avoid duplicate create saml provider 2021-06-08 14:20:18 +08:00
Qu Xuan
8a05092aff fix(cloudid): huawei group role attach and detach 2021-06-07 18:18:57 +08:00
Zexi Li
3e9c09ab73 Merge pull request #11302 from swordqiu/automated-cherry-pick-of-#11299-upstream-release-3.5
Automated cherry pick of #11299: fix: hpssacli should skip empty slots
2021-06-04 21:04:39 +08:00
Qiu Jian
bb8186c6f8 fix: hpssacli should skip empty slots
hpssacli may fail when detect disks on empty slots, which cause raid
detection failure
2021-06-03 19:37:29 +08:00
Zexi Li
2d10a913aa Merge pull request #11286 from ioito/hotfix/qx-avoid-region-restart
fix(region): avoid region service restart
2021-06-03 11:44:03 +08:00
Qu Xuan
4cc2a61412 fix(region): avoid region service restart 2021-06-02 19:59:17 +08:00
Zexi Li
a57471559a Merge pull request #11278 from swordqiu/automated-cherry-pick-of-#11268-upstream-release-3.5
Automated cherry pick of #11268: fix: windows resize file system
2021-06-01 11:55:20 +08:00
Qiu Jian
55ee0705ef fix: windows resize file system 2021-06-01 00:02:23 +08:00
Yousong Zhou
0b8988a1ff treewide: wait possible zombies 2021-05-31 10:16:31 +08:00
Yousong Zhou
941f502960 procutils: WaitZombieLoop: remove unneeded info request 2021-05-31 10:16:31 +08:00
Yousong Zhou
d7dcb74588 procutils: WaitZombieLoop: less verbose iota 2021-05-31 10:16:31 +08:00
Yousong Zhou
1273eff885 procutils: WaitZombieLoop: use const str "1" for my pid 2021-05-31 10:16:31 +08:00
Yousong Zhou
0a2f146916 procutils: add WaitZombieLoop 2021-05-31 10:16:31 +08:00
Zexi Li
a8fa976a66 Merge pull request #11248 from swordqiu/automated-cherry-pick-of-#11245-upstream-release-3.5
Automated cherry pick of #11245: fix: get apigateway auth/regions with error of illegal mix of collations
2021-05-28 15:43:43 +08:00
Qiu Jian
fe0f75f4ad fix: get apigateway auth/regions with error of illegal mix of collations 2021-05-28 09:40:47 +08:00
Zexi Li
3c72949d6c Merge pull request #11222 from ioito/automated-cherry-pick-of-#11219-upstream-release-3.5
Automated cherry pick of #11219: fix(host): avoid delete removed disk failed
2021-05-26 14:22:09 +08:00
Qu Xuan
3a65028e79 fix(host): avoid delete removed disk failed 2021-05-25 21:03:04 +08:00
Zexi Li
ecb9a97b0c Merge pull request #11204 from ioito/automated-cherry-pick-of-#11201-upstream-release-3.5
Automated cherry pick of #11201: fix(region): show azure deploy failed error
2021-05-25 19:09:02 +08:00
Qu Xuan
e3f8bf83be fix(region): show azure deploy failed error 2021-05-25 10:35:43 +08:00
Zexi Li
eeea4eaaa9 Merge pull request #11197 from ioito/automated-cherry-pick-of-#11196-upstream-release-3.5
Automated cherry pick of #11196: fix(cloudid): avoid location missing api-version
2021-05-24 18:17:33 +08:00
Qu Xuan
c7b53299cd fix(cloudid): avoid location missing api-version 2021-05-24 16:04:48 +08:00
Zexi Li
903e268164 Merge pull request #11182 from zhaoxiangchun/feature/zxc-tk-3.5
fix(monitor): 3.5 monitor query throw err when select domain or project
2021-05-24 10:16:11 +08:00
zhaoxiangchun
7521d164fa fix(monitor): 3.5 monitor query throw err when select domain or project 2021-05-21 12:33:49 +08:00
Zexi Li
c9be943a5f Merge pull request #11026 from zhaoxiangchun/automated-cherry-pick-of-#11025-upstream-release-3.5
Automated cherry pick of #11025: feat(monitor): add storage monitor metric
2021-05-20 09:54:18 +08:00
Zexi Li
eccc9d8556 Merge pull request #11163 from ioito/automated-cherry-pick-of-#11160-upstream-release-3.5
Automated cherry pick of #11160: fix(region): check sku request error
2021-05-19 23:31:43 +08:00
Qu Xuan
cfb951ad76 fix(region): check sku request error 2021-05-19 19:27:32 +08:00
Zexi Li
510a4a98e6 Merge pull request #11157 from ioito/automated-cherry-pick-of-#11154-upstream-release-3.5
Automated cherry pick of #11154: fix(region): avoid azure secgroup sync removed
2021-05-19 17:41:31 +08:00
Qu Xuan
e8f8b88104 fix(region): avoid azure secgroup sync removed 2021-05-19 15:58:39 +08:00
Zexi Li
f44098a191 Merge pull request #11151 from rainzm/automated-cherry-pick-of-#11150-upstream-release-3.5
Automated cherry pick of #11150: feat(ansible): add rolePublic and timeout options
2021-05-19 15:23:42 +08:00
rainzm
51a88c018d feat(ansible): add rolePublic and timeout options 2021-05-19 11:36:02 +08:00
Zexi Li
fd891c1a24 Merge pull request #11137 from ioito/automated-cherry-pick-of-#11134-upstream-release-3.5
Automated cherry pick of #11134: fix(cloudid): clouduser use default domain
2021-05-18 15:56:51 +08:00
Qu Xuan
ac2e3fbe9f fix(cloudid): clouduser use default domain 2021-05-18 15:20:47 +08:00
Zexi Li
c20b02f73e Merge pull request #11129 from rainzm/automated-cherry-pick-of-#11126-upstream-release-3.5
Automated cherry pick of #11126: fix(region): check whether the disks of the instance snapshot is empty when creating vm
2021-05-17 22:36:31 +08:00
rainzm
05aaf7d721 fix(region): check whether the disks of the instance snapshot is empty when creating vm 2021-05-17 17:29:34 +08:00
Zexi Li
b5add4df46 Merge pull request #11104 from ioito/automated-cherry-pick-of-#11101-upstream-release-3.5
Automated cherry pick of #11101: fix(region): optimized server sku sku
2021-05-17 10:08:30 +08:00
Zexi Li
19cc8ae952 Merge pull request #11118 from rainzm/automated-cherry-pick-of-#11116-upstream-release-3.5
Automated cherry pick of #11116: webhook fix
2021-05-17 10:07:34 +08:00
Zexi Li
88f3218fb1 Merge pull request #11110 from rainzm/esxi/copydisk35
Automated cherry pick of #11107: fix(esxiagent): make the copied disk type as thin
2021-05-17 10:07:13 +08:00
rainzm
99e6bcee17 fix(region): send webhook when the creation task is completely completed 2021-05-14 17:06:33 +08:00
rainzm
6f36f27e2f fix(region): send webhook notification when delete dbinstance 2021-05-14 17:06:33 +08:00
rainzm
ab04d59e1c fix(esxiagent): make the copied disk type as thin …
磁盘首选精简制备,但是copy disk默认是预分配,所以需要特别指定为
精简制备
2021-05-14 15:16:49 +08:00
Qu Xuan
fdf9896ca6 fix(region): optimized server sku sku 2021-05-13 20:59:11 +08:00
Zexi Li
4e062ed64f Merge pull request #11100 from ioito/automated-cherry-pick-of-#11097-upstream-release-3.5
Automated cherry pick of #11097: fix(region): allow update sku status
2021-05-13 20:28:06 +08:00
Qu Xuan
fa901e3df4 fix(region): allow update sku status 2021-05-13 19:46:16 +08:00
Zexi Li
d8d9c22c84 Merge pull request #11035 from ioito/automated-cherry-pick-of-#11032-upstream-release-3.5
Automated cherry pick of #11032: fix(region): aliyun vpc endpoint
2021-05-13 18:51:56 +08:00
Zexi Li
a90de9a378 Merge pull request #11056 from ioito/automated-cherry-pick-of-#11053-upstream-release-3.5
Automated cherry pick of #11053: fix(region): optimized sku sched clear
2021-05-13 18:50:45 +08:00
Qu Xuan
bca779b703 fix(region): optimized sku sched clear 2021-05-13 11:09:06 +08:00
Qu Xuan
59a667e547 fix(region): aliyun vpc endpoint 2021-05-12 16:30:56 +08:00
Zexi Li
0e519a53a2 Merge pull request #11038 from rainzm/sp/context
fix(region): add context for syncCloudproviderRegions
2021-05-12 12:01:13 +08:00
rainzm
ae43080caa fix(region): add context for syncCloudproviderRegions 2021-05-11 18:05:08 +08:00
zhaoxiangchun
58ff997fff Delete alertquery_const.go 2021-05-10 16:35:33 +08:00
zhaoxiangchun
d1ca3922fd feat(monitor): add storage monitor metric
1.增加块存储storage监控信息:
  1)增加对应翻译信息
  2)监控信息和modules.Strorages接口进行交集取值
  3)返回信息处理
2021-05-10 16:31:28 +08:00
Zexi Li
fec84e57cb Merge pull request #10999 from rainzm/automated-cherry-pick-of-#10996-upstream-release-3.5
Automated cherry pick of #10996: fix(region): continue to sync the snapshots that are being created when syncing auto created snapshot
2021-05-10 12:05:55 +08:00
Zexi Li
76119bf4e9 Merge pull request #11003 from ioito/automated-cherry-pick-of-#11000-upstream-release-3.5
Automated cherry pick of #11000: fix(region): wire sql fix
2021-05-08 16:10:25 +08:00
Qu Xuan
20d6881a87 fix(region): wire sql fix 2021-05-08 15:50:12 +08:00
rainzm
85233525d1 fix(region): continue to sync the snapshots that are being created when syncing auto created snapshot 2021-05-08 11:10:41 +08:00
Zexi Li
c279b90a3f Merge pull request #10959 from ioito/automated-cherry-pick-of-#10956-upstream-release-3.5
Automated cherry pick of #10956: fix: avoid host worker is locked when image cache is deleted
2021-04-28 09:56:22 +08:00
Qu Xuan
13df278879 fix: avoid host worker is locked when image cache is deleted 2021-04-27 20:38:54 +08:00
Zexi Li
a218e1a385 Merge pull request #10946 from zexi/automated-cherry-pick-of-#10941-upstream-release-3.5
Automated cherry pick of #10941: fix(region): download cached image from source host before migrating
2021-04-27 20:09:30 +08:00
Zexi Li
b7305ad628 Merge pull request #10951 from ioito/automated-cherry-pick-of-#10944-upstream-release-3.5
Automated cherry pick of #10944: fix(region): tag list key case insensitive
2021-04-27 17:21:21 +08:00
Zexi Li
c1803b9ede fix(region): download cached image from source host before migrating 2021-04-27 17:15:37 +08:00
Qu Xuan
accb658173 fix(region): tag list key case insensitive 2021-04-27 14:07:03 +08:00
Zexi Li
473721ccfd Merge pull request #10931 from ioito/automated-cherry-pick-of-#10928-upstream-release-3.5
Automated cherry pick of #10928: fix(region): account arrears
2021-04-26 19:08:31 +08:00
Qu Xuan
f4910c477c fix(region): account arrears 2021-04-26 18:03:42 +08:00
Zexi Li
8b7dd45342 Merge pull request #10909 from rainzm/automated-cherry-pick-of-#10906-upstream-release-3.5
Automated cherry pick of #10906: fix(region): use special localtask to run time-consuming provider synchronization task
2021-04-23 17:39:30 +08:00
rainzm
8eb96c880f fix(region): use special localtask to run time-consuming provider synchronization task
CloudProviderSyncInfoTask will local cloudprovider. Make locaktask run
time-consuming task can avoid holding locks for a long time.
2021-04-23 17:04:18 +08:00
Zexi Li
f0c0171646 Merge pull request #10874 from rainzm/automated-cherry-pick-of-#10873-upstream-release-3.5
Automated cherry pick of #10873: Support direct detection and creation of network for vmware
2021-04-22 21:10:32 +08:00
Zexi Li
6aa4a81a11 Merge pull request #10896 from rainzm/automated-cherry-pick-of-#10893-upstream-release-3.5
Automated cherry pick of #10893: fix(region): allow owner to operate snapshotpolicy cache
2021-04-22 21:09:48 +08:00
Zexi Li
61cd35c9ce Merge pull request #10900 from rainzm/automated-cherry-pick-of-#10897-upstream-release-3.5
Automated cherry pick of #10897: fix(region): make SScheduledTaskLabel implement IJointModelManager
2021-04-22 21:08:44 +08:00
rainzm
153aa13508 fix(region): make SScheduledTaskLabel implement IJointModelManager 2021-04-22 18:22:48 +08:00
rainzm
e0f8f5a4b5 feat(region): support to specify zone for the created wire 2021-04-22 17:59:17 +08:00
rainzm
452ef870bd fix(region): Refuse to recommend the corresponding network for the ip that crosses the limit 2021-04-22 17:59:17 +08:00
rainzm
1176fcd902 feat(region): support creating a network with a native vmware network name 2021-04-22 17:59:17 +08:00
rainzm
959813e50c fix(region): allow owner to operate snapshotpolicy cache 2021-04-22 17:39:45 +08:00
Zexi Li
9bdcac51da Merge pull request #10887 from ioito/automated-cherry-pick-of-#10882-upstream-release-3.5
Automated cherry pick of #10882: fix(common): add debug info for lock
2021-04-22 16:51:44 +08:00
Qu Xuan
2559d50694 fix(common): add debug info for lock 2021-04-22 16:10:54 +08:00
Zexi Li
638e0e72ec Merge pull request #10870 from ioito/automated-cherry-pick-of-#10867-upstream-release-3.5
Automated cherry pick of #10867: fix(region): avoid network create failed when vpc is ok but wire not sync
2021-04-22 10:24:31 +08:00
Zexi Li
f773438c00 Merge pull request #10881 from ioito/automated-cherry-pick-of-#10878-upstream-release-3.5
Automated cherry pick of #10878: fix(region): add egress_mbps params for lb
2021-04-22 10:23:44 +08:00
Qu Xuan
1e59705f20 fix(region): add egress_mbps params for lb 2021-04-21 21:46:43 +08:00
Zexi Li
6f20210159 Merge pull request #10866 from rainzm/automated-cherry-pick-of-#10863-upstream-release-3.5
Automated cherry pick of #10863: fix(region): make cloudprovider sync worker configurable
2021-04-21 15:30:29 +08:00
Qu Xuan
aad0aba77a fix(region): avoid network create failed when vpc is ok but wire not sync 2021-04-21 14:57:32 +08:00
rainzm
e58efd40b6 fix(region): make cloudprovider sync worker configurable
这个参数意味着,同时允许多少个 provider 来把自己同步的 region 任务放进后
面的队列。
进一步说,配置数量之外的 provider 必须等待前面的 provider 同步完所有的 region
之后,才有机会开始同步自己的region。
此限制的必要性不高,所以默认值设置比较大,为"10"。
2021-04-21 12:26:39 +08:00
Zexi Li
5235b01855 Merge pull request #10837 from zexi/automated-cherry-pick-of-#10833-upstream-release-3.5
Automated cherry pick of #10833: fix(region): fetch cached image from glance by default
2021-04-21 11:19:26 +08:00
Zexi Li
6ab7153c40 Merge pull request #10858 from swordqiu/automated-cherry-pick-of-#10855-upstream-release-3.5
Automated cherry pick of #10855: fix(baremetal): baremetal ipmi probe reset link up state
2021-04-21 10:13:00 +08:00
Zexi Li
48cc6d27c8 Merge pull request #10854 from rainzm/automated-cherry-pick-of-#10851-upstream-release-3.5
Automated cherry pick of #10851: fix(region): avoid using LocalTaskWorker in time-consuming synchronization of cloudaccount
2021-04-21 10:09:52 +08:00
Qiu Jian
506aba9f12 fix(baremetal): baremetal ipmi probe reset link up state 2021-04-20 21:38:36 +08:00
Zexi Li
8e8d708cfd Merge pull request #10848 from ioito/automated-cherry-pick-of-#10845-upstream-release-3.5
Automated cherry pick of #10845: fix(region): optimized vm account name code
2021-04-20 20:15:29 +08:00
rainzm
ee0bb3cbdc fix(region): avoid using LocalTaskworker in time-consuming synchronization of cloudaccount 2021-04-20 20:00:03 +08:00
Zexi Li
2091584a00 Merge pull request #10842 from ioito/automated-cherry-pick-of-#10839-upstream-release-3.5
Automated cherry pick of #10839: fix(region): avoid panic when sync aliyun networks
2021-04-20 18:51:32 +08:00
Zexi Li
851945a20d Merge pull request #10820 from rainzm/automated-cherry-pick-of-#10817-upstream-release-3.5
Automated cherry pick of #10817: fix(esxi): prevent fake template and real template from duplication
2021-04-20 18:45:59 +08:00
Qu Xuan
c6b9ceb1e2 fix(region): optimized vm account name code 2021-04-20 18:38:09 +08:00
Qu Xuan
407a51f405 fix(region): avoid panic when sync aliyun networks 2021-04-20 17:55:56 +08:00
Zexi Li
880963b3d2 fix(region): fetch cached image from glance by default 2021-04-20 17:53:05 +08:00
Zexi Li
cd2207b73c Merge pull request #10828 from ioito/automated-cherry-pick-of-#10825-upstream-release-3.5
Automated cherry pick of #10825: fix(region): avoid assign vm ip addr not effect
2021-04-20 17:16:46 +08:00
Qu Xuan
e51f75cfeb fix(region): avoid assign vm ip addr not effect 2021-04-20 16:31:20 +08:00
rainzm
b1eb8cfb9d fix(esxi): prevent fake template and real template from duplication 2021-04-20 10:40:08 +08:00
rainzm
795070f692 feat(region): increase the log for debugging when syncing cloudimage 2021-04-20 10:40:08 +08:00
Zexi Li
ea07ec23e9 Merge pull request #10799 from ioito/automated-cherry-pick-of-#10796-upstream-release-3.5
Automated cherry pick of #10796: fix: add region id params
2021-04-19 21:05:18 +08:00
Zexi Li
1c0d29f25d Merge pull request #10780 from tb365/automated-cherry-pick-of-#10776-upstream-release-3.5
Automated cherry pick of #10776: fix(region): qcloud redis sync fix
2021-04-19 16:18:23 +08:00
tangbin
985b644d36 fix(region): qcloud redis sync fix 2021-04-19 15:14:33 +08:00
Zexi Li
cc729a8569 Merge pull request #10783 from ioito/automated-cherry-pick-of-#10777-upstream-release-3.5
Automated cherry pick of #10777: fix: add options for pre allow ip add
2021-04-19 14:55:08 +08:00
Qu Xuan
c83cf93c65 fix: add region id params 2021-04-19 14:21:40 +08:00
Qu Xuan
5405ccc6e9 fix: add options for pre allow ip add 2021-04-16 17:21:40 +08:00
Zexi Li
219ce28315 Merge pull request #10768 from yousong/automated-cherry-pick-of-#10765-upstream-release-3.5
Automated cherry pick of #10765: ansibleserver: wait zombie subprocesses
2021-04-16 13:15:38 +08:00
Zexi Li
b93369e0c8 Merge pull request #10753 from yousong/automated-cherry-pick-of-#10750-upstream-release-3.5
Automated cherry pick of #10750: vpcagent: ovn: fix port match condition formation
2021-04-16 10:07:15 +08:00
Yousong Zhou
cf56908616 ansibleserver: wait zombie subprocesses 2021-04-16 09:56:20 +08:00
Yousong Zhou
40b6d6f5c1 vpcagent: ovn: fix port match condition formation 2021-04-15 16:09:59 +08:00
Zexi Li
b655ad9e7e Merge pull request #10749 from zexi/automated-cherry-pick-of-#10710-upstream-release-3.5
Automated cherry pick of #10710: fix(region): decouple region and etcd service
2021-04-15 15:43:08 +08:00
Zexi Li
877a81971f fix(region): decouple region and etcd service 2021-04-15 15:41:55 +08:00
Zexi Li
3df0330095 Merge pull request #10726 from ioito/automated-cherry-pick-of-#10723-upstream-release-3.5
Automated cherry pick of #10723: fix: aliyun lb charge type
2021-04-15 12:42:13 +08:00
Qu Xuan
0aee2db5cf fix: aliyun lb charge type 2021-04-14 18:06:25 +08:00
yunion-ci-robot
d40a4508b7 Merge pull request #10720 from zexi/automated-cherry-pick-of-#10718-upstream-release-3.5
Automated cherry pick of #10718: fix(baremetal): use command timeout context replace timeout command
2021-04-14 17:50:47 +08:00
Zexi Li
f383545f30 fix(baremetal): use command timeout context replace timeout command 2021-04-14 17:15:46 +08:00
Zexi Li
bb021a5899 Merge pull request #10708 from rainzm/automated-cherry-pick-of-#10705-upstream-release-3.5
Automated cherry pick of #10705: fix(cloudcommon): use rbac authentication dedicated to the list interface in GetModelProperty
2021-04-13 16:56:19 +08:00
rainzm
15d1e850d0 fix(cloudcommon): use rbac authentication dedicated to the list interface in GetModelProperty 2021-04-13 14:46:56 +08:00
Zexi Li
ede3e7af62 Merge pull request #10698 from rainzm/automated-cherry-pick-of-#10695-upstream-release-3.5
Automated cherry pick of #10695: feat(region): allow to update account with provider vmware
2021-04-13 10:25:58 +08:00
rainzm
e6b1f9424f feat(region): allow to update account with provider vmware 2021-04-12 15:59:22 +08:00
Zexi Li
7d80f4923c Merge pull request #10691 from ioito/automated-cherry-pick-of-#10688-upstream-release-3.5
Automated cherry pick of #10688: fix: actions domain filter by project doamin id
2021-04-12 13:17:16 +08:00
Zexi Li
123cc5ffac Merge pull request #10686 from swordqiu/automated-cherry-pick-of-#10683-upstream-release-3.5
Automated cherry pick of #10683: fix(baremetal-agent): baremetal will probe status in status unknown
2021-04-12 13:15:26 +08:00
Qu Xuan
fdf68040b8 fix: actions domain filter by project doamin id 2021-04-12 11:42:43 +08:00
Qiu Jian
c26b7792e8 fix(baremetal-agent): baremetal will probe status in status unknown 2021-04-12 00:23:57 +08:00
Zexi Li
34950d4a91 Merge pull request #10661 from swordqiu/automated-cherry-pick-of-#10531-upstream-release-3.5
Automated cherry pick of #10531: fix(region): show storage capacity to project users
2021-04-08 10:14:54 +08:00
Qiu Jian
6b193c9f33 fix(region): show storage capacity to project users 2021-04-08 01:34:36 +08:00
yunion-ci-robot
5fcb9822c3 Merge pull request #10641 from tb365/automated-cherry-pick-of-#10637-upstream-release-3.5
Automated cherry pick of #10637: fix(region): guest associate eip checking fix
2021-04-07 16:14:47 +08:00
tangbin
f12cffc5b6 fix(region): guest sync eip fix 2021-04-06 18:55:39 +08:00
tangbin
48f15c2251 fix(region): guest associate eip checking fix 2021-04-06 18:55:39 +08:00
Zexi Li
ce3d73d5ea Merge pull request #10636 from ioito/automated-cherry-pick-of-#10633-upstream-release-3.5
Automated cherry pick of #10633: fix: private cloud sku attached disk count
2021-04-06 17:08:48 +08:00
Qu Xuan
8436ed39ca fix: private cloud sku attached disk count 2021-04-06 15:06:16 +08:00
Zexi Li
4056dfa479 Merge pull request #10625 from swordqiu/automated-cherry-pick-of-#10622-upstream-release-3.5
Automated cherry pick of #10622: fix(keystone): role_assignment effective list ignore groups without user
2021-04-06 10:18:34 +08:00
Qiu Jian
14a8de240a fix(keystone): role_assignment effective list ignore groups without user 2021-04-05 17:22:01 +08:00
Zexi Li
590ee5a485 Merge pull request #10615 from swordqiu/automated-cherry-pick-of-#10612-upstream-release-3.5
Automated cherry pick of #10612: fix(region): add usage cache, speedup response
2021-04-05 00:55:34 +08:00
yunion-ci-robot
60fb1f339f Merge pull request #10611 from ioito/automated-cherry-pick-of-#10608-upstream-release-3.5
Automated cherry pick of #10608: fix: time sync duration
2021-04-04 20:12:46 +08:00
Qiu Jian
c9c99bc088 response scope-specific metrics 2021-04-04 20:09:02 +08:00
Qiu Jian
df686ce8dc fix(region): add usage cache, speedup response 2021-04-04 20:09:02 +08:00
Qu Xuan
f1e94e2dcf fix: time sync duration 2021-04-02 20:55:53 +08:00
Zexi Li
885988afe5 Merge pull request #10606 from zexi/automated-cherry-pick-of-#10603-upstream-release-3.5
Automated cherry pick of #10603: fix(baremetal): sas2iru parse line
2021-04-02 20:04:05 +08:00
Zexi Li
5f9b732beb Merge pull request #10584 from swordqiu/automated-cherry-pick-of-#10581-upstream-release-3.5
Automated cherry pick of #10581: fix(hostman): recycle local disk file when rebuilding root
2021-04-02 19:43:06 +08:00
Zexi Li
1015f5786f fix(baremetal): sas2iru parse line 2021-04-02 19:29:09 +08:00
Qiu Jian
4aadccc5a4 fix(hostman): recycle local disk file when rebuilding root 2021-04-02 02:26:31 +08:00
yunion-ci-robot
0424c3fe51 Merge pull request #10571 from ioito/automated-cherry-pick-of-#10568-upstream-release-3.5
Automated cherry pick of #10568: fix: avoid listener worker leak
2021-04-01 22:34:41 +08:00
Zexi Li
f8c4e74d3a Merge pull request #10560 from ioito/automated-cherry-pick-of-#10557-upstream-release-3.5
Automated cherry pick of #10557: fix: cloudaccount auto sync
2021-04-01 20:50:07 +08:00
Zexi Li
46b40ff7d5 Merge pull request #10564 from ioito/automated-cherry-pick-of-#10561-upstream-release-3.5
Automated cherry pick of #10561: fix: vendor update
2021-04-01 20:49:03 +08:00
Zexi Li
042535383b Merge pull request #10572 from rainzm/automated-cherry-pick-of-#10565-upstream-release-3.5
Automated cherry pick of #10565: fix(esxi): be compatible with disconnected host
2021-04-01 20:48:02 +08:00
rainzm
89f424e8b4 fix(esxi): be compatible with disconnected host 2021-04-01 17:35:12 +08:00
Qu Xuan
b2412aa031 fix: avoid listener worker leak 2021-04-01 17:27:22 +08:00
Qu Xuan
150ebfb4b4 fix: vendor update 2021-04-01 16:57:31 +08:00
Qu Xuan
fab06756c9 fix: cloudaccount auto sync 2021-04-01 16:19:59 +08:00
Zexi Li
da953d2442 Merge pull request #10524 from ioito/automated-cherry-pick-of-#10521-upstream-release-3.5
Automated cherry pick of #10521: fix: account auto sync time
2021-03-29 12:13:49 +08:00
Qu Xuan
c1c50994a6 fix: account auto sync time 2021-03-29 11:23:16 +08:00
yunion-ci-robot
c6e52cfc7f Merge pull request #10513 from ioito/automated-cherry-pick-of-#10510-upstream-release-3.5
Automated cherry pick of #10510: fix: sku zone
2021-03-26 17:27:53 +08:00
Qu Xuan
399578ff01 fix: sku zone 2021-03-26 16:46:35 +08:00
Zexi Li
f83216eac6 Merge pull request #10502 from yousong/automated-cherry-pick-of-#10499-upstream-release-3.5
Automated cherry pick of #10499: vpcagent: ovn: fix qos for eip upload
2021-03-26 15:18:20 +08:00
Zexi Li
bc57fafd7e Merge pull request #10508 from swordqiu/automated-cherry-pick-of-#10505-upstream-release-3.5
Automated cherry pick of #10505: fix(baremetal): megactl driver fail to find device by key
2021-03-26 15:16:53 +08:00
Yousong Zhou
60579269fa vpcagent: ovn: fix qos for eip upload 2021-03-26 10:28:41 +08:00
Qiu Jian
62050dc18d fix(baremetal): megactl driver fail to find device by key 2021-03-26 03:28:41 +08:00
Zexi Li
3952bc8016 Merge pull request #10484 from tb365/automated-cherry-pick-of-#10483-upstream-release-3.5
Automated cherry pick of #10483: (fix) region: qcloud elb https listener create fix
2021-03-24 18:51:33 +08:00
tangbin
c6ddfdf68b (fix) region: qcloud elb https listener create fix 2021-03-23 15:48:17 +08:00
Zexi Li
31720655b6 Merge pull request #10466 from rainzm/webhook/more5
feat(region): send webhook msg when changing ipaddr
2021-03-23 10:41:24 +08:00
Zexi Li
75f6c775e7 Merge pull request #10477 from yousong/automated-cherry-pick-of-#10474-release-3.5
Automated cherry pick of #10474: Bugfix/yousong guestnic
2021-03-23 10:39:49 +08:00
Yousong Zhou
81dd84d090 region: fix setting nic index
When a guest has two nics, changing ip address of the 1st will cause
the new nic after detach then attach to be "1", colliding with the
original nic of index 1
2021-03-22 19:36:27 +08:00
Yousong Zhou
39128f8be8 region: attachnetwork: allow attach by network name
isValidNetworkInfo allows names.  Otherwise the code will panic when
a named was passed and nil was returned by the fetch call
2021-03-22 19:35:30 +08:00
Zexi Li
81fd9053b6 Merge pull request #10465 from ioito/automated-cherry-pick-of-#10462-upstream-release-3.5
Automated cherry pick of #10462: fix: add index for image_type
2021-03-22 10:45:31 +08:00
Zexi Li
71606a83e2 Merge pull request #10458 from swordqiu/automated-cherry-pick-of-#10455-upstream-release-3.5
Automated cherry pick of #10455: fix(keystone): allow joint projects across domains by default
2021-03-22 10:39:28 +08:00
rainzm
eba825ee22 feat(region): send webhook msg when changing ipaddr 2021-03-19 15:36:58 +08:00
Qu Xuan
c7383a1aec fix: add index for image_type 2021-03-19 14:31:17 +08:00
Qiu Jian
621b8b72bb fix(keystone): allow joint projects across domains by default 2021-03-19 00:04:26 +08:00
Zexi Li
ce44bc4713 Merge pull request #10440 from swordqiu/automated-cherry-pick-of-#10437-upstream-release-3.5
Automated cherry pick of #10437: fix(region): scoped policy filter by project id
2021-03-18 10:24:05 +08:00
Zexi Li
3970247398 Merge pull request #10444 from swordqiu/automated-cherry-pick-of-#10441-upstream-release-3.5
Automated cherry pick of #10441: fix(region): including domain info in project-role results
2021-03-18 10:23:35 +08:00
Zexi Li
72adfc5b80 Merge pull request #10436 from ioito/automated-cherry-pick-of-#10433-upstream-release-3.5
Automated cherry pick of #10433: fix: avoid stop or start vm failed
2021-03-18 10:17:36 +08:00
Qiu Jian
9c8f314b08 fix(region): including domain info in project-role results 2021-03-18 00:33:58 +08:00
Qiu Jian
93efca9650 fix(region): scoped policy filter by project id 2021-03-17 23:02:33 +08:00
Qu Xuan
2df06dc9d9 fix: avoid stop or start vm failed 2021-03-17 20:03:38 +08:00
Zexi Li
1fcf00cff2 Merge pull request #10428 from ioito/automated-cherry-pick-of-#10425-upstream-release-3.5
Automated cherry pick of #10425: fix: change rds config skip zone check
2021-03-17 11:43:24 +08:00
Zexi Li
c335b7e2db Merge pull request #10424 from ioito/automated-cherry-pick-of-#10421-upstream-release-3.5
Automated cherry pick of #10421: fix: qcloud bucket refer
2021-03-15 17:53:19 +08:00
Qu Xuan
94aaa5c69b fix: change rds config skip zone check 2021-03-15 17:43:47 +08:00
Qu Xuan
a3bbf766ff fix: qcloud bucket refer 2021-03-15 15:48:28 +08:00
yunion-ci-robot
a2839e096d Merge pull request #10417 from ioito/automated-cherry-pick-of-#10414-upstream-release-3.5
Automated cherry pick of #10414: fix: sync cloud tags when set tags
2021-03-14 01:25:31 +08:00
Qu Xuan
b63fb04a98 fix: sync cloud tags when set tags 2021-03-13 20:49:06 +08:00
yunion-ci-robot
b3277d1452 Merge pull request #10413 from ioito/automated-cherry-pick-of-#10410-upstream-release-3.5
Automated cherry pick of #10410: fix: skip zone check when rds change config
2021-03-13 19:21:24 +08:00
yunion-ci-robot
b4d2decc45 Merge pull request #10409 from ioito/automated-cherry-pick-of-#10407-upstream-release-3.5
Automated cherry pick of #10407: fix: tag sync
2021-03-13 19:02:25 +08:00
Qu Xuan
2a267e6b3a fix: skip zone check when rds change config 2021-03-13 19:01:05 +08:00
Qu Xuan
67ab932fbb fix: tag sync 2021-03-13 18:14:15 +08:00
Zexi Li
7280b3c869 Merge pull request #10405 from swordqiu/automated-cherry-pick-of-#10402-upstream-release-3.5
Automated cherry pick of #10402: fix(region): cloud provider filter by domain_id ignore private case
2021-03-12 21:17:24 +08:00
Qiu Jian
f151bcf6b1 fix(region): cloud provider filter by domain_id ignore private case 2021-03-12 20:15:29 +08:00
Zexi Li
b9f2c230e7 Merge pull request #10390 from swordqiu/automated-cherry-pick-of-#10387-upstream-release-3.5
Automated cherry pick of #10387: fix(region): fail to update network gateway
2021-03-12 17:38:08 +08:00
Zexi Li
339f376546 Merge pull request #10394 from ioito/automated-cherry-pick-of-#10391-upstream-release-3.5
Automated cherry pick of #10391: fix: sync new project for azure resource group
2021-03-12 17:35:33 +08:00
Zexi Li
333e1239c9 Merge pull request #10398 from rainzm/automated-cherry-pick-of-#10395-upstream-release-3.5
Automated cherry pick of #10395: feat(esxi): update guest os info
2021-03-12 17:34:09 +08:00
rainzm
67593bdc68 feat(esxi): update guest os info 2021-03-11 16:44:52 +08:00
Qu Xuan
ead366cd0d fix: sync new project for azure resource group 2021-03-11 15:02:48 +08:00
Qiu Jian
76da80836c fix(region): fail to update network gateway 2021-03-11 14:54:51 +08:00
Zexi Li
19780ebfdc Merge pull request #10385 from swordqiu/automated-cherry-pick-of-#10382-upstream-release-3.5
Automated cherry pick of #10382: fix(region): cloud provider filter by domain
2021-03-11 11:39:24 +08:00
Zexi Li
dcc095c1f5 Merge pull request #10366 from rainzm/automated-cherry-pick-of-#10365-upstream-release-3.5
Automated cherry pick of #10365: feat(region): filter schedtags from cloudaccount_id
2021-03-11 11:37:12 +08:00
yunion-ci-robot
a7b384677a Merge pull request #10364 from tb365/automated-cherry-pick-of-#10357-upstream-release-3.5
Automated cherry pick of #10357: qcloud redis support multi zones
2021-03-11 10:22:24 +08:00
Qiu Jian
3fed503ba3 fix(region): cloud provider filter by domain 2021-03-11 01:08:48 +08:00
rainzm
33362c1faf feat(region): filter schedtags from cloudprovider_id 2021-03-10 19:45:46 +08:00
tangbin
990b70ab5e fix(region) qcloud multi zone instance sync account fix 2021-03-10 19:07:42 +08:00
tangbin
2d20890fa8 feat(region) qcloud redis support multi zones 2021-03-10 19:07:42 +08:00
Zexi Li
f8d87ddc9c Merge pull request #10354 from swordqiu/automated-cherry-pick-of-#10351-upstream-release-3.5
Automated cherry pick of #10351: fix(region): network eip stats not correct
2021-03-10 16:31:06 +08:00
Qiu Jian
e69937d822 fix: remove apsara in 3.5 2021-03-09 18:23:01 +08:00
Qiu Jian
0fd66b179a fix(region): network eip stats not correct 2021-03-09 18:06:56 +08:00
Zexi Li
e077e1dd0d Merge pull request #10283 from rainzm/automated-cherry-pick-of-#10282-upstream-release-3.5
Automated cherry pick of #10282: feat(region): increase the network number and host number limit when recommending the network
2021-03-08 15:06:53 +08:00
Zexi Li
16e4a3d62b Merge pull request #10343 from yousong/automated-cherry-pick-of-#10340-upstream-release-3.5
Automated cherry pick of #10340: etcd: fix "fatal error: concurrent map writes"
2021-03-08 14:20:42 +08:00
Zexi Li
4ff75be1a2 Merge pull request #10332 from ioito/automated-cherry-pick-of-#10329-upstream-release-3.5
Automated cherry pick of #10329: fix: optimized bucket tag
2021-03-08 14:13:52 +08:00
Yousong Zhou
d0284522f1 etcd: fix "fatal error: concurrent map writes"
Trace

	goroutine 1270434 [running]:
	runtime.throw(0x4b0cc5e, 0x15)
		/home/yousong/.usr/go/goroot-1.15.6/src/runtime/panic.go:1116 +0x72 fp=0xc0011151f8 sp=0xc0011151c8 pc=0x439292
	runtime.mapdelete_faststr(0x40876e0, 0xc0006a54a0, 0xc001e84200, 0x3e)
		/home/yousong/.usr/go/goroot-1.15.6/src/runtime/map_faststr.go:377 +0x34c fp=0xc001115260 sp=0xc0011151f8 pc=0x41664c
	yunion.io/x/onecloud/pkg/cloudcommon/etcd.(*SEtcdClient).Unwatch(0xc0003130e0, 0xc001e84200, 0x3e)
		/home/yousong/go/src/yunion.io/x/onecloud/pkg/cloudcommon/etcd/etcd.go:353 +0x134 fp=0xc0011152d0 sp=0xc001115260 pc=0x10031f4
	yunion.io/x/onecloud/pkg/compute/models.(*SHostHealthChecker).WatchHost(0xc000c222a0, 0x5229ca0, 0xc000122000, 0xc001fbc4e0, 0x24)
		/home/yousong/go/src/yunion.io/x/onecloud/pkg/compute/models/host_health.go:149 +0xd5 fp=0xc001115338 sp=0xc0011152d0 pc=0x1816395
	yunion.io/x/onecloud/pkg/compute/models.(*SHost).PerformOnline(0xc001fd8400, 0x5229d20, 0xc001c4d440, 0x52a0c60, 0xc000957c40, 0x5298900, 0xc001629aa0, 0x5298900, 0xc001629ae0, 0xc000957c40, ...)
		/home/yousong/go/src/yunion.io/x/onecloud/pkg/compute/models/hosts.go:3829 +0x227 fp=0xc0011153a0 sp=0xc001115338 pc=0x185a387
	yunion.io/x/onecloud/pkg/compute/models.(*SHost).PerformPing(0xc001fd8400, 0x5229d20, 0xc001c4d440, 0x52a0c60, 0xc000957c40, 0x5298900, 0xc001629aa0, 0x5298900, 0xc001629ae0, 0x0, ...)
		/home/yousong/go/src/yunion.io/x/onecloud/pkg/compute/models/hosts.go:3891 +0xbd fp=0xc001115430 sp=0xc0011153a0 pc=0x185acbd
2021-03-08 09:56:30 +08:00
yunion-ci-robot
baaf91671e Merge pull request #10339 from rainzm/automated-cherry-pick-of-#10336-upstream-release-3.5
Automated cherry pick of #10336: fix(notify): enable filter of contact type 'email' and 'mobile'
2021-03-06 10:57:27 +08:00
rainzm
c64ec50f60 fix(notify): enable filter of contact type 'email' and 'mobile' 2021-03-06 03:03:15 +08:00
Qu Xuan
0f92d18755 fix: optimized bucket tag 2021-03-05 15:44:26 +08:00
rainzm
557a2de18d feat(region): increase the network number and host number limit when recommending the network 2021-03-05 11:17:42 +08:00
Zexi Li
ef5a23bdf2 Merge pull request #10325 from tb365/automated-cherry-pick-of-#10322-upstream-release-3.5
Automated cherry pick of #10322: copyright update brand_cn&brand_en fix
2021-03-05 10:15:45 +08:00
tangbin
9ca073bf10 copyright update brand_cn&brand_en fix 2021-03-05 10:00:58 +08:00
Zexi Li
e0f978d43f Merge pull request #10319 from rainzm/automated-cherry-pick-of-#10316-upstream-release-3.5
Automated cherry pick of #10316: fix(region): check whether guest is nil
2021-03-04 19:39:10 +08:00
rainzm
d228b226d1 fix(region): check whether guest is nil 2021-03-04 17:56:34 +08:00
Zexi Li
daad82f214 Merge pull request #10307 from tb365/automated-cherry-pick-of-#10305-upstream-release-3.5
Automated cherry pick of #10305: infos copyright add brand_en&brand_cn
2021-03-04 15:25:49 +08:00
tangbin
498a240919 infos copyright add brand_en&brand_cn 2021-03-04 11:20:31 +08:00
Zexi Li
42f0e6d43c Merge pull request #10273 from ioito/automated-cherry-pick-of-#10270-upstream-release-3.5
Automated cherry pick of #10270: fix(cloudevent): optimized cloudevent sql
2021-02-25 11:36:05 +08:00
Qu Xuan
67a8226c5a fix(cloudevent): optimized cloudevent sql 2021-02-25 11:34:33 +08:00
Zexi Li
bd4323a0f8 Merge pull request #10268 from ioito/automated-cherry-pick-of-#10265-upstream-release-3.5
Automated cherry pick of #10265: fix(region): add azure new region
2021-02-25 11:23:13 +08:00
Qu Xuan
352c32262b fix(region): add azure new region 2021-02-25 10:24:23 +08:00
Zexi Li
59843f3f54 Merge pull request #10230 from ioito/automated-cherry-pick-of-#10227-upstream-release-3.5
Automated cherry pick of #10227: fix(region): qcloud quota sync
2021-02-22 20:52:13 +08:00
Zexi Li
9741664109 Merge pull request #10237 from ioito/automated-cherry-pick-of-#10234-upstream-release-3.5
Automated cherry pick of #10234: fix(region): avoid not sync dns zone
2021-02-22 19:49:55 +08:00
Qu Xuan
1057c9701b fix(region): avoid not sync dns zone 2021-02-22 16:15:38 +08:00
Qu Xuan
cbe43cf073 fix(region): qcloud quota sync 2021-02-22 14:56:18 +08:00
Jian Qiu
d38a91e5eb fix(scheduler): storage medium type should not exact match (#10193)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2021-02-08 12:15:21 -03:00
yunion-ci-robot
12a39df931 Merge pull request #10187 from swordqiu/automated-cherry-pick-of-#10158-upstream-release-3.5
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
ea2365945f fix(apigateway): add enable_quota_check and return-domain-list attributes to fe params 2021-02-07 17:00:46 +08:00
Zexi Li
67fd064abc Merge pull request #10112 from ioito/automated-cherry-pick-of-#10109-upstream-release-3.5
Automated cherry pick of #10109: fix(region): avoid sync huawei unusable account
2021-02-02 22:07:00 +08:00
Zexi Li
78d21483d7 Merge pull request #10107 from ioito/automated-cherry-pick-of-#10104-upstream-release-3.5
Automated cherry pick of #10104: fix(region): delete virtual nics with network
2021-02-02 21:04:17 +08:00
Zexi Li
d8ccdfade9 Merge pull request #10120 from wanyaoqi/automated-cherry-pick-of-#10117-upstream-release-3.5
Automated cherry pick of #10117: fix(region): add option auto reconcile backup servers
2021-02-02 20:10:12 +08:00
Zexi Li
d14ea3817a Merge pull request #10125 from rainzm/automated-cherry-pick-of-#10122-upstream-release-3.5
Automated cherry pick of #10122: fix(region): check the global network situation when expanding the network
2021-02-02 20:08:31 +08:00
rainzm
6212f1461f fix(region): check the global network situation when expanding the network 2021-02-02 19:51:52 +08:00
wanyaoqi
46c9fec61d fix(region): add option auto reconcile backup servers 2021-02-02 18:35:42 +08:00
Qu Xuan
e66392307b fix(region): avoid sync huawei unusable account 2021-02-02 15:04:28 +08:00
Qu Xuan
25b1b555fd fix(region): delete virtual nics with network 2021-02-02 10:54:19 +08:00
Zexi Li
4540e5df0f Merge pull request #10076 from wanyaoqi/automated-cherry-pick-of-#10073-upstream-release-3.5
Automated cherry pick of #10073: fix(host-deployer): remove escape character on windows passwd
2021-01-30 10:40:32 +08:00
wanyaoqi
0f217751f9 fix(host-deployer): remove escape character on windows passwd 2021-01-29 11:58:19 +08:00
Zexi Li
a1bb1c6bbd Merge pull request #10047 from rainzm/automated-cherry-pick-of-#10042-upstream-release-3.5
Automated cherry pick of #10042: Optimize the error message when logging in
2021-01-28 20:48:19 +08:00
Zexi Li
196127250e Merge pull request #10058 from ioito/automated-cherry-pick-of-#10055-upstream-release-3.5
Automated cherry pick of #10055: fix(region): add aliyun credit amount check
2021-01-28 20:47:04 +08:00
Zexi Li
d81230ee95 Merge pull request #10062 from ioito/automated-cherry-pick-of-#10059-upstream-release-3.5
Automated cherry pick of #10059: fix(region): add huawei credit amount check
2021-01-28 20:46:19 +08:00
Zexi Li
a0341ddc32 Merge pull request #10066 from ioito/automated-cherry-pick-of-#10063-upstream-release-3.5
Automated cherry pick of #10063: fix(region): avoid stuck at http request
2021-01-28 20:04:09 +08:00
Qu Xuan
422cbd8d05 fix(region): avoid stuck at http request 2021-01-28 18:26:44 +08:00
Qu Xuan
93cee627c9 fix(region): add huawei credit amount check 2021-01-28 17:02:36 +08:00
Qu Xuan
44a97fa9d9 fix(region): add aliyun credit amount check 2021-01-28 16:02:10 +08:00
Zexi Li
4f6caff581 Merge pull request #10051 from ioito/automated-cherry-pick-of-#10048-upstream-release-3.5
Automated cherry pick of #10048: fix(region): secgroup priority fix
2021-01-28 15:12:19 +08:00
Qu Xuan
1f5dbebca5 fix(region): secgroup priority fix 2021-01-28 14:21:55 +08:00
rainzm
78a04c5ad8 feat(locale): update 2021-01-28 10:41:23 +08:00
rainzm
ab4f69cdfc feat(apigateway): differentiate error messages when logging in 2021-01-28 10:29:29 +08:00
rainzm
f96e17ea0f feat(keystone): more specific error return during authentication
add error class UserNotFound, UserLocked, UserDisabled and WrongPassword
2021-01-28 10:29:29 +08:00
Zexi Li
e9e32c3b11 Merge pull request #10045 from rainzm/automated-cherry-pick-of-#9948-upstream-release-3.5
Automated cherry pick of #9948: feat(keystone,apigateway): return a readable message when the user is locked or disabled
2021-01-28 10:01:56 +08:00
rainzm
e9eadeccfb feat(keystone,apigateway): return a readable message when the user is locked or disabled 2021-01-28 10:00:17 +08:00
Zexi Li
87b5917b61 Merge pull request #9947 from rainzm/automated-cherry-pick-of-#9944-upstream-release-3.5
Automated cherry pick of #9944: fix(notify): add index fro receiver_notification
2021-01-27 09:06:50 +08:00
Zexi Li
21400fc532 Merge pull request #10028 from ioito/automated-cherry-pick-of-#10025-upstream-release-3.5
Automated cherry pick of #10025: fix(region): purge snapshot with not status check
2021-01-27 09:02:39 +08:00
Zexi Li
6fae969814 Merge pull request #10023 from ioito/automated-cherry-pick-of-#10018-upstream-release-3.5
Automated cherry pick of #10018: fix(region): optimized secgroup rule sync
2021-01-26 14:53:39 +08:00
Qu Xuan
b2156f356f fix(region): purge snapshot with not status check 2021-01-26 14:49:43 +08:00
Qu Xuan
43b2654c83 fix(region): optimized secgroup rule sync 2021-01-26 14:12:11 +08:00
Zexi Li
1a1490ec46 Merge pull request #10006 from wanyaoqi/automated-cherry-pick-of-#10003-upstream-release-3.5
Automated cherry pick of #10003: fix(host): fix wait time after execute mount fuse fs
2021-01-25 21:05:52 +08:00
Zexi Li
c1a67c68e8 Merge pull request #10016 from swordqiu/automated-cherry-pick-of-#10013-upstream-release-3.5
Automated cherry pick of #10013: fix(keystone): user create without password can login with any password
2021-01-25 21:03:36 +08:00
Qiu Jian
1fae47d77a fix(keystone): user create without password can login with any password 2021-01-23 23:52:08 +08:00
yunion-ci-robot
a5fe8071e5 Merge pull request #9998 from ioito/automated-cherry-pick-of-#9995-upstream-release-3.5
Automated cherry pick of #9995: fix(region): aws not support create server with public ip
2021-01-23 22:45:37 +08:00
wanyaoqi
33c2041685 fix(host): fix wait time after mount fuse fs 2021-01-22 19:20:40 +08:00
yunion-ci-robot
f2cdd17909 Merge pull request #9972 from tb365/bugfix/tb-bugfix-012003
Bugfix/tb bugfix 012003
2021-01-22 17:11:05 +08:00
Qu Xuan
bec1477407 fix(region): aws not support create server with public ip 2021-01-22 10:46:27 +08:00
Zexi Li
db9468ea4d Merge pull request #9969 from ioito/automated-cherry-pick-of-#9966-upstream-release-3.5
Automated cherry pick of #9966: fix(cloudevent): update aliyun lookupevent api
2021-01-22 02:53:43 +08:00
Zexi Li
324406d164 Merge pull request #9977 from yousong/automated-cherry-pick-of-#9974-upstream-release-3.5
Automated cherry pick of #9974: fix(region): cloudaccount: allow only one sync func in flight
2021-01-22 02:47:23 +08:00
Zexi Li
1a73ce10ce Merge pull request #9987 from ioito/automated-cherry-pick-of-#9973-upstream-release-3.5
Automated cherry pick of #9973: fix(region): avoid clean all rules when sync secgroups
2021-01-22 00:39:12 +08:00
Zexi Li
bf73ca6753 Merge pull request #9984 from rainzm/automated-cherry-pick-of-#9981-upstream-release-3.5
Automated cherry pick of #9981: fix(notify): send websocket messages according to language preference
2021-01-21 21:33:53 +08:00
Qu Xuan
d88074a437 fix(region): avoid clean all rules when sync secgroups 2021-01-21 21:29:14 +08:00
rainzm
56ef83bd31 fix(notify): send websocket messages according to language preference 2021-01-21 19:53:30 +08:00
Yousong Zhou
317b626079 fix(region): cloudaccount: allow only one sync func in flight
Ref https://github.com/yunionio/onecloud/pull/6859
2021-01-21 16:30:41 +08:00
Qu Xuan
a0bc6700c0 fix(cloudevent): update aliyun lookupevent api 2021-01-21 15:18:59 +08:00
tangbin
a649d731c5 loadbalancer add lb purge validate 2021-01-20 21:59:02 +08:00
tangbin
cc0d9b0f68 fix(region): aws elb backendgroup sync bugfix 2021-01-20 21:58:44 +08:00
Zexi Li
6a7620048f Merge pull request #9937 from rainzm/automated-cherry-pick-of-#9934-upstream-release-3.5
Automated cherry pick of #9934: feat(notify): clean data for receiver_notifications
2021-01-20 03:18:40 +08:00
Zexi Li
33c22238b1 Merge pull request #9955 from ioito/automated-cherry-pick-of-#9952-upstream-release-3.5
Automated cherry pick of #9952: fix(region): fix zstack delete server with local disks
2021-01-20 02:25:40 +08:00
Qu Xuan
8c37b15aef fix(region): fix zstack delete server with local disks 2021-01-19 18:11:06 +08:00
rainzm
4dbbc52409 fix(notify): add index fro receiver_notification 2021-01-19 15:55:21 +08:00
yunion-ci-robot
11853981db Merge pull request #9941 from ioito/automated-cherry-pick-of-#9938-upstream-release-3.5
Automated cherry pick of #9938: fix(region): azure default subscription id
2021-01-18 21:41:22 +08:00
Qu Xuan
8631b5eaa4 fix(region): azure default subscription id 2021-01-18 21:26:00 +08:00
rainzm
dbc63d2196 feat(notify): clean data for receiver_notifications 2021-01-18 19:50:33 +08:00
Zexi Li
c6a1a5eb87 Merge pull request #9928 from rainzm/automated-cherry-pick-of-#9925-upstream-release-3.5
Automated cherry pick of #9925: Notify Optimization
2021-01-18 11:47:11 +08:00
rainzm
9feefb2eb6 fix(notify): add a time limit for resending notifications 2021-01-18 11:15:51 +08:00
rainzm
64547497b4 feat(notify): delete the notification 1 month ago and remove the data migration 2021-01-18 11:15:51 +08:00
yunion-ci-robot
53fd4693b4 Merge pull request #9913 from ioito/automated-cherry-pick-of-#9910-upstream-release-3.5
Automated cherry pick of #9910: fix(region): avoid azure detach disk failed
2021-01-17 11:38:30 +08:00
Jian Qiu
3ccc28986c fix(cloudcommon): missing set_meta opslog (#9917)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2021-01-17 11:33:45 +08:00
Qu Xuan
63fe479779 fix(region): avoid azure detach disk failed 2021-01-16 18:38:40 +08:00
Zexi Li
30e0362700 Merge pull request #9898 from ioito/automated-cherry-pick-of-#9895-upstream-release-3.5
Automated cherry pick of #9895: fix(region): update google latitude and langtitude
2021-01-14 23:50:09 +08:00
Qu Xuan
a8b2dfb1ca fix(region): update google latitude and langtitude 2021-01-14 20:53:39 +08:00
Zexi Li
42317c7344 Merge pull request #9887 from ioito/automated-cherry-pick-of-#9856-upstream-release-3.5
Automated cherry pick of #9856: fix(region): optimized azure reset linux pasword
2021-01-14 17:39:51 +08:00
Qu Xuan
e764fc0cd0 fix(region): optimized azure reset linux pasword 2021-01-14 14:44:50 +08:00
Zexi Li
5315194570 Merge pull request #9875 from swordqiu/automated-cherry-pick-of-#9872-upstream-release-3.5
Automated cherry pick of #9872: fix(region): AWS buckets in us-east-1 have null location
2021-01-14 09:36:39 +08:00
Qiu Jian
463ae2f104 fix(region): AWS buckets in us-east-1 have null location 2021-01-14 09:15:18 +08:00
Zexi Li
11b419b505 Merge pull request #9835 from ioito/automated-cherry-pick-of-#9833-upstream-release-3.5
Automated cherry pick of #9833: fix(cloudid): multi cloudaccount with saml user
2021-01-12 10:25:30 +08:00
Qu Xuan
e00a322109 fix(cloudid): multi cloudaccount with saml user 2021-01-10 20:01:09 +08:00
Zexi Li
43f4a86a47 Merge pull request #9828 from rainzm/automated-cherry-pick-of-#9825-upstream-release-3.5
Automated cherry pick of #9825: fix(notify): avoid duplication of notification names
2021-01-09 19:54:57 +08:00
rainzm
c81e584bd3 fix(notify): avoid duplication of notification names 2021-01-09 18:47:35 +08:00
Zexi Li
420709c1bf Merge pull request #9801 from ioito/automated-cherry-pick-of-#9798-upstream-release-3.5
Automated cherry pick of #9798: fix(region): optimized for qcloud prepaid instance delete
2021-01-09 15:33:19 +08:00
Zexi Li
3b9f1196e0 Merge pull request #9816 from rainzm/automated-cherry-pick-of-#9813-upstream-release-3.5
Automated cherry pick of #9813: fix(notify): loose phone number rules in updating receiver
2021-01-09 13:03:57 +08:00
rainzm
e06dc3e0f7 fix(notify): loose phone number rules in updating receiver 2021-01-09 11:33:22 +08:00
Zexi Li
c4f06b6c75 Merge pull request #9805 from rainzm/automated-cherry-pick-of-#9802-upstream-release-3.5
Automated cherry pick of #9802: fix(notify): loose mobile phone number matching rules
2021-01-08 14:19:41 +08:00
rainzm
341f24d24d fix(notify): loose mobile phone number matching rules 2021-01-08 12:04:07 +08:00
Qu Xuan
bbc6cc8e00 fix(region): optimized for qcloud prepaid instance delete 2021-01-08 11:40:31 +08:00
Zexi Li
fa27380c1f Merge pull request #9788 from yousong/automated-cherry-pick-of-#9785-upstream-release-3.5
Automated cherry pick of #9785: guest_deploy_task: log other deploy details with i18n
2021-01-07 21:16:45 +08:00
Yousong Zhou
7bf07345e7 guest_deploy_task: log other deploy details with i18n
Fixes 9f350392 ("add service tag for actionlog")
2021-01-07 11:41:11 +08:00
Zexi Li
3df9bb5ffd Merge pull request #9781 from ioito/automated-cherry-pick-of-#9778-upstream-release-3.5
Automated cherry pick of #9778: fix(region): avoid auzre request timeout
2021-01-06 21:24:15 +08:00
Zexi Li
e95c200aae Merge pull request #9774 from ioito/automated-cherry-pick-of-#9771-upstream-release-3.5
Automated cherry pick of #9771: fix(region): avoid panic when register service not work
2021-01-06 21:22:17 +08:00
Qu Xuan
66270936c7 fix(region): avoid auzre request timeout 2021-01-06 15:34:56 +08:00
Qu Xuan
c85ca16d6c fix(region): avoid panic when register service not work 2021-01-05 21:20:51 +08:00
Zexi Li
cbe0097a8e Merge pull request #9765 from wanyaoqi/automated-cherry-pick-of-#9762-upstream-release-3.5
Automated cherry pick of #9762: feat(region): stop guest before freeze
2021-01-05 18:33:37 +08:00
wanyaoqi
cd6d1e394a feat(region): stop guest before freeze 2021-01-05 15:48:39 +08:00
Zexi Li
aa2bda1187 Merge pull request #9741 from ioito/automated-cherry-pick-of-#9727-upstream-release-3.5
Automated cherry pick of #9727: fix(region): rds list with secgorups info
2020-12-30 21:44:32 +08:00
Zexi Li
7581a5fad0 Merge pull request #9738 from wanyaoqi/automated-cherry-pick-of-#9731-upstream-release-3.5
Automated cherry pick of #9731: fix(region): server start check host memory is enough
2020-12-30 21:40:01 +08:00
Zexi Li
47d036a7b7 Merge pull request #9747 from rainzm/automated-cherry-pick-of-#9744-upstream-release-3.5
Automated cherry pick of #9744: fix(esxiagent): nicIndex should be incremented
2020-12-30 21:36:02 +08:00
rainzm
331f752f2f fix(esxiagent): nicIndex should be incremented 2020-12-30 19:03:26 +08:00
Qu Xuan
f3d117489d fix(region): rds list with secgorups info 2020-12-30 16:12:01 +08:00
wanyaoqi
d3183c8609 fix(region): server start check host memory is enough 2020-12-30 15:51:30 +08:00
Zexi Li
357c4db4c0 Merge pull request #9717 from wanyaoqi/automated-cherry-pick-of-#9711-upstream-release-3.5
Automated cherry pick of #9711: fix(region,host,host-deployer): sync status chekc block jobs
2020-12-29 20:43:43 +08:00
Zexi Li
d02da07355 Merge pull request #9713 from rainzm/automated-cherry-pick-of-#9693-upstream-release-3.5
Automated cherry pick of #9693: Solve the permission problem of notify to create receiver
2020-12-29 20:41:50 +08:00
Zexi Li
54df3c7990 Merge pull request #9709 from rainzm/automated-cherry-pick-of-#9706-upstream-release-3.5
Automated cherry pick of #9706: feat(region): multilingual timer description
2020-12-29 20:39:37 +08:00
wanyaoqi
1d775cda02 fix(region,host): sync status check block jobs 2020-12-29 15:36:22 +08:00
wanyaoqi
06f38212cd fix(host-deployer): add log line on blkid failed 2020-12-29 15:32:31 +08:00
wanyaoqi
8d605ca479 fix(climc): host add netif add params bridge/interface 2020-12-29 15:32:31 +08:00
rainzm
e7dfe494c0 feat(region): multilingual timer description 2020-12-29 15:24:24 +08:00
rainzm
57e864884d feat(db): progressive inspection when determining the required scope 2020-12-29 15:07:35 +08:00
rainzm
19e805bac7 fix(notify): inject domain info in ReceiverManager.FetchOwnerId 2020-12-29 15:07:35 +08:00
Zexi Li
795eaaf3d5 Merge pull request #9703 from swordqiu/automated-cherry-pick-of-#9701-upstream-release-3.5
Automated cherry pick of #9701: fix(region): omit vpc quota check if vpc created by owner
2020-12-29 09:35:58 +08:00
Qiu Jian
561ca368f6 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:20:39 +08:00
Zexi Li
59382467f3 Merge pull request #9542 from ioito/automated-cherry-pick-of-#9540-upstream-release-3.5
Automated cherry pick of #9540: fix(region): openstack network is regional
2020-12-28 10:20:35 +08:00
Zexi Li
d2e2705406 Merge pull request #9684 from rainzm/automated-cherry-pick-of-#9681-upstream-release-3.5
Automated cherry pick of #9681: feat(region): make DeleteSnapshotExpiredRelease applies to postpaid vm
2020-12-27 21:06:18 +08:00
Zexi Li
d710b2c017 Merge pull request #9680 from ioito/automated-cherry-pick-of-#9677-upstream-release-3.5
Automated cherry pick of #9677: optimized(region): qcloud bucket policy set and get operation
2020-12-26 20:01:13 +08:00
rainzm
92a374f38c feat(region): make DeleteSnapshotExpiredRelease applies to postpaid vm 2020-12-26 18:44:58 +08:00
Qu Xuan
155dbac527 optimized(region): qcloud bucket policy set and get operation 2020-12-26 17:43:13 +08:00
Zexi Li
337dd90c3a Merge pull request #9665 from rainzm/automated-cherry-pick-of-#9660-upstream-release-3.5
Automated cherry pick of #9660: feat(region): add options DeleteSnapshotExpiredRelease
2020-12-26 15:12:42 +08:00
rainzm
5806575238 feat(region): add options DeleteSnapshotExpiredRelease 2020-12-26 14:09:03 +08:00
Zexi Li
95405c3b1a Merge pull request #9651 from ioito/automated-cherry-pick-of-#9627-upstream-release-3.5
Automated cherry pick of #9627: fix(region): support rds secgroup operation
2020-12-26 12:20:15 +08:00
Zexi Li
eceef27d8d Merge pull request #9648 from lvyangyang/automated-cherry-pick-of-#9636-upstream-release-3.5
Automated cherry pick of #9636: fix(region): aws lb create tags param
2020-12-26 12:18:22 +08:00
Zexi Li
261b237ca6 Merge pull request #9646 from swordqiu/automated-cherry-pick-of-#9644-upstream-release-3.5
Automated cherry pick of #9644: feature(climc): policy save data into file
2020-12-26 12:09:28 +08:00
Zexi Li
d694756a21 Merge pull request #9656 from ioito/automated-cherry-pick-of-#9654-upstream-release-3.5
Automated cherry pick of #9654: fix(region): optimized azure rebuild root
2020-12-26 12:06:46 +08:00
Qu Xuan
1f2d4df530 fix(region): optimized azure rebuild root 2020-12-25 20:58:10 +08:00
Qu Xuan
8ece9d8772 fix(region): support rds secgroup operation 2020-12-25 19:14:41 +08:00
lvyangyang
b66535a272 fix(region): aws lb create tags param 2020-12-25 18:22:51 +08:00
Zexi Li
0877bce010 Merge pull request #9639 from ioito/automated-cherry-pick-of-#9637-upstream-release-3.5
Automated cherry pick of #9637: fix(cloudid): optimized system policy sync
2020-12-25 17:24:13 +08:00
Qiu Jian
9cfc42b3ca feature(climc): policy save data into file
Allow saveing policy data into file
2020-12-25 17:02:28 +08:00
Qu Xuan
7dd6c0b065 fix(cloudid): optimized system policy sync 2020-12-25 15:04:42 +08:00
Zexi Li
d6e08e9166 Merge pull request #9635 from ioito/automated-cherry-pick-of-#9633-upstream-release-3.5
Automated cherry pick of #9633: fix(region): sku.meta use global proxy
2020-12-25 01:26:29 +08:00
Zexi Li
ae752c37b1 Merge pull request #9631 from ioito/automated-cherry-pick-of-#9629-upstream-release-3.5
Automated cherry pick of #9629: fix(region): optimized disk allocate sched failed log
2020-12-24 17:48:12 +08:00
Zexi Li
4287957c34 Merge pull request #9624 from ioito/automated-cherry-pick-of-#9622-upstream-release-3.5
Automated cherry pick of #9622: fix(region): avoid openstack change config error
2020-12-24 17:42:18 +08:00
Zexi Li
a563069f74 Merge pull request #9621 from ioito/automated-cherry-pick-of-#9619-upstream-release-3.5
Automated cherry pick of #9619: fix(region): avolid panic when list role's policies
2020-12-24 17:35:23 +08:00
Qu Xuan
b5cff01af0 fix(region): sku.meta use global proxy 2020-12-24 17:25:08 +08:00
Qu Xuan
0624768a5c fix(region): optimized disk allocate sched failed log 2020-12-24 17:01:19 +08:00
Qu Xuan
e6e12bbc5f fix(region): avolid panic when list role's policies 2020-12-24 15:31:52 +08:00
Qu Xuan
849b76ccb2 fix(region): avoid openstack change config error 2020-12-24 11:52:32 +08:00
Zexi Li
53b475569b Merge pull request #9601 from yousong/automated-cherry-pick-of-#9599-upstream-release-3.5
Automated cherry pick of #9599: Bugfix/yousong climc ssh
2020-12-23 22:13:06 +08:00
Zexi Li
6ee12bbe73 Merge pull request #9608 from zhaoxiangchun/automated-cherry-pick-of-#9597-upstream-release-3.5
Automated cherry pick of #9597: fix(cloudmon): deal cannot get  azure metric
2020-12-23 22:10:20 +08:00
Zexi Li
6dfab1cfca Merge pull request #9615 from rainzm/automated-cherry-pick-of-#9613-upstream-release-3.5
Automated cherry pick of #9613: fix(notify): fit correctly when send notification via contact
2020-12-23 22:03:35 +08:00
rainzm
49c8d212aa fix(notify): fit correctly when send notification via contact 2020-12-23 17:51:23 +08:00
Zexi Li
cd1fbf12cc Merge pull request #9606 from rainzm/automated-cherry-pick-of-#9603-upstream-release-3.5
Automated cherry pick of #9603: feat(webhook): send webhook notification when c/d loadbalancerlisterrule
2020-12-23 15:16:15 +08:00
--global
4a0fd8d5a5 fix(cloudmon): deal cannot get azure metric
1.azure重构代码导致监控uri路径出错
2020-12-23 15:01:37 +08:00
rainzm
40d0ef9fb6 feat(webhook): send webhook notification when c/d loadbalancerlisterrule 2020-12-23 14:52:12 +08:00
Yousong Zhou
cb674c9097 fix(mcclient): options: webconsole: fix passing ssh port 2020-12-23 13:32:03 +08:00
Yousong Zhou
556cfe5de0 refactor(climc): webconsole: use helper methods of response struct 2020-12-23 13:32:03 +08:00
Yousong Zhou
49328f521c refactor(webconsole): api: add helper methods for response struct 2020-12-23 13:32:03 +08:00
Yousong Zhou
7085ae1e5b refactor(webconsole): use structured response 2020-12-23 13:32:03 +08:00
Zexi Li
b3b0b8340a Merge pull request #9549 from tb365/automated-cherry-pick-of-#9548-upstream-release-3.5
Automated cherry pick of #9548: Bugfix/tb bugfix 121801
2020-12-23 09:48:02 +08:00
Zexi Li
f5efa1ce10 Merge pull request #9572 from ioito/automated-cherry-pick-of-#9570-upstream-release-3.5
Automated cherry pick of #9570: fix(region): 避免从云上同步下来的主机,创建相同配置时network_id为空
2020-12-23 09:41:56 +08:00
Zexi Li
f2b19f24ba Merge pull request #9575 from ioito/automated-cherry-pick-of-#9573-upstream-release-3.5
Automated cherry pick of #9573: fix(region): add huawei gpssd desc
2020-12-23 09:37:11 +08:00
Zexi Li
452669d9e2 Merge pull request #9581 from zhaoxiangchun/automated-cherry-pick-of-#9579-upstream-release-3.5
Automated cherry pick of #9579: fix(monitor): other servier create alert add used_by param as a agreement
2020-12-23 09:35:15 +08:00
Zexi Li
8d45dc3142 Merge pull request #9586 from rainzm/automated-cherry-pick-of-#9584-upstream-release-3.5
Automated cherry pick of #9584: more convenient debugging and role isolation
2020-12-23 09:10:06 +08:00
Zexi Li
c6a267e828 Merge pull request #9591 from swordqiu/automated-cherry-pick-of-#9589-upstream-release-3.5
Automated cherry pick of #9589: fix(cloudevent,devtool): missing metadata table
2020-12-23 09:07:26 +08:00
Qiu Jian
ec8f914959 fix(cloudevent,devtool): missing metadata table 2020-12-23 03:12:35 +08:00
rainzm
5caf52ddf9 feat: download the role to tmpdir not system role dir 2020-12-22 20:22:48 +08:00
rainzm
d177c0e885 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:22:48 +08:00
Qu Xuan
c7e8ed6c2a fix(region): openstack network is regional 2020-12-22 16:27:02 +08:00
--global
8d8c7a1458 fix(monitor): other servier create alert add used_by param as a agreement
1.解决notify,meter中创建的对应的策略也展示在统一报警策略页面。通过used_by
  进行区分
2020-12-22 16:17:52 +08:00
Qu Xuan
a54480db19 fix(region): add huawei gpssd desc 2020-12-22 11:33:33 +08:00
Qu Xuan
cefc5cba7e fix(region): 避免从云上同步下来的主机,创建相同配置时network_id为空 2020-12-22 11:19:17 +08:00
TangBin
badc33c282 fix(region): change lbcert to sharable virtual resource 2020-12-22 10:29:45 +08:00
Zexi Li
7938630d36 Merge pull request #9568 from wanyaoqi/automated-cherry-pick-of-#9498-upstream-release-3.5
Automated cherry pick of #9498: server migrate misc fix
2020-12-22 10:06:15 +08:00
TangBin
c7b7819fb7 fix(region): goimports fix 2020-12-22 09:37:21 +08:00
yunion-ci-robot
2bcdd20ddf Merge pull request #9566 from zexi/automated-cherry-pick-of-#9564-upstream-release-3.5
Automated cherry pick of #9564: Hotfix/baremetal pxe net alloc
2020-12-21 23:49:39 +08:00
Zexi Li
7442a46321 Merge pull request #9546 from yousong/automated-cherry-pick-of-#9544-upstream-release-3.5
Automated cherry pick of #9544: fix(region): lbbackend: better error reporting for finding influxdb info
2020-12-21 21:07:54 +08:00
wanyaoqi
7abb04f60a fix(host): add print migrate progress info 2020-12-21 21:07:20 +08:00
wanyaoqi
75547092c6 fix(region): do not change disk status on migrating 2020-12-21 21:07:20 +08:00
Zexi Li
693daf9a91 Merge pull request #9557 from ioito/automated-cherry-pick-of-#9555-upstream-release-3.5
Automated cherry pick of #9555: fix(region): fix openstack instance os type
2020-12-21 21:04:08 +08:00
Zexi Li
8e2751e27e Merge pull request #9563 from ioito/automated-cherry-pick-of-#9561-upstream-release-3.5
Automated cherry pick of #9561: fix(cloudid): add <br> for notify templete
2020-12-21 20:59:33 +08:00
Zexi Li
1103680a6e fix(region,baremetal): choose candidate network not according by types 2020-12-21 20:49:35 +08:00
Zexi Li
7c0e264553 fix(region,baremetal): pxe net reuse converted server access ip 2020-12-21 20:49:35 +08:00
Qu Xuan
a70db9bd44 fix(cloudid): add <br> for notify templete 2020-12-21 20:42:56 +08:00
Qu Xuan
4258ed3a86 fix(region): fix openstack instance os type 2020-12-21 19:50:32 +08:00
TangBin
a3a380c385 fix(region): lbacl &lbcert default share scope 2020-12-21 17:34:06 +08:00
TangBin
ce46d75aa5 fix(region): elb acl validate create data fix 2020-12-21 17:34:04 +08:00
TangBin
f31b8a6d63 fix(region): aliyun elb listener&lbbg sync project 2020-12-21 17:34:04 +08:00
TangBin
9b40059458 fix(region): cert&acl cache delete condition check 2020-12-21 17:34:04 +08:00
Yousong Zhou
c7a4808341 fix(region): lbbackend: better error reporting for finding influxdb info 2020-12-21 16:52:19 +08:00
Zexi Li
cab0077d4a Merge pull request #9371 from ioito/automated-cherry-pick-of-#9360-upstream-release-3.5
Automated cherry pick of #9360: fix(region): sync servers
2020-12-21 10:40:51 +08:00
Zexi Li
9034d843b6 Merge pull request #9531 from swordqiu/automated-cherry-pick-of-#9529-upstream-release-3.5
Automated cherry pick of #9529: fix(taskman): use admin token if task userCred token expired
2020-12-20 02:06:53 +08:00
Qiu Jian
a2a13adf46 fix(taskman): use admin token if task userCred token expired
Use admin credential token if task cached userCred token expired
2020-12-20 01:22:09 +08:00
yunion-ci-robot
96f2cc3916 Merge pull request #9523 from zexi/automated-cherry-pick-of-#9521-upstream-release-3.5
Automated cherry pick of #9521: Storage actual size filter
2020-12-20 00:01:02 +08:00
Zexi Li
b7f813512c fix(scheduler): storage predicate add actualCapacity filter 2020-12-19 22:04:31 +08:00
Zexi Li
5b44cff65f Merge pull request #9526 from zexi/automated-cherry-pick-of-#9525-upstream-release-3.5
Automated cherry pick of #9525: fix(scheduler): remove unused k8s extender
2020-12-19 22:02:55 +08:00
Zexi Li
e88861f2c4 fix(scheduler): remove unused k8s extender 2020-12-19 21:48:10 +08:00
Zexi Li
0d67fcb4ce Merge pull request #9496 from wanyaoqi/automated-cherry-pick-of-#9494-upstream-release-3.5
Automated cherry pick of #9494: fix(region): guest to create input keep billing info
2020-12-19 20:05:59 +08:00
Zexi Li
52d767859e Merge pull request #9507 from ioito/automated-cherry-pick-of-#9159-upstream-release-3.5
Automated cherry pick of #9159: feat(region): add instance storage capability
2020-12-19 20:04:35 +08:00
Zexi Li
4af4c28b44 Merge pull request #9511 from ioito/automated-cherry-pick-of-#9509-upstream-release-3.5
Automated cherry pick of #9509: fix(region): azure async task
2020-12-19 20:02:43 +08:00
Zexi Li
e15f68b8ce Merge pull request #9514 from ioito/automated-cherry-pick-of-#9512-upstream-release-3.5
Automated cherry pick of #9512: fix(region): azure secgroup rule not allow with same priority and dir…
2020-12-19 20:01:12 +08:00
Zexi Li
72b08e38fe Merge pull request #9518 from swordqiu/automated-cherry-pick-of-#9515-upstream-release-3.5
Automated cherry pick of #9515: fix(host): telegraf listen on local ipv4 address explicitly
2020-12-19 18:11:55 +08:00
Qiu Jian
ee16a43865 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:49 +08:00
Qu Xuan
6aeea0f9bd fix(region): azure secgroup rule not allow with same priority and direction 2020-12-19 14:49:35 +08:00
Qu Xuan
91f0785df3 fix(region): azure async task 2020-12-19 14:02:39 +08:00
Zexi Li
6883ba8fa5 Merge pull request #9504 from swordqiu/automated-cherry-pick-of-#9502-upstream-release-3.5
Automated cherry pick of #9502: fix(keystone): always upload&refresh service config whenever service …
2020-12-19 11:41:54 +08:00
Qu Xuan
c9fb6b45de fix(region): sync servers 2020-12-19 10:27:33 +08:00
Zexi Li
638b64867d Merge pull request #9504 from swordqiu/automated-cherry-pick-of-#9502-upstream-release-3.5
Automated cherry pick of #9502: fix(keystone): always upload&refresh service config whenever service …
2020-12-19 09:32:52 +08:00
Qiu Jian
5dbf470b10 fix(keystone): always upload&refresh service config whenever service restart
Always upload&refresh service config whenever service restart
2020-12-19 00:54:25 +08:00
yunion-ci-robot
b39a45f903 Merge pull request #9492 from zexi/automated-cherry-pick-of-#9490-upstream-release-3.5
Automated cherry pick of #9490: Hotfix/baremetal pd makegood
2020-12-18 20:49:19 +08:00
Zexi Li
9890781c81 Merge pull request #9485 from rainzm/automated-cherry-pick-of-#9483-upstream-release-3.5
Automated cherry pick of #9483: Webhook better describe the life cycle of the guest
2020-12-18 20:38:06 +08:00
wanyaoqi
21ce2148a5 fix(region): guest to create input keep billing info 2020-12-18 16:20:46 +08:00
Zexi Li
d308afc537 fix(baremetal): clear jbod disks do PDMakeGood 2020-12-18 15:50:37 +08:00
rainzm
8000039659 feat(region): send webhook server_create when canceling pending delete 2020-12-18 13:12:06 +08:00
rainzm
1d73b39633 feat(region): distinguish between pending delete and delete notification 2020-12-18 13:12:06 +08:00
Zexi Li
3259503cc4 Merge pull request #9479 from yousong/automated-cherry-pick-of-#9458-upstream-release-3.5
Automated cherry pick of #9458: Bugfix/yousong eip ipaddr
2020-12-18 12:51:38 +08:00
Zexi Li
68e97d3195 Merge pull request #9474 from yousong/automated-cherry-pick-of-#9472-upstream-release-3.5
Automated cherry pick of #9472: Bugfix/yousong host mtu
2020-12-18 00:19:32 +08:00
Yousong Zhou
6efd36ff27 fix(region): eip_allocate_task: set eip status allocate_fail on task failure 2020-12-17 22:01:22 +08:00
Yousong Zhou
58f389ce1b fix(region,climc): eips: rename arg name for requested eip addr 2020-12-17 22:01:22 +08:00
Yousong Zhou
75e2407c12 fix(region): guestnetworks: use net calculated mtu 2020-12-17 21:51:42 +08:00
Yousong Zhou
09756f97df feat(region): networks: add getMtu method 2020-12-17 21:51:42 +08:00
Yousong Zhou
e255cbf222 feat(apis): add const VPC_OVN_ENCAP_COST 2020-12-17 21:51:42 +08:00
Yousong Zhou
172d84d46f feat(host): startvm: set vpc nic mtu
Windows DHCP client does not respect DHCP MTU option
2020-12-17 21:51:42 +08:00
Yousong Zhou
da4cb8864c feat(host): startvm: add nic_mtu shell func 2020-12-17 21:51:42 +08:00
Yousong Zhou
54cf74c9e1 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:42 +08:00
Yousong Zhou
b8261f2107 refactor(host): startvm: nic_speed: use raw string 2020-12-17 21:51:42 +08:00
Yousong Zhou
fde96ae645 refactor(host): startvm: add QEMU_CMD_KVM_ARG 2020-12-17 21:51:41 +08:00
Zexi Li
8d59105144 Merge pull request #9465 from rainzm/automated-cherry-pick-of-#9463-upstream-release-3.5
Automated cherry pick of #9463: fix(region): exclude network recommended for host when suggesting net…
2020-12-17 11:21:57 +08:00
Zexi Li
0fc37ffb42 Merge pull request #9468 from tb365/automated-cherry-pick-of-#9467-upstream-release-3.5
Automated cherry pick of #9467: fix(region): skus add cloudenv
2020-12-17 11:17:39 +08:00
TangBin
ec768fe2bd fix(region): skus add cloudenv 2020-12-17 11:04:36 +08:00
rainzm
f4cf22fee7 fix(region): exclude network recommended for host when suggesting network for guest 2020-12-17 10:13:28 +08:00
Zexi Li
71b18716b4 Merge pull request #9456 from zexi/automated-cherry-pick-of-#9454-upstream-release-3.5
Automated cherry pick of #9454: fix(scheduler): fetch input network when specified
2020-12-16 18:24:53 +08:00
Zexi Li
42dc85463c fix(scheduler): fetch input network when specified 2020-12-16 17:51:15 +08:00
Zexi Li
c02c8c84fb Merge pull request #9451 from swordqiu/automated-cherry-pick-of-#9443-upstream-release-3.5
Automated cherry pick of #9443: Bugfix/tb bugfix 121501
2020-12-16 12:25:55 +08:00
Qiu Jian
59ad228f41 fix: backport routetable 2020-12-16 12:07:02 +08:00
TangBin
0947e9d1c8 fix(awscli): instance-rebuild-root fix 2020-12-16 11:31:04 +08:00
TangBin
ff70acf092 fix(region): vpc sync external access mode fix 2020-12-16 11:31:04 +08:00
TangBin
e42520d9de fix(region): vpc usable fix 2020-12-16 11:31:04 +08:00
TangBin
3b4dfd822b fix(region): aws create vpc with igw add defaultroute 2020-12-16 11:31:04 +08:00
TangBin
73221a3462 fix(region): aws delete vpc skipped delete main route table 2020-12-16 11:31:04 +08:00
TangBin
1f515eb9ff fix(region): aws vpc delete skip delete default secgroup 2020-12-16 11:31:04 +08:00
TangBin
b2071fa45b fix(region): aws vpc delete related route table & internet gateway 2020-12-16 11:31:04 +08:00
TangBin
e45bfdcd39 fix(region): sku list query print missing error info 2020-12-16 11:31:04 +08:00
TangBin
fd4dd4c822 fix(region): aws create storage type fix 2020-12-16 11:31:04 +08:00
TangBin
e7fd659b64 fix(region): aws create root device name fix 2020-12-16 11:28:31 +08:00
TangBin
0f7e66567a fix(region): vpc create validate cidr mask length 2020-12-16 11:28:31 +08:00
TangBin
d4e85e0c73 fix(region): aws detach igw before delete vpc 2020-12-16 11:28:31 +08:00
TangBin
f9f044a85f fix(region): vpc list usable fix 2020-12-16 11:23:12 +08:00
TangBin
63f5fdc76e feat(region): server list add parameter eip_associable 2020-12-16 11:23:12 +08:00
Zexi Li
c5ab620555 Merge pull request #9421 from zexi/automated-cherry-pick-of-#9418-upstream-release-3.5
Automated cherry pick of #9418: fix(region): baremetal post update related server
2020-12-16 10:40:59 +08:00
yunion-ci-robot
39f2f54621 Merge pull request #9437 from wanyaoqi/automated-cherry-pick-of-#9435-upstream-release-3.5
Automated cherry pick of #9435: fix(host): fix set windows password with escape charater
2020-12-15 20:51:19 +08:00
wanyaoqi
50b412a32b fix(host): fix set windows password with escape charater 2020-12-15 16:57:40 +08:00
Zexi Li
f53bb4ec24 Merge pull request #9433 from zexi/automated-cherry-pick-of-#9431-upstream-release-3.5
Automated cherry pick of #9431: Fix/climc server create desc
2020-12-15 11:54:32 +08:00
Zexi Li
ad1d819704 Merge pull request #9428 from yousong/automated-cherry-pick-of-#9426-upstream-release-3.5
Automated cherry pick of #9426: fix(vpcagent): ovn: stable dns A record value
2020-12-15 11:45:17 +08:00
Zexi Li
1585ded64b fix(climc): server-create --desc not work 2020-12-15 11:36:25 +08:00
Yousong Zhou
a1055edbe4 fix(vpcagent): ovn: stable dns A record value 2020-12-15 11:09:26 +08:00
Zexi Li
d916028df7 Merge pull request #9422 from wanyaoqi/automated-cherry-pick-of-#9417-upstream-release-3.5
Automated cherry pick of #9417: fix(region,host): fix hot remove nic
2020-12-15 00:08:05 +08:00
Zexi Li
68d840b6ab Merge pull request #9425 from swordqiu/automated-cherry-pick-of-#9415-upstream-release-3.5
Automated cherry pick of #9415: fix(keystone): update user attributes whenever user login
2020-12-15 00:06:00 +08:00
Qiu Jian
2c40a424fc fix(keystone): update user attributes whenever user login
update user attribtues whenever user login
2020-12-14 22:29:53 +08:00
Zexi Li
0119597b9a fix(region): baremetal post update related server 2020-12-14 19:16:21 +08:00
wanyaoqi
34a6962947 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:46 +08:00
wanyaoqi
904e929d00 fix(host): fix check hugepage enabled 2020-12-14 19:01:46 +08:00
Zexi Li
41016a6521 Merge pull request #9413 from zexi/automated-cherry-pick-of-#9411-upstream-release-3.5
Automated cherry pick of #9411: fix(scheduler): sku filter check zone if only prefer region specified
2020-12-14 17:56:50 +08:00
Zexi Li
da070b541c fix(scheduler): sku filter check zone if only prefer region specified 2020-12-14 17:26:43 +08:00
Zexi Li
f66a245d6e Merge pull request #9406 from zexi/automated-cherry-pick-of-#9405-upstream-release-3.5
Automated cherry pick of #9405: Hotfix/webconsole trim url
2020-12-14 17:21:23 +08:00
Zexi Li
b998fb3e64 Merge pull request #9375 from rainzm/automated-cherry-pick-of-#9373-upstream-release-3.5
Automated cherry pick of #9373: feat(region): larger suggest network and more complete vlanid
2020-12-14 15:57:54 +08:00
Zexi Li
1185d17d16 Merge pull request #9396 from zexi/automated-cherry-pick-of-#9394-upstream-release-3.5
Automated cherry pick of #9394: fix(scheduler): get candidates error more info
2020-12-14 15:52:31 +08:00
Zexi Li
9b83ec21bb fix(webconsole): trim api_server url if end with slashes 2020-12-14 15:47:27 +08:00
Zexi Li
2215431a4c Merge pull request #9401 from rainzm/automated-cherry-pick-of-#9399-upstream-release-3.5
Automated cherry pick of #9399: fix(notify): avoid deadlock
2020-12-14 15:45:46 +08:00
rainzm
003a1798e5 fix(notify): avoid deadlock 2020-12-14 15:06:23 +08:00
Zexi Li
43be5960b5 fix(scheduler): get candidates error more info 2020-12-14 14:40:19 +08:00
rainzm
aa4cce77d4 feat(region): add test for CloudaccountManger.PerformPrepareNets 2020-12-14 14:18:36 +08:00
rainzm
f1ef6adc2d feat(region): larger suggest network and more complete vlanid
1. 抓取标准 PortGroup 的 vlanid,以前只有分布式 PortGroup 的 vlanid
2. 提供的建议网络会尽可能的大
2020-12-14 14:18:36 +08:00
Zexi Li
5253e9d8f8 Merge pull request #9388 from tb365/automated-cherry-pick-of-#9386-upstream-release-3.5
Automated cherry pick of #9386: feat(region): support sync skus by cloudregion
2020-12-13 13:51:35 +08:00
tangbin
789933a4df feat(region): goimport fmt check fix 2020-12-13 13:09:24 +08:00
Zexi Li
2fd72dd157 Merge pull request #9392 from swordqiu/automated-cherry-pick-of-#9390-upstream-release-3.5
Automated cherry pick of #9390: fix(region): network reserved ip count not consider expiration of reserved ips
2020-12-13 12:09:26 +08:00
Qiu Jian
d4b62af9d9 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:47:51 +08:00
TangBin
53441d5856 feat(region): support sync skus by cloudregion 2020-12-12 19:10:29 +08:00
Zexi Li
1078739bf0 Merge pull request #9377 from tb365/automated-cherry-pick-of-#9359-upstream-release-3.5
Automated cherry pick of #9359: Bugfix/tb bugfix cmb 1210
2020-12-12 18:28:58 +08:00
TangBin
bbfa072173 fix(region): goimports fix 2020-12-12 17:58:08 +08:00
TangBin
d2414c2131 feat(region): support sync skus by cloudregion 2020-12-12 17:27:37 +08:00
TangBin
5898ff51d3 fix(region): server login info& keypair import input parameter trimspace 2020-12-12 17:18:57 +08:00
Zexi Li
b95299beb5 Merge pull request #9365 from swordqiu/automated-cherry-pick-of-#9361-upstream-release-3.5
Automated cherry pick of #9361: fix(keystone): allow unlink a domain from an IDP
2020-12-12 00:16:45 +08:00
Zexi Li
37bb9d8c24 Merge pull request #9368 from swordqiu/automated-cherry-pick-of-#9366-upstream-release-3.5
Automated cherry pick of #9366: fix(keystone): ignore service config update without changes
2020-12-12 00:13:53 +08:00
Qiu Jian
95ce8aae6b fix(keystone): ignore service config update without changes
ignore service config updates that no changes happen. prevent service
config change infomrer messages from flushing the log.
2020-12-11 22:22:16 +08:00
Qiu Jian
062a16ea89 fix(keystone): allow unlink a domain from an IDP
allow unlink a domain from an IDP
2020-12-11 21:51:45 +08:00
Zexi Li
676f19193e Merge pull request #9358 from ioito/automated-cherry-pick-of-#9356-upstream-release-3.5
Automated cherry pick of #9356: fix(region): sku enabled
2020-12-11 19:37:36 +08:00
Qu Xuan
bce899df2d fix(region): sku enabled 2020-12-11 17:09:12 +08:00
yunion-ci-robot
847fef5b11 Merge pull request #9337 from zexi/automated-cherry-pick-of-#9335-upstream-release-3.5
Automated cherry pick of #9335: Hotfix/baremetal convert host
2020-12-11 13:32:22 +08:00
Zexi Li
88a88b6ace Merge pull request #9344 from ioito/automated-cherry-pick-of-#9339-upstream-release-3.5
Automated cherry pick of #9339: fix(region,yunionapi,glance): using global proxy
2020-12-11 11:40:53 +08:00
Zexi Li
1541307185 Merge pull request #9354 from zexi/automated-cherry-pick-of-#9352-upstream-release-3.5
Automated cherry pick of #9352: Bugfix/scheduler SKU net
2020-12-11 09:18:26 +08:00
Zexi Li
171969e457 fix(scheduler): sku by region and fill onecloud vpc networks 2020-12-10 21:14:14 +08:00
Zexi Li
82172c153c Merge pull request #9333 from ioito/automated-cherry-pick-of-#9331-upstream-release-3.5
Automated cherry pick of #9331: fix(region): openstack hosts sync
2020-12-10 20:40:13 +08:00
Zexi Li
2557066c4b Merge pull request #9349 from swordqiu/automated-cherry-pick-of-#9347-upstream-release-3.5
Automated cherry pick of #9347: fix(cloudcommon): perform public should check the sharing scope of
2020-12-10 20:38:08 +08:00
Zexi Li
984d429ff7 Merge pull request #9342 from ioito/automated-cherry-pick-of-#9340-upstream-release-3.5
Automated cherry pick of #9340: fix(region): import rule error hint
2020-12-10 20:33:32 +08:00
Qiu Jian
41159bddf7 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:49 +08:00
Qu Xuan
587dec7f89 fix(region,yunionapi,glance): using global proxy 2020-12-10 18:34:50 +08:00
Qu Xuan
5d02e162f7 fix(region): import rule error hint 2020-12-10 18:29:56 +08:00
Zexi Li
e34e65fd08 Merge pull request #9328 from rainzm/automated-cherry-pick-of-#9325-upstream-release-3.5
Automated cherry pick of #9325: Try to repull contacts when changing notify config
2020-12-10 17:22:29 +08:00
Zexi Li
a464e7f8de Merge pull request #9300 from ioito/automated-cherry-pick-of-#9298-upstream-release-3.5
Automated cherry pick of #9298: fix(region): support openstack subnet allocation pools
2020-12-10 17:18:00 +08:00
Zexi Li
4b79bdab04 Merge pull request #9322 from swordqiu/automated-cherry-pick-of-#9320-upstream-release-3.5
Automated cherry pick of #9320: fix(cloudcommon): disable quota check by default
2020-12-10 17:08:45 +08:00
Zexi Li
1d15c4ceb0 fix(baremetal): convert to host failed
- convert schedule should include converting status
- auto register name should lowercase
- finish convert set host name by guest
2020-12-10 16:59:06 +08:00
Qu Xuan
6c385596dd fix(region): openstack hosts sync 2020-12-10 16:56:32 +08:00
rainzm
e106d21931 fix(notify): repull subcontact after changing config 2020-12-10 10:39:47 +08:00
rainzm
a00cbeecb4 fix(notify): check for changes before updating config 2020-12-10 10:39:47 +08:00
rainzm
2b25237d6d refactor(notify): add StartSubcontactPullTask for receiver 2020-12-10 10:39:47 +08:00
Qiu Jian
804c8572da 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:25:18 +08:00
Zexi Li
cbae2619a8 Merge pull request #9294 from rainzm/automated-cherry-pick-of-#9292-upstream-release-3.5
Automated cherry pick of #9292: feat(notify): add intellij-get for receiver
2020-12-09 20:43:31 +08:00
Zexi Li
47bb9109ed Merge pull request #9261 from wanyaoqi/automated-cherry-pick-of-#9259-upstream-release-3.5
Automated cherry pick of #9259: fix(region): attach network on register baremetal server
2020-12-09 20:40:42 +08:00
Zexi Li
7cc33ea07e Merge pull request #9304 from ioito/automated-cherry-pick-of-#9302-upstream-release-3.5
Automated cherry pick of #9302: fix(region): optimized qcloud prepaid instance delete
2020-12-09 20:37:37 +08:00
Zexi Li
3a24a9a38d Merge pull request #9306 from ioito/automated-cherry-pick-of-#9305-upstream-release-3.5
Automated cherry pick of #9305: fix(region): optimized openstack change config
2020-12-09 20:36:28 +08:00
Zexi Li
24f747959f Merge pull request #9310 from yousong/automated-cherry-pick-of-#9308-upstream-release-3.5
Automated cherry pick of #9308: Bugfix/yousong eip chargetype
2020-12-09 20:35:08 +08:00
Zexi Li
ae9cba42e8 Merge pull request #9317 from wanyaoqi/automated-cherry-pick-of-#9315-upstream-release-3.5
Automated cherry pick of #9315: fix(host): check lease living on restart etcd session
2020-12-09 20:33:19 +08:00
rainzm
3909beff7b feat(notify): user cmdline helpler for climc notify-receiver-xxx 2020-12-09 17:04:10 +08:00
rainzm
958d79e6d1 feat(notify): add intellij-get for receiver 2020-12-09 17:04:10 +08:00
wanyaoqi
56a93bed33 fix(host): check lease living on restart etcd session 2020-12-09 16:56:34 +08:00
Yousong Zhou
d15ed65c4e refactor(apis): compute: remove EIP_CHARGE_TYPE_DEFAULT
The default is now cloud provider specific
2020-12-09 12:17:10 +08:00
Yousong Zhou
f13bdc88a5 fix(region): sanitize eip charge type on all callsites 2020-12-09 12:17:10 +08:00
Yousong Zhou
a42675be8a feat(region): regiondriver: add methods on eip charge type 2020-12-09 12:17:10 +08:00
Qu Xuan
4d9c70e649 fix(region): optimized openstack change config 2020-12-09 11:51:02 +08:00
Qu Xuan
0288f76464 fix(region): optimized qcloud prepaid instance delete 2020-12-09 11:50:08 +08:00
Qu Xuan
aa15c582dd fix(region): support openstack subnet allocation pools 2020-12-09 10:30:26 +08:00
Zexi Li
d843dacb6f Merge pull request #9255 from ioito/automated-cherry-pick-of-#9253-upstream-release-3.5
Automated cherry pick of #9253: fix(region): temp url sign wrong
2020-12-08 21:39:51 +08:00
Zexi Li
1be41ba1e1 Merge pull request #9265 from ioito/automated-cherry-pick-of-#9263-upstream-release-3.5
Automated cherry pick of #9263: fix(region): azure instance data disk storage type
2020-12-08 21:38:54 +08:00
Zexi Li
e4d49c2e65 Merge pull request #9281 from ioito/automated-cherry-pick-of-#9266-upstream-release-3.5
Automated cherry pick of #9266: fix(region): openstack available zones
2020-12-08 21:37:50 +08:00
Zexi Li
3968509700 Merge pull request #9279 from wanyaoqi/automated-cherry-pick-of-#9277-upstream-release-3.5
Automated cherry pick of #9277: fix(region): validate isolated devices on migrate
2020-12-08 21:36:04 +08:00
Zexi Li
5f04d03ae2 Merge pull request #9284 from ioito/automated-cherry-pick-of-#9282-upstream-release-3.5
Automated cherry pick of #9282: fix(region): restore password validate condition
2020-12-08 21:35:18 +08:00
Zexi Li
a92eacf145 Merge pull request #9287 from ioito/automated-cherry-pick-of-#9285-upstream-release-3.5
Automated cherry pick of #9285: fix(region): sync account id
2020-12-08 21:34:22 +08:00
Zexi Li
c2a5bac00f Merge pull request #9290 from zhasm/automated-cherry-pick-of-#9288-upstream-release-3.5
Automated cherry pick of #9288: fix(git,make): 更新获取 git branch 的规则
2020-12-08 18:11:40 +08:00
Zhang Dongliang
e28e9e8c79 fix(git,make): 更新获取 git branch 的规则 2020-12-08 18:00:55 +08:00
Qu Xuan
dbe031e85b fix(region): sync account id 2020-12-08 17:59:03 +08:00
Qu Xuan
dc3aaa91a9 fix(region): restore password validate condition 2020-12-08 17:46:44 +08:00
yunion-ci-robot
cc1402db32 Merge pull request #9274 from wanyaoqi/automated-cherry-pick-of-#9272-upstream-release-3.5
Automated cherry pick of #9272: fix(host-deployer): cancel rename centos vgname
2020-12-08 17:08:07 +08:00
Qu Xuan
7117033694 fix(region): openstack available zones 2020-12-08 17:01:58 +08:00
wanyaoqi
b75a0d7b3e fix(region): validate isolated devices on migrate 2020-12-08 16:51:38 +08:00
Zexi Li
540fe8d601 Merge pull request #9270 from zhasm/automated-cherry-pick-of-#9268-upstream-release-3.5
Automated cherry pick of #9268: fix(git,make): git branch 获取方式优化
2020-12-08 16:35:39 +08:00
wanyaoqi
b3e680b58d fix(host-deployer): cancel rename centos vgname 2020-12-08 16:30:10 +08:00
Zhang Dongliang
c26f136296 fix(git,make): git branch 获取方式优化 2020-12-08 15:52:16 +08:00
Qu Xuan
7b49f840f2 fix(region): azure instance data disk storage type 2020-12-08 15:03:39 +08:00
Zexi Li
320084261f Merge pull request #9257 from zhasm/automated-cherry-pick-of-#9230-upstream-release-3.5
Automated cherry pick of #9230: fix(git,make): 修正 gitbranch 变量的获取方式,解决自动升级版本 tag 不统一的问题
2020-12-08 12:50:57 +08:00
wanyaoqi
74dc7d8b6d fix(region): attach network on register baremetal server 2020-12-08 12:07:47 +08:00
Zhang Dongliang
7260430668 fix(git,make): 修正 gitbranch 变量的获取方式,允许外部传入,解决自动升级版本 tag 不统一的问题 2020-12-08 11:51:12 +08:00
Qu Xuan
756e30e1f4 fix(region): temp url sign wrong 2020-12-08 11:36:58 +08:00
Zexi Li
9f87f6a656 Merge pull request #9149 from ioito/automated-cherry-pick-of-#9146-upstream-release-3.5
Automated cherry pick of #9146: fix(keystone): allow refresh scope resource
2020-12-08 09:40:26 +08:00
Zexi Li
23294a3813 Merge pull request #9250 from swordqiu/automated-cherry-pick-of-#9248-upstream-release-3.5
Automated cherry pick of #9248: fix(keystone): oidc driver turn on debug mode if log-level is debug
2020-12-08 09:29:05 +08:00
Qiu Jian
e162617236 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:59 +08:00
Zexi Li
108718c3e9 Merge pull request #9245 from ioito/automated-cherry-pick-of-#9243-upstream-release-3.5
Automated cherry pick of #9243: fix(region): azure reset windows os password
2020-12-07 22:19:03 +08:00
Zexi Li
89ff6d7c01 Merge pull request #9242 from ioito/automated-cherry-pick-of-#9240-upstream-release-3.5
Automated cherry pick of #9240: fix(region): avoid timeout for waiting azure async task
2020-12-07 20:41:25 +08:00
Zexi Li
501e8423b7 Merge pull request #9225 from tb365/automated-cherry-pick-of-#9224-upstream-release-3.5
Automated cherry pick of #9224: Bugfix/tb bugfix 1207
2020-12-07 20:37:16 +08:00
Qu Xuan
452759049c fix(region): azure reset windows os password 2020-12-07 20:20:26 +08:00
Zexi Li
6a7221db98 Merge pull request #9222 from ioito/automated-cherry-pick-of-#9220-upstream-release-3.5
Automated cherry pick of #9220: fix(region): region qcloud secgroup project id
2020-12-07 20:18:28 +08:00
Zexi Li
c84fab3bc4 Merge pull request #9229 from ioito/automated-cherry-pick-of-#9227-upstream-release-3.5
Automated cherry pick of #9227: fix(region): avoid resize azure disk error
2020-12-07 20:16:59 +08:00
Zexi Li
22a4157900 Merge pull request #9239 from rainzm/automated-cherry-pick-of-#9237-upstream-release-3.5
Automated cherry pick of #9237: feat(notify): add webconsole in enabled contact types
2020-12-07 19:57:54 +08:00
Qu Xuan
de78bd5ce0 fix(region): avoid timeout for waiting azure async task 2020-12-07 19:51:04 +08:00
rainzm
8f1378fd3f feat(notify): add webconsole in enabled contact types 2020-12-07 19:15:28 +08:00
TangBin
3b84b78bcf fix(region): lb listener filter by acl_id 2020-12-07 17:38:04 +08:00
TangBin
9d3e90a181 fix(region): redis master zone empty fix 2020-12-07 17:38:04 +08:00
TangBin
9f0c4ea53f fix(region): elastic cache name is empty fix
#6527
2020-12-07 17:38:04 +08:00
Qu Xuan
26052b9fe2 fix(region): avoid resize azure disk error 2020-12-07 15:27:39 +08:00
Zexi Li
b33b765c17 Merge pull request #9209 from ioito/automated-cherry-pick-of-#9205-upstream-release-3.5
Automated cherry pick of #9205: fix(region): validate invalid character for password
2020-12-07 10:52:13 +08:00
Qu Xuan
8b92f88159 fix(keystone): allow refresh scope resource 2020-12-07 10:48:34 +08:00
Qu Xuan
e43fbf4486 fix(region): region qcloud secgroup project id 2020-12-07 10:28:07 +08:00
Zexi Li
354dcbc41b Merge pull request #9206 from tb365/automated-cherry-pick-of-#9202-upstream-release-3.5
Automated cherry pick of #9202: Bugfix/tb bugfix 1204
2020-12-07 10:24:06 +08:00
Qu Xuan
830239c063 fix(region): validate invalid character for password 2020-12-07 10:08:27 +08:00
TangBin
cf00475987 fix(region): change dbinstance sku sync info log to warn 2020-12-07 10:00:41 +08:00
TangBin
3945ec37b5 fix(region): dbinstance skus sync log level fix 2020-12-07 10:00:41 +08:00
TangBin
c400796043 fix(region): server skus add cloud_env 2020-12-07 10:00:41 +08:00
Zexi Li
d827d5039a Merge pull request #9219 from ioito/automated-cherry-pick-of-#9217-upstream-release-3.5
Automated cherry pick of #9217: fix(region): optimized qcloud secgroup sync, only redis need secgroup be in same project
2020-12-04 20:31:38 +08:00
Qu Xuan
df8d24c228 fix(region): optimized qcloud secgroup sync, only redis need secgroup be in same project 2020-12-04 19:47:10 +08:00
Zexi Li
f5c8070d7e Merge pull request #9212 from ioito/automated-cherry-pick-of-#9210-upstream-release-3.5
Automated cherry pick of #9210: fix(region): azure metric request path
2020-12-04 18:00:57 +08:00
Qu Xuan
ab967f1e41 fix(region): azure metric request path 2020-12-04 17:14:40 +08:00
Zexi Li
132e49c5ea Merge pull request #9199 from lvyangyang/automated-cherry-pick-of-#9196-upstream-release-3.5
Automated cherry pick of #9196: feat(region): add bucket cloud tags support
2020-12-04 16:57:49 +08:00
Zexi Li
dc95b84860 Merge pull request #9198 from rainzm/automated-cherry-pick-of-#9066-upstream-release-3.5
Automated cherry pick of #9066: feat(region): add wire level for preparing network
2020-12-04 14:53:25 +08:00
lvyangyang
e469dd9694 feat(region): add bucket cloud tags support 2020-12-04 14:37:58 +08:00
lvyangyang
189ffd336c fix(region): fix modify tags log 2020-12-04 14:37:58 +08:00
rainzm
bd40fb97dc feat(climc): add cloud-account-preparenets-vmware command 2020-12-04 14:32:51 +08:00
rainzm
d5a211983a feat(region): allow prepare nets for existed cloudaccounts
纳管云账号 -> 合并网段 -> 为vmware集群添加新的宿主机 ->
如何获取网络信息?

如果重新纳管,那么合并网段的工作又得做一次,很不方便。
最好的方法是,preparenets 接口支持已经存在的 cloudaccount,这样
就可以根据推荐的网络手动设置新设备的网络。
2020-12-04 14:32:51 +08:00
rainzm
0c940bb734 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:51 +08:00
Zexi Li
8dcfa2e3c9 Merge pull request #9191 from rainzm/automated-cherry-pick-of-#9189-upstream-release-3.5
Automated cherry pick of #9189: fix(region): remove default value of diskConfig.Medium
2020-12-04 10:41:33 +08:00
Zexi Li
db4c0bbde4 Merge pull request #9186 from rainzm/automated-cherry-pick-of-#9183-upstream-release-3.5
Automated cherry pick of #9183: fix(region): inspect invalid guest template
2020-12-04 10:21:18 +08:00
Zexi Li
74854b6fd1 Merge pull request #9194 from swordqiu/automated-cherry-pick-of-#9192-upstream-release-3.5
Automated cherry pick of #9192: fix(apigateway): allow logout by get method
2020-12-04 10:16:37 +08:00
rainzm
9524fba27c fix(region): remove default value of diskConfig.Medium
#8830 中,对调度器增加了通过请求磁盘的介质类型过滤存储的功能。

如果使用 climc 创建虚拟机且不要求磁盘有固定的介质类型,将
只能分配到 hybrid 的存储;进一步,如果没有 hybrid 的存储,将会调度失败。
2020-12-04 09:59:41 +08:00
Qiu Jian
5c66fe8431 fix(apigateway): allow logout by get method
All visit logout URL by GET method
2020-12-04 01:13:31 +08:00
rainzm
31fb63c736 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:43:40 +08:00
Zexi Li
e4e346b04a Merge pull request #9179 from zexi/automated-cherry-pick-of-#9176-upstream-release-3.5
Automated cherry pick of #9176: fix(scheduler): select resource unordered
2020-12-03 19:55:40 +08:00
Zexi Li
51a42b29c6 Merge pull request #9169 from lvyangyang/automated-cherry-pick-of-#9147-upstream-release-3.5
Automated cherry pick of #9147: feat(region): 多云 bucket  website.cors,referer 配置
2020-12-03 19:00:15 +08:00
Zexi Li
e69d3391c1 fix(scheduler): select resource unordered 2020-12-03 18:43:42 +08:00
Zexi Li
d57cea3ffe Merge pull request #9174 from yousong/automated-cherry-pick-of-#8483-upstream-release-3.5
Automated cherry pick of #8483: fix: climc vpc-create missing cloudregion_id
2020-12-03 18:33:42 +08:00
Qiu Jian
63fa0ec972 fix: climc vpc-create missing cloudregion_id 2020-12-03 18:18:27 +08:00
lvyangyang
71868ef2ef feat(region): 多云 bucket website.cors,referer 配置 2020-12-03 15:22:12 +08:00
Zexi Li
0b946098d7 Merge pull request #9137 from ioito/automated-cherry-pick-of-#9135-upstream-release-3.5
Automated cherry pick of #9135: feat(cloudid): notify clouduser created
2020-12-03 15:17:19 +08:00
Zexi Li
b4cce1705c Merge pull request #9165 from wanyaoqi/automated-cherry-pick-of-#9163-upstream-release-3.5
Automated cherry pick of #9163: bugfix(region): fix list by srever type normal
2020-12-03 14:43:19 +08:00
Zexi Li
f640ca1189 Merge pull request #9167 from zhaoxiangchun/automated-cherry-pick-of-#9138-upstream-release-3.5
Automated cherry pick of #9138: fix(monitor): modify influxdbSuggestDriver query err
2020-12-03 14:42:22 +08:00
zhaoxiangchun
2718630233 fix(monitor): modify influxdbSuggestDriver query err
1.修复influxdb相关的建议规则查询数据失败的问题
2020-12-03 13:05:05 +08:00
wanyaoqi
2d4a5dd453 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:08:29 +08:00
Zexi Li
6fa21050fa Merge pull request #9156 from wanyaoqi/automated-cherry-pick-of-#9154-upstream-release-3.5
Automated cherry pick of #9154: feat(region): add list filter server type
2020-12-03 09:33:47 +08:00
Zexi Li
d5f7658e6b Merge pull request #9152 from ioito/automated-cherry-pick-of-#9150-upstream-release-3.5
Automated cherry pick of #9150: fix(region): avoid qcloud sync local disk error
2020-12-02 21:05:19 +08:00
wanyaoqi
89254cac88 feat(region): add list filter server type
list server by specific server type: normal, gpu, backup

cherrypick: release/3.4
2020-12-02 20:31:12 +08:00
Qu Xuan
a11115559b fix(region): avoid qcloud sync local disk error 2020-12-02 20:27:32 +08:00
Zexi Li
dc98615a4a Merge pull request #9142 from swordqiu/automated-cherry-pick-of-#9140-upstream-release-3.5
Automated cherry pick of #9140: fix(keystone): not allow to disable sql driver
2020-12-02 17:08:43 +08:00
Qiu Jian
5abf887768 fix(keystone): not allow to disable sql driver
not allow to disable default SQL identity_provider driver
2020-12-02 16:40:57 +08:00
Qu Xuan
546be36a4b feat(cloudid): notify clouduser created 2020-12-02 14:38:24 +08:00
Zexi Li
a638781cf2 Merge pull request #9133 from ioito/automated-cherry-pick-of-#9131-upstream-release-3.5
Automated cherry pick of #9131: fix(cloudid): sync qcloud collaborators user
2020-12-01 21:08:03 +08:00
Zexi Li
85f11e4939 Merge pull request #9125 from ioito/automated-cherry-pick-of-#9123-upstream-release-3.5
Automated cherry pick of #9123: fix(region): allow delete resource which status is unknown
2020-12-01 21:05:00 +08:00
Zexi Li
05f65660f5 Merge pull request #9106 from rainzm/automated-cherry-pick-of-#9104-upstream-release-3.5
Automated cherry pick of #9104: fix(notify): return the result of the second attempt to execute the rpc call
2020-12-01 21:03:23 +08:00
Qu Xuan
2b65e57f9f fix(cloudid): sync qcloud collaborators user 2020-12-01 20:37:25 +08:00
Zexi Li
6dccb3125a Merge pull request #9111 from yousong/automated-cherry-pick-of-#9109-upstream-release-3.5
Automated cherry pick of #9109: fix(host): make sure it won't match vpc guests by accident
2020-12-01 20:13:38 +08:00
Zexi Li
c555c892f9 Merge pull request #9122 from ioito/automated-cherry-pick-of-#9120-upstream-release-3.5
Automated cherry pick of #9120: fix(region): allow update rds account and database desc
2020-12-01 19:33:09 +08:00
Zexi Li
e2a0d7c670 Merge pull request #9118 from rainzm/automated-cherry-pick-of-#9116-upstream-release-3.5
Automated cherry pick of #9116: fix(region): delete guest without 'purge' in GuestDetachScalingGroupTask
2020-12-01 19:32:09 +08:00
rainzm
2e47ca7ed5 fix(notify): return the result of the second attempt to execute the rpc call 2020-12-01 18:24:24 +08:00
Qu Xuan
46b4bc58ae fix(region): allow delete resource which status is unknown 2020-12-01 17:18:18 +08:00
Qu Xuan
a4a0c971a8 fix(region): allow update rds account and database desc 2020-12-01 16:39:38 +08:00
rainzm
c4e4e35149 fix(region): delete guest without 'purge' in GuestDetachScalingGroupTask 2020-12-01 16:03:06 +08:00
Yousong Zhou
41afdb8ec7 fix(host): make sure it won't match vpc guests by accident 2020-12-01 15:33:12 +08:00
Zexi Li
0b0d1113dc Merge pull request #9098 from yousong/automated-cherry-pick-of-#9096-upstream-release-3.5
Automated cherry pick of #9096: Bugfix/yousong informer
2020-12-01 09:34:07 +08:00
Yousong Zhou
27f73c0388 fix(taskman): SSubTask: set model manager 2020-11-30 23:12:44 +08:00
Yousong Zhou
d7f14bb25e fix(region): secgrouprule: set model manager 2020-11-30 23:12:44 +08:00
Zexi Li
ce87224374 Merge pull request #9074 from ioito/automated-cherry-pick-of-#9072-upstream-release-3.5
Automated cherry pick of #9072: fix(cloudid): huawei saml provider create issue
2020-11-30 21:56:28 +08:00
Zexi Li
77bd413e08 Merge pull request #9026 from ioito/automated-cherry-pick-of-#9024-upstream-release-3.5
Automated cherry pick of #9024: fix(cloudid): avoid use invalid character for role name
2020-11-30 21:54:01 +08:00
Zexi Li
6214917f0a Merge pull request #9078 from rainzm/automated-cherry-pick-of-#9076-upstream-release-3.5
Automated cherry pick of #9076: Notify via contact skip receiver
2020-11-30 21:50:23 +08:00
Zexi Li
1471e4e4b3 Merge pull request #9081 from yousong/automated-cherry-pick-of-#9079-upstream-release-3.5
Automated cherry pick of #9079: feat(region): options: allow setting default vpc external access mode
2020-11-30 21:49:24 +08:00
Zexi Li
df87d2c632 Merge pull request #9089 from rainzm/automated-cherry-pick-of-#9086-upstream-release-3.5
Automated cherry pick of #9086: fix(region): sort excludedNets correctly
2020-11-30 21:47:39 +08:00
Zexi Li
05c97d35e4 Merge pull request #9095 from ioito/automated-cherry-pick-of-#9075-upstream-release-3.5
Automated cherry pick of #9075: fix(region): optimized rds backup create
2020-11-30 21:31:56 +08:00
Qu Xuan
e59ac5cd6e fix(region): optimized rds backup create 2020-11-30 20:02:23 +08:00
rainzm
1c9e3a9c87 feat(cloudcommon): add NotifyWithContact 2020-11-30 20:01:27 +08:00
rainzm
8954700caf feat(cloudcommon): allways send webconsole notification via contacts
For notification with webconsole type, receiverId is same with contacts.
2020-11-30 20:01:27 +08:00
rainzm
88fcf9ef0b feat(notify): permit admin sending notification via contact
In this way, you can easily send notification to non-existent receiver.
2020-11-30 20:01:27 +08:00
rainzm
74a10e799e fix(region): sort excludedNets correctly
之前,excludedNets 内部表示起始 IP 的字段是 string 类型,直接使用 <
比较是错误的。
现在,把 excludedNets 表示起始 IP 的字段改为了
netutils.IPV4Addr,这样就可以正确地进行比较排序了。
2020-11-30 19:05:45 +08:00
Yousong Zhou
dc9c76b702 feat(region): options: allow setting default vpc external access mode 2020-11-30 18:30:13 +08:00
Yousong Zhou
14f81747e8 fix(region): pass up error from InitializeData 2020-11-30 18:30:13 +08:00
Qu Xuan
b7450b3fd4 fix(cloudid): huawei saml provider create issue 2020-11-30 16:31:39 +08:00
Zexi Li
13834c9e21 Merge pull request #8997 from ioito/automated-cherry-pick-of-#8995-upstream-release-3.5
Automated cherry pick of #8995: fix(cloudid): avoid new public account sync system policy delay 1 day
2020-11-30 14:13:46 +08:00
Qu Xuan
da5f355051 fix(cloudid): avoid new public account sync system policy delay 1 day 2020-11-27 20:18:03 +08:00
Zexi Li
d4fc510119 Merge pull request #9030 from ioito/automated-cherry-pick-of-#9021-upstream-release-3.5
Automated cherry pick of #9021: fix(region): auto sync cloudaccount resources
2020-11-27 20:14:00 +08:00
Zexi Li
1cb1eca69a Merge pull request #9057 from lvyangyang/automated-cherry-pick-of-#9056-upstream-release-3.5
Automated cherry pick of #9056: fix(region): bucket get referer fix
2020-11-27 20:04:19 +08:00
lvyangyang
dc4bce327d fix(region): bucket get referer fix 2020-11-27 19:43:32 +08:00
yunion-ci-robot
8dda8e0b5d Merge pull request #9038 from yousong/automated-cherry-pick-of-#9036-upstream-release-3.5
Automated cherry pick of #9036: feat(region): search server by substr of ip or mac
2020-11-27 18:46:35 +08:00
Zexi Li
188b0eee9d Merge pull request #9051 from wanyaoqi/automated-cherry-pick-of-#9049-upstream-release-3.5
Automated cherry pick of #9049: fix(region,scheduler): fix netwrok predicate
2020-11-27 18:43:57 +08:00
wanyaoqi
a4d4210b0d 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:55 +08:00
yunion-ci-robot
7463ce017e Merge pull request #9048 from rainzm/automated-cherry-pick-of-#9046-upstream-release-3.5
Automated cherry pick of #9046: fix(region): get provider name via GetProviderName
2020-11-27 17:59:33 +08:00
rainzm
13a210a849 fix(region): get provider name via GetProviderName 2020-11-27 17:35:18 +08:00
yunion-ci-robot
2adad66a10 Merge pull request #9045 from rainzm/automated-cherry-pick-of-#9043-upstream-release-3.5
Automated cherry pick of #9043: fix(region): get provider name via GetProviderName
2020-11-27 16:50:32 +08:00
Zexi Li
7d8f6d0178 Merge pull request #9034 from lvyangyang/automated-cherry-pick-of-#9033-upstream-release-3.5
Automated cherry pick of #9033: fix(region): fix set bucket referer
2020-11-27 16:29:51 +08:00
rainzm
c5c928517e fix(region): get provider name via GetProviderName 2020-11-27 16:12:53 +08:00
Yousong Zhou
28e50d3c06 feat(region): search server by substr of ip or mac 2020-11-27 15:16:28 +08:00
lvyangyang
f9983d45bf feat(region): set qcloud bucket policy 2020-11-27 14:49:12 +08:00
lvyangyang
81dfd941fa fix(region): fix set bucket referer 2020-11-27 14:49:12 +08:00
Zexi Li
9dcff87ee5 Merge pull request #9032 from zexi/automated-cherry-pick-of-#8930-upstream-release-3.5
Automated cherry pick of #8930: feat(region/schedtag): schedtag support set multi resources
2020-11-27 10:19:59 +08:00
Zexi Li
018e1a94e4 feat(region/schedtag): schedtag support set multi resources 2020-11-27 09:57:38 +08:00
Qu Xuan
2ad96ea6bb fix(region): auto sync cloudaccount resources 2020-11-27 09:40:08 +08:00
Zexi Li
9796462169 Merge pull request #9000 from ioito/automated-cherry-pick-of-#8998-upstream-release-3.5
Automated cherry pick of #8998: fix(region): allow member user get saml auth addr
2020-11-26 21:39:49 +08:00
Qu Xuan
3b85961a08 fix(cloudid): avoid use invalid character for role name 2020-11-26 21:39:10 +08:00
Zexi Li
8f928ad9d6 Merge pull request #9020 from ioito/automated-cherry-pick-of-#9018-upstream-release-3.5
Automated cherry pick of #9018: fix(cloudid): auto update saml provider metadata
2020-11-26 21:38:26 +08:00
Zexi Li
286af65835 Merge pull request #9004 from ioito/automated-cherry-pick-of-#9002-upstream-release-3.5
Automated cherry pick of #9002: fix(region): avolid aliyun fin bucket list objects error
2020-11-26 21:37:09 +08:00
yunion-ci-robot
947e490fda Merge pull request #9017 from tb365/automated-cherry-pick-of-#9015-upstream-release-3.5
Automated cherry pick of #9015: fix(region): huawei sync storages bugfix
2020-11-26 21:35:45 +08:00
Zexi Li
78eea679fb Merge pull request #9014 from ioito/automated-cherry-pick-of-#9012-upstream-release-3.5
Automated cherry pick of #9012: fix(region): qcloud request retry
2020-11-26 21:31:56 +08:00
Zexi Li
6eeae771c0 Merge pull request #9007 from yousong/automated-cherry-pick-of-#9005-upstream-release-3.5
Automated cherry pick of #9005: Feature/yousong ovn encap ip
2020-11-26 21:29:26 +08:00
Zexi Li
b105654f13 Merge pull request #9011 from ioito/automated-cherry-pick-of-#9009-upstream-release-3.5
Automated cherry pick of #9009: fix(climc): replace ' -> "
2020-11-26 21:27:12 +08:00
Qu Xuan
dadcabc112 fix(cloudid): auto update saml provider metadata 2020-11-26 20:20:24 +08:00
TangBin
f8f02a8e64 fix(region): huawei sync storages bugfix 2020-11-26 19:35:21 +08:00
Qu Xuan
e1ab78894f fix(region): qcloud request retry 2020-11-26 19:04:05 +08:00
Qu Xuan
de154ecd36 fix(climc): replace ' -> " 2020-11-26 17:37:08 +08:00
Yousong Zhou
159950ae7d feat(host): add option OvnEncapIpDetectionMethod can-reach:xx 2020-11-26 17:11:56 +08:00
Yousong Zhou
f0482cf652 feat(netutils2): add MyIPTo 2020-11-26 17:11:56 +08:00
Qu Xuan
f6985c100d fix(region): avolid aliyun fin bucket list objects error 2020-11-26 16:18:02 +08:00
Qu Xuan
bb906fd7ba fix(region): allow member user get saml auth addr 2020-11-26 15:03:57 +08:00
Zexi Li
80dc067a0f Merge pull request #8985 from swordqiu/automated-cherry-pick-of-#8968-upstream-release-3.5
Automated cherry pick of #8968: fix(region,esxiagent): allow host behind a nat
2020-11-26 12:11:12 +08:00
yunion-ci-robot
31e64f7f24 Merge pull request #8993 from zexi/automated-cherry-pick-of-#8991-upstream-release-3.5
Automated cherry pick of #8991: fix(scheduler): clean expire cache before schedule
2020-11-26 11:43:32 +08:00
Zexi Li
a0738f4676 fix(region): wire get vpc releated hosts is empty 2020-11-26 11:03:27 +08:00
Zexi Li
e48d2cdc6f fix(region): network clean schedule cache after real deleted 2020-11-26 11:03:27 +08:00
Zexi Li
348d2129f8 fix(scheduler): clean expire cache before schedule 2020-11-26 11:03:27 +08:00
Zexi Li
676b29fb52 Merge pull request #8929 from rainzm/automated-cherry-pick-of-#8925-upstream-release-3.5
Automated cherry pick of #8925: feat(region): add SCloudregionResourceBase for SInstanceSnapshot
2020-11-25 22:04:40 +08:00
Zexi Li
dc48e32cca Merge pull request #8957 from tb365/automated-cherry-pick-of-#8955-upstream-release-3.5
Automated cherry pick of #8955: fix(region): allow reset huawei system disk
2020-11-25 22:01:36 +08:00
Zexi Li
62a9a30dc6 Merge pull request #8963 from ioito/automated-cherry-pick-of-#8961-upstream-release-3.5
Automated cherry pick of #8961: fix(region): valid qcloud hssd for system disk
2020-11-25 21:59:35 +08:00
Zexi Li
a3edeb31ec Merge pull request #8982 from zhaoxiangchun/automated-cherry-pick-of-#8977-upstream-release-3.5
Automated cherry pick of #8977: fix(monitor): modify monitor serviceType in StartService()
2020-11-25 21:57:16 +08:00
Zexi Li
add7fd42ae Merge pull request #8989 from rainzm/automated-cherry-pick-of-#8987-upstream-release-3.5
Automated cherry pick of #8987: fix(region): allow delete storagecachedimage with 'cache_failed' status
2020-11-25 21:55:51 +08:00
rainzm
ebbedc135b 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:39 +08:00
zhaoxiangchun
6f1bf542ca fix(monitor): modify monitor serviceType in StartService()
1.修改monitor服务在service代码中注册的serviceType:
   alerter ===> monitor
2020-11-25 20:30:52 +08:00
Qiu Jian
039f6d5f05 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:18:19 +08:00
Zexi Li
540aeae3ad Merge pull request #8975 from ioito/automated-cherry-pick-of-#8973-upstream-release-3.5
Automated cherry pick of #8973: fix(region): set qcloud instance del timeout to 20m
2020-11-25 19:42:09 +08:00
rainzm
1f90c2cff5 fix(region): ignore params.Disks when cloning vm from snapshot 2020-11-25 18:27:02 +08:00
rainzm
d46eedab9c fix(region): add size and storageType for VMware InstanceSnapshot 2020-11-25 18:27:02 +08:00
rainzm
27949042c1 fix(esxiagent): add humanized tips when searching vm failed 2020-11-25 18:27:02 +08:00
rainzm
0b64f30975 fix(region): make project of instance snapshot be consistent with the instance 2020-11-25 18:27:02 +08:00
rainzm
99f1c96082 fix(region): save when canceling pendingUsage 2020-11-25 18:27:02 +08:00
rainzm
d6ae7ebed8 feat(region): set pendingUsage before creating instance snapshots 2020-11-25 18:27:02 +08:00
rainzm
2246f08d8a feat(region): add instance_snapshot for regionquota 2020-11-25 18:27:02 +08:00
rainzm
b37ac26238 fix(region): purge all instance snapshots when purging guest 2020-11-25 18:27:02 +08:00
rainzm
7b93a784fd feat(region): add SCloudregionResourceBase for SInstanceSnapshot
理论上,可以通过
SInstanceSnapshot->SGuest->SHost->SZone->SCloudregionResourceBase
拿到 cloudregion_id, 但是这样的效率太低了
2020-11-25 18:27:02 +08:00
TangBin
d1a5cea457 fix(region): update translations 2020-11-25 18:18:24 +08:00
TangBin
a7d290b0db fix(region): allow reset huawei system disk 2020-11-25 18:18:23 +08:00
Qu Xuan
f1048fadba fix(region): set qcloud instance del timeout to 20m 2020-11-25 17:17:26 +08:00
Zexi Li
1ca810c6a2 Merge pull request #8972 from ioito/automated-cherry-pick-of-#8970-upstream-release-3.5
Automated cherry pick of #8970: fix(cloudid): avoid empty auth url
2020-11-25 17:16:54 +08:00
Qu Xuan
0e5e044176 fix(cloudid): avoid empty auth url 2020-11-25 17:07:30 +08:00
Zexi Li
7d44c83040 Merge pull request #8960 from ioito/automated-cherry-pick-of-#8958-upstream-release-3.5
Automated cherry pick of #8958: fix(region): validate cloudaccount saml auth params
2020-11-25 16:06:56 +08:00
Qu Xuan
24372aae95 fix(region): valid qcloud hssd for system disk 2020-11-25 11:52:36 +08:00
Qu Xuan
3d79d9bbe3 fix(region): validate cloudaccount saml auth params 2020-11-25 11:43:55 +08:00
Zexi Li
6cb8805435 Merge pull request #8953 from ioito/automated-cherry-pick-of-#8895-upstream-release-3.5
Automated cherry pick of #8895: fix(region): 避免OneCloud密码校验通过,公有云厂商密码校验不通过
2020-11-25 10:06:15 +08:00
Qu Xuan
dd9b989fe4 fix(region): 避免OneCloud密码校验通过,公有云厂商密码校验不通过 2020-11-25 09:55:11 +08:00
Zexi Li
2e9445ef50 Merge pull request #8949 from yousong/automated-cherry-pick-of-#8947-upstream-release-3.5
Automated cherry pick of #8947: fix(region): change_ipaddr: retain eip_id on detach and attach
2020-11-25 09:28:11 +08:00
yunion-ci-robot
da91c86404 Merge pull request #8944 from yousong/automated-cherry-pick-of-#8942-upstream-release-3.5
Automated cherry pick of #8942: feat(cloudcommon): db: jointbase: add list:"user" for RowId
2020-11-25 09:17:17 +08:00
Yousong Zhou
7c3796b217 fix(region): change_ipaddr: retain eip_id on detach and attach 2020-11-24 21:59:15 +08:00
Yousong Zhou
97087fc329 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:47 +08:00
Yousong Zhou
0fc3c8c2b5 feat(cloudcommon): db: jointbase: add list:"user" for RowId 2020-11-24 21:55:47 +08:00
yunion-ci-robot
fb575e264d Merge pull request #8928 from zhaoxiangchun/automated-cherry-pick-of-#8926-upstream-release-3.5
Automated cherry pick of #8926: fix(monitor): modify suggestrule  process influxdb data
2020-11-24 21:29:17 +08:00
yunion-ci-robot
c201b215a9 Merge pull request #8935 from ioito/automated-cherry-pick-of-#8933-upstream-release-3.5
Automated cherry pick of #8933: fix(region): avoid public ip bandwidth is zero
2020-11-24 20:25:27 +08:00
Qu Xuan
8dc3aca3eb fix(region): avoid public ip bandwidth is zero 2020-11-24 18:11:18 +08:00
zhaoxiangchun
989ca1fdae fix(monitor): modify suggestrule process influxdb data
1. 调整与监控相关的时间范围的判断逻辑:不再要求时间范围内必须都有数据
2020-11-24 17:48:36 +08:00
yunion-ci-robot
d35a07671a Merge pull request #8915 from tb365/automated-cherry-pick-of-#8913-upstream-release-3.5
Automated cherry pick of #8913: feat(region): support aliyun finance cloud
2020-11-24 09:47:59 +08:00
TangBin
6a15e02e34 fix(region): aliyun zone name fix 2020-11-24 09:37:43 +08:00
TangBin
f336467a79 fix(region): aliyun region name 2020-11-24 09:37:43 +08:00
TangBin
a415c97995 fix(region): aliyun sync region fix 2020-11-24 09:37:43 +08:00
TangBin
f31b97144e feat(region): support aliyun finance cloud 2020-11-24 09:35:48 +08:00
yunion-ci-robot
a53790cd04 Merge pull request #8921 from zhaoxiangchun/automated-cherry-pick-of-#8920-upstream-release-3.5
Automated cherry pick of #8920: fix(monitor): modify notify alertInfo and alertOk detach resource
2020-11-24 09:34:58 +08:00
Zexi Li
b0a85b5b20 Merge pull request #8918 from ioito/automated-cherry-pick-of-#8917-upstream-release-3.5
Automated cherry pick of #8917: fix(region): set classic vpc name to "-"
2020-11-23 21:25:09 +08:00
Zexi Li
43ca1978f0 Merge pull request #8916 from ioito/automated-cherry-pick-of-#8912-upstream-release-3.5
Automated cherry pick of #8912: fix(region): add saml auth for capability
2020-11-23 21:24:04 +08:00
zhaoxiangchun
2ba9275033 fix(monitor):fix notify alertInfo and alertOk detach resource
1.修复报警信息中>等被转义的问题
2.针对:host_raid.adapter和smart_device.exit_status
  只能出现alerting和nodata
两种报警状态。在queryCondition的查询逻辑下,nodata情况也进行detach操作
3.修复报警记录中报警策略翻译异常的问题
2020-11-23 21:18:52 +08:00
Qu Xuan
4ff3529e1f fix(region): set classic vpc name to "-" 2020-11-23 17:45:50 +08:00
Qu Xuan
2baf238313 fix(region): add saml auth for capability 2020-11-23 17:15:19 +08:00
Zexi Li
ccd8af304f Merge pull request #8905 from ioito/automated-cherry-pick-of-#8904-upstream-release-3.5
Automated cherry pick of #8904: fix(region): azure host with storage
2020-11-23 16:46:28 +08:00
Zexi Li
49d69c144c Merge pull request #8907 from swordqiu/automated-cherry-pick-of-#8906-upstream-release-3.5
Automated cherry pick of #8906: feat(keystone): filter domain/user by idp_entity_id
2020-11-23 16:12:47 +08:00
Zexi Li
bb0a4d5028 Merge pull request #8901 from wanyaoqi/automated-cherry-pick-of-#8889-upstream-release-3.5
Automated cherry pick of #8889: fix(host): wait put host offline success
2020-11-23 13:04:36 +08:00
Qiu Jian
c76a845c27 feat(keystone): filter domain/user by idp_entity_id
filter domain/user by idp_entity_id
2020-11-23 12:25:56 +08:00
Qu Xuan
b8741a5b1a fix(region): azure host with storage 2020-11-23 11:28:36 +08:00
wanyaoqi
377adc0a92 fix(host): wait put host offline success
Unregister host wait for host offline success,
in case region is in upgrading.

cherrypick: release/3.4
2020-11-22 15:31:49 +08:00
Zexi Li
ce55f91f6a Merge pull request #8897 from swordqiu/automated-cherry-pick-of-#8896-upstream-release-3.5
Automated cherry pick of #8896: fix: oidc data may be encapuslated in data field
2020-11-22 12:05:53 +08:00
Qiu Jian
8a6fe5ce64 fix(keystone): oidc data may be encapuslated in data field
兼容一些oidc实现,返回数据包裹在data字段里
2020-11-22 11:54:57 +08:00
Zexi Li
f499380abf Merge pull request #8893 from yousong/automated-cherry-pick-of-#8892-upstream-release-3.5
Automated cherry pick of #8892: fix(locales): fix translation text
2020-11-22 11:00:24 +08:00
yunion-ci-robot
0839361f71 Merge pull request #8866 from swordqiu/automated-cherry-pick-of-#8865-upstream-release-3.5
Automated cherry pick of #8865: fix: allow disk attach to multiple guests
2020-11-21 19:25:00 +08:00
Yousong Zhou
44bada6617 fix(region): elasticcache_instances: fix error fmt 2020-11-21 17:32:05 +08:00
Yousong Zhou
8e26bab0ee fix(locales): fix translation text 2020-11-21 17:32:05 +08:00
Zexi Li
2270e4c0e6 Merge pull request #8888 from tb365/automated-cherry-pick-of-#8887-upstream-release-3.5
Automated cherry pick of #8887: fix(region): ignore classic vpc checkout while add lb backend
2020-11-20 19:56:57 +08:00
TangBin
8996b7b96a fix(region): create/update aliyun account bugfix 2020-11-20 18:40:50 +08:00
TangBin
f33715feb7 fix(region): purge account bugfix
忽略由于证书缓存与负载均衡监听关联导致purge账号失败的问题
2020-11-20 18:40:50 +08:00
TangBin
b6ed945ae9 fix(region): checking cloudenv while create/update aliyun cloud account
#6389
2020-11-20 18:40:50 +08:00
TangBin
7d546d6340 fix(region): create redis validate network and sku zone match 2020-11-20 18:40:50 +08:00
TangBin
dd3c127e98 fix(region): delete aliyun account bugfix 2020-11-20 18:40:50 +08:00
TangBin
6875703929 fix(region): redis create account add name validate
公有云redis不允许创建名为root的账号

#6398
2020-11-20 18:40:50 +08:00
TangBin
bde10f338d fix(region): ignore classic vpc checkout while add lb backend
阿里云公网EL属于经典网络,在添加后端服务器时,不需要LB VPC和服务器的vpc 完全匹配

#6040
#6404
2020-11-20 18:40:50 +08:00
Zexi Li
fe7ee36aea Merge pull request #8885 from ioito/automated-cherry-pick-of-#8884-upstream-release-3.5
Automated cherry pick of #8884: fix(region): compatible aliyun fin oss
2020-11-20 16:35:38 +08:00
Qu Xuan
170a8398ac fix(region): compatible aliyun fin oss 2020-11-20 16:08:12 +08:00
Zexi Li
bffd7e1ba2 Merge pull request #8882 from lvyangyang/automated-cherry-pick-of-#8881-upstream-release-3.5
Automated cherry pick of #8881: fix(region): get qcloud bucket cdn-domain
2020-11-20 11:17:56 +08:00
lvyangyang
8ddbe31c35 fix(region): get qcloud bucket cdn-domain 2020-11-20 11:04:40 +08:00
Zexi Li
ed22502359 Merge pull request #8878 from ioito/automated-cherry-pick-of-#8877-upstream-release-3.5
Automated cherry pick of #8877: fix: 自动生成华为云rds密码
2020-11-20 10:05:18 +08:00
Zexi Li
03c5b89fe4 Merge pull request #8874 from ioito/automated-cherry-pick-of-#8873-upstream-release-3.5
Automated cherry pick of #8873: optimized: server delete log and wait time
2020-11-20 10:04:27 +08:00
Zexi Li
1de0b88b96 Merge pull request #8879 from ioito/automated-cherry-pick-of-#8876-upstream-release-3.5
Automated cherry pick of #8876: feat: rds recovery new instance from backup supported
2020-11-19 20:53:05 +08:00
Qu Xuan
17ca180439 feat: rds recovery new instance from backup supported 2020-11-19 20:15:08 +08:00
Qu Xuan
5d09808e10 fix: 自动生成华为云rds密码 2020-11-19 19:55:38 +08:00
Qu Xuan
346d9aa284 optimized: server delete log and wait time 2020-11-19 16:26:56 +08:00
Zexi Li
cebada3f3b Merge pull request #8870 from lvyangyang/automated-cherry-pick-of-#8869-upstream-release-3.5
Automated cherry pick of #8869: fix(region): qcloud bucket set cors
2020-11-19 15:14:37 +08:00
lvyangyang
62e75412c3 fix(region): qcloud bucket set cors 2020-11-19 15:01:43 +08:00
Zexi Li
8b44b8cfc1 Merge pull request #8857 from tb365/automated-cherry-pick-of-#8856-upstream-release-3.5
Automated cherry pick of #8856: add redis and redis skus slave zone info & huawei aws supported storage type update
2020-11-19 14:32:56 +08:00
TangBin
df0cc60e04 add getStorageType err log 2020-11-19 14:11:54 +08:00
TangBin
568016d7f2 add redis and redis skus slave zone info & huawei aws supported storage type update 2020-11-19 14:11:54 +08:00
Qiu Jian
0315cd33c1 fix: allow disk attach to multiple guests 2020-11-19 13:26:58 +08:00
Zexi Li
31552216dc Merge pull request #8646 from ioito/automated-cherry-pick-of-#8569-upstream-release-3.5
Automated cherry pick of #8569: fix: 优化azure资源同步
2020-11-19 12:48:00 +08:00
Qu Xuan
a64243a8a9 fix: optimized jsonRequest 2020-11-19 12:04:41 +08:00
Qu Xuan
bf5ea4ef83 fix: 优化azure资源同步 2020-11-19 12:03:28 +08:00
Zexi Li
2bc4e0db43 Merge pull request #8861 from swordqiu/automated-cherry-pick-of-#8860-upstream-release-3.5
Automated cherry pick of #8860: fix: add host.memoty.total and host.cpu.total usage stats
2020-11-19 11:03:17 +08:00
Zexi Li
21dcbf4bb1 Merge pull request #8864 from ioito/automated-cherry-pick-of-#8863-upstream-release-3.5
Automated cherry pick of #8863: fix: cloudid api addr
2020-11-19 11:02:21 +08:00
Qu Xuan
ef132b2146 fix: cloudid api addr 2020-11-19 10:52:51 +08:00
Qiu Jian
aa75175ff4 fix: add host.memoty.total and host.cpu.total usage stats 2020-11-19 01:26:14 +08:00
Zexi Li
4cb5011ad6 Merge pull request #8845 from zhaoxiangchun/automated-cherry-pick-of-#8844-upstream-release-3.5
Automated cherry pick of #8844: detach AlertResource on alertDisable
2020-11-18 21:16:32 +08:00
Zexi Li
f5a6d9c26f Merge pull request #8851 from swordqiu/automated-cherry-pick-of-#8850-upstream-release-3.5
Automated cherry pick of #8850: fix: add host-joint resources into domain level resources
2020-11-18 21:15:11 +08:00
yunion-ci-robot
39cbdb83b8 Merge pull request #8859 from rainzm/automated-cherry-pick-of-#8858-upstream-release-3.5
Automated cherry pick of #8858: fix(hostdeployer): umount rootfs before resize partition
2020-11-18 21:12:14 +08:00
rainzm
ed6fb4a241 fix(hostdeployer): umount rootfs before resize partition 2020-11-18 18:28:02 +08:00
yunion-ci-robot
ebffe5e88c Merge pull request #8854 from zhasm/automated-cherry-pick-of-#8849-upstream-release-3.5
Automated cherry pick of #8849: docker 交叉编译规则更新
2020-11-18 16:36:13 +08:00
Zhang Dongliang
1e267f8fb1 docker 交叉编译规则更新 2020-11-18 16:10:50 +08:00
Qiu Jian
862a53d2f4 fix: add host-joint resources into domain level resources 2020-11-18 15:26:14 +08:00
zhaoxiangchun
7d4990cbd0 detach AlertResource on alertDisable
1. 报警规则禁用时,detach 关联的报警资源

影响范围:报警规则的禁用;logger日志服务i18n的日志展示
2020-11-18 12:21:58 +08:00
yunion-ci-robot
55dd336482 Merge pull request #8769 from ioito/automated-cherry-pick-of-#8697-upstream-release-3.5
Automated cherry pick of #8697: feature: saml for cloudid
2020-11-18 11:22:07 +08:00
yunion-ci-robot
b37728d0ae Merge pull request #8843 from lvyangyang/automated-cherry-pick-of-#8842-upstream-release-3.5
Automated cherry pick of #8842: add:get bucket cdn domain
2020-11-17 20:40:06 +08:00
lvyangyang
807bcbb33a add:get bucket cdn domain 2020-11-17 19:55:54 +08:00
yunion-ci-robot
09fe0130f6 Merge pull request #8837 from ioito/automated-cherry-pick-of-#8836-upstream-release-3.5
Automated cherry pick of #8836: fix: support import rules for secgroups
2020-11-17 18:30:08 +08:00
Qu Xuan
f26076b48a feature: saml for cloudid 2020-11-17 18:05:06 +08:00
Zexi Li
5bee7e85f6 Merge pull request #8839 from rainzm/automated-cherry-pick-of-#8827-upstream-release-3.5
Automated cherry pick of #8827: fix(notify): be compatible with keystone's UsersV3.GetById
2020-11-17 17:52:07 +08:00
rainzm
e0f85de5ff fix: add err handler for notifyRobot 2020-11-17 17:12:04 +08:00
rainzm
4a908a58f0 feat(notify): enable watching user in keystone 2020-11-17 17:12:04 +08:00
rainzm
eec58eff8f fix(notify): be compatible with keystone's UsersV3.GetById
Fill UsersV3.GetById with user's name, it will return user's info.
2020-11-17 17:12:04 +08:00
yunion-ci-robot
56ef20b7ee Merge pull request #8727 from rainzm/automated-cherry-pick-of-#8726-upstream-release-3.5
Automated cherry pick of #8726: Try to resizefs after resizing esxi disk
2020-11-17 16:44:08 +08:00
Qu Xuan
30fc56e635 fix: support import rules for secgroups 2020-11-17 15:32:04 +08:00
Zexi Li
87384461e5 Merge pull request #8794 from rainzm/automated-cherry-pick-of-#8793-upstream-release-3.5
Automated cherry pick of #8793: fix(region): chooseHostStorage
2020-11-17 15:21:26 +08:00
Zexi Li
a55ac613e7 Merge pull request #8829 from ioito/automated-cherry-pick-of-#8823-upstream-release-3.5
Automated cherry pick of #8823: optimized: aliyun create rds backup
2020-11-17 14:52:25 +08:00
Zexi Li
54a4752301 Merge pull request #8834 from zhaoxiangchun/automated-cherry-pick-of-#8816-upstream-release-3.5
Automated cherry pick of #8816: modify  alertResource ws info
2020-11-17 14:51:35 +08:00
rainzm
a4ce1271c4 feat(region): add RequestResizeDiskOnHost to SESXiHostDriver 2020-11-17 14:50:17 +08:00
rainzm
1e286edfe5 feat(esxiagent): try to resize partition after resizing disk 2020-11-17 14:50:17 +08:00
rainzm
b3f9dbf34c feat(hostdeployer): support resizefs for esxi disk 2020-11-17 14:50:17 +08:00
yunion-ci-robot
f0478a46a7 Merge pull request #8775 from rainzm/automated-cherry-pick-of-#8774-upstream-release-3.5
Automated cherry pick of #8774: Fix for esxi instance snapshot
2020-11-17 14:39:07 +08:00
zhaoxiangchun
4f2070e640 modify alertResource ws info
ignore_alert:ture 前端不再进行弹窗提示
2020-11-17 14:23:59 +08:00
Zexi Li
3319818699 Merge pull request #8804 from wanyaoqi/automated-cherry-pick-of-#8803-upstream-release-3.5
Automated cherry pick of #8803: host: restart etcd session on keepalive failed
2020-11-17 14:20:19 +08:00
Zexi Li
d58a2d79e2 Merge pull request #8831 from rainzm/automated-cherry-pick-of-#8830-upstream-release-3.5
Automated cherry pick of #8830: feat(scheduler): support filtering storage via medium
2020-11-17 10:44:51 +08:00
yunion-ci-robot
24aeecd48e Merge pull request #8821 from tb365/automated-cherry-pick-of-#8820-upstream-release-3.5
Automated cherry pick of #8820: qcloud create single zone elb bugfix
2020-11-17 10:04:06 +08:00
yunion-ci-robot
9ba917e885 Merge pull request #8818 from ioito/automated-cherry-pick-of-#8817-upstream-release-3.5
Automated cherry pick of #8817: fix: add error cause
2020-11-16 21:43:07 +08:00
rainzm
c9001e0dc3 feat(scheduler): support filtering storage via medium 2020-11-16 20:49:38 +08:00
Qu Xuan
78afd36b98 optimized: aliyun create rds backup 2020-11-16 20:14:08 +08:00
yunion-ci-robot
3d6b2c1ee5 Merge pull request #8822 from lvyangyang/automated-cherry-pick-of-#8795-upstream-release-3.5
Automated cherry pick of #8795: qcloud bucket task
2020-11-16 16:41:06 +08:00
lvyangyang
13040b7b26 add:bucket ops const i18n 2020-11-16 16:17:27 +08:00
lvyangyang
8a0710a0aa qcloud bucket task 2020-11-16 16:17:27 +08:00
TangBin
4ac1a1881c qcloud create single zone elb bugfix 2020-11-16 15:16:23 +08:00
Qu Xuan
57e1222d67 fix: add error cause 2020-11-16 14:55:40 +08:00
yunion-ci-robot
ee4a4938aa Merge pull request #8815 from swordqiu/automated-cherry-pick-of-#8814-upstream-release-3.5
Automated cherry pick of #8814: fix: qcloud create bucket without appId
2020-11-16 13:21:06 +08:00
Qiu Jian
20dcbdbb85 fix: qcloud create bucket without appId 2020-11-16 12:59:58 +08:00
rainzm
2ca05d60f4 fix: creating esxi guest from instance snapshot 2020-11-16 11:06:25 +08:00
rainzm
b687f22f90 fix(region): start vm when 'auto_start' is true 2020-11-16 11:06:25 +08:00
rainzm
bdc67d6c8b fix: set isp's status as 'instance_snapshot_reset' when reseting guest from isp 2020-11-16 11:06:25 +08:00
Zexi Li
9ff7be6849 Merge pull request #8784 from tb365/automated-cherry-pick-of-#8783-upstream-release-3.5
Automated cherry pick of #8783: aliyun finance cloud region add suffix
2020-11-15 08:00:37 +08:00
Zexi Li
0353d19866 Merge pull request #8807 from zhaoxiangchun/automated-cherry-pick-of-#8806-upstream-release-3.5
Automated cherry pick of #8806: commonalert bugfix:
2020-11-15 07:55:15 +08:00
Zexi Li
3270779b45 Merge pull request #8810 from swordqiu/automated-cherry-pick-of-#8809-upstream-release-3.5
Automated cherry pick of #8809: fix: baremetal usage should exclude converted hypervisor
2020-11-15 07:52:29 +08:00
Qiu Jian
fe1c6aa7e0 fix: baremetal usage should exclude converted hypervisor 2020-11-15 01:42:01 +08:00
zhaoxiangchun
a0d7abfbc7 commonalert bugfix:
1.修改消息模版内容:对matches信息进行聚合只返回对应的name信息。解决body消息超过限制
2.报警资源:每次以策略匹配的最新matches为标准。进行updateOrCreate 和
  delete操作。

影响范围:消息模版、报警资源数量
2020-11-14 18:24:38 +08:00
wanyaoqi
b000e43832 host: restart etcd session on keepalive failed 2020-11-14 15:26:34 +08:00
yunion-ci-robot
92bc463b6e Merge pull request #8801 from swordqiu/automated-cherry-pick-of-#8800-upstream-release-3.5
Automated cherry pick of #8800: fix: host memory usage status not correct
2020-11-14 11:22:03 +08:00
yunion-ci-robot
268b3b9dd5 Merge pull request #8797 from yousong/automated-cherry-pick-of-#8796-upstream-release-3.5
Automated cherry pick of #8796: vendor: update yunion.io/x/jsonutils
2020-11-14 00:12:03 +08:00
Qiu Jian
477b375e2a fix: host memory usage status not correct 2020-11-13 23:59:21 +08:00
Yousong Zhou
93783d7f46 vendor: update yunion.io/x/jsonutils
See yunionio/onecloud#8357
2020-11-13 18:46:08 +08:00
Zexi Li
658d10135a Merge pull request #8789 from wanyaoqi/automated-cherry-pick-of-#8189-upstream-release-3.5
Automated cherry pick of #8189: region: guest detail add field macs
2020-11-13 17:47:34 +08:00
Zexi Li
7c6c4e4a21 Merge pull request #8791 from tb365/automated-cherry-pick-of-#8790-upstream-release-3.5
Automated cherry pick of #8790: huawei vm support vnc
2020-11-13 17:46:09 +08:00
rainzm
ea9145608c fix(region): chooseHostStorage
Setting options.Options.LockStorageFromCachedimage will trigger this bug.
2020-11-13 17:24:01 +08:00
Zexi Li
c5e198a753 Merge pull request #8787 from swordqiu/automated-cherry-pick-of-#8786-upstream-release-3.5
Automated cherry pick of #8786: fix: keystone init empty catalogy cause panic
2020-11-13 15:23:48 +08:00
TangBin
84a09e01b3 huawei vm support vnc 2020-11-13 15:08:36 +08:00
wanyaoqi
d61a93b904 region: guest detail add field macs 2020-11-13 15:05:02 +08:00
Qiu Jian
bfe2f33897 fix: keystone init empty catalogy cause panic 2020-11-13 14:55:21 +08:00
TangBin
2a68ec39e6 aliyun finance cloud zone add suffix 2020-11-13 14:45:38 +08:00
TangBin
515ac00855 aliyun finance cloud region add suffix 2020-11-13 14:45:38 +08:00
Zexi Li
5f721d3d43 Merge pull request #8772 from swordqiu/automated-cherry-pick-of-#8771-upstream-release-3.5
Automated cherry pick of #8771: feature: allow join project across domain
2020-11-13 10:39:43 +08:00
Zexi Li
cea06ed8e3 Merge pull request #8777 from zhaoxiangchun/automated-cherry-pick-of-#8776-upstream-release-3.5
Automated cherry pick of #8776: suggestalet bugfix
2020-11-13 10:39:08 +08:00
zhaoxiangchun
cb9a4d92f3 suggestalet bugfix
1.安全组规则的in规则为全开放的主机 筛选逻辑修改
2.修复无法正确过滤用户所属资源的bug
2020-11-12 21:32:51 +08:00
Qiu Jian
b8921016c9 feature: allow join project across domain 2020-11-12 20:41:01 +08:00
yunion-ci-robot
848e3afc00 Merge pull request #8759 from ioito/automated-cherry-pick-of-#8758-upstream-release-3.5
Automated cherry pick of #8758: fix: public ip and duration for create params
2020-11-12 19:34:04 +08:00
Zexi Li
52b926dcc4 Merge pull request #8761 from ioito/automated-cherry-pick-of-#8760-upstream-release-3.5
Automated cherry pick of #8760: fix: avoid panic
2020-11-12 19:31:24 +08:00
Zexi Li
b8f96822ea Merge pull request #8757 from ioito/automated-cherry-pick-of-#8756-upstream-release-3.5
Automated cherry pick of #8756: fix: support create 512mb server sku
2020-11-12 18:52:18 +08:00
Zexi Li
75f2e5e0bc Merge pull request #8765 from ioito/automated-cherry-pick-of-#8764-upstream-release-3.5
Automated cherry pick of #8764: fix: support resize qcloud hssd disk
2020-11-12 18:51:34 +08:00
Zexi Li
8375a58927 Merge pull request #8768 from swordqiu/automated-cherry-pick-of-#8553-upstream-release-3.5
Automated cherry pick of #8553: feature: auto create domain for sso idp
2020-11-12 18:50:30 +08:00
Qiu Jian
1bf1eaa7ce feature: auto create domain for sso idp 2020-11-12 17:32:17 +08:00
Qu Xuan
3e8fe4ab94 fix: support resize qcloud hssd disk 2020-11-12 16:47:51 +08:00
Qu Xuan
360372290d fix: avoid panic 2020-11-12 16:19:55 +08:00
Qu Xuan
ff099ba2cc fix: public ip and duration for create params 2020-11-12 16:02:07 +08:00
Qu Xuan
66f890112a fix: support create 512mb server sku 2020-11-12 14:02:29 +08:00
yunion-ci-robot
9bd992bcfb Merge pull request #8754 from rainzm/automated-cherry-pick-of-#8753-upstream-release-3.5
Automated cherry pick of #8753: fix(region): prevent infinite recursion
2020-11-12 11:53:01 +08:00
rainzm
042579831e fix(region): prevent infinite recursion
When weekDays is [1,2,3,4,5,6,7] and timePoints is [0], It will recurse infinitely.
2020-11-12 11:39:05 +08:00
Zexi Li
4488a3ee3b Merge pull request #8748 from ioito/automated-cherry-pick-of-#8747-upstream-release-3.5
Automated cherry pick of #8747: fix: avoid check region log every time when account status is unknown
2020-11-12 00:52:53 +08:00
Zexi Li
09a67850bb Merge pull request #8750 from ioito/automated-cherry-pick-of-#8749-upstream-release-3.5
Automated cherry pick of #8749: fix: renew rds
2020-11-12 00:49:46 +08:00
Qu Xuan
f29678998c fix: renew rds 2020-11-11 19:07:00 +08:00
Qu Xuan
8bad131096 fix: avoid check region log every time when account status is unknown 2020-11-11 15:26:46 +08:00
Zexi Li
420554e8ab Merge pull request #8724 from tb365/automated-cherry-pick-of-#8723-upstream-release-3.5
Automated cherry pick of #8723: batch user create bugifx
2020-11-11 11:56:37 +08:00
Zexi Li
7fe1641a64 Merge pull request #8746 from wanyaoqi/automated-cherry-pick-of-#8722-upstream-release-3.5
Automated cherry pick of #8722: add success note on guest start and stop
2020-11-11 11:55:53 +08:00
Zexi Li
4c3108ec0c Merge pull request #8720 from tb365/automated-cherry-pick-of-#8719-upstream-release-3.5
Automated cherry pick of #8719: huawei create disk bugfix
2020-11-11 11:54:11 +08:00
wanyaoqi
bd4f684e3c host: specifie bash for start guest 2020-11-11 11:06:15 +08:00
wanyaoqi
03bd569c1e usage: host show isolated dev reserved memory 2020-11-11 11:06:15 +08:00
wanyaoqi
f17cd60bb0 add success note on guest start and stop 2020-11-11 11:06:15 +08:00
Zexi Li
12a542fd5b Merge pull request #8739 from ioito/automated-cherry-pick-of-#8738-upstream-release-3.5
Automated cherry pick of #8738: fix: qcloud rds set renew flag
2020-11-10 19:05:22 +08:00
屈轩
bd86606e8b fix: qcloud rds set renew flag 2020-11-10 18:59:15 +08:00
Zexi Li
12745031ee Merge pull request #8736 from tb365/automated-cherry-pick-of-#8735-upstream-release-3.5
Automated cherry pick of #8735: redis set autorenew bugfix
2020-11-10 18:41:29 +08:00
TangBin
48540ac0bf redis set autorenew bugfix 2020-11-10 18:38:25 +08:00
Zexi Li
a438a6a0b6 Merge pull request #8731 from ioito/automated-cherry-pick-of-#8730-upstream-release-3.5
Automated cherry pick of #8730: fix: rds task fix
2020-11-10 18:02:06 +08:00
Qu Xuan
6f43ea3184 fix: rds task fix 2020-11-10 18:00:51 +08:00
Zexi Li
fd15ad17d2 Merge pull request #8729 from tb365/automated-cherry-pick-of-#8728-upstream-release-3.5
Automated cherry pick of #8728: redis set autorenew bugfix
2020-11-10 17:46:44 +08:00
TangBin
0a9719a789 redis set autorenew bugfix 2020-11-10 17:45:02 +08:00
TangBin
ec64a3df7b batch user create bugifx 2020-11-10 16:49:27 +08:00
TangBin
f8391a5adb huawei create disk bugfix 2020-11-10 16:18:39 +08:00
Zexi Li
16191a0fd3 Merge pull request #8710 from rainzm/automated-cherry-pick-of-#8709-upstream-release-3.5
Automated cherry pick of #8709: feat: support snapshot of esxi
2020-11-10 15:46:52 +08:00
rainzm
ec57acafc0 feat(region): support automatic start vm after reseting isp 2020-11-10 15:25:14 +08:00
rainzm
46f37ff8ab feat(region): add SExternalizedResourceBase, SManagedResourceBase to SInstanceSnapshot 2020-11-10 15:25:14 +08:00
rainzm
8889be9786 feat: update locales 2020-11-10 15:25:14 +08:00
rainzm
77f997c073 feat: support creating vm from instance snapshot 2020-11-10 15:25:14 +08:00
rainzm
bdc16dc24e feat: creat, delete, revert and sync operator for esxi instance snapshots 2020-11-10 15:25:14 +08:00
rainzm
eaab61c08d feat: add ICloudInstanceSnapshot & modify ICloudVM 2020-11-10 15:25:14 +08:00
rainzm
afb551de76 feat: support snapshot of esxi 2020-11-10 15:25:14 +08:00
Zexi Li
6fe8d438a5 Merge pull request #8714 from ioito/automated-cherry-pick-of-#8713-upstream-release-3.5
Automated cherry pick of #8713: fix: support rds set auto renew
2020-11-10 12:55:24 +08:00
Zexi Li
cbe02c996b Merge pull request #8716 from ioito/automated-cherry-pick-of-#8715-upstream-release-3.5
Automated cherry pick of #8715: fix: aws secgroup out rule is deny any
2020-11-10 12:54:29 +08:00
Zexi Li
8f4bf68e66 Merge pull request #8712 from tb365/automated-cherry-pick-of-#8711-upstream-release-3.5
Automated cherry pick of #8711: redis prepaid create autorenew bugfix
2020-11-10 12:53:24 +08:00
Qu Xuan
b67b110525 fix: aws secgroup out rule is deny any 2020-11-10 11:04:40 +08:00
TangBin
ff0786034a redis create bugfix 2020-11-10 10:59:24 +08:00
TangBin
e909674e2f redis prepaid create autorenew bugfix 2020-11-10 10:59:24 +08:00
Qu Xuan
e62ff5d522 fix: support rds set auto renew 2020-11-09 20:13:04 +08:00
Zexi Li
a21b4879b5 Merge pull request #8693 from swordqiu/automated-cherry-pick-of-#8692-upstream-release-3.5
Automated cherry pick of #8692: fix: change level of scopedpolicy to system
2020-11-09 18:20:39 +08:00
yunion-ci-robot
58eee2defb Merge pull request #8708 from tb365/automated-cherry-pick-of-#8707-upstream-release-3.5
Automated cherry pick of #8707: qcloud redis secgroup sync fix & qcloud add renew& auto_renew
2020-11-09 17:22:21 +08:00
yunion-ci-robot
ae986d11dd Merge pull request #8699 from rainzm/automated-cherry-pick-of-#8698-upstream-release-3.5
Automated cherry pick of #8698: feat(build): add .dockerignore
2020-11-09 14:24:19 +08:00
yunion-ci-robot
533e0f4741 Merge pull request #8650 from rainzm/automated-cherry-pick-of-#8649-upstream-release-3.5
Automated cherry pick of #8649: feat(region): filter network via storage
2020-11-09 14:23:36 +08:00
Qiu Jian
6efdd681c6 fix: change level of scopedpolicy to system 2020-11-09 11:20:50 +08:00
Zexi Li
2db47f48dd Merge pull request #8706 from swordqiu/automated-cherry-pick-of-#8705-upstream-release-3.5
Automated cherry pick of #8705: fix: search by name and order by scopedpolicy for scopedpolicybindings
2020-11-09 10:45:47 +08:00
Zexi Li
7c8ba6ee4f Merge pull request #8704 from zhaoxiangchun/automated-cherry-pick-of-#8703-upstream-release-3.5
Automated cherry pick of #8703: commonalert bugfix:
2020-11-09 10:44:28 +08:00
TangBin
78769555bc qcloud redis secgroup sync fix & qcloud add renew& auto_renew 2020-11-09 10:42:38 +08:00
Qiu Jian
a0754e6d4c fix: search by name and order by scopedpolicy for scopedpolicybindings 2020-11-09 08:57:18 +08:00
zhaoxiangchun
af043fe119 commonalert bugfix:
1. 报警消息中过滤onecloud信息
2. 报警记录中报警恢复match 信息根据alertingMatches进行过滤处理
2020-11-08 17:14:30 +08:00
Zexi Li
d8d143574c Merge pull request #8696 from lvyangyang/automated-cherry-pick-of-#8694-upstream-release-3.5
Automated cherry pick of #8694: fix:修复dns record name校验的问题
2020-11-07 18:43:32 +08:00
Zexi Li
11e75b3c8a Merge pull request #8702 from ioito/automated-cherry-pick-of-#8700-upstream-release-3.5
Automated cherry pick of #8700: fix: sync remove dirty rds accounts
2020-11-07 18:27:06 +08:00
Qu Xuan
8b3f8fb1d8 fix: sync remove dirty rds accounts 2020-11-06 20:37:50 +08:00
rainzm
84f9d31760 feat(build): add DOCKER_BUILDKIT in docker_push.sh 2020-11-06 20:36:47 +08:00
rainzm
d8617bdbdb feat(build): add .dockerignore 2020-11-06 20:36:47 +08:00
lvyangyang
ec5027d65d fix:修复dns record name校验的问题 2020-11-06 19:59:02 +08:00
Zexi Li
8e462acdbd Merge pull request #8690 from swordqiu/automated-cherry-pick-of-#8689-upstream-release-3.5
Automated cherry pick of #8689: fix: change owner should update quota usages
2020-11-06 15:11:16 +08:00
yunion-ci-robot
177369cba5 Merge pull request #8687 from rainzm/automated-cherry-pick-of-#8686-upstream-release-3.5
Automated cherry pick of #8686: feat(region): add option NoCheckOsTypeForCachedImage
2020-11-06 15:07:18 +08:00
yunion-ci-robot
30bea718b7 Merge pull request #8684 from ioito/automated-cherry-pick-of-#8683-upstream-release-3.5
Automated cherry pick of #8683: fix: aliyun eip api
2020-11-06 15:04:20 +08:00
Qiu Jian
721477e899 fix: change owner should update quota usages 2020-11-06 14:48:06 +08:00
Zexi Li
168f3af326 Merge pull request #8681 from ioito/automated-cherry-pick-of-#8680-upstream-release-3.5
Automated cherry pick of #8680: fix: 支持多内存过滤套餐
2020-11-06 13:49:59 +08:00
Zexi Li
db2bb725b9 Merge pull request #8678 from swordqiu/automated-cherry-pick-of-#8677-upstream-release-3.5
Automated cherry pick of #8677: fix: missing column error when order by extra fields
2020-11-06 13:49:35 +08:00
Zexi Li
aae257127c Merge pull request #8673 from zexi/automated-cherry-pick-of-#8672-upstream-release-3.5
Automated cherry pick of #8672: scheduler: ignore non running guests only exclude ready status
2020-11-06 13:48:16 +08:00
rainzm
37c3da9e9f fix(esxi): don't specify spec.Identity when osName is empty 2020-11-06 11:54:45 +08:00
rainzm
dcd099e23d fix(esxi): add device after cloning vm 2020-11-06 11:54:45 +08:00
rainzm
d3dd1aced2 refactor(region): faster GetIImageById 2020-11-06 11:54:45 +08:00
rainzm
b89b24db0a refactor(region): faster sync CapacityUsed for Storage
1. replace cronjob SyncCapacityUsedForStorage with
SyncCapacityUsedForEsxiStorage
2. do not sync capacityUsed for storage when deleting and creating vm
for now because of performance issues。
2020-11-06 11:54:45 +08:00
rainzm
0eaf5a1059 feat(region): add option NoCheckOsTypeForCachedImage 2020-11-06 11:54:45 +08:00
Qu Xuan
42ced27941 fix: aliyun eip api 2020-11-06 11:10:03 +08:00
Qu Xuan
ac832b954c fix: 支持多内存过滤套餐 2020-11-06 10:31:53 +08:00
Qiu Jian
29a60005ea fix: missing column error when order by extra fields 2020-11-05 23:52:10 +08:00
yunion-ci-robot
2ffdb268ae Merge pull request #8671 from swordqiu/automated-cherry-pick-of-#8670-upstream-release-3.5
Automated cherry pick of #8670: feature: allow specify offset in name pattern
2020-11-05 18:32:16 +08:00
Zexi Li
8830b97487 scheduler: ignore non running guests only exclude ready status 2020-11-05 18:12:36 +08:00
Qiu Jian
cb4e20f71e feature: allow specify offset in name pattern 2020-11-05 16:49:31 +08:00
Zexi Li
fe2a1726c1 Merge pull request #8669 from tb365/automated-cherry-pick-of-#8667-upstream-release-3.5
Automated cherry pick of #8667: qcloud release prepaid resource bugfix
2020-11-05 15:08:52 +08:00
Zexi Li
f79f270bb9 Merge pull request #8665 from swordqiu/automated-cherry-pick-of-#8664-upstream-release-3.5
Automated cherry pick of #8664: update vendor for jsonutils
2020-11-05 13:10:27 +08:00
TangBin
1fa1d0f1e2 qcloud release prepaid resource bugfix 2020-11-05 12:01:54 +08:00
Qiu Jian
726a1acb8c update vendor for jsonutils 2020-11-05 11:31:38 +08:00
Zexi Li
d2cb9551f6 Merge pull request #8663 from swordqiu/automated-cherry-pick-of-#8662-upstream-release-3.5
Automated cherry pick of #8662: fix: 1. server generate name should be historically unique 2. ipaddr of a batch of server is in the same order as generated name
2020-11-05 00:38:50 +08:00
Qiu Jian
e3fe6c4351 fix: 1. server generate name should be historically unique 2. ipaddr of a batch of server is in the same order as generated name 2020-11-05 00:27:33 +08:00
Zexi Li
b9b98acd5b Merge pull request #8660 from zhaoxiangchun/automated-cherry-pick-of-#8659-upstream-release-3.5
Automated cherry pick of #8659: commonalert bugfix
2020-11-04 23:02:07 +08:00
Zexi Li
4f1104c074 Merge pull request #8653 from yousong/automated-cherry-pick-of-#8652-upstream-release-3.5
Automated cherry pick of #8652: networks: make filter by bgp types available
2020-11-04 21:13:39 +08:00
yunion-ci-robot
3e578294d9 Merge pull request #8657 from lvyangyang/automated-cherry-pick-of-#8655-upstream-release-3.5
Automated cherry pick of #8655: fix:域名正则校验dnsrecord name,同步中文域名取punycode
2020-11-04 18:42:10 +08:00
zhaoxiangchun
37f4b2615b commonalert bugfix 2020-11-04 18:20:10 +08:00
lvyangyang
5e592586b7 fix:域名正则校验dnsrecord name,同步中文域名取punycode 2020-11-04 17:38:55 +08:00
rainzm
972fa8a5f9 feat(region): filter network via storage 2020-11-04 17:18:45 +08:00
Yousong Zhou
cdac5347a5 climc: network-list with multiple --bgp-type args 2020-11-04 16:48:48 +08:00
Yousong Zhou
3f15eda2d8 networks: make filter by bgp types available 2020-11-04 16:48:48 +08:00
Yousong Zhou
81fd1025db networks: list: make bgp_type available 2020-11-04 16:48:48 +08:00
Zexi Li
a9b04b2285 Merge pull request #8648 from ioito/automated-cherry-pick-of-#8647-upstream-release-3.5
Automated cherry pick of #8647: fix: add rds status and expired time
2020-11-04 11:22:45 +08:00
Zexi Li
0e3bfdd335 Merge pull request #8645 from tb365/automated-cherry-pick-of-#8637-upstream-release-3.5
Automated cherry pick of #8637: qcloud create prepaid redis bugfix
2020-11-04 11:21:40 +08:00
Zexi Li
fa20b3a777 Merge pull request #8635 from tb365/automated-cherry-pick-of-#8633-upstream-release-3.5
Automated cherry pick of #8633: aws create bugfix
2020-11-04 11:20:32 +08:00
Zexi Li
9cad7da41a Merge pull request #8632 from zhaoxiangchun/automated-cherry-pick-of-#8631-upstream-release-3.5
Automated cherry pick of #8631: modify monitor querycondition:
2020-11-04 11:07:28 +08:00
Zexi Li
2548ea9a08 Merge pull request #8630 from swordqiu/automated-cherry-pick-of-#8628-upstream-release-3.5
Automated cherry pick of #8628: fix: scopedpolicybindings filter by scope project
2020-11-04 10:59:39 +08:00
Zexi Li
c6656eb66c Merge pull request #8641 from rainzm/automated-cherry-pick-of-#8640-upstream-release-3.5
Automated cherry pick of #8640: fix(notify): customize the title of the verification email based on the copyright
2020-11-04 10:56:53 +08:00
yunion-ci-robot
7f9c392b9c Merge pull request #8644 from swordqiu/automated-cherry-pick-of-#8643-upstream-release-3.5
Automated cherry pick of #8643: fix: elasticcache quota not take effect
2020-11-04 10:55:48 +08:00
Qu Xuan
ef48ebe91a fix: add rds status and expired time 2020-11-04 10:51:01 +08:00
zhaoxiangchun
77165400a2 modify monitor querycondition:
1.对于策略可以返回多个field value。供策略进行使用
2. 对于1种情况需要在commonalert种设置metadata属性
3. 修改alertresource get driver的判断逻辑
4. 针对host 相关的measurement 默认增加res_type 过滤filter
2020-11-04 10:46:19 +08:00
TangBin
fe165b0df7 add option PrepaidDeleteExpireCheck 2020-11-04 09:58:09 +08:00
TangBin
3046a936b2 qcloud delete prepaid redis bugfix 2020-11-04 09:58:09 +08:00
TangBin
ff1536e14e qcloud create prepaid redis bugfix 2020-11-04 09:58:09 +08:00
Qiu Jian
9df47307ba fix: elasticcache quota not take effect 2020-11-04 00:58:25 +08:00
Qiu Jian
185d203e8a fix: scopedpolicybindings filter by scope project 2020-11-03 23:13:43 +08:00
Zexi Li
6048177cc6 Merge pull request #8638 from ioito/automated-cherry-pick-of-#8636-upstream-release-3.5
Automated cherry pick of #8636: fix: add qcloud hssd
2020-11-03 20:41:59 +08:00
rainzm
835a4c4fcb fix(notify): customize the title of the verification email based on the copyright 2020-11-03 20:26:24 +08:00
Qu Xuan
668015d819 fix: add qcloud hssd 2020-11-03 20:21:45 +08:00
TangBin
2e83412bb4 lbcert cache delete bugfix 2020-11-03 16:41:45 +08:00
TangBin
2e71b98996 aws create bugfix 2020-11-03 16:41:45 +08:00
Zexi Li
b5b1ce6358 Merge pull request #8622 from rainzm/automated-cherry-pick-of-#8621-upstream-release-3.5
Automated cherry pick of #8621: fix(region): add SDnsZoneCache to DnsZoneCacheDetails
2020-11-03 11:49:54 +08:00
Zexi Li
4c14cb9d31 Merge pull request #8626 from ioito/automated-cherry-pick-of-#8625-upstream-release-3.5
Automated cherry pick of #8625: fix: avoid not found cdbro- mysql instance
2020-11-03 11:48:59 +08:00
Qu Xuan
e7fb15ede7 fix: avoid not found cdbro- mysql instance 2020-11-03 11:06:50 +08:00
Zexi Li
5b55996302 Merge pull request #8624 from swordqiu/automated-cherry-pick-of-#8618-upstream-release-3.5
Automated cherry pick of #8618: fix: scopedpolicybinding filter by category sql error
2020-11-03 10:41:09 +08:00
Zexi Li
83a8ff8c2a Merge pull request #8620 from wanyaoqi/automated-cherry-pick-of-#8619-upstream-release-3.5
Automated cherry pick of #8619: fix stream disk on add disk from snapshot
2020-11-03 10:39:46 +08:00
Zexi Li
af8ea56248 Merge pull request #8617 from rainzm/automated-cherry-pick-of-#8616-upstream-release-3.5
Automated cherry pick of #8616: fix(region): allow resize system disk of esxi
2020-11-03 10:39:05 +08:00
Qiu Jian
78a73fcbd2 fix: scopedpolicybinding filter by category sql error 2020-11-02 21:34:27 +08:00
rainzm
101b707e6a feat(region): use NotifyWebhook when operating dnszone 2020-11-02 19:50:54 +08:00
rainzm
01b779fa81 feat(region): add CloudCaches in DnsZoneDetails with GET 2020-11-02 19:50:54 +08:00
rainzm
db40b0d0a8 fix(region): add SDnsZoneCache to DnsZoneCacheDetails 2020-11-02 19:50:54 +08:00
wanyaoqi
4a3d933946 fix stream disk on add disk from snapshot 2020-11-02 19:32:02 +08:00
Zexi Li
e754f9e276 Merge pull request #8614 from ioito/automated-cherry-pick-of-#8613-upstream-release-3.5
Automated cherry pick of #8613: optimized: rds zone sync
2020-11-02 19:12:24 +08:00
rainzm
92f7843e55 fix(esxi): return sumsize of disks fo template 2020-11-02 17:32:29 +08:00
rainzm
291e132423 fix(region): allow resize system disk of esxi 2020-11-02 17:32:29 +08:00
Qu Xuan
89ca832fcf optimized: rds zone sync 2020-11-02 16:51:44 +08:00
Zexi Li
beb0cb4c02 Merge pull request #8600 from tb365/automated-cherry-pick-of-#8599-upstream-release-3.5
Automated cherry pick of #8599: qcloud create project not match bugfix
2020-11-02 15:51:16 +08:00
tangbin
8c0fc94d27 goimport fix 2020-11-02 15:40:31 +08:00
TangBin
dc7204a917 clean duplicate cached certificated at initial 2020-11-02 15:40:31 +08:00
TangBin
1173399230 qcloud create project not match bugfix 2020-11-02 15:40:31 +08:00
yunion-ci-robot
f372a99a9e Merge pull request #8612 from zhaoxiangchun/automated-cherry-pick-of-#8611-upstream-release-3.5
Automated cherry pick of #8611: deal return error info: tsdb
2020-11-02 10:25:47 +08:00
yunion-ci-robot
21b0d466bd Merge pull request #8605 from rainzm/automated-cherry-pick-of-#8603-upstream-release-3.5
Automated cherry pick of #8603: fix(region): compute NextSyncTime for snapshotpolicydisk
2020-11-02 01:45:45 +08:00
yunion-ci-robot
e8b8876c9b Merge pull request #8609 from swordqiu/automated-cherry-pick-of-#8608-upstream-release-3.5
Automated cherry pick of #8608: fix: save service config changes may send invalid action log
2020-11-01 11:48:48 +08:00
Zexi Li
5daff05829 Merge pull request #8607 from zexi/automated-cherry-pick-of-#8604-upstream-release-3.5
Automated cherry pick of #8604: monitor: query with signature and support measurement without database
2020-11-01 11:48:25 +08:00
zhaoxiangchun
b464f15818 deal return error info: tsdb 2020-10-31 23:30:29 +08:00
Qiu Jian
4144614573 fix: save service config changes may send invalid action log 2020-10-31 19:01:39 +08:00
Zexi Li
58132f02b1 monitor: query with signature and support measurement without database 2020-10-31 17:25:41 +08:00
Rain Zheng
161f38a770 fix(region): compute NextSyncTime for snapshotpolicydisk
1. 如果计算出来的 NextSyncTime 和 base 相等,可以将 base 加1一个小时递归处理。
2. 对于 retentionday 有效的快照策略,比如某一个 snaphsotpolicy
是每周一生效,并且打的快照自动保留 3 天,那么,就应该在每周一(打快照)
和每周四(释放快照)进行快照的同步。
2020-10-31 15:49:32 +08:00
yunion-ci-robot
5bd503c270 Merge pull request #8602 from zexi/automated-cherry-pick-of-#8601-upstream-release-3.5
Automated cherry pick of #8601: apigateway: disable influxdb service query proxy
2020-10-31 15:20:45 +08:00
Zexi Li
aa41580fcc apigateway: disable influxdb service query proxy 2020-10-31 12:52:01 +08:00
yunion-ci-robot
9e373223ee Merge pull request #8568 from yousong/automated-cherry-pick-of-#8567-upstream-release-3.5
Automated cherry pick of #8567: regiondrivers: kvm: exact match bgp_type
2020-10-30 19:30:44 +08:00
yunion-ci-robot
124c758bb9 Merge pull request #8597 from tb365/automated-cherry-pick-of-#8596-upstream-release-3.5
Automated cherry pick of #8596: qcloud cert bugfix
2020-10-30 16:15:43 +08:00
yunion-ci-robot
497654544e Merge pull request #8594 from rainzm/automated-cherry-pick-of-#8593-upstream-release-3.5
Automated cherry pick of #8593: fix(region): prevent dirty data when syncing snapshot
2020-10-30 16:14:44 +08:00
yunion-ci-robot
069812ae96 Merge pull request #8591 from ioito/automated-cherry-pick-of-#8590-upstream-release-3.5
Automated cherry pick of #8590: fix: secgroup cache tenant_id
2020-10-30 16:12:42 +08:00
TangBin
a624cf71ba qcloud certificate sync bugfix 2020-10-30 16:03:41 +08:00
TangBin
56f3605ae4 qcloud cert bugfix 2020-10-30 16:03:41 +08:00
rainzm
c2797990f2 fix(region): clear dirty data of snapshotpolicydisks when start up 2020-10-30 15:24:30 +08:00
rainzm
5a10d6ea5c fix(region): detach all snapshotpolicy when realdeleting disk 2020-10-30 15:24:30 +08:00
rainzm
710f08326b fix(region): prevent dirty data when syncing snapshot 2020-10-30 15:24:30 +08:00
Qu Xuan
d1806bf27f fix: secgroup cache tenant_id 2020-10-30 15:04:03 +08:00
yunion-ci-robot
bea6019b8b Merge pull request #8588 from ioito/automated-cherry-pick-of-#8587-upstream-release-3.5
Automated cherry pick of #8587: fix: sync rds class vpc
2020-10-30 13:47:43 +08:00
屈轩
6717a2fbbb fix: sync rds class vpc 2020-10-30 12:51:00 +08:00
yunion-ci-robot
3c50d4a00d Merge pull request #8585 from ioito/automated-cherry-pick-of-#8584-upstream-release-3.5
Automated cherry pick of #8584: fix: classic vpc for rds
2020-10-30 12:02:44 +08:00
Qu Xuan
8bd7fdd338 fix: classic vpc for rds 2020-10-30 11:15:32 +08:00
yunion-ci-robot
7fd80be2fa Merge pull request #8582 from swordqiu/automated-cherry-pick-of-#8581-upstream-release-3.5
Automated cherry pick of #8581: fix: compatible with qcloud zonal bucket
2020-10-30 09:18:42 +08:00
yunion-ci-robot
d209503ec4 Merge pull request #8562 from zexi/automated-cherry-pick-of-#8558-upstream-release-3.5
Automated cherry pick of #8558: informer: ignore outside context cancel when worker run
2020-10-30 00:36:43 +08:00
Qiu Jian
55b28559c5 fix: compatible with qcloud zonal bucket 2020-10-30 00:16:37 +08:00
yunion-ci-robot
49c714fd70 Merge pull request #8577 from rainzm/automated-cherry-pick-of-#8576-upstream-release-3.5
Automated cherry pick of #8576: fix(region): sync automatically snapshot for external disk
2020-10-29 23:31:44 +08:00
yunion-ci-robot
af3727a4ad Merge pull request #8574 from tb365/automated-cherry-pick-of-#8573-upstream-release-3.5
Automated cherry pick of #8573: qcloud elb cert duplicate fix
2020-10-29 23:29:44 +08:00
rainzm
90c6c32993 fix(region): sync automatically snapshot for external disk 2020-10-29 22:31:43 +08:00
TangBin
12ad994edf qcloud elb cert duplicate fix 2020-10-29 22:27:40 +08:00
yunion-ci-robot
404d40d543 Merge pull request #8571 from tb365/automated-cherry-pick-of-#8570-upstream-release-3.5
Automated cherry pick of #8570: qcloud redis create missing project id bugfix
2020-10-29 21:06:45 +08:00
Zexi Li
67e1b9536b informer: ignore outside context cancel when worker run 2020-10-29 20:53:39 +08:00
TangBin
89a1ff8838 qcloud redis create missing project id bugfix 2020-10-29 20:49:58 +08:00
Yousong Zhou
fb2fa1bc9a Merge pull request #8565 from rainzm/automated-cherry-pick-of-#8564-upstream-release-3.5
Automated cherry pick of #8564: update vendor
2020-10-29 20:38:09 +08:00
Yousong Zhou
f0959c2850 climc: servers: create with eip bgp type 2020-10-29 17:50:52 +08:00
Yousong Zhou
c6c661855c guests: add bgp_type arg when create guest 2020-10-29 17:50:52 +08:00
Yousong Zhou
6713df1f52 elasticips: NewEipForVMOnHost: make args a struct 2020-10-29 17:50:51 +08:00
Yousong Zhou
7e62b2823f regiondrivers: kvm: exact match bgp_type 2020-10-29 17:50:51 +08:00
yunion-ci-robot
229f79d6e2 Merge pull request #8563 from yousong/automated-cherry-pick-of-#8227-upstream-release-3.5
Automated cherry pick of #8227: vendor: update yunion.io/x/sqlchemy
2020-10-29 17:48:42 +08:00
rainzm
7d466205f1 update vendor 2020-10-29 17:24:48 +08:00
Yousong Zhou
3c3743fbf5 climc: eip ops by bgp type 2020-10-29 17:22:11 +08:00
Yousong Zhou
952bea3951 eip: create by BgpType 2020-10-29 17:22:11 +08:00
Yousong Zhou
782f919f3b networks: add field BgpType 2020-10-29 17:22:11 +08:00
yunion-ci-robot
3ca223acc0 Merge pull request #8560 from tb365/automated-cherry-pick-of-#8559-upstream-release-3.5
Automated cherry pick of #8559: qcloud lb sync project bugfix
2020-10-29 17:18:42 +08:00
TangBin
d1e855aee5 qcloud lb sync project bugfix 2020-10-29 16:46:56 +08:00
yunion-ci-robot
f46bd2ba02 Merge pull request #8555 from tb365/automated-cherry-pick-of-#8554-upstream-release-3.5
Automated cherry pick of #8554: add redis capabilty & lb purge
2020-10-29 16:31:42 +08:00
yunion-ci-robot
ae6167b01f Merge pull request #8557 from wanyaoqi/automated-cherry-pick-of-#8556-upstream-release-3.5
Automated cherry pick of #8556: retry generate ifname from random string
2020-10-29 15:14:49 +08:00
wanyaoqi
4b6df1c6a9 retry generate ifname from random string 2020-10-29 15:03:29 +08:00
TangBin
c069b03096 redis 2.8 reset password bugfix 2020-10-29 14:29:01 +08:00
TangBin
c909d657a7 add redis capabilty & lb purge 2020-10-29 14:29:01 +08:00
yunion-ci-robot
d9aeb7ddc8 Merge pull request #8549 from swordqiu/automated-cherry-pick-of-#8548-upstream-release-3.5
Automated cherry pick of #8548: fix: fail to delete public_ip eip
2020-10-29 00:56:42 +08:00
yunion-ci-robot
48c87f7d92 Merge pull request #8542 from ioito/automated-cherry-pick-of-#8541-upstream-release-3.5
Automated cherry pick of #8541: fix: avoid sync part of rds
2020-10-29 00:55:42 +08:00
yunion-ci-robot
8df93ddd84 Merge pull request #8552 from swordqiu/automated-cherry-pick-of-#8551-upstream-release-3.5
Automated cherry pick of #8551: fix: make test go vet error
2020-10-29 00:52:43 +08:00
yunion-ci-robot
632ecd2d9c Merge pull request #8547 from tb365/automated-cherry-pick-of-#8543-upstream-release-3.5
Automated cherry pick of #8543: qcloud elb auth mode bugfix
2020-10-29 00:51:41 +08:00
yunion-ci-robot
739ad6822c Merge pull request #8546 from rainzm/automated-cherry-pick-of-#8545-upstream-release-3.5
Automated cherry pick of #8545: refactor(region): remove return value of NotifyWebhook
2020-10-28 23:58:43 +08:00
Qiu Jian
f896e020d2 fix: make test go vet error 2020-10-28 23:54:42 +08:00
Qiu Jian
56a423d826 fix: fail to delete public_ip eip 2020-10-28 23:45:47 +08:00
tangbin
c00402f670 redis delete bugfix 2020-10-28 22:14:08 +08:00
TangBin
f022fa1409 qcloud elb auth mode bugfix 2020-10-28 22:14:08 +08:00
rainzm
21e3f85c74 feat(region): call NotifyWebhook in when sonme tasks complete
dbinstace: create, delete, change_config;

elasticcache: create, delete, change_config;

loadbalancer, loadbalancer_backend_group,
loadbalancer_listener, loadbalancer_backend: create, delete
2020-10-28 21:23:04 +08:00
rainzm
e4d1153ec6 refactor(region): remove return value of NotifyWebhook 2020-10-28 21:23:04 +08:00
yunion-ci-robot
f6ad813de7 Merge pull request #8539 from lvyangyang/automated-cherry-pick-of-#8538-upstream-release-3.5
Automated cherry pick of #8538: qcloud redis tags
2020-10-28 21:11:50 +08:00
Qu Xuan
778c42f811 fix: avoid sync part of rds 2020-10-28 20:21:32 +08:00
yunion-ci-robot
083fdb2d42 Merge pull request #8536 from rainzm/automated-cherry-pick-of-#8535-upstream-release-3.5
Automated cherry pick of #8535: refactor(region): faster list for cachedimage
2020-10-28 17:58:42 +08:00
lvyangyang
6632c604e7 qcloud redis tags 2020-10-28 16:09:25 +08:00
rainzm
ca5ae5f4fd refactor(region): faster list for cachedimage
Pro version of #8440 with checking the necessity of id filtering
2020-10-28 15:23:03 +08:00
yunion-ci-robot
4a006a0654 Merge pull request #8534 from tb365/automated-cherry-pick-of-#8533-upstream-release-3.5
Automated cherry pick of #8533: sync elb support classic vpc
2020-10-28 12:37:42 +08:00
tangbin
eca4dfca31 elb sync bugfix 2020-10-28 12:14:58 +08:00
tangbin
969d955348 sync elb support classic vpc 2020-10-28 12:14:58 +08:00
yunion-ci-robot
976741ad99 Merge pull request #8524 from tb365/automated-cherry-pick-of-#8523-upstream-release-3.5
Automated cherry pick of #8523: qcloud redis support
2020-10-28 01:07:40 +08:00
yunion-ci-robot
44163a9e01 Merge pull request #8526 from rainzm/automated-cherry-pick-of-#8525-upstream-release-3.5
Automated cherry pick of #8525: fix(esxi): no callback in uploadHandler
2020-10-28 01:02:41 +08:00
yunion-ci-robot
50dc66d142 Merge pull request #8513 from ioito/automated-cherry-pick-of-#8512-upstream-release-3.5
Automated cherry pick of #8512: fix: avoid sync project panic
2020-10-28 00:55:42 +08:00
yunion-ci-robot
a69da08b8d Merge pull request #8467 from rainzm/automated-cherry-pick-of-#8443-upstream-release-3.5
Automated cherry pick of #8443: Respect multiple disks in VMware Template
2020-10-28 00:17:42 +08:00
rainzm
762004154b fix(esxi): filter vmdk item in lease.info 2020-10-27 21:31:24 +08:00
rainzm
ea24f39d1d fix(esxi): use correct device index
1. Sort devices via their Key.
2. There is no relationship between vdisk index and vnics length.
2020-10-27 21:31:24 +08:00
rainzm
99c8a0a32b fix(esxi): no callback in uploadHandler 2020-10-27 21:31:24 +08:00
TangBin
5c60e340a1 qcloud redis support 2020-10-27 20:37:24 +08:00
yunion-ci-robot
3850eaa815 Merge pull request #8507 from swordqiu/automated-cherry-pick-of-#8435-upstream-release-3.5
Automated cherry pick of #8435: feature: support scoped policy that manage ui policies for domains&projects
2020-10-27 18:19:40 +08:00
yunion-ci-robot
7e2293c0d2 Merge pull request #8511 from ioito/automated-cherry-pick-of-#8510-upstream-release-3.5
Automated cherry pick of #8510: fix: optimized cloudaccount climc
2020-10-27 17:33:41 +08:00
Zexi Li
0e9d55aaf9 Merge pull request #8518 from ioito/automated-cherry-pick-of-#8517-upstream-release-3.5
Automated cherry pick of #8517: fix: set secgroup status
2020-10-27 17:28:33 +08:00
yunion-ci-robot
00a6e147ab Merge pull request #8506 from ioito/automated-cherry-pick-of-#8505-upstream-release-3.5
Automated cherry pick of #8505: add: DisableDelete for lb
2020-10-27 17:05:40 +08:00
yunion-ci-robot
4ce9af0039 Merge pull request #8508 from ioito/automated-cherry-pick-of-#8504-upstream-release-3.5
Automated cherry pick of #8504: fix: qcloud server create
2020-10-27 16:19:41 +08:00
Qu Xuan
2d0c242fcc fix: set secgroup status 2020-10-27 16:18:43 +08:00
Qu Xuan
23dfe41158 fix: avoid sync project panic 2020-10-27 16:13:24 +08:00
Qu Xuan
29a147d2f8 fix: optimized cloudaccount climc 2020-10-27 15:35:14 +08:00
rainzm
330e54c3cb feat(esxi): expand disk config from subimages when creating vm 2020-10-27 10:50:14 +08:00
rainzm
f2adccd085 feat: respect params.Disks when cloning vm 2020-10-27 10:50:14 +08:00
rainzm
b5cd21b324 feat: add SubImages in Image 2020-10-27 10:50:14 +08:00
Qu Xuan
c022bd96eb fix: qcloud server create 2020-10-27 10:50:06 +08:00
Qiu Jian
12d196404b list support scope filter 2020-10-27 00:53:15 +08:00
Qiu Jian
513ddb266b update api models 2020-10-27 00:53:15 +08:00
Qiu Jian
9bf439c300 feature: support scoped policy that manage ui policies for domains&projects 2020-10-27 00:53:15 +08:00
Qu Xuan
c21f80333b add: DisableDelete for lb 2020-10-26 21:52:24 +08:00
yunion-ci-robot
5e20018348 Merge pull request #8500 from yousong/automated-cherry-pick-of-#8499-upstream-release-3.5
Automated cherry pick of #8499: lockman: test: add prefix setting
2020-10-26 21:23:40 +08:00
Yousong Zhou
00766e2648 lockman: test: add prefix setting 2020-10-26 20:36:11 +08:00
yunion-ci-robot
47e4e49031 Merge pull request #8497 from zhaoxiangchun/automated-cherry-pick-of-#8496-upstream-release-3.5
Automated cherry pick of #8496: commalertUpdateInput increat param:
2020-10-26 19:55:48 +08:00
zhaoxiangchun
5d67a1090f commalertUpdateInput increat param:
1.处理operator对alertType == system的报警策略的update请求
2020-10-26 18:20:44 +08:00
yunion-ci-robot
5c2b498f86 Merge pull request #8495 from rainzm/automated-cherry-pick-of-#8493-upstream-release-3.5
Automated cherry pick of #8493: fix(region): roll back the optimization of cachedimage list
2020-10-26 18:16:41 +08:00
rainzm
afc3a44dc2 fix(region): roll back the optimization of cachedimage list 2020-10-26 17:38:29 +08:00
yunion-ci-robot
c492a8545d Merge pull request #8488 from ioito/automated-cherry-pick-of-#8487-upstream-release-3.5
Automated cherry pick of #8487: fix: avoid delete public ip when sync eip list
2020-10-26 17:02:41 +08:00
Qu Xuan
2ab871d37a fix: avoid delete public ip when sync eip list 2020-10-26 16:18:28 +08:00
yunion-ci-robot
81772388bc Merge pull request #8465 from wanyaoqi/automated-cherry-pick-of-#8464-upstream-release-3.5
Automated cherry pick of #8464: check disk is in reset before delete snapshot
2020-10-25 10:54:39 +08:00
yunion-ci-robot
8e39e5d178 Merge pull request #8485 from swordqiu/automated-cherry-pick-of-#8484-upstream-release-3.5
Automated cherry pick of #8484: fix: server usage status not correct
2020-10-25 10:52:41 +08:00
Qiu Jian
251be113b1 fix: server usage status not correct 2020-10-25 08:38:11 +08:00
Zexi Li
947493939a Merge pull request #8482 from ioito/automated-cherry-pick-of-#8481-upstream-release-3.5
Automated cherry pick of #8481: fix: 避免参数异常
2020-10-24 13:11:26 +08:00
Zexi Li
442f74f2ae Merge pull request #8471 from wanyaoqi/automated-cherry-pick-of-#8470-upstream-release-3.5
Automated cherry pick of #8470: fix on stream disk complete snapshots refcount not update
2020-10-24 13:09:34 +08:00
Zexi Li
a30adf1f65 Merge pull request #8475 from zexi/automated-cherry-pick-of-#8474-upstream-release-3.5
Automated cherry pick of #8474: monitor: set default influxdb datasource by endpoint type
2020-10-24 13:07:02 +08:00
Qu Xuan
c89ce678ab fix: 避免参数异常 2020-10-24 13:00:26 +08:00
Zexi Li
4432865f8f Merge pull request #8473 from ioito/automated-cherry-pick-of-#8415-upstream-release-3.5
Automated cherry pick of #8415: fix: 支持多安全组
2020-10-24 12:10:59 +08:00
Qu Xuan
ec7e2876b7 fix: 支持多安全组 2020-10-24 11:52:41 +08:00
yunion-ci-robot
eb3bffc406 Merge pull request #8480 from swordqiu/automated-cherry-pick-of-#8460-upstream-release-3.5
Automated cherry pick of #8460: create with tags
2020-10-23 21:15:15 +08:00
lvyangyang
2f1acf76a6 create with tags 2020-10-23 21:07:18 +08:00
yunion-ci-robot
e024906c25 Merge pull request #8479 from tb365/automated-cherry-pick-of-#8478-upstream-release-3.5
Automated cherry pick of #8478: loadbalancer support batch create
2020-10-23 21:01:16 +08:00
TangBin
2b13a33320 qcloud zone sync fix 2020-10-23 20:47:24 +08:00
TangBin
6aeed21b12 loadbalancer support batch create 2020-10-23 20:47:24 +08:00
yunion-ci-robot
38e8ad8a4c Merge pull request #8469 from ioito/automated-cherry-pick-of-#8468-upstream-release-3.5
Automated cherry pick of #8468: fix: qcloud 5.5 single zone
2020-10-23 20:18:17 +08:00
Zexi Li
2a59af0756 monitor: set default influxdb datasource by endpoint type 2020-10-23 20:09:44 +08:00
Qu Xuan
0c31e798ee fix: 支持批量创建rds 2020-10-23 20:01:50 +08:00
Qu Xuan
2e3cb33786 fix: qcloud 5.5 single zone 2020-10-23 20:01:50 +08:00
wanyaoqi
b21d440784 fix on stream disk complete snapshots refcount not update 2020-10-23 19:11:08 +08:00
yunion-ci-robot
33f055fa69 Merge pull request #8413 from zhaoxiangchun/automated-cherry-pick-of-#8412-upstream-release-3.5
Automated cherry pick of #8412: bugfix:
2020-10-23 18:35:17 +08:00
yunion-ci-robot
4e4f2f58cb Merge pull request #8462 from rainzm/automated-cherry-pick-of-#8461-upstream-release-3.5
Automated cherry pick of #8461: fix(glance): allow public and private operations of guestimage
2020-10-23 18:28:16 +08:00
wanyaoqi
91c2c2278b check disk is in reset before delete snapshot 2020-10-23 18:24:55 +08:00
yunion-ci-robot
7deb312771 Merge pull request #8451 from wanyaoqi/automated-cherry-pick-of-#8450-upstream-release-3.5
Automated cherry pick of #8450: host increase cpu mem max size
2020-10-23 18:18:19 +08:00
yunion-ci-robot
4287965824 Merge pull request #8457 from rainzm/automated-cherry-pick-of-#8456-upstream-release-3.5
Automated cherry pick of #8456: fix(esxi): resize root disk after cloning vm
2020-10-23 18:17:20 +08:00
yunion-ci-robot
4708b9f2f5 Merge pull request #8453 from tb365/automated-cherry-pick-of-#8449-upstream-release-3.5
Automated cherry pick of #8449: add qcloud elb zone1 details
2020-10-23 18:16:16 +08:00
yunion-ci-robot
04f9cee20e Merge pull request #8455 from rainzm/automated-cherry-pick-of-#8454-upstream-release-3.5
Automated cherry pick of #8454: fix(esxi): resize root disk after creating vm
2020-10-23 18:14:15 +08:00
Zexi Li
78b5b28cb8 Merge pull request #8448 from ioito/automated-cherry-pick-of-#8447-upstream-release-3.5
Automated cherry pick of #8447: fix: sync rds account host info
2020-10-23 18:03:56 +08:00
zhaoxiangchun
7d3bbc4609 bugfix:
1.资源报警增加websocket 消息通知:admin用户
2.统一influxdb中查询到的tag展示
2020-10-23 17:57:56 +08:00
rainzm
64ba4602c4 fix(glance): allow public and private operations of guestimage
The public and private operations of the guest image depends on these operations of the subimage.
2020-10-23 17:56:16 +08:00
Qu Xuan
a1c7d5e55a fix: add duration match 2020-10-23 17:16:32 +08:00
Qu Xuan
1c84dc2a46 fix: sync rds account host info 2020-10-23 17:16:32 +08:00
rainzm
d7b25da2ec fix(esxi): resize root disk after cloning vm
The root disk size set when the machine is cloned does not take effect,
so set the root disk size after the machine is cloned.
2020-10-23 17:03:14 +08:00
rainzm
401b56c7a0 fix(esxi): resize root disk after creating vm
The root disk size set when the machine is created does not take effect,
so set the root disk size after the machine is created.
2020-10-23 16:46:42 +08:00
TangBin
b795c271b1 elb salve zone 1 external id bugfix 2020-10-23 16:26:03 +08:00
TangBin
0e4c215ac0 elb sync zone bugfix 2020-10-23 16:26:03 +08:00
TangBin
00d028c68d add qcloud elb zone1 details 2020-10-23 16:26:03 +08:00
wanyaoqi
998909c397 host increase cpu mem max size 2020-10-23 15:15:23 +08:00
yunion-ci-robot
b033b6ce4a Merge pull request #8446 from swordqiu/automated-cherry-pick-of-#8445-upstream-release-3.5
Automated cherry pick of #8445: resource tags
2020-10-22 22:44:18 +08:00
lvyangyang
d6943563fe resource tags 2020-10-22 22:26:17 +08:00
yunion-ci-robot
f3d7590263 Merge pull request #8411 from rainzm/automated-cherry-pick-of-#8410-upstream-release-3.5
Automated cherry pick of #8410: feat(esxi): copy disk from image when creating vm
2020-10-22 21:28:14 +08:00
yunion-ci-robot
f3bdf0cd48 Merge pull request #8441 from rainzm/automated-cherry-pick-of-#8440-upstream-release-3.5
Automated cherry pick of #8440: refactor(region): faster list for cachedimage
2020-10-22 21:27:13 +08:00
rainzm
416919c664 refactor(region): faster list for cachedimage
修改之前:
诸如provider, zone, host_schedtag_id, valid
等过滤条件,是通过过滤出符合条件的 storagecachedimage 然后使用 cachedimage_id 来过滤 cachedimge,
问题是,每一个过滤条件都会独立的去执行上面的过程,这样同样的查询可能要经过很多次,并且如果遇到
弱的过滤条件,比如 valid ,过滤出来的 storagecachedimage
非常之多,然后在使用 cachedimage_id 去过滤 cachedimage,会非常慢。

修改之后:
过滤条件的相似的逻辑合并起来,只需要向 subQuery 中添加 filter,使用 subQuery 一次把 storagecachedimage
过滤出来,然后使用 cachedimage_id 过滤 cachedimage。
2020-10-22 20:17:50 +08:00
yunion-ci-robot
31e8ea973a Merge pull request #8427 from ioito/automated-cherry-pick-of-#8426-upstream-release-3.5
Automated cherry pick of #8426: fix: 避免冲掉设置的到期释放时间
2020-10-22 20:13:22 +08:00
yunion-ci-robot
cfbd9b2eb4 Merge pull request #8432 from lvyangyang/automated-cherry-pick-of-#8416-upstream-release-3.5
Automated cherry pick of #8416: fix:get all project dns resource
2020-10-22 20:11:16 +08:00
yunion-ci-robot
6443c595c1 Merge pull request #8431 from tb365/automated-cherry-pick-of-#8430-upstream-release-3.5
Automated cherry pick of #8430: qcloud elb support multi zones
2020-10-22 20:10:16 +08:00
yunion-ci-robot
a2ffb8f9e7 Merge pull request #8438 from rainzm/automated-cherry-pick-of-#8437-upstream-release-3.5
Automated cherry pick of #8437: fix(region): add suffix 'display' for time_points and repeat_weekdays
2020-10-22 20:07:17 +08:00
rainzm
89b5cccd5c fix: don't update NextSyncTime when snapshots that should be added has not 2020-10-22 19:41:37 +08:00
rainzm
df0b4e6650 fix(region): init NextSyncTimeiwhen create snapshotpolicydisks 2020-10-22 19:41:37 +08:00
rainzm
ac54c033e9 fix(region): add suffix 'display' for time_points and repeat_weekdays
TimePoints and RepeatWeekdays in SnapshotPolicyDetails is duplicated
with thess in SnapshotPolicy, which result in the fault of reponse for
request GET.
2020-10-22 19:41:37 +08:00
lvyangyang
a96fbe41e2 fix:get all project dns resource 2020-10-22 16:23:48 +08:00
TangBin
6252c2683e qcloud elb supplort multi zones 2020-10-22 16:12:58 +08:00
TangBin
7f390ba432 climc lb-create add parameter zone1 2020-10-22 16:12:57 +08:00
TangBin
1661bdde3e qcloud elb support multi zones 2020-10-22 16:12:57 +08:00
Qu Xuan
ba3d66ba9b fix: 避免冲掉设置的到期释放时间 2020-10-22 15:40:42 +08:00
yunion-ci-robot
d79a69fbda Merge pull request #8408 from wanyaoqi/automated-cherry-pick-of-#8407-upstream-release-3.5
Automated cherry pick of #8407: fix informer backend
2020-10-22 15:04:18 +08:00
yunion-ci-robot
ad87648fb6 Merge pull request #8418 from ioito/automated-cherry-pick-of-#8417-upstream-release-3.5
Automated cherry pick of #8417: fix: secgroup quota support
2020-10-22 14:57:15 +08:00
yunion-ci-robot
50515c6d16 Merge pull request #8422 from ioito/automated-cherry-pick-of-#8419-upstream-release-3.5
Automated cherry pick of #8419: fix: add lb quota check
2020-10-22 14:44:17 +08:00
yunion-ci-robot
125fe6f1ef Merge pull request #8421 from ioito/automated-cherry-pick-of-#8420-upstream-release-3.5
Automated cherry pick of #8420: fix: add rds quota check
2020-10-22 14:43:14 +08:00
yunion-ci-robot
4770284309 Merge pull request #8424 from ioito/automated-cherry-pick-of-#8423-upstream-release-3.5
Automated cherry pick of #8423: fix: add aliyun new region
2020-10-22 14:31:18 +08:00
Qu Xuan
3e8aa83467 fix: add aliyun new region 2020-10-22 11:52:44 +08:00
Qu Xuan
5f0d12a60e fix: add lb quota check 2020-10-21 21:31:42 +08:00
Qu Xuan
d19207c81a fix: add rds quota check 2020-10-21 21:31:02 +08:00
Qu Xuan
979119d042 fix: secgroup quota support 2020-10-21 21:29:42 +08:00
rainzm
fc9272ede2 feat(esxi): copy disk from image when creating vm
Before, we use delta disk based on vmdk in image_cache when creating vm.
In theory, creating a machine like this is faster and occupies less storage.
However, it may also affect performance and definitely cannot change the
size of the system disk.

Now, we copy disk from vmdk in image_cache to solve above questions.
2020-10-21 14:50:51 +08:00
wanyaoqi
a5a359075c fix informer backend 2020-10-21 10:53:44 +08:00
yunion-ci-robot
65d5c3cd6c Merge pull request #8405 from rainzm/automated-cherry-pick-of-#8404-upstream-release-3.5
Automated cherry pick of #8404: fix(notify): add AllOkContactTypes in where permanently enabled and verified ContactType
2020-10-21 10:49:13 +08:00
rainzm
7cfbb69950 feat(notify): add IntelliNotify
IntelliNotify will try to create receiver nonexistent if createReceiver is set to true
2020-10-20 20:37:54 +08:00
rainzm
8151e6fad7 fix(notify): add AllOkContactTypes in where permanently enabled and verified ContactType 2020-10-20 20:37:54 +08:00
yunion-ci-robot
b9d0a3f58e Merge pull request #8399 from ioito/automated-cherry-pick-of-#8193-upstream-release-3.5
Automated cherry pick of #8193: feature: add qcloud rds support
2020-10-20 18:59:12 +08:00
Zexi Li
53037744d8 Merge pull request #8401 from wanyaoqi/automated-cherry-pick-of-#8400-upstream-release-3.5
Automated cherry pick of #8400: fix fetch customize columns
2020-10-20 18:52:39 +08:00
wanyaoqi
6545f1ef84 fix fetch customize columns 2020-10-20 18:43:23 +08:00
Qu Xuan
b7953adbee feature: add qcloud rds support 2020-10-20 17:56:41 +08:00
1044 changed files with 46413 additions and 27043 deletions

7
.dockerignore Normal file
View File

@@ -0,0 +1,7 @@
_output/alpine-build/_cache
pkg
vendor
cmd
locales
docs
scripts

1
.gitignore vendored
View File

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

View File

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

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,18 +0,0 @@
## {{.title}}
- 时间: {{.start_time}}
- 级别: {{.level}}
- 详情地址: {{.web_url}}/commonalerts
{{ range .matches}}
- 指标: {{.metric}}
- 触发值: {{html .value_str}}
### 触发条件:
- {{html $.description}}
### 标签
> 名称: {{ index .tags "name" }}
> ip: {{ index .tags "ip" }}
> 平台: {{ index .tags "brand" }}
------
{{- end}}

View File

@@ -1,18 +0,0 @@
## {{.title}}
- Time: {{.start_time}}
- Level: {{.level}}
- WebUrl: {{.web_url}}/commonalerts
{{ range .matches}}
- Metric: {{.metric}}
- Trigger value: {{html .value_str}}
### Trigger condition:
- {{html $.description }}
### Label
> Name: {{ index .tags "name" }}
> IP: {{ index .tags "ip" }}
> Brand: {{ index .tags "brand" }}
------
{{- end}}

View File

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

View File

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

View File

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

View File

@@ -15,9 +15,14 @@
package main
import (
"context"
"yunion.io/x/onecloud/pkg/ansibleserver/service"
"yunion.io/x/onecloud/pkg/util/procutils"
)
func main() {
go procutils.WaitZombieLoop(context.TODO())
service.StartService()
}

View File

@@ -15,12 +15,17 @@
package main
import (
"context"
"yunion.io/x/onecloud/pkg/baremetal/service"
"yunion.io/x/onecloud/pkg/util/atexit"
"yunion.io/x/onecloud/pkg/util/procutils"
)
func main() {
defer atexit.Handle()
go procutils.WaitZombieLoop(context.TODO())
service.New().StartService()
}

View File

@@ -17,22 +17,22 @@ package cloudid
import (
"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/cloudid"
)
func init() {
cmd := shell.NewResourceCmd(&modules.Cloudgroups).WithKeyword("cloud-group")
cmd.List(&options.CloudgroupListOptions{})
cmd.Create(&options.CloudgroupCreateOptions{})
cmd.Show(&options.CloudgroupIdOptions{})
cmd.Delete(&options.CloudgroupIdOptions{})
cmd.Perform("syncstatus", &options.CloudgroupIdOptions{})
cmd.Perform("attach-policy", &options.CloudgroupPolicyOptions{})
cmd.Perform("detach-policy", &options.CloudgroupPolicyOptions{})
cmd.Perform("add-user", &options.CloudgroupUserOptions{})
cmd.Perform("remove-user", &options.CloudgroupUserOptions{})
cmd.Perform("set-policies", &options.CloudgroupPolicyOptions{})
cmd.Perform("set-users", &options.CloudgroupUserOptions{})
cmd.Perform("public", &options.CloudgroupPublicOptions{})
cmd.Perform("private", &options.CloudgroupIdOptions{})
cmd.List(&cloudid.CloudgroupListOptions{})
cmd.Create(&cloudid.CloudgroupCreateOptions{})
cmd.Show(&cloudid.CloudgroupIdOptions{})
cmd.Delete(&cloudid.CloudgroupIdOptions{})
cmd.Perform("syncstatus", &cloudid.CloudgroupIdOptions{})
cmd.Perform("attach-policy", &cloudid.CloudgroupPolicyOptions{})
cmd.Perform("detach-policy", &cloudid.CloudgroupPolicyOptions{})
cmd.Perform("add-user", &cloudid.CloudgroupUserOptions{})
cmd.Perform("remove-user", &cloudid.CloudgroupUserOptions{})
cmd.Perform("set-policies", &cloudid.CloudgroupPolicyOptions{})
cmd.Perform("set-users", &cloudid.CloudgroupUserOptions{})
cmd.Perform("public", &cloudid.CloudgroupPublicOptions{})
cmd.Perform("private", &cloudid.CloudgroupIdOptions{})
}

View File

@@ -15,59 +15,15 @@
package cloudid
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"
"yunion.io/x/onecloud/pkg/mcclient/options/cloudid"
)
func init() {
type CloudgroupcacheListOptions struct {
options.BaseListOptions
CloudgroupId string `json:"cloudgroup_id"`
}
R(&CloudgroupcacheListOptions{}, "cloud-group-cache-list", "List cloud group caches", func(s *mcclient.ClientSession, opts *CloudgroupcacheListOptions) error {
params, err := options.ListStructToParams(opts)
if err != nil {
return err
}
result, err := modules.Cloudgroupcaches.List(s, params)
if err != nil {
return err
}
printList(result, modules.Cloudgroupcaches.GetColumns(s))
return nil
})
type CloudgroupcacheIdOption struct {
ID string `help:"Cloudgroup Id"`
}
R(&CloudgroupcacheIdOption{}, "cloud-group-cache-show", "Show cloud groupcache details", func(s *mcclient.ClientSession, opts *CloudgroupcacheIdOption) error {
result, err := modules.Cloudgroupcaches.Get(s, opts.ID, nil)
if err != nil {
return err
}
printObject(result)
return nil
})
R(&CloudgroupcacheIdOption{}, "cloud-group-cache-syncstatus", "Sync cloudgroupcache", func(s *mcclient.ClientSession, opts *CloudgroupcacheIdOption) error {
result, err := modules.Cloudgroupcaches.PerformAction(s, opts.ID, "syncstatus", nil)
if err != nil {
return err
}
printObject(result)
return nil
})
R(&CloudgroupcacheIdOption{}, "cloud-group-cache-delete", "Delete cloudgroupcache", func(s *mcclient.ClientSession, opts *CloudgroupcacheIdOption) error {
result, err := modules.Cloudgroupcaches.Delete(s, opts.ID, nil)
if err != nil {
return err
}
printObject(result)
return nil
})
cmd := shell.NewResourceCmd(&modules.Cloudgroupcaches).WithKeyword("cloud-group-cache")
cmd.List(&cloudid.CloudgroupcacheListOptions{})
cmd.Show(&cloudid.CloudgroupcacheIdOption{})
cmd.Delete(&cloudid.CloudgroupcacheIdOption{})
cmd.Perform("syncstatus", &cloudid.CloudgroupcacheIdOption{})
}

View File

@@ -15,58 +15,12 @@
package cloudid
import (
"yunion.io/x/jsonutils"
"yunion.io/x/onecloud/pkg/mcclient"
"yunion.io/x/onecloud/pkg/mcclient/modulebase"
"yunion.io/x/onecloud/cmd/climc/shell"
"yunion.io/x/onecloud/pkg/mcclient/modules"
"yunion.io/x/onecloud/pkg/mcclient/options"
"yunion.io/x/onecloud/pkg/mcclient/options/cloudid"
)
func init() {
type CloudgroupPolicyListOptions struct {
options.BaseListOptions
Cloudgroup string `help:"ID or Name of Cloudgroup"`
Cloudpolicy string `help:"Policy ID or name"`
}
R(&CloudgroupPolicyListOptions{}, "cloud-group-policy-list", "List cloudgroup cloudpolicy pairs", func(s *mcclient.ClientSession, args *CloudgroupPolicyListOptions) error {
var params *jsonutils.JSONDict
{
var err error
params, err = args.BaseListOptions.Params()
if err != nil {
return err
}
}
var result *modulebase.ListResult
var err error
if len(args.Cloudgroup) > 0 {
result, err = modules.Cloudgrouppolicies.ListDescendent(s, args.Cloudgroup, params)
} else if len(args.Cloudpolicy) > 0 {
result, err = modules.Cloudgrouppolicies.ListDescendent2(s, args.Cloudpolicy, params)
} else {
result, err = modules.Cloudgrouppolicies.List(s, params)
}
if err != nil {
return err
}
printList(result, modules.Cloudgrouppolicies.GetColumns(s))
return nil
})
type CloudgroupPolicyDetailOptions struct {
CLOUDUSER string `help:"ID or Name of Cloudgroup"`
CLOUDPOLICY string `help:"ID or Name of Cloudpolicy"`
}
R(&CloudgroupPolicyDetailOptions{}, "cloud-group-policy-show", "Show cloudgrouppolicy details", func(s *mcclient.ClientSession, args *CloudgroupPolicyDetailOptions) error {
query := jsonutils.NewDict()
result, err := modules.Cloudgrouppolicies.Get(s, args.CLOUDUSER, args.CLOUDPOLICY, query)
if err != nil {
return err
}
printObject(result)
return nil
})
cmd := shell.NewResourceCmd(&modules.Cloudgrouppolicies).WithKeyword("cloud-group-policy").WithContextManager(&modules.Cloudgroups)
cmd.List(&cloudid.CloudgroupPolicyListOptions{})
}

View File

@@ -15,58 +15,12 @@
package cloudid
import (
"yunion.io/x/jsonutils"
"yunion.io/x/onecloud/pkg/mcclient"
"yunion.io/x/onecloud/pkg/mcclient/modulebase"
"yunion.io/x/onecloud/cmd/climc/shell"
"yunion.io/x/onecloud/pkg/mcclient/modules"
"yunion.io/x/onecloud/pkg/mcclient/options"
"yunion.io/x/onecloud/pkg/mcclient/options/cloudid"
)
func init() {
type CloudgroupUserListOptions struct {
options.BaseListOptions
Cloudgroup string `help:"ID or Name of Cloudgroup"`
Clouduser string `help:"User ID or name"`
}
R(&CloudgroupUserListOptions{}, "cloud-group-user-list", "List cloudgroup clouduser pairs", func(s *mcclient.ClientSession, args *CloudgroupUserListOptions) error {
var params *jsonutils.JSONDict
{
var err error
params, err = args.BaseListOptions.Params()
if err != nil {
return err
}
}
var result *modulebase.ListResult
var err error
if len(args.Cloudgroup) > 0 {
result, err = modules.Cloudgroupusers.ListDescendent(s, args.Cloudgroup, params)
} else if len(args.Clouduser) > 0 {
result, err = modules.Cloudgroupusers.ListDescendent2(s, args.Clouduser, params)
} else {
result, err = modules.Cloudgroupusers.List(s, params)
}
if err != nil {
return err
}
printList(result, modules.Cloudgroupusers.GetColumns(s))
return nil
})
type CloudgroupUserDetailOptions struct {
CLOUDUSER string `help:"ID or Name of Cloudgroup"`
CLOUDPOLICY string `help:"ID or Name of Clouduser"`
}
R(&CloudgroupUserDetailOptions{}, "cloud-group-user-show", "Show cloudgroupuser details", func(s *mcclient.ClientSession, args *CloudgroupUserDetailOptions) error {
query := jsonutils.NewDict()
result, err := modules.Cloudgroupusers.Get(s, args.CLOUDUSER, args.CLOUDPOLICY, query)
if err != nil {
return err
}
printObject(result)
return nil
})
cmd := shell.NewResourceCmd(&modules.Cloudgroupusers).WithKeyword("cloud-group-user").WithContextManager(&modules.Cloudusers)
cmd.List(&cloudid.CloudgroupUserListOptions{})
}

View File

@@ -17,18 +17,18 @@ package cloudid
import (
"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/cloudid"
)
func init() {
cmd := shell.NewResourceCmd(&modules.Cloudpolicies).WithKeyword("cloud-policy")
cmd.Create(&options.CloudpolicyListOptions{})
cmd.List(&options.CloudpolicyListOptions{})
cmd.Show(&options.CloudpolicyIdOptions{})
cmd.Update(&options.CloudpolicyUpdateOption{})
cmd.Perform("syncstauts", &options.CloudpolicyIdOptions{})
cmd.Perform("lock", &options.CloudpolicyIdOptions{})
cmd.Perform("unlock", &options.CloudpolicyIdOptions{})
cmd.Perform("assign-group", &options.CloudpolicyGroupOptions{})
cmd.Perform("revoke-group", &options.CloudpolicyGroupOptions{})
cmd.Create(&cloudid.CloudpolicyListOptions{})
cmd.List(&cloudid.CloudpolicyListOptions{})
cmd.Show(&cloudid.CloudpolicyIdOptions{})
cmd.Update(&cloudid.CloudpolicyUpdateOption{})
cmd.Perform("syncstauts", &cloudid.CloudpolicyIdOptions{})
cmd.Perform("lock", &cloudid.CloudpolicyIdOptions{})
cmd.Perform("unlock", &cloudid.CloudpolicyIdOptions{})
cmd.Perform("assign-group", &cloudid.CloudpolicyGroupOptions{})
cmd.Perform("revoke-group", &cloudid.CloudpolicyGroupOptions{})
}

View File

@@ -15,28 +15,12 @@
package cloudid
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"
"yunion.io/x/onecloud/pkg/mcclient/options/cloudid"
)
func init() {
type CloudpolicycacheListOptions struct {
options.BaseListOptions
CloudpolyId string
CloudaccountId string
}
R(&CloudpolicycacheListOptions{}, "cloud-policy-cache-list", "List cloud policy caches", func(s *mcclient.ClientSession, opts *CloudpolicycacheListOptions) error {
params, err := options.ListStructToParams(opts)
if err != nil {
return err
}
result, err := modules.Cloudpolicycaches.List(s, params)
if err != nil {
return err
}
printList(result, modules.Cloudpolicycaches.GetColumns(s))
return nil
})
cmd := shell.NewResourceCmd(&modules.Cloudpolicycaches).WithKeyword("cloud-policy-cache")
cmd.List(&cloudid.CloudpolicycacheListOptions{})
}

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 cloudid
import (
"yunion.io/x/onecloud/cmd/climc/shell"
"yunion.io/x/onecloud/pkg/mcclient/modules"
"yunion.io/x/onecloud/pkg/mcclient/options/cloudid"
)
func init() {
cmd := shell.NewResourceCmd(&modules.Cloudroles).WithKeyword("cloud-role")
cmd.List(&cloudid.CloudroleListOptions{})
cmd.Delete(&cloudid.CloudroleIdOptions{})
cmd.Show(&cloudid.CloudroleIdOptions{})
cmd.Perform("purge", &cloudid.CloudroleIdOptions{})
}

View File

@@ -15,58 +15,12 @@
package cloudid
import (
"yunion.io/x/jsonutils"
"yunion.io/x/onecloud/pkg/mcclient"
"yunion.io/x/onecloud/pkg/mcclient/modulebase"
"yunion.io/x/onecloud/cmd/climc/shell"
"yunion.io/x/onecloud/pkg/mcclient/modules"
"yunion.io/x/onecloud/pkg/mcclient/options"
"yunion.io/x/onecloud/pkg/mcclient/options/cloudid"
)
func init() {
type ClouduserPolicyListOptions struct {
options.BaseListOptions
Clouduser string `help:"ID or Name of Clouduser"`
Cloudpolicy string `help:"Policy ID or name"`
}
R(&ClouduserPolicyListOptions{}, "cloud-user-policy-list", "List clouduser cloudpolicy pairs", func(s *mcclient.ClientSession, args *ClouduserPolicyListOptions) error {
var params *jsonutils.JSONDict
{
var err error
params, err = args.BaseListOptions.Params()
if err != nil {
return err
}
}
var result *modulebase.ListResult
var err error
if len(args.Clouduser) > 0 {
result, err = modules.Clouduserpolicies.ListDescendent(s, args.Clouduser, params)
} else if len(args.Cloudpolicy) > 0 {
result, err = modules.Clouduserpolicies.ListDescendent2(s, args.Cloudpolicy, params)
} else {
result, err = modules.Clouduserpolicies.List(s, params)
}
if err != nil {
return err
}
printList(result, modules.Clouduserpolicies.GetColumns(s))
return nil
})
type ClouduserPolicyDetailOptions struct {
CLOUDUSER string `help:"ID or Name of Clouduser"`
CLOUDPOLICY string `help:"ID or Name of Cloudpolicy"`
}
R(&ClouduserPolicyDetailOptions{}, "cloud-user-policy-show", "Show clouduserpolicy details", func(s *mcclient.ClientSession, args *ClouduserPolicyDetailOptions) error {
query := jsonutils.NewDict()
result, err := modules.Clouduserpolicies.Get(s, args.CLOUDUSER, args.CLOUDPOLICY, query)
if err != nil {
return err
}
printObject(result)
return nil
})
cmd := shell.NewResourceCmd(&modules.Clouduserpolicies).WithKeyword("cloud-user-policy").WithContextManager(&modules.Cloudpolicies)
cmd.List(&cloudid.ClouduserPolicyListOptions{})
}

View File

@@ -17,22 +17,22 @@ package cloudid
import (
"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/cloudid"
)
func init() {
cmd := shell.NewResourceCmd(&modules.Cloudusers).WithKeyword("cloud-user")
cmd.List(&options.ClouduserListOptions{})
cmd.Create(&options.ClouduserCreateOptions{})
cmd.Show(&options.ClouduserIdOption{})
cmd.Custom(shell.CustomActionGet, "login-info", &options.ClouduserIdOption{})
cmd.Delete(&options.ClouduserIdOption{})
cmd.Perform("sync", &options.ClouduserSyncOptions{})
cmd.Perform("syncstatus", &options.ClouduserIdOption{})
cmd.Perform("attach-policy", &options.ClouduserPolicyOptions{})
cmd.Perform("detach-policy", &options.ClouduserPolicyOptions{})
cmd.Perform("change-owner", &options.ClouduserChangeOwnerOptions{})
cmd.Perform("reset-password", &options.ClouduserResetPasswordOptions{})
cmd.Perform("cloud-user-join-group", &options.ClouduserGroupOptions{})
cmd.Perform("cloud-user-leave-group", &options.ClouduserGroupOptions{})
cmd.List(&cloudid.ClouduserListOptions{})
cmd.Create(&cloudid.ClouduserCreateOptions{})
cmd.Show(&cloudid.ClouduserIdOption{})
cmd.Custom(shell.CustomActionGet, "login-info", &cloudid.ClouduserIdOption{})
cmd.Delete(&cloudid.ClouduserIdOption{})
cmd.Perform("sync", &cloudid.ClouduserSyncOptions{})
cmd.Perform("syncstatus", &cloudid.ClouduserIdOption{})
cmd.Perform("attach-policy", &cloudid.ClouduserPolicyOptions{})
cmd.Perform("detach-policy", &cloudid.ClouduserPolicyOptions{})
cmd.Perform("change-owner", &cloudid.ClouduserChangeOwnerOptions{})
cmd.Perform("reset-password", &cloudid.ClouduserResetPasswordOptions{})
cmd.Perform("cloud-user-join-group", &cloudid.ClouduserGroupOptions{})
cmd.Perform("cloud-user-leave-group", &cloudid.ClouduserGroupOptions{})
}

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 cloudid
import (
"yunion.io/x/onecloud/cmd/climc/shell"
"yunion.io/x/onecloud/pkg/mcclient/modules"
"yunion.io/x/onecloud/pkg/mcclient/options/cloudid"
)
func init() {
cmd := shell.NewResourceCmd(&modules.SAMLProviders).WithKeyword("saml-provider")
cmd.List(&cloudid.SAMLProviderListOptions{})
cmd.Create(&cloudid.SAMLProviderCreateOptions{})
cmd.Show(&cloudid.SAMLProviderIdOptions{})
cmd.Delete(&cloudid.SAMLProviderIdOptions{})
}

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 cloudid
import (
"yunion.io/x/onecloud/cmd/climc/shell"
"yunion.io/x/onecloud/pkg/mcclient/modules"
"yunion.io/x/onecloud/pkg/mcclient/options/cloudid"
)
func init() {
cmd := shell.NewResourceCmd(&modules.Samlusers).WithKeyword("saml-user")
cmd.List(&cloudid.SamluserListOptions{})
cmd.Create(&cloudid.SamluserCreateOptions{})
cmd.Show(&cloudid.SamluserIdOptions{})
cmd.Delete(&cloudid.SamluserIdOptions{})
}

View File

@@ -342,4 +342,213 @@ func init() {
printObject(result)
return nil
})
type BucketSetWebsiteOption struct {
ID string `help:"ID or name of bucket" json:"-"`
// 主页
Index string `help:"main page"`
// 错误时返回的文档
ErrorDocument string `help:"error return"`
// http或https
Protocol string `help:"force https" choices:"http|https"`
}
R(&BucketSetWebsiteOption{}, "bucket-set-website", "Set bucket website", func(s *mcclient.ClientSession, args *BucketSetWebsiteOption) error {
conf := api.BucketWebsiteConf{
Index: args.Index,
ErrorDocument: args.ErrorDocument,
Protocol: args.Protocol,
}
result, err := modules.Buckets.PerformAction(s, args.ID, "set-website", jsonutils.Marshal(conf))
if err != nil {
return err
}
printObject(result)
return nil
})
type BucketGetWebsiteConfOption struct {
ID string `help:"ID or name of bucket" json:"-"`
}
R(&BucketGetWebsiteConfOption{}, "bucket-get-website", "Get bucket website", func(s *mcclient.ClientSession, args *BucketGetWebsiteConfOption) error {
result, err := modules.Buckets.GetSpecific(s, args.ID, "website", nil)
if err != nil {
return err
}
printObject(result)
return nil
})
type BucketDeleteWebsiteConfOption struct {
ID string `help:"ID or name of bucket" json:"-"`
}
R(&BucketDeleteWebsiteConfOption{}, "bucket-delete-website", "Delete bucket website", func(s *mcclient.ClientSession, args *BucketDeleteWebsiteConfOption) error {
result, err := modules.Buckets.PerformAction(s, args.ID, "delete-website", nil)
if err != nil {
return err
}
printObject(result)
return nil
})
type BucketSetCorsOption struct {
ID string `help:"ID or name of bucket" json:"-"`
AllowedMethods []string `help:"allowed http method" choices:"PUT|GET|POST|DELETE|HEAD"`
// 允许的源站,可以设为*
AllowedOrigins []string
AllowedHeaders []string
MaxAgeSeconds int
ExposeHeaders []string
RuleId string
}
R(&BucketSetCorsOption{}, "bucket-set-cors", "Set bucket cors", func(s *mcclient.ClientSession, args *BucketSetCorsOption) error {
rule := api.BucketCORSRule{
AllowedOrigins: args.AllowedOrigins,
AllowedMethods: args.AllowedMethods,
AllowedHeaders: args.AllowedHeaders,
MaxAgeSeconds: args.MaxAgeSeconds,
ExposeHeaders: args.ExposeHeaders,
Id: args.RuleId,
}
rules := api.BucketCORSRules{Data: []api.BucketCORSRule{rule}}
result, err := modules.Buckets.PerformAction(s, args.ID, "set-cors", jsonutils.Marshal(rules))
if err != nil {
return err
}
printObject(result)
return nil
})
type BucketGetCorsOption struct {
ID string `help:"ID or name of bucket" json:"-"`
}
R(&BucketGetCorsOption{}, "bucket-get-cors", "Get bucket cors", func(s *mcclient.ClientSession, args *BucketGetCorsOption) error {
result, err := modules.Buckets.GetSpecific(s, args.ID, "cors", nil)
if err != nil {
return err
}
printObject(result)
return nil
})
type BucketDeleteCorsOption struct {
ID string `help:"ID or name of bucket" json:"-"`
Id []string `"help:Id of rules to delete"`
}
R(&BucketDeleteCorsOption{}, "bucket-delete-cors", "Delete bucket cors", func(s *mcclient.ClientSession, args *BucketDeleteCorsOption) error {
input := api.BucketCORSRuleDeleteInput{}
input.Id = args.Id
result, err := modules.Buckets.PerformAction(s, args.ID, "delete-cors", jsonutils.Marshal(input))
if err != nil {
return err
}
printObject(result)
return nil
})
type BucketSetRefererOption struct {
ID string `help:"ID or name of bucket" json:"-"`
// 域名列表
DomainList []string
// 是否允许空referer 访问
AllowEmptyRefer bool `help:"all empty refer access"`
Enabled bool
RerererType string `help:"Referer type" choices:"Black-List|White-List"`
}
R(&BucketSetRefererOption{}, "bucket-set-referer", "Set bucket referer", func(s *mcclient.ClientSession, args *BucketSetRefererOption) error {
conf := api.BucketRefererConf{
Enabled: args.Enabled,
AllowEmptyRefer: args.AllowEmptyRefer,
RefererType: args.RerererType,
DomainList: args.DomainList,
}
result, err := modules.Buckets.PerformAction(s, args.ID, "set-referer", jsonutils.Marshal(conf))
if err != nil {
return err
}
printObject(result)
return nil
})
type BucketGetRefererOption struct {
ID string `help:"ID or name of bucket" json:"-"`
}
R(&BucketGetRefererOption{}, "bucket-get-referer", "get bucket referer", func(s *mcclient.ClientSession, args *BucketGetRefererOption) error {
result, err := modules.Buckets.GetSpecific(s, args.ID, "referer", nil)
if err != nil {
return err
}
printObject(result)
return nil
})
type BucketGetCdnDomainOption struct {
ID string `help:"ID or name of bucket" json:"-"`
}
R(&BucketGetRefererOption{}, "bucket-get-cdn-domain", "get bucket cdn domain", func(s *mcclient.ClientSession, args *BucketGetRefererOption) error {
result, err := modules.Buckets.GetSpecific(s, args.ID, "cdn-domain", nil)
if err != nil {
return err
}
printObject(result)
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
})
}

File diff suppressed because it is too large Load Diff

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

@@ -15,44 +15,29 @@
package compute
import (
"yunion.io/x/onecloud/cmd/climc/shell"
"yunion.io/x/onecloud/pkg/mcclient"
"yunion.io/x/onecloud/pkg/mcclient/modules"
"yunion.io/x/onecloud/pkg/mcclient/options"
)
func init() {
type DBInstanceSkuListOption struct {
options.BaseListOptions
Engine string
EngineVersion string
Category string
StorageType string
Cloudregion string
}
R(&DBInstanceSkuListOption{}, "dbinstance-sku-list", "List dbinstance skus", func(s *mcclient.ClientSession, args *DBInstanceSkuListOption) error {
params, err := options.ListStructToParams(args)
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.List(s, params)
if err != nil {
return err
}
printList(result, modules.DBInstanceSkus.GetColumns(s))
return nil
})
type DBInstanceSkuIdOption struct {
ID string `help:"DBInstance Id or name"`
}
R(&DBInstanceSkuIdOption{}, "dbinstance-sku-show", "Show dbinstance sku details", func(s *mcclient.ClientSession, args *DBInstanceSkuIdOption) error {
result, err := modules.DBInstanceSkus.Get(s, args.ID, nil)
result, err := modules.DBInstanceSkus.Get(s, "sync-tasks", params)
if err != nil {
return err
}
printObject(result)
return nil
})
}

View File

@@ -15,280 +15,34 @@
package compute
import (
"fmt"
"strings"
"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"
"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
})
type DBInstanceCreateOptions struct {
NAME string `help:"DBInstance Name"`
InstanceType string `help:"InstanceType for DBInstance"`
VcpuCount int `help:"Core of cpu for DBInstance"`
VmemSizeMb int `help:"Memory size of DBInstance"`
Port int `help:"Port of DBInstance"`
Category string `help:"Category of DBInstance"`
Network string `help:"Network of DBInstance"`
Address string `help:"Address of DBInstance"`
Engine string `help:"Engine of DBInstance"`
EngineVersion string `help:"EngineVersion of DBInstance Engine"`
StorageType string `help:"StorageTyep of DBInstance"`
Secgroup string `help:"Secgroup name or Id for DBInstance"`
Zone string `help:"ZoneId or name for DBInstance"`
DiskSizeGB int `help:"Storage size for DBInstance"`
Duration string `help:"Duration for DBInstance"`
AllowDelete *bool `help:"not lock dbinstance" `
}
R(&DBInstanceCreateOptions{}, "dbinstance-create", "Create DB instance", func(s *mcclient.ClientSession, opts *DBInstanceCreateOptions) error {
params, err := options.StructToParams(opts)
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
@@ -354,21 +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
})
}

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 {
@@ -41,11 +45,15 @@ func init() {
})
R(&options.ElasticCacheCreateOptions{}, "elastic-cache-create", "Create elastisc cache instance", func(s *mcclient.ClientSession, opts *options.ElasticCacheCreateOptions) error {
params, err := options.StructToParams(opts)
params, err := opts.Params()
if err != nil {
return err
}
if len(opts.SecgroupIds) > 0 {
params.Set("secgroup_ids", jsonutils.NewStringArray(opts.SecgroupIds))
}
result, err := modules.ElasticCache.Create(s, params)
if err != nil {
return err
@@ -393,4 +401,107 @@ func init() {
printList(result, nil)
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 {
return err
}
result, err := modules.ElasticCache.PerformAction(s, opts.ID, "user-metadata", params)
if err != nil {
return err
}
printObject(result)
return nil
})
R(&options.ResourceMetadataOptions{}, "elastic-cache-set-tag", "Set tag of a server", func(s *mcclient.ClientSession, opts *options.ResourceMetadataOptions) error {
params, err := opts.Params()
if err != nil {
return err
}
result, err := modules.ElasticCache.PerformAction(s, opts.ID, "set-user-metadata", params)
if err != nil {
return err
}
printObject(result)
return nil
})
R(&options.ElasticCacheRemoteUpdateOptions{}, "elastic-cache-remote-update", "Restore elastisc cache backup", func(s *mcclient.ClientSession, opts *options.ElasticCacheRemoteUpdateOptions) error {
params, err := options.StructToParams(opts)
if err != nil {
return err
}
result, err := modules.ElasticCache.PerformAction(s, opts.ID, "remote-update", params)
if err != nil {
return err
}
printObject(result)
return nil
})
R(&options.ElasticCacheAutoRenewOptions{}, "elastic-cache-auto-renew", "Set elastisc cache auto renew", func(s *mcclient.ClientSession, opts *options.ElasticCacheAutoRenewOptions) error {
params, err := options.StructToParams(opts)
if err != nil {
return err
}
result, err := modules.ElasticCache.PerformAction(s, opts.ID, "set-auto-renew", params)
if err != nil {
return err
}
printObject(result)
return nil
})
R(&options.ElasticCacheRenewOptions{}, "elastic-cache-renew", "Renew elastisc cache", func(s *mcclient.ClientSession, opts *options.ElasticCacheRenewOptions) error {
params, err := options.StructToParams(opts)
if err != nil {
return err
}
result, err := modules.ElasticCache.PerformAction(s, opts.ID, "renew", params)
if err != nil {
return err
}
printObject(result)
return nil
})
type ElasticcacheSecgroupListOptions struct {
options.BaseListOptions
Elasticcache string `help:"ID or Name of elastic cache" json:"elasticcache"`
Secgroup string `help:"Secgroup ID or name"`
}
R(&ElasticcacheSecgroupListOptions{}, "elastic-cache-secgroup-list", "List elastisc cache secgroups", func(s *mcclient.ClientSession, opts *ElasticcacheSecgroupListOptions) error {
params, err := options.ListStructToParams(opts)
if err != nil {
return err
}
result, err := modules.ElasticCacheSecgroup.List(s, params)
if err != nil {
return err
}
printList(result, nil)
return nil
})
}

View File

@@ -50,8 +50,9 @@ 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"`
}
R(&EipCreateOptions{}, "eip-create", "Create an EIP", func(s *mcclient.ClientSession, args *EipCreateOptions) error {
@@ -74,9 +75,12 @@ func init() {
if len(args.Network) > 0 {
params.Add(jsonutils.NewString(args.Network), "network")
}
if len(args.BgpType) > 0 {
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)
@@ -186,12 +190,16 @@ func init() {
type ServerCreateEipOptions struct {
ID string `help:"server ID or name"`
BW int `help:"EIP bandwidth in Mbps"`
BgpType string `help:"desired BGP type"`
ChargeType string `help:"bandwidth charge type" choices:"traffic|bandwidth"`
}
R(&ServerCreateEipOptions{}, "server-create-eip", "allocate an EIP and associate EIP to server", func(s *mcclient.ClientSession, args *ServerCreateEipOptions) error {
params := jsonutils.NewDict()
params.Add(jsonutils.NewInt(int64(args.BW)), "bandwidth")
if args.BgpType != "" {
params.Add(jsonutils.NewString(args.BgpType), "bgp_type")
}
if len(args.ChargeType) > 0 {
params.Add(jsonutils.NewString(args.ChargeType), "charge_type")
}

View File

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

View File

@@ -15,92 +15,44 @@
package compute
import (
"yunion.io/x/onecloud/cmd/climc/shell"
"yunion.io/x/onecloud/pkg/mcclient"
"yunion.io/x/onecloud/pkg/mcclient/modules"
"yunion.io/x/onecloud/pkg/mcclient/options"
)
func init() {
R(&options.LoadbalancerCreateOptions{}, "lb-create", "Create lb", func(s *mcclient.ClientSession, opts *options.LoadbalancerCreateOptions) error {
params, err := options.StructToParams(opts)
cmd := shell.NewResourceCmd(&modules.Loadbalancers).WithKeyword("lb")
cmd.Create(&options.LoadbalancerCreateOptions{})
cmd.Show(&options.LoadbalancerIdOptions{})
cmd.List(&options.LoadbalancerListOptions{})
cmd.Update(&options.LoadbalancerUpdateOptions{})
cmd.Delete(&options.LoadbalancerIdOptions{})
cmd.Perform("purge", &options.LoadbalancerIdOptions{})
cmd.Perform("status", &options.LoadbalancerActionStatusOptions{})
cmd.Perform("syncstatus", &options.LoadbalancerIdOptions{})
cmd.Perform("remote-update", &options.LoadbalancerRemoteUpdateOptions{})
cmd.Get("change-owner-candidate-domains", &options.LoadbalancerIdOptions{})
R(&options.ResourceMetadataOptions{}, "lb-add-tag", "Set tag of a lb", func(s *mcclient.ClientSession, opts *options.ResourceMetadataOptions) error {
params, err := opts.Params()
if err != nil {
return err
}
lb, err := modules.Loadbalancers.Create(s, params)
result, err := modules.Loadbalancers.PerformAction(s, opts.ID, "user-metadata", params)
if err != nil {
return err
}
printObject(lb)
return nil
})
R(&options.LoadbalancerGetOptions{}, "lb-show", "Show lb", func(s *mcclient.ClientSession, opts *options.LoadbalancerGetOptions) error {
lb, err := modules.Loadbalancers.Get(s, opts.ID, nil)
if err != nil {
return err
}
printObject(lb)
return nil
})
R(&options.LoadbalancerListOptions{}, "lb-list", "List lbs", func(s *mcclient.ClientSession, opts *options.LoadbalancerListOptions) error {
params, err := options.ListStructToParams(opts)
if err != nil {
return err
}
result, err := modules.Loadbalancers.List(s, params)
if err != nil {
return err
}
printList(result, modules.Loadbalancers.GetColumns(s))
return nil
})
R(&options.LoadbalancerUpdateOptions{}, "lb-update", "Update lb", func(s *mcclient.ClientSession, opts *options.LoadbalancerUpdateOptions) error {
params, err := options.StructToParams(opts)
lb, err := modules.Loadbalancers.Update(s, opts.ID, params)
if err != nil {
return err
}
printObject(lb)
return nil
})
R(&options.LoadbalancerDeleteOptions{}, "lb-delete", "Delete lb", func(s *mcclient.ClientSession, opts *options.LoadbalancerDeleteOptions) error {
lb, err := modules.Loadbalancers.Delete(s, opts.ID, nil)
if err != nil {
return err
}
printObject(lb)
return nil
})
R(&options.LoadbalancerPurgeOptions{}, "lb-purge", "Purge lb", func(s *mcclient.ClientSession, opts *options.LoadbalancerPurgeOptions) error {
lb, err := modules.Loadbalancers.PerformAction(s, opts.ID, "purge", nil)
if err != nil {
return err
}
printObject(lb)
return nil
})
R(&options.LoadbalancerActionStatusOptions{}, "lb-status", "Change lb status", func(s *mcclient.ClientSession, opts *options.LoadbalancerActionStatusOptions) error {
params, err := options.StructToParams(opts)
if err != nil {
return err
}
lb, err := modules.Loadbalancers.PerformAction(s, opts.ID, "status", params)
if err != nil {
return err
}
printObject(lb)
return nil
})
R(&options.LoadbalancerActionSyncStatusOptions{}, "lb-syncstatus", "Sync lb status", func(s *mcclient.ClientSession, opts *options.LoadbalancerActionSyncStatusOptions) error {
lb, err := modules.Loadbalancers.PerformAction(s, opts.ID, "syncstatus", nil)
if err != nil {
return err
}
printObject(lb)
printObject(result)
return nil
})
R(&options.LoadbalancerGetOptions{}, "lb-change-owner-candidate-domains", "Get change owner candidate domain list", func(s *mcclient.ClientSession, args *options.LoadbalancerGetOptions) error {
result, err := modules.Loadbalancers.GetSpecific(s, args.ID, "change-owner-candidate-domains", nil)
R(&options.ResourceMetadataOptions{}, "lb-set-tag", "Set tag of a lb", func(s *mcclient.ClientSession, opts *options.ResourceMetadataOptions) error {
params, err := opts.Params()
if err != nil {
return err
}
result, err := modules.Loadbalancers.PerformAction(s, opts.ID, "set-user-metadata", params)
if err != nil {
return err
}

View File

@@ -69,6 +69,7 @@ func init() {
AllocPolicy string `help:"Address allocation policy" choices:"none|stepdown|stepup|random"`
ServerType string `help:"Server type" choices:"baremetal|container|eip|guest|ipmi|pxe"`
IsAutoAlloc *bool `help:"Auto allocation IP pool"`
BgpType string `help:"Internet service provider name" positional:"false"`
Desc string `help:"Description" metavar:"DESCRIPTION"`
}
R(&NetworkCreateOptions{}, "network-create", "Create a virtual network", func(s *mcclient.ClientSession, args *NetworkCreateOptions) error {
@@ -95,6 +96,9 @@ func init() {
if len(args.Desc) > 0 {
params.Add(jsonutils.NewString(args.Desc), "description")
}
if len(args.BgpType) > 0 {
params.Add(jsonutils.NewString(args.BgpType), "bgp_type")
}
if args.IsAutoAlloc != nil {
params.Add(jsonutils.NewBool(*args.IsAutoAlloc), "is_auto_alloc")
}
@@ -107,17 +111,21 @@ func init() {
})
type NetworkCreateOptions2 struct {
Wire string `help:"ID or Name of wire in which the network is created"`
Vpc string `help:"ID or Name of vpc in which the network is created"`
Zone string `help:"ID or Name of zone in which the network is created"`
NAME string `help:"Name of new network"`
PREFIX string `help:"Start of IPv4 address range"`
Desc string `help:"Description" metavar:"DESCRIPTION"`
Wire string `help:"ID or Name of wire in which the network is created"`
Vpc string `help:"ID or Name of vpc in which the network is created"`
Zone string `help:"ID or Name of zone in which the network is created"`
NAME string `help:"Name of new network"`
PREFIX string `help:"Start of IPv4 address range"`
BgpType string `help:"Internet service provider name" positional:"false"`
Desc string `help:"Description" metavar:"DESCRIPTION"`
}
R(&NetworkCreateOptions2{}, "network-create2", "Create a virtual network", func(s *mcclient.ClientSession, args *NetworkCreateOptions2) error {
params := jsonutils.NewDict()
params.Add(jsonutils.NewString(args.NAME), "name")
params.Add(jsonutils.NewString(args.PREFIX), "guest_ip_prefix")
if len(args.BgpType) > 0 {
params.Add(jsonutils.NewString(args.BgpType), "bgp_type")
}
if len(args.Desc) > 0 {
params.Add(jsonutils.NewString(args.Desc), "description")
}
@@ -253,4 +261,20 @@ func init() {
printObject(net)
return nil
})
type NetworkSetBgpTypeOptions struct {
ID string `help:"Network to set BgpType" json:"-"`
BgpType *string `help:"new BgpType name"`
}
R(&NetworkSetBgpTypeOptions{}, "network-set-bgp-type", "Set BgpType of a network", func(s *mcclient.ClientSession, args *NetworkSetBgpTypeOptions) error {
params, err := options.StructToParams(args)
if err != nil {
return err
}
net, err := modules.Networks.PerformAction(s, args.ID, "set-bgp-type", params)
if err != nil {
return err
}
printObject(net)
return nil
})
}

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,142 +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"`
}
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
})
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

@@ -34,4 +34,6 @@ func init() {
cmd.Perform("cache-secgroup", &options.SecurityGroupCacheOptions{})
cmd.Perform("uncache-secgroup", &options.SecurityGroupUncacheSecurityGroup{})
cmd.Perform("purge", &options.SecgroupIdOptions{})
cmd.Perform("change-owner", &options.SecgroupChangeOwnerOptions{})
cmd.Perform("import-rules", &options.SecgroupImportRulesOptions{})
}

View File

@@ -728,6 +728,7 @@ func init() {
type ServerRollBackSnapshot struct {
ID string `help:"ID or name of VM" json:"-"`
InstanceSnapshot string `help:"Instance snapshot id or name" json:"instance_snapshot"`
AutoStart bool `help:"Auto start VM"`
}
R(&ServerRollBackSnapshot{}, "instance-snapshot-reset", "reset instance snapshot", func(s *mcclient.ClientSession, opts *ServerRollBackSnapshot) error {
params := jsonutils.Marshal(opts)

View File

@@ -15,194 +15,32 @@
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.PerformWithKeyword("cache", "cache-sku", &options.ServerSkusCacheOptions{})
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

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

View File

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

@@ -134,6 +134,10 @@ func (cmd ResourceCmd) List(args IListOpt) {
}
func (cmd ResourceCmd) Create(args ICreateOpt) {
cmd.CreateWithKeyworkd("create", args)
}
func (cmd ResourceCmd) CreateWithKeyworkd(keyword string, args ICreateOpt) {
man := cmd.manager
callback := func(s *mcclient.ClientSession, args ICreateOpt) error {
params, err := args.Params()
@@ -147,7 +151,7 @@ func (cmd ResourceCmd) Create(args ICreateOpt) {
printObject(ret)
return nil
}
cmd.Run("create", args, callback)
cmd.Run(keyword, args, callback)
}
type IIdOpt interface {
@@ -281,10 +285,13 @@ type IPerformOpt interface {
IIdOpt
}
func (cmd ResourceCmd) Perform(action string, args IPerformOpt) {
func (cmd ResourceCmd) PerformWithKeyword(keyword, action string, args IPerformOpt) {
man := cmd.manager
callback := func(s *mcclient.ClientSession, args IPerformOpt) error {
params := jsonutils.Marshal(args) // .Params()
params, err := args.Params()
if err != nil {
return err
}
ret, err := man.(modulebase.Manager).PerformAction(s, args.GetId(), action, params)
if err != nil {
return err
@@ -292,7 +299,28 @@ func (cmd ResourceCmd) Perform(action string, args IPerformOpt) {
printObject(ret)
return nil
}
cmd.Run(action, args, callback)
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)
}
func (cmd ResourceCmd) PerformClass(action string, args IOpt) {
@@ -358,13 +386,18 @@ type IUpdateOpt interface {
IIdOpt
}
func (cmd ResourceCmd) Update(args IUpdateOpt) {
func (cmd ResourceCmd) UpdateWithKeyword(keyword string, args IUpdateOpt) {
man := cmd.manager
callback := func(s *mcclient.ClientSession, args IUpdateOpt) error {
params, err := args.Params()
_params, err := args.Params()
if err != nil {
return err
}
params := _params.(*jsonutils.JSONDict)
params.Remove("id")
if params.Length() == 0 {
return InvalidUpdateError()
}
ret, err := man.(modulebase.Manager).Update(s, args.GetId(), params)
if err != nil {
return err
@@ -372,7 +405,11 @@ func (cmd ResourceCmd) Update(args IUpdateOpt) {
printObject(ret)
return nil
}
cmd.Run("update", args, callback)
cmd.Run(keyword, args, callback)
}
func (cmd ResourceCmd) Update(args IUpdateOpt) {
cmd.UpdateWithKeyword("update", args)
}
type IMetadataOpt interface {

View File

@@ -25,7 +25,8 @@ import (
func init() {
type DomainListOptions struct {
options.BaseListOptions
IdpId string `help:"filter by idp_id"`
IdpId string `help:"filter by idp_id"`
IdpEntityId string `help:"filter by idp_entity_id"`
}
R(&DomainListOptions{}, "domain-list", "List domains", func(s *mcclient.ClientSession, args *DomainListOptions) error {
params, err := options.ListStructToParams(args)
@@ -155,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

@@ -265,9 +265,12 @@ func init() {
type IdentityProviderCreateCASOptions struct {
NAME string `help:"name of identity provider" json:"-"`
AutoCreateProject bool `help:"automatically create a default project when importing domain" json:"-"`
AutoCreateProject bool `help:"automatically create a project if the default_project not exists" json:"-"`
NoAutoCreateProject bool `help:"do not create default project when importing domain" json:"-"`
AutoCreateUser bool `help:"automatically create a user" json:"-"`
NoAutoCreateUser bool `help:"do not automatically create a user" json:"-"`
TargetDomain string `help:"target domain without creating new domain" json:"-"`
api.SCASIdpConfigOptions
@@ -284,6 +287,11 @@ func init() {
} else if args.NoAutoCreateProject {
params.Add(jsonutils.JSONFalse, "auto_create_project")
}
if args.AutoCreateUser {
params.Add(jsonutils.JSONTrue, "auto_create_user")
} else if args.NoAutoCreateUser {
params.Add(jsonutils.JSONFalse, "auto_create_user")
}
params.Add(jsonutils.NewString("cas"), "driver")
params.Add(jsonutils.Marshal(args), "config", "cas")
@@ -464,6 +472,9 @@ func init() {
AutoCreateProject bool `help:"automatically create a default project when importing domain" json:"-"`
NoAutoCreateProject bool `help:"do not create default project when importing domain" json:"-"`
AutoCreateUser bool `help:"automatically create a user" json:"-"`
NoAutoCreateUser bool `help:"do not automatically create a user" json:"-"`
TargetDomain string `help:"target domain without creating new domain" json:"-"`
api.SOIDCIdpConfigOptions
@@ -480,6 +491,11 @@ func init() {
} else if args.NoAutoCreateProject {
params.Add(jsonutils.JSONFalse, "auto_create_project")
}
if args.AutoCreateUser {
params.Add(jsonutils.JSONTrue, "auto_create_user")
} else if args.NoAutoCreateUser {
params.Add(jsonutils.JSONFalse, "auto_create_user")
}
params.Add(jsonutils.NewString("oidc"), "driver")
params.Add(jsonutils.Marshal(args), "config", "oidc")
@@ -706,4 +722,18 @@ func init() {
printObject(result)
return nil
})
type IdpSetDefaultSsoOptions struct {
ID string `help:"id or name of idp to set default Sso" json:"-"`
api.PerformDefaultSsoInput
}
R(&IdpSetDefaultSsoOptions{}, "idp-default-sso", "Enable/disable default SSO", func(s *mcclient.ClientSession, args *IdpSetDefaultSsoOptions) error {
result, err := modules.IdentityProviders.PerformAction(s, args.ID, "default-sso", jsonutils.Marshal(args))
if err != nil {
return err
}
printObject(result)
return nil
})
}

View File

@@ -0,0 +1,34 @@
// 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 identity
import (
"yunion.io/x/onecloud/pkg/mcclient"
"yunion.io/x/onecloud/pkg/mcclient/modules"
)
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

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

View File

@@ -31,6 +31,7 @@ func init() {
OrderByDomain string `help:"order by domain name" choices:"asc|desc"`
Role string `help:"Filter by role"`
IdpId string `help:"filter by idp_id"`
IdpEntityId string `help:"filter by idp_entity_id"`
}
R(&UserListOptions{}, "user-list", "List users", func(s *mcclient.ClientSession, args *UserListOptions) error {
params, err := options.ListStructToParams(args)

View File

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

View File

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

@@ -20,6 +20,7 @@ import (
"yunion.io/x/onecloud/pkg/mcclient"
"yunion.io/x/onecloud/pkg/mcclient/modulebase"
"yunion.io/x/onecloud/pkg/mcclient/modules"
"yunion.io/x/onecloud/pkg/mcclient/modules/yunionconf"
"yunion.io/x/onecloud/pkg/mcclient/options"
)
@@ -46,21 +47,21 @@ func init() {
if len(args.NamespaceId) > 0 {
params.Add(jsonutils.NewString(args.NamespaceId), "namespace_id")
params.Add(jsonutils.NewString("system"), "scope")
result, err = modules.Parameters.List(s, params)
result, err = yunionconf.Parameters.List(s, params)
} else if len(args.User) > 0 {
params.Add(jsonutils.NewString("system"), "scope")
result, err = modules.Parameters.ListInContext(s, params, &modules.UsersV3, args.User)
result, err = yunionconf.Parameters.ListInContext(s, params, &modules.UsersV3, args.User)
} else if len(args.Service) > 0 {
params.Add(jsonutils.NewString("system"), "scope")
result, err = modules.Parameters.ListInContext(s, params, &modules.ServicesV3, args.Service)
result, err = yunionconf.Parameters.ListInContext(s, params, &modules.ServicesV3, args.Service)
} else {
result, err = modules.Parameters.List(s, params)
result, err = yunionconf.Parameters.List(s, params)
}
if err != nil {
return err
}
printList(result, modules.Parameters.GetColumns(s))
printList(result, yunionconf.Parameters.GetColumns(s))
return nil
})
@@ -83,15 +84,15 @@ func init() {
if len(args.NamespaceId) > 0 {
params.Add(jsonutils.NewString("system"), "scope")
params.Add(jsonutils.NewString(args.NamespaceId), "namespace_id")
parameter, err = modules.Parameters.Get(s, args.NAME, params)
parameter, err = yunionconf.Parameters.Get(s, args.NAME, params)
} else if len(args.User) > 0 {
params.Add(jsonutils.NewString("system"), "scope")
parameter, err = modules.Parameters.GetInContext(s, args.NAME, params, &modules.UsersV3, args.User)
parameter, err = yunionconf.Parameters.GetInContext(s, args.NAME, params, &modules.UsersV3, args.User)
} else if len(args.Service) > 0 {
params.Add(jsonutils.NewString("system"), "scope")
parameter, err = modules.Parameters.GetInContext(s, args.NAME, params, &modules.ServicesV3, args.Service)
parameter, err = yunionconf.Parameters.GetInContext(s, args.NAME, params, &modules.ServicesV3, args.Service)
} else {
parameter, err = modules.Parameters.Get(s, args.NAME, params)
parameter, err = yunionconf.Parameters.Get(s, args.NAME, params)
}
if err != nil {
@@ -124,7 +125,7 @@ func init() {
params.Add(jsonutils.NewString(args.Service), "service_id")
}
parameter, err := modules.Parameters.Create(s, params)
parameter, err := yunionconf.Parameters.Create(s, params)
if err != nil {
return err
}
@@ -153,11 +154,11 @@ func init() {
}
if len(args.User) > 0 {
parameter, err = modules.Parameters.PutInContext(s, args.NAME, params, &modules.UsersV3, args.User)
parameter, err = yunionconf.Parameters.PutInContext(s, args.NAME, params, &modules.UsersV3, args.User)
} else if len(args.Service) > 0 {
parameter, err = modules.Parameters.PutInContext(s, args.NAME, params, &modules.ServicesV3, args.Service)
parameter, err = yunionconf.Parameters.PutInContext(s, args.NAME, params, &modules.ServicesV3, args.Service)
} else {
parameter, err = modules.Parameters.Put(s, args.NAME, params)
parameter, err = yunionconf.Parameters.Put(s, args.NAME, params)
}
if err != nil {
@@ -179,11 +180,11 @@ func init() {
var parameter jsonutils.JSONObject
var err error
if len(args.User) > 0 {
parameter, err = modules.Parameters.DeleteInContext(s, args.NAME, params, &modules.UsersV3, args.User)
parameter, err = yunionconf.Parameters.DeleteInContext(s, args.NAME, params, &modules.UsersV3, args.User)
} else if len(args.Service) > 0 {
parameter, err = modules.Parameters.DeleteInContext(s, args.NAME, params, &modules.ServicesV3, args.Service)
parameter, err = yunionconf.Parameters.DeleteInContext(s, args.NAME, params, &modules.ServicesV3, args.Service)
} else {
parameter, err = modules.Parameters.Delete(s, args.NAME, nil)
parameter, err = yunionconf.Parameters.Delete(s, args.NAME, nil)
}
if err != nil {

View File

@@ -0,0 +1,31 @@
// 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 yunionconf
import (
"yunion.io/x/onecloud/cmd/climc/shell"
modules "yunion.io/x/onecloud/pkg/mcclient/modules/yunionconf"
options "yunion.io/x/onecloud/pkg/mcclient/options/yunionconf"
)
func init() {
cmd := shell.NewResourceCmd(&modules.ScopedPolicies)
cmd.List(new(options.ScopedPolicyListOptions))
cmd.Show(new(options.ScopedPolicyShowOptions))
cmd.Create(new(options.ScopedPolicyCreateOptions))
cmd.Update(new(options.ScopedPolicyUpdateOptions))
cmd.Delete(new(options.ScopedPolicyIDOptions))
cmd.Perform("bind", new(options.ScopedPolicyBindOptions))
}

View File

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

View File

@@ -15,12 +15,17 @@
package main
import (
"context"
"yunion.io/x/onecloud/pkg/esxi/service"
"yunion.io/x/onecloud/pkg/util/atexit"
"yunion.io/x/onecloud/pkg/util/procutils"
)
func main() {
defer atexit.Handle()
go procutils.WaitZombieLoop(context.TODO())
service.New().StartService()
}

View File

@@ -15,12 +15,17 @@
package main
import (
"context"
"yunion.io/x/onecloud/pkg/image/service"
"yunion.io/x/onecloud/pkg/util/atexit"
"yunion.io/x/onecloud/pkg/util/procutils"
)
func main() {
defer atexit.Handle()
go procutils.WaitZombieLoop(context.TODO())
service.StartService()
}

View File

@@ -14,9 +14,16 @@
package main
import "yunion.io/x/onecloud/pkg/hostman/hostdeployer/deployserver"
import (
"context"
"yunion.io/x/onecloud/pkg/hostman/hostdeployer/deployserver"
"yunion.io/x/onecloud/pkg/util/procutils"
)
func main() {
go procutils.WaitZombieLoop(context.TODO())
deployer := deployserver.NewDeployService()
deployer.StartService()
}

View File

@@ -15,14 +15,19 @@
package main
import (
"context"
"yunion.io/x/onecloud/pkg/cloudcommon/service"
"yunion.io/x/onecloud/pkg/hostman"
"yunion.io/x/onecloud/pkg/util/atexit"
"yunion.io/x/onecloud/pkg/util/procutils"
)
func main() {
defer atexit.Handle()
go procutils.WaitZombieLoop(context.TODO())
var srv = &hostman.SHostService{}
srv.SServiceBase = &service.SServiceBase{
Service: srv,

View File

@@ -26,6 +26,7 @@ import (
app_common "yunion.io/x/onecloud/pkg/cloudcommon/app"
common_options "yunion.io/x/onecloud/pkg/cloudcommon/options"
"yunion.io/x/onecloud/pkg/util/atexit"
"yunion.io/x/onecloud/pkg/util/procutils"
"yunion.io/x/onecloud/pkg/vpcagent/options"
_ "yunion.io/x/onecloud/pkg/vpcagent/ovn"
"yunion.io/x/onecloud/pkg/vpcagent/worker"
@@ -52,8 +53,12 @@ func main() {
}
{
ctx := context.Background()
ctx, cancelFunc := context.WithCancel(ctx)
go procutils.WaitZombieLoop(ctx)
wg := &sync.WaitGroup{}
ctx, cancelFunc := context.WithCancel(context.Background())
ctx = context.WithValue(ctx, "wg", wg)
wg.Add(1)
go w.Start(ctx)

View File

@@ -15,12 +15,17 @@
package main
import (
"context"
"yunion.io/x/onecloud/pkg/util/atexit"
"yunion.io/x/onecloud/pkg/util/procutils"
"yunion.io/x/onecloud/pkg/webconsole/service"
)
func main() {
defer atexit.Handle()
go procutils.WaitZombieLoop(context.TODO())
service.StartService()
}

12
go.mod
View File

@@ -106,7 +106,7 @@ require (
github.com/spaolacci/murmur3 v1.1.0 // indirect
github.com/stretchr/testify v1.5.1
github.com/tencentcloud/tencentcloud-sdk-go v3.0.135+incompatible
github.com/tencentyun/cos-go-sdk-v5 v0.0.0-20191108095731-8ca4b370cde4
github.com/tencentyun/cos-go-sdk-v5 v0.7.24
github.com/tinylib/msgp v1.1.0 // indirect
github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5 // indirect
github.com/tredoe/osutil v0.0.0-20161130133508-7d3ee1afa71c
@@ -140,13 +140,13 @@ require (
k8s.io/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
yunion.io/x/jsonutils v0.0.0-20201014025429-7ce189228db6
yunion.io/x/log v0.0.0-20200313080802-57a4ce5966b3
yunion.io/x/executor v0.0.0-20210310041834-3fcd1574f68e
yunion.io/x/jsonutils v0.0.0-20201110084044-3e4e1cb49769
yunion.io/x/log v0.0.0-20201210064738-43181789dc74
yunion.io/x/ovsdb v0.0.0-20200526071744-27bf0940cbc7
yunion.io/x/pkg v0.0.0-20200814072949-4f1b541857d6
yunion.io/x/pkg v0.0.0-20210218105412-13a69f60034c
yunion.io/x/s3cli v0.0.0-20190917004522-13ac36d8687e
yunion.io/x/sqlchemy v0.0.0-20201014101037-8fe75542e6d8
yunion.io/x/sqlchemy v0.0.0-20210329171939-2c520f93aee3
yunion.io/x/structarg v0.0.0-20200720093445-9f850fa222ce
)

24
go.sum
View File

@@ -732,8 +732,8 @@ github.com/syncthing/syncthing v0.14.48-rc.4/go.mod h1:nw3siZwHPA6M8iSfjDCWQ402e
github.com/syndtr/gocapability v0.0.0-20160928074757-e7cb7fa329f4/go.mod h1:hkRG7XYTFWNJGYcbNJQlaLq0fg1yr4J4t/NcTQtrfww=
github.com/tencentcloud/tencentcloud-sdk-go v3.0.135+incompatible h1:QIMoFqKCmNp4HPLiTR+couZbHsIZfoOllncHYvtqse8=
github.com/tencentcloud/tencentcloud-sdk-go v3.0.135+incompatible/go.mod h1:0PfYow01SHPMhKY31xa+EFz2RStxIqj6JFAJS+IkCi4=
github.com/tencentyun/cos-go-sdk-v5 v0.0.0-20191108095731-8ca4b370cde4 h1:wVKDVTKxaf0ll8ONv22Q+cazYSSmcWt7JJOeQD0LoKQ=
github.com/tencentyun/cos-go-sdk-v5 v0.0.0-20191108095731-8ca4b370cde4/go.mod h1:wk2XFUg6egk4tSDNZtXeKfe2G6690UVyt163PuUxBZk=
github.com/tencentyun/cos-go-sdk-v5 v0.7.24 h1:ZsZij764lOaPsj7mEAlyxXvslGt6/m312Tzqj/zeRpo=
github.com/tencentyun/cos-go-sdk-v5 v0.7.24/go.mod h1:wQBO5HdAkLjj2q6XQiIfDSP8DXDNrppDRw2Kp/1BODA=
github.com/texttheater/golang-levenshtein v0.0.0-20180516184445-d188e65d659e h1:T5PdfK/M1xyrHwynxMIVMWLS7f/qHwfslZphxtGnw7s=
github.com/texttheater/golang-levenshtein v0.0.0-20180516184445-d188e65d659e/go.mod h1:XDKHRm5ThF8YJjx001LtgelzsoaEcvnA7lVWz9EeX3g=
github.com/thecodeteam/goscaleio v0.1.0/go.mod h1:68sdkZAsK8bvEwBlbQnlLS+xU+hvLYM/iQ8KXej1AwM=
@@ -1121,25 +1121,25 @@ sigs.k8s.io/structured-merge-diff v0.0.0-20190817042607-6149e4549fca/go.mod h1:I
sigs.k8s.io/yaml v1.1.0 h1:4A07+ZFc2wgJwo8YNlQpr1rVlgUDlxXHhPJciaPY5gs=
sigs.k8s.io/yaml v1.1.0/go.mod h1:UJmg0vDUVViEyp3mgSv9WPwZCDxu4rQW1olrI1uml+o=
vbom.ml/util v0.0.0-20160121211510-db5cfe13f5cc/go.mod h1:so/NYdZXCz+E3ZpW0uAoCj6uzU2+8OWDFv/HxUSs7kI=
yunion.io/x/executor v0.0.0-20200227030256-a18417815e74 h1:A15C6VdVRWvmQ9pAJHrUs9yan5qKlYH7uaRxHg1kRbk=
yunion.io/x/executor v0.0.0-20200227030256-a18417815e74/go.mod h1:Uxuou9WQIeJXNpy7t2fPLL0BYLvLiMvGQwY7Qc6aSws=
yunion.io/x/executor v0.0.0-20210310041834-3fcd1574f68e h1:uGmKmmHm4zeLXhc/MEbAFtEDtGtyEYhC0OaBRGFi+fQ=
yunion.io/x/executor v0.0.0-20210310041834-3fcd1574f68e/go.mod h1:Uxuou9WQIeJXNpy7t2fPLL0BYLvLiMvGQwY7Qc6aSws=
yunion.io/x/jsonutils v0.0.0-20190625054549-a964e1e8a051/go.mod h1:4N0/RVzsYL3kH3WE/H1BjUQdFiWu50JGCFQuuy+Z634=
yunion.io/x/jsonutils v0.0.0-20201014025429-7ce189228db6 h1:RPpnTSCZwa9VQuWAf7S2dRjnZlYTIM0NH/j5vvUpk9g=
yunion.io/x/jsonutils v0.0.0-20201014025429-7ce189228db6/go.mod h1:p0nyMqGA/apTxxyLIU/o1k4V7Vujl2O6ey30L594sYE=
yunion.io/x/jsonutils v0.0.0-20201110084044-3e4e1cb49769 h1:LIQ4hhLGQuQK+XxlV+8JrKBuL37WUT+5ZTVxBwHOTD4=
yunion.io/x/jsonutils v0.0.0-20201110084044-3e4e1cb49769/go.mod h1:p0nyMqGA/apTxxyLIU/o1k4V7Vujl2O6ey30L594sYE=
yunion.io/x/log v0.0.0-20190514041436-04ce53b17c6b/go.mod h1:+gauLs73omeJAPlsXcevLsJLKixV+sR/E7WSYTSx1fE=
yunion.io/x/log v0.0.0-20190629062853-9f6483a7103d h1:59zrDL7Ft+hDukguJRmLr/Gdu/9V75x+yX99ovZwfaA=
yunion.io/x/log v0.0.0-20190629062853-9f6483a7103d/go.mod h1:LC6f/4FozL0iaAbnFt2eDX9jlsyo3WiOUPm03d7+U4U=
yunion.io/x/log v0.0.0-20200313080802-57a4ce5966b3 h1:5Wc5hkB8PtMudmHuzCyok960RuOa9I55imIGrigSdjs=
yunion.io/x/log v0.0.0-20200313080802-57a4ce5966b3/go.mod h1:LC6f/4FozL0iaAbnFt2eDX9jlsyo3WiOUPm03d7+U4U=
yunion.io/x/log v0.0.0-20201210064738-43181789dc74 h1:7D+sQ/XaUTUEm+NCrKXOhXBKlzEd0RyS2qZ4vBGjx2o=
yunion.io/x/log v0.0.0-20201210064738-43181789dc74/go.mod h1:LC6f/4FozL0iaAbnFt2eDX9jlsyo3WiOUPm03d7+U4U=
yunion.io/x/ovsdb v0.0.0-20200526071744-27bf0940cbc7 h1:gjqNa2uQzIEXyySsbvVz0UltTEbGsnFFlvnzOpCfHdo=
yunion.io/x/ovsdb v0.0.0-20200526071744-27bf0940cbc7/go.mod h1:0vLkNEhlmA64HViPBAnSTUMrx5QP1CLsxXmxDKQ80tc=
yunion.io/x/pkg v0.0.0-20190620104149-945c25821dbf/go.mod h1:t6rEGG2sQ4J7DhFxSZVOTjNd0YO/KlfWQyK1W4tog+E=
yunion.io/x/pkg v0.0.0-20190628082551-f4033ba2ea30/go.mod h1:t6rEGG2sQ4J7DhFxSZVOTjNd0YO/KlfWQyK1W4tog+E=
yunion.io/x/pkg v0.0.0-20200814072949-4f1b541857d6 h1:UarEDTBGkgcgc+nc+PZ75uo9M9+jiOGd5P2B90TxDNw=
yunion.io/x/pkg v0.0.0-20200814072949-4f1b541857d6/go.mod h1:t6rEGG2sQ4J7DhFxSZVOTjNd0YO/KlfWQyK1W4tog+E=
yunion.io/x/pkg v0.0.0-20210218105412-13a69f60034c h1:J/joqbA1N2mAlOl0Uqd4LpAq3+DK5aoFMdz+p9Ld7pQ=
yunion.io/x/pkg v0.0.0-20210218105412-13a69f60034c/go.mod h1:t6rEGG2sQ4J7DhFxSZVOTjNd0YO/KlfWQyK1W4tog+E=
yunion.io/x/s3cli v0.0.0-20190917004522-13ac36d8687e h1:v+EzIadodSwkdZ/7bremd7J8J50Cise/HCylsOJngmo=
yunion.io/x/s3cli v0.0.0-20190917004522-13ac36d8687e/go.mod h1:0iFKpOs1y4lbCxeOmq3Xx/0AcQoewVPwj62eRluioEo=
yunion.io/x/sqlchemy v0.0.0-20201014101037-8fe75542e6d8 h1:AkPrqO37Yi3aICys9qDjTlSdVVGh2pWQ8ET+dSJmhoI=
yunion.io/x/sqlchemy v0.0.0-20201014101037-8fe75542e6d8/go.mod h1:FTdwPdGhMgh4E+UFXc9klI1Ok34fMuybTT+jLhOaIjI=
yunion.io/x/sqlchemy v0.0.0-20210329171939-2c520f93aee3 h1:C4yasW3gXronDIlIVUqHSbkA38PM1X9gxUWTYGsuIuI=
yunion.io/x/sqlchemy v0.0.0-20210329171939-2c520f93aee3/go.mod h1:FTdwPdGhMgh4E+UFXc9klI1Ok34fMuybTT+jLhOaIjI=
yunion.io/x/structarg v0.0.0-20200720093445-9f850fa222ce h1:kU8xE7O5uZ1GSJVMZHoJ+jrNL7csUQHYGyAPW9QfNpE=
yunion.io/x/structarg v0.0.0-20200720093445-9f850fa222ce/go.mod h1:EP6NSv2C0zzqBDTKumv8hPWLb3XvgMZDHQRfyuOrQng=

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -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,10 @@ 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).
RolePublic(options.Options.RolePublic).
Timeout(options.Options.Timeout)
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,9 @@ 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"`
RolePublic bool `help:"Download and use the role of the public directory"`
Timeout int `help:"Ansible Override the connection timeout in seconds" default:"10"`
}
var (

View File

@@ -23,14 +23,14 @@ import (
type Application struct {
*appsrv.Application
AuthHandler handler.IHandler
MiscHandler handler.IHandler
K8sHandler handler.IHandler
ResourceHandler handler.IHandler
CSRFResourceHandler handler.IHandler
RPCHandler handler.IHandler
InfluxdbProxyHandler handler.IHandler
CloudIdSAMLHandler handler.IHandler
AuthHandler handler.IHandler
MiscHandler handler.IHandler
K8sHandler handler.IHandler
ResourceHandler handler.IHandler
CSRFResourceHandler handler.IHandler
RPCHandler handler.IHandler
// InfluxdbProxyHandler handler.IHandler
CloudIdSAMLHandler handler.IHandler
}
func NewApp(app *appsrv.Application) *Application {
@@ -66,7 +66,7 @@ func (app *Application) InitHandlers() *Application {
AddGet(handler.FetchAuthToken).
AddPost(handler.FetchAuthToken)
app.InfluxdbProxyHandler = handler.NewInfluxdbProxyHandler("/query")
// app.InfluxdbProxyHandler = handler.NewInfluxdbProxyHandler("/query")
app.CloudIdSAMLHandler = handler.NewProxyHandlerWithService(cloudid.SAML_IDP_PREFIX, cloudid.SERVICE_TYPE)
@@ -76,7 +76,7 @@ func (app *Application) InitHandlers() *Application {
func (app *Application) Bind() {
for _, h := range []handler.IHandler{
app.CloudIdSAMLHandler,
app.InfluxdbProxyHandler,
// app.InfluxdbProxyHandler,
app.MiscHandler,
app.AuthHandler,
app.K8sHandler,

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"),
@@ -139,7 +140,7 @@ func (h *AuthHandlers) GetRegionsResponse(ctx context.Context, w http.ResponseWr
if options.Options.ReturnFullDomainList {
filters := jsonutils.NewDict()
if len(currentDomain) > 0 {
filters.Add(jsonutils.NewString(currentDomain), "id")
filters.Add(jsonutils.NewString(currentDomain), "name")
}
filters.Add(jsonutils.NewInt(1000), "limit")
result, e := modules.Domains.List(s, filters)
@@ -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()
@@ -175,7 +179,7 @@ func (h *AuthHandlers) GetRegionsResponse(ctx context.Context, w http.ResponseWr
}
retIdps := make([]jsonutils.JSONObject, 0)
for i := range idps.Data {
retIdp := idps.Data[i].(*jsonutils.JSONDict).CopyIncludes("id", "name", "driver", "template", "icon_uri")
retIdp := idps.Data[i].(*jsonutils.JSONDict).CopyIncludes("id", "name", "driver", "template", "icon_uri", "is_default")
retIdps = append(retIdps, retIdp)
}
@@ -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")
}
@@ -551,6 +566,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, "")
}
@@ -962,6 +978,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

View File

@@ -21,6 +21,7 @@ import (
"yunion.io/x/onecloud/pkg/mcclient/modules/k8s"
_ "yunion.io/x/onecloud/pkg/mcclient/modules/monitor"
_ "yunion.io/x/onecloud/pkg/mcclient/modules/notify"
_ "yunion.io/x/onecloud/pkg/mcclient/modules/yunionconf"
)
func init() {

View File

@@ -383,7 +383,9 @@ func (mh *MiscHandler) DoBatchUserRegister(ctx context.Context, w http.ResponseW
return
} else {
names[name+"/"+domainId] = true
_, err := modules.UsersV3.Get(s, name, nil)
params := jsonutils.NewDict()
params.Set("domain_id", jsonutils.NewString(domainId))
_, err := modules.UsersV3.Get(s, name, params)
if err == nil {
continue
}

View File

@@ -42,8 +42,7 @@ func NewProxyHandlerWithService(prefix string, serviceName string) *InfluxdbProx
}
func requestManipulator(ctx context.Context, r *http.Request) (*http.Request, error) {
r.Header.Del("Cookie")
token := AppContextToken(ctx)
token, _, _ := fetchAuthInfo(ctx, r)
if token != nil {
r.Header.Set("X-Auth-Token", token.GetTokenString())
}

View File

@@ -162,3 +162,13 @@ type CloudgroupSyncInput struct {
type CloudgroupUpdateInput struct {
}
type CloudgroupResourceListInput struct {
// 根据权限组Id过滤资源
CloudgroupId string `json:"cloudgroup_id"`
}
type CloudgroupResourceDetails struct {
// 公有云用户名称
Cloudgroup string `json:"cloudgroup"`
}

View File

@@ -18,6 +18,6 @@ import "yunion.io/x/onecloud/pkg/apis"
const (
SERVICE_TYPE = apis.SERVICE_TYPE_CLOUDID
SAML_IDP_PREFIX = "/saml/idp"
SAML_IDP_PREFIX = "/api/saml/idp"
SERVICE_VERSION = ""
)

View File

@@ -0,0 +1,40 @@
// Copyright 2019 Yunion
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package cloudid
import "yunion.io/x/onecloud/pkg/apis"
const (
CLOUD_ROLE_STATUS_CREATING = "creating" // 创建中
CLOUD_ROLE_STATUS_AVAILABLE = "available" // 正常
CLOUD_ROLE_STATUS_DELETING = "deleting" // 删除中
CLOUD_ROLE_STATUS_DELETE_FAILED = "delete_failed" // 删除失败
)
type CloudroleListInput struct {
apis.StatusInfrasResourceBaseListInput
CloudaccountResourceListInput
}
type CloudroleDetails struct {
apis.StatusInfrasResourceBaseDetails
CloudaccountResourceDetails
SCloudrole
}
type CloudrolePurgeInput 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

@@ -0,0 +1,55 @@
// Copyright 2019 Yunion
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package cloudid
import "yunion.io/x/onecloud/pkg/apis"
const (
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 {
apis.StatusInfrasResourceBaseListInput
CloudaccountResourceListInput
}
type SAMLProviderDetails struct {
apis.StatusInfrasResourceBaseDetails
CloudaccountResourceDetails
SSAMLProvider
}
type SAMLProviderCreateInput struct {
apis.StatusInfrasResourceBaseCreateInput
CloudaccountId string `json:"cloudaccount_id"`
// swagger:ignore
EntityId string `json:"entity_id"`
// swagger:ignore
MetadataDocument string `json:"metadata_document"`
}

View File

@@ -0,0 +1,45 @@
// Copyright 2019 Yunion
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package cloudid
import "yunion.io/x/onecloud/pkg/apis"
const (
SAML_USER_STATUS_AVAILABLE = "available"
)
type SamluserCreateInput struct {
apis.StatusDomainLevelUserResourceCreateInput
// 权限组和账号必须是同一平台
CloudgroupId string `json:"cloudgroup_id"`
// 权限组和账号必须是同一平台
CloudaccountId string `json:"cloudaccount_id"`
}
type SamluserListInput struct {
apis.StatusDomainLevelUserResourceListInput
CloudgroupResourceListInput
CloudaccountResourceListInput
}
type SamluserDetails struct {
apis.StatusDomainLevelUserResourceDetails
CloudgroupResourceDetails
CloudaccountResourceDetails
SSamluser
}

View File

@@ -18,13 +18,20 @@ import (
"yunion.io/x/onecloud/pkg/apis"
)
// SAMLProviderResourceBase is an autogenerated struct via yunion.io/x/onecloud/pkg/cloudid/models.SAMLProviderResourceBase.
type SAMLProviderResourceBase struct {
SAMLProviderId string `json:"saml_provider_id"`
}
// SCloudaccount is an autogenerated struct via yunion.io/x/onecloud/pkg/cloudid/models.SCloudaccount.
type SCloudaccount struct {
apis.SStandaloneResourceBase
apis.SDomainizedResourceBase
AccountId string `json:"account_id"`
Provider string `json:"provider"`
Brand string `json:"brand"`
IamLoginUrl string `json:"iam_login_url"`
SAMLAuth *bool `json:"saml_auth,omitempty"`
}
// SCloudaccountResourceBase is an autogenerated struct via yunion.io/x/onecloud/pkg/cloudid/models.SCloudaccountResourceBase.
@@ -52,6 +59,11 @@ type SCloudgroupPolicy struct {
SCloudpolicyResourceBase
}
// SCloudgroupResourceBase is an autogenerated struct via yunion.io/x/onecloud/pkg/cloudid/models.SCloudgroupResourceBase.
type SCloudgroupResourceBase struct {
CloudgroupId string `json:"cloudgroup_id"`
}
// SCloudgroupUser is an autogenerated struct via yunion.io/x/onecloud/pkg/cloudid/models.SCloudgroupUser.
type SCloudgroupUser struct {
SCloudgroupJointsBase
@@ -121,6 +133,16 @@ type SCloudproviderResourceBase struct {
CloudproviderId string `json:"cloudprovider_id"`
}
// SCloudrole is an autogenerated struct via yunion.io/x/onecloud/pkg/cloudid/models.SCloudrole.
type SCloudrole struct {
apis.SEnabledStatusInfrasResourceBase
apis.SExternalizedResourceBase
SCloudaccountResourceBase
SAMLProviderResourceBase
Document interface{} `json:"document"`
OwnerId string `json:"owner_id"`
}
// SClouduser is an autogenerated struct via yunion.io/x/onecloud/pkg/cloudid/models.SClouduser.
type SClouduser struct {
apis.SStatusDomainLevelUserResourceBase
@@ -152,3 +174,20 @@ type SClouduserPolicy struct {
type SClouduserResourceBase struct {
ClouduserId string `json:"clouduser_id"`
}
// SSAMLProvider is an autogenerated struct via yunion.io/x/onecloud/pkg/cloudid/models.SSAMLProvider.
type SSAMLProvider struct {
apis.SStatusInfrasResourceBase
apis.SExternalizedResourceBase
SCloudaccountResourceBase
EntityId string `json:"entity_id"`
MetadataDocument string `json:"metadata_document"`
AuthUrl string `json:"auth_url"`
}
// SSamluser is an autogenerated struct via yunion.io/x/onecloud/pkg/cloudid/models.SSamluser.
type SSamluser struct {
apis.SStatusDomainLevelUserResourceBase
SCloudgroupResourceBase
SCloudaccountResourceBase
}

View File

@@ -448,8 +448,9 @@ type ServerCreateInput struct {
// 弹性公网IP带宽
// 指定此参数后会创建新的弹性公网IP并绑定到新建的虚拟机
// 此参数优先级低于public_ip
// 私有云不支持此参数
EipBw int `json:"eip_bw,omitzero"`
// 弹性公网IP线路类型
EipBgpType string `json:"eip_bgp_type,omitzero"`
// 弹性公网IP计费类型
EipChargeType string `json:"eip_charge_type,omitempty"`
// 是否跟随主机删除而自动释放

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"
@@ -182,3 +184,154 @@ type BucketGetObjectsOutput struct {
// 下一页请求的paging_marker标识
NextMarker string `json:"next_marker"`
}
type BucketWebsiteRoutingRule struct {
ConditionErrorCode string
ConditionPrefix string
RedirectProtocol string
RedirectReplaceKey string
RedirectReplaceKeyPrefix string
}
type BucketWebsiteConf struct {
// 主页
Index string
// 错误时返回的文档
ErrorDocument string
// http或https
Protocol string
Rules []BucketWebsiteRoutingRule
// 访问网站url
Url string
}
func (input *BucketWebsiteConf) Validate() error {
if len(input.Index) == 0 {
return httperrors.NewMissingParameterError("index")
}
if len(input.ErrorDocument) == 0 {
return httperrors.NewMissingParameterError("error_document")
}
if len(input.Protocol) == 0 {
return httperrors.NewMissingParameterError("protocol")
}
return nil
}
type BucketCORSRule struct {
AllowedMethods []string
// 允许的源站,可以是*
AllowedOrigins []string
AllowedHeaders []string
MaxAgeSeconds int
ExposeHeaders []string
// 规则区别标识
Id string
}
type BucketCORSRules struct {
Data []BucketCORSRule `json:"data"`
}
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 {
return httperrors.NewMissingParameterError("allowed_origins")
}
if len(input.Data[i].AllowedMethods) == 0 {
return httperrors.NewMissingParameterError("allowed_methods")
}
}
return nil
}
type BucketRefererConf struct {
// Referer Type
// enmu: Black-List, White-List
RefererType string
// 域名列表
DomainList []string
// 是否允许空referer 访问
AllowEmptyRefer bool
// 是否开启
Enabled bool `json:"enabled"`
}
func (input *BucketRefererConf) Validate() error {
return nil
}

47
pkg/apis/compute/cdn.go Normal file
View File

@@ -0,0 +1,47 @@
// 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
const (
CDN_DOMAIN_STATUS_ONLINE = "online"
CDN_DOMAIN_STATUS_OFFLINE = "offline"
CDN_DOMAIN_STATUS_PROCESSING = "processing"
CDN_DOMAIN_STATUS_REJECTED = "rejected"
CDN_DOMAIN_AREA_MAINLAND = "mainland"
CDN_DOMAIN_AREA_OVERSEAS = "overseas"
CDN_DOMAIN_AREA_GLOBAL = "global"
CDN_DOMAIN_ORIGIN_TYPE_DOMAIN = "domain"
CDN_DOMAIN_ORIGIN_TYPE_IP = "ip"
CDN_DOMAIN_ORIGIN_TYPE_BUCKET = "bucket"
)
type CdnDomain struct {
// cdn加速域名
Domain string
// 状态 rejected(域名未审核)|processing(部署中)|online|offline
Status string
// 区域 mainland|overseas|global
Area string
// cdn Cname
Cname string
// 源站
Origin string
// 源站类型 domain|ip|bucket
OriginType string
}
type CdnDomains struct {
Data []CdnDomain `json:"data"`
}

View File

@@ -191,6 +191,10 @@ type CloudaccountCreateInput struct {
cloudprovider.SCloudaccount
cloudprovider.SCloudaccountCredential
// 是否启用SAML认证
// default: false
SAMLAuth *bool `json:"saml_auth"`
}
type CloudaccountShareModeInput struct {
@@ -315,6 +319,8 @@ type CloudaccountUpdateInput struct {
// 带删除的options key
RemoveOptions []string `json:"remove_options"`
SAMLAuth *bool `json:"saml_auth"`
proxyapi.ProxySettingResourceInput
}
@@ -328,9 +334,33 @@ type CloudaccountPerformPublicInput struct {
type CloudaccountPerformPrepareNetsInput struct {
CloudaccountCreateInput
// description: Recommended network subnet mask
// example: 24
NetworkBits *int8 `json:"network_bits"`
// description: The upper limit of host number
// example: 254
HostNumberUpperLimit *int `json:"host_number_upper_limit"`
// description: The lower limit of host number
// example: 2
HostNumberLowerLimit *int `json:"host_number_lower_limit"`
// enum: vcenter,datacenter,cluster
WireLevelForVmware string `json:"wire_level_for_vmware"`
// description: Whether to directly create the recommended network
Create *bool `json:"create"`
// description: It is recommended that the name of the network be the same as the native name of vmware
OriginNetworkName *bool `json:"origin_network_name"`
// description: Created network ip distribution strategy
NetworkIpAllocationPolicy string `json:"network_ip_allocation_policy"`
// description: zone of wire created
WireZone string `json:"wire_zone"`
}
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"`
@@ -404,13 +434,19 @@ type EnrollmentAccountQuery struct {
type GetCloudaccountSamlOutput struct {
// cloudaccount SAML ServiceProvider entity ID
EntityId string `json:"entity_id"`
EntityId string `json:"entity_id,allowempty"`
// redirect login URL for this cloudaccount
RedirectLoginUrl string `json:"redirect_login_url"`
RedirectLoginUrl string `json:"redirect_login_url,allowempty"`
// redirect logout URL for this cloudaccount
RedirectLogoutUrl string `json:"redirect_logout_url"`
RedirectLogoutUrl string `json:"redirect_logout_url,allowempty"`
// metadata URL for this cloudaccount
MetadataUrl string `json:"metadata_url"`
MetadataUrl string `json:"metadata_url,allowempty"`
// initial SAML SSO login URL for this cloudaccount
InitLoginUrl string `json:"init_login_url"`
InitLoginUrl string `json:"init_login_url,allowempty"`
}
type CloudaccountEnableAutoSyncInput struct {
// 云账号状态必须是connected
// 最小值为region服务的minimal_sync_interval_seconds
SyncIntervalSeconds int `json:"sync_interval_seconds"`
}

View File

@@ -60,6 +60,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 (
@@ -95,6 +99,47 @@ var (
CLOUD_PROVIDER_GOOGLE,
CLOUD_PROVIDER_CTYUN,
}
CLOUD_PROVIDER_HOST_TYPE_MAP = map[string][]string{
CLOUD_PROVIDER_ONECLOUD: []string{
HOST_TYPE_KVM,
HOST_TYPE_BAREMETAL,
HOST_TYPE_HYPERVISOR,
},
CLOUD_PROVIDER_VMWARE: []string{
HOST_TYPE_ESXI,
},
CLOUD_PROVIDER_ALIYUN: []string{
HOST_TYPE_ALIYUN,
},
CLOUD_PROVIDER_QCLOUD: []string{
HOST_TYPE_QCLOUD,
},
CLOUD_PROVIDER_AZURE: []string{
HOST_TYPE_AZURE,
},
CLOUD_PROVIDER_AWS: []string{
HOST_TYPE_AWS,
},
CLOUD_PROVIDER_HUAWEI: []string{
HOST_TYPE_HUAWEI,
},
CLOUD_PROVIDER_OPENSTACK: []string{
HOST_TYPE_OPENSTACK,
},
CLOUD_PROVIDER_UCLOUD: []string{
HOST_TYPE_UCLOUD,
},
CLOUD_PROVIDER_ZSTACK: []string{
HOST_TYPE_ZSTACK,
},
CLOUD_PROVIDER_GOOGLE: []string{
HOST_TYPE_GOOGLE,
},
CLOUD_PROVIDER_CTYUN: []string{
HOST_TYPE_CTYUN,
},
}
)
const (
@@ -117,4 +162,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

@@ -27,9 +27,9 @@ type DBInstanceCreateInput struct {
// Ip子网名称或Id,建议使用Id
// 谷歌云并不实际使用Ip子网,仅仅通过Ip子网确定Vpc
// required: true
Network string `json:"network"`
NetworkId string `json:"network_id"`
// swagger:ignore
NetworkId string
Network string `json:"network" yunion-deprecated-by:"network_id"`
// Ip子网内的地址,不填则按照ip子网的地址分配策略分配一个ip
// required: false
@@ -41,11 +41,17 @@ type DBInstanceCreateInput struct {
// swagger:ignore
MasterInstanceId string
// 安全组名称或Id
// default: default
Secgroup string `json:"secgroup"`
// 安全组Id列表
//
//
// | 云平台 | 最大支出安全组数量 |
// |-------------|----------|
// | 腾讯云 | 5 |
// | 华为云 | 1 |
// | 阿里云 | 不支持|
SecgroupIds []string `json:"secgroup_ids"`
// swagger:ignore
SecgroupId string
Secgroup string `json:"secgroup" yunion-deprecated-by:"secgroup_ids"`
// 主可用区名称或Id, 此参数从指定的套餐所在的可用区获取
Zone1 string `json:"zone1"`
@@ -59,10 +65,6 @@ type DBInstanceCreateInput struct {
// swagger:ignore
ZoneId string
// 区域名称或Id建议使用Id
// swagger:ignore
Cloudregion string `json:"cloudregion"`
// swagger:ignore
CloudregionId string
@@ -72,12 +74,13 @@ type DBInstanceCreateInput struct {
// swagger:ignore
ManagerId string
// swagger:ignore
NetworkExternalId string
// 包年包月时间周期
Duration string `json:"duration"`
// 是否自动续费(仅包年包月时生效)
// default: false
AutoRenew bool `json:"auto_renew"`
// swagger:ignore
ExpiredAt time.Time `json:"expired_at"`
@@ -107,19 +110,10 @@ type DBInstanceCreateInput struct {
//
// | 平台 | 支持类型 | 说明 |
// | ----- | ------ | --- |
// | 华为云 |ha, single, replica| |
// | 阿里云 |basic, high_availability, always_on, finance||
// | Google |Zonal, Regional | |
// 翻译:
// basic: 基础版
// high_availability: 高可用
// always_on: 集群版
// finance: 金融版, 三节点
// ha: 高可用
// single: 单机
// replica: 只读
// Zonal: 单区域
// Regional: 区域级
// | 华为云 |ha, single, replica| ha: 高可用, single: 单机, replica: 只读|
// | 阿里云 |basic, high_availability, always_on, finance|basic: 基础版, high_availability: 高可用, always_on: 集群版, finance: 金融版, 三节点|
// | Google |Zonal, Regional | Zonal: 单区域, Regional: 区域级|
// | 腾讯云 |fe, ha, basic | ha: 高可用, basic: 基础版, fe: 金融版|
// required: true
Category string `json:"category"`
@@ -127,13 +121,12 @@ type DBInstanceCreateInput struct {
//
//
//
// | 平台 | 支持类型 |
// | 华为云 |SSD, SAS, SATA|
// | 阿里云 |local_ssd, cloud_essd, cloud_ssd|
// | Google |PD_SSD, PD_HDD|
// 翻译:
// PD_SSD: SSD
// PD_HDD: HDD
// | 平台 | 支持类型 | 说明 |
// | ----- | ------ | --- |
// | 华为云 |SSD, SAS, SATA| |
// | 阿里云 |local_ssd, cloud_essd, cloud_ssd| |
// | Google |PD_SSD, PD_HDD| PD_SSD: SSD, PD_HDD: HDD|
// | 腾讯云 |cloud_ssd, local_ssd| |
// required: true
StorageType string `json:"storage_type"`
@@ -142,10 +135,14 @@ type DBInstanceCreateInput struct {
// required: true
DiskSizeGB int `json:"disk_size_gb"`
// 指定连接端口
Port int `json:"port"`
// rds初始化密码
// 阿里云不需要此参数
// 华为云会默认创建一个用户,若不传此参数, 则为随机密码
// 谷歌云会默认创建一个用户,若不传此参数, 则为随机密码
// 腾讯云会默认创建一个用户,若不传此参数, 则为随机密码
Password string `json:"password"`
// 是否不设置初始密码
@@ -161,19 +158,15 @@ type DBInstanceCreateInput struct {
// 若指定实例套餐,此参数将根据套餐设置
VmemSizeMb int `json:"vmem_size_mb"`
// swagger:ignore
Provider string
// 从备份中创建新实例
DBInstancebackupId string `json:"dbinstancebackup_id"`
}
type SDBInstanceChangeConfigInput struct {
apis.Meta
InstanceType string
VCpuCount int
VmemSizeMb int
StorageType string
DiskSizeGB int
Category string
}
type SDBInstanceRecoveryConfigInput struct {
@@ -297,6 +290,8 @@ type DBInstanceDetails struct {
SDBInstance
Secgroups []apis.StandaloneShortDesc `json:"secgroups"`
// 安全组名称
// example: Default
Secgroup string `json:"secgroup"`
@@ -351,7 +346,27 @@ type DBInstanceFilterListInput struct {
VpcFilterListInput
}
type DBInstanceNetworkListInput struct {
type DBInstanceJoinListInput struct {
apis.VirtualJointResourceBaseListInput
DBInstanceFilterListInput
}
type DBInstanceRemoteUpdateInput struct {
// 是否覆盖替换所有标签
ReplaceTags *bool `json:"replace_tags" help:"replace all remote tags"`
}
type DBInstanceNetworkListInput struct {
DBInstanceJoinListInput
NetworkFilterListInput
}
type DBInstanceAutoRenewInput struct {
// 是否自动续费
AutoRenew bool `json:"auto_renew"`
}
type DBInstanceSetSecgroupInput struct {
SecgroupIds []string `json:"secgroup_ids"`
}

View File

@@ -48,6 +48,7 @@ type DBInstanceAccountCreateInput struct {
// | ---- |------- |
// | Aliyun |MySQL, MariaBD, SQLServer |
// | 华为云 |MySQL, MariaBD |
// | 腾讯云 |MySQL |
// required: true
// 阿里云SQL Server 2017集群版不支持创建账号
// 实例状态必须是运行中
@@ -91,3 +92,7 @@ type DBInstanceAccountDetails struct {
ProjectId string `json:"tenant_id"`
}
type DBInstanceAccountUpdateInput struct {
apis.StatusStandaloneResourceBaseUpdateInput
}

View File

@@ -16,20 +16,27 @@ package compute
const (
//实例状态
DBINSTANCE_DEPLOYING = "deploying" //部署中
DBINSTANCE_RUNNING = "running" //运行
DBINSTANCE_REBOOTING = "rebooting" //重启
DBINSTANCE_MIGRATING = "migrating" //迁移
DBINSTANCE_BACKING_UP = "backing_up" //备份
DBINSTANCE_BACKING_UP_FAILED = "backing_up_failed" //备份失败
DBINSTANCE_RESTORING = "restoring" //备份恢复中
DBINSTANCE_RESTORE_FAILED = "restore_failed"
DBINSTANCE_IMPORTING = "importing" //数据导入中
DBINSTANCE_CLONING = "cloning" //克隆
DBINSTANCE_DELETING = "deleting" //删除
DBINSTANCE_DELETE_FAILED = "delete_failed" //删除失败
DBINSTANCE_MAINTENANCE = "maintenance" //维护中
DBINSTANCE_UNKNOWN = "unknown"
DBINSTANCE_INIT = "init" //初始化
DBINSTANCE_DEPLOYING = "deploying" //部署
DBINSTANCE_RUNNING = "running" //运行
DBINSTANCE_REBOOTING = "rebooting" //重启
DBINSTANCE_MIGRATING = "migrating" //迁移
DBINSTANCE_BACKING_UP = "backing_up" //备份
DBINSTANCE_BACKING_UP_FAILED = "backing_up_failed" //备份失败
DBINSTANCE_RESTORING = "restoring" //备份恢复中
DBINSTANCE_RESTORE_FAILED = "restore_failed"
DBINSTANCE_IMPORTING = "importing" //数据导入
DBINSTANCE_CLONING = "cloning" //克隆
DBINSTANCE_DELETING = "deleting" //删除
DBINSTANCE_DELETE_FAILED = "delete_failed" //删除失败
DBINSTANCE_MAINTENANCE = "maintenance" //维护中
DBINSTANCE_ISOLATING = "isolating" //隔离中
DBINSTANCE_ISOLATE = "isolate" //已隔离
DBINSTANCE_UPGRADING = "upgrading" //升级中
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" //调整配置失败
@@ -99,6 +106,11 @@ const (
ALIYUN_DBINSTANCE_CATEGORY_ALWAYSON = "always_on" //集群版
ALIYUN_DBINSTANCE_CATEGORY_FINANCE = "finance" //金融版
//腾讯云实例类型
QCLOUD_DBINSTANCE_CATEGORY_BASIC = "basic" //基础版
QCLOUD_DBINSTANCE_CATEGORY_HA = "ha" //高可用
QCLOUD_DBINSTANCE_CATEGORY_FINANCE = "fe" //金融版
//华为云实例类型
HUAWEI_DBINSTANCE_CATEGORY_HA = "ha" //主备
HUAWEI_DBINSTANCE_CATEGORY_SINGLE = "single" //单机
@@ -118,6 +130,11 @@ const (
HUAWEI_DBINSTANCE_STORAGE_TYPE_ULTRAHIGHPRO = "ULTRAHIGHPRO"
HUAWEI_DBINSTANCE_STORAGE_TYPE_COMMON = "COMMON"
HUAWEI_DBINSTANCE_STORAGE_TYPE_HIGH = "HIGH"
//腾讯云
QCLOUD_DBINSTANCE_STORAGE_TYPE_LOCAL_SSD = "local_ssd" //本地盘SSD盘
QCLOUD_DBINSTANCE_STORAGE_TYPE_CLOUD_SSD = "cloud_ssd" //SSD云盘
)
var (
@@ -128,4 +145,20 @@ var (
ALIYUN_SQL_SERVER_DENY_KEYWORD []string = []string{
"root", " admin", " eagleye", " master", " aurora", " sa", " sysadmin", " administrator", " mssqld", " public", " securityadmin", " serveradmin", " setupadmin", " processadmin", " diskadmin", " dbcreator", " bulkadmin", " tempdb", " msdb", " model", " distribution", " mssqlsystemresource", " guest", " add", " except", " percent", " all", " exec", " plan", " alter", " execute", " precision", " and", " exists", " primary", " any", " exit", " print", " as", " fetch", " proc", " asc", " file", " procedure", " authorization", " fillfactor", " public", " backup", " for", " raiserror", " begin", " foreign", " read", " between", " freetext", " readtext", " break", " freetexttable", " reconfigure", " browse", " from", " references", " bulk", " full", " replication", " by", " function", " restore", " cascade", " goto", " restrict", " case", " grant", " return", " check", " group", " revoke", " checkpoint", " having", " right", " close", " holdlock", " rollback", " clustered", " identity", " rowcount", " coalesce", " identity_insert", " rowguidcol", " collate", " identitycol", " rule", " column", " if", " save", " commit", " in", " schema", " compute", " index", " select", " constraint", " inner", " session_user", " contains", " insert", " set", " containstable", " intersect", " setuser", " continue", " into", " shutdown", " convert", " is", " some", " create", " join", " statistics", " cross", " key", " system_user", " current", " kill", " table", " current_date", " left", " textsize", " current_time", " like", " then", " current_timestamp", " lineno", " to", " current_user", " load", " top", " cursor", " national", " tran", " database", " nocheck", " transaction", " dbcc", " nonclustered", " trigger", " deallocate", " not", " truncate", " declare", " null", " tsequal", " default", " nullif", " union", " delete", " of", " unique", " deny", " off", " update", " desc", " offsets", " updatetext", " disk", " on", " use", " distinct", " open", " user", " distributed", " opendatasource", " values", " double", " openquery", " varying", " drop", " openrowset", " view", " dummy", " openxml", " waitfor", " dump", " option", " when", " else", " or", " where", " end", " order", " while", " errlvl", " outer", " with", " escape", " over", " writetext", " galaxy",
}
RW_PRIVILEGE_SET = []string{
"SELECT", "INSERT", "UPDATE", "DELETE", "CREATE",
"DROP", "REFERENCES", "INDEX", "ALTER", "CREATE TEMPORARY TABLES",
"LOCK TABLES", "EXECUTE", "CREATE VIEW", "SHOW VIEW", "CREATE ROUTINE",
"ALTER ROUTINE", "EVENT", "TRIGGER", "PROCESS", "REPLICATION SLAVE",
"REPLICATION CLIENT",
}
R_PRIVILEGE_SET = []string{"SELECT", "LOCK TABLES", "SHOW VIEW", "PROCESS", "REPLICATION SLAVE", "REPLICATION CLIENT"}
QCLOUD_RW_PRIVILEGE_SET = []string{
"SELECT", "INSERT", "UPDATE", "DELETE", "CREATE",
"DROP", "REFERENCES", "INDEX", "ALTER", "CREATE TEMPORARY TABLES",
"LOCK TABLES", "EXECUTE", "CREATE VIEW", "SHOW VIEW", "CREATE ROUTINE",
"ALTER ROUTINE", "EVENT", "TRIGGER",
}
QCLOUD_R_PRIVILEGE_SET = []string{"SELECT", "LOCK TABLES", "SHOW VIEW"}
)

View File

@@ -44,6 +44,7 @@ type DBInstanceDatabaseCreateInput struct {
// | ---- |------- |
// | Aliyun |MySQL, MariaBD, SQLServer |
// | 华为云 |MySQL, MariaBD |
// | 腾讯云 | |
// required: true
// 阿里云SQL Server 2017集群版不支持创建数据库
// 阿里云只读实例不支持创建数据库
@@ -79,3 +80,7 @@ type DBInstanceparameterDetails struct {
SDBInstanceParameter
}
type DBInstanceDatabaseUpdateInput struct {
apis.StatusStandaloneResourceBaseUpdateInput
}

View File

@@ -0,0 +1,32 @@
// 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/pkg/apis"
type DBInstanceSecgroupListInput struct {
DBInstanceJoinListInput
SecgroupFilterListInput
}
type DBInstanceSecgroupDetails struct {
apis.VirtualJointResourceBaseDetails
// RDS名称
DBInstance string `json:"dbinstance"`
// 安全组名称
Secgroup string `json:"secgroup"`
}

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

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