mcr

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)

AddCommandsTo builds the mcr commands and adds them to the root command

func AddMCRIPSecAddOn added in v0.7.1

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

AddMCRIPSecAddOn adds an IPSec add-on to an existing MCR.

func BuyMCR

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

func CreateMCRPrefixFilterList

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

func DeleteMCR

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

func DeleteMCRPrefixFilterList

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

func GetMCR

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

func GetMCRPrefixFilterList

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

func GetMCRStatus added in v0.4.4

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

func ListMCRPrefixFilterLists

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

func ListMCRResourceTags added in v0.4.3

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

func ListMCRs added in v0.3.9

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

func LockMCR added in v0.5.4

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

func RestoreMCR

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

func UnlockMCR added in v0.5.4

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

func UpdateMCR

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

func UpdateMCRIPSecAddOn added in v0.7.1

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

UpdateMCRIPSecAddOn updates an existing IPSec add-on on an MCR. Setting tunnel-count to 0 disables IPSec.

func UpdateMCRPrefixFilterList

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

func UpdateMCRResourceTags added in v0.4.3

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

func ValidateMCR added in v0.5.4

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

Types

type MCRStatus added in v0.4.4

type MCRStatus struct {
	UID    string `json:"uid" header:"UID"`
	Name   string `json:"name" header:"Name"`
	Status string `json:"status" header:"Status"`
	ASN    int    `json:"asn" header:"ASN"`
	Speed  int    `json:"speed" header:"Speed"`
}

type MockMCRService

type MockMCRService struct {
	BuyMCRResult                          *megaport.BuyMCRResponse
	BuyMCRErr                             error
	CapturedBuyMCRRequest                 *megaport.BuyMCRRequest
	ValidateMCROrderErr                   error
	GetMCRResult                          *megaport.MCR
	GetMCRErr                             error
	ListMCRsResult                        []*megaport.MCR
	ListMCRsErr                           error
	CapturedListMCRsRequest               *megaport.ListMCRsRequest
	DeleteMCRResult                       *megaport.DeleteMCRResponse
	DeleteMCRErr                          error
	CapturedDeleteMCRUID                  string
	CapturedDeleteMCRRequest              *megaport.DeleteMCRRequest
	RestoreMCRResult                      *megaport.RestoreMCRResponse
	RestoreMCRErr                         error
	CapturedRestoreMCRUID                 string
	CreateMCRPrefixFilterListResult       *megaport.CreateMCRPrefixFilterListResponse
	CreateMCRPrefixFilterListErr          error
	CapturedCreatePrefixFilterListRequest *megaport.CreateMCRPrefixFilterListRequest

	ListMCRPrefixFilterListsResult           []*megaport.PrefixFilterList
	ListMCRPrefixFilterListsErr              error
	GetMCRPrefixFilterListResult             *megaport.MCRPrefixFilterList
	GetMCRPrefixFilterListErr                error
	ModifyMCRPrefixFilterListResult          *megaport.ModifyMCRPrefixFilterListResponse
	ModifyMCRPrefixFilterListErr             error
	CapturedModifyMCRPrefixFilterListRequest *megaport.MCRPrefixFilterList
	DeleteMCRPrefixFilterListResult          *megaport.DeleteMCRPrefixFilterListResponse
	DeleteMCRPrefixFilterListErr             error
	ModifyMCRResult                          *megaport.ModifyMCRResponse
	ModifyMCRErr                             error
	CapturedModifyMCRRequest                 *megaport.ModifyMCRRequest
	ListMCRResourceTagsResult                map[string]string
	ListMCRResourceTagsErr                   error
	UpdateMCRResourceTagsErr                 error
	CapturedUpdateMCRResourceTagsRequest     map[string]string
	GetMCRPrefixFilterListsResult            []*megaport.PrefixFilterList
	GetMCRPrefixFilterListsErr               error
	CapturedModifyPrefixFilterListMCRID      string
	CapturedModifyPrefixFilterListID         int
	CapturedModifyPrefixFilterList           *megaport.MCRPrefixFilterList
	ForceNilGetMCR                           bool

	UpdateMCRWithAddOnErr           error
	CapturedUpdateMCRWithAddOnMCRID string
	CapturedUpdateMCRWithAddOnReq   megaport.MCRAddOnRequest

	UpdateMCRIPsecAddOnErr            error
	CapturedUpdateMCRIPsecAddOnMCRID  string
	CapturedUpdateMCRIPsecAddOnUID    string
	CapturedUpdateMCRIPsecTunnelCount int

	WaitForMCRReadyErr             error
	CapturedWaitForMCRReadyMCRID   string
	CapturedWaitForMCRReadyTimeout time.Duration
}

