packer-cn/builder/azure/common/client/azure_client_set_mock.go

73 lines
2.5 KiB
Go
Raw Normal View History

2019-09-10 08:48:55 -04:00
package client
import (
2020-03-25 15:15:46 -04:00
"github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2019-07-01/compute/computeapi"
2019-09-10 08:48:55 -04:00
"github.com/Azure/go-autorest/autorest"
)
2020-03-25 16:11:51 -04:00
var _ AzureClientSet = &AzureClientSetMock{}
2019-09-10 08:48:55 -04:00
// AzureClientSetMock provides a generic mock for AzureClientSet
type AzureClientSetMock struct {
DisksClientMock computeapi.DisksClientAPI
2020-03-25 17:36:51 -04:00
SnapshotsClientMock computeapi.SnapshotsClientAPI
2019-09-10 08:48:55 -04:00
ImagesClientMock computeapi.ImagesClientAPI
VirtualMachineImagesClientMock VirtualMachineImagesClientAPI
VirtualMachinesClientMock computeapi.VirtualMachinesClientAPI
2020-03-25 17:36:51 -04:00
GalleryImagesClientMock computeapi.GalleryImagesClientAPI
GalleryImageVersionsClientMock computeapi.GalleryImageVersionsClientAPI
2019-09-10 08:48:55 -04:00
PollClientMock autorest.Client
MetadataClientMock MetadataClientAPI
2020-03-25 16:11:51 -04:00
SubscriptionIDMock string
2019-09-10 08:48:55 -04:00
}
// DisksClient returns a DisksClientAPI
func (m *AzureClientSetMock) DisksClient() computeapi.DisksClientAPI {
return m.DisksClientMock
}
2020-03-25 17:36:51 -04:00
// SnapshotsClient returns a SnapshotsClientAPI
func (m *AzureClientSetMock) SnapshotsClient() computeapi.SnapshotsClientAPI {
return m.SnapshotsClientMock
}
2019-09-10 08:48:55 -04:00
// ImagesClient returns a ImagesClientAPI
func (m *AzureClientSetMock) ImagesClient() computeapi.ImagesClientAPI {
return m.ImagesClientMock
}
// VirtualMachineImagesClient returns a VirtualMachineImagesClientAPI
func (m *AzureClientSetMock) VirtualMachineImagesClient() VirtualMachineImagesClientAPI {
return m.VirtualMachineImagesClientMock
}
// VirtualMachinesClient returns a VirtualMachinesClientAPI
func (m *AzureClientSetMock) VirtualMachinesClient() computeapi.VirtualMachinesClientAPI {
return m.VirtualMachinesClientMock
}
2020-03-25 17:36:51 -04:00
// GalleryImagesClient returns a GalleryImagesClientAPI
func (m *AzureClientSetMock) GalleryImagesClient() computeapi.GalleryImagesClientAPI {
return m.GalleryImagesClientMock
}
// GalleryImageVersionsClient returns a GalleryImageVersionsClientAPI
func (m *AzureClientSetMock) GalleryImageVersionsClient() computeapi.GalleryImageVersionsClientAPI {
return m.GalleryImageVersionsClientMock
}
2019-09-10 08:48:55 -04:00
// PollClient returns an autorest Client that can be used for polling async requests
func (m *AzureClientSetMock) PollClient() autorest.Client {
return m.PollClientMock
}
// MetadataClient returns a MetadataClientAPI
func (m *AzureClientSetMock) MetadataClient() MetadataClientAPI {
return m.MetadataClientMock
}
2020-03-25 16:11:51 -04:00
// SubscriptionID returns SubscriptionIDMock
func (m *AzureClientSetMock) SubscriptionID() string {
return m.SubscriptionIDMock
}