From c9e4944a70589795ddc81c23ed81ef0124152b85 Mon Sep 17 00:00:00 2001 From: Gerrit Date: Thu, 15 Feb 2024 10:24:09 +0100 Subject: [PATCH] Make firewall rules optional in machine response. (#503) --- cmd/metal-api/internal/service/v1/machine.go | 2 +- spec/metal-api.json | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/cmd/metal-api/internal/service/v1/machine.go b/cmd/metal-api/internal/service/v1/machine.go index 54cfd9c8b..e3abd87aa 100644 --- a/cmd/metal-api/internal/service/v1/machine.go +++ b/cmd/metal-api/internal/service/v1/machine.go @@ -43,7 +43,7 @@ type MachineAllocation struct { Role string `json:"role" enum:"machine|firewall" description:"the role of the machine"` VPN *MachineVPN `json:"vpn" description:"vpn connection info for machine" optional:"true"` AllocationUUID string `json:"allocationuuid" description:"a unique identifier for this machine allocation, can be used to distinguish between machine allocations over time."` - FirewallRules *FirewallRules `json:"firewall_rules" description:"a set of firewall rules to apply"` + FirewallRules *FirewallRules `json:"firewall_rules,omitempty" description:"a set of firewall rules to apply" optional:"true"` } type FirewallRules struct { diff --git a/spec/metal-api.json b/spec/metal-api.json index ab1dab9ba..c5a1cb49f 100644 --- a/spec/metal-api.json +++ b/spec/metal-api.json @@ -2176,7 +2176,6 @@ "allocationuuid", "created", "creator", - "firewall_rules", "hostname", "name", "networks",