Documentation
¶
Index ¶
- func AddCommandsTo(rootCmd *cobra.Command)
- func BuyVXC(cmd *cobra.Command, args []string, noColor bool) error
- func DeleteVXC(cmd *cobra.Command, args []string, noColor bool) error
- func GetVXC(cmd *cobra.Command, args []string, noColor bool, outputFormat string) error
- func GetVXCStatus(cmd *cobra.Command, args []string, noColor bool, outputFormat string) error
- func ListVXCResourceTags(cmd *cobra.Command, args []string, noColor bool, outputFormat string) error
- func ListVXCs(cmd *cobra.Command, args []string, noColor bool, outputFormat string) error
- func UpdateVXC(cmd *cobra.Command, args []string, noColor bool) error
- func UpdateVXCResourceTags(cmd *cobra.Command, args []string, noColor bool) error
- func ValidateVXC(cmd *cobra.Command, args []string, noColor bool) error
- type MockVXCService
- func (m *MockVXCService) BuyVXC(ctx context.Context, req *megaport.BuyVXCRequest) (*megaport.BuyVXCResponse, error)
- func (m *MockVXCService) DeleteVXC(ctx context.Context, id string, req *megaport.DeleteVXCRequest) error
- func (m *MockVXCService) GetVXC(ctx context.Context, id string) (*megaport.VXC, error)
- func (m *MockVXCService) ListPartnerPorts(ctx context.Context, req *megaport.ListPartnerPortsRequest) (*megaport.ListPartnerPortsResponse, error)
- func (m *MockVXCService) ListVXCResourceTags(ctx context.Context, vxcID string) (map[string]string, error)
- func (m *MockVXCService) ListVXCs(ctx context.Context, req *megaport.ListVXCsRequest) ([]*megaport.VXC, error)
- func (m *MockVXCService) LookupPartnerPorts(ctx context.Context, req *megaport.LookupPartnerPortsRequest) (*megaport.LookupPartnerPortsResponse, error)
- func (m *MockVXCService) Reset()
- func (m *MockVXCService) UpdateVXC(ctx context.Context, id string, req *megaport.UpdateVXCRequest) (*megaport.VXC, error)
- func (m *MockVXCService) UpdateVXCResourceTags(ctx context.Context, vxcID string, tags map[string]string) error
- func (m *MockVXCService) ValidateVXCOrder(ctx context.Context, req *megaport.BuyVXCRequest) error
- type Module
- type VXCStatus
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddCommandsTo ¶
AddCommandsTo builds the vxc commands and adds them to the root command
func GetVXCStatus ¶ added in v0.4.4
func ListVXCResourceTags ¶ added in v0.4.3
func UpdateVXCResourceTags ¶ added in v0.4.3
Types ¶
type MockVXCService ¶ added in v0.5.3
type MockVXCService struct {
BuyVXCResponse *megaport.BuyVXCResponse
BuyVXCError error
ValidateVXCOrderError error
GetVXCResponse *megaport.VXC
GetVXCError error
DeleteVXCError error
UpdateVXCError error
LookupPartnerPortsResponse *megaport.LookupPartnerPortsResponse
LookupPartnerPortsError error
ListPartnerPortsResponse *megaport.ListPartnerPortsResponse
ListPartnerPortsError error
CapturedUpdateVXCRequest *megaport.UpdateVXCRequest
UpdateVXCResponse *megaport.VXC
ListVXCResponse []*megaport.VXC
BuyVXCErr error
ListVXCErr error
CapturedListVXCsRequest *megaport.ListVXCsRequest
OnBuyVXC func(context.Context, *megaport.BuyVXCRequest)
ListVXCResourceTagsErr error
ListVXCResourceTagsResult map[string]string
CapturedUpdateVXCResourceTagsRequest map[string]string
CapturedListVXCResourceTagsUID string
UpdateVXCResourceTagsErr error
ForceNilGetVXC bool
}
// Mock VXC service for testing
func (*MockVXCService) BuyVXC ¶ added in v0.5.3
func (m *MockVXCService) BuyVXC(ctx context.Context, req *megaport.BuyVXCRequest) (*megaport.BuyVXCResponse, error)
func (*MockVXCService) DeleteVXC ¶ added in v0.5.3
func (m *MockVXCService) DeleteVXC(ctx context.Context, id string, req *megaport.DeleteVXCRequest) error
func (*MockVXCService) ListPartnerPorts ¶ added in v0.5.3
func (m *MockVXCService) ListPartnerPorts(ctx context.Context, req *megaport.ListPartnerPortsRequest) (*megaport.ListPartnerPortsResponse, error)
func (*MockVXCService) ListVXCResourceTags ¶ added in v0.5.3
func (*MockVXCService) ListVXCs ¶ added in v0.5.3
func (m *MockVXCService) ListVXCs(ctx context.Context, req *megaport.ListVXCsRequest) ([]*megaport.VXC, error)
func (*MockVXCService) LookupPartnerPorts ¶ added in v0.5.3
func (m *MockVXCService) LookupPartnerPorts(ctx context.Context, req *megaport.LookupPartnerPortsRequest) (*megaport.LookupPartnerPortsResponse, error)
func (*MockVXCService) Reset ¶ added in v0.5.9
func (m *MockVXCService) Reset()
Reset clears all configured results, errors, and captured requests.
func (*MockVXCService) UpdateVXC ¶ added in v0.5.3
func (m *MockVXCService) UpdateVXC(ctx context.Context, id string, req *megaport.UpdateVXCRequest) (*megaport.VXC, error)
func (*MockVXCService) UpdateVXCResourceTags ¶ added in v0.5.3
func (*MockVXCService) ValidateVXCOrder ¶ added in v0.5.3
func (m *MockVXCService) ValidateVXCOrder(ctx context.Context, req *megaport.BuyVXCRequest) error
type Module ¶ added in v0.3.4
type Module struct{}
Module implements the cmdbuilder.Module interface for vxc
func (*Module) RegisterCommands ¶ added in v0.3.4
RegisterCommands adds the vxc command to the root command
Click to show internal directories.
Click to hide internal directories.