cmd

package
v0.0.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 11, 2024 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Overview

Package cmd implements important functions for command.

Index

Constants

This section is empty.

Variables

View Source
var (
	// Version of csctl-openstack.
	Version = "dev"
	// Commit against which csctl-openstack version is cut.
	Commit = "unknown"
)

Functions

func Execute

func Execute()

Execute adds all child commands to the root command and sets flags appropriately. This is called by main.main(). It only needs to happen once to the rootCmd.

Types

type CreateOpts

type CreateOpts images.CreateOpts

CreateOpts represents options used to create an image.

type NodeImages

type NodeImages struct {
	APIVersion          string                `yaml:"apiVersion"`
	OpenStackNodeImages []*OpenStackNodeImage `yaml:"openStackNodeImages"`
}

NodeImages represents the structure of the config.yaml file.

func GetConfig

func GetConfig(configPath string) (*NodeImages, error)

GetConfig returns Config.

type OpenStackNodeImage

type OpenStackNodeImage struct {
	URL        string      `json:"url" yaml:"url"`
	ImageDir   string      `json:"imageDir,omitempty" yaml:"imageDir,omitempty"`
	CreateOpts *CreateOpts `json:"createOpts" yaml:"createOpts"`
}

OpenStackNodeImage represents the structure of the OpenStackNodeImage.

type RegistryConfig

type RegistryConfig struct {
	Type   string `yaml:"type"`
	Config struct {
		Endpoint  string `yaml:"endpoint"`
		Bucket    string `yaml:"bucket"`
		AccessKey string `yaml:"accessKey"`
		SecretKey string `yaml:"secretKey"`
		Verify    *bool  `yaml:"verify,omitempty"`
		Cacert    string `yaml:"cacert,omitempty"`
		ProjectID string `yaml:"projectID,omitempty"` //nolint:tagliatelle // using 'projectID' instead of 'projectId'
	} `yaml:"config"`
}

RegistryConfig represents the structure of the registry.yaml file.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL