Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 47 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# Changelog

## v1.0.0 (unreleased)

First release against the Cobbler 4.0.0 backend and cobblerclient `v1.x`.
Clean break — talks only to Cobbler 4.0.0+. For 3.3.x servers, stay on the
`v0.x` line.

### Breaking changes

- Removed `cobbler mgmtclass`, `cobbler package`, `cobbler file` (item types
removed from the backend).
- Removed all interface-related flags from `cobbler system add/edit/copy/
rename/find`. Network interfaces are now managed via the dedicated
`cobbler interface` command, with nested `--ipv4-*` / `--ipv6-*` / `--dns-*`
flag families that mirror the new `NetworkInterface` value objects.
- Removed `--mgmt-classes` and `--mgmt-parameters` flags from every item
command.
- `cobbler list` and `cobbler report` no longer include `mgmtclasses`,
`packages`, `files` sections.
- `cobbler setting edit` now auto-detects the setting's type via a
`GetSettings` round-trip and rejects unknown names.
- `cobbler system dumpvars` and `cobbler profile dumpvars` now call the
backend's `dump_vars` (formerly `get_blended_data`, which was removed in
Cobbler 3.4.0).

### Added

- `cobbler template` (add/edit/copy/remove/rename/find/list/report/export +
`content` + `refresh`).
- `cobbler distro-group`, `cobbler profile-group`, `cobbler system-group`.
- `--page` and `--items-per-page` flags on every `find` subcommand
(routes through `find_items_paged`).
- `cobbler setting export`.

### Removed (no longer accepted)

- The flags listed in the migration guide.

### Deferred to a later release

- `cobbler transaction` subcommand. The cobblerclient `v1.x` wraps
`TransactionBegin/Commit/Abort`, but per-token transactions don't span
multiple shell invocations naturally. Scripted batches need a Go program
today; a session-aware CLI mode is on the post-1.0 roadmap.

See [MIGRATION.md](MIGRATION.md) for upgrade guidance.
100 changes: 100 additions & 0 deletions MIGRATION.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
# Migration guide: cobbler-cli v0.x → v1.0.0

This release re-anchors `cobbler-cli` on the Cobbler 4.0.0 backend and the matching cobblerclient `v1.x` library. It is
a clean break — there is no compatibility shim against Cobbler 3.3.x. If you need to talk to a 3.3.x server, stay on
`cobbler-cli v0.0.1-rc*` (which pulls cobblerclient `v0.5.x`).

## Removed commands

These item types no longer exist in Cobbler 4.0.0 and the corresponding commands have been removed:

- `cobbler mgmtclass …`
- `cobbler package …`
- `cobbler file …`

`cobbler list` and `cobbler report` no longer include sections for these types.

The `--mgmt-classes` and `--mgmt-parameters` flags have been removed from every item command (`distro`, `profile`,
`system`).

## Network interfaces moved to a dedicated command

Network interfaces are first-class items in 4.0.0. Every `--*` flag related to interfaces has been removed from
`cobbler system add/edit/copy/rename/find`. Use `cobbler interface` instead.

The flag names also reflect the new nested address objects:

| Old (`cobbler system …`) | New (`cobbler interface …`) |
| ----------------------------- | --------------------------------- |
| `--interface <name>` | `--name <name>` plus `--system-name <s>` (on `add`) |
| `--ip-address` | `--ipv4-address` |
| `--netmask` | `--ipv4-netmask` |
| `--if-gateway` | `--ipv4-gateway` |
| `--static-routes` | `--ipv4-static-routes` |
| `--ipv6-address` | `--ipv6-address` (unchanged) |
| `--ipv6-prefix` | `--ipv6-prefix` (unchanged) |
| `--ipv6-default-gateway` | `--ipv6-default-gateway` (unchanged) |
| `--ipv6-secondaries` | `--ipv6-secondaries` (unchanged) |
| `--ipv6-static-routes` | `--ipv6-static-routes` (unchanged) |
| `--ipv6-mtu` | `--ipv6-mtu` (unchanged) |
| `--dns-name` | `--dns-name` (unchanged) |
| `--cnames` | `--dns-cnames` |
| `--mac-address` | `--mac-address` (unchanged) |
| `--bonding-opts` | `--bonding-opts` (unchanged) |
| `--bridge-opts` | `--bridge-opts` (unchanged) |
| `--interface-type` | `--interface-type` (unchanged) |
| `--interface-master` | `--interface-master` (unchanged) |
| `--connected-mode` | `--connected-mode` (unchanged) |
| `--management` | `--management` (unchanged) |
| `--static` | `--static` (unchanged) |
| `--mtu` | `--mtu` (unchanged) |
| `--virt-bridge` | `--virt-bridge` (now inheritable: `--virt-bridge-inherit`) |
| `--delete-interface` | `cobbler interface remove --name <n>` |
| `--rename-interface` | `cobbler interface rename --name <old> --newname <new>` |

