Skip to content

Add missing yaml tags#24

Merged
jpm-canonical merged 1 commit into
mainfrom
fix/marshal-yaml
Jun 30, 2026
Merged

Add missing yaml tags#24
jpm-canonical merged 1 commit into
mainfrom
fix/marshal-yaml

Conversation

@jpm-canonical

Copy link
Copy Markdown
Contributor

No description provided.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds missing yaml struct tags to several device model types so that YAML serialization uses the same field names as existing JSON serialization (e.g., bus-number, vendor-id) and supports inlining embedded “friendly name” fields.

Changes:

  • Added yaml:"..." tags to USB, PCI, and FastRPC Device structs to mirror existing JSON tag naming.
  • Added yaml:",inline" tags for embedded FriendlyNames to support flattened YAML output.
  • Added YAML tags (including omitempty) for friendly-name pointer fields and AdditionalProperties.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
pkg/machine/device/usb/usb.go Adds YAML tags for USB device fields and friendly-name inlining.
pkg/machine/device/pci/pci.go Adds YAML tags for PCI device fields, optional fields, and friendly-name inlining.
pkg/machine/device/fastrpc/fastrpc.go Adds YAML tags for FastRPC device fields and additional properties.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@jpm-canonical jpm-canonical requested a review from farshidtz June 29, 2026 15:36
@jpm-canonical jpm-canonical merged commit 88eb140 into main Jun 30, 2026
5 checks passed
@jpm-canonical jpm-canonical deleted the fix/marshal-yaml branch June 30, 2026 07:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants