mve

package
v0.3.2 Latest Latest
Warning

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

Go to latest
Published: Apr 7, 2025 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

BuyMVE handles the purchase of a new Megaport Virtual Edge device

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 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 UpdateMVE

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

Types

type MVEOutput

type MVEOutput struct {
	output.Output `json:"-" header:"-"`
	UID           string `json:"uid"`
	Name          string `json:"name"`
	LocationID    int    `json:"location_id"`
}

MVEOutput represents the desired fields for JSON output.

func ToMVEOutput

func ToMVEOutput(m *megaport.MVE) (MVEOutput, error)

ToMVEOutput converts an MVE to an MVEOutput.

type MockMVEService

type MockMVEService struct {
	mock.Mock
	BuyMVEError                       error
	BuyMVEResult                      *megaport.BuyMVEResponse
	CapturedBuyMVERequest             *megaport.BuyMVERequest
	ValidateMVEOrderError             error
	GetMVEError                       error
	GetMVEResult                      *megaport.MVE
	ModifyMVEError                    error
	ModifyMVEResult                   *megaport.ModifyMVEResponse
	CapturedModifyMVERequest          *megaport.ModifyMVERequest
	DeleteMVEError                    error
	DeleteMVEResult                   *megaport.DeleteMVEResponse
	CapturedDeleteMVERequest          *megaport.DeleteMVERequest
	ListMVEImagesError                error
	ListMVEImagesResult               []*megaport.MVEImage
	ListAvailableMVESizesError        error
	ListAvailableMVESizesResult       []*megaport.MVESize
	ListMVEResourceTagsError          error
	ListMVEResourceTagsResult         map[string]string
	CapturedListMVEResourceTagsUID    string
	UpdateMVEResourceTagsError        error
	CapturedUpdateMVEResourceTagsUID  string
	CapturedUpdateMVEResourceTagsTags map[string]string
}

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) 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

Jump to

Keyboard shortcuts

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