Lifecycle example:

```bash
cobbler system add --name=server1 --profile=rocky-9-x86_64
cobbler interface add --system-name=server1 --name=eth0 \
--mac-address=aa:bb:cc:dd:ee:ff \
--ipv4-address=10.0.0.5 --ipv4-netmask=255.255.255.0 --ipv4-gateway=10.0.0.1 \
--dns-name=server1.lab.local
cobbler interface report --system-name=server1
```

## New commands

- `cobbler template` — manage Cobbler 4.0.0 `Template` items, including `cobbler template content --name=<n>` (dump
rendered content to stdout) and `cobbler template refresh [--name=<n>...]` (reload from disk).
- `cobbler distro-group`, `cobbler profile-group`, `cobbler system-group` — manage the three group item types.
- Every `find` subcommand now supports `--page` and `--items-per-page`, routing through the backend's `find_items_paged`
endpoint and emitting a trailing `# page N of M (T total)` summary.

## Strict setting types

`cobbler setting edit --name=<n> --value=<v>` now performs a round-trip to `get_settings` to discover the existing
setting's type, then parses `--value` accordingly. The 4.0.0 backend rejects mistyped values. Examples:

```bash
cobbler setting edit --name=server --value=cobbler.lab.local # string
cobbler setting edit --name=http_port --value=8080 # int
cobbler setting edit --name=manage_dhcp --value=true # bool
cobbler setting edit --name=cheetah_import_whitelist --value=foo,bar # []string
```

Unknown setting names error out cleanly.

## Transactions: deferred

Cobbler 4.0.0 exposes per-token `transaction_begin/commit/abort`. The Go client (cobblerclient) wraps them as
`TransactionBegin`/`TransactionCommit`/ `TransactionAbort`. There is no `cobbler transaction` subcommand in v1.0.0 —
the CLI logs in fresh on each invocation, so per-token transactions cannot naturally span multiple shell commands. Use
the Go client directly for scripted atomic batches; a session-aware CLI mode may land in a later release.

## Things you don't need to do

- Existing scripts that hit `cobbler distro`, `cobbler profile`, `cobbler system`, `cobbler repo`, `cobbler image`,
`cobbler menu` keep working, modulo the field removals listed above.
- `cobbler version` now shows the build date and git hash of the connected server (was already there in the
cobblerclient — surfaced now).
19 changes: 1 addition & 18 deletions cmd/distro.go
Original file line number Diff line number Diff line change
Expand Up @@ -227,24 +227,6 @@ func updateDistroFromFlags(cmd *cobra.Command, distro *cobbler.Distro) error {
distro.KernelOptions.Data = convertMapStringToMapInterface(newKernelOptionsPost)
}
}
case "mgmt-classes":
fallthrough
case "mgmt-classes-inherit":
var distroNewMgmtClasses []string
distroNewMgmtClasses, err = cmd.Flags().GetStringSlice("mgmt-classes")
if err != nil {
return
}
if cmd.Flags().Lookup("mgmt-classes-inherit").Changed {
distro.MgmtClasses.Data = []string{}
distro.MgmtClasses.IsInherited, err = cmd.Flags().GetBool("mgmt-classes-inherit")
if err != nil {
return
}
} else {
distro.MgmtClasses.IsInherited = false
distro.MgmtClasses.Data = distroNewMgmtClasses
}
case "os-version":
var distroNewOsVersion string
distroNewOsVersion, err = cmd.Flags().GetString("os-version")
Expand Down Expand Up @@ -534,6 +516,7 @@ func NewDistroFindCmd() (*cobra.Command, error) {
addFloatFlags(distroFindCmd, findFloatFlagMetadata)
distroFindCmd.Flags().String("source-repos", "", "source repositories")
distroFindCmd.Flags().String("tree-build-time", "", "tree build time")
addPaginationFlags(distroFindCmd)
return distroFindCmd, nil
}

Expand Down
Loading
Loading