Documentation
¶
Index ¶
Constants ¶
const EnvTypeContentTemplate = "content-template"
Variables ¶
This section is empty.
Functions ¶
func GetConsumerUUID ¶
func IsRHSMRegistered ¶
IsRHSMRegistered returns true, when system is registered
func RegisterRHSM ¶
RegisterRHSM tries to register system against Red Hat Subscription Management server (candlepin server)
func UnpackDBusError ¶
UnpackDBusError tries to unpack a JSON document (part of the error) into the structure DBusError. When it is not possible to parse an error into structure, then a corresponding or original error is returned. When it is possible to parse error into structure, then DBusError is returned
func Unregister ¶
func Unregister() error
Types ¶
type DBusError ¶
type DBusError struct {
Exception string `json:"exception"`
Severity string `json:"severity"`
Message string `json:"message"`
}
DBusError is used for parsing JSON document returned by D-Bus methods.
type Organization ¶
type Organization struct {
Key string `json:"key"`
}
Organization is structure containing information about RHSM organization (sometimes called owner) JSON document returned from candlepin server can have the following format. We care only about key, but it can be extended and more information can be added to the structure in the future.
{
"created": "2022-11-02T16:00:23+0000",
"updated": "2022-11-02T16:00:48+0000",
"id": "4028face84391264018439127db10004",
"displayName": "Donald Duck",
"key": "donaldduck",
"contentPrefix": null,
"defaultServiceLevel": null,
"logLevel": null,
"contentAccessMode": "org_environment",
"contentAccessModeList": "entitlement,org_environment",
"autobindHypervisorDisabled": false,
"autobindDisabled": false,
"lastRefreshed": "2022-11-02T16:00:48+0000",
"parentOwner": null,
"upstreamConsumer": null
}