mirror of
https://github.com/openshift/installer.git
synced 2026-02-05 15:47:14 +01:00
linter: fix exported methods lacking comments
This commit is contained in:
@@ -28,6 +28,8 @@ func SupportedHivePlatforms() []string {
|
||||
return platforms
|
||||
}
|
||||
|
||||
// HivePlatformType returns the PlatformType for the ZTP Hive API corresponding
|
||||
// to the given InstallConfig platform.
|
||||
func HivePlatformType(platform types.Platform) hiveext.PlatformType {
|
||||
switch platform.Name() {
|
||||
case baremetal.Name:
|
||||
|
||||
@@ -99,7 +99,7 @@ func (ca *CpioArchive) StoreFile(filename string, dstPath string) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
// Save the content of the current archive and returns
|
||||
// SaveBuffer saves the content of the current archive and returns
|
||||
// the buffer content.
|
||||
func (ca *CpioArchive) SaveBuffer() ([]byte, error) {
|
||||
err := ca.cpioWriter.Close()
|
||||
|
||||
@@ -8,7 +8,7 @@ import (
|
||||
nutanixtypes "github.com/openshift/installer/pkg/types/nutanix"
|
||||
)
|
||||
|
||||
// Config of Nutanix cloud provider
|
||||
// CloudConfig is the config of Nutanix cloud provider
|
||||
// ref: https://github.com/nutanix-cloud-native/cloud-provider-nutanix/blob/main/pkg/provider/config/config.go
|
||||
type CloudConfig struct {
|
||||
PrismCentral PrismEndpoint `json:"prismCentral"`
|
||||
@@ -16,29 +16,36 @@ type CloudConfig struct {
|
||||
EnableCustomLabeling bool `json:"enableCustomLabeling"`
|
||||
}
|
||||
|
||||
// TopologyDiscovery of the cloud provider.
|
||||
type TopologyDiscovery struct {
|
||||
// Default type will be set to Prism via the newConfig function
|
||||
Type TopologyDiscoveryType `json:"type"`
|
||||
TopologyCategories *TopologyCategories `json:"topologyCategories"`
|
||||
}
|
||||
|
||||
// TopologyDiscoveryType type alias.
|
||||
type TopologyDiscoveryType string
|
||||
|
||||
const (
|
||||
PrismTopologyDiscoveryType = TopologyDiscoveryType("Prism")
|
||||
// PrismTopologyDiscoveryType is the DiscoveryType for Prism provider.
|
||||
PrismTopologyDiscoveryType = TopologyDiscoveryType("Prism")
|
||||
// CategoriesTopologyDiscoveryType is the DiscoveryType for Categories provider.
|
||||
CategoriesTopologyDiscoveryType = TopologyDiscoveryType("Categories")
|
||||
)
|
||||
|
||||
// TopologyInfo contains topology information.
|
||||
type TopologyInfo struct {
|
||||
Zone string `json:"zone"`
|
||||
Region string `json:"region"`
|
||||
}
|
||||
|
||||
// TopologyCategories contains topology categories.
|
||||
type TopologyCategories struct {
|
||||
ZoneCategory string `json:"zoneCategory"`
|
||||
RegionCategory string `json:"regionCategory"`
|
||||
}
|
||||
|
||||
// PrismEndpoint contains endpoint details for Prism provider.
|
||||
type PrismEndpoint struct {
|
||||
// address is the endpoint address (DNS name or IP address) of the Nutanix Prism Central or Element (cluster)
|
||||
Address string `json:"address"`
|
||||
@@ -51,10 +58,13 @@ type PrismEndpoint struct {
|
||||
CredentialRef *CredentialReference `json:"credentialRef,omitempty"`
|
||||
}
|
||||
|
||||
// CredentialKind type alias.
|
||||
type CredentialKind string
|
||||
|
||||
// SecretKind a credential of type "Secret".
|
||||
var SecretKind = CredentialKind("Secret")
|
||||
|
||||
// CredentialReference holds details of a credential.
|
||||
type CredentialReference struct {
|
||||
// Kind of the Nutanix credential
|
||||
Kind CredentialKind `json:"kind"`
|
||||
|
||||
@@ -14,6 +14,7 @@ import (
|
||||
)
|
||||
|
||||
const (
|
||||
// ErrCodeAccessDeniedException is the access denied error code returned by IAM.
|
||||
ErrCodeAccessDeniedException = "AccessDeniedException"
|
||||
)
|
||||
|
||||
|
||||
@@ -12,6 +12,7 @@ import (
|
||||
|
||||
var localLogger = logrus.New()
|
||||
|
||||
// ConvertInstallConfig modifies a given platform spec for the new requirements.
|
||||
func ConvertInstallConfig(config *types.InstallConfig) error {
|
||||
platform := config.Platform.VSphere
|
||||
|
||||
|
||||
@@ -2,6 +2,8 @@ package validate
|
||||
|
||||
import "os"
|
||||
|
||||
// IsAgentBasedInstallation determines whether we are using the 'agent'
|
||||
// subcommand to install.
|
||||
func IsAgentBasedInstallation() bool {
|
||||
if len(os.Args) > 1 {
|
||||
for _, arg := range os.Args {
|
||||
|
||||
Reference in New Issue
Block a user