cloudapi: Add subscription option for rhc
When rhc is selected it will install the required packages, register using rhc and always enable insights. When rhc is not selected it will use subscription manager for registration, and optionally enable insights. Also installing required packages.
This commit is contained in:
parent
3cdfa9d7f0
commit
b0e388d115
5 changed files with 76 additions and 33 deletions
|
|
@ -278,12 +278,18 @@ func (h *apiHandlers) PostCompose(ctx echo.Context) error {
|
|||
}
|
||||
|
||||
if request.Customizations != nil && request.Customizations.Subscription != nil {
|
||||
// Rhc is optional, default to false if not included
|
||||
var rhc bool
|
||||
if request.Customizations.Subscription.Rhc != nil {
|
||||
rhc = *request.Customizations.Subscription.Rhc
|
||||
}
|
||||
imageOptions.Subscription = &distro.SubscriptionImageOptions{
|
||||
Organization: request.Customizations.Subscription.Organization,
|
||||
ActivationKey: request.Customizations.Subscription.ActivationKey,
|
||||
ServerUrl: request.Customizations.Subscription.ServerUrl,
|
||||
BaseUrl: request.Customizations.Subscription.BaseUrl,
|
||||
Insights: request.Customizations.Subscription.Insights,
|
||||
Rhc: rhc,
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue