Compare commits

..

919 Commits

Author SHA1 Message Date
Zexi Li
f366a063c7 feat(host,monitor): add Kunlunxin xpu-smi telegraf monitoring (#25704)
host:
- inject telegraf xpusmi input when a Kunlunxin device is present,
  using bin_path (xpu-smi) plus lib_path resolved from xre home
- add resolveKunlunxinXpuLibDir with so/lib64/lib fallback order
- emit [[inputs.xpusmi]] config, skipping empty lib_path

monitor:
- register xpusmi measurement (host/telegraf) with XPU memory,
  utilization, power, clock, PCIe and DRAM ECC metrics
2026-09-20 15:55:05 +08:00
Jian Qiu
472b0ae4af fix: task params nil params panic (#25699)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2026-09-18 11:57:35 +08:00
Zexi Li
d108efd764 fix(baremetal): ignore RetrieveStorages leftover diagnostics when disks match (#25695)
Only fail buildRaid when no disk is selected, matching CalculateLayout behavior.
2026-09-18 11:17:09 +08:00
Zexi Li
1d1aea797c fix(host): mount kunlunxin xpu-smi and ml lib for containers (#25693)
Ensure container runtime mounts xpu-smi and libxpunvidia-ml.so.1
(including symlink targets) so XPU tooling works inside pods.
2026-09-18 10:58:01 +08:00
Jian Qiu
4abe94ca0b fix(mcp-server): read the field tags through the reflectutils accessor (#25690)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2026-09-17 14:15:29 +08:00
Zexi Li
0ea4d1c1ca Automated cherry pick of #25464: feat(host,llm): add Iluvatar GPU container device support (#25688)
* feat(host,llm): add Iluvatar GPU container device support

* feat(host,llm,monitor): add Thead PPU container device support

* feat(host,llm): add Kunlunxin XPU container device support
2026-09-16 11:50:04 +08:00
Zexi Li
07cb45bfac chore: replace issues-helper with gh CLI and refresh README (#25687)
Migrate issue label/close workflows to native gh scripts with explicit permissions, and update README cloud/AI coverage plus typo fixes.
2026-09-15 18:17:48 +08:00
Zexi Li
edcbd48487 feat(glance,region): support container registry and image (#25686)
Move container registry management into glance with import from
kubeserver, add container_image model, resolve container_image_id in
compute, and switch dashboard create flow to glance.
2026-09-15 15:32:27 +08:00
Zexi Li
abab2d4a2f fix(aiproxy): clarify unavailable backend error message (#25682) 2026-09-13 22:31:59 +08:00
Zexi Li
4702df66b6 fix(aiproxy): detect listen address (#25679) 2026-09-13 12:36:10 +08:00
Zexi Li
d950d70102 feat(aiproxy): allow listing virtual key token field (#25676)
Expose VirtualKey in list responses so clients can retrieve the token without a separate get.
2026-09-11 18:46:01 +08:00
Zexi Li
d203580430 fix(llm): keep aiproxy routing across stop/restart (#25673)
Do not unsync or delete deployment ai_routing when replicas leave running; reconcile on running so routing/provider IDs stay stable.
2026-09-11 16:43:18 +08:00
Zexi Li
3fd882452b feat(llm): route MCP agent via aiproxy virtual key and routing id (#25667)
Support X-Ai-Routing-Id to pin ai_routing, treat empty model_pattern as non-wildcard, and wire MCP agent to aiproxy credentials instead of direct LLM api_key.
2026-09-11 10:14:08 +08:00
Jian Qiu
1074f3694d fix: classic nic dhcp default gateway revisit (#25670)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2026-09-10 21:05:32 +08:00
Jian Qiu
0590e3a434 fix: keystone-role-assignments-list-scope (#25652)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2026-09-10 17:25:32 +08:00
Jian Qiu
3c47ebba45 fix(cloudid): omit clouduser secret from list and get responses (#25651)
Return console login details from the login-info action; skip secret in resource JSON and logs.

Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-10 17:24:44 +08:00
Jian Qiu
23d7222bd0 fix: keystone idp join project roles check (#25653)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2026-09-10 16:39:09 +08:00
Jian Qiu
e96ca5b665 fix(llm): validate mcp agent server url and session endpoint (#25622)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-10 15:29:59 +08:00
Jian Qiu
c16d7fcb58 fix(llm): authenticate llm router agent route requests (#25626)
Fetch the agent with the caller session and check perform permission.

Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-10 14:37:17 +08:00
Jian Qiu
4b9f523424 fix(llm): require get permission when resolving llm_id (#25627)
Fetch the referenced LLM with the caller session before filling access URL fields.

Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-10 13:19:53 +08:00
Jian Qiu
19d63a7a36 fix(identity): validate rolepolicy create and bind-role requests (#25628)
Require role_id and reuse the role add-policy checks when creating a binding.

Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-10 13:10:46 +08:00
屈轩
d87a26f70c fix(region): convert kvm prefer storage (#25631) 2026-09-10 12:21:45 +08:00
Jian Qiu
b1d1cad973 fix(identity): check assume login with system scope and target roles (#25629)
Keep the caller session when authorizing assume and reuse join-project role checks.

Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-10 12:14:33 +08:00
Jian Qiu
f208976ef0 fix(ansible): validate playbook inventory, connection, and file paths (#25605)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-10 11:55:48 +08:00
Jian Qiu
c24383dd63 fix(image): reject images that declare a backing file (#25630)
Treat a non-empty backing filename as unsupported on upload, convert, probe, and ceph cache.

Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-10 11:55:18 +08:00
Jian Qiu
cb3e3cbb08 fix: allow host networks no gateway (#25625)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2026-09-10 01:32:49 +08:00
Jian Qiu
b6b9a3a2ab fix: classic net distribute default route for default nic (#25618)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2026-09-09 22:29:00 +08:00
Zexi Li
66409634a4 fix(region): include disabled hosts in isolated device usage stats (#25621)
Keep GPU/device usages consistent with hosts inventory; scheduling still uses enabled hosts only.
2026-09-09 22:27:59 +08:00
Jian Qiu
9f38eaea55 fix(container): validate host bind paths and create host-path files with argv (#25591)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-09 20:28:55 +08:00
wanyaoqi
a31b6bd52b fix(region): set force stop default timeout 30s (#25614) 2026-09-09 20:28:36 +08:00
Zexi Li
ee255297a7 fix(llm): skip stale container status during pod transitions (#25611)
Watch container events and defer LLM status updates while the pod is starting/stopping, so exited leftovers are not treated as start_fail.
2026-09-09 16:52:11 +08:00
Zexi Li
6f6d0a70c9 fix(host): use assigned nvidia GPU memory for pod metrics (#25608)
Derive mem total from isolated-device quotas when available, and harden
losetup ListDevices against empty --json output.
2026-09-09 12:01:47 +08:00
Jian Qiu
24e1299648 fix(guestfs): keep guest file deploy inside the mounted filesystem (#25592)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-08 23:46:58 +08:00
Jian Qiu
0b7ecb6c3c fix(identity): check SAML assertion issuer, audience, and optional signature (#25596)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-08 20:04:56 +08:00
屈轩
705ae5ef5a fix(region): support renew kvm vm (#25593) 2026-09-08 15:50:11 +08:00
Jian Qiu
d6419376fa fix(cloudcommon): fall back list query scope to the resource default view (#25587)
When admin or scope query parameters do not map to a concrete view, use the resource's own scope and keep owner filters applied.

Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-08 14:34:20 +08:00
wanyaoqi
876a893dc1 fix(host): start new goroutine to stop guest (#25586) 2026-09-08 14:08:53 +08:00
Zexi Li
da6ea51b5c feat(llm): support force restart for LLM and deployments (#25583)
Allow force restart when instances are failed, protect restarting status
during sync, refresh GPU memory from deployment, and tolerate crash-loop
while waiting for service ready.
2026-09-07 21:14:00 +08:00
屈轩
5fb64e76d2 fix(mcp-server): upgrade mcp lib (#25574) 2026-09-07 14:25:53 +08:00
Zexi Li
80c4977f58 feat(llm): allow disabling pod/container cgroup CPU and memory limits (#25577)
Inference SKUs default to off; SKU and CLI expose enable flags so hosts can skip CFS quota and memory hard limits when needed.
2026-09-07 14:06:35 +08:00
屈轩
d76698cfa1 fix(region): vendor update (#25570) 2026-09-07 10:27:13 +08:00
Jian Qiu
56fec3fcb5 fix(apigateway): authenticate csrf resource requests with the caller session (#25566)
Align the csrf resource handler with other API resource handlers by requiring a token and forwarding with the caller's own session.

Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-04 20:48:18 +08:00
Jian Qiu
0f830b4219 fix: verify test revisit (#25562)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2026-09-04 19:39:30 +08:00
Jian Qiu
59b658ce87 fix: module not found return 404 (#25558)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2026-09-04 19:23:42 +08:00
屈轩
bb540b7a4a fix(region): esxi v2v prefer storage (#25554) 2026-09-04 17:33:31 +08:00
Jian Qiu
95332ed656 fix(webconsole): authenticate sftp endpoints and check session owner (#25502)
The sftp list/download/upload endpoints were not protected by
authentication, only by the UUID4 session id. Anyone who learned the
session id (it appears in URLs and logs) could list, download and
upload files of the VM over the victim's active SSH/SFTP channel.

Wrap all three endpoints with auth.Authenticate and record the owner
of each sftp session at registration, so only the user who opened the
session can use it.

Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
Co-authored-by: Claude <noreply@anthropic.com>
2026-09-04 13:46:08 +08:00
Jian Qiu
2f0ce30f5c fix(webconsole): validate ssh target ip against accessible resources (#25487)
The ssh console endpoint accepted a raw ip address in the URL path
and dialed it directly with user provided credentials, so any
authenticated user could use the webconsole service as an internal
SSH proxy, port scanner and credential brute-forcer.

Resolve the ip against hosts (access_ip) and servers (ip_addr)
visible to the user's session and require it to match one of them,
rejecting all other addresses.

Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
Co-authored-by: Claude <noreply@anthropic.com>
2026-09-04 10:06:25 +08:00
Jian Qiu
f56e2327b1 fix(s3gateway): enforce signature freshness and single key decoding (#25490)
- Reject signed requests older or newer than 15 minutes (x-amz-date
  for v4, Date for v2), so intercepted valid requests can no longer
  be replayed indefinitely
- Decode the object key exactly once: r.URL.Path is already decoded
  by net/http and is the form the signature covers, decoding again
  let a signature for one key be replayed against another
  (e.g. %252e%252e%252f resolving to ../)
- Add unit tests for both behaviors

Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
Co-authored-by: Claude <noreply@anthropic.com>
2026-09-04 09:19:43 +08:00
Jian Qiu
c805952b40 fix(webconsole): fetch kubeconfig with user session for k8s shell (#25484)
The k8s shell/log endpoints fetched the target cluster kubeconfig
with the admin session, bypassing RBAC and owner scope checks, so any
authenticated user could exec into pods and read logs of any
registered cluster.

Fetch the kubeconfig with the user's own session instead, so policy
checks and owner filtering apply, and command records are attributed
to the real user.

Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
Co-authored-by: Claude <noreply@anthropic.com>
2026-09-04 09:18:52 +08:00
Jian Qiu
bebb68775f fix(webconsole): generate session key with crypto/rand (#25486)
The AES key encrypting all console session tokens was derived from
rand.Float32 with only about 24 bits of entropy, so it could be
recovered by brute force from a single known (session id, token)
pair and then be used to forge access tokens of arbitrary sessions.

Generate the key from 32 crypto/rand bytes instead (about 192 bits
of effective entropy). Sessions live in process memory only, so a
per-process random key is sufficient.

Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
Co-authored-by: Claude <noreply@anthropic.com>
2026-09-04 09:17:43 +08:00
Jian Qiu
afc0519d87 fix(webconsole): isolate RDP console sessions with unique ids (#25485)
RemoteRDPConsoleInfo.GetId() always returned an empty string, so all
RDP sessions were stored under the same key in the session manager:
any valid RDP access token resolved to whatever RDP session was stored
last, letting a user take over another user's console session
(host/port/username/password).

Give every RDP session a random UUID id and validate in
SSessionManager.Get that the presented access token is exactly the
one issued for the session, so sessions can not be reached by any
other token.

Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
Co-authored-by: Claude <noreply@anthropic.com>
2026-09-04 09:16:50 +08:00
wanyaoqi
c29357296d fix(region): use host type hypervisor rather than kvm (#25534) 2026-09-03 23:54:52 +08:00
Jian Qiu
c557a8b230 fix(appsrv): do not honor CORS credentials for wildcard origins (#25501)
With cors_hosts unset (the default), the CORS middleware allowed all
origins and echoed the request origin together with
Access-Control-Allow-Credentials, so any website could make
authenticated cross-origin requests against the API with the user's
cookies.

Credentials are now only honored for explicitly listed origins:
with an empty or wildcard origin allowlist the middleware responds
with Access-Control-Allow-Origin: * and no credentials header.

Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
Co-authored-by: Claude <noreply@anthropic.com>
2026-09-03 23:53:36 +08:00
Jian Qiu
ba61b4040b fix: convert sql.ErrNoRows to 404 not found (#25522)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2026-09-03 23:51:53 +08:00
Jian Qiu
9c88aa36d8 fix(notify): harden verification code generation and verification (#25483)
- Generate verification codes with crypto/rand instead of the
  predictable time-seeded math/rand
- Count failed verification attempts and invalidate the code after
  verify_max_attempts (default 5) failures, closing the unlimited
  online brute force of the 6-digit code at the login endpoint
- Delete the verification record after a successful check so codes
  are single use and can not be replayed within the validity window
- Add unit tests for code generation

Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
Co-authored-by: Claude <noreply@anthropic.com>
2026-09-03 23:49:29 +08:00
Jian Qiu
d4de3860df fix(hostimage): harden nbd export against command injection (#25491)
The nbd export endpoints interpolated the request disk_id into
shell commands (sh -c with the joined qemu-nbd command line, and
ps|grep for the process check), so a crafted disk_id could execute
arbitrary commands as root on the host image service.

- Require the disk_id to be a plain UUID in both export and close
  endpoints
- Run qemu-nbd with argv instead of sh -c
- Check the export process via its pid file and kill -0 instead of
  shell pipelines
- Add unit tests for the validation and the process check

Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
Co-authored-by: Claude <noreply@anthropic.com>
2026-09-03 23:48:20 +08:00
Zexi Li
c6bc5f5de2 feat(llm): support cancel and resume for instant model import (#25521)
Allow deleting models to abort in-flight downloads, persist import input for resume-import after killed status, and clean up import cache on delete.
2026-09-03 20:14:48 +08:00
Jian Qiu
d4fa442de0 fix(mcp-server): do not expose server-monitor as an MCP tool (#25488)
server-monitor sends arbitrary QMP/HMP commands (pmemsave, migrate,
etc.) to a running guest, which exceeds the semantics of monitoring.
As an MCP tool it could be triggered without human awareness through
LLM prompt injection or the tool-request endpoint.

Remove the mcp-desc registration tag from ServerMonitorOptions so
climcgen no longer registers the tool, drop its mention from the MCP
instructions, and add a regression test asserting it is not exposed.
The climc command and the permission-gated region API are unchanged.

Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
Co-authored-by: Claude <noreply@anthropic.com>
2026-09-03 19:22:30 +08:00
Jian Qiu
2aace16f5f fix: mask tokens and passwords in logs (#25489)
Full session tokens were written to logs in policy.go, mcclient auth,
oidc handler and the webconsole session manager; guest root passwords
were logged by the linux fsdriver and the nbdkit mount command; MCP
tool arguments and full JSON-RPC bodies (which may contain
server-reset-password passwords) were logged by the llm agent.

Truncate tokens in log messages, drop or mask password values and
log only the tool/method name for MCP calls.

Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
Co-authored-by: Claude <noreply@anthropic.com>
2026-09-03 19:20:25 +08:00
屈轩
b1a21ffefc fix(region): vmware vm nic sync (#25507) 2026-09-03 18:27:21 +08:00
Jian Qiu
1f7d15ae83 fix(hostman): harden deployer command execution against shell injection (#25477)
- Quote the heredoc delimiter when writing deploy params to the
  deployer guest, so deploy content, passwords and other
  user-supplied values are written literally and shell expansions
  ($(...), backticks, $VAR) inside them are not evaluated by the
  remote shell
- Escape JSON passed via --deploy-params as a single POSIX shell
  word, preventing single quotes in user data from breaking out of
  the argument
- Add unit tests covering injection payloads

Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
Co-authored-by: Claude <noreply@anthropic.com>
2026-09-03 17:59:23 +08:00
Jian Qiu
bb4e9a4e13 fix(webconsole): harden climc shell command execution against injection (#25476)
- Run ssh via exec.Command argv instead of "bash -c" string
  interpolation, so user-supplied fields can no longer escape into
  local shell commands on the webconsole server
- Quote every interpolated value (env, command, args) as a POSIX
  shell word, so they stay literal data on the remote shell
- Validate username charset and limit target_ip to climc pod or container
- Add unit tests covering injection payloads

Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
Co-authored-by: Claude <noreply@anthropic.com>
2026-09-03 10:51:51 +08:00
Jian Qiu
fb44b7fac2 fix: apigateway returns cors_hosts to browser (#25494)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2026-09-03 00:50:29 +08:00
Jian Qiu
f74aae22a4 fix: update rpm build scripts for openeuler (#25475)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2026-09-02 20:28:49 +08:00
Zexi Li
5bde2cafbe Automated cherry pick of #25479: Feat/aiproxy model context window (#25481)
* feat(aiproxy): expose catalog context window on AI models

Populate known 1M+ context windows in catalog seed data and return
context_window in AI model list/detail API responses.

* feat(aiproxy): add instance test-connectivity and set-models actions

Add provider instance test-connectivity using stored ai_key secrets,
and set-models to import selected catalog models while skipping
existing model_key rows. Register corresponding climc perform commands.
2026-09-02 17:43:58 +08:00
wanyaoqi
c6352a338d fix(region): disable startrun snapshotsCleanup (#25449) 2026-09-02 15:59:32 +08:00
Zexi Li
4641bf4ade fix(cloudcommon): fix err shadowing in GetPropertyDistinctField (#25472) 2026-09-02 15:58:21 +08:00
屈轩
25f1a39139 fix(region): optimized cachedimage list (#25465) 2026-09-02 11:40:09 +08:00
屈轩
117fb60199 fix(region): support filter cloudprovider by regions (#25460) 2026-09-01 16:05:47 +08:00
屈轩
9f2b500694 fix(region): vendor update (#25457) 2026-09-01 13:41:26 +08:00
屈轩
3082bb6b83 fix(apigateway): update mcp api addr (#25454) 2026-09-01 13:41:09 +08:00
屈轩
7de35e60e3 fix(region): optimized cachedimage list (#25450) 2026-09-01 09:18:08 +08:00
Zexi Li
1b2a11f3ef feat(llm): add llm_sku clone API and climc support (#25445) 2026-08-27 19:00:54 +08:00
wanyaoqi
9e790b049c fix(region,host): optimize snapshot delete (#25440)
use rebase/commit merge backing chain instead of convert.
2026-08-27 16:27:19 +08:00
wangyf0611
a722b3dd69 feat(region,host): support riscv64 usage (#25439)
* feat(region): include riscv64 usage statistics

Signed-off-by: wangyf0611 <wangyufeng@iscas.ac.cn>

* feat(host): support openRuyi guest initialization

Signed-off-by: wangyf0611 <wangyufeng@iscas.ac.cn>

---------

Signed-off-by: wangyf0611 <wangyufeng@iscas.ac.cn>
2026-08-27 16:22:11 +08:00
wanyaoqi
0485a84dc0 fix(region): batch detach isolated devices (#25433) 2026-08-27 13:49:16 +08:00
wanyaoqi
575b0ed7be fix(region): set default stop time 300s (#25432) 2026-08-26 15:22:11 +08:00
Jian Qiu
a2e80e5681 fix: allow empty host networks (#25429)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2026-08-26 14:40:55 +08:00
屈轩
526e1770ef fix(region): not real delete glance cachedimage (#25423) 2026-08-25 14:58:56 +08:00
wanyaoqi
b7420fc08c fix(host-deployer): no noeed clean failed mountpoints (#25422) 2026-08-25 11:37:07 +08:00
Jian Qiu
338fabca7e fix: allow create-disk without disk args (#25415)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2026-08-24 15:48:23 +08:00
Jian Qiu
a4e15c7f59 fix: allow create-disk without disk args (#25413)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2026-08-24 15:47:16 +08:00
屈轩
654789b5b0 fix(region): v2v migrate uefi check (#25416) 2026-08-24 15:40:45 +08:00
屈轩
923053aa4d fix(glance): avoid receive notify when glance restart (#25409) 2026-08-24 15:05:04 +08:00
wanyaoqi
bd3e8d0d97 fix(host): guest desc correct rbd disk path (#25396) 2026-08-24 14:37:09 +08:00
wanyaoqi
9b3b41a13b fix(host-health,region): host health detect network available add check peers and default gw (#25385) 2026-08-24 14:34:36 +08:00
屈轩
bb21271162 fix(region): skip hostlocal wire when detect vmware net (#25404) 2026-08-24 14:19:28 +08:00
屈轩
e47a923065 fix(region): show more error info for vmware net detect (#25400) 2026-08-24 10:21:28 +08:00
Zexi Li
2de295222d feat(llm): merge SKU envs into container and validate prefer_hosts updates (#25389)
Allow local_path SKUs to update prefer_hosts on edit, and overlay SKU envs onto the primary container with same-key override.
2026-08-21 14:27:58 +08:00
Jian Qiu
63ef1dad78 fix: unhandled errors (#25383)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2026-08-20 17:30:29 +08:00
Zexi Li
d2981f8111 fix(host): skip unmanage interface when bridge slave has no address (#25382)
Only call tryUnmanageInterface when the slave interface has IPv4 or IPv6
addresses configured, avoiding unnecessary NetworkManager unmanage on
address-less interfaces during bridge setup.
2026-08-20 17:26:54 +08:00
屈轩
de26e6140d fix(region): skip sync cloudpods kvm secgroup (#25376) 2026-08-20 10:45:00 +08:00
wanyaoqi
360fbbd47b Automated cherry pick of #25365: fix(region,host): guest stop add timeout options,and check is_force (#25371)
* fix(host): check qga guest-get-osinfo error

* fix(region,host): guest stop add timeout options and is_force check
2026-08-20 10:15:55 +08:00
屈轩
d2755e8370 fix(region): support cloudpods ipset (#25360) 2026-08-19 18:56:30 +08:00
Zexi Li
29f65063b7 fix(scheduler): report HAMI hostFree before min-memory filter (#25372)
Shortage messages now show remaining GPU memory from matched devices
before min-memory filtering, so users see actual free capacity instead of 0.
2026-08-19 16:40:51 +08:00
Jian Qiu
f2ffa5d034 fix: storage set metadata in post_create (#25367)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2026-08-19 16:21:25 +08:00
wanyaoqi
9393059615 Automated cherry pick of #25347: fix(host): add options enabel vendor/device pt usb dev (#25349)
* fix(host): add options enabel vendor/device pt usb dev

* fix(host): add audio device for spice driver
2026-08-19 14:13:16 +08:00
Jian Qiu
edaf7599da fix: deploy qga path not found error (#25353)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2026-08-19 14:09:53 +08:00
Zexi Li
edd9a51a58 feat(llm): check sku schedule info (#25362) 2026-08-19 12:18:18 +08:00
Zexi Li
d4876a18bd fix(aiproxy): remove 30-day limit on custom usage range (#25356)
Allow querying usage statistics over custom date ranges longer than 30 days.
2026-08-17 17:00:14 +08:00
Jian Qiu
21ec4f7f5c fix: disk backup filter by server_id (#25346)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2026-08-15 09:38:15 +08:00
Jian Qiu
d50f3d8e7f feature: support idp driver attribtue_names (#25335)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2026-08-15 00:16:19 +08:00
wanyaoqi
bf4ef9b0f5 Automated cherry pick of #25313: Fix/device add params2 (#25315)
* fix(host): device add params use interface

* fix(host): ide device addr
2026-08-15 00:15:21 +08:00
屈轩
d84952bf77 fix(glance): detect windows iso (#25340) 2026-08-14 19:02:12 +08:00
Zexi Li
ea65b5d1a5 fix(monitor): nodata 告警补充 ResIdKey 与 AlertDetails (#25339)
为 CommonAlertMetricDetails 填充资源 ID tag,并在无数据评估匹配中序列化 AlertDetails,便于下游定位资源。
2026-08-14 16:09:10 +08:00
屈轩
4cbeeb58c5 fix(glance): iso image detect (#25329) 2026-08-14 14:53:41 +08:00
屈轩
499989c27e fix: update telegraf version (#25322) 2026-08-14 14:53:14 +08:00
Zexi Li
e73506385a feat(aiproxy): encrypt ai_key and virtual_key secrets at rest (#25328)
Store provider secrets and virtual keys encrypted with AES, add hash-based VK lookup, and migrate existing plaintext rows on init.
2026-08-14 14:40:39 +08:00
Zexi Li
24c22d13e3 feat(aiproxy): migrate catalog resources to virtual resource base (#25318)
Give ai providers/models/keys/routing-models project scope with tenant backfill, and pass project/domain on LLM sync upserts.
2026-08-14 10:44:31 +08:00
屈轩
1e37006b48 fix(cloudmon): cloudpods metric pull delay time (#25316) 2026-08-14 10:37:38 +08:00
屈轩
1d91431184 fix: mcp streamable (#25310) 2026-08-13 16:37:25 +08:00
wanyaoqi
3262f14ab1 fix(region): server-create add src ip/mac check (#25304) 2026-08-13 10:10:48 +08:00
Zexi Li
a13a322bf2 feat(llm): sync isolated devices by sharing_mode on restart (#25307)
Respect sharing_mode when attaching/restoring GPU devices in compute,
and sync LLM guest devices with SKU config instead of only detaching
when empty.
2026-08-12 20:17:22 +08:00
Zexi Li
b0948fee8f feat(k8s): add cluster history-data-clean climc command (#25298) 2026-08-11 13:54:44 +08:00
Jian Qiu
5fc2174eeb feature: support create disk backup from file (#25175)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2026-08-10 11:25:07 +08:00
Jian Qiu
72888ba060 fix: dhcp distribute static routes on condition (#25297)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2026-08-10 10:31:22 +08:00
Zexi Li
25bd5f8ed9 fix(baremetal): restore missing brace in ipmitool test helper (#25295) 2026-08-07 18:31:33 +08:00
Bo Xu
1d7ceb3c66 fix(baremetal): add IPMI LAN channel discovery with fallback (#25222)
* fix(baremetal): add AllowFallback guard for OEM profile LAN channel authority

OEM/model profiles are authoritative allowlists; their LanChannels must not be overridden by the fallback 1..11 scan. Add AllowFallback bool to LanConfigSelectionOptions, wrapping the fallback scan in a conditional. When false (default), only preferred and persisted channels are probed.

* fix(baremetal): set AllowFallback on ipmiprobe and manager callers

manager.checkIpmiInfo: AllowFallback=false (profile always present). ipmiprobe.doRawIpmiProbe: AllowFallback=profile==nil (fallback only when no profile exists).

* fix(baremetal): set AllowFallback=false in configIPMISetting, cleanup bm_register

configIPMISetting: AllowFallback=false (profile always present). bm_register.updateIpmiInfo: replace profile-based channel scan with GetLanConfig on the registered channel directly.

---------

Co-authored-by: Zexi Li <zexi.li@icloud.com>
2026-08-07 18:26:09 +08:00
Zexi Li
3270a5dd79 fix(baremetal): tolerate ipmitool exit 1 when lan output is usable (#25291)
Some BMCs return exit status 1 from ipmitool lan print even with valid
LAN config, which caused IPMI probe to fail with no IPMI lan NotFoundError.
2026-08-07 17:22:56 +08:00
DadaVinqi
2730639e1b fix(lbagent): generate valid UDP health check config (#25268)
Signed-off-by: DadaVinqi <DadaVinqi@users.noreply.github.com>
Co-authored-by: DadaVinqi <DadaVinqi@users.noreply.github.com>
2026-08-07 14:31:03 +08:00
wanyaoqi
2cdf006b12 fix(host): e1000 nic add hotplug support (#25283) 2026-08-07 09:59:08 +08:00
屈轩
89e31be5bc fix(region): change config stop options check (#25284) 2026-08-06 17:32:24 +08:00
Zexi Li
e7edd821c1 fix(llm): detach stale GPUs when effective devices are empty on restart (#25280)
Avoid keeping bound isolated devices after SKU/LLM devices are cleared;
desktop container setup now follows effective devices only.
2026-08-06 10:02:22 +08:00
Zexi Li
17e72d71d9 fix(aiproxy): keep weight=1 keys selectable after health penalty (#25277)
Integer truncation of base*mul/maxScore can yield 0 for weight=1 keys,
permanently excluding them; floor effective weight at 1 when mul > 0.
2026-08-04 20:25:23 +08:00
wanyaoqi
61963c5721 fix(host): slvm create from snapshot (#25265) 2026-08-04 10:22:54 +08:00
Zexi Li
c2fbb426f6 feat(host): support Hygon DCU HAMI vdev core allocation (#25274) 2026-08-04 10:21:09 +08:00
wanyaoqi
0b6c26c45b feat(glance): support nfs as backend storage (#25240) 2026-08-03 16:00:21 +08:00
Jian Qiu
696bd7b678 fix: region backward compatible fields for isolated_devices (#25263)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2026-08-03 15:59:08 +08:00
Zexi Li
e05d6f3e9a fix(llm): derive aiproxy upstream model key from local_path sku (#25270) 2026-08-03 15:44:21 +08:00
Zexi Li
eab7db5518 feat(llm,host): support Hygon DCU runtime for vLLM containers (#25260)
Wire vendor on LLM SKU devices, resolve supplemental groups for DCU
access, source DTK env in vLLM entrypoint, and add hysmi telegraf metrics.
2026-08-02 13:52:16 +08:00
wanyaoqi
cdd53fb02a fix(region,host,monitor): hami misc fix (#25257)
- npusmi monitor support
2026-07-31 10:10:49 +08:00
Matt Gideon
6e6d74e38c fix(seclib2): support Ed25519 encryption (#25251)
Handle Ed25519 public and private keys in the AES-based encryption path.

Add round-trip coverage for OpenSSH and PKCS#8 private keys.
2026-07-30 10:34:42 +08:00
Jian Qiu
d78edaed9e fix: handle host listen interface and master nic (#25250)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2026-07-29 23:46:49 +08:00
Zexi Li
a29c7ce9f1 feat(host): support Hygon DCU isolated device and HAMI (#25247)
Add Hygon DCU container device passthrough, HAMI vGPU sharing, vendor
field/filter on isolated devices, remote path helper, and LLM SKU mapping.
2026-07-29 19:01:55 +08:00
Zexi Li
4ea44a5f17 fix(llm): require memory_mb for local_path HAMi devices (#25243)
local_path SKUs cannot estimate VRAM from InstantModel; validate HAMi devices set devices[].memory_mb on create/update and deployment.
2026-07-29 10:22:12 +08:00
wanyaoqi
a4c39057fb Automated cherry pick of #25206: fix(region,host): host register with correct hostname (#25234)
* fix(region,host): host register with correct hostname

* fix(region): guest migrate reuse create params schedtag
2026-07-28 11:01:36 +08:00
wanyaoqi
4be8bb19a7 feat(host): support ascend npu hami (#25237) 2026-07-28 10:56:05 +08:00
Zexi Li
0c04596500 feat(baremetal): support IPMI RMCP+ cipher suite probe and persist (#25239)
Auto-detect working ipmitool -C suites (0/3/17) and store cipher_suite on host IPMI config for subsequent connections.
2026-07-28 10:27:20 +08:00
屈轩
e7ce74000c fix(climc): climc options update (#25226) 2026-07-27 19:41:01 +08:00
wanyaoqi
cc3a2490af fix(host): qmp device add convert string to boolean (#25230) 2026-07-27 19:08:18 +08:00
Zexi Li
dab1360311 fix(aiproxy): avoid permanent ai_key blacklist and clarify skip reasons (#25225)
Enter cooldown when health score hits zero so keys can recover, and include concrete skip reasons in resolve errors.
2026-07-27 12:16:12 +08:00
Jian Qiu
39ba861cdf feature: ip set support (#25217)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2026-07-24 16:34:08 +08:00
Jian Qiu
1920de6147 fix: vpc distributes static routes (#25213)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2026-07-23 19:36:42 +08:00
Zexi Li
62d61ee89d feat(llm): support hami (#25216) 2026-07-23 17:08:56 +08:00
Jian Qiu
d75d58f42e fix: baremetal use legacy http client (#25207)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2026-07-23 16:32:52 +08:00
屈轩
8d0ee46764 fix(region): vendor update (#25203) 2026-07-22 11:19:05 +08:00
Jian Qiu
07b718eeb2 fix: allow empty ip on link-local nic (#25202)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2026-07-22 11:05:55 +08:00
屈轩
48204b5064 fix(region): vendor update (#25196) 2026-07-21 23:31:44 +08:00
屈轩
29a2eca906 fix(mcp-server): optimized mcp desc (#25193) 2026-07-21 16:19:09 +08:00
屈轩
8e1b9a4d11 fix(mcp-server): support forwarding mcp-server request (#25190) 2026-07-21 13:27:39 +08:00
屈轩
02c65a9d54 fix(mcp-server): optimized mcp server options (#25187) 2026-07-20 20:56:26 +08:00
屈轩
2a9be258f9 fix(mcp-server): mcp use climc struct (#25174) 2026-07-20 17:17:20 +08:00
wanyaoqi
76f035e4e3 feat(region,host,scheduler): isolated device refactor and hami support (#25182) 2026-07-20 14:00:04 +08:00
wanyaoqi
1d2c8733ad fix(host-deployer): bond netplan add vlan subinterface config (#25178) 2026-07-20 12:16:20 +08:00
wanyaoqi
142b0dabf5 fix(region): baremetal boot mode decided by selected host on image support both uefi&bios (#25154) 2026-07-20 12:07:22 +08:00
wanyaoqi
39e42cfa27 fix(host-deployer): windows disk extend separate partition and filesystem (#25138) 2026-07-20 12:05:36 +08:00
wanyaoqi
e15487dd68 fix(host): add nest virtualization options (#25125) 2026-07-20 12:03:26 +08:00
wanyaoqi
d5f113d64c fix(region): disk change driver support change aio_mode and cache_mode (#25095) 2026-07-20 11:39:13 +08:00
屈轩
57c858a6ea fix(mcp-server): query scope params (#25171) 2026-07-17 00:26:47 +08:00
屈轩
a9761ea558 fix(cloudid): batch detach policy (#25163) 2026-07-16 19:08:08 +08:00
屈轩
25ec1683c8 fix(region): support cas hypervisor (#25160) 2026-07-16 19:07:54 +08:00
Zexi Li
669fa8009c fix(aiproxy): emit done events before response.completed in stream converter (#25158)
Emit output_item.done, reasoning_summary_part.done, function_call_arguments.done,
and related finalize events for text, reasoning, and tool calls before the
response.completed event to match the Responses API stream contract.
2026-07-16 17:02:18 +08:00
Zexi Li
49c5cfa421 feat(aiproxy): auto-provision placeholder ai_key for upstream resolve (#25156) 2026-07-15 19:24:57 +08:00
cwz_eikoh
ed4a8dc049 feat(llm): add llm-router-agent (#25128) 2026-07-15 15:31:08 +08:00
cwz_eikoh
20620bb5a1 feat(llm): support llm-bench in llm (#25103) 2026-07-15 15:00:37 +08:00
Zexi Li
068cc8bdbd Automated cherry pick of #25145: feat(aiproxy): support streaming responses for visual messages (#25146)
* feat(aiproxy): support streaming responses for visual messages

* refactor(aiproxy): share API log helpers and support input/output token usage

Extract common chatlog record lifecycle across proxy handlers, and fall back
to Responses/Anthropic usage field aliases when filling token counts.
2026-07-15 10:57:49 +08:00
Zexi Li
cdc8ab78b5 feat(aiproxy): move visual provider to model columns and support streaming responses (#25144)
Promote visual_provider_id/visual_model_key to dedicated ai_model columns,
force non-stream upstream orchestration for visual paths, and synthesize SSE
chunks for streaming Responses requests that include images.
2026-07-14 18:39:30 +08:00
Zexi Li
73d7cbbb1f Automated cherry pick of #25132: refactor(aiproxy): rename chat log config to API log with S3 fields (#25141)
* refactor(aiproxy): rename chat log config to API log with S3 fields

* feat(aiproxy): add visual extension for Responses image tools

Wire visual model catalog, orchestration, and OpenAI Responses compat so chat/Codex can invoke image generation and editing tools.
2026-07-14 11:52:58 +08:00
wanyaoqi
5f1b76755b fix(region): reset guest quorum child index on guest shutdown (#25133) 2026-07-14 00:10:38 +08:00
屈轩
6a22bb4d2d fix(region): split sync and probe worker (#25100) 2026-07-13 14:00:02 +08:00
Jian Qiu
35b100b03c fix: allow security group cidr have multiple prefixes (#25122)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2026-07-13 13:58:46 +08:00
Zexi Li
40b3c82ab4 feat(aiproxy): add Z.AI / Zhipu provider with dual OpenAI and Anthropic API modes (#25131)
Register zhipu as a public OpenAI-compat provider with GLM catalog seeds,
Anthropic passthrough routing, and v4-style base URL path handling.
2026-07-13 11:25:22 +08:00
Zexi Li
afde072512 feat(aiproxy): add OpenAI Responses API with provider adapters and Codex support (#25127)
Implement /v1/responses endpoint with multi-provider translation (OpenAI, Azure,
Anthropic, Gemini), streaming compat layers, Codex config/tool integration, and
updated functional test docs.
2026-07-10 16:40:56 +08:00
Jian Qiu
05a55ed36b fix: allow deleting idp without checking project count (#25108)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2026-07-10 08:35:55 +08:00
屈轩
598381f9a5 fix(region): gcp network tags (#25119) 2026-07-09 17:11:21 +08:00
屈轩
df94e8049b fix(yunionconf): batch import tags (#25116) 2026-07-09 16:43:01 +08:00
Jian Qiu
7651726458 fix: host order by sql redundant group by (#25114)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2026-07-09 14:22:44 +08:00
cwz_eikoh
52d2ddcb45 feat(aiproxy): support log record in aiproxy through minio (#25078) 2026-07-09 13:01:21 +08:00
Jian Qiu
54b7c42d94 fix: lb listener rule specific certificates (#25106)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2026-07-08 12:03:53 +08:00
Zexi Li
167682c39b feat(aiproxy): add Anthropic Messages API and migrate functional tests to Go (#25107)
Add /v1/messages handler with Anthropic-to-OpenAI translation, upstream
failover, and probe endpoints. Replace shell-based functional test scripts
with pkg/aiproxy/ft and climc test commands; consolidate documentation.
2026-07-07 20:13:14 +08:00
屈轩
e6c9393955 fix(region): pve host driver compatibility (#25098) 2026-07-03 15:37:40 +08:00
Zexi Li
9cc4d76a81 feat(llm): add ModelScope instant model import and refactor model download (#25092)
Add ModelScope hub integration, download driver, and instant model import
flow parallel to HuggingFace. Extract shared HuggingFace download helpers
and reuse them across vLLM/SGLang container drivers.
2026-07-01 20:13:17 +08:00
Zexi Li
3431c10196 feat(llm): support local_path scheduling with prefer_hosts and deployment restart (#25090) 2026-07-01 13:11:19 +08:00
wanyaoqi
31e342881e fix(host-deployer): mount procfs before deploy guestfs (#25087) 2026-07-01 00:53:59 +08:00
Zexi Li
0f63315fc8 feat(scheduler): append GPU reserved resource hints on predicate failure (#25084) 2026-06-30 15:40:50 +08:00
Zexi Li
d9cf601841 feat(llm): backfill orphan LLM instances into deployments on init (#25081)
On service startup, find LLM instances without llm_deployment_id and
create a matching SLLMDeployment, then link the instance. Idempotent
across restarts; skipped on slave nodes.
2026-06-29 11:28:54 +08:00
wanyaoqi
1b742b49e9 fix(host-deployer): do base64 windows password (#25071) 2026-06-28 08:24:48 +08:00
屈轩
7802f909e0 fix(region): quota check (#25066) 2026-06-26 13:06:00 +08:00
wanyaoqi
75cc892bf7 fix(region,host): kvm guest change disk driver reset uefi vars (#25069) 2026-06-26 10:20:37 +08:00
wanyaoqi
be57fc2845 fix(host): qemu set multifd before start incoming migration (#25065)
use drive mirror do block migration
2026-06-26 10:18:58 +08:00
cwz_eikoh
b48c1be667 feat(llm): tool call defaults & auto gpu ultilization (#25074)
* feat(llm): upgrade auto-gpu-ultilization

* feat(llm): add vllm tool call defaults

* feat(llm): add sglang tool call defaults
2026-06-26 10:15:19 +08:00
Zexi Li
8f1d740b54 feat(llm): async instant model delete and improve import status tracking (#25073)
fix(aiproxy): set OpenAI handler process timeouts and skip upstream error
response when request context is already cancelled.
2026-06-25 19:52:46 +08:00
Zexi Li
ba39e80fd8 feat(llm): validate GPU devices on deployment create and improve error messages (#25063) 2026-06-24 14:27:25 +08:00
wanyaoqi
143ca823c8 fix(region): snapshot validate add check guest is quorum master guest (#25051) 2026-06-24 10:30:00 +08:00
cwz_eikoh
d4dd65cb24 Feature/http get+llm probe (#25016)
* hostman: probe http get in pod netns

* llm: watch pod status for service readiness
2026-06-23 19:40:30 +08:00
屈轩
e693162ad0 fix(region): filter sku by zone ids (#25060) 2026-06-23 15:00:30 +08:00
Zexi Li
f69856eeb0 fix(aiproxy): defer stream context cancel until chunks are consumed (#25059) 2026-06-23 14:09:47 +08:00
Zexi Li
4a4b3f8676 feat(llm): sync llm deployment with aiproxy catalog and routing (#25057)
Add auto_register_aiproxy on llm_deployment creation, background sync task,
and register/unregister CLI actions. Link aiproxy providers, routings, and
models to llm replicas via llm_id and llm_deployment_id fields.
2026-06-22 20:14:01 +08:00
屈轩
4d6f4452c0 fix(region): vendor update (#25056) 2026-06-22 11:39:28 +08:00
cwz_eikoh
108db8ca87 Feature/llm route for aiproxy (#25044)
* feat(aiproxy): support routing model in aiproxy

* feat(llm): add llm-router
2026-06-22 10:09:38 +08:00
Jian Qiu
50a7105cff fix: credential scope revisit (#25049)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2026-06-21 08:34:50 +08:00
wanyaoqi
ba9a7fe775 fix(host): recycle servers dir on guest delete (#25021) 2026-06-21 08:34:07 +08:00
Jian Qiu
6fa7c8f9d2 fix: some host_type should consider container (#25047)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2026-06-20 09:47:32 +08:00
屈轩
2b927e742d fix(region): remove debug log (#25041) 2026-06-17 14:50:20 +08:00
屈轩
8a6d6faf24 fix(region): aws dedicated host sync (#25039) 2026-06-16 20:14:23 +08:00
屈轩
8719e73105 fix(compute): polish httperrors error messages in pkg/compute (#25035)
Unify spelling, grammar, and semantics of API error strings without changing error types or business logic.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-15 20:49:16 +08:00
屈轩
987191082b fix(region): vendor update (#25033) 2026-06-15 17:42:51 +08:00
Zexi Li
3ff72d8a38 feat(llm): add community images catalog API (#25032)
Expose llmimages.yaml as list/show/refresh endpoints with configurable
source URL, periodic cache refresh, and mcclient module support.
2026-06-15 17:26:37 +08:00
屈轩
24caa8dd11 fix(region): filter sku by zone ids (#25028) 2026-06-15 15:50:42 +08:00
屈轩
bd236cb965 fix(region): vendor update (#25026) 2026-06-15 14:58:10 +08:00
屈轩
7d0870790a fix(region): struct tag fix (#25023) 2026-06-15 11:04:17 +08:00
wanyaoqi
f36d39848c fix(region): guest detach isolated devices add is_force options (#25019) 2026-06-15 09:54:29 +08:00
屈轩
bf919b8f7a fix(region): disk througput sync (#25017) 2026-06-13 11:54:43 +08:00
wanyaoqi
6126af72d4 fix(host): guest python launcher error (#25014) 2026-06-12 14:07:35 +08:00
屈轩
688ae49a28 fix(region): optimized sku query (#25008) 2026-06-11 14:31:21 +08:00
wanyaoqi
44f7c6e688 fix(region): host model add api stats (#24956) 2026-06-09 23:02:04 +08:00
屈轩
7c7353cf7b feat(aiproxy): add aiproxy (#24916) 2026-06-09 18:54:42 +08:00
屈轩
e9a6034705 fix(region): sku price (#25001) 2026-06-09 15:58:13 +08:00
Zexi Li
43d4c1e739 feat(monitor): add tag name/id mapping in metric measurement API (#25000)
Return structured MetricMeasurementOutput with TagNameIdMap and
TagNameIdValueMap so callers can resolve resource names to IDs.
2026-06-09 15:14:47 +08:00
屈轩
b876405c97 fix(region): vendor update (#24998) 2026-06-09 14:16:49 +08:00
屈轩
ac31682e01 fix(region): vendor update (#24996) 2026-06-08 20:45:49 +08:00
屈轩
44078851ba fix(region): vendor update (#24994) 2026-06-08 16:03:17 +08:00
cwz_eikoh
bf8aab9f75 Feat/deployment hostpath (#24985)
* feat(llm): hostpath support in deployment

* fix(llm): status error in deployment & sku deleted by deployment accidentally
2026-06-08 11:23:34 +08:00
cwz_eikoh
a8e5bf82eb feat(host): support host_path detected in scheduler (#24967) 2026-06-08 11:01:29 +08:00
屈轩
5cdadb69ce fix(region): avoid panic (#24988) 2026-06-08 10:58:47 +08:00
Zexi Li
9f35b4e597 fix(host): rewrite vm_name in telegraf influx proxy after rename (#24991)
Sync host guest desc on local VM rename and correct vm_name (and
tenant_id) tags when metadata service proxies agent metrics to TSDB.
2026-06-08 10:43:38 +08:00
Jian Qiu
c80d865a24 fix: support ansible galaxy mirror (#24987)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2026-06-08 08:57:09 +08:00
屈轩
e0584f12e3 fix(region): support rockbasecloud (#24978) 2026-06-05 19:28:19 +08:00
屈轩
3ac9178c61 fix(monitor): skip disable account alert (#24979) 2026-06-05 16:14:25 +08:00
Jian Qiu
354408b656 fix: lbagent service code typo 20260604 (#24977)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2026-06-05 01:13:15 +08:00
屈轩
adbefb74bf fix(region): prefer zones (#24966) 2026-06-04 18:51:48 +08:00
Zexi Li
9d85cfcd5d fix(llm): 更新 model catalog 默认 URL 与 webtop 镜像同步 (#24974)
将 ModelCatalogURL 默认路径改为 model-catalog.yaml;
sync_llm_images 改为同步 fedora-xfce webtop 并注释其它候选镜像。
2026-06-04 18:51:20 +08:00
Zexi Li
dd719de15c fix(llm): container desktop (#24969) 2026-06-04 11:51:29 +08:00
Zexi Li
40beca15e7 fix(monitor): alert_state of resource metrics api (#24965) 2026-06-03 17:15:44 +08:00
屈轩
fac826012e fix(region): extend external_id to 512 (#24962) 2026-06-03 15:27:58 +08:00
Zexi Li
df815ad02b feat(llm): container desktop (#24960) 2026-06-03 13:24:39 +08:00
屈轩
71f8c3004c fix(region): add cpu model nic bandwidth for server sku (#24953) 2026-06-03 10:59:48 +08:00
Jian Qiu
de012133d6 fix: compatibility issue with vms of empty hypervisor (#24958)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2026-06-03 09:57:53 +08:00
wanyaoqi
d6478049a1 fix(mps): parse pci addr convert to lower case addr (#24943) 2026-06-02 20:03:02 +08:00
wanyaoqi
17e67af77c fix(host): check cluster is valid before do qemuimg convert (#24947) 2026-06-02 20:02:04 +08:00
屈轩
69d3a2d894 fix(region): filter zone region by read only (#24950) 2026-06-02 11:15:20 +08:00
屈轩
b8835bb333 fix(region): support skip server sync by tags (#24948) 2026-06-02 11:05:10 +08:00
屈轩
d20f102508 fix(region): avoid create huawei windows server fail (#24939) 2026-06-01 15:52:44 +08:00
屈轩
47fab40fc0 fix(region): init cloudpods host type (#24933) 2026-05-31 14:17:15 +08:00
屈轩
2346d2691a fix(region): init external project (#24935) 2026-05-31 12:45:57 +08:00
cwz_eikoh
8a676e6b4c Feat/auto gpu ultilization (#24924)
* fix(llm): support hf import llm_sku

* feat(llm): auto-gpu-memory-utilization
2026-05-29 17:45:35 +08:00
屈轩
83a32e14f4 fix(host-deployer): lvm lock (#24926) 2026-05-29 15:01:15 +08:00
wanyaoqi
31e1ea64d9 fix(host): guest sync override cpu_numa_pin before update (#24914) 2026-05-28 19:58:45 +08:00
屈轩
cdc399e6d7 fix(region): add notices sync interval (#24922) 2026-05-28 19:47:51 +08:00
屈轩
6a1c3ea3ad fix(region): remove account id (#24919) 2026-05-28 17:40:28 +08:00
Zexi Li
08bcd59231 fix(ansibleserver): allow CreatorMark to be nullable in AnsiblePlaybookV2 (#24918) 2026-05-28 16:38:19 +08:00
cwz_eikoh
76e30df4f5 Feature/download progress (#24885)
* feat(llm): support download progress when model import

* fix(llm): unsupported catalog source \"ollama\" when model_set import llm_sku
2026-05-27 13:20:47 +08:00
Zexi Li
982807b66b feat(monitor): add ResourceMetricsDefaultInterval option (#24908) 2026-05-27 11:50:48 +08:00
屈轩
ce4ef5af78 fix: upgrade go 1.26 (#24904) 2026-05-27 11:22:07 +08:00
LiuChen
2ad20fff33 fix: throttle image cache progress callback to avoid download bottleneck (#24898)
When using S3/MinIO backend, the progress callback in AcquireImage was
called synchronously on every 4KB read chunk (via StreamPipe2). Each
call invokes UpdateServerProgress which makes a blocking HTTP PUT to the
compute API (~50ms), capping download speed at ~0.65 Mbps regardless of
available bandwidth.

Fix: throttle the callback to fire at most once every 5 seconds and make
the HTTP call asynchronous (goroutine), matching the behavior of v3.11.x
which used a 1-second ticker with async callbacks.

Fixes #24897

Co-authored-by: Mrliuch <liu15094534492@gmail.com>
2026-05-26 15:09:46 +08:00
屈轩
52f84f0cd3 fix(region): skip useless addition network wire create (#24893) 2026-05-25 19:45:43 +08:00
Zexi Li
66ae3c91a7 fix(host): aggregate same-type container devices for env config (#24892)
When multiple NVIDIA GPUs were attached to a container, each device was
passed individually to GetContainerExtraConfigures, producing one
NVIDIA_VISIBLE_DEVICES env per GPU. Duplicate env keys are collapsed by
the runtime to the last value, so the container only saw one GPU even
though the spec listed all of them.

Group RestDevs by DeviceType and invoke GetContainerExtraConfigures
once per type so all GPU UUIDs are joined into a single
NVIDIA_VISIBLE_DEVICES value.
2026-05-25 17:30:10 +08:00
Zexi Li
9ce9949b21 feat(llm,scheduler): vram calculation (#24889) 2026-05-25 16:27:28 +08:00
Jian Qiu
53da0f15fd fix: disable s3 direct download default (#24886)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2026-05-25 10:03:54 +08:00
cwz_eikoh
588c38ec74 feat(llm): auto append backend_parameters in vllm & sglang (#24876) 2026-05-22 17:01:54 +08:00
Zexi Li
ae431939fd fix(region): prefer check_code series for lb backend check_status (#24878) 2026-05-22 14:17:39 +08:00
Jian Qiu
2ecbbf31d9 fix: set bridge up after created (#24874)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2026-05-21 20:31:03 +08:00
wanyaoqi
fcf79ceda8 fix(scheduler): set options ContainerNumaAllocate default true (#24869) 2026-05-21 19:31:44 +08:00
Zexi Li
07cb7a5a6f feat(region,host): upload nvidia gpu memory size (#24868) 2026-05-21 16:20:40 +08:00
cwz_eikoh
b0cf03c486 feat(hermes): connect vllm/sglang/ollama (#24842)
Co-authored-by: Zexi Li <zexi.li@icloud.com>
2026-05-21 11:41:01 +08:00
cwz_eikoh
ff6d21e6ca feat(llm): create llm_sku from llm_model_set (#24855) 2026-05-21 11:40:23 +08:00
cwz_eikoh
f8ee734d8f feat(llm): Implement resumable downloads for models from Hugging Face (#24843) 2026-05-21 10:48:27 +08:00
Zexi Li
389583d36c fix(region): ensure lb backend check_status returned when check_code missing (#24856) 2026-05-21 10:34:02 +08:00
wanyaoqi
0be8e92d17 fix(host): remove cgroup root path check quotation marks (#24850) 2026-05-21 10:30:14 +08:00
Zexi Li
be90e452dc feat(llm): llm deployemnt (#24848) 2026-05-20 11:06:23 +08:00
Jian Qiu
6649b066ba Revert "fix: revert host masquerade setting (#24827)" (#24846)
This reverts commit 81149c89f6.
2026-05-19 21:01:42 +08:00
Zexi Li
02a83dc4ab fix(region): query metrics from monitor service (#24840) 2026-05-19 18:02:41 +08:00
Zexi Li
83d434bceb fix(llm): persistent /config dir of hermes agent (#24835) 2026-05-18 14:57:39 +08:00
Zexi Li
14b3048e61 feat(climc): add generic feature-config command (#24830)
Add a generic `feature-config <feature> <on|off>` command alongside the
existing per-feature `feature-config-<name>` commands. A `--force` flag
skips the known-features validation so new features can be toggled
without a code change. Also adds "ai" to the known feature list.
2026-05-18 14:28:46 +08:00
Jian Qiu
81149c89f6 fix: revert host masquerade setting (#24827)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2026-05-15 01:56:52 +08:00
cwz_eikoh
211619b685 feat(llm): support sglang (#24820) 2026-05-14 16:47:01 +08:00
Jian Qiu
ab3c557878 fix: lbagent keepalived service run may exit (#24804)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2026-05-13 12:07:43 +08:00
屈轩
ead788f066 fix(region): support stop for change vm config (#24815) 2026-05-12 19:48:02 +08:00
屈轩
8c200905b2 fix(region): update gp3 disk size (#24808) 2026-05-12 17:27:52 +08:00
cwz_eikoh
aec0118414 Feature(vllm): use entrypint instead of StartLLM (#24801)
* feat(llm): use entrypoint instead of StartLLM

* feat(llm): adapt front-end in comfyui instant-model
2026-05-12 10:43:05 +08:00
Zexi Li
6c4d68f3b8 fix(llm): honor SLLM device override when building container spec (#24799) 2026-05-11 20:06:35 +08:00
wanyaoqi
3fcde7842d fix(host): remove -no-kvm args, -no-kvm argument was a synonym for setting -machine accel=tcg (#24790) 2026-05-11 20:00:30 +08:00
wanyaoqi
8a52df081d fix(host): check is cpu hotplug support on guest init (#24785) 2026-05-11 19:59:02 +08:00
Zexi Li
b2ec881a68 feat(llm): add SLLM mounted_models override and driver-level validation (#24797) 2026-05-11 17:41:28 +08:00
Zexi Li
20612e6f4a feat(monitor): use GET for unifiedmonitors resource-metrics (#24783) 2026-05-08 16:19:51 +08:00
Zexi Li
45c0cc4636 fix(monitor): dedupe alert trigger condition in notify templates (#24779) 2026-05-07 15:52:29 +08:00
cwz_eikoh
a0a34f27f6 Feature/comfyui instant model (#24760)
* feat(llm): support cursor

* feat(llm): support import from huggingface

* fix(llm): direction error

* feat(llm): support instant model for comfyui

* feat(llm): support multi file select when save-instant-model
2026-05-07 14:42:44 +08:00
wanyaoqi
55ae324537 feat(host): mps add container device configuration (#24771) 2026-05-07 10:03:42 +08:00
屈轩
000f066e8c fix(esxi-agent): pve agent (#24768) 2026-05-06 17:15:37 +08:00
屈轩
44ae4b68df fix(region): avoid vm set status start fail when serivce restart (#24764) 2026-05-06 12:40:56 +08:00
wanyaoqi
c36093b1e4 fix(host): cpu hotplug compatible with high qemu version (#24759) 2026-05-03 23:22:13 +08:00
wanyaoqi
fe665d986c fix(host): auto merge backinf file generate disks index (#24754) 2026-05-03 23:21:33 +08:00
Zexi Li
d6abdc0bef fix(monitor): normalize resource-metrics alert_state (#24757)
Treat attach and init as init in PerformResourceMetrics output.
2026-04-30 18:42:08 +08:00
Zexi Li
71dd2068c4 fix(monitor): support influxql derivative and difference function translation (#24749) 2026-04-30 13:11:58 +08:00
Jian Qiu
b46f53a033 fix: init ifb kernel module (#24747)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2026-04-29 23:49:31 +08:00
wanyaoqi
cc8cb4dbdf fix(mcclient,region): add tasks mod, service app options (#24731) 2026-04-29 23:47:54 +08:00
屈轩
caa1c9e458 fix(region): optimized listener rule list (#24741) 2026-04-29 14:09:23 +08:00
Zexi Li
88caf1cd2b fix(host,llm): fix pod shm mount path return and llm restart memory config (#24738)
- Return shmPath instead of empty string when mountpoint is already
  mounted, so callers get the correct path
- Remove incorrect +1 offset in memory comparison and size formatting
  during LLM restart config change
2026-04-28 19:57:48 +08:00
Zexi Li
986d0fbd8d fix(lbagent,monitor): use victoria-metrics for telegraf and fix influxql translation (#24733) 2026-04-27 16:42:08 +08:00
Jian Qiu
e6ba085e37 fix: create redirect lb listener fail (#24726)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2026-04-27 10:01:28 +08:00
屈轩
49afcfea5b fix(region): lb redirect rule create validate (#24728) 2026-04-27 10:00:41 +08:00
wanyaoqi
48bdf5e230 chore(host-deployer): update host-deployer-base to 1.5.9 (#24721) 2026-04-26 23:02:45 +08:00
Zexi Li
0c6a3770b5 feat(llm): support OpenClaw manual config mode (#24720)
When ManualConfig is enabled, inject OPENCLAW_MANUAL_CONFIG=1 env var
and skip provider/channel credential injection, allowing users to
configure providers and channels themselves inside the desktop.
2026-04-24 11:45:53 +08:00
cwz_eikoh
65e1160c00 Feature/hf-search (#24717)
* llm: add instant-model huggingface query commands

* fix(vllm): use ping instead of health
2026-04-24 10:28:13 +08:00
wanyaoqi
94a861e0b9 fix(host): usb device passthrough use hostport (#24709) 2026-04-23 13:52:37 +08:00
Jian Qiu
43f0a542cf fix: guest change ipaddr no-sync option (#24715)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2026-04-23 13:51:52 +08:00
Jian Qiu
07d26676d2 fix: handling deleted task object (#24703)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2026-04-23 10:18:42 +08:00
屈轩
e5a136056f fix(notify): remove useless code (#24710) 2026-04-21 19:37:33 +08:00
Zexi Li
b61af890d1 refactor(llm): extract shared desktop webtop config (#24701)
Move common desktop/webtop container envs, base spec, rootfs, and login-info parsing
into llm_container helpers and reuse in openclaw and hermes-agent drivers.
2026-04-21 15:04:54 +08:00
Zexi Li
45a1498578 fix(scheduler): refactor the pending usage logic (#24706) 2026-04-21 15:03:56 +08:00
Matt Gideon
70c078aa27 fix(host): fix isolated device detection regex for PCI and USB devices (#24690) 2026-04-20 14:04:23 +08:00
Zexi Li
54f4b36e05 feat(llm): support hermes-agent (#24697) 2026-04-20 12:47:30 +08:00
cwz_eikoh
ff89a3839b feat(llm): add hostpaths for llm-sku (#24693) 2026-04-20 10:51:16 +08:00
屈轩
fd157b1be4 fix(region): show associate info (#24687) 2026-04-17 10:10:24 +08:00
Jian Qiu
937067d7e3 fix: add version etc. aux handlers to mcp-server (#24685)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2026-04-17 09:59:52 +08:00
屈轩
8e3a55588c fix(region): vendor update (#24683) 2026-04-16 23:09:44 +08:00
Jian Qiu
430efcc068 feature: support asymmmetric bandwidth limit (#24680)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2026-04-16 15:16:02 +08:00
Jian Qiu
076866bcd8 fix: climc container related commands improvements 20260414 (#24671)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2026-04-15 10:05:34 +08:00
屈轩
5031335cb3 fix(region): sched fail notify (#24676) 2026-04-14 20:13:10 +08:00
屈轩
cb24c2d97e fix(region): disk fail notify (#24673) 2026-04-14 16:27:31 +08:00
Zexi Li
fc6079ed86 fix(llm): harden volume resize and update size log (#24670)
- Wait for disk/desktop status after resize via backup worker
- Centralize volume SizeMB update with resize action log
- Expose vCPU/memory fields in LLM customize columns
2026-04-13 14:39:02 +08:00
Zexi Li
71cf58d63d feat(climc): support setting rootfs sub_directory (#24668) 2026-04-13 11:16:56 +08:00
Zexi Li
139ac88c53 fix(region): set rootfs default sub_directory (#24667) 2026-04-13 10:00:17 +08:00
屈轩
af2d09a0d7 fix(esxi-agent): support esxi vm forder name same with vm name (#24663) 2026-04-13 09:50:44 +08:00
屈轩
448bae5037 fix(region): support query public cloud vm modification types (#24653) 2026-04-10 16:53:45 +08:00
wanyaoqi
31e935ad89 fix(region): optimize fetchHostGuestResource (#24634) 2026-04-10 16:51:54 +08:00
Zexi Li
c6fe02c95d fix(host): restart container on exit when AlwaysRestart is set (#24662) 2026-04-10 15:17:35 +08:00
Jian Qiu
25e479ffc4 fix: vpcagent sync inconsistent networkaddress guestnetwork id (#24657)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2026-04-10 14:44:30 +08:00
屈轩
8d4f05edbb fix(mcp-server): update mcp docs (#24651) 2026-04-09 20:44:22 +08:00
屈轩
36d7c2ee5b fix(cloudmon): vendor update (#24642) 2026-04-09 16:33:08 +08:00
Jian Qiu
af9b9e3f3a fix: upgrade coredns to v1.10.1 at master (#24620)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2026-04-08 16:27:11 +08:00
Jian Qiu
05f7e7cae3 fix: undo pr 24532 (#24640)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2026-04-08 16:25:46 +08:00
Zexi Li
1079017a92 docs(readme): add AI Cloud introduction to README (#24635)
Add AI Cloud section to both English and Chinese README files,
including core capabilities (inference, app management, model library,
templates, GPU ops) and supported applications (Ollama, OpenClaw,
Dify, ComfyUI).
2026-04-08 14:59:20 +08:00
wanyaoqi
3ae9d58b91 feat(host): container add rbd disk support (#24625) 2026-04-08 13:27:55 +08:00
屈轩
b93cc72610 fix(region): clean guest network when purge zone (#24626) 2026-04-07 20:55:40 +08:00
屈轩
54bec90d8f fix(region): esxi wire sync (#24616) 2026-04-04 12:16:55 +08:00
Zexi Li
8223dc98b0 feat(host): support CTyunOS rootfs (#24613) 2026-04-02 17:48:07 +08:00
屈轩
54a98594be fix(region): vendor update (#24609) 2026-04-02 10:34:51 +08:00
cwz_eikoh
f73e975920 feat(llm): get available models from base_url (for ollama & openai) (#24605) 2026-04-01 15:44:11 +08:00
Zexi Li
7e58612829 fix(monitor): update silent_period when channel is empty (#24604)
silent_period is stored as Frequency on the notification, not on the
alert itself. PostUpdate only called UpdateNotification (which recreates
notifications with the new silent_period) when Channel was non-empty.
When channel was an empty array, the silent_period update was silently
skipped. Add an else-if branch to directly update the existing
notifications' Frequency when silent_period changes but channel is empty.
2026-03-31 20:03:45 +08:00
Matt Gideon
31a1aa7f26 fix(host): use findmnt instead of df to detect local mount point (#24579) 2026-03-31 18:06:57 +08:00
Zexi Li
d4ce3799a9 feat(monitor): add batch resource metrics query API (#24598)
Add unifiedmonitor class action `resource-metrics` with client options/CLI command.
Implement host/guest metric drivers to query cpu/mem/disk/net rates and attach alert state.
2026-03-31 17:45:32 +08:00
Jian Qiu
65bf21a163 fix: support build specific multi-arch buildx (#24589)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2026-03-31 17:43:44 +08:00
Jian Qiu
d8401ff3e3 fix: add customer usable filters that filter noaddr networks (#24586)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2026-03-31 17:41:52 +08:00
Jian Qiu
578a6d62d7 fix: update extar fields when updating status field (#24595)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2026-03-31 12:13:50 +08:00
Zexi Li
0926369440 fix(host): use proper shell quoting in pod tar/find commands (#24594)
Add shellQuote helper that safely escapes single quotes and apply it
consistently across tarGzDir and tarHostDir to prevent shell injection
via crafted paths, directory names, or exclude patterns.
2026-03-31 12:04:43 +08:00
Zexi Li
a87233af86 fix(host): get pod status by primary container status (#24583) 2026-03-30 16:21:40 +08:00
wanyaoqi
6f7a0de025 fix(host): add ovmf 4m code (#24577) 2026-03-30 07:54:37 +08:00
Zexi Li
7756be9d38 fix(llm): 修复 llm 镜像没有根据 sku 更新的问题 (#24574) 2026-03-26 21:46:00 +08:00
屈轩
2ef0f7db71 fix(logger): add syslog init log (#24554) 2026-03-26 18:11:34 +08:00
wanyaoqi
037b4c1d2c fix(region): validate kickstart enabled (#24560) 2026-03-26 18:10:13 +08:00
Zexi Li
1546612893 fix(region): order containers by created_at time (#24568) 2026-03-26 12:25:33 +08:00
Zexi Li
3fd0c13e1a fix(keystone): allow blob update for image credentials (#24565)
Also fix type check to allow secret/image only.
2026-03-26 11:41:19 +08:00
屈轩
e2f4b7b6ce fix(region): add domain container usage (#24561) 2026-03-25 18:26:15 +08:00
cwz_eikoh
7598268cd5 fix(vllm): user customize args & health check in hostlocal net (#24543) 2026-03-25 10:36:21 +08:00
wanyaoqi
d7fc457d02 Automated cherry pick of #24544: fix(host): metadata handler proxy telegraf data fix tenant_id (#24545)
* fix(host): metadata handler proxy telegraf data

* fix(host): append unknown dmesg to last entry
2026-03-25 10:34:20 +08:00
Jian Qiu
4ae694b26d fix: lbagent genHaproxyConfig possible nil pointer panic (#24539)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2026-03-25 10:33:13 +08:00
Jian Qiu
8673c046a9 fix(hostmetrics): add checks for incomplete pod and container stats (#24551)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2026-03-25 10:31:37 +08:00
屈轩
304b2e334c fix(region): add container usage (#24540) 2026-03-25 10:23:16 +08:00
屈轩
265b4d66b4 fix(host-image): update script for riscv64 host-image (#24533) 2026-03-24 11:37:26 +08:00
Zexi Li
549fa5c9da fix(host): probing multiple container status (#24531) 2026-03-24 10:27:29 +08:00
wanyaoqi
c21af671d6 fix(host): dd zero to lv wife partitions on lvremove (#24527) 2026-03-23 19:01:21 +08:00
wanyaoqi
010ca7d2e2 fix(host-deployer): resizefs add fstype LVM2_member (#24517) 2026-03-23 00:00:34 +08:00
wanyaoqi
2fa1606e7c fix(region): check instance snapshot joint is nil on snapshot purge (#24515) 2026-03-22 23:59:39 +08:00
屈轩
1ec3a231b3 fix(apigateway): stream download content-type (#24507) 2026-03-20 13:41:34 +08:00
Jian Qiu
70fbfe8946 feature: support host-local wire (#24490)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2026-03-20 01:36:29 +08:00
wanyaoqi
bc43d884c5 Automated cherry pick of #24456: Fix/host deployer nbd driver40 (#24466)
* fix(host-deployer): nbd add concurrency control

* fix(host-deployer,glance): windows image add current version
2026-03-20 01:34:20 +08:00
Zexi Li
e25d6eb814 feat(llm): unify container access url info and login response (#24505) 2026-03-19 23:06:44 +08:00
wanyaoqi
51724b1b21 fix(host-deployer): get resize dev by serial panic (#24448) 2026-03-19 23:04:37 +08:00
cwz_eikoh
b8aa072b7e Feature(mcp): support x-api-key authentication for mcp-server (#24471)
* feat(mcp-server): support base64 ak/sk

* fix(mcp-agent): try to fix route of default-mcp-tools
2026-03-19 15:04:37 +08:00
cwz_eikoh
bdc211a779 feat(llm): support model import for vllm (#24499) 2026-03-19 15:03:35 +08:00
wanyaoqi
dfaf5bca39 fix(glance): cache images to ceph add brand filter (#24473)
* fix(glance): cache images to ceph add brand filter

* fix(region): iso image support default uefi boot mod
2026-03-19 11:45:08 +08:00
Jian Qiu
9f752de9cb fix: logger add app-options-show api (#24495)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2026-03-19 11:44:17 +08:00
屈轩
abf2c17ef3 fix: update api doc (#24496) 2026-03-19 11:01:11 +08:00
屈轩
17d3e9f0fb fix(region): allow set disk auto-delete attribute (#24486) 2026-03-19 10:27:47 +08:00
Zexi Li
98b7509522 fix(llm): derive openclaw auth password from llm id (#24482) 2026-03-18 19:02:14 +08:00
屈轩
02052405cc fix(region): vendor update (#24481) 2026-03-18 18:51:26 +08:00
wanyaoqi
d64f7fde42 fix(baremetal-agent): bm register reuse baseprepare updateBmInfo (#24472) 2026-03-18 10:10:13 +08:00
Zexi Li
860a8f764a fix(monitor): align multi-metric alert conditions in notifications (#24470) 2026-03-17 15:57:51 +08:00
屈轩
bd2ffa7c46 fix: add more log info (#24460) 2026-03-17 14:38:50 +08:00
Zexi Li
3dcc91434c feat(llm): add llm_types filters and cleanup dify cli (#24458) 2026-03-16 18:05:05 +08:00
Zexi Li
04d29503ee feat(llm): 调整 openclaw 容器与 LLM 基础模型/sku 逻辑 (#24455) 2026-03-16 16:20:01 +08:00
Zexi Li
169ff8fcab fix(llm): mount openclaw home dir (#24451) 2026-03-13 20:38:48 +08:00
屈轩
d5bed784d8 fix(region): avoid delete ksyun vm error (#24440) 2026-03-13 15:23:05 +08:00
Jian Qiu
55f54cc697 fix: compat fixes for container host in vm (#24445)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2026-03-13 13:26:59 +08:00
cwz_eikoh
d3ab4af466 feat(llm): init vllm as llm_container (#24338)
* feat(llm): init vllm as llm_container

* feat(vllm): fix save-instant-model for vllm

* feat(llm): support quick-model for vllm

* feat(vllm): support preferred-model in llm

* fix(llm): add ValidateSpec in llm_container_driver

* feat(vllm): auto-set vllm params
2026-03-13 11:07:02 +08:00
Zexi Li
1fe46558ce feat(host): rotate container logs (#24433) 2026-03-12 15:15:14 +08:00
Zexi Li
cf2f140c08 feat(llm): add login-info api (#24431) 2026-03-12 07:21:20 +08:00
wanyaoqi
86ab99b270 fix(region): guestnetworksecgroup list add network info (#24394) 2026-03-11 19:32:01 +08:00
wanyaoqi
bf838b80c0 fix(host): check file exist before copy ovmf vars (#24367) 2026-03-11 19:29:50 +08:00
Zexi Li
6dbc39b04f feat(llm): restart action (#24427) 2026-03-11 19:08:28 +08:00
屈轩
2203c2322c fix(cloudmon): update volc api (#24422) 2026-03-11 16:54:39 +08:00
Zexi Li
3bdd431db0 Automated cherry pick of #24411: openclaw llm agent (#24420)
* support comfyui and openclaw

feat(region,host): support env credential of container

feat(llm): openclaw url

* fix(region): delete server without host_id

* feat(llm): llm spec
2026-03-11 15:21:31 +08:00
屈轩
2f8f46f890 fix(monitor): add vm out bandwidth metric (#24416) 2026-03-11 13:49:50 +08:00
屈轩
9cbf9a27dc fix(region): vendor update (#24412) 2026-03-11 11:03:12 +08:00
屈轩
af8f9b06ef fix(region): persistence server status change (#24407) 2026-03-10 15:06:36 +08:00
cwz_eikoh
4d625207bb feat(llm): polymetric dify with llm (#24399)
* feat(llm): polymetric dify with llm

* fix(llm): drop LLMSpecHolder & fix some bugs
2026-03-10 10:23:34 +08:00
Zexi Li
2d25a147eb fix(region): associate eip to pod (#24404) 2026-03-09 15:24:21 +08:00
Zexi Li
92322ba6ba fix(monitor): 仅在 From/To/Interval 为空时设置默认值 (#24396)
setDefaultValue 中 From、To、Interval 改为仅在当前值为空时
才用 inputQuery 覆盖,避免覆盖用户已指定的查询时间范围与间隔
2026-03-06 19:13:19 +08:00
Zexi Li
2385e921ff fix(host): hard code start index of va gpu (#24391) 2026-03-05 11:55:24 +08:00
Zexi Li
6968d8278b feat(host): cgroupv2 implemented for pod (#24388) 2026-03-04 11:22:06 +08:00
cwz_eikoh
a279c4f89f fix: some bugs in mcp-agent & llm (#24355)
* fix(mcp-agent): encoding issue when simulated streaming

* fix(mcp-agent): use chat-stream in phase tool-choose

* fix(mcp-agent): support reasoning model

* fix(llm): add pre-delete detection

* feat(mcp-agent): add default mcp-agent

* feat(mcp-agent): add default-mcp-tools
2026-03-03 16:07:32 +08:00
cwz_eikoh
efea8bdbf7 feat(mcp-server): add mcp-server config (#24354)
* feat(mcp-server): add mcp-server config

* fix(mcp-agent): add claude mcp-server-config
2026-03-03 16:06:07 +08:00
屈轩
700ba69483 fix(esxi-agent): vendor update for rebuild root fail (#24378) 2026-03-03 00:10:28 +08:00
Zexi Li
86bff744da feat(monitor): support disable_notify_recovery for commonalert (#24377) 2026-03-02 16:13:21 +08:00
屈轩
bdb3a90964 fix(region): check bind disk resource (#24371) 2026-03-02 12:02:48 +08:00
屈轩
949cef6348 fix(region): snapshot size opslog (#24368) 2026-02-28 16:38:23 +08:00
屈轩
fa30390902 fix(region): avoid sync remove disk (#24361) 2026-02-27 15:05:48 +08:00
屈轩
3a9d04254e fix(ansibleserver): update telegraf (#24358) 2026-02-27 14:06:33 +08:00
Jian Qiu
525d0ff8ed fix: allow uncache deleted image (#24352)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2026-02-26 23:07:32 +08:00
wanyaoqi
b72ee232e4 fix(host): add guest max mem size options (#24333) 2026-02-26 20:26:28 +08:00
Zexi Li
e3adcba461 fix(monitor): convert SNodeAlert to SCommonAlert in FetchCustomizeColumns (#24345)
Pass cObjs of type *SCommonAlert to SCommonAlertManager.FetchCustomizeColumns
instead of *SNodeAlert so the parent correctly fetches common alert columns.
2026-02-25 19:31:59 +08:00
Jian Qiu
3023c9cadb fix: keep climc network-create backward compatibility (#24341)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2026-02-25 09:02:59 +08:00
屈轩
b3a1b09963 fix(region): avoid account sync cost time abnormal (#24334) 2026-02-24 17:33:51 +08:00
Jian Qiu
4f3b357173 fix: instance snapshot virtual size (#24327)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2026-02-24 09:23:00 +08:00
Zexi Li
b81306bb13 fix(region): wrong args type on callback function of DiskCreateTask (#24332) 2026-02-13 17:09:43 +08:00
Zexi Li
4faf4e87b4 fix(host): do not set cached image status to active for TGZ on host (#24326)
TGZ images are unpacked after fetch on host; leave status update to region
StorageCacheImageTask so cachedimage becomes active only in OnCacheSucc.
2026-02-13 10:05:39 +08:00
Jian Qiu
998ac1ae75 fix: ensure s3 client init for s3 storage driver (#24323)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2026-02-12 10:01:49 +08:00
Zexi Li
cfaf88752a feat(region,host): support post overlay uppper config (#24318) 2026-02-11 16:57:52 +08:00
屈轩
4ccb4147e9 fix(yunionconf): policy scope (#24313) 2026-02-11 11:23:45 +08:00
wanyaoqi
39c1392dcd fix(host): set dmesg parse failed log level to debug (#24311) 2026-02-11 00:27:11 +08:00
wanyaoqi
cd5e71e037 fix(host-deployer): deploy single disk has no disk id (#24306) 2026-02-10 19:36:18 +08:00
wanyaoqi
aaa314feca Automated cherry pick of #24301: fix(host-deployer): online resize loop dev (#24303)
* fix(host-deployer): online resize loop dev

* fix(host-deployer): update host-deployer-base
2026-02-10 17:08:09 +08:00
Zexi Li
f308bf746f Automated cherry pick of #24290: feat(monitor): support alert reason notification (#24296)
* feat(monitor): support alert reason notification

* fix(climc): commonalert list options
2026-02-10 09:06:51 +08:00
Jian Qiu
a79eedff8d fix: guest syncstatus subtask for disk create task (#24295)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2026-02-10 09:03:46 +08:00
屈轩
9a88e9afc9 fix(notify): notify receiver (#24288) 2026-02-09 20:42:35 +08:00
屈轩
4c32b50e67 fix(docs): update api doc (#24289) 2026-02-09 19:18:33 +08:00
Jian Qiu
a72601cf9e fix: remove parent task info from task context (#24286)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2026-02-09 13:22:53 +08:00
wanyaoqi
2584a7b58e fix(host): add device_id only scsi-hd device (#24281) 2026-02-09 11:27:06 +08:00
wanyaoqi
cf1bd85087 fix(host): deploy nics config defore do add nics (#24278) 2026-02-09 08:37:41 +08:00
Jian Qiu
21ec090203 fix: unify lb charge type (#24271)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2026-02-08 18:43:03 +08:00
Jian Qiu
cc3a44634b feature: support postpaid traffic metering (#24243)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2026-02-08 12:57:34 +08:00
wanyaoqi
f76bc53e90 feat(region,host,vpcagent): allow guest network dedicate secgroups (#24263) 2026-02-07 17:32:12 +08:00
wanyaoqi
52df8590b0 fix(region,host): rbd snapshot get actual size (#24242)
- add host down and auto migrate notification
2026-02-07 17:31:23 +08:00
屈轩
7108a3b237 fix(region): vendor update (#24264) 2026-02-07 13:51:35 +08:00
wanyaoqi
12bd3be56c fix(region,host): rename screen dump info structure (#24260) 2026-02-06 18:10:19 +08:00
cwz_eikoh
4099ca7521 fix(llm): add handler in apigateway for mcp-agent-chat (#24253) 2026-02-05 18:04:40 +08:00
屈轩
c4820937c0 fix(region): update api doc (#24252) 2026-02-05 16:48:07 +08:00
屈轩
8fe0f2b171 fix(region): snapshot policy operation (#24247) 2026-02-05 16:40:25 +08:00
wanyaoqi
8ccf60e359 fix(glance): set s3 bucket name before s3 init check (#24239) 2026-02-04 23:08:05 +08:00
屈轩
6c60c9bc43 fix(yunionconf): support tags (#24230) 2026-02-04 17:13:54 +08:00
屈轩
188f8e93fc fix(region): public cloud sku create (#24225) 2026-02-04 14:56:44 +08:00
屈轩
310f892904 fix(region): support cloudpods vm disk driver (#24220) 2026-02-04 14:28:05 +08:00
Zexi Li
7401603981 fix(region,climc): persist netinterface vlan_id to hostnetwork (#24216)
- climc: add VlanId to host-add-netif, host-remove-netif, host-enable-netif,
  host-disable-netif
- region: set bn.VlanId from netif.VlanId when attaching to network
- mcclient: include Vlan_ID in baremetalnetworks list columns
2026-02-04 11:03:41 +08:00
屈轩
3e5d16875d fix(host): support skip check kernel mod (#24217) 2026-02-04 10:29:54 +08:00
屈轩
ecc9ba0d86 fix(region): avoid duplicate check when update account aksk (#24211) 2026-02-03 20:53:27 +08:00
cwz_eikoh
8b10d33682 Fix(llm): some mistakes, use CmpId & InstantModelId insteadof SvrId & ModelId (#24194)
* fix(llm): some mistakes

* fix(llm): use CmpId instead of SvrId

* fix(llm): instant_model use id instead of modelId
2026-02-03 15:15:15 +08:00
Zexi Li
aaeb06dc1e fix(monitor): comparator string (#24204) 2026-02-03 12:02:04 +08:00
屈轩
1259dd2121 fix(region): init snapshot policy disk table (#24197) 2026-02-02 20:38:58 +08:00
wanyaoqi
1d40b73b11 fix(host): guestnetworksync do nothing on detach vfio nic (#24180) 2026-02-02 20:17:17 +08:00
Jian Qiu
1c35d08a9c fix: allow guestnetwork ip4 addr field nullable (#24190)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2026-02-02 20:16:14 +08:00
Zexi Li
a43483fd53 feat(monitor): add the registered model manger function (#24195) 2026-02-02 17:51:01 +08:00
屈轩
afe835d883 fix(climc): sku create support arch (#24185) 2026-02-02 14:17:03 +08:00
屈轩
48e5929ba7 fix(notify): support webhook sign (#24138) 2026-02-02 12:53:35 +08:00
wanyaoqi
3d5bff680d feat(region,host): riscv64 cpu arch support (#24126)
* feat(region,host): riscv64 cpu arch support

* fix(region,host): compatible riscv64

* fix(host): add qemu v10.0.7 support
2026-02-01 20:28:45 +08:00
wanyaoqi
a92d59e4df fix(host): live migrate add timeout (#24161) 2026-02-01 20:23:36 +08:00
wanyaoqi
86475595af fix(region): server add set network num queues (#24168) 2026-02-01 20:13:11 +08:00
wanyaoqi
f7cb8a9b9e fix(glance): set glance s3 bucket name default onecloud-images (#24173) 2026-02-01 20:10:40 +08:00
屈轩
583933916b fix(region): defer ctx cancel (#24154) 2026-01-30 19:11:38 +08:00
cwz_eikoh
e254c2ccf5 Fix(llm): fix bugs & apikey encrypt & support history for mcp-agent-chat & delete modelname in llmSku (#24149)
* fix(llm): mcp-agent apiKey encrypt

* fix(llm): error-handle when instant-model import

* feature(llm): add get-available-network for llm

* feature(llm): support history for mcp-agent-chat

* fix(llm): llm create with net instead of networktype & networkid

* fix(llm): delete modelName in llmSku & fix some bugs
2026-01-29 10:50:00 +08:00
wanyaoqi
b968f9a05f fix(region): have agent add check is telegraf deployed (#24148) 2026-01-29 10:34:48 +08:00
屈轩
2fa3f391f6 fix(region): billing resource create time (#24139) 2026-01-28 20:02:11 +08:00
屈轩
5f9974b249 fix(glance): support prob iso image (#24128) 2026-01-28 15:28:47 +08:00
Zexi Li
86a47f9e86 fix(llm): add community-registry api (#24131) 2026-01-28 14:30:53 +08:00
Jian Qiu
3efe11450c fix: skip baremetal-agent riscv64 (#24122)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2026-01-24 20:32:50 +08:00
屈轩
ffffe734ea fix(region): vendor update (#24117) 2026-01-23 17:03:24 +08:00
屈轩
ea312a3b9a fix(region): cloudpods container sync (#24112) 2026-01-21 15:32:39 +08:00
Jian Qiu
2b890dff68 fix: notify receiver update precedure recode (#24099)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2026-01-20 00:16:15 +08:00
wanyaoqi
81297ecfc6 fix(host): ensure scsi pci addr on add scsi disk (#24098) 2026-01-19 20:16:42 +08:00
cwz_eikoh
1fc8219ee4 feature(llm): adapt frontend (#23906)
* feature(llm): add llm-list details, add autostart for llm-save-instant-model

* fix(llm): adjust some interfaces

* fix: name-dup problem when create llm

* fix: install instant-model by id rather than modelID

* fix(llm): add llm_id for mcp-agent

* feature(llm): move network from sku to instance

* feature(llm): add LLMType for llm-image

* feature(llm): add gpuMemoryRequired & ollama-registry yaml

* feature(llm): add url-get interface

* feature(llm): support mcp in mcp-agent-chat

* fix(llm): abstract ollama registry
2026-01-19 18:06:05 +08:00
屈轩
ebf2fdb151 fix(region): vendor update (#24091) 2026-01-19 14:21:41 +08:00
Jian Qiu
bbfc150e1e fix: user filter revisit (#24088)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2026-01-19 10:51:08 +08:00
Zexi Li
aee8eecb3b fix(telegraf-raid-plugin): working for victoria metrics (#24087) 2026-01-15 17:21:11 +08:00
Jian Qiu
c820b7fbec fix: detailed apigateway auth failure log (#24076)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2026-01-15 10:13:15 +08:00
Zexi Li
7bb8bfe6d0 Automated cherry pick of #24082: fix(host): compatible with telegraf 1.36 and add ipmi_sensor conf (#24083)
* fix(host): compatible with telegraf 1.36 and add ipmi_sensor conf

* feat(monitor): add ipmi_sensor metric
2026-01-15 10:08:24 +08:00
屈轩
4bffb8467c fix(region): vendor update (#24079) 2026-01-14 14:05:21 +08:00
屈轩
ebbf8ea26f fix(glance): avoid context warnning (#24073) 2026-01-14 10:54:47 +08:00
屈轩
e850970f16 fix(region): avoid panic when update user resource (#24070) 2026-01-13 18:20:49 +08:00
屈轩
6132322d79 fix(common): skip octet-stream warnning (#24067) 2026-01-13 18:20:30 +08:00
Zexi Li
acb548567a feat(monitor): delta reducer (#24064) 2026-01-12 17:27:42 +08:00
屈轩
61b2705bd1 fix(region): remove useless mod (#24060) 2026-01-12 14:12:09 +08:00
cwz_eikoh
e9382c9ae7 feature(llm): add mcp-agent (#24025)
* feature(llm): add mcp-agent

* feature(llm): support openai in llm_client

* feature(llm): chat-stream demo
2026-01-12 10:45:53 +08:00
屈轩
6b129dfc04 fix(region): host schedtag sync (#24055) 2026-01-11 18:33:37 +08:00
屈轩
84738bc136 fix(region): allow batch resize disk (#24049) 2026-01-09 14:04:45 +08:00
Zexi Li
209e5445f6 fix(monitor): top query of monitor_resource_alert (#24053) 2026-01-09 12:10:34 +08:00
屈轩
258a1eff0c fix(monitor): optimized common alert list (#24042) 2026-01-09 10:09:45 +08:00
wanyaoqi
5fcc388bf8 fix(host): add query id on detect qemu machine info (#24048) 2026-01-09 08:24:16 +08:00
屈轩
a2e35d42ea fix(monitor): optimized monitor resource list (#24038) 2026-01-08 15:23:20 +08:00
屈轩
a075702974 fix(region): support order by snapshot (#24035) 2026-01-08 11:13:52 +08:00
Zexi Li
c18acaf616 fix(monitor): resource id deduplication of alert record (#24033) 2026-01-07 11:16:00 +08:00
屈轩
afd97ebe65 fix(monitor): show alert count (#24027) 2026-01-07 10:02:58 +08:00
Zexi Li
9fbad19989 Automated cherry pick of #24012: feat(host): mount post overlay layers by shortest path order (#24018)
* fix(host): mount and umount order for post overlay

- support host_lower_map for post overlay image

* feat(host): tar dirs of pod with include patterns
2026-01-06 20:03:41 +08:00
Zexi Li
aaeb09fb72 fix(monitor): fill resource ids of the cloud account (#24030) 2026-01-06 19:44:28 +08:00
wanyaoqi
cafeb89bc6 fix(region): guest batch create isolated devices add host lock (#24014) 2026-01-06 18:10:26 +08:00
Jian Qiu
f50f83feb1 fix: endpoint mode slave (#24016)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2026-01-06 18:05:41 +08:00
屈轩
de05b050e4 fix(region): show pretty error (#24020) 2026-01-06 10:29:33 +08:00
屈轩
b91a3dd280 fix(cloudmon): optimized account balance metric collect (#24010) 2025-12-30 19:56:42 +08:00
屈轩
cfbec98bed fix(region): add billing resource check (#24007) 2025-12-30 18:47:21 +08:00
cwz_eikoh
36d6188385 feature(mcp-server): add InitAuth & userCred (#23972) 2025-12-30 10:36:45 +08:00
wanyaoqi
7dfe635b62 fix(region,host,host-deployer): add win11 tpm support (#23952) 2025-12-29 11:18:56 +08:00
wanyaoqi
f845188037 fix(climc): host set memory commit bound incorrect params (#23975) 2025-12-29 11:01:55 +08:00
wanyaoqi
059c98003f fix(glance): image disk_format use String2ImageFormat (#23989) 2025-12-29 11:00:49 +08:00
Jian Qiu
b0985f1ad0 fix: change OutOfResource http status code to 507 (#23986)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2025-12-29 10:58:58 +08:00
Jian Qiu
56741a74b6 fix: fix missing json tag for struct fields (#24004)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2025-12-29 10:17:14 +08:00
屈轩
37866bcfa5 fix(monitor): alert filter by owner (#24000) 2025-12-29 10:15:38 +08:00
屈轩
29fda0929f fix(region): show host cpu and mem usage (#23997) 2025-12-25 21:57:54 +08:00
屈轩
272597af19 fix(region): ksyun create vm params (#23995) 2025-12-25 10:32:26 +08:00
屈轩
7e0ca229b5 fix(region): vendor update (#23993) 2025-12-24 19:43:28 +08:00
屈轩
97558e43b4 fix(region): update private cloud host cpu and mem usage by cloudmon (#23967) 2025-12-24 19:21:09 +08:00
Zexi Li
dea21b6cea fix(host): make disk mount point shared for unshared post overlay (#23981) 2025-12-24 15:33:41 +08:00
屈轩
375bb0b709 fix(region): show guest nic index (#23959) 2025-12-24 11:33:44 +08:00
Zexi Li
01655b1dcb fix(host): quote include paths when before executing tar (#23970) 2025-12-23 18:12:03 +08:00
Jian Qiu
bfc17bc3c7 feature: assume user login support (#23964)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2025-12-23 13:54:04 +08:00
Zexi Li
9434522102 feat(host): add debug info when restoring backup to disk (#23966) 2025-12-23 12:03:00 +08:00
wanyaoqi
d4046b6c36 Automated cherry pick of #23725: feat(baremetal-agent): Linux PCIE disk support mdadm soft raid (#23930)
* feat(baremetal-agent): Linux PCIE disk support mdadm soft raid

* fix(baremeta-agent): soft raid support intel imsm

* fix: update baremetal-agent base
2025-12-22 13:29:36 +08:00
wanyaoqi
55ab19d1c3 fix(scheduler,host): sort numa node by numa distance check memsize (#23923) 2025-12-22 11:44:01 +08:00
wanyaoqi
9f534e0cc5 fix(region): guest usage by arch (#23956) 2025-12-22 11:42:56 +08:00
Jian Qiu
c6c106496f fix: host compat with ovs in container (#23944)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2025-12-22 11:40:52 +08:00
Jian Qiu
d394a5f9ff fix: host flush addrs instead of reset interface (#23947)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2025-12-18 01:14:28 +08:00
屈轩
c871568082 fix(region): cloudpods pod (#23935) 2025-12-17 16:19:44 +08:00
cwz_eikoh
805b8afe9d feature(llm): add llm-instant-model-import (#23928)
* feature(llm): add llm-instant-model-import

* fix(llm): can't delete llm while deploy faile

* feature(llm): add instant-model-import to instant-model-create
2025-12-17 13:33:57 +08:00
屈轩
fedb460d1e fix(region): disable sync schedtags (#23941) 2025-12-16 20:40:49 +08:00
屈轩
767cc73124 fix(region): disable cloudpods auto create project (#23936) 2025-12-15 15:51:34 +08:00
屈轩
f39b8d6ad0 fix(region): add provider info for sync log (#23934) 2025-12-15 13:47:41 +08:00
Zexi Li
752d0e9fed fix(monitor): meter alert panic (#23921) 2025-12-12 10:20:25 +08:00
屈轩
6827fa2fae fix(region): aliyun system disk size (#23925) 2025-12-12 10:19:26 +08:00
Jian Qiu
fe38cd0dee fix: backup storage edit external url (#23917)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2025-12-09 19:43:37 +08:00
Jian Qiu
f545447f28 fix: splitable not function due to empty datefield (#23911)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2025-12-09 13:35:20 +08:00
屈轩
25b5de68ff fix(region): vendor update (#23903) 2025-12-07 16:01:08 +08:00
屈轩
9ee1c346d7 fix(region): baidu storage info (#23901) 2025-12-05 16:20:40 +08:00
cwz_eikoh
4c701fa082 Feature/pre quick model (#23898)
* feat: add preinstall for quick-models

* fix: drop error when duplicate blobs
2025-12-05 10:33:45 +08:00
Zexi Li
1d5e173cd0 fix(host): ensure a single file dir when mounting (#23897) 2025-12-04 13:54:21 +08:00
cwz_eikoh
142e540f7f [Feature] llm model 使用 post_overlay 功能实现秒装挂载模型 (#23769)
* feat(llm): add probed-package

* feat(llm): add llm-save-instant-app

* feat(llm): add some llm-instant-app options

* fix(llm): change app to model

* fix(llm): rename origin model to sku

* feat(llm): add llm-quick-models

* fix(llm): saved paths for instant model

* fix(llm): fix quick-install-model

---------

Co-authored-by: Zexi Li <zexi.li@icloud.com>
2025-12-03 16:27:10 +08:00
Zexi Li
bdf22fd797 fix(monitor): filter baremetal host for no data query (#23894) 2025-12-03 16:24:41 +08:00
Zexi Li
523e4eba17 fix(apigateway): load llm (#23887) 2025-12-03 16:21:15 +08:00
屈轩
b3e55ae4c9 fix(region): optimized backend sync (#23889) 2025-12-03 15:14:12 +08:00
屈轩
f48a23cbfa fix(region): aliyun vnc addr (#23883) 2025-12-03 14:04:11 +08:00
Zexi Li
6af0bd4b03 fix(host): remove empty files used bind mount (#23882) 2025-12-02 19:34:12 +08:00
wanyaoqi
dce09a3117 fix(host,host-deployer): host-deployer add password quality check (#23876) 2025-12-02 17:02:42 +08:00
Zexi Li
0971950307 Automated cherry pick of #23878: feat(monitor): 支持指定过去时间段返回报警资源最多的top5监控策略 (#23880)
* feat(monitor): 支持指定过去时间段返回报警资源最多的top5监控策略

* feat(monitor): 支持指定过去时间段返回报警数量最多的top5资源

* feat(monitor): 支持指定过去时间段某监控策略下各监控指标报警资源最多的top5资源

* feat(monitor): 支持获取过去时间段各项目下报警资源数量
2025-12-02 15:48:01 +08:00
屈轩
201a1e33f1 fix: update host-deploy base image (#23870) 2025-12-01 11:41:08 +08:00
屈轩
36612bec31 fix(region): vendor update (#23867) 2025-11-30 17:20:38 +08:00
Zexi Li
f95c341f44 fix(monitor): filter alertrecords by alert_name and res_name (#23865) 2025-11-28 18:58:16 +08:00
屈轩
8778a2d83c fix(region): vendor update (#23858) 2025-11-27 20:35:30 +08:00
Zexi Li
ec08f2b07b fix(monitor): alert shield is not working (#23862) 2025-11-27 19:18:45 +08:00
屈轩
f2ae949583 fix(keystone): change token AuditIds width (#23852) 2025-11-27 17:19:43 +08:00
Zexi Li
245dfd8601 fix(monitor): threshold_range message (#23857) 2025-11-27 16:47:43 +08:00
Zexi Li
b1b929ea46 feat(monitor): support threashold range (#23853) 2025-11-27 15:00:08 +08:00
Zexi Li
105d7afb9a feat(climc): support --ouput option for pprof command (#23842) 2025-11-27 14:19:02 +08:00
wanyaoqi
fd47ba567b Fix/host misc fix (#23846)
* fix(host): host register return wrong error value

* fix(host): host handlers use gotypes check ret value is nil
2025-11-27 09:57:16 +08:00
屈轩
8a07c64022 fix(region): vendor update (#23843) 2025-11-26 16:56:54 +08:00
Jian Qiu
802012eb36 fix: generic guest delete task (#23836)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2025-11-26 01:00:59 +08:00
wanyaoqi
d04a3a52b6 fix(region,host): perform screendump no save to s3 (#23831) 2025-11-26 01:00:24 +08:00
wanyaoqi
24d85b82ab fix(region): disk take snapshot check backing snapshot is merged (#23832) 2025-11-26 00:58:58 +08:00
屈轩
3017afa872 fix(region): support vmware resource pool (#23830) 2025-11-25 19:07:39 +08:00
Zexi Li
067f2773e6 feat(monitor): get records of monitor_resource_alert (#23825) 2025-11-24 21:34:26 +08:00
屈轩
2188834cd6 fix(region): vendor update (#23819) 2025-11-24 14:17:57 +08:00
Jian Qiu
04c1b43c8b fix: validate policy role delete condition (#23816)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2025-11-21 10:59:28 +08:00
Zexi Li
eb23d862c1 fix(monitor): alerting level (#23801) 2025-11-21 10:27:00 +08:00
Jian Qiu
7baeb2396a fix: region-dns not support dameng dialect (#23809)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2025-11-21 09:55:06 +08:00
屈轩
c8ccbc6452 fix(region): snapshot policy resource purge (#23803) 2025-11-20 23:41:47 +08:00
Zexi Li
bb8b08b091 fix(monitor): title of notification by language context (#23799) 2025-11-20 20:11:54 +08:00
屈轩
b3bda90176 fix(monitor): avoid panic (#23794) 2025-11-20 18:43:04 +08:00
云原生驿站
7b125d65f3 fix(host): format sLsusbTree field content json tag (#23787) 2025-11-20 18:13:12 +08:00
Zexi Li
ce8f84add6 fix(monitor): check if LastSendNotification is zero (#23782) 2025-11-20 18:04:10 +08:00
屈轩
c54bca0874 fix(region): migrate snapshot policy resource (#23773) 2025-11-20 17:38:09 +08:00
屈轩
7bc3178aca fix(cloudmon): account balance metric with tenant_id (#23784) 2025-11-20 14:22:14 +08:00
屈轩
0938fac2ec fix(cloudmon): avoid undetected new resources (#23777) 2025-11-20 10:48:47 +08:00
Zexi Li
7442954db5 fix(baremetal-agent): msdos typo in grub configuration (#23776) 2025-11-20 10:39:26 +08:00
Jian Qiu
65fdbd20bf fix: support build rpm/deb of riscv64 (#23768)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2025-11-19 17:39:40 +08:00
屈轩
ccd731874c fix: support risc-v (#23699) 2025-11-19 17:13:57 +08:00
Jian Qiu
6ad082ed47 fix: diskbackup fail to syncstatus on offline backend (#23767)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2025-11-19 11:39:58 +08:00
Jian Qiu
43d9ea5295 fix: export/import disk backup (#23759)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2025-11-18 23:49:29 +08:00
Zexi Li
692729443f fix(host): use directory of single file as post_overlay lower (#23757) 2025-11-18 16:34:56 +08:00
Zexi Li
c416b7efcb feat(monitor): set alert_channel to metata (#23755) 2025-11-18 12:52:44 +08:00
屈轩
728a889823 fix(region): esxi vm folder (#23753) 2025-11-17 18:14:07 +08:00
屈轩
5415d1dde2 fix(region): server sku create status (#23748) 2025-11-17 17:01:12 +08:00
wanyaoqi
12b9ffb1e3 feat(region,host): host dmesg collect (#23747) 2025-11-17 15:44:51 +08:00
Jian Qiu
09125bc316 fix: filter schedtags by zones (#23742)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2025-11-15 11:00:51 +08:00
Jian Qiu
f748fa2899 feature: user expired_at attribute support (#23723)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2025-11-14 10:52:58 +08:00
Zexi Li
94c531cbc2 feat(cloudcommon): add ExtraHook steps to joint model (#23740) 2025-11-14 10:50:47 +08:00
wanyaoqi
1d63c75f0d fix(host): thrown errors on disk fromatfs (#23728) 2025-11-14 10:40:41 +08:00
Zexi Li
8d4afe5e56 fix(host): SHostPingTask was stuck by calling docker command (#23733) 2025-11-13 20:19:13 +08:00
屈轩
c0b9dad64c fix(region): scope resource (#23735) 2025-11-13 14:43:37 +08:00
cwz_eikoh
19db6df2fd fix(region): add kvm_delete_task (#23697) 2025-11-11 16:32:24 +08:00
wanyaoqi
47ac45dfe9 fix(region,scheduler): check is BIOS boot request on uefi predicate (#23719) 2025-11-11 13:45:28 +08:00
Zexi Li
dea5f90e5b fix(baremetal): power status of server is not synced (#23688) 2025-11-10 11:13:05 +08:00
Jian Qiu
77d5813bbf fix: log change bandwidth event (#23712)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2025-11-10 09:48:32 +08:00
Jian Qiu
85a570f7c2 fix: vm nic charge type support (#23702)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2025-11-07 10:52:51 +08:00
cwz_eikoh
a82f436d2b fix(region): add finish for DependencyTopoGraph (#23707) 2025-11-07 10:20:22 +08:00
cwz_eikoh
c414ef4eda fix(llm): don't rely on polling (#23708) 2025-11-07 10:19:30 +08:00
Zexi Li
77db769c8b fix(host): clear previous usage metrics when any container stopped of pod (#23706) 2025-11-06 20:56:30 +08:00
屈轩
982b0eec78 fix(torrent): vendor update for support risc-v (#23700) 2025-11-06 18:27:14 +08:00
屈轩
eb44cdd26f fix(region): allow delete server sku (#23693) 2025-11-05 18:19:48 +08:00
屈轩
c6967964dc fix(region): add device for disk (#23690) 2025-11-05 15:57:22 +08:00
屈轩
ae8697132b fix(scheduler): sku predicate with empty zone id (#23684) 2025-11-04 20:56:20 +08:00
Zexi Li
04de29158a fix(baremetal-agent): chose root disk by pci path (#23683) 2025-11-04 20:09:30 +08:00
Jian Qiu
f2f15dee51 fix: rename check when change project (#23680)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2025-11-04 16:08:40 +08:00
cwz_eikoh
c2fe4baf58 feat(region): pod containers start in dependency order (#23668) 2025-11-04 10:38:17 +08:00
屈轩
bce77902bc fix(region): optimized aws server sku sync (#23673) 2025-11-03 22:32:13 +08:00
屈轩
7d3681a735 fix(region): metadata filter by value (#23670) 2025-11-03 19:24:27 +08:00
Zexi Li
9dcd044e83 fix(host): upload container status when not created (#23667) 2025-11-03 15:53:56 +08:00
屈轩
2c622fe4d4 fix(region): optimzed server sku sync (#23662) 2025-11-03 15:13:38 +08:00
屈轩
4a2d41afbe fix(region): disk filter by server (#23658) 2025-11-01 13:32:21 +08:00
屈轩
1d9e418df8 fix(region): optimized filter sku by zone (#23655) 2025-11-01 13:04:41 +08:00
屈轩
41c5c66fe2 fix(region): vendor update (#23652) 2025-11-01 13:03:50 +08:00
JinyuZhao
07d1cecf99 feat: Cloudpods basic service image RISC-V support (#23446)
This patch enables cloudpos basic service image to be built on RISC-V
platforms and support build script to work on RISC-V platforms.

Signed-off-by: Jinyu Zhao <1813479822@qq.com>
2025-10-31 19:04:15 +08:00
cwz_eikoh
f1f502cac4 feat(llm): add network id and network type for llm-model (#23620)
* feat(llm): add network id and network type for llm-model

* fix(llm):portmapping of model network only works when network mode is hostlocal
2025-10-31 10:21:41 +08:00
Zexi Li
a931d2cc4c Automated cherry pick of #23642: fix(scheduler): enable profiling (#23646)
* fix(scheduler): enable profiling

* feat(scheduler): cache NetworkAdditionalWire
2025-10-31 10:19:37 +08:00
屈轩
d1510f2f5e fix(region): sku cpu mem sync (#23648) 2025-10-30 22:33:15 +08:00
屈轩
1fe87cb8e6 fix(region): filter disks by server list (#23643) 2025-10-30 17:24:35 +08:00
屈轩
c6b4daee37 fix(region): vendor update (#23638) 2025-10-30 10:06:17 +08:00
happy-game
0bed60eae7 [OSPP]feature:Automated installation using kickstart (#23094)
* feat(region, climc): Add kickstart parameters and metadata

- Add kickstart parameters and metadata support
- Add kickstart CLI options and management commands
- Set kickstart metadata in PostCreate
- Add related kickstart metadata fields

* feat(host): Implement automated VM installation

- Mounts the installation ISO to a unique temp path, reusing existing mounts.
- Extracts kernel (`vmlinuz`, `initrd`) to configure QEMU boot.
- Injects kernel parameters to trigger the autoinstall.
- Add kickstart configuration validation.

Modified `guestLauncher` script to handle kernel parameters with spaces
that were previously truncated by the Python script.

* feat(host): Implement Kickstart monitoring

- Automatically updates the VM status upon
receiving `KICKSTART_SUCCESS` or `KICKSTART_FAILED` signals.
- On success, cleans up temporary mount points
and restarts the server via the Region API.

* feat(region): add kickstart type metadata

Adds the `VM_METADATA_KICKSTART_TYPE` to distinguish between
kickstart configurations passed by URL or by direct content.

* feat(host): Handle kickstart installing and timeout

- Set status to 'installing' upon successful kickstart boot
- Handle KICKSTART_INSTALLING serial message for status updates
- Add timeout handling for kickstart status monitoring

* feat(host): provide Kickstart config via content

Embed the provided config content as a file in a
labeled ISO (mkisofs), then mount the ISO during
the Kickstart installation to supply the config.

* refactor(host): Enhance the kickstart installation

- Integrates kickstart status directly into the VM status, replacing metadata.
- Unifies locations for kickstart logs and temporary files.
- Uses regex for more robust status matching.
- Moves helper functions to `kickstart_helper.go`.
- Fixes an incorrect kickstart configuration filename.
- Adjusts kickstart logging.

* feat(region, host): add kickstart support for openEuler

* refactor(host): extract kickstart cleanup function

* feat(region, climc): add kickstart-complete cli

Add this command to manually update the kickstart status and
reboot VM if needed. This is mainly used by users to manually
update the kickstart status when kickstart status detection is abnormal.

* refactor(region): reduce code duplication in Kickstart validation

- unify two validateKickstartConfig functions
- extract determineKickstartType function for type determination

* fix(region, host): fix kickstart auto-reboot

- Adjusted the timing of setting the status to
`kickstart_pending` to avoid incorrect reboot checks
- Skip setting kickstart if the status is already
`kickstart_completed` to prevent unnecessary reboots
- Added cleanup of kickstart files upon VM deletion

* fix: kickstart misc fix

* feat(host): download kickstart config from URL

- download content when passing config via URL
- unified boot parameters

* feat(host): copy kickstart kernel files

* feat(host): ensure kickstart completion signal in config

---------

Co-authored-by: wanyaoqi <d3lx.yq@gmail.com>
2025-10-29 14:54:00 +08:00
Zexi Li
9ac1a3f992 fix(host): move the hostInstance.Init() step after InitAuth (#23623) 2025-10-29 14:00:24 +08:00
Jian Qiu
aed979e14e fix: task remote notify (#23630)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2025-10-29 12:17:41 +08:00
屈轩
899c105bd0 fix(cmd): show mcp server update cmd (#23628) 2025-10-28 18:24:35 +08:00
屈轩
ff404302cb fix(mcp): add dockerfile for mcp server (#23618) 2025-10-28 15:23:11 +08:00
屈轩
282e1499e1 fix(region): set ksyun tag (#23610) 2025-10-24 22:54:04 +08:00
Zexi Li
c7b8129ed6 chore(ci): turn off goimports-check rule (#23605) 2025-10-24 15:48:36 +08:00
cwz_eikoh
897a6fc61f [OSPP]feature: Auto deploy llm and dify (#23282)
* feat(llm): add llm-create

* fix(llm): fix llm-create, add llm-list & llm-show

* fix(llm): format file names

* fear(llm): add exec stream

* fear(llm): init llm model cache

* fix(llm): move llm model cache to LocalImageCache

* feat(llm): auto clean model cache

* fix(llm): auto clean tmp model cache

* feat(dify): init dify-create

* fix(dify): change dify default registry

* feat: support create model with gguf file

* feat(llm): support more modelfile option for gguf file

* feat(dify): init user customize dify parameters

* feat: update llm as a service in climc

* fix: delete llm from region service

* feat: init llm service (with error)

* fix: resolve errors (task cant callback yet)

* feat: add PerformRequestHostActionByOtherService for container

* fix: make llm service usable

* feat: delete llm and dify after guest deleted

* feat(llm): add llm-image

* feat(llm): add llm-model

* feat: mv old llm to ollama

* feat(llm): init llm-batch-create(can not run)

* fix(llm): make llm-create usable

* fix(llm): add pull-model step

* feat(llm): add list and delete

* fix(llm): ollama pull official model don't rely on host & region's code any more

* feat(llm): add dify-model

* fix: remove llm's code in host & compute

* fix: remove remain code in compute

* feat(llm): Abstract out and reuse the llm_model logic

* feat(llm): abstract llm_base from llm

* fix(llm): make dify usable

* feat(llm): add sync_dify_images.sh

* fix(llm): format import

* feat(llm): support start & stop for llm and dify

* feat(llm): add model-update

* fix(llm): gendocgo
2025-10-24 13:29:31 +08:00
Jian Qiu
fa67fdef77 fix: rpm/deb support postinst/preinst/prerm/postrm hooks (#23594)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2025-10-23 01:03:42 +08:00
Jian Qiu
9e2beac625 fix: suport bulding multi-arch rpm deb (#23569)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2025-10-22 23:52:58 +08:00
屈轩
1d361bb4d3 fix(keystone): fetch domain user count (#23590) 2025-10-22 16:25:40 +08:00
wanyaoqi
8abcde01e8 fix(region,host,scheduler): add check kvm cpu max on cpu predicate (#23537) 2025-10-22 15:07:00 +08:00
Zexi Li
4d0c18d224 feat(region,host): support nvidia GPU CDI configuration (#23568) 2025-10-22 15:04:35 +08:00
cwz_eikoh
22ad881b3d feat(container): container-restart (#23584) 2025-10-22 14:59:43 +08:00
屈轩
9b1b60c65f fix(region): support ocean base (#23586) 2025-10-22 14:40:55 +08:00
屈轩
9951c7bcb5 fix(region): disable cloudprovider when sync lost (#23581) 2025-10-22 11:30:17 +08:00
屈轩
db64e36716 fix(region): vendor update (#23578) 2025-10-22 11:12:01 +08:00
Zexi Li
098e8d49fc feat(region): allow containers to be created with auto_start param (#23573) 2025-10-21 17:20:59 +08:00
屈轩
96687005e8 fix(region): adjust the ip_addr character length (#23562) 2025-10-21 10:45:01 +08:00
Jian Qiu
f4975415d6 fix: container memory.high ratio support (#23559)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2025-10-21 09:33:07 +08:00
屈轩
4f9650fc9b fix(glance): add notify for image create (#23552) 2025-10-16 14:30:41 +08:00
wanyaoqi
5b24d3bb15 fix(webconsole): baremteasl ipmi sol instance_name hide password (#23535) 2025-10-16 00:02:33 +08:00
wanyaoqi
981b2c0c07 fix(host): host probe isoalted device return jsonarray (#23550) 2025-10-16 00:01:46 +08:00
屈轩
9bf9cfa940 fix(region): valid essd pl0 disk resize (#23545) 2025-10-15 17:24:17 +08:00
屈轩
28e1aea2cc fix(region): vendor update (#23539) 2025-10-15 10:57:47 +08:00
屈轩
9e0c524263 fix(region): support change storage type (#23529) 2025-10-14 16:59:13 +08:00
屈轩
ad753e0df2 fix(region): healt status (#23524) 2025-10-13 18:50:57 +08:00
屈轩
f4816d3b80 fix(keystone): distribute permissions when the organization changes (#23501) 2025-10-13 18:49:37 +08:00
屈轩
778d03a6e4 fix(region): private zone create status (#23520) 2025-10-13 18:05:21 +08:00
wanyaoqi
a455b8c8ef fix(host): ensure host wire marshal nil value (#23505) 2025-10-12 11:03:57 +08:00
屈轩
3684642617 fix(region): server sku create with region id (#23508) 2025-10-11 16:54:34 +08:00
wanyaoqi
e21eb05fd4 fix(region,glance,host-deployer): guest image support bios boot mode detect (#23376) 2025-10-11 10:21:03 +08:00
Zexi Li
30ca0f530f fix(baremetal): ensure the execution of the BaremetalServerDestroyTask (#23498) 2025-10-09 17:07:59 +08:00
Jian Qiu
73880eef77 fix: ignore e2fsck errors if retcode < 4 (#23490)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2025-10-09 16:31:53 +08:00
wanyaoqi
948f67577f fix(host): disk resize error input params (#23494) 2025-10-09 13:28:52 +08:00
Jian Qiu
4094097b50 fix: network manager keyfile static routes (#23479)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2025-10-08 13:18:50 +08:00
Jian Qiu
77aa8a7f96 fix: support network manager connection profiles (#23469)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2025-10-03 09:25:34 +08:00
Jian Qiu
30b8491ef5 fix: default cloud region init error (#23478)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2025-10-03 06:33:35 +08:00
屈轩
736d1fda24 fix(cloudmon): metric sync (#23462) 2025-09-30 16:52:58 +08:00
屈轩
060518e717 fix(region): vendor update (#23452) 2025-09-30 15:09:37 +08:00
屈轩
403176ba4a fix(region): host order by virt cpu (#23458) 2025-09-30 13:19:21 +08:00
Jian Qiu
20d28dc23f fix: hostman master nic may be nil (#23453)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2025-09-30 11:53:06 +08:00
Jian Qiu
2f3359c83f fix: s3 common options (#23445)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2025-09-29 19:22:35 +08:00
Jian Qiu
8bd6dd48bb fix: disable password history unique check by default (#23435)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2025-09-29 15:48:50 +08:00
wanyaoqi
6c53ace799 fix(region,baremetal): ipv6 baremetal register support (#23419) 2025-09-29 15:22:14 +08:00
Jian Qiu
4fed22b8b1 fix: backup task worker count in host configmap (#23428)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2025-09-29 15:20:26 +08:00
屈轩
4fdf44cbed fix(cloudevent): options changed with etcd (#23432) 2025-09-29 12:24:08 +08:00
屈轩
cc5024267e fix(region): vendor update (#23415) 2025-09-28 18:03:56 +08:00
wanyaoqi
87c5ba8734 fix(host-deployer): update host-deployer-base to 1.4.11 (#23414) 2025-09-28 17:26:12 +08:00
Zexi Li
605d2d0146 fix(region,host): sync server status by upload guest status api (#23410) 2025-09-28 17:24:23 +08:00
屈轩
40b9239978 fix(region): vendor update (#23404) 2025-09-28 14:58:50 +08:00
wanyaoqi
cdc3814f2f Automated cherry pick of #23377: Automated cherry pick of #23374: fix(region,host): guest add vnc screen dump support (#23378)
* fix(host): update nic confs inside vm on qga delete nics

Signed-off-by: wanyaoqi <wanyaoqi@yunion.cn>

* fix(region,host): guest add vnc screen dump support

---------

Signed-off-by: wanyaoqi <wanyaoqi@yunion.cn>
2025-09-27 12:06:33 +08:00
wanyaoqi
dd2450d7ad Automated cherry pick of #23394: Automated cherry pick of #23386: fix(host-deployer): allow growpart on primary partition (#23395)
* fix(host): init cgroup ignore disable cgroup option

* fix(host-deployer): allow growpart on primary partition
2025-09-27 12:02:21 +08:00
Zexi Li
ced8a404a2 fix(host): unmount post overlay dir without accquire cached image (#23403) 2025-09-27 07:43:18 +08:00
屈轩
933c6223ec fix(region): vendor update (#23397) 2025-09-26 18:05:18 +08:00
屈轩
4a2aa7eb5d fix(region): support cnware (#23388) 2025-09-26 14:44:37 +08:00
屈轩
524c676797 fix(region): vendor update (#23382) 2025-09-26 13:53:32 +08:00
wanyaoqi
453c543d27 fix(host-deployer): loop dev resize diskfs umounted and f2fs support (#23359) 2025-09-24 18:54:06 +08:00
Zexi Li
a8a5ff91da fix(host): clear the rootfs of container before starting (#23360) 2025-09-24 18:51:55 +08:00
Jian Qiu
0d77ff86e9 fix: network filter by ip error for dameng (#23363)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2025-09-24 18:50:09 +08:00
Jian Qiu
565424350a fix: auto cleanup obsolete password records (#23370)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2025-09-24 18:34:50 +08:00
屈轩
43c7b02b08 fix(region): vendor update (#23367) 2025-09-24 17:20:31 +08:00
Zexi Li
4760c311a1 feat(region,host): clean no persistent rootfs (#23355) 2025-09-22 18:10:30 +08:00
Zexi Li
7c158c4fd9 feat(region,host): clean no persistent rootfs (#23353) 2025-09-22 18:10:01 +08:00
屈轩
f79210144a fix(region): add expired release notify hour options (#23352) 2025-09-22 10:58:20 +08:00
彭镜肇
010fdfee3c Pengjingzhao ospp v2 (#23309)
* feat(mcp-server): 增加mcclient sdk适配器结构体以及对应的认证方法

* feat(mcp-server): 增加资源查询的sdk适配器方法

* feat(mcp-server): 增加资源操作的sdk适配器方法

* feat(mcp-server): 增加区域资源查询工具

* feat(mcp-server): 增加网络资源查询工具

* feat(mcp-server): 增加镜像资源查询工具

* feat(mcp-server): 增加虚拟机资源查询工具

* feat(mcp-server): 增加vpc资源查询工具

* feat(mcp-server): 增加存储资源查询工具

* feat(mcp-server): 增加套餐资源查询工具

* feat(mcp-server): 增加虚拟机创建工具

* feat(mcp-server): 增加虚拟机监控工具

* feat(mcp-server): 增加虚拟机操作工具,包括启动、重启、停止、重置密码和删除

* optimize(mcp-server): 增加工具函数接口定义

* feat(mcp-server): 增加工具函数所使用的结构体模型

* feat(mcp-server): 新增工具统一注册中心

* feat(mcp-server): 增加mcp服务中心

* feat(mcp-server): 增加统一配置中心

* feat(mcp-server): 增加服务启动主入口

* doc(mcp-server): 增加mcp-server相关的说明,安装和使用文档

* fix(mcp-server): 更正文档位置以及补充图片

* refactor(mcp-server): 修正了service以及配置解析的逻辑

* refactor(mcp-server): 将日志打印相关代码改成使用log

* feat(mcp-server): 增加mcclient sdk适配器结构体以及对应的认证方法

* feat(mcp-server): 增加资源查询的sdk适配器方法

* feat(mcp-server): 增加资源操作的sdk适配器方法

* feat(mcp-server): 增加区域资源查询工具

* feat(mcp-server): 增加网络资源查询工具

* feat(mcp-server): 增加镜像资源查询工具

* feat(mcp-server): 增加虚拟机资源查询工具

* feat(mcp-server): 增加vpc资源查询工具

* feat(mcp-server): 增加存储资源查询工具

* feat(mcp-server): 增加套餐资源查询工具

* feat(mcp-server): 增加虚拟机创建工具

* feat(mcp-server): 增加虚拟机监控工具

* feat(mcp-server): 增加虚拟机操作工具,包括启动、重启、停止、重置密码和删除

* optimize(mcp-server): 增加工具函数接口定义

* feat(mcp-server): 增加工具函数所使用的结构体模型

* feat(mcp-server): 新增工具统一注册中心

* feat(mcp-server): 增加mcp服务中心

* feat(mcp-server): 增加统一配置中心

* feat(mcp-server): 增加服务启动主入口

* doc(mcp-server): 增加mcp-server相关的说明,安装和使用文档

* fix(mcp-server): 更正文档位置以及补充图片

* refactor(mcp-server): 修正了service以及配置解析的逻辑

* refactor(mcp-server): 将日志打印相关代码改成使用log

* fix(mcp-server): 修复依赖导入以及缺失等问题

* refactor(mcp-server): 复用common_options

* fix: 修复配置结构体字段重复的问题

* doc(mcp-server): 更正文档错误

* style(mcp-server): 格式化import顺序

* style(mcp-server): 格式化import导入

* style(mcp-server): 规范import语句

* doc(mcp-server): 给目录生成doc文件

---------

Co-authored-by: 屈轩 <qu_xuan@icloud.com>
2025-09-22 10:32:21 +08:00
Jian Qiu
93a8a95ce2 fix: host backup task worker limit (#23349)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2025-09-22 09:48:03 +08:00
Jian Qiu
f5322d967c fix: linux sshd_config support (#23343)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2025-09-20 00:39:13 +08:00
Zexi Li
17ab2f83d9 fix(scheduler): watch serversku (#23332) 2025-09-19 23:48:51 +08:00
屈轩
51afa789c1 fix(region): rds backup sync (#23305) 2025-09-19 23:47:07 +08:00
wanyaoqi
6f8c0ecf83 fix(host,host-deployer): support lvm disk resize (#23335)
- add resize lvm disk support
- support qga online resize disk partitions and filesystems
2025-09-19 23:46:20 +08:00
Jian Qiu
6ec0769667 fix: check os_arch when server rebuilding root (#23339)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2025-09-19 23:44:41 +08:00
屈轩
d46a7010fe fix(region): disk reset webhook (#23325) 2025-09-18 15:08:15 +08:00
屈轩
d01ea18cf2 fix(notify): optimized workwx access token expired time (#23322) 2025-09-18 14:55:10 +08:00
Zexi Li
364fcf585e fix(monitor): diffTagKeys are empty when only one series in results (#23313) 2025-09-18 07:49:39 +08:00
屈轩
5ee016ff02 fix: upgrade goimports (#23320) 2025-09-17 22:01:26 +08:00
屈轩
9dfc3d8df7 fix(region): remove debug sql (#23317) 2025-09-17 16:54:42 +08:00
屈轩
e1166a71a6 fix(cloudmon): alert metric with tenant id (#23314) 2025-09-17 16:40:27 +08:00
屈轩
47f6b42d40 fix(climc): sku create params (#23302) 2025-09-15 15:33:54 +08:00
wanyaoqi
10d881b3f7 fix(region): virtual isolated device balance on guest start (#23046) 2025-09-15 11:58:11 +08:00
屈轩
e6bad2e309 fix(region): support gcp shared vpc and image (#23295) 2025-09-12 23:03:22 +08:00
Zexi Li
633c8e2969 feat(host): hide host files mounted to container (#23292) 2025-09-12 18:54:57 +08:00
屈轩
b524b2fe85 fix(monitor): history alert report (#23278) 2025-09-12 15:27:06 +08:00
Zexi Li
cfc2dc783d fix(host,region): container rootfs use sub directory (#23289) 2025-09-12 15:08:01 +08:00
Zexi Li
e85643a005 fix(monitor): fetch total alert resources from monitor_resource_alert (#23276) 2025-09-10 19:17:41 +08:00
屈轩
ee9e8dbb5e fix(region): update cloudprovider external id (#23271) 2025-09-10 18:59:40 +08:00
Jian Qiu
fe96a6de05 fix: ipv6 ra should be sent periodically (#23258)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2025-09-10 18:59:00 +08:00
Jian Qiu
7bee9df361 fix: image self check status (#23249)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2025-09-10 18:57:16 +08:00
屈轩
184917cc4d fix(region): support hyperdisk for gcp (#23268) 2025-09-10 15:32:49 +08:00
Zexi Li
45508625af fix(climc): monitor-alertrecords-total-alert command (#23267) 2025-09-10 14:25:02 +08:00
屈轩
9a14320ea1 fix(region): sync cloudpods ipmi ip addr (#23263) 2025-09-09 20:52:49 +08:00
屈轩
f3337ed552 fix(region): cloudpods ipmi info sync (#23261) 2025-09-09 19:27:44 +08:00
屈轩
9dfa4ee355 fix(region): sync cloudpods baremetal isolated device (#23256) 2025-09-09 18:40:01 +08:00
屈轩
cfe4d82e78 fix(region): sync cloudpods host storage info (#23254) 2025-09-09 15:59:57 +08:00
屈轩
46e40421ba fix(region): retention server by tag (#23247) 2025-09-08 17:59:53 +08:00
屈轩
8e243835aa fix(region): support retention server by tags (#23245) 2025-09-08 16:00:18 +08:00
屈轩
db2921733d fix(region): support retention server by tag (#23243) 2025-09-08 15:32:58 +08:00
屈轩
eb82b9d9ca fix: upgrade go 1.24 (#23241) 2025-09-05 18:26:33 +08:00
屈轩
3fdab63193 fix(region): snapshot policy unbind disks (#23238) 2025-09-04 16:57:50 +08:00
屈轩
f9f8a18fbc fix(region): sync prepaid disk expired time (#23235) 2025-09-04 16:47:03 +08:00
屈轩
8bd00065e2 fix(region): add disk change billing type log (#23231) 2025-09-03 20:17:53 +08:00
屈轩
b1c4d11170 fix(region): add kafka and mongodb capability (#23228) 2025-09-03 19:44:26 +08:00
屈轩
73ec13d87f fix(region): distinct cloudprovider fields (#23210) 2025-09-03 14:50:49 +08:00
wanyaoqi
c6e9cf0d1e fix(host): live migrate compat ipv6 (#23212) 2025-09-03 05:49:42 +08:00
Jian Qiu
6d55de51f0 fix: fail to delete cas idp due to readonly domain (#23218)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2025-09-03 05:49:06 +08:00
Jian Qiu
c3e9090c71 fix: image s3 direct download option (#23219)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2025-09-03 05:47:21 +08:00
Jian Qiu
1a32dcc73b fix: network filter by ipv6 address (#23222)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2025-09-03 05:46:22 +08:00
屈轩
c1b204af2a fix(region): support more scheme keypair (#23195) 2025-09-02 14:44:47 +08:00
Zexi Li
313224f219 feat(host): add SdnFetchDataFromComputeService option (#23209) 2025-09-01 23:16:01 +08:00
屈轩
edea56383e fix(region): avoid change to the same config sku not effective (#23202) 2025-09-01 11:42:55 +08:00
Jian Qiu
f101b4592b fix: too many recursive locks when batch create (#23201)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2025-08-29 23:08:52 +08:00
屈轩
11018b1b81 fix(region): update api docs (#23193) 2025-08-28 16:28:14 +08:00
wanyaoqi
3356774628 fix(host): update nic desc on nic changed (#23105) 2025-08-28 10:06:53 +08:00
wanyaoqi
e264c84370 feat(region,hostdeployer): add f2fs feature support (#23178) 2025-08-28 10:05:40 +08:00
屈轩
a1bc7bc4fe fix(region): add cloud_env filter for cachedimages (#23190) 2025-08-27 18:34:28 +08:00
Jian Qiu
9603dd9a9e fix: guest ipv6 vip (#23188)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2025-08-27 18:07:31 +08:00
Jian Qiu
2732cc3cf9 fix: dhcpv6 should nack confirm if addr changed (#23168)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2025-08-26 15:35:03 +08:00
wanyaoqi
3bd9c12610 fix(region,host): ipv6 change addr (#23158) 2025-08-26 15:34:15 +08:00
屈轩
bb7bceaa24 fix(keystone): show ldap url (#23173) 2025-08-26 14:28:32 +08:00
屈轩
af9483536e fix(keystone): upgrade ldap version (#23165) 2025-08-26 13:28:32 +08:00
Jian Qiu
ab5f25c991 fix: deploy gai.conf if both v4 and v6 present (#23160)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2025-08-25 18:19:19 +08:00
Zexi Li
be04e9f5b2 feat(host): support single file to use post overlay (#23152) 2025-08-25 11:47:51 +08:00
屈轩
a08a5831d0 fix(region): optimized cached image list (#23153) 2025-08-22 15:43:13 +08:00
wanyaoqi
9852dfc5cf feat(region,host,host-deployer): f2fs filesystem support (#23117) 2025-08-22 09:06:02 +08:00
Zexi Li
56903c3fed fix(region): update the image status to save_fail when OnImageSavedFailed (#23139) 2025-08-21 18:12:15 +08:00
wanyaoqi
2cadd74501 fix(scheduler): add session usage timeout options (#23145) 2025-08-21 18:11:11 +08:00
屈轩
8b3cc35bc3 fix(region): dns zone registrar charset (#23149) 2025-08-21 11:34:31 +08:00
屈轩
dbf91c8b81 fix(region): add change_config status for aigateway (#23137) 2025-08-20 17:05:21 +08:00
屈轩
26980db500 fix(region): avoid update guest disable_delete attribute error when host id is empty (#23134) 2025-08-20 16:21:38 +08:00
Zexi Li
905cad3f5e fix(baremetal): update the grub auto configuration to fix the aarch64 disk boot (#23131) 2025-08-20 15:11:22 +08:00
屈轩
665bcfd847 fix(region): sync lb eip (#23124) 2025-08-20 14:13:52 +08:00
happy-game
f7b40ac941 feat(region): fix ISO size display (#23095)
SGuestcdrom.Size is Byte, not MB
2025-08-20 12:08:16 +08:00
Zexi Li
cd51076bc6 fix(baremetal-agent): error occurred when removing logical volumes on the arm64 host (#23121) 2025-08-20 12:00:07 +08:00
屈轩
35759dfbc7 fix(region): sync dns zone ns info (#23115) 2025-08-19 17:28:37 +08:00
屈轩
1a646216b5 fix(region): sync eip associate resource (#23111) 2025-08-19 14:54:41 +08:00
屈轩
993471a801 fix(region): allow update vpc network cidr (#23109) 2025-08-19 14:38:47 +08:00
屈轩
d14cf0d802 fix(region): add storage filter for snapshot (#23106) 2025-08-18 14:57:43 +08:00
wanyaoqi
1ae79f45da fix(host): run ifdown script on guest delete (#23101) 2025-08-16 14:49:37 +08:00
wanyaoqi
f0e76d18fd fix(host): persistent ceph config for qemu connection (#23088) 2025-08-16 14:46:50 +08:00
Jian Qiu
a2ba9e5e33 fix: webconsole skip refererer check by default (#23091)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2025-08-16 14:45:35 +08:00
wanyaoqi
13e08b0e3e fix(vpcagent): dhcp enable default gateway on default network (#23099) 2025-08-16 14:45:00 +08:00
屈轩
7776949770 fix(scheduledtask): force sync account (#23084) 2025-08-14 19:35:57 +08:00
Zexi Li
def96d2d6b fix(region): filter host by ips (#23081) 2025-08-14 18:35:12 +08:00
wanyaoqi
9b2153cb2c fix(host): cephutil and nbd ipv6 compat (#23072)
* fix(region,host,host-image): host-image and qemu-nbd compat ipv6

* fix(host,host-deployer): cephutils add ipv6 compat
2025-08-14 18:34:39 +08:00
屈轩
dcbec86134 fix(region): vendor update (#23080) 2025-08-14 15:13:23 +08:00
屈轩
c6de8a9479 fix(region): server snapshot policy (#23066) 2025-08-14 10:42:30 +08:00
屈轩
d96d1a0a02 fix(region): dns record policy type (#23075) 2025-08-13 17:49:15 +08:00
屈轩
0b5dd81c77 fix(region): The eip displays the internal ip address of the virtual machine (#23067) 2025-08-12 09:59:02 +08:00
Jian Qiu
2d4ed27c0c fix: ipv6 compatibility issues fixes 20250809 (#23060)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2025-08-10 09:10:17 +08:00
Jian Qiu
afde29eb71 fix: task obj_type and object nullable and default empty (#23058)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2025-08-10 08:46:52 +08:00
wanyaoqi
f51807ee25 fix(host): lvm guest reload disk before delete snapshot (#23055) 2025-08-08 21:01:39 +08:00
wanyaoqi
e0c13bb814 feat(host): container cpufreq realtime simulate (#23047) 2025-08-08 20:54:56 +08:00
Jian Qiu
717719ef92 fix: filter guest by multiple ips with exact match (#23037)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2025-08-08 17:55:49 +08:00
Zexi Li
6db106643d fix(host): 修复 loop 设备被其它进程创建而导致分配失败的问题 (#23042) 2025-08-08 17:52:00 +08:00
Jian Qiu
80eaa42163 fix: host metrics tag add hypervisor (#23035)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2025-08-07 22:26:29 +08:00
Jian Qiu
3893215bbd fix: ipv6-only mode compatibility fixes (#23027)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2025-08-06 22:01:55 +08:00
屈轩
4e2c7bf353 fix(region): support lb health check sync status (#23028) 2025-08-06 17:37:37 +08:00
屈轩
78db6c2e83 fix(region): disk update tag (#23024) 2025-08-06 15:52:04 +08:00
Jian Qiu
87dfcf7c84 fix: always update hostname for rhel-like os (#23016)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2025-08-06 01:08:04 +08:00
wanyaoqi
c0562f2573 fix(region,host): host nic add default secret ipv4 address (#23014) 2025-08-02 23:06:14 +08:00
Jian Qiu
66901a4964 fix: host network ipv6 support (#22963)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2025-08-02 12:12:26 +08:00
Zexi Li
0a17611276 feat(region): list gpu by index and device_minor (#23010) 2025-08-01 18:46:01 +08:00
屈轩
fd35536bd7 fix(region): support lb health check (#23008) 2025-08-01 18:38:29 +08:00
Zexi Li
05913ab0bf feat(region,host): upload index and minor info of a nvidia GPU (#23004) 2025-08-01 10:36:03 +08:00
Zexi Li
80ec3f117a feat(region,host): auto create the file or dir of hostPath (#23000) 2025-07-31 14:00:51 +08:00
屈轩
32f480ebbb fix(region): cloudflare redirect pool (#22997) 2025-07-30 20:17:31 +08:00
屈轩
d3f6c1fe8f fix(region): cloudflare lb backend operation (#22995) 2025-07-30 19:00:42 +08:00
Zexi Li
897b22aaa2 fix(scheduler): netinterface cache is not informed (#22994) 2025-07-30 15:35:40 +08:00
屈轩
9d67950805 fix(region): support cloudflare lb (#22992) 2025-07-30 14:51:18 +08:00
Jian Qiu
b1874b5253 fix: unify guest sync status and upload status procedure (#22982)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2025-07-30 10:38:04 +08:00
Jian Qiu
04dcae9cac fix: inconsist checksum between image and its same format subimage (#22986)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2025-07-30 01:43:59 +08:00
wanyaoqi
d559f2119e fix(host,glance): only target qcow2 set cluster size on image convert (#22981) 2025-07-30 00:43:43 +08:00
Jian Qiu
21867bde96 fix: glance converts all queued subimages, regardless of format (#22973)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2025-07-29 10:26:50 +08:00
wanyaoqi
e213bdf6af fix(host): set qemuimg convert cluster_size 64k on compat image (#22967) 2025-07-29 00:04:22 +08:00
Jian Qiu
d0b72da166 fix: set default worker parameter (#22957)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2025-07-28 14:12:09 +08:00
Jian Qiu
9d8d9b8096 fix: host clean image with regards of container image deps (#22943)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2025-07-26 08:49:30 +08:00
wanyaoqi
9d06b8a7ea fix(region): iso boot do not check boot mode (#22952) 2025-07-26 02:27:37 +08:00
wanyaoqi
5613fa0601 fix(host): host init no numa node (#22944) 2025-07-25 00:32:38 +08:00
屈轩
1608c76b9f fix(region): init guest secgroup (#22940) 2025-07-24 17:15:51 +08:00
Zexi Li
032e362971 feat(host): 保存容器 volume 镜像时设置 min_disk 大小 (#22931) 2025-07-23 20:24:28 +08:00
屈轩
81336e6276 fix(region): add guest billing type for disk (#22934) 2025-07-23 18:53:36 +08:00
wanyaoqi
f02c8c9437 fix(region): ipv6 change ipaddr (#22923) 2025-07-23 09:28:56 +08:00
屈轩
7482731ced fix(region): host order (#22925) 2025-07-22 15:19:48 +08:00
屈轩
dcec13c6d3 fix(region): vendor update (#22918) 2025-07-21 17:33:27 +08:00
屈轩
63fc981e77 fix(region): support ssl delete (#22911) 2025-07-16 19:55:43 +08:00
Jian Qiu
49178a2ed4 fix: dhcpv6 client id change by slice overwritten (#22905)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2025-07-16 16:19:06 +08:00
屈轩
2ef73f146b fix(region): add is expired for certificate (#22907) 2025-07-16 15:35:56 +08:00
Jian Qiu
5cbb69e372 fix: deploy ipv6 scripts fixes (#22899)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2025-07-15 18:58:25 +08:00
wanyaoqi
f7caf2b147 feat(region,host-deployer): ipv6 only guest support (#22896) 2025-07-15 16:21:37 +08:00
wanyaoqi
ed2d780c64 fix(host): check storage id is correct on src migrate prepare (#22895)
correct disk storage id on dest migrate prepare
2025-07-15 16:12:11 +08:00
屈轩
0c7009f038 fix(region): ssl create with zone info (#22888) 2025-07-14 18:32:11 +08:00
屈轩
16f7c98393 fix(region): ssl certificate create (#22885) 2025-07-14 16:06:11 +08:00
Jian Qiu
8fdf415ff0 fix: host metrics error for missing ip (#22882)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2025-07-12 18:00:38 +08:00
Jian Qiu
78bf0bcb2f fix: dhcpv6 support phase 3 (#22880)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2025-07-12 12:10:18 +08:00
屈轩
d6227bbbcb fix(region): add sort for host (#22875) 2025-07-11 19:08:50 +08:00
Zexi Li
6438ab627a fix(region): allow stopping the container in probe_failed status (#22872) 2025-07-11 10:41:57 +08:00
Jian Qiu
96cf60afeb fix: host no default routes due to empty ipv6 addr (#22870)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2025-07-10 22:33:59 +08:00
wanyaoqi
abfedab61c fix(region): do not set guest to resuce status on guest running (#22869) 2025-07-10 22:10:20 +08:00
屈轩
2820958d83 fix(region): 修复本地到期释放功能和资源同步冲突 (#22859) 2025-07-10 19:37:53 +08:00
wanyaoqi
f2e0f62796 fix(host): add check mem dev is null on guest setup (#22847) 2025-07-09 14:15:57 +08:00
Jian Qiu
ec40153b92 fix: dhcpv6 support, phase 2 (#22851)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2025-07-09 14:15:03 +08:00
屈轩
ed0b1eea50 fix(region): 避免删除虚拟机时,未能正常删除后挂载的磁盘 (#22840) 2025-07-07 14:46:05 +08:00
Zexi Li
d0ceb8565c feat(host): support pod post cleanup configuration (#22836) 2025-07-04 17:12:07 +08:00
屈轩
b4c7932e98 fix(region): create disk with tags (#22832) 2025-07-04 17:08:01 +08:00
屈轩
0a8198d30d fix(region): vendor update (#22827) 2025-07-03 15:16:30 +08:00
屈轩
8da39a625a fix: compatible with other os netutils (#22825) 2025-07-03 15:01:38 +08:00
Jian Qiu
36f629e349 fix: dhcpv6 support, initial support (#22820)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2025-07-03 14:36:59 +08:00
屈轩
5537fcf7be fix(region): vendor update for sync mongodb ip addr (#22816) 2025-07-03 05:32:34 +08:00
wanyaoqi
e01b4e2468 fix(host): set arm guest max mems to host mem (#22813) 2025-07-03 05:31:50 +08:00
wanyaoqi
3bf65b71d5 fix(host): enable qemu cap detect (#22798) 2025-07-03 05:30:04 +08:00
wanyaoqi
167bffb8c9 fix(region): host calculate set mem_cmt_bound 1 on host enable hugepage (#22809) 2025-07-03 05:28:47 +08:00
wanyaoqi
97d5958d54 fix(host): qemuimg convert add cluster_size (#22797) 2025-07-03 05:28:27 +08:00
屈轩
6da78bca57 fix(region): vendor update (#22805) 2025-07-02 21:01:35 +08:00
屈轩
644dc17c86 fix(esxi-agent): avoid esxi cache image error (#22802) 2025-07-02 19:25:27 +08:00
Zexi Li
ed12949d00 fix(host): adjuest max loop device count to 512 (#22787) 2025-07-01 15:25:20 +08:00
屈轩
bc232d54e2 fix(region): add ai gateway (#22783) 2025-06-27 22:34:16 +08:00
屈轩
e5acc545b5 fix(region): vendor update for cdn attribute (#22777) 2025-06-24 17:42:58 +08:00
屈轩
9c97f665f5 fix(notify): support dingtalk robot sign (#22766) 2025-06-23 16:59:36 +08:00
屈轩
8b198367c1 fix(cloudmon): cloudpods collect metric interval (#22763) 2025-06-23 16:17:19 +08:00
屈轩
39d5d57545 fix(region): vendor update for aliyun alb and nlb (#22761) 2025-06-23 10:30:18 +08:00
屈轩
064c23040e fix(region): sync remove backend group (#22758) 2025-06-20 19:38:18 +08:00
Zexi Li
71070e6e68 feat(region,host): support port mapping rule (#22748) 2025-06-20 19:16:55 +08:00
屈轩
f50c4a5c78 fix(region): support skip sync server by tag value (#22753) 2025-06-20 18:40:30 +08:00
屈轩
0a16227ef2 fix(region): vendor update (#22749) 2025-06-20 18:12:39 +08:00
Jian Qiu
52f1de5547 fix: task filter by owner sql revisit (#22744)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2025-06-20 16:06:39 +08:00
屈轩
1e8ba8aaed fix(region): ssl certificate purge (#22742) 2025-06-19 17:52:59 +08:00
Jian Qiu
be7bc9335c fix: use goid to identify differnt goroutine (#22722)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2025-06-19 14:50:39 +08:00
屈轩
93466228d5 fix(region): waf rule create (#22737) 2025-06-18 20:06:00 +08:00
Zexi Li
b931b70911 Monitor worker alert (#22729)
* fix(monitor): GetMetricMeasurement 接口只查询过去30m的数据

避免数据过多导致 victoria-metrics 报错

* fix(monitor): wildchar of alert group by field
2025-06-18 14:25:27 +08:00
屈轩
9378168438 fix(region): lb listener rule associate backend group (#22733) 2025-06-18 14:14:57 +08:00
glzjin
ba97cee426 fix: panic when there is no secondary IP on the host. (#22721) 2025-06-17 11:14:54 +08:00
屈轩
e999914539 fix(region): vendor update (#22724) 2025-06-16 20:07:29 +08:00
屈轩
e593f1a93b fix(region): vendor update for lb multi eip sync (#22719) 2025-06-16 17:36:56 +08:00
屈轩
3c76b9e12a fix(common): context with time (#22708) 2025-06-16 17:15:59 +08:00
wanyaoqi
a6c9fddc2c fix(region,host): add auto merge snapshots options, preallocation options (#22715) 2025-06-13 15:20:28 +08:00
Zexi Li
b8685af42c fix(host): dirty shutdown pod is not auto started (#22703) 2025-06-10 10:17:48 +08:00
Jian Qiu
301bd2e705 fix: remove cgo deps for ioctl (#22700)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2025-06-07 08:42:06 +08:00
屈轩
18b956c53d fix(region): vendor update (#22697) 2025-06-06 19:22:49 +08:00
屈轩
5bcb17fff3 fix(region): enable cloud dns record (#22694) 2025-06-06 18:31:54 +08:00
Jian Qiu
dab4bf9169 fix: http perf stats monitor (#22684)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2025-06-06 18:12:04 +08:00
Zexi Li
a7052fab8a fix(host): marshal update status input inside error (#22691) 2025-06-06 17:27:45 +08:00
屈轩
de0f6d6f39 fix(region): waf rule enable disable (#22687) 2025-06-06 14:53:20 +08:00
wanyaoqi
87e0a8989c fix(host): pass decoded userdata to host-deployer (#22683) 2025-06-05 23:51:15 +08:00
屈轩
e9d22ebcfd fix(region): vendor update (#22677) 2025-06-05 19:27:58 +08:00
Zexi Li
4c7c111ad1 fix(host): change mount context timeout to 30s (#22674) 2025-06-05 18:40:15 +08:00
Jian Qiu
cb93050e20 fix: cloudmon high cpu loads for bucket probing (#22657)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2025-06-05 17:51:16 +08:00
屈轩
4031ff83d6 fix(region): vendor update (#22669) 2025-06-04 17:36:20 +08:00
Zexi Li
1829838939 fix(scheduler): wrong sort order of instance group selection (#22668) 2025-06-04 14:27:51 +08:00
Zexi Li
4731240d25 feat(host): containerd snapshot rootfs service (#22621) 2025-06-04 11:00:27 +08:00
Zexi Li
76e0770b09 fix(host): sync container crash status (#22654) 2025-06-03 20:16:04 +08:00
Zexi Li
90360fa6cb fix(host): retry stopping container forcibly (#22648) 2025-06-03 17:11:50 +08:00
Zexi Li
18805cfd37 fix(host): losetup package initialization order (#22651) 2025-06-03 13:39:21 +08:00
Jian Qiu
77daacdabc fix: update vendor to fix keystone user join project not found (#22643)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2025-05-31 18:47:34 +08:00
Jian Qiu
cea0bddead fix: disk statu sync recover (#22631)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2025-05-31 09:04:10 +08:00
Jian Qiu
0b837f735f fix: bucket perform mon random string generation consume high cpu load (#22637)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2025-05-31 09:03:34 +08:00
wanyaoqi
d0290974c4 fix(host): change log level to debug on get numa node faild (#22638) 2025-05-31 09:02:48 +08:00
Zexi Li
780d55f946 refactor(region,host): container status management (#22634) 2025-05-30 17:48:35 +08:00
wanyaoqi
1c6b9bb6cf feat(host-deployer): deploy vlan subinterface on baremetal hypervisor (#22628)
- host-deployer add deploy vlan subinterface on baremetal hypervisor
- fix baremetal-agent cache image parse input data
2025-05-30 10:31:52 +08:00
wanyaoqi
bc5582ca84 feat(region,host,host-deployer): support set uefi boot order (#22527) 2025-05-30 10:30:53 +08:00
wanyaoqi
4349347246 feat(region,host): qga deploy network config on attach nics (#22549) 2025-05-30 10:30:09 +08:00
屈轩
e41cd644d1 fix(docs): add unifiedmonitor api docs (#22627) 2025-05-29 15:27:03 +08:00
屈轩
c34fcd9f82 fix(docs): update api docs (#22626) 2025-05-29 12:00:51 +08:00
屈轩
289b62101f fix(region): vendor update (#22623) 2025-05-29 11:22:47 +08:00
屈轩
661078fad4 fix(region): secgroup rule filter (#22618) 2025-05-28 18:38:29 +08:00
屈轩
85c84d7f27 fix(docs): update monitor api doc (#22616) 2025-05-28 15:52:16 +08:00
wanyaoqi
d303bc31b5 fix(host): qemu extra params format (#22610) 2025-05-27 13:34:38 +08:00
屈轩
acc08523a5 fix(region): update qcloud storage type (#22613) 2025-05-27 12:44:03 +08:00
屈轩
e29de781bb fix(region): add region driver for cloudflare (#22605) 2025-05-26 16:17:42 +08:00
Jian Qiu
7ba276fb4c fix: tar ignore error revisit (#22603)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2025-05-26 12:35:01 +08:00
Jian Qiu
ca28f61262 fix: container save image with leading prefix (#22598)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2025-05-26 12:34:39 +08:00
Jian Qiu
c608716fd0 fix: ignore init loop device error (#22597)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2025-05-26 11:36:00 +08:00
屈轩
52839ca149 fix(docs): update swagger api (#22599) 2025-05-26 10:51:19 +08:00
wanyaoqi
b879705eb3 fix(host): check min_free_kbytes size is enough (#22591) 2025-05-24 01:11:00 +08:00
Zexi Li
8a3c173631 fix(monitor): not filter status tag key (#22595) 2025-05-23 09:59:35 +08:00
Zexi Li
1442a5efbe feat(host): loop device manager (#22588) 2025-05-22 13:24:18 +08:00
屈轩
3dc18f7deb fix(cloudmon): add vm_ip metric for vm (#22585) 2025-05-22 10:53:55 +08:00
屈轩
eac9c0798f fix(cloudmon): vm metrics with ips (#22582) 2025-05-22 10:41:02 +08:00
屈轩
9ebbd6cebc fix(region): add filter for secgroup rule (#22578) 2025-05-21 19:27:01 +08:00
屈轩
30fa56ff41 fix(region): add account info for sec rules (#22575) 2025-05-21 18:40:09 +08:00
Zexi Li
b4b68dd4b8 fix(host): ignore internal stopped event of primary container (#22573) 2025-05-21 16:23:10 +08:00
屈轩
5498aeca82 fix(region): allow create public server sku (#22569) 2025-05-21 14:43:15 +08:00
Zexi Li
95852d0ccb fix(host): status of stopping primary container (#22567) 2025-05-21 12:23:27 +08:00
屈轩
c8185d64e4 fix(region): init aliyun storage medium type (#22563) 2025-05-20 21:48:28 +08:00
Kathent
d016b0529f [fix]: fix error when create vm with ceph disk (#22482) 2025-05-20 21:27:05 +08:00
Jian Qiu
2943344b48 feature: monitor bucket formance and resource status (#22552)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2025-05-19 22:28:20 +08:00
Zexi Li
cc92a5ebca fix(host): clean loop device before deleting (#22557) 2025-05-19 19:47:22 +08:00
屈轩
c178cc8b02 fix(region): user sync with ctx (#22554) 2025-05-19 18:09:20 +08:00
Jian Qiu
fe55972aed fix: host files not initialized when host reboot (#22550)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2025-05-19 01:58:12 +08:00
wanyaoqi
cbbeb8ff4b fix: vendor update 2505013 (#22520) 2025-05-19 01:56:46 +08:00
屈轩
8c7f278b97 fix(region): vendor update (#22543) 2025-05-16 11:19:40 +08:00
屈轩
dcd65d1149 fix(region): guest disk iops (#22540) 2025-05-15 15:46:03 +08:00
屈轩
783c2600b3 fix(region): show correct disk iops (#22539) 2025-05-15 12:49:06 +08:00
屈轩
218f491e22 fix(region): change disk billing type (#22532) 2025-05-15 11:48:22 +08:00
Zexi Li
c22a181f26 feat(region,host): change ownership of post overlay merged dir (#22526) 2025-05-13 19:53:01 +08:00
屈轩
dc5d41ddbb fix(region): add dns brand (#22522) 2025-05-13 16:30:45 +08:00
屈轩
601b648041 fix(region): add proxied for dns record (#22513) 2025-05-12 17:52:36 +08:00
Zexi Li
624d732183 fix(monitor): return measurements info from db directly (#22511) 2025-05-12 17:17:28 +08:00
屈轩
d278ad8ce3 fix(common): avoid empty context (#22508) 2025-05-12 16:21:14 +08:00
屈轩
78367723b1 fix(region): add cloudflare const (#22506) 2025-05-12 14:10:44 +08:00
屈轩
6290cb0daa fix(notify): support notify with robotids (#22502) 2025-05-09 21:23:03 +08:00
屈轩
4267f2ab29 fix(notify): optimized notify error msg (#22500) 2025-05-09 17:35:06 +08:00
屈轩
ce4c891b0e fix(region): vendor update (#22497) 2025-05-09 14:54:52 +08:00
屈轩
60d8a7c49a fix(common): obj id cache (#22494) 2025-05-09 14:46:56 +08:00
Jian Qiu
2c55d15fc2 fix: hostfile delete validation (#22492)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2025-05-08 23:49:57 +08:00
屈轩
84199a13b8 fix(region): vendor update (#22489) 2025-05-08 18:36:25 +08:00
屈轩
fc01599951 fix(common): policy tag filter cache (#22484) 2025-05-08 15:56:46 +08:00
Jian Qiu
c6bc710cee fix: host files support (#22479)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
2025-05-07 11:29:04 +08:00
8469 changed files with 1096348 additions and 501126 deletions

View File

@@ -13,7 +13,7 @@ jobs:
- name: Setup Go
uses: actions/setup-go@v4
with:
go-version: '1.25'
go-version: '1.26.3'
- name: Install check tools
shell: bash

View File

@@ -22,7 +22,7 @@ jobs:
- uses: actions/setup-go@v4
with:
go-version: '1.25'
go-version: '1.26.3'
- name: Set up QEMU
uses: docker/setup-qemu-action@v2

View File

@@ -20,7 +20,7 @@ jobs:
- uses: actions/setup-go@v4
with:
go-version: '1.25'
go-version: '1.26.3'
- name: Set up QEMU
uses: docker/setup-qemu-action@v2

View File

@@ -21,7 +21,7 @@ jobs:
- uses: actions/setup-go@v4
with:
go-version: '1.25'
go-version: '1.26.3'
- name: Set up QEMU
uses: docker/setup-qemu-action@v2

View File

@@ -19,7 +19,7 @@ jobs:
- uses: actions/setup-go@v4
with:
go-version: '1.25'
go-version: '1.26.3'
- name: Set up QEMU
uses: docker/setup-qemu-action@v2

View File

@@ -23,7 +23,7 @@ jobs:
- uses: actions/setup-go@v4
with:
go-version: '1.25'
go-version: '1.26.3'
- name: Set up QEMU
uses: docker/setup-qemu-action@v2

View File

@@ -19,7 +19,7 @@ jobs:
- uses: actions/setup-go@v4
with:
go-version: '1.25'
go-version: '1.26.3'
- name: Set up QEMU
uses: docker/setup-qemu-action@v2

View File

@@ -23,7 +23,7 @@ jobs:
- uses: actions/setup-go@v4
with:
go-version: '1.25'
go-version: '1.26.3'
- name: Set up QEMU
uses: docker/setup-qemu-action@v2

View File

@@ -23,7 +23,7 @@ jobs:
- uses: actions/setup-go@v4
with:
go-version: '1.25'
go-version: '1.26.3'
- name: Set up QEMU
uses: docker/setup-qemu-action@v2

View File

@@ -23,7 +23,7 @@ jobs:
- uses: actions/setup-go@v4
with:
go-version: '1.25'
go-version: '1.26.3'
- name: Set up QEMU
uses: docker/setup-qemu-action@v2

View File

@@ -24,7 +24,7 @@ jobs:
- uses: actions/setup-go@v4
with:
go-version: '1.25'
go-version: '1.26.3'
- name: Set up QEMU
uses: docker/setup-qemu-action@v2

View File

@@ -20,7 +20,7 @@ jobs:
- uses: actions/setup-go@v4
with:
go-version: '1.25'
go-version: '1.26.3'
- name: Set up QEMU
uses: docker/setup-qemu-action@v2

View File

@@ -23,7 +23,7 @@ jobs:
- uses: actions/setup-go@v4
with:
go-version: '1.25'
go-version: '1.26.3'
- name: Set up QEMU
uses: docker/setup-qemu-action@v2

View File

@@ -4,14 +4,42 @@ on:
schedule:
- cron: "0 0 * * *"
permissions:
issues: write
jobs:
issue-check-inactive:
runs-on: ubuntu-latest
steps:
- name: check-inactive
uses: actions-cool/issues-helper@v2
with:
actions: 'check-inactive'
inactive-label: 'stale'
inactive-day: 30
exclude-labels: 'announcement'
- name: Label inactive issues as stale
env:
GH_TOKEN: ${{ github.token }}
INACTIVE_DAY: "30"
INACTIVE_LABEL: "stale"
EXCLUDE_LABEL: "announcement"
run: |
set -euo pipefail
cutoff="$(date -u -d "${INACTIVE_DAY} days ago" +%Y-%m-%dT%H:%M:%SZ)"
gh issue list \
--repo "${{ github.repository }}" \
--state open \
--limit 1000 \
--json number,labels,updatedAt \
| jq -c \
--arg cutoff "$cutoff" \
--arg inactive "$INACTIVE_LABEL" \
--arg exclude "$EXCLUDE_LABEL" \
'
.[]
| select(.updatedAt < $cutoff)
| select([.labels[].name] | index($exclude) | not)
| select([.labels[].name] | index($inactive) | not)
' \
| while IFS= read -r issue; do
number="$(echo "$issue" | jq -r .number)"
echo "Marking issue #${number} as ${INACTIVE_LABEL}"
gh issue edit "$number" \
--repo "${{ github.repository }}" \
--add-label "$INACTIVE_LABEL"
done

View File

@@ -4,17 +4,41 @@ on:
schedule:
- cron: "0 1 * * *"
permissions:
issues: write
jobs:
issue-close-require:
runs-on: ubuntu-latest
steps:
- name: need reproduce
uses: actions-cool/issues-helper@v2
with:
actions: 'close-issues'
labels: 'stale,state/awaiting user feedback'
inactive-day: 7
body: |
If you do not provide feedback for more than 37 days, we will close the issue and you can either reopen it or submit a new issue.
- name: Close inactive issues awaiting user feedback
env:
GH_TOKEN: ${{ github.token }}
INACTIVE_DAY: "7"
run: |
set -euo pipefail
cutoff="$(date -u -d "${INACTIVE_DAY} days ago" +%Y-%m-%dT%H:%M:%SZ)"
body="$(cat <<'EOF'
If you do not provide feedback for more than 37 days, we will close the issue and you can either reopen it or submit a new issue.
您超过 37 天未反馈信息,我们将关闭该 issue如有需求您可以重新打开或者提交新的 issue。
您超过 37 天未反馈信息,我们将关闭该 issue如有需求您可以重新打开或者提交新的 issue。
EOF
)"
# Trim leading indentation from heredoc lines for a cleaner comment.
body="$(printf '%s\n' "$body" | sed 's/^[[:space:]]*//')"
gh issue list \
--repo "${{ github.repository }}" \
--state open \
--label "stale" \
--label "state/awaiting user feedback" \
--limit 1000 \
--json number,updatedAt \
| jq -c --arg cutoff "$cutoff" '.[] | select(.updatedAt < $cutoff)' \
| while IFS= read -r issue; do
number="$(echo "$issue" | jq -r .number)"
echo "Closing issue #${number}"
gh issue close "$number" \
--repo "${{ github.repository }}" \
--comment "$body"
done

View File

@@ -4,13 +4,19 @@ on:
issues:
types: [closed]
permissions:
issues: write
jobs:
issue-closed-remove-labels:
runs-on: ubuntu-latest
if: "!contains(github.event.issue.labels.*.name, 'stale')"
steps:
- name: Remove statle labels when issue that hasn't stale label is closed
uses: actions-cool/issues-helper@v2
with:
actions: 'remove-labels'
labels: 'state/awaiting processing,state/awaiting user feedback'
- name: Remove state labels when issue that hasn't stale label is closed
env:
GH_TOKEN: ${{ github.token }}
run: |
gh issue edit "${{ github.event.issue.number }}" \
--repo "${{ github.repository }}" \
--remove-label "state/awaiting processing" \
--remove-label "state/awaiting user feedback" || true

View File

@@ -4,35 +4,48 @@ on:
name: Add issues workflow labels
permissions:
issues: write
jobs:
add-label-if-is-author:
runs-on: ubuntu-latest
if: (github.event.issue.user.id == github.event.comment.user.id) && !github.event.issue.pull_request && (github.event.issue.state == 'open')
steps:
- name: Add require handle label
uses: actions-cool/issues-helper@v2
with:
actions: 'add-labels'
labels: 'state/awaiting processing'
env:
GH_TOKEN: ${{ github.token }}
run: |
gh issue edit "${{ github.event.issue.number }}" \
--repo "${{ github.repository }}" \
--add-label "state/awaiting processing"
- name: Remove require reply label
uses: actions-cool/issues-helper@v2
with:
actions: 'remove-labels'
labels: 'state/awaiting user feedback,stale'
env:
GH_TOKEN: ${{ github.token }}
run: |
gh issue edit "${{ github.event.issue.number }}" \
--repo "${{ github.repository }}" \
--remove-label "state/awaiting user feedback" \
--remove-label "stale" || true
add-label-if-not-author:
runs-on: ubuntu-latest
if: (github.event.issue.user.id != github.event.comment.user.id) && !github.event.issue.pull_request && (github.event.issue.state == 'open') && (!contains(github.event.comment.body, '/keep-state'))
steps:
- name: Add require replay label
uses: actions-cool/issues-helper@v2
with:
actions: 'add-labels'
labels: 'state/awaiting user feedback'
- name: Add require reply label
env:
GH_TOKEN: ${{ github.token }}
run: |
gh issue edit "${{ github.event.issue.number }}" \
--repo "${{ github.repository }}" \
--add-label "state/awaiting user feedback"
- name: Remove require handle label
uses: actions-cool/issues-helper@v2
with:
actions: 'remove-labels'
labels: 'state/awaiting processing,stale'
env:
GH_TOKEN: ${{ github.token }}
run: |
gh issue edit "${{ github.event.issue.number }}" \
--repo "${{ github.repository }}" \
--remove-label "state/awaiting processing" \
--remove-label "stale" || true

View File

@@ -4,22 +4,30 @@ on:
issues:
types: [opened, reopened]
permissions:
issues: write
jobs:
issue-open-add-labels:
runs-on: ubuntu-latest
if: ${{ !github.event.issue.pull_request }}
steps:
- name: Add labels
uses: actions-cool/issues-helper@v2
if: ${{ !github.event.comment.pull_request.pull_request }}
with:
actions: 'add-labels'
labels: 'state/awaiting processing'
env:
GH_TOKEN: ${{ github.token }}
run: |
gh issue edit "${{ github.event.issue.number }}" \
--repo "${{ github.repository }}" \
--add-label "state/awaiting processing"
- name: Remove require reply label
uses: actions-cool/issues-helper@v2
with:
actions: 'remove-labels'
labels: 'state/awaiting user feedback,stale'
env:
GH_TOKEN: ${{ github.token }}
run: |
gh issue edit "${{ github.event.issue.number }}" \
--repo "${{ github.repository }}" \
--remove-label "state/awaiting user feedback" \
--remove-label "stale" || true
notify-author-comment:
runs-on: ubuntu-latest

View File

@@ -185,6 +185,7 @@ y18n-lang := en-US,zh-CN
y18n-packages := \
yunion.io/x/onecloud/cmd/apigateway \
yunion.io/x/onecloud/cmd/keystone \
yunion.io/x/onecloud/cmd/llm \
yunion.io/x/onecloud/cmd/monitor \
yunion.io/x/onecloud/cmd/region \
yunion.io/x/onecloud/cmd/yunionconf \
@@ -260,7 +261,7 @@ dep:
@echo "$$depDeprecated"
@$(MAKE) mod
RELEASE_BRANCH:=release/4.0.2
RELEASE_BRANCH:=master
GOPROXY ?= direct
mod:

View File

@@ -8,7 +8,7 @@ endif
ModBaseName:=$(notdir $(ModName))
DockerImageRegistry?=registry.cn-beijing.aliyuncs.com
DockerImageAlpineBuild?=$(DockerImageRegistry)/yunionio/alpine-build:3.22.2-go-1.24.9-0
DockerImageAlpineBuild?=$(DockerImageRegistry)/yunionio/alpine-build:3.23-go-1.26.3-0
EnvIf=$(if $($(1)),$(1)=$($(1)))

View File

@@ -9,7 +9,9 @@
<img src="https://v1.cloudpods.org/images/cloudpods_logo_green.png" alt="Cloudpods" height="100">
Cloudpods是一个开源的Golang实现的云原生的融合多云/混合云的云平台,也就是一个云上之云”。Cloudpods不仅可以管理本地的虚拟机和物理机资源还可以管理多个云平台和云账号。Cloudpods隐藏了这些异构基础设施资源的数据模型和API的差异对外暴露了一套统一的API允许用户就像用一个云一样地访问多云。从而大大降低了访问多云的复杂度提升了管理多云的效率。
Cloudpods是一个开源的Golang实现的云原生的融合多云/混合云的云平台,也就是一个云上之云”。Cloudpods不仅可以管理本地的虚拟机和物理机资源还可以管理多个云平台和云账号。Cloudpods隐藏了这些异构基础设施资源的数据模型和API的差异对外暴露了一套统一的API允许用户就像用一个云一样地访问多云。从而大大降低了访问多云的复杂度提升了管理多云的效率。
Cloudpods还提供了 **AI 云**一个面向大语言模型LLM推理与 AI 容器应用的统一管理平台,帮助企业在同一平台完成 AI 工作负载的部署、调度与运维,与 Cloudpods 私有云/多云资源体系无缝集成。
## 谁需要Cloudpods?
@@ -18,12 +20,25 @@ Cloudpods是一个开源的Golang实现的云原生的融合多云/混合云的
* 将VMware vSphere虚拟化集群转换为一个可以自服务的私有云平台
* 在混合云的场景,能够在一个界面访问私有云和公有云
* 通过一个集中的入口访问分布在多个公有云平台上的多个账号
* 当前只使用一个公有云账号但希望将来使用多云的用户
* 当前只使用一个公有云账号但希望将来使用多云的用户
* 需要部署和管理 LLM 推理服务及 AI 容器应用,并需要 GPU 调度支持的用户
## 功能
请访问[产品介绍](https://www.cloudpods.org/docs/introduction/)页面了解详细信息。
### AI 云
* **AI 推理服务**:部署和管理 LLM 推理实例(支持 Ollama、vLLM、SGLang 等),支持 GPU 调度、模型挂载与推理服务地址分配。
* **AI 应用管理**:一站式部署 LLM 应用编排、智能体助手、图像生成等 AI 容器应用。
* **模型库**:统一管理模型来源、版本与缓存,支持多实例复用、离线分发,避免重复下载。
* **模板与镜像**:通过模板定义 CPU/内存/GPU 等资源规格,通过镜像管理容器运行环境,实现标准化交付。
* **GPU 运维**GPU 设备自动探测与注册,支持 NVIDIA/CUDA 环境的统一配置与管理。
支持的 AI 工作负载:
* AI 推理Ollama、vLLM、SGLang
* AI 应用OpenClaw、Dify、ComfyUI、Hermes Agent
### 支持的云平台
* 公有云:
@@ -37,29 +52,38 @@ Cloudpods是一个开源的Golang实现的云原生的融合多云/混合云的
* 天翼云
* 移动云
* 京东云
* 火山引擎
* 百度云
* 金山云
* 青云
* Oracle Cloud
* 联通云
* 私有云:
* OpenStack
* ZStack
* Alibaba Cloud Aspara (阿里飞天)
* Alibaba Cloud Apsara (阿里飞天)
* Huawei HCSO (华为HCSO)
* Nutanix
* BingoCloud
* OceanBase
* 本地基础设施资源:
* 基于 KVM 实现的轻量级私有云
* VMWare vSphere vCenter/ESXi
* Baremetals (IPMI, Redfish API)
* Object storages (Minio, Ceph, XSky)
* VMware vSphere vCenter/ESXi
* Proxmox VE
* 裸金属 (IPMI, Redfish API)
* 对象存储 (Minio, Ceph, XSky)
* NAS (Ceph)
### 支持的云资源
* Servers: instances, disks, network interfaces, networks, vpcs, storages, hosts, wires, snapshots, snapshot policies, security groups, elastic IPs, SSH keypairs, images
* Load Balancers: instances, listeners, backend groups, backends, TLS certificates, ACLs
* Object Storage: buckets, objects
* NAS: file_systems, access_groups, mount_targets
* RDS: instances, accounts, backups, databases, parameters, privileges
* Elastic Cache: instances, accounts, backups, parameters
* DNS: DNS zones, DNS records
* VPC: VPCs, VPC peering, inter-VPC network, NAT gateway, DNAT/SNAT rules, route tables, route entries
* 服务器实例、磁盘、网卡、网络、VPC、存储、宿主机、二层网络、快照、快照策略、安全组、弹性 IP、SSH 密钥对、镜像
* 负载均衡实例、监听、后端服务器组、后端服务器、TLS 证书、访问控制
* 对象存储:存储桶、对象
* NAS:文件系统、权限组、挂载点
* RDS:实例、账号、备份、数据库、参数、权限
* 弹性缓存:实例、账号、备份、参数
* DNSDNS 区域、DNS 记录
* VPCVPCVPC 对等连接、跨 VPC 网络、NAT 网关、DNAT/SNAT 规则、路由表、路由条目
## 安装部署

View File

@@ -11,19 +11,34 @@
Cloudpods is a cloud-native open source unified multi/hybrid-cloud platform developed with Golang, i.e. Cloudpods is *a cloud on clouds*. Cloudpods is able to manage not only on-premise KVM/baremetals, but also resources from many cloud accounts across many cloud providers. It hides the differences of underlying cloud providers and exposes one set of APIs that allow programatically interacting with these many clouds.
Cloudpods also provides **AI Cloud**, a unified management platform for large language model (LLM) inference and AI container applications, helping enterprises deploy, schedule, and operate AI workloads on a single platform, seamlessly integrated with the Cloudpods private cloud / multi-cloud resource ecosystem.
## Who needs Cloudpods?
* Those who need a simple solution to virtualize a few physical servers into a private cloud
* Those who need a compact and fully automatic baremetal lift-cycle management solution
* Those who want to turn a VMware vSphere virtualization cluster into a private cloud
* Those who need a cohesive view of both public and private cloud in a hybrid cloud setup
* Those who need a centric portal to access multiple acccounts from multiple public clouds
* Those who need a centric portal to access multiple accounts from multiple public clouds
* Those who is currently using a single cloud account, but will not lose the possibility to adopt multicloud strategy
* Those who need to deploy and manage LLM inference services and AI container applications with GPU support
## Features
See [Introduction](https://www.cloudpods.org/docs/introduction/) for details.
### AI Cloud
* **AI Inference Services**: Deploy and manage LLM inference instances (Ollama, vLLM, SGLang, and more) with GPU scheduling, model mounting, and inference service address allocation.
* **AI Application Management**: One-stop deployment of LLM application orchestration, agent assistants, image generation, and other AI container applications.
* **Model Library**: Unified management of model sources, versions, and caches, supporting multi-instance reuse and offline distribution.
* **Templates and Images**: Define resource specifications (CPU/memory/GPU) through templates, manage container runtime environments through images.
* **GPU Operations**: Automatic GPU device detection and registration, unified NVIDIA/CUDA environment configuration and management.
Supported AI workloads:
* AI Inference: Ollama, vLLM, SGLang
* AI Applications: OpenClaw, Dify, ComfyUI, Hermes Agent
### Supported cloud providers
* Public Clouds:
@@ -37,15 +52,24 @@ See [Introduction](https://www.cloudpods.org/docs/introduction/) for details.
* Ctyun (China Telecom)
* ECloud (China Mobile)
* JDCloud
* Volcengine
* Baidu Cloud
* Kingsoft Cloud
* QingCloud
* Oracle Cloud
* China Unicom Cloud
* Private Clouds:
* OpenStack
* ZStack
* Alibaba Cloud Aspara
* Alibaba Cloud Apsara
* Huawei HCSO
* Nutanix
* BingoCloud
* OceanBase
* On-premise resources:
* Lightweight private cloud built on KVM
* VMWare vSphere vCenter/ESXi
* VMware vSphere vCenter/ESXi
* Proxmox VE
* Baremetals (IPMI, Redfish API)
* Object storages (Minio, Ceph, XSky)
* NAS (Ceph)
@@ -84,7 +108,7 @@ Please check this [issue](https://github.com/yunionio/cloudpods/issues/11427) fo
## Changelog
See [Relase Notes](https://www.cloudpods.org/en/docs/release-notes/) and [Changelog](https://www.cloudpods.org/en/docs/development/changelog/) for details.
See [Release Notes](https://www.cloudpods.org/en/docs/release-notes/) and [Changelog](https://www.cloudpods.org/en/docs/development/changelog/) for details.
## Contribution
@@ -97,4 +121,3 @@ Apache License 2.0. See [LICENSE](./LICENSE).
## AI-generated doc
[DeepWiki](https://deepwiki.com/yunionio/cloudpods) provides an amazing AI-generated doc of this project, you may refer to it for more detailed and comprehensive understanding of codes.

1
build/aiproxy/vars Normal file
View File

@@ -0,0 +1 @@
DESCRIPTION="Yunion Cloud AI Proxy Service"

View File

@@ -79,6 +79,8 @@ echo "# Yunion RPM spec
%global pkgname yunion-$PKG
%global homedir /var/run/%{owner}
%global use_systemd $SERVICE
%global debug_package %{nil}
%global __strip /usr/bin/eu-strip
Name: %{pkgname}
Version: $VERSION

View File

@@ -0,0 +1,3 @@
FROM registry.cn-beijing.aliyuncs.com/yunionio/onecloud-base:v3.22.2-0
ADD ./_output/alpine-build/bin/aiproxy /opt/yunion/bin/aiproxy

View File

@@ -2,7 +2,7 @@ FROM registry.cn-beijing.aliyuncs.com/yunionio/ansibleserver-base:3.22.2-0
# https://github.com/yunionio/telegraf/blob/yn-release-1.36/Makefile.yn#L28
# install playbook and telegraf install pkg
COPY --from=registry.cn-beijing.aliyuncs.com/yunionio/file-repo:v0.5.2 /opt/yunion/playbook /opt/yunion/playbook
COPY --from=registry.cn-beijing.aliyuncs.com/yunionio/file-repo:v0.5.2 /opt/yunion/ansible-install-pkg /opt/yunion/ansible-install-pkg
COPY --from=registry.cn-beijing.aliyuncs.com/yunionio/file-repo:v0.5.5 /opt/yunion/playbook /opt/yunion/playbook
COPY --from=registry.cn-beijing.aliyuncs.com/yunionio/file-repo:v0.5.5 /opt/yunion/ansible-install-pkg /opt/yunion/ansible-install-pkg
ADD ./_output/alpine-build/bin/ansibleserver /opt/yunion/bin/ansibleserver

View File

@@ -1,4 +1,4 @@
FROM registry.cn-beijing.aliyuncs.com/yunionio/baremetal-base:v0.3.9-20251215.0
FROM registry.cn-beijing.aliyuncs.com/yunionio/baremetal-base:v0.3.9-20260724.0
LABEL maintainer="Zexi Li <lizexi@yunionyun.com>"

View File

@@ -1,8 +1,8 @@
#RUN yum install -y https://iso.yunion.cn/vm-images/baremetal-pxerom-1.1.0-21092209.x86_64.rpm
#RUN yum install -y http://192.168.23.50:8083/baremetal-pxerom-1.1.0-21092209.x86_64.rpm
FROM registry.cn-beijing.aliyuncs.com/yunionio/yunionos:v4.0.0-20251201.0 as yunionos
FROM registry.cn-beijing.aliyuncs.com/yunionio/yunionos:v4.0.0-20251203.0 as yunionos
FROM centos:8 as grub-stage
FROM registry.cn-beijing.aliyuncs.com/cloudpods/centos:8 as grub-stage
RUN sed -i 's/mirrorlist/#mirrorlist/g' /etc/yum.repos.d/CentOS-*
RUN sed -i 's|#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g' /etc/yum.repos.d/CentOS-*

View File

@@ -1,4 +1,4 @@
FROM registry.cn-beijing.aliyuncs.com/yunionio/host-deployer-base:1.5.3
FROM registry.cn-beijing.aliyuncs.com/yunionio/host-deployer-base:1.5.11
LABEL maintainer="Yaoqi Wan wanyaoqi@yunionyun.com"

View File

@@ -1,6 +1,7 @@
REGISTRY ?= "registry.cn-beijing.aliyuncs.com/yunionio"
DOCKER_BUILD = docker build -t $(REGISTRY)
DOCKER_BUILDX = docker buildx build --platform linux/arm64,linux/amd64,linux/riscv64 --push -t $(REGISTRY)
DOCKER_BUILDX_BM = docker buildx build --platform linux/arm64,linux/amd64 --push -t $(REGISTRY)
debian10-base:
@@ -40,7 +41,7 @@ WEBCONSOLE_BASE_VERSION_3-22-2 = 3.22.2-1
webconsole-base:
$(DOCKER_BUILDX)/webconsole-base:$(WEBCONSOLE_BASE_VERSION_3-22-2) -f ./Dockerfile.webconsole-base .
BAREMETAL_BASE_VERSION = v0.3.9-20251112.1
BAREMETAL_BASE_VERSION = v0.3.9-20260724.0
FEDORA_RISCV64_VERSION = 42
fedora-riscv64-base:
@@ -53,8 +54,9 @@ baremetal-base-riscv: fedora-riscv64-base
$(DOCKER_BUILDX)/baremetal-base:$(BAREMETAL_BASE_VERSION) -f ./Dockerfile.baremetal-base-riscv .
#docker push $(REGISTRY)/baremetal-base:$(BAREMETAL_BASE_VERSION)
# TODO: support riscv64 for baremetal-base
baremetal-base:
$(DOCKER_BUILDX)/baremetal-base:$(BAREMETAL_BASE_VERSION) -f ./Dockerfile.baremetal-base .
$(DOCKER_BUILDX_BM)/baremetal-base:$(BAREMETAL_BASE_VERSION) -f ./Dockerfile.baremetal-base .
#docker push $(REGISTRY)/baremetal-base:$(BAREMETAL_BASE_VERSION)
TORRENT_VERSION = 20210815.0
@@ -71,18 +73,6 @@ glance-base-3-22-2:
$(DOCKER_BUILDX)/glance-base:$(GLANCE_BASE_VERSION_3-22-2) -f ./Dockerfile.glance-base .
HOST_IMAGE_VERSION ?= v1.0.2
HOST_IMAGE_NAME = $(REGISTRY)/host-image:$(HOST_IMAGE_VERSION)
host-image:
docker pull $(HOST_IMAGE_NAME)-amd64 --platform amd64
docker pull $(HOST_IMAGE_NAME)-arm64 --platform arm64
docker manifest create $(HOST_IMAGE_NAME) \
$(HOST_IMAGE_NAME)-amd64 \
$(HOST_IMAGE_NAME)-arm64
docker manifest annotate $(HOST_IMAGE_NAME) $(HOST_IMAGE_NAME)-amd64 --arch amd64
docker manifest annotate $(HOST_IMAGE_NAME) $(HOST_IMAGE_NAME)-arm64 --arch arm64
docker manifest push $(HOST_IMAGE_NAME)
LBAGENT_BASE_VERSION = v0.0.5
lbagent-base:
$(DOCKER_BUILDX)/lbagent-base:$(LBAGENT_BASE_VERSION) -f ./Dockerfile.lbagent-base .

View File

@@ -2,7 +2,8 @@
触发时间: {{.start_time}}
报警级别: {{.level}}
触发条件: {{.description | unescaped}}
报警数量:{{len .matches}}
{{if .reason}}报警原因: {{.reason}}
{{end}}报警数量:{{len .matches}}
资源名称:{{.resource_name}}
详情地址: {{.web_url}}

View File

@@ -88,8 +88,19 @@
</tr>
<tr>
<td class="td">策略详情:</td>
<td>{{.description}}</td>
<td>
{{- range $i, $m := .matches -}}
{{- if $i}}<br/>{{end -}}
{{- $m.condition | unescaped -}}
{{- end -}}
</td>
</tr>
{{if .reason}}
<tr>
<td class="td">报警原因:</td>
<td>{{.reason}}</td>
</tr>
{{end}}
</table>
<table class="table" style="padding-top: 6px; padding-bottom: 10px;">
<tr>

View File

@@ -2,7 +2,8 @@ AlertName: {{.name}}
Time: {{.start_time}}
Level: {{.level}}
TriggerCondition: {{.description | unescaped}}
AlertCount: {{len .matches}}
{{if .reason}}Reason: {{.reason}}
{{end}}AlertCount: {{len .matches}}
ResourceName: {{.resource_name}}
WebUrl: {{.web_url}}

View File

@@ -88,8 +88,19 @@
</tr>
<tr>
<td class="td">Strategy details</td>
<td>{{.description}}</td>
<td>
{{- range $i, $m := .matches -}}
{{- if $i}}<br/>{{end -}}
{{- $m.condition | unescaped -}}
{{- end -}}
</td>
</tr>
{{if .reason}}
<tr>
<td class="td">Reason</td>
<td>{{.reason}}</td>
</tr>
{{end}}
</table>
<table class="table" style="padding-top: 6px; padding-bottom: 10px;">
<tr>

26
cmd/aiproxy/main.go Normal file
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 main
import (
"yunion.io/x/onecloud/pkg/aiproxy/service"
"yunion.io/x/onecloud/pkg/util/atexit"
)
func main() {
defer atexit.Handle()
service.StartService()
}

View File

@@ -17,6 +17,7 @@ package main
import (
"yunion.io/x/onecloud/cmd/climc/entry"
_ "yunion.io/x/onecloud/cmd/climc/shell"
_ "yunion.io/x/onecloud/cmd/climc/shell/aiproxy"
_ "yunion.io/x/onecloud/cmd/climc/shell/ansible"
_ "yunion.io/x/onecloud/cmd/climc/shell/apimap"
_ "yunion.io/x/onecloud/cmd/climc/shell/cloudevent"

View File

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

View File

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

View File

@@ -0,0 +1,35 @@
// 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 aiproxy
import (
"yunion.io/x/onecloud/cmd/climc/shell"
apmodules "yunion.io/x/onecloud/pkg/mcclient/modules/aiproxy"
"yunion.io/x/onecloud/pkg/mcclient/options"
apoptions "yunion.io/x/onecloud/pkg/mcclient/options/aiproxy"
)
func init() {
cmd := shell.NewResourceCmd(&apmodules.AiProviders)
cmd.Create(new(apoptions.AiProviderCreateOptions))
cmd.List(new(apoptions.AiProviderListOptions))
cmd.Show(new(apoptions.AiProviderShowOptions))
cmd.Update(new(apoptions.AiProviderUpdateOptions))
cmd.Delete(new(apoptions.AiProviderDeleteOptions))
cmd.PerformClass("test-connectivity", new(apoptions.AiProviderTestConnectivityOptions))
cmd.Perform("test-connectivity", new(options.BaseIdOptions))
cmd.Perform("set-models", new(apoptions.AiProviderSetModelsOptions))
registerEnableDisable(cmd)
}

View File

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

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 aiproxy
import (
"yunion.io/x/onecloud/cmd/climc/shell"
"yunion.io/x/onecloud/pkg/mcclient"
"yunion.io/x/onecloud/pkg/mcclient/modulebase"
apmodules "yunion.io/x/onecloud/pkg/mcclient/modules/aiproxy"
apoptions "yunion.io/x/onecloud/pkg/mcclient/options/aiproxy"
)
func init() {
cmd := shell.NewResourceCmd(&apmodules.AIProxyUsage)
cmd.ClassShow(new(apoptions.AiProxyUsageOverviewOptions))
cmd.ClassShow(new(apoptions.AiProxyUsageAnalysisOptions))
cmd.RunWithDesc("event-list", "List ai_proxy_usage events", new(apoptions.AiProxyUsageEventListOptions),
func(s *mcclient.ClientSession, args *apoptions.AiProxyUsageEventListOptions) error {
params, err := args.Params()
if err != nil {
return err
}
ret, err := apmodules.AIProxyUsage.Get(s, args.GetId(), params)
if err != nil {
return err
}
shell.PrintList(modulebase.JSON2ListResult(ret), []string{
"id",
"timestamp",
"model",
"provider",
"source",
"api_key_label",
"input_tokens",
"output_tokens",
"total_tokens",
"latency_ms",
"result",
"status_code",
})
return nil
})
}

View File

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

View File

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

View File

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

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 aiproxy
import (
"yunion.io/x/onecloud/pkg/aiproxy/codexconfig"
"yunion.io/x/onecloud/pkg/mcclient"
)
func init() {
R(&codexconfig.Options{}, "ai-codex-config", "Generate Codex CLI config for aiproxy", func(s *mcclient.ClientSession, args *codexconfig.Options) error {
return codexconfig.Run(s, args)
})
}

View File

@@ -0,0 +1,21 @@
// 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 aiproxy
import (
"yunion.io/x/onecloud/cmd/climc/shell"
)
var R = shell.R

View File

@@ -0,0 +1,16 @@
// 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 aiproxy registers climc commands for the aiproxy service.
package aiproxy // import "yunion.io/x/onecloud/cmd/climc/shell/aiproxy"

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 aiproxy
import (
"yunion.io/x/onecloud/cmd/climc/shell"
baseoptions "yunion.io/x/onecloud/pkg/mcclient/options"
)
func registerEnableDisable(cmd *shell.ResourceCmd) {
cmd.Perform("enable", new(baseoptions.BaseIdOptions))
cmd.Perform("disable", new(baseoptions.BaseIdOptions))
}

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 aiproxy
import (
"yunion.io/x/onecloud/pkg/aiproxy/ft"
"yunion.io/x/onecloud/pkg/mcclient"
)
func init() {
R(&ft.AnthropicOptions{}, "ai-test-anthropic", "Run aiproxy Anthropic Messages API E2E test", func(s *mcclient.ClientSession, args *ft.AnthropicOptions) error {
return ft.RunAnthropicTest(s, args)
})
}

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 aiproxy
import (
"yunion.io/x/onecloud/pkg/aiproxy/ft"
"yunion.io/x/onecloud/pkg/mcclient"
)
func init() {
R(&ft.ChatOptions{}, "ai-test-chat", "Run aiproxy OpenAI chat E2E test", func(s *mcclient.ClientSession, args *ft.ChatOptions) error {
return ft.RunChatTest(s, args)
})
}

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 aiproxy
import (
"yunion.io/x/onecloud/pkg/aiproxy/ft"
"yunion.io/x/onecloud/pkg/mcclient"
)
func init() {
R(&ft.ProviderCreateOptions{}, "ai-test-provider-create", "Create custom ai_provider and verify", func(s *mcclient.ClientSession, args *ft.ProviderCreateOptions) error {
return ft.RunProviderCreateTest(s, args)
})
}

View File

@@ -19,7 +19,7 @@ import (
"yunion.io/x/onecloud/pkg/mcclient"
modules "yunion.io/x/onecloud/pkg/mcclient/modules/ansible"
"yunion.io/x/onecloud/pkg/mcclient/options"
options "yunion.io/x/onecloud/pkg/mcclient/options/ansible"
)
func init() {

View File

@@ -56,6 +56,9 @@ func init() {
})
R(&options.MeshNetworkUpdateOptions{}, "meshnetwork-update", "Update mesh network", func(s *mcclient.ClientSession, opts *options.MeshNetworkUpdateOptions) error {
params, err := base_options.StructToParams(opts)
if err != nil {
return err
}
mn, err := modules.MeshNetworks.Update(s, opts.ID, params)
if err != nil {
return err

View File

@@ -56,6 +56,9 @@ func init() {
})
R(&options.RouterUpdateOptions{}, "router-update", "Update router", func(s *mcclient.ClientSession, opts *options.RouterUpdateOptions) error {
params, err := base_options.StructToParams(opts)
if err != nil {
return err
}
router, err := modules.Routers.Update(s, opts.ID, params)
if err != nil {
return err

View File

@@ -56,6 +56,9 @@ func init() {
})
R(&options.RouteUpdateOptions{}, "router-route-update", "Update router route", func(s *mcclient.ClientSession, opts *options.RouteUpdateOptions) error {
params, err := base_options.StructToParams(opts)
if err != nil {
return err
}
router, err := modules.Routes.Update(s, opts.ID, params)
if err != nil {
return err

View File

@@ -56,6 +56,9 @@ func init() {
})
R(&options.RuleUpdateOptions{}, "router-rule-update", "Update router rule", func(s *mcclient.ClientSession, opts *options.RuleUpdateOptions) error {
params, err := base_options.StructToParams(opts)
if err != nil {
return err
}
router, err := modules.Rules.Update(s, opts.ID, params)
if err != nil {
return err

View File

@@ -103,4 +103,5 @@ func init() {
cmd.Perform("enable-image-cache", new(AgentEnableImageCacheOpt))
cmd.Perform("disable-image-cache", new(AgentDisableImageCacheOpt))
cmd.Delete(new(AgentDeleteOpt))
cmd.Get("app-options", &options.BaseIdOptions{})
}

View File

@@ -58,7 +58,7 @@ func init() {
type HostNetworkDetailOptions struct {
HOST string `help:"ID or Name of Host"`
NETWORK string `help:"ID or Name of Wire"`
NETWORK string `help:"ID or Name of Network"`
}
R(&HostNetworkDetailOptions{}, "host-network-show", "Show baremetal network details", func(s *mcclient.ClientSession, args *HostNetworkDetailOptions) error {
result, err := modules.Baremetalnetworks.Get(s, args.HOST, args.NETWORK, nil)

View File

@@ -24,7 +24,7 @@ func init() {
cmd := shell.NewResourceCmd(&modules.Cloudaccounts).WithKeyword("cloud-account")
cmd.List(&options.CloudaccountListOptions{})
cmd.Show(&options.SCloudAccountIdOptions{})
cmd.Show(&options.CloudaccountShowOptions{})
cmd.Delete(&options.SCloudAccountIdOptions{})
cmd.Update(&options.SCloudAccountUpdateBaseOptions{})
// cmd.PerformClassWithKeyword("preparenets-vmware", "prepare-nets", &options.SVMwareCloudAccountPrepareNetsOptions{})
@@ -41,6 +41,7 @@ func init() {
cmd.CreateWithKeyword("create-hcs", &options.SHCSAccountCreateOptions{})
cmd.CreateWithKeyword("create-hcsop", &options.SHcsOpCloudAccountCreateOptions{})
cmd.CreateWithKeyword("create-ucloud", &options.SUcloudCloudAccountCreateOptions{})
cmd.CreateWithKeyword("create-rockbase", &options.SRockbaseAccountCreateOptions{})
cmd.CreateWithKeyword("create-volcengine", &options.SVolcengineCloudAccountCreateOptions{})
cmd.CreateWithKeyword("create-zstack", &options.SZStackCloudAccountCreateOptions{})
cmd.CreateWithKeyword("create-s3", &options.SS3CloudAccountCreateOptions{})
@@ -76,6 +77,7 @@ func init() {
cmd.UpdateWithKeyword("update-hcso", &options.SHCSOAccountUpdateOptions{})
cmd.UpdateWithKeyword("update-hcs", &options.SHCSAccountUpdateOptions{})
cmd.UpdateWithKeyword("update-ucloud", &options.SUcloudCloudAccountUpdateOptions{})
cmd.UpdateWithKeyword("update-rockbase", &options.SRockbaseAccountUpdateOptions{})
cmd.UpdateWithKeyword("update-volcengine", &options.SVolcengineCloudAccountUpdateOptions{})
cmd.UpdateWithKeyword("update-zstack", &options.SZStackCloudAccountUpdateOptions{})
cmd.UpdateWithKeyword("update-s3", &options.SS3CloudAccountUpdateOptions{})
@@ -107,6 +109,7 @@ func init() {
cmd.PerformWithKeyword("update-credential-hcso", "update-credential", &options.SHCSOAccountUpdateCredentialOptions{})
cmd.PerformWithKeyword("update-credential-hcs", "update-credential", &options.SHCSOAccountUpdateCredentialOptions{})
cmd.PerformWithKeyword("update-credential-ucloud", "update-credential", &options.SUcloudCloudAccountUpdateCredentialOptions{})
cmd.PerformWithKeyword("update-credential-rockbase", "update-credential", &options.SRockbaseAccountUpdateCredentialOptions{})
cmd.PerformWithKeyword("update-credential-volcengine", "update-credential", &options.SVolcengineCloudAccountUpdateCredentialOptions{})
cmd.PerformWithKeyword("update-credential-zstack", "update-credential", &options.SZStackCloudAccountUpdateCredentialOptions{})
cmd.PerformWithKeyword("update-credential-s3", "update-credential", &options.SS3CloudAccountUpdateCredentialOptions{})
@@ -132,6 +135,7 @@ func init() {
cmd.PerformWithKeyword("test-connectivity-openstack", "test-connectivity", &options.SOpenStackCloudAccountUpdateCredentialOptions{})
cmd.PerformWithKeyword("test-connectivity-huawei", "test-connectivity", &options.SHuaweiCloudAccountUpdateCredentialOptions{})
cmd.PerformWithKeyword("test-connectivity-ucloud", "test-connectivity", &options.SUcloudCloudAccountUpdateCredentialOptions{})
cmd.PerformWithKeyword("test-connectivity-rockbase", "test-connectivity", &options.SRockbaseAccountUpdateCredentialOptions{})
cmd.PerformWithKeyword("test-connectivity-volcengine", "test-connectivity", &options.SVolcengineCloudAccountUpdateCredentialOptions{})
cmd.PerformWithKeyword("test-connectivity-zstack", "test-connectivity", &options.SZStackCloudAccountUpdateCredentialOptions{})
cmd.PerformWithKeyword("test-connectivity-s3", "test-connectivity", &options.SS3CloudAccountUpdateCredentialOptions{})

View File

@@ -26,7 +26,7 @@ import (
func init() {
type CloudproviderRegionListOptions struct {
options.BaseListOptions
Region string `help:"ID or Name of Host"`
Region string `help:"ID or Name of Region"`
Capability []string `help:"capability filter" choices:"project|compute|network|loadbalancer|objectstore|rds|cache|event"`
}

View File

@@ -34,15 +34,18 @@ func init() {
cmd.Perform("purge", &compute.CloudregionPurgeOptions{})
type CloudregionListOptions struct {
_ struct{} `mcp-desc:"【创建流程中的中间步骤】本工具不能完成创建。指定云厂商时必须传 provider例如创建阿里云provider=[\"Aliyun\"]。创建虚拟机时必须 usable=trueMCP 默认注入)。查完后继续 capability/镜像/sku最后 climc_server_create。严禁只查区域后停止"`
options.BaseListOptions
Usable *bool `help:"List regions where networks are usable"`
UsableVpc *bool `help:"List regions where VPC are usable"`
Service string `help:"List regions which service has available skus" choices:"dbinstances|servers|elasticcaches"`
Usable *bool `help:"只列网络可用的区域;创建虚拟机时必须为 trueMCP 默认注入 usable=true" mcp:"true"`
UsableVpc *bool `help:"List regions where VPC are usable" mcp:"true"`
Service string `help:"List regions which service has available skus" choices:"dbinstances|servers|elasticcaches" mcp:"true"`
ReadOnly *bool `help:"List regions with read only account"`
City string `help:"List regions in the specified city"`
City string `help:"List regions in the specified city" mcp:"true"`
Capability []string `help:"capability filter" choices:"project|compute|network|loadbalancer|objectstore|rds|cache|event"`
Capability []string `help:"capability filter" choices:"project|compute|network|loadbalancer|objectstore|rds|cache|event" mcp:"true"`
DistinctField string `help:"list the specified distinct field, e.g. city, region"`
@@ -148,7 +151,7 @@ func init() {
Desc string `help:"Description" json:"description" token:"desc"`
Latitude float32 `help:"region geographical location - latitude"`
Longitude float32 `help:"region geographical location - longitude"`
City string `help:"region geograpical location - city, e.g. Beijing, Frankfurt"`
City string `help:"region geographical location - city, e.g. Beijing, Frankfurt"`
CountryCode string `help:"region geographical location - ISO country code, e.g. CN"`
}
R(&CloudregionCreateOptions{}, "cloud-region-create", "Create a cloud region", func(s *mcclient.ClientSession, args *CloudregionCreateOptions) error {
@@ -191,7 +194,7 @@ func init() {
Desc string `help:"Description of the region" json:"description" token:"desc"`
Latitude float32 `help:"region geographical location - latitude"`
Longitude float32 `help:"region geographical location - longitude"`
City string `help:"region geograpical location - city, e.g. Beijing, Frankfurt"`
City string `help:"region geographical location - city, e.g. Beijing, Frankfurt"`
CountryCode string `help:"region geographical location - ISO country code, e.g. CN"`
}
R(&CloudregionUpdateOptions{}, "cloud-region-update", "Update a cloud region", func(s *mcclient.ClientSession, args *CloudregionUpdateOptions) error {
@@ -223,13 +226,18 @@ func init() {
})
type CloudregionCapabiltyOptions struct {
ID string `help:"ID or name of cloud region to check" json:"-"`
Domain string `help:"cloud region domain"`
_ struct{} `mcp-desc:"【创建流程中的中间步骤】查询区域能力尤其是可用磁盘存储类型storage_types2 / system_storage_types。公有云创建前必须调用ID 用 climc_cloud_region_list 返回的 id。从返回中选系统盘 backend如 cloud_essd、cloud_ssd写入 disk 的 backend=。查完继续镜像/网络/sku最后 climc_server_create"`
ID string `help:"ID or name of cloud region to check必须用 cloud-region-list 的 id" json:"-" mcp:"required"`
Domain string `help:"cloud region domain" mcp:"true"`
ShowEmulated bool `help:"show emulated cloud region"`
}
R(&CloudregionCapabiltyOptions{}, "cloud-region-capability", "Show region's capacibilities", func(s *mcclient.ClientSession, args *CloudregionCapabiltyOptions) error {
query, err := options.StructToParams(args)
if err != nil {
return err
}
result, err := modules.Cloudregions.GetSpecific(s, args.ID, "capability", query)
if err != nil {
return err

View File

@@ -24,7 +24,7 @@ var (
R = shell.R
printList = shell.PrintList
printObject = shell.PrintObject
printBatchResults = printutils.PrintJSONBatchResults
printBatchResults = shell.PrintBatchResults
InvalidUpdateError = shell.InvalidUpdateError
printObjectRecursive = printutils.PrintJSONObjectRecursive

View File

@@ -19,6 +19,7 @@ import (
"io/ioutil"
"os"
"os/exec"
"path"
"strings"
"github.com/ghodss/yaml"
@@ -31,6 +32,7 @@ import (
"yunion.io/x/onecloud/pkg/mcclient"
modules "yunion.io/x/onecloud/pkg/mcclient/modules/compute"
options "yunion.io/x/onecloud/pkg/mcclient/options/compute"
"yunion.io/x/onecloud/pkg/util/fileutils2"
"yunion.io/x/onecloud/pkg/util/pod/stream/cp"
)
@@ -137,15 +139,18 @@ func init() {
return nil
})
R(new(options.ContainerCopyOptions), "container-cp", "Container copy", func(s *mcclient.ClientSession, opts *options.ContainerCopyOptions) error {
parts := strings.Split(opts.CONTAINER_ID_FILE, ":")
copyToContainer := func(s *mcclient.ClientSession, src, dst string, rawFile bool) error {
parts := strings.Split(dst, ":")
if len(parts) != 2 {
return fmt.Errorf("invalid container id: %s", opts.CONTAINER_ID_FILE)
return fmt.Errorf("invalid container id: %s", dst)
}
if opts.RawFile {
fr, err := os.Open(opts.SRC_FILE)
if rawFile {
if fileutils2.IsDir(src) {
return fmt.Errorf("source path cannot be a directory when raw file is true: %s", src)
}
fr, err := os.Open(src)
if err != nil {
return errors.Wrapf(err, "open file: %v", opts.SRC_FILE)
return errors.Wrapf(err, "open file: %v", src)
}
defer fr.Close()
if err := modules.Containers.CopyTo(s, parts[0], parts[1], fr); err != nil {
@@ -153,22 +158,24 @@ func init() {
}
return nil
} else {
return cp.NewCopy().CopyToContainer(s, opts.SRC_FILE, cp.ContainerFileOpt{
return cp.NewCopy().CopyToContainer(s, src, cp.ContainerFileOpt{
ContainerId: parts[0],
File: parts[1],
})
}
})
R(new(options.ContainerCopyOptions), "container-cp-from", "Container copy", func(s *mcclient.ClientSession, opts *options.ContainerCopyOptions) error {
parts := strings.Split(opts.SRC_FILE, ":")
}
copyFromContainer := func(s *mcclient.ClientSession, src, dst string, rawFile bool) error {
parts := strings.Split(src, ":")
if len(parts) != 2 {
return fmt.Errorf("invalid container id: %s", opts.CONTAINER_ID_FILE)
return fmt.Errorf("invalid container id: %s", src)
}
ctrId := parts[0]
ctrFile := parts[1]
destFile := opts.CONTAINER_ID_FILE
if opts.RawFile {
destFile := dst
if fileutils2.IsDir(destFile) {
destFile = path.Join(destFile, path.Base(ctrFile))
}
if rawFile {
fw, err := os.Create(destFile)
if err != nil {
return errors.Wrapf(err, "open file: %v", destFile)
@@ -184,5 +191,37 @@ func init() {
File: ctrFile,
}, destFile)
}
}
R(new(options.ContainerCopyOptions), "container-cp", "Container copy", func(s *mcclient.ClientSession, opts *options.ContainerCopyOptions) error {
if strings.Contains(opts.SRC, ":") && !strings.Contains(opts.DST, ":") {
// copy from container to host
err := copyFromContainer(s, opts.SRC, opts.DST, opts.RawFile)
if err != nil {
return errors.Wrapf(err, "copy from container to host")
}
return nil
} else if !strings.Contains(opts.SRC, ":") && strings.Contains(opts.DST, ":") {
// copy from host to container
err := copyToContainer(s, opts.SRC, opts.DST, opts.RawFile)
if err != nil {
return errors.Wrapf(err, "copy to container")
}
return nil
} else if strings.Contains(opts.SRC, ":") && strings.Contains(opts.DST, ":") {
// copy from container to container
return fmt.Errorf("copy from container to container is not supported")
} else {
return fmt.Errorf("copy between local files is not supported")
}
})
R(new(options.ContainerCopyFromOptions), "container-cp-from", "Container copy", func(s *mcclient.ClientSession, opts *options.ContainerCopyFromOptions) error {
err := copyFromContainer(s, opts.CONTAINER_ID_PATH, opts.DST_PATH, opts.RawFile)
if err != nil {
return errors.Wrapf(err, "copy from container to host")
}
return nil
})
}

View File

@@ -29,7 +29,7 @@ func init() {
cmd.List(&compute.DBInstanceListOptions{})
cmd.Create(&compute.DBInstanceCreateOptions{})
cmd.Update(&compute.DBInstanceUpdateOptions{})
cmd.Show(&compute.DBInstanceIdOptions{})
cmd.Show(&compute.DBInstanceShowOptions{})
cmd.Delete(&compute.DBInstanceDeleteOptions{})
cmd.Perform("renew", &compute.DBInstanceRenewOptions{})
cmd.Perform("change-config", &compute.DBInstanceChangeConfigOptions{})

View File

@@ -42,6 +42,12 @@ import (
func init() {
cmd := shell.NewResourceCmd(&modules.Disks)
cmd.List(&compute_options.DiskListOptions{})
cmd.Show(&compute_options.DiskShowOptions{})
cmd.Perform("public", &compute_options.DiskIdOptions{})
cmd.Perform("private", &compute_options.DiskIdOptions{})
cmd.Perform("syncstatus", &compute_options.DiskIdOptions{})
cmd.Perform("change-owner-candidate-domains", &compute_options.DiskIdOptions{})
cmd.Perform("disk-cancel-delete", &compute_options.DiskIdOptions{})
cmd.Perform("set-class-metadata", &options.ResourceMetadataOptions{})
cmd.Perform("rebuild", &compute_options.DiskRebuildOptions{})
cmd.Perform("migrate", &compute_options.DiskMigrateOptions{})
@@ -49,33 +55,7 @@ func init() {
cmd.Perform("change-billing-type", new(compute_options.DiskChangeBillingTypeOptions))
cmd.Perform("change-storage-type", &compute_options.DiskChangeStorageTypeOptions{})
type DiskDetailOptions struct {
ID string `help:"ID or Name of disk"`
}
R(&DiskDetailOptions{}, "disk-show", "Show details of disk", func(s *mcclient.ClientSession, args *DiskDetailOptions) error {
disk, e := modules.Disks.Get(s, args.ID, nil)
if e != nil {
return e
}
printObject(disk)
return nil
})
R(&DiskDetailOptions{}, "disk-cancel-delete", "Cancel pending delete disks", func(s *mcclient.ClientSession, args *DiskDetailOptions) error {
disk, e := modules.Disks.PerformAction(s, args.ID, "cancel-delete", nil)
if e != nil {
return e
}
printObject(disk)
return nil
})
type DiskDeleteOptions struct {
ID []string `help:"ID of disks to delete" metavar:"DISK"`
OverridePendingDelete bool `help:"Delete disk directly instead of pending delete" short-token:"f"`
DeleteSnapshots bool `help:"Delete disk snapshots before delete disk"`
}
R(&DiskDeleteOptions{}, "disk-delete", "Delete a disk", func(s *mcclient.ClientSession, args *DiskDeleteOptions) error {
R(&compute_options.DiskDeleteOptions{}, "disk-delete", "Delete a disk", func(s *mcclient.ClientSession, args *compute_options.DiskDeleteOptions) error {
params := jsonutils.NewDict()
if args.OverridePendingDelete {
params.Add(jsonutils.JSONTrue, "override_pending_delete")
@@ -97,25 +77,7 @@ func init() {
return nil
})
R(&DiskDetailOptions{}, "disk-public", "Make a disk public", func(s *mcclient.ClientSession, args *DiskDetailOptions) error {
disk, e := modules.Disks.PerformAction(s, args.ID, "public", nil)
if e != nil {
return e
}
printObject(disk)
return nil
})
R(&DiskDetailOptions{}, "disk-private", "Make a disk private", func(s *mcclient.ClientSession, args *DiskDetailOptions) error {
disk, e := modules.Disks.PerformAction(s, args.ID, "private", nil)
if e != nil {
return e
}
printObject(disk)
return nil
})
R(&DiskDetailOptions{}, "disk-metadata", "Get metadata of a disk", func(s *mcclient.ClientSession, args *DiskDetailOptions) error {
R(&compute_options.DiskIdOptions{}, "disk-metadata", "Get metadata of a disk", func(s *mcclient.ClientSession, args *compute_options.DiskIdOptions) error {
meta, e := modules.Disks.GetMetadata(s, args.ID, nil)
if e != nil {
return e
@@ -124,24 +86,15 @@ func init() {
return nil
})
R(&DiskDetailOptions{}, "disk-syncstatus", "Sync status for disk", func(s *mcclient.ClientSession, args *DiskDetailOptions) error {
ret, e := modules.Disks.PerformAction(s, args.ID, "syncstatus", nil)
if e != nil {
return e
}
printObject(ret)
return nil
})
type DiskUpdateOptions struct {
ID string `help:"ID or name of disk"`
Name string `help:"New name of disk"`
Desc string `help:"Description" metavar:"DESCRIPTION"`
AutoDelete string `help:"enable/disable auto delete of disk" choices:"enable|disable"`
AutoDelete string `help:"Set disk auto_delete (true/false or enable/disable)" choices:"true|false|enable|disable"`
AutoSnapshot string `help:"enable/disable auto snapshot of disk" choices:"enable|disable"`
DiskType string `help:"Disk type" choices:"data|volume|sys"`
IsSsd *bool `help:"mark disk as ssd" negative:"no-is-ssd"`
AutoReset *bool `help:"Enable auto reset disk after geust shutdown"`
AutoReset *bool `help:"Enable auto reset disk after guest shutdown"`
}
R(&DiskUpdateOptions{}, "disk-update", "Update property of a virtual disk", func(s *mcclient.ClientSession, args *DiskUpdateOptions) error {
params := jsonutils.NewDict()
@@ -152,7 +105,7 @@ func init() {
params.Add(jsonutils.NewString(args.Desc), "description")
}
if len(args.AutoDelete) > 0 {
if args.AutoDelete == "enable" {
if args.AutoDelete == "enable" || args.AutoDelete == "true" {
params.Add(jsonutils.JSONTrue, "auto_delete")
} else {
params.Add(jsonutils.JSONFalse, "auto_delete")
@@ -214,11 +167,7 @@ func init() {
return nil
})
type DiskResizeOptions struct {
DISK string `help:"ID or name of disk"`
SIZE string `help:"Size of disk"`
}
R(&DiskResizeOptions{}, "disk-resize", "Resize a disk", func(s *mcclient.ClientSession, args *DiskResizeOptions) error {
R(&compute_options.DiskResizeOptions{}, "disk-resize", "Resize a disk", func(s *mcclient.ClientSession, args *compute_options.DiskResizeOptions) error {
params := jsonutils.NewDict()
params.Add(jsonutils.NewString(args.SIZE), "size")
disk, err := modules.Disks.PerformAction(s, args.DISK, "resize", params)
@@ -230,7 +179,7 @@ func init() {
})
type DiskResetOptions struct {
DISK string `help:"ID or name of disk"`
SNAPSHOT string `help:"snapshots ID of disk"`
SNAPSHOT string `help:"Snapshot ID of disk"`
AutoStart bool `help:"Autostart guest"`
}
R(&DiskResetOptions{}, "disk-reset", "Resize a disk", func(s *mcclient.ClientSession, args *DiskResetOptions) error {
@@ -286,9 +235,9 @@ func init() {
type DiskChangeOwnerOptions struct {
ID string `help:"Disk to change owner" json:"-"`
PROJECT string `help:"Project ID or change" json:"tenant"`
PROJECT string `help:"Project ID or name" json:"tenant"`
}
R(&DiskChangeOwnerOptions{}, "disk-change-owner", "Change owner porject of a disk", func(s *mcclient.ClientSession, opts *DiskChangeOwnerOptions) error {
R(&DiskChangeOwnerOptions{}, "disk-change-owner", "Change owner project of a disk", func(s *mcclient.ClientSession, opts *DiskChangeOwnerOptions) error {
params, err := options.StructToParams(opts)
if err != nil {
return err
@@ -301,7 +250,7 @@ func init() {
return nil
})
R(&DiskDetailOptions{}, "disk-change-owner-candidate-domains", "Get change owner candidate domain list", func(s *mcclient.ClientSession, args *DiskDetailOptions) error {
R(&compute_options.DiskIdOptions{}, "disk-change-owner-candidate-domains", "Get change owner candidate domain list", func(s *mcclient.ClientSession, args *compute_options.DiskIdOptions) error {
result, err := modules.Disks.GetSpecific(s, args.ID, "change-owner-candidate-domains", nil)
if err != nil {
return err

View File

@@ -27,7 +27,7 @@ import (
func init() {
cmd := shell.NewResourceCmd(&modules.ElasticCache).WithKeyword("elastic-cache")
cmd.List(&compute.ElasticCacheListOptions{})
cmd.Show(&compute.ElasticCacheIdOption{})
cmd.Show(&compute.ElasticCacheShowOptions{})
cmd.Create(&compute.ElasticCacheCreateOptions{})
cmd.Delete(&compute.ElasticCacheIdOption{})
cmd.Perform("restart", &compute.ElasticCacheIdOption{})

View File

@@ -27,7 +27,7 @@ func init() {
cmd.Create(&compute.EipCreateOptions{})
cmd.Delete(&options.BaseIdOptions{})
cmd.Update(&compute.EipUpdateOptions{})
cmd.Show(&options.BaseShowOptions{})
cmd.Show(&compute.EipShowOptions{})
cmd.Perform("purge", &options.BaseIdOptions{})
cmd.Perform("associate", &compute.EipAssociateOptions{})
cmd.Perform("dissociate", &compute.EipDissociateOptions{})

View File

@@ -36,7 +36,7 @@ import (
func init() {
cmd := shell.NewResourceCmd(&modules.Hosts)
cmd.List(&compute.HostListOptions{})
cmd.List(&compute.HostListForMcpOptions{})
cmd.GetMetadata(&options.BaseIdOptions{})
cmd.GetProperty(&compute.HostStatusStatisticsOptions{})
cmd.Update(&compute.HostUpdateOptions{})
@@ -77,6 +77,7 @@ func init() {
stats, _ := data.GetArray("workers")
printList(&printutils.ListResult{Data: stats}, nil)
}, &options.BaseIdOptions{})
cmd.Get("api-stats", &options.BaseIdOptions{})
cmd.Get("tap-config", &options.BaseIdOptions{})
cmd.GetWithCustomShow("nics", func(data jsonutils.JSONObject) {
results := printutils.ListResult{}
@@ -267,6 +268,7 @@ func init() {
Ip6Addr string `help:"IPv6 address"`
Bridge string `help:"Bridge of hostwire"`
Interface string `help:"Interface name, eg:eth0, en0"`
VlanId int `help:"Vlan ID"`
}
R(&HostAddNetIfOptions{}, "host-add-netif", "Host add a NIC", func(s *mcclient.ClientSession, args *HostAddNetIfOptions) error {
params := jsonutils.NewDict()
@@ -289,6 +291,7 @@ func init() {
if len(args.Interface) > 0 {
params.Add(jsonutils.NewString(args.Interface), "interface")
}
addVlanIdToParams(params, args.VlanId)
result, err := modules.Hosts.PerformAction(s, args.ID, "add-netif", params)
if err != nil {
return err
@@ -298,12 +301,14 @@ func init() {
})
type HostRemoveNetIfOptions struct {
ID string `help:"ID or Name of host"`
MAC string `help:"MAC of NIC to remove"`
ID string `help:"ID or Name of host"`
MAC string `help:"MAC of NIC to remove"`
VlanId int `help:"Vlan Id"`
}
R(&HostRemoveNetIfOptions{}, "host-remove-netif", "Remove NIC from host", func(s *mcclient.ClientSession, args *HostRemoveNetIfOptions) error {
params := jsonutils.NewDict()
params.Add(jsonutils.NewString(args.MAC), "mac")
addVlanIdToParams(params, args.VlanId)
result, err := modules.Hosts.PerformAction(s, args.ID, "remove-netif", params)
if err != nil {
return err
@@ -319,6 +324,7 @@ func init() {
Ip6 string `help:"IPv6 address"`
Network string `help:"network to connect"`
Reserved bool `help:"fetch IP from reserved pool"`
VlanId int `help:"Vlan ID"`
}
R(&HostEnableNetIfOptions{}, "host-enable-netif", "Enable a network interface for a host", func(s *mcclient.ClientSession, args *HostEnableNetIfOptions) error {
params := jsonutils.NewDict()
@@ -337,6 +343,7 @@ func init() {
if len(args.Network) > 0 {
params.Add(jsonutils.NewString(args.Network), "network")
}
addVlanIdToParams(params, args.VlanId)
result, err := modules.Hosts.PerformAction(s, args.ID, "enable-netif", params)
if err != nil {
return err
@@ -349,6 +356,7 @@ func init() {
ID string `help:"ID or Name of host"`
MAC string `help:"MAC of NIC to disable"`
Reserve bool `help:"Reserve the IP address"`
VlanId int `help:"Vlan Id"`
}
R(&HostDisableNetIfOptions{}, "host-disable-netif", "Disable a network interface", func(s *mcclient.ClientSession, args *HostDisableNetIfOptions) error {
params := jsonutils.NewDict()
@@ -356,6 +364,7 @@ func init() {
if args.Reserve {
params.Add(jsonutils.JSONTrue, "reserve")
}
addVlanIdToParams(params, args.VlanId)
result, err := modules.Hosts.PerformAction(s, args.ID, "disable-netif", params)
if err != nil {
return err
@@ -697,3 +706,9 @@ func init() {
},
)
}
func addVlanIdToParams(params *jsonutils.JSONDict, vlanId int) {
if vlanId > 1 {
params.Add(jsonutils.NewInt(int64(vlanId)), "vlan_id")
}
}

View File

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

View File

@@ -26,8 +26,12 @@ func init() {
cmd.List(&compute.DeviceListOptions{})
cmd.Update(&compute.DeviceUpdateOptions{})
cmd.Show(&compute.DeviceShowOptions{})
cmd.Create(&compute.DeviceCreateOptions{})
cmd.BatchDelete(&compute.DeviceDeleteOptions{})
cmd.BatchPerform("purge", &compute.DevicePurgeOptions{})
cmd.Perform("public", &options.SharableResourcePublicOptions{})
cmd.Perform("private", &options.BaseIdOptions{})
scmd := shell.NewResourceCmd(&modules.ServerIsolatedDevices)
scmd.List(&compute.ServerDeviceListOptions{})
}

View File

@@ -25,7 +25,7 @@ func init() {
cmd := shell.NewResourceCmd(&modules.Kafkas)
cmd.List(&compute.KafkaListOptions{})
cmd.Update(&compute.KafkaUpdateOptions{})
cmd.Show(&compute.KafkaIdOption{})
cmd.Show(&compute.KafkaShowOptions{})
cmd.Get("topics", &options.BaseIdOptions{})
cmd.Delete(&compute.KafkaIdOption{})
cmd.Perform("syncstatus", &compute.KafkaIdOption{})

View File

@@ -97,6 +97,9 @@ func init() {
})
R(&options.LoadbalancerAgentUpdateOptions{}, "lbagent-update", "Update lbagent", func(s *mcclient.ClientSession, opts *options.LoadbalancerAgentUpdateOptions) error {
params, err := opts.Params()
if err != nil {
return err
}
lbagent, err := modules.LoadbalancerAgents.Update(s, opts.ID, params)
if err != nil {
return err

View File

@@ -55,6 +55,9 @@ func init() {
})
R(&options.LoadbalancerBackendUpdateOptions{}, "lbbackend-update", "Update lbbackend", func(s *mcclient.ClientSession, opts *options.LoadbalancerBackendUpdateOptions) error {
params, err := opts.Params()
if err != nil {
return err
}
lbbackend, err := modules.LoadbalancerBackends.Update(s, opts.ID, params)
if err != nil {
return err

View File

@@ -54,6 +54,9 @@ func init() {
})
R(&options.LoadbalancerListenerRuleUpdateOptions{}, "lblistenerrule-update", "Update lblistenerrule", func(s *mcclient.ClientSession, opts *options.LoadbalancerListenerRuleUpdateOptions) error {
params, err := opts.Params()
if err != nil {
return err
}
lblistenerrule, err := modules.LoadbalancerListenerRules.Update(s, opts.ID, params)
if err != nil {
return err

View File

@@ -87,6 +87,9 @@ func init() {
})
R(&options.LoadbalancerListenerUpdateOptions{}, "lblistener-update", "Update lblistener", func(s *mcclient.ClientSession, opts *options.LoadbalancerListenerUpdateOptions) error {
params, err := opts.Params()
if err != nil {
return err
}
lblistener, err := modules.LoadbalancerListeners.Update(s, opts.ID, params)
if err != nil {
return err

View File

@@ -37,7 +37,7 @@ func init() {
return nil
})
R(&options.TagListOptions{}, "tag-list", "List tags", func(s *mcclient.ClientSession, opts *options.TagListOptions) error {
R(&options.TagListOptions{}, "service-metadata-list", "List service metadata", func(s *mcclient.ClientSession, opts *options.TagListOptions) error {
var mod modulebase.IResourceManager
switch opts.Service {
case "compute":

View File

@@ -25,7 +25,7 @@ func init() {
cmd := shell.NewResourceCmd(&modules.MongoDB)
cmd.List(&compute.MongoDBListOptions{})
cmd.Update(&compute.MongoDBUpdateOptions{})
cmd.Show(&options.BaseIdOptions{})
cmd.Show(&compute.MongoDBShowOptions{})
cmd.Delete(&options.BaseIdOptions{})
cmd.Get("backups", &options.BaseIdOptions{})
cmd.Perform("syncstatus", &options.BaseIdOptions{})

View File

@@ -25,7 +25,7 @@ import (
func init() {
type NetworkinterfaceNetworkListOptions struct {
Networkinterface string `help:"ID or Name of Server"`
Networkinterface string `help:"ID or Name of Networkinterface"`
Network string `help:"Network ID or name"`
}
R(&NetworkinterfaceNetworkListOptions{}, "networkinterface-network-list", "List server network pairs", func(s *mcclient.ClientSession, args *NetworkinterfaceNetworkListOptions) error {

View File

@@ -98,6 +98,22 @@ func init() {
return nil
})
type NetworkCreate3Options struct {
compute_options.NetworkCreateOptions `start_ip->positional:"false" end_ip->positional:"false" net_mask->positional:"false"`
}
R(&NetworkCreate3Options{}, "network-create3", "Create a dual-stack virtual network", func(s *mcclient.ClientSession, args *NetworkCreate3Options) error {
params, err := args.Params()
if err != nil {
return err
}
net, err := modules.Networks.Create(s, params)
if err != nil {
return err
}
printObject(net)
return nil
})
type NetworkSplitOptions struct {
NETWORK string `help:"ID or name of network to split"`
IP string `help:"Start ip of the split network"`
@@ -196,7 +212,7 @@ func init() {
type NetworkChangeOwnerOptions struct {
ID string `help:"Network to change owner" json:"-"`
PROJECT string `help:"Project ID or change" json:"tenant"`
PROJECT string `help:"Project ID or name" json:"tenant"`
}
R(&NetworkChangeOwnerOptions{}, "network-change-owner", "Change owner project of a network", func(s *mcclient.ClientSession, args *NetworkChangeOwnerOptions) error {
params, err := options.StructToParams(args)

View File

@@ -57,6 +57,9 @@ func init() {
})
R(&options.ProxySettingUpdateOptions{}, "proxysetting-update", "Update proxysetting", func(s *mcclient.ClientSession, opts *options.ProxySettingUpdateOptions) error {
params, err := options.StructToParams(opts)
if err != nil {
return err
}
proxysetting, err := modules.ProxySettings.Update(s, opts.ID, params)
if err != nil {
return err

View File

@@ -24,10 +24,10 @@ import (
func init() {
type NetworkReserveIPOptions struct {
NETWORK string `help:"IP or name of network"`
NETWORK string `help:"ID or name of network"`
NOTES string `help:"Why reserve this IP"`
IPS []string `help:"IPs to reserve"`
Duration string `help:"reservation duration, e.g. 1I, 1H, 2M"`
Duration string `help:"reservation duration, e.g. 1D, 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 {
@@ -49,7 +49,7 @@ func init() {
})
type NetworkReleaseReservedIPOptions struct {
NETWORK string `help:"IP or name of network"`
NETWORK string `help:"ID or name of network"`
IP string `help:"IP to release"`
}
R(&NetworkReleaseReservedIPOptions{}, "network-release-reserved-ip", "Release a reserved IP into pool", func(s *mcclient.ClientSession, args *NetworkReleaseReservedIPOptions) error {

View File

@@ -49,6 +49,9 @@ func init() {
R(&ScalingPolicyListOptions{}, "scaling-policy-list", "List Scaling Policy", func(s *mcclient.ClientSession,
args *ScalingPolicyListOptions) error {
params, err := options.ListStructToParams(args)
if err != nil {
return err
}
policies, err := modules.ScalingPolicy.List(s, params)
if err != nil {
return err

View File

@@ -17,15 +17,14 @@ package compute
import (
"yunion.io/x/onecloud/cmd/climc/shell"
modules "yunion.io/x/onecloud/pkg/mcclient/modules/compute"
"yunion.io/x/onecloud/pkg/mcclient/options"
"yunion.io/x/onecloud/pkg/mcclient/options/compute"
)
func init() {
cmd := shell.NewResourceCmd(&modules.SecGroupRules).WithKeyword("secgroup-rule")
cmd.List(&compute.SecGroupRulesListOptions{})
cmd.Show(&options.BaseShowOptions{})
cmd.Delete(&options.BaseIdOptions{})
cmd.Show(&compute.SecGroupRuleShowOptions{})
cmd.Delete(&compute.SecGroupRuleDeleteOptions{})
cmd.Create(&compute.SecGroupRulesCreateOptions{})
cmd.Update(&compute.SecGroupRulesUpdateOptions{})
}

View File

@@ -25,9 +25,9 @@ func init() {
cmd := shell.NewResourceCmd(&modules.SecGroups)
cmd.List(&options.SecgroupListOptions{})
cmd.Create(&options.SecgroupCreateOptions{})
cmd.Show(&options.SecgroupIdOptions{})
cmd.Show(&options.SecgroupShowOptions{})
cmd.Update(&baseoptions.BaseUpdateOptions{})
cmd.Delete(&options.SecgroupIdOptions{})
cmd.Delete(&options.SecgroupDeleteOptions{})
cmd.Perform("public", &options.SecgroupIdOptions{})
cmd.Perform("syncstatus", &options.SecgroupIdOptions{})
cmd.Perform("private", &options.SecgroupIdOptions{})
@@ -36,4 +36,7 @@ func init() {
cmd.Perform("change-owner", &options.SecgroupChangeOwnerOptions{})
cmd.Perform("import-rules", &options.SecgroupImportRulesOptions{})
cmd.PerformClass("clean", &options.SecgroupCleanOptions{})
scmd := shell.NewResourceCmd(&modules.Servernetworksecgroups)
scmd.List(&options.ServerNetworkSecgroupListOptions{})
}

View File

@@ -77,22 +77,10 @@ func init() {
type ServerDiskUpdateOptions struct {
SERVER string `help:"ID or Name of server"`
DISK string `help:"ID or Name of Disk"`
Driver string `help:"Driver of vDisk" choices:"virtio|ide|sata|scsi|pvscsi"`
Cache string `help:"Cache mode of vDisk" choices:"writethrough|none|writeback|directsync"`
Aio string `help:"Asynchronous IO mode of vDisk" choices:"native|threads"`
Index int64 `help:"Index of vDisk" default:"-1"`
}
R(&ServerDiskUpdateOptions{}, "server-disk-update", "Update details of a virtual disk of a virtual server", func(s *mcclient.ClientSession, args *ServerDiskUpdateOptions) error {
params := jsonutils.NewDict()
if len(args.Driver) > 0 {
params.Add(jsonutils.NewString(args.Driver), "driver")
}
if len(args.Cache) > 0 {
params.Add(jsonutils.NewString(args.Cache), "cache_mode")
}
if len(args.Aio) > 0 {
params.Add(jsonutils.NewString(args.Aio), "aio_mode")
}
if args.Index >= 0 {
params.Add(jsonutils.NewInt(args.Index), "index")
}
@@ -125,10 +113,12 @@ func init() {
})
type ServerAttachDiskOptions struct {
_ struct{} `mcp-desc:"将已有硬盘挂载到虚机。SERVER/DISK 为 id/name可选 driver。先 climc_server_list + climc_disk_list"`
SERVER string `help:"ID or name of server"`
DISK string `help:"ID of name of disk to attach"`
Driver string `help:"Driver" choices:"virtio|ide|scsi"`
Cache string `help:"Cache mode" choices:"writeback|none|writethrought"`
DISK string `help:"ID or name of disk to attach"`
Driver string `help:"Disk driver" choices:"virtio|ide|scsi" mcp:"true"`
Cache string `help:"Cache mode" choices:"writeback|none|writethrough" mcp:"true"`
}
R(&ServerAttachDiskOptions{}, "server-attach-disk", "Attach an existing virtual disks to a virtual server", func(s *mcclient.ClientSession, args *ServerAttachDiskOptions) error {
params := jsonutils.NewDict()
@@ -148,9 +138,11 @@ func init() {
})
type ServerDetachDiskOptions struct {
_ struct{} `mcp-desc:"从虚机卸载硬盘。SERVER/DISK 为 id/name可选 delete-disk。先 climc_server_list / climc_disk_list"`
SERVER string `help:"ID or name of server"`
DISK string `help:"ID or name of disk to detach"`
DeleteDisk bool `help:"Delete disk if the disk not has flag of auto_delete when detached"`
DeleteDisk bool `help:"Delete the disk after detach (ignored if disk has auto_delete)" mcp:"true"`
}
R(&ServerDetachDiskOptions{}, "server-detach-disk", "Detach a disk from a virtual server", func(s *mcclient.ClientSession, args *ServerDetachDiskOptions) error {
params := jsonutils.NewDict()

View File

@@ -23,15 +23,15 @@ import (
func init() {
type ServerAttachDeviceOptions struct {
SERVER string `help:"ID or name of server"`
DEVICE string `help:"ID of isolated device to attach"`
Type string `help:"Device type" choices:"GPU-HPC|GPU-VGA|PCI"`
SERVER string `help:"ID or name of server"`
DEVICE string `help:"ID of isolated device to attach"`
GpuType string `help:"Type of GPU to attach to" choices:"HPC|VGA"`
}
R(&ServerAttachDeviceOptions{}, "server-attach-isolated-device", "Attach an existing isolated device to a virtual server", func(s *mcclient.ClientSession, args *ServerAttachDeviceOptions) error {
params := jsonutils.NewDict()
params.Add(jsonutils.NewString(args.DEVICE), "device")
if len(args.Type) > 0 {
params.Add(jsonutils.NewString(args.Type), "dev_type")
if args.GpuType != "" {
params.Add(jsonutils.NewString(args.GpuType), "gpu_type")
}
srv, err := modules.Servers.PerformAction(s, args.SERVER, "attach-isolated-device", params)
if err != nil {
@@ -42,12 +42,18 @@ func init() {
})
type ServerDetachDeviceOptions struct {
SERVER string `help:"ID or name of server"`
DEVICE string `help:"ID of isolated device to attach"`
SERVER string `help:"ID or name of server"`
DEVICE string `help:"ID of isolated device to detach"`
INDEX int `help:"Index of isolated device to detach"`
IsForce bool `help:"Force detach isolated device"`
}
R(&ServerDetachDeviceOptions{}, "server-detach-isolated-device", "Detach a isolated device from a virtual server", func(s *mcclient.ClientSession, args *ServerDetachDeviceOptions) error {
params := jsonutils.NewDict()
params.Add(jsonutils.NewString(args.DEVICE), "device")
params.Add(jsonutils.NewInt(int64(args.INDEX)), "index")
if args.IsForce {
params.Set("is_force", jsonutils.JSONTrue)
}
srv, err := modules.Servers.PerformAction(s, args.SERVER, "detach-isolated-device", params)
if err != nil {
return err

View File

@@ -23,14 +23,20 @@ import (
"yunion.io/x/pkg/util/printutils"
"yunion.io/x/pkg/util/regutils"
"yunion.io/x/onecloud/cmd/climc/shell"
"yunion.io/x/onecloud/pkg/apis/compute"
"yunion.io/x/onecloud/pkg/cloudcommon/cmdline"
"yunion.io/x/onecloud/pkg/mcclient"
modules "yunion.io/x/onecloud/pkg/mcclient/modules/compute"
"yunion.io/x/onecloud/pkg/mcclient/options"
compute_options "yunion.io/x/onecloud/pkg/mcclient/options/compute"
)
func init() {
cmd := shell.NewResourceCmd(&modules.ServerNetworkTrafficLogs)
cmd.List(new(compute_options.ServerNetworkTrafficLogListOptions))
type ServerNetworkListOptions struct {
options.BaseListOptions
Server string `help:"ID or Name of Server"`
@@ -90,7 +96,7 @@ func init() {
type ServerNetworkUpdateOptions struct {
SERVER string `help:"ID or Name of Server"`
NETWORK string `help:"ID or Name of Wire"`
NETWORK string `help:"ID or Name of Network"`
Mac string `help:"Mac of NIC"`
Driver string `help:"Driver model of vNIC" choices:"virtio|e1000|vmxnet3|rtl8139"`
Index int64 `help:"Index of NIC" default:"-1"`
@@ -138,7 +144,10 @@ func init() {
type ServerNetworkBWOptions struct {
SERVER string `help:"ID or Name of server"`
MACORIP string `help:"IP, Mac, or Index of NIC"`
BW int64 `help:"Bandwidth in Mbps"`
BW int64 `help:"Bandwidth in Mbps"`
Tx int64 `help:"Tx bandwidth in Mbps"`
Rx int64 `help:"Rx bandwidth in Mbps"`
}
R(&ServerNetworkBWOptions{}, "server-change-bandwidth", "Change server network bandwidth in Mbps", func(s *mcclient.ClientSession, args *ServerNetworkBWOptions) error {
params := jsonutils.NewDict()
@@ -156,6 +165,8 @@ func init() {
return fmt.Errorf("Please specify Ip or Mac")
}
params.Add(jsonutils.NewInt(args.BW), "bandwidth")
params.Add(jsonutils.NewInt(args.Tx), "tx_bw_limit")
params.Add(jsonutils.NewInt(args.Rx), "rx_bw_limit")
server, err := modules.Servers.PerformAction(s, args.SERVER, "change-bandwidth", params)
if err != nil {
return err
@@ -194,7 +205,7 @@ func init() {
Reserve bool `help:"Put the release IP address into reserved address pool"`
Force bool `help:"detach server network by force"`
}
R(&ServerDetachNetworkOptions{}, "server-detach-network", "Detach the virtual network fron a virtual server", func(s *mcclient.ClientSession, args *ServerDetachNetworkOptions) error {
R(&ServerDetachNetworkOptions{}, "server-detach-network", "Detach the virtual network from a virtual server", func(s *mcclient.ClientSession, args *ServerDetachNetworkOptions) error {
params := jsonutils.NewDict()
// params.Add(jsonutils.NewString(args.NETWORK), "net_id")
if args.Reserve {

View File

@@ -30,6 +30,7 @@ import (
"yunion.io/x/pkg/util/printutils"
"yunion.io/x/onecloud/cmd/climc/shell"
billing_api "yunion.io/x/onecloud/pkg/apis/billing"
"yunion.io/x/onecloud/pkg/apis/compute"
"yunion.io/x/onecloud/pkg/mcclient"
"yunion.io/x/onecloud/pkg/mcclient/modulebase"
@@ -126,13 +127,19 @@ func init() {
cmd.Perform("update-sub-ips", &options.ServerUpdateSubIpsOptions{})
cmd.BatchPerform("restore-virtual-isolated-devices", &options.ServerIdsOptions{})
cmd.BatchPerform("set-os-info", &options.ServerSetOSInfoOptions{})
cmd.BatchPerform("start-rescue", &options.ServerStartOptions{})
cmd.BatchPerform("stop-rescue", &options.ServerStartOptions{})
// 与 server-start 复用参数时单独包一层,避免继承 mcp-desc 被注册为 MCP tool
cmd.BatchPerform("start-rescue", &options.ServerStartRescueOptions{})
cmd.BatchPerform("stop-rescue", &options.ServerStopRescueOptions{})
cmd.BatchPerform("sync-os-info", &options.ServerIdsOptions{})
cmd.BatchPerform("set-root-disk-matcher", &options.ServerSetRootDiskMatcher{})
cmd.Perform("disable-auto-merge-snapshot", &options.ServerDisableAutoMergeSnapshot{})
cmd.BatchPerform("set-tpm", &options.ServerSetTpmOptions{})
cmd.Perform("set-kickstart", &options.ServerKickstartConfigOptions{})
cmd.Perform("delete-kickstart", &options.ServerIdOptions{})
cmd.Perform("kickstart-complete", &options.ServerKickstartCompleteOptions{})
cmd.Get("kickstart", new(options.ServerIdOptions))
cmd.Get("vnc", new(options.ServerVncOptions))
cmd.Get("modification-types", new(options.ServerIdOptions))
cmd.Get("desc", new(options.ServerIdOptions))
cmd.Get("status", new(options.ServerIdOptions))
cmd.Get("iso", new(options.ServerIdOptions))
@@ -148,6 +155,11 @@ func init() {
cmd.Get("screen-dump-show", new(options.ServerScreenDumpOptions))
cmd.Get("numa-info", new(options.ServerIdOptions))
cmd.BatchPerform("screen-dump", new(options.ServerIdsOptions))
cmd.Perform("set-network-num-queues", new(options.ServerSetNetworkNumQueues))
cmd.Perform("set-network-secgroup", new(options.ServerNetworkSecGroupsOptions))
cmd.Perform("add-network-secgroup", new(options.ServerNetworkSecGroupsOptions))
cmd.Perform("revoke-network-secgroup", new(options.ServerNetworkSecGroupsOptions))
cmd.Perform("change-disk-driver", new(options.ServerChangeDiskDriverOptions))
cmd.GetProperty(&options.ServerStatusStatisticsOptions{})
cmd.GetProperty(&options.ServerProjectStatisticsOptions{})
@@ -209,8 +221,10 @@ func init() {
params.Name = opts.NAME
params.AutoStart = opts.AutoStart
params.Eip = opts.Eip
params.EipChargeType = opts.EipChargeType
params.EipChargeType = billing_api.ParseNetChargeType(opts.EipChargeType)
params.EipBw = opts.EipBw
params.EipTxBw = opts.EipTxBw
params.EipRxBw = opts.EipRxBw
server, err := modules.Servers.Create(s, params.JSON(params))
if err != nil {
@@ -280,7 +294,7 @@ func init() {
type ServerDiskSnapshotOptions struct {
SERVER string `help:"server ID or Name"`
DISK string `help:"create snapshot disk id"`
DISK string `help:"Disk ID for snapshot creation"`
SNAPSHOTNAME string `help:"Snapshot name"`
}
R(&ServerDiskSnapshotOptions{}, "server-disk-create-snapshot", "Task server disk snapshot", func(s *mcclient.ClientSession, args *ServerDiskSnapshotOptions) error {
@@ -720,7 +734,7 @@ func init() {
type ServerSnapshotAndClone struct {
ID string `help:"ID or name of VM" json:"-"`
NAME string `help:"Newly instance name" json:"name"`
NAME string `help:"New instance name" json:"name"`
AutoStart bool `help:"Auto start new guest"`
AllowDelete bool `help:"Allow new guest delete" json:"-"`
Count int `help:"Guest count"`
@@ -759,7 +773,7 @@ func init() {
ID string `help:"ID or name of server"`
Save string `help:"save xml into this file"`
}
R(&ServerJnlpOptions{}, "server-jnlp", "Get baremetal server jnlp file contentn", func(s *mcclient.ClientSession, args *ServerJnlpOptions) error {
R(&ServerJnlpOptions{}, "server-jnlp", "Get baremetal server jnlp file content", func(s *mcclient.ClientSession, args *ServerJnlpOptions) error {
spec, err := modules.Servers.GetSpecific(s, args.ID, "jnlp", nil)
if err != nil {
return err

View File

@@ -30,4 +30,5 @@ func init() {
cmd.Create(&options.ServerSkusCreateOptions{})
cmd.Update(&options.ServerSkusUpdateOptions{})
cmd.ClassShow(&options.ServerSkusListOptions{})
cmd.PerformClass("batch-update-price", &options.ServerSkusBatchUpdatePriceOptions{})
}

View File

@@ -24,16 +24,18 @@ import (
func init() {
type SnapshotsListOptions struct {
_ struct{} `mcp-desc:"列出磁盘快照。可用 disk/server/disk-type 过滤"`
options.BaseListOptions
Disk string `help:"Disk snapshots" json:"disk_id"`
FakeDeleted bool `help:"Show fake deleted snapshot or not"`
Disk string `help:"Disk snapshots" json:"disk_id" mcp:"true"`
FakeDeleted bool `help:"Show fake deleted snapshot or not" mcp:"true"`
Local *bool `help:"Show local snapshots"`
Share *bool `help:"Show shared snapshots"`
DiskType string `help:"Filter by disk type" choices:"sys|data"`
Server string `help:"Filter by server" json:"server_id"`
Unused bool
StorageId string `help:"Filter by storage id"`
DiskType string `help:"Filter by disk type" choices:"sys|data" mcp:"true"`
Server string `help:"Filter by server" json:"server_id" mcp:"true"`
Unused bool `mcp:"true"`
StorageId string `help:"Filter by storage id" mcp:"true"`
OrderByGuest string
OrderByDiskName string

View File

@@ -32,7 +32,7 @@ func init() {
HostType string `help:"Host type filter" choices:"baremetal|hypervisor|esxi|kubelet|hyperv"`
Gpu bool `help:"Only show gpu devices"`
Zone string `help:"Filter by zone id or name"`
Occupied bool `help:"show occupid host" json:"-"`
Occupied bool `help:"show occupied host" json:"-"`
}
R(&ListOptions{}, "spec", "List all kinds of model specs", func(s *mcclient.ClientSession, args *ListOptions) error {
var params *jsonutils.JSONDict
@@ -76,7 +76,7 @@ func init() {
DiskSpec []string `help:"Disk spec string, like 'Linux_adapter0_HDD_111Gx4'"`
Nic int64 `help:"#Nics count of host" metavar:"<NIC_COUNT>"`
GpuModel []string `help:"GPU model, like 'GeForce GTX 1050 Ti'"`
Occupied bool `help:"Show occupid host" json:"-"`
Occupied bool `help:"Show occupied host" json:"-"`
Manufacture string `help:"Manufacture of host"`
Model string `help:"Model of host"`
}

View File

@@ -31,17 +31,19 @@ import (
)
type GeneralUsageOptions struct {
HostType []string `help:"Host types" choices:"hypervisor|baremetal|esxi|xen|kubelet|hyperv|aliyun|azure|aws|huawei|qcloud|openstack|ucloud|zstack|google|ctyun|cnware"`
Provider []string `help:"Provider" choices:"OneCloud|VMware|Aliyun|Azure|Aws|Qcloud|Huawei|OpenStack|Ucloud|VolcEngine|ZStack|Google|Ctyun|CNWare"`
Brand []string `help:"Brands" choices:"OneCloud|VMware|Aliyun|Azure|Aws|Qcloud|Huawei|OpenStack|Ucloud|VolcEngine|ZStack|Google|Ctyun|CNWare"`
Project string `help:"show usage of specified project"`
_ struct{} `mcp-desc:"资源用量汇总usages/general-usage。报表「资源概览」用本工具不要用各资源 list 凑。项目级传 project=项目名/id域级传 project-domain平台级 scope=system。返回 servers/rds/cache/loadbalancer/buckets/eip/snapshot/vpcs/networks/ports 及 running_servers、disks.attached 等"`
ProjectDomain string `help:"show usage of specified domain"`
HostType []string `help:"Host types" choices:"hypervisor|baremetal|esxi|xen|kubelet|hyperv|aliyun|azure|aws|huawei|qcloud|openstack|ucloud|zstack|google|ctyun|cnware" mcp:"true"`
Provider []string `help:"Provider" choices:"OneCloud|VMware|Aliyun|Azure|Aws|Qcloud|Huawei|OpenStack|Ucloud|VolcEngine|ZStack|Google|Ctyun|CNWare" mcp:"true"`
Brand []string `help:"Brands" choices:"OneCloud|VMware|Aliyun|Azure|Aws|Qcloud|Huawei|OpenStack|Ucloud|VolcEngine|ZStack|Google|Ctyun|CNWare" mcp:"true"`
Project string `help:"show usage of specified project" mcp:"true"`
CloudEnv string `help:"show usage of specified cloudenv" choices:"public|private|onpremise"`
Scope string `help:"show usage of specified privilege scope" choices:"system|domain|project"`
ProjectDomain string `help:"show usage of specified domain" mcp:"true"`
Refresh bool `help:"force refresh usage statistics"`
CloudEnv string `help:"show usage of specified cloudenv" choices:"public|private|onpremise" mcp:"true"`
Scope string `help:"show usage of specified privilege scope" choices:"system|domain|project" mcp:"true"`
Refresh bool `help:"force refresh usage statistics" mcp:"true"`
}
func fetchHostTypeOptions(args *GeneralUsageOptions) *jsonutils.JSONDict {

View File

@@ -57,6 +57,9 @@ func init() {
}
var result *printutils.ListResult
result, err = modules.DevToolCronjobs.List(s, params)
if err != nil {
return err
}
printList(result, modules.DevToolCronjobs.GetColumns(s))
return nil
})

View File

@@ -50,6 +50,9 @@ func init() {
}
var result *printutils.ListResult
result, err = modules.DevToolTemplates.List(s, params)
if err != nil {
return err
}
printList(result, modules.DevToolTemplates.GetColumns(s))
return nil
})

View File

@@ -25,15 +25,15 @@ import (
)
type BaseEventListOptions struct {
Scope string `help:"scope" choices:"project|domain|system"`
Scope string `help:"RBAC scope" choices:"project|domain|system"`
Since string `help:"Show logs since specific date" metavar:"DATETIME"`
Until string `help:"Show logs until specific date" metavar:"DATETIME"`
Limit int64 `help:"Limit number of logs" default:"20"`
Offset int64 `help:"Offset"`
Offset int64 `help:"Offset for pagination"`
Ascending bool `help:"Ascending order"`
Descending bool `help:"Descending order"`
OrderBy string `help:"order by specific field"`
Action []string `help:"Log action"`
Action []string `help:"Filter by log action"`
User string `help:"filter by operator user"`
Project string `help:"filter by operator user's project"`

View File

@@ -22,9 +22,9 @@ import (
var (
R = shell.R
printList = printutils.PrintJSONList
printObject = printutils.PrintJSONObject
printBatchResults = printutils.PrintJSONBatchResults
printList = shell.PrintList
printObject = shell.PrintObject
printBatchResults = shell.PrintBatchResults
InvalidUpdateError = shell.InvalidUpdateError
printObjectRecursive = printutils.PrintJSONObjectRecursive

View File

@@ -28,7 +28,7 @@ import (
func init() {
type CredentialListOptions struct {
Scope string `help:"scope" choices:"project|domain|system"`
Scope string `help:"RBAC scope" choices:"project|domain|system"`
Type string `help:"credential type" choices:"totp|recovery_secret|aksk|enc_key|container_image"`
User string `help:"filter by user"`
UserDomain string `help:"the domain of user"`

View File

@@ -32,10 +32,12 @@ func init() {
cmd.GetProperty(&identity_options.DomainGetPropertyTagValuePairOptions{})
cmd.GetProperty(&identity_options.DomainGetPropertyTagValueTreeOptions{})
type DomainDetailOptions struct {
type DomainShowOptions struct {
_ struct{} `mcp-desc:"查询域详情。ID 可用 climc_domain_list 返回的 id/name"`
ID string `help:"ID or domain"`
}
R(&DomainDetailOptions{}, "domain-show", "Show detail of domain", func(s *mcclient.ClientSession, args *DomainDetailOptions) error {
R(&DomainShowOptions{}, "domain-show", "Show detail of domain", func(s *mcclient.ClientSession, args *DomainShowOptions) error {
result, err := modules.Domains.Get(s, args.ID, nil)
if err != nil {
return err
@@ -43,7 +45,12 @@ func init() {
printObject(result)
return nil
})
R(&DomainDetailOptions{}, "domain-delete", "Delete a domain", func(s *mcclient.ClientSession, args *DomainDetailOptions) error {
type DomainDeleteOptions struct {
_ struct{} `mcp-desc:"删除域。若尚不知 id先用 climc_domain_list 定位;确认域下无项目/用户后再删"`
ID string `help:"ID or domain"`
}
R(&DomainDeleteOptions{}, "domain-delete", "Delete a domain", func(s *mcclient.ClientSession, args *DomainDeleteOptions) error {
objId, err := modules.Domains.GetId(s, args.ID, nil)
if err != nil {
return err
@@ -72,12 +79,14 @@ func init() {
}) */
type DomainCreateOptions struct {
NAME string `help:"Name of domain"`
Desc string `help:"Description"`
Enabled bool `help:"Set the domain enabled"`
Disabled bool `help:"Set the domain disabled"`
_ struct{} `mcp-desc:"创建域。NAME 必填;可选 displayname/desc/enabled"`
Displayname string `help:"display name"`
NAME string `help:"Name of domain"`
Desc string `help:"Description" mcp:"true"`
Enabled bool `help:"Set the domain enabled" mcp:"true"`
Disabled bool `help:"Set the domain disabled" mcp:"true"`
Displayname string `help:"display name" mcp:"true"`
}
R(&DomainCreateOptions{}, "domain-create", "Create a new domain", func(s *mcclient.ClientSession, args *DomainCreateOptions) error {
params := jsonutils.NewDict()

View File

@@ -775,4 +775,17 @@ func init() {
printObject(result)
return nil
})
type IdentityProviderGetPropertyAttributeNamesOptions struct {
DRIVER string `help:"driver of idp to query" json:"driver" choices:"oidc|oauth2|saml|cas"`
TEMPLATE string `help:"template of idp to query" json:"template"`
}
R(&IdentityProviderGetPropertyAttributeNamesOptions{}, "idp-attribute-names", "Get property attribute names of a idp", func(s *mcclient.ClientSession, args *IdentityProviderGetPropertyAttributeNamesOptions) error {
result, err := modules.IdentityProviders.Get(s, "attribute-names", jsonutils.Marshal(args))
if err != nil {
return err
}
printObject(result)
return nil
})
}

View File

@@ -43,8 +43,10 @@ func init() {
cmd.PerformClass("clean", &identity_options.ProjectCleanOptions{})
type ProjectShowOptions struct {
_ struct{} `mcp-desc:"查询项目详情。ID 可用 climc_project_list 返回的 id/name跨域时可传 domain"`
ID string `help:"ID or Name of project"`
Domain string `help:"Domain"`
Domain string `help:"Domain" mcp:"true"`
}
R(&ProjectShowOptions{}, "project-show", "Show details of project", func(s *mcclient.ClientSession, args *ProjectShowOptions) error {
query := jsonutils.NewDict()
@@ -62,7 +64,13 @@ func init() {
printObject(result)
return nil
})
R(&ProjectShowOptions{}, "project-delete", "Delete a project", func(s *mcclient.ClientSession, args *ProjectShowOptions) error {
type ProjectDeleteOptions struct {
_ struct{} `mcp-desc:"删除项目。若尚不知 id先用 climc_project_list 定位;跨域时可传 domain"`
ID string `help:"ID or Name of project"`
Domain string `help:"Domain" mcp:"true"`
}
R(&ProjectDeleteOptions{}, "project-delete", "Delete a project", func(s *mcclient.ClientSession, args *ProjectDeleteOptions) error {
query := jsonutils.NewDict()
if len(args.Domain) > 0 {
domainId, err := modules.Domains.GetId(s, args.Domain, nil)
@@ -83,12 +91,14 @@ func init() {
})
type ProjectCreateOptions struct {
_ struct{} `mcp-desc:"创建项目。NAME 必填;可选 domain/displayname/desc"`
NAME string `help:"Name of new project"`
Displayname string `help:"display name"`
Domain string `help:"Domain"`
Desc string `help:"Description"`
Enabled bool `help:"Project is enabled"`
Disabled bool `help:"Project is disabled"`
Displayname string `help:"display name" mcp:"true"`
Domain string `help:"Domain" mcp:"true"`
Desc string `help:"Description" mcp:"true"`
Enabled bool `help:"Project is enabled" mcp:"true"`
Disabled bool `help:"Project is disabled" mcp:"true"`
}
R(&ProjectCreateOptions{}, "project-create", "Create a project", func(s *mcclient.ClientSession, args *ProjectCreateOptions) error {
params := jsonutils.NewDict()

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