Compare commits

...

625 Commits

Author SHA1 Message Date
Zexi Li
ca7f5495fe Merge pull request #5393 from swordqiu/automated-cherry-pick-of-#5392-upstream-release-3.1
Automated cherry pick of #5392: fix: scoped resource should override FetchOwnerId
2020-03-07 15:51:52 +08:00
Qiu Jian
34b7d1e9c3 fix: scoped resource should override FetchOwnerId 2020-03-07 15:38:46 +08:00
Zexi Li
13a3e1c778 Merge pull request #5389 from swordqiu/automated-cherry-pick-of-#5388-upstream-release-3.1
Automated cherry pick of #5388: fix: keystone prefers internal endpoint type
2020-03-07 11:07:29 +08:00
Qiu Jian
603b3f8b8e fix: keystone prefers internal endpoint type 2020-03-06 21:45:21 +08:00
yunion-ci-robot
2c1e0a4fe2 Merge pull request #5383 from rainzm/automated-cherry-pick-of-#5378-upstream-release-3.1
Automated cherry pick of #5378: fix: Add 'scope=system' and 'system' for Caches when querying from Keystone.
2020-03-06 19:19:52 +08:00
Zexi Li
f9a9f92003 Merge pull request #5373 from swordqiu/automated-cherry-pick-of-#5372-upstream-release-3.1
Automated cherry pick of #5372: fix: no scope shcedtag should be visible to all
2020-03-06 18:32:28 +08:00
yunion-ci-robot
8d1c0ba9c9 Merge pull request #5382 from tb365/automated-cherry-pick-of-#5379-upstream-release-3.1
Automated cherry pick of #5379: huawei reset password bugfix
2020-03-06 18:10:50 +08:00
Rain
845ba285fc fix: Add 'scope=system' and 'system' for Caches when querying from Keystone.
1. Query 'scope=system' and 'system=true' is neccessary when fetching all users
   or groups from Keystone.
   Without these, users and groups in other domains (non-caller domains),
   as well as system-level users, cannot be detected.
2. Query 'scope=system' is neccessary when fetching all project from Keystone.
2020-03-06 17:15:23 +08:00
TangBin
72f1e58833 ctyun region name fix 2020-03-06 16:52:53 +08:00
TangBin
1cc1ff7213 huawei reset password bugfix 2020-03-06 16:52:53 +08:00
Qiu Jian
6c15c80abb fix: no scope shcedtag should be visible to all 2020-03-06 15:23:27 +08:00
Yousong Zhou
7869e3d134 Merge pull request #5371 from yousong/automated-cherry-pick-of-#5226-upstream-release-3.1
Automated cherry pick of #5226: lbbackend: fix nil ref when getting details
2020-03-06 13:38:43 +08:00
Yousong Zhou
2e0efc6c4a lbbackend: fix nil ref when getting details
Return arguments of lbbackend.getVpc() can be both nil

	[E 200224 10:13:18 httperrors.HTTPError(httperrors.go:53)] Send error {"fields":["runtime error: invalid memory address or nil pointer dereference"],"id":"Internal server error: {0}"}
	...
	panic(0x27da0c0, 0x57f4ff0)
		/usr/local/go/src/runtime/panic.go:522 +0x1b5
	yunion.io/x/onecloud/pkg/compute/models.(*SLoadbalancerBackend).GetExtraDetails(0xc0002af680, 0x33cde20, 0xc0010e61e0, 0x34246c0, 0xc008893de0, 0x341d940, 0xc012fe69d0, 0x1, 0x0, 0x0, ...)
		/data/git/yunion-build/work/go/src/yunion.io/x/onecloud/pkg/compute/models/loadbalancerbackends.go:314 +0x37c
	reflect.Value.call(0x2d87a00, 0xc0002af680, 0x8a13, 0x2db0aa8, 0x4, 0xc0044ad680, 0x4, 0x4, 0x2bd5d60, 0xc002a29cf0, ...)
		/usr/local/go/src/reflect/value.go:447 +0x461
	reflect.Value.Call(0x2d87a00, 0xc0002af680, 0x8a13, 0xc0044ad680, 0x4, 0x4, 0x2d87a00, 0xc0002af680, 0x16)
		/usr/local/go/src/reflect/value.go:308 +0xa4
	yunion.io/x/onecloud/pkg/cloudcommon/db.callFunc(0x2d87a00, 0xc0002af680, 0x8a13, 0xc000951688, 0x4, 0x4, 0xc0002af680, 0x8a13, 0x2dc0527, 0xb, ...)
		/data/git/yunion-build/work/go/src/yunion.io/x/onecloud/pkg/cloudcommon/db/caller.go:78 +0x397
	...
	[I 200224 10:13:18 appsrv.(*Application).ServeHTTP(appsrv.go:237)] MfQCvNyik-obRBzFjFZy5ARfXcE= 500 5c1d82 GET /loadbalancerbackends?backend_group=Yunion-Tools&details=true&limit=20&offset=0 (10.40.156.64:57606) 57.90ms

Fixes 76d974f6d ("feature: api -> response struct")
2020-03-06 13:36:06 +08:00
Zexi Li
1d440b57ce Merge pull request #5362 from swordqiu/automated-cherry-pick-of-#5361-upstream-release-3.1
Automated cherry pick of #5361: fix: allow project do user-list, group-list, returns current project user and group
2020-03-06 13:03:32 +08:00
Zexi Li
e3c564bd56 Merge pull request #5367 from rainzm/automated-cherry-pick-of-#5366-upstream-release-3.1
Automated cherry pick of #5366: fix/notify: Fix the resend mechanism
2020-03-06 12:46:02 +08:00
yunion-ci-robot
45e04c4d50 Merge pull request #5364 from wanyaoqi/automated-cherry-pick-of-#5363-upstream-release-3.1
Automated cherry pick of #5363: fix disk billing type on guest is postpaid
2020-03-06 12:29:50 +08:00
Rain
ee0f6de3b0 fix/notify: Fix the resend mechanism 2020-03-06 11:12:34 +08:00
wanyaoqi
608be69260 fix disk billing type on guest is postpaid 2020-03-05 20:33:19 +08:00
Qiu Jian
88fa459aac fix: allow project do user-list, group-list, returns current project user and group 2020-03-05 20:09:58 +08:00
yunion-ci-robot
b4bb5d902f Merge pull request #5360 from wanyaoqi/automated-cherry-pick-of-#5359-upstream-release-3.1
Automated cherry pick of #5359: enable network list filter by host show vpc networks
2020-03-05 20:00:49 +08:00
wanyaoqi
7f467ab3a7 enable network list filter by host show vpc networks 2020-03-05 19:33:17 +08:00
yunion-ci-robot
5c1714d11d Merge pull request #5357 from rainzm/automated-cherry-pick-of-#5353-upstream-release-3.1
Automated cherry pick of #5353: feature(notify): Add query and return value for contact UPDATE interface
2020-03-05 19:03:51 +08:00
Rain
5f36cbb31c feature(notify): Add query and return value for contact UPDATE interface
1. Add same return value with contact GET interface when updating
2. Add pull params for query to pull subcontact by mobile number.
   For example, pull user_id from dingtalk throught user's mobile
   number.
3. Add corresponding feature based on above for climc.
4. UserCache will try FetchByName if there is no id matched user when
   fetching users from KeyStone.
2020-03-05 17:10:04 +08:00
Zexi Li
850544ee4d Merge pull request #5352 from rainzm/automated-cherry-pick-of-#5330-upstream-release-3.1
Automated cherry pick of #5330: feat: Add useridByMobile and accessToken cache for feishu
2020-03-05 14:18:38 +08:00
Rain
7ff8935abc feat: Add useridByMobile and accessToken cache for feishu 2020-03-05 14:12:39 +08:00
Zexi Li
874cf21b00 Merge pull request #5346 from swordqiu/hotfix/qj-update-autogen-struct-json-fieldname-3.1
fix: update autogen struct json field name for release/3.1
2020-03-05 14:07:41 +08:00
yunion-ci-robot
231fefed1f Merge pull request #5350 from zexi/automated-cherry-pick-of-#5349-upstream-release-3.1
Automated cherry pick of #5349: monitor: fix alert update not work
2020-03-04 22:54:20 +08:00
Qiu Jian
5dd591f1bb update autogen struct with comment lines 2020-03-04 21:19:54 +08:00
Zexi Li
ab32057ab1 monitor: fix alert update not work 2020-03-04 21:17:27 +08:00
yunion-ci-robot
84fec885e8 Merge pull request #5334 from yousong/automated-cherry-pick-of-#5333-upstream-release-3.1
Automated cherry pick of #5333: hostman: default ovn options from environment
2020-03-04 20:57:11 +08:00
yunion-ci-robot
8057b95ac2 Merge pull request #5344 from ioito/automated-cherry-pick-of-#5343-upstream-release-3.1
Automated cherry pick of #5343: fix: 支持aws rds sync
2020-03-04 20:50:09 +08:00
Qiu Jian
9adac58590 fix: update autogen struct json field name for release/3.1 2020-03-04 20:43:26 +08:00
Qu Xuan
f409fca66b fix: 支持aws rds sync 2020-03-04 20:10:22 +08:00
yunion-ci-robot
edd7136d3e Merge pull request #5341 from zexi/automated-cherry-pick-of-#5340-upstream-release-3.1
Automated cherry pick of #5340: alert notification use joint model
2020-03-04 19:59:09 +08:00
Zexi Li
b1c80010cc Merge pull request #5332 from yousong/automated-cherry-pick-of-#5331-upstream-release-3.1
Automated cherry pick of #5331: build: docker-centos-build: run as root
2020-03-04 19:17:02 +08:00
Zexi Li
5ff255d622 alert notification use joint model 2020-03-04 19:17:00 +08:00
Zexi Li
fb531b4d68 Merge pull request #5338 from swordqiu/automated-cherry-pick-of-#5336-upstream-release-3.1
Automated cherry pick of #5336: fix: keystone user password history check should skip system account
2020-03-04 19:16:27 +08:00
Qiu Jian
03cd5dc63a fix: keystone user password history check should skip system account 2020-03-04 18:44:04 +08:00
Yousong Zhou
fa48381bd7 hostman: default ovn options from environment 2020-03-04 16:43:33 +08:00
Yousong Zhou
38a6decc25 build: docker-centos-build: run as root
so that output file ownership can be properly changed

The Dockerfile was moved to a separate repo for maintenance
2020-03-04 15:10:20 +08:00
Zexi Li
627495d200 Merge pull request #5329 from zexi/automated-cherry-pick-of-#5328-upstream-release-3.1
Automated cherry pick of #5328: fix: docker_push uncomment build bin
2020-03-03 16:18:09 +08:00
Zexi Li
37b823a43c fix: docker_push uncomment build bin 2020-03-03 16:19:29 +08:00
Zexi Li
112eb0d7ae Merge pull request #5325 from swordqiu/automated-cherry-pick-of-#5324-upstream-release-3.1
Automated cherry pick of #5324: fix: clean up pending usage no matter whether object upload is success
2020-03-03 13:14:18 +08:00
yunion-ci-robot
bee314a0e6 Merge pull request #5316 from ioito/automated-cherry-pick-of-#5315-upstream-release-3.1
Automated cherry pick of #5315: fix: 避免旧套餐下架zone信息未知,导致同步rds异常
2020-03-03 02:23:44 +08:00
Qiu Jian
60ef016f42 fix: clean up pending usage no matter whether object upload is success 2020-03-03 02:12:49 +08:00
yunion-ci-robot
da235de896 Merge pull request #5323 from zexi/automated-cherry-pick-of-#5322-upstream-release-3.1
Automated cherry pick of #5322: add monitor service
2020-03-02 20:51:43 +08:00
Zexi Li
68a425ebd5 add monitor service 2020-03-02 20:05:50 +08:00
yunion-ci-robot
15f6b94bec Merge pull request #5321 from yousong/automated-cherry-pick-of-#5320-upstream-release-3.1
Automated cherry pick of #5320: build: docker: chown _output dir to current user:group
2020-03-02 17:47:38 +08:00
Yousong Zhou
d8dd372cb0 build: docker: chown _output dir to current user:group 2020-03-02 17:36:26 +08:00
Qu Xuan
e14a596d9f fix: 避免旧套餐下架zone信息未知,导致同步rds异常 2020-03-02 17:09:13 +08:00
yunion-ci-robot
a0ab40dbb8 Merge pull request #5313 from wanyaoqi/automated-cherry-pick-of-#5312-upstream-release-3.1
Automated cherry pick of #5312: fix get remote address because of request is proxyed by k8s
2020-02-29 00:15:30 +08:00
wanyaoqi
75e49ac8c6 fix get remote address because of request is proxyed by k8s 2020-02-28 22:27:16 +08:00
yunion-ci-robot
590ec32860 Merge pull request #5273 from zhaoxiangchun/automated-cherry-pick-of-#5268-upstream-release-3.1
Automated cherry pick of #5268: 谷歌云multicloud监控
2020-02-28 22:24:29 +08:00
yunion-ci-robot
57fd313b43 Merge pull request #5308 from ioito/automated-cherry-pick-of-#5307-upstream-release-3.1
Automated cherry pick of #5307: 修复aliyun没有权限获取余额问题
2020-02-28 22:05:29 +08:00
yunion-ci-robot
86e4df54d9 Merge pull request #5287 from wanyaoqi/automated-cherry-pick-of-#5286-upstream-release-3.1
Automated cherry pick of #5286: host register use default vpc
2020-02-28 21:55:21 +08:00
yunion-ci-robot
a9f60a7b1a Merge pull request #5306 from yousong/automated-cherry-pick-of-#5305-upstream-release-3.1
Automated cherry pick of #5305: build: github: build vpcagent image
2020-02-28 21:51:28 +08:00
yunion-ci-robot
087de62171 Merge pull request #5278 from ioito/automated-cherry-pick-of-#5277-upstream-release-3.1
Automated cherry pick of #5277: fix: 新加gcp region 翻译
2020-02-28 20:51:21 +08:00
Qu Xuan
8577cb096e 修复aliyun没有权限获取余额问题 2020-02-28 19:55:33 +08:00
Yousong Zhou
2110057bac hostman: disable services on host system when running in container 2020-02-28 18:22:29 +08:00
Yousong Zhou
3c09ce17d0 build: github: build vpcagent image 2020-02-28 18:22:29 +08:00
Zexi Li
dc870afaed Merge pull request #5304 from yousong/automated-cherry-pick-of-#5303-upstream-release-3.1
Automated cherry pick of #5303: build: github: add back ceph devel deps for baremetal-agent
2020-02-28 16:13:30 +08:00
Yousong Zhou
fcb8bba00c build: github: add back ceph devel deps for baremetal-agent 2020-02-28 16:10:28 +08:00
yunion-ci-robot
7996a02a80 Merge pull request #5302 from yousong/automated-cherry-pick-of-#5301-upstream-release-3.1
Automated cherry pick of #5301: build: rename docker-build to docker-centos-build
2020-02-28 15:52:30 +08:00
Yousong Zhou
3349dc46c5 build: github: build host with docker-alpine-build 2020-02-28 15:28:04 +08:00
Yousong Zhou
a85fd307d3 build: add docker-alpine-build 2020-02-28 15:28:04 +08:00
Yousong Zhou
37f1906f72 build: rename docker-build to docker-centos-build 2020-02-28 15:28:04 +08:00
yunion-ci-robot
d5096ad4ee Merge pull request #5296 from tb365/automated-cherry-pick-of-#5295-upstream-release-3.1
Automated cherry pick of #5295: vpc list add param vpc_usable
2020-02-28 14:22:21 +08:00
yunion-ci-robot
24da237790 Merge pull request #5291 from ioito/automated-cherry-pick-of-#5290-upstream-release-3.1
Automated cherry pick of #5290: 添加azure region city信息
2020-02-28 13:17:19 +08:00
TangBin
d34b00ddc4 vpc list add param vpc_usable 2020-02-28 12:10:54 +08:00
Zexi Li
2f47d93215 Merge pull request #5267 from yousong/automated-cherry-pick-of-#5266-upstream-release-3.1
Automated cherry pick of #5266: vpcagent: resolve ovn db address at args validation time
2020-02-28 11:58:13 +08:00
Yousong Zhou
1bbf79528b build: host: adjust build method
- new host-base for native alpine utilities
 - build host with native alpine toolchain
2020-02-28 11:43:12 +08:00
Yousong Zhou
0c0c4fc94d build: build vpcagent container 2020-02-28 11:43:12 +08:00
Yousong Zhou
01de80ed09 hostman: use "uname -m" for for fetch processor type
"uname -p" command from native busybox, coreutils may return "unknown".
CentOS coreutils has a patch fallback to using uts.machine if sysinfo
syscall is not available

Use "uname -m" for maximum compatibility
2020-02-28 11:43:12 +08:00
Yousong Zhou
3861bb6bc1 hostman: work with ovn-controller already in container 2020-02-28 11:43:12 +08:00
Yousong Zhou
681fee1317 sysutils: use remote executor for hostnamectl as far as possible
So that hostnamectl can be omitted in host-base container image
2020-02-28 11:43:12 +08:00
Yousong Zhou
2496a12833 vpcagent: resolve ovn db address at args validation time
Until we find a reliable way to get k8s svc dns name
2020-02-28 11:43:12 +08:00
Yousong Zhou
c76062406d hostman: resolve ovn db address before setting it into ovsdb 2020-02-28 11:43:12 +08:00
Yousong Zhou
df94352e00 ovsutils: add NormalizeDbHost 2020-02-28 11:43:12 +08:00
Qu Xuan
5b9c7ba9f2 添加azure region city信息 2020-02-28 11:37:00 +08:00
yunion-ci-robot
e8dc05084a Merge pull request #5276 from ioito/automated-cherry-pick-of-#5275-upstream-release-3.1
Automated cherry pick of #5275: fix: 谷歌云建议关机下调整配置,部分linux开机也调整不了配置
2020-02-28 09:34:19 +08:00
wanyaoqi
0774a2ded0 host register use default vpc 2020-02-27 23:29:28 +08:00
yunion-ci-robot
50421b06b9 Merge pull request #5270 from tb365/automated-cherry-pick-of-#5269-upstream-release-3.1
Automated cherry pick of #5269: huawei secgroup default vpc id fix
2020-02-27 20:57:18 +08:00
TangBin
7e7825a681 huawei secgroup default vpc id fix 2020-02-27 19:32:10 +08:00
Qu Xuan
45b8a7afd9 fix: 新加gcp region 翻译 2020-02-27 18:54:47 +08:00
Qu Xuan
4ec1fc58d9 fix: 谷歌云建议关机下调整配置,部分linux开机也调整不了配置 2020-02-27 16:53:10 +08:00
zhaoxiangchun
69564365b9 谷歌云multicloud监控
monitor.go文件中GetMonitorData函数:
 1)首先组装参数信息
 2)通过external_id获取相关id信息,根据restAPI文档中的resource格式拼装完成monitoring相关的resource信息
 3)然后通过monitorList函数获取相关的监控信息

更新go.mod google.golang.org所依赖的google.golang.org/api版本
2020-02-27 15:48:52 +08:00
yunion-ci-robot
54caca2d04 Merge pull request #5262 from tb365/automated-cherry-pick-of-#5261-upstream-release-3.1
Automated cherry pick of #5261: ctyun get vm by id fix
2020-02-27 07:19:13 +08:00
yunion-ci-robot
ce3241d046 Merge pull request #5265 from rainzm/automated-cherry-pick-of-#5263-upstream-release-3.1
Automated cherry pick of #5263: fix(esxiagent): SSHKey was not unmarshalled correctly
2020-02-27 07:11:14 +08:00
yunion-ci-robot
40773180fa Merge pull request #5239 from wanyaoqi/automated-cherry-pick-of-#5238-upstream-release-3.1
Automated cherry pick of #5238: fix host init set reserve memory
2020-02-26 23:13:13 +08:00
yunion-ci-robot
32411bf2ec Merge pull request #5237 from tb365/automated-cherry-pick-of-#5236-upstream-release-3.1
Automated cherry pick of #5236: huawei & ctyun security group sync fix
2020-02-26 21:04:13 +08:00
wanyaoqi
c99265e743 makesure /etc/ceph created before connect 2020-02-26 20:44:31 +08:00
Rain
2d4cff4ef1 fix(esxiagent): SSHKey was not unmarshalled correctly 2020-02-26 20:12:47 +08:00
TangBin
bb90b5e8a1 ctyun vpc create fix 2020-02-26 17:40:56 +08:00
TangBin
b1c4bc276f ctyun eip charge type fix 2020-02-26 17:40:56 +08:00
TangBin
1923e36740 ctyun attach disk fix 2020-02-26 17:40:56 +08:00
TangBin
7bec5e6f7e ctyun get vm by id fix 2020-02-26 17:40:56 +08:00
yunion-ci-robot
b40be2608b Merge pull request #5232 from ioito/automated-cherry-pick-of-#5231-upstream-release-3.1
Automated cherry pick of #5231: fix: 添加磁盘回滚snapshot日志
2020-02-26 16:00:15 +08:00
Zexi Li
46d2f6efb7 Merge pull request #5254 from swordqiu/automated-cherry-pick-of-#5252-upstream-release-3.1
Automated cherry pick of #5252: fix: use globalEndpointType as default endpoint type
2020-02-26 10:37:37 +08:00
yunion-ci-robot
d55f1db7ff Merge pull request #5243 from ioito/automated-cherry-pick-of-#5242-upstream-release-3.1
Automated cherry pick of #5242: fix: 避免根磁盘小于镜像大小导致创建失败
2020-02-26 10:20:13 +08:00
yunion-ci-robot
0bcc19d7c1 Merge pull request #5248 from ioito/automated-cherry-pick-of-#5247-upstream-release-3.1
Automated cherry pick of #5247: fix: 返回azure api 错误信息
2020-02-25 21:07:14 +08:00
Qiu Jian
b395dc8cee fix: use globalEndpointType as default endpoint type 2020-02-25 20:47:15 +08:00
Qu Xuan
c908e0c19a fix: 返回azure api 错误信息 2020-02-25 19:31:07 +08:00
Qu Xuan
ce5a95607f fix: 避免根磁盘小于镜像大小导致创建失败 2020-02-25 15:38:19 +08:00
wanyaoqi
d4ba5ca52e fix host register get network filter: add server_type baremetal 2020-02-25 11:25:46 +08:00
wanyaoqi
92129824c0 fix guest network get desc 2020-02-25 11:25:46 +08:00
wanyaoqi
7326b1fb0d fix host init set reserve memory 2020-02-25 11:25:46 +08:00
yunion-ci-robot
1b5756fe1c Merge pull request #5227 from rainzm/automated-cherry-pick-of-#5186-upstream-release-3.1
Automated cherry pick of #5186: feature(notify): Validate config
2020-02-25 08:21:09 +08:00
TangBin
08f8ce1f7c huawei & ctyun security group sync fix 2020-02-24 20:15:48 +08:00
Qu Xuan
2c5234b97e fix: 添加磁盘回滚snapshot日志 2020-02-24 16:07:28 +08:00
Rain
37049bd5f3 feature(notify): Validate config 2020-02-24 14:10:41 +08:00
yunion-ci-robot
177ba6cf2c Merge pull request #5225 from tb365/automated-cherry-pick-of-#5224-upstream-release-3.1
Automated cherry pick of #5224: network query by ip fix
2020-02-23 18:52:06 +08:00
yunion-ci-robot
bf2bb9878f Merge pull request #5223 from wanyaoqi/automated-cherry-pick-of-#5222-upstream-release-3.1
Automated cherry pick of #5222: region misc fix:
2020-02-21 23:38:00 +08:00
TangBin
530b2a1422 network query by ip fix 2020-02-21 19:00:27 +08:00
wanyaoqi
1eba8b8a7e region misc fix:
- guest postpaid expire support set expire time
- list instance snapshot sub snapshot return size
2020-02-21 17:45:46 +08:00
Zexi Li
4829e0d285 Merge pull request #5212 from swordqiu/automated-cherry-pick-of-#5208-upstream-release-3.1
Automated cherry pick of #5208: fix: reset paging limit to 2048 from 20
2020-02-21 16:46:05 +08:00
Zexi Li
b29d6d4f4e Merge pull request #5218 from rainzm/automated-cherry-pick-of-#5217-upstream-release-3.1
Automated cherry pick of #5217: fix: Storage filter not work for Esxi
2020-02-21 16:44:38 +08:00
yunion-ci-robot
d41c3bfea7 Merge pull request #5207 from tb365/automated-cherry-pick-of-#5199-upstream-release-3.1
Automated cherry pick of #5199: cloud region city list add default limit 2048
2020-02-21 15:53:41 +08:00
yunion-ci-robot
907058464a Merge pull request #5197 from ioito/automated-cherry-pick-of-#5196-upstream-release-3.1
Automated cherry pick of #5196: fix: gcp win os not support change config when vm running
2020-02-21 15:44:33 +08:00
Rain
c727334bc4 fix: Storage filter not work for Esxi
1. SESXiGuestDriver.DoScheduleStorageFilter should return true.
2. ESXi's SHost.GetStorageSizeMB should return the capacity of all the
storage belonging to it.
2020-02-21 15:13:18 +08:00
yunion-ci-robot
b7e2c462cb Merge pull request #5214 from ioito/automated-cherry-pick-of-#5213-upstream-release-3.1
Automated cherry pick of #5213: fix: 添加gcp region中文翻译
2020-02-20 21:17:29 +08:00
yunion-ci-robot
1efc0fe07b Merge pull request #5200 from ioito/automated-cherry-pick-of-#5198-upstream-release-3.1
Automated cherry pick of #5198: fix: 修复azure坐标问题,添加新的azure region城市信息
2020-02-20 21:02:31 +08:00
yunion-ci-robot
9d1b407c40 Merge pull request #5192 from ioito/automated-cherry-pick-of-#5191-upstream-release-3.1
Automated cherry pick of #5191: fix: add aliyun new region info
2020-02-20 18:21:29 +08:00
Qu Xuan
67c2435f4f fix: 添加gcp region中文翻译 2020-02-20 17:38:25 +08:00
yunion-ci-robot
c11c79ef71 Merge pull request #5188 from ioito/automated-cherry-pick-of-#5187-upstream-release-3.1
Automated cherry pick of #5187: fix: 填充gcp disk_format字段
2020-02-20 15:30:30 +08:00
Qiu Jian
c245013e59 fix: reset paging limit to 2048 from 20 2020-02-20 15:22:07 +08:00
TangBin
83b4916646 huawei cloud create bugfix 2020-02-20 15:03:54 +08:00
TangBin
f6d1ea7b25 cloud region city list add default limit 2048 2020-02-20 15:03:54 +08:00
Qu Xuan
c988fd1b1f fix: 修复azure坐标问题,添加新的azure region城市信息 2020-02-20 14:55:16 +08:00
Qu Xuan
f6df6d34e0 fix: gcp win os not support change config when vm running 2020-02-20 12:00:06 +08:00
Qu Xuan
44183902f7 fix: add aliyun new region info 2020-02-20 11:07:17 +08:00
Qu Xuan
64fda24e76 fix: 填充gcp disk_format字段 2020-02-20 10:45:43 +08:00
yunion-ci-robot
0701512da9 Merge pull request #5185 from tb365/automated-cherry-pick-of-#5181-upstream-release-3.1
Automated cherry pick of #5181: aws listener sync fix
2020-02-19 19:18:28 +08:00
tangbin
71499e7e1b huawei http listener sync fix 2020-02-19 18:48:30 +08:00
tangbin
6f6cf7cd64 aws rebuild root fix 2020-02-19 18:48:30 +08:00
tangbin
8f175ec326 aws listener sync fix 2020-02-19 18:48:30 +08:00
yunion-ci-robot
c0c26c7c40 Merge pull request #5180 from rainzm/automated-cherry-pick-of-#5178-upstream-release-3.1
Automated cherry pick of #5178: fix(esxi): No distinction between ordinary scsi and pvscsi when creating disks
2020-02-19 17:51:29 +08:00
Rain
42cd5b1435 fix(esxi): No distinction between ordinary scsi and pvscsi when creating disks
parascsi 是 vmware 中一种高性能的 scsi 控制器。

在此之前,scsi 只包括 "lsilogic", "lsilogicsas", "buslogic"; 而别名为 pvscsi
的 parascsi 没有被包含进来;并且,一个 pci controller只能挂一个 scsi controller,
这会导致如果在一个拥有 pvscsi 的机器上添加普通scsi驱动类型的磁盘,就会替换驱动;
反之亦然。这会导致驱动的 key 不是我们指定的key,并且在添加磁盘的时候替换驱动的
类型有些随意。再者,我们的驱动类型的选择其实并没有暴露给前端。

所以,在寻找相应的controller时,将 parascsi 也纳入 scsi 类型。
尽量避免在创建磁盘的时候做硬件的改动,所以在创建磁盘的时候不区分 scsi
还是 pvscsi,如果两种 controller 均没有,就按照请求的类型创建一个。

此外,在 CloneVM 的时候,如果支持,优先使用 parascsi。
2020-02-19 16:59:57 +08:00
yunion-ci-robot
4fafb8ae75 Merge pull request #5150 from tb365/automated-cherry-pick-of-#5145-upstream-release-3.1
Automated cherry pick of #5145: qcloud elb sync
2020-02-19 16:08:28 +08:00
Yousong Zhou
8349dcbba3 Merge pull request #5177 from swordqiu/automated-cherry-pick-of-#5173-upstream-release-3.1
Automated cherry pick of #5173: fix: sync cloud provider should change its cloud account's sync_status
2020-02-19 16:02:46 +08:00
yunion-ci-robot
85a792d2b1 Merge pull request #5161 from rainzm/automated-cherry-pick-of-#5097-upstream-release-3.1
Automated cherry pick of #5097: feature: Specify cloud provider when creating vm
2020-02-19 14:50:28 +08:00
yunion-ci-robot
71fee70283 Merge pull request #5166 from tb365/automated-cherry-pick-of-#5162-upstream-release-3.1
Automated cherry pick of #5162: huawei elb backend vpc validate fix
2020-02-19 13:43:28 +08:00
yunion-ci-robot
456c5fb50e Merge pull request #5168 from ioito/automated-cherry-pick-of-#5167-upstream-release-3.1
Automated cherry pick of #5167: fix: 避免将虚拟机ip同步到弹性网卡
2020-02-19 12:37:28 +08:00
yunion-ci-robot
b706356ba9 Merge pull request #5160 from yousong/automated-cherry-pick-of-#5159-upstream-release-3.1
Automated cherry pick of #5159: region: lbagent: deploy: use 'public' endpoint type
2020-02-19 12:04:27 +08:00
Qiu Jian
ed2bba3dd5 fix: sync cloud provider should change its cloud account's sync_status 2020-02-19 12:02:42 +08:00
Zexi Li
b6e701a6b2 Merge pull request #5158 from swordqiu/automated-cherry-pick-of-#5156-upstream-release-3.1
Automated cherry pick of #5156: fix: add climc helper scripts into docker images
2020-02-19 02:32:58 +08:00
Zexi Li
c21636b521 Merge pull request #5155 from swordqiu/automated-cherry-pick-of-#5151-upstream-release-3.1
Automated cherry pick of #5151: fix: 1. adjust default response header timer to 30 seconds 2. set default paging limit to 20
2020-02-19 02:30:10 +08:00
Yousong Zhou
2e0f424c73 lbagent: fix config for sticky session cookie
- account for user specific cookie name for insert mode
 - dont tamper cache instructions from backend server for server mode
