package
0.0.0-20241119232718-68198a487ae1
Repository: https://github.com/openshift-kni/oran-o2ims.git
Documentation: pkg.go.dev

# Functions

AssignMacAddress assigns a MAC address to a node interface based on matching criteria.
ClusterIsReadyForPolicyConfig checks if a cluster is ready for policy configuration by looking at its availability, joined status and hub acceptance.
CollectNodeDetails collects BMC and node interfaces details.
CompareConfigMapWithNodePool checks if there are any changes in the hardware template config map.
CopyBMCSecrets copies BMC secrets from the plugin namespace to the cluster namespace.
No description provided by the author
CreateDefaultInventoryCR creates the default Inventory CR so that the system has running servers.
CreateHwMgrPluginNamespace creates the namespace of the hardware manager plugin where the node pools resource resides.
CreateK8sCR creates/updates/patches an object.
DeepMergeMaps performs a deep merge of the src map into the dst map.
DeepMergeSlices performs a deep indexing merge of the src slice into the dst slice.
No description provided by the author
ExtractBeforeDot returns the strubstring before the first dot.
ExtractMatchingInput extracts the portion of the input data that corresponds to a given subSchema key.
ExtractSchemaRequired extracts the required field of a subschema.
ExtractSubSchema extracts a Sub schema indexed by subSchemaKey from a Main schema.
ExtractTemplateDataFromConfigMap extracts the template data associated with the specified key from the provided ConfigMap.
ExtractTimeoutFromConfigMap extracts the timeout config from the ConfigMap by key if exits.
FindClusterInstanceImmutableFieldUpdates identifies updates made to immutable fields in the ClusterInstance spec.
FindNodeGroupByRole finds the matching NodeGroup by role.
No description provided by the author
GetBootMacAddress selects the boot interface based on label and return the interface MAC address.
GetCertFromSecret retrieves an X.509 certificate from a Secret.
GetClusterID retrieves the UUID value for the cluster specified by name.
GetConfigmap attempts to retrieve a ConfigMap object for the given name.
GetConfigMapField attempts to retrieve the value of the field using the provided field name.
GetDefaultBackendTransport returns an HTTP transport with the proper TLS defaults set.
GetDefaultTLSConfig sets the TLS configuration attributes appropriately to enable communication between internal services and accessing the public facing API endpoints.
No description provided by the author
No description provided by the author
GetEnvOrDefault returns the value of the named environment variable or the supplied default value if the environment variable is not set.
GetHwMgrPluginNS returns the value of environment variable HWMGR_PLUGIN_NAMESPACE.
No description provided by the author
GetIngressDomain will determine the network domain of the default ingress controller.
GetParentPolicyNameAndNamespace extracts the parent policy name and namespace from the child policy name.
GetRoleToGroupNameMap creates a mapping of Role to Group Name from NodePool.
GetSecret attempts to retrieve a Secret object for the given name.
GetSecretField attempts to retrieve the value of the field using the provided field name.
No description provided by the author
GetStatusMessage returns a status message based on the given condition typ.
GetTLSSkipVerify returns the current requested value of the TLS Skip Verify setting.
HandleHardwareTimeout checks for provisioning or configuration timeout.
HasApiEndpoints determines whether a server exposes a set of API endpoints.
HwMgrPluginNamespaceExists checks if the namespace of the hardware manager plugin exists.
IsClusterProvisionCompleted checks if the cluster provision condition status is completed.
IsClusterProvisionFailed checks if the cluster provision condition status is failed.
IsClusterProvisionPresent checks if the cluster provision condition is present.
IsClusterProvisionTimedOutOrFailed checks if the cluster provision condition status is timedout or failed.
IsClusterUpgradeCompleted checks if the cluster upgrade is completed.
IsClusterUpgradeInitiated checks if the cluster upgrade is initiated.
IsClusterUpgradeInProgress checks if the cluster upgrade condition status is in progress.
IsConditionDoesNotExistsErr checks if the given error is of type ConditionDoesNotExistsErr.
No description provided by the author
IsParentPolicyInZtpClusterTemplateNs checks whether the parent policy resides in the namespace "ztp-<clustertemplate-ns>".
IsProvisioningStateFulfilled checks if the provisioning status is fulfilled.
IsSmoRegistrationCompleted checks if registration with SMO has been completed.
MapKeysToSlice takes a map[string]bool and returns a slice of strings containing the keys.
No description provided by the author
ProcessClusterNodeGroups extracts the node interfaces per role and count the nodes per group.
RenderTemplateForK8sCR returns a rendered K8s resource with an given template and object data.
SetProvisioningStateDeleting updates the provisioning state to deleting with detailed message.
SetProvisioningStateFailed updates the provisioning state to failed with detailed message.
SetProvisioningStateFulfilled updates the provisioning state to fulfilled with detailed message.
SetProvisioningStateInProgress updates the provisioning state to progressing with detailed message.
SetStatusCondition is a convenience wrapper for meta.SetStatusCondition that takes in the types defined here and converts them to strings.
SetupOAuthClient creates an HTTP client capable of acquiring an OAuth token used to authorize client requests.
TimeoutExceeded returns true if it's been more time than the timeout configuration.
No description provided by the author
UpdateNodeStatusWithHostname updates the Node status with the hostname after BMC information has been assigned.
ValidateConfigMapFields validates the necessary fields in the hardware template ConfigMap.
ValidateDefaultInterfaces verifies that each interface has a specified label field, as labels are not part of the ClusterInstance structure by default.