func (*MockMCRService) BuyMCR

func (*MockMCRService) DeleteMCR

func (*MockMCRService) DeleteMCRPrefixFilterList

func (m *MockMCRService) DeleteMCRPrefixFilterList(ctx context.Context, mcrID string, prefixFilterListID int) (*megaport.DeleteMCRPrefixFilterListResponse, error)

func (*MockMCRService) GetMCR

func (m *MockMCRService) GetMCR(ctx context.Context, mcrUID string) (*megaport.MCR, error)

func (*MockMCRService) GetMCRPrefixFilterList

func (m *MockMCRService) GetMCRPrefixFilterList(ctx context.Context, mcrID string, prefixFilterListID int) (*megaport.MCRPrefixFilterList, error)

func (*MockMCRService) GetMCRPrefixFilterLists

func (m *MockMCRService) GetMCRPrefixFilterLists(ctx context.Context, mcrID string) ([]*megaport.PrefixFilterList, error)

func (*MockMCRService) ListMCRPrefixFilterLists

func (m *MockMCRService) ListMCRPrefixFilterLists(ctx context.Context, mcrID string) ([]*megaport.PrefixFilterList, error)

func (*MockMCRService) ListMCRResourceTags

func (m *MockMCRService) ListMCRResourceTags(ctx context.Context, mcrID string) (map[string]string, error)

func (*MockMCRService) ListMCRs added in v0.3.8

func (m *MockMCRService) ListMCRs(ctx context.Context, req *megaport.ListMCRsRequest) ([]*megaport.MCR, error)

func (*MockMCRService) ModifyMCR

func (*MockMCRService) ModifyMCRPrefixFilterList

func (m *MockMCRService) ModifyMCRPrefixFilterList(ctx context.Context, mcrID string, prefixFilterListID int, prefixFilterList *megaport.MCRPrefixFilterList) (*megaport.ModifyMCRPrefixFilterListResponse, error)

func (*MockMCRService) Reset added in v0.4.4

func (m *MockMCRService) Reset()

func (*MockMCRService) RestoreMCR

func (m *MockMCRService) RestoreMCR(ctx context.Context, mcrUID string) (*megaport.RestoreMCRResponse, error)

func (*MockMCRService) UpdateMCRIPsecAddOn added in v0.7.1

func (m *MockMCRService) UpdateMCRIPsecAddOn(ctx context.Context, mcrID string, addOnUID string, tunnelCount int) error

func (*MockMCRService) UpdateMCRResourceTags

func (m *MockMCRService) UpdateMCRResourceTags(ctx context.Context, mcrID string, tags map[string]string) error

func (*MockMCRService) UpdateMCRWithAddOn added in v0.7.1

func (m *MockMCRService) UpdateMCRWithAddOn(ctx context.Context, mcrID string, req megaport.MCRAddOnRequest) error

func (*MockMCRService) ValidateMCROrder

func (m *MockMCRService) ValidateMCROrder(ctx context.Context, req *megaport.BuyMCRRequest) error

func (*MockMCRService) WaitForMCRReady added in v0.9.2

func (m *MockMCRService) WaitForMCRReady(ctx context.Context, mcrID string, timeout time.Duration) 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