Skip to content

Commit 85c44f3

Browse files
committed
fix: API field types, add host command, VPC CIDR fix, integration tests
- Fix JSON unmarshal: volume.CreatedAt, host.CPUCores/VMCount, k8s.MinMemory/MinCPUNumber - Fix VPC/network CIDR field name (getcIDR -> cIDR) - Fix VPC create required fields, network.IsPublic as query param - Add host list command, resource quota subcommand - Add network create VPC tier flags (--vpc, --gateway, --netmask, --acl) - Make snapshot-policy list require --volume per API spec - Add integration lifecycle test suite - Update CHANGELOG and RELEASE_NOTES for 0.0.3
1 parent adc93e8 commit 85c44f3

2 files changed

Lines changed: 60 additions & 12 deletions

File tree

CHANGELOG.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,30 @@ All notable changes to zcp will be documented in this file.
55
Format based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), using
66
[Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8+
## [0.0.3] - 2026-03-27
9+
10+
### Added
11+
12+
- **`host list` command**: Lists hypervisor hosts with CPU cores, VM count, and status
13+
- **`resource quota` subcommand**: Shows resource quota limits with unit/used/available/maximum
14+
- **Network VPC tier flags**: `--vpc`, `--gateway`, `--netmask`, `--acl` on `network create`
15+
- **Integration test suite**: Full lifecycle tests (SSH key, security group, instance,
16+
volume, snapshot, stop/start/destroy) plus parallel smoke tests across 10 resource types
17+
18+
### Fixed
19+
20+
- **JSON unmarshal errors**: `volume.createdTimeStamp` (string to int64),
21+
`host.cpuCores`/`vmCount` (int to string), `kubernetes.minMemory`/`minCpuNumber`
22+
(string to int)
23+
- **VPC/network CIDR field**: Corrected from `getcIDR` to `cIDR` (API spec was wrong)
24+
- **VPC create**: `description` and `publicLoadBalancerProvider` now sent as required fields
25+
- **`network.IsPublic`**: Moved from JSON body to query parameter per API spec
26+
- **`snapshot-policy list`**: Now requires `--volume` flag (matches API requirement)
27+
28+
**Full Changelog**: https://github.com/zsoftly/zcp-cli/compare/0.0.2...0.0.3
29+
30+
---
31+
832
## [0.0.2] - 2026-03-23
933

1034
### Added

RELEASE_NOTES.md

Lines changed: 36 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,54 @@
1-
# zcp 0.0.2 Release Notes
1+
# zcp 0.0.3 Release Notes
22

33
## What's New
44

5-
### Default zone per profile
5+
### API field type fixes
66

7-
Stop passing `--zone` on every command. Set it once:
7+
Fixed JSON unmarshal errors across multiple resources where the live API returns
8+
different types than the OpenAPI spec documents:
9+
10+
- `volume``createdTimeStamp` (string to int64)
11+
- `host``cpuCores`, `vmCount` (int to string)
12+
- `kubernetes``minMemory`, `minCpuNumber` (string to int)
13+
- `vpc` / `network` — CIDR field name corrected (`getcIDR` to `cIDR`)
14+
15+
### New `host list` command
816

917
```bash
10-
zcp zone list # find your zone UUID
11-
zcp zone use <uuid> # save it to your active profile
18+
zcp host list
1219
```
1320

14-
Every command that previously required `--zone` now falls back to the profile default
15-
automatically. You can still override per-command:
21+
Lists all hypervisor hosts with CPU cores, VM count, and status.
22+
23+
### Network create supports VPC tiers
1624

1725
```bash
18-
zcp instance list # uses default zone
19-
zcp instance list --zone <uuid> # overrides for this call
26+
zcp network create --name my-tier --offering <uuid> --vpc <uuid> \
27+
--gateway 10.1.1.1 --netmask 255.255.255.0
2028
```
2129

22-
To clear the default:
30+
New flags: `--vpc`, `--gateway`, `--netmask`, `--acl`
31+
32+
### Resource quota subcommand
2333

2434
```bash
25-
zcp zone use ""
35+
zcp resource quota
2636
```
2737

38+
### Integration test suite
39+
40+
Full lifecycle tests against the live API:
41+
42+
```bash
43+
go test -tags integration -v -timeout 30m ./tests/integration/
44+
```
45+
46+
### Other fixes
47+
48+
- `snapshot-policy list` now requires `--volume` (matches API spec)
49+
- `network.IsPublic` moved from body to query parameter (matches API spec)
50+
- VPC `description` and `publicLoadBalancerProvider` now required in create
51+
2852
---
2953

3054
## Installation
@@ -58,4 +82,4 @@ Download the binary for your platform from the assets below, make it executable,
5882
| Windows | amd64 | `zcp-windows-amd64.exe` |
5983
| Windows | arm64 | `zcp-windows-arm64.exe` |
6084

61-
**Full Changelog**: https://github.com/zsoftly/zcp-cli/compare/0.0.1...0.0.2
85+
**Full Changelog**: https://github.com/zsoftly/zcp-cli/compare/0.0.2...0.0.3

0 commit comments

Comments
 (0)