Compare commits

...

624 Commits

Author SHA1 Message Date
屈轩
c6ced971a5 fix(glance): remove image clean (#12377)
Co-authored-by: Qu Xuan <quxuan@yunionyun.com>
2021-10-10 12:04:10 +08:00
屈轩
aa6b334413 fix(host): show disk details error (#12374)
Co-authored-by: Qu Xuan <quxuan@yunionyun.com>
2021-10-10 12:03:28 +08:00
Zexi Li
cfa9ba80d7 Merge pull request #12380 from zexi/automated-cherry-pick-of-#12378-upstream-release-3.7
Automated cherry pick of #12378: fix(monitor): use swagger ignore comment out structs
2021-10-09 21:47:02 +08:00
Zexi Li
3b09bd72fd fix(monitor): use swagger ignore comment out structs 2021-10-09 21:15:38 +08:00
Zexi Li
3302a0dcba Merge pull request #12360 from tb365/automated-cherry-pick-of-#12359-upstream-release-3.7
Automated cherry pick of #12359: kvm lb update lb listener redirect code fix
2021-10-08 10:13:43 +08:00
tangbin
e3747c446a kvm lb update lb listener redirect code fix 2021-10-08 09:42:26 +08:00
yunion-ci-robot
8636f06460 Merge pull request #12357 from zexi/automated-cherry-pick-of-#12355-upstream-release-3.7
Automated cherry pick of #12355: fix(baremetal): change cat path
2021-10-06 20:53:42 +08:00
Zexi Li
a46e24d305 fix(baremetal): change cat path 2021-10-05 21:36:07 +08:00
Zexi Li
16102bfb68 Merge pull request #12345 from ioito/automated-cherry-pick-of-#12343-upstream-release-3.7
Automated cherry pick of #12343: fix(host): show error for online resize
2021-09-30 09:49:07 +08:00
Qu Xuan
629f288960 fix(host): show error for online resize 2021-09-29 20:30:39 +08:00
Zexi Li
34f4c41791 Merge pull request #12337 from zexi/automated-cherry-pick-of-#12335-upstream-release-3.7
Automated cherry pick of #12335: fix(baremetal): adjust adaptec raid logical volume order
2021-09-29 17:36:09 +08:00
Zexi Li
dd5e8f68a6 fix(baremetal): adjust adaptec raid logical volume order 2021-09-29 12:18:57 +08:00
Zexi Li
2180698617 Merge pull request #12330 from ioito/automated-cherry-pick-of-#12328-upstream-release-3.7
Automated cherry pick of #12328: fix(region): optimized dns zone sync
2021-09-28 19:56:16 +08:00
Qu Xuan
8ed75bcd4e fix(region): optimized dns zone sync 2021-09-28 19:33:32 +08:00
Zexi Li
8a86d866e5 Merge pull request #12304 from ioito/automated-cherry-pick-of-#12302-upstream-release-3.7
Automated cherry pick of #12302: fix(region): aliyun rds billing type
2021-09-26 20:11:08 +08:00
yunion-ci-robot
b04ec3f897 Merge pull request #12299 from zexi/automated-cherry-pick-of-#12241-upstream-release-3.7
Automated cherry pick of #12241: feat(baremetal): adaptec raid driver
2021-09-26 17:21:35 +08:00
Qu Xuan
593d06cf40 fix(region): aliyun rds billing type 2021-09-26 15:56:45 +08:00
Zexi Li
8ad3d34689 feat(baremetal): adaptec raid driver 2021-09-26 11:45:31 +08:00
Zexi Li
7bff6d28c8 Merge pull request #12267 from ioito/automated-cherry-pick-of-#12259-upstream-release-3.7
Automated cherry pick of #12259: fix(region): optimized validate delete condition query
2021-09-26 10:03:29 +08:00
Zexi Li
aeee3e4412 Merge pull request #12297 from swordqiu/automated-cherry-pick-of-#12295-upstream-release-3.7
Automated cherry pick of #12295: fix: clean openvswitch config files when save images
2021-09-26 09:57:14 +08:00
Qiu Jian
e051f22adf fix: clean openvswitch config files when save images 2021-09-24 22:04:37 +08:00
Zexi Li
53e01c5af3 Merge pull request #12280 from ioito/automated-cherry-pick-of-#12278-upstream-release-3.7
Automated cherry pick of #12278: fix(region): google vm mac addr
2021-09-24 15:25:35 +08:00
Zexi Li
3e69ba6147 Merge pull request #12277 from ioito/automated-cherry-pick-of-#12275-upstream-release-3.7
Automated cherry pick of #12275: fix(region): sync aws rds mem size
2021-09-24 15:25:14 +08:00
Zexi Li
e739c7c9f5 Merge pull request #12283 from swordqiu/automated-cherry-pick-of-#12281-upstream-release-3.7
Automated cherry pick of #12281: fix: disable password expiration for cloudroot
2021-09-24 15:24:17 +08:00
Zexi Li
7687cb15d8 Merge pull request #12287 from ioito/automated-cherry-pick-of-#12285-upstream-release-3.7
Automated cherry pick of #12285: fix(region): export field duplicate vpc
2021-09-24 15:23:33 +08:00
Zexi Li
48ed803d39 Merge pull request #12273 from zhaoxiangchun/automated-cherry-pick-of-#12272-upstream-release-3.7
Automated cherry pick of #12272: fix(monitor): fix cloudaccount monitor query return field err
2021-09-24 10:27:31 +08:00
Qu Xuan
1f33d32597 fix(region): export field duplicate vpc 2021-09-24 10:00:55 +08:00
Qiu Jian
7baf896bea fix: disable password expiration for cloudroot 2021-09-24 01:27:53 +08:00
yunion-ci-robot
796cc7fd5e Merge pull request #12271 from zexi/automated-cherry-pick-of-#12268-upstream-release-3.7
Automated cherry pick of #12268: fix(host): disable usb-kbd for windows 10
2021-09-24 00:28:40 +08:00
Qu Xuan
e42a313f36 fix(region): google vm mac addr 2021-09-23 20:30:07 +08:00
Qu Xuan
43620cd366 fix(region): sync aws rds mem size 2021-09-23 20:07:04 +08:00
zhaoxiangchun
eef56df9b3 fix(monitor): fix cloudaccount monitor query return field err 2021-09-23 18:00:19 +08:00
Zexi Li
336b98fa52 fix(host): disable usb-kbd for windows 10 2021-09-23 15:12:51 +08:00
Qu Xuan
8081389a8b fix(region): optimized validate delete condition query 2021-09-23 10:01:22 +08:00
Zexi Li
32cb609296 Merge pull request #12261 from swordqiu/automated-cherry-pick-of-#12258-upstream-release-3.7
Automated cherry pick of #12258: fix: verify token with expired_at field instead of depending on options.TokenExpirationSeconds
2021-09-23 09:37:49 +08:00
Zexi Li
913e807edb Merge pull request #12265 from ioito/automated-cherry-pick-of-#12263-upstream-release-3.7
Automated cherry pick of #12263: fix(region): external project support domain sync
2021-09-23 09:36:23 +08:00
Qu Xuan
5a87ca7c90 fix(region): external project support domain sync 2021-09-22 23:11:54 +08:00
Qiu Jian
2479ada755 fix: verify token with expired_at field instead of options.TokenExpirationSeconds 2021-09-22 15:35:49 +08:00
Zexi Li
a24d7deaa2 Merge pull request #12245 from rainzm/automated-cherry-pick-of-#12243-upstream-release-3.7
Automated cherry pick of #12243: fix(region): consider the network of the entire VPC when merging networks
2021-09-22 11:57:40 +08:00
Zexi Li
d50f997a0d Merge pull request #12224 from zexi/automated-cherry-pick-of-#12222-upstream-release-3.7
Automated cherry pick of #12222: fix(scheduler): cpu arch match
2021-09-22 11:56:00 +08:00
Zexi Li
1e44933604 Merge pull request #12256 from ioito/automated-cherry-pick-of-#12253-upstream-release-3.7
Automated cherry pick of #12253: fix(region): optimzed network query
2021-09-22 11:30:02 +08:00
Zexi Li
5520ff5621 fix(scheduler): cpu arch match 2021-09-22 11:14:28 +08:00
Qu Xuan
69bd9883bd fix(region): optimzed network query 2021-09-18 19:00:39 +08:00
Zexi Li
55cf913ee6 Merge pull request #12249 from ioito/automated-cherry-pick-of-#12247-upstream-release-3.7
Automated cherry pick of #12247: fix(scheduler): openstack scheduler options
2021-09-17 16:34:47 +08:00
Qu Xuan
1c59148b19 fix(scheduler): openstack scheduler options 2021-09-17 16:09:02 +08:00
rainzm
f23fe60cf2 fix(region): consider the network of the entire VPC when merging networks 2021-09-17 14:54:56 +08:00
Zexi Li
87e91ccb40 Merge pull request #12239 from ioito/automated-cherry-pick-of-#12213-upstream-release-3.7
Automated cherry pick of #12213: fix(cloudmon): batch send data
2021-09-17 09:35:10 +08:00
Zexi Li
98942c5156 Merge pull request #12235 from zexi/automated-cherry-pick-of-#12227-upstream-release-3.7
Automated cherry pick of #12227: feat(climc): SSH login of a host by private key
2021-09-17 00:25:05 +08:00
Qu Xuan
ad23814be0 fix(cloudmon): batch send data 2021-09-16 19:47:43 +08:00
Stargic
9a1d302a57 feat(climc): SSH login of a host by private key 2021-09-16 15:13:28 +08:00
Zexi Li
db0dd15828 Merge pull request #12221 from ioito/automated-cherry-pick-of-#12219-upstream-release-3.7
Automated cherry pick of #12219: fix(region): disk choice master host with os arch
2021-09-15 22:32:41 +08:00
yunion-ci-robot
2d8f981eb3 Merge pull request #12232 from zexi/automated-cherry-pick-of-#12230-upstream-release-3.7
Automated cherry pick of #12230: fix(baremetal): parse mptsas duplicated devices
2021-09-15 21:57:34 +08:00
Zexi Li
e3b97f743a fix(baremetal): parse mptsas duplicated devices 2021-09-15 21:20:42 +08:00
Qu Xuan
4a19f29dce fix(region): disk choice master host with os arch 2021-09-15 12:18:04 +08:00
Zexi Li
ceae939490 Merge pull request #12216 from zhaoxiangchun/automated-cherry-pick-of-#12214-upstream-release-3.7
Automated cherry pick of #12214: fix(cloudmon): Azure metric pull support metric interval
2021-09-15 10:02:56 +08:00
Zexi Li
bbf1da4f92 Merge pull request #12217 from zexi/automated-cherry-pick-of-#12202-upstream-release-3.7
Automated cherry pick of #12202: feat(climc): SSH Login with cloudroot (add new parameter --use-cloudroot in server-ssh)
2021-09-15 09:41:50 +08:00
Zexi Li
58af0f757d Merge pull request #12208 from swordqiu/automated-cherry-pick-of-#12206-upstream-release-3.7
Automated cherry pick of #12206: fix: AWS asume role with optional name
2021-09-15 01:15:17 +08:00
Stargic
263b20963d feat(climc): SSH Login with cloudroot (add new parameter --use-cloudroot in server-ssh)
fix(climc): Fixed the code logic error of FOR loop in server-ssh
2021-09-15 01:13:41 +08:00
zhaoxiangchun
7fa1223a70 fix(cloudmon): Azure metric pull support metric interval 2021-09-14 19:39:41 +08:00
Zexi Li
02871e0b1d Merge pull request #12167 from rainzm/automated-cherry-pick-of-#12166-upstream-release-3.7
Automated cherry pick of #12166: feat(region): add cloudcache for dnszone and secgroup details
2021-09-14 16:19:52 +08:00
Zexi Li
de000cc228 Merge pull request #12201 from ioito/automated-cherry-pick-of-#12199-upstream-release-3.7
Automated cherry pick of #12199: fix(region): apsara metric data
2021-09-14 16:18:03 +08:00
Zexi Li
892a802363 Merge pull request #12210 from tb365/automated-cherry-pick-of-#12209-upstream-release-3.7
Automated cherry pick of #12209: fix(region): change aws disk iops
2021-09-14 16:16:37 +08:00
tb365
adb29c4568 fix(region): change aws disk iops 2021-09-14 16:02:53 +08:00
Qu Xuan
44fe215547 fix(region): apsara metric data 2021-09-14 11:36:35 +08:00
Qiu Jian
2a2e387a02 fix: AWS asume role with optional name 2021-09-14 01:03:23 +08:00
yunion-ci-robot
09c74bd866 Merge pull request #12205 from zexi/automated-cherry-pick-of-#12203-upstream-release-3.7
Automated cherry pick of #12203: feat(cloudmon): support classic vm metrics
2021-09-13 23:01:29 +08:00
Zexi Li
2747de8fb1 feat(cloudmon): support classic vm metrics 2021-09-13 22:34:24 +08:00
Zexi Li
f4b2245b37 Merge pull request #12197 from tb365/automated-cherry-pick-of-#12196-upstream-release-3.7
Automated cherry pick of #12196: pure hcso zone is not empty fix
2021-09-13 17:08:55 +08:00
Zexi Li
203d480e73 Merge pull request #12195 from ioito/automated-cherry-pick-of-#12193-upstream-release-3.7
Automated cherry pick of #12193: fix(region): apsara resource group
2021-09-13 17:05:35 +08:00
tb365
4500feb2f2 pure hcso zone is not empty fix 2021-09-13 14:27:11 +08:00
Qu Xuan
02201abea7 fix(region): apsara resource group 2021-09-13 10:15:45 +08:00
yunion-ci-robot
2ac0807805 Merge pull request #12186 from ioito/automated-cherry-pick-of-#12184-upstream-release-3.7
Automated cherry pick of #12184: fix(region): qcloud database sync
2021-09-10 19:17:26 +08:00
Zexi Li
a929c6a76e Merge pull request #12178 from ioito/automated-cherry-pick-of-#12176-upstream-release-3.7
Automated cherry pick of #12176: fix(region): huawei region id with project name
2021-09-10 19:09:01 +08:00
Zexi Li
1201e6cf8d Merge pull request #12183 from ioito/automated-cherry-pick-of-#12181-upstream-release-3.7
Automated cherry pick of #12181: Hotfix/qx apsara project
2021-09-10 19:08:14 +08:00
Qu Xuan
727cc2dcdb fix(region): qcloud database sync 2021-09-10 18:32:01 +08:00
Qu Xuan
054d3f91b1 fix(region): sync apsara project info 2021-09-10 18:03:51 +08:00
Qu Xuan
36e37958dc fix(region): support apsara project 2021-09-10 17:52:49 +08:00
Qu Xuan
0dc41ca794 fix(region): 不能通过华为云用户创建时间判断云账号注册时间 2021-09-10 17:18:22 +08:00
Qu Xuan
a093ab58d0 fix(region): huawei region id with project name 2021-09-10 17:18:22 +08:00
Zexi Li
54d4eab97c Merge pull request #12175 from zexi/automated-cherry-pick-of-#12125-upstream-release-3.7
Automated cherry pick of #12125: fix(climc): SSH terminal window changes with the change of local terminal
2021-09-10 14:47:43 +08:00
Stargic
b3932b0c7c fix(climc): SSH terminal window changes with the change of local terminal 2021-09-10 11:56:56 +08:00
Zexi Li
19e38acb07 Merge pull request #12173 from ioito/automated-cherry-pick-of-#12171-upstream-release-3.7
Automated cherry pick of #12171: fix(scheduler): options for openstack scheduler
2021-09-10 11:54:10 +08:00
Zexi Li
152f4db435 Merge pull request #12170 from ioito/automated-cherry-pick-of-#12168-upstream-release-3.7
Automated cherry pick of #12168: fix(region): optimized qcloud tag sync
2021-09-09 20:26:01 +08:00
Qu Xuan
fbdd5a5317 fix(scheduler): options for openstack scheduler 2021-09-09 17:55:30 +08:00
Qu Xuan
18aff683f9 fix(region): optimized qcloud tag sync 2021-09-09 17:40:34 +08:00
rainzm
f45dbbd1e6 feat(region): add cloudcache for dnszone and secgroup details 2021-09-09 16:43:10 +08:00
Zexi Li
1af88b6a56 Merge pull request #12164 from ioito/automated-cherry-pick-of-#12162-upstream-release-3.7
Automated cherry pick of #12162: fix(region): sync apsara region
2021-09-09 16:29:38 +08:00
Qu Xuan
51917559d3 fix(region): sync apsara region 2021-09-09 15:49:23 +08:00
Zexi Li
8b02a108cc Merge pull request #12159 from swordqiu/automated-cherry-pick-of-#12157-upstream-release-3.7
Automated cherry pick of #12157: fix: set disk driver and network driver for converting esxi to kvm
2021-09-08 23:06:37 +08:00
Zexi Li
b976c9a555 Merge pull request #12151 from zhaoxiangchun/automated-cherry-pick-of-#12149-upstream-release-3.7
Automated cherry pick of #12149: fix(monitor): add monitor resource details field
2021-09-08 22:52:29 +08:00
Zexi Li
2ebba2d0e8 Merge pull request #12156 from ioito/automated-cherry-pick-of-#12154-upstream-release-3.7
Automated cherry pick of #12154: fix(region): sync aliyun qcloud default project
2021-09-08 22:51:36 +08:00
Qiu Jian
f678eb97bf fix: set disk driver and network driver for converting esxi to kvm 2021-09-08 22:29:31 +08:00
Qu Xuan
7c71578ae0 fix(region): sync aliyun qcloud default project 2021-09-08 20:30:04 +08:00
zhaoxiangchun
9e9d72d3ca fix(monitor): add monitor resource details field 2021-09-08 17:39:37 +08:00
Zexi Li
601c76236a Merge pull request #12143 from rainzm/automated-cherry-pick-of-#12141-upstream-release-3.7
Automated cherry pick of #12141: fix(devtool): get tenant info via correct field
2021-09-08 16:25:32 +08:00
Zexi Li
88e8d3119b Merge pull request #12147 from ioito/automated-cherry-pick-of-#12145-upstream-release-3.7
Automated cherry pick of #12145: fix(region): resource apsara resource id not found error
2021-09-08 16:21:28 +08:00
Qu Xuan
c4ba8aa63f fix(region): resource apsara resource id not found error 2021-09-08 15:55:07 +08:00
Zexi Li
9c800297b7 Merge pull request #12139 from ioito/automated-cherry-pick-of-#12126-upstream-release-3.7
Automated cherry pick of #12126: fix(region): apsara default region
2021-09-08 15:54:35 +08:00
rainzm
dd5a0e93b8 fix(devtool): get tenant info via correct field 2021-09-08 15:34:58 +08:00
Qu Xuan
768560c4d7 fix(region): apsara default region 2021-09-08 14:27:36 +08:00
Zexi Li
d6920ce23c Merge pull request #12128 from ioito/automated-cherry-pick-of-#12126-upstream-release-3.7
Automated cherry pick of #12126: fix(region): apsara default region
2021-09-08 13:58:19 +08:00
Zexi Li
dc86c09e1f Merge pull request #12136 from swordqiu/automated-cherry-pick-of-#12134-upstream-release-3.7
Automated cherry pick of #12134: fix(region): change disk and network drivers for Esxi converted VM
2021-09-08 12:01:47 +08:00
Qiu Jian
056243e99a fix(region): change disk and network drivers for Esxi converted VM 2021-09-08 11:48:15 +08:00
Zexi Li
b0a5a95344 Merge pull request #12132 from tb365/automated-cherry-pick-of-#12130-upstream-release-3.7
Automated cherry pick of #12130: fix(region): hcso sync server fix
2021-09-08 10:47:28 +08:00
tb365
4a32b970bf fix(region): hcso sync server fix 2021-09-08 10:42:32 +08:00
Qu Xuan
85c052a6ee fix(region): apsara default region 2021-09-08 10:36:24 +08:00
Zexi Li
d10353a824 Merge pull request #12123 from ioito/automated-cherry-pick-of-#12121-upstream-release-3.7
Automated cherry pick of #12121: fix(region): apsara endpoint fix
2021-09-07 15:25:52 +08:00
Qu Xuan
679437989a fix(region): apsara endpoint fix 2021-09-07 14:29:38 +08:00
Zexi Li
545a466561 Merge pull request #12119 from rainzm/automated-cherry-pick-of-#12117-upstream-release-3.7
Automated cherry pick of #12117: fix(devtool): create serviceurl
2021-09-07 10:50:30 +08:00
rainzm
d8d330d3d5 fix(devtool): create serviceurl 2021-09-07 10:37:21 +08:00
Zexi Li
9bd95312d7 Merge pull request #12115 from tb365/automated-cherry-pick-of-#12114-upstream-release-3.7
Automated cherry pick of #12114: NetworkUsableZoneIds remove duplicate zone ids
2021-09-06 21:47:56 +08:00
tb365
50d8f10b4e NetworkUsableZoneIds remove duplicate zone ids 2021-09-06 14:43:32 +08:00
Zexi Li
6731704344 Merge pull request #12107 from rainzm/automated-cherry-pick-of-#12105-upstream-release-3.7
Automated cherry pick of #12105: feat(devtool): add sshinfo and serviceurl
2021-09-05 16:58:49 +08:00
rainzm
5151880ec5 feat(devtool): add sshinfo and serviceurl 2021-09-04 18:31:35 +08:00
Zexi Li
0d20002e6e fix(baremetal): reindex nic (#12088) 2021-09-03 02:39:26 +08:00
Zexi Li
68e7ce0325 Merge pull request #12092 from zexi/automated-cherry-pick-of-#12090-upstream-release-3.7
Automated cherry pick of #12090: fix(climc-base): update tag to 20210901
2021-09-02 23:15:00 +08:00
Zexi Li
39dd4b116e Merge pull request #12095 from tb365/automated-cherry-pick-of-#12094-upstream-release-3.7
Automated cherry pick of #12094: fix(region): lb list search address fix
2021-09-02 18:32:29 +08:00
Zexi Li
52dd82a46d Merge pull request #12099 from zhaoxiangchun/automated-cherry-pick-of-#12097-upstream-release-3.7
Automated cherry pick of #12097: fix(monitor): monitor resource apiHelper fix
2021-09-02 18:30:28 +08:00
zhaoxiangchun
9904a6c4e9 fix(monitor): monitor resource apiHelper fix
1. apiHeleper 中增加interface,对应的ModelSet可以指定资源过滤参数
2. monitor删除过期的资源
2021-09-02 14:39:42 +08:00
tb365
7416d71d7c fix(region): lb list search address fix 2021-09-02 14:16:15 +08:00
Zexi Li
4670e4c014 Merge pull request #12070 from rainzm/automated-cherry-pick-of-#12067-upstream-release-3.7
Automated cherry pick of #12067: feat(region): allow custom sshport when make sshable
2021-09-02 11:43:47 +08:00
Zexi Li
8f7de66cfb fix(climc-base): update tag to 20210901 2021-09-01 20:18:13 +08:00
Zexi Li
2b1d6c4ff6 Merge pull request #12082 from ioito/automated-cherry-pick-of-#12080-upstream-release-3.7
Automated cherry pick of #12080: fix(region): access group policy
2021-09-01 16:36:00 +08:00
Zexi Li
875a88046a Merge pull request #12078 from tb365/automated-cherry-pick-of-#12077-upstream-release-3.7
Automated cherry pick of #12077: lb list api support search elastic ip
2021-09-01 15:17:14 +08:00
Zexi Li
acfc20be7c Merge pull request #12085 from swordqiu/automated-cherry-pick-of-#12083-upstream-release-3.7
Automated cherry pick of #12083: fix: add ceph-common to climc image, so as to make rbcli work
2021-09-01 14:48:20 +08:00
Qiu Jian
e1e58ef110 fix: add ceph-common to climc image, so as to make rbcli work 2021-09-01 12:36:33 +08:00
rainzm
b56e56bcbf feat(region): allow custom sshport when make sshable 2021-09-01 11:49:16 +08:00
Qu Xuan
209b23044e fix(region): access group policy 2021-09-01 11:18:27 +08:00
tb365
68019186ab lb list api support search elastic ip 2021-09-01 11:11:49 +08:00
Zexi Li
73bc984bcc Merge pull request #12074 from swordqiu/automated-cherry-pick-of-#12072-upstream-release-3.7
Automated cherry pick of #12072: fix: do not lock system account user
2021-08-31 21:02:00 +08:00
Qiu Jian
e6fbedf770 fix: do not lock system account user 2021-08-31 17:45:09 +08:00
Zexi Li
647be15a78 Merge pull request #12044 from tb365/automated-cherry-pick-of-#12043-upstream-release-3.7
Automated cherry pick of #12043: count host fix
2021-08-31 16:25:10 +08:00
tb365
92b8720bb6 change host type to hcso 2021-08-31 15:49:42 +08:00
tb365
aeab880a64 count host fix 2021-08-31 15:49:42 +08:00
yunion-ci-robot
873e88e2b8 Merge pull request #12066 from zexi/climc-host-delete
fix(climc): host-delete use batch delete function
2021-08-31 15:24:08 +08:00
Zexi Li
8830f6188e Merge pull request #12063 from tb365/automated-cherry-pick-of-#12062-upstream-release-3.7
Automated cherry pick of #12062: Bugfix/tb bugfix 083101
2021-08-31 15:16:18 +08:00
Zexi Li
b3c3d1faf9 fix(climc): host-delete use batch delete function 2021-08-31 15:09:02 +08:00
Zexi Li
4f5dab3490 Merge pull request #12061 from ioito/automated-cherry-pick-of-#12059-upstream-release-3.7
Automated cherry pick of #12059: fix(region): eip project sync
2021-08-31 11:32:11 +08:00
tb365
72ba92c351 make fmt 2021-08-31 11:22:18 +08:00
tb365
28f381b602 rename huaweicloudstack to hcso 2021-08-31 11:16:21 +08:00
tb365
3b55b9882f syncRemoveCloudHost purge host 2021-08-31 11:13:43 +08:00
Qu Xuan
80d49a1e7f fix(region): eip project sync 2021-08-31 10:34:47 +08:00
Zexi Li
159ad9b558 Merge pull request #12042 from rainzm/automated-cherry-pick-of-#12040-upstream-release-3.7
Automated cherry pick of #12040: feat(region): add no_tags options to filter guests
2021-08-31 10:01:34 +08:00
Zexi Li
5010b61440 Merge pull request #12058 from rainzm/automated-cherry-pick-of-#12056-upstream-release-3.7
Automated cherry pick of #12056: fix(region): delete the wrong tag 'nullable:false'
2021-08-31 09:56:44 +08:00
rainzm
68d5efad0b fix(region): delete the wrong tag 'nullable:false' 2021-08-30 16:59:44 +08:00
rainzm
c2ff56a000 feat(region): add no_tags options to filter guests
no_tags filter the guests without `no_tags`
2021-08-30 16:47:26 +08:00
Zexi Li
00f3e9c1e3 Merge pull request #12055 from ioito/automated-cherry-pick-of-#12053-upstream-release-3.7
Automated cherry pick of #12053: fix(region): sync vm os type
2021-08-30 15:05:32 +08:00
Qu Xuan
92fc4f009b fix(region): sync vm os type 2021-08-30 14:20:36 +08:00
Zexi Li
d6dfd434af Merge pull request #12051 from zexi/automated-cherry-pick-of-#12050-upstream-release-3.7
Automated cherry pick of #12050: fix(glance): image fuzzy match by distro
2021-08-27 18:02:37 +08:00
Zexi Li
54dbd4b8ff fix(glance): image fuzzy match by distro 2021-08-27 18:01:39 +08:00
Zexi Li
f3c4eb8e6f Merge pull request #12047 from zhaoxiangchun/automated-cherry-pick-of-#9750-upstream-release-3.7
Automated cherry pick of #9750: feat(region): be compatible with changes in monitor api in scaling group
2021-08-27 16:58:08 +08:00
Zexi Li
0b748ea859 Merge pull request #12048 from zhaoxiangchun/automated-cherry-pick-of-#12038-upstream-release-3.7
Automated cherry pick of #12038: fix(monitor): monitor rds sync
2021-08-27 16:57:05 +08:00
zhaoxiangchun
c11ae1235b fea(monitor): monitor apiHelper add domain,project 2021-08-27 16:04:22 +08:00
Zexi Li
929359ac4d Merge pull request #12032 from zexi/automated-cherry-pick-of-#12030-upstream-release-3.7
Automated cherry pick of #12030: fix(keystone): appsrv listen multi port failed cause of race condition
2021-08-27 14:29:56 +08:00
rainzm
9c36154c30 feat(region): be compatible with changes in monitor api in scaling group 2021-08-27 12:06:21 +08:00
Zexi Li
2898d87dcb Merge pull request #12036 from ioito/automated-cherry-pick-of-#12034-upstream-release-3.7
Automated cherry pick of #12034: fix(region): sync aliyun classic network ip addr
2021-08-26 18:04:07 +08:00
Qu Xuan
4b90b74ffb fix(region): sync aliyun classic network ip addr 2021-08-26 17:16:59 +08:00
Zexi Li
00aa056e7d fix(keystone): appsrv listen multi port failed cause of race condition 2021-08-26 16:55:14 +08:00
Zexi Li
28561dbea1 Merge pull request #12026 from zhaoxiangchun/automated-cherry-pick-of-#12024-upstream-release-3.7
Automated cherry pick of #12024: feat(cloudmon): support HuaweiCloudStack rds metric
2021-08-26 12:34:49 +08:00
Zexi Li
1f56517f4d Merge pull request #12000 from tb365/automated-cherry-pick-of-#11999-upstream-release-3.7
Automated cherry pick of #11999: hcso support sync vm host
2021-08-26 12:23:09 +08:00
Zexi Li
0b8f28f216 Merge pull request #12029 from zexi/automated-cherry-pick-of-#12027-upstream-release-3.7
Automated cherry pick of #12027: fix(vendor): use creack/pty v1.1.11 to adapt go 1.15
2021-08-26 12:09:09 +08:00
Zexi Li
44ef03219e fix(vendor): use creack/pty v1.1.11 to adapt go 1.15 2021-08-26 11:51:59 +08:00
Zexi Li
7fd194ba22 Merge pull request #12008 from rainzm/automated-cherry-pick-of-#12006-upstream-release-3.7
Automated cherry pick of #12006: feat(region): add direct vpc options
2021-08-26 11:26:20 +08:00
zhaoxiangchun
b96c560915 feat(cloudmon): support HuaweiCloudStack rds metric 2021-08-26 11:21:43 +08:00
rainzm
59dc000c0e feat(region): add direct field for vpc
This field describes whether the VPC can be connected directly
2021-08-26 11:11:00 +08:00
Zexi Li
5392e6c9e9 Merge pull request #12005 from rainzm/automated-cherry-pick-of-#12003-upstream-release-3.7
Automated cherry pick of #12003: fix(region): check instancesnapshot in correct place when resize disk
2021-08-26 10:42:49 +08:00
Zexi Li
e82c77cce3 Merge pull request #12016 from zexi/automated-cherry-pick-of-#12014-upstream-release-3.7
Automated cherry pick of #12014: fix(cloudcommon): avoid service exit when etcd unreachable
2021-08-26 10:41:46 +08:00
Zexi Li
ed23e0d6ca Merge pull request #12022 from zexi/automated-cherry-pick-of-#12020-upstream-release-3.7
Automated cherry pick of #12020: feat(cloudcommon): move ignore_nonrunning_guests option to common
2021-08-26 10:39:13 +08:00
Zexi Li
b8c5d18ac1 feat(cloudcommon): move ignore_nonrunning_guests option to common 2021-08-25 21:05:01 +08:00
tb365
d57d2be977 hcso support sync vm host 2021-08-25 20:45:08 +08:00
Zexi Li
40500b7219 Merge pull request #12011 from ioito/automated-cherry-pick-of-#12009-upstream-release-3.7
Automated cherry pick of #12009: fix(region): aliyun rds network sync
2021-08-25 20:18:49 +08:00
Zexi Li
242d7eaa0f fix(cloudcommon): avoid service exit when etcd unreachable 2021-08-25 19:48:41 +08:00
Qu Xuan
a90dbebf54 fix(region): aliyun rds network sync 2021-08-25 18:55:43 +08:00
Zexi Li
5d6cc519f3 Merge pull request #11996 from zhaoxiangchun/automated-cherry-pick-of-#11995-upstream-release-3.7
Automated cherry pick of #11995: fix(monitor):fix monitor query top 5
2021-08-25 18:18:46 +08:00
rainzm
27aa38040d fix(region): check instancesnapshot in correct place when resize disk 2021-08-25 17:16:12 +08:00
zhaoxiangchun
43d87e83eb fix(monitor):fix monitor query top 5 2021-08-25 10:14:17 +08:00
Zexi Li
fe397ac8a1 Merge pull request #11985 from ioito/automated-cherry-pick-of-#11983-upstream-release-3.7
Automated cherry pick of #11983: fix(region): enable zstack allocate ip by itself
2021-08-24 22:56:32 +08:00
Zexi Li
3489be83a9 Merge pull request #11990 from ioito/automated-cherry-pick-of-#11988-upstream-release-3.7
Automated cherry pick of #11988: fix(cloudid): hcso custom role
2021-08-24 22:55:11 +08:00
Qu Xuan
7416933ac1 fix(cloudid): hcso custom role 2021-08-24 21:11:00 +08:00
Qu Xuan
f60d419d9b fix(region): enable zstack allocate ip by itself 2021-08-24 16:08:40 +08:00
Zexi Li
c122017e45 Merge pull request #11976 from ioito/automated-cherry-pick-of-#11975-upstream-release-3.7
Automated cherry pick of #11975: fix(region): resource count for cachedimages
2021-08-23 19:59:19 +08:00
Zexi Li
25bba90b9c Merge pull request #11980 from zexi/automated-cherry-pick-of-#11979-upstream-release-3.7
Automated cherry pick of #11979: feat(glance): image support filter by os_type and distribution
2021-08-23 16:19:23 +08:00
Zexi Li
7409e8cb19 feat(glance): image support filter by os_type and distribution 2021-08-23 15:54:04 +08:00
Qu Xuan
d8e2f448b9 fix(region): resource count for cachedimages 2021-08-23 14:23:21 +08:00
Zexi Li
4f2aa13bbb Merge pull request #11972 from zhaoxiangchun/automated-cherry-pick-of-#11971-upstream-release-3.7
Automated cherry pick of #11971: fix(monitor): update apiHelper field and log
2021-08-23 12:16:55 +08:00
yunion-ci-robot
9d9973ae35 Merge pull request #11973 from zexi/automated-cherry-pick-of-#11970-upstream-release-3.7
Automated cherry pick of #11970: fix(region): allow guest network zero bandwidth limit
2021-08-23 12:14:12 +08:00
Zexi Li
ae809ca533 fix(region): allow guest network zero bandwidth limit 2021-08-23 11:55:50 +08:00
zhaoxiangchun
d8c1b49bdb fix(monitor): update apiHelper field and log 2021-08-23 10:24:23 +08:00
Zexi Li
73a209b049 Merge pull request #11969 from zhaoxiangchun/automated-cherry-pick-of-#11958-upstream-release-3.7
fix(monitor): fix monitor slow query
2021-08-23 10:04:16 +08:00
zhaoxiangchun
a0fc7d493d fix(monitor): fix monitor slow query
1. 使用apihelper 增量查询监控数据
2. 通过apihelper中set进行对应的资源过滤
2021-08-20 22:27:31 +08:00
Zexi Li
5d890449d0 Merge pull request #11965 from ioito/automated-cherry-pick-of-#11964-upstream-release-3.7
Automated cherry pick of #11964: fix(cloudid): hcso enable multi tenant saml provider
2021-08-20 17:05:45 +08:00
Qu Xuan
b7ccd35039 fix(cloudid): hcso enable multi tenant saml provider 2021-08-20 16:09:27 +08:00
Zexi Li
ee47ac3298 Merge pull request #11961 from rainzm/automated-cherry-pick-of-#11960-upstream-release-3.7
Automated cherry pick of #11960: fix(region): adjust the query range corresponding to the alarm strategy
2021-08-20 11:35:13 +08:00
rainzm
70864334d9 fix(region): adjust the query range corresponding to the alarm strategy
The data in the cycle range may not be available yet, and the data in the last hour can be queried fixedly
2021-08-20 11:11:36 +08:00
Zexi Li
3b0c73a550 Merge pull request #11955 from ioito/automated-cherry-pick-of-#11954-upstream-release-3.7
Automated cherry pick of #11954: fix(region): sync with multi worker
2021-08-19 16:11:59 +08:00
Qu Xuan
54bfc14038 fix(region): sync with multi worker 2021-08-19 15:16:23 +08:00
Zexi Li
7b5a573445 Merge pull request #11952 from zexi/automated-cherry-pick-of-#11951-upstream-release-3.7
Automated cherry pick of #11951: fix(host-deployer): XFS uuid冲突 无法 mount
2021-08-19 14:49:38 +08:00
panda
38ac153d69 fix(host-deployer): XFS uuid冲突 无法 mount
pkg/hostman/diskutils/fsutils/fsutils.go

1. ResizeFs 操作中 ResizePartitionFs 未对 xfs uuid 加锁
     导致挂载相同uuid 磁盘异异常
 - dmesg 显示
[86653.888361] XFS (nbd2p1): Filesystem has duplicate UUID f4553201-609a-4657-87aa-994cc6339f50 - can't mount

 - 批量创建虚拟机, 虚拟机磁盘为xfs, 多台虚拟机调度到同一宿主机时
   DeployGuestFs 无法 chroot password root
2021-08-19 14:46:03 +08:00
Zexi Li
bbd3988c2f Merge pull request #11949 from tb365/automated-cherry-pick-of-#11948-upstream-release-3.7
Automated cherry pick of #11948: huawei cloud getInstanceByIP add ip filter
2021-08-19 14:26:42 +08:00
tb365
7c026aa8d8 huawei cloud getInstanceByIP add ip filter 2021-08-19 11:21:25 +08:00
Zexi Li
0bcfe82417 Merge pull request #11926 from zhaoxiangchun/feature/zxc-cloudmon-3.7
fix(cloudmon): update ReportOptions field
2021-08-18 20:50:14 +08:00
Zexi Li
c75c8e2797 Merge pull request #11928 from tb365/automated-cherry-pick-of-#11927-upstream-release-3.7
Automated cherry pick of #11927: zone list timeout fix
2021-08-18 20:48:17 +08:00
Zexi Li
97aa7da982 Merge pull request #11940 from ioito/automated-cherry-pick-of-#11939-upstream-release-3.7
Automated cherry pick of #11939: fix(region): lb resource count
2021-08-18 20:47:21 +08:00
Zexi Li
039ab1a528 Merge pull request #11813 from rainzm/automated-cherry-pick-of-#11812-upstream-release-3.7
Automated cherry pick of #11812: feat(devtool): support batch applying for virtual machines
2021-08-18 18:14:34 +08:00
tb365
87503be372 zone list timeout fix 2021-08-18 15:34:57 +08:00
Qu Xuan
5b2dd8027e fix(region): lb resource count 2021-08-18 15:30:06 +08:00
Zexi Li
152b21bc2b Merge pull request #11933 from ioito/automated-cherry-pick-of-#11932-upstream-release-3.7
Automated cherry pick of #11932: fix(region): empty aliyun resource tag
2021-08-18 10:06:31 +08:00
Zexi Li
fa80920db1 Merge pull request #11937 from swordqiu/automated-cherry-pick-of-#11936-upstream-release-3.7
Automated cherry pick of #11936: fix: dhcp classless route encoding error
2021-08-18 10:03:23 +08:00
yunion-ci-robot
f50281cefc Merge pull request #11935 from zexi/automated-cherry-pick-of-#11934-upstream-release-3.7
Automated cherry pick of #11934: feat(misc): update build and service base image to use go v1.15.15
2021-08-17 23:31:46 +08:00
Qiu Jian
a865e922d4 fix: dhcp classless route encoding error 2021-08-17 23:28:54 +08:00
zhaoxiangchun
e0b6acb6ac fix(cloudmon): update ReportOptions field 2021-08-17 20:24:13 +08:00
Zexi Li
0549d821f9 feat(misc): update build and service base image to use go v1.15.15 2021-08-17 20:11:38 +08:00
Qu Xuan
28891dfbed fix(region): empty aliyun resource tag 2021-08-17 19:24:06 +08:00
Zexi Li
f89a67ee97 Merge pull request #11922 from ioito/automated-cherry-pick-of-#11921-upstream-release-3.7
Automated cherry pick of #11921: fix(cloudid): azure attach enabled subscription policy
2021-08-16 21:43:04 +08:00
Qu Xuan
6135e4a7b6 fix(cloudid): avoid sync clouduser twice 2021-08-16 15:12:30 +08:00
Qu Xuan
5fe7e3e3b3 fix(cloudid): azure attach enabled subscription policy 2021-08-16 15:12:30 +08:00
Zexi Li
981fad82a7 Merge pull request #11920 from zhaoxiangchun/automated-cherry-pick-of-#11915-upstream-release-3.7
Automated cherry pick of #11915: feat(monitor): 处理编排mysql,redis,rabbitmq 相关监控
2021-08-15 18:29:34 +08:00
zhaoxiangchun
83c216a41a feat(monitor): 处理编排mysql,redis,rabbitmq 相关监控 2021-08-15 18:13:53 +08:00
yunion-ci-robot
23f40319b8 Merge pull request #11919 from tb365/automated-cherry-pick-of-#11918-upstream-release-3.7
Automated cherry pick of #11918: ProviderFactory add method IsMultiTenant
2021-08-15 17:39:23 +08:00
tb365
85fafb47a0 ProviderFactory add method IsMultiTenant 2021-08-15 17:28:53 +08:00
Zexi Li
8cb7863c4e Merge pull request #11912 from tb365/automated-cherry-pick-of-#11911-upstream-release-3.7
Automated cherry pick of #11911: add default dns for subnet
2021-08-15 16:36:32 +08:00
Zexi Li
cb664e9f46 Merge pull request #11914 from ioito/automated-cherry-pick-of-#11913-upstream-release-3.7
Automated cherry pick of #11913: fix(cloudevent): hcso resource name
2021-08-15 16:35:20 +08:00
yunion-ci-robot
4863632b47 Merge pull request #11854 from zexi/automated-cherry-pick-of-#11853-upstream-release-3.7
Automated cherry pick of #11853: Fix bms reuse ipaddr
2021-08-15 16:26:23 +08:00
Qu Xuan
37c05a19e1 fix(cloudevent): hcso resource name 2021-08-15 16:24:27 +08:00
tb365
5aeaaa8e65 add default dns for subnet 2021-08-15 16:15:56 +08:00
Zexi Li
1f2324a3c8 Merge pull request #11910 from tb365/automated-cherry-pick-of-#11909-upstream-release-3.7
Automated cherry pick of #11909: fix(region): huawei cloud sync vm os arch
2021-08-15 14:05:14 +08:00
tb365
ee28e8903b fix(region): huawei cloud sync vm os arch 2021-08-15 13:53:33 +08:00
Zexi Li
f0dfe268c7 Merge pull request #11901 from zhaoxiangchun/automated-cherry-pick-of-#11900-upstream-release-3.7
Automated cherry pick of #11900: feat(monitor): add ext mysql,rabbitmq,redis metric
2021-08-15 11:01:08 +08:00
Zexi Li
d18b241986 Merge pull request #11908 from zexi/automated-cherry-pick-of-#11907-upstream-release-3.7
Automated cherry pick of #11907: feat(build): update glance and torrent base image
2021-08-15 02:17:49 +08:00
Zexi Li
fe673fcb60 feat(build): update glance and torrent base image 2021-08-15 02:15:44 +08:00
Zexi Li
0b4a72d4e4 Merge pull request #11906 from ioito/automated-cherry-pick-of-#11905-release-3.7
Automated cherry pick of #11905: fix(cloudevent): hcso event fix
2021-08-15 00:14:25 +08:00
Qu Xuan
89ad3778cd fix(cloudevent): hcso event fix 2021-08-15 00:08:16 +08:00
yunion-ci-robot
2901a41603 Merge pull request #11903 from zexi/automated-cherry-pick-of-#11902-upstream-release-3.7
Automated cherry pick of #11902: feat(mcclient): add k8s cluster monitor component disable option
2021-08-14 00:25:22 +08:00
Zexi Li
e74768ba22 Merge pull request #11898 from ioito/automated-cherry-pick-of-#11895-upstream-release-3.7
Automated cherry pick of #11895: fix(region): return region sql error
2021-08-13 21:16:07 +08:00
Zexi Li
1d3fcea400 feat(mcclient): add k8s cluster monitor component disable option 2021-08-13 21:14:36 +08:00
zhaoxiangchun
218ee0a462 feat(monitor): add ext mysql,rabbitmq,redis metric 2021-08-13 20:05:11 +08:00
Qu Xuan
5b8209d60f fix(region): return region sql error 2021-08-13 18:38:27 +08:00
Zexi Li
004be9b0f6 Merge pull request #11888 from swordqiu/automated-cherry-pick-of-#11887-upstream-release-3.7
Automated cherry pick of #11887: fix: routes to private prefixes should be distributed on private nic
2021-08-13 14:30:47 +08:00
Zexi Li
8d90cd13bb Merge pull request #11893 from ioito/automated-cherry-pick-of-#11892-upstream-release-3.7
Automated cherry pick of #11892: fix(region): hcso regional eip
2021-08-13 14:29:16 +08:00
Qu Xuan
5528a163ac fix(region): hcso regional eip 2021-08-13 11:02:59 +08:00
Qiu Jian
9c0f99d46f fix: routes to private prefixes should be distributed on private nic 2021-08-12 23:00:56 +08:00
Zexi Li
05f4b1beae Merge pull request #11884 from ioito/automated-cherry-pick-of-#11883-upstream-release-3.7
Automated cherry pick of #11883: fix(region): azure vm disk size
2021-08-12 21:04:11 +08:00
Zexi Li
b09812128e Merge pull request #11871 from zhaoxiangchun/automated-cherry-pick-of-#11870-upstream-release-3.7
Automated cherry pick of #11870: feat(cloudmon): support huaweistack monitor metric
2021-08-12 21:03:01 +08:00
Qu Xuan
30b112545d fix(region): azure vm disk size 2021-08-12 20:38:09 +08:00
Zexi Li
2f0e6887b7 Merge pull request #11880 from zexi/automated-cherry-pick-of-#11875-upstream-release-3.7
Automated cherry pick of #11875: Monitor temperature
2021-08-12 18:21:40 +08:00
Zexi Li
aee73f38ea Merge pull request #11881 from ioito/automated-cherry-pick-of-#11879-upstream-release-3.7
Automated cherry pick of #11879: add: hcso iam
2021-08-12 17:06:41 +08:00
Qu Xuan
6296264589 add: hcso iam 2021-08-12 16:51:50 +08:00
Zexi Li
2877d8fc7a feat(ansibleserver): update file-repo to v0.3.3 and use telegraf 1.19.2 2021-08-12 16:30:51 +08:00
Zexi Li
8ee769f312 feat(monitor): support temperature metrics 2021-08-12 16:26:52 +08:00
Zexi Li
395b04ace6 Merge pull request #11878 from tb365/automated-cherry-pick-of-#11877-upstream-release-3.7
Automated cherry pick of #11877: huawei cloud stack client fix
2021-08-12 15:43:25 +08:00
tb365
ed9396e717 goimports fix 2021-08-12 15:12:12 +08:00
tb365
3d6789e8fc huawei cloud stack client fix 2021-08-12 14:36:29 +08:00
Zexi Li
2e15f8d608 Merge pull request #11873 from ioito/automated-cherry-pick-of-#11872-upstream-release-3.7
Automated cherry pick of #11872: fix(region): delete dirty network
2021-08-12 10:55:52 +08:00
Qu Xuan
92e3b7ab4b fix(region): delete dirty network 2021-08-11 20:19:14 +08:00
zhaoxiangchun
449b9d85a7 feat(cloudmon): support huaweistack monitor metric 2021-08-11 20:09:29 +08:00
Zexi Li
2986334e8d Merge pull request #11868 from ioito/automated-cherry-pick-of-#11867-upstream-release-3.7
Automated cherry pick of #11867: fix(region): return sql error
2021-08-11 20:03:51 +08:00
Qu Xuan
1500639f01 fix(region): return sql error 2021-08-11 19:38:02 +08:00
Zexi Li
b47946b562 Merge pull request #11865 from swordqiu/automated-cherry-pick-of-#11864-upstream-release-3.7
Automated cherry pick of #11864: fix: resolve permission issues for samlusers and quotas
2021-08-11 17:50:57 +08:00
Qiu Jian
bed1c36fdb fix: resolve permission issues for samlusers and quotas 2021-08-11 17:23:32 +08:00
Zexi Li
b9bbe4df8d Merge pull request #11861 from ioito/automated-cherry-pick-of-#11860-upstream-release-3.7
Automated cherry pick of #11860: feat: hcso sku sync
2021-08-11 11:29:51 +08:00
Qu Xuan
b064162f9c feat: hcso sku sync 2021-08-11 10:53:48 +08:00
Zexi Li
bf4dabacef Merge pull request #11859 from tb365/automated-cherry-pick-of-#11847-upstream-release-3.7
Automated cherry pick of #11847: fix(region): update huawei cloud stack update credential
2021-08-10 17:01:11 +08:00
tb365
1587eba9e8 fix(region): update huawei cloud stack update credential 2021-08-10 16:51:41 +08:00
Zexi Li
9aa3362734 Merge pull request #11857 from tb365/automated-cherry-pick-of-#11843-upstream-release-3.7
Automated cherry pick of #11843: huawei client update
2021-08-10 16:49:27 +08:00
tb365
b51d6ee925 goimports fix 2021-08-10 16:34:07 +08:00
tb365
fc6806ad1b conflict fix 2021-08-10 16:32:57 +08:00
tb365
9e09a75918 fix(region): goimport fix 2021-08-10 16:30:29 +08:00
tb365
2996dfcd7a huawei client update 2021-08-10 16:28:31 +08:00
Zexi Li
b35e9d7a9a Merge pull request #11856 from zexi/automated-cherry-pick-of-#11848-upstream-release-3.7
Automated cherry pick of #11848: feat(climc): add SSH through EIP in server-ssh
2021-08-10 16:09:51 +08:00
Stargic
306e807fd9 feat(climc): add SSH through EIP in server-ssh 2021-08-10 15:55:48 +08:00
Zexi Li
524182fa25 fix(region): baremetal server reuse ip address condition 2021-08-10 10:44:29 +08:00
Zexi Li
12e07d8e16 Merge pull request #11850 from swordqiu/automated-cherry-pick-of-#11849-upstream-release-3.7
Automated cherry pick of #11849: fix: inter-vm traffic limited by eip bandwidth limit
2021-08-10 10:07:20 +08:00
yunion-ci-robot
f5a995a21d Merge pull request #11841 from zexi/automated-cherry-pick-of-#11840-upstream-release-3.7
Automated cherry pick of #11840: fix(region): not set baremetal is_maintenance when action is start
2021-08-10 00:19:01 +08:00
yunion-ci-robot
a94ca63498 Merge pull request #11846 from zexi/automated-cherry-pick-of-#11844-upstream-release-3.7
Automated cherry pick of #11844: fix(baremetal): increase ipmitool reboot sleep wait time
2021-08-10 00:18:00 +08:00
Qiu Jian
a212d77ded fix: inter-vm traffic limited by eip bandwidth limit 2021-08-10 00:15:03 +08:00
Zexi Li
16ed81e1da fix(baremetal): increase ipmitool reboot sleep wait time 2021-08-09 16:51:51 +08:00
Zexi Li
49dd563c62 fix(region): not set baremetal is_maintenance when action is start 2021-08-09 15:25:01 +08:00
Zexi Li
d7149b0fa0 Merge pull request #11834 from ioito/automated-cherry-pick-of-#11832-upstream-release-3.7
Automated cherry pick of #11832: fix(region): sync openstack multi zone storages
2021-08-07 14:29:38 +08:00
Zexi Li
e4899bd130 Merge pull request #11838 from rainzm/automated-cherry-pick-of-#11833-upstream-release-3.7
Automated cherry pick of #11833: Filter wires and networks from host_type of host
2021-08-07 14:29:01 +08:00
rainzm
374be49275 feat(region): add host_type filter for listing network
Also fixed the previous problem of using host to filter the network of yunioncloud
2021-08-06 19:03:53 +08:00
rainzm
2b9c4be9ec feat(region): add host_type filter for listing wires 2021-08-06 19:03:53 +08:00
Qu Xuan
81341af535 fix(region): sync openstack multi zone storages 2021-08-06 16:12:29 +08:00
Zexi Li
f5f3d2600c Merge pull request #11831 from tb365/automated-cherry-pick-of-#11830-upstream-release-3.7
Automated cherry pick of #11830: fix(apigateway): totp passcode verify error code fix
2021-08-06 11:24:18 +08:00
tb365
c4e41a412f fix(apigateway): totp passcode verify error code fix 2021-08-06 10:58:03 +08:00
Zexi Li
2daada9376 Merge pull request #11821 from ioito/automated-cherry-pick-of-#11820-upstream-release-3.7
Automated cherry pick of #11820: fix(region): support nas tags
2021-08-06 10:23:12 +08:00
Zexi Li
839eb9ccbd Merge pull request #11824 from rainzm/automated-cherry-pick-of-#11823-upstream-release-3.7
Automated cherry pick of #11823: fix(region): prohibit resizing the disk of a esxi vm with instance snapshots
2021-08-06 10:21:36 +08:00
Zexi Li
55270ba14f Merge pull request #11827 from ioito/automated-cherry-pick-of-#11826-upstream-release-3.7
Automated cherry pick of #11826: fix(region): add resource statistics filter params
2021-08-06 10:03:22 +08:00
Zexi Li
71ba486208 Merge pull request #11829 from ioito/automated-cherry-pick-of-#11828-upstream-release-3.7
Automated cherry pick of #11828: fix(webconsole): add jdcloud vnc
2021-08-06 00:40:33 +08:00
Qu Xuan
d0908d992e fix(webconsole): add jdcloud vnc 2021-08-05 20:40:57 +08:00
Qu Xuan
1e7dce8c3d fix(region): add resource statistics filter params 2021-08-05 19:43:31 +08:00
rainzm
e01cdbb27d fix(region): prohibit resizing the disk of a esxi vm with instance snapshots 2021-08-05 19:03:10 +08:00
Zexi Li
55e1bb709f Merge pull request #11819 from zhaoxiangchun/automated-cherry-pick-of-#11443-upstream-release-3.7
Automated cherry pick of #11443: fix(monitor): fix agent monitor query
2021-08-05 17:48:22 +08:00
Qu Xuan
5ad118518a fix(region): support nas tags 2021-08-05 17:29:55 +08:00
Zexi Li
9db1fe7b0d Merge pull request #11809 from ioito/automated-cherry-pick-of-#11808-upstream-release-3.7
Automated cherry pick of #11808: fix(region): avoid get openstack hostid panic
2021-08-05 17:18:32 +08:00
zhaoxiangchun
f9bf35fed1 fix(monitor): fix agent monitor query
1.修复agent监控查询图表显示id的问题
2021-08-05 17:17:56 +08:00
Zexi Li
8968c73562 Merge pull request #11816 from rainzm/automated-cherry-pick-of-#11815-upstream-release-3.7
Automated cherry pick of #11815: feat(region): check whether the esxi host is ip or domain name
2021-08-05 17:17:55 +08:00
Zexi Li
d61a5198ce Merge pull request #11818 from zhaoxiangchun/automated-cherry-pick-of-#10978-upstream-release-3.7
Automated cherry pick of #10978: feat(monitor): add agent monitor metric
2021-08-05 17:16:14 +08:00
zhaoxiangchun
c6082abae2 feat(monitor): add agent monitor metric
1.增加对agent采集数据的翻译
2021-08-05 16:55:17 +08:00
rainzm
0267b9a8be feat(region): check whether the esxi host is ip or domain name 2021-08-05 16:10:41 +08:00
rainzm
0395b51463 feat(devtool): support batch applying for virtual machines 2021-08-05 15:01:08 +08:00
Qu Xuan
fcba57f1c2 fix(region): avoid get openstack hostid panic 2021-08-05 14:19:06 +08:00
yunion-ci-robot
10576a300d Merge pull request #11804 from zexi/automated-cherry-pick-of-#11803-upstream-release-3.7
Automated cherry pick of #11803: fix(baremetal): inject mac when admin nic found
2021-08-04 20:10:57 +08:00
Zexi Li
4dbecc4500 fix(baremetal): inject mac when admin nic found 2021-08-04 18:53:53 +08:00
Zexi Li
066d0c6a87 Merge pull request #11801 from rainzm/automated-cherry-pick-of-#11796-upstream-release-3.7
Automated cherry pick of #11796: fix(esxiagetn): keep compatible with the lower version vcenter when copying the disk
2021-08-04 16:14:51 +08:00
rainzm
8ce51213fe fix(esxiagetn): keep compatible with the lower version vcenter when copying the disk 2021-08-04 15:29:04 +08:00
Zexi Li
3bae895ca1 Merge pull request #11793 from swordqiu/automated-cherry-pick-of-#11792-upstream-release-3.7
Automated cherry pick of #11792: fix: add purge split log commands for cloudevent and cloudlog
2021-08-04 10:23:22 +08:00
yunion-ci-robot
31c36f00c4 Merge pull request #11790 from zexi/automated-cherry-pick-of-#11788-upstream-release-3.7
Automated cherry pick of #11788: fix(region): baremetal server resued address nic count should be subtracted
2021-08-03 23:54:56 +08:00
Zexi Li
dbddb80087 Merge pull request #11795 from swordqiu/automated-cherry-pick-of-#11794-upstream-release-3.7
Automated cherry pick of #11794: fix: server migrate network to a vlan network
2021-08-03 20:05:23 +08:00
Zexi Li
571c94b7a5 Merge pull request #11787 from zexi/automated-cherry-pick-of-#11768-upstream-release-3.7
Automated cherry pick of #11768: feat(climc): add Port-Forward SSH  in server-ssh
2021-08-03 20:03:51 +08:00
yunion-ci-robot
61a39145dd Merge pull request #11785 from zexi/automated-cherry-pick-of-#11784-upstream-release-3.7
Automated cherry pick of #11784: fix(baremetal): inject mac to cmdline
2021-08-03 18:59:56 +08:00
Qiu Jian
b70e158516 fix: server migrate network to a vlan network 2021-08-03 18:07:14 +08:00
Qiu Jian
3423a9105c fix: add purge split log commands for cloudevent and cloudlog 2021-08-03 17:20:56 +08:00
Zexi Li
0d6fe4f4e7 fix(region): baremetal server resued address nic count should be subtracted 2021-08-03 15:40:33 +08:00
Stargic
344804b0f2 fix(climc): modify the code logic of starting "Port-Forward SSH" 2021-08-03 14:32:56 +08:00
Stargic
1355d9e384 feat(climc): add Port-Forward SSH in server-ssh 2021-08-03 14:32:56 +08:00
Zexi Li
c222e532ae fix(baremetal): inject mac to cmdline 2021-08-03 12:28:22 +08:00
Zexi Li
fa8bd78b56 Merge pull request #11778 from zhaoxiangchun/automated-cherry-pick-of-#11777-upstream-release-3.7
Automated cherry pick of #11777: fix(monitor): fix resource details can't show monitor metric
2021-08-02 19:57:32 +08:00
Zexi Li
ee1baa4e8f Merge pull request #11775 from rainzm/automated-cherry-pick-of-#11774-upstream-release-3.7
Automated cherry pick of #11774: fix(scheduler): make option EnableQuotaCheck work
2021-08-02 18:00:42 +08:00
zhaoxiangchun
b8f7eca40b fix(monitor): fix resource details can't show monitor metric 2021-08-02 17:34:40 +08:00
rainzm
e84aee02a3 fix(scheduler): make option EnableQuotaCheck work 2021-08-02 14:32:03 +08:00
Zexi Li
d5dc1af89b Merge pull request #11771 from zexi/automated-cherry-pick-of-#11770-upstream-release-3.7
Automated cherry pick of #11770: add host type count api
2021-08-02 11:57:43 +08:00
tb365
1bc51e386b add host type count api 2021-08-02 11:35:50 +08:00
Zexi Li
42845c1b19 Merge pull request #11757 from zhaoxiangchun/automated-cherry-pick-of-#11672-upstream-release-3.7
Automated cherry pick of #11672: fix(monitor): fix monitor bug
2021-07-31 11:45:10 +08:00
Zexi Li
f06d75d15d Merge pull request #11762 from rainzm/automated-cherry-pick-of-#11761-upstream-release-3.7
Automated cherry pick of #11761: fix: avoid double counting when compute networks nic count
2021-07-31 11:38:32 +08:00
yunion-ci-robot
b3bff7e9f7 Merge pull request #11759 from zexi/automated-cherry-pick-of-#11758-upstream-release-3.7
Automated cherry pick of #11758: fix(region): baremetal spec condition
2021-07-31 01:47:36 +08:00
rainzm
597f2b149d fix: avoid double counting when compute networks nic count 2021-07-30 20:05:11 +08:00
Zexi Li
ef7ae54d21 fix(region): baremetal spec condition 2021-07-30 17:09:11 +08:00
zhaoxiangchun
bd82868c98 fix(monitor): fix monitor bug
1.支持修改默认报警策略:查询周期、连续周期和静默期
2.监控总览-图表中过滤已删除机器信息
2021-07-30 10:16:47 +08:00
Zexi Li
c2bb195f83 Merge pull request #11756 from zhaoxiangchun/feature/zxc-cloudmon-3.7
feat(cloudmon): 3.7 add cloudmon component
2021-07-29 21:23:01 +08:00
zhaoxiangchun
8aea54e84d feat(cloudmon): 3.7 add cloudmon component 2021-07-29 20:59:01 +08:00
Zexi Li
08d648a3aa Merge pull request #11755 from zexi/automated-cherry-pick-of-#11754-upstream-release-3.7
Automated cherry pick of #11754: feat(build): update ansibleserver dockerfile
2021-07-29 20:12:30 +08:00
Zexi Li
c7c8765256 Merge pull request #11753 from zexi/automated-cherry-pick-of-#11752-upstream-release-3.7
Automated cherry pick of #11752: fix(host,region): disable health checker by default
2021-07-29 19:23:57 +08:00
Zexi Li
19124cb9ef feat(build): update ansibleserver dockerfile 2021-07-29 19:22:14 +08:00
Zexi Li
36e6dddd81 fix(host,region): disable health checker by default 2021-07-29 19:08:50 +08:00
Zexi Li
fe7937fd35 Merge pull request #11749 from zexi/automated-cherry-pick-of-#11748-upstream-release-3.7
Automated cherry pick of #11748: feat(ansibleserver): record running cmd to debug
2021-07-29 16:40:13 +08:00
Zexi Li
c310a1898f Merge pull request #11737 from zexi/automated-cherry-pick-of-#11736-upstream-release-3.7
Automated cherry pick of #11736: fix(region): raise GetNamedNetworkConfiguration error
2021-07-29 16:39:17 +08:00
Zexi Li
5ed3eec537 Merge pull request #11742 from rainzm/automated-cherry-pick-of-#11741-upstream-release-3.7
Automated cherry pick of #11741: fix(region): prevent the creation of redundant network segments when managing vmware
2021-07-29 16:38:48 +08:00
Zexi Li
286dd1e4ff Merge pull request #11750 from zexi/automated-cherry-pick-of-#11746-upstream-release-3.7
Automated cherry pick of #11746: fix: purge splitable logs for cloudevents and logger
2021-07-29 15:39:48 +08:00
Qiu Jian
feb19332a6 fix: purge splitable logs for cloudevents and logger 2021-07-29 12:05:53 +08:00
Zexi Li
7147922973 feat(ansibleserver): record running cmd to debug 2021-07-29 12:03:59 +08:00
Zexi Li
6e479d596f Merge pull request #11744 from ioito/automated-cherry-pick-of-#11743-upstream-release-3.7
Automated cherry pick of #11743: fix(climc): add version list command
2021-07-28 20:04:00 +08:00
Qu Xuan
4c0b8d8318 fix(climc): add version list command 2021-07-28 19:47:11 +08:00
rainzm
c128ad3a89 fix(region): prevent the creation of redundant network segments when managing vmware 2021-07-28 17:43:50 +08:00
Zexi Li
ebf519bd63 fix(region): raise GetNamedNetworkConfiguration error 2021-07-28 17:25:41 +08:00
Zexi Li
e730e2b1ae Merge pull request #11735 from zhaoxiangchun/automated-cherry-pick-of-#11734-upstream-release-3.7
Automated cherry pick of #11734: feat(climc):  register  billsanalysis  climc
2021-07-28 14:47:04 +08:00
zhaoxiangchun
6152c9be01 feat(climc): register billsanalysis climc 2021-07-28 14:35:27 +08:00
Zexi Li
e8c6b625e5 Merge pull request #11732 from zexi/automated-cherry-pick-of-#11673-upstream-release-3.7
Automated cherry pick of #11673: feat(climc): add enable monitor minio component command
2021-07-27 18:08:12 +08:00
Zexi Li
92a8880f99 feat(climc): add enable monitor minio component command 2021-07-27 18:07:46 +08:00
Zexi Li
a0058edc16 Merge pull request #11730 from swordqiu/automated-cherry-pick-of-#11729-upstream-release-3.7
Automated cherry pick of #11729: fix: simplify SQL for distinct field query of tenant or domain names
2021-07-27 10:29:43 +08:00
Zexi Li
f630133ab3 Merge pull request #11728 from ioito/automated-cherry-pick-of-#11727-upstream-release-3.7
Automated cherry pick of #11727: feat(region): add status count filter by params
2021-07-27 10:29:07 +08:00
Qiu Jian
db876b4480 fix: simplify SQL for distinct field query of tenant or domain names 2021-07-27 01:19:23 +08:00
Zexi Li
994857dffb Merge pull request #11725 from rainzm/automated-cherry-pick-of-#11724-upstream-release-3.7
Automated cherry pick of #11724: fix(region): fetch zone before syncing promise cloud provider storages
2021-07-26 18:56:43 +08:00
Zexi Li
3078ea2af3 Merge pull request #11721 from ioito/automated-cherry-pick-of-#11720-upstream-release-3.7
Automated cherry pick of #11720: fix(region): openstack ip pre allocate
2021-07-26 18:44:02 +08:00
Qu Xuan
5cdf5051a5 feat(region): add status count filter by params 2021-07-26 17:57:00 +08:00
rainzm
6c30b04365 fix(region): fetch zone before syncing promise cloud provider storages 2021-07-26 17:19:52 +08:00
Qu Xuan
2e720737a5 fix(region): openstack ip pre allocate 2021-07-26 15:27:53 +08:00
Zexi Li
89255ecc79 Merge pull request #11716 from ioito/automated-cherry-pick-of-#11715-upstream-release-3.7
Automated cherry pick of #11715: fix(region): cpu desc too long
2021-07-26 14:36:04 +08:00
Qu Xuan
5f4b9c2b51 fix(region): cpu desc too long 2021-07-26 10:05:58 +08:00
yunion-ci-robot
30ac3d3f40 Merge pull request #11712 from zexi/automated-cherry-pick-of-#11711-upstream-release-3.7
Automated cherry pick of #11711: fix(host): find same vendor iommu_group devices
2021-07-25 00:13:31 +08:00
Zexi Li
c0f3090d2a fix(host): find same vendor iommu_group devices 2021-07-24 21:42:23 +08:00
Zexi Li
379797e2aa Merge pull request #11708 from ioito/automated-cherry-pick-of-#11707-upstream-release-3.7
Automated cherry pick of #11707: fix(region): update qcloud secgroup rule
2021-07-23 18:22:24 +08:00
Qu Xuan
ed7d6715af fix(region): update qcloud secgroup rule 2021-07-23 17:42:18 +08:00
Zexi Li
eb8b4368fc Merge pull request #11692 from ioito/automated-cherry-pick-of-#11691-upstream-release-3.7
Automated cherry pick of #11691: fix(region): account aksk error
2021-07-23 14:22:52 +08:00
Zexi Li
21d0d98f59 Merge pull request #11702 from ioito/automated-cherry-pick-of-#11701-upstream-release-3.7
Automated cherry pick of #11701: fix(region): azure quota sync
2021-07-23 14:22:19 +08:00
Qu Xuan
c0e969368b fix(region): azure quota sync 2021-07-22 19:35:24 +08:00
Zexi Li
47f7fc1a35 Merge pull request #11694 from rainzm/automated-cherry-pick-of-#11693-upstream-release-3.7
Automated cherry pick of #11693: feat: support install monitor agent in baremetal
2021-07-22 15:29:53 +08:00
Zexi Li
2cac694816 Merge pull request #11696 from swordqiu/automated-cherry-pick-of-#11695-upstream-release-3.7
Automated cherry pick of #11695: fix: qemu-img create disk may fail to preallocation=metadata enable for large disk
2021-07-22 15:27:15 +08:00
Qiu Jian
1f7d9e2cf8 fix: qemu-img create disk may fail to preallocation=metadata enable for large disk
error report: failed to flush the refcount block cache: File too large
2021-07-22 12:17:19 +08:00
rainzm
bea1592741 feat: support install monitor agent in baremetal 2021-07-21 19:51:54 +08:00
Qu Xuan
898fa5d160 fix(region): account aksk error 2021-07-21 19:34:58 +08:00
Zexi Li
19591a3ad2 Merge pull request #11687 from rainzm/automated-cherry-pick-of-#11686-upstream-release-3.7
Automated cherry pick of #11686: Use custom version Telegraf as monitor agent
2021-07-20 21:16:09 +08:00
Zexi Li
716f77d280 Merge pull request #11683 from ioito/automated-cherry-pick-of-#11681-upstream-release-3.7
Automated cherry pick of #11681: fix(keystone): policy filter by role
2021-07-20 21:13:38 +08:00
rainzm
c3a652bad2 feat: update file-repo version 2021-07-20 19:44:54 +08:00
rainzm
09666490ca feat: use yunion's customized version of telegraf in file-repo 2021-07-20 19:44:54 +08:00
Zexi Li
f3fa282434 Merge pull request #11665 from rainzm/automated-cherry-pick-of-#11663-upstream-release-3.7
Automated cherry pick of #11663: feat(hostdeployer): change UserAdd to CheckOrAddUser
2021-07-20 18:54:56 +08:00
Qu Xuan
4722fae114 fix(keystone): policy filter by role 2021-07-20 15:50:34 +08:00
Zexi Li
992f54defe Merge pull request #11680 from zexi/automated-cherry-pick-of-#11678-upstream-release-3.7
Automated cherry pick of #11678: fix(build): baremetal arm64 build
2021-07-19 20:28:47 +08:00
Zexi Li
c12ed7b8e0 fix(build): baremetal arm64 build 2021-07-19 20:21:46 +08:00
Zexi Li
1348c76fc9 Merge pull request #11675 from ioito/automated-cherry-pick-of-#11674-upstream-release-3.7
Automated cherry pick of #11674: fix(region): rds network sync
2021-07-19 18:50:12 +08:00
Qu Xuan
8ea004084e fix(region): return rds networks info 2021-07-19 17:30:13 +08:00
Qu Xuan
bd5bd0ae70 fix(region): rds network sync 2021-07-19 17:30:13 +08:00
Zexi Li
afcfea3bda Merge pull request #11668 from ioito/automated-cherry-pick-of-#11667-upstream-release-3.7
Automated cherry pick of #11667: fix(keystone): avoid sql error
2021-07-19 14:22:01 +08:00
Qu Xuan
c629e7fce3 fix(keystone): avoid sql error 2021-07-19 14:04:25 +08:00
rainzm
48729ae9bc feat(hostdeployer): change UserAdd to CheckOrAddUser
If the user already exists, use the existing user and its information; otherwise, create a new user
2021-07-19 11:21:15 +08:00
Zexi Li
96ec7c0142 Merge pull request #11659 from ioito/automated-cherry-pick-of-#11658-upstream-release-3.7
Automated cherry pick of #11658: fix(region): sync auzre subscription health status
2021-07-16 11:24:44 +08:00
Zexi Li
ff9dadc3a7 Merge pull request #11662 from ioito/automated-cherry-pick-of-#11661-upstream-release-3.7
Automated cherry pick of #11661: fix(climc): json tag
2021-07-16 11:14:06 +08:00
Qu Xuan
760427c884 fix(climc): json tag 2021-07-16 11:08:02 +08:00
Qu Xuan
1c54d09ec2 fix(region): sync auzre subscription health status 2021-07-16 10:58:12 +08:00
Zexi Li
b1a8414949 Merge pull request #11652 from swordqiu/automated-cherry-pick-of-#11641-upstream-release-3.7
Automated cherry pick of #11641: feature: allow server switch network without service interruption
2021-07-15 19:17:35 +08:00
Zexi Li
cac7bf92bd Merge pull request #11648 from zexi/automated-cherry-pick-of-#11647-upstream-release-3.7
Automated cherry pick of #11647: fix(baremetal): compatible with SN empty of MegaRaid
2021-07-15 19:16:19 +08:00
Zexi Li
db125a6df3 fix(baremetal): compatible with SN empty of MegaRaid 2021-07-15 10:30:18 +08:00
Qiu Jian
b2a3742fbb fix: migrate interface before commit desc 2021-07-14 21:29:46 +08:00
Qiu Jian
9faf2d553e minor fixes 2021-07-14 21:29:46 +08:00
Qiu Jian
ad8a5ed953 fix: add codes to switch bridge of ovs port 2021-07-14 21:29:46 +08:00
Qiu Jian
a9ada013cf feature: allow server switch network without service interruption 2021-07-14 21:29:46 +08:00
Zexi Li
98abe8185e Merge pull request #11651 from bistuzx/automated-cherry-pick-of-#11650-upstream-release-3.7
Automated cherry pick of #11650: feat(meter): add meter cost conversion
2021-07-14 18:52:21 +08:00
bistuzx@163.com
c069baa46e add meter cost conversion 2021-07-14 18:10:21 +08:00
Zexi Li
14b8e7ce59 Merge pull request #11636 from ioito/automated-cherry-pick-of-#11580-upstream-release-3.7
Automated cherry pick of #11580: fix(region): update manager name
2021-07-14 11:08:11 +08:00
Zexi Li
25278ead71 Merge pull request #11639 from ioito/automated-cherry-pick-of-#11638-upstream-release-3.7
Automated cherry pick of #11638: fix(region): remove debug info
2021-07-13 20:10:57 +08:00
Qu Xuan
9384e81c88 fix(region): remove debug info 2021-07-13 17:27:53 +08:00
Qu Xuan
2ef57b2d19 fix(region): update manager name 2021-07-13 10:51:48 +08:00
Zexi Li
667cfe4e53 Merge pull request #11604 from rainzm/automated-cherry-pick-of-#11600-upstream-release-3.7
Automated cherry pick of #11600: fix(region): sync storage before syncing host in syncOnPremiseCloudProviderInfo
2021-07-13 10:46:43 +08:00
Zexi Li
9ce8c93b4b Merge pull request #11631 from ioito/automated-cherry-pick-of-#11627-upstream-release-3.7
Automated cherry pick of #11627: fix(region): allocate server eip without hostwire restrict
2021-07-12 18:40:18 +08:00
Qu Xuan
092cc351b2 fix(region): allocate server eip without hostwire restrict 2021-07-12 14:25:57 +08:00
yunion-ci-robot
368ef90425 Merge pull request #11629 from tb365/automated-cherry-pick-of-#11628-upstream-release-3.7
Automated cherry pick of #11628: fix(keystone): user not found error fix
2021-07-12 14:03:02 +08:00
tb365
285b0f2523 fix(keystone): user not found error fix 2021-07-12 13:54:22 +08:00
Zexi Li
aa87a342a7 Merge pull request #11621 from rainzm/automated-cherry-pick-of-#11592-upstream-release-3.7
Automated cherry pick of #11592: feat(devtool): use server forward direct for guest with kvm hypervisor
2021-07-12 10:28:34 +08:00
Zexi Li
a62be4a708 Merge pull request #11618 from zhaoxiangchun/automated-cherry-pick-of-#11617-upstream-release-3.7
Automated cherry pick of #11617: fix(monitor): fix monitor resourece update
2021-07-12 10:27:38 +08:00
Zexi Li
a0331e094d Merge pull request #11623 from rainzm/automated-cherry-pick-of-#11622-upstream-release-3.7
Automated cherry pick of #11622: fix(region): set DefaultSysDiskBackend as empty for esxi guest
2021-07-10 10:54:11 +08:00
rainzm
162c3315c0 fix(region): sync storage before syncing host in syncOnPremiseCloudProviderInfo
场景:重新构建了某个存储,相当于把之前某个存储上的所有虚拟机迁移到一个新的存储上。

因为没有syncStorage,所以在同步syncHostStorge的时候无法disconnect host
和 没有的storage,这是因为storage上还有host的虚拟机。syncHostStorages
会失败,storageCache 也就不会同步,上面的icloudImage也不会同步。
2021-07-09 19:21:10 +08:00
rainzm
742b05540d fix(region): set DefaultSysDiskBackend as empty for esxi guest 2021-07-09 19:13:48 +08:00
yunion-ci-robot
7d13ffd432 Merge pull request #11612 from zexi/automated-cherry-pick-of-#11609-upstream-release-3.7
Automated cherry pick of #11609: fix(baremetal): use ipmitool power reset when redfish power on error
2021-07-09 18:53:00 +08:00
rainzm
9d17f7091b feat(devtool): use server forward direct for guest with kvm hypervisor 2021-07-09 17:10:17 +08:00
Zexi Li
0ed305cd0b fix(baremetal): use ipmitool power reset when redfish power on error 2021-07-09 14:47:08 +08:00
zhaoxiangchun
c27cec0195 fix(monitor): fix monitor resourece update
1.通过region返回的obj更新监控资源时 remove掉id信息
2021-07-09 13:09:07 +08:00
Zexi Li
09f2812a29 Merge pull request #11605 from zhaoxiangchun/automated-cherry-pick-of-#11603-upstream-release-3.7
Automated cherry pick of #11603: fix(monitor):  alert policy use ownerId when update
2021-07-09 12:07:11 +08:00
Zexi Li
e58e611c00 Merge pull request #11613 from swordqiu/automated-cherry-pick-of-#11610-upstream-release-3.7
Automated cherry pick of #11610: fix: host detach wire not update netinterface
2021-07-09 11:53:29 +08:00
Qiu Jian
9630e1b7db fix: host detach wire not update netinterface 2021-07-09 10:45:28 +08:00
zhaoxiangchun
3b8eaaf554 fix(monitor): alert policy use ownerId when update
1.根据参数中的project和domain属性调用FetchOwnerId方法,然后确定报警策略归属并进行监控查询过滤
2021-07-09 10:17:47 +08:00
yunion-ci-robot
01bc96d4c5 Merge pull request #11594 from zexi/automated-cherry-pick-of-#11563-upstream-release-3.7
Automated cherry pick of #11563: feat(host): aware of kubelet eviction config
2021-07-08 20:16:59 +08:00
Zexi Li
63fc152fcd Merge pull request #11598 from rainzm/automated-cherry-pick-of-#11597-upstream-release-3.7
Automated cherry pick of #11597: fix(host-deployer): make SKVMGuestLVMPartition work find
2021-07-08 18:40:17 +08:00
rainzm
233b97977d fix(host-deployer): make SKVMGuestLVMPartition work fine
1. add needChangeName to indicate whether to change the name when
   putting down
2. remove unnecessary IsVgActice
3. findPartitions from /dev/{vgname}/{lvname} or
   /dev/mapper/{vgname}-{lvname}
2021-07-08 18:18:16 +08:00
Zexi Li
35b0f69399 Merge pull request #11589 from zhaoxiangchun/automated-cherry-pick-of-#11587-upstream-release-3.7
Automated cherry pick of #11587: feat(monitor): update monitor resource overview
2021-07-08 10:30:52 +08:00
Zexi Li
580f9ca3cd feat(host): aware of kubelet eviction config 2021-07-07 21:29:55 +08:00
zhaoxiangchun
90300c1afb feat(monitor): update monitor resource overview
1.调整监控总览-报警资源逻辑
启用禁用策略时对报警资源进行对应的挂载和解绑
2021-07-07 20:37:41 +08:00
Zexi Li
ee0ae2a35d Merge pull request #11584 from rainzm/automated-cherry-pick-of-#11583-upstream-release-3.7
Automated cherry pick of #11583: fix(region): handle the error of RequestGuestCreateAllDisks
2021-07-07 20:29:14 +08:00
rainzm
cdfb16ec1b fix(region): handle the error of RequestGuestCreateAllDisks 2021-07-07 15:46:23 +08:00
Zexi Li
198e42ea95 Merge pull request #11571 from rainzm/automated-cherry-pick-of-#11570-upstream-release-3.7
Automated cherry pick of #11570: feat(hostdeployer): change the way fo GetLoginAccount in windows
2021-07-06 22:22:01 +08:00
yunion-ci-robot
827891d7fd Merge pull request #11576 from zexi/automated-cherry-pick-of-#11574-upstream-release-3.7
Automated cherry pick of #11574: fix(host-deployer): detect UEFI supported not correct
2021-07-06 19:51:58 +08:00
Zexi Li
15a160c876 fix(host-deployer): detect UEFI supported not correct 2021-07-06 19:32:30 +08:00
rainzm
b3f298afdb feat(hostdeployer): change the way fo GetLoginAccount in windows
首先,如果不是win10,并且 windowsDefaultAdminUser 置为 true,以及
Administrator 没有lock,那么使用 Administrator。
否则,优先使用第一个没有被锁定且不是 Administrator 的user,如果最后没有
符合条件的user,且Adminstrator 没有被lock,就是用 Administrator。
否则,报错。
2021-07-06 17:37:43 +08:00
yunion-ci-robot
703a89e53f Merge pull request #11566 from zexi/automated-cherry-pick-of-#11564-upstream-release-3.7
Automated cherry pick of #11564: feat(host): add openEuler rootFs driver
2021-07-06 15:29:00 +08:00
Zexi Li
d112a0a277 feat(host): add openEuler rootFs driver 2021-07-06 14:50:07 +08:00
Zexi Li
f77d490626 Merge pull request #11561 from zexi/automated-cherry-pick-of-#11560-upstream-release-3.7
Automated cherry pick of #11560: update OWNERS
2021-07-05 15:55:32 +08:00
Zexi Li
4a3230aee5 update OWNERS 2021-07-05 15:54:31 +08:00
Zexi Li
0d756ad0b4 Merge pull request #11555 from swordqiu/automated-cherry-pick-of-#11554-upstream-release-3.7
Automated cherry pick of #11554: fix: add cloudroot as system account, so as not using normal user id
2021-07-04 10:26:38 +08:00
Qiu Jian
490e7e4ef7 fix: add cloudroot as system account, so as not using normal user id 2021-07-03 22:25:01 +08:00
Zexi Li
0578ab7e34 Merge pull request #11544 from zexi/automated-cherry-pick-of-#11542-upstream-release-3.7
Automated cherry pick of #11542: fix(climc): update climc-base image to 20210701
2021-07-02 11:28:48 +08:00
Zexi Li
5673d1d114 fix(climc): update climc-base image to 20210701 2021-07-02 10:14:58 +08:00
Zexi Li
f49ff18247 Merge pull request #11540 from swordqiu/automated-cherry-pick-of-#11539-upstream-release-3.7
Automated cherry pick of #11539: fix: do not use ntfsresize to resize NTFS partition
2021-07-02 10:01:48 +08:00
Qiu Jian
b21c1f1a8b fix: do not use ntfsresize to resize NTFS partition
This makes resizing windows 2003 ntfs partition non-functional
2021-07-02 09:16:20 +08:00
Zexi Li
26fecfb1f7 Merge pull request #11531 from ioito/automated-cherry-pick-of-#11530-upstream-release-3.7
Automated cherry pick of #11530: fix(webconsole): aliyun vnc windows ctl+alt+del
2021-06-30 20:16:25 +08:00
Qu Xuan
8cae1408f7 fix(webconsole): aliyun vnc windows ctl+alt+del 2021-06-30 20:01:56 +08:00
Zexi Li
617dc611c0 Merge pull request #11523 from zhaoxiangchun/automated-cherry-pick-of-#11522-upstream-release-3.7
Automated cherry pick of #11522: fix(monitor): update alert panel scope by  alert dashboard
2021-06-30 10:37:46 +08:00
Zexi Li
33e17c9749 Merge pull request #11528 from zhaoxiangchun/automated-cherry-pick-of-#11527-upstream-release-3.7
Automated cherry pick of #11527: fix(monitor): fix monitor process alert
2021-06-30 10:25:59 +08:00
zhaoxiangchun
2488a5dab1 fix(monitor): fix monitor process alert
修复进程监控报警后,没有触发前端报警提示的问题
2021-06-30 09:49:40 +08:00
yunion-ci-robot
dbd6035616 Merge pull request #11525 from zexi/automated-cherry-pick-of-#11524-upstream-release-3.7
Automated cherry pick of #11524: fix(scheduler): baremetal network free address out of count
2021-06-29 23:24:16 +08:00
Zexi Li
1f9a66d00f fix(scheduler): baremetal network free address out of count 2021-06-29 20:25:03 +08:00
zhaoxiangchun
f4cb3d2beb fix(monitor): update alert panel scope by alert dashboard 2021-06-29 17:24:23 +08:00
Zexi Li
0bb8f4984b Merge pull request #11519 from swordqiu/automated-cherry-pick-of-#11518-upstream-release-3.7
Automated cherry pick of #11518: fix(host): allow server directory a symbol link to directory in other location
2021-06-29 10:00:16 +08:00
Qiu Jian
79f8013376 fix(host): allow server directory a symbol link to directory in other location 2021-06-29 00:03:49 +08:00
Zexi Li
353f21ffa2 Merge pull request #11516 from zhaoxiangchun/automated-cherry-pick-of-#11514-upstream-release-3.7
Automated cherry pick of #11514: fix(monitor): fix alert record not return resource details
2021-06-28 20:22:26 +08:00
zhaoxiangchun
6ee987c875 fix(monitor): fix alert record not return resource details 2021-06-28 19:44:50 +08:00
Zexi Li
f9b5a82acd Merge pull request #11504 from ioito/automated-cherry-pick-of-#11503-upstream-release-3.7
Automated cherry pick of #11503: fi(region): avoid opslog without resource id
2021-06-28 19:41:52 +08:00
Zexi Li
67603523dc Merge pull request #11508 from ioito/automated-cherry-pick-of-#11507-upstream-release-3.7
Automated cherry pick of #11507: fix(region): avoid panic when sync snapshot project
2021-06-28 19:36:44 +08:00
Zexi Li
e39ed2efc4 Merge pull request #11510 from rainzm/automated-cherry-pick-of-#11509-upstream-release-3.7
Automated cherry pick of #11509: fix: get datacenter of host via GetDatacenter
2021-06-28 19:35:40 +08:00
rainzm
d00578d6eb fix: get datacenter of host via GetDatacenter 2021-06-28 18:17:12 +08:00
Qu Xuan
8f7653c14c fix(region): avoid panic when sync snapshot project 2021-06-28 18:14:53 +08:00
Qu Xuan
b448719335 fi(region): avoid opslog without resource id 2021-06-28 17:20:25 +08:00
Zexi Li
7b9f2dff61 Merge pull request #11499 from zexi/automated-cherry-pick-of-#11498-upstream-release-3.7
Automated cherry pick of #11498: fix(region): baremetal server change ip address reuse
2021-06-28 15:07:12 +08:00
Zexi Li
55011704c0 fix(region): baremetal server change ip address reuse 2021-06-28 14:44:58 +08:00
Zexi Li
9575725dfa Merge pull request #11493 from zhaoxiangchun/automated-cherry-pick-of-#11492-upstream-release-3.7
Automated cherry pick of #11492: feat(climc): update meter dimension climc
2021-06-28 11:36:47 +08:00
zhaoxiangchun
4dc9ef631f feat(climc): update meter dimension climc 2021-06-26 22:22:25 +08:00
Zexi Li
532a45d109 Merge pull request #11487 from rainzm/automated-cherry-pick-of-#10970-upstream-release-3.7
Automated cherry pick of #10970: feat(scheduler): optimize the speed of network predicate
2021-06-25 18:27:27 +08:00
rainzm
c317f05b78 feat: add interface INetworkNicCountGetter 2021-06-25 15:58:30 +08:00
rainzm
5741782cca feat(scheduler): optimize the speed of network predicate 2021-06-25 15:58:30 +08:00
Zexi Li
da452e23c8 Merge pull request #11479 from rainzm/automated-cherry-pick-of-#11478-upstream-release-3.7
Automated cherry pick of #11478: fix(notify): distinct field of receivers
2021-06-24 20:11:07 +08:00
rainzm
8304b37773 fix(notify): distinct field of receivers 2021-06-24 10:40:42 +08:00
Zexi Li
b0fcef5c6a Merge pull request #11472 from zhaoxiangchun/automated-cherry-pick-of-#11471-upstream-release-3.7
Automated cherry pick of #11471: feat(monitor): add jenkins metric desc
2021-06-24 10:02:44 +08:00
Zexi Li
bc55b8b276 Merge pull request #11474 from rainzm/automated-cherry-pick-of-#11473-upstream-release-3.7
Automated cherry pick of #11473: Sync VMware resource faster
2021-06-24 10:01:34 +08:00
rainzm
882d885aa4 feat(esxi): disable sync cloudimage from image cache 2021-06-23 17:05:50 +08:00
rainzm
d791cba145 feat(esxi): reduce the number of requests and the amount of data transferred 2021-06-23 17:05:50 +08:00
rainzm
7cf931cc16 feat(region): add ProhibitRefreshingCloudImage for options 2021-06-23 17:05:50 +08:00
zhaoxiangchun
0f55252c5b feat(monitor): add jenkins metric desc 2021-06-23 15:29:22 +08:00
Zexi Li
6298415e7b Merge pull request #11459 from ioito/automated-cherry-pick-of-#11453-upstream-release-3.7
Automated cherry pick of #11453: fix(region): ignore qcloud vm start error
2021-06-23 11:54:50 +08:00
yunion-ci-robot
38384ca1ec Merge pull request #11467 from zexi/automated-cherry-pick-of-#11457-upstream-release-3.7
Automated cherry pick of #11457: feat(host): support netplan configuration
2021-06-23 11:39:11 +08:00
Zexi Li
4c5cd45efd Merge pull request #11464 from ioito/automated-cherry-pick-of-#11463-upstream-release-3.7
Automated cherry pick of #11463: fix(hostman): show server status changed reason
2021-06-23 10:53:30 +08:00
Zexi Li
edb7c6050b Merge pull request #11462 from zhaoxiangchun/automated-cherry-pick-of-#11461-upstream-release-3.7
Automated cherry pick of #11461: fix(monitor): fix monitor overview
2021-06-23 10:51:41 +08:00
Zexi Li
e1e6a72b4f feat(host): support netplan configuration 2021-06-23 10:38:07 +08:00
Qu Xuan
3c844caa4b fix(hostman): show server status changed reason 2021-06-22 17:55:04 +08:00
zhaoxiangchun
8c51294fe7 fix(monitor): fix monitor overview
1.监控总览中资源报警统计支持项目钻取
2. 资源报警状态修复
2021-06-22 17:11:52 +08:00
Qu Xuan
8679dbee27 fix(region): ignore qcloud vm start error 2021-06-22 10:18:08 +08:00
Zexi Li
c4cd0cabdc Merge pull request #11456 from zhaoxiangchun/automated-cherry-pick-of-#11454-upstream-release-3.7
Automated cherry pick of #11454: fix(monitor): exit monitor engine in time when happen err
2021-06-21 23:49:48 +08:00
zhaoxiangchun
894d12f903 fix(monitor): exit monitor engine in time when happen err 2021-06-21 16:12:24 +08:00
Zexi Li
f127585611 Merge pull request #11449 from zexi/automated-cherry-pick-of-#11448-upstream-release-3.7
Automated cherry pick of #11448: fix(baremetal): remove bundle libs build
2021-06-21 10:42:58 +08:00
Zexi Li
3258a1c262 fix(baremetal): remove bundle libs build 2021-06-21 10:32:49 +08:00
Zexi Li
86e07c0afc Merge pull request #11440 from rainzm/automated-cherry-pick-of-#11439-upstream-release-3.7
Automated cherry pick of #11439: feat(notify): filter all recipients in this domain and recipients who have joined projects in this domain
2021-06-21 00:34:24 +08:00
Zexi Li
3a93e1754e Merge pull request #11444 from zhaoxiangchun/automated-cherry-pick-of-#11428-upstream-release-3.7-1624013747
Automated cherry pick of #11428: feat(monitor) 3.7 add monitor resource overview
2021-06-21 00:33:57 +08:00
yunion-ci-robot
44ea206e28 Merge pull request #11435 from zexi/automated-cherry-pick-of-#11433-upstream-release-3.7
Automated cherry pick of #11433: fix(region,scheduler): baremetal reuse ip
2021-06-19 22:39:57 +08:00
zhaoxiangchun
ae085eace6 utomated cherry pick of #11428: feat(monitor) 3.7 add monitor resource overview 2021-06-18 18:57:29 +08:00
zhaoxiangchun
629a3c55fd feat(monitor) 3.7 add monitor resource overview
1. 监控中增加资源统计
2. 资源在报警总览中的状态:
   init--未设置告警;alerting--发生告警;/attach--已关联策略并且报警消息正常
3.只涉及宿主机和虚拟机

https://bug.yunion.io/zentao/task-view-3130.html
2021-06-18 18:55:51 +08:00
Zexi Li
8459cb7ba2 Merge pull request #11442 from ioito/automated-cherry-pick-of-#11441-upstream-release-3.7
Automated cherry pick of #11441: fix(region): skip disabled project mapping
2021-06-18 18:32:29 +08:00
Qu Xuan
92b0d323f1 fix(region): skip disabled project mapping 2021-06-18 18:05:25 +08:00
Zexi Li
322f795d88 Merge pull request #11420 from ioito/automated-cherry-pick-of-#11419-upstream-release-3.7
Automated cherry pick of #11419: fix(region): add project filter for cloudprovider
2021-06-18 16:21:42 +08:00
Zexi Li
ebcf3f5f9f Merge pull request #11437 from ioito/automated-cherry-pick-of-#11436-upstream-release-3.7
Automated cherry pick of #11436: fix(region): manager distinct field
2021-06-18 16:21:14 +08:00
Zexi Li
4087fa4593 fix(region,scheduler): baremetal reuse ip 2021-06-18 15:46:27 +08:00
rainzm
c1d792dc8a feat(notify): filter all recipients in this domain and recipients who have joined projects in this domain 2021-06-18 15:22:42 +08:00
Qu Xuan
9e5408856f fix(region): manager distinct field 2021-06-18 14:20:21 +08:00
Zexi Li
6d87de376f Merge pull request #11431 from zexi/automated-cherry-pick-of-#11430-upstream-release-3.7
Automated cherry pick of #11430: fix(region): clean schedule cache when host add or delete netif
2021-06-18 11:16:14 +08:00
Zexi Li
5054e618cb fix(region): clean schedule cache when host add or delete netif 2021-06-18 11:04:03 +08:00
yunion-ci-robot
39fab4b3ae Merge pull request #11426 from bistuzx/automated-cherry-pick-of-#11425-upstream-release-3.7
Automated cherry pick of #11425: add meter billing exchange rate module
2021-06-17 23:54:54 +08:00
bistuzx@163.com
fe622c89d3 add module billing exchange rate 2021-06-17 19:47:24 +08:00
Qu Xuan
b7c3e53731 fix(region): add project filter for cloudprovider 2021-06-17 17:19:21 +08:00
Zexi Li
c793d5cda7 Merge pull request #11403 from ioito/automated-cherry-pick-of-#11402-upstream-release-3.7
Automated cherry pick of #11402: fix(region): show project mapping managers info
2021-06-17 14:57:07 +08:00
Zexi Li
310dac6b3e Merge pull request #11414 from swordqiu/automated-cherry-pick-of-#11413-upstream-release-3.7
Automated cherry pick of #11413: fix: support windows 2003
2021-06-17 10:18:35 +08:00
Zexi Li
8eaa4a0653 Merge pull request #11416 from swordqiu/automated-cherry-pick-of-#11415-upstream-release-3.7
Automated cherry pick of #11415: fix: do not resize LVM paritition and skip and return success
2021-06-17 09:48:13 +08:00
Qiu Jian
a481666baa fix: support windows 2003 2021-06-17 09:45:27 +08:00
Qiu Jian
2d1884da54 fix: do not resize LVM paritition and skip and return success 2021-06-17 01:55:12 +08:00
yunion-ci-robot
119fa29e77 Merge pull request #11341 from zexi/automated-cherry-pick-of-#11205-upstream-release-3.7
Automated cherry pick of #11205: feat(baremetal): support management of none BMC host
2021-06-16 23:42:53 +08:00
Zexi Li
c799d89764 Merge pull request #11411 from ioito/automated-cherry-pick-of-#11404-upstream-release-3.7
Automated cherry pick of #11404: fix(region): ignore qcloud bw pkg error
2021-06-16 20:09:59 +08:00
Zexi Li
cd76efd19e Merge pull request #11407 from yousong/automated-cherry-pick-of-#11406-upstream-release-3.7
Automated cherry pick of #11406: webconsole: wait zombies
2021-06-16 20:09:02 +08:00
Qu Xuan
f36688d4b5 fix(region): ignore qcloud bw pkg error 2021-06-16 19:42:41 +08:00
Yousong Zhou
bcc8f0b581 webconsole: wait zombies 2021-06-16 19:33:51 +08:00
Qu Xuan
ad5d667587 fix(region): show project mapping managers info 2021-06-16 17:31:41 +08:00
Zexi Li
e76592de73 fix(baremetal): record uefi info 2021-06-16 12:49:56 +08:00
Zexi Li
382962fd0e fix(baremetal): nvme allocable 2021-06-16 12:49:56 +08:00
Zexi Li
0f74c9ba0a feat(baremetal): add UEFI related util 2021-06-16 12:49:56 +08:00
Zexi Li
30d4b3b7cd fix(baremetal): close ssh test client 2021-06-16 12:49:56 +08:00
Zexi Li
160a6e4dbb feat(baremetal): support management of none BMC host 2021-06-16 12:49:56 +08:00
Zexi Li
bf26f445a6 Merge pull request #11398 from ioito/automated-cherry-pick-of-#11397-upstream-release-3.7
Automated cherry pick of #11397: fix(region): add status resource statistic
2021-06-15 16:32:06 +08:00
Zexi Li
59fafadda6 Merge pull request #11393 from ioito/automated-cherry-pick-of-#11376-upstream-release-3.7
Automated cherry pick of #11376: fix(region): qcloud bandwidth pkg
2021-06-15 16:31:06 +08:00
Qu Xuan
638d01485e fix(region): add status resource statistic 2021-06-15 14:16:23 +08:00
Qu Xuan
1de62d60ed fix(region): qcloud bandwidth pkg 2021-06-11 19:17:53 +08:00
Zexi Li
91e833db42 Merge pull request #11381 from rainzm/automated-cherry-pick-of-#11380-upstream-release-3.7
Automated cherry pick of #11380: fix(notify): clean verifiedNote when marking verified
2021-06-11 17:49:53 +08:00
Zexi Li
7d3b5d2fcb Merge pull request #11377 from ioito/automated-cherry-pick-of-#11375-upstream-release-3.7
Automated cherry pick of #11375: fix(host): update rbd storage capacity
2021-06-11 17:46:34 +08:00
Zexi Li
02a17c1753 Merge pull request #11368 from ioito/automated-cherry-pick-of-#11367-upstream-release-3.7
Automated cherry pick of #11367: fix(region): support cloudprovider bind project mapping
2021-06-11 17:45:54 +08:00
rainzm
66ad8ace31 fix(notify): clean verifiedNote when marking verified 2021-06-11 10:08:20 +08:00
Qu Xuan
8f4ae62aa4 fix(host): update rbd storage capacity 2021-06-11 09:50:09 +08:00
Qu Xuan
9c41deb42c fix(region): support cloudprovider bind project mapping 2021-06-10 15:55:17 +08:00
Zexi Li
e9f7d87688 Merge pull request #11348 from zhaoxiangchun/automated-cherry-pick-of-#11347-upstream-release-3.7
Automated cherry pick of #11347: feat(mcclient): add bills dimension climc
2021-06-10 05:34:01 +08:00
Zexi Li
0b5461b707 Merge pull request #11370 from ioito/automated-cherry-pick-of-#11369-upstream-release-3.7
Automated cherry pick of #11369: fix(host): get ceph used capacity
2021-06-10 05:32:41 +08:00
Qu Xuan
2d791dd542 fix(host): get ceph used capacity 2021-06-09 19:25:36 +08:00
zhaoxiangchun
910372ea0c feat(mcclient): add bills dimension climc 2021-06-09 11:16:41 +08:00
Zexi Li
302a411629 Merge pull request #11307 from ioito/automated-cherry-pick-of-#11306-upstream-release-3.7
Automated cherry pick of #11306: fix(region): skip server migrate quota check
2021-06-08 23:29:29 +08:00
Zexi Li
f25b015143 Merge pull request #11339 from rainzm/automated-cherry-pick-of-#11338-upstream-release-3.7
Automated cherry pick of #11338: Add some tags to the monitoring data generated by the agent
2021-06-08 23:27:53 +08:00
Zexi Li
bf08a413d3 Merge pull request #11342 from ioito/automated-cherry-pick-of-#11340-upstream-release-3.7
Automated cherry pick of #11340: fix(cloudid): huawei group role attach and detach
2021-06-08 23:14:18 +08:00
Zexi Li
200911ef38 Merge pull request #11350 from ioito/automated-cherry-pick-of-#11349-upstream-release-3.7
Automated cherry pick of #11349: fix(cloudid): avoid duplicate create saml provider
2021-06-08 23:13:54 +08:00
Zexi Li
cb3aadd014 Merge pull request #11355 from ioito/automated-cherry-pick-of-#11354-upstream-release-3.7
Automated cherry pick of #11354: feat(apigateway): support export dict keys
2021-06-08 23:11:54 +08:00
Zexi Li
c84d543df2 Merge pull request #11358 from ioito/automated-cherry-pick-of-#11357-upstream-release-3.7
Automated cherry pick of #11357: fix(region): avoid storage update not work
2021-06-08 23:10:05 +08:00
Zexi Li
494a9041b3 Merge pull request #11362 from ioito/automated-cherry-pick-of-#11361-upstream-release-3.7
Automated cherry pick of #11361: fix(region): validate disk status when create snapshot
2021-06-08 23:08:16 +08:00
Qu Xuan
9f50a53945 fix(region): validate disk status when create snapshot 2021-06-08 20:09:11 +08:00
Qu Xuan
d11fcc7945 fix(region): avoid storage update not work 2021-06-08 17:33:53 +08:00
Qu Xuan
ebe101d9ab feat(apigateway): support export dict keys 2021-06-08 16:24:05 +08:00
Qu Xuan
87c1c0e290 fix(cloudid): avoid duplicate create saml provider 2021-06-08 14:19:17 +08:00
yunion-ci-robot
6ccfcbf0da Merge pull request #11312 from ioito/automated-cherry-pick-of-#11311-upstream-release-3.7
Automated cherry pick of #11311: fix(region): huawei disk tags
2021-06-08 10:50:26 +08:00
Qu Xuan
cf7f5f6805 fix(cloudid): huawei group role attach and detach 2021-06-07 18:18:08 +08:00
Zexi Li
22a5b36817 Merge pull request #11333 from ioito/automated-cherry-pick-of-#11332-upstream-release-3.7
Automated cherry pick of #11332: fix(region): validate attached disk size and backend
2021-06-07 17:43:48 +08:00
Zexi Li
8da358513a Merge pull request #11336 from zhaoxiangchun/automated-cherry-pick-of-#11335-upstream-release-3.7
Automated cherry pick of #11335: fix(telegraf-raid-plugin): add image-telegraf-raid-plugin in Makefile
2021-06-07 17:42:38 +08:00
rainzm
02252842e7 feat(build): change file repo version in Dockerfile.ansibleserver 2021-06-07 17:18:57 +08:00
rainzm
21c33d4844 feat(devtool): add some tags 2021-06-07 17:18:57 +08:00
rainzm
e7dc0213f6 fix(anisbleserver): support complex yaml config in ansibleplaybook_instance 2021-06-07 17:18:57 +08:00
zhaoxiangchun
754c2e62ee fix(telegraf-raid-plugin): add image-telegraf-raid-plugin in Makefile 2021-06-07 16:20:08 +08:00
Qu Xuan
c6e99bf802 fix(region): validate attached disk size and backend 2021-06-07 15:44:18 +08:00
Qu Xuan
f13c01d20f fix(region): skip server migrate quota check 2021-06-07 10:13:48 +08:00
Zexi Li
92d4e3cf7a Merge pull request #11327 from ioito/automated-cherry-pick-of-#11326-upstream-release-3.7
Automated cherry pick of #11326: fix(region): sync tags with new guest
2021-06-06 00:54:42 +08:00
Zexi Li
3efd579564 Merge pull request #11323 from zhaoxiangchun/automated-cherry-pick-of-#11320-upstream-release-3.7
Automated cherry pick of #11320: fix: 修复云账号和宿主机报警问题
2021-06-05 12:16:40 +08:00
Qu Xuan
4484a2082b fix(region): sync tags with new guest 2021-06-04 23:10:20 +08:00
Zexi Li
d2cfe35296 Merge pull request #11298 from tb365/automated-cherry-pick-of-#11297-upstream-release-3.7
Automated cherry pick of #11297: fix(region): lb local cert sync fix
2021-06-04 21:09:54 +08:00
Zexi Li
f548d76116 Merge pull request #11300 from swordqiu/automated-cherry-pick-of-#11299-upstream-release-3.7
Automated cherry pick of #11299: fix: hpssacli should skip empty slots
2021-06-04 21:04:26 +08:00
Zexi Li
fbcbe46a8e Merge pull request #11319 from ioito/automated-cherry-pick-of-#11318-upstream-release-3.7
Automated cherry pick of #11318: fix(region): avoid guest delete not with disks
2021-06-04 19:46:31 +08:00
zhaoxiangchun
1389d2176e fix: 修复云账号和宿主机报警问题
1.云账号报警时过滤掉已经禁用的云账号
2.修复宿主机报警时资源名称重复的问题
2021-06-04 19:24:36 +08:00
Qu Xuan
64a86f7ccd fix(region): avoid guest delete not with disks 2021-06-04 19:17:21 +08:00
Qu Xuan
5b5310c6ee fix(region): huawei disk tags 2021-06-04 14:37:13 +08:00
Qiu Jian
162dd766ff fix: hpssacli should skip empty slots
hpssacli may fail when detect disks on empty slots, which cause raid
detection failure
2021-06-03 19:35:53 +08:00
tb365
1c7c3e05bd fix(region): lb local cert sync fix 2021-06-03 18:51:37 +08:00
Zexi Li
5e59c6be73 Merge pull request #11290 from ioito/automated-cherry-pick-of-#11289-upstream-release-3.7
Automated cherry pick of #11289: fix(host): avoid panic when params is nil
2021-06-03 11:42:38 +08:00
Qu Xuan
41806c9388 fix(host): avoid panic when params is nil 2021-06-03 11:31:09 +08:00
Zexi Li
c498c6f22b Merge pull request #11285 from zexi/automated-cherry-pick-of-#11284-upstream-release-3.7
Automated cherry pick of #11284: fix(glance): add option of s3 image status check
2021-06-02 11:18:13 +08:00
Zexi Li
ec926f9b62 fix(glance): add option of s3 image status check 2021-06-02 10:46:34 +08:00
Zexi Li
43faf5a5bf Merge pull request #11281 from ioito/automated-cherry-pick-of-#11279-upstream-release-3.7
Automated cherry pick of #11279: fix(region): avoid deadlock when resize disk
2021-06-01 19:19:18 +08:00
Zexi Li
7243b4fd37 Merge pull request #11275 from ioito/automated-cherry-pick-of-#11274-upstream-release-3.7
Automated cherry pick of #11274: fix(region): disable public cloud ip pre allocate
2021-06-01 18:55:14 +08:00
Qu Xuan
767aa5c37a fix(region): avoid deadlock when resize disk 2021-06-01 14:29:53 +08:00
Zexi Li
01000d5334 Merge pull request #11276 from swordqiu/automated-cherry-pick-of-#11268-upstream-release-3.7
Automated cherry pick of #11268: fix: windows resize file system
2021-06-01 11:55:00 +08:00
Qiu Jian
4948869add fix: windows resize file system 2021-05-31 23:59:47 +08:00
Qu Xuan
fd94dc34da fix(region): disable public cloud ip pre allocate 2021-05-31 15:06:57 +08:00
Zexi Li
28b9460fb9 Merge pull request #11267 from ioito/automated-cherry-pick-of-#11266-upstream-release-3.7
Automated cherry pick of #11266: fix(region): fix aws json unmarshal error
2021-05-31 09:56:08 +08:00
Qu Xuan
35f7844c53 fix(region): fix aws json unmarshal error 2021-05-29 12:37:58 +08:00
Zexi Li
2e8c9ee159 Merge pull request #11265 from ioito/automated-cherry-pick-of-#11264-upstream-release-3.7
Automated cherry pick of #11264: fix(region): split provider tag sync
2021-05-28 20:36:26 +08:00
Qu Xuan
93a7f1b815 fix(region): split provider tag sync 2021-05-28 20:18:42 +08:00
Zexi Li
ac416cdfbc Merge pull request #11259 from zhaoxiangchun/automated-cherry-pick-of-#11258-upstream-release-3.7
Automated cherry pick of #11258: fix(host): raid status
2021-05-28 20:12:44 +08:00
zhaoxiangchun
daf14eb739 fix(host): raid status 2021-05-28 19:58:46 +08:00
Zexi Li
883cb64089 Merge pull request #11254 from tb365/automated-cherry-pick-of-#11253-upstream-release-3.7
Automated cherry pick of #11253: fix(region): lbcert cache clean duplicate data fix
2021-05-28 19:18:17 +08:00
Zexi Li
7b8303e9ab Merge pull request #11262 from ioito/automated-cherry-pick-of-#11249-upstream-release-3.7
Automated cherry pick of #11249: fix(region): optimized disk eip snapshot project sync
2021-05-28 19:17:09 +08:00
Qu Xuan
c7a9f726b8 fix(region): optimized disk eip snapshot project sync 2021-05-28 19:07:23 +08:00
tb365
55525a990c fix(region): lbcert cache clean duplicate data fix 2021-05-28 15:47:34 +08:00
Zexi Li
54d3962fb3 Merge pull request #11246 from swordqiu/automated-cherry-pick-of-#11245-upstream-release-3.7
Automated cherry pick of #11245: fix: get apigateway auth/regions with error of illegal mix of collations
2021-05-28 15:43:32 +08:00
Zexi Li
c4685cf58f Merge pull request #11252 from ioito/automated-cherry-pick-of-#11251-upstream-release-3.7
Automated cherry pick of #11251: fix(region): project sync condition
2021-05-28 15:29:05 +08:00
Qu Xuan
e51e0a7ab4 fix(region): project sync condition 2021-05-28 15:15:45 +08:00
Qiu Jian
1dbe7b930a fix: get apigateway auth/regions with error of illegal mix of collations 2021-05-28 09:39:53 +08:00
Zexi Li
071576111c Merge pull request #11218 from ioito/automated-cherry-pick-of-#11217-upstream-release-3.7
Automated cherry pick of #11217: fix(region): optimized aliyun qcloud tags sync
2021-05-27 20:33:12 +08:00
Zexi Li
37516c7b5d Merge pull request #11229 from ioito/automated-cherry-pick-of-#11228-upstream-release-3.7
Automated cherry pick of #11228: fix(region): translation errors
2021-05-27 19:50:02 +08:00
Zexi Li
3a299f0661 Merge pull request #11227 from tb365/automated-cherry-pick-of-#11226-upstream-release-3.7
Automated cherry pick of #11226: fix(region): lb cert name fix
2021-05-27 19:45:28 +08:00
Zexi Li
b4d784d283 Merge pull request #11241 from zexi/automated-cherry-pick-of-#11240-upstream-release-3.7
Automated cherry pick of #11240: fix(region): migrate use rescue mode
2021-05-27 19:43:32 +08:00
Zexi Li
95ef2bc51c Merge pull request #11243 from zexi/automated-cherry-pick-of-#11242-upstream-release-3.7
Automated cherry pick of #11242: Revert "fix(host): raid status fix"
2021-05-27 19:42:48 +08:00
Zexi Li
02a08bc6da Revert "fix(host): raid status fix"
This reverts commit 392f5ab237.
2021-05-27 19:41:42 +08:00
Zexi Li
10e574d389 Merge pull request #11235 from zhaoxiangchun/automated-cherry-pick-of-#11233-upstream-release-3.7
Automated cherry pick of #11233: fix(host): raid status fix
2021-05-27 19:36:23 +08:00
Zexi Li
644a9c1035 fix(region): migrate use rescue mode 2021-05-27 19:35:44 +08:00
zhaoxiangchun
12209ee0c7 fix(host): raid status fix
1. All status are online except offline.
2021-05-27 16:04:18 +08:00
Qu Xuan
e76c1d6c02 fix(region): optimized azure aliyun qcloud tags sync 2021-05-27 10:53:46 +08:00
Qu Xuan
018ef0d986 fix(region): translation errors 2021-05-27 10:48:15 +08:00
tb365
b71406e6ec fix(region): lb cert name fix 2021-05-26 19:58:54 +08:00
Zexi Li
a67bdedb45 Merge pull request #11220 from ioito/automated-cherry-pick-of-#11219-upstream-release-3.7
Automated cherry pick of #11219: fix(host): avoid delete removed disk failed
2021-05-26 14:21:55 +08:00
Qu Xuan
913757f138 fix(host): avoid delete removed disk failed 2021-05-25 21:01:46 +08:00
Zexi Li
8f41c4165a Merge pull request #11202 from ioito/automated-cherry-pick-of-#11201-upstream-release-3.7
Automated cherry pick of #11201: fix(region): show azure deploy failed error
2021-05-25 19:08:50 +08:00
Zexi Li
ec709234d7 Merge pull request #11213 from ioito/automated-cherry-pick-of-#11212-upstream-release-3.7
Automated cherry pick of #11212: fix(region): aws vpc network eip disk tags sync
2021-05-25 19:07:52 +08:00
Zexi Li
b264e3c074 Merge pull request #11211 from zexi/automated-cherry-pick-of-#11166-upstream-release-3.7
Automated cherry pick of #11166: feat(region): add server migration predication API
2021-05-25 18:25:13 +08:00
Qu Xuan
c73de5f64f fix(region): aws vpc network eip disk tags sync 2021-05-25 17:45:44 +08:00
Zexi Li
7c7687ae4d feat(region): add server migration predication API 2021-05-25 17:02:44 +08:00
Qu Xuan
88046eea10 fix(region): show azure deploy failed error 2021-05-25 10:34:50 +08:00
Zexi Li
d445b55d68 Merge pull request #11199 from ioito/automated-cherry-pick-of-#11198-upstream-release-3.7
Automated cherry pick of #11198: fix(region): restrict account project mapping
2021-05-24 18:16:42 +08:00
Zexi Li
122a07b96b Merge pull request #11192 from ioito/automated-cherry-pick-of-#11191-upstream-release-3.7
Automated cherry pick of #11191: fix(region): azure uniform tags
2021-05-24 17:23:31 +08:00
Qu Xuan
984790c18f fix(region): restrict account project mapping 2021-05-24 16:46:58 +08:00
Qu Xuan
1d4b2a04bd fix(region): azure uniform tags 2021-05-24 15:02:03 +08:00
Zexi Li
cb830ad8e3 Merge pull request #11179 from ioito/automated-cherry-pick-of-#11178-upstream-release-3.7
Automated cherry pick of #11178: fix(region): add project and domain info for project mapping rules
2021-05-24 10:16:22 +08:00
Zexi Li
9a69b8c0d2 Merge pull request #11181 from tb365/automated-cherry-pick-of-#11177-upstream-release-3.7
Automated cherry pick of #11177: feat(region): loadbalancer certificate add purge methods
2021-05-24 10:15:07 +08:00
TangBin
cf5dcc611f fix(region): gofmt fix 2021-05-21 11:02:23 +08:00
Qu Xuan
1456b93ec2 fix(region): check sku request error 2021-05-21 11:02:23 +08:00
Qu Xuan
b5fcfb5d16 fix(region): add project and domain info for project mapping rules 2021-05-20 20:41:25 +08:00
Zexi Li
dfee854fb4 Merge pull request #11169 from ioito/automated-cherry-pick-of-#11168-upstream-release-3.7
Automated cherry pick of #11168: fix(region): add host_id options for storage filter
2021-05-20 18:54:26 +08:00
Zexi Li
bba05e4702 Merge pull request #11171 from ioito/automated-cherry-pick-of-#11170-upstream-release-3.7
Automated cherry pick of #11170: fix(region): avoid aws session not assume role
2021-05-20 18:53:01 +08:00
Zexi Li
c93624a093 Merge pull request #11173 from zhaoxiangchun/automated-cherry-pick-of-#11172-upstream-release-3.7
Automated cherry pick of #11172: fix(monitor): fix storage tag
2021-05-20 18:51:42 +08:00
zhaoxiangchun
d1da58b42f fix(monitor): fix storage tag 2021-05-20 17:26:00 +08:00
Qu Xuan
78a9a1ea80 fix(region): avoid aws session not assume role 2021-05-20 16:42:04 +08:00
Qu Xuan
2fb095bc5b fix(region): add host_id options for storage filter 2021-05-20 14:39:42 +08:00
1380 changed files with 57787 additions and 10916 deletions

View File

@@ -18,4 +18,6 @@ assignees: ''
**Environment**:
- OS (e.g: `cat /etc/os-release`):
- Kernel (e.g. `uname -a`):
- Others:
<!--
- Version (e.g. `climc version-list`):
-->

View File

@@ -329,6 +329,9 @@ image:
.PHONY: image
image-telegraf-raid-plugin:
VERSION=release-1.6.1 ARCH=all make image telegraf-raid-plugin
%:
@:

View File

@@ -7,8 +7,8 @@ endif
ModBaseName:=$(notdir $(ModName))
DockerImageRegistry?=registry.cn-beijing.aliyuncs.com
DockerImageAlpineBuild?=$(DockerImageRegistry)/yunionio/alpine-build:1.0-5
DockerImageCentOSBuild?=$(DockerImageRegistry)/yunionio/centos-build:1.1-4
DockerImageAlpineBuild?=$(DockerImageRegistry)/yunionio/alpine-build:1.1-5
DockerImageCentOSBuild?=$(DockerImageRegistry)/yunionio/centos-build:1.1-5
EnvIf=$(if $($(1)),$(1)=$($(1)))

6
OWNERS
View File

@@ -4,12 +4,6 @@ reviewers:
- ioito
- swordqiu
- tb365
- wanyaoqi
- yousong
- zhaoxiangchun
- zhasm
approvers:
- swordqiu
- yousong
- wanyaoqi
- Zexi

View File

@@ -1,7 +1,7 @@
FROM registry.cn-beijing.aliyuncs.com/yunionio/ansibleserver-base:v1.0.3
FROM registry.cn-beijing.aliyuncs.com/yunionio/ansibleserver-base:v1.0.5
# install playbook and telegraf install pkg
COPY --from=registry.cn-beijing.aliyuncs.com/yunionio/file-repo:v0.1.2 /opt/yunion/playbook /opt/yunion/playbook
COPY --from=registry.cn-beijing.aliyuncs.com/yunionio/file-repo:v0.1.2 /opt/yunion/ansible-install-pkg /opt/yunion/ansible-install-pkg
COPY --from=registry.cn-beijing.aliyuncs.com/yunionio/file-repo:v0.3.3 /opt/yunion/playbook /opt/yunion/playbook
COPY --from=registry.cn-beijing.aliyuncs.com/yunionio/file-repo:v0.3.3 /opt/yunion/ansible-install-pkg /opt/yunion/ansible-install-pkg
ADD ./_output/alpine-build/bin/ansibleserver /opt/yunion/bin/ansibleserver

View File

@@ -1,4 +1,4 @@
FROM registry.cn-beijing.aliyuncs.com/yunionio/onecloud-base:v0.2
FROM registry.cn-beijing.aliyuncs.com/yunionio/onecloud-base:v0.3.5
MAINTAINER "Yousong Zhou <zhouyousong@yunionyun.com>"

View File

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

View File

@@ -1,9 +1,11 @@
FROM registry.cn-beijing.aliyuncs.com/yunionio/baremetal-base:v0.2
FROM registry.cn-beijing.aliyuncs.com/yunionio/baremetal-base:v0.3.3
MAINTAINER "Zexi Li <lizexi@yunionyun.com>"
RUN mkdir -p /opt/yunion/bin
ADD ./_output/bin/baremetal-agent /opt/yunion/bin/baremetal-agent
ADD ./_output/bin/.baremetal-agent.bin /opt/yunion/bin/.baremetal-agent.bin
ADD ./_output/bin/bundles/baremetal-agent /opt/yunion/bin/bundles/baremetal-agent
#ADD ./_output/bin/baremetal-agent /opt/yunion/bin/baremetal-agent
#ADD ./_output/bin/.baremetal-agent.bin /opt/yunion/bin/.baremetal-agent.bin
#ADD ./_output/bin/bundles/baremetal-agent /opt/yunion/bin/bundles/baremetal-agent
RUN apk add librados librbd
ADD ./_output/alpine-build/bin/baremetal-agent /opt/yunion/bin/baremetal-agent

View File

@@ -1,7 +1,8 @@
FROM registry.cn-beijing.aliyuncs.com/yunionio/centos-build:1.1-4 as build
RUN yum install -y https://iso.yunion.cn/3.6/rpms/packages/host/baremetal-pxerom-1.1.0-20072810.x86_64.rpm
FROM --platform=linux/amd64 registry.cn-beijing.aliyuncs.com/yunionio/centos-build:1.1-4 as build
RUN yum install -y https://iso.yunion.cn/vm-images/baremetal-pxerom-1.1.0-21092209.x86_64.rpm
#RUN yum install -y http://192.168.23.50:8083/baremetal-pxerom-1.1.0-21092209.x86_64.rpm
FROM frolvlad/alpine-glibc:glibc-2.28
FROM registry.cn-beijing.aliyuncs.com/yunionio/onecloud-base:v0.3.5
MAINTAINER "Yaoqi Wan <wanyaoqi@yunionyun.com>"

View File

@@ -1,4 +1,4 @@
FROM registry.cn-beijing.aliyuncs.com/yunionio/climc-base:20210508
FROM registry.cn-beijing.aliyuncs.com/yunionio/climc-base:20210901
ADD ./build/climc/root/opt /opt

View File

@@ -1,4 +1,4 @@
FROM registry.cn-beijing.aliyuncs.com/yunionio/onecloud-base:v0.2
FROM registry.cn-beijing.aliyuncs.com/yunionio/onecloud-base:v0.3.5
MAINTAINER "Zexi Li <lizexi@yunionyun.com>"
@@ -8,7 +8,7 @@ RUN mkdir -p /opt/yunion/bin
RUN echo http://dl-cdn.alpinelinux.org/alpine/edge/testing >>/etc/apk/repositories
RUN apk add --no-cache bash bash-completion tzdata ca-certificates vim ipmitool kubectl && \
RUN apk add --no-cache bash bash-completion tzdata ca-certificates vim ipmitool kubectl ceph-common && \
rm -rf /var/cache/apk/*
RUN cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime

View File

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

View File

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

View File

@@ -0,0 +1,8 @@
FROM registry.cn-beijing.aliyuncs.com/yunionio/onecloud-base:v0.3.5
MAINTAINER "Zexi Li <lizexi@yunionyun.com>"
RUN mkdir -p /etc/yunion/data/
ADD ./_output/alpine-build/bin/cloudmon \
/opt/yunion/bin/

View File

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

View File

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

View File

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

View File

@@ -1,4 +1,4 @@
FROM registry.cn-beijing.aliyuncs.com/yunionio/onecloud-base:v0.2
FROM registry.cn-beijing.aliyuncs.com/yunionio/onecloud-base:v0.3.5
COPY ./build/esxi-agent/root/opt/ /opt/

View File

@@ -11,11 +11,10 @@ RUN set -x \
# install default playbook and install pkg
Run mkdir -p /opt/yunion/ansible-install-pkg
Run wget https://dl.influxdata.com/telegraf/releases/telegraf-1.17.0-1.x86_64.rpm -P /opt/yunion/ansible-install-pkg
Run wget https://dl.influxdata.com/telegraf/releases/telegraf-1.17.0-1.aarch64.rpm -P /opt/yunion/ansible-install-pkg
Run wget https://dl.influxdata.com/telegraf/releases/telegraf-1.17.0_windows_amd64.zip -P /opt/yunion/ansible-install-pkg
Run wget https://dl.influxdata.com/telegraf/releases/telegraf_1.17.0-1_amd64.deb -P /opt/yunion/ansible-install-pkg
Run wget https://dl.influxdata.com/telegraf/releases/telegraf_1.17.0-1_arm64.deb -P /opt/yunion/ansible-install-pkg
Run wget https://yunioniso.oss-cn-beijing.aliyuncs.com/rpms/telegraf/telegraf-1.19.2-yn~fe11a96b-0.aarch64.rpm -P /opt/yunion/ansible-install-pkg
Run wget https://yunioniso.oss-cn-beijing.aliyuncs.com/rpms/telegraf/telegraf-1.19.2-yn~fe11a96b-0.x86_64.rpm -P /opt/yunion/ansible-install-pkg
Run wget https://yunioniso.oss-cn-beijing.aliyuncs.com/rpms/telegraf/telegraf_1.19.2-yn~fe11a96b-0_amd64.deb -P /opt/yunion/ansible-install-pkg
Run wget https://yunioniso.oss-cn-beijing.aliyuncs.com/rpms/telegraf/telegraf_1.19.2-yn~fe11a96b-0_arm64.deb -P /opt/yunion/ansible-install-pkg
Run mkdir -p /opt/yunion/playbook
Run mkdir /opt/yunion/playbook/monitor-agent

View File

@@ -1,7 +1,7 @@
FROM registry.cn-beijing.aliyuncs.com/yunionio/torrent:20200820
FROM registry.cn-beijing.aliyuncs.com/yunionio/torrent:20210815.0
MAINTAINER "Zexi Li <lizexi@yunionyun.com>"
RUN apk add --no-cache s3fs-fuse --repository=http://dl-cdn.alpinelinux.org/alpine/edge/testing
RUN mkdir -p /opt/yunion/bin
ADD ./_output/alpine-build/bin/glance /opt/yunion/bin/glance
ADD ./_output/alpine-build/bin/glance /opt/yunion/bin/glance

View File

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

View File

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

View File

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

View File

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

View File

@@ -1,4 +1,5 @@
FROM alpine:3.11
# TODO: use 3.14 will lead 'apk add qemu-img fail on arm64'
FROM alpine:3.13.5
MAINTAINER "Zexi Li <lizexi@yunionyun.com>"

View File

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

View File

@@ -1,4 +1,4 @@
FROM registry.cn-beijing.aliyuncs.com/yunionio/onecloud-base:v0.2
FROM registry.cn-beijing.aliyuncs.com/yunionio/onecloud-base:v0.3.5
RUN mkdir -p /opt/yunion/bin
ADD ./_output/alpine-build/bin/region-dns /opt/yunion/bin/region-dns

View File

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

View File

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

View File

@@ -1,15 +1,15 @@
FROM registry.cn-beijing.aliyuncs.com/yunionio/onecloud-base:v0.2
FROM registry.cn-beijing.aliyuncs.com/yunionio/onecloud-base:v0.3.5
MAINTAINER "Yaoqi Wan <wanyaoqi@yunionyun.com>"
MAINTAINER "Zexi Li <zexi.li@icloud.com>"
# HACK: use v3.14 alpine mirror to upgrade qemu-img
RUN echo http://dl-cdn.alpinelinux.org/alpine/v3.14/main > /etc/apk/repositories
RUN echo http://dl-cdn.alpinelinux.org/alpine/v3.14/community >> /etc/apk/repositories
RUN apk update && \
apk add --no-cache tzdata ca-certificates qemu-img && \
apk add --no-cache qemu-img && \
rm -rf /var/cache/apk/*
RUN cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
ENV TZ Asia/Shanghai
# add executable file torrent
# make cmd/torrent
RUN mkdir -p /opt/yunion/bin

View File

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

View File

@@ -1,7 +1,35 @@
REGISTRY ?= "registry.cn-beijing.aliyuncs.com/yunionio"
DOCKER_BUILD = docker build -t $(REGISTRY)
DOCKER_BUILDX = docker buildx build --platform linux/arm64,linux/amd64 --push -t $(REGISTRY)
debian10-base:
docker buildx build --platform linux/arm64,linux/amd64 --push \
-t registry.cn-beijing.aliyuncs.com/yunionio/debian10-base:1.0 -f ./Dockerfile.debian-base .
ONECLOUD_BASE_VERSION = v0.3.5
onecloud-base:
$(DOCKER_BUILDX)/onecloud-base:$(ONECLOUD_BASE_VERSION) -f ./Dockerfile.onecloud-base .
ANSIBLESERVER_BASE = v1.0.5
ansibleserver-base:
$(DOCKER_BUILDX)/ansibleserver-base:$(ANSIBLESERVER_BASE) -f ./Dockerfile.ansibleserver-base .
CLIMC_BASE_VERSION = 20210901
climc-base:
docker buildx build --platform linux/arm64,linux/amd64 --push \
-t registry.cn-beijing.aliyuncs.com/yunionio/climc-base:$(VERSION) -f ./Dockerfile.climc-base .
-t registry.cn-beijing.aliyuncs.com/yunionio/climc-base:$(CLIMC_BASE_VERSION) -f ./Dockerfile.climc-base .
BAREMETAL_BASE_VERSION = v0.3.3
baremetal-base:
$(DOCKER_BUILDX)/baremetal-base:$(BAREMETAL_BASE_VERSION) -f ./Dockerfile.baremetal-base .
#docker push $(REGISTRY)/baremetal-base:$(BAREMETAL_BASE_VERSION)
FILE_REPO_VERSION = v0.3.3
file-repo:
$(DOCKER_BUILDX)/file-repo:$(FILE_REPO_VERSION) -f ./Dockerfile.file-repo .

View File

@@ -1,24 +1,24 @@
FROM registry.cn-beijing.aliyuncs.com/yunionio/alpine-build:1.0-5 as build
ARG TARGETPLATFORM
ARG BUILDPLATFORM
RUN mkdir -p /root/go/src/yunion.io/x/onecloud
COPY . /root/go/src/yunion.io/x/onecloud
RUN cd /root/go/src/yunion.io/x/onecloud && make cmd/torrent
WORKDIR /root/go/src/yunion.io/x/onecloud
RUN make cmd/torrent
FROM registry.cn-beijing.aliyuncs.com/yunionio/onecloud-base:v0.3.5
FROM registry.cn-beijing.aliyuncs.com/yunionio/onecloud-base:v0.2
MAINTAINER "Zexi Li <zexi.li@icloud.com>"
MAINTAINER "Yaoqi Wan <wanyaoqi@yunionyun.com>"
# HACK: use v3.14 alpine mirror to upgrade qemu-img
RUN echo http://dl-cdn.alpinelinux.org/alpine/v3.14/main > /etc/apk/repositories
RUN echo http://dl-cdn.alpinelinux.org/alpine/v3.14/community >> /etc/apk/repositories
RUN apk update && \
apk add --no-cache tzdata ca-certificates qemu-img && \
apk add --no-cache qemu-img && \
rm -rf /var/cache/apk/*
RUN cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
ENV TZ Asia/Shanghai
# TAG=20210815.0
# add executable file torrent
# make cmd/torrent
RUN mkdir -p /opt/yunion/bin

View File

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

View File

@@ -40,4 +40,18 @@ func init() {
printList(result, modules.Cloudevents.GetColumns(s))
return nil
})
type CloudeventLogsPurgeOptions struct {
}
R(&CloudeventLogsPurgeOptions{}, "cloud-event-purge", "Purge obsolete cloud event logs", func(s *mcclient.ClientSession, opts *CloudeventLogsPurgeOptions) error {
_, err := modules.Cloudevents.PerformClassAction(s, "purge-splitable", nil)
if err != nil {
return err
}
_, err = modules.CloudeventLogs.PerformClassAction(s, "purge-splitable", nil)
if err != nil {
return err
}
return nil
})
}

View File

@@ -37,6 +37,7 @@ func init() {
cmd.CreateWithKeyword("create-aws", &options.SAWSCloudAccountCreateOptions{})
cmd.CreateWithKeyword("create-openstack", &options.SOpenStackCloudAccountCreateOptions{})
cmd.CreateWithKeyword("create-huawei", &options.SHuaweiCloudAccountCreateOptions{})
cmd.CreateWithKeyword("create-hcso", &options.SHCSOAccountCreateOptions{})
cmd.CreateWithKeyword("create-ucloud", &options.SUcloudCloudAccountCreateOptions{})
cmd.CreateWithKeyword("create-zstack", &options.SZStackCloudAccountCreateOptions{})
cmd.CreateWithKeyword("create-s3", &options.SS3CloudAccountCreateOptions{})
@@ -54,6 +55,7 @@ func init() {
cmd.UpdateWithKeyword("update-aws", &options.SAWSCloudAccountUpdateOptions{})
cmd.UpdateWithKeyword("update-openstack", &options.SOpenStackCloudAccountUpdateOptions{})
cmd.UpdateWithKeyword("update-huawei", &options.SHuaweiCloudAccountUpdateOptions{})
cmd.UpdateWithKeyword("update-hcso", &options.SHCSOAccountUpdateOptions{})
cmd.UpdateWithKeyword("update-ucloud", &options.SUcloudCloudAccountUpdateOptions{})
cmd.UpdateWithKeyword("update-zstack", &options.SZStackCloudAccountUpdateOptions{})
cmd.UpdateWithKeyword("update-s3", &options.SS3CloudAccountUpdateOptions{})
@@ -69,6 +71,7 @@ func init() {
cmd.PerformWithKeyword("update-credential-aws", "update-credential", &options.SAWSCloudAccountUpdateCredentialOptions{})
cmd.PerformWithKeyword("update-credential-openstack", "update-credential", &options.SOpenStackCloudAccountUpdateCredentialOptions{})
cmd.PerformWithKeyword("update-credential-huawei", "update-credential", &options.SHuaweiCloudAccountUpdateCredentialOptions{})
cmd.PerformWithKeyword("update-credential-hcso", "update-credential", &options.SHCSOAccountUpdateCredentialOptions{})
cmd.PerformWithKeyword("update-credential-ucloud", "update-credential", &options.SUcloudCloudAccountUpdateCredentialOptions{})
cmd.PerformWithKeyword("update-credential-zstack", "update-credential", &options.SZStackCloudAccountUpdateCredentialOptions{})
cmd.PerformWithKeyword("update-credential-s3", "update-credential", &options.SS3CloudAccountUpdateCredentialOptions{})

View File

@@ -18,251 +18,38 @@ import (
"fmt"
"yunion.io/x/jsonutils"
"yunion.io/x/log"
"yunion.io/x/onecloud/pkg/mcclient"
"yunion.io/x/onecloud/cmd/climc/shell"
"yunion.io/x/onecloud/pkg/mcclient/modules"
"yunion.io/x/onecloud/pkg/mcclient/options"
"yunion.io/x/onecloud/pkg/mcclient/options/compute"
)
func init() {
cmd := shell.NewResourceCmd(&modules.Cloudproviders).WithKeyword("cloud-provider")
cmd.List(&compute.CloudproviderListOptions{})
cmd.Update(&compute.CloudproviderUpdateOptions{})
cmd.Show(&options.BaseIdOptions{})
cmd.Delete(&options.BaseIdOptions{})
cmd.Perform("change-project", &compute.CloudproviderChangeProjectOptions{})
cmd.Perform("enable", &options.BaseIdOptions{})
cmd.Perform("disable", &options.BaseIdOptions{})
cmd.Perform("sync", &compute.CloudproviderSyncOptions{})
cmd.Perform("project-mapping", &compute.ClouproviderProjectMappingOptions{})
type CloudproviderListOptions struct {
options.BaseListOptions
Usable bool `help:"Vpc & Network usable"`
HasObjectStorage bool `help:"filter cloudproviders that has object storage"`
NoObjectStorage bool `help:"filter cloudproviders that has no object storage"`
Capability []string `help:"capability filter" choices:"project|compute|network|loadbalancer|objectstore|rds|cache|event"`
Cloudregion string `help:"filter cloudproviders by cloudregion"`
HostSchedtagId string `help:"filter by host schedtag"`
}
R(&CloudproviderListOptions{}, "cloud-provider-list", "List cloud providers", func(s *mcclient.ClientSession, args *CloudproviderListOptions) error {
var params *jsonutils.JSONDict
{
var err error
params, err = args.BaseListOptions.Params()
if err != nil {
return err
}
if args.Usable {
params.Add(jsonutils.NewBool(true), "usable")
}
if args.HasObjectStorage {
params.Add(jsonutils.JSONTrue, "has_object_storage")
} else if args.NoObjectStorage {
params.Add(jsonutils.JSONFalse, "has_object_storage")
}
if len(args.Capability) > 0 {
params.Add(jsonutils.NewStringArray(args.Capability), "capability")
}
if len(args.Cloudregion) > 0 {
params.Add(jsonutils.NewString(args.Cloudregion), "cloudregion")
}
if len(args.HostSchedtagId) > 0 {
params.Add(jsonutils.NewString(args.HostSchedtagId), "host_schedtag_id")
}
}
result, err := modules.Cloudproviders.List(s, params)
if err != nil {
return err
}
printList(result, modules.Cloudproviders.GetColumns(s))
return nil
})
type CloudproviderUpdateOptions struct {
ID string `help:"ID or Name of cloud provider"`
Name string `help:"New name to update"`
AccessUrl string `help:"New access url"`
Desc string `help:"Description"`
}
R(&CloudproviderUpdateOptions{}, "cloud-provider-update", "Update a cloud provider", func(s *mcclient.ClientSession, args *CloudproviderUpdateOptions) error {
params := jsonutils.NewDict()
if len(args.Name) > 0 {
params.Add(jsonutils.NewString(args.Name), "name")
}
if len(args.AccessUrl) > 0 {
params.Add(jsonutils.NewString(args.AccessUrl), "access_url")
}
if len(args.Desc) > 0 {
params.Add(jsonutils.NewString(args.Desc), "description")
}
if params.Size() == 0 {
return InvalidUpdateError()
}
result, err := modules.Cloudproviders.Update(s, args.ID, params)
if err != nil {
return err
}
printObject(result)
return nil
})
type CloudproviderChangeProjectOptions struct {
ID string `help:"ID or Name of cloud provider"`
TENANT string `help:"ID or Name of tenant"`
}
R(&CloudproviderChangeProjectOptions{}, "cloud-provider-change-project", "Change project for provider", func(s *mcclient.ClientSession, args *CloudproviderChangeProjectOptions) error {
result, err := modules.Cloudproviders.PerformAction(s, args.ID, "change-project", jsonutils.Marshal(map[string]string{"project": args.TENANT}))
if err != nil {
return err
}
printObject(result)
return nil
})
type CloudproviderShowOptions struct {
ID string `help:"ID or Name of cloud provider"`
}
R(&CloudproviderShowOptions{}, "cloud-provider-show", "Get details of a cloud provider", func(s *mcclient.ClientSession, args *CloudproviderShowOptions) error {
result, err := modules.Cloudproviders.Get(s, args.ID, nil)
if err != nil {
return err
}
printObject(result)
return nil
})
R(&CloudproviderShowOptions{}, "cloud-provider-delete", "Delete a cloud provider", func(s *mcclient.ClientSession, args *CloudproviderShowOptions) error {
result, err := modules.Cloudproviders.Delete(s, args.ID, nil)
if err != nil {
return err
}
printObject(result)
return nil
})
R(&CloudproviderShowOptions{}, "cloud-provider-enable", "Enable cloud provider", func(s *mcclient.ClientSession, args *CloudproviderShowOptions) error {
result, err := modules.Cloudproviders.PerformAction(s, args.ID, "enable", nil)
if err != nil {
return err
}
printObject(result)
return nil
})
R(&CloudproviderShowOptions{}, "cloud-provider-disable", "Disable cloud provider", func(s *mcclient.ClientSession, args *CloudproviderShowOptions) error {
result, err := modules.Cloudproviders.PerformAction(s, args.ID, "disable", nil)
if err != nil {
return err
}
printObject(result)
return nil
})
R(&CloudproviderShowOptions{}, "cloud-provider-balance", "Get balance", func(s *mcclient.ClientSession, args *CloudproviderShowOptions) error {
result, err := modules.Cloudproviders.GetSpecific(s, args.ID, "balance", nil)
if err != nil {
return err
}
printObject(result)
return nil
})
type CloudproviderUpdateCredentialOptions struct {
ID string `help:"ID or Name of cloud provider"`
ACCOUNT string `help:"new account"`
SECRET string `help:"new secret"`
}
R(&CloudproviderUpdateCredentialOptions{}, "cloud-provider-update-credential", "Update credential of a cloud provider", func(s *mcclient.ClientSession, args *CloudproviderUpdateCredentialOptions) error {
params := jsonutils.NewDict()
params.Add(jsonutils.NewString(args.ACCOUNT), "account")
params.Add(jsonutils.NewString(args.SECRET), "secret")
result, err := modules.Cloudproviders.PerformAction(s, args.ID, "update-credential", params)
if err != nil {
return err
}
printObject(result)
return nil
})
type CloudproviderSyncOptions struct {
ID string `help:"ID or Name of cloud provider"`
Force bool `help:"Force sync no matter what"`
FullSync bool `help:"Synchronize everything"`
ProjectSync bool `help:"Auto sync project info"`
Region []string `help:"region to sync"`
Zone []string `help:"region to sync"`
Host []string `help:"region to sync"`
}
R(&CloudproviderSyncOptions{}, "cloud-provider-sync", "Sync of a cloud provider account", func(s *mcclient.ClientSession, args *CloudproviderSyncOptions) error {
params := jsonutils.NewDict()
if args.Force {
params.Add(jsonutils.JSONTrue, "force")
}
if args.FullSync {
params.Add(jsonutils.JSONTrue, "full_sync")
}
if args.ProjectSync {
params.Add(jsonutils.JSONTrue, "project_sync")
}
if len(args.Region) > 0 {
params.Add(jsonutils.NewStringArray(args.Region), "region")
}
if len(args.Zone) > 0 {
params.Add(jsonutils.NewStringArray(args.Zone), "zone")
}
if len(args.Host) > 0 {
params.Add(jsonutils.NewStringArray(args.Host), "host")
}
result, err := modules.Cloudproviders.PerformAction(s, args.ID, "sync", params)
if err != nil {
return err
}
printObject(result)
return nil
})
type CloudproviderClientRCOptions struct {
ID string `help:"ID or name of cloud provider"`
}
R(&CloudproviderClientRCOptions{}, "cloud-provider-clirc", "Get client RC file of the cloud provider", func(s *mcclient.ClientSession, args *CloudproviderClientRCOptions) error {
result, err := modules.Cloudproviders.GetSpecific(s, args.ID, "clirc", nil)
if err != nil {
return err
}
cmd.GetWithCustomShow("clirc", func(result jsonutils.JSONObject) {
rc := make(map[string]string)
err = result.Unmarshal(&rc)
err := result.Unmarshal(&rc)
if err != nil {
return err
log.Errorf("error: %v", err)
return
}
for k, v := range rc {
fmt.Printf(`export %s="%s"`+"\n", k, v)
}
return nil
})
type CloudproviderStorageClassesOptions struct {
ID string `help:"ID or Name of cloud provider" json:"-"`
Cloudregion string `help:"cloud region name or Id"`
}
R(&CloudproviderStorageClassesOptions{}, "cloud-provider-storage-classes", "Get list of supported storage classes of a cloud provider", func(s *mcclient.ClientSession, args *CloudproviderStorageClassesOptions) error {
params, err := options.StructToParams(args)
if err != nil {
return err
}
result, err := modules.Cloudproviders.GetSpecific(s, args.ID, "storage-classes", params)
if err != nil {
return err
}
printObject(result)
return nil
})
R(&CloudproviderShowOptions{}, "cloud-provider-change-owner-candidate-domains", "Show candiate domains of a cloud provider changing owner", func(s *mcclient.ClientSession, args *CloudproviderShowOptions) error {
result, err := modules.Cloudproviders.GetSpecific(s, args.ID, "change-owner-candidate-domains", nil)
if err != nil {
return err
}
printObject(result)
return nil
})
}, &options.BaseIdOptions{})
cmd.Get("storage-classes", &compute.CloudproviderStorageClassesOptions{})
cmd.Get("change-owner-candidate-domains", &options.BaseIdOptions{})
cmd.Get("balance", &options.BaseIdOptions{})
}

View File

@@ -15,164 +15,51 @@
package compute
import (
"context"
"fmt"
"yunion.io/x/jsonutils"
"yunion.io/x/log"
"yunion.io/x/pkg/errors"
"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"
"yunion.io/x/onecloud/pkg/mcclient/options/compute"
"yunion.io/x/onecloud/pkg/util/fileutils2"
"yunion.io/x/onecloud/pkg/util/httputils"
"yunion.io/x/onecloud/pkg/util/ssh"
)
func init() {
type HostListOptions struct {
Schedtag string `help:"List hosts in schedtag"`
Zone string `help:"List hosts in zone"`
Region string `help:"List hosts in region"`
Wire string `help:"List hosts in wire"`
Image string `help:"List hosts cached images" json:"cachedimage"`
Storage string `help:"List hosts attached to storages"`
Baremetal string `help:"List hosts that is managed by baremetal system" choices:"true|false"`
Empty bool `help:"show empty host" json:"-"`
Occupied bool `help:"show occupid host" json:"-"`
Enabled bool `help:"Show enabled host only" json:"-"`
Disabled bool `help:"Show disabled host only" json:"-"`
HostType string `help:"Host type filter" choices:"baremetal|hypervisor|esxi|kubelet|hyperv|aliyun|azure|qcloud|aws|huawei|ucloud|google|ctyun"`
AnyMac string `help:"Mac matches one of the host's interface"`
AnyIp string `help:"IP matches one of the host's interface"`
cmd := shell.NewResourceCmd(&modules.Hosts)
cmd.List(&compute.HostListOptions{})
cmd.Show(&options.BaseShowOptions{})
cmd.GetMetadata(&options.BaseIdOptions{})
cmd.GetProperty(&compute.HostStatusStatisticsOptions{})
IsBaremetal *bool `help:"filter host list by is_baremetal=true|false"`
cmd.Perform("ping", &options.BaseIdOptions{})
cmd.Perform("undo-convert", &options.BaseIdOptions{})
cmd.Perform("maintenance", &options.BaseIdOptions{})
cmd.Perform("unmaintenance", &options.BaseIdOptions{})
cmd.Perform("start", &options.BaseIdOptions{})
cmd.Perform("stop", &options.BaseIdOptions{})
cmd.Perform("reset", &options.BaseIdOptions{})
cmd.BatchDelete(&options.BaseIdsOptions{})
cmd.Perform("remove-all-netifs", &options.BaseIdOptions{})
ResourceType string `help:"Resource type" choices:"shared|prepaid|dedicated"`
cmd.BatchPerform("enable", &options.BaseIdsOptions{})
cmd.BatchPerform("disable", &options.BaseIdsOptions{})
cmd.BatchPerform("syncstatus", &options.BaseIdsOptions{})
cmd.BatchPerform("sync-config", &options.BaseIdsOptions{})
cmd.BatchPerform("prepare", &options.BaseIdsOptions{})
cmd.BatchPerform("ipmi-probe", &options.BaseIdsOptions{})
Usable *bool `help:"List all zones that is usable"`
cmd.Get("ipmi", &options.BaseIdOptions{})
cmd.Get("vnc", &options.BaseIdOptions{})
Hypervisor string `help:"filter hosts by hypervisor"`
StorageNotAttached bool `help:"List hosts not attach specified storage"`
Uuid string `help:"find host with given system uuid"`
CdromBoot *bool `help:"filter hosts list by cdrom_boot=true|false"`
Sn string `help:"find host by sn"`
OrderByServerCount string `help:"Order by server count" choices:"desc|asc"`
options.BaseListOptions
}
R(&HostListOptions{}, "host-list", "List hosts", func(s *mcclient.ClientSession, opts *HostListOptions) error {
params, err := options.ListStructToParams(opts)
if err != nil {
return err
}
if opts.Empty {
params.Add(jsonutils.JSONTrue, "is_empty")
} else if opts.Occupied {
params.Add(jsonutils.JSONFalse, "is_empty")
}
if opts.Enabled {
params.Add(jsonutils.NewInt(1), "enabled")
} else if opts.Disabled {
params.Add(jsonutils.NewInt(0), "enabled")
}
if len(opts.Uuid) > 0 {
params.Add(jsonutils.NewString(opts.Uuid), "uuid")
}
if len(opts.Sn) > 0 {
params.Add(jsonutils.NewString(opts.Sn), "sn")
}
result, err := modules.Hosts.List(s, params)
if err != nil {
return err
}
printList(result, modules.Hosts.GetColumns(s))
return nil
})
type HostDetailOptions struct {
ID string `help:"ID or name of host"`
}
R(&HostDetailOptions{}, "host-show", "Show details of a host", func(s *mcclient.ClientSession, args *HostDetailOptions) error {
result, err := modules.Hosts.Get(s, args.ID, nil)
if err != nil {
return err
}
printObject(result)
return nil
})
R(&HostDetailOptions{}, "host-ping", "Ping a host", func(s *mcclient.ClientSession, args *HostDetailOptions) error {
result, err := modules.Hosts.PerformAction(s, args.ID, "ping", nil)
if err != nil {
return err
}
printObject(result)
return nil
})
R(&HostDetailOptions{}, "host-metadata", "Show metadata of a host", func(s *mcclient.ClientSession, args *HostDetailOptions) error {
result, err := modules.Hosts.GetMetadata(s, args.ID, nil)
if err != nil {
return err
}
printObject(result)
return nil
})
type HostOpsOptions struct {
ID []string `help:"ID or name of hosts"`
}
R(&HostOpsOptions{}, "host-enable", "Enable a host", func(s *mcclient.ClientSession, args *HostOpsOptions) error {
results := modules.Hosts.BatchPerformAction(s, args.ID, "enable", nil)
printBatchResults(results, modules.Hosts.GetColumns(s))
return nil
})
R(&HostOpsOptions{}, "host-disable", "Disable a host", func(s *mcclient.ClientSession, args *HostOpsOptions) error {
results := modules.Hosts.BatchPerformAction(s, args.ID, "disable", nil)
printBatchResults(results, modules.Hosts.GetColumns(s))
return nil
})
R(&HostOpsOptions{}, "host-syncstatus", "Synchronize status of a host", func(s *mcclient.ClientSession, args *HostOpsOptions) error {
results := modules.Hosts.BatchPerformAction(s, args.ID, "syncstatus", nil)
printBatchResults(results, modules.Hosts.GetColumns(s))
return nil
})
R(&HostOpsOptions{}, "host-sync-config", "Synchronize config of a host", func(s *mcclient.ClientSession, args *HostOpsOptions) error {
results := modules.Hosts.BatchPerformAction(s, args.ID, "sync-config", nil)
printBatchResults(results, modules.Hosts.GetColumns(s))
return nil
})
R(&HostOpsOptions{}, "host-prepare", "Prepare a host for installation", func(s *mcclient.ClientSession, args *HostOpsOptions) error {
results := modules.Hosts.BatchPerformAction(s, args.ID, "prepare", nil)
printBatchResults(results, modules.Hosts.GetColumns(s))
return nil
})
R(&HostOpsOptions{}, "host-ipmi-probe", "Do ipmi probe host", func(s *mcclient.ClientSession, args *HostOpsOptions) error {
results := modules.Hosts.BatchPerformAction(s, args.ID, "ipmi-probe", nil)
printBatchResults(results, modules.Hosts.GetColumns(s))
return nil
})
R(&HostDetailOptions{}, "host-ipmi", "Get IPMI information of a host", func(s *mcclient.ClientSession, args *HostDetailOptions) error {
result, err := modules.Hosts.GetSpecific(s, args.ID, "ipmi", nil)
if err != nil {
return err
}
printObject(result)
return nil
})
R(&HostDetailOptions{}, "host-logininfo", "Get SSH login information of a host", func(s *mcclient.ClientSession, args *HostDetailOptions) error {
R(&options.BaseIdOptions{}, "host-logininfo", "Get SSH login information of a host", func(s *mcclient.ClientSession, args *options.BaseIdOptions) error {
srvid, e := modules.Hosts.GetId(s, args.ID, nil)
if e != nil {
return e
@@ -185,15 +72,6 @@ func init() {
return nil
})
R(&HostDetailOptions{}, "host-vnc", "Get VNC information of a host", func(s *mcclient.ClientSession, args *HostDetailOptions) error {
result, err := modules.Hosts.GetSpecific(s, args.ID, "vnc", nil)
if err != nil {
return err
}
printObject(result)
return nil
})
type HostPropertyOptions struct {
}
@@ -206,7 +84,7 @@ func init() {
return nil
})
R(&HostListOptions{}, "host-node-count", "Get host node count", func(s *mcclient.ClientSession, opts *HostListOptions) error {
R(&compute.HostListOptions{}, "host-node-count", "Get host node count", func(s *mcclient.ClientSession, opts *compute.HostListOptions) error {
params, err := options.ListStructToParams(opts)
if err != nil {
return err
@@ -348,67 +226,6 @@ func init() {
printObject(result)
return nil
})
R(&HostDetailOptions{}, "host-undo-convert", "Undo converting a host to hypervisor", func(s *mcclient.ClientSession, args *HostDetailOptions) error {
result, err := modules.Hosts.PerformAction(s, args.ID, "undo-convert", nil)
if err != nil {
return err
}
printObject(result)
return nil
})
R(&HostDetailOptions{}, "host-maintenance", "Reboot host into PXE offline OS, do maintenance jobs", func(s *mcclient.ClientSession, args *HostDetailOptions) error {
result, err := modules.Hosts.PerformAction(s, args.ID, "maintenance", nil)
if err != nil {
return err
}
printObject(result)
return nil
})
R(&HostDetailOptions{}, "host-unmaintenance", "Reboot host back into disk installed OS", func(s *mcclient.ClientSession, args *HostDetailOptions) error {
result, err := modules.Hosts.PerformAction(s, args.ID, "unmaintenance", nil)
if err != nil {
return err
}
printObject(result)
return nil
})
R(&HostDetailOptions{}, "host-start", "Power on host", func(s *mcclient.ClientSession, args *HostDetailOptions) error {
result, err := modules.Hosts.PerformAction(s, args.ID, "start", nil)
if err != nil {
return err
}
printObject(result)
return nil
})
R(&HostDetailOptions{}, "host-stop", "Power off host", func(s *mcclient.ClientSession, args *HostDetailOptions) error {
result, err := modules.Hosts.PerformAction(s, args.ID, "stop", nil)
if err != nil {
return err
}
printObject(result)
return nil
})
R(&HostDetailOptions{}, "host-reset", "Power reset host", func(s *mcclient.ClientSession, args *HostDetailOptions) error {
result, err := modules.Hosts.PerformAction(s, args.ID, "reset", nil)
if err != nil {
return err
}
printObject(result)
return nil
})
R(&HostOpsOptions{}, "host-delete", "Delete host record", func(s *mcclient.ClientSession, args *HostOpsOptions) error {
results := modules.Hosts.BatchDelete(s, args.ID, nil)
printBatchResults(results, modules.Hosts.GetColumns(s))
return nil
})
type HostAddNetIfOptions struct {
ID string `help:"ID or Name of host"`
WIRE string `help:"ID or Name of wire to attach"`
@@ -506,15 +323,6 @@ func init() {
return nil
})
R(&HostDetailOptions{}, "host-remove-all-netifs", "Remvoe all netifs expect admin&ipmi netifs", func(s *mcclient.ClientSession, args *HostDetailOptions) error {
result, err := modules.Hosts.PerformAction(s, args.ID, "remove-all-netifs", nil)
if err != nil {
return err
}
printObject(result)
return nil
})
type HostCacheImageActionOptions struct {
ID string `help:"ID or name of host"`
IMAGE string `help:"ID or name of image"`
@@ -718,9 +526,36 @@ func init() {
return e
}
i, e := modules.Hosts.GetLoginInfo(s, srvid, nil)
privateKey := ""
if e != nil {
return e
if httputils.ErrorCode(e) == 404 {
var err error
privateKey, err = modules.Sshkeypairs.FetchPrivateKeyBySession(context.Background(), s)
if err != nil {
return errors.Wrap(err, "fetch private key")
}
params := jsonutils.NewDict()
params.Add(jsonutils.NewString(string(args.ID)), "ID")
ret, err := modules.Hosts.Get(s, args.ID, params)
if err != nil {
return errors.Wrap(err, "get host by ID")
}
ip, err := ret.GetString("access_ip")
if err != nil {
return errors.Wrap(err, "get the ip of the host")
}
jsonItem := jsonutils.NewDict()
jsonItem.Add(jsonutils.NewString(ip), "ip")
jsonItem.Add(jsonutils.NewString("root"), "username")
jsonItem.Add(jsonutils.NewString(""), "password")
jsonItem.Add(jsonutils.NewInt(22), "port")
i = jsonItem
} else {
return e
}
}
host, err := i.GetString("ip")
if err != nil {
return err
@@ -737,7 +572,7 @@ func init() {
if args.Port != 22 {
port = args.Port
}
sshCli, err := ssh.NewClient(host, port, user, passwd, "")
sshCli, err := ssh.NewClient(host, port, user, passwd, privateKey)
if err != nil {
return err
}

View File

@@ -28,4 +28,6 @@ func init() {
cmd.Delete(&options.BaseIdOptions{})
cmd.Show(&options.BaseIdOptions{})
cmd.Create(&compute.ProjectMappingCreateOption{})
cmd.Perform("enable", &options.BaseIdOptions{})
cmd.Perform("disable", &options.BaseIdOptions{})
}

View File

@@ -15,7 +15,11 @@
package compute
import (
"yunion.io/x/jsonutils"
"yunion.io/x/pkg/errors"
"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"
)
@@ -26,3 +30,63 @@ func init() {
cmd.Perform("close-forward", &options.ServerCloseForwardOptions{})
cmd.Perform("list-forward", &options.ServerListForwardOptions{})
}
type forwardInfo struct {
ProxyAddr string `json:"proxy_addr"`
ProxyPort int `json:"proxy_port"`
}
func dump(input jsonutils.JSONObject) (*forwardInfo, error) {
ret := new(forwardInfo)
if err := input.Unmarshal(ret); err != nil {
return nil, errors.Wrap(err, "JSONObject unmarshal failed")
}
if ret.ProxyAddr == "" {
return nil, errors.Errorf("proxy_addr is empty")
}
if ret.ProxyPort <= 0 {
return nil, errors.Errorf("invalid proxy_port %d", ret.ProxyAddr)
}
return ret, nil
}
func openForward(session *mcclient.ClientSession, srvid string) (*forwardInfo, error) {
opt := &options.ServerOpenForwardOptions{
ServerIdOptions: options.ServerIdOptions{
ID: srvid,
},
Proto: "tcp",
Port: 22,
}
params, err := opt.Params()
if err != nil {
return nil, errors.Wrap(err, "get open forward params")
}
jsonItem, err := modules.Servers.PerformAction(session, opt.ID, "open-forward", params)
if err != nil {
return nil, err
}
return dump(jsonItem)
}
func closeForward(session *mcclient.ClientSession, srvid string, fItem *forwardInfo) (jsonutils.JSONObject, error) {
opt := &options.ServerCloseForwardOptions{
ServerIdOptions: options.ServerIdOptions{
ID: srvid,
},
Proto: "tcp",
ProxyAddr: fItem.ProxyAddr,
ProxyPort: fItem.ProxyPort,
}
params, err := opt.Params()
if err != nil {
return nil, errors.Wrap(err, "close forward params")
}
return modules.Servers.PerformAction(session, opt.ID, "close-forward", params)
}

View File

@@ -15,6 +15,7 @@
package compute
import (
"context"
"encoding/json"
"fmt"
"io/ioutil"
@@ -59,6 +60,7 @@ func init() {
cmd.BatchPerform("reset", new(options.ServerResetOptions))
cmd.BatchPerform("restart", new(options.ServerRestartOptions))
cmd.BatchPerform("purge", new(options.ServerIdsOptions))
cmd.PrintObjectYAML().Perform("migrate-forecast", new(options.ServerMigrateForecastOptions))
cmd.Perform("migrate", new(options.ServerMigrateOptions))
cmd.Perform("live-migrate", new(options.ServerLiveMigrateOptions))
cmd.Perform("modify-src-check", new(options.ServerModifySrcCheckOptions))
@@ -86,6 +88,8 @@ func init() {
cmd.Perform("remote-update", new(options.ServerRemoteUpdateOptions))
cmd.Perform("create-eip", &options.ServerCreateEipOptions{})
cmd.Perform("make-sshable", &options.ServerMakeSshableOptions{})
cmd.Perform("migrate-network", &options.ServerMigrateNetworkOptions{})
cmd.Perform("set-sshport", &options.ServerSetSshportOptions{})
cmd.Get("vnc", new(options.ServerIdOptions))
cmd.Get("desc", new(options.ServerIdOptions))
@@ -95,6 +99,8 @@ func init() {
cmd.Get("sshable", new(options.ServerIdOptions))
cmd.Get("make-sshable-cmd", new(options.ServerIdOptions))
cmd.Get("change-owner-candidate-domains", new(options.ServerChangeOwnerCandidateDomainsOptions))
cmd.Get("change-owner-candidate-domains", new(options.ServerChangeOwnerCandidateDomainsOptions))
cmd.GetProperty(&options.ServerStatusStatisticsOptions{})
type ServerTaskShowOptions struct {
ID string `help:"ID or name of server" json:"-"`
@@ -178,6 +184,19 @@ func init() {
return nil
})
R(&options.ResourceMetadataOptions{}, "server-set-metadata", "Set raw metadata of a server", func(s *mcclient.ClientSession, opts *options.ResourceMetadataOptions) error {
params, err := opts.Params()
if err != nil {
return err
}
result, err := modules.Servers.PerformAction(s, opts.ID, "metadata", params)
if err != nil {
return err
}
printObject(result)
return nil
})
R(&options.ServerCreateFromInstanceSnapshot{}, "server-create-from-instance-snapshot", "server create from instance snapshot",
func(s *mcclient.ClientSession, opts *options.ServerCreateFromInstanceSnapshot) error {
params := &compute.ServerCreateInput{}
@@ -776,6 +795,16 @@ func init() {
return err
}
eip, err := srv.GetString("eip")
if err != nil && err.Error() != "Get: key not found" {
return err
}
vpcid, err := srv.GetString("vpc_id")
if err != nil {
return err
}
address := make([]string, 0)
nics, err := srv.GetArray("nics")
if err != nil {
@@ -790,13 +819,15 @@ func init() {
return fmt.Errorf("Not found ip address from server %s", opts.ID)
}
privateKey := ""
params := jsonutils.NewDict()
if len(opts.Key) > 0 {
privateKey, e := ioutil.ReadFile(opts.Key)
key, e := ioutil.ReadFile(opts.Key)
if e != nil {
return e
}
params.Add(jsonutils.NewString(string(privateKey)), "private_key")
params.Add(jsonutils.NewString(string(key)), "private_key")
privateKey = string(key)
}
i, e := modules.Servers.GetLoginInfo(s, srvid, params)
@@ -804,37 +835,88 @@ func init() {
return e
}
passwd, err := i.GetString("password")
if err != nil {
if err != nil && !opts.UseCloudroot {
return err
}
if opts.Password != "" {
passwd = opts.Password
}
user, err := i.GetString("username")
if err != nil {
if err != nil && !opts.UseCloudroot {
return err
}
if opts.User != "" {
user = opts.User
}
host := address[0]
if opts.Host != "" {
host = opts.Host
}
port := 22
if opts.Port != 22 {
port = opts.Port
}
sshCli, err := ssh.NewClient(host, port, user, passwd, "")
if err != nil {
return err
var forwardItem *forwardInfo = nil
host := address[0]
if opts.Host != "" {
host = opts.Host
} else {
if eip != "" {
host = eip
} else {
if vpcid != "default" {
forwardItem, err = openForward(s, srvid)
if err != nil {
return err
}
host = forwardItem.ProxyAddr
port = forwardItem.ProxyPort
}
}
}
if opts.UseCloudroot {
var err error
privateKey, err = modules.Sshkeypairs.FetchPrivateKeyBySession(context.Background(), s)
if err != nil {
return err
}
passwd = ""
user = "cloudroot"
}
var sshCli *ssh.Client
err = nil
for ; sshCli == nil; sshCli, err = ssh.NewClient(host, port, user, passwd, privateKey) {
if err == nil {
continue
}
if opts.Host != "" {
return err
}
if forwardItem != nil {
closeForward(s, srvid, forwardItem)
return err
} else {
if vpcid != "default" {
forwardItem, e = openForward(s, srvid)
if e != nil {
return e
}
host = forwardItem.ProxyAddr
port = forwardItem.ProxyPort
}
}
}
log.Infof("ssh %s:%d", host, port)
if err := sshCli.RunTerminal(); err != nil {
if forwardItem != nil {
closeForward(s, srvid, forwardItem)
}
return err
}
if forwardItem != nil {
closeForward(s, srvid, forwardItem)
}
return nil
})

View File

@@ -24,6 +24,7 @@ func init() {
cmd := shell.NewResourceCmd(&modules.DevToolScripts).WithKeyword("devtool-script")
cmd.List(new(options.ScriptListOptions))
cmd.Perform("apply", new(options.ScriptApplyOptions))
cmd.Perform("batch-apply", new(options.ScriptBatchApplyOptions))
cmd1 := shell.NewResourceCmd(&modules.DevToolScriptApplyRecords).WithKeyword("devtool-script-record")
cmd1.List(new(options.ScriptApplyRecordListOptions))
}

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 devtool
import (
"yunion.io/x/onecloud/cmd/climc/shell"
"yunion.io/x/onecloud/pkg/mcclient/modules"
options "yunion.io/x/onecloud/pkg/mcclient/options/devtool"
)
func init() {
cmd := shell.NewResourceCmd(&modules.DevToolServiceUrls).WithKeyword("devtool-serviceurl")
cmd.List(new(options.ServiceUrlListOptions))
cmd.Create(new(options.ServiceUrlCreateOptions))
cmd.Show(new(options.ServiceUrlOptions))
cmd.Delete(new(options.ServiceUrlOptions))
}

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 devtool
import (
"yunion.io/x/onecloud/cmd/climc/shell"
"yunion.io/x/onecloud/pkg/mcclient/modules"
options "yunion.io/x/onecloud/pkg/mcclient/options/devtool"
)
func init() {
cmd := shell.NewResourceCmd(&modules.DevToolSshInfos).WithKeyword("devtool-sshinfo")
cmd.List(new(options.SshInfoListOptions))
cmd.Create(new(options.SshInfoCreateOptions))
cmd.Show(new(options.SshInfoOptions))
cmd.Delete(new(options.SshInfoOptions))
}

View File

@@ -24,7 +24,7 @@ import (
func init() {
type EventSplitableOptions struct {
Service string `help:"service" choices:"compute|identity|image" default:"compute"`
Service string `help:"service" choices:"compute|identity|image|log|cloudevent" default:"compute"`
}
R(&EventSplitableOptions{}, "logs-splitable", "Show splitable info of event table", func(s *mcclient.ClientSession, args *EventSplitableOptions) error {
var results jsonutils.JSONObject
@@ -34,6 +34,10 @@ func init() {
results, err = modules.IdentityLogs.Get(s, "splitable", nil)
case "image":
results, err = modules.ImageLogs.Get(s, "splitable", nil)
case "log":
results, err = modules.Actions.Get(s, "splitable", nil)
case "cloudevent":
results, err = modules.Cloudevents.Get(s, "splitable", nil)
default:
results, err = modules.Logs.Get(s, "splitable", nil)
}
@@ -58,6 +62,10 @@ func init() {
results, err = modules.IdentityLogs.PerformClassAction(s, "purge-splitable", nil)
case "image":
results, err = modules.ImageLogs.PerformClassAction(s, "purge-splitable", nil)
case "log":
results, err = modules.Actions.PerformClassAction(s, "purge-splitable", nil)
case "cloudevent":
results, err = modules.Cloudevents.PerformClassAction(s, "purge-splitable", nil)
default:
results, err = modules.Logs.PerformClassAction(s, "purge-splitable", nil)
}

View File

@@ -24,6 +24,7 @@ import (
"yunion.io/x/onecloud/pkg/mcclient"
"yunion.io/x/onecloud/pkg/mcclient/modulebase"
"yunion.io/x/onecloud/pkg/util/printutils"
)
type ResourceCmd struct {
@@ -32,12 +33,15 @@ type ResourceCmd struct {
keyword string
prefix string
printObject func(jsonutils.JSONObject)
}
func NewResourceCmd(manager modulebase.IBaseManager) *ResourceCmd {
return &ResourceCmd{
manager: manager,
keyword: manager.GetKeyword(),
manager: manager,
keyword: manager.GetKeyword(),
printObject: printObjectRecursive,
}
}
@@ -62,6 +66,30 @@ func (cmd *ResourceCmd) SetKeyword(keyword string) *ResourceCmd {
return cmd
}
func (cmd *ResourceCmd) PrintObjectYAML() *ResourceCmd {
cmd.printObject = func(obj jsonutils.JSONObject) {
fmt.Print(obj.YAMLString())
}
return cmd
}
func (cmd *ResourceCmd) PrintObjectTable() *ResourceCmd {
cmd.printObject = printutils.PrintJSONObject
return cmd
}
func (cmd *ResourceCmd) PrintObjectKV() *ResourceCmd {
cmd.printObject = printObjectFmtKv
return cmd
}
func (cmd *ResourceCmd) PrintObjectFlattenKV() *ResourceCmd {
cmd.printObject = func(obj jsonutils.JSONObject) {
printObjectRecursiveEx(obj, printObjectFmtKv)
}
return cmd
}
type IOpt interface {
Params() (jsonutils.JSONObject, error)
}
@@ -196,6 +224,28 @@ type IShowOpt interface {
IIdOpt
}
type IPropertyOpt interface {
IOpt
Property() string
}
func (cmd ResourceCmd) GetProperty(args IPropertyOpt) {
man := cmd.manager
callback := func(s *mcclient.ClientSession, args IPropertyOpt) error {
params, err := args.Params()
if err != nil {
return err
}
ret, err := man.(modulebase.Manager).Get(s, args.Property(), params)
if err != nil {
return err
}
printObject(ret)
return nil
}
cmd.RunWithDesc(args.Property(), fmt.Sprintf("Get property of a %s", man.GetKeyword()), args, callback)
}
func (cmd ResourceCmd) Show(args IShowOpt) {
man := cmd.manager
callback := func(s *mcclient.ClientSession, args IShowOpt) error {
@@ -325,7 +375,7 @@ func (cmd ResourceCmd) PerformWithKeyword(keyword, action string, args IPerformO
if err != nil {
return err
}
printObjectRecursive(ret)
cmd.printObject(ret)
return nil
}
cmd.Run(keyword, args, callback)
@@ -342,7 +392,7 @@ func (cmd ResourceCmd) PerformClassWithKeyword(keyword, action string, args IOpt
if err != nil {
return err
}
printObjectRecursive(ret)
cmd.printObject(ret)
return nil
}
cmd.Run(keyword, args, callback)
@@ -363,7 +413,7 @@ func (cmd ResourceCmd) PerformClass(action string, args IOpt) {
if err != nil {
return err
}
printObjectRecursive(ret)
cmd.printObject(ret)
return nil
}
cmd.Run(action, args, callback)
@@ -393,7 +443,7 @@ type IGetOpt interface {
IOpt
}
func (cmd ResourceCmd) Get(specific string, args IGetOpt) {
func (cmd ResourceCmd) GetWithCustomShow(specific string, show func(data jsonutils.JSONObject), args IGetOpt) {
man := cmd.manager
callback := func(s *mcclient.ClientSession, args IGetOpt) error {
params, err := args.Params()
@@ -404,12 +454,16 @@ func (cmd ResourceCmd) Get(specific string, args IGetOpt) {
if err != nil {
return err
}
printObject(ret)
show(ret)
return nil
}
cmd.RunWithDesc(specific, fmt.Sprintf("Get %s of a %s", specific, man.GetKeyword()), args, callback)
}
func (cmd ResourceCmd) Get(specific string, args IGetOpt) {
cmd.GetWithCustomShow(specific, printObject, args)
}
type IUpdateOpt interface {
IOpt
IIdOpt

View File

@@ -24,13 +24,14 @@ import (
"yunion.io/x/jsonutils"
"yunion.io/x/log"
"yunion.io/x/onecloud/cmd/climc/shell"
api "yunion.io/x/onecloud/pkg/apis/identity"
"yunion.io/x/onecloud/pkg/cloudcommon/consts"
"yunion.io/x/onecloud/pkg/cloudcommon/policy"
"yunion.io/x/onecloud/pkg/mcclient"
"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/mcclient/options/identity"
"yunion.io/x/onecloud/pkg/util/fileutils2"
"yunion.io/x/onecloud/pkg/util/rbacutils"
"yunion.io/x/onecloud/pkg/util/shellutils"
@@ -74,25 +75,8 @@ func createPolicy(s *mcclient.ClientSession, name string, policy string, domain
}
func init() {
type PolicyListOptions struct {
options.BaseListOptions
Type string `help:"filter by type"`
IsSystem *bool `help:"filter by is_system" negative:"is_no_system"`
Format string `help:"policy format, default to yaml" default:"yaml" choices:"yaml|json"`
OrderByDomain string `help:"order by domain name" choices:"asc|desc"`
}
R(&PolicyListOptions{}, "policy-list", "List all policies", func(s *mcclient.ClientSession, args *PolicyListOptions) error {
params, err := options.ListStructToParams(args)
if err != nil {
return err
}
result, err := modules.Policies.List(s, params)
if err != nil {
return err
}
printList(result, modules.Policies.GetColumns(s))
return nil
})
cmd := shell.NewResourceCmd(&modules.Policies)
cmd.List(&identity.PolicyListOptions{})
type PolicyCreateOptions struct {
Domain string `help:"domain of the policy"`

View File

@@ -17,100 +17,21 @@ package identity
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"
"yunion.io/x/onecloud/pkg/mcclient/options/identity"
)
func init() {
type RoleListOptions struct {
options.BaseListOptions
OrderByDomain string `help:"order by domain name" choices:"asc|desc"`
}
R(&RoleListOptions{}, "role-list", "List keystone Roles", func(s *mcclient.ClientSession, args *RoleListOptions) error {
params, err := options.ListStructToParams(args)
if err != nil {
return err
}
result, err := modules.RolesV3.List(s, params)
if err != nil {
return err
}
printList(result, modules.RolesV3.GetColumns(s))
return nil
})
type RoleDetailOptions struct {
ID string `help:"ID or name of role"`
Domain string `help:"Domain"`
}
R(&RoleDetailOptions{}, "role-show", "Show details of a role", func(s *mcclient.ClientSession, args *RoleDetailOptions) error {
query := jsonutils.NewDict()
if len(args.Domain) > 0 {
domainId, err := modules.Domains.GetId(s, args.Domain, nil)
if err != nil {
return err
}
query.Add(jsonutils.NewString(domainId), "domain_id")
}
role, err := modules.RolesV3.Get(s, args.ID, query)
if err != nil {
return err
}
printObject(role)
return nil
})
R(&RoleDetailOptions{}, "role-delete", "Delete a role", func(s *mcclient.ClientSession, args *RoleDetailOptions) error {
query := jsonutils.NewDict()
if len(args.Domain) > 0 {
domainId, err := modules.Domains.GetId(s, args.Domain, nil)
if err != nil {
return err
}
query.Add(jsonutils.NewString(domainId), "domain_id")
}
rid, err := modules.RolesV3.GetId(s, args.ID, query)
if err != nil {
return err
}
role, err := modules.RolesV3.Delete(s, rid, nil)
if err != nil {
return err
}
printObject(role)
return nil
})
type RoleCreateOptions struct {
NAME string `help:"Role name"`
Domain string `help:"Domain"`
Desc string `help:"Description"`
PublicScope string `help:"public scope" choices:"none|system"`
}
R(&RoleCreateOptions{}, "role-create", "Create a new role", func(s *mcclient.ClientSession, args *RoleCreateOptions) error {
params := jsonutils.NewDict()
params.Add(jsonutils.NewString(args.NAME), "name")
if len(args.Domain) > 0 {
domainId, err := modules.Domains.GetId(s, args.Domain, nil)
if err != nil {
return err
}
params.Add(jsonutils.NewString(domainId), "domain_id")
}
if len(args.Desc) > 0 {
params.Add(jsonutils.NewString(args.Desc), "description")
}
if len(args.PublicScope) > 0 {
params.Add(jsonutils.NewString(args.PublicScope), "public_scope")
}
role, err := modules.RolesV3.Create(s, params)
if err != nil {
return err
}
printObject(role)
return nil
})
cmd := shell.NewResourceCmd(&modules.RolesV3)
cmd.List(&identity.RoleListOptions{})
cmd.Show(&identity.RoleDetailOptions{})
cmd.Delete(&identity.RoleDetailOptions{})
cmd.Create(&identity.RoleCreateOptions{})
cmd.Perform("public", &options.BaseIdOptions{})
cmd.Perform("private", &options.BaseIdOptions{})
type RoleUpdateOptions struct {
ID string `help:"Role ID or Name"`
@@ -145,25 +66,4 @@ func init() {
printObject(role)
return nil
})
type RolePerformOptions struct {
ID string `help:"ID of role to update"`
}
R(&RolePerformOptions{}, "role-public", "Mark a role public", func(s *mcclient.ClientSession, args *RolePerformOptions) error {
result, err := modules.RolesV3.PerformAction(s, args.ID, "public", nil)
if err != nil {
return err
}
printObject(result)
return nil
})
R(&RolePerformOptions{}, "role-private", "Mark a role private", func(s *mcclient.ClientSession, args *RolePerformOptions) error {
result, err := modules.RolesV3.PerformAction(s, args.ID, "private", nil)
if err != nil {
return err
}
printObject(result)
return nil
})
}

View File

@@ -142,13 +142,15 @@ func init() {
type ImageListOptions struct {
options.BaseListOptions
IsPublic string `help:"filter images public or not(True, False or None)" choices:"true|false"`
IsStandard string `help:"filter images standard or non-standard" choices:"true|false"`
Protected string `help:"filter images by protected" choices:"true|false"`
IsUefi bool `help:"list uefi image"`
Format []string `help:"Disk formats"`
SubFormats []string `help:"Sub formats"`
Name string `help:"Name filter"`
IsPublic string `help:"filter images public or not(True, False or None)" choices:"true|false"`
IsStandard string `help:"filter images standard or non-standard" choices:"true|false"`
Protected string `help:"filter images by protected" choices:"true|false"`
IsUefi bool `help:"list uefi image"`
Format []string `help:"Disk formats"`
SubFormats []string `help:"Sub formats"`
Name string `help:"Name filter"`
OsType []string `help:"Type of OS filter e.g. 'Windows, Linux, Freebsd, Android, macOS, VMWare'"`
Distribution []string `help:"Distribution filter, e.g. 'CentOS, Ubuntu, Debian, Windows'"`
}
R(&ImageListOptions{}, "image-list", "List images", func(s *mcclient.ClientSession, args *ImageListOptions) error {
params, err := args.Params()
@@ -187,6 +189,12 @@ func init() {
if len(args.SubFormats) > 0 {
params.Add(jsonutils.Marshal(args.SubFormats), "sub_formats")
}
if len(args.OsType) > 0 {
params.Add(jsonutils.NewStringArray(args.OsType), "os_types")
}
if len(args.Distribution) > 0 {
params.Add(jsonutils.NewStringArray(args.Distribution), "distributions")
}
result, err := modules.Images.List(s, params)
if err != nil {
return err

View File

@@ -24,6 +24,7 @@ import (
"yunion.io/x/log"
"yunion.io/x/pkg/errors"
"yunion.io/x/onecloud/cmd/climc/shell"
"yunion.io/x/onecloud/pkg/mcclient"
"yunion.io/x/onecloud/pkg/mcclient/modules/k8s"
o "yunion.io/x/onecloud/pkg/mcclient/options/k8s"
@@ -201,18 +202,32 @@ func initKubeCluster() {
return nil
})
R(&o.ClusterEnableComponentMinioOpt{}, cmdN("component-enable-minio"), "Enable cluster minio component", func(s *mcclient.ClientSession, args *o.ClusterEnableComponentMinioOpt) error {
params, err := args.Params()
if err != nil {
return err
}
ret, err := k8s.KubeClusters.PerformAction(s, args.ID, "enable-component", params)
if err != nil {
return err
}
printObject(ret)
return nil
})
rEnableMinio := func(opt shell.IPerformOpt, cmd string, desc string) {
R(opt, cmd, desc, func(s *mcclient.ClientSession, args shell.IPerformOpt) error {
params, err := args.Params()
if err != nil {
return err
}
ret, err := k8s.KubeClusters.PerformAction(s, args.GetId(), "enable-component", params)
if err != nil {
return err
}
printObject(ret)
return nil
})
}
rEnableMinio(
new(o.ClusterEnableComponentMinioOpt),
cmdN("component-enable-minio"),
"Enable cluster minio component",
)
rEnableMinio(
new(o.ClusterEnableComponentMonitorMinioOpt),
cmdN("component-enable-monitor-minio"),
"Enable cluster monitor stack's minio component",
)
R(&o.ClusterEnableComponentThanosOpt{}, cmdN("component-enable-thanos"), "Enable cluster thanos component", func(s *mcclient.ClientSession, args *o.ClusterEnableComponentThanosOpt) error {
params, err := args.Params()
@@ -260,9 +275,14 @@ func initKubeCluster() {
return nil
})
R(&o.ClusterComponentType{}, cmdN("component-update"), "Update cluster component", func(s *mcclient.ClientSession, args *o.ClusterComponentType) error {
type ClusterComponentTypeUpdate struct {
o.ClusterComponentType
Force bool `help:"Force update"`
}
R(&ClusterComponentTypeUpdate{}, cmdN("component-update"), "Update cluster component", func(s *mcclient.ClientSession, args *ClusterComponentTypeUpdate) error {
// 1. get current setting
setting, err := getComponentSetting(s, args, false)
setting, err := getComponentSetting(s, &args.ClusterComponentType, false)
if err != nil {
return errors.Wrap(err, "get component setting")
}
@@ -270,8 +290,11 @@ func initKubeCluster() {
// 2. edit yaml
yaml, err := shellutils.Edit(setting.YAMLString())
if len(yaml) == 0 {
log.Infof("Nothing to update")
return nil
if !args.Force {
log.Infof("Nothing to update")
return nil
}
yaml = setting.YAMLString()
}
nowSetting, err := jsonutils.ParseYAML(yaml)
if err != nil {
@@ -279,6 +302,7 @@ func initKubeCluster() {
}
params := args.Params(args.TYPE)
params.Update(nowSetting)
params.Add(jsonutils.NewBool(args.Force), "force")
// 3. call update api
ret, err := k8s.KubeClusters.PerformAction(s, args.ID, "update-component", params)

View File

@@ -0,0 +1,20 @@
package meter
import (
"yunion.io/x/onecloud/cmd/climc/shell"
"yunion.io/x/onecloud/pkg/mcclient/modules"
options "yunion.io/x/onecloud/pkg/mcclient/options/meter"
)
func init() {
cmd := shell.NewResourceCmd(modules.BillingDimensionManager)
cmd.Create(&options.BillDimensionCreateOptions{})
cmd.List(&options.BillDimensionListOptions{})
cmd.Show(&options.BillDimensionShowOptions{})
cmd.Delete(&options.BillDimensionDeleteOptions{})
cmdAnalysis := shell.NewResourceCmd(modules.BillingDimensionAnalysisManager)
cmdAnalysis.List(&options.BillDimensionAnalysisListOptions{})
cmdAnalysis.Show(&options.BillDimensionAnalysisShowOptions{})
}

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 meter
import (
"yunion.io/x/onecloud/cmd/climc/shell"
"yunion.io/x/onecloud/pkg/mcclient/modules"
options "yunion.io/x/onecloud/pkg/mcclient/options/meter"
)
func init() {
cmd := shell.NewResourceCmd(&modules.CostConversions).WithKeyword("cost-conversion")
cmd.List(new(options.CostConversionListOptions))
cmd.Create(new(options.CostConversionCreateOptions))
cmd.Update(new(options.CostConversionUpdateOptions))
cmd.Delete(new(options.CostConversionDeleteOptions))
}

View File

@@ -17,6 +17,11 @@ package misc
import (
"fmt"
"yunion.io/x/jsonutils"
"yunion.io/x/pkg/errors"
"yunion.io/x/pkg/utils"
"yunion.io/x/onecloud/pkg/cloudprovider"
"yunion.io/x/onecloud/pkg/mcclient"
"yunion.io/x/onecloud/pkg/mcclient/modules"
"yunion.io/x/onecloud/pkg/mcclient/options"
@@ -35,6 +40,43 @@ func init() {
return nil
})
type VersionListOptions struct {
}
R(&VersionListOptions{}, "version-list", "query all backend service version", func(s *mcclient.ClientSession, args *VersionListOptions) error {
services := []jsonutils.JSONObject{}
params := map[string]interface{}{}
for {
params["offset"] = len(services)
resp, err := modules.ServicesV3.List(s, jsonutils.Marshal(params))
if err != nil {
return err
}
services = append(services, resp.Data...)
if len(services) >= resp.Total {
break
}
}
vers := map[string]string{}
for _, service := range services {
serviceType, _ := service.GetString("type")
if utils.IsInStringArray(serviceType, []string{"offlinecloudmeta"}) {
continue
}
ver, err := modules.GetVersion(s, serviceType)
if err != nil {
if errors.Cause(err) == cloudprovider.ErrNotFound || errors.Cause(err) == errors.ErrConnectRefused {
continue
}
vers[serviceType] = err.Error()
} else {
vers[serviceType] = ver
}
}
printObject(jsonutils.Marshal(vers))
return nil
})
R(&options.VersionListOptions{}, "yunionagent-version-list", "show versions of backend services", func(s *mcclient.ClientSession, opts *options.VersionListOptions) error {
if len(opts.Region) == 0 {
opts.Region = s.GetRegion()

View File

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

155
cmd/cloudmon/main.go Normal file
View File

@@ -0,0 +1,155 @@
package main
import (
"context"
"fmt"
"os"
"path"
"time"
"yunion.io/x/log"
"yunion.io/x/pkg/errors"
"yunion.io/x/pkg/util/version"
_ "yunion.io/x/onecloud/pkg/cloudmon/collectors"
"yunion.io/x/onecloud/pkg/cloudmon/collectors/common"
"yunion.io/x/onecloud/pkg/cloudmon/options"
"yunion.io/x/onecloud/pkg/mcclient"
)
func showErrorAndExit(e error) {
fmt.Fprintf(os.Stderr, "%s", e)
fmt.Fprintln(os.Stderr)
os.Exit(1)
}
func newClientSession(options *options.CloudMonOptions) (*mcclient.ClientSession, error) {
if len(options.AuthURL) == 0 {
return nil, errors.Error("empty auth_url")
}
if len(options.AdminUser) == 0 {
return nil, errors.Error("empty admin_user")
}
if len(options.AdminPassword) == 0 {
return nil, errors.Error("empty admin_password")
}
if len(options.AdminProject) == 0 {
return nil, errors.Error("empty admin_project")
}
client := mcclient.NewClient(
options.AuthURL,
options.Timeout,
options.Debug,
options.Insecure,
options.CertFile,
options.KeyFile,
)
token, err := client.AuthenticateWithSource(
options.AdminUser,
options.AdminPassword,
options.AdminDomain,
options.AdminProject,
options.AdminProjectDomain,
mcclient.AuthSourceAPI)
if err != nil {
return nil, err
}
session := client.NewSession(
context.Background(),
options.Region,
"",
options.EndpointType,
token,
options.ApiVersion)
return session, nil
}
func main() {
parser, err := options.GetArgumentParser()
if err != nil {
showErrorAndExit(err)
}
err = parser.ParseArgs2(os.Args[1:], false, false)
opts := parser.Options().(*options.CloudMonOptions)
if opts.Help {
fmt.Println(parser.HelpString())
os.Exit(0)
}
if opts.Version {
fmt.Println(version.GetJsonString())
os.Exit(0)
}
if len(opts.Config) == 0 {
for _, p := range []string{"./etc", "/etc/yunion"} {
confTmp := path.Join(p, "cloudmon.conf")
if _, err := os.Stat(confTmp); err == nil {
opts.Config = confTmp
break
}
}
}
if len(opts.Config) > 0 {
err := parser.ParseFile(opts.Config)
if err != nil {
showErrorAndExit(err)
}
}
if err != nil {
showErrorAndExit(err)
}
parser.SetDefault()
subcmd := parser.GetSubcommand()
subparser := subcmd.GetSubParser()
if err != nil {
if subparser != nil {
fmt.Print(subparser.Usage())
} else {
fmt.Print(parser.Usage())
}
showErrorAndExit(err)
}
suboptions := subparser.Options()
if opts.SUBCOMMAND == "help" {
err = subcmd.Invoke(suboptions)
} else {
timout := suboptions.(*common.ReportOptions).Timeout
endChan := make(chan int, 1)
go func() {
ticker := time.NewTicker(time.Duration(timout) * time.Second)
for {
select {
case <-ticker.C:
log.Errorf("cmd: %s,provider: %v,end due to timeout: %s s", opts.SUBCOMMAND,
suboptions.(*common.ReportOptions).Provider, suboptions.(*common.ReportOptions).Timeout)
os.Exit(3)
case <-endChan:
}
}
}()
var session *mcclient.ClientSession
session, err = newClientSession(opts)
if err != nil {
showErrorAndExit(err)
}
err = subcmd.Invoke(session, suboptions)
endChan <- 1
}
if err != nil {
showErrorAndExit(err)
}
}

View File

@@ -16,7 +16,6 @@ package shell
import (
"fmt"
"time"
"yunion.io/x/pkg/util/timeutils"
@@ -110,7 +109,7 @@ func init() {
}
fmt.Println("primary key hash:", fm.PrimaryKeyHash())
ret := fm.Decrypt([]byte(args.MSG), time.Hour*-1)
ret := fm.Decrypt([]byte(args.MSG))
if len(ret) == 0 {
return fmt.Errorf("invalid message")
}

147
cmd/hcsocli/main.go Normal file
View File

@@ -0,0 +1,147 @@
// Copyright 2019 Yunion
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package main
import (
"fmt"
"os"
"yunion.io/x/structarg"
"yunion.io/x/onecloud/pkg/cloudprovider"
huawei "yunion.io/x/onecloud/pkg/multicloud/hcso"
_ "yunion.io/x/onecloud/pkg/multicloud/hcso/shell"
"yunion.io/x/onecloud/pkg/util/shellutils"
)
type BaseOptions struct {
cloudprovider.SHCSOEndpoints
Help bool `help:"Show help" default:"false"`
Debug bool `help:"Show debug" default:"false"`
AccessKey string `help:"Access key" default:"$HUAWEI_ACCESS_KEY" metavar:"HUAWEI_ACCESS_KEY"`
Secret string `help:"Secret" default:"$HUAWEI_SECRET" metavar:"HUAWEI_SECRET"`
RegionId string `help:"RegionId" default:"$HUAWEI_REGION" metavar:"HUAWEI_REGION"`
ProjectId string `help:"ProjectId" default:"$HUAWEI_PROJECT" metavar:"HUAWEI_PROJECT"`
SUBCOMMAND string `help:"huaweicli subcommand" subcommand:"true"`
}
func getSubcommandParser() (*structarg.ArgumentParser, error) {
parse, e := structarg.NewArgumentParser(&BaseOptions{},
"huaweicli",
"Command-line interface to huawei API.",
`See "huaweicli help COMMAND" for help on a specific command.`)
if e != nil {
return nil, e
}
subcmd := parse.GetSubcommand()
if subcmd == nil {
return nil, fmt.Errorf("No subcommand argument.")
}
type HelpOptions struct {
SUBCOMMAND string `help:"sub-command name"`
}
shellutils.R(&HelpOptions{}, "help", "Show help of a subcommand", func(args *HelpOptions) error {
helpstr, e := subcmd.SubHelpString(args.SUBCOMMAND)
if e != nil {
return e
} else {
fmt.Print(helpstr)
return nil
}
})
for _, v := range shellutils.CommandTable {
_, e := subcmd.AddSubParser(v.Options, v.Command, v.Desc, v.Callback)
if e != nil {
return nil, e
}
}
return parse, nil
}
func showErrorAndExit(e error) {
fmt.Fprintf(os.Stderr, "%s", e)
fmt.Fprintln(os.Stderr)
os.Exit(1)
}
func newClient(options *BaseOptions) (*huawei.SRegion, error) {
if len(options.AccessKey) == 0 {
return nil, fmt.Errorf("Missing accessKey")
}
if len(options.Secret) == 0 {
return nil, fmt.Errorf("Missing secret")
}
cli, err := huawei.NewHuaweiClient(
huawei.NewHuaweiClientConfig(
options.AccessKey,
options.Secret,
options.ProjectId,
&options.SHCSOEndpoints,
).Debug(options.Debug),
)
if err != nil {
return nil, err
}
region := cli.GetRegion(options.RegionId)
if region == nil {
return nil, fmt.Errorf("No such region %s", options.RegionId)
}
return region, nil
}
func main() {
parser, e := getSubcommandParser()
if e != nil {
showErrorAndExit(e)
}
e = parser.ParseArgs(os.Args[1:], false)
options := parser.Options().(*BaseOptions)
if options.Help {
fmt.Print(parser.HelpString())
} else {
subcmd := parser.GetSubcommand()
subparser := subcmd.GetSubParser()
if e != nil {
if subparser != nil {
fmt.Print(subparser.Usage())
} else {
fmt.Print(parser.Usage())
}
showErrorAndExit(e)
} else {
suboptions := subparser.Options()
if options.SUBCOMMAND == "help" {
e = subcmd.Invoke(suboptions)
} else {
var region *huawei.SRegion
region, e = newClient(options)
if e != nil {
showErrorAndExit(e)
}
e = subcmd.Invoke(region, suboptions)
}
if e != nil {
showErrorAndExit(e)
}
}
}
}

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()
}

9
go.mod
View File

@@ -40,6 +40,7 @@ require (
github.com/coredns/coredns v1.3.0
github.com/coreos/go-systemd v0.0.0-20190620071333-e64a0ec8b42a // indirect
github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f // indirect
github.com/creack/pty v1.1.11
github.com/dnaeon/go-vcr v1.1.0 // indirect
github.com/dnstap/golang-dnstap v0.0.0-20170829151710-2cf77a2b5e11 // indirect
github.com/eapache/go-resiliency v1.1.0 // indirect
@@ -77,7 +78,6 @@ require (
github.com/imdario/mergo v0.3.6 // indirect
github.com/kardianos/osext v0.0.0-20190222173326-2bc1f35cddc0 // indirect
github.com/koding/websocketproxy v0.0.0-20181220232114-7ed82d81a28c
github.com/kr/pty v1.1.5
github.com/lestrrat-go/jwx v1.0.2
github.com/lestrrat/go-jwx v0.0.0-20180221005942-b7d4802280ae
github.com/lestrrat/go-pdebug v0.0.0-20180220043741-569c97477ae8 // indirect
@@ -113,6 +113,7 @@ require (
github.com/smartystreets/goconvey v1.6.4
github.com/spaolacci/murmur3 v1.1.0 // indirect
github.com/stretchr/testify v1.5.1
github.com/tatsushid/go-fastping v0.0.0-20160109021039-d7bb493dee3e
github.com/tencentcloud/tencentcloud-sdk-go v3.0.135+incompatible
github.com/tencentyun/cos-go-sdk-v5 v0.7.24
github.com/tinylib/msgp v1.1.0 // indirect
@@ -147,12 +148,12 @@ require (
k8s.io/client-go v0.19.3
k8s.io/cluster-bootstrap v0.19.3
yunion.io/x/executor v0.0.0-20210310041834-3fcd1574f68e
yunion.io/x/jsonutils v0.0.0-20201110084044-3e4e1cb49769
yunion.io/x/jsonutils v0.0.0-20210709075951-798a67800349
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-20210218105412-13a69f60034c
yunion.io/x/pkg v0.0.0-20210721081124-55078288ca4c
yunion.io/x/s3cli v0.0.0-20190917004522-13ac36d8687e
yunion.io/x/sqlchemy v0.0.0-20210401131841-cdb9ab689824
yunion.io/x/sqlchemy v0.0.0-20210619142628-653684d2c4f8
yunion.io/x/structarg v0.0.0-20200720093445-9f850fa222ce
)

29
go.sum
View File

@@ -2,14 +2,12 @@ bazil.org/fuse v0.0.0-20180421153158-65cc252bf669 h1:FNCRpXiquG1aoyqcIWVFmpTSKVc
bazil.org/fuse v0.0.0-20180421153158-65cc252bf669/go.mod h1:Xbm+BRKSBEpa4q4hTSxohYNQpsxXPbPry4JJWOB3LB8=
cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw=
cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw=
cloud.google.com/go v0.38.0 h1:ROfEUZz+Gh5pa62DJWXSaonyu3StP6EA6lPEXPI6mCo=
cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU=
cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU=
cloud.google.com/go v0.44.1/go.mod h1:iSa0KzasP4Uvy3f1mN/7PiObzGgflwredwwASm/v6AU=
cloud.google.com/go v0.44.2/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY=
cloud.google.com/go v0.45.1/go.mod h1:RpBamKRgapWJb87xiFSdk4g1CME7QZg3uwTez+TSTjc=
cloud.google.com/go v0.46.3/go.mod h1:a6bKKbmY7er1mI7TEI4lsAkts/mkhTSZK8w33B4RAg0=
cloud.google.com/go v0.50.0 h1:0E3eE8MX426vUOs7aHfI7aN1BrIzzzf4ccKCSfSjGmc=
cloud.google.com/go v0.50.0/go.mod h1:r9sluTvynVuxRIOHXQEHMFffphuXHOMZMycpNR5e6To=
cloud.google.com/go v0.51.0 h1:PvKAVQWCtlGUSlZkGW3QLelKaWq7KYv/MW1EboG8bfM=
cloud.google.com/go v0.51.0/go.mod h1:hWtGJ6gnXH+KgDv+V0zFGDvpi07n3z8ZNj3T1RW0Gcw=
@@ -32,16 +30,12 @@ github.com/Azure/azure-sdk-for-go v36.1.0+incompatible h1:smHlbChr/JDmsyUqELZXLs
github.com/Azure/azure-sdk-for-go v36.1.0+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc=
github.com/Azure/go-autorest v14.2.0+incompatible h1:V5VMDjClD3GiElqLWO7mz2MxNAK/vTfRHdAubSIPRgs=
github.com/Azure/go-autorest v14.2.0+incompatible/go.mod h1:r+4oMnoxhatjLLJ6zxSWATqVooLgysK6ZNox3g/xq24=
github.com/Azure/go-autorest/autorest v0.9.0 h1:MRvx8gncNaXJqOoLmhNjUAKh33JJF8LyxPhomEtOsjs=
github.com/Azure/go-autorest/autorest v0.9.0/go.mod h1:xyHB1BMZT0cuDHU7I0+g046+BFDTQ8rEZB0s4Yfa6bI=
github.com/Azure/go-autorest/autorest v0.9.3 h1:OZEIaBbMdUE/Js+BQKlpO81XlISgipr6yDJ+PSwsgi4=
github.com/Azure/go-autorest/autorest v0.9.3/go.mod h1:GsRuLYvwzLjjjRoWEIyMUaYq8GNUx2nRB378IPt/1p0=
github.com/Azure/go-autorest/autorest v0.9.6 h1:5YWtOnckcudzIw8lPPBcWOnmIFWMtHci1ZWAZulMSx0=
github.com/Azure/go-autorest/autorest v0.9.6/go.mod h1:/FALq9T/kS7b5J5qsQ+RSTUdAmGFqi0vUdVNNx8q630=
github.com/Azure/go-autorest/autorest/adal v0.5.0 h1:q2gDruN08/guU9vAjuPWff0+QIrpH6ediguzdAzXAUU=
github.com/Azure/go-autorest/autorest/adal v0.5.0/go.mod h1:8Z9fGy2MpX0PvDjB1pEgQTmVqjGhiHBW7RJJEciWzS0=
github.com/Azure/go-autorest/autorest/adal v0.8.0/go.mod h1:Z6vX6WXXuyieHAXwMj0S6HY6e6wcHn37qQMBQlvY3lc=
github.com/Azure/go-autorest/autorest/adal v0.8.1 h1:pZdL8o72rK+avFWl+p9nE8RWi1JInZrWJYlnpfXJwHk=
github.com/Azure/go-autorest/autorest/adal v0.8.1/go.mod h1:ZjhuQClTqx435SRJ2iMlOxPYt3d2C/T/7TiQCVZSn3Q=
github.com/Azure/go-autorest/autorest/adal v0.8.2 h1:O1X4oexUxnZCaEUGsvMnr8ZGj8HI37tNezwY4npRqA0=
github.com/Azure/go-autorest/autorest/adal v0.8.2/go.mod h1:ZjhuQClTqx435SRJ2iMlOxPYt3d2C/T/7TiQCVZSn3Q=
@@ -49,12 +43,10 @@ github.com/Azure/go-autorest/autorest/azure/auth v0.4.2 h1:iM6UAvjR97ZIeR93qTcwp
github.com/Azure/go-autorest/autorest/azure/auth v0.4.2/go.mod h1:90gmfKdlmKgfjUpnCEpOJzsUEjrWDSLwHIG73tSXddM=
github.com/Azure/go-autorest/autorest/azure/cli v0.3.1 h1:LXl088ZQlP0SBppGFsRZonW6hSvwgL5gRByMbvUbx8U=
github.com/Azure/go-autorest/autorest/azure/cli v0.3.1/go.mod h1:ZG5p860J94/0kI9mNJVoIoLgXcirM2gF5i2kWloofxw=
github.com/Azure/go-autorest/autorest/date v0.1.0 h1:YGrhWfrgtFs84+h0o46rJrlmsZtyZRg470CqAXTZaGM=
github.com/Azure/go-autorest/autorest/date v0.1.0/go.mod h1:plvfp3oPSKwf2DNjlBjWF/7vwR+cUD/ELuzDCXwHUVA=
github.com/Azure/go-autorest/autorest/date v0.2.0 h1:yW+Zlqf26583pE43KhfnhFcdmSWlm5Ew6bxipnr/tbM=
github.com/Azure/go-autorest/autorest/date v0.2.0/go.mod h1:vcORJHLJEh643/Ioh9+vPmf1Ij9AEBM5FuBIXLmIy0g=
github.com/Azure/go-autorest/autorest/mocks v0.1.0/go.mod h1:OTyCOPRA2IgIlWxVYxBee2F5Gr4kF2zd2J5cFRaIDN0=
github.com/Azure/go-autorest/autorest/mocks v0.2.0 h1:Ww5g4zThfD/6cLb4z6xxgeyDa7QDkizMkJKe0ysZXp0=
github.com/Azure/go-autorest/autorest/mocks v0.2.0/go.mod h1:OTyCOPRA2IgIlWxVYxBee2F5Gr4kF2zd2J5cFRaIDN0=
github.com/Azure/go-autorest/autorest/mocks v0.3.0 h1:qJumjCaCudz+OcqE9/XtEPfvtOjOmKaui4EOpFI6zZc=
github.com/Azure/go-autorest/autorest/mocks v0.3.0/go.mod h1:a8FDP3DYzQ4RYfVAxAN3SVSiiO77gL2j2ronKKP0syM=
@@ -180,6 +172,8 @@ github.com/coreos/pkg v0.0.0-20160727233714-3ac0863d7acf/go.mod h1:E3G3o1h8I7cfc
github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f h1:lBNOc5arjvs8E5mO2tbpBpLoyyu8B6e44T7hJy6potg=
github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA=
github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY=
github.com/creack/pty v1.1.11 h1:07n33Z8lZxZ2qwegKbObQohDhXDQxiMMz1NOUGYlesw=
github.com/creack/pty v1.1.11/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
@@ -405,8 +399,6 @@ github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORN
github.com/kr/pretty v0.2.0 h1:s5hAObm+yFO5uHYt5dYjxi2rXrsnmRpJx4OYvIWUaQs=
github.com/kr/pretty v0.2.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI=
github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
github.com/kr/pty v1.1.5 h1:hyz3dwM5QLc1Rfoz4FuWJQG5BN7tc6K1MndAUnGpQr4=
github.com/kr/pty v1.1.5/go.mod h1:9r2w37qlBe7rQ6e1fg1S/9xpWHSnaqNdHD3WcMdbPDA=
github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE=
github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
github.com/leodido/go-urn v1.1.0 h1:Sm1gr51B1kKyfD2BlRcLSiEkffoG96g6TPv6eRoEiB8=
@@ -586,6 +578,8 @@ github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81P
github.com/stretchr/testify v1.5.1 h1:nOGnQDM7FYENwehXlg/kFVnos3rEvtKTjRvOWSzb6H4=
github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA=
github.com/syncthing/syncthing v0.14.48-rc.4/go.mod h1:nw3siZwHPA6M8iSfjDCWQ402eqvEIasMQOE8nFOxy7M=
github.com/tatsushid/go-fastping v0.0.0-20160109021039-d7bb493dee3e h1:nt2877sKfojlHCTOBXbpWjBkuWKritFaGIfgQwbQUls=
github.com/tatsushid/go-fastping v0.0.0-20160109021039-d7bb493dee3e/go.mod h1:B4+Kq1u5FlULTjFSM707Q6e/cOHFv0z/6QRoxubDIQ8=
github.com/tencentcloud/tencentcloud-sdk-go v3.0.135+incompatible h1:QIMoFqKCmNp4HPLiTR+couZbHsIZfoOllncHYvtqse8=
github.com/tencentcloud/tencentcloud-sdk-go v3.0.135+incompatible/go.mod h1:0PfYow01SHPMhKY31xa+EFz2RStxIqj6JFAJS+IkCi4=
github.com/tencentyun/cos-go-sdk-v5 v0.7.24 h1:ZsZij764lOaPsj7mEAlyxXvslGt6/m312Tzqj/zeRpo=
@@ -701,10 +695,8 @@ golang.org/x/net v0.0.0-20190827160401-ba9fcec4b297/go.mod h1:z5CRVTTTmAJ677TzLL
golang.org/x/net v0.0.0-20191003171128-d98b1b443823/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
golang.org/x/net v0.0.0-20191007182048-72f939374954/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
golang.org/x/net v0.0.0-20200226121028-0de0cce0169b h1:0mm1VjtFUOIlE1SbDlwjYaDxZVDP2S5ou6y0gSgXHu8=
golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A=
golang.org/x/net v0.0.0-20200707034311-ab3426394381 h1:VXak5I6aEWmAXeQjA+QSZzlgNrpq9mjcfDemuexIKsU=
golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA=
golang.org/x/net v0.0.0-20201110031124-69a78807bb2b h1:uwuIcX0g4Yl1NC5XAz37xsr2lTtcqevgzYNVt49waME=
golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=
@@ -750,7 +742,6 @@ golang.org/x/sys v0.0.0-20191008105621-543471e840be/go.mod h1:h1NjWce9XRLGQEsW7w
golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200622214017-ed371f2e16b4 h1:5/PjkGUjvEU5Gl6BxmvKRPpqo2uNMv4rcHBMwzk/st8=
golang.org/x/sys v0.0.0-20200622214017-ed371f2e16b4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f h1:+Nyd8tzPX9R7BWHguqsrbFdRx3WQ/1ib8I44HXV5yTA=
golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
@@ -913,8 +904,8 @@ sigs.k8s.io/yaml v1.2.0/go.mod h1:yfXDCHCao9+ENCvLSE62v9VSji2MKu5jeNfTrofGhJc=
yunion.io/x/executor v0.0.0-20210310041834-3fcd1574f68e h1:uGmKmmHm4zeLXhc/MEbAFtEDtGtyEYhC0OaBRGFi+fQ=
yunion.io/x/executor v0.0.0-20210310041834-3fcd1574f68e/go.mod h1:Uxuou9WQIeJXNpy7t2fPLL0BYLvLiMvGQwY7Qc6aSws=
yunion.io/x/jsonutils v0.0.0-20190625054549-a964e1e8a051/go.mod h1:4N0/RVzsYL3kH3WE/H1BjUQdFiWu50JGCFQuuy+Z634=
yunion.io/x/jsonutils v0.0.0-20201110084044-3e4e1cb49769 h1:LIQ4hhLGQuQK+XxlV+8JrKBuL37WUT+5ZTVxBwHOTD4=
yunion.io/x/jsonutils v0.0.0-20201110084044-3e4e1cb49769/go.mod h1:p0nyMqGA/apTxxyLIU/o1k4V7Vujl2O6ey30L594sYE=
yunion.io/x/jsonutils v0.0.0-20210709075951-798a67800349 h1:ESeezAb9LM2Dcy28DDrD2nI+h22qEf4MyAPXwuDO4uM=
yunion.io/x/jsonutils v0.0.0-20210709075951-798a67800349/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/go.mod h1:LC6f/4FozL0iaAbnFt2eDX9jlsyo3WiOUPm03d7+U4U=
yunion.io/x/log v0.0.0-20201210064738-43181789dc74 h1:7D+sQ/XaUTUEm+NCrKXOhXBKlzEd0RyS2qZ4vBGjx2o=
@@ -924,11 +915,11 @@ yunion.io/x/ovsdb v0.0.0-20200526071744-27bf0940cbc7/go.mod h1:0vLkNEhlmA64HViPB
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/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/pkg v0.0.0-20210721081124-55078288ca4c h1:/ejlt78/0xod4bdkEThUuYsQ7vLajd48wpL2GMMSaXs=
yunion.io/x/pkg v0.0.0-20210721081124-55078288ca4c/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-20210401131841-cdb9ab689824 h1:3/VcCiO+vr3+zZFLNvre41ARF2xE6NVq6Ue7JPFuJvU=
yunion.io/x/sqlchemy v0.0.0-20210401131841-cdb9ab689824/go.mod h1:FTdwPdGhMgh4E+UFXc9klI1Ok34fMuybTT+jLhOaIjI=
yunion.io/x/sqlchemy v0.0.0-20210619142628-653684d2c4f8 h1:+kywPlOttXAZvbxsVqR73B5GbSVgG3Xdo4socLWRkcg=
yunion.io/x/sqlchemy v0.0.0-20210619142628-653684d2c4f8/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

@@ -138,26 +138,17 @@ func (ai *SAnsiblePlaybookInstance) runPlaybook(ctx context.Context, userCred mc
return errors.Wrap(err, "unable to update ansibleplaybookinstance")
}
convertJO := func(o jsonutils.JSONObject) map[string]interface{} {
if o == nil {
return map[string]interface{}{}
}
ret := make(map[string]interface{})
o.Unmarshal(&ret)
return ret
}
// merge configs
params := make(map[string]interface{})
for k, v := range convertJO(ar.DefaultParams) {
params[k] = v
}
for k, v := range convertJO(ai.Params) {
params[k] = v
dp, params := ar.DefaultParams.(*jsonutils.JSONDict), ai.Params.(*jsonutils.JSONDict)
for _, k := range dp.SortedKeys() {
v, _ := dp.Get(k)
params.Set(k, v)
}
ar.DefaultParams.(*jsonutils.JSONDict).SortedKeys()
sess := ansiblev2.NewOfflineSession().
Inventory(ai.Inventory).
PrivateKey(privateKey).
Configs(params).
ConfigYaml(params.YAMLString()).
PlaybookPath(ar.PlaybookPath).
OutputWriter(&ansiblePlaybookOutputWriter{ai}).
KeepTmpdir(options.Options.KeepTmpdir)

View File

@@ -121,7 +121,7 @@ func (man *SAnsiblePlaybookManager) InitializeData() error {
return nil
}
func (apb *SAnsiblePlaybook) ValidateDeleteCondition(ctx context.Context) error {
func (apb *SAnsiblePlaybook) ValidateDeleteCondition(ctx context.Context, info jsonutils.JSONObject) error {
if apb.Status == api.AnsiblePlaybookStatusRunning {
return httperrors.NewConflictError("playbook is in running state")
}

View File

@@ -118,7 +118,7 @@ func (man *SAnsiblePlaybookV2Manager) InitializeData() error {
return nil
}
func (apb *SAnsiblePlaybookV2) ValidateDeleteCondition(ctx context.Context) error {
func (apb *SAnsiblePlaybookV2) ValidateDeleteCondition(ctx context.Context, info jsonutils.JSONObject) error {
if apb.Status == api.AnsiblePlaybookStatusRunning {
return httperrors.NewConflictError("playbook is in running state")
}

View File

@@ -275,7 +275,7 @@ func (t *SAuthToken) VerifyTotpPasscode(s *mcclient.ClientSession, uid, passcode
}
t.updateRetryCount()
return errors.Wrap(httperrors.ErrInvalidCredential, "invalid passcode")
return errors.Wrap(httperrors.ErrInputParameter, "invalid passcode")
}
func SignJWT(t jwt.Token) (string, error) {

View File

@@ -141,7 +141,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)

View File

@@ -260,7 +260,7 @@ func validatePasscodeHandler(ctx context.Context, w http.ResponseWriter, req *ht
if err != nil {
log.Warningf("VerifyTotpPasscode %s", err.Error())
httperrors.InvalidCredentialError(ctx, w, "invalid passcode: %v", err)
httperrors.InputParameterError(ctx, w, "invalid passcode: %v", err)
return
}

View File

@@ -116,7 +116,7 @@ func (h *AuthHandlers) getIdpSsoRedirectUri(ctx context.Context, w http.Response
}
func findExtUserId(input string) string {
pattern := regexp.MustCompile(`idp.SyncOrCreateDomainAndUser: ([^:]+): UserNotFoundError`)
pattern := regexp.MustCompile(`idp.SyncOrCreateDomainAndUser: ([^:]+): UserNotFound`)
matches := pattern.FindAllStringSubmatch(input, -1)
log.Debugf("%#v", matches)
if len(matches) > 0 && len(matches[0]) > 1 {

View File

@@ -22,7 +22,7 @@ func TestFindExtUserId(t *testing.T) {
want string
}{
{
in: "authUserByCASV3: Authenticate: idp.SyncOrCreateDomainAndUser: qiujian: UserNotFoundError",
in: "authUserByCASV3: Authenticate: idp.SyncOrCreateDomainAndUser: qiujian: UserNotFound",
want: "qiujian",
},
}

View File

@@ -22,6 +22,7 @@ import (
"yunion.io/x/jsonutils"
"yunion.io/x/log"
"yunion.io/x/pkg/utils"
"yunion.io/x/onecloud/pkg/appsrv"
"yunion.io/x/onecloud/pkg/httperrors"
@@ -190,45 +191,62 @@ func (f *ResourceHandlers) listHandler(ctx context.Context, w http.ResponseWrite
func (f *ResourceHandlers) doList(ctx context.Context, session *mcclient.ClientSession, module modulebase.IBaseManager, query jsonutils.JSONObject, w http.ResponseWriter, r *http.Request) {
var exportKeys []string
var exportTexts []string
exportFormat, _ := query.GetString("export")
if len(exportFormat) > 0 {
exportKeyStr, _ := query.GetString("export_keys")
exportTextStr, _ := query.GetString("export_texts")
if len(exportKeyStr) > 0 {
exportKeys = strings.Split(exportKeyStr, ",")
export := struct {
ExportFormat string `json:"export"`
ExportKeys string `json:"export_keys"`
ExportTexts string `json:"export_texts"`
}{}
query.Unmarshal(&export)
if len(export.ExportFormat) > 0 {
if len(export.ExportKeys) > 0 {
exportKeys = strings.Split(export.ExportKeys, ",")
}
if len(exportTextStr) > 0 {
exportTexts = strings.Split(exportTextStr, ",")
if len(export.ExportTexts) > 0 {
exportTexts = strings.Split(export.ExportTexts, ",")
}
if len(exportKeys) == 0 {
httperrors.InvalidInputError(ctx, w, "missing export keys")
return
} else if len(exportKeys) != len(exportTexts) {
if len(exportTexts) == 0 {
exportTexts = exportKeys
} else {
httperrors.InvalidInputError(ctx, w, "inconsistent export keys and texts")
return
}
}
if len(exportTexts) == 0 {
exportTexts = exportKeys
}
if len(exportKeys) != len(exportTexts) {
httperrors.InvalidInputError(ctx, w, "inconsistent export keys and texts")
return
}
queryDict := query.(*jsonutils.JSONDict)
queryDict.Remove("export")
queryDict.Remove("export_texts")
keys := []string{}
for _, key := range exportKeys {
if !strings.Contains(key, ".") {
keys = append(keys, key)
continue
}
key = strings.Split(key, ".")[0]
if !utils.IsInStringArray(key, keys) {
keys = append(keys, key)
}
}
queryDict.Set("export_keys", jsonutils.NewString(strings.Join(keys, ",")))
query = queryDict
}
ret, e := module.List(session, query)
if e != nil {
httperrors.GeneralServerError(ctx, w, e)
} else if len(exportFormat) > 0 {
return
}
if len(export.ExportFormat) > 0 {
w.Header().Set("Content-Description", "File Transfer")
w.Header().Set("Content-Transfer-Encoding", "binary")
w.Header().Set("Content-Type", "application/octet-stream")
w.Header().Set("Content-Disposition", fmt.Sprintf("attachment; filename=\"export-%s.xlsx\"", module.KeyString()))
excelutils.Export(ret.Data, exportKeys, exportTexts, w)
} else {
appsrv.SendJSON(w, modulebase.ListResult2JSON(ret))
return
}
appsrv.SendJSON(w, modulebase.ListResult2JSON(ret))
}
// get single
@@ -787,7 +805,7 @@ func (f *ResourceHandlers) detachHandle(ctx context.Context, w http.ResponseWrit
jmod, e := modulebase.GetJointModule2(session, module, module2)
var obj jsonutils.JSONObject
if e == nil { // joint detach
obj, e = jmod.Detach(session, req.ResID(), req.ResID2(), nil)
obj, e = jmod.Detach(session, req.ResID(), req.ResID2(), req.Query())
} else {
obj, e = module2.DeleteInContextWithParam(session, req.ResID2(), req.Query(), req.Body(), module, req.ResID())
}

View File

@@ -101,7 +101,7 @@ func (h *APIHelper) doSync(ctx context.Context) (changed bool, err error) {
s := h.adminClientSession(ctx)
mss := h.modelSets.Copy()
r, err := SyncModelSets(mss, s, h.opts.ListBatchSize)
r, err := SyncModelSets(mss, s, h.opts)
if err != nil {
return false, err
}

View File

@@ -15,6 +15,8 @@
package apihelper
import (
"yunion.io/x/jsonutils"
"yunion.io/x/onecloud/pkg/cloudcommon/db"
mcclient "yunion.io/x/onecloud/pkg/mcclient"
mcclient_modulebase "yunion.io/x/onecloud/pkg/mcclient/modulebase"
@@ -44,7 +46,15 @@ type IModelSetEmulatedIncluder interface {
IncludeEmulated() bool
}
func SyncModelSets(mssOld IModelSets, s *mcclient.ClientSession, batchSize int) (r ModelSetsUpdateResult, err error) {
type IModelSetFilter interface {
ModelFilter() []string
}
type IModelListParam interface {
ModelParamFilter() jsonutils.JSONObject
}
func SyncModelSets(mssOld IModelSets, s *mcclient.ClientSession, opt *Options) (r ModelSetsUpdateResult, err error) {
mss := mssOld.ModelSetList()
mssNews := mssOld.NewEmpty()
for i, msNew := range mssNews.ModelSetList() {
@@ -60,10 +70,11 @@ func SyncModelSets(mssOld IModelSets, s *mcclient.ClientSession, batchSize int)
ModelManager: msNew.ModelManager(),
MinUpdatedAt: minUpdatedAt,
ModelSet: msNew,
BatchListSize: batchSize,
BatchListSize: opt.ListBatchSize,
IncludeDetails: false,
IncludeEmulated: includeEmulated,
IncludeDetails: opt.IncludeDetails,
IncludeEmulated: includeEmulated,
InCludeOtherCloudEnv: opt.IncludeOtherCloudEnv,
})
if err != nil {
return

View File

@@ -21,6 +21,8 @@ import (
type Options struct {
common_options.CommonOptions
SyncInterval int
ListBatchSize int
SyncInterval int
ListBatchSize int
IncludeDetails bool
IncludeOtherCloudEnv bool
}

View File

@@ -38,10 +38,11 @@ type GetModelsOptions struct {
ModelManager mcclient_modulebase.IBaseManager
ModelSet IModelSet
BatchListSize int
MinUpdatedAt time.Time
IncludeDetails bool
IncludeEmulated bool
BatchListSize int
MinUpdatedAt time.Time
IncludeDetails bool
IncludeEmulated bool
InCludeOtherCloudEnv bool
}
func GetModels(opts *GetModelsOptions) error {
@@ -106,15 +107,23 @@ func GetModels(opts *GetModelsOptions) error {
ShowEmulated: options.Bool(opts.IncludeEmulated),
Filter: []string{
minUpdatedAtFilter(minUpdatedAt), // order matters, filter.0
"manager_id.isnullorempty()", // len(manager_id) > 0 is for pubcloud objects
"external_id.isnullorempty()", // len(external_id) > 0 is for pubcloud objects
"cloud_env=onpremise",
},
OrderBy: []string{"updated_at"},
Order: "asc",
Limit: options.Int(opts.BatchListSize),
Offset: options.Int(0),
}
if !opts.InCludeOtherCloudEnv {
listOptions.Filter = append(listOptions.Filter,
"manager_id.isnullorempty()", // len(manager_id) > 0 is for pubcloud objects
"external_id.isnullorempty()", // len(external_id) > 0 is for pubcloud objects
"cloud_env=onpremise",
)
}
if inter, ok := opts.ModelSet.(IModelSetFilter); ok {
filter := inter.ModelFilter()
listOptions.Filter = append(listOptions.Filter, filter...)
}
if !minUpdatedAt.Equal(PseudoZeroTime) {
// Only fetching pending deletes when we are doing incremental fetch
listOptions.PendingDeleteAll = options.Bool(true)
@@ -124,6 +133,10 @@ func GetModels(opts *GetModelsOptions) error {
if err != nil {
return fmt.Errorf("%s: making list params: %s", manKeyPlural, err)
}
if inter, ok := opts.ModelSet.(IModelListParam); ok {
filter := inter.ModelParamFilter()
params.Update(filter)
}
//XXX
//params.Set(api.LBAGENT_QUERY_ORIG_KEY, jsonutils.NewString(api.LBAGENT_QUERY_ORIG_VAL))

View File

@@ -29,12 +29,13 @@ const (
DEFAULT_DISK_TYPE = DISK_TYPE_ROTATE
DISK_DRIVER_MEGARAID = "MegaRaid"
DISK_DRIVER_LINUX = "Linux"
DISK_DRIVER_HPSARAID = "HPSARaid"
DISK_DRIVER_MPT2SAS = "Mpt2SAS"
DISK_DRIVER_MARVELRAID = "MarvelRaid"
DISK_DRIVER_PCIE = "PCIE"
DISK_DRIVER_MEGARAID = "MegaRaid"
DISK_DRIVER_LINUX = "Linux"
DISK_DRIVER_HPSARAID = "HPSARaid"
DISK_DRIVER_MPT2SAS = "Mpt2SAS"
DISK_DRIVER_MARVELRAID = "MarvelRaid"
DISK_DRIVER_ADAPTECRAID = "AdaptecRaid"
DISK_DRIVER_PCIE = "PCIE"
HDD_DISK_SPEC_TYPE = "HDD"
SSD_DISK_SPEC_TYPE = "SSD"
@@ -60,6 +61,7 @@ var (
DISK_DRIVER_HPSARAID,
DISK_DRIVER_MPT2SAS,
DISK_DRIVER_MARVELRAID,
DISK_DRIVER_ADAPTECRAID,
)
DISK_DRIVERS = sets.NewString(

View File

@@ -480,5 +480,6 @@ type CloudaccountEnableAutoSyncInput struct {
type CloudaccountProjectMappingInput struct {
// 同步策略Id, 若不传此参数则解绑
// 绑定同步策略要求当前云账号此刻未绑定其他同步策略
ProjectMappingId string `json:"project_mapping_id"`
}

View File

@@ -44,6 +44,7 @@ const (
CLOUD_PROVIDER_AZURE = "Azure"
CLOUD_PROVIDER_AWS = "Aws"
CLOUD_PROVIDER_HUAWEI = "Huawei"
CLOUD_PROVIDER_HCSO = "HCSO"
CLOUD_PROVIDER_OPENSTACK = "OpenStack"
CLOUD_PROVIDER_UCLOUD = "Ucloud"
CLOUD_PROVIDER_ZSTACK = "ZStack"
@@ -94,7 +95,7 @@ const (
var (
CLOUD_PROVIDER_VALID_STATUS = []string{CLOUD_PROVIDER_CONNECTED}
CLOUD_PROVIDER_VALID_HEALTH_STATUS = []string{CLOUD_PROVIDER_HEALTH_NORMAL, CLOUD_PROVIDER_HEALTH_NO_PERMISSION}
PRIVATE_CLOUD_PROVIDERS = []string{CLOUD_PROVIDER_ZSTACK, CLOUD_PROVIDER_OPENSTACK, CLOUD_PROVIDER_APSARA}
PRIVATE_CLOUD_PROVIDERS = []string{CLOUD_PROVIDER_ZSTACK, CLOUD_PROVIDER_OPENSTACK, CLOUD_PROVIDER_APSARA, CLOUD_PROVIDER_HCSO}
CLOUD_PROVIDERS = []string{
CLOUD_PROVIDER_ONECLOUD,
@@ -105,6 +106,7 @@ var (
CLOUD_PROVIDER_AZURE,
CLOUD_PROVIDER_AWS,
CLOUD_PROVIDER_HUAWEI,
CLOUD_PROVIDER_HCSO,
CLOUD_PROVIDER_OPENSTACK,
CLOUD_PROVIDER_UCLOUD,
CLOUD_PROVIDER_ZSTACK,
@@ -140,6 +142,9 @@ var (
CLOUD_PROVIDER_HUAWEI: []string{
HOST_TYPE_HUAWEI,
},
CLOUD_PROVIDER_HCSO: {
HOST_TYPE_HCSO,
},
CLOUD_PROVIDER_OPENSTACK: []string{
HOST_TYPE_OPENSTACK,
},

View File

@@ -137,6 +137,8 @@ type CloudproviderDetails struct {
// 子订阅品牌信息
Brand string `json:"brand"`
ProjectMappingResourceInfo
}
// 云订阅输入参数

View File

@@ -17,8 +17,11 @@ package compute
import (
"time"
"yunion.io/x/pkg/util/fileutils"
"yunion.io/x/onecloud/pkg/apis"
"yunion.io/x/onecloud/pkg/apis/billing"
"yunion.io/x/onecloud/pkg/httperrors"
)
type DiskCreateInput struct {
@@ -249,3 +252,16 @@ type DiskSaveInput struct {
// swagger: ignore
ImageId string
}
type DiskResizeInput struct {
// default unit: Mb
// example: 1024; 40G; 1024M
Size string `json:"size"`
}
func (self DiskResizeInput) SizeMb() (int, error) {
if len(self.Size) == 0 {
return 0, httperrors.NewMissingParameterError("size")
}
return fileutils.GetSizeMb(self.Size, 'M', 1024)
}

View File

@@ -125,7 +125,7 @@ type DnsZoneDetails struct {
// 关联vpc数量
VpcCount int `json:"vpc_count"`
// Cache info
CloudCaches []DnsZoneCacheDetails `json:"cloud_caches"`
CloudCaches []jsonutils.JSONObject `json:"cloud_caches"`
}
type DnsZoneListInput struct {
@@ -141,7 +141,8 @@ type DnsZoneListInput struct {
ZoneType string `json:"zone_type"`
// Filter dns zone By vpc
VpcId string `json:"vpc_id"`
VpcId string `json:"vpc_id"`
WithCache bool `json:"with_cache"`
}
type DnsZoneSyncStatusInput struct {

View File

@@ -36,6 +36,9 @@ const (
// 删除中
NAS_STATUS_DELETING = "deleting"
NAS_STATUS_DELETE_FAILED = "delete_failed"
NAS_UPDATE_TAGS = "update_tags"
NAS_UPDATE_TAGS_FAILED = "update_tags_fail"
)
type FileSystemListInput struct {
@@ -104,3 +107,8 @@ type FileSystemDetails struct {
Network string
Zone string
}
type FileSystemRemoteUpdateInput struct {
// 是否覆盖替换所有标签
ReplaceTags *bool `json:"replace_tags" help:"replace all remote tags"`
}

View File

@@ -159,6 +159,7 @@ const (
HYPERVISOR_AZURE = "azure"
HYPERVISOR_AWS = "aws"
HYPERVISOR_HUAWEI = "huawei"
HYPERVISOR_HCSO = "hcso"
HYPERVISOR_OPENSTACK = "openstack"
HYPERVISOR_UCLOUD = "ucloud"
HYPERVISOR_ZSTACK = "zstack"
@@ -189,6 +190,7 @@ var HYPERVISORS = []string{
HYPERVISOR_AWS,
HYPERVISOR_QCLOUD,
HYPERVISOR_HUAWEI,
HYPERVISOR_HCSO,
HYPERVISOR_OPENSTACK,
HYPERVISOR_UCLOUD,
HYPERVISOR_ZSTACK,
@@ -219,6 +221,7 @@ var PRIVATE_CLOUD_HYPERVISORS = []string{
HYPERVISOR_ZSTACK,
HYPERVISOR_OPENSTACK,
HYPERVISOR_APSARA,
HYPERVISOR_HCSO,
}
// var HYPERVISORS = []string{HYPERVISOR_ALIYUN}
@@ -234,6 +237,7 @@ var HYPERVISOR_HOSTTYPE = map[string]string{
HYPERVISOR_AWS: HOST_TYPE_AWS,
HYPERVISOR_QCLOUD: HOST_TYPE_QCLOUD,
HYPERVISOR_HUAWEI: HOST_TYPE_HUAWEI,
HYPERVISOR_HCSO: HOST_TYPE_HCSO,
HYPERVISOR_OPENSTACK: HOST_TYPE_OPENSTACK,
HYPERVISOR_UCLOUD: HOST_TYPE_UCLOUD,
HYPERVISOR_ZSTACK: HOST_TYPE_ZSTACK,
@@ -253,6 +257,7 @@ var HOSTTYPE_HYPERVISOR = map[string]string{
HOST_TYPE_AWS: HYPERVISOR_AWS,
HOST_TYPE_QCLOUD: HYPERVISOR_QCLOUD,
HOST_TYPE_HUAWEI: HYPERVISOR_HUAWEI,
HOST_TYPE_HCSO: HYPERVISOR_HCSO,
HOST_TYPE_OPENSTACK: HYPERVISOR_OPENSTACK,
HOST_TYPE_UCLOUD: HYPERVISOR_UCLOUD,
HOST_TYPE_ZSTACK: HYPERVISOR_ZSTACK,

View File

@@ -4,6 +4,8 @@ const (
MIRROR_JOB = "__mirror_job_status"
MIRROR_JOB_READY = "ready"
MIRROR_JOB_FAILED = "failed"
SSH_PORT = "__ssh_port"
)
const BASE_INSTANCE_SNAPSHOT_ID = "__base_instance_snapshot_id"

View File

@@ -48,6 +48,7 @@ type GuestMakeSshableInput struct {
User string
PrivateKey string
Password string
Port int
}
type GuestMakeSshableOutput struct {
@@ -57,3 +58,7 @@ type GuestMakeSshableOutput struct {
type GuestMakeSshableCmdOutput struct {
ShellCmd string
}
type GuestSetSshPortInput struct {
Port int
}

View File

@@ -518,3 +518,27 @@ type ServerDetachnetworkInput struct {
// 通过Mac解绑网卡, 优先级低于ip_addr
Mac string `json:"mac"`
}
type ServerMigrateForecastInput struct {
PreferHostId string `json:"prefer_host_id"`
// Deprecated
PreferHost string `json:"prefer_host" yunion-deprecated-by:"prefer_host_id"`
LiveMigrate bool `json:"live_migrate"`
SkipCpuCheck bool `josn:"skip_cpu_check"`
}
type ServerResizeDiskInput struct {
// swagger: ignore
Disk string `json:"disk" yunion-deprecated-by:"disk_id"`
// 磁盘Id
DiskId string `json:"disk_id"`
DiskResizeInput
}
type ServerMigrateNetworkInput struct {
// Source network Id
Src string `json:"src"`
// Destination network Id
Dest string `json:"dest"`
}

View File

@@ -29,6 +29,7 @@ const (
HOST_TYPE_QCLOUD = "qcloud"
HOST_TYPE_AZURE = "azure"
HOST_TYPE_HUAWEI = "huawei"
HOST_TYPE_HCSO = "hcso"
HOST_TYPE_OPENSTACK = "openstack"
HOST_TYPE_UCLOUD = "ucloud"
HOST_TYPE_ZSTACK = "zstack"
@@ -109,6 +110,7 @@ var HOST_TYPES = []string{
HOST_TYPE_AWS,
HOST_TYPE_QCLOUD,
HOST_TYPE_HUAWEI,
HOST_TYPE_HCSO,
HOST_TYPE_OPENSTACK,
HOST_TYPE_UCLOUD,
HOST_TYPE_ZSTACK,

View File

@@ -21,6 +21,8 @@ type LoadbalancerCertificateDetails struct {
SLoadbalancerCertificate
LbListenerCount int `json:"lb_listener_count"`
// 证书内容是否完整
IsComplete bool `json:"is_complete"`
}
type LoadbalancerCertificateResourceInfo struct {

View File

@@ -126,6 +126,8 @@ type NetworkListInput struct {
// filter by BGP types
BgpType []string `json:"bgp_type"`
HostType string `json:"host_type"`
}
type NetworkResourceInfoBase struct {
@@ -207,22 +209,11 @@ type NetworkCreateInput struct {
BgpType string `json:"bgp_type"`
}
type NetworkDetails struct {
apis.SharableVirtualResourceDetails
WireResourceInfo
SNetwork
// 是否是内网
Exit bool `json:"exit"`
// 端口数量
Ports int `json:"ports"`
// 已使用端口数量
PortsUsed int `json:"ports_used"`
// 网卡数量
type SNetworkNics struct {
// 虚拟机网卡数量
Vnics int `json:"vnics"`
// 裸金属网卡数量
BmVnics int `json:"bm_nics"`
BmVnics int `json:"bm_vnics"`
// 负载均衡网卡数量
LbVnics int `json:"lb_vnics"`
// 浮动Ip网卡数量
@@ -231,6 +222,48 @@ type NetworkDetails struct {
// 预留IP数量
ReserveVnics int `json:"reserve_vnics"`
// RDS网卡数量
RdsVnics int `json:"rds_vnics"`
// NAT网关网卡数量
NatVnics int `json:"nat_vnics"`
BmReusedVnics int `json:"bm_reused_vnics"`
// 弹性网卡数量
NetworkinterfaceVnics int `json:"networkinterface_vnics"`
// 已使用端口数量
PortsUsed int `json:"ports_used"`
Total int `json:"total"`
}
func (self *SNetworkNics) SumTotal() {
self.Total = self.Vnics +
self.BmVnics +
self.LbVnics +
self.LbVnics +
self.EipVnics +
self.GroupVnics +
self.ReserveVnics +
self.RdsVnics +
self.NetworkinterfaceVnics +
self.NatVnics -
self.BmReusedVnics
self.PortsUsed = self.Total
}
type NetworkDetails struct {
apis.SharableVirtualResourceDetails
WireResourceInfo
SNetwork
SNetworkNics
// 是否是内网
Exit bool `json:"exit"`
// 端口数量
Ports int `json:"ports"`
// 路由信息
Routes [][]string `json:"routes"`
Schedtags []SchedtagShortDescDetails `json:"schedtags"`

View File

@@ -59,6 +59,7 @@ var (
REGIONAL_NETWORK_PROVIDERS = []string{
CLOUD_PROVIDER_HUAWEI,
CLOUD_PROVIDER_HCSO,
CLOUD_PROVIDER_CTYUN,
CLOUD_PROVIDER_UCLOUD,
CLOUD_PROVIDER_GOOGLE,

View File

@@ -34,23 +34,29 @@ const (
)
type STag struct {
Key string
Value string
Key string `json:"key"`
Value string `json:"value"`
}
type ProjectMappingRuleInfo struct {
// 标签列表, 不可为空
Tags []STag
Tags []STag `json:"tags"`
// 条件表达式
// enmu: and, or
// default: and
Condition string
Condition string `json:"condition"`
// 是否自动根据标签值创建项目, 仅标签列表中有且仅有一个没有value的key时支持
AutoCreateProject bool
AutoCreateProject bool `json:"auto_create_project"`
// 符合条件时资源放置的项目id, 此参数和auto_create_project互斥
ProjectId string
ProjectId string `json:"project_id"`
// 只读信息
// swagger:ignore
DomainId string
Project string `json:"project"`
// swagger:ignore
DomainId string `json:"domain_id"`
// 只读信息
// swagger:ignore
Domain string `json:"domain"`
}
type MappingRules []ProjectMappingRuleInfo
@@ -105,7 +111,7 @@ func (self *ProjectMappingRuleInfo) IsMatchTags(_extTags map[string]string) (str
case MAPPING_CONDITION_OR:
for _, tag := range self.Tags {
extTag, ok := extTags[strings.ToUpper(tag.Key)]
if ok && len(tag.Value) == 0 || tag.Value == extTag {
if ok && (len(tag.Value) == 0 || tag.Value == extTag) {
if self.AutoCreateProject && len(tag.Value) == 0 && len(extTag) > 0 {
return "", "", extTag, true
} else {
@@ -135,15 +141,21 @@ type ProjectMappingRuleInfoDetails struct {
Domain string
}
type SProjectMappingAccount struct {
Id string `json:"id"`
Name string `json:"name"`
}
type ProjectMappingDetails struct {
apis.EnabledStatusInfrasResourceBaseDetails
Rules []ProjectMappingRuleInfoDetails
Accounts []struct {
Id string
Name string
}
// 所绑定的云账号列表
Accounts []SProjectMappingAccount `json:"accounts"`
// 所绑定的云订阅列表
Managers []SProjectMappingAccount `json:"managers"`
}
type ProjectMappingCreateInput struct {

View File

@@ -17,6 +17,7 @@ package compute
import (
"fmt"
"yunion.io/x/jsonutils"
"yunion.io/x/pkg/errors"
"yunion.io/x/pkg/util/regutils"
"yunion.io/x/pkg/util/secrules"
@@ -181,6 +182,7 @@ type SecgroupListInput struct {
RegionalFilterListInput
ManagedResourceListInput
WithCache bool `json:"witch_cache"`
}
type SecurityGroupCacheListInput struct {
@@ -252,6 +254,8 @@ type SecgroupDetails struct {
InRules []SecgroupRuleDetails `json:"in_rules"`
// 出方向规则信息
OutRules []SecgroupRuleDetails `json:"out_rules"`
CloudCaches []jsonutils.JSONObject `json:"cloud_caches"`
}
type SecurityGroupResourceInfo struct {

View File

@@ -19,13 +19,13 @@ import "yunion.io/x/onecloud/pkg/apis"
type SnapshotCreateInput struct {
apis.VirtualResourceCreateInput
// 磁盘名称或Id,建议使用Id
// 磁盘Id
// 目前仅VMware平台不支持创建快照,其余平台磁盘均支持创建快照
// required: true
Disk string `json:"disk"`
// swagger:ignore
DiskId string `json:"disk_id"`
// swagger:ignore
Disk string `json:"disk" yunion-deprecated-by:"disk_id"`
// swagger:ignore
StorageId string `json:"storage_id"`
// swagger:ignore
CreatedBy string `json:"created_by"`

View File

@@ -222,4 +222,7 @@ type StorageListInput struct {
// filter by cachedimage
ImageId string `json:"image_id"`
// filter storages which attached the specified host
HostId string `json:"host_id"`
}

View File

@@ -90,7 +90,8 @@ type WireListInput struct {
HostResourceInput
Bandwidth *int `json:"bandwidth"`
Bandwidth *int `json:"bandwidth"`
HostType string `json:"host_type"`
}
type WireMergeInput struct {

View File

@@ -74,10 +74,20 @@ const (
OS_ARCH_AARCH64 = "aarch64"
)
func IsARM(osArch string) bool {
return utils.IsInStringArray(osArch, []string{
var (
ARCH_X86 = []string{
OS_ARCH_X86,
OS_ARCH_I386,
OS_ARCH_X86_32,
OS_ARCH_X86_64,
}
ARCH_ARM = []string{
OS_ARCH_ARM,
OS_ARCH_AARCH32,
OS_ARCH_AARCH64,
})
}
)
func IsARM(osArch string) bool {
return utils.IsInStringArray(osArch, ARCH_ARM)
}

View File

@@ -29,6 +29,21 @@ type ScriptApplyOutput struct {
ScriptApplyId string
}
type ScriptBatchApplyInput struct {
ServerIds []string
}
type ScriptBatchApplyOutput struct {
Results []ScriptBatchApplyResult
}
type ScriptBatchApplyResult struct {
ServerId string
Succeed bool
Reason string
ScriptApplyId string
}
type ScriptApplyRecoredListInput struct {
apis.StatusStandaloneResourceListInput
// description: Id of Script
@@ -72,3 +87,12 @@ type SApplyInfo struct {
ServerId string
TryTimes int
}
type DevtoolManagerServiceUrlInput struct {
ServiceName string
ServerId string
}
type DevtoolManagerServiceUrlOutput struct {
ServiceUrl string
}

View File

@@ -0,0 +1,23 @@
// 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 devtool
const (
SERVICEURL_STATUS_CREATING = "creating"
SERVICEURL_STATUS_READY = "ready"
SERVICEURL_STATUS_DELETING = "deleting"
SERVICEURL_STATUS_CREATE_FAILED = "create_failed"
SERVICEURL_STATUS_DELETE_FAILED = "delete_failed"
)

View File

@@ -0,0 +1,23 @@
// 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 devtool
const (
SSHINFO_STATUS_CREATING = "creating"
SSHINFO_STATUS_READY = "ready"
SSHINFO_STATUS_DELETING = "deleting"
SSHINFO_STATUS_CREATE_FAILED = "create_failed"
SSHINFO_STATUS_DELETE_FAILED = "delete_failed"
)

View File

@@ -109,6 +109,7 @@ var (
"customized_private_prefixes",
"global_http_proxy",
"global_https_proxy",
"ignore_nonrunning_guests",
},
}

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