# Constants

Label specific to ACM child policies.
Label specific to ACM child policies.
Label specific to ACM child policies.
These are optional keys in the respective ConfigMaps defined in ClusterTemplate spec.templates, used to configure the timeout values for each operation.
These are optional keys in the respective ConfigMaps defined in ClusterTemplate spec.templates, used to configure the timeout values for each operation.
ClusterInstance template constants.
ClusterInstance template constants.
ClusterInstance template constants.
PolicyTemplate constants.
ClusterVersionName is the name given to the default ClusterVersion object.
Cluster status.
Cluster status.
DefaultAppName defines the name prepended to the ingress host to form our FQDN hostname.
Default timeout values.
Default timeout values.
Default timeout values.
Defines information related to the operator instance in a namespace.
Defines information related to the operator instance in a namespace.
Defines information related to the operator instance in a namespace.
DefaultOCloudID defines the default Global O-Cloud ID to be used until the end user configures this value.
Hardware Manager plugin constants.
These are optional keys in the respective ConfigMaps defined in ClusterTemplate spec.templates, used to configure the timeout values for each operation.
Environment values.
Hardeware template constants.
Hardeware template constants.
Hardeware template constants.
Hardeware template constants.
Base resource names.
Deployment names.
Base resource names.
Deployment names.
Base resource names.
Deployment names.
InventoryIngressName the name of our Ingress controller instance.
Base resource names.
Deployment names.
Default namespace.
Base resource names.
Deployment names.
Environment values.
No description provided by the author
No description provided by the author
No description provided by the author
Resource operations.
PolicyTemplate constants.
No description provided by the author
POD Container Names.
POD Container Names.
Environment values.
Required template schema parameters.
Required template schema parameters.
Required template schema parameters.
Required template schema parameters.
Environment variable names.
Environment variable names.
Hardware Manager plugin constants.
Hardware Manager plugin constants.
Resource operations.
Upgrade constants.

# Variables

AllowedClusterInstanceFields contains path patterns for fields that are allowed to be updated.
The following constants define the different reasons that conditions will be set for ProvisioningRequest.
CRDs needed to be suppressed in ClusterInstance for upgrade.
The following constants define the different reasons that conditions will be set for ClusterTemplate.
The following constants define the different types of conditions that will be set for ClusterTemplate.
Container arguments.
IgnoredClusterInstanceFields contains path patterns for fields that should be ignored.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
Container arguments.
The following constants define the different types of conditions that will be set for ProvisioningRequest.
Container arguments.

# Structs

AvailableNotification represents the data sent to the SMO once the O2IMS is ready to accept API calls.
ConditionDoesNotExistsErr represents an error when a specific condition is missing.
InputError wraps a standard error and provides a custom error type for input-related errors.
No description provided by the author
OAuthClientConfig defines the parameters required to establish an HTTP Client capable of acquiring an OAuth Token from an OAuth capable authorization server.

# Type aliases

ConditionReason is a string representing the condition's reason.
ConditionType is a string representing the condition's type.
No description provided by the author
InventoryConditionType defines conditions of an Inventory deployment.