2020-02-18 20:55:10 +08:00
Yousong Zhou
a2f30806cf region: lbagent: deploy: use 'public' endpoint type 2020-02-18 20:55:10 +08:00
Qu Xuan
0c0b4b43aa fix: 避免将虚拟机ip同步到弹性网卡 2020-02-18 15:38:12 +08:00
yunion-ci-robot
209bee4181 Merge pull request #5139 from ioito/automated-cherry-pick-of-#5138-upstream-release-3.1
Automated cherry pick of #5138: fix: 避免未过滤掉同一个network底下的guest
2020-02-18 14:46:39 +08:00
tangbin
ba265a7b83 huawei elb backend vpc validate fix 2020-02-18 14:21:47 +08:00
yunion-ci-robot
1a8f8dcb93 Merge pull request #5135 from zhaoxiangchun/automated-cherry-pick-of-#5132-upstream-release-3.1
Automated cherry pick of #5132: zstack监控功能
2020-02-18 12:06:45 +08:00
Rain
2a01c86428 feature: Specify cloud provider when creating vm
Specifying the eip is equivalent to specifying the cloudprovider when
creating vm.
2020-02-18 11:44:27 +08:00
Qiu Jian
dc75d93414 fix: add climc helper scripts into docker images 2020-02-18 10:17:31 +08:00
yunion-ci-robot
fe44564bf7 Merge pull request #5137 from yousong/automated-cherry-pick-of-#5136-upstream-release-3.1
Automated cherry pick of #5136: regiondrivers: kvm: dummy impl for RequestDeleteVpc
2020-02-18 09:45:38 +08:00
yunion-ci-robot
8cd23304ae Merge pull request #5144 from wanyaoqi/automated-cherry-pick-of-#5143-upstream-release-3.1
Automated cherry pick of #5143: check scsi driver on add disk
2020-02-18 09:41:40 +08:00
Qiu Jian
4b8e13f171 fix: 1. adjust default response header timer to 30 seconds 2. set default paging limit to 20 2020-02-18 08:55:58 +08:00
yunion-ci-robot
b6739ba7e8 Merge pull request #5131 from tb365/automated-cherry-pick-of-#5130-upstream-release-3.1
Automated cherry pick of #5130: huawei sync fix
2020-02-18 08:15:41 +08:00
TangBin
3db7b0c962 qcloud elb sync 2020-02-17 22:33:23 +08:00
wanyaoqi
0d6480723d check scsi driver on add disk 2020-02-17 22:00:07 +08:00
yunion-ci-robot
9a91bf244c Merge pull request #5129 from tb365/automated-cherry-pick-of-#5128-upstream-release-3.1
Automated cherry pick of #5128: huawei userdata fix
2020-02-17 21:54:36 +08:00
Qu Xuan
b1a641ca4d fix: 避免未过滤掉同一个network底下的guest 2020-02-17 20:51:43 +08:00
Yousong Zhou
c65e1e0855 regiondrivers: kvm: dummy impl for RequestDeleteVpc
Regression since 4a6a4c594a ("feature:
google云操作支持")

	Feb 17 15:53:12 titan-10-168-222-196 region[20940]: [I 200217 15:53:12 appsrv.(*Application).ServeHTTP(appsrv.go:237)] Ao9tyX8XY4DXa3tBiUyXgPm_ipc= 200 f7a73c DELETE /vpcs/vpc1 (10.168.222.196:46354) 723.91ms
	Feb 17 15:53:13 titan-10-168-222-196 region[20940]: [E 200217 15:53:13 tasks.(*VpcDeleteTask).taskFailed(vpc_delete_task.go:41)] vpc delete task fail: RequestDeleteVpc: Not implement RequestDeleteVpc
	Feb 17 15:53:13 titan-10-168-222-196 region[20940]: [I 200217 15:53:13 taskman.(*STask).SetStageFailed(tasks.go:636)] XXX TASK VpcDeleteTask failed: RequestDeleteVpc: Not implement RequestDeleteVpc on stage OnDeleteVpcComplete
	Feb 17 15:53:13 titan-10-168-222-196 region[20940]: [I 200217 15:53:13 taskman.(*STask).NotifyParentTaskComplete(tasks.go:648)] notify_parent_task_complete: VpcDeleteTask params {"__failed_reason":"RequestDeleteVpc: Not implement RequestDeleteVpc","__request_context":{"request_id":"f7a73c","service_name":"compute_v2","trace":{"debug":true,"duration":0,"id":"0","kind":"SERVER","local_endpoint":{"port":0,"service_name":"compute_v2"},"name":"delete","remote_endpoint":{"addr":"10.168.222.196","port":46354,"service_name":"(unknown_service)"},"shared":false,"tags":{"resource":"vpcs"},"timestamp":"2020-02-17T07:53:12.052219Z","trace_id":"5cf3e014"}},"__stages":[{"complete_at":"2020-02-17T15:53:12Z","name":"on_init"},{"complete_at":"2020-02-17T15:53:13Z","name":"OnDeleteVpcComplete"}]}
2020-02-17 16:22:17 +08:00
zhaoxiangchun
d8fc57b217 zstack监控功能
monitor.go中GetMonitorData函数通过传入的参数拼装请求参数,然后调用zstack.go中的getMonitor(),通过GET请求,获取相应的指标监控数据
2020-02-17 12:03:17 +08:00
tangbin
f9a47d94c7 ctyun custom image create bugfix 2020-02-15 17:33:55 +08:00
tangbin
ac2c3697bf ctyun sync fix 2020-02-15 17:33:55 +08:00
tangbin
b1048baef3 huawei sync fix 2020-02-15 17:33:55 +08:00
tangbin
bfc1f0125f huawei userdata fix 2020-02-15 12:56:43 +08:00
yunion-ci-robot
4b6d0107b0 Merge pull request #5127 from ioito/automated-cherry-pick-of-#5126-upstream-release-3.1
Automated cherry pick of #5126: fix: 添加host标签返回值
2020-02-15 07:58:06 +08:00
yunion-ci-robot
1948c12012 Merge pull request #5116 from tb365/automated-cherry-pick-of-#5115-upstream-release-3.1
Automated cherry pick of #5115: aws userdata bugfix
2020-02-15 00:05:06 +08:00
Qu Xuan
6345086c5b fix: 添加host标签返回值 2020-02-14 20:46:55 +08:00
tangbin
08d412669d aws userdata bugfix 2020-02-14 19:36:13 +08:00
yunion-ci-robot
c85a8d354e Merge pull request #5125 from ioito/automated-cherry-pick-of-#5124-upstream-release-3.1
Automated cherry pick of #5124: fix: disks_info typo
2020-02-14 18:22:05 +08:00
Qu Xuan
03be58f39a fix: disks_info typo 2020-02-14 17:51:58 +08:00
yunion-ci-robot
60cb619043 Merge pull request #5123 from rainzm/automated-cherry-pick-of-#5121-upstream-release-3.1
Automated cherry pick of #5121: fix(esxiagent): Delete image backup file after saving to glance instead of before
2020-02-14 17:42:05 +08:00
Rain
91c39cf8cd fix(esxiagent): Delete image backup file after saving to glance instead of before 2020-02-14 17:17:06 +08:00
yunion-ci-robot
f73ac4844f Merge pull request #5118 from ioito/automated-cherry-pick-of-#5117-upstream-release-3.1
Automated cherry pick of #5117: fix: 谷歌新加region翻译
2020-02-14 16:12:05 +08:00
Qu Xuan
e681f66aad fix: 谷歌新加region翻译 2020-02-14 14:44:22 +08:00
yunion-ci-robot
d7bf41e173 Merge pull request #5110 from rainzm/automated-cherry-pick-of-#5106-upstream-release-3.1
Automated cherry pick of #5106: fix(notify): Set some default template
2020-02-14 12:20:06 +08:00
yunion-ci-robot
ea3247eaba Merge pull request #5112 from zexi/automated-cherry-pick-of-#5111-upstream-release-3.1
Automated cherry pick of #5111: region: server list by host sn
2020-02-14 12:09:04 +08:00
Zexi Li
d91dbf5f47 region: server list by host sn 2020-02-13 21:09:06 +08:00
Rain
52129c544b fix(notify): Set some default template 2020-02-13 16:54:28 +08:00
yunion-ci-robot
a3b3e9c627 Merge pull request #5089 from rainzm/automated-cherry-pick-of-#5087-upstream-release-3.1
Automated cherry pick of #5087: fix(esxi): Create one if no suitable driver exists when creating disk
2020-02-13 14:38:04 +08:00
yunion-ci-robot
04c73b189d Merge pull request #5084 from tb365/automated-cherry-pick-of-#5083-upstream-release-3.1
Automated cherry pick of #5083: fix ctyun os version
2020-02-13 12:16:03 +08:00
tangbin
f75dbefbfd ctyun vm create fix 2020-02-13 11:44:21 +08:00
tangbin
a2e4490613 add more log 2020-02-13 11:44:21 +08:00
tangbin
2c32832946 eip dissociate bugfixC 2020-02-13 11:44:21 +08:00
tangbin
18239e30cc fix create sys disk snapshot 2020-02-13 11:44:20 +08:00
tangbin
77d6e24ae7 fix ctyun os version 2020-02-13 11:44:20 +08:00
yunion-ci-robot
d5f6473d57 Merge pull request #5096 from bistuzx/automated-cherry-pick-of-#5092-upstream-release-3.1
Automated cherry pick of #5092: update account bucket options
2020-02-13 03:48:04 +08:00
yunion-ci-robot
f7d927cbdd Merge pull request #5086 from zexi/automated-cherry-pick-of-#5085-upstream-release-3.1
Automated cherry pick of #5085: webconsole: use base64 encode connect_params
2020-02-12 22:14:02 +08:00
张旭
56a3d9c05d update account bucket options 2020-02-12 18:29:40 +08:00
Rain
a4b76036c5 fix(esxi): Create one if no suitable driver when creating disk 2020-02-12 16:05:26 +08:00
yunion-ci-robot
9e20cce793 Merge pull request #5064 from zhaoxiangchun/automated-cherry-pick-of-#5061-upstream-release-3.1
Automated cherry pick of #5061: multicloud的vmware监控功能
2020-02-12 15:22:01 +08:00
Zexi Li
f7b3b0c1a0 webconsole: use base64 encode connect_params 2020-02-12 11:44:41 +08:00
yunion-ci-robot
6404e3c2a0 Merge pull request #5082 from rainzm/automated-cherry-pick-of-#5081-upstream-release-3.1
Automated cherry pick of #5081: fix: Fix the bug introduced by pr #4921
2020-02-11 19:16:00 +08:00
yunion-ci-robot
9a1b040933 Merge pull request #5078 from ioito/automated-cherry-pick-of-#5077-upstream-release-3.1
Automated cherry pick of #5077: fix: 修复gcp出方向规则同步问题
2020-02-11 17:42:00 +08:00
yunion-ci-robot
b5468ca840 Merge pull request #5073 from ioito/automated-cherry-pick-of-#5072-upstream-release-3.1
Automated cherry pick of #5072: fix: 忽略无权限的资源标签
2020-02-11 17:22:58 +08:00
Rain
77bbb2bda8 fix: Fix the bug introduced by pr #4921
1. The display problem of contact and notification in notify.
2. The display problem of snat's network info.
2020-02-11 16:51:09 +08:00
zhaoxiangchun
562498da68 multicloud的vmware监控功能
monitor.go中GetMonitorData()函数获取监控数据
2020-02-11 00:44:48 +08:00
Qu Xuan
b91c19bcb5 fix: 修复gcp出方向规则同步问题 2020-02-10 18:47:54 +08:00
Qu Xuan
e48c4d0bb2 fix: 忽略无权限的资源标签 2020-02-10 16:44:06 +08:00
Zexi Li
8c3872000a Merge pull request #5051 from ioito/automated-cherry-pick-of-#5050-upstream-release-3.1
Automated cherry pick of #5050: 统一 details -> isList
2020-02-10 11:12:37 +08:00
yunion-ci-robot
7fde85b83f Merge pull request #5053 from swordqiu/automated-cherry-pick-of-#5052-upstream-release-3.1
Automated cherry pick of #5052: fix: progressively update image size while uploading
2020-02-10 10:34:00 +08:00
yunion-ci-robot
262096d99d Merge pull request #5071 from swordqiu/automated-cherry-pick-of-#5065-upstream-release-3.1
Automated cherry pick of #5065: fix: allow empty domain for windows deployment
2020-02-10 10:32:57 +08:00
Qiu Jian
60ba83b40f fix: progressively update image size while uploading 2020-02-10 09:29:37 +08:00
Qiu Jian
5834ec297e fix: allow empty domain for windows deployment 2020-02-10 09:25:16 +08:00
yunion-ci-robot
8701c6172e Merge pull request #5055 from swordqiu/automated-cherry-pick-of-#5054-upstream-release-3.1
Automated cherry pick of #5054: fix: createdAt should not be synced when update
2020-02-09 22:08:59 +08:00
Qiu Jian
d912e29772 fix: createdAt should not be synced when update 2020-02-08 21:29:06 +08:00
Qu Xuan
bf0adeb0e2 统一 details -> isList 2020-02-07 18:03:18 +08:00
yunion-ci-robot
8857a6281e Merge pull request #5049 from ioito/automated-cherry-pick-of-#5048-upstream-release-3.1
Automated cherry pick of #5048: fix: google e2不支持本地盘
2020-02-07 16:42:54 +08:00
Qu Xuan
5537648dc7 fix: google e2不支持本地盘 2020-02-07 16:08:28 +08:00
yunion-ci-robot
158750373b Merge pull request #5045 from ioito/automated-cherry-pick-of-#5044-upstream-release-3.1
Automated cherry pick of #5044: fix: guest创建兼容keypair参数
2020-02-07 16:05:50 +08:00
Qu Xuan
8a719ffe1f fix: guest创建兼容keypair参数 2020-02-07 15:09:48 +08:00
Zexi Li
c1278bf088 Merge pull request #5043 from wanyaoqi/automated-cherry-pick-of-#5042-upstream-release-3.1
Automated cherry pick of #5042: bm register support update baremetal
2020-02-07 13:04:21 +08:00
Zexi Li
86d6a224cd Merge pull request #5030 from swordqiu/automated-cherry-pick-of-#5026-upstream-release-3.1
Automated cherry pick of #5026: fix: api gateway rpc handler redudant response
2020-02-07 13:03:37 +08:00
wanyaoqi
6b6a15e6b8 bm register support update baremetal 2020-02-07 09:27:02 +08:00
yunion-ci-robot
4a2b10e842 Merge pull request #5039 from ioito/automated-cherry-pick-of-#5038-upstream-release-3.1
Automated cherry pick of #5038: fix: 避免因tenantcache未缓存tenant导致创建云账号失败
2020-02-07 04:54:51 +08:00
yunion-ci-robot
38557f8bcd Merge pull request #5037 from tb365/automated-cherry-pick-of-#5032-upstream-release-3.1
Automated cherry pick of #5032: aws create with eip fix
2020-02-07 04:49:50 +08:00
Qu Xuan
8739393e52 fix: 避免因tenantcache未缓存tenant导致创建云账号失败 2020-02-06 18:29:15 +08:00
tangbin
fdad1303bc aws create with eip fix 2020-02-06 17:58:18 +08:00
yunion-ci-robot
bd2d11f964 Merge pull request #5031 from ioito/automated-cherry-pick-of-#5029-upstream-release-3.1
Automated cherry pick of #5029: fix: 修复gcp安全组同步问题
2020-02-06 17:51:52 +08:00
Qu Xuan
01c962f1c6 fix: 修复gcp安全组同步问题 2020-02-06 17:03:36 +08:00
Qiu Jian
d5ec862e26 fix: api gateway rpc handler redudant response 2020-02-06 17:03:13 +08:00
yunion-ci-robot
1e04ddfe5e Merge pull request #5022 from ioito/automated-cherry-pick-of-#5021-upstream-release-3.1
Automated cherry pick of #5021: fix: 避免因大小写导致linux未注入默认用户
2020-02-06 13:50:52 +08:00
Qu Xuan
67a6f9687d fix: 避免因大小写导致linux未注入默认用户 2020-02-06 12:02:12 +08:00
yunion-ci-robot
9bfb6c0c8e Merge pull request #5020 from swordqiu/automated-cherry-pick-of-#5014-upstream-release-3.1
Automated cherry pick of #5014: fix: support empty dns domain
2020-02-06 09:41:48 +08:00
yunion-ci-robot
b4fff49236 Merge pull request #5013 from swordqiu/automated-cherry-pick-of-#5012-upstream-release-3.1
Automated cherry pick of #5012: fix: network update error caused by vpc feature
2020-02-06 09:34:48 +08:00
Qiu Jian
8536166426 fix: support empty dns domain 2020-02-06 03:28:26 +08:00
Qiu Jian
4bd9051ae4 fix: network update error caused by vpc feature 2020-02-06 03:11:26 +08:00
yunion-ci-robot
74c272cfae Merge pull request #5011 from yousong/automated-cherry-pick-of-#5010-upstream-release-3.1
Automated cherry pick of #5010: vpcagent: ignore external stub guestnetworks
2020-02-06 01:50:48 +08:00
Yousong Zhou
38aed0ca4a vpcagent: ignore external stub guestnetworks 2020-02-05 11:38:57 +08:00
yunion-ci-robot
06eea75674 Merge pull request #5009 from yousong/automated-cherry-pick-of-#5008-upstream-release-3.1
Automated cherry pick of #5008: hostman: fix hostinfo init interrupted by ovn chassis setup
2020-02-05 10:22:47 +08:00
Yousong Zhou
ad73aa590a hostman: fix hostinfo init interrupted by ovn chassis setup
Causing sysinfo.SSystemInfo not initialized

[E 200205 09:45:49 timeutils2.AddTimeout.func1.1(timeutils.go:31)] runtime error: invalid memory address or nil pointer dereference
goroutine 405 [running]:
runtime/debug.Stack(0x551210, 0xc0000de1c0, 0x0)
        /opt/hostedtoolcache/go/1.12.16/x64/src/runtime/debug/stack.go:24 +0x9d
runtime/debug.PrintStack()
        /opt/hostedtoolcache/go/1.12.16/x64/src/runtime/debug/stack.go:16 +0x22
yunion.io/x/onecloud/pkg/util/timeutils2.AddTimeout.func1.1()
        /home/runner/work/onecloud/onecloud/pkg/util/timeutils2/timeutils.go:32 +0x96
panic(0x1b208e0, 0x3bd1880)
        /opt/hostedtoolcache/go/1.12.16/x64/src/runtime/panic.go:522 +0x1b5
yunion.io/x/onecloud/pkg/hostman/hostinfo.(*SHostInfo).updateHostRecord(0xc0009a8a80, 0xc000aff3b0, 0x24)
        /home/runner/work/onecloud/onecloud/pkg/hostman/hostinfo/hostinfo.go:866 +0xbba
yunion.io/x/onecloud/pkg/hostman/hostinfo.(*SHostInfo).getHostInfo(0xc0009a8a80, 0xc00099a510, 0x24)
        /home/runner/work/onecloud/onecloud/pkg/hostman/hostinfo/hostinfo.go:782 +0x37d
yunion.io/x/onecloud/pkg/hostman/hostinfo.(*SHostInfo).getZoneInfo(0xc0009a8a80, 0xc00099a4b0, 0x24, 0x0)
        /home/runner/work/onecloud/onecloud/pkg/hostman/hostinfo/hostinfo.go:760 +0x55c
yunion.io/x/onecloud/pkg/hostman/hostinfo.(*SHostInfo).onGetWireId(0xc0009a8a80, 0xc000aff2f0, 0x24)
        /home/runner/work/onecloud/onecloud/pkg/hostman/hostinfo/hostinfo.go:734 +0x16a
yunion.io/x/onecloud/pkg/hostman/hostinfo.(*SHostInfo).fetchAccessNetworkInfo(0xc0009a8a80)
        /home/runner/work/onecloud/onecloud/pkg/hostman/hostinfo/hostinfo.go:719 +0x3ee
yunion.io/x/onecloud/pkg/hostman/hostinfo.(*SHostInfo).register(...)
        /home/runner/work/onecloud/onecloud/pkg/hostman/hostinfo/hostinfo.go:662
yunion.io/x/onecloud/pkg/util/timeutils2.AddTimeout.func1(0x77359400, 0xc000925520)
        /home/runner/work/onecloud/onecloud/pkg/util/timeutils2/timeutils.go:37 +0x6b
created by yunion.io/x/onecloud/pkg/util/timeutils2.AddTimeout
        /home/runner/work/onecloud/onecloud/pkg/util/timeutils2/timeutils.go:28 +0x49
2020-02-05 10:08:32 +08:00
yunion-ci-robot
4322981be4 Merge pull request #5006 from yousong/automated-cherry-pick-of-#5005-upstream-release-3.1
Automated cherry pick of #5005: hostman: fix detection of ovn controller version
2020-02-05 02:17:48 +08:00
yunion-ci-robot
655d3632fa Merge pull request #5004 from zhaoxiangchun/automated-cherry-pick-of-#4996-upstream-release-3.1
Automated cherry pick of #4996: azure的主机监控信息的获取
2020-02-05 02:10:45 +08:00
Yousong Zhou
cd34e0db95 hostman: skip setting up ovn chassis when env support is not ready 2020-02-04 17:36:13 +08:00
Yousong Zhou
aae5d0dc33 hostman: fix detection of ovn controller version 2020-02-04 17:36:13 +08:00
Zexi Li
51b2f4d3af Merge pull request #5003 from ioito/automated-cherry-pick-of-#4921-upstream-release-3.1
Automated cherry pick of #4921: feature: api -> response struct
2020-02-04 15:55:51 +08:00
zhaoxiangchun
f7987dbf61 modify files by github comments 2020-02-04 10:26:10 +08:00
zhaoxiangchun
f1282345f1 azure的主机监控信息的获取
monitor.go中的GetMonitorData函数完成参数的组装,查询获取监控信息
2020-02-04 10:26:10 +08:00
Qu Xuan
9046117e00 feature: api -> response struct 2020-02-03 18:16:36 +08:00
yunion-ci-robot
a5221d2b23 Merge pull request #4999 from ioito/hotfix/qx-private-cloud-change-config
fix: 避免私有云调整配置匹配不到sku
2020-02-03 16:15:43 +08:00
Qu Xuan
d2b6c4e90f fix: 避免私有云调整配置匹配不到sku 2020-02-03 12:18:28 +08:00
yunion-ci-robot
c16dc54112 Merge pull request #4994 from rainzm/bugfix/esxi_delete_disk
fix(esxiagent): Lead to vCenter server '503' when deleting vm's disk
2020-01-19 23:48:13 +08:00
Rain
bf717adcd5 fix(esxiagent): Lead to vCenter server '503' when deleting vm'disk 2020-01-19 17:55:08 +08:00
yunion-ci-robot
2f56b98778 Merge pull request #4893 from rainzm/feature/esxi_template
feature(esxiagent): Add Template VM as CachedImage
2020-01-19 17:45:12 +08:00
Zexi Li
d4593f1ac2 Merge pull request #4991 from swordqiu/hotfix/qj-fix-cloud-event-id-event-id
Hotfix/qj fix cloud event id event
2020-01-19 17:35:19 +08:00
Qiu Jian
ee9573c786 fix: increment paging list order by multiple columns 2020-01-19 17:03:42 +08:00
Qiu Jian
d6a708fc55 update vendor 2020-01-19 15:54:17 +08:00
yunion-ci-robot
a1526d07de Merge pull request #4901 from wanyaoqi/feature/wyq/sync-on-slave-start
backup guest fix
2020-01-19 15:43:12 +08:00
yunion-ci-robot
1073f9edd3 Merge pull request #4988 from swordqiu/hotfix/qj-cloud-event-new-primary-column
fix: cloudevent_tbl use new primary column event_id
2020-01-19 14:24:15 +08:00
Qiu Jian
9fc698b1c6 fix: cloudevent_tbl use new primary column event_id 2020-01-19 12:51:13 +08:00
yunion-ci-robot
682361acb8 Merge pull request #4256 from yousong/feature/yousong-vpc
Feature/yousong vpc
2020-01-19 11:47:11 +08:00
yunion-ci-robot
4a34ab9552 Merge pull request #4977 from tb365/bugfix/tb-bugfix-0118
get login-info add 404 return & elasticcache account reset password api
2020-01-19 11:42:11 +08:00
yunion-ci-robot
3b6142d874 Merge pull request #4972 from wanyaoqi/feature/wyq/guest-network-fix
hotplug network device
2020-01-19 11:40:11 +08:00
Rain
b301bb01b7 fix(esxiagent): Cancel devKeys's cache of vm 2020-01-19 11:03:13 +08:00
wanyaoqi
c0e2019acd backup guest fix 2020-01-19 10:46:24 +08:00
wanyaoqi
de34764cad support attach multi network 2020-01-19 10:39:12 +08:00
Zexi Li
c8eb7ee127 Merge pull request #4983 from swordqiu/hotfix/qj-allocate-host-access-ip-from-reserved-pool
fix: try allocate host access ip from reserved pool
2020-01-19 10:37:15 +08:00
yunion-ci-robot
14ea4c8d39 Merge pull request #4899 from yousong/bugfix/yousong-lb-updatebg
Bugfix/yousong lb updatebg
2020-01-19 10:28:11 +08:00
yunion-ci-robot
86d22fea9d Merge pull request #4885 from yousong/bugfix/yousong-lb
lb: support accessing backend with tls
2020-01-19 10:24:12 +08:00
yunion-ci-robot
25c0e8cefd Merge pull request #4938 from ioito/hotfix/qx-azure-image-update
fix: 避免/opt/yunion/tmp目录不存在导致自定义镜像创建azure服务器失败
2020-01-19 09:09:12 +08:00
Qiu Jian
bb8d93b371 fix: try allocate host access ip from reserved pool 2020-01-19 00:20:42 +08:00
Zexi Li
0d52727cab Merge pull request #4980 from wanyaoqi/bugfix/wyq/is-standard-domain-optional
bugfix: is standard domain optional
2020-01-18 19:16:24 +08:00
wanyaoqi
2e65633c4c is standard domain optional 2020-01-18 19:10:11 +08:00
TangBin
b97ef4a95a get login-info add 404 return & elasticcache account reset password api
add input params
2020-01-18 18:35:54 +08:00
Zexi Li
187d8e72fe Merge pull request #4976 from rainzm/fix/notify_message
feature(notify): Display id of notification from its ClusterID
2020-01-18 17:08:56 +08:00
Rain
7212ce84d1 feature(notify): Display id of notification from its ClusterID 2020-01-18 17:03:52 +08:00
yunion-ci-robot
f39301adc9 Merge pull request #4954 from ioito/hotfix/qx-keypair-schema
fix: 修复未赋予keypair scheme值问题
2020-01-18 16:28:10 +08:00
yunion-ci-robot
b6af0076c7 Merge pull request #4965 from ioito/hotfix/qx-cloudevent-brand
fix: 公有云日志添加brand字段
2020-01-18 16:25:14 +08:00
Zexi Li
9f6d971681 Merge pull request #4973 from swordqiu/hotfix/qj-bucket-missing-cloud-provider-info
fix: bucket get details missing cloudprovider info
2020-01-18 16:03:43 +08:00
Qu Xuan
83336a36d4 fix: 公有云日志添加brand字段 2020-01-18 16:03:19 +08:00
Qiu Jian
a2358f6aaf fix: bucket get details missing cloudprovider info 2020-01-18 15:26:31 +08:00
wanyaoqi
c74d8ca0c7 hotplug network device 2020-01-18 15:01:08 +08:00
Zexi Li
9b14311965 Merge pull request #4968 from swordqiu/hotfix/qj-ignore-expired-reserved-ip
fix: network-reserve-ip ignores expired reserved ips
2020-01-18 14:24:32 +08:00
Qiu Jian
c114ef9411 fix: network-reserve-ip ignores expired reserved ips 2020-01-18 11:05:45 +08:00
Zexi Li
fd94dc7839 Merge pull request #4962 from wanyaoqi/bugfix/wyq/fix-renew
bugfix: fix models renew
2020-01-17 21:55:12 +08:00
yunion-ci-robot
9fcb011c77 Merge pull request #4960 from yousong/bugfix/yousong-iproute2
hostman: linux_bridge: flush addr on member iface down
2020-01-17 21:49:11 +08:00
wanyaoqi
f0a606a687 fix models renew 2020-01-17 21:47:09 +08:00
yunion-ci-robot
ade64ab485 Merge pull request #4946 from ioito/hotfix/qx-qcloud-eip-bandwidth
fix: 腾讯云主机带宽跟随eip带宽变化而变化
2020-01-17 19:42:09 +08:00
yunion-ci-robot
cafc0d2476 Merge pull request #4775 from zhaoxiangchun/feature/zxc-awsMon
Feature/zxc aws mon
2020-01-17 19:24:09 +08:00
yunion-ci-robot
c91a7818b8 Merge pull request #4957 from wanyaoqi/bugfix/wyq/postpaid-expire
fix postpaid expire
2020-01-17 18:57:09 +08:00
Yousong Zhou
6eeeb27378 hostman: linux_bridge: flush addr on member iface down
Previously it was done by "ifconfig xx 0.0.0.0 down"

Fixes 4d8d20f ("hostman: use package iproute2")
2020-01-17 18:11:08 +08:00
yunion-ci-robot
44dcbb6061 Merge pull request #4955 from yousong/bugfix/yousong-iproute2
esxi: dont import hostman pkgs
2020-01-17 18:03:08 +08:00
wanyaoqi
96862a2560 fix postpaid expire 2020-01-17 17:51:29 +08:00
Yousong Zhou
bc999888a2 vpcagent: a vpc agent with ovn driver 2020-01-17 17:48:04 +08:00
Yousong Zhou
7c29b06669 scheduler: network_predicate: allow onecloud vpc networks 2020-01-17 17:48:04 +08:00
Yousong Zhou
d17452240b scheduler: simplify MinCounters 2020-01-17 17:48:04 +08:00
Yousong Zhou
da68e7fccf scheduler: simplify findCandidatesThatFit() 2020-01-17 17:48:03 +08:00
Yousong Zhou
99e2a1a948 hostman: add OvnHelper 2020-01-17 17:48:03 +08:00
Yousong Zhou
2a6f76539c hostman: drop flow mods in ifup/ifdown script
For classic network iface, these are to be handled by sdnagent.  However
these can cause problem for ovn-controller
2020-01-17 17:48:01 +08:00
Yousong Zhou
496bbbf5c0 hostman: hostbridge: const values for driver types 2020-01-17 17:47:00 +08:00
Yousong Zhou
9173e8aa0b hostman: fix wording: detective -> detect 2020-01-17 17:46:58 +08:00
Yousong Zhou
5226deb366 mcclient: options: list all including deleted resource with --delete-all 2020-01-17 17:46:08 +08:00
Yousong Zhou
3cd8049222 cloudcommon: db: allow sysadmin to list deleted resources
The query arg name cannot be "deleted" to avoid collide with resource
field name.
2020-01-17 17:46:08 +08:00
Yousong Zhou
770a6d194d cloudcommon: extend interface for fetching metadata 2020-01-17 17:46:07 +08:00
Yousong Zhou
4221e214f0 guestnetworks: nic desc for onecloud vpc 2020-01-17 17:45:07 +08:00
Yousong Zhou
54783f601a hosts: Add OvnVersion field 2020-01-17 17:44:31 +08:00
Yousong Zhou
2fbe4a30b7 hosts: GetNetworkWithId: take into account onecloud vpc subnet 2020-01-17 17:44:31 +08:00
Yousong Zhou
5f623cb892 hosts: simplify GetNetworkWithIdAndCredential
By removing unused arg
2020-01-17 17:44:31 +08:00
Yousong Zhou
282da02f9f networks: forbid updating onecloud vpc network 2020-01-17 17:44:31 +08:00
Yousong Zhou
d9d343822f networks: validate onecloud vpc subnet
Also rewrite for more readability, especially the part on finding wire,
vpc, region, etc.
2020-01-17 17:44:31 +08:00
Yousong Zhou
f194ad7183 vpcs: add method containsIPV4Range() 2020-01-17 17:44:31 +08:00
Yousong Zhou
93c2192b77 vpcs: 自动删除wire 2020-01-17 17:44:29 +08:00
Yousong Zhou
81dc7fd91e networks: auto-create zone wire 2020-01-17 17:41:06 +08:00
Yousong Zhou
0a3c8acbd4 vpcs: 允许为私有云创建vpc 2020-01-17 17:41:06 +08:00
Yousong Zhou
e9e8cd1519 models: guard against nil memory access 2020-01-17 17:41:06 +08:00
Yousong Zhou
fb682c8e2b mcclient: rename BaseManagerInterface to IBaseManager 2020-01-17 17:41:06 +08:00
Yousong Zhou
5b0f36dbcb mcclient: models: map to db models 2020-01-17 17:41:06 +08:00
Yousong Zhou
b5a9625575 esxi: dont import hostman pkgs
Fix building region on darwin
2020-01-17 16:52:11 +08:00
Zexi Li
fca1a6d795 Merge pull request #4950 from wanyaoqi/bugfix/wyq/host-deployer-version-up
host deployer base version up
2020-01-17 14:45:34 +08:00
wanyaoqi
72a4c8244d host deployer base version up 2020-01-17 14:42:52 +08:00
Rain
7524141e49 feature(esxiagent): Add Template VM as CachedImage 2020-01-17 14:16:08 +08:00
Qu Xuan
75c22ea603 fix: 修复未赋予keypair scheme值问题 2020-01-17 14:11:08 +08:00
yunion-ci-robot
b896ae5ca7 Merge pull request #4935 from yousong/bugfix/yousong-iproute2
netutils2: guard against possible nil members
2020-01-17 13:48:10 +08:00
Qu Xuan
24591ecfab fix: 腾讯云主机带宽跟随eip带宽变化而变化 2020-01-17 13:32:23 +08:00
yunion-ci-robot
a4495dd731 Merge pull request #4943 from wanyaoqi/bugfix/wyq/fix-snapshot-filter-by-disk-type
region: fix snapshot list filter by disk type
2020-01-17 12:58:08 +08:00
wanyaoqi
fd698314be fix snapshot list filter by disk type 2020-01-17 11:57:04 +08:00
yunion-ci-robot
1c44b51913 Merge pull request #4880 from tb365/bugfix/tb-elb-bugfix-0108
Bugfix/tb elb bugfix 0108
2020-01-17 11:00:09 +08:00
yunion-ci-robot
050c4173a0 Merge pull request #4922 from wanyaoqi/bugfix/wyq/host-misc-fix-0116
host: fix detect host info
2020-01-17 10:55:08 +08:00
yunion-ci-robot
ea27a3c029 Merge pull request #4931 from rainzm/bugfix/esxi_copy_image
bugfix(esxiagent): PrefetchImageCacheByCopy & SHost.FileUrlPathToDsPath
2020-01-17 10:54:09 +08:00
Qu Xuan
c4f9e47a1b fix: 避免/opt/yunion/tmp目录不存在导致自定义镜像创建azure服务器失败 2020-01-17 10:50:03 +08:00
Rain
5b1c97af58 bugfix(esxiagent): PrefetchImageCacheByCopy & SHost.FileUrlPathToDsPath
1. Fix the bug when preparing remote image by copy
2. SHost.FileUrlPathToDsPath will not work when shost has multiple storage.
2020-01-17 10:39:41 +08:00
zhaoxiangchun
139d2cacee add License Head 2020-01-17 10:28:00 +08:00
yunion-ci-robot
e7a3905669 Merge pull request #4926 from ioito/hotfix/qx-cloudevent-list-filter
cloudevent 支持since until参数过滤
2020-01-17 09:20:08 +08:00
yunion-ci-robot
0fa2e68627 Merge pull request #4924 from tb365/bugfix/tb-bugfix-011601
server sku filter by city bugfix
2020-01-17 08:46:07 +08:00
yunion-ci-robot
4aee13b813 Merge pull request #4925 from ioito/feature/qx-batch-perform-uncache-image
fix: 支持批量释放镜像缓存
2020-01-17 08:45:07 +08:00
yunion-ci-robot
cd3899eb15 Merge pull request #4428 from tb365/feature/tb-ctyun-operations
ctyun operations
2020-01-16 22:54:08 +08:00
Yousong Zhou
975728bb31 netutils2: guard against possible nil members 2020-01-16 22:48:26 +08:00
Yousong Zhou
bd1efb1716 netutils: DefaultSrcIpDev: use iproute2.RouteGetByDst 2020-01-16 22:48:26 +08:00
Yousong Zhou
6f49ceade3 iproute2: add RouteGetByDst() 2020-01-16 22:48:26 +08:00
Yousong Zhou
5d1905aa3c iproute2: test against non-nil dst of routes returned by List4() 2020-01-16 22:48:26 +08:00
Rain
bc83e2940a bugfix(esxiagent): PrefetchImageCacheByCopy & SHost.FileUrlPathToDsPath
1. Fix the bug when preparing remote image by copy
2. SHost.FileUrlPathToDsPath will not work when shost has multiple storage.
2020-01-16 22:00:07 +08:00
yunion-ci-robot
5a698a76bd Merge pull request #4933 from rainzm/bugfix/host-deployer_vddk
fix(hostdeployer): Umount VDDKDisk when IRootFsDriver is nil
2020-01-16 21:48:11 +08:00
yunion-ci-robot
cab9960d6c Merge pull request #4929 from yousong/bugfix/yousong-iproute2
hostman: replace route command dep with netlink call
2020-01-16 21:24:11 +08:00
Rain
ea1e9c75fa fix(hostdeployer): Umount VDDKDisk when IRootFsDriver is nil 2020-01-16 21:19:16 +08:00
Yousong Zhou
167bca1931 hostman: replace route command dep with netlink call 2020-01-16 20:47:50 +08:00
Yousong Zhou
5cd60db1b4 netutils2: replace GetRoutes with netlink call 2020-01-16 20:47:50 +08:00
Yousong Zhou
1a5f6ee0f6 iproute2: route operations 2020-01-16 20:27:55 +08:00
Yousong Zhou
8b5b6bc591 hostman: add secondary addresses with one iproute2 call 2020-01-16 20:27:39 +08:00
Yousong Zhou
697c441acf hostman: up bridge interface in SetupAddresses
Previously it was done implicitly by ifconfig addr config command
2020-01-16 20:27:39 +08:00
Qu Xuan
495214e4c2 cloudevent 支持since until参数过滤 2020-01-16 19:37:55 +08:00
Qu Xuan
ad57f66781 fix: 支持批量释放镜像缓存 2020-01-16 19:09:32 +08:00
Yousong Zhou
c952693b82 hostman: fix removing addresses on slave ifaces
Previously it was done with "ifconfig xxx 0 up"

Fixes 4d8d20f ("hostman: use package iproute2")
2020-01-16 18:33:03 +08:00
TangBin
9956a04e22 server sku filter by city bugfix 2020-01-16 17:35:19 +08:00
TangBin
8b0f4b6576 ctyun operations 2020-01-16 17:05:20 +08:00
yunion-ci-robot
3e9915523f Merge pull request #4919 from yousong/bugfix/yousong-iproute2
netutils: isolate linux dependent parts
2020-01-16 16:52:08 +08:00
wanyaoqi
ea123270b3 fix detect host info 2020-01-16 16:48:15 +08:00
Yousong Zhou
5efeb6fe50 netutils: isolate linux dependent parts 2020-01-16 16:34:49 +08:00
Yousong Zhou
c3191c9c83 iproute2: skip setting addrs on parse error 2020-01-16 16:34:49 +08:00
Yousong Zhou
33010e2d93 hostman: fix setting address
Fixes 4d8d20f ("hostman: use package iproute2")
2020-01-16 16:34:49 +08:00
Zexi Li
25c2165b81 Merge pull request #4914 from wanyaoqi/bugfix/wyq/fix-deploy-iso-failed
bugfix: fix deploy iso failed
2020-01-16 15:32:44 +08:00
yunion-ci-robot
eb670de2b4 Merge pull request #4916 from tb365/bugfix/tb-bugfix-0116
ctyun bugfix
2020-01-16 14:42:07 +08:00
TangBin
276bfe40ab comment fix 2020-01-16 14:05:13 +08:00
TangBin
14b58d8c6d ctyun bugfix 2020-01-16 11:36:40 +08:00
yunion-ci-robot
f6cb85592d Merge pull request #4253 from ioito/feature/qx-google-operation
Feature/qx google operation
2020-01-16 11:02:05 +08:00
yunion-ci-robot
c71b20c748 Merge pull request #4836 from yousong/bugfix/yousong-iproute2
Bugfix/yousong iproute2
2020-01-16 09:58:06 +08:00
yunion-ci-robot
abbc8cbc63 Merge pull request #4911 from tb365/bugfix/tb-bugfix-011501
server get login info 404 not found
2020-01-16 09:52:06 +08:00
yunion-ci-robot
eef972ea05 Merge pull request #4904 from ioito/bugfix/qx-azure-vm-create-sys-storage
fix: 避免创建azure时指定高级ssd失效
2020-01-16 09:48:06 +08:00
wanyaoqi
52ad575184 fix deploy iso failed 2020-01-15 20:56:07 +08:00
yunion-ci-robot
edc6711d96 Merge pull request #4887 from wanyaoqi/feature/wyq/glance-fix
glance: validate image share on delete, update pulibc scope on mark standard
2020-01-15 20:31:10 +08:00
Qu Xuan
4a6a4c594a feature: google云操作支持 2020-01-15 20:23:31 +08:00
TangBin
4d6921285e server get login info 404 not found 2020-01-15 19:16:24 +08:00
Qu Xuan
129ed08a5c fix: 避免创建azure时指定高级ssd失效 2020-01-15 17:56:57 +08:00
Zexi Li
5e4155061f Merge pull request #4902 from wanyaoqi/bugfix/wyq/probe-mod-use-executor
host: use executor probe kernel mods
2020-01-15 17:30:09 +08:00
wanyaoqi
fec7ecbee7 use executor probe kernel mods 2020-01-15 16:59:25 +08:00
Yousong Zhou
c1dacdda12 lbagent: tunable tune.http.maxhdr 2020-01-15 12:14:27 +08:00
Yousong Zhou
5f16a5fae8 lbagent: fix not logging https listener 2020-01-15 12:14:27 +08:00
Yousong Zhou
a468ffedbf lbagent: support accessing backend with tls 2020-01-15 12:14:27 +08:00
Yousong Zhou
12c4664d85 climc: lbbackend: support ssl related options 2020-01-15 12:14:27 +08:00
Yousong Zhou
a363221e68 lb: support accessing backend with tls 2020-01-15 12:14:27 +08:00
Yousong Zhou
96f972877a lb: regiondrivers: remove unneeded Optional(true) call 2020-01-15 12:14:27 +08:00
Yousong Zhou
2f7f26e640 climc: lblistener: allow setting backendgroup to empty 2020-01-14 21:36:50 +08:00
Yousong Zhou
3f684ef94c mcclient: options: test marshal string ptr 2020-01-14 21:36:50 +08:00
Yousong Zhou
dd01610931 lblistener: allow setting http/https listener backendgroup to empty 2020-01-14 21:36:50 +08:00
Yousong Zhou
dcb4366e6d validators: ValidatorModelIdOrName: allow empty 2020-01-14 21:36:50 +08:00
Yousong Zhou
4d8d20fe95 hostman: use package iproute2 2020-01-14 18:41:04 +08:00
Yousong Zhou
480ed8ebc6 hostman: fix setting mtu for tunnel padding 2020-01-14 18:41:04 +08:00
Yousong Zhou
212af8b864 hostman: hostinfo: use netutils2.DefaultSrcIpDev() 2020-01-14 18:41:04 +08:00
Yousong Zhou
0987655e03 vendor: add github.com/vishvananda/netlink 2020-01-14 18:41:04 +08:00
Yousong Zhou
1f21fafb65 netutils2: use netlink to GetAddresses() 2020-01-14 18:41:04 +08:00
Yousong Zhou
58b03973a5 netutils2: add DefaultSrcIpDev() 2020-01-14 18:41:04 +08:00
Yousong Zhou
fc4189694b iproute2: initial version 2020-01-14 18:41:04 +08:00
Zexi Li
358ce8e6e6 Merge pull request #4895 from rainzm/bugfix/notify_template_fetch
fix(notify): Update template
2020-01-14 18:23:39 +08:00
Rain
da3797275f fix(notify): Update template 2020-01-14 17:52:42 +08:00
Zexi Li
5b907fc3e9 Merge pull request #4888 from wanyaoqi/bugfix/wyq/host-misc0114
host fix env path
2020-01-14 17:26:56 +08:00
wanyaoqi
b113c0599f host fix env path 2020-01-14 17:19:18 +08:00
wanyaoqi
bb82d30331 validate share on delete, update pulibc scope on mark standard 2020-01-14 17:08:29 +08:00
TangBin
5e599b180e aliyun backendgroup bugfix 2020-01-14 15:40:05 +08:00
TangBin
90a541b9bf aws backendgroup delete bugfix 2020-01-14 15:25:54 +08:00
TangBin
aa55b51106 aws sync routetable 2020-01-14 15:25:54 +08:00
TangBin
f51ca4201d huawei remove backend group bugfix 2020-01-14 15:25:54 +08:00
Zexi Li
7d7fd841b4 Merge pull request #4874 from yousong/bugfix/yousong-vendor
vendor: update sqlchemy
2020-01-14 13:57:46 +08:00
Zexi Li
82184636a2 Merge pull request #4878 from yousong/bugfix/yousong-lb
lb: fix setting default redirect type
2020-01-14 13:57:11 +08:00
Yousong Zhou
2c57279e83 lb: fix setting default redirect type 2020-01-14 13:28:06 +08:00
Yousong Zhou
a520e04aa8 vendor: update sqlchemy 2020-01-14 13:24:16 +08:00
Zexi Li
bbc2770045 Merge pull request #4873 from swordqiu/hotfix/qj-list-doc-improvements
fix: list documentation improvements
2020-01-14 12:02:24 +08:00
Zexi Li
4a07f1984c Merge pull request #4869 from swordqiu/hotfix/qj-service-config-first-change-not-effective
fix: first load of service config not effective
2020-01-14 10:23:32 +08:00
Qiu Jian
45849355e6 fix: list documentation improvements 2020-01-14 04:17:15 +08:00
Qiu Jian
2cf9785881 fix: first load of service config not effective 2020-01-14 03:02:27 +08:00
yunion-ci-robot
6cd9e9670c Merge pull request #4862 from ioito/hotfix/qx-openstack-change-config
fix: 仅kvm需要去判断是否需要关机调整配置,公有云私有云默认不需要
2020-01-14 02:59:01 +08:00
yunion-ci-robot
0320134cea Merge pull request #4837 from ioito/hotfix/qx-disk-log
fix: 添加磁盘创建失败日志
2020-01-14 02:56:03 +08:00
yunion-ci-robot
a28e914782 Merge pull request #4858 from ioito/hotfix/qx-cloudevent-fix
fix: 恢复公有云日志name
2020-01-14 02:50:02 +08:00
yunion-ci-robot
b32f534b50 Merge pull request #4829 from ioito/hotfix/qx-cloudevent-systemc-resource
fix: 公有云日志权限列表
2020-01-14 02:29:02 +08:00
yunion-ci-robot
3659899881 Merge pull request #4849 from ioito/hotfix/qx-aliyun-secgrouprule-sync
fix: aliyun rule fix
2020-01-14 02:19:02 +08:00
yunion-ci-robot
eb32cf7cac Merge pull request #4799 from yousong/bugfix/yousong-lb
lb: support redirect type listener & rule
2020-01-14 02:03:01 +08:00
Zexi Li
953cd5f143 Merge pull request #4842 from ioito/hotfix/qx-secgroup-log
fix: 添加安全组操作日志
2020-01-13 20:50:25 +08:00
Zexi Li
6d407e7fbd Merge pull request #4856 from rainzm/bugfix/esxi-agent_build
fix(esxi-agent): Export CGO_ENABLED=0 when building esxi-agent
2020-01-13 20:49:18 +08:00
Rain
a1627c4e24 fix(esxi-agent): Export CGO_ENABLED=0 when building esxi-agent 2020-01-13 20:42:37 +08:00
zhaoxiangchun
f2dbd426cb vendor: update 2020-01-13 19:18:30 +08:00
zhaoxiangchun
e81c5e03c9 新增aws监控代码,GetMonitorData函数,获取监控信息
首先通过monitor.go文件中的GetMonitorData函数组装查询参数,然后通过SRegion中cloudWatchRequest函数组装request信息,
进行查询返回
2020-01-13 19:17:00 +08:00
Qu Xuan
26d2913a95 fix: 仅kvm需要去判断是否需要关机调整配置,公有云私有云默认不需要 2020-01-13 18:07:19 +08:00
Qu Xuan
86e0d5f68f fix: 恢复公有云日志name 2020-01-13 17:54:33 +08:00
Qu Xuan
8d96105c8f fix: aliyun rule fix 2020-01-13 17:30:48 +08:00
Zexi Li
76ed60d6c0 Merge pull request #4713 from swordqiu/feature/qj-cloud-provider-capability-and-list-input-struct
feature: cloudprovider capability filter and listinput recode
2020-01-13 17:03:28 +08:00
Qiu Jian
7cf59a1fc1 update vendor 2020-01-13 15:57:43 +08:00
Qiu Jian
8154999c05 update server listinput comments 2020-01-13 15:42:10 +08:00
Qu Xuan
63eeafea27 fix: 添加安全组操作日志 2020-01-13 15:25:48 +08:00
Qu Xuan
ee67c84af1 fix: 添加磁盘创建失败日志 2020-01-13 14:53:30 +08:00
yunion-ci-robot
136423fdf8 Merge pull request #4834 from zexi/docker/add-esxi-agent
action: add esxi agent
2020-01-13 13:28:02 +08:00
Zexi Li
86db85bddf action: add esxi agent 2020-01-13 13:23:43 +08:00
Qiu Jian
7fba2df0f2 fix: skus filters 2020-01-13 13:19:48 +08:00
Qiu Jian
750cd9d4dc fix: ServerCreateInput add deprecated sku field for backward
compatibility
2020-01-13 13:19:48 +08:00
Qiu Jian
877fdf90d9 fix: resolve compilation errors after merge 2020-01-13 13:19:48 +08:00
Qiu Jian
f526acc5bf update vendor 2020-01-13 13:19:48 +08:00
Qiu Jian
b9be567ebf use deprecated-by tag to describe deprecated fields 2020-01-13 13:19:47 +08:00
Qiu Jian
29c9d05b5f refine auto-gen swagger documentation 2020-01-13 13:19:47 +08:00
Qiu Jian
14c1ddaccb feature: cloudprovider capability filter and listinput recode 2020-01-13 13:19:47 +08:00
Zexi Li
49b8d52634 Merge pull request #4833 from zexi/docs/swagger-serve-fix-port
swagger serve use fixed port
2020-01-13 13:13:39 +08:00
Zexi Li
3f265d8b8b swagger serve use fixed port 2020-01-13 13:12:35 +08:00
Qu Xuan
12fe979952 fix: 公有云日志权限列表 2020-01-13 11:20:00 +08:00
Zexi Li
2db8cca6cd Merge pull request #4817 from swordqiu/hotfix/qj-service-config-change-non-default-domain-projects
fix: non-default-domain-projects changes not take effects after changing
2020-01-13 10:56:29 +08:00
Zexi Li
d8ff92b39c Merge pull request #4813 from swordqiu/hotfix/qj-default-read-policy-for-quotas
fix: set default read privileges for reading all quotas
2020-01-13 10:54:53 +08:00
Zexi Li
d828d1a43f Merge pull request #4828 from wanyaoqi/bugfix/wyq/baremetal-setup
fix baremetal base dockerfile
2020-01-13 10:53:24 +08:00
wanyaoqi
cda5608d2f fix baremetal base dockerfile 2020-01-13 10:43:09 +08:00
yunion-ci-robot
4592928398 Merge pull request #4821 from ioito/bugfix/qx-dbinstance-create-input
fix: 修复rds struct input 错误
2020-01-13 09:29:01 +08:00
yunion-ci-robot
8a936fc339 Merge pull request #4823 from tb365/bugfix/tb-bugfix-0111
sku domain filter bugfix
2020-01-13 09:24:00 +08:00
TangBin
9700dbcc49 sku domain filter bugfix 2020-01-12 12:01:58 +08:00
Qu Xuan
dc45c21e4a fix: 修复rds struct input 错误 2020-01-12 00:23:43 +08:00
Qiu Jian
6104dd28bb fix: non-default-domain-projects changes not take effects after changing
through service-config
2020-01-12 00:01:19 +08:00
yunion-ci-robot
64252402a3 Merge pull request #4809 from tb365/bugfix/tb-bugfix-0111
sku domain filter bugfix
2020-01-11 23:22:00 +08:00
TangBin
53eed495c1 sku domain filter bugfix 2020-01-11 21:23:24 +08:00
yunion-ci-robot
9d37deddcb Merge pull request #4773 from wanyaoqi/feature/wyq/structure-isolated-device-info-on-guest-query
region: structure isolated device info on guest query
2020-01-11 18:26:58 +08:00
Qiu Jian
5fb17ce3f2 fix: set default read privileges for reading all quotas 2020-01-11 17:57:28 +08:00
Jian Qiu
df81d7a9fe fix: mising sku in server creat (#4807) 2020-01-11 09:35:33 +08:00
Yousong Zhou
1e285a0043 climc: lb: allow setting redirect parameters 2020-01-10 21:33:12 +08:00
Yousong Zhou
de0983a6f7 climc: lblistenerrule: allow setting request rate 2020-01-10 21:33:12 +08:00
Yousong Zhou
dfee0713e9 lbagent: support http redirect 2020-01-10 21:33:12 +08:00
Yousong Zhou
d41805f513 lb: support redirect type listener & rule 2020-01-10 21:33:12 +08:00
Yousong Zhou
87d2a5da13 lblistenerrule: validate domain and path on creation 2020-01-10 21:33:12 +08:00
Yousong Zhou
b41d2f7248 validators: add ValidatorHostPort 2020-01-10 21:33:12 +08:00
Yousong Zhou
0c00b3ac98 validators: add ValidatorIntChoices 2020-01-10 21:33:12 +08:00
Yousong Zhou
60eb3bcbb2 validators: remove unused defaultVal member 2020-01-10 21:33:12 +08:00
yunion-ci-robot
f90b4cd9e1 Merge pull request #4795 from tb365/bugfix/tb-bugfix-0110
Bugfix/tb bugfix 0110
2020-01-10 20:20:01 +08:00
yunion-ci-robot
0eec98d1f8 Merge pull request #4712 from tb365/feature/tb-support-update-skus-manually
cloud account support manually sync skus
2020-01-10 20:05:58 +08:00
yunion-ci-robot
6f093f0473 Merge pull request #4801 from tb365/bugfix/tb-bugfix-011001
kvm elb listener update bugfix
2020-01-10 19:49:58 +08:00
yunion-ci-robot
8a2641c8ea Merge pull request #4766 from tb365/bugfix/tb-apigateway-getmodule-fix
_getModule fix
2020-01-10 19:21:58 +08:00
TangBin
5ac63fceb0 kvm elb listener update bugfix 2020-01-10 18:24:08 +08:00
TangBin
a3c7d765c8 spelling mistakes fix 2020-01-10 17:15:57 +08:00
TangBin
77ca9f5fe1 user register ingore blank row 2020-01-10 17:10:49 +08:00
TangBin
3174adde04 add filter skus by domain id 2020-01-10 17:07:11 +08:00
Zexi Li
8cb5bcce15 Merge pull request #4779 from rainzm/bugfix/esxi_workspace
fix(esxi-agent): Avoid redundant agent & Adjust workspace path
2020-01-10 11:51:45 +08:00
yunion-ci-robot
4703567fe1 Merge pull request #4754 from rainzm/bugfix/storage_sync
fix(region): Sync HostStorage in syncOnPremiseCloudProviderInfo
2020-01-10 10:33:57 +08:00
yunion-ci-robot
3b36f67c53 Merge pull request #4761 from wanyaoqi/bugfix/wyq/fix-image-disable-delete
image: image-properties-add-disable-delete
2020-01-10 10:27:58 +08:00
wanyaoqi
51f9ef4ee6 structure isolated device info on guest query 2020-01-10 10:27:41 +08:00
yunion-ci-robot
7ac8fc8026 Merge pull request #4768 from wanyaoqi/bugfix/wyq/fix-guest-start-no-task-complete
bugfix: fix guest start no task complete
2020-01-10 10:22:58 +08:00
yunion-ci-robot
2adc3e03fc Merge pull request #4780 from swordqiu/hotfix/qj-initialize-service-config
fix: initialize service config on keystone when service boot
2020-01-10 10:17:59 +08:00
yunion-ci-robot
0d738d06d3 Merge pull request #4784 from yousong/bugfix/yousong-cname
Bugfix/yousong cname
2020-01-10 10:13:58 +08:00
Yousong Zhou
fb9e3c9522 dns: chain load records for cname 2020-01-09 23:19:59 +08:00
Yousong Zhou
1c84754373 dns: prepare for responding with A record of cname value 2020-01-09 23:19:59 +08:00
Yousong Zhou
b904b58de0 dnsrecords: add helper methods 2020-01-09 23:19:59 +08:00
Qiu Jian
74af253254 fix: initialize service config on keystone when service boot 2020-01-09 22:04:27 +08:00
Rain
891a018bef fix(esxi-agent): Avoid redundant agent & Adjust workspace path
1. There is only one esxi agent needed in OneCloud.
2. Workspace path shoule be EsxiAgentPath not the parent directory of this.
3. The VM name is too long for vcenter when importing VM so that shrink
it.
2020-01-09 21:07:41 +08:00
Rain
5dc98f2645 fix(region): Sync HostStorage in syncOnPremiseCloudProviderInfo
情景:绕过OneCloud,删除 storage 上的所有 vm 并且删除 storage 然后新建 storage。

问题:因为存在 vm 在使用此 storage ,所以在同步的时候,对应的 storage
会删除失败,并且阻止了 storagecache 的同步。这样在创建机器的时候,如果
使用旧的 storage 就会导致创建失败(因为此 Host 已经不再使用对应的
remote storage); 如果使用新的 storage 就会因为找不到对应的 storage cache 而失败。

修改:如果因为以上原因删除失败的 storage 的 storage_type 为 local
那么就把这个 storage 置为 offline,并且不再阻止 storage cache 的同步。
2020-01-09 21:00:08 +08:00
wanyaoqi
ddb4d72527 fix guest start no task complete 2020-01-09 17:11:41 +08:00
TangBin
1b7acb4eee _getModule fix 2020-01-09 16:34:14 +08:00
wanyaoqi
ab8f96ee67 image-properties-add-disable-delete 2020-01-09 15:40:33 +08:00
TangBin
5fd512cf11 cloud account support manually sync skus 2020-01-09 11:07:33 +08:00
yunion-ci-robot
7c31d1a7da Merge pull request #4755 from rainzm/bugfix/esxi_vm_path
fix(esxi-agent): Adjust the VM Path in Datastore
2020-01-09 10:27:57 +08:00
Zexi Li
adcfaaa555 Merge pull request #4757 from swordqiu/hotfix/qj-fix-quota-brand-key
fix: brand of compute quota key should be fixed
2020-01-09 09:58:33 +08:00
yunion-ci-robot
7c51a354e7 Merge pull request #4709 from wanyaoqi/bugfix/wyq/host-misc-20200108
host misc fix
2020-01-09 00:03:58 +08:00
yunion-ci-robot
8cbf8caf79 Merge pull request #4724 from yousong/bugfix/yousong-wire-name
wires: lift name length, charset constraint
2020-01-08 23:39:57 +08:00
yunion-ci-robot
112dd56081 Merge pull request #4750 from ioito/bugfix/qx-qcloud-cloudevent-success
fix: cloudevent 成功条件补充
2020-01-08 23:31:01 +08:00
Qiu Jian
90c301ca01 fix: brand of compute quota key should be fixed 2020-01-08 23:16:44 +08:00
Rain
883871d551 fix(esxi-agent): Adjust the VM Path in Datastore 2020-01-08 21:05:22 +08:00
Qu Xuan
a0d48290af fix: cloudevent 成功条件补充 2020-01-08 20:43:07 +08:00
Zexi Li
2021c2095a Merge pull request #4735 from swordqiu/hotfix/qj-quota-misc-bugfix-20200108
fix: misc quota bugs
2020-01-08 19:17:24 +08:00
yunion-ci-robot
4baa85932c Merge pull request #4728 from ioito/hotfix/qx-eip-generate-name
Hotfix/qx eip generate name
2020-01-08 18:59:01 +08:00
Qiu Jian
3f148f78e7 fix: misc quota bugs
1. snapshot pending usage not cleaned after created
2. server-attach-network error
3. loadbalancer fail to set cloudregion_id
2020-01-08 18:44:07 +08:00
Qu Xuan
3c9d6b929a fix: eip duplicate name 2020-01-08 17:41:22 +08:00
Yousong Zhou
8d3434cdab wires: lift name length, charset constraint 2020-01-08 17:21:30 +08:00
yunion-ci-robot
6c7b477956 Merge pull request #4695 from rainzm/bugfix/guest_image_quota
fix(glance): Cancel pending usage of image quota correctly
2020-01-08 16:10:58 +08:00
yunion-ci-robot
4a9a72d530 Merge pull request #4657 from ioito/hotfix/qx-api-docs
Hotfix/qx api docs
2020-01-08 15:54:57 +08:00
yunion-ci-robot
9e62b4dace Merge pull request #4701 from tb365/bugfix/tb-bugfix-0107
Bugfix/tb bugfix 0107
2020-01-08 15:51:57 +08:00
Zexi Li
899f90f60b Merge pull request #4714 from wanyaoqi/bugfix/wyq/subimage-field-nullable
bugfix: glance set subimage some field nullable
2020-01-08 15:42:33 +08:00
wanyaoqi
00237495b9 set subimage some field nullable 2020-01-08 15:35:26 +08:00
yunion-ci-robot
77ca8b147b Merge pull request #4655 from ioito/hotfix/qx-cloudevent-query-optimized
optimized: 优化公有云日志查询
2020-01-08 14:53:57 +08:00
wanyaoqi
eb16796db1 host misc fix 2020-01-08 14:19:26 +08:00
yunion-ci-robot
0c0e414b7b Merge pull request #4683 from yousong/bugfix/yousong-owrt
Bugfix/yousong owrt
2020-01-08 12:53:57 +08:00
Qu Xuan
1d6cf71cfc fix: add api docs 2020-01-08 11:54:57 +08:00
Qu Xuan
92e4dc7cd6 optimized: 优化公有云日志查询 2020-01-08 11:44:07 +08:00
yunion-ci-robot
356b021cd3 Merge pull request #4650 from ioito/hotfix/qx-rds-account-fix
fix: 避免创建rds account, database后未设置exteranl_id
2020-01-08 11:39:57 +08:00
yunion-ci-robot
d1db323c77 Merge pull request #4636 from ioito/hotfix/qx-huawei-rds-password-check
fix: 加强密码校验
2020-01-08 11:36:58 +08:00
Rain
1560fb53a9 fix(glance): Cancel pending usage of image quota correctly
ImageNumber always be zero because the 'image_number' in data was
removed so that canceling pending usage not work.
2020-01-08 11:27:02 +08:00
yunion-ci-robot
0b84c1f97e Merge pull request #4634 from tb365/bugfix/tb-bugfix-0106
huawei image delete bugfix
2020-01-08 11:25:57 +08:00
TangBin
3e9c68abad huawei redis sync fix 2020-01-08 11:04:58 +08:00
TangBin
7b8d617b5b ctyun default gateway fix 2020-01-08 10:57:31 +08:00
TangBin
61f72fbbfd huawei network default gateway fix 2020-01-08 10:56:32 +08:00
TangBin
8607d25035 network create GuestIpPrefix fix 2020-01-08 10:46:34 +08:00
yunion-ci-robot
2d2384df19 Merge pull request #4685 from ioito/hotfix/qx-next-marker
fix: next marker format
2020-01-08 10:07:57 +08:00
TangBin
3982f7fb19 azure skus sync fix 2020-01-07 20:03:27 +08:00
Zexi Li
49603570ec Merge pull request #4676 from swordqiu/hotfix/qj-guest-network-default-share-scope
fix: guest network default share scope should be system if non-default-domain-projects is off
2020-01-07 19:30:03 +08:00
Zexi Li
0a0386f76f Merge pull request #4666 from swordqiu/hotfix/qj-guest-brand-on-guest-create
fix: guess brand on guest create
2020-01-07 19:28:15 +08:00
yunion-ci-robot
8d7808b3fb Merge pull request #4656 from ioito/hotfix/qx-qcloud-bandwidth-user
fix: 避免拥有带宽包的腾讯云创建机器失败
2020-01-07 18:02:57 +08:00
Qu Xuan
1514c4ace7 fix: next marker format 2020-01-07 17:55:47 +08:00
Yousong Zhou
b90a1e8013 hostman: openwrt: deploy public key for root 2020-01-07 17:17:00 +08:00
yunion-ci-robot
96c48ca30b Merge pull request #4658 from ioito/hotfix/qx-guest-sync-log
fix: 避免同步安全组失败后,没有任何日志记录
2020-01-07 17:05:56 +08:00
Yousong Zhou
8964b9a406 hostman: split DeployAuthorizedKeys() 2020-01-07 17:01:52 +08:00
Yousong Zhou
79f1d1d85e hostman: openwrt: support deploy networking scripts 2020-01-07 16:40:10 +08:00
Yousong Zhou
50a5cc2570 hostman: openwrt: deploy hostname with board config 2020-01-07 16:40:10 +08:00
Qiu Jian
b93cde73b5 fix: guest network default share scope should be system if
non-default-domain-projects is off
2020-01-07 16:30:29 +08:00
Qiu Jian
a6ecd32f35 fix: guess brand on guest create 2020-01-07 15:05:10 +08:00
Yousong Zhou
2066adbd81 hostman: distro name OpenWrt instead of OpenWRT 2020-01-07 14:54:57 +08:00
Qu Xuan
fd479d8f77 fix: 避免同步安全组失败后,没有任何日志记录 2020-01-07 11:47:19 +08:00
Qu Xuan
3359254efa fix: 避免拥有带宽包的腾讯云创建机器失败 2020-01-07 11:09:00 +08:00
yunion-ci-robot
bcf3407110 Merge pull request #4645 from swordqiu/hotfix/qj-comment-test-dial-timeout-test
fix: comment out TestDialTimeout
2020-01-06 15:12:59 +08:00
yunion-ci-robot
6c6da5ff2c Merge pull request #4635 from rainzm/bugfix/delaytaskwithoutreqctx
fix: Workmanager delayTaskWithoutReqctx
2020-01-06 14:50:57 +08:00
Qu Xuan
8dd88ecae1 fix: 避免创建rds account, database后未设置exteranl_id 2020-01-06 13:36:11 +08:00
Qiu Jian
5be08d9cdd fix: comment out TestDialTimeout 2020-01-06 12:51:27 +08:00
Qu Xuan
2c4d3f5215 fix: 加强密码校验 2020-01-06 11:44:32 +08:00
Rain
02d2c69d39 fix: Workmanager delayTaskWithoutReqctx
The context of delayTaskWithoutReqctx should have 'taskid' value.
2020-01-06 11:40:50 +08:00
TangBin
715ac1adf5 huawei image delete bugfix 2020-01-06 10:45:16 +08:00
yunion-ci-robot
ef1ad52bae Merge pull request #4632 from wanyaoqi/bugfix/wyq/host-image-fix
host image support container deploy
2020-01-05 19:10:42 +08:00
yunion-ci-robot
e3d51bacb3 Merge pull request #4631 from zexi/feature/add-host-image-service
host-image: add build systemd unit
2020-01-05 19:09:37 +08:00
wanyaoqi
b386e98ddd host image support container deploy: 2020-01-05 18:25:43 +08:00
Zexi Li
06ddb4d069 host-image: add build systemd unit 2020-01-05 15:24:10 +08:00
Zexi Li
656a9c74b9 Merge pull request #4627 from swordqiu/hotfix/qj-increase-default-sync-worker-count
fix: increase default sync worker count from 2 to 5
2020-01-05 12:22:50 +08:00
Qiu Jian
a2f71e936a fix: increase default sync worker count from 2 to 5 2020-01-05 12:17:55 +08:00
Zexi Li
ae1d7b8184 Merge pull request #4601 from swordqiu/hotfix/qj-remove-bw-quota-limit
fix: remove bw/ebw quota limit
2020-01-04 23:59:16 +08:00
Qiu Jian
d048c3ac69 remove bw/ebw quota from scheduler 2020-01-04 23:30:52 +08:00
Qiu Jian
008ac4c2ab fix: remove bw/ebw quota limit 2020-01-04 23:30:52 +08:00
Zexi Li
6810401fe1 Merge pull request #4621 from zexi/hotfix/fmt-error
fix: fmt error
2020-01-04 23:20:49 +08:00
Zexi Li
1459f1420c Merge pull request #4616 from swordqiu/hotfix/qj-huawei-uncache-image-not-found
fix: huawei uncache image fail
2020-01-04 23:20:04 +08:00
Zexi Li
a54e5d2a80 Merge pull request #4609 from ioito/hotfix/qx-metadata-opslog
fix: 避免仅删除value时,行为演变为删除标签
2020-01-04 23:17:43 +08:00
Zexi Li
5d29e1ca6d fix: fmt error 2020-01-04 23:11:21 +08:00
Qiu Jian
f1afe696e2 fix: huawei uncache image fail 2020-01-04 22:40:51 +08:00
Zexi Li
6e5b560192 Merge pull request #4602 from rainzm/bugfix/notify_filter_contact
fix(notify): Fix the error of filter about contact
2020-01-04 22:28:40 +08:00
Rain
8498343481 fix(notify): Fix the error of filter about contacts 2020-01-04 22:21:05 +08:00
Qu Xuan
2b6c95d690 fix: 避免仅删除value时,行为演变为删除标签 2020-01-04 22:14:15 +08:00
Zexi Li
165e2f5693 Merge pull request #4597 from rainzm/bugfix/guest_template_password
Bugfix/guest template password
2020-01-04 22:03:12 +08:00
Rain
b17d299a47 fix(region): Cancel the check about project when creating service catlog 2020-01-04 21:34:17 +08:00
Rain
d9f4134f7f fix(region): Add reset_password in guest template's ConfigInfo 2020-01-04 21:33:33 +08:00
Zexi Li
9d8933b030 Merge pull request #4592 from rainzm/bugfix/guest_group_delete
fix(region): Fix that 'Can_delete' disappears due to parameter structuring
2020-01-04 21:09:48 +08:00
Zexi Li
e660135d85 Merge pull request #4588 from rainzm/bugfix/snapshotpolicys
Bugfix & Feature: SnapshotPolicy
2020-01-04 21:09:26 +08:00
yunion-ci-robot
359ed35e7d Merge pull request #4419 from rainzm/feature/esxi_agent_bb
Feature(esxi-agent): Esxi Agent Go Version
2020-01-04 21:07:37 +08:00
Rain
babc05b772 feature(esxi-agent): Esxi Agent Golang
1. 修改了host-deployer 使其支持 vmware vddk 的 deploy guest fs 操作。
2. esxi agent python ==> Go

fix(esxi-agent): Fix some bugs and irregular contents

fix(esxi-agent): Partial parameter structure

fix(esxi-agent): Add ovf template and remove some binary file

fix(esxi-agent): Format Code

fix(esxi-agent): fix based on reviewers' comments

fix(esxi-agent): fix host-deployer because of occasional unknown panic

fix: DelayTask should have a new Context

fix(esxi-agent): call hostutils.DelayTask

change '_interface' package to 'iagent' package

fix(esxi-agent): Fix some irregular code
2020-01-04 20:57:13 +08:00
Rain
e36cea3b05 fix(region): Fix that 'Can_delete' disappears due to parameter structuring 2020-01-04 20:52:23 +08:00
Jian Qiu
325ff3af61 fix: httpclient timeout value cleanup, use notimeout client for oss (#4527)
* fix: httpclient timeout value cleanup, use notimeout client for oss

* Adaptive timeout client

* more test cases

* remove resolve timeout test case

* use adptive timeout only if timeout = 0
2020-01-04 20:51:21 +08:00
Rain
8df61823e4 feature(region): Add bind/unbind-snapshotpolicy api for disk 2020-01-04 20:31:02 +08:00
Rain
7b794390cb fix(region): Set normal's snapshotpolicy's status as ready 2020-01-04 20:30:49 +08:00
yunion-ci-robot
75f9b82dba Merge pull request #4574 from ioito/hotfix/qx-network-delete-optimized
fix: 子网删除忽略弹性网卡
2020-01-04 20:30:37 +08:00
yunion-ci-robot
d459d64fc4 Merge pull request #4557 from bistuzx/bugfix/account-billing-bucket
add cloud account create&update options
2020-01-04 20:27:37 +08:00
yunion-ci-robot
8f400aec6b Merge pull request #4581 from ioito/bugfix/qx-zstack-secgroup
fix: 修复zstack安全组创建失败问题
2020-01-04 20:11:35 +08:00
Qu Xuan
e9d11e8d7d fix: 修复zstack安全组创建失败问题 2020-01-04 20:00:17 +08:00
Zexi Li
3289bf835c Merge pull request #4564 from swordqiu/hotfix/qj-minio-fail-set-object-metadata
Hotfix/qj minio fail set object metadata
2020-01-04 19:52:08 +08:00
Zexi Li
fd741406a6 Merge pull request #4549 from swordqiu/hotfix/qj-domain-quota-list-include-domain-quota
fix: domain quota-list include domain's own quota
2020-01-04 19:46:10 +08:00
yunion-ci-robot
53cbbb920b Merge pull request #4558 from ioito/hotfix/qx-openstack-eip
fix: openstack eip dissociate optimized
2020-01-04 19:35:35 +08:00
Zexi Li
79037ee1f3 Merge pull request #4579 from zexi/feature/dockerfile-use-base-img
dockerfile: component use base image
2020-01-04 19:27:54 +08:00
Zexi Li
39752b2f02 dockerfile: component use base image 2020-01-04 19:26:47 +08:00
Qu Xuan
67230158c8 fix: 子网删除忽略弹性网卡 2020-01-04 19:21:42 +08:00
yunion-ci-robot
2d20843d08 Merge pull request #4553 from tb365/bugfix/tb-bugfix-0104
Bugfix/tb bugfix 0104
2020-01-04 19:03:36 +08:00
Qu Xuan
41820a8d4d fix: openstack eip dissociate optimized 2020-01-04 18:42:45 +08:00
Qiu Jian
2c1974c544 fix: minio fail to set object metadata 2020-01-04 18:35:45 +08:00
TangBin
4f3498959e get eip bugfix 2020-01-04 18:22:08 +08:00
yunion-ci-robot
499e585377 Merge pull request #4535 from wanyaoqi/bugfix/wyq/misc-fix-20200104
bugfix: disk list filter guest,  add recover on guest shotdown
2020-01-04 18:19:36 +08:00
张旭
58d2ef7f15 add cloud account create&update options 2020-01-04 18:05:34 +08:00
TangBin
a75fc6b37d get eip bugfix 2020-01-04 17:28:26 +08:00
TangBin
c777817c7a host batch register bugfix 2020-01-04 17:19:57 +08:00
TangBin
35735f1d0a elastic cache account add login info api 2020-01-04 17:19:57 +08:00
TangBin
20860c369d elastic account add random password 2020-01-04 17:19:57 +08:00
Qiu Jian
307689b3e7 fix: domain quota-list include domain's own quota 2020-01-04 17:07:19 +08:00
Zexi Li
8b546df667 Merge pull request #4539 from swordqiu/hotfix/qj-add-cloud-provider-capabilities
fix: add cloudprovider capabilities
2020-01-04 17:03:18 +08:00
wanyaoqi
ce961db085 add recover on guest suddenly shotdown 2020-01-04 16:48:08 +08:00
Qiu Jian
5d3e2131b2 minor fixes 2020-01-04 16:19:07 +08:00
Qiu Jian
cddcfd24ba minor fixes 2020-01-04 16:14:06 +08:00
Qiu Jian
77ebb80277 minor fixes 2020-01-04 16:01:52 +08:00
Qiu Jian
131861e0b4 add cloudevent capabilities 2020-01-04 15:54:12 +08:00
Qiu Jian
1d002cb9ec fix: add cloudprovider capabilities 2020-01-04 15:40:24 +08:00
Zexi Li
769305e74c Merge pull request #4533 from zexi/hotfix/devtool-use-public-influxdb-url
devtool: use public influxdb endpoint
2020-01-04 14:50:29 +08:00
Zexi Li
fa2e0e344c devtool: use public influxdb endpoint 2020-01-04 14:34:05 +08:00
wanyaoqi
8c201e7602 fix disk filter by guest 2020-01-04 14:33:57 +08:00
yunion-ci-robot
cd52997804 Merge pull request #4509 from tb365/bugfix/tb-bugfix-0102
Bugfix/tb bugfix 0102
2020-01-04 12:55:37 +08:00
TangBin
bdb943c552 InitPendingUsagesInContext fix 2020-01-04 12:40:17 +08:00
TangBin
ab3c68ba69 account&provider health status check 2020-01-04 12:14:57 +08:00
yunion-ci-robot
f22b5b4275 Merge pull request #4520 from zexi/bugfix/baremetal-megaraid-jbod-check
baremetal: fix megaraid check jbod always disabled
2020-01-03 21:43:36 +08:00
Zexi Li
4bb432afd4 Merge pull request #4513 from ioito/bugfix/qx-qcloud-instance-create
fix: 腾讯云不支持描述字段参数
2020-01-03 21:26:49 +08:00
Zexi Li
7dadb333ca baremetal: fix megaraid check jbod always disabled 2020-01-03 21:18:56 +08:00
Qu Xuan
9adf705476 fix: 腾讯云不支持描述字段参数 2020-01-03 20:39:57 +08:00
TangBin
e23742be52 elastic skus add region_ext_id & zone_ext_id 2020-01-03 20:01:34 +08:00
TangBin
155cb7ee93 disk delete condition validator 2020-01-03 20:01:33 +08:00
TangBin
94fccb0f53 huawei oss client read http ProxyFromEnvironment 2020-01-03 19:06:15 +08:00
TangBin
502df4114a network operations add action log 2020-01-03 19:06:15 +08:00
TangBin
3ca229327e account create bugfix 2020-01-03 19:06:15 +08:00
Zexi Li
77435fcac9 Merge pull request #4498 from swordqiu/hotfix/qj-allow-delete-auto-sync-enabled-cloud-account
fix: allow delete cloudaccount with auto-sync enabled
2020-01-03 19:05:03 +08:00
yunion-ci-robot
3499ab7644 Merge pull request #4497 from rainzm/bugfix/nat_huawei
fix(huawei): Add 'X-Project-Id' header for huawei nat reuqest
2020-01-03 19:02:34 +08:00
yunion-ci-robot
5ae9d513a7 Merge pull request #4492 from ioito/hotfix/qx-sku-provider-fix
fix: 修复provider为空的套餐
2020-01-03 18:35:35 +08:00
Zexi Li
4b4d9cf773 Merge pull request #4488 from swordqiu/hotfix/qj-scheduler-quota-support
Hotfix/qj scheduler quota support
2020-01-03 17:13:22 +08:00
Qiu Jian
3bd4c65e6a fix: allow delete cloudaccount with auto-sync enabled 2020-01-03 16:30:30 +08:00
Rain
efd4fc1ef2 fix(huawei): Add 'X-Project-ID' header for huawei nat reuqest 2020-01-03 16:00:22 +08:00
Qiu Jian
99bb6af52c fix: OutOfQuota error code 500 2020-01-03 16:00:11 +08:00
Qu Xuan
9ecaba7ebc fix: 修复provider为空的套餐 2020-01-03 15:52:37 +08:00
Qiu Jian
940f6c84de automatically save pendingUsage in context 2020-01-03 15:18:19 +08:00
Qiu Jian
f62cea0e1d remove obsolete codes 2020-01-03 13:58:05 +08:00
Qiu Jian
4a8a79a786 bug fixes 2020-01-03 13:58:05 +08:00
Qiu Jian
82f4885b3b move lb from zonequota to regionquota 2020-01-03 13:58:04 +08:00
Qiu Jian
bc7f62a2ad scheduler schedule according to quota limit 2020-01-03 13:58:04 +08:00
Zexi Li
61f04ff338 Merge pull request #4483 from rainzm/bugfix/notify_websocket_config_init
fix(notify): Always update websocket config
2020-01-03 11:22:15 +08:00
Zexi Li
c381a47398 Merge pull request #4478 from swordqiu/hotfix/qj-bucket-search-prefix-skip-first-object
fix: bucket list object may skip first matched object
2020-01-03 11:01:15 +08:00
Rain
0cb2abe8a4 fix(notify): Always update websocket config 2020-01-02 18:13:29 +08:00
Qiu Jian
9a207261c3 fix: sort objects and directories 2020-01-02 17:36:37 +08:00
Qiu Jian
15b5a78896 fix: bucket list object may skip first matched object 2020-01-02 17:21:20 +08:00
rainzm
ba6882099c fix(region): Add support for suspend when syncing status of guest (#4474) 2020-01-02 16:33:29 +08:00
Zexi Li
220cc6883c Merge pull request #4411 from wanyaoqi/bugfix/wyq/host-misc-1230
host misc fix
2020-01-02 12:31:58 +08:00
wanyaoqi
df233595b4 host misc fix
- host check not require ntpd
- create host record use generate name
2019-12-30 17:02:55 +08:00
1268 changed files with 119460 additions and 8775 deletions

View File

@@ -1,38 +0,0 @@
FROM centos:7
MAINTAINER Yousong Zhou <zhouyousong@yunion.cn>
RUN true \
&& yum install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm \
&& yum install -y git wget \
&& yum groupinstall -y "Development Tools" \
&& : ceph for cmd/host \
&& rpm --import 'https://download.ceph.com/keys/release.asc' \
&& yum install -y https://download.ceph.com/rpm-luminous/el7/noarch/ceph-release-1-1.el7.noarch.rpm \
&& yum install -y libcephfs-devel librbd-devel librados-devel \
&& yum clean all
WORKDIR /opt
RUN true \
&& wget https://dl.google.com/go/go1.13.3.linux-amd64.tar.gz \
&& tar xzf go1.13.3.linux-amd64.tar.gz \
&& rm -vf go1.13.3.linux-amd64.tar.gz \
&& true
ENV GOROOT="/opt/go"
ENV PATH="/opt/go/bin:${PATH}"
RUN useradd -c "OneCloud Builder" --create-home --home-dir /home/build --shell /bin/bash build
ENV HOME /home/build
WORKDIR /home/build
USER build
ENV GOPATH="/home/build/go"
ENV PATH="${GOPATH}/bin:${PATH}"
RUN true \
&& mkdir -p "$GOPATH" \
&& d="$GOPATH/src/golang.org/x/tools" \
&& mkdir -p "$d" \
&& git clone --branch yun --depth 8 https://github.com/yousong/tools "$d" \
&& cd "$d" \
&& go install ./cmd/goimports \
&& true

View File

@@ -5,10 +5,10 @@ version: 2
jobs:
check:
docker:
- image: yunionio/onecloud-ci:v1.0.3
- image: yunionio/centos-build:1.0-1
environment:
ONECLOUD_CI_BUILD: "1"
working_directory: /home/build/go/src/yunion.io/x/onecloud
working_directory: /root/go/onecloud
steps:
- checkout
- run:
@@ -18,7 +18,7 @@ jobs:
requires:
- check
docker:
- image: yunionio/onecloud-ci:v1.0.2
- image: yunionio/centos-build:1.0-1
environment:
ONECLOUD_CI_BUILD: "1"
@@ -26,14 +26,14 @@ jobs:
#### expecting it in the form of
#### /go/src/github.com/circleci/go-tool
#### /go/src/bitbucket.org/circleci/go-tool
working_directory: /home/build/go/src/yunion.io/x/onecloud
working_directory: /root/go/onecloud
parallelism: 4
steps:
- checkout
- restore_cache:
key: onecloud-build-cache-{{ checksum "go.mod" }}-{{ checksum "Makefile" }}
paths:
- /home/build/.cache/go-build
- /root/.cache/go-build
- run:
command: |
targets="$(circleci tests glob "cmd/*" | grep -v cmd/host-image | circleci tests split)"
@@ -43,7 +43,7 @@ jobs:
- save_cache:
key: onecloud-build-cache-{{ checksum "go.mod" }}-{{ checksum "Makefile" }}
paths:
- /home/build/.cache/go-build
- /root/.cache/go-build
- store_artifacts:
path: _output/
@@ -51,16 +51,16 @@ jobs:
requires:
- check
docker:
- image: yunionio/onecloud-ci:v1.0.2
- image: yunionio/centos-build:1.0-1
environment:
GO111MODULE: "on"
working_directory: /home/build/go/src/yunion.io/x/onecloud
working_directory: /root/go/onecloud
steps:
- checkout
- restore_cache:
key: onecloud-test-cache-{{ checksum "go.mod" }}-{{ checksum "Makefile" }}
paths:
- /home/build/.cache/go-build
- /root/.cache/go-build
- run:
name: unit_test
command: |
@@ -68,7 +68,7 @@ jobs:
- save_cache:
key: onecloud-test-cache-{{ checksum "go.mod" }}-{{ checksum "Makefile" }}
paths:
- /home/build/.cache/go-build
- /root/.cache/go-build
workflows:
version: 2

View File

@@ -29,16 +29,17 @@ jobs:
- name: Build
run: |
sudo apt-get update
sudo apt-get install librados-dev librbd-dev
sudo apt-get install librados-dev librbd-dev # baremetal-agent needs this
make cmd/apigateway cmd/climc cmd/keystone
make cmd/logger cmd/region cmd/scheduler cmd/webconsole
make cmd/yunionconf cmd/glance cmd/torrent cmd/s3gateway
make cmd/ansibleserver cmd/cloudnet cmd/notify
make cmd/host && ./scripts/bundle_libraries.sh _output/bin/bundles/host _output/bin/host && ./scripts/host_find_libraries.sh _output/bin/bundles/host
make cmd/host-deployer && ./scripts/bundle_libraries.sh _output/bin/bundles/host-deployer _output/bin/host-deployer
make cmd/baremetal-agent && ./scripts/bundle_libraries.sh _output/bin/bundles/baremetal-agent _output/bin/baremetal-agent
make cmd/cloudevent cmd/devtool
make cmd/*cli
make cmd/esxi-agent
make docker-alpine-build F='-j4 cmd/host cmd/vpcagent'
- name: Image baremetal-agent
uses: elgohr/Publish-Docker-Github-Action@master
@@ -50,6 +51,26 @@ jobs:
snapshot: true
dockerfile: build/docker/Dockerfile.baremetal-agent
- name: Image esxi-agent
uses: elgohr/Publish-Docker-Github-Action@master
with:
name: registry.cn-beijing.aliyuncs.com/yunionio/esxi-agent
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
registry: registry.cn-beijing.aliyuncs.com
snapshot: true
dockerfile: build/docker/Dockerfile.esxi-agent
- name: Image vpcagent
uses: elgohr/Publish-Docker-Github-Action@master
with:
name: registry.cn-beijing.aliyuncs.com/yunionio/vpcagent
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
registry: registry.cn-beijing.aliyuncs.com
snapshot: true
dockerfile: build/docker/Dockerfile.vpcagent
- name: Image climc
uses: elgohr/Publish-Docker-Github-Action@master
with:
@@ -180,7 +201,7 @@ jobs:
snapshot: true
dockerfile: build/docker/Dockerfile.host-deployer
- name: Image cloudevent
- name: Image cloudevent
uses: elgohr/Publish-Docker-Github-Action@master
with:
name: registry.cn-beijing.aliyuncs.com/yunionio/cloudevent

View File

@@ -83,6 +83,9 @@ test:
vet:
go vet ./...
cmd/esxi-agent: prepare_dir
CGO_ENABLED=0 $(GO_BUILD) -o $(BIN_DIR)/$(shell basename $@) $(REPO_PREFIX)/$@
cmd/%: prepare_dir
$(GO_BUILD) -o $(BIN_DIR)/$(shell basename $@) $(REPO_PREFIX)/$@
@@ -189,43 +192,75 @@ mod:
go mod vendor -v
DOCKER_BUILD_IMAGE_VERSION?=latest
DOCKER_BUILD_IMAGE_VERSION?=1.0-1
define dockerBuildCmd
define dockerCentOSBuildCmd
set -o xtrace
set -o errexit
set -o pipefail
cd /home/build/onecloud
cd /root/onecloud
export GOFLAGS=-mod=vendor
make $(1)
chown -R $(shell id -u):$(shell id -g) _output
endef
docker-build: export dockerBuildCmd:=$(call dockerBuildCmd,$(F))
docker-build:
echo "$$dockerBuildCmd"
docker-centos-build: export dockerCentOSBuildCmd:=$(call dockerCentOSBuildCmd,$(F))
docker-centos-build:
docker rm --force onecloud-ci-build &>/dev/null || true
docker run \
--name onecloud-ci-build \
--rm \
--volume $(CURDIR):/home/build/onecloud \
yunionio/onecloud-ci:$(DOCKER_BUILD_IMAGE_VERSION) \
/bin/bash -c "$$dockerBuildCmd"
--volume $(CURDIR):/root/onecloud \
registry.cn-beijing.aliyuncs.com/yunionio/centos-build:$(DOCKER_BUILD_IMAGE_VERSION) \
/bin/bash -c "$$dockerCentOSBuildCmd"
chown -R $$(id -u):$$(id -g) _output
ls -lh _output/bin
# NOTE we need a way to stop and remove the container started by docker-build.
# No --tty, --stop-signal won't work
docker-build-stop:
docker stop --time 0 onecloud-ci-build || true
docker-centos-build-stop:
docker-centos stop --time 0 onecloud-ci-build || true
.PHONY: docker-build
.PHONY: docker-build-stop
.PHONY: docker-centos-build
.PHONY: docker-centos-build-stop
define dockerAlpineBuildCmd
set -o xtrace
set -o errexit
set -o pipefail
cd /root/go/src/yunion.io/x/onecloud
export GOFLAGS=-mod=vendor
make $(1)
chown -R $(shell id -u):$(shell id -g) _output
endef
docker-alpine-build: export dockerAlpineBuildCmd:=$(call dockerAlpineBuildCmd,$(F))
docker-alpine-build:
docker rm --force onecloud-docker-alpine-build &>/dev/null || true
docker run --rm \
--name onecloud-docker-alpine-build \
-v $(CURDIR):/root/go/src/yunion.io/x/onecloud \
-v $(CURDIR)/_output/alpine-build:/root/go/src/yunion.io/x/onecloud/_output \
registry.cn-beijing.aliyuncs.com/yunionio/alpine-build:1.0-1 \
/bin/sh -c "$$dockerAlpineBuildCmd"
ls -lh _output/alpine-build/bin
docker-alpine-build-stop:
docker stop --time 0 onecloud-docker-alpine-build || true
.PHONY: docker-alpine-build
.PHONY: docker-alpine-build-stop
define helpText
Build with docker
make docker-build F='-j4'
make docker-build F='-j4 cmd/region cmd/climc'
make docker-build-stop
make docker-centos-build F='-j4'
make docker-centos-build F='-j4 cmd/region cmd/climc'
make docker-centos-build-stop
make docker-alpine-build F='-j4'
make docker-alpine-build F='-j4 cmd/host cmd/host-deployer'
make docker-alpine-build-stop
Tidy up go modules and vendor directory

View File

@@ -0,0 +1,42 @@
#!/bin/bash
set -e
pushd $(dirname $BASH_SOURCE) > /dev/null
CUR_DIR=$(pwd -P)
popd > /dev/null
ACCOUNT=$1
if [ -z "$ACCOUNT" ]; then
echo "Usage: $0 <cloud-acount-id-or-name>"
exit 1
fi
ACCOUNT_ID=$(climc cloud-account-show $ACCOUNT | grep -w " id " | awk '{print $4}')
ACCOUNT_NAME=$(climc cloud-account-show $ACCOUNT | grep -w " name " | awk '{print $4}')
if [ -z "$ACCOUNT_ID" ]; then
echo "Cloud account $ACCOUNT not found"
exit 1
fi
echo "Ready to clean cloud account $ACCOUNT_NAME($ACCOUNT_ID)..."
echo "1. Disable cloud account $ACCOUNT_NAME($ACCOUNT_ID) ..."
climc cloud-account-disable $ACCOUNT_ID
echo "2. Clean all providers ..."
for provider_id in $(climc cloud-provider-list --account $ACCOUNT_ID --limit 0 | egrep '[0-9a-f]{8}-([0-9a-f]{4}-){3}[0-9a-f]{12}' | awk '{print $2}')
do
echo "### to clean cloud provider $provider_id ..."
$CUR_DIR/clean_provider.sh $provider_id
done
echo "3. Delete cloud account ..."
climc cloud-account-delete $ACCOUNT_ID

View File

@@ -0,0 +1,27 @@
#/bin/bash
set -e
EIP=$1
if [ -z "$EIP" ]; then
echo "Usage: $0 <eip_id_or_name>"
exit 1
fi
EIP_NAME=$(climc eip-show $EIP | grep -w " name " | awk '{print $4}')
EIP_ID=$(climc eip-show $EIP | grep -w " id " | awk '{print $4}')
if [ -z "$EIP_ID" ]; then
echo "Cannot find eip $EIP_ID"
exit 1
fi
echo "To clean eip $EIP_NAME($EIP_ID)..."
clean_eip() {
local EID=$1
climc eip-purge $EID
}
clean_eip $EIP_ID

View File

@@ -0,0 +1,80 @@
#!/bin/bash
set -e
HOST=$1
if [ -z "$HOST" ]; then
echo "Usage: $0 <host_id_or_name>"
exit 1
fi
error_exit() {
echo "Error: $1"
exit 1
}
HOSTID=$(climc host-show $HOST | grep -w " id " | awk '{print $4}')
HOSTNAME=$(climc host-show $HOST | grep -w " name " | awk '{print $4}')
if [ -z "$HOSTNAME" ]; then
error_exit "Cannot find host $HOST"
fi
if [ -z "$HOSTID" ]; then
error_exit "Cannot find host $HOST"
fi
echo "Ready to purge host $HOSTNAME($HOSTID)..."
echo "1. Disable $HOSTNAME($HOSTID)"
if ! climc host-disable $HOSTID > /dev/null; then
error_exit "Fail to disable $HOST"
fi
echo "2. Clean servers on $HOSTNAME($HOSTID)"
for i in $(climc server-list --host $HOSTID --admin --limit 2048 --system | egrep '[0-9a-f]{8}-([0-9a-f]{4}-){3}[0-9a-f]{12}' | awk '{print $2}')
do
climc server-update --delete enable $i > /dev/null
climc server-purge $i > /dev/null
done
for i in $(climc server-list --host $HOSTID --admin --limit 2048 --pending-delete --system | egrep '[0-9a-f]{8}-([0-9a-f]{4}-){3}[0-9a-f]{12}' | awk '{print $2}')
do
climc server-purge $i > /dev/null
done
echo "3. Clean disks on $HOSTNAME($HOSTID)"
for storageid in $(climc host-storage-list --host $HOSTID --show-emulated | egrep '[0-9a-f]{8}-([0-9a-f]{4}-){3}[0-9a-f]{12}' | awk '{print $4}')
do
STORAGENAME=$(climc storage-show $storageid | grep -w " name " | awk '{print $4}')
STORAGE_TYPE=$(climc storage-show $storageid | grep -w " storage_type " | awk '{print $4}')
if [ "$STORAGE_TYPE" == "local" ]; then
for diskid in $(climc disk-list --admin --system --details --search $storageid --limit 2048 | egrep '[0-9a-f]{8}-([0-9a-f]{4}-){3}[0-9a-f]{12}' | awk '{print $2}')
do
climc disk-purge $diskid > /dev/null
done
for diskid in $(climc disk-list --admin --system --details --search $storageid --pending-delete --limit 2048 | egrep '[0-9a-f]{8}-([0-9a-f]{4}-){3}[0-9a-f]{12}' | awk '{print $2}')
do
climc disk-purge $diskid > /dev/null
done
fi
done
echo "4. Remove host $HOSTNAME($HOSTID)"
BAREMETAL=$(climc host-show $HOSTID | grep -w " is_baremetal " | awk '{print $4}')
HOSTTYPE=$(climc host-show $HOSTID | grep -w " host_type " | awk '{print $4}')
if [ "$BAREMETAL" == "true" ] && [ "$HOSTTYPE" != "baremetal" ]; then
climc host-update --host-type baremetal $HOSTID > /dev/null
fi
climc host-delete $HOSTID > /dev/null
echo "DONE."

View File

@@ -0,0 +1,27 @@
#!/bin/bash
set -e
LB=$1
if [ -z "$LB" ]; then
echo "Usage: $0 <loadbalancer_id_or_name>"
exit 1
fi
LB_ID=$(climc lb-show $LB | grep -w " id " | awk '{print $4}')
LB_NAME=$(climc lb-show $LB | grep -w " name " | awk '{print $4}')
if [ -z "$LB_ID" ]; then
echo "Loadbalancer $LB not found"
exit 1
fi
echo "Ready to remove loadbalancer $LB_NAME($LB_ID) ..."
clean_loadbalancer() {
local LID=$1
climc lb-purge $LID
}
clean_loadbalancer $LB_ID

View File

@@ -0,0 +1,27 @@
#!/bin/bash
set -e
LB_ACL=$1
if [ -z "$LB_ACL" ]; then
echo "Usage: $0 <loadbalancer_id_or_name>"
exit 1
fi
LB_ACL_ID=$(climc lbacl-show $LB_ACL | grep -w " id " | awk '{print $4}')
LB_ACL_NAME=$(climc lbacl-show $LB_ACL | grep -w " name " | awk '{print $4}')
if [ -z "$LB_ACL_ID" ]; then
echo "Loadbalancer ACL $LB_ACL_ID not found"
exit 1
fi
echo "Ready to remove loadbalancer acl $LB_ACL_NAME($LB_ACL_ID) ..."
clean_loadbalancer_acl() {
local LID=$1
climc lbacl-purge $LID
}
clean_loadbalancer_acl $LB_ACL_ID

View File

@@ -0,0 +1,27 @@
#!/bin/bash
set -e
LB_CERT=$1
if [ -z "$LB_CERT" ]; then
echo "Usage: $0 <loadbalancer_id_or_name>"
exit 1
fi
LB_CERT_ID=$(climc lbcert-show $LB_CERT | grep -w " id " | awk '{print $4}')
LB_CERT_NAME=$(climc lbcert-show $LB_CERT | grep -w " name " | awk '{print $4}')
if [ -z "$LB_CERT_ID" ]; then
echo "Loadbalancer certificate $LB_CERT_ID not found"
exit 1
fi
echo "Ready to remove loadbalancer certificate $LB_CERT_NAME($LB_CERT_ID) ..."
clean_loadbalancer_cert() {
local LID=$1
climc lbcert-purge $LID
}
clean_loadbalancer_cert $LB_CERT_ID

View File

@@ -0,0 +1,96 @@
#!/bin/bash
set -e
pushd $(dirname $BASH_SOURCE) > /dev/null
CUR_DIR=$(pwd -P)
popd > /dev/null
PROVIDER=$1
if [ -z "$PROVIDER" ]; then
echo "Usage: $0 <cloud-provider-id-or-name>"
exit 1
fi
PROVIDER_ID=$(climc cloud-provider-show $PROVIDER | grep -w " id " | awk '{print $4}')
PROVIDER_NAME=$(climc cloud-provider-show $PROVIDER | grep -w " name " | awk '{print $4}')
if [ -z "$PROVIDER_ID" ]; then
echo "Cloud provider $PROVIDER not found"
exit 1
fi
echo "Ready to clean cloud provider $PROVIDER_NAME($PROVIDER_ID)..."
echo "1. Disable cloud provider $PROVIDER_NAME($PROVIDER_ID) ..."
climc cloud-provider-disable $PROVIDER_ID
echo "2. Clean all hosts ..."
for hostid in $(climc host-list --manager $PROVIDER_ID --admin --show-emulated --limit 0 | egrep '[0-9a-f]{8}-([0-9a-f]{4}-){3}[0-9a-f]{12}' | awk '{print $2}')
do
$CUR_DIR/clean_host.sh $hostid
done
echo "3. Clean all loadbalancer ..."
for lbid in $(climc lb-list --manager $PROVIDER_ID --admin --show-emulated --limit 0 | egrep '[0-9a-f]{8}-([0-9a-f]{4}-){3}[0-9a-f]{12}' | awk '{print $2}')
do
$CUR_DIR/clean_loadbalancer.sh $lbid
done
echo "4. Clean all loadbalancer acl ..."
for lbaclid in $(climc lbacl-list --manager $PROVIDER_ID --admin --show-emulated --limit 0 | egrep '[0-9a-f]{8}-([0-9a-f]{4}-){3}[0-9a-f]{12}' | awk '{print $2}')
do
$CUR_DIR/clean_loadbalancer_acl.sh $lbaclid
done
echo "5. Clean all loadbalancer certificate ..."
for lbcertid in $(climc lbcert-list --manager $PROVIDER_ID --admin --show-emulated --limit 0 | egrep '[0-9a-f]{8}-([0-9a-f]{4}-){3}[0-9a-f]{12}' | awk '{print $2}')
do
$CUR_DIR/clean_loadbalancer_certificate.sh $lbcertid
done
echo "6. Clean all vpc ..."
for vpcid in $(climc vpc-list --manager $PROVIDER_ID --admin --show-emulated --limit 0 | egrep '[0-9a-f]{8}-([0-9a-f]{4}-){3}[0-9a-f]{12}' | awk '{print $2}')
do
$CUR_DIR/clean_vpc.sh $vpcid
done
echo "7. Clean all eips ..."
for eipid in $(climc eip-list --admin --manager $PROVIDER_ID --admin --show-emulated --limit 0 | egrep '[0-9a-f]{8}-([0-9a-f]{4}-){3}[0-9a-f]{12}' | awk '{print $2}')
do
$CUR_DIR/clean_eip.sh $eipid
done
echo "8. Clean all snapshots ..."
for snapid in $(climc snapshot-list --admin --manager $PROVIDER_ID --admin --show-emulated --limit 0 | egrep '[0-9a-f]{8}-([0-9a-f]{4}-){3}[0-9a-f]{12}' | awk '{print $2}')
do
echo "to clean snapshot $snapid ..."
$CUR_DIR/clean_snapshot.sh $snapid
done
echo "9. Clean all storagecache ..."
for cacheid in $(climc storage-cache-list --manager $PROVIDER_ID --admin --show-emulated --limit 0 | egrep '[0-9a-f]{8}-([0-9a-f]{4}-){3}[0-9a-f]{12}' | awk '{print $2}')
do
$CUR_DIR/clean_storagecache.sh $cacheid
done
echo "10. Clean all storages ..."
for storeid in $(climc storage-list --manager $PROVIDER_ID --admin --show-emulated --limit 0 | egrep '[0-9a-f]{8}-([0-9a-f]{4}-){3}[0-9a-f]{12}' | awk '{print $2}')
do
$CUR_DIR/clean_storage.sh $storeid
done
echo "Delete cloud provider ..."
climc cloud-provider-delete $PROVIDER_ID

View File

@@ -0,0 +1,27 @@
#/bin/bash
set -e
SNAPSHOT=$1
if [ -z "$SNAPSHOT" ]; then
echo "Usage: $0 <snapshot_id_or_name>"
exit 1
fi
SNAPSHOT_NAME=$(climc snapshot-show $SNAPSHOT | grep -w " name " | awk '{print $4}')
SNAPSHOT_ID=$(climc snapshot-show $SNAPSHOT | grep -w " id " | awk '{print $4}')
if [ -z "$SNAPSHOT_ID" ]; then
echo "Cannot find snapshot $SNAPSHOT_ID"
exit 1
fi
echo "To clean snapshot $SNAPSHOT_NAME($SNAPSHOT_ID)..."
clean_snapshot() {
local SNAP_ID=$1
climc snapshot-purge $SNAP_ID > /dev/null
}
clean_snapshot $SNAPSHOT_ID

View File

@@ -0,0 +1,34 @@
#!/bin/bash
set -e
STORAGE=$1
if [ -z "$STORAGE" ]; then
echo "Usage: $0 <storage_id_or_name>"
exit 1
fi
STORAGE_ID=$(climc storage-show $STORAGE | grep -w " id " | awk '{print $4}')
STORAGE_NAME=$(climc storage-show $STORAGE | grep -w " name " | awk '{print $4}')
if [ -z "$STORAGE_ID" ]; then
echo "Storage $STORAGE not found"
exit 1
fi
echo "Clean disks on storage $STORAGE_NAME($STORAGE_ID) ..."
for disk_id in $(climc disk-list --admin --storage $STORAGE_ID --show-emulated --limit 2048 | egrep '[0-9a-f]{8}-([0-9a-f]{4}-){3}[0-9a-f]{12}' | awk '{print $2}')
do
climc disk-purge $disk_id > /dev/null
done
for disk_id in $(climc disk-list --admin --storage $STORAGE_ID --show-emulated --pending-delete --limit 2048 | egrep '[0-9a-f]{8}-([0-9a-f]{4}-){3}[0-9a-f]{12}' | awk '{print $2}')
do
climc disk-purge $disk_id > /dev/null
done
# CACHE_ID=$(climc storage-show $STORAGE_ID | grep -w " storagecache_id " | awk '{print $4}')
climc storage-delete $STORAGE_ID > /dev/null

View File

@@ -0,0 +1,28 @@
#!/bin/bash
set -e
CACHE=$1
if [ -z "$CACHE" ]; then
echo "Usage: $0 <storage_cache_id_or_name>"
exit 1
fi
CACHE_ID=$(climc storage-cache-show $CACHE | grep -w " id " | awk '{print $4}')
CACHE_NAME=$(climc storage-cache-show $CACHE | grep -w " name " | awk '{print $4}')
if [ -z "$CACHE_ID" ]; then
echo "Storage cache $CACHE not found"
exit 1
fi
echo "Ready to remove storagecache $CACHE_NAME($CACHE_ID) ..."
for imgid in $(climc storage-cached-image-list --storagecache $CACHE_ID --show-emulated --limit 0 | egrep '[0-9a-f]{8}-([0-9a-f]{4}-){3}[0-9a-f]{12}' | awk '{print $4}')
do
climc storagecache-uncache-image $CACHE_ID $imgid --force # > /dev/null
done
climc storage-cache-delete $CACHE_ID > /dev/null

View File

@@ -0,0 +1,55 @@
#/bin/bash
set -e
VPC=$1
if [ -z "$VPC" ]; then
echo "Usage: $0 <vpc_id_or_name>"
exit 1
fi
VPC_NAME=$(climc vpc-show $VPC | grep -w " name " | awk '{print $4}')
VPC_ID=$(climc vpc-show $VPC | grep -w " id " | awk '{print $4}')
if [ -z "$VPC_ID" ]; then
echo "Cannot find vpc $VPC"
exit 1
fi
echo "To clean vpc $VPC_NAME($VPC_ID)..."
clean_network() {
climc network-purge $1 > /dev/null
}
clean_wire() {
local WIRE_ID=$1
for net_id in $(climc network-list --admin --wire $WIRE_ID --show-emulated | egrep '[0-9a-f]{8}-([0-9a-f]{4}-){3}[0-9a-f]{12}' | awk '{print $2}')
do
clean_network $net_id
done
climc wire-delete $wire_id > /dev/null
}
clean_vpc() {
local VPC_ID=$1
climc vpc-purge $VPC_ID > /dev/null
}
echo "1. Clean wires ..."
for wire_id in $(climc wire-list --vpc $VPC_ID --show-emulated | egrep '[0-9a-f]{8}-([0-9a-f]{4}-){3}[0-9a-f]{12}' | awk '{print $2}')
do
clean_wire $wire_id
done
echo "2. Clean route tables ..."
for routetable_id in $(climc routetable-list --vpc $VPC_ID --show-emulated | egrep '[0-9a-f]{8}-([0-9a-f]{4}-){3}[0-9a-f]{12}' | awk '{print $2}')
do
climc routetable-purge $routetable_id >/dev/null
done
echo "3. clean vpc ..."
clean_vpc $VPC_ID

View File

@@ -1,15 +1,3 @@
FROM frolvlad/alpine-glibc:glibc-2.28
MAINTAINER "Zexi Li <lizexi@yunionyun.com>"
ENV TZ Asia/Shanghai
RUN mkdir -p /opt/yunion/bin
RUN apk update && \
apk add --no-cache tzdata ansible ca-certificates && \
rm -rf /var/cache/apk/*
RUN cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
FROM registry.cn-beijing.aliyuncs.com/yunionio/ansibleserver-base:latest
ADD ./_output/bin/ansibleserver /opt/yunion/bin/ansibleserver

View File

@@ -0,0 +1,13 @@
FROM frolvlad/alpine-glibc:glibc-2.28
MAINTAINER "Zexi Li <lizexi@yunionyun.com>"
ENV TZ Asia/Shanghai
RUN mkdir -p /opt/yunion/bin
RUN apk update && \
apk add --no-cache tzdata ansible ca-certificates && \
rm -rf /var/cache/apk/*
RUN cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime

View File

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

View File

@@ -27,3 +27,13 @@ COPY ./opt/cloud/yunion/baremetal/libutil.c32 /opt/cloud/yunion/baremetal
COPY ./opt/cloud/yunion/baremetal/lpxelinux.0 /opt/cloud/yunion/baremetal
COPY ./opt/cloud/yunion/baremetal/menu.c32 /opt/cloud/yunion/baremetal
COPY ./opt/cloud/yunion/baremetal/pxelinux.0 /opt/cloud/yunion/baremetal
# add mkisofs with bundles libraries
ADD ./mkisofs /bin/mkisofs
ADD ./.mkisofs.bin /bin/.mkisofs.bin
ADD ./bundles/mkisofs /bin/bundles/mkisofs
# use GNU timeout command replace busybox timeout command
RUN rm /usr/bin/timeout
ADD ./timeout /bin/timeout
ADD ./.timeout.bin /bin/.timeout.bin
ADD ./bundles/timeout /bin/bundles/timeout

View File

@@ -1,16 +1,5 @@
FROM frolvlad/alpine-glibc:glibc-2.28
FROM registry.cn-beijing.aliyuncs.com/yunionio/climc-base:latest
MAINTAINER "Zexi Li <lizexi@yunionyun.com>"
ENV TZ Asia/Shanghai
RUN apk add --no-cache bash bash-completion tzdata ca-certificates && \
rm -rf /var/cache/apk/*
RUN cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
ENV PATH="/opt/yunion/bin:${PATH}"
RUN mkdir -p /opt/yunion/bin
ADD ./build/climc/root/opt /opt
ADD ./_output/bin/climc ./_output/bin/*cli /opt/yunion/bin/

View File

@@ -0,0 +1,16 @@
FROM frolvlad/alpine-glibc:glibc-2.28
MAINTAINER "Zexi Li <lizexi@yunionyun.com>"
ENV TZ Asia/Shanghai
RUN mkdir -p /opt/yunion/bin
RUN apk add --no-cache bash bash-completion tzdata ca-certificates && \
rm -rf /var/cache/apk/*
RUN cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
ENV PATH="/opt/yunion/bin:${PATH}"
RUN mkdir -p /opt/yunion/bin

View File

@@ -0,0 +1,4 @@
FROM registry.cn-beijing.aliyuncs.com/yunionio/onecloud-base:latest
COPY ./build/esxi-agent/root/opt/ /opt/
ADD ./_output/bin/esxi-agent /opt/yunion/bin/esxi-agent

View File

@@ -1,11 +1,9 @@
FROM registry.cn-beijing.aliyuncs.com/yunionio/host-base
FROM registry.cn-beijing.aliyuncs.com/yunionio/host-base:v0.1.0
MAINTAINER "Yaoqi Wan wanyaoqi@yunionyun.com"
ENV TZ Asia/Shanghai
RUN apk add librados librbd
RUN mkdir -p /opt/yunion/bin
ADD ./_output/bin/host /opt/yunion/bin/host
ADD ./_output/bin/.host.bin /opt/yunion/bin/.host.bin
ADD ./_output/bin/bundles/host /opt/yunion/bin/bundles/host
ADD ./_output/alpine-build/bin/host /opt/yunion/bin/host

View File

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

View File

@@ -0,0 +1,4 @@
FROM registry.cn-beijing.aliyuncs.com/yunionio/onecloud-base:latest
ADD ./_output/bin/monitor /opt/yunion/bin/monitor

View File

@@ -0,0 +1,6 @@
FROM registry.cn-beijing.aliyuncs.com/yunionio/openvswitch:2.9.6-1
MAINTAINER "Yousong Zhou <zhouyousong@yunion.cn>"
RUN mkdir -p /opt/yunion/bin
ADD ./_output/alpine-build/bin/vpcagent /opt/yunion/bin/vpcagent

View File

@@ -1,14 +1,3 @@
FROM yunion/kubectl:1.14.3
MAINTAINER "Zexi Li <lizexi@yunionyun.com>"
ENV TZ Asia/Shanghai
RUN mkdir -p /opt/yunion/bin
RUN apk add --no-cache sshpass ipmitool openssh-client tzdata ca-certificates && \
rm -rf /var/cache/apk/*
RUN cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
FROM registry.cn-beijing.aliyuncs.com/yunionio/webconsole-base:latest
ADD ./_output/bin/webconsole /opt/yunion/bin/webconsole

View File

@@ -0,0 +1,12 @@
FROM yunion/kubectl:1.14.3
MAINTAINER "Zexi Li <lizexi@yunionyun.com>"
ENV TZ Asia/Shanghai
RUN mkdir -p /opt/yunion/bin
RUN apk add --no-cache sshpass ipmitool openssh-client tzdata ca-certificates && \
rm -rf /var/cache/apk/*
RUN cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime

View File

@@ -0,0 +1,65 @@
<?xml version="1.0" encoding="UTF-8"?>
<Envelope xmlns="http://schemas.dmtf.org/ovf/envelope/1"
xmlns:ovf="http://schemas.dmtf.org/ovf/envelope/1"
xmlns:cim="http://schemas.dmtf.org/wbem/wscim/1/common"
xmlns:rasd="http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_ResourceAllocationSettingData"
xmlns:vmw="http://www.vmware.com/schema/ovf"
xmlns:vssd="http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_VirtualSystemSettingData"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<References>
<File ovf:href="{{ .Name }}" ovf:id="file1" ovf:size="{{ .Size }}"/>
</References>
<DiskSection>
<Info>Virtual disk information</Info>
<Disk ovf:capacity="{{ .Capacity }}" ovf:capacityAllocationUnits="byte" ovf:diskId="vmdisk1" ovf:fileRef="file1" ovf:format="http://www.vmware.com/interfaces/specifications/vmdk.html#streamOptimized" ovf:populatedSize="0"/>
</DiskSection>
<VirtualSystem ovf:id="{{ .ImportName }}">
<Info>A virtual machine</Info>
<Name>{{ .ImportName }}</Name>
<OperatingSystemSection ovf:id="100" vmw:osType="other26xLinux64Guest">
<Info>The kind of installed guest operating system</Info>
</OperatingSystemSection>
<VirtualHardwareSection>
<Info>Virtual hardware requirements</Info>
<System>
<vssd:ElementName>Virtual Hardware Family</vssd:ElementName>
<vssd:InstanceID>0</vssd:InstanceID>
<vssd:VirtualSystemIdentifier>{{ .ImportName }}</vssd:VirtualSystemIdentifier>
<vssd:VirtualSystemType>vmx-07</vssd:VirtualSystemType>
</System>
<Item>
<rasd:AllocationUnits>hertz * 10^6</rasd:AllocationUnits>
<rasd:Description>Number of Virtual CPUs</rasd:Description>
<rasd:ElementName>1 virtual CPU(s)</rasd:ElementName>
<rasd:InstanceID>1</rasd:InstanceID>
<rasd:ResourceType>3</rasd:ResourceType>
<rasd:VirtualQuantity>1</rasd:VirtualQuantity>
</Item>
<Item>
<rasd:AllocationUnits>byte * 2^20</rasd:AllocationUnits>
<rasd:Description>Memory Size</rasd:Description>
<rasd:ElementName>1024MB of memory</rasd:ElementName>
<rasd:InstanceID>2</rasd:InstanceID>
<rasd:ResourceType>4</rasd:ResourceType>
<rasd:VirtualQuantity>1024</rasd:VirtualQuantity>
</Item>
<Item>
<rasd:Address>0</rasd:Address>
<rasd:Description>SCSI Controller</rasd:Description>
<rasd:ElementName>SCSI Controller 0</rasd:ElementName>
<rasd:InstanceID>3</rasd:InstanceID>
<rasd:ResourceSubType>VirtualSCSI</rasd:ResourceSubType>
<rasd:ResourceType>6</rasd:ResourceType>
</Item>
<Item>
<rasd:AddressOnParent>0</rasd:AddressOnParent>
<rasd:ElementName>Hard Disk 1</rasd:ElementName>
<rasd:HostResource>ovf:/disk/vmdisk1</rasd:HostResource>
<rasd:InstanceID>9</rasd:InstanceID>
<rasd:Parent>3</rasd:Parent>
<rasd:ResourceType>17</rasd:ResourceType>
<vmw:Config ovf:required="false" vmw:key="backing.writeThrough" vmw:value="false"/>
</Item>
</VirtualHardwareSection>
</VirtualSystem>
</Envelope>

2
build/esxi-agent/vars Normal file
View File

@@ -0,0 +1,2 @@
DESCRIPTION="Esxi Agent"
# SERVICE="yes"

View File

@@ -0,0 +1,19 @@
[Unit]
Description=Yunion Host Image Server
Documentation=https://docs.yunion.cn
After=network.target
[Service]
Type=simple
User=root
Group=root
ExecStart=/opt/yunion/bin/host-image --conf /etc/yunion/host.conf
WorkingDirectory=/opt/yunion/bin
KillMode=process
Restart=always
RestartSec=30
LimitNOFILE=500000
LimitNPROC=500000
[Install]
WantedBy=multi-user.target

2
build/host-image/vars Normal file
View File

@@ -0,0 +1,2 @@
DESCRIPTION="Yunion Host Image Server"
SERVICE="yes"

View File

@@ -35,6 +35,7 @@ import (
_ "yunion.io/x/onecloud/cmd/climc/shell/cloudnet"
_ "yunion.io/x/onecloud/cmd/climc/shell/etcd"
_ "yunion.io/x/onecloud/cmd/climc/shell/k8s"
_ "yunion.io/x/onecloud/cmd/climc/shell/monitor"
"yunion.io/x/onecloud/pkg/mcclient"
)

View File

@@ -30,6 +30,7 @@ func init() {
type CloudaccountListOptions struct {
options.BaseListOptions
Capability []string `help:"capability filter" choices:"project|compute|network|loadbalancer|objectstore|rds|cache|event"`
}
R(&CloudaccountListOptions{}, "cloud-account-list", "List cloud accounts", func(s *mcclient.ClientSession, args *CloudaccountListOptions) error {
var params *jsonutils.JSONDict
@@ -39,6 +40,9 @@ func init() {
if err != nil {
return err
}
if len(args.Capability) > 0 {
params.Add(jsonutils.NewStringArray(args.Capability), "capability")
}
}
result, err := modules.Cloudaccounts.List(s, params)
if err != nil {
@@ -88,6 +92,19 @@ func init() {
R(&options.SAliyunCloudAccountCreateOptions{}, "cloud-account-create-aliyun", "Create an Aliyun cloud account", func(s *mcclient.ClientSession, args *options.SAliyunCloudAccountCreateOptions) error {
params := jsonutils.Marshal(args)
params.(*jsonutils.JSONDict).Add(jsonutils.NewString("Aliyun"), "provider")
options := jsonutils.NewDict()
if len(args.OptionsBillingReportBucket) > 0 {
options.Add(jsonutils.NewString(args.OptionsBillingReportBucket), "billing_report_bucket")
}
if len(args.OptionsBillingBucketAccount) > 0 {
options.Add(jsonutils.NewString(args.OptionsBillingBucketAccount), "billing_bucket_account")
}
if len(args.OptionsBillingFilePrefix) > 0 {
options.Add(jsonutils.NewString(args.OptionsBillingFilePrefix), "billing_file_prefix")
}
if options.Size() > 0 {
params.(*jsonutils.JSONDict).Add(options, "options")
}
result, err := modules.Cloudaccounts.Create(s, params)
if err != nil {
return err
@@ -147,6 +164,12 @@ func init() {
if len(args.OptionsBillingReportBucket) > 0 {
options.Add(jsonutils.NewString(args.OptionsBillingReportBucket), "billing_report_bucket")
}
if len(args.OptionsBillingBucketAccount) > 0 {
options.Add(jsonutils.NewString(args.OptionsBillingBucketAccount), "billing_bucket_account")
}
if len(args.OptionsBillingFilePrefix) > 0 {
options.Add(jsonutils.NewString(args.OptionsBillingFilePrefix), "billing_file_prefix")
}
if options.Size() > 0 {
params.Add(options, "options")
}
@@ -280,6 +303,34 @@ func init() {
if params.Size() == 0 {
return InvalidUpdateError()
}
options := jsonutils.NewDict()
if len(args.OptionsBillingReportBucket) > 0 {
options.Add(jsonutils.NewString(args.OptionsBillingReportBucket), "billing_report_bucket")
}
if len(args.OptionsBillingBucketAccount) > 0 {
options.Add(jsonutils.NewString(args.OptionsBillingBucketAccount), "billing_bucket_account")
}
if len(args.OptionsBillingFilePrefix) > 0 {
options.Add(jsonutils.NewString(args.OptionsBillingFilePrefix), "billing_file_prefix")
}
if options.Size() > 0 {
params.Add(options, "options")
}
removeOptions := make([]string, 0)
if args.RemoveOptionsBillingReportBucket {
removeOptions = append(removeOptions, "billing_report_bucket")
}
if args.RemoveOptionsBillingBucketAccount {
removeOptions = append(removeOptions, "billing_bucket_account")
}
if args.RemoveOptionsBillingFilePrefix {
removeOptions = append(removeOptions, "billing_file_prefix")
}
if len(removeOptions) > 0 {
params.Add(jsonutils.NewStringArray(removeOptions), "remove_options")
}
result, err := modules.Cloudaccounts.Update(s, args.ID, params)
if err != nil {
return err
@@ -337,6 +388,12 @@ func init() {
if len(args.OptionsBillingReportBucket) > 0 {
options.Add(jsonutils.NewString(args.OptionsBillingReportBucket), "billing_report_bucket")
}
if len(args.OptionsBillingBucketAccount) > 0 {
options.Add(jsonutils.NewString(args.OptionsBillingBucketAccount), "billing_bucket_account")
}
if len(args.OptionsBillingFilePrefix) > 0 {
options.Add(jsonutils.NewString(args.OptionsBillingFilePrefix), "billing_file_prefix")
}
if options.Size() > 0 {
params.Add(options, "options")
}
@@ -344,6 +401,12 @@ func init() {
if args.RemoveOptionsBillingReportBucket {
removeOptions = append(removeOptions, "billing_report_bucket")
}
if args.RemoveOptionsBillingBucketAccount {
removeOptions = append(removeOptions, "billing_bucket_account")
}
if args.RemoveOptionsBillingFilePrefix {
removeOptions = append(removeOptions, "billing_file_prefix")
}
if len(removeOptions) > 0 {
params.Add(jsonutils.NewStringArray(removeOptions), "remove_options")
}
@@ -611,6 +674,23 @@ func init() {
return nil
})
R(&options.SGoogleCloudAccountUpdateCredentialOptions{}, "cloud-account-update-credential-google", "Update credential of a Google cloud account", func(s *mcclient.ClientSession, args *options.SGoogleCloudAccountUpdateCredentialOptions) error {
data, err := ioutil.ReadFile(args.GoogleJsonFile)
if err != nil {
return err
}
params, err := jsonutils.Parse(data)
if err != nil {
return err
}
result, err := modules.Cloudaccounts.PerformAction(s, args.ID, "update-credential", params)
if err != nil {
return err
}
printObject(result)
return nil
})
R(&options.SS3CloudAccountUpdateCredentialOptions{}, "cloud-account-update-credential-s3", "Update credential of a generic S3 cloud account", func(s *mcclient.ClientSession, args *options.SS3CloudAccountUpdateCredentialOptions) error {
params := jsonutils.Marshal(args)
result, err := modules.Cloudaccounts.PerformAction(s, args.ID, "update-credential", params)
@@ -727,4 +807,34 @@ func init() {
printObject(result)
return nil
})
type CloudaccountSyncSkusOptions struct {
ID string `help:"ID or Name of cloud account"`
RESOURCE string `help:"Resource of skus" choices:"serversku|elasticcachesku|dbinstance_sku"`
Force bool `help:"Force sync no matter what"`
Provider string `help:"provider to sync"`
Region string `help:"region to sync"`
}
R(&CloudaccountSyncSkusOptions{}, "cloud-account-sync-skus", "Sync skus of a cloud account", func(s *mcclient.ClientSession, args *CloudaccountSyncSkusOptions) error {
params := jsonutils.NewDict()
params.Set("resource", jsonutils.NewString(args.RESOURCE))
if args.Force {
params.Add(jsonutils.JSONTrue, "force")
}
if len(args.Provider) > 0 {
params.Add(jsonutils.NewString(args.Provider), "cloudprovider")
}
if len(args.Region) > 0 {
params.Add(jsonutils.NewString(args.Region), "cloudregion")
}
result, err := modules.Cloudaccounts.PerformAction(s, args.ID, "sync-skus", params)
if err != nil {
return err
}
printObject(result)
return nil
})
}

View File

@@ -24,6 +24,9 @@ func init() {
type CloudeventListOptions struct {
options.BaseListOptions
Since string `help:"since time"`
Until string `hlep:"until time"`
}
R(&CloudeventListOptions{}, "cloud-event-list", "List cloud events", func(s *mcclient.ClientSession, opts *CloudeventListOptions) error {
params, err := options.ListStructToParams(opts)

View File

@@ -31,8 +31,9 @@ func init() {
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"`
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"`
}
R(&CloudproviderListOptions{}, "cloud-provider-list", "List cloud providers", func(s *mcclient.ClientSession, args *CloudproviderListOptions) error {
var params *jsonutils.JSONDict
@@ -52,6 +53,10 @@ func init() {
} else if args.NoObjectStorage {
params.Add(jsonutils.JSONFalse, "has_object_storage")
}
if len(args.Capability) > 0 {
params.Add(jsonutils.NewStringArray(args.Capability), "capability")
}
}
result, err := modules.Cloudproviders.List(s, params)
if err != nil {

View File

@@ -49,7 +49,7 @@ func init() {
type CloudregionCityListOptions struct {
Manager string `help:"List objects belonging to the cloud provider"`
Account string `help:"List objects belonging to the cloud account"`
Provider string `help:"List objects from the provider" choices:"VMware|Aliyun|Qcloud|Azure|Aws|Huawei|Openstack|Ucloud|ZStack"`
Provider string `help:"List objects from the provider" choices:"VMware|Aliyun|Qcloud|Azure|Aws|Huawei|Openstack|Ucloud|ZStack|Google|Ctyun"`
City string `help:"List regions in the specified city"`
PublicCloud *bool `help:"List objects belonging to public cloud" json:"public_cloud"`

View File

@@ -29,11 +29,11 @@ func init() {
* 操作用户的通信地址(如果用户的通信地址不存在则进行添加;如果已存在则进行修改;如果设置空则进行删除。)
*/
type ContactsUpdateOptions struct {
UID string `help:"The user you wanna add contact to (Keystone User ID)"`
CONTACTTYPE string `help:"The contact type email|mobile" choices:"email|mobile|dingtalk"`
CONTACT string `help:"The contacts details mobile number or email address or dingtalk's userid, if set it the empty str means delete"`
Status string `help:"Enabled or disabled contact status" choices:"enable|disable"`
UpdateDingtalk bool `help:"if update dingtalk"`
UID string `help:"The user you wanna add contact to (Keystone User ID)"`
CONTACTTYPE string `help:"The contact type email|mobile" choices:"email|mobile|dingtalk"`
CONTACT string `help:"The contacts details mobile number or email address or dingtalk's userid, if set it the empty str means delete"`
Status string `help:"Enabled or disabled contact status" choices:"enable|disable"`
Pull string `help:"pull some subcontacts(e.g., dingtalk, feishu, etc) related to mobile"`
}
R(&ContactsUpdateOptions{}, "contact-update", "Create, delete or update contact for user", func(s *mcclient.ClientSession, args *ContactsUpdateOptions) error {
arr := jsonutils.NewArray()
@@ -52,12 +52,8 @@ func init() {
params := jsonutils.NewDict()
params.Add(arr, "contacts")
if args.UpdateDingtalk {
params.Add(jsonutils.JSONTrue, "update_dingtalk")
}
contact, err := modules.Contacts.CustomizedPerformAction(s, args.UID, "update-contact", params)
contact, err := modules.Contacts.CustomizedPerformAction(s, args.UID, "update-contact", args.Pull, params)
if err != nil {
return err
}
@@ -66,6 +62,21 @@ func init() {
return nil
})
type ContactsPullOptions struct {
UID string `help:"The user you wanna pull contact"`
CONTACTTYPE string `help:"The contact type"`
}
R(&ContactsPullOptions{}, "contact-pull", "Pull contact", func(s *mcclient.ClientSession, args *ContactsPullOptions) error {
params := jsonutils.NewDict()
params.Set("contacts", jsonutils.NewArray())
contact, err := modules.Contacts.CustomizedPerformAction(s, args.UID, "update-contact", args.CONTACTTYPE, params)
if err != nil {
return err
}
printObject(contact)
return nil
})
type ContactsDeleteOptions struct {
UID string `help:"The user you wanna add contact to (Keystone User ID)"`
CONTACTTYPE string `help:"The contact type email|mobile|dingtalk" choices:"email|mobile|dingtalk"`
@@ -78,7 +89,7 @@ func init() {
arr.Add(tmpObj)
params := jsonutils.NewDict()
params.Add(arr, "contacts")
contact, err := modules.Contacts.CustomizedPerformAction(s, args.UID, "update-contact", params)
contact, err := modules.Contacts.CustomizedPerformAction(s, args.UID, "update-contact", "", params)
if err != nil {
return err
}
@@ -169,7 +180,7 @@ func init() {
tmpDict := jsonutils.NewDict()
tmpDict.Add(jsonutils.NewString(args.CONTACT_TYPE), "contact_type")
tmpDict.Add(jsonutils.NewString(args.CONTACT), "contact")
_, err := modules.Contacts.CustomizedPerformAction(s, args.UID, "verify", tmpDict)
_, err := modules.Contacts.CustomizedPerformAction(s, args.UID, "verify", "", tmpDict)
if err != nil {
return err
}

View File

@@ -79,7 +79,7 @@ func init() {
if err != nil {
return err
}
users, err := modules.Groups.GetUsers(s, grpId)
users, err := modules.Groups.GetUsers(s, grpId, nil)
if err != nil {
return err
}

View File

@@ -38,7 +38,7 @@ func init() {
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"`
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"`
IsBaremetal *bool `help:"filter host list by is_baremetal=true|false"`
@@ -55,6 +55,8 @@ func init() {
CdromBoot *bool `help:"filter hosts list by cdrom_boot=true|false"`
Sn string `help:"find host by sn"`
options.BaseListOptions
}
R(&HostListOptions{}, "host-list", "List hosts", func(s *mcclient.ClientSession, opts *HostListOptions) error {
@@ -76,6 +78,9 @@ func init() {
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

View File

@@ -50,7 +50,7 @@ type ImageOptionalOptions struct {
OsLang string `help:"OS Language" choices:"zh_CN|en_US"`
Preference int64 `help:"Disk preferences"`
Notes string `help:"Notes about the image"`
Hypervisor []string `help:"Prefer hypervisor type" choices:"kvm|esxi|baremetal|container|openstack"`
Hypervisor []string `help:"Prefer hypervisor type" choices:"kvm|esxi|baremetal|container|openstack|ctyun"`
DiskDriver string `help:"Perfer disk driver" choices:"virtio|scsi|pvscsi|ide|sata"`
NetDriver string `help:"Preferred network driver" choices:"virtio|e1000|vmxnet3"`
}

View File

@@ -51,9 +51,10 @@ func init() {
})
type KeypairCreate struct {
NAME string `help:"Name of keypair to be created"`
Scheme string `help:"Scheme of keypair, default is RSA" choices:"RSA|DSA" default:"RSA"`
Desc string `help:"Short description of keypair"`
NAME string `help:"Name of keypair to be created"`
Scheme string `help:"Scheme of keypair, default is RSA" choices:"RSA" default:"RSA"`
PublicKey string `help:"Publickey of keypair"`
Desc string `help:"Short description of keypair"`
}
R(&KeypairCreate{}, "keypair-create", "Create a new keypair", func(s *mcclient.ClientSession, args *KeypairCreate) error {
@@ -63,6 +64,10 @@ func init() {
params.Add(jsonutils.NewString(args.Scheme), "scheme")
}
if len(args.PublicKey) > 0 {
params.Add(jsonutils.NewString(args.PublicKey), "public_key")
}
if len(args.Desc) > 0 {
params.Add(jsonutils.NewString(args.Desc), "description")
}

View File

@@ -0,0 +1,69 @@
// 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/pkg/mcclient"
"yunion.io/x/onecloud/pkg/mcclient/modules/monitor"
options "yunion.io/x/onecloud/pkg/mcclient/options/monitor"
)
func init() {
aN := cmdN("alert")
R(&options.AlertListOptions{}, aN("list"), "List all alerts",
func(s *mcclient.ClientSession, args *options.AlertListOptions) error {
params, err := args.Params()
if err != nil {
return err
}
ret, err := monitor.Alerts.List(s, params)
if err != nil {
return err
}
printList(ret, monitor.Alerts.GetColumns(s))
return nil
})
R(&options.AlertShowOptions{}, aN("show"), "Show details of a alert rule",
func(s *mcclient.ClientSession, args *options.AlertShowOptions) error {
ret, err := monitor.Alerts.Get(s, args.ID, nil)
if err != nil {
return err
}
printObject(ret)
return nil
})
R(&options.AlertUpdateOptions{}, aN("update"), "Update a alert rule",
func(s *mcclient.ClientSession, args *options.AlertUpdateOptions) error {
params, err := args.Params()
if err != nil {
return err
}
ret, err := monitor.Alerts.Update(s, args.ID, params.JSON(params))
if err != nil {
return err
}
printObject(ret)
return nil
})
R(&options.AlertDeleteOptions{}, aN("delete"), "Delete alerts",
func(s *mcclient.ClientSession, args *options.AlertDeleteOptions) error {
ret := monitor.Alerts.BatchDelete(s, args.ID, nil)
printBatchResults(ret, monitor.Alerts.GetColumns(s))
return nil
})
}

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/util/printutils"
)
var (
R = shell.R
printList = printutils.PrintJSONList
printObject = printutils.PrintJSONObject
printBatchResults = printutils.PrintJSONBatchResults
)

View File

@@ -0,0 +1,56 @@
// 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 (
"fmt"
"yunion.io/x/onecloud/pkg/mcclient"
"yunion.io/x/onecloud/pkg/mcclient/modules/monitor"
options "yunion.io/x/onecloud/pkg/mcclient/options/monitor"
)
func cmdN(suffix string) func(action string) string {
return func(action string) string {
return fmt.Sprintf("monitor-%s-%s", suffix, action)
}
}
func init() {
dsN := cmdN("datasource")
R(&options.DataSourceListOptions{}, dsN("list"), "List all monitor data source",
func(s *mcclient.ClientSession, args *options.DataSourceListOptions) error {
params, err := args.Params()
if err != nil {
return err
}
ret, err := monitor.DataSources.List(s, params)
if err != nil {
return err
}
printList(ret, monitor.DataSources.GetColumns(s))
return nil
})
R(&options.DataSourceDeleteOptions{}, dsN("delete"), "Delete monitor data source",
func(s *mcclient.ClientSession, args *options.DataSourceDeleteOptions) error {
ret, err := monitor.DataSources.Delete(s, args.ID, nil)
if err != nil {
return err
}
printObject(ret)
return nil
})
}

View File

@@ -0,0 +1,99 @@
// 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/pkg/mcclient"
"yunion.io/x/onecloud/pkg/mcclient/modules/monitor"
options "yunion.io/x/onecloud/pkg/mcclient/options/monitor"
)
func init() {
nN := cmdN("notification")
R(&options.NotificationListOptions{}, nN("list"), "List all alert notification",
func(s *mcclient.ClientSession, args *options.NotificationListOptions) error {
params, err := args.Params()
if err != nil {
return err
}
ret, err := monitor.Notifications.List(s, params)
if err != nil {
return err
}
printList(ret, monitor.Notifications.GetColumns(s))
return nil
})
R(&options.NotificationDingDingCreateOptions{}, nN("create-dingding"),
"Create dingding alert notification",
func(s *mcclient.ClientSession, args *options.NotificationDingDingCreateOptions) error {
params, err := args.Params()
if err != nil {
return err
}
ret, err := monitor.Notifications.Create(s, params.JSON(params))
if err != nil {
return err
}
printObject(ret)
return nil
})
R(&options.NotificationFeishuCreateOptions{}, nN("create-feishu"),
"Create feishu alert notification",
func(s *mcclient.ClientSession, args *options.NotificationFeishuCreateOptions) error {
params, err := args.Params()
if err != nil {
return err
}
ret, err := monitor.Notifications.Create(s, params.JSON(params))
if err != nil {
return err
}
printObject(ret)
return nil
})
R(&options.NotificationShowOptions{}, nN("show"), "Show alert notification",
func(s *mcclient.ClientSession, args *options.NotificationShowOptions) error {
ret, err := monitor.Notifications.Get(s, args.ID, nil)
if err != nil {
return err
}
printObject(ret)
return nil
})
R(&options.NotificationUpdateOptions{}, nN("update"), "Update alert notification",
func(s *mcclient.ClientSession, args *options.NotificationUpdateOptions) error {
params, err := args.Params()
if err != nil {
return err
}
ret, err := monitor.Notifications.Update(s, args.ID, params.JSON(params))
if err != nil {
return err
}
printObject(ret)
return nil
})
R(&options.NotificationDeleteOptions{}, nN("delete"), "Show delete notification",
func(s *mcclient.ClientSession, args *options.NotificationDeleteOptions) error {
ret := monitor.Notifications.BatchDelete(s, args.ID, nil)
printBatchResults(ret, monitor.Notifications.GetColumns(s))
return nil
})
}

View File

@@ -59,18 +59,18 @@ func init() {
* 修改指定的报警规则
*/
type NodealertUpdateOptions struct {
ID string `help:"ID of the alert rule" required:"true" positional:"true"`
Type string `help:"Alert rule type" choices:"guest|host"`
Metric string `help:"Metric name, include measurement and field, such as vm_cpu.usage_active"`
NodeName string `help:"Name of the guest or host"`
NodeID string `help:"ID of the guest or host"`
Period string `help:"Specify the query time period for the data"`
Window string `help:"Specify the query interval for the data"`
Threshold float64 `help:"Threshold value of the metric"`
Comparator string `help:"Comparison operator for join expressions" choices:">|<|>=|<=|=|!="`
Recipients string `help:"Comma separated recipient ID"`
Level string `help:"Alert level" choices:"normal|important|fatal"`
Channel string `help:"Ways to send an alarm" choices:"email|mobile"`
ID string `help:"ID of the alert rule" required:"true" positional:"true"`
Type string `help:"Alert rule type" choices:"guest|host"`
Metric string `help:"Metric name, include measurement and field, such as vm_cpu.usage_active"`
NodeName string `help:"Name of the guest or host"`
NodeID string `help:"ID of the guest or host"`
Period string `help:"Specify the query time period for the data"`
Window string `help:"Specify the query interval for the data"`
Threshold *float64 `help:"Threshold value of the metric"`
Comparator string `help:"Comparison operator for join expressions" choices:">|<|>=|<=|=|!="`
Recipients string `help:"Comma separated recipient ID"`
Level string `help:"Alert level" choices:"normal|important|fatal"`
Channel string `help:"Ways to send an alarm" choices:"email|mobile"`
}
R(&NodealertUpdateOptions{}, "nodealert-update", "Update the node alert rule", func(s *mcclient.ClientSession, args *NodealertUpdateOptions) error {
params, err := options.StructToParams(args)
@@ -92,14 +92,11 @@ func init() {
* 删除指定ID的报警规则
*/
type NodealertDeleteOptions struct {
ID string `help:"ID of node alert" required:"true" positional:"true"`
ID []string `help:"ID of node alert" required:"true" positional:"true"`
}
R(&NodealertDeleteOptions{}, "nodealert-delete", "Delete a node alert", func(s *mcclient.ClientSession, args *NodealertDeleteOptions) error {
alarm, err := modules.NodeAlert.Delete(s, args.ID, nil)
if err != nil {
return err
}
printObject(alarm)
ret := modules.NodeAlert.BatchDelete(s, args.ID, nil)
printBatchResults(ret, modules.NodeAlert.GetColumns(s))
return nil
})

View File

@@ -29,7 +29,7 @@ func init() {
*/
type NotificationCreateOptions struct {
CONTACTTYPE string `help:"User's contacts type" choices:"email|mobile|dingtalk|webconsole"`
CONTACTTYPE string `help:"User's contacts type"`
TOPIC string `help:"Title or topic of the notification"`
PRIORITY string `help:"Priority of the notification" choices:"normal|important|fatal"`
MSG string `help:"The content of the notification"`

View File

@@ -34,7 +34,24 @@ func init() {
}
body := jsonutils.NewDict()
body.Add(tmp, args.CONTACTTYPE)
modules.Configs.Create(s, body)
ret, err := modules.Configs.Create(s, body)
if err != nil {
return err
}
printObject(ret)
return nil
})
R(&ConfigCreate2Options{}, "notify-config-validate", "config validate", func(s *mcclient.ClientSession,
args *ConfigCreate2Options) error {
tmp := jsonutils.NewDict()
for i := 0; i+1 < len(args.CONFIGS); i += 2 {
tmp.Add(jsonutils.NewString(args.CONFIGS[i+1]), args.CONFIGS[i])
}
ret, err := modules.Configs.PerformAction(s, args.CONTACTTYPE, "validate", tmp)
if err != nil {
return err
}
printObject(ret)
return nil
})

View File

@@ -24,7 +24,7 @@ import (
)
type ComputeQuotaKeys struct {
RegionQuotaKeys
ZoneQuotaKeys
Hypervisor string `help:"hypervisor" choices:"kvm|baremetal"`
}
@@ -53,8 +53,8 @@ type RegionQuotaOptions struct {
Port int64 `help:"Internal NIC count" json:"port,omitzero"`
Eport int64 `help:"External NIC count" json:"eport,omitzero"`
Bw int64 `help:"Internal bandwidth in Mbps" json:"bw,omitzero"`
Ebw int64 `help:"External bandwidth in Mbps" json:"ebw,omitzero"`
// Bw int64 `help:"Internal bandwidth in Mbps" json:"bw,omitzero"`
// Ebw int64 `help:"External bandwidth in Mbps" json:"ebw,omitzero"`
Eip int64 `help:"Elastic IP count" json:"eip,omitzero"`
@@ -110,6 +110,7 @@ func init() {
Project string `help:"Tenant name or ID" json:"tenant"`
Domain string `help:"Domain name or ID" json:"domain"`
Refresh bool `help:"refresh" json:"refresh,omitfalse"`
Primary bool `help:"get primary quota ONLY" json:"primary,omitfalse"`
}
R(&QuotaOptions{}, "quota", "Show quota for current user or tenant", func(s *mcclient.ClientSession, args *QuotaOptions) error {
params := jsonutils.Marshal(args)
@@ -239,6 +240,8 @@ func init() {
type QuotaListOptions struct {
ProjectDomain string `help:"domain name or ID to query project quotas"`
Refresh bool `help:"refresh" json:"refresh,omitfalse"`
Primary bool `help:"list primary quota ONLY" json:"primary,omitfalse"`
}
R(&QuotaListOptions{}, "quota-list", "List quota of domains or projects of a domain", func(s *mcclient.ClientSession, args *QuotaListOptions) error {
params := jsonutils.Marshal(args)

View File

@@ -28,6 +28,7 @@ func init() {
NOTES string `help:"Why reserve this IP"`
IPS []string `help:"IPs to reserve"`
Duration string `help:"reservation duration, e.g. 1I, 1H, 2M"`
Status string `help:"ip status"`
}
R(&NetworkReserveIPOptions{}, "network-reserve-ip", "Reserve an IP address from pool", func(s *mcclient.ClientSession, args *NetworkReserveIPOptions) error {
params := jsonutils.NewDict()
@@ -36,6 +37,9 @@ func init() {
if len(args.Duration) > 0 {
params.Add(jsonutils.NewString(args.Duration), "duration")
}
if len(args.Status) > 0 {
params.Add(jsonutils.NewString(args.Status), "status")
}
net, err := modules.Networks.PerformAction(s, args.NETWORK, "reserve-ip", params)
if err != nil {
return err

View File

@@ -21,6 +21,7 @@ import (
"yunion.io/x/jsonutils"
"yunion.io/x/pkg/util/regutils"
"yunion.io/x/onecloud/pkg/apis/compute"
"yunion.io/x/onecloud/pkg/cloudcommon/cmdline"
"yunion.io/x/onecloud/pkg/mcclient"
"yunion.io/x/onecloud/pkg/mcclient/modulebase"
@@ -150,12 +151,19 @@ func init() {
})
type ServerAttachNetworkOptions struct {
SERVER string `help:"ID or Name of server"`
NETDESC string `help:"Network description"`
SERVER string `help:"ID or Name of server"`
NETDESC []string `help:"Network description"`
}
R(&ServerAttachNetworkOptions{}, "server-attach-network", "Attach a server to a virtual network", func(s *mcclient.ClientSession, args *ServerAttachNetworkOptions) error {
params := jsonutils.NewDict()
params.Add(jsonutils.NewString(args.NETDESC), "net_desc")
input := compute.AttachNetworkInput{[]*compute.NetworkConfig{}}
for i := 0; i < len(args.NETDESC); i++ {
conf, err := cmdline.ParseNetworkConfig(args.NETDESC[i], -1)
if err != nil {
return err
}
input.Nets = append(input.Nets, conf)
}
params := jsonutils.Marshal(input)
srv, err := modules.Servers.PerformAction(s, args.SERVER, "attachnetwork", params)
if err != nil {
return err

View File

@@ -22,9 +22,9 @@ import (
)
type GeneralUsageOptions struct {
HostType []string `help:"Host types" choices:"hypervisor|baremetal|esxi|xen|kubelet|hyperv|aliyun|azure|aws|huawei|qcloud|openstack|ucloud|zstack"`
Provider []string `help:"Provider" choices:"OneCloud|VMware|Aliyun|Azure|Aws|Qcloud|Huawei|OpenStack|Ucloud|ZStack"`
Brand []string `help:"Brands" choices:"OneCloud|VMware|Aliyun|Azure|Aws|Qcloud|Huawei|OpenStack|Ucloud|ZStack|DStack"`
HostType []string `help:"Host types" choices:"hypervisor|baremetal|esxi|xen|kubelet|hyperv|aliyun|azure|aws|huawei|qcloud|openstack|ucloud|zstack|google|ctyun"`
Provider []string `help:"Provider" choices:"OneCloud|VMware|Aliyun|Azure|Aws|Qcloud|Huawei|OpenStack|Ucloud|ZStack|Google|Ctyun"`
Brand []string `help:"Brands" choices:"OneCloud|VMware|Aliyun|Azure|Aws|Qcloud|Huawei|OpenStack|Ucloud|ZStack|DStack|Google|Ctyun"`
Project string `help:"show usage of specified project"`
ProjectDomain string `help:"show usage of specified domain"`

View File

@@ -15,6 +15,7 @@
package shell
import (
"encoding/base64"
"fmt"
"net/url"
@@ -45,6 +46,9 @@ func init() {
if err != nil {
return err
}
if decodeStr, err := base64.StdEncoding.DecodeString(connParams); err == nil {
connParams = string(decodeStr)
}
var query url.Values
connUrl, err := url.ParseRequestURI(connParams)
if err == nil {
@@ -64,7 +68,9 @@ func init() {
return nil
}
u.RawQuery = connParams
newQuery := url.Values(make(map[string][]string))
newQuery.Set("data", base64.StdEncoding.EncodeToString([]byte(connParams)))
u.RawQuery = newQuery.Encode()
fmt.Println(u.String())
return nil
}

View File

@@ -12,18 +12,15 @@
// See the License for the specific language governing permissions and
// limitations under the License.
package apis
package main
type ModelBaseDetails struct {
CanDelete bool `json:"can_delete"`
DeleteFailReason string `json:"delete_fail_reason"`
CanUpdate bool `json:"can_update"`
UpdateFailReason string `json:"update_fail_reason"`
}
import (
"yunion.io/x/onecloud/pkg/esxi/service"
"yunion.io/x/onecloud/pkg/util/atexit"
)
type ModelBaseShortDescDetail struct {
ResName string `json:"res_name"`
}
func main() {
defer atexit.Handle()
type ModelBaseListInput struct {
service.New().StartService()
}

23
cmd/monitor/main.go Normal file
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 main
import (
"yunion.io/x/onecloud/pkg/monitor/service"
)
func main() {
service.StartService()
}

71
cmd/vpcagent/main.go Normal file
View File

@@ -0,0 +1,71 @@
// 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 (
"context"
"os"
"os/signal"
"sync"
"syscall"
"yunion.io/x/log"
app_common "yunion.io/x/onecloud/pkg/cloudcommon/app"
common_options "yunion.io/x/onecloud/pkg/cloudcommon/options"
"yunion.io/x/onecloud/pkg/util/atexit"
"yunion.io/x/onecloud/pkg/vpcagent/options"
_ "yunion.io/x/onecloud/pkg/vpcagent/ovn"
"yunion.io/x/onecloud/pkg/vpcagent/worker"
)
func main() {
defer atexit.Handle()
opts := &options.Options{}
commonOpts := &opts.CommonOptions
{
common_options.ParseOptions(opts, os.Args, "vpcagent.conf", "vpcagent")
app_common.InitAuth(commonOpts, func() {
log.Infof("auth finished ok")
})
}
if err := opts.ValidateThenInit(); err != nil {
log.Fatalf("opts validate: %s", err)
}
w := worker.NewWorker(opts)
if w == nil {
log.Fatalf("new worker failed")
}
{
wg := &sync.WaitGroup{}
ctx, cancelFunc := context.WithCancel(context.Background())
ctx = context.WithValue(ctx, "wg", wg)
wg.Add(1)
go w.Start(ctx)
go func() {
sigChan := make(chan os.Signal)
signal.Notify(sigChan, syscall.SIGINT)
signal.Notify(sigChan, syscall.SIGTERM)
sig := <-sigChan
log.Infof("signal received: %s", sig)
cancelFunc()
}()
wg.Wait()
}
}

18
go.mod
View File

@@ -3,6 +3,7 @@ module yunion.io/x/onecloud
go 1.12
require (
cloud.google.com/go v0.38.0
github.com/360EntSecGroup-Skylar/excelize v1.4.0
github.com/Azure/azure-sdk-for-go v36.1.0+incompatible
github.com/Azure/go-autorest v10.15.5+incompatible
@@ -22,6 +23,7 @@ require (
github.com/aokoli/goutils v1.0.1
github.com/aws/aws-sdk-go v1.21.4
github.com/baiyubin/aliyun-sts-go-sdk v0.0.0-20180326062324-cfa1a18b161f // indirect
github.com/benbjohnson/clock v1.0.0
github.com/bitly/go-simplejson v0.5.0
github.com/bmizerany/assert v0.0.0-20160611221934-b7ed37b82869 // indirect
github.com/c-bata/go-prompt v0.2.1
@@ -100,6 +102,7 @@ require (
github.com/shirou/gopsutil v2.18.10+incompatible
github.com/shirou/w32 v0.0.0-20160930032740-bb4de0191aa4 // indirect
github.com/skip2/go-qrcode v0.0.0-20190110000554-dc11ecdae0a9
github.com/smartystreets/goconvey v1.6.4
github.com/spaolacci/murmur3 v1.1.0 // indirect
github.com/spf13/pflag v1.0.3 // indirect
github.com/stretchr/testify v1.4.0
@@ -109,16 +112,21 @@ require (
github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5 // indirect
github.com/tredoe/osutil v0.0.0-20161130133508-7d3ee1afa71c
github.com/ugorji/go v0.0.0-20161130061742-9c7f9b7a2bc3 // indirect
github.com/vishvananda/netlink v1.0.0
github.com/vishvananda/netns v0.0.0-20191106174202-0a2b9b5464df // indirect
github.com/vmihailenco/msgpack v4.0.4+incompatible
github.com/vmware/govmomi v0.19.0
go.etcd.io/etcd v0.5.0-alpha.5.0.20191023171146-3cf2f69b5738
go.uber.org/atomic v1.4.0 // indirect
golang.org/x/crypto v0.0.0-20191002192127-34f69633bfdc
golang.org/x/net v0.0.0-20191007182048-72f939374954
golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421
golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45
golang.org/x/sync v0.0.0-20190423024810-112230192c58
golang.org/x/sys v0.0.0-20191008105621-543471e840be
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543
golang.zx2c4.com/wireguard/wgctrl v0.0.0-20191008142428-8d021180e987
google.golang.org/api v0.13.0 // indirect
google.golang.org/genproto v0.0.0-20190502173448-54afdca5d873
google.golang.org/grpc v1.23.1
gopkg.in/asn1-ber.v1 v1.0.0-20181015200546-f715ec2f112d // indirect
gopkg.in/go-playground/assert.v1 v1.2.1 // indirect
@@ -132,12 +140,12 @@ require (
k8s.io/client-go v9.0.0+incompatible
k8s.io/klog v0.1.0 // indirect
k8s.io/kubernetes v1.12.3
yunion.io/x/executor v0.0.0-20191202093616-92e2e6119257
yunion.io/x/jsonutils v0.0.0-20191220095028-7fef3b75f64d
yunion.io/x/executor v0.0.0-20200227030256-a18417815e74
yunion.io/x/jsonutils v0.0.0-20200113074440-9297fd00ba07
yunion.io/x/log v0.0.0-20190629062853-9f6483a7103d
yunion.io/x/pkg v0.0.0-20191221094533-5097f12f41ac
yunion.io/x/pkg v0.0.0-20200302034534-fdf44d54b070
yunion.io/x/s3cli v0.0.0-20190917004522-13ac36d8687e
yunion.io/x/sqlchemy v0.0.0-20191226074733-6eb73845bfb7
yunion.io/x/sqlchemy v0.0.0-20200221103553-6a98f7f8ab92
yunion.io/x/structarg v0.0.0-20190809075558-115bed041de3
)

57
go.sum
View File

@@ -3,6 +3,8 @@ cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMT
cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw=
cloud.google.com/go v0.37.4 h1:glPeL3BQJsbF6aIIYfZizMwc5LTYz250bDMjttbBGAU=
cloud.google.com/go v0.37.4/go.mod h1:NHPJ89PdicEuT9hdPXMROBD91xc5uRDxsMtSB16k7hw=
cloud.google.com/go v0.38.0 h1:ROfEUZz+Gh5pa62DJWXSaonyu3StP6EA6lPEXPI6mCo=
cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU=
github.com/360EntSecGroup-Skylar/excelize v1.4.0 h1:43rak9uafmwSJpXfFO1heKQph8tP3nlfWJWFQQtW1R0=
github.com/360EntSecGroup-Skylar/excelize v1.4.0/go.mod h1:R8KYLmGns0vDPe6/HyphW0mzW+MFexlGDafU0ykVEnU=
github.com/Azure/azure-sdk-for-go v5.0.0-beta.0.20161118192335-3b1282355199+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc=
@@ -78,6 +80,8 @@ github.com/aws/aws-sdk-go v1.21.4 h1:1xB+x6Dzev8ETmeHEiSfUVbIzmC/0EyFfXMkJpzKPCE
github.com/aws/aws-sdk-go v1.21.4/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo=
github.com/baiyubin/aliyun-sts-go-sdk v0.0.0-20180326062324-cfa1a18b161f h1:ZNv7On9kyUzm7fvRZumSyy/IUiSC7AzL0I1jKKtwooA=
github.com/baiyubin/aliyun-sts-go-sdk v0.0.0-20180326062324-cfa1a18b161f/go.mod h1:AuiFmCCPBSrqvVMvuqFuk0qogytodnVFVSN5CeJB8Gc=
github.com/benbjohnson/clock v1.0.0 h1:78Jk/r6m4wCi6sndMpty7A//t4dw/RW5fV4ZgDVfX1w=
github.com/benbjohnson/clock v1.0.0/go.mod h1:bGMdMPoPVvcYyt1gHDf4J2KE153Yf9BuiUKYMaxlTDM=
github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973 h1:xJ4a3vCFaGF/jqvzLMYoU8P317H5OQ+Via4RmuPwCS0=
github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q=
github.com/beorn7/perks v1.0.0 h1:HWo1m869IqiPhD389kmkxeTalrjNbbJTC8LXupb+sl0=
@@ -217,12 +221,16 @@ github.com/google/gofuzz v1.0.0 h1:A8PeW59pxE9IoFRqBp37U+mSNaQoZ46F1f0f863XSXw=
github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg=
github.com/google/gopacket v1.1.17 h1:rMrlX2ZY2UbvT+sdz3+6J+pp2z+msCq9MxTU6ymxbBY=
github.com/google/gopacket v1.1.17/go.mod h1:UdDNZ1OO62aGYVnPhxT1U6aI7ukYtA/kB8vaU0diBUM=
github.com/google/martian v2.1.0+incompatible h1:/CP5g8u/VJHijgedC/Legn3BAbAaWPgecwXBIDzw5no=
github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs=
github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc=
github.com/google/uuid v1.0.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
github.com/google/uuid v1.1.0 h1:Jf4mxPC/ziBnoPIdpQdPJ9OeiomAUHLvxmPRSPH9m4s=
github.com/google/uuid v1.1.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
github.com/googleapis/gax-go/v2 v2.0.4 h1:hU4mGcQI4DaAYW+IbTun+2qEZVFxK0ySjQLTbS0VQKc=
github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg=
github.com/googleapis/gax-go/v2 v2.0.5 h1:sjZBwGj9Jlw33ImPtvFviGYvseOtDM7hkSKB7+Tv3SM=
github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk=
github.com/googleapis/gnostic v0.2.0 h1:l6N3VoaVzTncYYW+9yOz2LJJammFZGBO13sqgEhpy9g=
github.com/googleapis/gnostic v0.2.0/go.mod h1:sJBsCZ4ayReDTBIg8b9dl28c5xFWyhBTVRp3pOg5EKY=
github.com/googollee/go-engine.io v0.0.0-20180829091931-e2f255711dcb h1:n22Aukg/TjoypWc37dbKIpCsz0VMFPD36HQk1WKvg3A=
@@ -256,7 +264,10 @@ github.com/grpc-ecosystem/grpc-opentracing v0.0.0-20180507213350-8e809c8a8645 h1
github.com/grpc-ecosystem/grpc-opentracing v0.0.0-20180507213350-8e809c8a8645/go.mod h1:6iZfnjpejD4L/4DwD7NryNaJyCQdzwWwH2MWhCA90Kw=
github.com/hako/durafmt v0.0.0-20180520121703-7b7ae1e72ead h1:Y9WOGZY2nw5ksbEf5AIpk+vK52Tdg/VN/rHFRfEeeGQ=
github.com/hako/durafmt v0.0.0-20180520121703-7b7ae1e72ead/go.mod h1:5Scbynm8dF1XAPwIwkGPqzkM/shndPm79Jd1003hTjE=
github.com/hashicorp/golang-lru v0.5.0 h1:CL2msUPvZTLb5O648aiLNJw3hnBxN2+1Jq8rCOH9wdo=
github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8=
github.com/hashicorp/golang-lru v0.5.1 h1:0hERBMJE1eitiLkihrMvRVBYAkpHzc/J3QdDN+dAcgU=
github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8=
github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU=
github.com/huandu/xstrings v1.0.0/go.mod h1:4qWG/gcEcfX4z/mBDHJ++3ReCw9ibxbsNJbcucJdbSo=
github.com/huandu/xstrings v1.2.0 h1:yPeWdRnmynF7p+lLYz0H2tthW9lqhMJrQV/U7yy4wX0=
@@ -441,6 +452,8 @@ github.com/smartystreets/goconvey v0.0.0-20180222194500-ef6db91d284a h1:JSvGDIbm
github.com/smartystreets/goconvey v0.0.0-20180222194500-ef6db91d284a/go.mod h1:XDJAKZRPZ1CvBcN2aX5YOUTYGHki24fSF0Iv48Ibg0s=
github.com/smartystreets/goconvey v0.0.0-20190330032615-68dc04aab96a h1:pa8hGb/2YqsZKovtsgrwcDH1RZhVbTKCjLp47XpqCDs=
github.com/smartystreets/goconvey v0.0.0-20190330032615-68dc04aab96a/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA=
github.com/smartystreets/goconvey v1.6.4 h1:fv0U8FUIMPNf1L9lnHLvLhgicrIVChEkdzIKYqbNC9s=
github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA=
github.com/smartystreets/gunit v0.0.0-20180314194857-6f0d6275bdcd h1:p5kvxG4NHogJX1brTLtvUSGdW0/aBvIyqDSW7tmnsmQ=
github.com/smartystreets/gunit v0.0.0-20180314194857-6f0d6275bdcd/go.mod h1:XUKj4gbqj2QvJk/OdLWzyZ3FYli0f+MdpngyryX0gcw=
github.com/soheilhy/cmux v0.1.4 h1:0HKaf1o97UwFjHH9o5XsHUOF+tqmdA7KEzXLpiyaw0E=
@@ -481,6 +494,10 @@ github.com/tredoe/osutil v0.0.0-20161130133508-7d3ee1afa71c/go.mod h1:M/I710pXKQ
github.com/ugorji/go v0.0.0-20161130061742-9c7f9b7a2bc3 h1:KfqgRfYvGRyKOQUx8GphSC8D6vVoBndzco3rESP8I4k=
github.com/ugorji/go v0.0.0-20161130061742-9c7f9b7a2bc3/go.mod h1:hnLbHMwcvSihnDhEfx2/BzKp2xb0Y+ErdfYcrs9tkJQ=
github.com/urfave/cli v1.20.0/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA=
github.com/vishvananda/netlink v1.0.0 h1:bqNY2lgheFIu1meHUFSH3d7vG93AFyqg3oGbJCOJgSM=
github.com/vishvananda/netlink v1.0.0/go.mod h1:+SR5DhBJrl6ZM7CoCKvpw5BKroDKQ+PJqOg65H/2ktk=
github.com/vishvananda/netns v0.0.0-20191106174202-0a2b9b5464df h1:OviZH7qLw/7ZovXvuNyL3XQl8UFofeikI1NW1Gypu7k=
github.com/vishvananda/netns v0.0.0-20191106174202-0a2b9b5464df/go.mod h1:JP3t17pCcGlemwknint6hfoeCVQrEMVwxRLRjXpq+BU=
github.com/vmihailenco/msgpack v4.0.4+incompatible h1:dSLoQfGFAo3F6OoNhwUmLwVgaUXK79GlxNBwueZn0xI=
github.com/vmihailenco/msgpack v4.0.4+incompatible/go.mod h1:fy3FlTQTDXWkZ7Bh6AcGMlsjHatGryHQYUTf1ShIgkk=
github.com/vmware/govmomi v0.19.0 h1:CR6tEByWCPOnRoRyhLzuHaU+6o2ybF3qufNRWS/MGrY=
@@ -499,7 +516,10 @@ go.etcd.io/bbolt v1.3.3 h1:MUGmc65QhB3pIlaQ5bB4LwqSj6GIonVJXpZiaKNyaKk=
go.etcd.io/bbolt v1.3.3/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU=
go.etcd.io/etcd v0.5.0-alpha.5.0.20191023171146-3cf2f69b5738 h1:lWF4f9Nypl1ZqSb4gLeh/DGvBYVaUYHuiB93teOmwgc=
go.etcd.io/etcd v0.5.0-alpha.5.0.20191023171146-3cf2f69b5738/go.mod h1:dnLIgRNXwCJa5e+c6mIZCrds/GIG4ncV9HhK5PX7jPg=
go.opencensus.io v0.20.1 h1:pMEjRZ1M4ebWGikflH7nQpV6+Zr88KBMA2XJD3sbijw=
go.opencensus.io v0.20.1/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk=
go.opencensus.io v0.21.0 h1:mU6zScU4U1YAFPHEHYk+3JC4SY7JxgkqS10ZOSyksNg=
go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU=
go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE=
go.uber.org/atomic v1.4.0 h1:cxzIVoETapQEqDhQu3QfnvXAV4AlzcvUCxkVUFw3+EU=
go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE=
@@ -524,6 +544,7 @@ golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTk
golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU=
golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE=
golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc=
golang.org/x/lint v0.0.0-20190409202823-959b441ac422/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc=
golang.org/x/net v0.0.0-20180524181706-dfa909b99c79/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
@@ -537,6 +558,7 @@ golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn
golang.org/x/net v0.0.0-20190313220215-9f648a60d977/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
golang.org/x/net v0.0.0-20190419010253-1f3472d942ba/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
golang.org/x/net v0.0.0-20190522155817-f3200d17e092/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks=
golang.org/x/net v0.0.0-20190603091049-60506f45cf65 h1:+rhAzEzT3f4JtomfC371qB+0Ola2caSKcY69NUBZrRQ=
golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks=
@@ -548,6 +570,8 @@ golang.org/x/net v0.0.0-20191007182048-72f939374954/go.mod h1:z5CRVTTTmAJ677TzLL
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421 h1:Wo7BWFiOk0QRFMLYMqJGFMd9CgUAcGx7V+qEg/h5IBI=
golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45 h1:SVwTIAaPC2U/AvvLNZ2a7OVsmBpC8L5BlwK1whH3hm0=
golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20181108010431-42b317875d0f h1:Bl/8QSvNqXvPGPGXa2z5xUTmV7VDcZyvRZ+QQXkXTZQ=
golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
@@ -572,6 +596,7 @@ golang.org/x/sys v0.0.0-20190411185658-b44545bcd369/go.mod h1:h1NjWce9XRLGQEsW7w
golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20190418153312-f0ce4c0180be/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20190606122018-79a91cf218c4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20190826190057-c7b8b68b1456/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20190830023255-19e00faab6ad/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
@@ -595,23 +620,36 @@ golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3
golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=
golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=
golang.org/x/tools v0.0.0-20190328211700-ab21143f2384/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=
golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q=
golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135 h1:5Beo0mZN8dRzgrMMkDp0jc8YXQKx9DiJ2k1dkvGsn5A=
golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q=
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543 h1:E7g+9GITq07hpfrRu66IVDexMakfv52eLZ2CXBWiKr4=
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.zx2c4.com/wireguard v0.0.20190908 h1:SUoXDdwSMtomLdvke+zz83/u9tNvl4hHmcTIWp38tow=
golang.zx2c4.com/wireguard v0.0.20190908/go.mod h1:LhfXh5z6bLC2lW2ve6BzYZFwnnsXK3OQjySR0Yh2dO8=
golang.zx2c4.com/wireguard/wgctrl v0.0.0-20191008142428-8d021180e987 h1:26OAgqBTufVr8WKonCEhhjO1oKsYhHv0iM5Dg92G1TM=
golang.zx2c4.com/wireguard/wgctrl v0.0.0-20191008142428-8d021180e987/go.mod h1:7hq1rEDsx7/FWl8IEEnfH2Xhs6M2MNnjUfN0PeI8Rm0=
google.golang.org/api v0.3.1 h1:oJra/lMfmtm13/rgY/8i3MzjFWYXvQIAKjQ3HqofMk8=
google.golang.org/api v0.3.1/go.mod h1:6wY9I6uQWHQ8EM57III9mq/AjF+i8G65rmVagqKMtkk=
google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE=
google.golang.org/api v0.13.0 h1:Q3Ui3V3/CVinFWFiW39Iw0kMuVrRzYX0wN6OPFp0lTA=
google.golang.org/api v0.13.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI=
google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM=
google.golang.org/appengine v1.4.0 h1:/wp5JvzpHIxhs/dumFmF7BXTf3Z+dd4uXta4kVyO508=
google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4=
google.golang.org/appengine v1.5.0 h1:KxkO13IPW4Lslp2bz+KHP2E3gtFlrIGNThxkZQ3g+4c=
google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4=
google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc=
google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE=
google.golang.org/genproto v0.0.0-20190404172233-64821d5d2107 h1:xtNn7qFlagY2mQNFHMSRPjT2RkOV4OXM7P5TVy9xATo=
google.golang.org/genproto v0.0.0-20190404172233-64821d5d2107/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE=
google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE=
google.golang.org/genproto v0.0.0-20190502173448-54afdca5d873 h1:nfPFGzJkUDX6uBmpN/pSw7MbOAWegH5QDQuoXFHedLg=
google.golang.org/genproto v0.0.0-20190502173448-54afdca5d873/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE=
google.golang.org/grpc v1.17.0/go.mod h1:6QZJwpn2B+Zp71q/5VxRsJ6NXXVCE5NRUHRo+f3cWCs=
google.golang.org/grpc v1.19.0 h1:cfg4PD8YEdSFnm7qLV4++93WcmhH2nIUhMjhdCvl3j8=
google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c=
google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38=
google.golang.org/grpc v1.22.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg=
google.golang.org/grpc v1.23.1 h1:q4XQuHFC6I28BKZpo6IYyb3mNO+l7lSOxRuYTCiDfXk=
google.golang.org/grpc v1.23.1/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg=
@@ -645,6 +683,7 @@ gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
honnef.co/go/tools v0.0.0-20180728063816-88497007e858/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
k8s.io/api v0.0.0-20181004124137-fd83cbc87e76 h1:cGc6jt7tNK7a2WfgNKjxjoU/UXXr9Q7JTqvCupZ+6+Y=
k8s.io/api v0.0.0-20181004124137-fd83cbc87e76/go.mod h1:iuAfoD4hCxJ8Onx9kaTIt30j7jUFS00AXQi6QMi99vA=
@@ -658,12 +697,12 @@ k8s.io/kubernetes v1.12.3 h1:5GPfYyyBylqcZUqL+ApYpYTm2IYjH56JUewYC0GbetU=
k8s.io/kubernetes v1.12.3/go.mod h1:ocZa8+6APFNC2tX1DZASIbocyYT5jHzqFVsY5aoB7Jk=
sigs.k8s.io/yaml v1.1.0 h1:4A07+ZFc2wgJwo8YNlQpr1rVlgUDlxXHhPJciaPY5gs=
sigs.k8s.io/yaml v1.1.0/go.mod h1:UJmg0vDUVViEyp3mgSv9WPwZCDxu4rQW1olrI1uml+o=
yunion.io/x/executor v0.0.0-20191202093616-92e2e6119257 h1:LZ6eC1uoLDAp7NQlaCy+DKnF31Mgd3LDKlIithziEmY=
yunion.io/x/executor v0.0.0-20191202093616-92e2e6119257/go.mod h1:Uxuou9WQIeJXNpy7t2fPLL0BYLvLiMvGQwY7Qc6aSws=
yunion.io/x/executor v0.0.0-20200227030256-a18417815e74 h1:A15C6VdVRWvmQ9pAJHrUs9yan5qKlYH7uaRxHg1kRbk=
yunion.io/x/executor v0.0.0-20200227030256-a18417815e74/go.mod h1:Uxuou9WQIeJXNpy7t2fPLL0BYLvLiMvGQwY7Qc6aSws=
yunion.io/x/jsonutils v0.0.0-20190625054549-a964e1e8a051 h1:vtZw2iwGrsARNSwRTREGjmr2BWPdxbmXVkb3kI1qu28=
yunion.io/x/jsonutils v0.0.0-20190625054549-a964e1e8a051/go.mod h1:4N0/RVzsYL3kH3WE/H1BjUQdFiWu50JGCFQuuy+Z634=
yunion.io/x/jsonutils v0.0.0-20191220095028-7fef3b75f64d h1:58hs2hyO2DgeVQ5i2fAKjg/ooPH0q4+ALEnqtxjn7DA=
yunion.io/x/jsonutils v0.0.0-20191220095028-7fef3b75f64d/go.mod h1:4N0/RVzsYL3kH3WE/H1BjUQdFiWu50JGCFQuuy+Z634=
yunion.io/x/jsonutils v0.0.0-20200113074440-9297fd00ba07 h1:i6Im3w4UoyCIKOEtr0Y3aAPGrL9FYAzeFXoj3daXXt0=
yunion.io/x/jsonutils v0.0.0-20200113074440-9297fd00ba07/go.mod h1:NpWHLv3D1iMpsp1Kv6o1ASPZmuSKutE3RIMhxKSOeAM=
yunion.io/x/log v0.0.0-20190514041436-04ce53b17c6b h1:Z9z+7iegu0HXuL+S8taVWRd1P4b9JJOgPXIeoqYrj7c=
yunion.io/x/log v0.0.0-20190514041436-04ce53b17c6b/go.mod h1:+gauLs73omeJAPlsXcevLsJLKixV+sR/E7WSYTSx1fE=
yunion.io/x/log v0.0.0-20190629062853-9f6483a7103d h1:59zrDL7Ft+hDukguJRmLr/Gdu/9V75x+yX99ovZwfaA=
@@ -671,11 +710,13 @@ yunion.io/x/log v0.0.0-20190629062853-9f6483a7103d/go.mod h1:LC6f/4FozL0iaAbnFt2
yunion.io/x/pkg v0.0.0-20190620104149-945c25821dbf h1:OsKC+2ghZHwp+Ztm/MwKlLKKRiE7QcPG8eTp0GmsHbg=
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-20191221094533-5097f12f41ac h1:upUF6LBhCKx9c/OUzSUwfv50oCtU4LLmO+UtnKEQsg8=
yunion.io/x/pkg v0.0.0-20191221094533-5097f12f41ac/go.mod h1:t6rEGG2sQ4J7DhFxSZVOTjNd0YO/KlfWQyK1W4tog+E=
yunion.io/x/pkg v0.0.0-20200103043034-27c6f82160fa h1:+7zYi8MhaOW/53/7FOERnhQqAU4UhgaOVIS+AMzTKNU=
yunion.io/x/pkg v0.0.0-20200103043034-27c6f82160fa/go.mod h1:t6rEGG2sQ4J7DhFxSZVOTjNd0YO/KlfWQyK1W4tog+E=
yunion.io/x/pkg v0.0.0-20200302034534-fdf44d54b070 h1:rKnYgtvMHKmzPEUTkyNjyKOG7wzjpUvI7fcZwLNGQXw=
yunion.io/x/pkg v0.0.0-20200302034534-fdf44d54b070/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-20191226074733-6eb73845bfb7 h1:nK047S9fIjIBkB9Yyo2e6itUA7TpmFsd7/a6mGKjNU0=
yunion.io/x/sqlchemy v0.0.0-20191226074733-6eb73845bfb7/go.mod h1:FTdwPdGhMgh4E+UFXc9klI1Ok34fMuybTT+jLhOaIjI=
yunion.io/x/sqlchemy v0.0.0-20200221103553-6a98f7f8ab92 h1:Iz70/alKMAW3KeePhmExuhWsYw1MGTcMr5ewAL5lj1I=
yunion.io/x/sqlchemy v0.0.0-20200221103553-6a98f7f8ab92/go.mod h1:FTdwPdGhMgh4E+UFXc9klI1Ok34fMuybTT+jLhOaIjI=
yunion.io/x/structarg v0.0.0-20190809075558-115bed041de3 h1:bfC8EhXYvyGYldRWlzxiCM39Zfj3s3+zham9mW2h2LE=
yunion.io/x/structarg v0.0.0-20190809075558-115bed041de3/go.mod h1:EP6NSv2C0zzqBDTKumv8hPWLb3XvgMZDHQRfyuOrQng=

View File

@@ -285,6 +285,12 @@ func (mh *MiscHandler) DoBatchUserRegister(ctx context.Context, w http.ResponseW
domain := row[2]
allowWebConsole := strings.ToLower(row[3])
// 忽略空白行
rowStr := strings.Join(row, "")
if len(strings.TrimSpace(rowStr)) == 0 {
continue
}
if len(name) == 0 {
e := httperrors.NewClientError("row %d name is empty", rowIdx)
httperrors.JsonClientError(w, e)

View File

@@ -187,7 +187,7 @@ func (f *ResourceHandlers) listHandler(ctx context.Context, w http.ResponseWrite
}
}
func (f *ResourceHandlers) doList(session *mcclient.ClientSession, module modulebase.BaseManagerInterface, query jsonutils.JSONObject, w http.ResponseWriter, r *http.Request) {
func (f *ResourceHandlers) doList(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")

View File

@@ -117,21 +117,24 @@ func rpcHandler(ctx context.Context, w http.ResponseWriter, req *http.Request) {
v, ok := retobj.Interface().(jsonutils.JSONObject)
if ok {
appsrv.SendJSON(w, v)
return
}
v2, ok := retobj.Interface().([]modulebase.SubmitResult)
if ok {
w.WriteHeader(207)
appsrv.SendJSON(w, modulebase.SubmitResults2JSON(v2))
} else {
httperrors.BadGatewayError(w, "recv invalid data")
return
}
httperrors.BadGatewayError(w, "recv invalid data")
} else {
v, ok := reterr.Interface().(*httputils.JSONClientError)
if ok {
httperrors.JsonClientError(w, v)
} else {
httperrors.BadGatewayError(w, fmt.Sprintf("%s", reterr.Interface()))
return
}
httperrors.BadGatewayError(w, fmt.Sprintf("%s", reterr.Interface()))
}
}

View File

@@ -15,15 +15,19 @@
package cloudevent
import (
"time"
"yunion.io/x/onecloud/pkg/apis"
"yunion.io/x/onecloud/pkg/apis/compute"
)
type CloudeventListInput struct {
apis.BaseListInput
apis.VirtualResourceListInput
apis.SharableVirtualResourceListInput
compute.ManagedResourceListInput
Cloudprovider string `json:"cloudprovider"`
Providers []string `json:"providers"`
// 操作日志起始时间
Since time.Time `json:"since"`
// 操作日志截止时间
Until time.Time `json:"until"`
}

View File

@@ -16,8 +16,16 @@ package cloudprovider
// SGeographicInfo is an autogenerated struct via yunion.io/x/onecloud/pkg/cloudprovider.SGeographicInfo.
type SGeographicInfo struct {
Latitude float32 `json:"latitude"`
Longitude float32 `json:"longitude"`
City string `json:"city"`
CountryCode string `json:"country_code"`
// 纬度
// example: 26.647003
Latitude float32 `json:"latitude"`
// 经度
// example: 106.630211
Longitude float32 `json:"longitude"`
// 城市
// example: Guiyang
City string `json:"city"`
// 国家代码
// example: CN
CountryCode string `json:"country_code"`
}

View File

@@ -31,14 +31,36 @@ type SchedtagConfig struct {
type NetworkConfig struct {
apis.Meta
Index int `json:"index"`
Network string `json:"network"`
Wire string `json:"wire"`
Exit bool `json:"exit"`
Private bool `json:"private"`
Mac string `json:"mac"`
Address string `json:"address"`
// 网卡序号, 从0开始
// required: true
Index int `json:"index"`
// 子网名称或ID
// required: true
Network string `json:"network"`
// swagger:ignore
Wire string `json:"wire"`
// 内网地址
Exit bool `json:"exit"`
Private bool `json:"private"`
// 网卡MAC地址
// requried: false
Mac string `json:"mac"`
// 子网内的IPv4地址, 若不指定会安装子网的地址分配策略分配一个IP地址
// required: false
Address string `json:"address"`
// 子网内的IPv6地址
// required: false
// swagger:ignore
Address6 string `json:"address6"`
// 驱动方式
// 若指定镜像的网络驱动方式,此参数会被覆盖
Driver string `json:"driver"`
BwLimit int `json:"bw_limit"`
Vip bool `json:"vip"`
@@ -53,33 +75,132 @@ type NetworkConfig struct {
StandbyPortCount int `json:"standby_port_count"`
StandbyAddrCount int `json:"standby_addr_count"`
Project string `json:"project_id"`
// swagger:ignore
Project string `json:"project_id"`
// swagger:ignore
Domain string `json:"domain_id"`
Ifname string `json:"ifname"`
Schedtags []*SchedtagConfig `json:"schedtags"`
}
type AttachNetworkInput struct {
// 添加的网卡的配置
// required: true
Nets []*NetworkConfig `json:"nets"`
}
type DiskConfig struct {
apis.Meta
Index int `json:"index"` // -1 means not attach to any guests
ImageId string `json:"image_id"`
SnapshotId string `json:"snapshot_id"`
DiskType string `json:"disk_type"`
Schedtags []*SchedtagConfig `json:"schedtags"`
// 挂载到虚拟机的磁盘顺序, -1代表不挂载任何虚拟机
// default: -1
Index int `json:"index"`
SizeMb int `json:"size"`
Fs string `json:"fs"`
Format string `json:"format"`
Driver string `json:"driver"`
Cache string `json:"cache"`
Mountpoint string `json:"mountpoint"`
Backend string `json:"backend"` // stroageType
Medium string `json:"medium"`
// 镜像ID,通过镜像创建磁盘,创建虚拟机时第一块磁盘需要指定此参数
// required: false
ImageId string `json:"image_id"`
// 快照ID,通过快照创建磁盘,此参数必须加上 'snapshot-' 前缀
// example: snapshot-3140cecb-ccc4-4865-abae-3a5ba8c69d9b
// requried: false
SnapshotId string `json:"snapshot_id"`
// 磁盘类型
// enum: sys, data, swap
DiskType string `json:"disk_type"`
Schedtags []*SchedtagConfig `json:"schedtags"`
// 磁盘大小,单位Mb
// 若创建裸金属服务器是, -1代表自动向后扩展存储
// requried:true
SizeMb int `json:"size"`
// 文件系统,仅kvm支持自动格式化磁盘,私有云和公有云此参数不会生效
// enum: swap, ext2, ext3, ext4, xfs, ntfs, fat, hfsplus
// requried: false
Fs string `json:"fs"`
// 磁盘存储格式
// enum: qcow2, raw, docker, iso, vmdk, vmdkflatver1, vmdkflatver2, vmdkflat, vmdksparse, vmdksparsever1, vmdksparsever2, vmdksepsparse vhd
// requried: false
Format string `json:"format"`
// 磁盘驱动方式
// enum: virtio, ide, scsi, sata, pvscsi
// requried: false
Driver string `json:"driver"`
// 磁盘缓存模式
// enum: writeback, none, writethrough
// requried: false
Cache string `json:"cache"`
// 挂载点,必须以 '/' 开头,例如 /opt 仅KVM此参数有效
// requried: false
Mountpoint string `json:"mountpoint"`
//后端存储类型,若指定了存储ID,此参数会根据存储设置,若不指定,则作为调度的一个参考
//
//
//
//| 平台 | 存储类型 | 中文 | 数据盘 | 系统盘 | 可否扩容 | 可否单独创建 | 扩容步长 | 说明 |
//| ---- | ---- | ---- | ----- | ----- | ------- | ----------- | ------- | ----- |
//| Esxi |local |本地盘 |1-500GB |30~500GB | 是 | 否 | 1G | |
//| Esxi |nas |NAS盘 |30-3072GB |30~500GB | 是 | 否 | 1G | |
//| Esxi |vsan |VSAN盘 |30-3072GB |30~500GB | 是 | 否 | 1G | |
//| KVM |local |本地盘盘 |1-500GB |30~500GB | 是 | 否 | 1G | |
//| KVM |rbd |云硬盘 |1-3072GB |30~500GB | 是 | 是 | 1G | |
//| Azure |standard_lrs |标准 HDD |1-4095GB |30~4095GB | 是 | 是 | 1G | |
//| Azure |standardssd_lrs |标准 SSD |1-4095GB |30~4095GB | 是 | 是 | 1G | |
//| Azure |premium_lrs |高级SSD |1-4095GB |30~4095GB | 是 | 是 | 1G | |
//| AWS |gp2 |通用型SSD |1-16384GB |20~16384GB | 是 | 是 | 1G | |
//| AWS |io1 |预配置 IOPS SSD|4-16384GB |20-16384GB | 是 | 是 | 1G | |
//| AWS |st1 |吞吐优化HDD |500-16384GB |不支持 | 是 | 是 | 1G | |
//| AWS |sc1 |Cold HDD |500-16384GB |不支持 | 是 | 是 | 1G | |
//| AWS |standard |磁介质 |1-1024GB |20-1024GB | 是 | 是 | 1G | |
//| 腾讯云 |cloud_ssd |SSD云硬盘 |10-16000GB |50~500GB | 是 | 是 | 10G | |
//| 腾讯云 |cloud_basic |普通云硬盘 |10-16000GB |50~500GB | 是 | 是 | 10G | |
//| 腾讯云 |cloud_preium |高性能云硬盘 |10-16000GB |50~1024GB | 是 | 是 | 10G | |
//| 腾讯云 |local_basic |普通本地盘 |10-1600GB |不支持 | 否 | 否 | | |
//| 腾讯云 |local_ssd |SSD本地盘 |10-7000GB |部分区域套餐支持 | 否 | 否 | | |
//| 腾讯云 |local_pro |HDD本地盘 |跟随套餐 |部分区域套餐支持 | 否 | 否 | | |
//| 华为云或天翼云 |SSD |超高IO云硬盘 |10-32768GB |40~1024GB | 是 | 是 | 1G | |
//| 华为云或天翼云 |SAS |高IO云硬盘 |10-32768GB |40~1024GB | 是 | 是 | 1G | |
//| 华为云或天翼云 |SATA |普通IO云硬盘 |10-32768GB |40~1024GB | 是 | 是 | 1G | |
//| OpenStack |nova |nova |不支持 |30-500GB | 否 | 否 | | |
//| OpenStack |自定义 |... |无限制 |无限制 | 是 | 是 | 1G | |
//| Ucloud |CLOUD_NORMAL |普通云盘 |20-8000GB |不支持 | 是 | 是 | 1G | |
//| Ucloud |CLOUD_SSD |SSD云盘 |20-4000GB |20-500GB | 是 | 是 | 1G | |
//| Ucloud |LOCAL_NORMAL |普通本地盘 | | | 是 | 是 | 1G | |
//| Ucloud |LOCAL_SSD |SSD本地盘 | | | 是 | 是 | 1G | |
//| Ucloud |EXCLUSIVE_LOCAL_DISK |独享本地盘 | | | 是 | 是 | 1G | |
//| ZStack |localstorage |本地盘 | | | 是 | 是 | 1G | |
//| ZStack |ceph |云硬盘 | | | 是 | 是 | 1G | |
//| Google |local-ssd |本地SSD暂存盘 |375GB |不支持 | 否 | 否 | | 跟随实例创建一次最多添加8个 |
//| Google |pd-standard |标准永久性磁盘 |10-65536GB |10-65536GB | 是 | 是 | 1G | |
//| Google |pd-ssd |SSD永久性磁盘 |10-65536GB |10-65536GB | 是 | 是 | 1G | |
Backend string `json:"backend"`
//介质类型
//rotate: 机械盘
//ssd: 固态硬盘
//hybird: 混合盘
//emum: [rotate, ssd, hybrid]
//default: hybird
Medium string `json:"medium"`
//swagger:ignore
ImageProperties map[string]string `json:"image_properties"`
//存储ID, 指定存储后,磁盘会在此存储上创建
//存储列表可以参数 storage 列表API
//required: false
Storage string `json:"storage_id"`
DiskId string `json:"disk_id"`
//swagger:ignore
DiskId string `json:"disk_id"`
}
type IsolatedDeviceConfig struct {
@@ -110,26 +231,92 @@ type BaremetalDiskConfig struct {
}
type ServerConfigs struct {
// prefer options
PreferRegion string `json:"prefer_region_id"`
PreferZone string `json:"prefer_zone_id"`
PreferWire string `json:"prefer_wire_id"`
PreferHost string `json:"prefer_host_id"`
// 调度使用指定的云账号
PreferManager string `json:"prefer_manager_id"`
// 调度到指定区域,优先级低于prefer_zone_id
PreferRegion string `json:"prefer_region_id"`
// 调度到指定可用区,优先级低于prefer_host_id
PreferZone string `json:"prefer_zone_id"`
// 调度使用指定二层网络, 优先级低于prefer_host_id
PreferWire string `json:"prefer_wire_id"`
// 调度使用指定宿主机
PreferHost string `json:"prefer_host_id"`
// 主机高可用时,将备机调度到指定宿主机, 此参数仅对KVM生效
PreferBackupHost string `json:"prefer_backup_host"`
// 虚拟化技术或平台
//
//
//
// |hypervisor | 技术或平台 |
// |------- | ---------- |
// |kvm | 本地私有云 |
// |esxi | VMWare |
// |baremetal | 裸金属 |
// |aliyun | 阿里云 |
// |aws | 亚马逊 |
// |qcloud | 腾讯云 |
// |azure | 微软云 |
// |huawei | 华为云 |
// |openstack | OpenStack |
// |ucloud | Ucloud |
// |zstack | ZStack |
// |google | 谷歌云 |
// |ctyun | 天翼云 |
// default: kvm
Hypervisor string `json:"hypervisor"`
// ResourceType "shared|prepaid|dedicated"`
// 包年包月资源池
// swagger:ignore
// emum: shared, prepaid, dedicated
ResourceType string `json:"resource_type"`
// 套餐名称, 此参数优先级高于vcpu_count和vmem_size
// 套餐可以通过 serverskus 列表获取
// esxi, openstack, zstack等私有云都统一使用provider为OneCloud的套餐
// 公有云使用各自的套餐
InstanceType string `json:"instance_type"`
Backup bool `json:"backup"`
Count int `json:"count"`
Disks []*DiskConfig `json:"disks"`
Networks []*NetworkConfig `json:"nets"`
Schedtags []*SchedtagConfig `json:"schedtags"`
IsolatedDevices []*IsolatedDeviceConfig `json:"isolated_devices"`
BaremetalDiskConfigs []*BaremetalDiskConfig `json:"baremetal_disk_configs"`
// swagger:ignore
// Deprecated
// alias for InstanceType
Sku string `json:"sku" deprecated-by:"instance_type"`
// 虚拟机高可用(创建备机)
// default: false
// requried: false
Backup bool `json:"backup"`
// 创建虚拟机数量
// default: 1
Count int `json:"count"`
// 磁盘列表,第一块磁盘为系统盘,需要指定image_id
// 若指定主机快照,此参数可以为空
// required: true
Disks []*DiskConfig `json:"disks"`
// 指定主机网络
// required: false
Networks []*NetworkConfig `json:"nets"`
// 调度标签
// required: false
Schedtags []*SchedtagConfig `json:"schedtags"`
// 透传设备列表
// required: false
IsolatedDevices []*IsolatedDeviceConfig `json:"isolated_devices"`
// 裸金属磁盘配置列表
BaremetalDiskConfigs []*BaremetalDiskConfig `json:"baremetal_disk_configs"`
// 主机组列表, 参数可以是主机组名称或ID,建议使用ID
InstanceGroupIds []string `json:"groups"`
// DEPRECATE
@@ -159,51 +346,149 @@ type ServerCreateInput struct {
*ServerConfigs
VmemSize int `json:"vmem_size"`
VcpuCount int `json:"vcpu_count"`
UserData string `json:"user_data"`
Metadata map[string]string `json:"__meta__"`
// 虚拟机内存大小,单位Mb,若未指定instance_type,此参数为必传项
VmemSize int `json:"vmem_size"`
// 虚拟机Cpu大小,若未指定instance_type,此参数为必传项
// default: 1
VcpuCount int `json:"vcpu_count"`
// 用户自定义启动脚本
// required: false
UserData string `json:"user_data"`
// swagger:ignore
Keypair string `json:"keypair" deprecated-by:"keypair_id"`
// 秘钥对Id
// required: false
KeypairId string `json:"keypair_id"`
Password string `json:"password"`
Cdrom string `json:"cdrom"`
Vga string `json:"vga"`
Vdi string `json:"vdi"`
Bios string `json:"bios"`
// Description string `json:"description"`
BootOrder string `json:"boot_order"`
EnableCloudInit bool `json:"enable_cloud_init"`
ResetPassword *bool `json:"reset_password"`
// DisableDelete *bool `json:"disable_delete"`
ShutdownBehavior string `json:"shutdown_behavior"`
AutoStart bool `json:"auto_start"`
DeployConfigs []*DeployConfig `json:"deploy_configs"`
// IsSystem bool `json:"is_system"`
Duration string `json:"duration"`
AutoPrepaidRecycle bool `json:"auto_prepaid_recycle,omitfalse"`
SecgroupId string `json:"secgrp_id"`
EipBw int `json:"eip_bw,omitzero"`
EipChargeType string `json:"eip_charge_type,omitempty"`
Eip string `json:"eip,omitempty"`
InstanceSnapshotId string `json:"instance_snapshot_id,omitempty"`
Secgroups []string `json:"secgroups"`
// 密码
// 要求: 密码长度 >= 20, 至少包含一个数字一个小写字母一个大小字母及特殊字符~`!@#$%^&*()-_=+[]{}|:';\",./<>?中的一个
// requried: false
Password string `json:"password"`
// 使用ISO光盘启动, 仅KVM平台支持
// required: false
Cdrom string `json:"cdrom"`
// enum: cirros, vmware, qxl, std
// default: std
Vga string `json:"vga"`
// 远程连接协议
// enum: vnc, spice
// default: vnc
Vdi string `json:"vdi"`
// BIOS类型, 若镜像是Windows并且支持UEFI,则自动会设置为UEFI
// emulate: BIOS, UEFI
Bios string `json:"bios"`
// 启动顺序
// c: cdrome
// d: disk
// n: network
// example: cnd
// default: cdn
BootOrder string `json:"boot_order"`
// 启用cloud-init,需要镜像装有cloud-init服务
// default: false
EnableCloudInit bool `json:"enable_cloud_init"`
// 随机密码, 若指定password参数,此参数不生效
// 若值为false并且password为空,则表示保留镜像密码
ResetPassword *bool `json:"reset_password"`
// 关机后执行的操作
// terminate: 关机后自动删除
// emum: stop, terminate
// default: stop
ShutdownBehavior string `json:"shutdown_behavior"`
// 创建后自动启动
// 部分云创建后会自动启动例如: 腾讯云, AWS, OpenStack, ZStack, Ucloud, Huawei, Azure, 天翼云
// default: false
AutoStart bool `json:"auto_start"`
DeployConfigs []*DeployConfig `json:"deploy_configs"`
// 包年包月时长
//
//
// |平台 |是否支持 |
// |---- |------- |
// |KVM |否 |
// |ESxi |否 |
// |OpenStack |否 |
// |ZStack |否 |
// |Google |否 |
// |Azure |否 |
// |AWS |否 |
// |腾讯云 |是 |
// |Aliyun |是 |
// |Ucloud |是 |
// |Huawei |是 |
// |天翼云 |是 |
Duration string `json:"duration"`
// swagger:ignore
AutoPrepaidRecycle bool `json:"auto_prepaid_recycle,omitfalse"`
// 弹性公网IP带宽
// 指定此参数后会创建新的弹性公网IP并绑定到新建的虚拟机
// 私有云不支持此参数
EipBw int `json:"eip_bw,omitzero"`
// 弹性公网IP计费类型
EipChargeType string `json:"eip_charge_type,omitempty"`
// 弹性公网IP名称或ID
// 绑定已有弹性公网IP, 此参数会限制虚拟机再谈下公网IP所在的区域创建
// required: false
Eip string `json:"eip,omitempty"`
// 使用主机快照创建虚拟机, 主机快照不会重置密码及秘钥信息
// 使用主机快照创建的虚拟机将沿用之前的密码秘钥及安全组信息
// required: false
InstanceSnapshotId string `json:"instance_snapshot_id,omitempty"`
// 安全组Id, 此参数会和secgroups参数合并
SecgroupId string `json:"secgrp_id"`
// 安全组Id列表
Secgroups []string `json:"secgroups"`
// swagger:ignore
OsType string `json:"os_type"`
// Fill by server
OsProfile jsonutils.JSONObject `json:"__os_profile__"`
BillingType string `json:"billing_type"`
BillingCycle string `json:"billing_cycle"`
// DEPRECATE or not used fields
// swagger:ignore
OsProfile jsonutils.JSONObject `json:"__os_profile__"`
// swagger:ignore
BillingType string `json:"billing_type"`
// swagger:ignore
BillingCycle string `json:"billing_cycle"`
// swagger:ignore
// Deprecated
// 此参数等同于 hypervisor=baremetal
Baremetal bool `json:"baremetal"`
// Used to store BaremetalConvertHypervisorTaskId
ParentTaskId string `json:"__parent_task_id,omitempty"`
// default stroage type if host is given
// 指定系统盘默认存储类型, 如果指定宿主机
// swagger:ignore
DefaultStorageType string `json:"default_storage_type,omitempty"`
// Guest Image ID
GuestImageID string
// 指定用于新建主机的主机镜像ID
GuestImageID string `json:"guest_image_id"`
}
func (input *ServerCreateInput) AfterUnmarshal() {
if input.Baremetal {
input.Hypervisor = HYPERVISOR_BAREMETAL
}
}
type ServerCloneInput struct {

View File

@@ -0,0 +1,26 @@
// Copyright 2019 Yunion
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package compute
import "yunion.io/x/onecloud/pkg/apis"
type BaremetalagentDetails struct {
apis.StandaloneResourceDetails
SBaremetalagent
// 裸金属代理程序所在的可用区
// example: zone1
Zone string `json:"zone"`
}

View File

@@ -49,9 +49,13 @@ type BucketCreateInput struct {
StorageClass string `json:"storage_class"`
}
type BucketDetail struct {
apis.Meta
type BucketDetails struct {
apis.VirtualResourceDetails
SBucket
CloudproviderInfo
AccessUrls []cloudprovider.SBucketAccessUrl `json:"access_urls"`
}
type BucketObjectsActionInput struct {
@@ -89,3 +93,9 @@ func (input *BucketMetadataInput) Validate() error {
}
return nil
}
type BucketListInput struct {
apis.VirtualResourceListInput
ManagedResourceListInput
}

View File

@@ -0,0 +1,55 @@
// Copyright 2019 Yunion
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package compute
import "yunion.io/x/onecloud/pkg/apis"
type CachedImageUncacheImageInput struct {
// 存储缓存名Id
// required: true
StoragecacheId string `json:"storagecache_id"`
// 是否强制清除缓存
// default: false
IsForce bool `json:"is_force"`
}
type CachedimageDetails struct {
apis.StandaloneResourceDetails
SCachedimage
// 镜像状态, 和info里面的status一致
// example: active
Status string `json:"status"`
// 操作系统类型
// example: FreeBSD
OsType string `json:"os_type"`
// 操作系统发行版
// example: FreeBSD
OsDistribution string `json:"os_distribution"`
// 操作系统版本
// example: 11
OsVersion string `json:"os_version"`
// 虚拟化类型
Hypervisor string `json:"hypervisor"`
// 此镜像被使用次数
// example: 0
CachedCount int `json:"cached_count"`
}

View File

@@ -0,0 +1,24 @@
// Copyright 2019 Yunion
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package compute
import "yunion.io/x/onecloud/pkg/apis"
type CachedLoadbalancerAclDetails struct {
apis.SharableVirtualResourceDetails
SCachedLoadbalancerAcl
CloudproviderInfo
}

View File

@@ -0,0 +1,24 @@
// Copyright 2019 Yunion
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package compute
import "yunion.io/x/onecloud/pkg/apis"
type CachedLoadbalancerCertificateDetails struct {
apis.VirtualResourceDetails
SCachedLoadbalancerCertificate
CloudproviderInfo
}

View File

@@ -26,16 +26,58 @@ import (
type CloudaccountCreateInput struct {
apis.EnabledStatusStandaloneResourceCreateInput
Provider string
Brand string
IsPublicCloud bool
IsOnPremise bool
Tenant string
TenantId string
EnableAutoSync bool
SyncIntervalSeconds int
AutoCreateProject bool
Options *jsonutils.JSONObject
// 指定云平台
// Qcloud: 腾讯云
// Ctyun: 天翼云
// enum: VMware, Aliyun, Qcloud, Azure, Aws, Huawei, OpenStack, Ucloud, ZStack, Google, Ctyun
Provider string `json:"provider"`
// swagger:ignore
AccountId string
// 指定云平台品牌, 此参数默认和provider相同
// requried: false
//
//
//
// | provider | 支持的参数 |
// | -------- | ---------- |
// | VMware | VMware |
// | Aliyun | Aliyun |
// | Qcloud | Qcloud |
// | Azure | Azure |
// | Aws | Aws |
// | Huawei | Huawei |
// | OpenStack | OpenStack |
// | Ucloud | Ucloud |
// | ZStack | ZStack, DStack |
// | Google | Google |
// | Ctyun | Ctyun |
Brand string `json:"brand"`
// swagger:ignore
IsPublicCloud bool
// swagger:ignore
IsOnPremise bool
// 指定云账号所属的项目
Tenant string `json:"tenant"`
// swagger:ignore
TenantId string
// 启用自动同步
// default: false
EnableAutoSync bool `json:"enable_auto_sync"`
// 自动同步间隔时间
SyncIntervalSeconds int `json:"sync_interval_seconds"`
// 自动根据云上项目或订阅创建本地项目
// default: false
AutoCreateProject bool `json:"auto_create_project"`
// 额外信息,例如账单的access key
Options *jsonutils.JSONObject `json:"options"`
cloudprovider.SCloudaccount
cloudprovider.SCloudaccountCredential
@@ -56,3 +98,83 @@ func (i CloudaccountShareModeInput) Validate() error {
}
return nil
}
type CloudaccountListInput struct {
apis.EnabledStatusStandaloneResourceListInput
ManagedResourceListInput
CapabilityListInput
}
type ProviderProject struct {
// 子订阅项目名称
// example: system
Tenant string `json:"tenant"`
// 子订阅项目Id
// 9a48383a-467a-4542-8b50-4e15b0a8715f
TenantId string `json:"tenant_id"`
}
type CloudaccountDetail struct {
apis.StandaloneResourceDetails
SCloudaccount
// 子订阅项目信息
Projects []ProviderProject `json:"projects"`
// 同步时间间隔
// example: 3600
SyncIntervalSeconds int `json:"sync_interval_seconds"`
// 同步状态
SyncStatus2 string `json:"sync_stauts2"`
// 云账号环境类型
// public: 公有云
// private: 私有云
// onpremise: 本地IDC
// example: public
CloudEnv string `json:"cloud_env"`
// 云账号项目名称
// example: system
Tenant string `json:"tenant"`
// 弹性公网Ip数量
// example: 2
EipCount int `json:"eip_count,allowempty"`
// 虚拟私有网络数量
// example: 4
VpcCount int `json:"vpc_count,allowempty"`
// 云盘数量
// example: 12
DiskCount int `json:"disk_count,allowempty"`
// 宿主机数量(不计算虚拟机宿主机数量)
// example: 0
HostCount int `json:"host_count,allowempty"`
// 云主机数量
// example: 4
GuestCount int `json:"guest_count,allowempty"`
// 块存储数量
// example: 12
StorageCount int `json:"storage_count,allowempty"`
// 子订阅数量
// example: 1
ProviderCount int `json:"provider_count,allowempty"`
// 路由表数量
// example: 0
RoutetableCount int `json:"routetable_count,allowempty"`
// 存储缓存数量
// example: 10
StoragecacheCount int `json:"storagecache_count,allowempty"`
}

View File

@@ -14,85 +14,271 @@
package compute
type CloudproviderDetails struct {
Provider string `json:"provider,omitempty"`
Brand string `json:"brand,omitempty"`
Account string `json:"account,omitempty"`
AccountId string `json:"account_id,omitempty"`
Manager string `json:"manager,omitempty"`
ManagerId string `json:"manager_id,omitempty"`
ManagerProject string `json:"manager_project,omitempty"`
import (
"yunion.io/x/pkg/utils"
"yunion.io/x/onecloud/pkg/apis"
"yunion.io/x/onecloud/pkg/cloudprovider"
)
type CloudproviderInfo struct {
// 云平台
// example: Google
Provider string `json:"provider,omitempty"`
// 云平台品牌
// example: Google
Brand string `json:"brand,omitempty"`
// 云账号名称
// example: google-account
Account string `json:"account,omitempty"`
// 云账号Id
// example: 4d3c8979-9dd0-439b-8d78-36fe1ab1666c
AccountId string `json:"account_id,omitempty"`
// 子订阅名称
// example: google-account
Manager string `json:"manager,omitempty"`
// 子订阅Id
// example: fa4aaf88-aed8-422d-84e7-56dea533b364
ManagerId string `json:"manager_id,omitempty"`
// 子订阅所在项目名称
// example: system
ManagerProject string `json:"manager_project,omitempty"`
// 子订阅所在项目Id
// example: 4d3c8979-9dd0-439b-8d78-36fe1ab1666c
ManagerProjectId string `json:"manager_project_id,omitempty"`
ManagerDomain string `json:"manager_domain,omitempty"`
ManagerDomainId string `json:"manager_domain_id,omitempty"`
Region string `json:"region,omitempty"`
RegionId string `json:"region_id,omitempty"`
CloudregionId string `json:"cloudregion_id,omitempty"`
// 子订阅所在域名称
// example: Default
ManagerDomain string `json:"manager_domain,omitempty"`
// 子订阅所在域Id
// example: default
ManagerDomainId string `json:"manager_domain_id,omitempty"`
// 区域名称
// example: 腾讯云 华南地区(广州)
Region string `json:"region,omitempty"`
// 区域Id
// example: 6151c89b-77f2-4d43-8ef9-cd03d604a16b
RegionId string `json:"region_id,omitempty"`
// 区域Id
// example: 6151c89b-77f2-4d43-8ef9-cd03d604a16b
CloudregionId string `json:"cloudregion_id,omitempty"`
// 区域外部Id
// Qcloud/ap-guangzhou
RegionExternalId string `json:"region_external_id,omitempty"`
RegionExtId string `json:"region_ext_id,omitempty"`
Zone string `json:"zone,omitempty"`
ZoneId string `json:"zone_id,omitempty"`
ZoneExtId string `json:"zone_ext_id,omitempty"`
CloudEnv string `json:"cloud_env,omitempty"`
// 区域外部Id(不携带平台信息)
// example: ap-guangzhou
RegionExtId string `json:"region_ext_id,omitempty"`
// 可用区名称
// example: 腾讯云 广州四区
Zone string `json:"zone,omitempty"`
// 可用区Id
// example: 336ac6d2-b80d-43bb-86d5-1ebf474da8d4
ZoneId string `json:"zone_id,omitempty"`
// 可用区外部Id
// example: ap-guangzhou-4
ZoneExtId string `json:"zone_ext_id,omitempty"`
// 云环境
// example: public
CloudEnv string `json:"cloud_env,omitempty"`
}
type CloudaccountListInput struct {
// List objects belonging to the cloud provider
Cloudprovider string `json:"cloudprovider"`
type CloudproviderDetails struct {
apis.StandaloneResourceDetails
SCloudprovider
// List objects belonging to the cloud provider
// deprecate:true
// description: this param will be deprecate at 3.0
Manager string `json:"manager"`
// deprecate:true
// description: this param will be deprecate at 3.0
ManagerId string `json:"manager_id"`
// deprecate:true
// description: this param will be deprecate at 3.0
CloudproviderId string `json:"cloudprovider_id"`
// List objects belonging to the cloud account
// 云账号名称
// example: google-account
Cloudaccount string `json:"cloudaccount"`
// deprecate:true
// description: this param will be deprecate at 3.0
CloudaccountId string `json:"cloudaccount_id"`
// deprecate:true
// description: this param will be deprecate at 3.0
Account string `json:"account"`
// deprecate:true
// description: this param will be deprecate at 3.0
AccountId string `json:"account_id"`
// 子订阅同步状态
SyncStatus2 string `json:"sync_status2"`
// 支持服务列表
Capabilities []string `json:"capabilities"`
// List objects from the providers, choices:"OneCloud|VMware|Aliyun|Qcloud|Azure|Aws|Huawei|OpenStack|Ucloud|ZStack|Google"
Providers []string `json:"provider"`
// 云主机数量
// example: 1
GuestCount int `json:"guest_count"`
// 宿主机数量
// example: 2
HostCount int `json:"host_count"`
// 虚拟私有网络数量
// example: 4
VpcCount int `json:"vpc_count"`
// 块存储梳理
// example: 4
StorageCount int `json:"storage_count"`
// 存储缓存数量
// example: 1
StorageCacheCount int `json:"storagecache_count"`
// 弹性公网IP数量
// example: 12
EipCount int `json:"eip_count"`
// 快照数量
// example: 0
SnapshotCount int `json:"snapshot_count"`
// 负载均衡器数量
// example: 2
LoadbalancerCount int `json:"loadbalancer_count"`
// 项目数量
ProjectCount int `json:"project_count"`
// 同步区域数量
SyncRegionCount int `json:"sync_region_count"`
// List objects belonging to brands
Brands []string `json:"brand"`
// 子订阅品牌信息
Brand string `json:"brand"`
}
type CloudTypeListInput struct {
// enum: public_cloud,private_cloud,on_premise
type ManagedResourceListInput struct {
// 列出关联指定云订阅(ID或Name)的资源
Cloudprovider string `json:"cloudprovider"`
// List objects belonging to the cloud provider
// swagger:ignore
// Deprecated
// description: this param will be deprecate at 3.0
Manager string `json:"manager" deprecated-by:"cloudprovider"`
// swagger:ignore
// Deprecated
// description: this param will be deprecate at 3.0
ManagerId string `json:"manager_id" deprecated-by:"cloudprovider"`
// swagger:ignore
// Deprecated
// description: this param will be deprecate at 3.0
CloudproviderId string `json:"cloudprovider_id" deprecated-by:"cloudprovider"`
// 列出关联指定云账号(ID或Name)的资源
Cloudaccount string `json:"cloudaccount"`
// swagger:ignore
// Deprecated
// description: this param will be deprecate at 3.0
CloudaccountId string `json:"cloudaccount_id" deprecated-by:"cloudaccount"`
// swagger:ignore
// Deprecated
// description: this param will be deprecate at 3.0
Account string `json:"account" deprecated-by:"cloudaccount"`
// swagger:ignore
// Deprecated
// description: this param will be deprecate at 3.0
AccountId string `json:"account_id" deprecated-by:"cloudaccount"`
// 列出指定云平台的资源,支持的云平台如下
//
// | Provider | 开始支持版本 | 平台 |
// |-----------|------------|-------------------------------------|
// | OneCloud | 0.0 | OneCloud内置私有云包括KVM和裸金属管理 |
// | VMware | 1.2 | VMware vCenter |
// | OpenStack | 2.6 | OpenStack M版本以上私有云 |
// | ZStack | 2.10 | ZStack私有云 |
// | Aliyun | 2.0 | 阿里云 |
// | Aws | 2.3 | Amazon AWS |
// | Azure | 2.2 | Microsoft Azure |
// | Google | 2.13 | Google Cloud Platform |
// | Qcloud | 2.3 | 腾讯云 |
// | Huawei | 2.5 | 华为公有云 |
// | Ucloud | 2.7 | UCLOUD |
// | Ctyun | 2.13 | 天翼云 |
// | S3 | 2.11 | 通用s3对象存储 |
// | Ceph | 2.11 | Ceph对象存储 |
// | Xsky | 2.11 | XSKY启明星辰Ceph对象存储 |
//
// enum: OneCloud,VMware,Aliyun,Qcloud,Azure,Aws,Huawei,OpenStack,Ucloud,ZStack,Google,Ctyun,S3,Ceph,Xsky"
Providers []string `json:"providers"`
// swagger:ignore
// Deprecated
Provider []string `json:"provider" deprecated-by:"providers"`
// 列出指定云平台品牌的资源一般来说brand和provider相同除了以上支持的provider之外还支持以下band
//
// | Brand | Provider | 说明 |
// |----------|----------|------------|
// | DStack | ZStack | 滴滴云私有云 |
//
Brands []string `json:"brands"`
// swagger:ignore
// Deprecated
Brand []string `json:"brand" deprecated-by:"brands"`
// 列出指定云环境的资源,支持云环境如下:
//
// | CloudEnv | 说明 |
// |-----------|--------|
// | public | 公有云 |
// | private | 私有云 |
// | onpremise | 本地IDC |
//
// enum: public,private,onpremise
CloudEnv string `json:"cloud_env"`
// deprecate:true
// swagger:ignore
// Deprecated
// description: this param will be deprecate at 3.0
PublicCloud bool `json:"public_cloud"`
// deprecate:true
// swagger:ignore
// Deprecated
// description: this param will be deprecate at 3.0
IsPublic bool `json:"is_public"`
// deprecate:true
// swagger:ignore
// Deprecated
// description: this param will be deprecate at 3.0
PrivateCloud bool `json:"private_cloud"`
// deprecate:true
// swagger:ignore
// Deprecated
// description: this param will be deprecate at 3.0
IsPrivate bool `json:"is_private"`
// deprecate:true
// swagger:ignore
// Deprecated
// description: this param will be deprecate at 3.0
IsOnPremise bool `json:"is_on_premise"`
// List objects managed by external providers
// 过滤资源是否为非OneCloud内置私有云管理的资源
// default: false
IsManaged bool `json:"is_managed"`
}
func (input *ManagedResourceListInput) AfterUnmarshal() {
if len(input.CloudEnv) > 0 {
return
}
if input.PublicCloud || input.IsPublic {
input.CloudEnv = CLOUD_ENV_PUBLIC_CLOUD
} else if input.PrivateCloud || input.IsPrivate {
input.CloudEnv = CLOUD_ENV_PRIVATE_CLOUD
} else if input.IsOnPremise {
input.CloudEnv = CLOUD_ENV_ON_PREMISE
}
}
type CapabilityListInput struct {
// 根据该云平台的功能对云账号或云订阅进行过滤
Capability []string `json:"capability"`
// swagger:ignore
// Deprecated
// filter by HasObjectStorage
HasObjectStorage *bool `json:"has_object_storage"`
}
type CloudproviderListInput struct {
apis.EnabledStatusStandaloneResourceListInput
ManagedResourceListInput
UsableResourceListInput
CapabilityListInput
}
func (input *CapabilityListInput) AfterUnmarshal() {
if input.HasObjectStorage != nil && *input.HasObjectStorage && !utils.IsInStringArray(cloudprovider.CLOUD_CAPABILITY_OBJECTSTORE, input.Capability) {
input.Capability = append(input.Capability, cloudprovider.CLOUD_CAPABILITY_OBJECTSTORE)
}
}

View File

@@ -0,0 +1,41 @@
// Copyright 2019 Yunion
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package compute
import "yunion.io/x/onecloud/pkg/apis"
type CloudproviderregionDetails struct {
apis.JoinModelBaseDetails
Cloudprovider string
Cloudregion string
// 云账号Id
// example: fa4aaf88-aed8-422d-84e7-56dea533b364
CloudaccountId string `json:"cloudaccount_id"`
// 云账号名称
// example: googl-account
Cloudaccount string `json:"cloudaccount"`
// 云账号所在域Id
// example: 0df40413-eb69-49c7-895e-618ddeb80f55
CloudaccountDomainId string `json:"cloudaccount_domain_id"`
// 是否开启自动同步
// example: false
EnableAutoSync bool `json:"enable_auto_sync"`
// 自动同步周期
// example: 300
SyncIntervalSeconds int `json:"sync_interval_seconds"`
}

View File

@@ -0,0 +1,56 @@
// Copyright 2019 Yunion
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package compute
import "yunion.io/x/onecloud/pkg/apis"
type CloudregionDetails struct {
apis.StandaloneResourceDetails
SCloudregion
// 虚拟私有网络数量
// example: 2
VpcCount int `json:"vpc_count,allowempty"`
// 可用区数量
// example: 3
ZoneCount int `json:"zone_count,allowempty"`
// 云主机梳理
// example: 2
GuestCount int `json:"guest_count,allowempty"`
// IP子网数量
// example: 12
NetworkCount int `json:"network_count,allowempty"`
// 距离前天0点新增云主机数量
// example: 0
GuestIncrementCount int `json:"guest_increment_count,allowempty"`
}
type CloudregionInfo struct {
// 区域的名称
// example: Default
Region string `json:"region"`
// 区域的Id
// example: default
RegionId string `json:"region_id"`
// 纳管云区域的组合Id(平台+Id)
// example: ZStack/59e7bc87-a6b3-4c39-8f02-c68e8243d4e4
RegionExternalId string `json:"region_external_id"`
// 纳管云区域的Id
// example: 59e7bc87-a6b3-4c39-8f02-c68e8243d4e4
RegionExtId string `json:"region_ext_id"`
}

View File

@@ -36,6 +36,7 @@ const (
CITY_TAIPEI = "Taipei" //台北市
CITY_KAOHSIUNG = "Kaohsiung" //高雄市
CITY_CHENG_DU = "Chengdu" //成都
CITY_HE_YUAN = "HeYuan" //河源
CITY_CHONG_QING = "Chongqing" //重庆
CITY_LAN_ZHOU = "Lanzhou" //兰州
CITY_TAI_YUAN = "Taiyuan" //太原
@@ -76,6 +77,11 @@ const (
//瑞士
CITY_ZURICH = "Zurich" //苏黎世
CITY_GENEVA = "Geneva" //日内瓦
// 挪威
CITY_STAVANGER = "Stavanger" //斯塔万格
CITY_OSLO = "Oslo" // 奥斯陆
// 马来西亚
CITY_KUALA_LUMPUR = "Kuala Lumpur" //吉隆坡
@@ -104,6 +110,7 @@ const (
CITY_IOWA = "Iowa" //爱荷华
CITY_US_GOV_WEST = "us-gov-west" //???
CITY_SOUTH_CAROLINA = "South Carolina" //南卡罗来纳州
CITY_SALT_LAKE_CITY = "Salt Lake City" //盐湖城
// 英国
CITY_LONDON = "London" //伦敦
@@ -114,7 +121,8 @@ const (
CITY_DUBAI = "Dubai" //迪拜
// 德国
CITY_FRANKFURT = "Frankfurt" //法兰克福
CITY_FRANKFURT = "Frankfurt" // 法兰克福
CITY_DELMENHORST = "Delmenhorst" // 代尔门霍斯特
// 韩国
CITY_SEOUL = "Seoul" //首尔
@@ -185,4 +193,5 @@ const (
COUNTRY_CODE_NG = "NG" //尼日利亚
COUNTRY_CODE_VN = "VN" //越南
COUNTRY_CODE_CH = "CH" //瑞士
COUNTRY_CODE_NO = "NO" //挪威
)

View File

@@ -16,38 +16,131 @@ package compute
import "yunion.io/x/onecloud/pkg/apis"
type SDBInstanceCreateInput struct {
apis.Meta
type DBInstanceCreateInput struct {
apis.VirtualResourceCreateInput
DeletePreventableCreateInput
Name string
Description string
DisableDelete *bool
NetworkId string
Address string
MasterInstanceId string
SecgroupId string
Zone1 string
Zone2 string
Zone3 string
ZoneId string
CloudregionId string
Cloudregion string
VpcId string
ManagerId string
// Ip子网名称或Id,建议使用Id
// required: true
Network string `json:"network"`
// swagger:ignore
NetworkId string
// Ip子网内的地址,不填则按照ip子网的地址分配策略分配一个ip
// required: false
Address string `json:"address"`
// rds实例名称或Id,建议使用Id
// 创建只读实例时此参数必传
MasterInstance string `json:"master_instance"`
// swagger:ignore
MasterInstanceId string
// 安全组名称或Id
// default: default
Secgroup string `json:"secgroup"`
// swagger:ignore
SecgroupId string
// 主可用区名称或Id, 此参数从指定的套餐所在的可用区获取
Zone1 string `json:"zone1"`
// 次可用区名称或Id, 此参数从指定的套餐所在的可用区获取
Zone2 string `json:"zone2"`
// 三节点可用区名称或Id,, 此参数从指定的套餐所在的可用区获取
Zone3 string `json:"zone3"`
// swagger:ignore
ZoneId string
// 区域名称或Id建议使用Id
// swagger:ignore
Cloudregion string `json:"cloudregion"`
// swagger:ignore
CloudregionId string
// swagger:ignore
VpcId string
// swagger:ignore
ManagerId string
// swagger:ignore
NetworkExternalId string
BillingType string
BillingCycle string
InstanceType string
Engine string
EngineVersion string
Category string
StorageType string
DiskSizeGB int
Password string
VcpuCount int
VmemSizeMb int
Provider string
// 包年包月时间周期
Duration string `json:"duration"`
// swagger:ignore
BillingType string
// swagger:ignore
BillingCycle string
// 套餐名称, 若此参数不填, 则必须有vmem_size_mb及vcpu_count参数
// 套餐列表可以通过 dbinstancesku 获取
InstanceType string `json:"instance_type"`
// rds引擎
// enum: MySQL, SQLServer, PostgreSQL, MariaDB, Oracle, PPAS
// required: true
Engine string `json:"engine"`
// rds引擎版本
// 根据各个引擎版本各不相同
// required: true
EngineVersion string `json:"engine_version"`
// rds类型
//
//
//
// | 平台 | 支持类型 |
// | ----- | ------ |
// | 华为云 |ha, single, replica|
// | 阿里云 |basic, high_availability, always_on, finance|
// 翻译:
// basic: 基础版
// high_availability: 高可用
// always_on: 集群版
// finance: 金融版, 三节点
// ha: 高可用
// single: 单机
// replica: 只读
// required: true
Category string `json:"category"`
// rds存储类型
//
//
//
// | 平台 | 支持类型 |
// | 华为云 |SSD, SAS, SATA|
// | 阿里云 |local_ssd, cloud_essd, cloud_ssd|
// required: true
StorageType string `json:"storage_type"`
// rds存储大小
// 可参考rds套餐的大小范围和步长情况
// required: true
DiskSizeGB int `json:"disk_size_gb"`
// rds初始化密码
// 阿里云不需要此参数
// 华为云会默认创建一个用户,若不传此参数, 则为随机密码
Password string `json:"password"`
// rds实例cpu大小
// 若指定实例套餐,此参数将根据套餐设置
VcpuCount int `json:"vcpu_count"`
// rds实例内存大小
// 若指定实例套餐,此参数将根据套餐设置
VmemSizeMb int `json:"vmem_size_mb"`
// swagger:ignore
Provider string
}
type SDBInstanceChangeConfigInput struct {
@@ -66,5 +159,79 @@ type SDBInstanceRecoveryConfigInput struct {
DBInstancebackup string
DBInstancebackupId string `json:"dbinstancebackup_id"`
Databases map[string]string `json:"allowempty"`
Databases map[string]string `json:"databases,allowempty"`
}
type DBInstanceListInput struct {
apis.VirtualResourceListInput
ZonalFilterListInput
ManagedResourceListInput
VpcFilterListInput
}
type DBInstanceBackupListInput struct {
apis.VirtualResourceListInput
ManagedResourceListInput
RegionalFilterListInput
DbinstanceFilterListInput
}
type DBInstancePrivilegeListInput struct {
apis.ResourceBaseListInput
// filter by dbinstanceaccount
Dbinstanceaccount string `json:"dbinstanceaccount"`
// filter by dbinstancedatabase
Dbinstancedatabase string `json:"dbinstancedatabase"`
}
type DBInstanceParameterListInput struct {
apis.StandaloneResourceListInput
DbinstanceFilterListInput
}
type DBInstanceDatabaseListInput struct {
apis.StatusStandaloneResourceListInput
DbinstanceFilterListInput
}
type DBInstanceAccountListInput struct {
apis.StatusStandaloneResourceListInput
DbinstanceFilterListInput
}
type DbinstanceFilterListInput struct {
// filter by dbinstance
Dbinstance string `json:"dbinstance"`
// swagger:ignore
// Deprecated
// filter by dbinstance_id
DbinstanceId string `json:"dbinstance_id" deprecated-by:"dbinstance"`
}
type DBInstanceDetails struct {
apis.VirtualResourceDetails
SDBInstance
CloudproviderInfo
// 虚拟私有网络名称
// example: test-vpc
Vpc string `json:"vpc"`
// 安全组名称
// example: Default
Secgroup string `json:"secgroup"`
// iops
// example: 0
Iops int `json:"iops"`
// IP子网名称
// example: test-network
Network string `json:"network"`
// 标签信息
Metadata map[string]string `json:"metadata"`
}

View File

@@ -17,21 +17,72 @@ package compute
import "yunion.io/x/onecloud/pkg/apis"
type SDBInstanceAccountPrivilege struct {
Database string
// 数据库名称或Id
// required: true
Database string `json:"database"`
// swagger:ignore
DBInstancedatabaseId string
Privilege string
// 权限类型
//
//
//
// | 平台 |Rds引擎 | 支持类型 |
// | ---- |------- | -------- |
// | Aliyun |MySQL, MariaBD | rw, r, ddl, dml |
// | Aliyun |SQLServer | rw, r, owner |
// | Huawei |MySQL, MariaDB | rw, r |
// 同一平台不同的rds类型支持的权限不尽相同
// required: true
Privilege string `json:"privilege"`
}
type SDBInstanceAccountCreateInput struct {
apis.Meta
type DBInstanceAccountCreateInput struct {
apis.StatusStandaloneResourceCreateInput
// rds实例名称或Id,建议使用Id
//
//
//
// | 平台 |支持Rds引擎 |
// | ---- |------- |
// | Aliyun |MySQL, MariaBD, SQLServer |
// | 华为云 |MySQL, MariaBD |
// required: true
// 阿里云SQL Server 2017集群版不支持创建账号
// 实例状态必须是运行中
DBInstance string `json:"dbinstance"`
// swagger:ignore
DBInstanceId string `json:"dbinstance_id"`
Name string
Description string
Password string
Privileges []SDBInstanceAccountPrivilege
// 账号密码,若不指定,则会随机生成
// required: false
Password string `json:"password"`
// 账号权限
// required: false
Privileges []SDBInstanceAccountPrivilege `json:"privileges"`
}
type SDBInstanceSetPrivilegesInput struct {
Privileges []SDBInstanceAccountPrivilege
Privileges []SDBInstanceAccountPrivilege `json:"privileges"`
}
type DBInstancePrivilege struct {
// 数据库名称
Database string
// 账号名称
Account string
// 数据库Id
DBInstancedatabaseId string
// 权限
Privileges string
}
type DBInstanceAccountDetails struct {
apis.StandaloneResourceDetails
SDBInstanceAccount
// 账号权限列表
DBInstanceprivileges []DBInstancePrivilege `json:"dbinstanceprivileges,allowempty"`
}

View File

@@ -16,17 +16,39 @@ package compute
import "yunion.io/x/onecloud/pkg/apis"
type SDBInstanceBackupCreateInput struct {
apis.Meta
type DBInstanceBackupCreateInput struct {
apis.VirtualResourceCreateInput
DBInstanceId string `json:"dbinstance_id"`
Name string
Description string
DBNames string
Databases []string
Engine string
// Rds实例名称或Id, 建议使用Id
// required: true
DBInstance string `json:"dbinstance"`
// swagger:ignore
DBInstanceId string `json:"dbinstance_id"`
// 需要备份的Rds数据库列表
// required: false
Databases []string `json:"databases"`
// swagger:ignore
DBNames string
// swagger:ignore
Engine string
// swagger:ignore
EngineVersion string
// swagger:ignore
CloudregionId string
BackupMode string
ManagerId string
// swagger:ignore
BackupMode string
// swagger:ignore
ManagerId string
}
type DBInstanceBackupDetails struct {
apis.VirtualResourceDetails
SDBInstanceBackup
// RDS实例名称
DBInstance string `json:"dbinstance"`
CloudproviderInfo
}

View File

@@ -17,18 +17,54 @@ package compute
import "yunion.io/x/onecloud/pkg/apis"
type SDBInstanceDatabasePrivilege struct {
Account string
// 数据库账号名称或Id
// required: true
Account string `json:"account"`
// swagger:ignore
DBInstanceaccountId string
Privilege string
// 权限
// | 平台 |Rds引擎 | 支持类型 |
// | ---- |------- | -------- |
// | Aliyun |MySQL, MariaBD | rw, r, ddl, dml |
// | Aliyun |SQLServer | rw, r, owner |
// | Huawei |MySQL, MariaDB | rw, r |
// 同一平台不同的rds类型支持的权限不尽相同
// required: true
Privilege string `json:"privilege"`
}
type SDBInstanceDatabaseCreateInput struct {
apis.Meta
type DBInstanceDatabaseCreateInput struct {
apis.StatusStandaloneResourceCreateInput
DBInstanceId string `json:"dbinstance_id"`
CharacterSet string
Name string
Description string
Accounts []SDBInstanceDatabasePrivilege
DBInstanceaccountId string
// rds实例名称或Id,建议使用Id
//
//
//
// | 平台 |支持Rds引擎 |
// | ---- |------- |
// | Aliyun |MySQL, MariaBD, SQLServer |
// | 华为云 |MySQL, MariaBD |
// required: true
// 阿里云SQL Server 2017集群版不支持创建数据库
// 阿里云只读实例不支持创建数据库
// 实例状态必须是运行中
DBInstance string `json:"dbinstance"`
// swagger:ignore
DBInstanceId string `json:"dbinstance_id"`
// 数据库字符集
// required: true
CharacterSet string `json:"character_set"`
// 赋予账号权限
// required: false
Accounts []SDBInstanceDatabasePrivilege `json:"accounts"`
}
type DBInstancedatabaseDetails struct {
apis.StandaloneResourceDetails
SDBInstanceDatabase
// 数据库权限
DBInstanceprivileges []DBInstancePrivilege `json:"dbinstanceprivileges"`
}

View File

@@ -15,6 +15,8 @@
package compute
import (
"time"
"yunion.io/x/onecloud/pkg/apis"
)
@@ -23,15 +25,25 @@ type DiskCreateInput struct {
*DiskConfig
// prefer options
// 此参数仅适用于未指定storage时进行调度到指定区域创建磁盘
// required: false
PreferRegion string `json:"prefer_region_id"`
PreferZone string `json:"prefer_zone_id"`
PreferWire string `json:"prefer_wire_id"`
PreferHost string `json:"prefer_host_id"`
// 此参数仅适用于未指定storage时进行调度到指定可用区区创建磁盘
// required: false
PreferZone string `json:"prefer_zone_id"`
// swagger:ignore
PreferWire string `json:"prefer_wire_id"`
// 此参数仅适用于未指定storage时进行调度到指定可用区区创建磁盘
// required: false
PreferHost string `json:"prefer_host_id"`
// 此参数仅适用于未指定storage时进行调度到指定平台创建磁盘
// default: kvm
// enum: kvm, openstack, esxi, aliyun, aws, qcloud, azure, huawei, openstack, ucloud, zstack google, ctyun
Hypervisor string `json:"hypervisor"`
// Project string `json:"project"`
// Domain string `json:"domain_id"`
}
// ToServerCreateInput used by disk schedule
@@ -70,3 +82,99 @@ func (req *ServerCreateInput) ToDiskCreateInput() *DiskCreateInput {
input.Domain = req.Domain
return &input
}
type SnapshotPolicyFilterListInput struct {
// filter disk by snapshotpolicy
Snapshotpolicy string `json:"snapshotpolicy"`
// swagger:ignore
// Deprecated
// filter disk by snapshotpolicy_id
SnapshotpolicyId string `json:"snapshotpolicy_id" deprecated-by:"snapshotpolicy"`
}
type DiskListInput struct {
apis.VirtualResourceListInput
ManagedResourceListInput
BillingFilterListInput
StorageFilterListInput
StorageShareFilterListInput
SnapshotPolicyFilterListInput
ServerFilterListInput
// filter disk by whether it is being used
Unused *bool `json:"unused"`
// swagger:ignore
// Deprecated
// filter by disk type
Type string `json:"type" deprecated-by:"disk_type"`
// 过滤指定disk_type的磁盘列表可能的值为sys, data, swap. volume
//
// | disk_type值 | 说明 |
// |-------------|----------|
// | sys | 虚拟机系统盘 |
// | data | 虚拟机数据盘 |
// | swap | 虚拟机内存交换盘 |
// | volume | 容器volumn盘 |
//
DiskType string `json:"disk_type"`
}
type DiskFilterListInput struct {
// 以指定虚拟磁盘ID或Name过滤列表结果
Disk string `json:"disk"`
// swagger:ignore
// Deprecated
// filter by disk_id
DiskId string `json:"disk_id" deprecated-by:"disk"`
}
type SimpleGuest struct {
Name string `json:"name"`
Id string `json:"id"`
Status string `json:"status"`
}
type SimpleSnapshotPolicy struct {
RepeatWeekdays []int `json:"repeat_weekdays"`
TimePoints []int `json:"time_points"`
}
type DiskDetails struct {
apis.VirtualResourceDetails
SDisk
CloudproviderInfo
// 云平台
Provider string `json:"provider"`
// 存储名称
Storage string `json:"storage"`
// 存储类型
StorageType string `json:"storage_type"`
// 介质类型
MediumType string `json:"medium_type"`
// 所挂载的虚拟机
Guests []SimpleGuest `json:"guests"`
// 所挂载的虚拟机
Guest string `json:"guest"`
// 所挂载虚拟机的数量
GuestCount int `json:"guest_count"`
// 所挂载虚拟机状态
GuestStatus string `json:"guest_status"`
// 自动清理时间
AutoDeleteAt time.Time `json:"auto_delete_at"`
// 自动快照策略状态
SnapshotpolicyStatus string `json:"snapshotpolicy_status,allowempty"`
// 自动快照策略
Snapshotpolicies []SimpleSnapshotPolicy `json:"snapshotpolicies"`
// 手动快照数量
ManualSnapshotCount int `json:"manual_snapshot_count"`
// 最多可创建手动快照数量
MaxManualSnapshotCount int `json:"max_manual_snapshot_count"`
}

View File

@@ -0,0 +1,25 @@
// Copyright 2019 Yunion
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package compute
import "yunion.io/x/onecloud/pkg/apis"
type DynamicschedtagDetails struct {
apis.StandaloneResourceDetails
SDynamicschedtag
Schedtag string `json:"schedtag"`
ResourceType string `json:"resource_type"`
}

View File

@@ -12,23 +12,19 @@
// See the License for the specific language governing permissions and
// limitations under the License.
package apis
package compute
type StandaloneResourceShortDescDetail struct {
ModelBaseShortDescDetail
import "yunion.io/x/onecloud/pkg/apis"
Id string `json:"id"`
Name string `json:"name"`
}
type STag struct {
Key string
Value string
}
type StandaloneResourceListInput struct {
ModelBaseListInput
Tags []STag `json:"tags"`
WithoutUserMeta bool `json:"without_user_meta"`
type ElasticcacheDetails struct {
apis.VirtualResourceDetails
SElasticcache
CloudproviderInfo
// 虚拟私有网络名称
Vpc string `json:"vpc"`
// IP子网名称
Network string `json:"network"`
}

View File

@@ -14,6 +14,10 @@
package compute
import (
"yunion.io/x/onecloud/pkg/apis"
)
const (
ELASTIC_CACHE_STATUS_RUNNING = "running" //(正常)
ELASTIC_CACHE_STATUS_RESTARTING = "restarting" //(重启中)
@@ -102,3 +106,28 @@ const (
ELASTIC_CACHE_ARCH_TYPE_CLUSTER = "cluster" // 集群
ELASTIC_CACHE_ARCH_TYPE_RWSPLIT = "rwsplit" // 读写分离
)
type ElasticcacheListInput struct {
apis.VirtualResourceListInput
ZonalFilterListInput
VpcFilterListInput
ManagedResourceListInput
}
type ElasticcacheAccountListInput struct {
apis.StatusStandaloneResourceListInput
}
type ElasticcacheAclListInput struct {
apis.StandaloneResourceListInput
}
type ElasticcacheBackupListInput struct {
apis.StatusStandaloneResourceListInput
}
type ElasticcacheParameterListInput struct {
apis.StandaloneResourceListInput
}

View File

@@ -0,0 +1,29 @@
// Copyright 2019 Yunion
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package compute
import "yunion.io/x/onecloud/pkg/apis"
type ElasticcacheBackupDetails struct {
apis.StandaloneResourceDetails
SElasticcacheBackup
CloudproviderInfo
// 引擎
Engine string `json:"engine"`
// 引擎版本
EngineVersion string `json:"engine_version"`
}

View File

@@ -0,0 +1,22 @@
// Copyright 2019 Yunion
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package compute
import "yunion.io/x/onecloud/pkg/apis"
type ElasticcacheSkuDetails struct {
apis.StandaloneResourceDetails
SElasticcacheSku
}

View File

@@ -0,0 +1,79 @@
// Copyright 2019 Yunion
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package compute
import "yunion.io/x/onecloud/pkg/apis"
type SElasticipCreateInput struct {
apis.VirtualResourceCreateInput
// 区域名称或Id, 建议使用Id
// 在指定区域内创建弹性公网ip
Cloudregion string `json:"cloudregion"`
// swagger:ignore
Region string
// swagger:ignore
RegionId string
// swagger:ignore
CloudregionId string
// 子订阅Id, 建议使用Id
// 使用指定子订阅创建弹性公网ip
// 弹性公网ip和虚拟机在同一区域同一子订阅底下才可以进行绑定操作
Cloudprovider string `json:"cloudprovider"`
// swagger:ignore
Manager string
// swagger:ignore
ManagerId string
// 计费类型: 流量或带宽
//
//
//
// | 平台 | 支持类型 |
// | --- | -------- |
// |Aliyun | traffic, bandwidth |
// |腾讯云 | traffic |
// |Azure | traffic |
// |Google | traffic, bandwidth |
// |Ucloud | traffic |
// |Aws | traffic |
// |华为云 | traffic, bandwidth |
// |天翼云 | traffic, bandwidth |
// |KVM | 不支持创建 |
// |VMware | 不支持创建 |
// |ZStack | traffic |
// |OpenStack | traffic |
// default: traffic
// enum: traffic, bandwidth
ChargeType string `json:"charge_type"`
// 子网名称或Id
// 私有云创建此参数必传,例如Openstack, ZStack
Network string `json:"network"`
// swagger:ignore
NetworkId string
}
type ElasticipDetails struct {
apis.VirtualResourceDetails
SElasticip
CloudproviderInfo
// 绑定资源名称
AssociateName string `json:"associate_name"`
}

View File

@@ -14,6 +14,10 @@
package compute
import (
"yunion.io/x/onecloud/pkg/apis"
)
const (
EIP_MODE_INSTANCE_PUBLICIP = "public_ip"
EIP_MODE_STANDALONE_EIP = "elastic_ip"
@@ -48,3 +52,16 @@ const (
var (
EIP_ASSOCIATE_VALID_TYPES = []string{EIP_ASSOCIATE_TYPE_SERVER, EIP_ASSOCIATE_TYPE_NAT_GATEWAY}
)
type ElasticipListInput struct {
apis.VirtualResourceListInput
ManagedResourceListInput
RegionalFilterListInput
UsableResourceListInput
// filter usable eip for given associate type
UsableEipForAssociateType string `json:"usable_eip_for_associate_type"`
// filter usable eip for given associate id
UsableEipForAssociateId string `json:"usable_eip_for_associate_id"`
}

View File

@@ -0,0 +1,26 @@
// Copyright 2019 Yunion
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package compute
import "yunion.io/x/onecloud/pkg/apis"
type ExternalProjectDetails struct {
apis.StandaloneResourceDetails
SExternalProject
CloudproviderInfo
Tenant string `json:"tenant"`
}

View File

@@ -0,0 +1,100 @@
// Copyright 2019 Yunion
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package compute
import (
"yunion.io/x/onecloud/pkg/apis"
)
type RegionalFilterListInput struct {
// 过滤位于指定城市区域的资源
City string `json:"city"`
// 过滤处于指定区域内的资源
Cloudregion string `json:"cloudregion"`
// swagger:ignore
// Deprecated
// description: this param will be deprecate at 3.0
CloudregionId string `json:"cloudregion_id" deprecated-by:"cloudregion"`
// swagger:ignore
// Deprecated
// description: this param will be deprecate at 3.0
Region string `json:"region" deprecated-by:"cloudregion"`
// swagger:ignore
// Deprecated
// description: this param will be deprecate at 3.0
RegionId string `json:"region_id" deprecated-by:"cloudregion"`
}
type ZonalFilterListInput struct {
RegionalFilterListInput
// 过滤处于指定可用区内的资源
Zone string `json:"zone"`
// swagger:ignore
// Deprecated
// filter by zone_id
ZoneId string `json:"zone_id" deprecated-by:"zone"`
// 过滤处于多个指定可用区内的资源
Zones []string `json:"zones"`
}
func (input ZonalFilterListInput) ZoneList() []string {
zoneStr := input.Zone
if len(zoneStr) > 0 {
input.Zones = append(input.Zones, zoneStr)
}
return input.Zones
}
type HostFilterListInput struct {
ZonalFilterListInput
// 过滤关联指定宿主机ID或Name的列表结果
Host string `json:"host"`
// swagger:ignore
// Deprecated
// filter by host_id
HostId string `json:"host_id" deprecated-by:"host"`
}
type CloudregionListInput struct {
apis.EnabledStatusStandaloneResourceListInput
apis.DomainizedResourceListInput
ManagedResourceListInput
UsableResourceListInput
UsableVpcResourceListInput
// 过滤位于指定城市的区域
City string `json:"city"`
// 过滤提供特定服务的区域
Service string `json:"service"`
}
type ZoneListInput struct {
apis.StatusStandaloneResourceListInput
apis.DomainizedResourceListInput
ManagedResourceListInput
RegionalFilterListInput
UsableResourceListInput
UsableVpcResourceListInput
// 过滤提供特定服务的可用区
Service string `json:"service"`
}

View File

@@ -21,3 +21,8 @@ import (
type GlobalVpcCreateInput struct {
apis.EnabledStatusStandaloneResourceCreateInput
}
type GlobalVpcDetails struct {
apis.StandaloneResourceDetails
SGlobalVpc
}

View File

@@ -0,0 +1,29 @@
// Copyright 2019 Yunion
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package compute
import (
"yunion.io/x/onecloud/pkg/apis"
)
type GroupguestDetails struct {
apis.JoinModelBaseDetails
Instancegroup string
Server string
Guest string
SGroupguest
}

View File

@@ -0,0 +1,29 @@
// Copyright 2019 Yunion
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package compute
import (
"yunion.io/x/onecloud/pkg/apis"
)
type GroupnetworkDetails struct {
apis.JoinModelBaseDetails
SGroupnetwork
// 主机组名称
Instancegroup string
// IP子网名称
Network string
}

View File

@@ -150,7 +150,7 @@ const (
HYPERVISOR_DEFAULT = HYPERVISOR_KVM
)
var VM_RUNNING_STATUS = []string{VM_START_START, VM_STARTING, VM_RUNNING, VM_BLOCK_STREAM}
var VM_RUNNING_STATUS = []string{VM_START_START, VM_STARTING, VM_RUNNING, VM_BLOCK_STREAM, VM_BLOCK_STREAM_FAIL}
var VM_CREATING_STATUS = []string{VM_CREATE_NETWORK, VM_CREATE_DISK, VM_START_DEPLOY, VM_DEPLOYING}
var HYPERVISORS = []string{
@@ -229,9 +229,10 @@ var HOSTTYPE_HYPERVISOR = map[string]string{
}
const (
VM_AWS_DEFAULT_LOGIN_USER = "ec2user"
VM_AZURE_DEFAULT_LOGIN_USER = "toor"
VM_ZSTACK_DEFAULT_LOGIN_USER = "root"
VM_AWS_DEFAULT_LOGIN_USER = "ec2user"
VM_AWS_DEFAULT_WINDOWS_LOGIN_USER = "Administrator"
VM_AZURE_DEFAULT_LOGIN_USER = "toor"
VM_ZSTACK_DEFAULT_LOGIN_USER = "root"
VM_METADATA_APP_TAGS = "app_tags"
VM_METADATA_CREATE_PARAMS = "create_params"

View File

@@ -0,0 +1,45 @@
// Copyright 2019 Yunion
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package compute
import "yunion.io/x/onecloud/pkg/apis"
type GuestDiskDetails struct {
apis.JoinModelBaseDetails
SGuestdisk
// 云主机名称
Guest string
// 云主机名称
Server string
// 磁盘名称
Disk string
// 存储类型
// example: local
StorageType string `json:"storage_type"`
// 磁盘大小, 单位Mb
// example: 10240
DiskSize int `json:"disk_size"`
// 磁盘状态
// example: ready
Status string `json:"status"`
// 磁盘类型
// example: data
DiskType string `json:"disk_type"`
// 介质类型
// example: ssd
MediumType string `json:"medium_type"`
}

View File

@@ -0,0 +1,29 @@
// Copyright 2019 Yunion
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package compute
import "yunion.io/x/onecloud/pkg/apis"
type GuestnetworkDetails struct {
apis.JoinModelBaseDetails
SGuestnetwork
// 云主机名称
Guest string
// 云主机名称
Server string
// IP子网名称
Network string
}

View File

@@ -15,56 +15,79 @@
package compute
import (
"time"
"yunion.io/x/jsonutils"
"yunion.io/x/onecloud/pkg/apis"
)
type ServerListInput struct {
apis.BaseListInput
type ServerFilterListInput struct {
// 以关联主机ID或Name过滤列表
Server string `json:"server"`
// swagger:ignore
// Deprecated
// Filter by guest Id
ServerId string `json:"server_id" deprecated-by:"server"`
// swagger:ignore
// Deprecated
// Filter by guest Id
Guest string `json:"guest" deprecated-by:"server"`
// swagger:ignore
// Deprecated
// Filter by guest Id
GuestId string `json:"guest_id" deprecated-by:"server"`
}
// 过滤可用区底下的资源
Zone string `json:"zone"`
// 过滤连接此二层网络的资源
Wire string `json:"wire"`
// 过滤关联此网络的资源
Network string `json:"network"`
// Disk ID or Name
Disk string `json:"disk"`
// Host ID or Name
Host string `json:"host"`
// Show baremetal servers
type ServerListInput struct {
apis.VirtualResourceListInput
ManagedResourceListInput
HostFilterListInput
NetworkFilterListInput
BillingFilterListInput
GroupFilterListInput
SecgroupFilterListInput
DiskFilterListInput
// 只列出裸金属主机
Baremetal *bool `json:"baremetal"`
// Show gpu servers
// 只列出GPU主机
Gpu *bool `json:"gpu"`
// Secgroup ID or Name
Secgroup string `json:"secgroup"`
// AdminSecgroup ID or Name
// 列出管理安全组为指定安全组的主机
AdminSecgroup string `json:"admin_security"`
// Show server of hypervisor choices:"kvm|esxi|container|baremetal|aliyun|azure|aws|huawei|ucloud|zstack|openstack"`
Hypervisor string `json:"hypervisor"`
// Show servers in cloudregion
Region string `json:"region"`
// Show Servers with EIP
// 列出Hypervisor为指定值的主机
// enum: kvm,esxi,baremetal,aliyun,azure,aws,huawei,ucloud,zstack,openstack,google,ctyun"`
Hypervisor []string `json:"hypervisor"`
// 列出绑定了弹性IPEIP的主机
WithEip *bool `json:"with_eip"`
// Show Servers without EIP
// 列出未绑定弹性IPEIO的主机
WithoutEip *bool `json:"without_eip"`
// OS Type choices:"linux|windows|vmware"`
// 列出操作系统为指定值的主机
// enum: linux,windows,vmware
OsType string `json:"os_type"`
// Order by disk size choices:"asc|desc"
// 对列表结果按照磁盘进行排序
// enum: asc,desc
OrderByDisk string `json:"order_by_disk"`
// Order by host name choices:"asc|desc"
// 对主机列表结果按照宿主机名称进行排序
// enum: asc,desc
OrderByHost string `json:"order_by_host"`
// Vpc id or name
Vpc string `json:"vpc"`
// Eip id or name
// 列出可以挂载指定EIP的主机
UsableServerForEip string `json:"usable_server_for_eip"`
// Show Servers without user metadata
WithoutUserMeta *bool `json:"without_user_meta"`
// Instance Group ID or Name
Group string `json:"group"`
// Resource type choices:"shared|prepaid|dedicated"
// 按主机资源类型进行排序
// enum: shared,prepaid,dedicated
ResourceType string `json:"resource_type"`
// Billing type choices:"postpaid|prepaid"
BillingType string `json:"billing_type"`
// 返回开启主备机功能的主机
GetBackupGuestsOnHost *bool `json:"get_backup_guests_on_host"`
// 根据宿主机 SN 过滤
HostSn string `json:"host_sn"`
}
func (input *ServerListInput) AfterUnmarshal() {
if input.Baremetal != nil && *input.Baremetal {
input.Hypervisor = append(input.Hypervisor, HYPERVISOR_BAREMETAL)
}
}
type ServerRebuildRootInput struct {
@@ -106,3 +129,51 @@ func (i ServerRebuildRootInput) GetKeypairName() string {
type ServerResumeInput struct {
apis.Meta
}
type ServerDetails struct {
apis.VirtualResourceDetails
SGuest
CloudproviderInfo
// details
// 网络概要
Networks string `json:"networks"`
// 磁盘概要
Disks string `json:"disks"`
// 磁盘详情
DisksInfo *jsonutils.JSONArray `json:"disks_info"`
// 虚拟机Ip列表
VirtualIps string `json:"virtual_ips"`
// 安全组规则
SecurityRules string `json:"security_rules"`
// 操作系统名称
OsName string `json:"os_name"`
// 操作系统类型
OsType string `json:"os_type"`
// 系统管理员可见的安全组规则
AdminSecurityRules string `json:"admin_security_rules"`
// list
AttachTime time.Time `attach_time`
// common
IsPrepaidRecycle bool `json:"is_prepaid_recycle"`
// 备机所在宿主机名称
BackupHostName string `json:"backup_host_name"`
// 北京所在宿主机状态
BackupHostStatus string `json:"backup_host_status"`
// 宿主机名称
Host string `json:"host"`
// 宿主机SN
HostSN string `json:"host_sn"`
CanRecycle bool `json:"can_recycle"`
// 自动释放时间
AutoDeleteAt time.Time `json:"auto_delete_at"`
// 标签
Metadata map[string]string `json:"metadata"`
// 磁盘数量
DiskCount int `json:"disk_count"`
// 是否支持ISO启动
CdromSupport bool `json:"cdrom_support"`
}

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