Skip to content

Commit

Permalink
Support marketplace app variables on instance/BM create
Browse files Browse the repository at this point in the history
  • Loading branch information
christhemorse committed Dec 13, 2023
1 parent 1abb955 commit 8f692ac
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 18 deletions.
15 changes: 8 additions & 7 deletions bare_metal_server.go
Original file line number Diff line number Diff line change
Expand Up @@ -92,13 +92,14 @@ type BareMetalCreate struct {
ActivationEmail *bool `json:"activation_email,omitempty"`
Hostname string `json:"hostname,omitempty"`
// Deprecated: Tag should no longer be used. Instead, use Tags.
Tag string `json:"tag,omitempty"`
ReservedIPv4 string `json:"reserved_ipv4,omitempty"`
PersistentPxe *bool `json:"persistent_pxe,omitempty"`
Tags []string `json:"tags"`
AttachVPC2 []string `json:"attach_vpc2,omitempty"`
DetachVPC2 []string `json:"detach_vpc2,omitempty"`
EnableVPC2 *bool `json:"enable_vpc2,omitempty"`
Tag string `json:"tag,omitempty"`
ReservedIPv4 string `json:"reserved_ipv4,omitempty"`
PersistentPxe *bool `json:"persistent_pxe,omitempty"`
Tags []string `json:"tags"`
AttachVPC2 []string `json:"attach_vpc2,omitempty"`
DetachVPC2 []string `json:"detach_vpc2,omitempty"`
EnableVPC2 *bool `json:"enable_vpc2,omitempty"`
AppVariables map[string]string `json:"app_variables,omitempty"`
}

// BareMetalUpdate represents the optional parameters that can be set when updating a Bare Metal server
Expand Down
23 changes: 12 additions & 11 deletions instance.go
Original file line number Diff line number Diff line change
Expand Up @@ -273,17 +273,18 @@ type InstanceCreateReq struct {
// Deprecated: EnablePrivateNetwork should no longer be used. Instead, use EnableVPC.
EnablePrivateNetwork *bool `json:"enable_private_network,omitempty"`
// Deprecated: AttachPrivateNetwork should no longer be used. Instead, use AttachVPC.
AttachPrivateNetwork []string `json:"attach_private_network,omitempty"`
EnableVPC *bool `json:"enable_vpc,omitempty"`
AttachVPC []string `json:"attach_vpc,omitempty"`
EnableVPC2 *bool `json:"enable_vpc2,omitempty"`
AttachVPC2 []string `json:"attach_vpc2,omitempty"`
SSHKeys []string `json:"sshkey_id,omitempty"`
Backups string `json:"backups,omitempty"`
DDOSProtection *bool `json:"ddos_protection,omitempty"`
UserData string `json:"user_data,omitempty"`
ReservedIPv4 string `json:"reserved_ipv4,omitempty"`
ActivationEmail *bool `json:"activation_email,omitempty"`
AttachPrivateNetwork []string `json:"attach_private_network,omitempty"`
EnableVPC *bool `json:"enable_vpc,omitempty"`
AttachVPC []string `json:"attach_vpc,omitempty"`
EnableVPC2 *bool `json:"enable_vpc2,omitempty"`
AttachVPC2 []string `json:"attach_vpc2,omitempty"`
SSHKeys []string `json:"sshkey_id,omitempty"`
Backups string `json:"backups,omitempty"`
DDOSProtection *bool `json:"ddos_protection,omitempty"`
UserData string `json:"user_data,omitempty"`
ReservedIPv4 string `json:"reserved_ipv4,omitempty"`
ActivationEmail *bool `json:"activation_email,omitempty"`
AppVariables map[string]string `json:"app_variables,omitempty"`
}

// InstanceUpdateReq struct used to update an instance.
Expand Down

0 comments on commit 8f692ac

Please sign in to comment.