// NewCloud mocks base method
772245
func (m *MockFactory) NewCloud(arg0 installation.Installation, arg1 string, arg2 int) (cloud.Cloud, error) {
	ret := m.ctrl.Call(m, "NewCloud", arg0, arg1, arg2)
	ret0, _ := ret[0].(cloud.Cloud)
	ret1, _ := ret[1].(error)
	return ret0, ret1
}
384017
func (api *CloudAPI) AddCloud(cloudArgs params.AddCloudArgs) error {
	isAdmin, err := api.authorizer.HasPermission(permission.SuperuserAccess, api.ctlrBackend.ControllerTag())
	if err != nil && !errors.IsNotFound(err) {
		return errors.Trace(err)
	} else if !isAdmin {
		return common.ServerError(common.ErrPerm)
	}
	err = api.backend.AddCloud(common.CloudFromParams(cloudArgs.Name, cloudArgs.Cloud), api.apiUser.Name())
	return errors.Trace(err)
}
356550
func (cloudstack CloudstackClient) New(apiurl string, apikey string, secretkey string, insecureskipverify bool) *CloudstackClient {
	c := &CloudstackClient{
		client: &http.Client{
			Transport: &http.Transport{
				TLSClientConfig: &tls.Config{InsecureSkipVerify: insecureskipverify},
				Proxy:           http.ProxyFromEnvironment,
			},
		},
		BaseURL:   apiurl,
		APIKey:    apikey,
		SecretKey: secretkey,
	}
	return c
}
803554
func NewMockCAClient(orgName string, cryptoProvider core.CryptoSuite) (api.CAClient, error) {
	mcm := MockCAClient{}
	return &mcm, nil
}
269095
func NewMockCgroupnetcls(ctrl *gomock.Controller) *MockCgroupnetcls {
	mock := &MockCgroupnetcls{ctrl: ctrl}
	mock.recorder = &MockCgroupnetclsMockRecorder{mock}
	return mock
}
133593
func (m *MockVolumeDriver) CloudBackupSchedCreate(arg0 *api.CloudBackupSchedCreateRequest) (*api.CloudBackupSchedCreateResponse, error) {
	ret := m.ctrl.Call(m, "CloudBackupSchedCreate", arg0)
	ret0, _ := ret[0].(*api.CloudBackupSchedCreateResponse)
	ret1, _ := ret[1].(error)
	return ret0, ret1
}
870799
func NewMockAdminClient(ctrl *gomock.Controller) *MockAdminClient {
	mock := &MockAdminClient{ctrl: ctrl}
	mock.recorder = &MockAdminClientMockRecorder{mock}
	return mock
}
307214
func NewMockDebugClient(ctrl *gomock.Controller) *MockDebugClient {
	mock := &MockDebugClient{ctrl: ctrl}
	mock.recorder = &MockDebugClientMockRecorder{mock}
	return mock
}
379345
func NewFakeGCECloud(vals TestClusterValues) *Cloud {
	client := &http.Client{Transport: &fakeRoundTripper{}}
	service, _ := compute.New(client)
	gce := &Cloud{
		region:           vals.Region,
		service:          service,
		managedZones:     []string{vals.ZoneName},
		projectID:        vals.ProjectID,
		networkProjectID: vals.ProjectID,
		ClusterID:        fakeClusterID(vals.ClusterID),
	}
	c := cloud.NewMockGCE(&gceProjectRouter{gce})
	gce.c = c
	return gce
}
314666
func (m *MockVolumeDriver) CloudMigrateCancel(arg0 *api.CloudMigrateCancelRequest) error {
	ret := m.ctrl.Call(m, "CloudMigrateCancel", arg0)
	ret0, _ := ret[0].(error)
	return ret0
}
159758
func (m *MockBuilderFactory) NewBuilder(arg0 blobstore.Blobstore, arg1 agentclient.AgentClient) state.Builder {
	ret := m.ctrl.Call(m, "NewBuilder", arg0, arg1)
	ret0, _ := ret[0].(state.Builder)
	return ret0
}
951657
func NewMockBlobstore(ctrl *gomock.Controller) *MockBlobstore {
	mock := &MockBlobstore{ctrl: ctrl}
	mock.recorder = &MockBlobstoreMockRecorder{mock}
	return mock
}
627985
func NewMockContainerAPIClient(ctrl *gomock.Controller) *MockContainerAPIClient {
	mock := &MockContainerAPIClient{ctrl: ctrl}
	mock.recorder = &MockContainerAPIClientMockRecorder{mock}
	return mock
}
1179669
func NewAzureCloudConfig(c *cli.Context) cloudconfigs.CloudConfigProvider {
	provider := &azureCloudConfig{
		Context: c,
	}
	return provider
}
179808
func NewMockClient() *MockClient {
	client, _ := NewClient(&Option{APIKey: "test"})

	mux := http.NewServeMux()
	server := httptest.NewServer(mux)
	url, _ := url.Parse(server.URL)
	client.BaseURL = url

	cli := &MockClient{Mux: mux,
		Server:      server,
		Client:      client,
		FixturesDir: "./test-fixtures"}

	return cli
}
895102
func NewMockSDListener(ctrl *gomock.Controller) *MockSDListener {
	mock := &MockSDListener{ctrl: ctrl}
	mock.recorder = &MockSDListenerMockRecorder{mock}
	return mock
}
751782
func buildMockGCECloud(region string, project string) *mockGCECloud {
	i := &mockGCECloud{region: region, project: project}
	return i
}