Documentation
¶
Index ¶
- func AddCommandsTo(rootCmd *cobra.Command)
- func BuyMVE(cmd *cobra.Command, args []string, noColor bool) error
- func DeleteMVE(cmd *cobra.Command, args []string, noColor bool) error
- func GetMVE(cmd *cobra.Command, args []string, noColor bool, outputFormat string) error
- func ListAvailableMVESizes(cmd *cobra.Command, args []string, noColor bool, outputFormat string) error
- func ListMVEImages(cmd *cobra.Command, args []string, noColor bool, outputFormat string) error
- func UpdateMVE(cmd *cobra.Command, args []string, noColor bool) error
- type MVEOutput
- type MockMVEService
- func (m *MockMVEService) BuyMVE(ctx context.Context, req *megaport.BuyMVERequest) (*megaport.BuyMVEResponse, error)
- func (m *MockMVEService) DeleteMVE(ctx context.Context, req *megaport.DeleteMVERequest) (*megaport.DeleteMVEResponse, error)
- func (m *MockMVEService) GetMVE(ctx context.Context, mveId string) (*megaport.MVE, error)
- func (m *MockMVEService) ListAvailableMVESizes(ctx context.Context) ([]*megaport.MVESize, error)
- func (m *MockMVEService) ListMVEImages(ctx context.Context) ([]*megaport.MVEImage, error)
- func (m *MockMVEService) ListMVEResourceTags(ctx context.Context, mveID string) (map[string]string, error)
- func (m *MockMVEService) ModifyMVE(ctx context.Context, req *megaport.ModifyMVERequest) (*megaport.ModifyMVEResponse, error)
- func (m *MockMVEService) Reset()
- func (m *MockMVEService) UpdateMVEResourceTags(ctx context.Context, mveID string, tags map[string]string) error
- func (m *MockMVEService) ValidateMVEOrder(ctx context.Context, req *megaport.BuyMVERequest) error
- type Module
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddCommandsTo ¶
AddCommandsTo builds the mve commands and adds them to the root command
func ListAvailableMVESizes ¶
func ListMVEImages ¶
Types ¶
type MVEOutput ¶
type MVEOutput struct {
output.Output `json:"-" header:"-"`
UID string `json:"uid" header:"UID"`
Name string `json:"name" header:"Name"`
LocationID int `json:"location_id" header:"Location ID"`
Status string `json:"status" header:"Status"`
Vendor string `json:"vendor" header:"Vendor"`
Size string `json:"size" header:"Size"`
}
MVEOutput represents the desired fields for JSON output.
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 (m *MockMVEService) BuyMVE(ctx context.Context, req *megaport.BuyMVERequest) (*megaport.BuyMVEResponse, error)
func (*MockMVEService) DeleteMVE ¶
func (m *MockMVEService) DeleteMVE(ctx context.Context, req *megaport.DeleteMVERequest) (*megaport.DeleteMVEResponse, error)
func (*MockMVEService) ListAvailableMVESizes ¶
func (*MockMVEService) ListMVEImages ¶
func (*MockMVEService) ListMVEResourceTags ¶
func (*MockMVEService) ModifyMVE ¶
func (m *MockMVEService) ModifyMVE(ctx context.Context, req *megaport.ModifyMVERequest) (*megaport.ModifyMVEResponse, error)
func (*MockMVEService) Reset ¶
func (m *MockMVEService) Reset()
func (*MockMVEService) UpdateMVEResourceTags ¶
func (*MockMVEService) ValidateMVEOrder ¶
func (m *MockMVEService) ValidateMVEOrder(ctx context.Context, req *megaport.BuyMVERequest) error
type Module ¶ added in v0.3.4
type Module struct{}
Module implements the cmdbuilder.Module interface for mve
func (*Module) RegisterCommands ¶ added in v0.3.4
RegisterCommands adds the mve command to the root command
Click to show internal directories.
Click to hide internal directories.