Skip to content

Commit

Permalink
Remove struct tags from Inventory
Browse files Browse the repository at this point in the history
We don't really care how these fields are serialized (as long as they
are serialized), it's also less work when we decide to add/remove a
field.
  • Loading branch information
GabrielNagy committed Oct 17, 2023
1 parent 399b520 commit 14a9875
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 13 deletions.
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
ip: 100.100.100.100
vm_id: /subscriptions/uuid/resourceGroups/rg/providers/Microsoft.Compute/virtualMachines/some_vm_id
vmid: /subscriptions/uuid/resourceGroups/rg/providers/Microsoft.Compute/virtualMachines/some_vm_id
uuid: 1fb2b697-c271-4aa8-aeb6-2a5f5bde5edd
vm_name: adsys-e2e-lunar-1fb2b697-c271-4aa8-aeb6-2a5f5bde5edd
vmname: adsys-e2e-lunar-1fb2b697-c271-4aa8-aeb6-2a5f5bde5edd
codename: mantic
state: base_vm_created
ssh_key_path: /home/user/.ssh/id_rsa
sshkeypath: /home/user/.ssh/id_rsa
hostname: ""
base_vm_image: ""
basevmimage: ""
18 changes: 9 additions & 9 deletions e2e/internal/inventory/inventory.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,15 @@ const DefaultPath = "inventory.yaml"

// Inventory represents the contents of an inventory file.
type Inventory struct {
IP string `yaml:"ip"`
VMID string `yaml:"vm_id"`
UUID string `yaml:"uuid"`
VMName string `yaml:"vm_name"`
BaseVMImage string `yaml:"base_vm_image"`
Codename string `yaml:"codename"`
State State `yaml:"state"`
SSHKeyPath string `yaml:"ssh_key_path"`
Hostname string `yaml:"hostname"`
IP string
VMID string
UUID string
VMName string
BaseVMImage string
Codename string
State State
SSHKeyPath string
Hostname string
}

// Write writes the inventory file to the given path.
Expand Down

0 comments on commit 14a9875

Please sign in to comment.