mve

package
v0.9.2 Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2026 License: MPL-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddCommandsTo

func AddCommandsTo(rootCmd *cobra.Command)

func BuyMVE

func BuyMVE(cmd *cobra.Command, args []string, noColor bool) error

func DeleteMVE

func DeleteMVE(cmd *cobra.Command, args []string, noColor bool) error

func GetMVE

func GetMVE(cmd *cobra.Command, args []string, noColor bool, outputFormat string) error

func GetMVEStatus added in v0.4.4

func GetMVEStatus(cmd *cobra.Command, args []string, noColor bool, outputFormat string) error

GetMVEStatus retrieves only the provisioning status of an MVE without all details

func ListAvailableMVESizes

func ListAvailableMVESizes(cmd *cobra.Command, args []string, noColor bool, outputFormat string) error

func ListMVEImages

func ListMVEImages(cmd *cobra.Command, args []string, noColor bool, outputFormat string) error

func ListMVEResourceTags added in v0.4.3

func ListMVEResourceTags(cmd *cobra.Command, args []string, noColor bool, outputFormat string) error

func ListMVEs added in v0.3.9

func ListMVEs(cmd *cobra.Command, args []string, noColor bool, outputFormat string) error

func LockMVE added in v0.5.4

func LockMVE(cmd *cobra.Command, args []string, noColor bool) error

func ParseVendorConfig added in v0.5.7

func ParseVendorConfig(vendorConfigMap map[string]interface{}) (megaport.VendorConfig, error)

ParseVendorConfig converts a vendor config map (e.g. decoded from YAML/JSON) into the appropriate typed VendorConfig based on the "vendor" key.

func RestoreMVE added in v0.5.4

func RestoreMVE(cmd *cobra.Command, args []string, noColor bool) error

func UnlockMVE added in v0.5.4

func UnlockMVE(cmd *cobra.Command, args []string, noColor bool) error

func UpdateMVE

func UpdateMVE(cmd *cobra.Command, args []string, noColor bool) error

func UpdateMVEResourceTags added in v0.4.3

func UpdateMVEResourceTags(cmd *cobra.Command, args []string, noColor bool) error

func ValidateMVE added in v0.5.4

func ValidateMVE(cmd *cobra.Command, args []string, noColor bool) error

Types

type MVEStatus added in v0.4.4

type MVEStatus struct {
	UID    string `json:"uid" header:"UID"`
	Name   string `json:"name" header:"Name"`
	Status string `json:"status" header:"Status"`
	Vendor string `json:"vendor" header:"Vendor"`
	Size   string `json:"size" header:"Size"`
}

type MockMVEService

type MockMVEService struct {
	GetMVEErr                            error
	GetMVEResult                         *megaport.MVE
	ListMVEsErr                          error
	ListMVEsResult                       []*megaport.MVE
	BuyMVEErr                            error
	BuyMVEResult                         *megaport.BuyMVEResponse
	DeleteMVEErr                         error
	DeleteMVEResult                      *megaport.DeleteMVEResponse
	CapturedDeleteMVERequest             *megaport.DeleteMVERequest
	ModifyMVEErr                         error
	ModifyMVEResult                      *megaport.ModifyMVEResponse
	ValidateMVEOrderErr                  error
	ListMVEResourceTagsErr               error
	ListMVEResourceTagsResult            map[string]string
	UpdateMVEResourceTagsErr             error
	ListMVEImagesErr                     error
	ListMVEImagesResult                  []*megaport.MVEImage
	ListAvailableMVESizesErr             error
	ListAvailableMVESizesResult          []*megaport.MVESize
	CapturedBuyMVERequest                *megaport.BuyMVERequest
	CapturedModifyMVERequest             *megaport.ModifyMVERequest
	CapturedListMVEsRequest              *megaport.ListMVEsRequest
	CapturedUpdateMVEResourceTagsRequest map[string]string
	ForceNilGetMVE                       bool
}

func (*MockMVEService) BuyMVE

func (*MockMVEService) DeleteMVE

func (*MockMVEService) GetMVE

func (m *MockMVEService) GetMVE(ctx context.Context, mveID string) (*megaport.MVE, error)

func (*MockMVEService) ListAvailableMVESizes

func (m *MockMVEService) ListAvailableMVESizes(ctx context.Context) ([]*megaport.MVESize, error)

func (*MockMVEService) ListMVEImages

func (m *MockMVEService) ListMVEImages(ctx context.Context) ([]*megaport.MVEImage, error)

func (*MockMVEService) ListMVEResourceTags

func (m *MockMVEService) ListMVEResourceTags(ctx context.Context, mveID string) (map[string]string, error)

func (*MockMVEService) ListMVEs added in v0.3.8

func (m *MockMVEService) ListMVEs(ctx context.Context, req *megaport.ListMVEsRequest) ([]*megaport.MVE, error)

func (*MockMVEService) ModifyMVE

func (*MockMVEService) Reset

func (m *MockMVEService) Reset()

func (*MockMVEService) UpdateMVEResourceTags

func (m *MockMVEService) UpdateMVEResourceTags(ctx context.Context, mveID string, tags map[string]string) error

func (*MockMVEService) ValidateMVEOrder

func (m *MockMVEService) ValidateMVEOrder(ctx context.Context, req *megaport.BuyMVERequest) error

type Module added in v0.3.4

type Module struct{}

func NewModule added in v0.3.4

func NewModule() *Module

func (*Module) Name added in v0.3.4

func (m *Module) Name() string

func (*Module) RegisterCommands added in v0.3.4

func (m *Module) RegisterCommands(rootCmd *cobra.Command)

Jump to

Keyboard shortcuts

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