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
22 changes: 22 additions & 0 deletions rest-api/api/pkg/api/handler/instance.go
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,17 @@ func (cih CreateInstanceHandler) buildInstanceCreateRequestOsConfig(c echo.Conte
},
UserData: apiRequest.UserData,
}, osID, nil
} else if os.Type == cdbm.OperatingSystemTypeTemplatedIPXE {
return &cwssaws.InstanceOperatingSystemConfig{
RunProvisioningInstructionsOnEveryBoot: *apiRequest.AlwaysBootWithCustomIpxe,
PhoneHomeEnabled: *apiRequest.PhoneHomeEnabled,
Variant: &cwssaws.InstanceOperatingSystemConfig_OperatingSystemId{
OperatingSystemId: &cwssaws.OperatingSystemId{
Value: os.ID.String(),
},
},
UserData: apiRequest.UserData,
}, osID, nil
} else {
return &cwssaws.InstanceOperatingSystemConfig{
PhoneHomeEnabled: *apiRequest.PhoneHomeEnabled,
Expand Down Expand Up @@ -2088,6 +2099,17 @@ func (uih UpdateInstanceHandler) buildInstanceUpdateRequestOsConfig(c echo.Conte
},
UserData: userData,
}, osID, nil
} else if os.Type == cdbm.OperatingSystemTypeTemplatedIPXE {
return &cwssaws.InstanceOperatingSystemConfig{
RunProvisioningInstructionsOnEveryBoot: alwaysBootWithCustomIpxe,
PhoneHomeEnabled: phoneHomeEnabled,
Variant: &cwssaws.InstanceOperatingSystemConfig_OperatingSystemId{
OperatingSystemId: &cwssaws.OperatingSystemId{
Value: os.ID.String(),
},
},
UserData: userData,
}, osID, nil
} else if os.Type == cdbm.OperatingSystemTypeImage {
return &cwssaws.InstanceOperatingSystemConfig{
PhoneHomeEnabled: phoneHomeEnabled,
Expand Down
11 changes: 11 additions & 0 deletions rest-api/api/pkg/api/handler/instancebatch.go
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,17 @@ func (bcih BatchCreateInstanceHandler) buildBatchInstanceCreateRequestOsConfig(c
},
UserData: apiRequest.UserData,
}, osID, nil
} else if os.Type == cdbm.OperatingSystemTypeTemplatedIPXE {
return &cwssaws.InstanceOperatingSystemConfig{
RunProvisioningInstructionsOnEveryBoot: *apiRequest.AlwaysBootWithCustomIpxe,
PhoneHomeEnabled: *apiRequest.PhoneHomeEnabled,
Variant: &cwssaws.InstanceOperatingSystemConfig_OperatingSystemId{
OperatingSystemId: &cwssaws.OperatingSystemId{
Value: os.ID.String(),
},
},
UserData: apiRequest.UserData,
}, osID, nil
} else {
return &cwssaws.InstanceOperatingSystemConfig{
PhoneHomeEnabled: *apiRequest.PhoneHomeEnabled,
Expand Down
Loading