From daaf08e0d6b039379d4ca7f1bb92b14c1a05e6c0 Mon Sep 17 00:00:00 2001 From: Gilles Miraillet Date: Wed, 20 Dec 2023 23:01:49 +0100 Subject: [PATCH] Adapt v7action CloudControllerClient accordingly to ccv3 modifications --- actor/v7action/application.go | 15 +- actor/v7action/application_manifest_test.go | 5 +- actor/v7action/application_summary_test.go | 23 +- actor/v7action/application_test.go | 85 +- .../application_with_process_summary_test.go | 15 +- actor/v7action/build.go | 7 +- actor/v7action/build_test.go | 39 +- actor/v7action/buildpack.go | 9 +- actor/v7action/buildpack_test.go | 43 +- actor/v7action/cloud_controller_client.go | 99 +- actor/v7action/domain.go | 7 +- actor/v7action/domain_test.go | 41 +- actor/v7action/droplet.go | 5 +- actor/v7action/droplet_test.go | 41 +- actor/v7action/environment_variable.go | 5 +- actor/v7action/environment_variable_test.go | 19 +- actor/v7action/feature_flag.go | 7 +- actor/v7action/feature_flag_test.go | 33 +- actor/v7action/isolation_segment.go | 5 +- actor/v7action/isolation_segment_test.go | 61 +- actor/v7action/label.go | 6 +- actor/v7action/label_test.go | 21 +- actor/v7action/logging_test.go | 3 +- actor/v7action/metadata.go | 6 +- actor/v7action/organization.go | 3 +- actor/v7action/organization_test.go | 7 +- actor/v7action/package.go | 17 +- actor/v7action/package_test.go | 63 +- actor/v7action/process.go | 8 +- actor/v7action/process_health_check_test.go | 11 +- actor/v7action/process_instance_test.go | 5 +- actor/v7action/process_test.go | 23 +- actor/v7action/relationship_list.go | 4 +- actor/v7action/relationship_list_test.go | 7 +- actor/v7action/service_instance.go | 3 +- actor/v7action/service_instance_test.go | 3 +- actor/v7action/space.go | 3 +- actor/v7action/space_test.go | 27 +- actor/v7action/ssh_test.go | 19 +- actor/v7action/stack.go | 3 +- actor/v7action/stack_test.go | 15 +- actor/v7action/task.go | 5 +- actor/v7action/task_test.go | 43 +- .../fake_cloud_controller_client.go | 1077 +++++++++-------- 44 files changed, 990 insertions(+), 956 deletions(-) diff --git a/actor/v7action/application.go b/actor/v7action/application.go index 702b89cb2eb..5bc3f9b1c36 100644 --- a/actor/v7action/application.go +++ b/actor/v7action/application.go @@ -1,6 +1,7 @@ package v7action import ( + "code.cloudfoundry.org/cli/resources" "time" "code.cloudfoundry.org/cli/actor/actionerror" @@ -105,14 +106,12 @@ func (actor Actor) GetApplicationsBySpace(spaceGUID string) ([]Application, Warn // name in the given space. func (actor Actor) CreateApplicationInSpace(app Application, spaceGUID string) (Application, Warnings, error) { createdApp, warnings, err := actor.CloudControllerClient.CreateApplication( - ccv3.Application{ + resources.Application{ LifecycleType: app.LifecycleType, LifecycleBuildpacks: app.LifecycleBuildpacks, StackName: app.StackName, Name: app.Name, - Relationships: ccv3.Relationships{ - constant.RelationshipTypeSpace: ccv3.Relationship{GUID: spaceGUID}, - }, + SpaceGUID: spaceGUID, }) if err != nil { @@ -219,12 +218,12 @@ func (actor Actor) PollStart(appGUID string) (Warnings, error) { // UpdateApplication updates the buildpacks on an application func (actor Actor) UpdateApplication(app Application) (Application, Warnings, error) { - ccApp := ccv3.Application{ + ccApp := resources.Application{ GUID: app.GUID, StackName: app.StackName, LifecycleType: app.LifecycleType, LifecycleBuildpacks: app.LifecycleBuildpacks, - Metadata: (*ccv3.Metadata)(app.Metadata), + Metadata: (*resources.Metadata)(app.Metadata), } updatedApp, warnings, err := actor.CloudControllerClient.UpdateApplication(ccApp) @@ -235,7 +234,7 @@ func (actor Actor) UpdateApplication(app Application) (Application, Warnings, er return actor.convertCCToActorApplication(updatedApp), Warnings(warnings), nil } -func (Actor) convertCCToActorApplication(app ccv3.Application) Application { +func (Actor) convertCCToActorApplication(app resources.Application) Application { return Application{ GUID: app.GUID, StackName: app.StackName, @@ -247,7 +246,7 @@ func (Actor) convertCCToActorApplication(app ccv3.Application) Application { } } -func (actor Actor) shouldContinuePollingProcessStatus(process ccv3.Process) (bool, Warnings, error) { +func (actor Actor) shouldContinuePollingProcessStatus(process resources.Process) (bool, Warnings, error) { ccInstances, ccWarnings, err := actor.CloudControllerClient.GetProcessInstances(process.GUID) instances := ProcessInstances(ccInstances) warnings := Warnings(ccWarnings) diff --git a/actor/v7action/application_manifest_test.go b/actor/v7action/application_manifest_test.go index 47849e22ad0..f565b2bdb75 100644 --- a/actor/v7action/application_manifest_test.go +++ b/actor/v7action/application_manifest_test.go @@ -1,6 +1,7 @@ package v7action_test import ( + "code.cloudfoundry.org/cli/resources" "errors" "code.cloudfoundry.org/cli/actor/actionerror" @@ -58,7 +59,7 @@ var _ = Describe("Application Manifest Actions", func() { When("the app exists", func() { BeforeEach(func() { fakeCloudControllerClient.GetApplicationsReturns( - []ccv3.Application{{GUID: "app-1-guid"}}, + []resources.Application{{GUID: "app-1-guid"}}, ccv3.Warnings{"app-1-warning"}, nil, ) @@ -224,7 +225,7 @@ var _ = Describe("Application Manifest Actions", func() { When("getting the application is successful", func() { BeforeEach(func() { fakeCloudControllerClient.GetApplicationsReturns( - []ccv3.Application{ + []resources.Application{ {Name: appName, GUID: "some-app-guid"}, }, ccv3.Warnings{"get-application-warning"}, diff --git a/actor/v7action/application_summary_test.go b/actor/v7action/application_summary_test.go index 1bb6d7eb30f..0d66364107d 100644 --- a/actor/v7action/application_summary_test.go +++ b/actor/v7action/application_summary_test.go @@ -1,6 +1,7 @@ package v7action_test import ( + "code.cloudfoundry.org/cli/resources" "errors" "code.cloudfoundry.org/cli/actor/v2action" @@ -91,7 +92,7 @@ var _ = Describe("Application Summary Actions", func() { When("retrieving the application is successful", func() { BeforeEach(func() { fakeCloudControllerClient.GetApplicationsReturns( - []ccv3.Application{ + []resources.Application{ { Name: "some-app-name", GUID: "some-app-guid", @@ -105,7 +106,7 @@ var _ = Describe("Application Summary Actions", func() { When("retrieving the process information is successful", func() { BeforeEach(func() { - listedProcesses := []ccv3.Process{ + listedProcesses := []resources.Process{ { GUID: "some-process-guid", Type: "some-type", @@ -161,9 +162,9 @@ var _ = Describe("Application Summary Actions", func() { When("app has droplet", func() { BeforeEach(func() { fakeCloudControllerClient.GetApplicationDropletCurrentReturns( - ccv3.Droplet{ + resources.Droplet{ Stack: "some-stack", - Buildpacks: []ccv3.DropletBuildpack{ + Buildpacks: []resources.DropletBuildpack{ { Name: "some-buildpack", }, @@ -262,7 +263,7 @@ var _ = Describe("Application Summary Actions", func() { BeforeEach(func() { expectedErr = errors.New("some error") fakeCloudControllerClient.GetApplicationDropletCurrentReturns( - ccv3.Droplet{}, + resources.Droplet{}, ccv3.Warnings{"some-droplet-warning"}, expectedErr, ) @@ -278,7 +279,7 @@ var _ = Describe("Application Summary Actions", func() { When("app does not have current droplet", func() { BeforeEach(func() { fakeCloudControllerClient.GetApplicationDropletCurrentReturns( - ccv3.Droplet{}, + resources.Droplet{}, ccv3.Warnings{"some-droplet-warning"}, ccerror.DropletNotFoundError{}, ) @@ -344,7 +345,7 @@ var _ = Describe("Application Summary Actions", func() { BeforeEach(func() { fakeCloudControllerClient.GetApplicationProcessesReturns( - []ccv3.Process{ + []resources.Process{ { GUID: "some-process-guid", Type: "some-type", @@ -355,7 +356,7 @@ var _ = Describe("Application Summary Actions", func() { ) fakeCloudControllerClient.GetApplicationProcessByTypeReturns( - ccv3.Process{}, + resources.Process{}, ccv3.Warnings{"get-process-by-type-warning"}, nil, ) @@ -380,7 +381,7 @@ var _ = Describe("Application Summary Actions", func() { BeforeEach(func() { fakeCloudControllerClient.GetApplicationsReturns( - []ccv3.Application{ + []resources.Application{ { Name: "some-app-name", GUID: "some-app-guid", @@ -393,7 +394,7 @@ var _ = Describe("Application Summary Actions", func() { expectedErr = errors.New("some error") fakeCloudControllerClient.GetApplicationProcessesReturns( - []ccv3.Process{{Type: constant.ProcessTypeWeb}}, + []resources.Process{{Type: constant.ProcessTypeWeb}}, ccv3.Warnings{"some-process-warning"}, expectedErr, ) @@ -409,7 +410,7 @@ var _ = Describe("Application Summary Actions", func() { When("passed with a routeActor", func() { BeforeEach(func() { fakeCloudControllerClient.GetApplicationsReturns( - []ccv3.Application{ + []resources.Application{ { Name: "some-app-name", GUID: "some-app-guid", diff --git a/actor/v7action/application_test.go b/actor/v7action/application_test.go index 70b775bc79f..9b222cc392e 100644 --- a/actor/v7action/application_test.go +++ b/actor/v7action/application_test.go @@ -1,6 +1,7 @@ package v7action_test import ( + "code.cloudfoundry.org/cli/resources" "errors" "fmt" "strings" @@ -43,7 +44,7 @@ var _ = Describe("Application Actions", func() { When("looking up the app guid fails", func() { BeforeEach(func() { - fakeCloudControllerClient.GetApplicationsReturns([]ccv3.Application{}, ccv3.Warnings{"some-get-app-warning"}, errors.New("some-get-app-error")) + fakeCloudControllerClient.GetApplicationsReturns([]resources.Application{}, ccv3.Warnings{"some-get-app-warning"}, errors.New("some-get-app-error")) }) It("returns the warnings and error", func() { @@ -54,7 +55,7 @@ var _ = Describe("Application Actions", func() { When("looking up the app guid succeeds", func() { BeforeEach(func() { - fakeCloudControllerClient.GetApplicationsReturns([]ccv3.Application{{Name: "some-app", GUID: "abc123"}}, ccv3.Warnings{"some-get-app-warning"}, nil) + fakeCloudControllerClient.GetApplicationsReturns([]resources.Application{{Name: "some-app", GUID: "abc123"}}, ccv3.Warnings{"some-get-app-warning"}, nil) }) When("sending the delete fails", func() { @@ -102,7 +103,7 @@ var _ = Describe("Application Actions", func() { When("all of the requested apps exist", func() { BeforeEach(func() { fakeCloudControllerClient.GetApplicationsReturns( - []ccv3.Application{ + []resources.Application{ { Name: "some-app-name", GUID: "some-app-guid", @@ -143,7 +144,7 @@ var _ = Describe("Application Actions", func() { When("at least one of the requested apps does not exist", func() { BeforeEach(func() { fakeCloudControllerClient.GetApplicationsReturns( - []ccv3.Application{ + []resources.Application{ { Name: "some-app-name", }, @@ -166,7 +167,7 @@ var _ = Describe("Application Actions", func() { BeforeEach(func() { expectedError = errors.New("I am a CloudControllerClient Error") fakeCloudControllerClient.GetApplicationsReturns( - []ccv3.Application{}, + []resources.Application{}, ccv3.Warnings{"some-warning"}, expectedError) }) @@ -183,11 +184,11 @@ var _ = Describe("Application Actions", func() { When("the app exists", func() { BeforeEach(func() { fakeCloudControllerClient.GetApplicationsReturns( - []ccv3.Application{ + []resources.Application{ { Name: "some-app-name", GUID: "some-app-guid", - Metadata: &ccv3.Metadata{ + Metadata: &resources.Metadata{ Labels: map[string]types.NullString{ "some-key": types.NewNullString("some-value"), }, @@ -225,7 +226,7 @@ var _ = Describe("Application Actions", func() { BeforeEach(func() { expectedError = errors.New("I am a CloudControllerClient Error") fakeCloudControllerClient.GetApplicationsReturns( - []ccv3.Application{}, + []resources.Application{}, ccv3.Warnings{"some-warning"}, expectedError) }) @@ -240,7 +241,7 @@ var _ = Describe("Application Actions", func() { When("the app does not exist", func() { BeforeEach(func() { fakeCloudControllerClient.GetApplicationsReturns( - []ccv3.Application{}, + []resources.Application{}, ccv3.Warnings{"some-warning"}, nil, ) @@ -258,7 +259,7 @@ var _ = Describe("Application Actions", func() { When("the there are applications in the space", func() { BeforeEach(func() { fakeCloudControllerClient.GetApplicationsReturns( - []ccv3.Application{ + []resources.Application{ { GUID: "some-app-guid-1", Name: "some-app-1", @@ -301,7 +302,7 @@ var _ = Describe("Application Actions", func() { BeforeEach(func() { expectedError = errors.New("I am a CloudControllerClient Error") fakeCloudControllerClient.GetApplicationsReturns( - []ccv3.Application{}, + []resources.Application{}, ccv3.Warnings{"some-warning"}, expectedError) }) @@ -332,7 +333,7 @@ var _ = Describe("Application Actions", func() { When("the app successfully gets created", func() { BeforeEach(func() { fakeCloudControllerClient.CreateApplicationReturns( - ccv3.Application{ + resources.Application{ Name: "some-app-name", GUID: "some-app-guid", LifecycleType: constant.AppLifecycleTypeBuildpack, @@ -354,11 +355,9 @@ var _ = Describe("Application Actions", func() { Expect(warnings).To(ConsistOf("some-warning")) Expect(fakeCloudControllerClient.CreateApplicationCallCount()).To(Equal(1)) - Expect(fakeCloudControllerClient.CreateApplicationArgsForCall(0)).To(Equal(ccv3.Application{ - Name: "some-app-name", - Relationships: ccv3.Relationships{ - constant.RelationshipTypeSpace: ccv3.Relationship{GUID: "some-space-guid"}, - }, + Expect(fakeCloudControllerClient.CreateApplicationArgsForCall(0)).To(Equal(resources.Application{ + Name: "some-app-name", + SpaceGUID: "some-space-guid", LifecycleType: constant.AppLifecycleTypeBuildpack, LifecycleBuildpacks: []string{"buildpack-1", "buildpack-2"}, })) @@ -371,7 +370,7 @@ var _ = Describe("Application Actions", func() { BeforeEach(func() { expectedError = errors.New("I am a CloudControllerClient Error") fakeCloudControllerClient.CreateApplicationReturns( - ccv3.Application{}, + resources.Application{}, ccv3.Warnings{"some-warning"}, expectedError, ) @@ -386,7 +385,7 @@ var _ = Describe("Application Actions", func() { When("the cc client returns an NameNotUniqueInSpaceError", func() { BeforeEach(func() { fakeCloudControllerClient.CreateApplicationReturns( - ccv3.Application{}, + resources.Application{}, ccv3.Warnings{"some-warning"}, ccerror.NameNotUniqueInSpaceError{}, ) @@ -422,10 +421,10 @@ var _ = Describe("Application Actions", func() { }) When("the app successfully gets updated", func() { - var apiResponseApp ccv3.Application + var apiResponseApp resources.Application BeforeEach(func() { - apiResponseApp = ccv3.Application{ + apiResponseApp = resources.Application{ GUID: "response-app-guid", StackName: "response-stack-name", LifecycleType: constant.AppLifecycleTypeBuildpack, @@ -449,12 +448,12 @@ var _ = Describe("Application Actions", func() { Expect(warnings).To(ConsistOf("some-warning")) Expect(fakeCloudControllerClient.UpdateApplicationCallCount()).To(Equal(1)) - Expect(fakeCloudControllerClient.UpdateApplicationArgsForCall(0)).To(Equal(ccv3.Application{ + Expect(fakeCloudControllerClient.UpdateApplicationArgsForCall(0)).To(Equal(resources.Application{ GUID: submitApp.GUID, StackName: submitApp.StackName, LifecycleType: submitApp.LifecycleType, LifecycleBuildpacks: submitApp.LifecycleBuildpacks, - Metadata: (*ccv3.Metadata)(submitApp.Metadata), + Metadata: (*resources.Metadata)(submitApp.Metadata), })) }) }) @@ -465,7 +464,7 @@ var _ = Describe("Application Actions", func() { BeforeEach(func() { expectedError = errors.New("I am a CloudControllerClient Error") fakeCloudControllerClient.UpdateApplicationReturns( - ccv3.Application{}, + resources.Application{}, ccv3.Warnings{"some-warning"}, expectedError, ) @@ -506,7 +505,7 @@ var _ = Describe("Application Actions", func() { }) When("getting the application processes succeeds", func() { - var processes []ccv3.Process + var processes []resources.Process BeforeEach(func() { fakeConfig.StartupTimeoutReturns(time.Second) @@ -515,7 +514,7 @@ var _ = Describe("Application Actions", func() { When("there is a single process", func() { BeforeEach(func() { - processes = []ccv3.Process{{GUID: "abc123"}} + processes = []resources.Process{{GUID: "abc123"}} fakeCloudControllerClient.GetApplicationProcessesReturns( processes, ccv3.Warnings{"get-app-warning-1"}, nil) @@ -682,7 +681,7 @@ var _ = Describe("Application Actions", func() { When("none of the processes are ready", func() { BeforeEach(func() { - processes = []ccv3.Process{{GUID: "bad-1"}, {GUID: "bad-2"}} + processes = []resources.Process{{GUID: "bad-1"}, {GUID: "bad-2"}} fakeCloudControllerClient.GetApplicationProcessesReturns( processes, ccv3.Warnings{"get-app-warning-1"}, nil) @@ -695,7 +694,7 @@ var _ = Describe("Application Actions", func() { When("some of the processes are ready", func() { BeforeEach(func() { - processes = []ccv3.Process{{GUID: "bad-1"}, {GUID: "good-1"}} + processes = []resources.Process{{GUID: "bad-1"}, {GUID: "good-1"}} fakeCloudControllerClient.GetApplicationProcessesReturns( processes, ccv3.Warnings{"get-app-warning-1"}, nil) @@ -708,7 +707,7 @@ var _ = Describe("Application Actions", func() { When("all of the processes are ready", func() { BeforeEach(func() { - processes = []ccv3.Process{{GUID: "good-1"}, {GUID: "good-2"}} + processes = []resources.Process{{GUID: "good-1"}, {GUID: "good-2"}} fakeCloudControllerClient.GetApplicationProcessesReturns( processes, ccv3.Warnings{"get-app-warning-1"}, nil) @@ -754,7 +753,7 @@ var _ = Describe("Application Actions", func() { BeforeEach(func() { expectedErr = errors.New("some-error") fakeCloudControllerClient.GetApplicationsReturns( - []ccv3.Application{}, + []resources.Application{}, ccv3.Warnings{"some-warning"}, expectedErr, ) @@ -767,15 +766,15 @@ var _ = Describe("Application Actions", func() { }) When("application exists", func() { - var ccv3App ccv3.Application + var ccv3App resources.Application BeforeEach(func() { - ccv3App = ccv3.Application{ + ccv3App = resources.Application{ GUID: "some-app-guid", } fakeCloudControllerClient.GetApplicationsReturns( - []ccv3.Application{ccv3App}, + []resources.Application{ccv3App}, ccv3.Warnings{"some-warning"}, nil, ) @@ -787,7 +786,7 @@ var _ = Describe("Application Actions", func() { BeforeEach(func() { expectedErr = errors.New("some-error") fakeCloudControllerClient.GetApplicationProcessByTypeReturns( - ccv3.Process{}, + resources.Process{}, ccv3.Warnings{"some-process-warning"}, expectedErr, ) @@ -802,7 +801,7 @@ var _ = Describe("Application Actions", func() { When("application process exists", func() { BeforeEach(func() { fakeCloudControllerClient.GetApplicationProcessByTypeReturns( - ccv3.Process{ + resources.Process{ GUID: "some-process-guid", }, ccv3.Warnings{"some-process-warning"}, @@ -810,7 +809,7 @@ var _ = Describe("Application Actions", func() { ) fakeCloudControllerClient.UpdateProcessReturns( - ccv3.Process{GUID: "some-process-guid"}, + resources.Process{GUID: "some-process-guid"}, ccv3.Warnings{"some-health-check-warning"}, nil, ) @@ -853,7 +852,7 @@ var _ = Describe("Application Actions", func() { When("there are no client errors", func() { BeforeEach(func() { fakeCloudControllerClient.UpdateApplicationStopReturns( - ccv3.Application{GUID: "some-app-guid"}, + resources.Application{GUID: "some-app-guid"}, ccv3.Warnings{"stop-application-warning"}, nil, ) @@ -873,7 +872,7 @@ var _ = Describe("Application Actions", func() { BeforeEach(func() { expectedErr = errors.New("some set stop-application error") fakeCloudControllerClient.UpdateApplicationStopReturns( - ccv3.Application{}, + resources.Application{}, ccv3.Warnings{"stop-application-warning"}, expectedErr, ) @@ -890,7 +889,7 @@ var _ = Describe("Application Actions", func() { When("there are no client errors", func() { BeforeEach(func() { fakeCloudControllerClient.UpdateApplicationStartReturns( - ccv3.Application{GUID: "some-app-guid"}, + resources.Application{GUID: "some-app-guid"}, ccv3.Warnings{"start-application-warning"}, nil, ) @@ -913,7 +912,7 @@ var _ = Describe("Application Actions", func() { BeforeEach(func() { expectedErr = errors.New("some set start-application error") fakeCloudControllerClient.UpdateApplicationStartReturns( - ccv3.Application{}, + resources.Application{}, ccv3.Warnings{"start-application-warning"}, expectedErr, ) @@ -946,7 +945,7 @@ var _ = Describe("Application Actions", func() { When("restarting the application is successful", func() { BeforeEach(func() { fakeCloudControllerClient.UpdateApplicationRestartReturns( - ccv3.Application{GUID: "some-app-guid"}, + resources.Application{GUID: "some-app-guid"}, ccv3.Warnings{"restart-application-warning"}, nil, ) @@ -954,7 +953,7 @@ var _ = Describe("Application Actions", func() { When("polling the application start is successful", func() { BeforeEach(func() { - processes := []ccv3.Process{{GUID: "some-process-guid"}} + processes := []resources.Process{{GUID: "some-process-guid"}} fakeCloudControllerClient.GetApplicationProcessesReturns(processes, ccv3.Warnings{"get-process-warnings"}, nil) fakeCloudControllerClient.GetProcessInstancesReturns(nil, ccv3.Warnings{"some-process-instance-warnings"}, nil) }) @@ -997,7 +996,7 @@ var _ = Describe("Application Actions", func() { BeforeEach(func() { expectedErr = errors.New("some set restart-application error") fakeCloudControllerClient.UpdateApplicationRestartReturns( - ccv3.Application{}, + resources.Application{}, ccv3.Warnings{"restart-application-warning"}, expectedErr, ) diff --git a/actor/v7action/application_with_process_summary_test.go b/actor/v7action/application_with_process_summary_test.go index 77b94f4dab0..5a87aeed5e5 100644 --- a/actor/v7action/application_with_process_summary_test.go +++ b/actor/v7action/application_with_process_summary_test.go @@ -1,6 +1,7 @@ package v7action_test import ( + "code.cloudfoundry.org/cli/resources" "errors" . "code.cloudfoundry.org/cli/actor/v7action" @@ -27,7 +28,7 @@ var _ = Describe("Application with ProcessSummary Actions", func() { When("there are apps", func() { BeforeEach(func() { fakeCloudControllerClient.GetApplicationsReturns( - []ccv3.Application{ + []resources.Application{ { Name: "some-app-name-1", GUID: "some-app-guid-1", @@ -45,7 +46,7 @@ var _ = Describe("Application with ProcessSummary Actions", func() { fakeCloudControllerClient.GetApplicationProcessesReturnsOnCall( 0, - []ccv3.Process{ + []resources.Process{ { GUID: "some-process-guid-1", Type: "some-process-type-1", @@ -60,7 +61,7 @@ var _ = Describe("Application with ProcessSummary Actions", func() { ) fakeCloudControllerClient.GetApplicationProcessesReturnsOnCall( 1, - []ccv3.Process{ + []resources.Process{ { GUID: "some-process-guid-3", Type: "some-process-type-3", @@ -148,7 +149,7 @@ var _ = Describe("Application with ProcessSummary Actions", func() { BeforeEach(func() { fakeCloudControllerClient.GetApplicationsReturns( - []ccv3.Application{ + []resources.Application{ { Name: "some-app-name", GUID: "some-app-guid", @@ -161,7 +162,7 @@ var _ = Describe("Application with ProcessSummary Actions", func() { expectedErr = errors.New("some error") fakeCloudControllerClient.GetApplicationProcessesReturns( - []ccv3.Process{}, + []resources.Process{}, ccv3.Warnings{"some-process-warning"}, expectedErr, ) @@ -179,7 +180,7 @@ var _ = Describe("Application with ProcessSummary Actions", func() { BeforeEach(func() { fakeCloudControllerClient.GetApplicationsReturns( - []ccv3.Application{ + []resources.Application{ { Name: "some-app-name", GUID: "some-app-guid", @@ -191,7 +192,7 @@ var _ = Describe("Application with ProcessSummary Actions", func() { ) fakeCloudControllerClient.GetApplicationProcessesReturns( - []ccv3.Process{ + []resources.Process{ { GUID: "some-process-guid", Type: "some-type", diff --git a/actor/v7action/build.go b/actor/v7action/build.go index 8052b42c76e..b577e00875a 100644 --- a/actor/v7action/build.go +++ b/actor/v7action/build.go @@ -1,6 +1,7 @@ package v7action import ( + "code.cloudfoundry.org/cli/resources" "errors" "time" @@ -25,7 +26,7 @@ func (actor Actor) StagePackage(packageGUID string, appName string) (<-chan Drop defer close(warningsStream) defer close(errorStream) - build := ccv3.Build{PackageGUID: packageGUID} + build := resources.Build{PackageGUID: packageGUID} build, allWarnings, err := actor.CloudControllerClient.CreateBuild(build) warningsStream <- Warnings(allWarnings) @@ -61,7 +62,7 @@ func (actor Actor) StagePackage(packageGUID string, appName string) (<-chan Drop // return // } - ccv3Droplet := ccv3.Droplet{ + ccv3Droplet := resources.Droplet{ GUID: build.DropletGUID, State: constant.DropletState(build.State), CreatedAt: build.CreatedAt, @@ -81,7 +82,7 @@ func (actor Actor) StagePackage(packageGUID string, appName string) (<-chan Drop func (actor Actor) StageApplicationPackage(packageGUID string) (Build, Warnings, error) { var allWarnings Warnings - build := ccv3.Build{PackageGUID: packageGUID} + build := resources.Build{PackageGUID: packageGUID} build, warnings, err := actor.CloudControllerClient.CreateBuild(build) log.Debug("created build") allWarnings = append(allWarnings, warnings...) diff --git a/actor/v7action/build_test.go b/actor/v7action/build_test.go index 11e9b9b7c62..e265bf048e3 100644 --- a/actor/v7action/build_test.go +++ b/actor/v7action/build_test.go @@ -1,6 +1,7 @@ package v7action_test import ( + "code.cloudfoundry.org/cli/resources" "errors" "time" @@ -50,20 +51,20 @@ var _ = Describe("Build Actions", func() { BeforeEach(func() { buildGUID = "some-build-guid" dropletGUID = "some-droplet-guid" - fakeCloudControllerClient.CreateBuildReturns(ccv3.Build{GUID: buildGUID, State: constant.BuildStaging}, ccv3.Warnings{"create-warnings-1", "create-warnings-2"}, nil) + fakeCloudControllerClient.CreateBuildReturns(resources.Build{GUID: buildGUID, State: constant.BuildStaging}, ccv3.Warnings{"create-warnings-1", "create-warnings-2"}, nil) fakeConfig.StagingTimeoutReturns(time.Minute) }) When("the polling is successful", func() { BeforeEach(func() { - fakeCloudControllerClient.GetBuildReturnsOnCall(0, ccv3.Build{GUID: buildGUID, State: constant.BuildStaging}, ccv3.Warnings{"get-warnings-1", "get-warnings-2"}, nil) - fakeCloudControllerClient.GetBuildReturnsOnCall(1, ccv3.Build{CreatedAt: "some-time", GUID: buildGUID, State: constant.BuildStaged, DropletGUID: "some-droplet-guid"}, ccv3.Warnings{"get-warnings-3", "get-warnings-4"}, nil) + fakeCloudControllerClient.GetBuildReturnsOnCall(0, resources.Build{GUID: buildGUID, State: constant.BuildStaging}, ccv3.Warnings{"get-warnings-1", "get-warnings-2"}, nil) + fakeCloudControllerClient.GetBuildReturnsOnCall(1, resources.Build{CreatedAt: "some-time", GUID: buildGUID, State: constant.BuildStaged, DropletGUID: "some-droplet-guid"}, ccv3.Warnings{"get-warnings-3", "get-warnings-4"}, nil) }) //TODO: uncommend after #150569020 // FWhen("looking up the droplet fails", func() { // BeforeEach(func() { - // fakeCloudControllerClient.GetDropletReturns(ccv3.Droplet{}, ccv3.Warnings{"droplet-warnings-1", "droplet-warnings-2"}, errors.New("some-droplet-error")) + // fakeCloudControllerClient.GetDropletReturns(resources.Droplet{}, ccv3.Warnings{"droplet-warnings-1", "droplet-warnings-2"}, errors.New("some-droplet-error")) // }) // It("returns the warnings and the droplet error", func() { @@ -78,7 +79,7 @@ var _ = Describe("Build Actions", func() { // When("looking up the droplet succeeds", func() { // BeforeEach(func() { - // fakeCloudControllerClient.GetDropletReturns(ccv3.Droplet{GUID: dropletGUID, State: ccv3.DropletStateStaged}, ccv3.Warnings{"droplet-warnings-1", "droplet-warnings-2"}, nil) + // fakeCloudControllerClient.GetDropletReturns(resources.Droplet{GUID: dropletGUID, State: resources.DropletStateStaged}, ccv3.Warnings{"droplet-warnings-1", "droplet-warnings-2"}, nil) // }) It("polls until build is finished and returns the final droplet", func() { @@ -91,7 +92,7 @@ var _ = Describe("Build Actions", func() { Consistently(errorStream).ShouldNot(Receive()) Expect(fakeCloudControllerClient.CreateBuildCallCount()).To(Equal(1)) - Expect(fakeCloudControllerClient.CreateBuildArgsForCall(0)).To(Equal(ccv3.Build{ + Expect(fakeCloudControllerClient.CreateBuildArgsForCall(0)).To(Equal(resources.Build{ PackageGUID: "some-package-guid", })) @@ -107,7 +108,7 @@ var _ = Describe("Build Actions", func() { BeforeEach(func() { fakeCloudControllerClient.GetBuildReturnsOnCall( 1, - ccv3.Build{ + resources.Build{ GUID: buildGUID, State: constant.BuildFailed, Error: "some staging error", @@ -151,8 +152,8 @@ var _ = Describe("Build Actions", func() { BeforeEach(func() { expectedErr = errors.New("I am a banana") - fakeCloudControllerClient.GetBuildReturnsOnCall(0, ccv3.Build{GUID: buildGUID, State: constant.BuildStaging}, ccv3.Warnings{"get-warnings-1", "get-warnings-2"}, nil) - fakeCloudControllerClient.GetBuildReturnsOnCall(1, ccv3.Build{}, ccv3.Warnings{"get-warnings-3", "get-warnings-4"}, expectedErr) + fakeCloudControllerClient.GetBuildReturnsOnCall(0, resources.Build{GUID: buildGUID, State: constant.BuildStaging}, ccv3.Warnings{"get-warnings-1", "get-warnings-2"}, nil) + fakeCloudControllerClient.GetBuildReturnsOnCall(1, resources.Build{}, ccv3.Warnings{"get-warnings-3", "get-warnings-4"}, expectedErr) }) It("returns the error and warnings", func() { @@ -168,7 +169,7 @@ var _ = Describe("Build Actions", func() { var expectedErr error BeforeEach(func() { expectedErr = errors.New("I am a banana") - fakeCloudControllerClient.CreateBuildReturns(ccv3.Build{}, ccv3.Warnings{"create-warnings-1", "create-warnings-2"}, expectedErr) + fakeCloudControllerClient.CreateBuildReturns(resources.Build{}, ccv3.Warnings{"create-warnings-1", "create-warnings-2"}, expectedErr) }) It("returns the error and warnings", func() { @@ -191,7 +192,7 @@ var _ = Describe("Build Actions", func() { When("the creation is successful", func() { BeforeEach(func() { - fakeCloudControllerClient.CreateBuildReturns(ccv3.Build{GUID: "some-build-guid"}, ccv3.Warnings{"create-warnings-1", "create-warnings-2"}, nil) + fakeCloudControllerClient.CreateBuildReturns(resources.Build{GUID: "some-build-guid"}, ccv3.Warnings{"create-warnings-1", "create-warnings-2"}, nil) }) It("returns the build and warnings", func() { @@ -203,7 +204,7 @@ var _ = Describe("Build Actions", func() { When("the creation fails", func() { BeforeEach(func() { - fakeCloudControllerClient.CreateBuildReturns(ccv3.Build{}, ccv3.Warnings{"create-warnings-1", "create-warnings-2"}, errors.New("blurp")) + fakeCloudControllerClient.CreateBuildReturns(resources.Build{}, ccv3.Warnings{"create-warnings-1", "create-warnings-2"}, errors.New("blurp")) }) It("returns the error and warnings", func() { @@ -226,8 +227,8 @@ var _ = Describe("Build Actions", func() { When("getting the build yields a 'Staged' build", func() { BeforeEach(func() { - fakeCloudControllerClient.GetBuildReturnsOnCall(0, ccv3.Build{State: constant.BuildStaging}, ccv3.Warnings{"some-get-build-warnings"}, nil) - fakeCloudControllerClient.GetBuildReturnsOnCall(1, ccv3.Build{GUID: "some-build-guid", DropletGUID: "some-droplet-guid", State: constant.BuildStaged}, ccv3.Warnings{"some-get-build-warnings"}, nil) + fakeCloudControllerClient.GetBuildReturnsOnCall(0, resources.Build{State: constant.BuildStaging}, ccv3.Warnings{"some-get-build-warnings"}, nil) + fakeCloudControllerClient.GetBuildReturnsOnCall(1, resources.Build{GUID: "some-build-guid", DropletGUID: "some-droplet-guid", State: constant.BuildStaged}, ccv3.Warnings{"some-get-build-warnings"}, nil) fakeConfig.StagingTimeoutReturns(500 * time.Millisecond) }) @@ -240,7 +241,7 @@ var _ = Describe("Build Actions", func() { When("getting the droplet is successful", func() { BeforeEach(func() { - fakeCloudControllerClient.GetDropletReturns(ccv3.Droplet{GUID: "some-droplet-guid", CreatedAt: "some-droplet-time", State: constant.DropletStaged}, ccv3.Warnings{"some-get-droplet-warnings"}, nil) + fakeCloudControllerClient.GetDropletReturns(resources.Droplet{GUID: "some-droplet-guid", CreatedAt: "some-droplet-time", State: constant.DropletStaged}, ccv3.Warnings{"some-get-droplet-warnings"}, nil) }) It("returns the droplet and warnings", func() { @@ -257,7 +258,7 @@ var _ = Describe("Build Actions", func() { When("getting the droplet fails", func() { BeforeEach(func() { - fakeCloudControllerClient.GetDropletReturns(ccv3.Droplet{}, ccv3.Warnings{"some-get-droplet-warnings"}, errors.New("no rain")) + fakeCloudControllerClient.GetDropletReturns(resources.Droplet{}, ccv3.Warnings{"some-get-droplet-warnings"}, errors.New("no rain")) }) It("returns the error and warnings", func() { @@ -269,7 +270,7 @@ var _ = Describe("Build Actions", func() { When("getting the build yields a 'Failed' build", func() { BeforeEach(func() { - fakeCloudControllerClient.GetBuildReturnsOnCall(0, ccv3.Build{State: constant.BuildFailed, Error: "ded build"}, ccv3.Warnings{"some-get-build-warnings"}, nil) + fakeCloudControllerClient.GetBuildReturnsOnCall(0, resources.Build{State: constant.BuildFailed, Error: "ded build"}, ccv3.Warnings{"some-get-build-warnings"}, nil) fakeConfig.StagingTimeoutReturns(500 * time.Millisecond) }) @@ -281,7 +282,7 @@ var _ = Describe("Build Actions", func() { When("getting the build fails", func() { BeforeEach(func() { - fakeCloudControllerClient.GetBuildReturnsOnCall(0, ccv3.Build{}, ccv3.Warnings{"some-get-build-warnings"}, errors.New("some-poll-build-error")) + fakeCloudControllerClient.GetBuildReturnsOnCall(0, resources.Build{}, ccv3.Warnings{"some-get-build-warnings"}, errors.New("some-poll-build-error")) fakeConfig.StagingTimeoutReturns(500 * time.Millisecond) }) @@ -293,7 +294,7 @@ var _ = Describe("Build Actions", func() { When("polling the build times out", func() { BeforeEach(func() { - fakeCloudControllerClient.GetBuildReturnsOnCall(0, ccv3.Build{}, ccv3.Warnings{"some-get-build-warnings"}, nil) + fakeCloudControllerClient.GetBuildReturnsOnCall(0, resources.Build{}, ccv3.Warnings{"some-get-build-warnings"}, nil) fakeConfig.StagingTimeoutReturns(500 * time.Millisecond) }) diff --git a/actor/v7action/buildpack.go b/actor/v7action/buildpack.go index 661d92cfa01..2e77e874969 100644 --- a/actor/v7action/buildpack.go +++ b/actor/v7action/buildpack.go @@ -2,6 +2,7 @@ package v7action import ( "archive/zip" + "code.cloudfoundry.org/cli/resources" "io" "os" "path/filepath" @@ -12,7 +13,7 @@ import ( "code.cloudfoundry.org/cli/util" ) -type Buildpack ccv3.Buildpack +type Buildpack resources.Buildpack type JobURL ccv3.JobURL //go:generate counterfeiter . Downloader @@ -41,7 +42,7 @@ func (actor Actor) GetBuildpacks() ([]Buildpack, Warnings, error) { // present. func (actor Actor) GetBuildpackByNameAndStack(buildpackName string, buildpackStack string) (Buildpack, Warnings, error) { var ( - ccv3Buildpacks []ccv3.Buildpack + ccv3Buildpacks []resources.Buildpack warnings ccv3.Warnings err error ) @@ -86,7 +87,7 @@ func (actor Actor) GetBuildpackByNameAndStack(buildpackName string, buildpackSta func (actor Actor) CreateBuildpack(buildpack Buildpack) (Buildpack, Warnings, error) { ccv3Buildpack, warnings, err := actor.CloudControllerClient.CreateBuildpack( - ccv3.Buildpack(buildpack), + resources.Buildpack(buildpack), ) return Buildpack(ccv3Buildpack), Warnings(warnings), err @@ -103,7 +104,7 @@ func (actor Actor) UpdateBuildpackByNameAndStack(buildpackName string, buildpack buildpack.GUID = foundBuildpack.GUID - updatedBuildpack, updateWarnings, err := actor.CloudControllerClient.UpdateBuildpack(ccv3.Buildpack(buildpack)) + updatedBuildpack, updateWarnings, err := actor.CloudControllerClient.UpdateBuildpack(resources.Buildpack(buildpack)) warnings = append(warnings, updateWarnings...) if err != nil { return Buildpack{}, warnings, err diff --git a/actor/v7action/buildpack_test.go b/actor/v7action/buildpack_test.go index 1bb4f6c18ed..faa977ebb31 100644 --- a/actor/v7action/buildpack_test.go +++ b/actor/v7action/buildpack_test.go @@ -6,6 +6,7 @@ import ( "code.cloudfoundry.org/cli/actor/v7action/v7actionfakes" "code.cloudfoundry.org/cli/api/cloudcontroller/ccerror" "code.cloudfoundry.org/cli/api/cloudcontroller/ccv3" + "code.cloudfoundry.org/cli/resources" "code.cloudfoundry.org/cli/types" "errors" . "github.com/onsi/ginkgo" @@ -70,7 +71,7 @@ var _ = Describe("Buildpack", func() { When("multiple buildpacks with stacks are returned", func() { BeforeEach(func() { - ccBuildpacks := []ccv3.Buildpack{ + ccBuildpacks := []resources.Buildpack{ {Name: buildpackName, Stack: "a-real-stack", Position: types.NullInt{Value: 1, IsSet: true}}, {Name: buildpackName, Stack: "another-stack", Position: types.NullInt{Value: 2, IsSet: true}}, } @@ -90,7 +91,7 @@ var _ = Describe("Buildpack", func() { When("multiple buildpacks including one with no stack are returned", func() { BeforeEach(func() { - ccBuildpacks := []ccv3.Buildpack{ + ccBuildpacks := []resources.Buildpack{ {GUID: "buildpack-1-guid", Name: "buildpack-1", Stack: "a-real-stack", Position: types.NullInt{Value: 1, IsSet: true}}, {GUID: "buildpack-2-guid", Name: "buildpack-2", Stack: "", Position: types.NullInt{Value: 2, IsSet: true}}, } @@ -110,7 +111,7 @@ var _ = Describe("Buildpack", func() { When("zero buildpacks are returned", func() { BeforeEach(func() { - var ccBuildpacks []ccv3.Buildpack + var ccBuildpacks []resources.Buildpack fakeCloudControllerClient.GetBuildpacksReturns( ccBuildpacks, @@ -130,9 +131,9 @@ var _ = Describe("Buildpack", func() { buildpackStack = "" buildpackName = "my-buildpack" - ccBuildpack := ccv3.Buildpack{Name: "my-buildpack", GUID: "some-guid"} + ccBuildpack := resources.Buildpack{Name: "my-buildpack", GUID: "some-guid"} fakeCloudControllerClient.GetBuildpacksReturns( - []ccv3.Buildpack{ccBuildpack}, + []resources.Buildpack{ccBuildpack}, ccv3.Warnings{"some-warning-1", "some-warning-2"}, nil) }) @@ -160,9 +161,9 @@ var _ = Describe("Buildpack", func() { buildpackStack = "good-stack" buildpackName = "my-buildpack" - ccBuildpack := ccv3.Buildpack{Name: "my-buildpack", GUID: "some-guid", Stack: "good-stack"} + ccBuildpack := resources.Buildpack{Name: "my-buildpack", GUID: "some-guid", Stack: "good-stack"} fakeCloudControllerClient.GetBuildpacksReturns( - []ccv3.Buildpack{ccBuildpack}, + []resources.Buildpack{ccBuildpack}, ccv3.Warnings{"some-warning-1", "some-warning-2"}, nil) }) @@ -218,7 +219,7 @@ var _ = Describe("Buildpack", func() { When("getting buildpacks is successful", func() { BeforeEach(func() { - ccBuildpacks := []ccv3.Buildpack{ + ccBuildpacks := []resources.Buildpack{ {Name: "buildpack-1", Position: types.NullInt{Value: 1, IsSet: true}}, {Name: "buildpack-2", Position: types.NullInt{Value: 2, IsSet: true}}, } @@ -261,7 +262,7 @@ var _ = Describe("Buildpack", func() { When("creating a buildpack fails", func() { BeforeEach(func() { fakeCloudControllerClient.CreateBuildpackReturns( - ccv3.Buildpack{}, + resources.Buildpack{}, ccv3.Warnings{"some-warning-1", "some-warning-2"}, errors.New("some-error")) }) @@ -279,7 +280,7 @@ var _ = Describe("Buildpack", func() { bp = Buildpack{Name: "some-name", Stack: "some-stack"} returnBuildpack = Buildpack{GUID: "some-guid", Name: "some-name", Stack: "some-stack"} fakeCloudControllerClient.CreateBuildpackReturns( - ccv3.Buildpack(returnBuildpack), + resources.Buildpack(returnBuildpack), ccv3.Warnings{"some-warning-1", "some-warning-2"}, nil) }) @@ -290,7 +291,7 @@ var _ = Describe("Buildpack", func() { Expect(buildpack).To(Equal(returnBuildpack)) Expect(fakeCloudControllerClient.CreateBuildpackCallCount()).To(Equal(1)) - Expect(fakeCloudControllerClient.CreateBuildpackArgsForCall(0)).To(Equal(ccv3.Buildpack(bp))) + Expect(fakeCloudControllerClient.CreateBuildpackArgsForCall(0)).To(Equal(resources.Buildpack(bp))) }) }) }) @@ -315,10 +316,10 @@ var _ = Describe("Buildpack", func() { When("it is successful", func() { var updatedBuildpack Buildpack BeforeEach(func() { - foundBuildpack := ccv3.Buildpack{GUID: "a guid", Stack: ""} + foundBuildpack := resources.Buildpack{GUID: "a guid", Stack: ""} updatedBuildpack = Buildpack{GUID: "a guid", Stack: "new-stack"} - fakeCloudControllerClient.GetBuildpacksReturns([]ccv3.Buildpack{foundBuildpack}, ccv3.Warnings{"warning-1"}, nil) - fakeCloudControllerClient.UpdateBuildpackReturns(ccv3.Buildpack(updatedBuildpack), ccv3.Warnings{"warning-2"}, nil) + fakeCloudControllerClient.GetBuildpacksReturns([]resources.Buildpack{foundBuildpack}, ccv3.Warnings{"warning-1"}, nil) + fakeCloudControllerClient.UpdateBuildpackReturns(resources.Buildpack(updatedBuildpack), ccv3.Warnings{"warning-2"}, nil) }) It("returns the updated buildpack and warnings", func() { @@ -339,7 +340,7 @@ var _ = Describe("Buildpack", func() { )) paramBuildpack := fakeCloudControllerClient.UpdateBuildpackArgsForCall(0) - Expect(paramBuildpack).To(Equal(ccv3.Buildpack{ + Expect(paramBuildpack).To(Equal(resources.Buildpack{ GUID: "a guid", Stack: "new-stack", })) @@ -348,7 +349,7 @@ var _ = Describe("Buildpack", func() { When("The get fails", func() { BeforeEach(func() { - fakeCloudControllerClient.GetBuildpacksReturns([]ccv3.Buildpack{}, ccv3.Warnings{"warning-1"}, errors.New("whoops")) + fakeCloudControllerClient.GetBuildpacksReturns([]resources.Buildpack{}, ccv3.Warnings{"warning-1"}, errors.New("whoops")) }) It("returns the error and warnings", func() { @@ -360,9 +361,9 @@ var _ = Describe("Buildpack", func() { When("The update fails", func() { BeforeEach(func() { - ccBuildpack := ccv3.Buildpack{GUID: "a guid", Stack: "old-stack"} - fakeCloudControllerClient.GetBuildpacksReturns([]ccv3.Buildpack{ccBuildpack}, ccv3.Warnings{"warning-1"}, nil) - fakeCloudControllerClient.UpdateBuildpackReturns(ccv3.Buildpack{}, ccv3.Warnings{"warning-2"}, errors.New("whoops")) + ccBuildpack := resources.Buildpack{GUID: "a guid", Stack: "old-stack"} + fakeCloudControllerClient.GetBuildpacksReturns([]resources.Buildpack{ccBuildpack}, ccv3.Warnings{"warning-1"}, nil) + fakeCloudControllerClient.UpdateBuildpackReturns(resources.Buildpack{}, ccv3.Warnings{"warning-2"}, errors.New("whoops")) }) It("returns the error and warnings", func() { @@ -627,7 +628,7 @@ var _ = Describe("Buildpack", func() { When("getting the buildpack fails", func() { BeforeEach(func() { fakeCloudControllerClient.GetBuildpacksReturns( - []ccv3.Buildpack{}, + []resources.Buildpack{}, ccv3.Warnings{"some-warning-1", "some-warning-2"}, errors.New("api-get-error")) }) @@ -652,7 +653,7 @@ var _ = Describe("Buildpack", func() { When("getting the buildpack succeeds", func() { BeforeEach(func() { fakeCloudControllerClient.GetBuildpacksReturns( - []ccv3.Buildpack{{GUID: buildpackGUID, Name: buildpackName, Stack: buildpackStack}}, + []resources.Buildpack{{GUID: buildpackGUID, Name: buildpackName, Stack: buildpackStack}}, ccv3.Warnings{"some-warning-1", "some-warning-2"}, nil) }) diff --git a/actor/v7action/cloud_controller_client.go b/actor/v7action/cloud_controller_client.go index 70c7040110a..1f251fade14 100644 --- a/actor/v7action/cloud_controller_client.go +++ b/actor/v7action/cloud_controller_client.go @@ -1,6 +1,7 @@ package v7action import ( + "code.cloudfoundry.org/cli/resources" "io" "code.cloudfoundry.org/cli/api/cloudcontroller/ccv3" @@ -13,14 +14,14 @@ type CloudControllerClient interface { AppSSHEndpoint() string AppSSHHostKeyFingerprint() string CloudControllerAPIVersion() string - CreateApplication(app ccv3.Application) (ccv3.Application, ccv3.Warnings, error) - CreateApplicationProcessScale(appGUID string, process ccv3.Process) (ccv3.Process, ccv3.Warnings, error) - CreateApplicationTask(appGUID string, task ccv3.Task) (ccv3.Task, ccv3.Warnings, error) - CreateBuild(build ccv3.Build) (ccv3.Build, ccv3.Warnings, error) - CreateBuildpack(bp ccv3.Buildpack) (ccv3.Buildpack, ccv3.Warnings, error) - CreateDomain(domain ccv3.Domain) (ccv3.Domain, ccv3.Warnings, error) - CreateIsolationSegment(isolationSegment ccv3.IsolationSegment) (ccv3.IsolationSegment, ccv3.Warnings, error) - CreatePackage(pkg ccv3.Package) (ccv3.Package, ccv3.Warnings, error) + CreateApplication(app resources.Application) (resources.Application, ccv3.Warnings, error) + CreateApplicationProcessScale(appGUID string, process resources.Process) (resources.Process, ccv3.Warnings, error) + CreateApplicationTask(appGUID string, task resources.Task) (resources.Task, ccv3.Warnings, error) + CreateBuild(build resources.Build) (resources.Build, ccv3.Warnings, error) + CreateBuildpack(bp resources.Buildpack) (resources.Buildpack, ccv3.Warnings, error) + CreateDomain(domain resources.Domain) (resources.Domain, ccv3.Warnings, error) + CreateIsolationSegment(isolationSegment resources.IsolationSegment) (resources.IsolationSegment, ccv3.Warnings, error) + CreatePackage(pkg resources.Package) (resources.Package, ccv3.Warnings, error) DeleteApplication(guid string) (ccv3.JobURL, ccv3.Warnings, error) DeleteApplicationProcessInstance(appGUID string, processType string, instanceIndex int) (ccv3.Warnings, error) DeleteBuildpack(buildpackGUID string) (ccv3.JobURL, ccv3.Warnings, error) @@ -28,55 +29,55 @@ type CloudControllerClient interface { DeleteIsolationSegment(guid string) (ccv3.Warnings, error) DeleteIsolationSegmentOrganization(isolationSegmentGUID string, organizationGUID string) (ccv3.Warnings, error) DeleteServiceInstanceRelationshipsSharedSpace(serviceInstanceGUID string, sharedToSpaceGUID string) (ccv3.Warnings, error) - EntitleIsolationSegmentToOrganizations(isoGUID string, orgGUIDs []string) (ccv3.RelationshipList, ccv3.Warnings, error) - GetApplicationDropletCurrent(appGUID string) (ccv3.Droplet, ccv3.Warnings, error) + EntitleIsolationSegmentToOrganizations(isoGUID string, orgGUIDs []string) (resources.RelationshipList, ccv3.Warnings, error) + GetApplicationDropletCurrent(appGUID string) (resources.Droplet, ccv3.Warnings, error) GetApplicationEnvironment(appGUID string) (ccv3.Environment, ccv3.Warnings, error) GetApplicationManifest(appGUID string) ([]byte, ccv3.Warnings, error) - GetApplicationProcessByType(appGUID string, processType string) (ccv3.Process, ccv3.Warnings, error) - GetApplicationProcesses(appGUID string) ([]ccv3.Process, ccv3.Warnings, error) - GetApplications(query ...ccv3.Query) ([]ccv3.Application, ccv3.Warnings, error) - GetApplicationTasks(appGUID string, query ...ccv3.Query) ([]ccv3.Task, ccv3.Warnings, error) - GetBuild(guid string) (ccv3.Build, ccv3.Warnings, error) - GetBuildpacks(query ...ccv3.Query) ([]ccv3.Buildpack, ccv3.Warnings, error) - GetDomains(query ...ccv3.Query) ([]ccv3.Domain, ccv3.Warnings, error) - GetDroplet(guid string) (ccv3.Droplet, ccv3.Warnings, error) - GetDroplets(query ...ccv3.Query) ([]ccv3.Droplet, ccv3.Warnings, error) - GetFeatureFlag(featureFlagName string) (ccv3.FeatureFlag, ccv3.Warnings, error) - GetFeatureFlags() ([]ccv3.FeatureFlag, ccv3.Warnings, error) - GetIsolationSegment(guid string) (ccv3.IsolationSegment, ccv3.Warnings, error) - GetIsolationSegmentOrganizations(isolationSegmentGUID string) ([]ccv3.Organization, ccv3.Warnings, error) - GetIsolationSegments(query ...ccv3.Query) ([]ccv3.IsolationSegment, ccv3.Warnings, error) - GetOrganizationDefaultIsolationSegment(orgGUID string) (ccv3.Relationship, ccv3.Warnings, error) - GetOrganizationDomains(orgGUID string, query ...ccv3.Query) ([]ccv3.Domain, ccv3.Warnings, error) - GetOrganizations(query ...ccv3.Query) ([]ccv3.Organization, ccv3.Warnings, error) - GetPackage(guid string) (ccv3.Package, ccv3.Warnings, error) - GetPackages(query ...ccv3.Query) ([]ccv3.Package, ccv3.Warnings, error) + GetApplicationProcessByType(appGUID string, processType string) (resources.Process, ccv3.Warnings, error) + GetApplicationProcesses(appGUID string) ([]resources.Process, ccv3.Warnings, error) + GetApplications(query ...ccv3.Query) ([]resources.Application, ccv3.Warnings, error) + GetApplicationTasks(appGUID string, query ...ccv3.Query) ([]resources.Task, ccv3.Warnings, error) + GetBuild(guid string) (resources.Build, ccv3.Warnings, error) + GetBuildpacks(query ...ccv3.Query) ([]resources.Buildpack, ccv3.Warnings, error) + GetDomains(query ...ccv3.Query) ([]resources.Domain, ccv3.Warnings, error) + GetDroplet(guid string) (resources.Droplet, ccv3.Warnings, error) + GetDroplets(query ...ccv3.Query) ([]resources.Droplet, ccv3.Warnings, error) + GetFeatureFlag(featureFlagName string) (resources.FeatureFlag, ccv3.Warnings, error) + GetFeatureFlags() ([]resources.FeatureFlag, ccv3.Warnings, error) + GetIsolationSegment(guid string) (resources.IsolationSegment, ccv3.Warnings, error) + GetIsolationSegmentOrganizations(isolationSegmentGUID string) ([]resources.Organization, ccv3.Warnings, error) + GetIsolationSegments(query ...ccv3.Query) ([]resources.IsolationSegment, ccv3.Warnings, error) + GetOrganizationDefaultIsolationSegment(orgGUID string) (resources.Relationship, ccv3.Warnings, error) + GetOrganizationDomains(orgGUID string, query ...ccv3.Query) ([]resources.Domain, ccv3.Warnings, error) + GetOrganizations(query ...ccv3.Query) ([]resources.Organization, ccv3.Warnings, error) + GetPackage(guid string) (resources.Package, ccv3.Warnings, error) + GetPackages(query ...ccv3.Query) ([]resources.Package, ccv3.Warnings, error) GetProcessInstances(processGUID string) ([]ccv3.ProcessInstance, ccv3.Warnings, error) - GetServiceInstances(query ...ccv3.Query) ([]ccv3.ServiceInstance, ccv3.Warnings, error) - GetSpaceIsolationSegment(spaceGUID string) (ccv3.Relationship, ccv3.Warnings, error) - GetSpaces(query ...ccv3.Query) ([]ccv3.Space, ccv3.Warnings, error) - GetStacks(query ...ccv3.Query) ([]ccv3.Stack, ccv3.Warnings, error) + GetServiceInstances(query ...ccv3.Query) ([]resources.ServiceInstance, ccv3.Warnings, error) + GetSpaceIsolationSegment(spaceGUID string) (resources.Relationship, ccv3.Warnings, error) + GetSpaces(query ...ccv3.Query) ([]resources.Space, ccv3.Warnings, error) + GetStacks(query ...ccv3.Query) ([]resources.Stack, ccv3.Warnings, error) PollJob(jobURL ccv3.JobURL) (ccv3.Warnings, error) ResourceMatch(resources []ccv3.Resource) ([]ccv3.Resource, ccv3.Warnings, error) - SetApplicationDroplet(appGUID string, dropletGUID string) (ccv3.Relationship, ccv3.Warnings, error) + SetApplicationDroplet(appGUID string, dropletGUID string) (resources.Relationship, ccv3.Warnings, error) SharePrivateDomainToOrgs(domainGuid string, sharedOrgs ccv3.SharedOrgs) (ccv3.Warnings, error) - ShareServiceInstanceToSpaces(serviceInstanceGUID string, spaceGUIDs []string) (ccv3.RelationshipList, ccv3.Warnings, error) + ShareServiceInstanceToSpaces(serviceInstanceGUID string, spaceGUIDs []string) (resources.RelationshipList, ccv3.Warnings, error) UnsharePrivateDomainFromOrg(domainGUID string, sharedOrgGUID string) (ccv3.Warnings, error) - UpdateApplication(app ccv3.Application) (ccv3.Application, ccv3.Warnings, error) + UpdateApplication(app resources.Application) (resources.Application, ccv3.Warnings, error) UpdateApplicationApplyManifest(appGUID string, rawManifest []byte) (ccv3.JobURL, ccv3.Warnings, error) - UpdateApplicationEnvironmentVariables(appGUID string, envVars ccv3.EnvironmentVariables) (ccv3.EnvironmentVariables, ccv3.Warnings, error) - UpdateApplicationRestart(appGUID string) (ccv3.Application, ccv3.Warnings, error) - UpdateApplicationStart(appGUID string) (ccv3.Application, ccv3.Warnings, error) - UpdateApplicationStop(appGUID string) (ccv3.Application, ccv3.Warnings, error) - UpdateBuildpack(buildpack ccv3.Buildpack) (ccv3.Buildpack, ccv3.Warnings, error) - UpdateFeatureFlag(flag ccv3.FeatureFlag) (ccv3.FeatureFlag, ccv3.Warnings, error) - UpdateOrganization(org ccv3.Organization) (ccv3.Organization, ccv3.Warnings, error) - UpdateOrganizationDefaultIsolationSegmentRelationship(orgGUID string, isolationSegmentGUID string) (ccv3.Relationship, ccv3.Warnings, error) - UpdateProcess(process ccv3.Process) (ccv3.Process, ccv3.Warnings, error) + UpdateApplicationEnvironmentVariables(appGUID string, envVars resources.EnvironmentVariables) (resources.EnvironmentVariables, ccv3.Warnings, error) + UpdateApplicationRestart(appGUID string) (resources.Application, ccv3.Warnings, error) + UpdateApplicationStart(appGUID string) (resources.Application, ccv3.Warnings, error) + UpdateApplicationStop(appGUID string) (resources.Application, ccv3.Warnings, error) + UpdateBuildpack(buildpack resources.Buildpack) (resources.Buildpack, ccv3.Warnings, error) + UpdateFeatureFlag(flag resources.FeatureFlag) (resources.FeatureFlag, ccv3.Warnings, error) + UpdateOrganization(org resources.Organization) (resources.Organization, ccv3.Warnings, error) + UpdateOrganizationDefaultIsolationSegmentRelationship(orgGUID string, isolationSegmentGUID string) (resources.Relationship, ccv3.Warnings, error) + UpdateProcess(process resources.Process) (resources.Process, ccv3.Warnings, error) UpdateSpaceApplyManifest(spaceGUID string, rawManifest []byte, query ...ccv3.Query) (ccv3.JobURL, ccv3.Warnings, error) - UpdateSpaceIsolationSegmentRelationship(spaceGUID string, isolationSegmentGUID string) (ccv3.Relationship, ccv3.Warnings, error) - UpdateTaskCancel(taskGUID string) (ccv3.Task, ccv3.Warnings, error) - UploadBitsPackage(pkg ccv3.Package, matchedResources []ccv3.Resource, newResources io.Reader, newResourcesLength int64) (ccv3.Package, ccv3.Warnings, error) + UpdateSpaceIsolationSegmentRelationship(spaceGUID string, isolationSegmentGUID string) (resources.Relationship, ccv3.Warnings, error) + UpdateTaskCancel(taskGUID string) (resources.Task, ccv3.Warnings, error) + UploadBitsPackage(pkg resources.Package, matchedResources []ccv3.Resource, newResources io.Reader, newResourcesLength int64) (resources.Package, ccv3.Warnings, error) UploadBuildpack(buildpackGUID string, buildpackPath string, buildpack io.Reader, buildpackLength int64) (ccv3.JobURL, ccv3.Warnings, error) - UploadPackage(pkg ccv3.Package, zipFilepath string) (ccv3.Package, ccv3.Warnings, error) + UploadPackage(pkg resources.Package, zipFilepath string) (resources.Package, ccv3.Warnings, error) } diff --git a/actor/v7action/domain.go b/actor/v7action/domain.go index ffbd6922cd6..e3eb942524b 100644 --- a/actor/v7action/domain.go +++ b/actor/v7action/domain.go @@ -1,6 +1,7 @@ package v7action import ( + "code.cloudfoundry.org/cli/resources" "fmt" "code.cloudfoundry.org/cli/actor/actionerror" @@ -8,7 +9,7 @@ import ( "code.cloudfoundry.org/cli/types" ) -type Domain ccv3.Domain +type Domain resources.Domain type SharedOrgs ccv3.SharedOrgs @@ -17,7 +18,7 @@ func (domain Domain) Shared() bool { } func (actor Actor) CreateSharedDomain(domainName string, internal bool) (Warnings, error) { - _, warnings, err := actor.CloudControllerClient.CreateDomain(ccv3.Domain{ + _, warnings, err := actor.CloudControllerClient.CreateDomain(resources.Domain{ Name: domainName, Internal: types.NullBool{IsSet: true, Value: internal}, }) @@ -32,7 +33,7 @@ func (actor Actor) CreatePrivateDomain(domainName string, orgName string) (Warni if err != nil { return allWarnings, err } - _, apiWarnings, err := actor.CloudControllerClient.CreateDomain(ccv3.Domain{ + _, apiWarnings, err := actor.CloudControllerClient.CreateDomain(resources.Domain{ Name: domainName, OrganizationGUID: organization.GUID, }) diff --git a/actor/v7action/domain_test.go b/actor/v7action/domain_test.go index 6067b1307ea..95918898ce4 100644 --- a/actor/v7action/domain_test.go +++ b/actor/v7action/domain_test.go @@ -1,6 +1,7 @@ package v7action_test import ( + "code.cloudfoundry.org/cli/resources" "errors" . "code.cloudfoundry.org/cli/actor/v7action" @@ -23,7 +24,7 @@ var _ = Describe("Domain Actions", func() { Describe("create shared domain", func() { It("delegates to the cloud controller client", func() { - fakeCloudControllerClient.CreateDomainReturns(ccv3.Domain{}, ccv3.Warnings{"create-warning-1", "create-warning-2"}, errors.New("create-error")) + fakeCloudControllerClient.CreateDomainReturns(resources.Domain{}, ccv3.Warnings{"create-warning-1", "create-warning-2"}, errors.New("create-error")) warnings, executeErr := actor.CreateSharedDomain("the-domain-name", true) Expect(executeErr).To(MatchError("create-error")) @@ -33,7 +34,7 @@ var _ = Describe("Domain Actions", func() { passedDomain := fakeCloudControllerClient.CreateDomainArgsForCall(0) Expect(passedDomain).To(Equal( - ccv3.Domain{ + resources.Domain{ Name: "the-domain-name", Internal: types.NullBool{IsSet: true, Value: true}, }, @@ -45,7 +46,7 @@ var _ = Describe("Domain Actions", func() { BeforeEach(func() { fakeCloudControllerClient.GetOrganizationsReturns( - []ccv3.Organization{ + []resources.Organization{ {GUID: "org-guid"}, }, ccv3.Warnings{"get-orgs-warning"}, @@ -53,7 +54,7 @@ var _ = Describe("Domain Actions", func() { ) fakeCloudControllerClient.CreateDomainReturns( - ccv3.Domain{}, + resources.Domain{}, ccv3.Warnings{"create-warning-1", "create-warning-2"}, errors.New("create-error"), ) @@ -68,7 +69,7 @@ var _ = Describe("Domain Actions", func() { passedDomain := fakeCloudControllerClient.CreateDomainArgsForCall(0) Expect(passedDomain).To(Equal( - ccv3.Domain{ + resources.Domain{ Name: "private-domain-name", OrganizationGUID: "org-guid", }, @@ -80,7 +81,7 @@ var _ = Describe("Domain Actions", func() { When("attempting to delete a shared domain", func() { BeforeEach(func() { fakeCloudControllerClient.GetDomainsReturns( - []ccv3.Domain{ + []resources.Domain{ {Name: "the-domain.com", GUID: "shared-domain-guid"}, }, ccv3.Warnings{"get-domains-warning"}, @@ -99,7 +100,7 @@ var _ = Describe("Domain Actions", func() { Describe("delete shared domain", func() { BeforeEach(func() { fakeCloudControllerClient.GetDomainsReturns( - []ccv3.Domain{ + []resources.Domain{ {Name: "the-domain.com", GUID: "domain-guid"}, }, ccv3.Warnings{"get-domains-warning"}, @@ -125,7 +126,7 @@ var _ = Describe("Domain Actions", func() { When("deleting a private domain", func() { BeforeEach(func() { fakeCloudControllerClient.GetDomainsReturns( - []ccv3.Domain{ + []resources.Domain{ {Name: "the-domain.com", OrganizationGUID: "org-guid", GUID: "private-domain-guid"}, }, ccv3.Warnings{"get-domains-warning"}, @@ -151,7 +152,7 @@ var _ = Describe("Domain Actions", func() { Describe("list domains for org", func() { var ( - ccv3Domains []ccv3.Domain + ccv3Domains []resources.Domain domains []Domain domain1Name string @@ -170,7 +171,7 @@ var _ = Describe("Domain Actions", func() { ) BeforeEach(func() { - ccv3Domains = []ccv3.Domain{ + ccv3Domains = []resources.Domain{ {Name: domain1Name, GUID: domain1Guid, OrganizationGUID: org1Guid}, {Name: domain2Name, GUID: domain2Guid, OrganizationGUID: org1Guid}, {Name: domain3Name, GUID: domain3Guid, OrganizationGUID: sharedFromOrgGuid}, @@ -213,7 +214,7 @@ var _ = Describe("Domain Actions", func() { When("when the API layer call returns an error", func() { BeforeEach(func() { fakeCloudControllerClient.GetOrganizationDomainsReturns( - []ccv3.Domain{}, + []resources.Domain{}, ccv3.Warnings{"some-domain-warning"}, errors.New("list-error"), ) @@ -232,7 +233,7 @@ var _ = Describe("Domain Actions", func() { Describe("get domain by name", func() { var ( - ccv3Domains []ccv3.Domain + ccv3Domains []resources.Domain domain Domain domain1Name string @@ -243,7 +244,7 @@ var _ = Describe("Domain Actions", func() { ) BeforeEach(func() { - ccv3Domains = []ccv3.Domain{ + ccv3Domains = []resources.Domain{ {Name: domain1Name, GUID: domain1Guid}, } }) @@ -280,7 +281,7 @@ var _ = Describe("Domain Actions", func() { When("when the API layer call returns an error", func() { BeforeEach(func() { fakeCloudControllerClient.GetDomainsReturns( - []ccv3.Domain{}, + []resources.Domain{}, ccv3.Warnings{"some-domain-warning"}, errors.New("list-error"), ) @@ -299,7 +300,7 @@ var _ = Describe("Domain Actions", func() { Describe("share private domain to org", func() { BeforeEach(func() { fakeCloudControllerClient.GetOrganizationsReturns( - []ccv3.Organization{ + []resources.Organization{ {GUID: "org-guid"}, }, ccv3.Warnings{"get-orgs-warning"}, @@ -307,7 +308,7 @@ var _ = Describe("Domain Actions", func() { ) fakeCloudControllerClient.GetDomainsReturns( - []ccv3.Domain{ + []resources.Domain{ {Name: "private-domain.com", GUID: "private-domain-guid"}, }, ccv3.Warnings{"get-domains-warning"}, @@ -367,7 +368,7 @@ var _ = Describe("Domain Actions", func() { When("getting the guids succeeds", func() { BeforeEach(func() { fakeCloudControllerClient.GetDomainsReturns( - []ccv3.Domain{ + []resources.Domain{ {Name: domainName, GUID: "private-domain-guid"}, }, ccv3.Warnings{"get-domains-warning"}, @@ -375,7 +376,7 @@ var _ = Describe("Domain Actions", func() { ) fakeCloudControllerClient.GetOrganizationsReturns( - []ccv3.Organization{ + []resources.Organization{ {Name: orgName, GUID: "org-guid"}, }, ccv3.Warnings{"get-orgs-warning"}, @@ -461,7 +462,7 @@ var _ = Describe("Domain Actions", func() { When("getting the orgs succeeds", func() { BeforeEach(func() { fakeCloudControllerClient.GetOrganizationsReturns( - []ccv3.Organization{ + []resources.Organization{ {Name: orgName, GUID: "org-guid"}, }, ccv3.Warnings{"get-orgs-warning"}, @@ -494,7 +495,7 @@ var _ = Describe("Domain Actions", func() { When("the api call are successful", func() { BeforeEach(func() { fakeCloudControllerClient.GetDomainsReturns( - []ccv3.Domain{ + []resources.Domain{ {Name: domainName, GUID: "private-domain-guid"}, }, ccv3.Warnings{"get-domains-warning"}, diff --git a/actor/v7action/droplet.go b/actor/v7action/droplet.go index fe262be8d33..434240dbf42 100644 --- a/actor/v7action/droplet.go +++ b/actor/v7action/droplet.go @@ -5,6 +5,7 @@ import ( "code.cloudfoundry.org/cli/api/cloudcontroller/ccerror" "code.cloudfoundry.org/cli/api/cloudcontroller/ccv3" "code.cloudfoundry.org/cli/api/cloudcontroller/ccv3/constant" + "code.cloudfoundry.org/cli/resources" ) // Droplet represents a Cloud Controller droplet. @@ -17,7 +18,7 @@ type Droplet struct { Buildpacks []DropletBuildpack } -type DropletBuildpack ccv3.DropletBuildpack +type DropletBuildpack resources.DropletBuildpack // SetApplicationDropletByApplicationNameAndSpace sets the droplet for an application. func (actor Actor) SetApplicationDropletByApplicationNameAndSpace(appName string, spaceGUID string, dropletGUID string) (Warnings, error) { @@ -85,7 +86,7 @@ func (actor Actor) GetCurrentDropletByApplication(appGUID string) (Droplet, Warn return actor.convertCCToActorDroplet(droplet), Warnings(warnings), err } -func (actor Actor) convertCCToActorDroplet(ccDroplet ccv3.Droplet) Droplet { +func (actor Actor) convertCCToActorDroplet(ccDroplet resources.Droplet) Droplet { var buildpacks []DropletBuildpack for _, ccBuildpack := range ccDroplet.Buildpacks { buildpacks = append(buildpacks, DropletBuildpack(ccBuildpack)) diff --git a/actor/v7action/droplet_test.go b/actor/v7action/droplet_test.go index 01f7850ac53..f155fe94684 100644 --- a/actor/v7action/droplet_test.go +++ b/actor/v7action/droplet_test.go @@ -1,6 +1,7 @@ package v7action_test import ( + "code.cloudfoundry.org/cli/resources" "errors" "code.cloudfoundry.org/cli/actor/actionerror" @@ -29,7 +30,7 @@ var _ = Describe("Droplet Actions", func() { When("there are no client errors", func() { BeforeEach(func() { fakeCloudControllerClient.GetApplicationsReturns( - []ccv3.Application{ + []resources.Application{ {GUID: "some-app-guid"}, }, ccv3.Warnings{"get-applications-warning"}, @@ -37,7 +38,7 @@ var _ = Describe("Droplet Actions", func() { ) fakeCloudControllerClient.SetApplicationDropletReturns( - ccv3.Relationship{GUID: "some-droplet-guid"}, + resources.Relationship{GUID: "some-droplet-guid"}, ccv3.Warnings{"set-application-droplet-warning"}, nil, ) @@ -69,7 +70,7 @@ var _ = Describe("Droplet Actions", func() { expectedErr = errors.New("some get application error") fakeCloudControllerClient.GetApplicationsReturns( - []ccv3.Application{}, + []resources.Application{}, ccv3.Warnings{"get-applications-warning"}, expectedErr, ) @@ -88,7 +89,7 @@ var _ = Describe("Droplet Actions", func() { BeforeEach(func() { expectedErr = errors.New("some set application-droplet error") fakeCloudControllerClient.GetApplicationsReturns( - []ccv3.Application{ + []resources.Application{ {GUID: "some-app-guid"}, }, ccv3.Warnings{"get-applications-warning"}, @@ -96,7 +97,7 @@ var _ = Describe("Droplet Actions", func() { ) fakeCloudControllerClient.SetApplicationDropletReturns( - ccv3.Relationship{}, + resources.Relationship{}, ccv3.Warnings{"set-application-droplet-warning"}, expectedErr, ) @@ -112,7 +113,7 @@ var _ = Describe("Droplet Actions", func() { When("the cc client response contains an UnprocessableEntityError", func() { BeforeEach(func() { fakeCloudControllerClient.SetApplicationDropletReturns( - ccv3.Relationship{}, + resources.Relationship{}, ccv3.Warnings{"set-application-droplet-warning"}, ccerror.UnprocessableEntityError{Message: "some-message"}, ) @@ -133,7 +134,7 @@ var _ = Describe("Droplet Actions", func() { When("there are no client errors", func() { BeforeEach(func() { fakeCloudControllerClient.SetApplicationDropletReturns( - ccv3.Relationship{GUID: "some-droplet-guid"}, + resources.Relationship{GUID: "some-droplet-guid"}, ccv3.Warnings{"set-application-droplet-warning"}, nil, ) @@ -159,7 +160,7 @@ var _ = Describe("Droplet Actions", func() { expectedErr = errors.New("some set application-droplet error") fakeCloudControllerClient.SetApplicationDropletReturns( - ccv3.Relationship{}, + resources.Relationship{}, ccv3.Warnings{"set-application-droplet-warning"}, expectedErr, ) @@ -175,7 +176,7 @@ var _ = Describe("Droplet Actions", func() { When("the cc client response contains an UnprocessableEntityError", func() { BeforeEach(func() { fakeCloudControllerClient.SetApplicationDropletReturns( - ccv3.Relationship{}, + resources.Relationship{}, ccv3.Warnings{"set-application-droplet-warning"}, ccerror.UnprocessableEntityError{Message: "some-message"}, ) @@ -195,7 +196,7 @@ var _ = Describe("Droplet Actions", func() { When("there are no client errors", func() { BeforeEach(func() { fakeCloudControllerClient.GetApplicationsReturns( - []ccv3.Application{ + []resources.Application{ {GUID: "some-app-guid"}, }, ccv3.Warnings{"get-applications-warning"}, @@ -203,12 +204,12 @@ var _ = Describe("Droplet Actions", func() { ) fakeCloudControllerClient.GetDropletsReturns( - []ccv3.Droplet{ + []resources.Droplet{ { GUID: "some-droplet-guid-1", State: constant.DropletStaged, CreatedAt: "2017-08-14T21:16:42Z", - Buildpacks: []ccv3.DropletBuildpack{ + Buildpacks: []resources.DropletBuildpack{ {Name: "ruby"}, {Name: "nodejs"}, }, @@ -219,7 +220,7 @@ var _ = Describe("Droplet Actions", func() { GUID: "some-droplet-guid-2", State: constant.DropletFailed, CreatedAt: "2017-08-16T00:18:24Z", - Buildpacks: []ccv3.DropletBuildpack{ + Buildpacks: []resources.DropletBuildpack{ {Name: "java"}, }, Stack: "windows", @@ -278,7 +279,7 @@ var _ = Describe("Droplet Actions", func() { expectedErr = errors.New("some get application error") fakeCloudControllerClient.GetApplicationsReturns( - []ccv3.Application{}, + []resources.Application{}, ccv3.Warnings{"get-applications-warning"}, expectedErr, ) @@ -299,7 +300,7 @@ var _ = Describe("Droplet Actions", func() { expectedErr = errors.New("some get application error") fakeCloudControllerClient.GetApplicationsReturns( - []ccv3.Application{ + []resources.Application{ {GUID: "some-app-guid"}, }, ccv3.Warnings{"get-applications-warning"}, @@ -307,7 +308,7 @@ var _ = Describe("Droplet Actions", func() { ) fakeCloudControllerClient.GetDropletsReturns( - []ccv3.Droplet{}, + []resources.Droplet{}, ccv3.Warnings{"get-application-droplets-warning"}, expectedErr, ) @@ -341,7 +342,7 @@ var _ = Describe("Droplet Actions", func() { When("the current droplet exists", func() { BeforeEach(func() { - fakeCloudControllerClient.GetApplicationDropletCurrentReturns(ccv3.Droplet{GUID: "some-droplet-guid"}, ccv3.Warnings{"some-warning"}, nil) + fakeCloudControllerClient.GetApplicationDropletCurrentReturns(resources.Droplet{GUID: "some-droplet-guid"}, ccv3.Warnings{"some-warning"}, nil) }) It("returns the current droplet", func() { @@ -357,7 +358,7 @@ var _ = Describe("Droplet Actions", func() { When("an error occurs", func() { When("the app does not exist", func() { BeforeEach(func() { - fakeCloudControllerClient.GetApplicationDropletCurrentReturns(ccv3.Droplet{GUID: "some-droplet-guid"}, ccv3.Warnings{"some-warning"}, ccerror.ApplicationNotFoundError{}) + fakeCloudControllerClient.GetApplicationDropletCurrentReturns(resources.Droplet{GUID: "some-droplet-guid"}, ccv3.Warnings{"some-warning"}, ccerror.ApplicationNotFoundError{}) }) It("returns an ApplicationNotFoundError and warnings", func() { @@ -368,7 +369,7 @@ var _ = Describe("Droplet Actions", func() { When("the current droplet does not exist", func() { BeforeEach(func() { - fakeCloudControllerClient.GetApplicationDropletCurrentReturns(ccv3.Droplet{}, ccv3.Warnings{"some-warning"}, ccerror.DropletNotFoundError{}) + fakeCloudControllerClient.GetApplicationDropletCurrentReturns(resources.Droplet{}, ccv3.Warnings{"some-warning"}, ccerror.DropletNotFoundError{}) }) It("returns an DropletNotFoundError and warnings", func() { @@ -382,7 +383,7 @@ var _ = Describe("Droplet Actions", func() { BeforeEach(func() { expectedErr = errors.New("some error") - fakeCloudControllerClient.GetApplicationDropletCurrentReturns(ccv3.Droplet{}, ccv3.Warnings{"some-warning"}, expectedErr) + fakeCloudControllerClient.GetApplicationDropletCurrentReturns(resources.Droplet{}, ccv3.Warnings{"some-warning"}, expectedErr) }) It("returns the error and warnings", func() { diff --git a/actor/v7action/environment_variable.go b/actor/v7action/environment_variable.go index 29f50ac981a..bb8e51efcdf 100644 --- a/actor/v7action/environment_variable.go +++ b/actor/v7action/environment_variable.go @@ -3,6 +3,7 @@ package v7action import ( "code.cloudfoundry.org/cli/actor/actionerror" "code.cloudfoundry.org/cli/api/cloudcontroller/ccv3" + "code.cloudfoundry.org/cli/resources" ) // EnvironmentVariableGroups represents all environment variables for application @@ -39,7 +40,7 @@ func (actor *Actor) SetEnvironmentVariableByApplicationNameAndSpace(appName stri _, v3Warnings, apiErr := actor.CloudControllerClient.UpdateApplicationEnvironmentVariables( app.GUID, - ccv3.EnvironmentVariables{ + resources.EnvironmentVariables{ envPair.Key: {Value: envPair.Value, IsSet: true}, }) warnings = append(warnings, v3Warnings...) @@ -66,7 +67,7 @@ func (actor *Actor) UnsetEnvironmentVariableByApplicationNameAndSpace(appName st _, patchWarnings, patchErr := actor.CloudControllerClient.UpdateApplicationEnvironmentVariables( app.GUID, - ccv3.EnvironmentVariables{ + resources.EnvironmentVariables{ environmentVariableName: {Value: "", IsSet: false}, }) warnings = append(warnings, patchWarnings...) diff --git a/actor/v7action/environment_variable_test.go b/actor/v7action/environment_variable_test.go index 7324bf17dcf..37619226cd0 100644 --- a/actor/v7action/environment_variable_test.go +++ b/actor/v7action/environment_variable_test.go @@ -1,6 +1,7 @@ package v7action_test import ( + "code.cloudfoundry.org/cli/resources" "errors" "code.cloudfoundry.org/cli/actor/actionerror" @@ -47,7 +48,7 @@ var _ = Describe("Environment Variable Actions", func() { When("finding the app succeeds", func() { BeforeEach(func() { - fakeCloudControllerClient.GetApplicationsReturns([]ccv3.Application{{Name: "some-app", GUID: "some-app-guid"}}, ccv3.Warnings{"get-application-warning"}, nil) + fakeCloudControllerClient.GetApplicationsReturns([]resources.Application{{Name: "some-app", GUID: "some-app-guid"}}, ccv3.Warnings{"get-application-warning"}, nil) }) When("getting the app environment variables fails", func() { @@ -134,12 +135,12 @@ var _ = Describe("Environment Variable Actions", func() { When("finding the app succeeds", func() { BeforeEach(func() { - fakeCloudControllerClient.GetApplicationsReturns([]ccv3.Application{{Name: "some-app", GUID: "some-app-guid"}}, ccv3.Warnings{"get-application-warning"}, nil) + fakeCloudControllerClient.GetApplicationsReturns([]resources.Application{{Name: "some-app", GUID: "some-app-guid"}}, ccv3.Warnings{"get-application-warning"}, nil) }) When("updating the app environment variables fails", func() { BeforeEach(func() { - fakeCloudControllerClient.UpdateApplicationEnvironmentVariablesReturns(ccv3.EnvironmentVariables{}, ccv3.Warnings{"some-env-var-warnings"}, errors.New("some-env-var-error")) + fakeCloudControllerClient.UpdateApplicationEnvironmentVariablesReturns(resources.EnvironmentVariables{}, ccv3.Warnings{"some-env-var-warnings"}, errors.New("some-env-var-error")) }) It("returns an error", func() { Expect(executeErr).To(MatchError("some-env-var-error")) @@ -150,7 +151,7 @@ var _ = Describe("Environment Variable Actions", func() { When("updating the app environment variables succeeds", func() { BeforeEach(func() { fakeCloudControllerClient.UpdateApplicationEnvironmentVariablesReturns( - ccv3.EnvironmentVariables{ + resources.EnvironmentVariables{ "my-var": {Value: "my-val", IsSet: true}, }, ccv3.Warnings{"some-env-var-warnings"}, @@ -168,7 +169,7 @@ var _ = Describe("Environment Variable Actions", func() { Expect(fakeCloudControllerClient.UpdateApplicationEnvironmentVariablesCallCount()).To(Equal(1)) appGUIDArg, envVarsArg := fakeCloudControllerClient.UpdateApplicationEnvironmentVariablesArgsForCall(0) Expect(appGUIDArg).To(Equal("some-app-guid")) - Expect(envVarsArg).To(Equal(ccv3.EnvironmentVariables{ + Expect(envVarsArg).To(Equal(resources.EnvironmentVariables{ "my-var": {Value: "my-val", IsSet: true}, })) Expect(executeErr).ToNot(HaveOccurred()) @@ -214,7 +215,7 @@ var _ = Describe("Environment Variable Actions", func() { When("finding the app succeeds", func() { BeforeEach(func() { - fakeCloudControllerClient.GetApplicationsReturns([]ccv3.Application{{Name: "some-app", GUID: "some-app-guid"}}, ccv3.Warnings{"get-application-warning"}, nil) + fakeCloudControllerClient.GetApplicationsReturns([]resources.Application{{Name: "some-app", GUID: "some-app-guid"}}, ccv3.Warnings{"get-application-warning"}, nil) }) When("getting the app environment variables fails", func() { @@ -253,7 +254,7 @@ var _ = Describe("Environment Variable Actions", func() { }) When("updating the app environment variables fails", func() { BeforeEach(func() { - fakeCloudControllerClient.UpdateApplicationEnvironmentVariablesReturns(ccv3.EnvironmentVariables{}, ccv3.Warnings{"some-patch-env-var-warnings"}, errors.New("some-env-var-error")) + fakeCloudControllerClient.UpdateApplicationEnvironmentVariablesReturns(resources.EnvironmentVariables{}, ccv3.Warnings{"some-patch-env-var-warnings"}, errors.New("some-env-var-error")) }) It("returns an error", func() { Expect(executeErr).To(MatchError("some-env-var-error")) @@ -264,7 +265,7 @@ var _ = Describe("Environment Variable Actions", func() { When("updating the app environment variables succeeds", func() { BeforeEach(func() { fakeCloudControllerClient.UpdateApplicationEnvironmentVariablesReturns( - ccv3.EnvironmentVariables{ + resources.EnvironmentVariables{ "my-var": {Value: "my-val", IsSet: true}, }, ccv3.Warnings{"some-patch-env-var-warnings"}, @@ -281,7 +282,7 @@ var _ = Describe("Environment Variable Actions", func() { Expect(fakeCloudControllerClient.UpdateApplicationEnvironmentVariablesCallCount()).To(Equal(1)) appGUIDArg, envVarsArg := fakeCloudControllerClient.UpdateApplicationEnvironmentVariablesArgsForCall(0) Expect(appGUIDArg).To(Equal("some-app-guid")) - Expect(envVarsArg).To(Equal(ccv3.EnvironmentVariables{ + Expect(envVarsArg).To(Equal(resources.EnvironmentVariables{ "my-var": {Value: "", IsSet: false}, })) diff --git a/actor/v7action/feature_flag.go b/actor/v7action/feature_flag.go index 6a22e7c330d..c0d52cf8b45 100644 --- a/actor/v7action/feature_flag.go +++ b/actor/v7action/feature_flag.go @@ -4,14 +4,15 @@ import ( "code.cloudfoundry.org/cli/actor/actionerror" "code.cloudfoundry.org/cli/api/cloudcontroller/ccerror" "code.cloudfoundry.org/cli/api/cloudcontroller/ccv3" + "code.cloudfoundry.org/cli/resources" ) -type FeatureFlag ccv3.FeatureFlag +type FeatureFlag resources.FeatureFlag // GetFeatureFlagByName returns a featureFlag with the provided name. func (actor Actor) GetFeatureFlagByName(featureFlagName string) (FeatureFlag, Warnings, error) { var ( - ccv3FeatureFlag ccv3.FeatureFlag + ccv3FeatureFlag resources.FeatureFlag warnings ccv3.Warnings err error ) @@ -54,7 +55,7 @@ func (actor Actor) DisableFeatureFlag(flagName string) (Warnings, error) { } func (actor Actor) updateFeatureFlag(flag FeatureFlag) (Warnings, error) { - _, warnings, err := actor.CloudControllerClient.UpdateFeatureFlag(ccv3.FeatureFlag(flag)) + _, warnings, err := actor.CloudControllerClient.UpdateFeatureFlag(resources.FeatureFlag(flag)) if _, ok := err.(ccerror.FeatureFlagNotFoundError); ok { err = actionerror.FeatureFlagNotFoundError{FeatureFlagName: flag.Name} diff --git a/actor/v7action/feature_flag_test.go b/actor/v7action/feature_flag_test.go index a0bf6195d76..4b3c116202b 100644 --- a/actor/v7action/feature_flag_test.go +++ b/actor/v7action/feature_flag_test.go @@ -1,6 +1,7 @@ package v7action_test import ( + "code.cloudfoundry.org/cli/resources" "errors" "code.cloudfoundry.org/cli/actor/actionerror" @@ -37,7 +38,7 @@ var _ = Describe("FeatureFlag", func() { When("getting feature flag fails", func() { BeforeEach(func() { fakeCloudControllerClient.GetFeatureFlagReturns( - ccv3.FeatureFlag{}, + resources.FeatureFlag{}, ccv3.Warnings{"this is a warning"}, errors.New("some-error")) }) @@ -53,7 +54,7 @@ var _ = Describe("FeatureFlag", func() { When("no feature flag is returned", func() { BeforeEach(func() { - var ccFeatureFlag ccv3.FeatureFlag + var ccFeatureFlag resources.FeatureFlag fakeCloudControllerClient.GetFeatureFlagReturns( ccFeatureFlag, @@ -71,7 +72,7 @@ var _ = Describe("FeatureFlag", func() { BeforeEach(func() { featureFlagName = "flag1" - ccFeatureFlag := ccv3.FeatureFlag{Name: "flag1"} + ccFeatureFlag := resources.FeatureFlag{Name: "flag1"} fakeCloudControllerClient.GetFeatureFlagReturns( ccFeatureFlag, ccv3.Warnings{"this is a warning"}, @@ -100,7 +101,7 @@ var _ = Describe("FeatureFlag", func() { When("The client is successful", func() { BeforeEach(func() { fakeCloudControllerClient.GetFeatureFlagsReturns( - []ccv3.FeatureFlag{ + []resources.FeatureFlag{ { Name: "flag1", Enabled: false, @@ -146,16 +147,16 @@ var _ = Describe("FeatureFlag", func() { Describe("EnableFeatureFlag", func() { var ( flagName string - ccFlag ccv3.FeatureFlag - expectedArgFlag ccv3.FeatureFlag + ccFlag resources.FeatureFlag + expectedArgFlag resources.FeatureFlag warnings Warnings executeErr error ) BeforeEach(func() { flagName = "flag1" - ccFlag = ccv3.FeatureFlag{Name: flagName, Enabled: true} - expectedArgFlag = ccv3.FeatureFlag{Name: flagName, Enabled: true} + ccFlag = resources.FeatureFlag{Name: flagName, Enabled: true} + expectedArgFlag = resources.FeatureFlag{Name: flagName, Enabled: true} }) JustBeforeEach(func() { @@ -183,7 +184,7 @@ var _ = Describe("FeatureFlag", func() { When("the flag doesn't exist", func() { BeforeEach(func() { fakeCloudControllerClient.UpdateFeatureFlagReturns( - ccv3.FeatureFlag{}, + resources.FeatureFlag{}, ccv3.Warnings{"update-warning"}, ccerror.FeatureFlagNotFoundError{}, ) @@ -200,7 +201,7 @@ var _ = Describe("FeatureFlag", func() { When("the client errors", func() { BeforeEach(func() { fakeCloudControllerClient.UpdateFeatureFlagReturns( - ccv3.FeatureFlag{}, + resources.FeatureFlag{}, ccv3.Warnings{"update-warning"}, errors.New("some-random-error"), ) @@ -218,16 +219,16 @@ var _ = Describe("FeatureFlag", func() { Describe("EnableFeatureFlag", func() { var ( flagName string - ccFlag ccv3.FeatureFlag - expectedArgFlag ccv3.FeatureFlag + ccFlag resources.FeatureFlag + expectedArgFlag resources.FeatureFlag warnings Warnings executeErr error ) BeforeEach(func() { flagName = "flag1" - ccFlag = ccv3.FeatureFlag{Name: flagName, Enabled: true} - expectedArgFlag = ccv3.FeatureFlag{Name: flagName, Enabled: false} + ccFlag = resources.FeatureFlag{Name: flagName, Enabled: true} + expectedArgFlag = resources.FeatureFlag{Name: flagName, Enabled: false} }) JustBeforeEach(func() { @@ -255,7 +256,7 @@ var _ = Describe("FeatureFlag", func() { When("the flag doesn't exist", func() { BeforeEach(func() { fakeCloudControllerClient.UpdateFeatureFlagReturns( - ccv3.FeatureFlag{}, + resources.FeatureFlag{}, ccv3.Warnings{"update-warning"}, ccerror.FeatureFlagNotFoundError{}, ) @@ -272,7 +273,7 @@ var _ = Describe("FeatureFlag", func() { When("the client errors", func() { BeforeEach(func() { fakeCloudControllerClient.UpdateFeatureFlagReturns( - ccv3.FeatureFlag{}, + resources.FeatureFlag{}, ccv3.Warnings{"update-warning"}, errors.New("some-random-error"), ) diff --git a/actor/v7action/isolation_segment.go b/actor/v7action/isolation_segment.go index 7b571962fe4..7112478e3cb 100644 --- a/actor/v7action/isolation_segment.go +++ b/actor/v7action/isolation_segment.go @@ -4,6 +4,7 @@ import ( "code.cloudfoundry.org/cli/actor/actionerror" "code.cloudfoundry.org/cli/api/cloudcontroller/ccerror" "code.cloudfoundry.org/cli/api/cloudcontroller/ccv3" + "code.cloudfoundry.org/cli/resources" ) type IsolationSegmentSummary struct { @@ -12,7 +13,7 @@ type IsolationSegmentSummary struct { } // IsolationSegment represents a V3 actor IsolationSegment. -type IsolationSegment ccv3.IsolationSegment +type IsolationSegment resources.IsolationSegment // GetEffectiveIsolationSegmentBySpace returns the space's effective isolation // segment. @@ -51,7 +52,7 @@ func (actor Actor) GetEffectiveIsolationSegmentBySpace(spaceGUID string, orgDefa // CreateIsolationSegmentByName creates a given isolation segment. func (actor Actor) CreateIsolationSegmentByName(isolationSegment IsolationSegment) (Warnings, error) { - _, warnings, err := actor.CloudControllerClient.CreateIsolationSegment(ccv3.IsolationSegment(isolationSegment)) + _, warnings, err := actor.CloudControllerClient.CreateIsolationSegment(resources.IsolationSegment(isolationSegment)) if _, ok := err.(ccerror.UnprocessableEntityError); ok { return Warnings(warnings), actionerror.IsolationSegmentAlreadyExistsError{Name: isolationSegment.Name} } diff --git a/actor/v7action/isolation_segment_test.go b/actor/v7action/isolation_segment_test.go index 1ea623f853e..c2920a36da3 100644 --- a/actor/v7action/isolation_segment_test.go +++ b/actor/v7action/isolation_segment_test.go @@ -1,6 +1,7 @@ package v7action_test import ( + "code.cloudfoundry.org/cli/resources" "errors" "code.cloudfoundry.org/cli/actor/actionerror" @@ -27,7 +28,7 @@ var _ = Describe("Isolation Segment Actions", func() { When("the create is successful", func() { BeforeEach(func() { fakeCloudControllerClient.CreateIsolationSegmentReturns( - ccv3.IsolationSegment{}, + resources.IsolationSegment{}, ccv3.Warnings{"warning-1", "warning-2"}, nil, ) @@ -41,7 +42,7 @@ var _ = Describe("Isolation Segment Actions", func() { Expect(fakeCloudControllerClient.CreateIsolationSegmentCallCount()).To(Equal(1)) isolationSegmentName := fakeCloudControllerClient.CreateIsolationSegmentArgsForCall(0) - Expect(isolationSegmentName).To(Equal(ccv3.IsolationSegment{Name: "some-isolation-segment"})) + Expect(isolationSegmentName).To(Equal(resources.IsolationSegment{Name: "some-isolation-segment"})) }) }) @@ -52,7 +53,7 @@ var _ = Describe("Isolation Segment Actions", func() { BeforeEach(func() { expectedErr = errors.New("I am a CloudControllerClient Error") fakeCloudControllerClient.CreateIsolationSegmentReturns( - ccv3.IsolationSegment{}, + resources.IsolationSegment{}, ccv3.Warnings{"warning-1", "warning-2"}, expectedErr, ) @@ -68,7 +69,7 @@ var _ = Describe("Isolation Segment Actions", func() { When("an UnprocessableEntityError occurs", func() { BeforeEach(func() { fakeCloudControllerClient.CreateIsolationSegmentReturns( - ccv3.IsolationSegment{}, + resources.IsolationSegment{}, ccv3.Warnings{"warning-1", "warning-2"}, ccerror.UnprocessableEntityError{}, ) @@ -86,7 +87,7 @@ var _ = Describe("Isolation Segment Actions", func() { Describe("DeleteIsolationSegmentByName", func() { When("the isolation segment is found", func() { BeforeEach(func() { - fakeCloudControllerClient.GetIsolationSegmentsReturns([]ccv3.IsolationSegment{ + fakeCloudControllerClient.GetIsolationSegmentsReturns([]resources.IsolationSegment{ { GUID: "some-iso-guid", Name: "some-iso-seg", @@ -151,7 +152,7 @@ var _ = Describe("Isolation Segment Actions", func() { Describe("EntitleIsolationSegmentToOrganizationByName", func() { When("the isolation segment exists", func() { BeforeEach(func() { - fakeCloudControllerClient.GetIsolationSegmentsReturns([]ccv3.IsolationSegment{ + fakeCloudControllerClient.GetIsolationSegmentsReturns([]resources.IsolationSegment{ { Name: "some-iso-seg", GUID: "some-iso-guid", @@ -161,7 +162,7 @@ var _ = Describe("Isolation Segment Actions", func() { When("the organization exists", func() { BeforeEach(func() { - fakeCloudControllerClient.GetOrganizationsReturns([]ccv3.Organization{ + fakeCloudControllerClient.GetOrganizationsReturns([]resources.Organization{ { Name: "some-org", GUID: "some-org-guid", @@ -172,7 +173,7 @@ var _ = Describe("Isolation Segment Actions", func() { When("the relationship succeeds", func() { BeforeEach(func() { fakeCloudControllerClient.EntitleIsolationSegmentToOrganizationsReturns( - ccv3.RelationshipList{GUIDs: []string{"some-relationship-guid"}}, + resources.RelationshipList{GUIDs: []string{"some-relationship-guid"}}, ccv3.Warnings{"entitle-iso-to-org-warning"}, nil) }) @@ -193,7 +194,7 @@ var _ = Describe("Isolation Segment Actions", func() { BeforeEach(func() { expectedErr = errors.New("toxic-relationship") fakeCloudControllerClient.EntitleIsolationSegmentToOrganizationsReturns( - ccv3.RelationshipList{}, + resources.RelationshipList{}, ccv3.Warnings{"entitle-iso-to-org-warning"}, expectedErr) }) @@ -242,7 +243,7 @@ var _ = Describe("Isolation Segment Actions", func() { Describe("AssignIsolationSegmentToSpaceByNameAndSpace", func() { When("the retrieving the isolation segment succeeds", func() { BeforeEach(func() { - fakeCloudControllerClient.GetIsolationSegmentsReturns([]ccv3.IsolationSegment{ + fakeCloudControllerClient.GetIsolationSegmentsReturns([]resources.IsolationSegment{ { GUID: "some-iso-guid", Name: "some-iso-seg", @@ -254,7 +255,7 @@ var _ = Describe("Isolation Segment Actions", func() { When("the assignment is successful", func() { BeforeEach(func() { - fakeCloudControllerClient.UpdateSpaceIsolationSegmentRelationshipReturns(ccv3.Relationship{GUID: "doesn't matter"}, ccv3.Warnings{"assignment-warnings-1", "assignment-warnings-2"}, nil) + fakeCloudControllerClient.UpdateSpaceIsolationSegmentRelationshipReturns(resources.Relationship{GUID: "doesn't matter"}, ccv3.Warnings{"assignment-warnings-1", "assignment-warnings-2"}, nil) }) It("returns the warnings", func() { @@ -278,7 +279,7 @@ var _ = Describe("Isolation Segment Actions", func() { var expectedErr error BeforeEach(func() { expectedErr = errors.New("foo bar") - fakeCloudControllerClient.UpdateSpaceIsolationSegmentRelationshipReturns(ccv3.Relationship{}, ccv3.Warnings{"assignment-warnings-1", "assignment-warnings-2"}, expectedErr) + fakeCloudControllerClient.UpdateSpaceIsolationSegmentRelationshipReturns(resources.Relationship{}, ccv3.Warnings{"assignment-warnings-1", "assignment-warnings-2"}, expectedErr) }) It("returns the warnings and error", func() { @@ -307,7 +308,7 @@ var _ = Describe("Isolation Segment Actions", func() { Describe("GetEffectiveIsolationSegmentBySpace", func() { When("the retrieving the space isolation segment succeeds", func() { BeforeEach(func() { - fakeCloudControllerClient.GetSpaceIsolationSegmentReturns(ccv3.Relationship{ + fakeCloudControllerClient.GetSpaceIsolationSegmentReturns(resources.Relationship{ GUID: "some-iso-guid", }, ccv3.Warnings{"I r warnings", "I are two warnings"}, nil, @@ -316,7 +317,7 @@ var _ = Describe("Isolation Segment Actions", func() { When("retrieving the isolation segment succeeds", func() { BeforeEach(func() { - fakeCloudControllerClient.GetIsolationSegmentReturns(ccv3.IsolationSegment{ + fakeCloudControllerClient.GetIsolationSegmentReturns(resources.IsolationSegment{ Name: "some-iso", }, ccv3.Warnings{"iso-warnings-1", "iso-warnings-2"}, nil) @@ -341,7 +342,7 @@ var _ = Describe("Isolation Segment Actions", func() { var expectedErr error BeforeEach(func() { expectedErr = errors.New("foo bar") - fakeCloudControllerClient.GetIsolationSegmentReturns(ccv3.IsolationSegment{}, ccv3.Warnings{"iso-warnings-1", "iso-warnings-2"}, expectedErr) + fakeCloudControllerClient.GetIsolationSegmentReturns(resources.IsolationSegment{}, ccv3.Warnings{"iso-warnings-1", "iso-warnings-2"}, expectedErr) }) It("returns the warnings and error", func() { @@ -353,7 +354,7 @@ var _ = Describe("Isolation Segment Actions", func() { When("the space does not have an isolation segment", func() { BeforeEach(func() { - fakeCloudControllerClient.GetSpaceIsolationSegmentReturns(ccv3.Relationship{ + fakeCloudControllerClient.GetSpaceIsolationSegmentReturns(resources.Relationship{ GUID: "", }, ccv3.Warnings{"warning-1", "warning-2"}, nil, @@ -372,7 +373,7 @@ var _ = Describe("Isolation Segment Actions", func() { When("retrieving the isolation segment is successful", func() { BeforeEach(func() { fakeCloudControllerClient.GetIsolationSegmentReturns( - ccv3.IsolationSegment{ + resources.IsolationSegment{ Name: "some-iso-segment", GUID: "some-org-default-isolation-segment-guid", }, @@ -401,7 +402,7 @@ var _ = Describe("Isolation Segment Actions", func() { var expectedErr error BeforeEach(func() { expectedErr = errors.New("foo bar") - fakeCloudControllerClient.GetSpaceIsolationSegmentReturns(ccv3.Relationship{}, ccv3.Warnings{"I r warnings", "I are two warnings"}, expectedErr) + fakeCloudControllerClient.GetSpaceIsolationSegmentReturns(resources.Relationship{}, ccv3.Warnings{"I r warnings", "I are two warnings"}, expectedErr) }) It("returns the warnings and error", func() { @@ -415,7 +416,7 @@ var _ = Describe("Isolation Segment Actions", func() { Describe("GetIsolationSegmentByName", func() { When("the isolation segment exists", func() { BeforeEach(func() { - fakeCloudControllerClient.GetIsolationSegmentsReturns([]ccv3.IsolationSegment{ + fakeCloudControllerClient.GetIsolationSegmentsReturns([]resources.IsolationSegment{ { GUID: "some-iso-guid", Name: "some-iso-seg", @@ -472,7 +473,7 @@ var _ = Describe("Isolation Segment Actions", func() { When("there are isolation segments entitled to this org", func() { BeforeEach(func() { fakeCloudControllerClient.GetIsolationSegmentsReturns( - []ccv3.IsolationSegment{ + []resources.IsolationSegment{ {Name: "some-iso-seg-1"}, {Name: "some-iso-seg-2"}, }, @@ -504,7 +505,7 @@ var _ = Describe("Isolation Segment Actions", func() { BeforeEach(func() { expectedError = errors.New("some cc error") fakeCloudControllerClient.GetIsolationSegmentsReturns( - []ccv3.IsolationSegment{}, + []resources.IsolationSegment{}, ccv3.Warnings{"get isolation segments warning"}, expectedError) }) @@ -520,7 +521,7 @@ var _ = Describe("Isolation Segment Actions", func() { Describe("GetIsolationSegmentSummaries", func() { When("getting isolation segments succeeds", func() { BeforeEach(func() { - fakeCloudControllerClient.GetIsolationSegmentsReturns([]ccv3.IsolationSegment{ + fakeCloudControllerClient.GetIsolationSegmentsReturns([]resources.IsolationSegment{ { Name: "iso-seg-1", GUID: "iso-guid-1", @@ -534,8 +535,8 @@ var _ = Describe("Isolation Segment Actions", func() { When("getting entitled organizations succeeds", func() { BeforeEach(func() { - fakeCloudControllerClient.GetIsolationSegmentOrganizationsReturnsOnCall(0, []ccv3.Organization{}, ccv3.Warnings{"get-entitled-orgs-warning-1"}, nil) - fakeCloudControllerClient.GetIsolationSegmentOrganizationsReturnsOnCall(1, []ccv3.Organization{ + fakeCloudControllerClient.GetIsolationSegmentOrganizationsReturnsOnCall(0, []resources.Organization{}, ccv3.Warnings{"get-entitled-orgs-warning-1"}, nil) + fakeCloudControllerClient.GetIsolationSegmentOrganizationsReturnsOnCall(1, []resources.Organization{ { Name: "iso-2-org-1", GUID: "iso-2-org-guid-1", @@ -605,7 +606,7 @@ var _ = Describe("Isolation Segment Actions", func() { Describe("DeleteIsolationSegmentOrganizationByName", func() { When("the isolation segment exists", func() { BeforeEach(func() { - fakeCloudControllerClient.GetIsolationSegmentsReturns([]ccv3.IsolationSegment{ + fakeCloudControllerClient.GetIsolationSegmentsReturns([]resources.IsolationSegment{ { Name: "iso-1", GUID: "iso-1-guid-1", @@ -615,7 +616,7 @@ var _ = Describe("Isolation Segment Actions", func() { When("the organization exists", func() { BeforeEach(func() { - fakeCloudControllerClient.GetOrganizationsReturns([]ccv3.Organization{ + fakeCloudControllerClient.GetOrganizationsReturns([]resources.Organization{ { Name: "org-1", GUID: "org-guid-1", @@ -691,7 +692,7 @@ var _ = Describe("Isolation Segment Actions", func() { When("the assignment is successful", func() { BeforeEach(func() { fakeCloudControllerClient.UpdateOrganizationDefaultIsolationSegmentRelationshipReturns( - ccv3.Relationship{GUID: "some-guid"}, + resources.Relationship{GUID: "some-guid"}, ccv3.Warnings{"warning-1", "warning-2"}, nil, ) @@ -713,7 +714,7 @@ var _ = Describe("Isolation Segment Actions", func() { When("the assignment fails", func() { BeforeEach(func() { fakeCloudControllerClient.UpdateOrganizationDefaultIsolationSegmentRelationshipReturns( - ccv3.Relationship{GUID: "some-guid"}, + resources.Relationship{GUID: "some-guid"}, ccv3.Warnings{"warning-1", "warning-2"}, errors.New("some-error"), ) @@ -732,7 +733,7 @@ var _ = Describe("Isolation Segment Actions", func() { When("the assignment is successful", func() { BeforeEach(func() { fakeCloudControllerClient.UpdateOrganizationDefaultIsolationSegmentRelationshipReturns( - ccv3.Relationship{GUID: "some-guid"}, + resources.Relationship{GUID: "some-guid"}, ccv3.Warnings{"warning-1", "warning-2"}, nil, ) @@ -754,7 +755,7 @@ var _ = Describe("Isolation Segment Actions", func() { When("the assignment fails", func() { BeforeEach(func() { fakeCloudControllerClient.UpdateOrganizationDefaultIsolationSegmentRelationshipReturns( - ccv3.Relationship{GUID: "some-guid"}, + resources.Relationship{GUID: "some-guid"}, ccv3.Warnings{"warning-1", "warning-2"}, errors.New("some-error"), ) diff --git a/actor/v7action/label.go b/actor/v7action/label.go index 75d77b26a8f..68e353ebae2 100644 --- a/actor/v7action/label.go +++ b/actor/v7action/label.go @@ -1,7 +1,7 @@ package v7action import ( - "code.cloudfoundry.org/cli/api/cloudcontroller/ccv3" + "code.cloudfoundry.org/cli/resources" "code.cloudfoundry.org/cli/types" ) @@ -20,7 +20,7 @@ func (actor *Actor) UpdateOrganizationLabelsByOrganizationName(orgName string, l if err != nil { return warnings, err } - org.Metadata = &ccv3.Metadata{Labels: labels} - _, updateWarnings, err := actor.CloudControllerClient.UpdateOrganization(ccv3.Organization(org)) + org.Metadata = &resources.Metadata{Labels: labels} + _, updateWarnings, err := actor.CloudControllerClient.UpdateOrganization(resources.Organization(org)) return append(warnings, updateWarnings...), err } diff --git a/actor/v7action/label_test.go b/actor/v7action/label_test.go index 6b7da9cbe48..7625a98e254 100644 --- a/actor/v7action/label_test.go +++ b/actor/v7action/label_test.go @@ -1,6 +1,7 @@ package v7action_test import ( + "code.cloudfoundry.org/cli/resources" "errors" . "code.cloudfoundry.org/cli/actor/v7action" @@ -39,12 +40,12 @@ var _ = Describe("UpdateApplicationLabelsByApplicationName", func() { When("there are no client errors", func() { BeforeEach(func() { fakeCloudControllerClient.GetApplicationsReturns( - []ccv3.Application{ccv3.Application{GUID: "some-guid"}}, + []resources.Application{resources.Application{GUID: "some-guid"}}, ccv3.Warnings([]string{"warning-1", "warning-2"}), nil, ) fakeCloudControllerClient.UpdateApplicationReturns( - ccv3.Application{}, + resources.Application{}, ccv3.Warnings{"set-app-labels-warnings"}, nil, ) @@ -66,7 +67,7 @@ var _ = Describe("UpdateApplicationLabelsByApplicationName", func() { When("GetApplications fails", func() { BeforeEach(func() { fakeCloudControllerClient.GetApplicationsReturns( - []ccv3.Application{ccv3.Application{GUID: "some-guid"}}, + []resources.Application{resources.Application{GUID: "some-guid"}}, ccv3.Warnings([]string{"warning-failure-1", "warning-failure-2"}), errors.New("get-apps-error"), ) @@ -82,12 +83,12 @@ var _ = Describe("UpdateApplicationLabelsByApplicationName", func() { When("UpdateApplication fails", func() { BeforeEach(func() { fakeCloudControllerClient.GetApplicationsReturns( - []ccv3.Application{ccv3.Application{GUID: "some-guid"}}, + []resources.Application{resources.Application{GUID: "some-guid"}}, ccv3.Warnings([]string{"warning-1", "warning-2"}), nil, ) fakeCloudControllerClient.UpdateApplicationReturns( - ccv3.Application{}, + resources.Application{}, ccv3.Warnings{"set-app-labels-warnings"}, errors.New("update-application-error"), ) @@ -111,12 +112,12 @@ var _ = Describe("UpdateApplicationLabelsByApplicationName", func() { When("there are no client errors", func() { BeforeEach(func() { fakeCloudControllerClient.GetOrganizationsReturns( - []ccv3.Organization{ccv3.Organization{GUID: "some-guid"}}, + []resources.Organization{resources.Organization{GUID: "some-guid"}}, ccv3.Warnings([]string{"warning-1", "warning-2"}), nil, ) fakeCloudControllerClient.UpdateOrganizationReturns( - ccv3.Organization{}, + resources.Organization{}, ccv3.Warnings{"set-org"}, nil, ) @@ -138,7 +139,7 @@ var _ = Describe("UpdateApplicationLabelsByApplicationName", func() { When("fetching the organization fails", func() { BeforeEach(func() { fakeCloudControllerClient.GetOrganizationsReturns( - []ccv3.Organization{ccv3.Organization{GUID: "some-guid"}}, + []resources.Organization{resources.Organization{GUID: "some-guid"}}, ccv3.Warnings([]string{"warning-failure-1", "warning-failure-2"}), errors.New("get-orgs-error"), ) @@ -154,12 +155,12 @@ var _ = Describe("UpdateApplicationLabelsByApplicationName", func() { When("updating the organization fails", func() { BeforeEach(func() { fakeCloudControllerClient.GetOrganizationsReturns( - []ccv3.Organization{ccv3.Organization{GUID: "some-guid"}}, + []resources.Organization{resources.Organization{GUID: "some-guid"}}, ccv3.Warnings([]string{"warning-1", "warning-2"}), nil, ) fakeCloudControllerClient.UpdateOrganizationReturns( - ccv3.Organization{}, + resources.Organization{}, ccv3.Warnings{"set-org"}, errors.New("update-orgs-error"), ) diff --git a/actor/v7action/logging_test.go b/actor/v7action/logging_test.go index 149094c5bdd..0c37b2f39fc 100644 --- a/actor/v7action/logging_test.go +++ b/actor/v7action/logging_test.go @@ -1,6 +1,7 @@ package v7action_test import ( + "code.cloudfoundry.org/cli/resources" "errors" "time" @@ -333,7 +334,7 @@ var _ = Describe("Logging Actions", func() { expectedAppGUID = "some-app-guid" fakeCloudControllerClient.GetApplicationsReturns( - []ccv3.Application{ + []resources.Application{ { Name: "some-app", GUID: expectedAppGUID, diff --git a/actor/v7action/metadata.go b/actor/v7action/metadata.go index 36a1e08ba4d..1da1991ea45 100644 --- a/actor/v7action/metadata.go +++ b/actor/v7action/metadata.go @@ -1,8 +1,6 @@ package v7action -import ( - "code.cloudfoundry.org/cli/api/cloudcontroller/ccv3" -) +import "code.cloudfoundry.org/cli/resources" // Metadata represents V3 resource metadata -type Metadata ccv3.Metadata +type Metadata resources.Metadata diff --git a/actor/v7action/organization.go b/actor/v7action/organization.go index 4988c8636a7..4f0c29c72bf 100644 --- a/actor/v7action/organization.go +++ b/actor/v7action/organization.go @@ -3,10 +3,11 @@ package v7action import ( "code.cloudfoundry.org/cli/actor/actionerror" "code.cloudfoundry.org/cli/api/cloudcontroller/ccv3" + "code.cloudfoundry.org/cli/resources" ) // Organization represents a V3 actor organization. -type Organization ccv3.Organization +type Organization resources.Organization // GetOrganizationByName returns the organization with the given name. func (actor Actor) GetOrganizationByName(name string) (Organization, Warnings, error) { diff --git a/actor/v7action/organization_test.go b/actor/v7action/organization_test.go index 05fff7a5ce1..f91586b066c 100644 --- a/actor/v7action/organization_test.go +++ b/actor/v7action/organization_test.go @@ -1,6 +1,7 @@ package v7action_test import ( + "code.cloudfoundry.org/cli/resources" "errors" "code.cloudfoundry.org/cli/actor/actionerror" @@ -27,7 +28,7 @@ var _ = Describe("Organization Actions", func() { When("the org exists", func() { BeforeEach(func() { fakeCloudControllerClient.GetOrganizationsReturns( - []ccv3.Organization{ + []resources.Organization{ { Name: "some-org-name", GUID: "some-org-guid", @@ -60,7 +61,7 @@ var _ = Describe("Organization Actions", func() { BeforeEach(func() { expectedError = errors.New("I am a CloudControllerClient Error") fakeCloudControllerClient.GetOrganizationsReturns( - []ccv3.Organization{}, + []resources.Organization{}, ccv3.Warnings{"some-warning"}, expectedError) }) @@ -76,7 +77,7 @@ var _ = Describe("Organization Actions", func() { When("the org does not exist", func() { BeforeEach(func() { fakeCloudControllerClient.GetOrganizationsReturns( - []ccv3.Organization{}, + []resources.Organization{}, ccv3.Warnings{"some-warning"}, nil, ) diff --git a/actor/v7action/package.go b/actor/v7action/package.go index 0f783553059..9e85b634213 100644 --- a/actor/v7action/package.go +++ b/actor/v7action/package.go @@ -1,6 +1,7 @@ package v7action import ( + "code.cloudfoundry.org/cli/resources" "io" "time" @@ -16,7 +17,7 @@ const ( DefaultArchiveFilePermissions = 0744 ) -type Package ccv3.Package +type Package resources.Package type DockerImageCredentials struct { Path string @@ -25,10 +26,10 @@ type DockerImageCredentials struct { } func (actor Actor) CreateDockerPackageByApplication(appGUID string, dockerImageCredentials DockerImageCredentials) (Package, Warnings, error) { - inputPackage := ccv3.Package{ + inputPackage := resources.Package{ Type: constant.PackageTypeDocker, - Relationships: ccv3.Relationships{ - constant.RelationshipTypeApplication: ccv3.Relationship{GUID: appGUID}, + Relationships: resources.Relationships{ + constant.RelationshipTypeApplication: resources.Relationship{GUID: appGUID}, }, DockerImage: dockerImageCredentials.Path, DockerUsername: dockerImageCredentials.Username, @@ -71,10 +72,10 @@ func (actor *Actor) GetApplicationPackages(appName string, spaceGUID string) ([] } func (actor Actor) CreateBitsPackageByApplication(appGUID string) (Package, Warnings, error) { - inputPackage := ccv3.Package{ + inputPackage := resources.Package{ Type: constant.PackageTypeBits, - Relationships: ccv3.Relationships{ - constant.RelationshipTypeApplication: ccv3.Relationship{GUID: appGUID}, + Relationships: resources.Relationships{ + constant.RelationshipTypeApplication: resources.Relationship{GUID: appGUID}, }, } @@ -93,7 +94,7 @@ func (actor Actor) UploadBitsPackage(pkg Package, matchedResources []sharedactio apiResources = append(apiResources, ccv3.Resource(resource)) } - appPkg, warnings, err := actor.CloudControllerClient.UploadBitsPackage(ccv3.Package(pkg), apiResources, newResources, newResourcesLength) + appPkg, warnings, err := actor.CloudControllerClient.UploadBitsPackage(resources.Package(pkg), apiResources, newResources, newResourcesLength) return Package(appPkg), Warnings(warnings), err } diff --git a/actor/v7action/package_test.go b/actor/v7action/package_test.go index c38977eca13..9afa5bcf846 100644 --- a/actor/v7action/package_test.go +++ b/actor/v7action/package_test.go @@ -1,6 +1,7 @@ package v7action_test import ( + "code.cloudfoundry.org/cli/resources" "errors" "io" "strings" @@ -37,7 +38,7 @@ var _ = Describe("Package Actions", func() { When("there are no client errors", func() { BeforeEach(func() { fakeCloudControllerClient.GetApplicationsReturns( - []ccv3.Application{ + []resources.Application{ {GUID: "some-app-guid"}, }, ccv3.Warnings{"get-applications-warning"}, @@ -45,7 +46,7 @@ var _ = Describe("Package Actions", func() { ) fakeCloudControllerClient.GetPackagesReturns( - []ccv3.Package{ + []resources.Package{ { GUID: "some-package-guid-1", State: constant.PackageReady, @@ -100,7 +101,7 @@ var _ = Describe("Package Actions", func() { expectedErr = errors.New("some get application error") fakeCloudControllerClient.GetApplicationsReturns( - []ccv3.Application{}, + []resources.Application{}, ccv3.Warnings{"get-applications-warning"}, expectedErr, ) @@ -121,7 +122,7 @@ var _ = Describe("Package Actions", func() { expectedErr = errors.New("some get application error") fakeCloudControllerClient.GetApplicationsReturns( - []ccv3.Application{ + []resources.Application{ {GUID: "some-app-guid"}, }, ccv3.Warnings{"get-applications-warning"}, @@ -129,7 +130,7 @@ var _ = Describe("Package Actions", func() { ) fakeCloudControllerClient.GetPackagesReturns( - []ccv3.Package{}, + []resources.Package{}, ccv3.Warnings{"get-application-packages-warning"}, expectedErr, ) @@ -158,7 +159,7 @@ var _ = Describe("Package Actions", func() { When("the application can't be retrieved", func() { BeforeEach(func() { fakeCloudControllerClient.GetApplicationsReturns( - []ccv3.Application{}, + []resources.Application{}, ccv3.Warnings{"some-app-warning"}, errors.New("some-app-error"), ) @@ -173,7 +174,7 @@ var _ = Describe("Package Actions", func() { When("the application can be retrieved", func() { BeforeEach(func() { fakeCloudControllerClient.GetApplicationsReturns( - []ccv3.Application{ + []resources.Application{ { Name: "some-app-name", GUID: "some-app-guid", @@ -187,7 +188,7 @@ var _ = Describe("Package Actions", func() { When("creating the package fails", func() { BeforeEach(func() { fakeCloudControllerClient.CreatePackageReturns( - ccv3.Package{}, + resources.Package{}, ccv3.Warnings{"some-create-package-warning"}, errors.New("some-create-package-error"), ) @@ -200,14 +201,14 @@ var _ = Describe("Package Actions", func() { When("creating the package succeeds", func() { BeforeEach(func() { - createdPackage := ccv3.Package{ + createdPackage := resources.Package{ DockerImage: "some-docker-image", DockerUsername: "some-username", DockerPassword: "some-password", GUID: "some-pkg-guid", State: constant.PackageReady, - Relationships: ccv3.Relationships{ - constant.RelationshipTypeApplication: ccv3.Relationship{ + Relationships: resources.Relationships{ + constant.RelationshipTypeApplication: resources.Relationship{ GUID: "some-app-guid", }, }, @@ -224,14 +225,14 @@ var _ = Describe("Package Actions", func() { Expect(executeErr).ToNot(HaveOccurred()) Expect(warnings).To(ConsistOf("some-app-warning", "some-create-package-warning")) - expectedPackage := ccv3.Package{ + expectedPackage := resources.Package{ DockerImage: "some-docker-image", DockerUsername: "some-username", DockerPassword: "some-password", GUID: "some-pkg-guid", State: constant.PackageReady, - Relationships: ccv3.Relationships{ - constant.RelationshipTypeApplication: ccv3.Relationship{ + Relationships: resources.Relationships{ + constant.RelationshipTypeApplication: resources.Relationship{ GUID: "some-app-guid", }, }, @@ -245,13 +246,13 @@ var _ = Describe("Package Actions", func() { )) Expect(fakeCloudControllerClient.CreatePackageCallCount()).To(Equal(1)) - Expect(fakeCloudControllerClient.CreatePackageArgsForCall(0)).To(Equal(ccv3.Package{ + Expect(fakeCloudControllerClient.CreatePackageArgsForCall(0)).To(Equal(resources.Package{ Type: constant.PackageTypeDocker, DockerImage: "some-docker-image", DockerUsername: "some-username", DockerPassword: "some-password", - Relationships: ccv3.Relationships{ - constant.RelationshipTypeApplication: ccv3.Relationship{GUID: "some-app-guid"}, + Relationships: resources.Relationships{ + constant.RelationshipTypeApplication: resources.Relationship{GUID: "some-app-guid"}, }, })) }) @@ -275,7 +276,7 @@ var _ = Describe("Package Actions", func() { When("creating the package fails", func() { BeforeEach(func() { fakeCloudControllerClient.CreatePackageReturns( - ccv3.Package{}, + resources.Package{}, ccv3.Warnings{"create-package-warning"}, errors.New("some-create-error"), ) @@ -288,10 +289,10 @@ var _ = Describe("Package Actions", func() { }) When("creating the package succeeds", func() { - var createdPackage ccv3.Package + var createdPackage resources.Package BeforeEach(func() { - createdPackage = ccv3.Package{GUID: "some-pkg-guid"} + createdPackage = resources.Package{GUID: "some-pkg-guid"} fakeCloudControllerClient.CreatePackageReturns( createdPackage, ccv3.Warnings{"create-package-warning"}, @@ -303,10 +304,10 @@ var _ = Describe("Package Actions", func() { Expect(executeErr).ToNot(HaveOccurred()) Expect(fakeCloudControllerClient.CreatePackageCallCount()).To(Equal(1)) - Expect(fakeCloudControllerClient.CreatePackageArgsForCall(0)).To(Equal(ccv3.Package{ + Expect(fakeCloudControllerClient.CreatePackageArgsForCall(0)).To(Equal(resources.Package{ Type: constant.PackageTypeBits, - Relationships: ccv3.Relationships{ - constant.RelationshipTypeApplication: ccv3.Relationship{GUID: appGUID}, + Relationships: resources.Relationships{ + constant.RelationshipTypeApplication: resources.Relationship{GUID: appGUID}, }, })) @@ -345,7 +346,7 @@ var _ = Describe("Package Actions", func() { When("the upload is successful", func() { BeforeEach(func() { - fakeCloudControllerClient.UploadBitsPackageReturns(ccv3.Package{GUID: "some-package-guid"}, ccv3.Warnings{"upload-warning-1", "upload-warning-2"}, nil) + fakeCloudControllerClient.UploadBitsPackageReturns(resources.Package{GUID: "some-package-guid"}, ccv3.Warnings{"upload-warning-1", "upload-warning-2"}, nil) }) It("returns all warnings", func() { @@ -355,7 +356,7 @@ var _ = Describe("Package Actions", func() { Expect(fakeCloudControllerClient.UploadBitsPackageCallCount()).To(Equal(1)) passedPackage, passedExistingResources, passedReader, passedReaderLength := fakeCloudControllerClient.UploadBitsPackageArgsForCall(0) - Expect(passedPackage).To(Equal(ccv3.Package(appPkg))) + Expect(passedPackage).To(Equal(resources.Package(appPkg))) Expect(passedExistingResources).To(ConsistOf(ccv3.Resource{FilePath: "some-resource"}, ccv3.Resource{FilePath: "another-resource"})) Expect(passedReader).To(Equal(reader)) Expect(passedReaderLength).To(Equal(readerLength)) @@ -367,7 +368,7 @@ var _ = Describe("Package Actions", func() { BeforeEach(func() { err = errors.New("some-error") - fakeCloudControllerClient.UploadBitsPackageReturns(ccv3.Package{}, ccv3.Warnings{"upload-warning-1", "upload-warning-2"}, err) + fakeCloudControllerClient.UploadBitsPackageReturns(resources.Package{}, ccv3.Warnings{"upload-warning-1", "upload-warning-2"}, err) }) It("returns the error", func() { @@ -397,7 +398,7 @@ var _ = Describe("Package Actions", func() { // putting this here so the tests don't hang on polling fakeCloudControllerClient.GetPackageReturns( - ccv3.Package{ + resources.Package{ GUID: "some-pkg-guid", State: constant.PackageReady, }, @@ -416,7 +417,7 @@ var _ = Describe("Package Actions", func() { BeforeEach(func() { expectedErr = errors.New("Fake error during polling") fakeCloudControllerClient.GetPackageReturns( - ccv3.Package{}, + resources.Package{}, ccv3.Warnings{"some-get-pkg-warning"}, expectedErr, ) @@ -432,7 +433,7 @@ var _ = Describe("Package Actions", func() { It("returns the package", func() { Expect(executeErr).ToNot(HaveOccurred()) - expectedPackage := ccv3.Package{ + expectedPackage := resources.Package{ GUID: "some-pkg-guid", State: constant.PackageReady, } @@ -447,14 +448,14 @@ var _ = Describe("Package Actions", func() { DescribeTable("Polling states", func(finalState constant.PackageState, expectedErr error) { fakeCloudControllerClient.GetPackageReturns( - ccv3.Package{GUID: "some-pkg-guid", State: constant.PackageAwaitingUpload}, + resources.Package{GUID: "some-pkg-guid", State: constant.PackageAwaitingUpload}, ccv3.Warnings{"poll-package-warning"}, nil, ) fakeCloudControllerClient.GetPackageReturnsOnCall( 1, - ccv3.Package{State: finalState}, + resources.Package{State: finalState}, ccv3.Warnings{"poll-package-warning"}, nil, ) diff --git a/actor/v7action/process.go b/actor/v7action/process.go index d998774e77c..c71ec661288 100644 --- a/actor/v7action/process.go +++ b/actor/v7action/process.go @@ -3,12 +3,12 @@ package v7action import ( "code.cloudfoundry.org/cli/actor/actionerror" "code.cloudfoundry.org/cli/api/cloudcontroller/ccerror" - "code.cloudfoundry.org/cli/api/cloudcontroller/ccv3" "code.cloudfoundry.org/cli/api/cloudcontroller/ccv3/constant" + "code.cloudfoundry.org/cli/resources" ) // Process represents a V3 actor process. -type Process ccv3.Process +type Process resources.Process // GetProcessByTypeAndApplication returns a process for the given application // and type. @@ -21,7 +21,7 @@ func (actor Actor) GetProcessByTypeAndApplication(processType string, appGUID st } func (actor Actor) ScaleProcessByApplication(appGUID string, process Process) (Warnings, error) { - _, warnings, err := actor.CloudControllerClient.CreateApplicationProcessScale(appGUID, ccv3.Process(process)) + _, warnings, err := actor.CloudControllerClient.CreateApplicationProcessScale(appGUID, resources.Process(process)) allWarnings := Warnings(warnings) if err != nil { if _, ok := err.(ccerror.ProcessNotFoundError); ok { @@ -49,7 +49,7 @@ func (actor Actor) UpdateProcessByTypeAndApplication(processType string, appGUID } updatedProcess.GUID = process.GUID - _, updateWarnings, err := actor.CloudControllerClient.UpdateProcess(ccv3.Process(updatedProcess)) + _, updateWarnings, err := actor.CloudControllerClient.UpdateProcess(resources.Process(updatedProcess)) allWarnings = append(allWarnings, Warnings(updateWarnings)...) if err != nil { return allWarnings, err diff --git a/actor/v7action/process_health_check_test.go b/actor/v7action/process_health_check_test.go index 5166c9c3c7f..dff70844760 100644 --- a/actor/v7action/process_health_check_test.go +++ b/actor/v7action/process_health_check_test.go @@ -1,6 +1,7 @@ package v7action_test import ( + "code.cloudfoundry.org/cli/resources" "errors" "code.cloudfoundry.org/cli/actor/actionerror" @@ -68,7 +69,7 @@ var _ = Describe("Process Health Check Actions", func() { When("application does not exist", func() { BeforeEach(func() { fakeCloudControllerClient.GetApplicationsReturns( - []ccv3.Application{}, + []resources.Application{}, ccv3.Warnings{"some-warning"}, nil, ) @@ -86,7 +87,7 @@ var _ = Describe("Process Health Check Actions", func() { BeforeEach(func() { expectedErr = errors.New("some-error") fakeCloudControllerClient.GetApplicationsReturns( - []ccv3.Application{}, + []resources.Application{}, ccv3.Warnings{"some-warning"}, expectedErr, ) @@ -101,7 +102,7 @@ var _ = Describe("Process Health Check Actions", func() { When("application exists", func() { BeforeEach(func() { fakeCloudControllerClient.GetApplicationsReturns( - []ccv3.Application{ + []resources.Application{ { GUID: "some-app-guid", }, @@ -117,7 +118,7 @@ var _ = Describe("Process Health Check Actions", func() { BeforeEach(func() { expectedErr = errors.New("some-error") fakeCloudControllerClient.GetApplicationProcessesReturns( - []ccv3.Process{}, + []resources.Process{}, ccv3.Warnings{"some-process-warning"}, expectedErr, ) @@ -132,7 +133,7 @@ var _ = Describe("Process Health Check Actions", func() { When("application has processes", func() { BeforeEach(func() { fakeCloudControllerClient.GetApplicationProcessesReturns( - []ccv3.Process{ + []resources.Process{ { GUID: "process-guid-1", Type: "process-type-1", diff --git a/actor/v7action/process_instance_test.go b/actor/v7action/process_instance_test.go index 5725b1efb14..989f3b0810f 100644 --- a/actor/v7action/process_instance_test.go +++ b/actor/v7action/process_instance_test.go @@ -1,6 +1,7 @@ package v7action_test import ( + "code.cloudfoundry.org/cli/resources" "errors" "time" @@ -48,7 +49,7 @@ var _ = Describe("instance actions", func() { When("getting the application returns an error", func() { BeforeEach(func() { - fakeCloudControllerClient.GetApplicationsReturns([]ccv3.Application{}, ccv3.Warnings{"some-get-app-warning"}, errors.New("some-get-app-error")) + fakeCloudControllerClient.GetApplicationsReturns([]resources.Application{}, ccv3.Warnings{"some-get-app-warning"}, errors.New("some-get-app-error")) }) It("returns all warnings and the error", func() { @@ -59,7 +60,7 @@ var _ = Describe("instance actions", func() { When("getting the application succeeds", func() { BeforeEach(func() { - fakeCloudControllerClient.GetApplicationsReturns([]ccv3.Application{{GUID: "some-app-guid"}}, ccv3.Warnings{"some-get-app-warning"}, nil) + fakeCloudControllerClient.GetApplicationsReturns([]resources.Application{{GUID: "some-app-guid"}}, ccv3.Warnings{"some-get-app-warning"}, nil) }) When("deleting the instance returns ProcessNotFoundError", func() { diff --git a/actor/v7action/process_test.go b/actor/v7action/process_test.go index b34885f1afd..036b798ccce 100644 --- a/actor/v7action/process_test.go +++ b/actor/v7action/process_test.go @@ -1,6 +1,7 @@ package v7action_test import ( + "code.cloudfoundry.org/cli/resources" "errors" "code.cloudfoundry.org/cli/actor/actionerror" @@ -48,7 +49,7 @@ var _ = Describe("Process Actions", func() { When("getting the application process is succesful", func() { BeforeEach(func() { fakeCloudControllerClient.GetApplicationProcessByTypeReturns( - ccv3.Process{ + resources.Process{ GUID: "some-process-guid", }, ccv3.Warnings{"some-process-warning"}, @@ -76,7 +77,7 @@ var _ = Describe("Process Actions", func() { When("the api returns a ProcessNotFoundError", func() { BeforeEach(func() { fakeCloudControllerClient.GetApplicationProcessByTypeReturns( - ccv3.Process{}, + resources.Process{}, ccv3.Warnings{"some-process-warning"}, ccerror.ProcessNotFoundError{}, ) @@ -92,7 +93,7 @@ var _ = Describe("Process Actions", func() { BeforeEach(func() { expectedErr = errors.New("some-error") fakeCloudControllerClient.GetApplicationProcessByTypeReturns( - ccv3.Process{}, + resources.Process{}, ccv3.Warnings{"some-process-warning"}, expectedErr, ) @@ -129,7 +130,7 @@ var _ = Describe("Process Actions", func() { When("no errors are encountered scaling the application process", func() { BeforeEach(func() { fakeCloudControllerClient.CreateApplicationProcessScaleReturns( - ccv3.Process{GUID: "some-process-guid"}, + resources.Process{GUID: "some-process-guid"}, ccv3.Warnings{"scale-process-warning"}, nil) }) @@ -141,7 +142,7 @@ var _ = Describe("Process Actions", func() { Expect(fakeCloudControllerClient.CreateApplicationProcessScaleCallCount()).To(Equal(1)) appGUIDArg, processArg := fakeCloudControllerClient.CreateApplicationProcessScaleArgsForCall(0) Expect(appGUIDArg).To(Equal("some-app-guid")) - Expect(processArg).To(Equal(ccv3.Process{ + Expect(processArg).To(Equal(resources.Process{ Type: constant.ProcessTypeWeb, Instances: passedProcess.Instances, MemoryInMB: passedProcess.MemoryInMB, @@ -156,7 +157,7 @@ var _ = Describe("Process Actions", func() { BeforeEach(func() { expectedErr = errors.New("scale process error") fakeCloudControllerClient.CreateApplicationProcessScaleReturns( - ccv3.Process{GUID: "some-process-guid"}, + resources.Process{GUID: "some-process-guid"}, ccv3.Warnings{"scale-process-warning"}, expectedErr) }) @@ -170,7 +171,7 @@ var _ = Describe("Process Actions", func() { When("a ProcessNotFoundError error is encountered scaling the application process", func() { BeforeEach(func() { fakeCloudControllerClient.CreateApplicationProcessScaleReturns( - ccv3.Process{GUID: "some-process-guid"}, + resources.Process{GUID: "some-process-guid"}, ccv3.Warnings{"scale-process-warning"}, ccerror.ProcessNotFoundError{}, ) @@ -221,7 +222,7 @@ var _ = Describe("Process Actions", func() { BeforeEach(func() { expectedErr = errors.New("some-error") fakeCloudControllerClient.GetApplicationProcessByTypeReturns( - ccv3.Process{}, + resources.Process{}, ccv3.Warnings{"some-process-warning"}, expectedErr, ) @@ -236,7 +237,7 @@ var _ = Describe("Process Actions", func() { When("application process exists", func() { BeforeEach(func() { fakeCloudControllerClient.GetApplicationProcessByTypeReturns( - ccv3.Process{ + resources.Process{ GUID: "some-process-guid", }, ccv3.Warnings{"some-process-warning"}, @@ -253,7 +254,7 @@ var _ = Describe("Process Actions", func() { expectedErr = errors.New("some-error") fakeCloudControllerClient.UpdateProcessReturns( - ccv3.Process{}, + resources.Process{}, ccv3.Warnings{"some-health-check-warning"}, expectedErr, ) @@ -268,7 +269,7 @@ var _ = Describe("Process Actions", func() { When("update the process is successful", func() { BeforeEach(func() { fakeCloudControllerClient.UpdateProcessReturns( - ccv3.Process{GUID: "some-process-guid"}, + resources.Process{GUID: "some-process-guid"}, ccv3.Warnings{"some-health-check-warning"}, nil, ) diff --git a/actor/v7action/relationship_list.go b/actor/v7action/relationship_list.go index 4a2b6e70297..534b5e8939b 100644 --- a/actor/v7action/relationship_list.go +++ b/actor/v7action/relationship_list.go @@ -1,10 +1,10 @@ package v7action import ( - "code.cloudfoundry.org/cli/api/cloudcontroller/ccv3" + "code.cloudfoundry.org/cli/resources" ) -type RelationshipList ccv3.RelationshipList +type RelationshipList resources.RelationshipList func (actor Actor) ShareServiceInstanceToSpaces(serviceInstanceGUID string, spaceGUIDs []string) (RelationshipList, Warnings, error) { relationshipList, warnings, err := actor.CloudControllerClient.ShareServiceInstanceToSpaces(serviceInstanceGUID, spaceGUIDs) diff --git a/actor/v7action/relationship_list_test.go b/actor/v7action/relationship_list_test.go index 7cf519f5ac8..9449eba9622 100644 --- a/actor/v7action/relationship_list_test.go +++ b/actor/v7action/relationship_list_test.go @@ -1,6 +1,7 @@ package v7action_test import ( + "code.cloudfoundry.org/cli/resources" "errors" . "code.cloudfoundry.org/cli/actor/v7action" @@ -43,10 +44,10 @@ var _ = Describe("Relationship List Actions", func() { }) When("no errors occur sharing the service instance", func() { - var returnedRelationshipList ccv3.RelationshipList + var returnedRelationshipList resources.RelationshipList BeforeEach(func() { - returnedRelationshipList = ccv3.RelationshipList{ + returnedRelationshipList = resources.RelationshipList{ GUIDs: []string{"some-space-guid"}, } fakeCloudControllerClient.ShareServiceInstanceToSpacesReturns( @@ -73,7 +74,7 @@ var _ = Describe("Relationship List Actions", func() { BeforeEach(func() { expectedErr = errors.New("share service instance error") fakeCloudControllerClient.ShareServiceInstanceToSpacesReturns( - ccv3.RelationshipList{}, + resources.RelationshipList{}, ccv3.Warnings{"share-service-instance-warning"}, expectedErr) }) diff --git a/actor/v7action/service_instance.go b/actor/v7action/service_instance.go index 65b03e107b4..863c3f37633 100644 --- a/actor/v7action/service_instance.go +++ b/actor/v7action/service_instance.go @@ -3,9 +3,10 @@ package v7action import ( "code.cloudfoundry.org/cli/actor/actionerror" "code.cloudfoundry.org/cli/api/cloudcontroller/ccv3" + "code.cloudfoundry.org/cli/resources" ) -type ServiceInstance ccv3.ServiceInstance +type ServiceInstance resources.ServiceInstance func (actor Actor) GetServiceInstanceByNameAndSpace(serviceInstanceName string, spaceGUID string) (ServiceInstance, Warnings, error) { serviceInstances, warnings, err := actor.CloudControllerClient.GetServiceInstances( diff --git a/actor/v7action/service_instance_test.go b/actor/v7action/service_instance_test.go index 56b2e17fcbb..1a4cfa0cd01 100644 --- a/actor/v7action/service_instance_test.go +++ b/actor/v7action/service_instance_test.go @@ -1,6 +1,7 @@ package v7action_test import ( + "code.cloudfoundry.org/cli/resources" "errors" "code.cloudfoundry.org/cli/actor/actionerror" @@ -45,7 +46,7 @@ var _ = Describe("Service Instance Actions", func() { When("the cloud controller request is successful", func() { When("the cloud controller returns one service instance", func() { BeforeEach(func() { - fakeCloudControllerClient.GetServiceInstancesReturns([]ccv3.ServiceInstance{ + fakeCloudControllerClient.GetServiceInstancesReturns([]resources.ServiceInstance{ { Name: "some-service-instance", GUID: "some-service-instance-guid", diff --git a/actor/v7action/space.go b/actor/v7action/space.go index c511a2a9c05..d80159f1f37 100644 --- a/actor/v7action/space.go +++ b/actor/v7action/space.go @@ -3,9 +3,10 @@ package v7action import ( "code.cloudfoundry.org/cli/actor/actionerror" "code.cloudfoundry.org/cli/api/cloudcontroller/ccv3" + "code.cloudfoundry.org/cli/resources" ) -type Space ccv3.Space +type Space resources.Space // ResetSpaceIsolationSegment disassociates a space from an isolation segment. // diff --git a/actor/v7action/space_test.go b/actor/v7action/space_test.go index 07aa5304569..ba4ffd58168 100644 --- a/actor/v7action/space_test.go +++ b/actor/v7action/space_test.go @@ -1,6 +1,7 @@ package v7action_test import ( + "code.cloudfoundry.org/cli/resources" "errors" "code.cloudfoundry.org/cli/actor/actionerror" @@ -27,7 +28,7 @@ var _ = Describe("Space", func() { When("the organization does not have a default isolation segment", func() { BeforeEach(func() { fakeCloudControllerClient.UpdateSpaceIsolationSegmentRelationshipReturns( - ccv3.Relationship{GUID: ""}, + resources.Relationship{GUID: ""}, ccv3.Warnings{"warning-1", "warning-2"}, nil) }) @@ -54,13 +55,13 @@ var _ = Describe("Space", func() { When("the organization has a default isolation segment", func() { BeforeEach(func() { fakeCloudControllerClient.UpdateSpaceIsolationSegmentRelationshipReturns( - ccv3.Relationship{GUID: ""}, + resources.Relationship{GUID: ""}, ccv3.Warnings{"warning-1", "warning-2"}, nil) fakeCloudControllerClient.GetOrganizationDefaultIsolationSegmentReturns( - ccv3.Relationship{GUID: "some-iso-guid"}, + resources.Relationship{GUID: "some-iso-guid"}, ccv3.Warnings{"warning-3", "warning-4"}, nil) fakeCloudControllerClient.GetIsolationSegmentReturns( - ccv3.IsolationSegment{Name: "some-iso-name"}, + resources.IsolationSegment{Name: "some-iso-name"}, ccv3.Warnings{"warning-5", "warning-6"}, nil) }) @@ -92,7 +93,7 @@ var _ = Describe("Space", func() { BeforeEach(func() { expectedErr = errors.New("some error") fakeCloudControllerClient.UpdateSpaceIsolationSegmentRelationshipReturns( - ccv3.Relationship{GUID: ""}, + resources.Relationship{GUID: ""}, ccv3.Warnings{"warning-1", "warning-2"}, expectedErr) }) @@ -109,10 +110,10 @@ var _ = Describe("Space", func() { BeforeEach(func() { expectedErr = errors.New("some error") fakeCloudControllerClient.UpdateSpaceIsolationSegmentRelationshipReturns( - ccv3.Relationship{GUID: ""}, + resources.Relationship{GUID: ""}, ccv3.Warnings{"warning-1", "warning-2"}, nil) fakeCloudControllerClient.GetOrganizationDefaultIsolationSegmentReturns( - ccv3.Relationship{GUID: "some-iso-guid"}, + resources.Relationship{GUID: "some-iso-guid"}, ccv3.Warnings{"warning-3", "warning-4"}, expectedErr) }) @@ -129,13 +130,13 @@ var _ = Describe("Space", func() { BeforeEach(func() { expectedErr = errors.New("some error") fakeCloudControllerClient.UpdateSpaceIsolationSegmentRelationshipReturns( - ccv3.Relationship{GUID: ""}, + resources.Relationship{GUID: ""}, ccv3.Warnings{"warning-1", "warning-2"}, nil) fakeCloudControllerClient.GetOrganizationDefaultIsolationSegmentReturns( - ccv3.Relationship{GUID: "some-iso-guid"}, + resources.Relationship{GUID: "some-iso-guid"}, ccv3.Warnings{"warning-3", "warning-4"}, nil) fakeCloudControllerClient.GetIsolationSegmentReturns( - ccv3.IsolationSegment{Name: "some-iso-name"}, + resources.IsolationSegment{Name: "some-iso-name"}, ccv3.Warnings{"warning-5", "warning-6"}, expectedErr) }) @@ -170,7 +171,7 @@ var _ = Describe("Space", func() { When("the cloud controller returns back one space", func() { BeforeEach(func() { fakeCloudControllerClient.GetSpacesReturns( - []ccv3.Space{{GUID: "some-space-guid", Name: spaceName}}, + []resources.Space{{GUID: "some-space-guid", Name: spaceName}}, ccv3.Warnings{"some-space-warning"}, nil) }) @@ -225,7 +226,7 @@ var _ = Describe("Space", func() { When("there are spaces in the org", func() { BeforeEach(func() { fakeCloudControllerClient.GetSpacesReturns( - []ccv3.Space{ + []resources.Space{ { GUID: "space-1-guid", Name: "space-1", @@ -273,7 +274,7 @@ var _ = Describe("Space", func() { BeforeEach(func() { returnedErr = errors.New("cc-get-spaces-error") fakeCloudControllerClient.GetSpacesReturns( - []ccv3.Space{}, + []resources.Space{}, ccv3.Warnings{"warning-1", "warning-2"}, returnedErr, ) diff --git a/actor/v7action/ssh_test.go b/actor/v7action/ssh_test.go index 47bdb7fab4d..7ced1930095 100644 --- a/actor/v7action/ssh_test.go +++ b/actor/v7action/ssh_test.go @@ -1,6 +1,7 @@ package v7action_test import ( + "code.cloudfoundry.org/cli/resources" "errors" "code.cloudfoundry.org/cli/actor/actionerror" @@ -104,7 +105,7 @@ var _ = Describe("SSH Actions", func() { When("getting the application succeeds with a started application", func() { BeforeEach(func() { fakeCloudControllerClient.GetApplicationsReturns( - []ccv3.Application{ + []resources.Application{ {Name: "some-app", State: constant.ApplicationStarted}, }, ccv3.Warnings{"some-app-warnings"}, @@ -125,7 +126,7 @@ var _ = Describe("SSH Actions", func() { When("getting the process summaries succeeds", func() { When("the process does not exist", func() { BeforeEach(func() { - fakeCloudControllerClient.GetApplicationProcessesReturns([]ccv3.Process{}, ccv3.Warnings{"some-process-warnings"}, nil) + fakeCloudControllerClient.GetApplicationProcessesReturns([]resources.Process{}, ccv3.Warnings{"some-process-warnings"}, nil) }) It("returns all warnings and the error", func() { @@ -136,8 +137,8 @@ var _ = Describe("SSH Actions", func() { When("the process doesn't have the specified instance index", func() { BeforeEach(func() { - fakeCloudControllerClient.GetApplicationsReturns([]ccv3.Application{{Name: "some-app", State: constant.ApplicationStarted}}, ccv3.Warnings{"some-app-warnings"}, nil) - fakeCloudControllerClient.GetApplicationProcessesReturns([]ccv3.Process{{Type: "some-process-type", GUID: "some-process-guid"}}, ccv3.Warnings{"some-process-warnings"}, nil) + fakeCloudControllerClient.GetApplicationsReturns([]resources.Application{{Name: "some-app", State: constant.ApplicationStarted}}, ccv3.Warnings{"some-app-warnings"}, nil) + fakeCloudControllerClient.GetApplicationProcessesReturns([]resources.Process{{Type: "some-process-type", GUID: "some-process-guid"}}, ccv3.Warnings{"some-process-warnings"}, nil) }) It("returns a ProcessIndexNotFoundError", func() { @@ -147,8 +148,8 @@ var _ = Describe("SSH Actions", func() { When("the process instance is not RUNNING", func() { BeforeEach(func() { - fakeCloudControllerClient.GetApplicationsReturns([]ccv3.Application{{Name: "some-app", State: constant.ApplicationStarted}}, ccv3.Warnings{"some-app-warnings"}, nil) - fakeCloudControllerClient.GetApplicationProcessesReturns([]ccv3.Process{{Type: "some-process-type", GUID: "some-process-guid"}}, ccv3.Warnings{"some-process-warnings"}, nil) + fakeCloudControllerClient.GetApplicationsReturns([]resources.Application{{Name: "some-app", State: constant.ApplicationStarted}}, ccv3.Warnings{"some-app-warnings"}, nil) + fakeCloudControllerClient.GetApplicationProcessesReturns([]resources.Process{{Type: "some-process-type", GUID: "some-process-guid"}}, ccv3.Warnings{"some-process-warnings"}, nil) fakeCloudControllerClient.GetProcessInstancesReturns([]ccv3.ProcessInstance{{State: constant.ProcessInstanceDown, Index: 0}}, ccv3.Warnings{"some-instance-warnings"}, nil) }) @@ -159,8 +160,8 @@ var _ = Describe("SSH Actions", func() { When("the specified process and index exist and the instance is RUNNING", func() { BeforeEach(func() { - fakeCloudControllerClient.GetApplicationsReturns([]ccv3.Application{{Name: "some-app", State: constant.ApplicationStarted}}, ccv3.Warnings{"some-app-warnings"}, nil) - fakeCloudControllerClient.GetApplicationProcessesReturns([]ccv3.Process{{Type: "some-process-type", GUID: "some-process-guid"}}, ccv3.Warnings{"some-process-warnings"}, nil) + fakeCloudControllerClient.GetApplicationsReturns([]resources.Application{{Name: "some-app", State: constant.ApplicationStarted}}, ccv3.Warnings{"some-app-warnings"}, nil) + fakeCloudControllerClient.GetApplicationProcessesReturns([]resources.Process{{Type: "some-process-type", GUID: "some-process-guid"}}, ccv3.Warnings{"some-process-warnings"}, nil) fakeCloudControllerClient.GetProcessInstancesReturns([]ccv3.ProcessInstance{{State: constant.ProcessInstanceRunning, Index: 0}}, ccv3.Warnings{"some-instance-warnings"}, nil) }) @@ -190,7 +191,7 @@ var _ = Describe("SSH Actions", func() { When("getting the application succeeds with a stopped application", func() { BeforeEach(func() { fakeCloudControllerClient.GetApplicationsReturns( - []ccv3.Application{ + []resources.Application{ {Name: "some-app", State: constant.ApplicationStopped}, }, ccv3.Warnings{"some-app-warnings"}, diff --git a/actor/v7action/stack.go b/actor/v7action/stack.go index ecff0e8734e..51f0e2ae7f9 100644 --- a/actor/v7action/stack.go +++ b/actor/v7action/stack.go @@ -3,9 +3,10 @@ package v7action import ( "code.cloudfoundry.org/cli/actor/actionerror" "code.cloudfoundry.org/cli/api/cloudcontroller/ccv3" + "code.cloudfoundry.org/cli/resources" ) -type Stack ccv3.Stack +type Stack resources.Stack func (actor *Actor) GetStackByName(stackName string) (Stack, Warnings, error) { stacks, warnings, err := actor.CloudControllerClient.GetStacks( diff --git a/actor/v7action/stack_test.go b/actor/v7action/stack_test.go index 1a1320c5a26..4a23235afd1 100644 --- a/actor/v7action/stack_test.go +++ b/actor/v7action/stack_test.go @@ -5,6 +5,7 @@ import ( . "code.cloudfoundry.org/cli/actor/v7action" "code.cloudfoundry.org/cli/actor/v7action/v7actionfakes" "code.cloudfoundry.org/cli/api/cloudcontroller/ccv3" + "code.cloudfoundry.org/cli/resources" "errors" . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" @@ -38,7 +39,7 @@ var _ = Describe("Stack", func() { BeforeEach(func() { expectedErr = errors.New("CC Error") fakeCloudControllerClient.GetStacksReturns( - []ccv3.Stack{}, + []resources.Stack{}, ccv3.Warnings{"warning-1", "warning-2"}, expectedErr, ) @@ -53,7 +54,7 @@ var _ = Describe("Stack", func() { When("The stack does not exist", func() { BeforeEach(func() { fakeCloudControllerClient.GetStacksReturns( - []ccv3.Stack{}, + []resources.Stack{}, ccv3.Warnings{"warning-1", "warning-2"}, actionerror.StackNotFoundError{Name: "some-stack-name"}, ) @@ -69,7 +70,7 @@ var _ = Describe("Stack", func() { Context("When there are no errors", func() { When("The stack exists", func() { - expectedStack := ccv3.Stack{ + expectedStack := resources.Stack{ GUID: "some-stack-guid", Name: "some-stack-name", Description: "Some stack desc", @@ -79,7 +80,7 @@ var _ = Describe("Stack", func() { BeforeEach(func() { fakeCloudControllerClient.GetStacksReturns( - []ccv3.Stack{expectedStack}, + []resources.Stack{expectedStack}, ccv3.Warnings{"warning-1", "warning-2"}, nil, ) @@ -102,7 +103,7 @@ var _ = Describe("Stack", func() { Describe("GetStacks", func() { var ( - ccv3Stacks []ccv3.Stack + ccv3Stacks []resources.Stack stacks []Stack stack1Name string @@ -115,7 +116,7 @@ var _ = Describe("Stack", func() { ) BeforeEach(func() { - ccv3Stacks = []ccv3.Stack{ + ccv3Stacks = []resources.Stack{ {Name: stack1Name, Description: stack1Description}, {Name: stack2Name, Description: stack2Description}, } @@ -131,7 +132,7 @@ var _ = Describe("Stack", func() { BeforeEach(func() { expectedErr = errors.New("some error") fakeCloudControllerClient.GetStacksReturns( - []ccv3.Stack{}, + []resources.Stack{}, ccv3.Warnings{"warning-1", "warning-2"}, expectedErr) }) diff --git a/actor/v7action/task.go b/actor/v7action/task.go index ad06151dba6..bcbfff5726e 100644 --- a/actor/v7action/task.go +++ b/actor/v7action/task.go @@ -1,6 +1,7 @@ package v7action import ( + "code.cloudfoundry.org/cli/resources" "strconv" "sort" @@ -11,12 +12,12 @@ import ( ) // Task represents a V3 actor Task. -type Task ccv3.Task +type Task resources.Task // RunTask runs the provided command in the application environment associated // with the provided application GUID. func (actor Actor) RunTask(appGUID string, task Task) (Task, Warnings, error) { - createdTask, warnings, err := actor.CloudControllerClient.CreateApplicationTask(appGUID, ccv3.Task(task)) + createdTask, warnings, err := actor.CloudControllerClient.CreateApplicationTask(appGUID, resources.Task(task)) if err != nil { if e, ok := err.(ccerror.TaskWorkersUnavailableError); ok { return Task{}, Warnings(warnings), actionerror.TaskWorkersUnavailableError{Message: e.Error()} diff --git a/actor/v7action/task_test.go b/actor/v7action/task_test.go index b4b953a4dfd..44e0f88454a 100644 --- a/actor/v7action/task_test.go +++ b/actor/v7action/task_test.go @@ -1,6 +1,7 @@ package v7action_test import ( + "code.cloudfoundry.org/cli/resources" "errors" "code.cloudfoundry.org/cli/actor/actionerror" @@ -28,7 +29,7 @@ var _ = Describe("Task Actions", func() { When("the application exists", func() { BeforeEach(func() { fakeCloudControllerClient.CreateApplicationTaskReturns( - ccv3.Task{ + resources.Task{ SequenceID: 3, }, ccv3.Warnings{ @@ -57,7 +58,7 @@ var _ = Describe("Task Actions", func() { Expect(fakeCloudControllerClient.CreateApplicationTaskCallCount()).To(Equal(1)) appGUIDArg, taskArg := fakeCloudControllerClient.CreateApplicationTaskArgsForCall(0) Expect(appGUIDArg).To(Equal("some-app-guid")) - Expect(taskArg).To(Equal(ccv3.Task(expectedTask))) + Expect(taskArg).To(Equal(resources.Task(expectedTask))) }) }) @@ -74,7 +75,7 @@ var _ = Describe("Task Actions", func() { BeforeEach(func() { expectedErr = errors.New("I am a CloudControllerClient Error") fakeCloudControllerClient.CreateApplicationTaskReturns( - ccv3.Task{}, + resources.Task{}, ccv3.Warnings{"warning-1", "warning-2"}, expectedErr, ) @@ -89,7 +90,7 @@ var _ = Describe("Task Actions", func() { When("the error is a TaskWorkersUnavailableError", func() { BeforeEach(func() { fakeCloudControllerClient.CreateApplicationTaskReturns( - ccv3.Task{}, + resources.Task{}, ccv3.Warnings{"warning-1", "warning-2"}, ccerror.TaskWorkersUnavailableError{Message: "banana babans"}, ) @@ -107,13 +108,13 @@ var _ = Describe("Task Actions", func() { When("the application exists", func() { When("there are associated tasks", func() { var ( - task1 ccv3.Task - task2 ccv3.Task - task3 ccv3.Task + task1 resources.Task + task2 resources.Task + task3 resources.Task ) BeforeEach(func() { - task1 = ccv3.Task{ + task1 = resources.Task{ GUID: "task-1-guid", SequenceID: 1, Name: "task-1", @@ -121,7 +122,7 @@ var _ = Describe("Task Actions", func() { CreatedAt: "some-time", Command: "some-command", } - task2 = ccv3.Task{ + task2 = resources.Task{ GUID: "task-2-guid", SequenceID: 2, Name: "task-2", @@ -129,7 +130,7 @@ var _ = Describe("Task Actions", func() { CreatedAt: "some-time", Command: "some-command", } - task3 = ccv3.Task{ + task3 = resources.Task{ GUID: "task-3-guid", SequenceID: 3, Name: "task-3", @@ -138,7 +139,7 @@ var _ = Describe("Task Actions", func() { Command: "some-command", } fakeCloudControllerClient.GetApplicationTasksReturns( - []ccv3.Task{task3, task1, task2}, + []resources.Task{task3, task1, task2}, ccv3.Warnings{"warning-1", "warning-2"}, nil, ) @@ -167,7 +168,7 @@ var _ = Describe("Task Actions", func() { When("there are no associated tasks", func() { BeforeEach(func() { fakeCloudControllerClient.GetApplicationTasksReturns( - []ccv3.Task{}, + []resources.Task{}, nil, nil, ) @@ -187,7 +188,7 @@ var _ = Describe("Task Actions", func() { BeforeEach(func() { expectedErr = errors.New("I am a CloudControllerClient Error") fakeCloudControllerClient.GetApplicationTasksReturns( - []ccv3.Task{}, + []resources.Task{}, ccv3.Warnings{"warning-1", "warning-2"}, expectedErr, ) @@ -204,15 +205,15 @@ var _ = Describe("Task Actions", func() { Describe("GetTaskBySequenceIDAndApplication", func() { When("the cloud controller client does not return an error", func() { When("the task is found", func() { - var task1 ccv3.Task + var task1 resources.Task BeforeEach(func() { - task1 = ccv3.Task{ + task1 = resources.Task{ GUID: "task-1-guid", SequenceID: 1, } fakeCloudControllerClient.GetApplicationTasksReturns( - []ccv3.Task{task1}, + []resources.Task{task1}, ccv3.Warnings{"get-task-warning-1"}, nil, ) @@ -229,7 +230,7 @@ var _ = Describe("Task Actions", func() { When("the task is not found", func() { BeforeEach(func() { fakeCloudControllerClient.GetApplicationTasksReturns( - []ccv3.Task{}, + []resources.Task{}, ccv3.Warnings{"get-task-warning-1"}, nil, ) @@ -249,7 +250,7 @@ var _ = Describe("Task Actions", func() { BeforeEach(func() { expectedErr = errors.New("generic-error") fakeCloudControllerClient.GetApplicationTasksReturns( - []ccv3.Task{}, + []resources.Task{}, ccv3.Warnings{"get-task-warning-1"}, expectedErr, ) @@ -265,10 +266,10 @@ var _ = Describe("Task Actions", func() { Describe("TerminateTask", func() { When("the task exists", func() { - var returnedTask ccv3.Task + var returnedTask resources.Task BeforeEach(func() { - returnedTask = ccv3.Task{ + returnedTask = resources.Task{ GUID: "some-task-guid", SequenceID: 1, } @@ -292,7 +293,7 @@ var _ = Describe("Task Actions", func() { BeforeEach(func() { expectedErr = errors.New("cc-error") fakeCloudControllerClient.UpdateTaskCancelReturns( - ccv3.Task{}, + resources.Task{}, ccv3.Warnings{"update-task-warning"}, expectedErr) }) diff --git a/actor/v7action/v7actionfakes/fake_cloud_controller_client.go b/actor/v7action/v7actionfakes/fake_cloud_controller_client.go index 9250f970134..99ecb93937a 100644 --- a/actor/v7action/v7actionfakes/fake_cloud_controller_client.go +++ b/actor/v7action/v7actionfakes/fake_cloud_controller_client.go @@ -2,6 +2,7 @@ package v7actionfakes import ( + "code.cloudfoundry.org/cli/resources" "io" "sync" @@ -40,125 +41,125 @@ type FakeCloudControllerClient struct { cloudControllerAPIVersionReturnsOnCall map[int]struct { result1 string } - CreateApplicationStub func(ccv3.Application) (ccv3.Application, ccv3.Warnings, error) + CreateApplicationStub func(resources.Application) (resources.Application, ccv3.Warnings, error) createApplicationMutex sync.RWMutex createApplicationArgsForCall []struct { - arg1 ccv3.Application + arg1 resources.Application } createApplicationReturns struct { - result1 ccv3.Application + result1 resources.Application result2 ccv3.Warnings result3 error } createApplicationReturnsOnCall map[int]struct { - result1 ccv3.Application + result1 resources.Application result2 ccv3.Warnings result3 error } - CreateApplicationProcessScaleStub func(string, ccv3.Process) (ccv3.Process, ccv3.Warnings, error) + CreateApplicationProcessScaleStub func(string, resources.Process) (resources.Process, ccv3.Warnings, error) createApplicationProcessScaleMutex sync.RWMutex createApplicationProcessScaleArgsForCall []struct { arg1 string - arg2 ccv3.Process + arg2 resources.Process } createApplicationProcessScaleReturns struct { - result1 ccv3.Process + result1 resources.Process result2 ccv3.Warnings result3 error } createApplicationProcessScaleReturnsOnCall map[int]struct { - result1 ccv3.Process + result1 resources.Process result2 ccv3.Warnings result3 error } - CreateApplicationTaskStub func(string, ccv3.Task) (ccv3.Task, ccv3.Warnings, error) + CreateApplicationTaskStub func(string, resources.Task) (resources.Task, ccv3.Warnings, error) createApplicationTaskMutex sync.RWMutex createApplicationTaskArgsForCall []struct { arg1 string - arg2 ccv3.Task + arg2 resources.Task } createApplicationTaskReturns struct { - result1 ccv3.Task + result1 resources.Task result2 ccv3.Warnings result3 error } createApplicationTaskReturnsOnCall map[int]struct { - result1 ccv3.Task + result1 resources.Task result2 ccv3.Warnings result3 error } - CreateBuildStub func(ccv3.Build) (ccv3.Build, ccv3.Warnings, error) + CreateBuildStub func(resources.Build) (resources.Build, ccv3.Warnings, error) createBuildMutex sync.RWMutex createBuildArgsForCall []struct { - arg1 ccv3.Build + arg1 resources.Build } createBuildReturns struct { - result1 ccv3.Build + result1 resources.Build result2 ccv3.Warnings result3 error } createBuildReturnsOnCall map[int]struct { - result1 ccv3.Build + result1 resources.Build result2 ccv3.Warnings result3 error } - CreateBuildpackStub func(ccv3.Buildpack) (ccv3.Buildpack, ccv3.Warnings, error) + CreateBuildpackStub func(resources.Buildpack) (resources.Buildpack, ccv3.Warnings, error) createBuildpackMutex sync.RWMutex createBuildpackArgsForCall []struct { - arg1 ccv3.Buildpack + arg1 resources.Buildpack } createBuildpackReturns struct { - result1 ccv3.Buildpack + result1 resources.Buildpack result2 ccv3.Warnings result3 error } createBuildpackReturnsOnCall map[int]struct { - result1 ccv3.Buildpack + result1 resources.Buildpack result2 ccv3.Warnings result3 error } - CreateDomainStub func(ccv3.Domain) (ccv3.Domain, ccv3.Warnings, error) + CreateDomainStub func(resources.Domain) (resources.Domain, ccv3.Warnings, error) createDomainMutex sync.RWMutex createDomainArgsForCall []struct { - arg1 ccv3.Domain + arg1 resources.Domain } createDomainReturns struct { - result1 ccv3.Domain + result1 resources.Domain result2 ccv3.Warnings result3 error } createDomainReturnsOnCall map[int]struct { - result1 ccv3.Domain + result1 resources.Domain result2 ccv3.Warnings result3 error } - CreateIsolationSegmentStub func(ccv3.IsolationSegment) (ccv3.IsolationSegment, ccv3.Warnings, error) + CreateIsolationSegmentStub func(resources.IsolationSegment) (resources.IsolationSegment, ccv3.Warnings, error) createIsolationSegmentMutex sync.RWMutex createIsolationSegmentArgsForCall []struct { - arg1 ccv3.IsolationSegment + arg1 resources.IsolationSegment } createIsolationSegmentReturns struct { - result1 ccv3.IsolationSegment + result1 resources.IsolationSegment result2 ccv3.Warnings result3 error } createIsolationSegmentReturnsOnCall map[int]struct { - result1 ccv3.IsolationSegment + result1 resources.IsolationSegment result2 ccv3.Warnings result3 error } - CreatePackageStub func(ccv3.Package) (ccv3.Package, ccv3.Warnings, error) + CreatePackageStub func(resources.Package) (resources.Package, ccv3.Warnings, error) createPackageMutex sync.RWMutex createPackageArgsForCall []struct { - arg1 ccv3.Package + arg1 resources.Package } createPackageReturns struct { - result1 ccv3.Package + result1 resources.Package result2 ccv3.Warnings result3 error } createPackageReturnsOnCall map[int]struct { - result1 ccv3.Package + result1 resources.Package result2 ccv3.Warnings result3 error } @@ -263,34 +264,34 @@ type FakeCloudControllerClient struct { result1 ccv3.Warnings result2 error } - EntitleIsolationSegmentToOrganizationsStub func(string, []string) (ccv3.RelationshipList, ccv3.Warnings, error) + EntitleIsolationSegmentToOrganizationsStub func(string, []string) (resources.RelationshipList, ccv3.Warnings, error) entitleIsolationSegmentToOrganizationsMutex sync.RWMutex entitleIsolationSegmentToOrganizationsArgsForCall []struct { arg1 string arg2 []string } entitleIsolationSegmentToOrganizationsReturns struct { - result1 ccv3.RelationshipList + result1 resources.RelationshipList result2 ccv3.Warnings result3 error } entitleIsolationSegmentToOrganizationsReturnsOnCall map[int]struct { - result1 ccv3.RelationshipList + result1 resources.RelationshipList result2 ccv3.Warnings result3 error } - GetApplicationDropletCurrentStub func(string) (ccv3.Droplet, ccv3.Warnings, error) + GetApplicationDropletCurrentStub func(string) (resources.Droplet, ccv3.Warnings, error) getApplicationDropletCurrentMutex sync.RWMutex getApplicationDropletCurrentArgsForCall []struct { arg1 string } getApplicationDropletCurrentReturns struct { - result1 ccv3.Droplet + result1 resources.Droplet result2 ccv3.Warnings result3 error } getApplicationDropletCurrentReturnsOnCall map[int]struct { - result1 ccv3.Droplet + result1 resources.Droplet result2 ccv3.Warnings result3 error } @@ -324,290 +325,290 @@ type FakeCloudControllerClient struct { result2 ccv3.Warnings result3 error } - GetApplicationProcessByTypeStub func(string, string) (ccv3.Process, ccv3.Warnings, error) + GetApplicationProcessByTypeStub func(string, string) (resources.Process, ccv3.Warnings, error) getApplicationProcessByTypeMutex sync.RWMutex getApplicationProcessByTypeArgsForCall []struct { arg1 string arg2 string } getApplicationProcessByTypeReturns struct { - result1 ccv3.Process + result1 resources.Process result2 ccv3.Warnings result3 error } getApplicationProcessByTypeReturnsOnCall map[int]struct { - result1 ccv3.Process + result1 resources.Process result2 ccv3.Warnings result3 error } - GetApplicationProcessesStub func(string) ([]ccv3.Process, ccv3.Warnings, error) + GetApplicationProcessesStub func(string) ([]resources.Process, ccv3.Warnings, error) getApplicationProcessesMutex sync.RWMutex getApplicationProcessesArgsForCall []struct { arg1 string } getApplicationProcessesReturns struct { - result1 []ccv3.Process + result1 []resources.Process result2 ccv3.Warnings result3 error } getApplicationProcessesReturnsOnCall map[int]struct { - result1 []ccv3.Process + result1 []resources.Process result2 ccv3.Warnings result3 error } - GetApplicationTasksStub func(string, ...ccv3.Query) ([]ccv3.Task, ccv3.Warnings, error) + GetApplicationTasksStub func(string, ...ccv3.Query) ([]resources.Task, ccv3.Warnings, error) getApplicationTasksMutex sync.RWMutex getApplicationTasksArgsForCall []struct { arg1 string arg2 []ccv3.Query } getApplicationTasksReturns struct { - result1 []ccv3.Task + result1 []resources.Task result2 ccv3.Warnings result3 error } getApplicationTasksReturnsOnCall map[int]struct { - result1 []ccv3.Task + result1 []resources.Task result2 ccv3.Warnings result3 error } - GetApplicationsStub func(...ccv3.Query) ([]ccv3.Application, ccv3.Warnings, error) + GetApplicationsStub func(...ccv3.Query) ([]resources.Application, ccv3.Warnings, error) getApplicationsMutex sync.RWMutex getApplicationsArgsForCall []struct { arg1 []ccv3.Query } getApplicationsReturns struct { - result1 []ccv3.Application + result1 []resources.Application result2 ccv3.Warnings result3 error } getApplicationsReturnsOnCall map[int]struct { - result1 []ccv3.Application + result1 []resources.Application result2 ccv3.Warnings result3 error } - GetBuildStub func(string) (ccv3.Build, ccv3.Warnings, error) + GetBuildStub func(string) (resources.Build, ccv3.Warnings, error) getBuildMutex sync.RWMutex getBuildArgsForCall []struct { arg1 string } getBuildReturns struct { - result1 ccv3.Build + result1 resources.Build result2 ccv3.Warnings result3 error } getBuildReturnsOnCall map[int]struct { - result1 ccv3.Build + result1 resources.Build result2 ccv3.Warnings result3 error } - GetBuildpacksStub func(...ccv3.Query) ([]ccv3.Buildpack, ccv3.Warnings, error) + GetBuildpacksStub func(...ccv3.Query) ([]resources.Buildpack, ccv3.Warnings, error) getBuildpacksMutex sync.RWMutex getBuildpacksArgsForCall []struct { arg1 []ccv3.Query } getBuildpacksReturns struct { - result1 []ccv3.Buildpack + result1 []resources.Buildpack result2 ccv3.Warnings result3 error } getBuildpacksReturnsOnCall map[int]struct { - result1 []ccv3.Buildpack + result1 []resources.Buildpack result2 ccv3.Warnings result3 error } - GetDomainsStub func(...ccv3.Query) ([]ccv3.Domain, ccv3.Warnings, error) + GetDomainsStub func(...ccv3.Query) ([]resources.Domain, ccv3.Warnings, error) getDomainsMutex sync.RWMutex getDomainsArgsForCall []struct { arg1 []ccv3.Query } getDomainsReturns struct { - result1 []ccv3.Domain + result1 []resources.Domain result2 ccv3.Warnings result3 error } getDomainsReturnsOnCall map[int]struct { - result1 []ccv3.Domain + result1 []resources.Domain result2 ccv3.Warnings result3 error } - GetDropletStub func(string) (ccv3.Droplet, ccv3.Warnings, error) + GetDropletStub func(string) (resources.Droplet, ccv3.Warnings, error) getDropletMutex sync.RWMutex getDropletArgsForCall []struct { arg1 string } getDropletReturns struct { - result1 ccv3.Droplet + result1 resources.Droplet result2 ccv3.Warnings result3 error } getDropletReturnsOnCall map[int]struct { - result1 ccv3.Droplet + result1 resources.Droplet result2 ccv3.Warnings result3 error } - GetDropletsStub func(...ccv3.Query) ([]ccv3.Droplet, ccv3.Warnings, error) + GetDropletsStub func(...ccv3.Query) ([]resources.Droplet, ccv3.Warnings, error) getDropletsMutex sync.RWMutex getDropletsArgsForCall []struct { arg1 []ccv3.Query } getDropletsReturns struct { - result1 []ccv3.Droplet + result1 []resources.Droplet result2 ccv3.Warnings result3 error } getDropletsReturnsOnCall map[int]struct { - result1 []ccv3.Droplet + result1 []resources.Droplet result2 ccv3.Warnings result3 error } - GetFeatureFlagStub func(string) (ccv3.FeatureFlag, ccv3.Warnings, error) + GetFeatureFlagStub func(string) (resources.FeatureFlag, ccv3.Warnings, error) getFeatureFlagMutex sync.RWMutex getFeatureFlagArgsForCall []struct { arg1 string } getFeatureFlagReturns struct { - result1 ccv3.FeatureFlag + result1 resources.FeatureFlag result2 ccv3.Warnings result3 error } getFeatureFlagReturnsOnCall map[int]struct { - result1 ccv3.FeatureFlag + result1 resources.FeatureFlag result2 ccv3.Warnings result3 error } - GetFeatureFlagsStub func() ([]ccv3.FeatureFlag, ccv3.Warnings, error) + GetFeatureFlagsStub func() ([]resources.FeatureFlag, ccv3.Warnings, error) getFeatureFlagsMutex sync.RWMutex getFeatureFlagsArgsForCall []struct { } getFeatureFlagsReturns struct { - result1 []ccv3.FeatureFlag + result1 []resources.FeatureFlag result2 ccv3.Warnings result3 error } getFeatureFlagsReturnsOnCall map[int]struct { - result1 []ccv3.FeatureFlag + result1 []resources.FeatureFlag result2 ccv3.Warnings result3 error } - GetIsolationSegmentStub func(string) (ccv3.IsolationSegment, ccv3.Warnings, error) + GetIsolationSegmentStub func(string) (resources.IsolationSegment, ccv3.Warnings, error) getIsolationSegmentMutex sync.RWMutex getIsolationSegmentArgsForCall []struct { arg1 string } getIsolationSegmentReturns struct { - result1 ccv3.IsolationSegment + result1 resources.IsolationSegment result2 ccv3.Warnings result3 error } getIsolationSegmentReturnsOnCall map[int]struct { - result1 ccv3.IsolationSegment + result1 resources.IsolationSegment result2 ccv3.Warnings result3 error } - GetIsolationSegmentOrganizationsStub func(string) ([]ccv3.Organization, ccv3.Warnings, error) + GetIsolationSegmentOrganizationsStub func(string) ([]resources.Organization, ccv3.Warnings, error) getIsolationSegmentOrganizationsMutex sync.RWMutex getIsolationSegmentOrganizationsArgsForCall []struct { arg1 string } getIsolationSegmentOrganizationsReturns struct { - result1 []ccv3.Organization + result1 []resources.Organization result2 ccv3.Warnings result3 error } getIsolationSegmentOrganizationsReturnsOnCall map[int]struct { - result1 []ccv3.Organization + result1 []resources.Organization result2 ccv3.Warnings result3 error } - GetIsolationSegmentsStub func(...ccv3.Query) ([]ccv3.IsolationSegment, ccv3.Warnings, error) + GetIsolationSegmentsStub func(...ccv3.Query) ([]resources.IsolationSegment, ccv3.Warnings, error) getIsolationSegmentsMutex sync.RWMutex getIsolationSegmentsArgsForCall []struct { arg1 []ccv3.Query } getIsolationSegmentsReturns struct { - result1 []ccv3.IsolationSegment + result1 []resources.IsolationSegment result2 ccv3.Warnings result3 error } getIsolationSegmentsReturnsOnCall map[int]struct { - result1 []ccv3.IsolationSegment + result1 []resources.IsolationSegment result2 ccv3.Warnings result3 error } - GetOrganizationDefaultIsolationSegmentStub func(string) (ccv3.Relationship, ccv3.Warnings, error) + GetOrganizationDefaultIsolationSegmentStub func(string) (resources.Relationship, ccv3.Warnings, error) getOrganizationDefaultIsolationSegmentMutex sync.RWMutex getOrganizationDefaultIsolationSegmentArgsForCall []struct { arg1 string } getOrganizationDefaultIsolationSegmentReturns struct { - result1 ccv3.Relationship + result1 resources.Relationship result2 ccv3.Warnings result3 error } getOrganizationDefaultIsolationSegmentReturnsOnCall map[int]struct { - result1 ccv3.Relationship + result1 resources.Relationship result2 ccv3.Warnings result3 error } - GetOrganizationDomainsStub func(string, ...ccv3.Query) ([]ccv3.Domain, ccv3.Warnings, error) + GetOrganizationDomainsStub func(string, ...ccv3.Query) ([]resources.Domain, ccv3.Warnings, error) getOrganizationDomainsMutex sync.RWMutex getOrganizationDomainsArgsForCall []struct { arg1 string arg2 []ccv3.Query } getOrganizationDomainsReturns struct { - result1 []ccv3.Domain + result1 []resources.Domain result2 ccv3.Warnings result3 error } getOrganizationDomainsReturnsOnCall map[int]struct { - result1 []ccv3.Domain + result1 []resources.Domain result2 ccv3.Warnings result3 error } - GetOrganizationsStub func(...ccv3.Query) ([]ccv3.Organization, ccv3.Warnings, error) + GetOrganizationsStub func(...ccv3.Query) ([]resources.Organization, ccv3.Warnings, error) getOrganizationsMutex sync.RWMutex getOrganizationsArgsForCall []struct { arg1 []ccv3.Query } getOrganizationsReturns struct { - result1 []ccv3.Organization + result1 []resources.Organization result2 ccv3.Warnings result3 error } getOrganizationsReturnsOnCall map[int]struct { - result1 []ccv3.Organization + result1 []resources.Organization result2 ccv3.Warnings result3 error } - GetPackageStub func(string) (ccv3.Package, ccv3.Warnings, error) + GetPackageStub func(string) (resources.Package, ccv3.Warnings, error) getPackageMutex sync.RWMutex getPackageArgsForCall []struct { arg1 string } getPackageReturns struct { - result1 ccv3.Package + result1 resources.Package result2 ccv3.Warnings result3 error } getPackageReturnsOnCall map[int]struct { - result1 ccv3.Package + result1 resources.Package result2 ccv3.Warnings result3 error } - GetPackagesStub func(...ccv3.Query) ([]ccv3.Package, ccv3.Warnings, error) + GetPackagesStub func(...ccv3.Query) ([]resources.Package, ccv3.Warnings, error) getPackagesMutex sync.RWMutex getPackagesArgsForCall []struct { arg1 []ccv3.Query } getPackagesReturns struct { - result1 []ccv3.Package + result1 []resources.Package result2 ccv3.Warnings result3 error } getPackagesReturnsOnCall map[int]struct { - result1 []ccv3.Package + result1 []resources.Package result2 ccv3.Warnings result3 error } @@ -626,63 +627,63 @@ type FakeCloudControllerClient struct { result2 ccv3.Warnings result3 error } - GetServiceInstancesStub func(...ccv3.Query) ([]ccv3.ServiceInstance, ccv3.Warnings, error) + GetServiceInstancesStub func(...ccv3.Query) ([]resources.ServiceInstance, ccv3.Warnings, error) getServiceInstancesMutex sync.RWMutex getServiceInstancesArgsForCall []struct { arg1 []ccv3.Query } getServiceInstancesReturns struct { - result1 []ccv3.ServiceInstance + result1 []resources.ServiceInstance result2 ccv3.Warnings result3 error } getServiceInstancesReturnsOnCall map[int]struct { - result1 []ccv3.ServiceInstance + result1 []resources.ServiceInstance result2 ccv3.Warnings result3 error } - GetSpaceIsolationSegmentStub func(string) (ccv3.Relationship, ccv3.Warnings, error) + GetSpaceIsolationSegmentStub func(string) (resources.Relationship, ccv3.Warnings, error) getSpaceIsolationSegmentMutex sync.RWMutex getSpaceIsolationSegmentArgsForCall []struct { arg1 string } getSpaceIsolationSegmentReturns struct { - result1 ccv3.Relationship + result1 resources.Relationship result2 ccv3.Warnings result3 error } getSpaceIsolationSegmentReturnsOnCall map[int]struct { - result1 ccv3.Relationship + result1 resources.Relationship result2 ccv3.Warnings result3 error } - GetSpacesStub func(...ccv3.Query) ([]ccv3.Space, ccv3.Warnings, error) + GetSpacesStub func(...ccv3.Query) ([]resources.Space, ccv3.Warnings, error) getSpacesMutex sync.RWMutex getSpacesArgsForCall []struct { arg1 []ccv3.Query } getSpacesReturns struct { - result1 []ccv3.Space + result1 []resources.Space result2 ccv3.Warnings result3 error } getSpacesReturnsOnCall map[int]struct { - result1 []ccv3.Space + result1 []resources.Space result2 ccv3.Warnings result3 error } - GetStacksStub func(...ccv3.Query) ([]ccv3.Stack, ccv3.Warnings, error) + GetStacksStub func(...ccv3.Query) ([]resources.Stack, ccv3.Warnings, error) getStacksMutex sync.RWMutex getStacksArgsForCall []struct { arg1 []ccv3.Query } getStacksReturns struct { - result1 []ccv3.Stack + result1 []resources.Stack result2 ccv3.Warnings result3 error } getStacksReturnsOnCall map[int]struct { - result1 []ccv3.Stack + result1 []resources.Stack result2 ccv3.Warnings result3 error } @@ -714,19 +715,19 @@ type FakeCloudControllerClient struct { result2 ccv3.Warnings result3 error } - SetApplicationDropletStub func(string, string) (ccv3.Relationship, ccv3.Warnings, error) + SetApplicationDropletStub func(string, string) (resources.Relationship, ccv3.Warnings, error) setApplicationDropletMutex sync.RWMutex setApplicationDropletArgsForCall []struct { arg1 string arg2 string } setApplicationDropletReturns struct { - result1 ccv3.Relationship + result1 resources.Relationship result2 ccv3.Warnings result3 error } setApplicationDropletReturnsOnCall map[int]struct { - result1 ccv3.Relationship + result1 resources.Relationship result2 ccv3.Warnings result3 error } @@ -744,19 +745,19 @@ type FakeCloudControllerClient struct { result1 ccv3.Warnings result2 error } - ShareServiceInstanceToSpacesStub func(string, []string) (ccv3.RelationshipList, ccv3.Warnings, error) + ShareServiceInstanceToSpacesStub func(string, []string) (resources.RelationshipList, ccv3.Warnings, error) shareServiceInstanceToSpacesMutex sync.RWMutex shareServiceInstanceToSpacesArgsForCall []struct { arg1 string arg2 []string } shareServiceInstanceToSpacesReturns struct { - result1 ccv3.RelationshipList + result1 resources.RelationshipList result2 ccv3.Warnings result3 error } shareServiceInstanceToSpacesReturnsOnCall map[int]struct { - result1 ccv3.RelationshipList + result1 resources.RelationshipList result2 ccv3.Warnings result3 error } @@ -774,18 +775,18 @@ type FakeCloudControllerClient struct { result1 ccv3.Warnings result2 error } - UpdateApplicationStub func(ccv3.Application) (ccv3.Application, ccv3.Warnings, error) + UpdateApplicationStub func(resources.Application) (resources.Application, ccv3.Warnings, error) updateApplicationMutex sync.RWMutex updateApplicationArgsForCall []struct { - arg1 ccv3.Application + arg1 resources.Application } updateApplicationReturns struct { - result1 ccv3.Application + result1 resources.Application result2 ccv3.Warnings result3 error } updateApplicationReturnsOnCall map[int]struct { - result1 ccv3.Application + result1 resources.Application result2 ccv3.Warnings result3 error } @@ -805,140 +806,140 @@ type FakeCloudControllerClient struct { result2 ccv3.Warnings result3 error } - UpdateApplicationEnvironmentVariablesStub func(string, ccv3.EnvironmentVariables) (ccv3.EnvironmentVariables, ccv3.Warnings, error) + UpdateApplicationEnvironmentVariablesStub func(string, resources.EnvironmentVariables) (resources.EnvironmentVariables, ccv3.Warnings, error) updateApplicationEnvironmentVariablesMutex sync.RWMutex updateApplicationEnvironmentVariablesArgsForCall []struct { arg1 string - arg2 ccv3.EnvironmentVariables + arg2 resources.EnvironmentVariables } updateApplicationEnvironmentVariablesReturns struct { - result1 ccv3.EnvironmentVariables + result1 resources.EnvironmentVariables result2 ccv3.Warnings result3 error } updateApplicationEnvironmentVariablesReturnsOnCall map[int]struct { - result1 ccv3.EnvironmentVariables + result1 resources.EnvironmentVariables result2 ccv3.Warnings result3 error } - UpdateApplicationRestartStub func(string) (ccv3.Application, ccv3.Warnings, error) + UpdateApplicationRestartStub func(string) (resources.Application, ccv3.Warnings, error) updateApplicationRestartMutex sync.RWMutex updateApplicationRestartArgsForCall []struct { arg1 string } updateApplicationRestartReturns struct { - result1 ccv3.Application + result1 resources.Application result2 ccv3.Warnings result3 error } updateApplicationRestartReturnsOnCall map[int]struct { - result1 ccv3.Application + result1 resources.Application result2 ccv3.Warnings result3 error } - UpdateApplicationStartStub func(string) (ccv3.Application, ccv3.Warnings, error) + UpdateApplicationStartStub func(string) (resources.Application, ccv3.Warnings, error) updateApplicationStartMutex sync.RWMutex updateApplicationStartArgsForCall []struct { arg1 string } updateApplicationStartReturns struct { - result1 ccv3.Application + result1 resources.Application result2 ccv3.Warnings result3 error } updateApplicationStartReturnsOnCall map[int]struct { - result1 ccv3.Application + result1 resources.Application result2 ccv3.Warnings result3 error } - UpdateApplicationStopStub func(string) (ccv3.Application, ccv3.Warnings, error) + UpdateApplicationStopStub func(string) (resources.Application, ccv3.Warnings, error) updateApplicationStopMutex sync.RWMutex updateApplicationStopArgsForCall []struct { arg1 string } updateApplicationStopReturns struct { - result1 ccv3.Application + result1 resources.Application result2 ccv3.Warnings result3 error } updateApplicationStopReturnsOnCall map[int]struct { - result1 ccv3.Application + result1 resources.Application result2 ccv3.Warnings result3 error } - UpdateBuildpackStub func(ccv3.Buildpack) (ccv3.Buildpack, ccv3.Warnings, error) + UpdateBuildpackStub func(resources.Buildpack) (resources.Buildpack, ccv3.Warnings, error) updateBuildpackMutex sync.RWMutex updateBuildpackArgsForCall []struct { - arg1 ccv3.Buildpack + arg1 resources.Buildpack } updateBuildpackReturns struct { - result1 ccv3.Buildpack + result1 resources.Buildpack result2 ccv3.Warnings result3 error } updateBuildpackReturnsOnCall map[int]struct { - result1 ccv3.Buildpack + result1 resources.Buildpack result2 ccv3.Warnings result3 error } - UpdateFeatureFlagStub func(ccv3.FeatureFlag) (ccv3.FeatureFlag, ccv3.Warnings, error) + UpdateFeatureFlagStub func(resources.FeatureFlag) (resources.FeatureFlag, ccv3.Warnings, error) updateFeatureFlagMutex sync.RWMutex updateFeatureFlagArgsForCall []struct { - arg1 ccv3.FeatureFlag + arg1 resources.FeatureFlag } updateFeatureFlagReturns struct { - result1 ccv3.FeatureFlag + result1 resources.FeatureFlag result2 ccv3.Warnings result3 error } updateFeatureFlagReturnsOnCall map[int]struct { - result1 ccv3.FeatureFlag + result1 resources.FeatureFlag result2 ccv3.Warnings result3 error } - UpdateOrganizationStub func(ccv3.Organization) (ccv3.Organization, ccv3.Warnings, error) + UpdateOrganizationStub func(resources.Organization) (resources.Organization, ccv3.Warnings, error) updateOrganizationMutex sync.RWMutex updateOrganizationArgsForCall []struct { - arg1 ccv3.Organization + arg1 resources.Organization } updateOrganizationReturns struct { - result1 ccv3.Organization + result1 resources.Organization result2 ccv3.Warnings result3 error } updateOrganizationReturnsOnCall map[int]struct { - result1 ccv3.Organization + result1 resources.Organization result2 ccv3.Warnings result3 error } - UpdateOrganizationDefaultIsolationSegmentRelationshipStub func(string, string) (ccv3.Relationship, ccv3.Warnings, error) + UpdateOrganizationDefaultIsolationSegmentRelationshipStub func(string, string) (resources.Relationship, ccv3.Warnings, error) updateOrganizationDefaultIsolationSegmentRelationshipMutex sync.RWMutex updateOrganizationDefaultIsolationSegmentRelationshipArgsForCall []struct { arg1 string arg2 string } updateOrganizationDefaultIsolationSegmentRelationshipReturns struct { - result1 ccv3.Relationship + result1 resources.Relationship result2 ccv3.Warnings result3 error } updateOrganizationDefaultIsolationSegmentRelationshipReturnsOnCall map[int]struct { - result1 ccv3.Relationship + result1 resources.Relationship result2 ccv3.Warnings result3 error } - UpdateProcessStub func(ccv3.Process) (ccv3.Process, ccv3.Warnings, error) + UpdateProcessStub func(resources.Process) (resources.Process, ccv3.Warnings, error) updateProcessMutex sync.RWMutex updateProcessArgsForCall []struct { - arg1 ccv3.Process + arg1 resources.Process } updateProcessReturns struct { - result1 ccv3.Process + result1 resources.Process result2 ccv3.Warnings result3 error } updateProcessReturnsOnCall map[int]struct { - result1 ccv3.Process + result1 resources.Process result2 ccv3.Warnings result3 error } @@ -959,52 +960,52 @@ type FakeCloudControllerClient struct { result2 ccv3.Warnings result3 error } - UpdateSpaceIsolationSegmentRelationshipStub func(string, string) (ccv3.Relationship, ccv3.Warnings, error) + UpdateSpaceIsolationSegmentRelationshipStub func(string, string) (resources.Relationship, ccv3.Warnings, error) updateSpaceIsolationSegmentRelationshipMutex sync.RWMutex updateSpaceIsolationSegmentRelationshipArgsForCall []struct { arg1 string arg2 string } updateSpaceIsolationSegmentRelationshipReturns struct { - result1 ccv3.Relationship + result1 resources.Relationship result2 ccv3.Warnings result3 error } updateSpaceIsolationSegmentRelationshipReturnsOnCall map[int]struct { - result1 ccv3.Relationship + result1 resources.Relationship result2 ccv3.Warnings result3 error } - UpdateTaskCancelStub func(string) (ccv3.Task, ccv3.Warnings, error) + UpdateTaskCancelStub func(string) (resources.Task, ccv3.Warnings, error) updateTaskCancelMutex sync.RWMutex updateTaskCancelArgsForCall []struct { arg1 string } updateTaskCancelReturns struct { - result1 ccv3.Task + result1 resources.Task result2 ccv3.Warnings result3 error } updateTaskCancelReturnsOnCall map[int]struct { - result1 ccv3.Task + result1 resources.Task result2 ccv3.Warnings result3 error } - UploadBitsPackageStub func(ccv3.Package, []ccv3.Resource, io.Reader, int64) (ccv3.Package, ccv3.Warnings, error) + UploadBitsPackageStub func(resources.Package, []ccv3.Resource, io.Reader, int64) (resources.Package, ccv3.Warnings, error) uploadBitsPackageMutex sync.RWMutex uploadBitsPackageArgsForCall []struct { - arg1 ccv3.Package + arg1 resources.Package arg2 []ccv3.Resource arg3 io.Reader arg4 int64 } uploadBitsPackageReturns struct { - result1 ccv3.Package + result1 resources.Package result2 ccv3.Warnings result3 error } uploadBitsPackageReturnsOnCall map[int]struct { - result1 ccv3.Package + result1 resources.Package result2 ccv3.Warnings result3 error } @@ -1026,19 +1027,19 @@ type FakeCloudControllerClient struct { result2 ccv3.Warnings result3 error } - UploadPackageStub func(ccv3.Package, string) (ccv3.Package, ccv3.Warnings, error) + UploadPackageStub func(resources.Package, string) (resources.Package, ccv3.Warnings, error) uploadPackageMutex sync.RWMutex uploadPackageArgsForCall []struct { - arg1 ccv3.Package + arg1 resources.Package arg2 string } uploadPackageReturns struct { - result1 ccv3.Package + result1 resources.Package result2 ccv3.Warnings result3 error } uploadPackageReturnsOnCall map[int]struct { - result1 ccv3.Package + result1 resources.Package result2 ccv3.Warnings result3 error } @@ -1202,11 +1203,11 @@ func (fake *FakeCloudControllerClient) CloudControllerAPIVersionReturnsOnCall(i }{result1} } -func (fake *FakeCloudControllerClient) CreateApplication(arg1 ccv3.Application) (ccv3.Application, ccv3.Warnings, error) { +func (fake *FakeCloudControllerClient) CreateApplication(arg1 resources.Application) (resources.Application, ccv3.Warnings, error) { fake.createApplicationMutex.Lock() ret, specificReturn := fake.createApplicationReturnsOnCall[len(fake.createApplicationArgsForCall)] fake.createApplicationArgsForCall = append(fake.createApplicationArgsForCall, struct { - arg1 ccv3.Application + arg1 resources.Application }{arg1}) fake.recordInvocation("CreateApplication", []interface{}{arg1}) fake.createApplicationMutex.Unlock() @@ -1226,54 +1227,54 @@ func (fake *FakeCloudControllerClient) CreateApplicationCallCount() int { return len(fake.createApplicationArgsForCall) } -func (fake *FakeCloudControllerClient) CreateApplicationCalls(stub func(ccv3.Application) (ccv3.Application, ccv3.Warnings, error)) { +func (fake *FakeCloudControllerClient) CreateApplicationCalls(stub func(resources.Application) (resources.Application, ccv3.Warnings, error)) { fake.createApplicationMutex.Lock() defer fake.createApplicationMutex.Unlock() fake.CreateApplicationStub = stub } -func (fake *FakeCloudControllerClient) CreateApplicationArgsForCall(i int) ccv3.Application { +func (fake *FakeCloudControllerClient) CreateApplicationArgsForCall(i int) resources.Application { fake.createApplicationMutex.RLock() defer fake.createApplicationMutex.RUnlock() argsForCall := fake.createApplicationArgsForCall[i] return argsForCall.arg1 } -func (fake *FakeCloudControllerClient) CreateApplicationReturns(result1 ccv3.Application, result2 ccv3.Warnings, result3 error) { +func (fake *FakeCloudControllerClient) CreateApplicationReturns(result1 resources.Application, result2 ccv3.Warnings, result3 error) { fake.createApplicationMutex.Lock() defer fake.createApplicationMutex.Unlock() fake.CreateApplicationStub = nil fake.createApplicationReturns = struct { - result1 ccv3.Application + result1 resources.Application result2 ccv3.Warnings result3 error }{result1, result2, result3} } -func (fake *FakeCloudControllerClient) CreateApplicationReturnsOnCall(i int, result1 ccv3.Application, result2 ccv3.Warnings, result3 error) { +func (fake *FakeCloudControllerClient) CreateApplicationReturnsOnCall(i int, result1 resources.Application, result2 ccv3.Warnings, result3 error) { fake.createApplicationMutex.Lock() defer fake.createApplicationMutex.Unlock() fake.CreateApplicationStub = nil if fake.createApplicationReturnsOnCall == nil { fake.createApplicationReturnsOnCall = make(map[int]struct { - result1 ccv3.Application + result1 resources.Application result2 ccv3.Warnings result3 error }) } fake.createApplicationReturnsOnCall[i] = struct { - result1 ccv3.Application + result1 resources.Application result2 ccv3.Warnings result3 error }{result1, result2, result3} } -func (fake *FakeCloudControllerClient) CreateApplicationProcessScale(arg1 string, arg2 ccv3.Process) (ccv3.Process, ccv3.Warnings, error) { +func (fake *FakeCloudControllerClient) CreateApplicationProcessScale(arg1 string, arg2 resources.Process) (resources.Process, ccv3.Warnings, error) { fake.createApplicationProcessScaleMutex.Lock() ret, specificReturn := fake.createApplicationProcessScaleReturnsOnCall[len(fake.createApplicationProcessScaleArgsForCall)] fake.createApplicationProcessScaleArgsForCall = append(fake.createApplicationProcessScaleArgsForCall, struct { arg1 string - arg2 ccv3.Process + arg2 resources.Process }{arg1, arg2}) fake.recordInvocation("CreateApplicationProcessScale", []interface{}{arg1, arg2}) fake.createApplicationProcessScaleMutex.Unlock() @@ -1293,54 +1294,54 @@ func (fake *FakeCloudControllerClient) CreateApplicationProcessScaleCallCount() return len(fake.createApplicationProcessScaleArgsForCall) } -func (fake *FakeCloudControllerClient) CreateApplicationProcessScaleCalls(stub func(string, ccv3.Process) (ccv3.Process, ccv3.Warnings, error)) { +func (fake *FakeCloudControllerClient) CreateApplicationProcessScaleCalls(stub func(string, resources.Process) (resources.Process, ccv3.Warnings, error)) { fake.createApplicationProcessScaleMutex.Lock() defer fake.createApplicationProcessScaleMutex.Unlock() fake.CreateApplicationProcessScaleStub = stub } -func (fake *FakeCloudControllerClient) CreateApplicationProcessScaleArgsForCall(i int) (string, ccv3.Process) { +func (fake *FakeCloudControllerClient) CreateApplicationProcessScaleArgsForCall(i int) (string, resources.Process) { fake.createApplicationProcessScaleMutex.RLock() defer fake.createApplicationProcessScaleMutex.RUnlock() argsForCall := fake.createApplicationProcessScaleArgsForCall[i] return argsForCall.arg1, argsForCall.arg2 } -func (fake *FakeCloudControllerClient) CreateApplicationProcessScaleReturns(result1 ccv3.Process, result2 ccv3.Warnings, result3 error) { +func (fake *FakeCloudControllerClient) CreateApplicationProcessScaleReturns(result1 resources.Process, result2 ccv3.Warnings, result3 error) { fake.createApplicationProcessScaleMutex.Lock() defer fake.createApplicationProcessScaleMutex.Unlock() fake.CreateApplicationProcessScaleStub = nil fake.createApplicationProcessScaleReturns = struct { - result1 ccv3.Process + result1 resources.Process result2 ccv3.Warnings result3 error }{result1, result2, result3} } -func (fake *FakeCloudControllerClient) CreateApplicationProcessScaleReturnsOnCall(i int, result1 ccv3.Process, result2 ccv3.Warnings, result3 error) { +func (fake *FakeCloudControllerClient) CreateApplicationProcessScaleReturnsOnCall(i int, result1 resources.Process, result2 ccv3.Warnings, result3 error) { fake.createApplicationProcessScaleMutex.Lock() defer fake.createApplicationProcessScaleMutex.Unlock() fake.CreateApplicationProcessScaleStub = nil if fake.createApplicationProcessScaleReturnsOnCall == nil { fake.createApplicationProcessScaleReturnsOnCall = make(map[int]struct { - result1 ccv3.Process + result1 resources.Process result2 ccv3.Warnings result3 error }) } fake.createApplicationProcessScaleReturnsOnCall[i] = struct { - result1 ccv3.Process + result1 resources.Process result2 ccv3.Warnings result3 error }{result1, result2, result3} } -func (fake *FakeCloudControllerClient) CreateApplicationTask(arg1 string, arg2 ccv3.Task) (ccv3.Task, ccv3.Warnings, error) { +func (fake *FakeCloudControllerClient) CreateApplicationTask(arg1 string, arg2 resources.Task) (resources.Task, ccv3.Warnings, error) { fake.createApplicationTaskMutex.Lock() ret, specificReturn := fake.createApplicationTaskReturnsOnCall[len(fake.createApplicationTaskArgsForCall)] fake.createApplicationTaskArgsForCall = append(fake.createApplicationTaskArgsForCall, struct { arg1 string - arg2 ccv3.Task + arg2 resources.Task }{arg1, arg2}) fake.recordInvocation("CreateApplicationTask", []interface{}{arg1, arg2}) fake.createApplicationTaskMutex.Unlock() @@ -1360,53 +1361,53 @@ func (fake *FakeCloudControllerClient) CreateApplicationTaskCallCount() int { return len(fake.createApplicationTaskArgsForCall) } -func (fake *FakeCloudControllerClient) CreateApplicationTaskCalls(stub func(string, ccv3.Task) (ccv3.Task, ccv3.Warnings, error)) { +func (fake *FakeCloudControllerClient) CreateApplicationTaskCalls(stub func(string, resources.Task) (resources.Task, ccv3.Warnings, error)) { fake.createApplicationTaskMutex.Lock() defer fake.createApplicationTaskMutex.Unlock() fake.CreateApplicationTaskStub = stub } -func (fake *FakeCloudControllerClient) CreateApplicationTaskArgsForCall(i int) (string, ccv3.Task) { +func (fake *FakeCloudControllerClient) CreateApplicationTaskArgsForCall(i int) (string, resources.Task) { fake.createApplicationTaskMutex.RLock() defer fake.createApplicationTaskMutex.RUnlock() argsForCall := fake.createApplicationTaskArgsForCall[i] return argsForCall.arg1, argsForCall.arg2 } -func (fake *FakeCloudControllerClient) CreateApplicationTaskReturns(result1 ccv3.Task, result2 ccv3.Warnings, result3 error) { +func (fake *FakeCloudControllerClient) CreateApplicationTaskReturns(result1 resources.Task, result2 ccv3.Warnings, result3 error) { fake.createApplicationTaskMutex.Lock() defer fake.createApplicationTaskMutex.Unlock() fake.CreateApplicationTaskStub = nil fake.createApplicationTaskReturns = struct { - result1 ccv3.Task + result1 resources.Task result2 ccv3.Warnings result3 error }{result1, result2, result3} } -func (fake *FakeCloudControllerClient) CreateApplicationTaskReturnsOnCall(i int, result1 ccv3.Task, result2 ccv3.Warnings, result3 error) { +func (fake *FakeCloudControllerClient) CreateApplicationTaskReturnsOnCall(i int, result1 resources.Task, result2 ccv3.Warnings, result3 error) { fake.createApplicationTaskMutex.Lock() defer fake.createApplicationTaskMutex.Unlock() fake.CreateApplicationTaskStub = nil if fake.createApplicationTaskReturnsOnCall == nil { fake.createApplicationTaskReturnsOnCall = make(map[int]struct { - result1 ccv3.Task + result1 resources.Task result2 ccv3.Warnings result3 error }) } fake.createApplicationTaskReturnsOnCall[i] = struct { - result1 ccv3.Task + result1 resources.Task result2 ccv3.Warnings result3 error }{result1, result2, result3} } -func (fake *FakeCloudControllerClient) CreateBuild(arg1 ccv3.Build) (ccv3.Build, ccv3.Warnings, error) { +func (fake *FakeCloudControllerClient) CreateBuild(arg1 resources.Build) (resources.Build, ccv3.Warnings, error) { fake.createBuildMutex.Lock() ret, specificReturn := fake.createBuildReturnsOnCall[len(fake.createBuildArgsForCall)] fake.createBuildArgsForCall = append(fake.createBuildArgsForCall, struct { - arg1 ccv3.Build + arg1 resources.Build }{arg1}) fake.recordInvocation("CreateBuild", []interface{}{arg1}) fake.createBuildMutex.Unlock() @@ -1426,53 +1427,53 @@ func (fake *FakeCloudControllerClient) CreateBuildCallCount() int { return len(fake.createBuildArgsForCall) } -func (fake *FakeCloudControllerClient) CreateBuildCalls(stub func(ccv3.Build) (ccv3.Build, ccv3.Warnings, error)) { +func (fake *FakeCloudControllerClient) CreateBuildCalls(stub func(resources.Build) (resources.Build, ccv3.Warnings, error)) { fake.createBuildMutex.Lock() defer fake.createBuildMutex.Unlock() fake.CreateBuildStub = stub } -func (fake *FakeCloudControllerClient) CreateBuildArgsForCall(i int) ccv3.Build { +func (fake *FakeCloudControllerClient) CreateBuildArgsForCall(i int) resources.Build { fake.createBuildMutex.RLock() defer fake.createBuildMutex.RUnlock() argsForCall := fake.createBuildArgsForCall[i] return argsForCall.arg1 } -func (fake *FakeCloudControllerClient) CreateBuildReturns(result1 ccv3.Build, result2 ccv3.Warnings, result3 error) { +func (fake *FakeCloudControllerClient) CreateBuildReturns(result1 resources.Build, result2 ccv3.Warnings, result3 error) { fake.createBuildMutex.Lock() defer fake.createBuildMutex.Unlock() fake.CreateBuildStub = nil fake.createBuildReturns = struct { - result1 ccv3.Build + result1 resources.Build result2 ccv3.Warnings result3 error }{result1, result2, result3} } -func (fake *FakeCloudControllerClient) CreateBuildReturnsOnCall(i int, result1 ccv3.Build, result2 ccv3.Warnings, result3 error) { +func (fake *FakeCloudControllerClient) CreateBuildReturnsOnCall(i int, result1 resources.Build, result2 ccv3.Warnings, result3 error) { fake.createBuildMutex.Lock() defer fake.createBuildMutex.Unlock() fake.CreateBuildStub = nil if fake.createBuildReturnsOnCall == nil { fake.createBuildReturnsOnCall = make(map[int]struct { - result1 ccv3.Build + result1 resources.Build result2 ccv3.Warnings result3 error }) } fake.createBuildReturnsOnCall[i] = struct { - result1 ccv3.Build + result1 resources.Build result2 ccv3.Warnings result3 error }{result1, result2, result3} } -func (fake *FakeCloudControllerClient) CreateBuildpack(arg1 ccv3.Buildpack) (ccv3.Buildpack, ccv3.Warnings, error) { +func (fake *FakeCloudControllerClient) CreateBuildpack(arg1 resources.Buildpack) (resources.Buildpack, ccv3.Warnings, error) { fake.createBuildpackMutex.Lock() ret, specificReturn := fake.createBuildpackReturnsOnCall[len(fake.createBuildpackArgsForCall)] fake.createBuildpackArgsForCall = append(fake.createBuildpackArgsForCall, struct { - arg1 ccv3.Buildpack + arg1 resources.Buildpack }{arg1}) fake.recordInvocation("CreateBuildpack", []interface{}{arg1}) fake.createBuildpackMutex.Unlock() @@ -1492,53 +1493,53 @@ func (fake *FakeCloudControllerClient) CreateBuildpackCallCount() int { return len(fake.createBuildpackArgsForCall) } -func (fake *FakeCloudControllerClient) CreateBuildpackCalls(stub func(ccv3.Buildpack) (ccv3.Buildpack, ccv3.Warnings, error)) { +func (fake *FakeCloudControllerClient) CreateBuildpackCalls(stub func(resources.Buildpack) (resources.Buildpack, ccv3.Warnings, error)) { fake.createBuildpackMutex.Lock() defer fake.createBuildpackMutex.Unlock() fake.CreateBuildpackStub = stub } -func (fake *FakeCloudControllerClient) CreateBuildpackArgsForCall(i int) ccv3.Buildpack { +func (fake *FakeCloudControllerClient) CreateBuildpackArgsForCall(i int) resources.Buildpack { fake.createBuildpackMutex.RLock() defer fake.createBuildpackMutex.RUnlock() argsForCall := fake.createBuildpackArgsForCall[i] return argsForCall.arg1 } -func (fake *FakeCloudControllerClient) CreateBuildpackReturns(result1 ccv3.Buildpack, result2 ccv3.Warnings, result3 error) { +func (fake *FakeCloudControllerClient) CreateBuildpackReturns(result1 resources.Buildpack, result2 ccv3.Warnings, result3 error) { fake.createBuildpackMutex.Lock() defer fake.createBuildpackMutex.Unlock() fake.CreateBuildpackStub = nil fake.createBuildpackReturns = struct { - result1 ccv3.Buildpack + result1 resources.Buildpack result2 ccv3.Warnings result3 error }{result1, result2, result3} } -func (fake *FakeCloudControllerClient) CreateBuildpackReturnsOnCall(i int, result1 ccv3.Buildpack, result2 ccv3.Warnings, result3 error) { +func (fake *FakeCloudControllerClient) CreateBuildpackReturnsOnCall(i int, result1 resources.Buildpack, result2 ccv3.Warnings, result3 error) { fake.createBuildpackMutex.Lock() defer fake.createBuildpackMutex.Unlock() fake.CreateBuildpackStub = nil if fake.createBuildpackReturnsOnCall == nil { fake.createBuildpackReturnsOnCall = make(map[int]struct { - result1 ccv3.Buildpack + result1 resources.Buildpack result2 ccv3.Warnings result3 error }) } fake.createBuildpackReturnsOnCall[i] = struct { - result1 ccv3.Buildpack + result1 resources.Buildpack result2 ccv3.Warnings result3 error }{result1, result2, result3} } -func (fake *FakeCloudControllerClient) CreateDomain(arg1 ccv3.Domain) (ccv3.Domain, ccv3.Warnings, error) { +func (fake *FakeCloudControllerClient) CreateDomain(arg1 resources.Domain) (resources.Domain, ccv3.Warnings, error) { fake.createDomainMutex.Lock() ret, specificReturn := fake.createDomainReturnsOnCall[len(fake.createDomainArgsForCall)] fake.createDomainArgsForCall = append(fake.createDomainArgsForCall, struct { - arg1 ccv3.Domain + arg1 resources.Domain }{arg1}) fake.recordInvocation("CreateDomain", []interface{}{arg1}) fake.createDomainMutex.Unlock() @@ -1558,53 +1559,53 @@ func (fake *FakeCloudControllerClient) CreateDomainCallCount() int { return len(fake.createDomainArgsForCall) } -func (fake *FakeCloudControllerClient) CreateDomainCalls(stub func(ccv3.Domain) (ccv3.Domain, ccv3.Warnings, error)) { +func (fake *FakeCloudControllerClient) CreateDomainCalls(stub func(resources.Domain) (resources.Domain, ccv3.Warnings, error)) { fake.createDomainMutex.Lock() defer fake.createDomainMutex.Unlock() fake.CreateDomainStub = stub } -func (fake *FakeCloudControllerClient) CreateDomainArgsForCall(i int) ccv3.Domain { +func (fake *FakeCloudControllerClient) CreateDomainArgsForCall(i int) resources.Domain { fake.createDomainMutex.RLock() defer fake.createDomainMutex.RUnlock() argsForCall := fake.createDomainArgsForCall[i] return argsForCall.arg1 } -func (fake *FakeCloudControllerClient) CreateDomainReturns(result1 ccv3.Domain, result2 ccv3.Warnings, result3 error) { +func (fake *FakeCloudControllerClient) CreateDomainReturns(result1 resources.Domain, result2 ccv3.Warnings, result3 error) { fake.createDomainMutex.Lock() defer fake.createDomainMutex.Unlock() fake.CreateDomainStub = nil fake.createDomainReturns = struct { - result1 ccv3.Domain + result1 resources.Domain result2 ccv3.Warnings result3 error }{result1, result2, result3} } -func (fake *FakeCloudControllerClient) CreateDomainReturnsOnCall(i int, result1 ccv3.Domain, result2 ccv3.Warnings, result3 error) { +func (fake *FakeCloudControllerClient) CreateDomainReturnsOnCall(i int, result1 resources.Domain, result2 ccv3.Warnings, result3 error) { fake.createDomainMutex.Lock() defer fake.createDomainMutex.Unlock() fake.CreateDomainStub = nil if fake.createDomainReturnsOnCall == nil { fake.createDomainReturnsOnCall = make(map[int]struct { - result1 ccv3.Domain + result1 resources.Domain result2 ccv3.Warnings result3 error }) } fake.createDomainReturnsOnCall[i] = struct { - result1 ccv3.Domain + result1 resources.Domain result2 ccv3.Warnings result3 error }{result1, result2, result3} } -func (fake *FakeCloudControllerClient) CreateIsolationSegment(arg1 ccv3.IsolationSegment) (ccv3.IsolationSegment, ccv3.Warnings, error) { +func (fake *FakeCloudControllerClient) CreateIsolationSegment(arg1 resources.IsolationSegment) (resources.IsolationSegment, ccv3.Warnings, error) { fake.createIsolationSegmentMutex.Lock() ret, specificReturn := fake.createIsolationSegmentReturnsOnCall[len(fake.createIsolationSegmentArgsForCall)] fake.createIsolationSegmentArgsForCall = append(fake.createIsolationSegmentArgsForCall, struct { - arg1 ccv3.IsolationSegment + arg1 resources.IsolationSegment }{arg1}) fake.recordInvocation("CreateIsolationSegment", []interface{}{arg1}) fake.createIsolationSegmentMutex.Unlock() @@ -1624,53 +1625,53 @@ func (fake *FakeCloudControllerClient) CreateIsolationSegmentCallCount() int { return len(fake.createIsolationSegmentArgsForCall) } -func (fake *FakeCloudControllerClient) CreateIsolationSegmentCalls(stub func(ccv3.IsolationSegment) (ccv3.IsolationSegment, ccv3.Warnings, error)) { +func (fake *FakeCloudControllerClient) CreateIsolationSegmentCalls(stub func(resources.IsolationSegment) (resources.IsolationSegment, ccv3.Warnings, error)) { fake.createIsolationSegmentMutex.Lock() defer fake.createIsolationSegmentMutex.Unlock() fake.CreateIsolationSegmentStub = stub } -func (fake *FakeCloudControllerClient) CreateIsolationSegmentArgsForCall(i int) ccv3.IsolationSegment { +func (fake *FakeCloudControllerClient) CreateIsolationSegmentArgsForCall(i int) resources.IsolationSegment { fake.createIsolationSegmentMutex.RLock() defer fake.createIsolationSegmentMutex.RUnlock() argsForCall := fake.createIsolationSegmentArgsForCall[i] return argsForCall.arg1 } -func (fake *FakeCloudControllerClient) CreateIsolationSegmentReturns(result1 ccv3.IsolationSegment, result2 ccv3.Warnings, result3 error) { +func (fake *FakeCloudControllerClient) CreateIsolationSegmentReturns(result1 resources.IsolationSegment, result2 ccv3.Warnings, result3 error) { fake.createIsolationSegmentMutex.Lock() defer fake.createIsolationSegmentMutex.Unlock() fake.CreateIsolationSegmentStub = nil fake.createIsolationSegmentReturns = struct { - result1 ccv3.IsolationSegment + result1 resources.IsolationSegment result2 ccv3.Warnings result3 error }{result1, result2, result3} } -func (fake *FakeCloudControllerClient) CreateIsolationSegmentReturnsOnCall(i int, result1 ccv3.IsolationSegment, result2 ccv3.Warnings, result3 error) { +func (fake *FakeCloudControllerClient) CreateIsolationSegmentReturnsOnCall(i int, result1 resources.IsolationSegment, result2 ccv3.Warnings, result3 error) { fake.createIsolationSegmentMutex.Lock() defer fake.createIsolationSegmentMutex.Unlock() fake.CreateIsolationSegmentStub = nil if fake.createIsolationSegmentReturnsOnCall == nil { fake.createIsolationSegmentReturnsOnCall = make(map[int]struct { - result1 ccv3.IsolationSegment + result1 resources.IsolationSegment result2 ccv3.Warnings result3 error }) } fake.createIsolationSegmentReturnsOnCall[i] = struct { - result1 ccv3.IsolationSegment + result1 resources.IsolationSegment result2 ccv3.Warnings result3 error }{result1, result2, result3} } -func (fake *FakeCloudControllerClient) CreatePackage(arg1 ccv3.Package) (ccv3.Package, ccv3.Warnings, error) { +func (fake *FakeCloudControllerClient) CreatePackage(arg1 resources.Package) (resources.Package, ccv3.Warnings, error) { fake.createPackageMutex.Lock() ret, specificReturn := fake.createPackageReturnsOnCall[len(fake.createPackageArgsForCall)] fake.createPackageArgsForCall = append(fake.createPackageArgsForCall, struct { - arg1 ccv3.Package + arg1 resources.Package }{arg1}) fake.recordInvocation("CreatePackage", []interface{}{arg1}) fake.createPackageMutex.Unlock() @@ -1690,43 +1691,43 @@ func (fake *FakeCloudControllerClient) CreatePackageCallCount() int { return len(fake.createPackageArgsForCall) } -func (fake *FakeCloudControllerClient) CreatePackageCalls(stub func(ccv3.Package) (ccv3.Package, ccv3.Warnings, error)) { +func (fake *FakeCloudControllerClient) CreatePackageCalls(stub func(resources.Package) (resources.Package, ccv3.Warnings, error)) { fake.createPackageMutex.Lock() defer fake.createPackageMutex.Unlock() fake.CreatePackageStub = stub } -func (fake *FakeCloudControllerClient) CreatePackageArgsForCall(i int) ccv3.Package { +func (fake *FakeCloudControllerClient) CreatePackageArgsForCall(i int) resources.Package { fake.createPackageMutex.RLock() defer fake.createPackageMutex.RUnlock() argsForCall := fake.createPackageArgsForCall[i] return argsForCall.arg1 } -func (fake *FakeCloudControllerClient) CreatePackageReturns(result1 ccv3.Package, result2 ccv3.Warnings, result3 error) { +func (fake *FakeCloudControllerClient) CreatePackageReturns(result1 resources.Package, result2 ccv3.Warnings, result3 error) { fake.createPackageMutex.Lock() defer fake.createPackageMutex.Unlock() fake.CreatePackageStub = nil fake.createPackageReturns = struct { - result1 ccv3.Package + result1 resources.Package result2 ccv3.Warnings result3 error }{result1, result2, result3} } -func (fake *FakeCloudControllerClient) CreatePackageReturnsOnCall(i int, result1 ccv3.Package, result2 ccv3.Warnings, result3 error) { +func (fake *FakeCloudControllerClient) CreatePackageReturnsOnCall(i int, result1 resources.Package, result2 ccv3.Warnings, result3 error) { fake.createPackageMutex.Lock() defer fake.createPackageMutex.Unlock() fake.CreatePackageStub = nil if fake.createPackageReturnsOnCall == nil { fake.createPackageReturnsOnCall = make(map[int]struct { - result1 ccv3.Package + result1 resources.Package result2 ccv3.Warnings result3 error }) } fake.createPackageReturnsOnCall[i] = struct { - result1 ccv3.Package + result1 resources.Package result2 ccv3.Warnings result3 error }{result1, result2, result3} @@ -2186,7 +2187,7 @@ func (fake *FakeCloudControllerClient) DeleteServiceInstanceRelationshipsSharedS }{result1, result2} } -func (fake *FakeCloudControllerClient) EntitleIsolationSegmentToOrganizations(arg1 string, arg2 []string) (ccv3.RelationshipList, ccv3.Warnings, error) { +func (fake *FakeCloudControllerClient) EntitleIsolationSegmentToOrganizations(arg1 string, arg2 []string) (resources.RelationshipList, ccv3.Warnings, error) { var arg2Copy []string if arg2 != nil { arg2Copy = make([]string, len(arg2)) @@ -2216,7 +2217,7 @@ func (fake *FakeCloudControllerClient) EntitleIsolationSegmentToOrganizationsCal return len(fake.entitleIsolationSegmentToOrganizationsArgsForCall) } -func (fake *FakeCloudControllerClient) EntitleIsolationSegmentToOrganizationsCalls(stub func(string, []string) (ccv3.RelationshipList, ccv3.Warnings, error)) { +func (fake *FakeCloudControllerClient) EntitleIsolationSegmentToOrganizationsCalls(stub func(string, []string) (resources.RelationshipList, ccv3.Warnings, error)) { fake.entitleIsolationSegmentToOrganizationsMutex.Lock() defer fake.entitleIsolationSegmentToOrganizationsMutex.Unlock() fake.EntitleIsolationSegmentToOrganizationsStub = stub @@ -2229,36 +2230,36 @@ func (fake *FakeCloudControllerClient) EntitleIsolationSegmentToOrganizationsArg return argsForCall.arg1, argsForCall.arg2 } -func (fake *FakeCloudControllerClient) EntitleIsolationSegmentToOrganizationsReturns(result1 ccv3.RelationshipList, result2 ccv3.Warnings, result3 error) { +func (fake *FakeCloudControllerClient) EntitleIsolationSegmentToOrganizationsReturns(result1 resources.RelationshipList, result2 ccv3.Warnings, result3 error) { fake.entitleIsolationSegmentToOrganizationsMutex.Lock() defer fake.entitleIsolationSegmentToOrganizationsMutex.Unlock() fake.EntitleIsolationSegmentToOrganizationsStub = nil fake.entitleIsolationSegmentToOrganizationsReturns = struct { - result1 ccv3.RelationshipList + result1 resources.RelationshipList result2 ccv3.Warnings result3 error }{result1, result2, result3} } -func (fake *FakeCloudControllerClient) EntitleIsolationSegmentToOrganizationsReturnsOnCall(i int, result1 ccv3.RelationshipList, result2 ccv3.Warnings, result3 error) { +func (fake *FakeCloudControllerClient) EntitleIsolationSegmentToOrganizationsReturnsOnCall(i int, result1 resources.RelationshipList, result2 ccv3.Warnings, result3 error) { fake.entitleIsolationSegmentToOrganizationsMutex.Lock() defer fake.entitleIsolationSegmentToOrganizationsMutex.Unlock() fake.EntitleIsolationSegmentToOrganizationsStub = nil if fake.entitleIsolationSegmentToOrganizationsReturnsOnCall == nil { fake.entitleIsolationSegmentToOrganizationsReturnsOnCall = make(map[int]struct { - result1 ccv3.RelationshipList + result1 resources.RelationshipList result2 ccv3.Warnings result3 error }) } fake.entitleIsolationSegmentToOrganizationsReturnsOnCall[i] = struct { - result1 ccv3.RelationshipList + result1 resources.RelationshipList result2 ccv3.Warnings result3 error }{result1, result2, result3} } -func (fake *FakeCloudControllerClient) GetApplicationDropletCurrent(arg1 string) (ccv3.Droplet, ccv3.Warnings, error) { +func (fake *FakeCloudControllerClient) GetApplicationDropletCurrent(arg1 string) (resources.Droplet, ccv3.Warnings, error) { fake.getApplicationDropletCurrentMutex.Lock() ret, specificReturn := fake.getApplicationDropletCurrentReturnsOnCall[len(fake.getApplicationDropletCurrentArgsForCall)] fake.getApplicationDropletCurrentArgsForCall = append(fake.getApplicationDropletCurrentArgsForCall, struct { @@ -2282,7 +2283,7 @@ func (fake *FakeCloudControllerClient) GetApplicationDropletCurrentCallCount() i return len(fake.getApplicationDropletCurrentArgsForCall) } -func (fake *FakeCloudControllerClient) GetApplicationDropletCurrentCalls(stub func(string) (ccv3.Droplet, ccv3.Warnings, error)) { +func (fake *FakeCloudControllerClient) GetApplicationDropletCurrentCalls(stub func(string) (resources.Droplet, ccv3.Warnings, error)) { fake.getApplicationDropletCurrentMutex.Lock() defer fake.getApplicationDropletCurrentMutex.Unlock() fake.GetApplicationDropletCurrentStub = stub @@ -2295,30 +2296,30 @@ func (fake *FakeCloudControllerClient) GetApplicationDropletCurrentArgsForCall(i return argsForCall.arg1 } -func (fake *FakeCloudControllerClient) GetApplicationDropletCurrentReturns(result1 ccv3.Droplet, result2 ccv3.Warnings, result3 error) { +func (fake *FakeCloudControllerClient) GetApplicationDropletCurrentReturns(result1 resources.Droplet, result2 ccv3.Warnings, result3 error) { fake.getApplicationDropletCurrentMutex.Lock() defer fake.getApplicationDropletCurrentMutex.Unlock() fake.GetApplicationDropletCurrentStub = nil fake.getApplicationDropletCurrentReturns = struct { - result1 ccv3.Droplet + result1 resources.Droplet result2 ccv3.Warnings result3 error }{result1, result2, result3} } -func (fake *FakeCloudControllerClient) GetApplicationDropletCurrentReturnsOnCall(i int, result1 ccv3.Droplet, result2 ccv3.Warnings, result3 error) { +func (fake *FakeCloudControllerClient) GetApplicationDropletCurrentReturnsOnCall(i int, result1 resources.Droplet, result2 ccv3.Warnings, result3 error) { fake.getApplicationDropletCurrentMutex.Lock() defer fake.getApplicationDropletCurrentMutex.Unlock() fake.GetApplicationDropletCurrentStub = nil if fake.getApplicationDropletCurrentReturnsOnCall == nil { fake.getApplicationDropletCurrentReturnsOnCall = make(map[int]struct { - result1 ccv3.Droplet + result1 resources.Droplet result2 ccv3.Warnings result3 error }) } fake.getApplicationDropletCurrentReturnsOnCall[i] = struct { - result1 ccv3.Droplet + result1 resources.Droplet result2 ccv3.Warnings result3 error }{result1, result2, result3} @@ -2456,7 +2457,7 @@ func (fake *FakeCloudControllerClient) GetApplicationManifestReturnsOnCall(i int }{result1, result2, result3} } -func (fake *FakeCloudControllerClient) GetApplicationProcessByType(arg1 string, arg2 string) (ccv3.Process, ccv3.Warnings, error) { +func (fake *FakeCloudControllerClient) GetApplicationProcessByType(arg1 string, arg2 string) (resources.Process, ccv3.Warnings, error) { fake.getApplicationProcessByTypeMutex.Lock() ret, specificReturn := fake.getApplicationProcessByTypeReturnsOnCall[len(fake.getApplicationProcessByTypeArgsForCall)] fake.getApplicationProcessByTypeArgsForCall = append(fake.getApplicationProcessByTypeArgsForCall, struct { @@ -2481,7 +2482,7 @@ func (fake *FakeCloudControllerClient) GetApplicationProcessByTypeCallCount() in return len(fake.getApplicationProcessByTypeArgsForCall) } -func (fake *FakeCloudControllerClient) GetApplicationProcessByTypeCalls(stub func(string, string) (ccv3.Process, ccv3.Warnings, error)) { +func (fake *FakeCloudControllerClient) GetApplicationProcessByTypeCalls(stub func(string, string) (resources.Process, ccv3.Warnings, error)) { fake.getApplicationProcessByTypeMutex.Lock() defer fake.getApplicationProcessByTypeMutex.Unlock() fake.GetApplicationProcessByTypeStub = stub @@ -2494,36 +2495,36 @@ func (fake *FakeCloudControllerClient) GetApplicationProcessByTypeArgsForCall(i return argsForCall.arg1, argsForCall.arg2 } -func (fake *FakeCloudControllerClient) GetApplicationProcessByTypeReturns(result1 ccv3.Process, result2 ccv3.Warnings, result3 error) { +func (fake *FakeCloudControllerClient) GetApplicationProcessByTypeReturns(result1 resources.Process, result2 ccv3.Warnings, result3 error) { fake.getApplicationProcessByTypeMutex.Lock() defer fake.getApplicationProcessByTypeMutex.Unlock() fake.GetApplicationProcessByTypeStub = nil fake.getApplicationProcessByTypeReturns = struct { - result1 ccv3.Process + result1 resources.Process result2 ccv3.Warnings result3 error }{result1, result2, result3} } -func (fake *FakeCloudControllerClient) GetApplicationProcessByTypeReturnsOnCall(i int, result1 ccv3.Process, result2 ccv3.Warnings, result3 error) { +func (fake *FakeCloudControllerClient) GetApplicationProcessByTypeReturnsOnCall(i int, result1 resources.Process, result2 ccv3.Warnings, result3 error) { fake.getApplicationProcessByTypeMutex.Lock() defer fake.getApplicationProcessByTypeMutex.Unlock() fake.GetApplicationProcessByTypeStub = nil if fake.getApplicationProcessByTypeReturnsOnCall == nil { fake.getApplicationProcessByTypeReturnsOnCall = make(map[int]struct { - result1 ccv3.Process + result1 resources.Process result2 ccv3.Warnings result3 error }) } fake.getApplicationProcessByTypeReturnsOnCall[i] = struct { - result1 ccv3.Process + result1 resources.Process result2 ccv3.Warnings result3 error }{result1, result2, result3} } -func (fake *FakeCloudControllerClient) GetApplicationProcesses(arg1 string) ([]ccv3.Process, ccv3.Warnings, error) { +func (fake *FakeCloudControllerClient) GetApplicationProcesses(arg1 string) ([]resources.Process, ccv3.Warnings, error) { fake.getApplicationProcessesMutex.Lock() ret, specificReturn := fake.getApplicationProcessesReturnsOnCall[len(fake.getApplicationProcessesArgsForCall)] fake.getApplicationProcessesArgsForCall = append(fake.getApplicationProcessesArgsForCall, struct { @@ -2547,7 +2548,7 @@ func (fake *FakeCloudControllerClient) GetApplicationProcessesCallCount() int { return len(fake.getApplicationProcessesArgsForCall) } -func (fake *FakeCloudControllerClient) GetApplicationProcessesCalls(stub func(string) ([]ccv3.Process, ccv3.Warnings, error)) { +func (fake *FakeCloudControllerClient) GetApplicationProcessesCalls(stub func(string) ([]resources.Process, ccv3.Warnings, error)) { fake.getApplicationProcessesMutex.Lock() defer fake.getApplicationProcessesMutex.Unlock() fake.GetApplicationProcessesStub = stub @@ -2560,36 +2561,36 @@ func (fake *FakeCloudControllerClient) GetApplicationProcessesArgsForCall(i int) return argsForCall.arg1 } -func (fake *FakeCloudControllerClient) GetApplicationProcessesReturns(result1 []ccv3.Process, result2 ccv3.Warnings, result3 error) { +func (fake *FakeCloudControllerClient) GetApplicationProcessesReturns(result1 []resources.Process, result2 ccv3.Warnings, result3 error) { fake.getApplicationProcessesMutex.Lock() defer fake.getApplicationProcessesMutex.Unlock() fake.GetApplicationProcessesStub = nil fake.getApplicationProcessesReturns = struct { - result1 []ccv3.Process + result1 []resources.Process result2 ccv3.Warnings result3 error }{result1, result2, result3} } -func (fake *FakeCloudControllerClient) GetApplicationProcessesReturnsOnCall(i int, result1 []ccv3.Process, result2 ccv3.Warnings, result3 error) { +func (fake *FakeCloudControllerClient) GetApplicationProcessesReturnsOnCall(i int, result1 []resources.Process, result2 ccv3.Warnings, result3 error) { fake.getApplicationProcessesMutex.Lock() defer fake.getApplicationProcessesMutex.Unlock() fake.GetApplicationProcessesStub = nil if fake.getApplicationProcessesReturnsOnCall == nil { fake.getApplicationProcessesReturnsOnCall = make(map[int]struct { - result1 []ccv3.Process + result1 []resources.Process result2 ccv3.Warnings result3 error }) } fake.getApplicationProcessesReturnsOnCall[i] = struct { - result1 []ccv3.Process + result1 []resources.Process result2 ccv3.Warnings result3 error }{result1, result2, result3} } -func (fake *FakeCloudControllerClient) GetApplicationTasks(arg1 string, arg2 ...ccv3.Query) ([]ccv3.Task, ccv3.Warnings, error) { +func (fake *FakeCloudControllerClient) GetApplicationTasks(arg1 string, arg2 ...ccv3.Query) ([]resources.Task, ccv3.Warnings, error) { fake.getApplicationTasksMutex.Lock() ret, specificReturn := fake.getApplicationTasksReturnsOnCall[len(fake.getApplicationTasksArgsForCall)] fake.getApplicationTasksArgsForCall = append(fake.getApplicationTasksArgsForCall, struct { @@ -2614,7 +2615,7 @@ func (fake *FakeCloudControllerClient) GetApplicationTasksCallCount() int { return len(fake.getApplicationTasksArgsForCall) } -func (fake *FakeCloudControllerClient) GetApplicationTasksCalls(stub func(string, ...ccv3.Query) ([]ccv3.Task, ccv3.Warnings, error)) { +func (fake *FakeCloudControllerClient) GetApplicationTasksCalls(stub func(string, ...ccv3.Query) ([]resources.Task, ccv3.Warnings, error)) { fake.getApplicationTasksMutex.Lock() defer fake.getApplicationTasksMutex.Unlock() fake.GetApplicationTasksStub = stub @@ -2627,36 +2628,36 @@ func (fake *FakeCloudControllerClient) GetApplicationTasksArgsForCall(i int) (st return argsForCall.arg1, argsForCall.arg2 } -func (fake *FakeCloudControllerClient) GetApplicationTasksReturns(result1 []ccv3.Task, result2 ccv3.Warnings, result3 error) { +func (fake *FakeCloudControllerClient) GetApplicationTasksReturns(result1 []resources.Task, result2 ccv3.Warnings, result3 error) { fake.getApplicationTasksMutex.Lock() defer fake.getApplicationTasksMutex.Unlock() fake.GetApplicationTasksStub = nil fake.getApplicationTasksReturns = struct { - result1 []ccv3.Task + result1 []resources.Task result2 ccv3.Warnings result3 error }{result1, result2, result3} } -func (fake *FakeCloudControllerClient) GetApplicationTasksReturnsOnCall(i int, result1 []ccv3.Task, result2 ccv3.Warnings, result3 error) { +func (fake *FakeCloudControllerClient) GetApplicationTasksReturnsOnCall(i int, result1 []resources.Task, result2 ccv3.Warnings, result3 error) { fake.getApplicationTasksMutex.Lock() defer fake.getApplicationTasksMutex.Unlock() fake.GetApplicationTasksStub = nil if fake.getApplicationTasksReturnsOnCall == nil { fake.getApplicationTasksReturnsOnCall = make(map[int]struct { - result1 []ccv3.Task + result1 []resources.Task result2 ccv3.Warnings result3 error }) } fake.getApplicationTasksReturnsOnCall[i] = struct { - result1 []ccv3.Task + result1 []resources.Task result2 ccv3.Warnings result3 error }{result1, result2, result3} } -func (fake *FakeCloudControllerClient) GetApplications(arg1 ...ccv3.Query) ([]ccv3.Application, ccv3.Warnings, error) { +func (fake *FakeCloudControllerClient) GetApplications(arg1 ...ccv3.Query) ([]resources.Application, ccv3.Warnings, error) { fake.getApplicationsMutex.Lock() ret, specificReturn := fake.getApplicationsReturnsOnCall[len(fake.getApplicationsArgsForCall)] fake.getApplicationsArgsForCall = append(fake.getApplicationsArgsForCall, struct { @@ -2680,7 +2681,7 @@ func (fake *FakeCloudControllerClient) GetApplicationsCallCount() int { return len(fake.getApplicationsArgsForCall) } -func (fake *FakeCloudControllerClient) GetApplicationsCalls(stub func(...ccv3.Query) ([]ccv3.Application, ccv3.Warnings, error)) { +func (fake *FakeCloudControllerClient) GetApplicationsCalls(stub func(...ccv3.Query) ([]resources.Application, ccv3.Warnings, error)) { fake.getApplicationsMutex.Lock() defer fake.getApplicationsMutex.Unlock() fake.GetApplicationsStub = stub @@ -2693,36 +2694,36 @@ func (fake *FakeCloudControllerClient) GetApplicationsArgsForCall(i int) []ccv3. return argsForCall.arg1 } -func (fake *FakeCloudControllerClient) GetApplicationsReturns(result1 []ccv3.Application, result2 ccv3.Warnings, result3 error) { +func (fake *FakeCloudControllerClient) GetApplicationsReturns(result1 []resources.Application, result2 ccv3.Warnings, result3 error) { fake.getApplicationsMutex.Lock() defer fake.getApplicationsMutex.Unlock() fake.GetApplicationsStub = nil fake.getApplicationsReturns = struct { - result1 []ccv3.Application + result1 []resources.Application result2 ccv3.Warnings result3 error }{result1, result2, result3} } -func (fake *FakeCloudControllerClient) GetApplicationsReturnsOnCall(i int, result1 []ccv3.Application, result2 ccv3.Warnings, result3 error) { +func (fake *FakeCloudControllerClient) GetApplicationsReturnsOnCall(i int, result1 []resources.Application, result2 ccv3.Warnings, result3 error) { fake.getApplicationsMutex.Lock() defer fake.getApplicationsMutex.Unlock() fake.GetApplicationsStub = nil if fake.getApplicationsReturnsOnCall == nil { fake.getApplicationsReturnsOnCall = make(map[int]struct { - result1 []ccv3.Application + result1 []resources.Application result2 ccv3.Warnings result3 error }) } fake.getApplicationsReturnsOnCall[i] = struct { - result1 []ccv3.Application + result1 []resources.Application result2 ccv3.Warnings result3 error }{result1, result2, result3} } -func (fake *FakeCloudControllerClient) GetBuild(arg1 string) (ccv3.Build, ccv3.Warnings, error) { +func (fake *FakeCloudControllerClient) GetBuild(arg1 string) (resources.Build, ccv3.Warnings, error) { fake.getBuildMutex.Lock() ret, specificReturn := fake.getBuildReturnsOnCall[len(fake.getBuildArgsForCall)] fake.getBuildArgsForCall = append(fake.getBuildArgsForCall, struct { @@ -2746,7 +2747,7 @@ func (fake *FakeCloudControllerClient) GetBuildCallCount() int { return len(fake.getBuildArgsForCall) } -func (fake *FakeCloudControllerClient) GetBuildCalls(stub func(string) (ccv3.Build, ccv3.Warnings, error)) { +func (fake *FakeCloudControllerClient) GetBuildCalls(stub func(string) (resources.Build, ccv3.Warnings, error)) { fake.getBuildMutex.Lock() defer fake.getBuildMutex.Unlock() fake.GetBuildStub = stub @@ -2759,36 +2760,36 @@ func (fake *FakeCloudControllerClient) GetBuildArgsForCall(i int) string { return argsForCall.arg1 } -func (fake *FakeCloudControllerClient) GetBuildReturns(result1 ccv3.Build, result2 ccv3.Warnings, result3 error) { +func (fake *FakeCloudControllerClient) GetBuildReturns(result1 resources.Build, result2 ccv3.Warnings, result3 error) { fake.getBuildMutex.Lock() defer fake.getBuildMutex.Unlock() fake.GetBuildStub = nil fake.getBuildReturns = struct { - result1 ccv3.Build + result1 resources.Build result2 ccv3.Warnings result3 error }{result1, result2, result3} } -func (fake *FakeCloudControllerClient) GetBuildReturnsOnCall(i int, result1 ccv3.Build, result2 ccv3.Warnings, result3 error) { +func (fake *FakeCloudControllerClient) GetBuildReturnsOnCall(i int, result1 resources.Build, result2 ccv3.Warnings, result3 error) { fake.getBuildMutex.Lock() defer fake.getBuildMutex.Unlock() fake.GetBuildStub = nil if fake.getBuildReturnsOnCall == nil { fake.getBuildReturnsOnCall = make(map[int]struct { - result1 ccv3.Build + result1 resources.Build result2 ccv3.Warnings result3 error }) } fake.getBuildReturnsOnCall[i] = struct { - result1 ccv3.Build + result1 resources.Build result2 ccv3.Warnings result3 error }{result1, result2, result3} } -func (fake *FakeCloudControllerClient) GetBuildpacks(arg1 ...ccv3.Query) ([]ccv3.Buildpack, ccv3.Warnings, error) { +func (fake *FakeCloudControllerClient) GetBuildpacks(arg1 ...ccv3.Query) ([]resources.Buildpack, ccv3.Warnings, error) { fake.getBuildpacksMutex.Lock() ret, specificReturn := fake.getBuildpacksReturnsOnCall[len(fake.getBuildpacksArgsForCall)] fake.getBuildpacksArgsForCall = append(fake.getBuildpacksArgsForCall, struct { @@ -2812,7 +2813,7 @@ func (fake *FakeCloudControllerClient) GetBuildpacksCallCount() int { return len(fake.getBuildpacksArgsForCall) } -func (fake *FakeCloudControllerClient) GetBuildpacksCalls(stub func(...ccv3.Query) ([]ccv3.Buildpack, ccv3.Warnings, error)) { +func (fake *FakeCloudControllerClient) GetBuildpacksCalls(stub func(...ccv3.Query) ([]resources.Buildpack, ccv3.Warnings, error)) { fake.getBuildpacksMutex.Lock() defer fake.getBuildpacksMutex.Unlock() fake.GetBuildpacksStub = stub @@ -2825,36 +2826,36 @@ func (fake *FakeCloudControllerClient) GetBuildpacksArgsForCall(i int) []ccv3.Qu return argsForCall.arg1 } -func (fake *FakeCloudControllerClient) GetBuildpacksReturns(result1 []ccv3.Buildpack, result2 ccv3.Warnings, result3 error) { +func (fake *FakeCloudControllerClient) GetBuildpacksReturns(result1 []resources.Buildpack, result2 ccv3.Warnings, result3 error) { fake.getBuildpacksMutex.Lock() defer fake.getBuildpacksMutex.Unlock() fake.GetBuildpacksStub = nil fake.getBuildpacksReturns = struct { - result1 []ccv3.Buildpack + result1 []resources.Buildpack result2 ccv3.Warnings result3 error }{result1, result2, result3} } -func (fake *FakeCloudControllerClient) GetBuildpacksReturnsOnCall(i int, result1 []ccv3.Buildpack, result2 ccv3.Warnings, result3 error) { +func (fake *FakeCloudControllerClient) GetBuildpacksReturnsOnCall(i int, result1 []resources.Buildpack, result2 ccv3.Warnings, result3 error) { fake.getBuildpacksMutex.Lock() defer fake.getBuildpacksMutex.Unlock() fake.GetBuildpacksStub = nil if fake.getBuildpacksReturnsOnCall == nil { fake.getBuildpacksReturnsOnCall = make(map[int]struct { - result1 []ccv3.Buildpack + result1 []resources.Buildpack result2 ccv3.Warnings result3 error }) } fake.getBuildpacksReturnsOnCall[i] = struct { - result1 []ccv3.Buildpack + result1 []resources.Buildpack result2 ccv3.Warnings result3 error }{result1, result2, result3} } -func (fake *FakeCloudControllerClient) GetDomains(arg1 ...ccv3.Query) ([]ccv3.Domain, ccv3.Warnings, error) { +func (fake *FakeCloudControllerClient) GetDomains(arg1 ...ccv3.Query) ([]resources.Domain, ccv3.Warnings, error) { fake.getDomainsMutex.Lock() ret, specificReturn := fake.getDomainsReturnsOnCall[len(fake.getDomainsArgsForCall)] fake.getDomainsArgsForCall = append(fake.getDomainsArgsForCall, struct { @@ -2878,7 +2879,7 @@ func (fake *FakeCloudControllerClient) GetDomainsCallCount() int { return len(fake.getDomainsArgsForCall) } -func (fake *FakeCloudControllerClient) GetDomainsCalls(stub func(...ccv3.Query) ([]ccv3.Domain, ccv3.Warnings, error)) { +func (fake *FakeCloudControllerClient) GetDomainsCalls(stub func(...ccv3.Query) ([]resources.Domain, ccv3.Warnings, error)) { fake.getDomainsMutex.Lock() defer fake.getDomainsMutex.Unlock() fake.GetDomainsStub = stub @@ -2891,36 +2892,36 @@ func (fake *FakeCloudControllerClient) GetDomainsArgsForCall(i int) []ccv3.Query return argsForCall.arg1 } -func (fake *FakeCloudControllerClient) GetDomainsReturns(result1 []ccv3.Domain, result2 ccv3.Warnings, result3 error) { +func (fake *FakeCloudControllerClient) GetDomainsReturns(result1 []resources.Domain, result2 ccv3.Warnings, result3 error) { fake.getDomainsMutex.Lock() defer fake.getDomainsMutex.Unlock() fake.GetDomainsStub = nil fake.getDomainsReturns = struct { - result1 []ccv3.Domain + result1 []resources.Domain result2 ccv3.Warnings result3 error }{result1, result2, result3} } -func (fake *FakeCloudControllerClient) GetDomainsReturnsOnCall(i int, result1 []ccv3.Domain, result2 ccv3.Warnings, result3 error) { +func (fake *FakeCloudControllerClient) GetDomainsReturnsOnCall(i int, result1 []resources.Domain, result2 ccv3.Warnings, result3 error) { fake.getDomainsMutex.Lock() defer fake.getDomainsMutex.Unlock() fake.GetDomainsStub = nil if fake.getDomainsReturnsOnCall == nil { fake.getDomainsReturnsOnCall = make(map[int]struct { - result1 []ccv3.Domain + result1 []resources.Domain result2 ccv3.Warnings result3 error }) } fake.getDomainsReturnsOnCall[i] = struct { - result1 []ccv3.Domain + result1 []resources.Domain result2 ccv3.Warnings result3 error }{result1, result2, result3} } -func (fake *FakeCloudControllerClient) GetDroplet(arg1 string) (ccv3.Droplet, ccv3.Warnings, error) { +func (fake *FakeCloudControllerClient) GetDroplet(arg1 string) (resources.Droplet, ccv3.Warnings, error) { fake.getDropletMutex.Lock() ret, specificReturn := fake.getDropletReturnsOnCall[len(fake.getDropletArgsForCall)] fake.getDropletArgsForCall = append(fake.getDropletArgsForCall, struct { @@ -2944,7 +2945,7 @@ func (fake *FakeCloudControllerClient) GetDropletCallCount() int { return len(fake.getDropletArgsForCall) } -func (fake *FakeCloudControllerClient) GetDropletCalls(stub func(string) (ccv3.Droplet, ccv3.Warnings, error)) { +func (fake *FakeCloudControllerClient) GetDropletCalls(stub func(string) (resources.Droplet, ccv3.Warnings, error)) { fake.getDropletMutex.Lock() defer fake.getDropletMutex.Unlock() fake.GetDropletStub = stub @@ -2957,36 +2958,36 @@ func (fake *FakeCloudControllerClient) GetDropletArgsForCall(i int) string { return argsForCall.arg1 } -func (fake *FakeCloudControllerClient) GetDropletReturns(result1 ccv3.Droplet, result2 ccv3.Warnings, result3 error) { +func (fake *FakeCloudControllerClient) GetDropletReturns(result1 resources.Droplet, result2 ccv3.Warnings, result3 error) { fake.getDropletMutex.Lock() defer fake.getDropletMutex.Unlock() fake.GetDropletStub = nil fake.getDropletReturns = struct { - result1 ccv3.Droplet + result1 resources.Droplet result2 ccv3.Warnings result3 error }{result1, result2, result3} } -func (fake *FakeCloudControllerClient) GetDropletReturnsOnCall(i int, result1 ccv3.Droplet, result2 ccv3.Warnings, result3 error) { +func (fake *FakeCloudControllerClient) GetDropletReturnsOnCall(i int, result1 resources.Droplet, result2 ccv3.Warnings, result3 error) { fake.getDropletMutex.Lock() defer fake.getDropletMutex.Unlock() fake.GetDropletStub = nil if fake.getDropletReturnsOnCall == nil { fake.getDropletReturnsOnCall = make(map[int]struct { - result1 ccv3.Droplet + result1 resources.Droplet result2 ccv3.Warnings result3 error }) } fake.getDropletReturnsOnCall[i] = struct { - result1 ccv3.Droplet + result1 resources.Droplet result2 ccv3.Warnings result3 error }{result1, result2, result3} } -func (fake *FakeCloudControllerClient) GetDroplets(arg1 ...ccv3.Query) ([]ccv3.Droplet, ccv3.Warnings, error) { +func (fake *FakeCloudControllerClient) GetDroplets(arg1 ...ccv3.Query) ([]resources.Droplet, ccv3.Warnings, error) { fake.getDropletsMutex.Lock() ret, specificReturn := fake.getDropletsReturnsOnCall[len(fake.getDropletsArgsForCall)] fake.getDropletsArgsForCall = append(fake.getDropletsArgsForCall, struct { @@ -3010,7 +3011,7 @@ func (fake *FakeCloudControllerClient) GetDropletsCallCount() int { return len(fake.getDropletsArgsForCall) } -func (fake *FakeCloudControllerClient) GetDropletsCalls(stub func(...ccv3.Query) ([]ccv3.Droplet, ccv3.Warnings, error)) { +func (fake *FakeCloudControllerClient) GetDropletsCalls(stub func(...ccv3.Query) ([]resources.Droplet, ccv3.Warnings, error)) { fake.getDropletsMutex.Lock() defer fake.getDropletsMutex.Unlock() fake.GetDropletsStub = stub @@ -3023,36 +3024,36 @@ func (fake *FakeCloudControllerClient) GetDropletsArgsForCall(i int) []ccv3.Quer return argsForCall.arg1 } -func (fake *FakeCloudControllerClient) GetDropletsReturns(result1 []ccv3.Droplet, result2 ccv3.Warnings, result3 error) { +func (fake *FakeCloudControllerClient) GetDropletsReturns(result1 []resources.Droplet, result2 ccv3.Warnings, result3 error) { fake.getDropletsMutex.Lock() defer fake.getDropletsMutex.Unlock() fake.GetDropletsStub = nil fake.getDropletsReturns = struct { - result1 []ccv3.Droplet + result1 []resources.Droplet result2 ccv3.Warnings result3 error }{result1, result2, result3} } -func (fake *FakeCloudControllerClient) GetDropletsReturnsOnCall(i int, result1 []ccv3.Droplet, result2 ccv3.Warnings, result3 error) { +func (fake *FakeCloudControllerClient) GetDropletsReturnsOnCall(i int, result1 []resources.Droplet, result2 ccv3.Warnings, result3 error) { fake.getDropletsMutex.Lock() defer fake.getDropletsMutex.Unlock() fake.GetDropletsStub = nil if fake.getDropletsReturnsOnCall == nil { fake.getDropletsReturnsOnCall = make(map[int]struct { - result1 []ccv3.Droplet + result1 []resources.Droplet result2 ccv3.Warnings result3 error }) } fake.getDropletsReturnsOnCall[i] = struct { - result1 []ccv3.Droplet + result1 []resources.Droplet result2 ccv3.Warnings result3 error }{result1, result2, result3} } -func (fake *FakeCloudControllerClient) GetFeatureFlag(arg1 string) (ccv3.FeatureFlag, ccv3.Warnings, error) { +func (fake *FakeCloudControllerClient) GetFeatureFlag(arg1 string) (resources.FeatureFlag, ccv3.Warnings, error) { fake.getFeatureFlagMutex.Lock() ret, specificReturn := fake.getFeatureFlagReturnsOnCall[len(fake.getFeatureFlagArgsForCall)] fake.getFeatureFlagArgsForCall = append(fake.getFeatureFlagArgsForCall, struct { @@ -3076,7 +3077,7 @@ func (fake *FakeCloudControllerClient) GetFeatureFlagCallCount() int { return len(fake.getFeatureFlagArgsForCall) } -func (fake *FakeCloudControllerClient) GetFeatureFlagCalls(stub func(string) (ccv3.FeatureFlag, ccv3.Warnings, error)) { +func (fake *FakeCloudControllerClient) GetFeatureFlagCalls(stub func(string) (resources.FeatureFlag, ccv3.Warnings, error)) { fake.getFeatureFlagMutex.Lock() defer fake.getFeatureFlagMutex.Unlock() fake.GetFeatureFlagStub = stub @@ -3089,36 +3090,36 @@ func (fake *FakeCloudControllerClient) GetFeatureFlagArgsForCall(i int) string { return argsForCall.arg1 } -func (fake *FakeCloudControllerClient) GetFeatureFlagReturns(result1 ccv3.FeatureFlag, result2 ccv3.Warnings, result3 error) { +func (fake *FakeCloudControllerClient) GetFeatureFlagReturns(result1 resources.FeatureFlag, result2 ccv3.Warnings, result3 error) { fake.getFeatureFlagMutex.Lock() defer fake.getFeatureFlagMutex.Unlock() fake.GetFeatureFlagStub = nil fake.getFeatureFlagReturns = struct { - result1 ccv3.FeatureFlag + result1 resources.FeatureFlag result2 ccv3.Warnings result3 error }{result1, result2, result3} } -func (fake *FakeCloudControllerClient) GetFeatureFlagReturnsOnCall(i int, result1 ccv3.FeatureFlag, result2 ccv3.Warnings, result3 error) { +func (fake *FakeCloudControllerClient) GetFeatureFlagReturnsOnCall(i int, result1 resources.FeatureFlag, result2 ccv3.Warnings, result3 error) { fake.getFeatureFlagMutex.Lock() defer fake.getFeatureFlagMutex.Unlock() fake.GetFeatureFlagStub = nil if fake.getFeatureFlagReturnsOnCall == nil { fake.getFeatureFlagReturnsOnCall = make(map[int]struct { - result1 ccv3.FeatureFlag + result1 resources.FeatureFlag result2 ccv3.Warnings result3 error }) } fake.getFeatureFlagReturnsOnCall[i] = struct { - result1 ccv3.FeatureFlag + result1 resources.FeatureFlag result2 ccv3.Warnings result3 error }{result1, result2, result3} } -func (fake *FakeCloudControllerClient) GetFeatureFlags() ([]ccv3.FeatureFlag, ccv3.Warnings, error) { +func (fake *FakeCloudControllerClient) GetFeatureFlags() ([]resources.FeatureFlag, ccv3.Warnings, error) { fake.getFeatureFlagsMutex.Lock() ret, specificReturn := fake.getFeatureFlagsReturnsOnCall[len(fake.getFeatureFlagsArgsForCall)] fake.getFeatureFlagsArgsForCall = append(fake.getFeatureFlagsArgsForCall, struct { @@ -3141,42 +3142,42 @@ func (fake *FakeCloudControllerClient) GetFeatureFlagsCallCount() int { return len(fake.getFeatureFlagsArgsForCall) } -func (fake *FakeCloudControllerClient) GetFeatureFlagsCalls(stub func() ([]ccv3.FeatureFlag, ccv3.Warnings, error)) { +func (fake *FakeCloudControllerClient) GetFeatureFlagsCalls(stub func() ([]resources.FeatureFlag, ccv3.Warnings, error)) { fake.getFeatureFlagsMutex.Lock() defer fake.getFeatureFlagsMutex.Unlock() fake.GetFeatureFlagsStub = stub } -func (fake *FakeCloudControllerClient) GetFeatureFlagsReturns(result1 []ccv3.FeatureFlag, result2 ccv3.Warnings, result3 error) { +func (fake *FakeCloudControllerClient) GetFeatureFlagsReturns(result1 []resources.FeatureFlag, result2 ccv3.Warnings, result3 error) { fake.getFeatureFlagsMutex.Lock() defer fake.getFeatureFlagsMutex.Unlock() fake.GetFeatureFlagsStub = nil fake.getFeatureFlagsReturns = struct { - result1 []ccv3.FeatureFlag + result1 []resources.FeatureFlag result2 ccv3.Warnings result3 error }{result1, result2, result3} } -func (fake *FakeCloudControllerClient) GetFeatureFlagsReturnsOnCall(i int, result1 []ccv3.FeatureFlag, result2 ccv3.Warnings, result3 error) { +func (fake *FakeCloudControllerClient) GetFeatureFlagsReturnsOnCall(i int, result1 []resources.FeatureFlag, result2 ccv3.Warnings, result3 error) { fake.getFeatureFlagsMutex.Lock() defer fake.getFeatureFlagsMutex.Unlock() fake.GetFeatureFlagsStub = nil if fake.getFeatureFlagsReturnsOnCall == nil { fake.getFeatureFlagsReturnsOnCall = make(map[int]struct { - result1 []ccv3.FeatureFlag + result1 []resources.FeatureFlag result2 ccv3.Warnings result3 error }) } fake.getFeatureFlagsReturnsOnCall[i] = struct { - result1 []ccv3.FeatureFlag + result1 []resources.FeatureFlag result2 ccv3.Warnings result3 error }{result1, result2, result3} } -func (fake *FakeCloudControllerClient) GetIsolationSegment(arg1 string) (ccv3.IsolationSegment, ccv3.Warnings, error) { +func (fake *FakeCloudControllerClient) GetIsolationSegment(arg1 string) (resources.IsolationSegment, ccv3.Warnings, error) { fake.getIsolationSegmentMutex.Lock() ret, specificReturn := fake.getIsolationSegmentReturnsOnCall[len(fake.getIsolationSegmentArgsForCall)] fake.getIsolationSegmentArgsForCall = append(fake.getIsolationSegmentArgsForCall, struct { @@ -3200,7 +3201,7 @@ func (fake *FakeCloudControllerClient) GetIsolationSegmentCallCount() int { return len(fake.getIsolationSegmentArgsForCall) } -func (fake *FakeCloudControllerClient) GetIsolationSegmentCalls(stub func(string) (ccv3.IsolationSegment, ccv3.Warnings, error)) { +func (fake *FakeCloudControllerClient) GetIsolationSegmentCalls(stub func(string) (resources.IsolationSegment, ccv3.Warnings, error)) { fake.getIsolationSegmentMutex.Lock() defer fake.getIsolationSegmentMutex.Unlock() fake.GetIsolationSegmentStub = stub @@ -3213,36 +3214,36 @@ func (fake *FakeCloudControllerClient) GetIsolationSegmentArgsForCall(i int) str return argsForCall.arg1 } -func (fake *FakeCloudControllerClient) GetIsolationSegmentReturns(result1 ccv3.IsolationSegment, result2 ccv3.Warnings, result3 error) { +func (fake *FakeCloudControllerClient) GetIsolationSegmentReturns(result1 resources.IsolationSegment, result2 ccv3.Warnings, result3 error) { fake.getIsolationSegmentMutex.Lock() defer fake.getIsolationSegmentMutex.Unlock() fake.GetIsolationSegmentStub = nil fake.getIsolationSegmentReturns = struct { - result1 ccv3.IsolationSegment + result1 resources.IsolationSegment result2 ccv3.Warnings result3 error }{result1, result2, result3} } -func (fake *FakeCloudControllerClient) GetIsolationSegmentReturnsOnCall(i int, result1 ccv3.IsolationSegment, result2 ccv3.Warnings, result3 error) { +func (fake *FakeCloudControllerClient) GetIsolationSegmentReturnsOnCall(i int, result1 resources.IsolationSegment, result2 ccv3.Warnings, result3 error) { fake.getIsolationSegmentMutex.Lock() defer fake.getIsolationSegmentMutex.Unlock() fake.GetIsolationSegmentStub = nil if fake.getIsolationSegmentReturnsOnCall == nil { fake.getIsolationSegmentReturnsOnCall = make(map[int]struct { - result1 ccv3.IsolationSegment + result1 resources.IsolationSegment result2 ccv3.Warnings result3 error }) } fake.getIsolationSegmentReturnsOnCall[i] = struct { - result1 ccv3.IsolationSegment + result1 resources.IsolationSegment result2 ccv3.Warnings result3 error }{result1, result2, result3} } -func (fake *FakeCloudControllerClient) GetIsolationSegmentOrganizations(arg1 string) ([]ccv3.Organization, ccv3.Warnings, error) { +func (fake *FakeCloudControllerClient) GetIsolationSegmentOrganizations(arg1 string) ([]resources.Organization, ccv3.Warnings, error) { fake.getIsolationSegmentOrganizationsMutex.Lock() ret, specificReturn := fake.getIsolationSegmentOrganizationsReturnsOnCall[len(fake.getIsolationSegmentOrganizationsArgsForCall)] fake.getIsolationSegmentOrganizationsArgsForCall = append(fake.getIsolationSegmentOrganizationsArgsForCall, struct { @@ -3266,7 +3267,7 @@ func (fake *FakeCloudControllerClient) GetIsolationSegmentOrganizationsCallCount return len(fake.getIsolationSegmentOrganizationsArgsForCall) } -func (fake *FakeCloudControllerClient) GetIsolationSegmentOrganizationsCalls(stub func(string) ([]ccv3.Organization, ccv3.Warnings, error)) { +func (fake *FakeCloudControllerClient) GetIsolationSegmentOrganizationsCalls(stub func(string) ([]resources.Organization, ccv3.Warnings, error)) { fake.getIsolationSegmentOrganizationsMutex.Lock() defer fake.getIsolationSegmentOrganizationsMutex.Unlock() fake.GetIsolationSegmentOrganizationsStub = stub @@ -3279,36 +3280,36 @@ func (fake *FakeCloudControllerClient) GetIsolationSegmentOrganizationsArgsForCa return argsForCall.arg1 } -func (fake *FakeCloudControllerClient) GetIsolationSegmentOrganizationsReturns(result1 []ccv3.Organization, result2 ccv3.Warnings, result3 error) { +func (fake *FakeCloudControllerClient) GetIsolationSegmentOrganizationsReturns(result1 []resources.Organization, result2 ccv3.Warnings, result3 error) { fake.getIsolationSegmentOrganizationsMutex.Lock() defer fake.getIsolationSegmentOrganizationsMutex.Unlock() fake.GetIsolationSegmentOrganizationsStub = nil fake.getIsolationSegmentOrganizationsReturns = struct { - result1 []ccv3.Organization + result1 []resources.Organization result2 ccv3.Warnings result3 error }{result1, result2, result3} } -func (fake *FakeCloudControllerClient) GetIsolationSegmentOrganizationsReturnsOnCall(i int, result1 []ccv3.Organization, result2 ccv3.Warnings, result3 error) { +func (fake *FakeCloudControllerClient) GetIsolationSegmentOrganizationsReturnsOnCall(i int, result1 []resources.Organization, result2 ccv3.Warnings, result3 error) { fake.getIsolationSegmentOrganizationsMutex.Lock() defer fake.getIsolationSegmentOrganizationsMutex.Unlock() fake.GetIsolationSegmentOrganizationsStub = nil if fake.getIsolationSegmentOrganizationsReturnsOnCall == nil { fake.getIsolationSegmentOrganizationsReturnsOnCall = make(map[int]struct { - result1 []ccv3.Organization + result1 []resources.Organization result2 ccv3.Warnings result3 error }) } fake.getIsolationSegmentOrganizationsReturnsOnCall[i] = struct { - result1 []ccv3.Organization + result1 []resources.Organization result2 ccv3.Warnings result3 error }{result1, result2, result3} } -func (fake *FakeCloudControllerClient) GetIsolationSegments(arg1 ...ccv3.Query) ([]ccv3.IsolationSegment, ccv3.Warnings, error) { +func (fake *FakeCloudControllerClient) GetIsolationSegments(arg1 ...ccv3.Query) ([]resources.IsolationSegment, ccv3.Warnings, error) { fake.getIsolationSegmentsMutex.Lock() ret, specificReturn := fake.getIsolationSegmentsReturnsOnCall[len(fake.getIsolationSegmentsArgsForCall)] fake.getIsolationSegmentsArgsForCall = append(fake.getIsolationSegmentsArgsForCall, struct { @@ -3332,7 +3333,7 @@ func (fake *FakeCloudControllerClient) GetIsolationSegmentsCallCount() int { return len(fake.getIsolationSegmentsArgsForCall) } -func (fake *FakeCloudControllerClient) GetIsolationSegmentsCalls(stub func(...ccv3.Query) ([]ccv3.IsolationSegment, ccv3.Warnings, error)) { +func (fake *FakeCloudControllerClient) GetIsolationSegmentsCalls(stub func(...ccv3.Query) ([]resources.IsolationSegment, ccv3.Warnings, error)) { fake.getIsolationSegmentsMutex.Lock() defer fake.getIsolationSegmentsMutex.Unlock() fake.GetIsolationSegmentsStub = stub @@ -3345,36 +3346,36 @@ func (fake *FakeCloudControllerClient) GetIsolationSegmentsArgsForCall(i int) [] return argsForCall.arg1 } -func (fake *FakeCloudControllerClient) GetIsolationSegmentsReturns(result1 []ccv3.IsolationSegment, result2 ccv3.Warnings, result3 error) { +func (fake *FakeCloudControllerClient) GetIsolationSegmentsReturns(result1 []resources.IsolationSegment, result2 ccv3.Warnings, result3 error) { fake.getIsolationSegmentsMutex.Lock() defer fake.getIsolationSegmentsMutex.Unlock() fake.GetIsolationSegmentsStub = nil fake.getIsolationSegmentsReturns = struct { - result1 []ccv3.IsolationSegment + result1 []resources.IsolationSegment result2 ccv3.Warnings result3 error }{result1, result2, result3} } -func (fake *FakeCloudControllerClient) GetIsolationSegmentsReturnsOnCall(i int, result1 []ccv3.IsolationSegment, result2 ccv3.Warnings, result3 error) { +func (fake *FakeCloudControllerClient) GetIsolationSegmentsReturnsOnCall(i int, result1 []resources.IsolationSegment, result2 ccv3.Warnings, result3 error) { fake.getIsolationSegmentsMutex.Lock() defer fake.getIsolationSegmentsMutex.Unlock() fake.GetIsolationSegmentsStub = nil if fake.getIsolationSegmentsReturnsOnCall == nil { fake.getIsolationSegmentsReturnsOnCall = make(map[int]struct { - result1 []ccv3.IsolationSegment + result1 []resources.IsolationSegment result2 ccv3.Warnings result3 error }) } fake.getIsolationSegmentsReturnsOnCall[i] = struct { - result1 []ccv3.IsolationSegment + result1 []resources.IsolationSegment result2 ccv3.Warnings result3 error }{result1, result2, result3} } -func (fake *FakeCloudControllerClient) GetOrganizationDefaultIsolationSegment(arg1 string) (ccv3.Relationship, ccv3.Warnings, error) { +func (fake *FakeCloudControllerClient) GetOrganizationDefaultIsolationSegment(arg1 string) (resources.Relationship, ccv3.Warnings, error) { fake.getOrganizationDefaultIsolationSegmentMutex.Lock() ret, specificReturn := fake.getOrganizationDefaultIsolationSegmentReturnsOnCall[len(fake.getOrganizationDefaultIsolationSegmentArgsForCall)] fake.getOrganizationDefaultIsolationSegmentArgsForCall = append(fake.getOrganizationDefaultIsolationSegmentArgsForCall, struct { @@ -3398,7 +3399,7 @@ func (fake *FakeCloudControllerClient) GetOrganizationDefaultIsolationSegmentCal return len(fake.getOrganizationDefaultIsolationSegmentArgsForCall) } -func (fake *FakeCloudControllerClient) GetOrganizationDefaultIsolationSegmentCalls(stub func(string) (ccv3.Relationship, ccv3.Warnings, error)) { +func (fake *FakeCloudControllerClient) GetOrganizationDefaultIsolationSegmentCalls(stub func(string) (resources.Relationship, ccv3.Warnings, error)) { fake.getOrganizationDefaultIsolationSegmentMutex.Lock() defer fake.getOrganizationDefaultIsolationSegmentMutex.Unlock() fake.GetOrganizationDefaultIsolationSegmentStub = stub @@ -3411,36 +3412,36 @@ func (fake *FakeCloudControllerClient) GetOrganizationDefaultIsolationSegmentArg return argsForCall.arg1 } -func (fake *FakeCloudControllerClient) GetOrganizationDefaultIsolationSegmentReturns(result1 ccv3.Relationship, result2 ccv3.Warnings, result3 error) { +func (fake *FakeCloudControllerClient) GetOrganizationDefaultIsolationSegmentReturns(result1 resources.Relationship, result2 ccv3.Warnings, result3 error) { fake.getOrganizationDefaultIsolationSegmentMutex.Lock() defer fake.getOrganizationDefaultIsolationSegmentMutex.Unlock() fake.GetOrganizationDefaultIsolationSegmentStub = nil fake.getOrganizationDefaultIsolationSegmentReturns = struct { - result1 ccv3.Relationship + result1 resources.Relationship result2 ccv3.Warnings result3 error }{result1, result2, result3} } -func (fake *FakeCloudControllerClient) GetOrganizationDefaultIsolationSegmentReturnsOnCall(i int, result1 ccv3.Relationship, result2 ccv3.Warnings, result3 error) { +func (fake *FakeCloudControllerClient) GetOrganizationDefaultIsolationSegmentReturnsOnCall(i int, result1 resources.Relationship, result2 ccv3.Warnings, result3 error) { fake.getOrganizationDefaultIsolationSegmentMutex.Lock() defer fake.getOrganizationDefaultIsolationSegmentMutex.Unlock() fake.GetOrganizationDefaultIsolationSegmentStub = nil if fake.getOrganizationDefaultIsolationSegmentReturnsOnCall == nil { fake.getOrganizationDefaultIsolationSegmentReturnsOnCall = make(map[int]struct { - result1 ccv3.Relationship + result1 resources.Relationship result2 ccv3.Warnings result3 error }) } fake.getOrganizationDefaultIsolationSegmentReturnsOnCall[i] = struct { - result1 ccv3.Relationship + result1 resources.Relationship result2 ccv3.Warnings result3 error }{result1, result2, result3} } -func (fake *FakeCloudControllerClient) GetOrganizationDomains(arg1 string, arg2 ...ccv3.Query) ([]ccv3.Domain, ccv3.Warnings, error) { +func (fake *FakeCloudControllerClient) GetOrganizationDomains(arg1 string, arg2 ...ccv3.Query) ([]resources.Domain, ccv3.Warnings, error) { fake.getOrganizationDomainsMutex.Lock() ret, specificReturn := fake.getOrganizationDomainsReturnsOnCall[len(fake.getOrganizationDomainsArgsForCall)] fake.getOrganizationDomainsArgsForCall = append(fake.getOrganizationDomainsArgsForCall, struct { @@ -3465,7 +3466,7 @@ func (fake *FakeCloudControllerClient) GetOrganizationDomainsCallCount() int { return len(fake.getOrganizationDomainsArgsForCall) } -func (fake *FakeCloudControllerClient) GetOrganizationDomainsCalls(stub func(string, ...ccv3.Query) ([]ccv3.Domain, ccv3.Warnings, error)) { +func (fake *FakeCloudControllerClient) GetOrganizationDomainsCalls(stub func(string, ...ccv3.Query) ([]resources.Domain, ccv3.Warnings, error)) { fake.getOrganizationDomainsMutex.Lock() defer fake.getOrganizationDomainsMutex.Unlock() fake.GetOrganizationDomainsStub = stub @@ -3478,36 +3479,36 @@ func (fake *FakeCloudControllerClient) GetOrganizationDomainsArgsForCall(i int) return argsForCall.arg1, argsForCall.arg2 } -func (fake *FakeCloudControllerClient) GetOrganizationDomainsReturns(result1 []ccv3.Domain, result2 ccv3.Warnings, result3 error) { +func (fake *FakeCloudControllerClient) GetOrganizationDomainsReturns(result1 []resources.Domain, result2 ccv3.Warnings, result3 error) { fake.getOrganizationDomainsMutex.Lock() defer fake.getOrganizationDomainsMutex.Unlock() fake.GetOrganizationDomainsStub = nil fake.getOrganizationDomainsReturns = struct { - result1 []ccv3.Domain + result1 []resources.Domain result2 ccv3.Warnings result3 error }{result1, result2, result3} } -func (fake *FakeCloudControllerClient) GetOrganizationDomainsReturnsOnCall(i int, result1 []ccv3.Domain, result2 ccv3.Warnings, result3 error) { +func (fake *FakeCloudControllerClient) GetOrganizationDomainsReturnsOnCall(i int, result1 []resources.Domain, result2 ccv3.Warnings, result3 error) { fake.getOrganizationDomainsMutex.Lock() defer fake.getOrganizationDomainsMutex.Unlock() fake.GetOrganizationDomainsStub = nil if fake.getOrganizationDomainsReturnsOnCall == nil { fake.getOrganizationDomainsReturnsOnCall = make(map[int]struct { - result1 []ccv3.Domain + result1 []resources.Domain result2 ccv3.Warnings result3 error }) } fake.getOrganizationDomainsReturnsOnCall[i] = struct { - result1 []ccv3.Domain + result1 []resources.Domain result2 ccv3.Warnings result3 error }{result1, result2, result3} } -func (fake *FakeCloudControllerClient) GetOrganizations(arg1 ...ccv3.Query) ([]ccv3.Organization, ccv3.Warnings, error) { +func (fake *FakeCloudControllerClient) GetOrganizations(arg1 ...ccv3.Query) ([]resources.Organization, ccv3.Warnings, error) { fake.getOrganizationsMutex.Lock() ret, specificReturn := fake.getOrganizationsReturnsOnCall[len(fake.getOrganizationsArgsForCall)] fake.getOrganizationsArgsForCall = append(fake.getOrganizationsArgsForCall, struct { @@ -3531,7 +3532,7 @@ func (fake *FakeCloudControllerClient) GetOrganizationsCallCount() int { return len(fake.getOrganizationsArgsForCall) } -func (fake *FakeCloudControllerClient) GetOrganizationsCalls(stub func(...ccv3.Query) ([]ccv3.Organization, ccv3.Warnings, error)) { +func (fake *FakeCloudControllerClient) GetOrganizationsCalls(stub func(...ccv3.Query) ([]resources.Organization, ccv3.Warnings, error)) { fake.getOrganizationsMutex.Lock() defer fake.getOrganizationsMutex.Unlock() fake.GetOrganizationsStub = stub @@ -3544,36 +3545,36 @@ func (fake *FakeCloudControllerClient) GetOrganizationsArgsForCall(i int) []ccv3 return argsForCall.arg1 } -func (fake *FakeCloudControllerClient) GetOrganizationsReturns(result1 []ccv3.Organization, result2 ccv3.Warnings, result3 error) { +func (fake *FakeCloudControllerClient) GetOrganizationsReturns(result1 []resources.Organization, result2 ccv3.Warnings, result3 error) { fake.getOrganizationsMutex.Lock() defer fake.getOrganizationsMutex.Unlock() fake.GetOrganizationsStub = nil fake.getOrganizationsReturns = struct { - result1 []ccv3.Organization + result1 []resources.Organization result2 ccv3.Warnings result3 error }{result1, result2, result3} } -func (fake *FakeCloudControllerClient) GetOrganizationsReturnsOnCall(i int, result1 []ccv3.Organization, result2 ccv3.Warnings, result3 error) { +func (fake *FakeCloudControllerClient) GetOrganizationsReturnsOnCall(i int, result1 []resources.Organization, result2 ccv3.Warnings, result3 error) { fake.getOrganizationsMutex.Lock() defer fake.getOrganizationsMutex.Unlock() fake.GetOrganizationsStub = nil if fake.getOrganizationsReturnsOnCall == nil { fake.getOrganizationsReturnsOnCall = make(map[int]struct { - result1 []ccv3.Organization + result1 []resources.Organization result2 ccv3.Warnings result3 error }) } fake.getOrganizationsReturnsOnCall[i] = struct { - result1 []ccv3.Organization + result1 []resources.Organization result2 ccv3.Warnings result3 error }{result1, result2, result3} } -func (fake *FakeCloudControllerClient) GetPackage(arg1 string) (ccv3.Package, ccv3.Warnings, error) { +func (fake *FakeCloudControllerClient) GetPackage(arg1 string) (resources.Package, ccv3.Warnings, error) { fake.getPackageMutex.Lock() ret, specificReturn := fake.getPackageReturnsOnCall[len(fake.getPackageArgsForCall)] fake.getPackageArgsForCall = append(fake.getPackageArgsForCall, struct { @@ -3597,7 +3598,7 @@ func (fake *FakeCloudControllerClient) GetPackageCallCount() int { return len(fake.getPackageArgsForCall) } -func (fake *FakeCloudControllerClient) GetPackageCalls(stub func(string) (ccv3.Package, ccv3.Warnings, error)) { +func (fake *FakeCloudControllerClient) GetPackageCalls(stub func(string) (resources.Package, ccv3.Warnings, error)) { fake.getPackageMutex.Lock() defer fake.getPackageMutex.Unlock() fake.GetPackageStub = stub @@ -3610,36 +3611,36 @@ func (fake *FakeCloudControllerClient) GetPackageArgsForCall(i int) string { return argsForCall.arg1 } -func (fake *FakeCloudControllerClient) GetPackageReturns(result1 ccv3.Package, result2 ccv3.Warnings, result3 error) { +func (fake *FakeCloudControllerClient) GetPackageReturns(result1 resources.Package, result2 ccv3.Warnings, result3 error) { fake.getPackageMutex.Lock() defer fake.getPackageMutex.Unlock() fake.GetPackageStub = nil fake.getPackageReturns = struct { - result1 ccv3.Package + result1 resources.Package result2 ccv3.Warnings result3 error }{result1, result2, result3} } -func (fake *FakeCloudControllerClient) GetPackageReturnsOnCall(i int, result1 ccv3.Package, result2 ccv3.Warnings, result3 error) { +func (fake *FakeCloudControllerClient) GetPackageReturnsOnCall(i int, result1 resources.Package, result2 ccv3.Warnings, result3 error) { fake.getPackageMutex.Lock() defer fake.getPackageMutex.Unlock() fake.GetPackageStub = nil if fake.getPackageReturnsOnCall == nil { fake.getPackageReturnsOnCall = make(map[int]struct { - result1 ccv3.Package + result1 resources.Package result2 ccv3.Warnings result3 error }) } fake.getPackageReturnsOnCall[i] = struct { - result1 ccv3.Package + result1 resources.Package result2 ccv3.Warnings result3 error }{result1, result2, result3} } -func (fake *FakeCloudControllerClient) GetPackages(arg1 ...ccv3.Query) ([]ccv3.Package, ccv3.Warnings, error) { +func (fake *FakeCloudControllerClient) GetPackages(arg1 ...ccv3.Query) ([]resources.Package, ccv3.Warnings, error) { fake.getPackagesMutex.Lock() ret, specificReturn := fake.getPackagesReturnsOnCall[len(fake.getPackagesArgsForCall)] fake.getPackagesArgsForCall = append(fake.getPackagesArgsForCall, struct { @@ -3663,7 +3664,7 @@ func (fake *FakeCloudControllerClient) GetPackagesCallCount() int { return len(fake.getPackagesArgsForCall) } -func (fake *FakeCloudControllerClient) GetPackagesCalls(stub func(...ccv3.Query) ([]ccv3.Package, ccv3.Warnings, error)) { +func (fake *FakeCloudControllerClient) GetPackagesCalls(stub func(...ccv3.Query) ([]resources.Package, ccv3.Warnings, error)) { fake.getPackagesMutex.Lock() defer fake.getPackagesMutex.Unlock() fake.GetPackagesStub = stub @@ -3676,30 +3677,30 @@ func (fake *FakeCloudControllerClient) GetPackagesArgsForCall(i int) []ccv3.Quer return argsForCall.arg1 } -func (fake *FakeCloudControllerClient) GetPackagesReturns(result1 []ccv3.Package, result2 ccv3.Warnings, result3 error) { +func (fake *FakeCloudControllerClient) GetPackagesReturns(result1 []resources.Package, result2 ccv3.Warnings, result3 error) { fake.getPackagesMutex.Lock() defer fake.getPackagesMutex.Unlock() fake.GetPackagesStub = nil fake.getPackagesReturns = struct { - result1 []ccv3.Package + result1 []resources.Package result2 ccv3.Warnings result3 error }{result1, result2, result3} } -func (fake *FakeCloudControllerClient) GetPackagesReturnsOnCall(i int, result1 []ccv3.Package, result2 ccv3.Warnings, result3 error) { +func (fake *FakeCloudControllerClient) GetPackagesReturnsOnCall(i int, result1 []resources.Package, result2 ccv3.Warnings, result3 error) { fake.getPackagesMutex.Lock() defer fake.getPackagesMutex.Unlock() fake.GetPackagesStub = nil if fake.getPackagesReturnsOnCall == nil { fake.getPackagesReturnsOnCall = make(map[int]struct { - result1 []ccv3.Package + result1 []resources.Package result2 ccv3.Warnings result3 error }) } fake.getPackagesReturnsOnCall[i] = struct { - result1 []ccv3.Package + result1 []resources.Package result2 ccv3.Warnings result3 error }{result1, result2, result3} @@ -3771,7 +3772,7 @@ func (fake *FakeCloudControllerClient) GetProcessInstancesReturnsOnCall(i int, r }{result1, result2, result3} } -func (fake *FakeCloudControllerClient) GetServiceInstances(arg1 ...ccv3.Query) ([]ccv3.ServiceInstance, ccv3.Warnings, error) { +func (fake *FakeCloudControllerClient) GetServiceInstances(arg1 ...ccv3.Query) ([]resources.ServiceInstance, ccv3.Warnings, error) { fake.getServiceInstancesMutex.Lock() ret, specificReturn := fake.getServiceInstancesReturnsOnCall[len(fake.getServiceInstancesArgsForCall)] fake.getServiceInstancesArgsForCall = append(fake.getServiceInstancesArgsForCall, struct { @@ -3795,7 +3796,7 @@ func (fake *FakeCloudControllerClient) GetServiceInstancesCallCount() int { return len(fake.getServiceInstancesArgsForCall) } -func (fake *FakeCloudControllerClient) GetServiceInstancesCalls(stub func(...ccv3.Query) ([]ccv3.ServiceInstance, ccv3.Warnings, error)) { +func (fake *FakeCloudControllerClient) GetServiceInstancesCalls(stub func(...ccv3.Query) ([]resources.ServiceInstance, ccv3.Warnings, error)) { fake.getServiceInstancesMutex.Lock() defer fake.getServiceInstancesMutex.Unlock() fake.GetServiceInstancesStub = stub @@ -3808,36 +3809,36 @@ func (fake *FakeCloudControllerClient) GetServiceInstancesArgsForCall(i int) []c return argsForCall.arg1 } -func (fake *FakeCloudControllerClient) GetServiceInstancesReturns(result1 []ccv3.ServiceInstance, result2 ccv3.Warnings, result3 error) { +func (fake *FakeCloudControllerClient) GetServiceInstancesReturns(result1 []resources.ServiceInstance, result2 ccv3.Warnings, result3 error) { fake.getServiceInstancesMutex.Lock() defer fake.getServiceInstancesMutex.Unlock() fake.GetServiceInstancesStub = nil fake.getServiceInstancesReturns = struct { - result1 []ccv3.ServiceInstance + result1 []resources.ServiceInstance result2 ccv3.Warnings result3 error }{result1, result2, result3} } -func (fake *FakeCloudControllerClient) GetServiceInstancesReturnsOnCall(i int, result1 []ccv3.ServiceInstance, result2 ccv3.Warnings, result3 error) { +func (fake *FakeCloudControllerClient) GetServiceInstancesReturnsOnCall(i int, result1 []resources.ServiceInstance, result2 ccv3.Warnings, result3 error) { fake.getServiceInstancesMutex.Lock() defer fake.getServiceInstancesMutex.Unlock() fake.GetServiceInstancesStub = nil if fake.getServiceInstancesReturnsOnCall == nil { fake.getServiceInstancesReturnsOnCall = make(map[int]struct { - result1 []ccv3.ServiceInstance + result1 []resources.ServiceInstance result2 ccv3.Warnings result3 error }) } fake.getServiceInstancesReturnsOnCall[i] = struct { - result1 []ccv3.ServiceInstance + result1 []resources.ServiceInstance result2 ccv3.Warnings result3 error }{result1, result2, result3} } -func (fake *FakeCloudControllerClient) GetSpaceIsolationSegment(arg1 string) (ccv3.Relationship, ccv3.Warnings, error) { +func (fake *FakeCloudControllerClient) GetSpaceIsolationSegment(arg1 string) (resources.Relationship, ccv3.Warnings, error) { fake.getSpaceIsolationSegmentMutex.Lock() ret, specificReturn := fake.getSpaceIsolationSegmentReturnsOnCall[len(fake.getSpaceIsolationSegmentArgsForCall)] fake.getSpaceIsolationSegmentArgsForCall = append(fake.getSpaceIsolationSegmentArgsForCall, struct { @@ -3861,7 +3862,7 @@ func (fake *FakeCloudControllerClient) GetSpaceIsolationSegmentCallCount() int { return len(fake.getSpaceIsolationSegmentArgsForCall) } -func (fake *FakeCloudControllerClient) GetSpaceIsolationSegmentCalls(stub func(string) (ccv3.Relationship, ccv3.Warnings, error)) { +func (fake *FakeCloudControllerClient) GetSpaceIsolationSegmentCalls(stub func(string) (resources.Relationship, ccv3.Warnings, error)) { fake.getSpaceIsolationSegmentMutex.Lock() defer fake.getSpaceIsolationSegmentMutex.Unlock() fake.GetSpaceIsolationSegmentStub = stub @@ -3874,36 +3875,36 @@ func (fake *FakeCloudControllerClient) GetSpaceIsolationSegmentArgsForCall(i int return argsForCall.arg1 } -func (fake *FakeCloudControllerClient) GetSpaceIsolationSegmentReturns(result1 ccv3.Relationship, result2 ccv3.Warnings, result3 error) { +func (fake *FakeCloudControllerClient) GetSpaceIsolationSegmentReturns(result1 resources.Relationship, result2 ccv3.Warnings, result3 error) { fake.getSpaceIsolationSegmentMutex.Lock() defer fake.getSpaceIsolationSegmentMutex.Unlock() fake.GetSpaceIsolationSegmentStub = nil fake.getSpaceIsolationSegmentReturns = struct { - result1 ccv3.Relationship + result1 resources.Relationship result2 ccv3.Warnings result3 error }{result1, result2, result3} } -func (fake *FakeCloudControllerClient) GetSpaceIsolationSegmentReturnsOnCall(i int, result1 ccv3.Relationship, result2 ccv3.Warnings, result3 error) { +func (fake *FakeCloudControllerClient) GetSpaceIsolationSegmentReturnsOnCall(i int, result1 resources.Relationship, result2 ccv3.Warnings, result3 error) { fake.getSpaceIsolationSegmentMutex.Lock() defer fake.getSpaceIsolationSegmentMutex.Unlock() fake.GetSpaceIsolationSegmentStub = nil if fake.getSpaceIsolationSegmentReturnsOnCall == nil { fake.getSpaceIsolationSegmentReturnsOnCall = make(map[int]struct { - result1 ccv3.Relationship + result1 resources.Relationship result2 ccv3.Warnings result3 error }) } fake.getSpaceIsolationSegmentReturnsOnCall[i] = struct { - result1 ccv3.Relationship + result1 resources.Relationship result2 ccv3.Warnings result3 error }{result1, result2, result3} } -func (fake *FakeCloudControllerClient) GetSpaces(arg1 ...ccv3.Query) ([]ccv3.Space, ccv3.Warnings, error) { +func (fake *FakeCloudControllerClient) GetSpaces(arg1 ...ccv3.Query) ([]resources.Space, ccv3.Warnings, error) { fake.getSpacesMutex.Lock() ret, specificReturn := fake.getSpacesReturnsOnCall[len(fake.getSpacesArgsForCall)] fake.getSpacesArgsForCall = append(fake.getSpacesArgsForCall, struct { @@ -3927,7 +3928,7 @@ func (fake *FakeCloudControllerClient) GetSpacesCallCount() int { return len(fake.getSpacesArgsForCall) } -func (fake *FakeCloudControllerClient) GetSpacesCalls(stub func(...ccv3.Query) ([]ccv3.Space, ccv3.Warnings, error)) { +func (fake *FakeCloudControllerClient) GetSpacesCalls(stub func(...ccv3.Query) ([]resources.Space, ccv3.Warnings, error)) { fake.getSpacesMutex.Lock() defer fake.getSpacesMutex.Unlock() fake.GetSpacesStub = stub @@ -3940,36 +3941,36 @@ func (fake *FakeCloudControllerClient) GetSpacesArgsForCall(i int) []ccv3.Query return argsForCall.arg1 } -func (fake *FakeCloudControllerClient) GetSpacesReturns(result1 []ccv3.Space, result2 ccv3.Warnings, result3 error) { +func (fake *FakeCloudControllerClient) GetSpacesReturns(result1 []resources.Space, result2 ccv3.Warnings, result3 error) { fake.getSpacesMutex.Lock() defer fake.getSpacesMutex.Unlock() fake.GetSpacesStub = nil fake.getSpacesReturns = struct { - result1 []ccv3.Space + result1 []resources.Space result2 ccv3.Warnings result3 error }{result1, result2, result3} } -func (fake *FakeCloudControllerClient) GetSpacesReturnsOnCall(i int, result1 []ccv3.Space, result2 ccv3.Warnings, result3 error) { +func (fake *FakeCloudControllerClient) GetSpacesReturnsOnCall(i int, result1 []resources.Space, result2 ccv3.Warnings, result3 error) { fake.getSpacesMutex.Lock() defer fake.getSpacesMutex.Unlock() fake.GetSpacesStub = nil if fake.getSpacesReturnsOnCall == nil { fake.getSpacesReturnsOnCall = make(map[int]struct { - result1 []ccv3.Space + result1 []resources.Space result2 ccv3.Warnings result3 error }) } fake.getSpacesReturnsOnCall[i] = struct { - result1 []ccv3.Space + result1 []resources.Space result2 ccv3.Warnings result3 error }{result1, result2, result3} } -func (fake *FakeCloudControllerClient) GetStacks(arg1 ...ccv3.Query) ([]ccv3.Stack, ccv3.Warnings, error) { +func (fake *FakeCloudControllerClient) GetStacks(arg1 ...ccv3.Query) ([]resources.Stack, ccv3.Warnings, error) { fake.getStacksMutex.Lock() ret, specificReturn := fake.getStacksReturnsOnCall[len(fake.getStacksArgsForCall)] fake.getStacksArgsForCall = append(fake.getStacksArgsForCall, struct { @@ -3993,7 +3994,7 @@ func (fake *FakeCloudControllerClient) GetStacksCallCount() int { return len(fake.getStacksArgsForCall) } -func (fake *FakeCloudControllerClient) GetStacksCalls(stub func(...ccv3.Query) ([]ccv3.Stack, ccv3.Warnings, error)) { +func (fake *FakeCloudControllerClient) GetStacksCalls(stub func(...ccv3.Query) ([]resources.Stack, ccv3.Warnings, error)) { fake.getStacksMutex.Lock() defer fake.getStacksMutex.Unlock() fake.GetStacksStub = stub @@ -4006,30 +4007,30 @@ func (fake *FakeCloudControllerClient) GetStacksArgsForCall(i int) []ccv3.Query return argsForCall.arg1 } -func (fake *FakeCloudControllerClient) GetStacksReturns(result1 []ccv3.Stack, result2 ccv3.Warnings, result3 error) { +func (fake *FakeCloudControllerClient) GetStacksReturns(result1 []resources.Stack, result2 ccv3.Warnings, result3 error) { fake.getStacksMutex.Lock() defer fake.getStacksMutex.Unlock() fake.GetStacksStub = nil fake.getStacksReturns = struct { - result1 []ccv3.Stack + result1 []resources.Stack result2 ccv3.Warnings result3 error }{result1, result2, result3} } -func (fake *FakeCloudControllerClient) GetStacksReturnsOnCall(i int, result1 []ccv3.Stack, result2 ccv3.Warnings, result3 error) { +func (fake *FakeCloudControllerClient) GetStacksReturnsOnCall(i int, result1 []resources.Stack, result2 ccv3.Warnings, result3 error) { fake.getStacksMutex.Lock() defer fake.getStacksMutex.Unlock() fake.GetStacksStub = nil if fake.getStacksReturnsOnCall == nil { fake.getStacksReturnsOnCall = make(map[int]struct { - result1 []ccv3.Stack + result1 []resources.Stack result2 ccv3.Warnings result3 error }) } fake.getStacksReturnsOnCall[i] = struct { - result1 []ccv3.Stack + result1 []resources.Stack result2 ccv3.Warnings result3 error }{result1, result2, result3} @@ -4169,7 +4170,7 @@ func (fake *FakeCloudControllerClient) ResourceMatchReturnsOnCall(i int, result1 }{result1, result2, result3} } -func (fake *FakeCloudControllerClient) SetApplicationDroplet(arg1 string, arg2 string) (ccv3.Relationship, ccv3.Warnings, error) { +func (fake *FakeCloudControllerClient) SetApplicationDroplet(arg1 string, arg2 string) (resources.Relationship, ccv3.Warnings, error) { fake.setApplicationDropletMutex.Lock() ret, specificReturn := fake.setApplicationDropletReturnsOnCall[len(fake.setApplicationDropletArgsForCall)] fake.setApplicationDropletArgsForCall = append(fake.setApplicationDropletArgsForCall, struct { @@ -4194,7 +4195,7 @@ func (fake *FakeCloudControllerClient) SetApplicationDropletCallCount() int { return len(fake.setApplicationDropletArgsForCall) } -func (fake *FakeCloudControllerClient) SetApplicationDropletCalls(stub func(string, string) (ccv3.Relationship, ccv3.Warnings, error)) { +func (fake *FakeCloudControllerClient) SetApplicationDropletCalls(stub func(string, string) (resources.Relationship, ccv3.Warnings, error)) { fake.setApplicationDropletMutex.Lock() defer fake.setApplicationDropletMutex.Unlock() fake.SetApplicationDropletStub = stub @@ -4207,30 +4208,30 @@ func (fake *FakeCloudControllerClient) SetApplicationDropletArgsForCall(i int) ( return argsForCall.arg1, argsForCall.arg2 } -func (fake *FakeCloudControllerClient) SetApplicationDropletReturns(result1 ccv3.Relationship, result2 ccv3.Warnings, result3 error) { +func (fake *FakeCloudControllerClient) SetApplicationDropletReturns(result1 resources.Relationship, result2 ccv3.Warnings, result3 error) { fake.setApplicationDropletMutex.Lock() defer fake.setApplicationDropletMutex.Unlock() fake.SetApplicationDropletStub = nil fake.setApplicationDropletReturns = struct { - result1 ccv3.Relationship + result1 resources.Relationship result2 ccv3.Warnings result3 error }{result1, result2, result3} } -func (fake *FakeCloudControllerClient) SetApplicationDropletReturnsOnCall(i int, result1 ccv3.Relationship, result2 ccv3.Warnings, result3 error) { +func (fake *FakeCloudControllerClient) SetApplicationDropletReturnsOnCall(i int, result1 resources.Relationship, result2 ccv3.Warnings, result3 error) { fake.setApplicationDropletMutex.Lock() defer fake.setApplicationDropletMutex.Unlock() fake.SetApplicationDropletStub = nil if fake.setApplicationDropletReturnsOnCall == nil { fake.setApplicationDropletReturnsOnCall = make(map[int]struct { - result1 ccv3.Relationship + result1 resources.Relationship result2 ccv3.Warnings result3 error }) } fake.setApplicationDropletReturnsOnCall[i] = struct { - result1 ccv3.Relationship + result1 resources.Relationship result2 ccv3.Warnings result3 error }{result1, result2, result3} @@ -4300,7 +4301,7 @@ func (fake *FakeCloudControllerClient) SharePrivateDomainToOrgsReturnsOnCall(i i }{result1, result2} } -func (fake *FakeCloudControllerClient) ShareServiceInstanceToSpaces(arg1 string, arg2 []string) (ccv3.RelationshipList, ccv3.Warnings, error) { +func (fake *FakeCloudControllerClient) ShareServiceInstanceToSpaces(arg1 string, arg2 []string) (resources.RelationshipList, ccv3.Warnings, error) { var arg2Copy []string if arg2 != nil { arg2Copy = make([]string, len(arg2)) @@ -4330,7 +4331,7 @@ func (fake *FakeCloudControllerClient) ShareServiceInstanceToSpacesCallCount() i return len(fake.shareServiceInstanceToSpacesArgsForCall) } -func (fake *FakeCloudControllerClient) ShareServiceInstanceToSpacesCalls(stub func(string, []string) (ccv3.RelationshipList, ccv3.Warnings, error)) { +func (fake *FakeCloudControllerClient) ShareServiceInstanceToSpacesCalls(stub func(string, []string) (resources.RelationshipList, ccv3.Warnings, error)) { fake.shareServiceInstanceToSpacesMutex.Lock() defer fake.shareServiceInstanceToSpacesMutex.Unlock() fake.ShareServiceInstanceToSpacesStub = stub @@ -4343,30 +4344,30 @@ func (fake *FakeCloudControllerClient) ShareServiceInstanceToSpacesArgsForCall(i return argsForCall.arg1, argsForCall.arg2 } -func (fake *FakeCloudControllerClient) ShareServiceInstanceToSpacesReturns(result1 ccv3.RelationshipList, result2 ccv3.Warnings, result3 error) { +func (fake *FakeCloudControllerClient) ShareServiceInstanceToSpacesReturns(result1 resources.RelationshipList, result2 ccv3.Warnings, result3 error) { fake.shareServiceInstanceToSpacesMutex.Lock() defer fake.shareServiceInstanceToSpacesMutex.Unlock() fake.ShareServiceInstanceToSpacesStub = nil fake.shareServiceInstanceToSpacesReturns = struct { - result1 ccv3.RelationshipList + result1 resources.RelationshipList result2 ccv3.Warnings result3 error }{result1, result2, result3} } -func (fake *FakeCloudControllerClient) ShareServiceInstanceToSpacesReturnsOnCall(i int, result1 ccv3.RelationshipList, result2 ccv3.Warnings, result3 error) { +func (fake *FakeCloudControllerClient) ShareServiceInstanceToSpacesReturnsOnCall(i int, result1 resources.RelationshipList, result2 ccv3.Warnings, result3 error) { fake.shareServiceInstanceToSpacesMutex.Lock() defer fake.shareServiceInstanceToSpacesMutex.Unlock() fake.ShareServiceInstanceToSpacesStub = nil if fake.shareServiceInstanceToSpacesReturnsOnCall == nil { fake.shareServiceInstanceToSpacesReturnsOnCall = make(map[int]struct { - result1 ccv3.RelationshipList + result1 resources.RelationshipList result2 ccv3.Warnings result3 error }) } fake.shareServiceInstanceToSpacesReturnsOnCall[i] = struct { - result1 ccv3.RelationshipList + result1 resources.RelationshipList result2 ccv3.Warnings result3 error }{result1, result2, result3} @@ -4436,11 +4437,11 @@ func (fake *FakeCloudControllerClient) UnsharePrivateDomainFromOrgReturnsOnCall( }{result1, result2} } -func (fake *FakeCloudControllerClient) UpdateApplication(arg1 ccv3.Application) (ccv3.Application, ccv3.Warnings, error) { +func (fake *FakeCloudControllerClient) UpdateApplication(arg1 resources.Application) (resources.Application, ccv3.Warnings, error) { fake.updateApplicationMutex.Lock() ret, specificReturn := fake.updateApplicationReturnsOnCall[len(fake.updateApplicationArgsForCall)] fake.updateApplicationArgsForCall = append(fake.updateApplicationArgsForCall, struct { - arg1 ccv3.Application + arg1 resources.Application }{arg1}) fake.recordInvocation("UpdateApplication", []interface{}{arg1}) fake.updateApplicationMutex.Unlock() @@ -4460,43 +4461,43 @@ func (fake *FakeCloudControllerClient) UpdateApplicationCallCount() int { return len(fake.updateApplicationArgsForCall) } -func (fake *FakeCloudControllerClient) UpdateApplicationCalls(stub func(ccv3.Application) (ccv3.Application, ccv3.Warnings, error)) { +func (fake *FakeCloudControllerClient) UpdateApplicationCalls(stub func(resources.Application) (resources.Application, ccv3.Warnings, error)) { fake.updateApplicationMutex.Lock() defer fake.updateApplicationMutex.Unlock() fake.UpdateApplicationStub = stub } -func (fake *FakeCloudControllerClient) UpdateApplicationArgsForCall(i int) ccv3.Application { +func (fake *FakeCloudControllerClient) UpdateApplicationArgsForCall(i int) resources.Application { fake.updateApplicationMutex.RLock() defer fake.updateApplicationMutex.RUnlock() argsForCall := fake.updateApplicationArgsForCall[i] return argsForCall.arg1 } -func (fake *FakeCloudControllerClient) UpdateApplicationReturns(result1 ccv3.Application, result2 ccv3.Warnings, result3 error) { +func (fake *FakeCloudControllerClient) UpdateApplicationReturns(result1 resources.Application, result2 ccv3.Warnings, result3 error) { fake.updateApplicationMutex.Lock() defer fake.updateApplicationMutex.Unlock() fake.UpdateApplicationStub = nil fake.updateApplicationReturns = struct { - result1 ccv3.Application + result1 resources.Application result2 ccv3.Warnings result3 error }{result1, result2, result3} } -func (fake *FakeCloudControllerClient) UpdateApplicationReturnsOnCall(i int, result1 ccv3.Application, result2 ccv3.Warnings, result3 error) { +func (fake *FakeCloudControllerClient) UpdateApplicationReturnsOnCall(i int, result1 resources.Application, result2 ccv3.Warnings, result3 error) { fake.updateApplicationMutex.Lock() defer fake.updateApplicationMutex.Unlock() fake.UpdateApplicationStub = nil if fake.updateApplicationReturnsOnCall == nil { fake.updateApplicationReturnsOnCall = make(map[int]struct { - result1 ccv3.Application + result1 resources.Application result2 ccv3.Warnings result3 error }) } fake.updateApplicationReturnsOnCall[i] = struct { - result1 ccv3.Application + result1 resources.Application result2 ccv3.Warnings result3 error }{result1, result2, result3} @@ -4574,12 +4575,12 @@ func (fake *FakeCloudControllerClient) UpdateApplicationApplyManifestReturnsOnCa }{result1, result2, result3} } -func (fake *FakeCloudControllerClient) UpdateApplicationEnvironmentVariables(arg1 string, arg2 ccv3.EnvironmentVariables) (ccv3.EnvironmentVariables, ccv3.Warnings, error) { +func (fake *FakeCloudControllerClient) UpdateApplicationEnvironmentVariables(arg1 string, arg2 resources.EnvironmentVariables) (resources.EnvironmentVariables, ccv3.Warnings, error) { fake.updateApplicationEnvironmentVariablesMutex.Lock() ret, specificReturn := fake.updateApplicationEnvironmentVariablesReturnsOnCall[len(fake.updateApplicationEnvironmentVariablesArgsForCall)] fake.updateApplicationEnvironmentVariablesArgsForCall = append(fake.updateApplicationEnvironmentVariablesArgsForCall, struct { arg1 string - arg2 ccv3.EnvironmentVariables + arg2 resources.EnvironmentVariables }{arg1, arg2}) fake.recordInvocation("UpdateApplicationEnvironmentVariables", []interface{}{arg1, arg2}) fake.updateApplicationEnvironmentVariablesMutex.Unlock() @@ -4599,49 +4600,49 @@ func (fake *FakeCloudControllerClient) UpdateApplicationEnvironmentVariablesCall return len(fake.updateApplicationEnvironmentVariablesArgsForCall) } -func (fake *FakeCloudControllerClient) UpdateApplicationEnvironmentVariablesCalls(stub func(string, ccv3.EnvironmentVariables) (ccv3.EnvironmentVariables, ccv3.Warnings, error)) { +func (fake *FakeCloudControllerClient) UpdateApplicationEnvironmentVariablesCalls(stub func(string, resources.EnvironmentVariables) (resources.EnvironmentVariables, ccv3.Warnings, error)) { fake.updateApplicationEnvironmentVariablesMutex.Lock() defer fake.updateApplicationEnvironmentVariablesMutex.Unlock() fake.UpdateApplicationEnvironmentVariablesStub = stub } -func (fake *FakeCloudControllerClient) UpdateApplicationEnvironmentVariablesArgsForCall(i int) (string, ccv3.EnvironmentVariables) { +func (fake *FakeCloudControllerClient) UpdateApplicationEnvironmentVariablesArgsForCall(i int) (string, resources.EnvironmentVariables) { fake.updateApplicationEnvironmentVariablesMutex.RLock() defer fake.updateApplicationEnvironmentVariablesMutex.RUnlock() argsForCall := fake.updateApplicationEnvironmentVariablesArgsForCall[i] return argsForCall.arg1, argsForCall.arg2 } -func (fake *FakeCloudControllerClient) UpdateApplicationEnvironmentVariablesReturns(result1 ccv3.EnvironmentVariables, result2 ccv3.Warnings, result3 error) { +func (fake *FakeCloudControllerClient) UpdateApplicationEnvironmentVariablesReturns(result1 resources.EnvironmentVariables, result2 ccv3.Warnings, result3 error) { fake.updateApplicationEnvironmentVariablesMutex.Lock() defer fake.updateApplicationEnvironmentVariablesMutex.Unlock() fake.UpdateApplicationEnvironmentVariablesStub = nil fake.updateApplicationEnvironmentVariablesReturns = struct { - result1 ccv3.EnvironmentVariables + result1 resources.EnvironmentVariables result2 ccv3.Warnings result3 error }{result1, result2, result3} } -func (fake *FakeCloudControllerClient) UpdateApplicationEnvironmentVariablesReturnsOnCall(i int, result1 ccv3.EnvironmentVariables, result2 ccv3.Warnings, result3 error) { +func (fake *FakeCloudControllerClient) UpdateApplicationEnvironmentVariablesReturnsOnCall(i int, result1 resources.EnvironmentVariables, result2 ccv3.Warnings, result3 error) { fake.updateApplicationEnvironmentVariablesMutex.Lock() defer fake.updateApplicationEnvironmentVariablesMutex.Unlock() fake.UpdateApplicationEnvironmentVariablesStub = nil if fake.updateApplicationEnvironmentVariablesReturnsOnCall == nil { fake.updateApplicationEnvironmentVariablesReturnsOnCall = make(map[int]struct { - result1 ccv3.EnvironmentVariables + result1 resources.EnvironmentVariables result2 ccv3.Warnings result3 error }) } fake.updateApplicationEnvironmentVariablesReturnsOnCall[i] = struct { - result1 ccv3.EnvironmentVariables + result1 resources.EnvironmentVariables result2 ccv3.Warnings result3 error }{result1, result2, result3} } -func (fake *FakeCloudControllerClient) UpdateApplicationRestart(arg1 string) (ccv3.Application, ccv3.Warnings, error) { +func (fake *FakeCloudControllerClient) UpdateApplicationRestart(arg1 string) (resources.Application, ccv3.Warnings, error) { fake.updateApplicationRestartMutex.Lock() ret, specificReturn := fake.updateApplicationRestartReturnsOnCall[len(fake.updateApplicationRestartArgsForCall)] fake.updateApplicationRestartArgsForCall = append(fake.updateApplicationRestartArgsForCall, struct { @@ -4665,7 +4666,7 @@ func (fake *FakeCloudControllerClient) UpdateApplicationRestartCallCount() int { return len(fake.updateApplicationRestartArgsForCall) } -func (fake *FakeCloudControllerClient) UpdateApplicationRestartCalls(stub func(string) (ccv3.Application, ccv3.Warnings, error)) { +func (fake *FakeCloudControllerClient) UpdateApplicationRestartCalls(stub func(string) (resources.Application, ccv3.Warnings, error)) { fake.updateApplicationRestartMutex.Lock() defer fake.updateApplicationRestartMutex.Unlock() fake.UpdateApplicationRestartStub = stub @@ -4678,36 +4679,36 @@ func (fake *FakeCloudControllerClient) UpdateApplicationRestartArgsForCall(i int return argsForCall.arg1 } -func (fake *FakeCloudControllerClient) UpdateApplicationRestartReturns(result1 ccv3.Application, result2 ccv3.Warnings, result3 error) { +func (fake *FakeCloudControllerClient) UpdateApplicationRestartReturns(result1 resources.Application, result2 ccv3.Warnings, result3 error) { fake.updateApplicationRestartMutex.Lock() defer fake.updateApplicationRestartMutex.Unlock() fake.UpdateApplicationRestartStub = nil fake.updateApplicationRestartReturns = struct { - result1 ccv3.Application + result1 resources.Application result2 ccv3.Warnings result3 error }{result1, result2, result3} } -func (fake *FakeCloudControllerClient) UpdateApplicationRestartReturnsOnCall(i int, result1 ccv3.Application, result2 ccv3.Warnings, result3 error) { +func (fake *FakeCloudControllerClient) UpdateApplicationRestartReturnsOnCall(i int, result1 resources.Application, result2 ccv3.Warnings, result3 error) { fake.updateApplicationRestartMutex.Lock() defer fake.updateApplicationRestartMutex.Unlock() fake.UpdateApplicationRestartStub = nil if fake.updateApplicationRestartReturnsOnCall == nil { fake.updateApplicationRestartReturnsOnCall = make(map[int]struct { - result1 ccv3.Application + result1 resources.Application result2 ccv3.Warnings result3 error }) } fake.updateApplicationRestartReturnsOnCall[i] = struct { - result1 ccv3.Application + result1 resources.Application result2 ccv3.Warnings result3 error }{result1, result2, result3} } -func (fake *FakeCloudControllerClient) UpdateApplicationStart(arg1 string) (ccv3.Application, ccv3.Warnings, error) { +func (fake *FakeCloudControllerClient) UpdateApplicationStart(arg1 string) (resources.Application, ccv3.Warnings, error) { fake.updateApplicationStartMutex.Lock() ret, specificReturn := fake.updateApplicationStartReturnsOnCall[len(fake.updateApplicationStartArgsForCall)] fake.updateApplicationStartArgsForCall = append(fake.updateApplicationStartArgsForCall, struct { @@ -4731,7 +4732,7 @@ func (fake *FakeCloudControllerClient) UpdateApplicationStartCallCount() int { return len(fake.updateApplicationStartArgsForCall) } -func (fake *FakeCloudControllerClient) UpdateApplicationStartCalls(stub func(string) (ccv3.Application, ccv3.Warnings, error)) { +func (fake *FakeCloudControllerClient) UpdateApplicationStartCalls(stub func(string) (resources.Application, ccv3.Warnings, error)) { fake.updateApplicationStartMutex.Lock() defer fake.updateApplicationStartMutex.Unlock() fake.UpdateApplicationStartStub = stub @@ -4744,36 +4745,36 @@ func (fake *FakeCloudControllerClient) UpdateApplicationStartArgsForCall(i int) return argsForCall.arg1 } -func (fake *FakeCloudControllerClient) UpdateApplicationStartReturns(result1 ccv3.Application, result2 ccv3.Warnings, result3 error) { +func (fake *FakeCloudControllerClient) UpdateApplicationStartReturns(result1 resources.Application, result2 ccv3.Warnings, result3 error) { fake.updateApplicationStartMutex.Lock() defer fake.updateApplicationStartMutex.Unlock() fake.UpdateApplicationStartStub = nil fake.updateApplicationStartReturns = struct { - result1 ccv3.Application + result1 resources.Application result2 ccv3.Warnings result3 error }{result1, result2, result3} } -func (fake *FakeCloudControllerClient) UpdateApplicationStartReturnsOnCall(i int, result1 ccv3.Application, result2 ccv3.Warnings, result3 error) { +func (fake *FakeCloudControllerClient) UpdateApplicationStartReturnsOnCall(i int, result1 resources.Application, result2 ccv3.Warnings, result3 error) { fake.updateApplicationStartMutex.Lock() defer fake.updateApplicationStartMutex.Unlock() fake.UpdateApplicationStartStub = nil if fake.updateApplicationStartReturnsOnCall == nil { fake.updateApplicationStartReturnsOnCall = make(map[int]struct { - result1 ccv3.Application + result1 resources.Application result2 ccv3.Warnings result3 error }) } fake.updateApplicationStartReturnsOnCall[i] = struct { - result1 ccv3.Application + result1 resources.Application result2 ccv3.Warnings result3 error }{result1, result2, result3} } -func (fake *FakeCloudControllerClient) UpdateApplicationStop(arg1 string) (ccv3.Application, ccv3.Warnings, error) { +func (fake *FakeCloudControllerClient) UpdateApplicationStop(arg1 string) (resources.Application, ccv3.Warnings, error) { fake.updateApplicationStopMutex.Lock() ret, specificReturn := fake.updateApplicationStopReturnsOnCall[len(fake.updateApplicationStopArgsForCall)] fake.updateApplicationStopArgsForCall = append(fake.updateApplicationStopArgsForCall, struct { @@ -4797,7 +4798,7 @@ func (fake *FakeCloudControllerClient) UpdateApplicationStopCallCount() int { return len(fake.updateApplicationStopArgsForCall) } -func (fake *FakeCloudControllerClient) UpdateApplicationStopCalls(stub func(string) (ccv3.Application, ccv3.Warnings, error)) { +func (fake *FakeCloudControllerClient) UpdateApplicationStopCalls(stub func(string) (resources.Application, ccv3.Warnings, error)) { fake.updateApplicationStopMutex.Lock() defer fake.updateApplicationStopMutex.Unlock() fake.UpdateApplicationStopStub = stub @@ -4810,40 +4811,40 @@ func (fake *FakeCloudControllerClient) UpdateApplicationStopArgsForCall(i int) s return argsForCall.arg1 } -func (fake *FakeCloudControllerClient) UpdateApplicationStopReturns(result1 ccv3.Application, result2 ccv3.Warnings, result3 error) { +func (fake *FakeCloudControllerClient) UpdateApplicationStopReturns(result1 resources.Application, result2 ccv3.Warnings, result3 error) { fake.updateApplicationStopMutex.Lock() defer fake.updateApplicationStopMutex.Unlock() fake.UpdateApplicationStopStub = nil fake.updateApplicationStopReturns = struct { - result1 ccv3.Application + result1 resources.Application result2 ccv3.Warnings result3 error }{result1, result2, result3} } -func (fake *FakeCloudControllerClient) UpdateApplicationStopReturnsOnCall(i int, result1 ccv3.Application, result2 ccv3.Warnings, result3 error) { +func (fake *FakeCloudControllerClient) UpdateApplicationStopReturnsOnCall(i int, result1 resources.Application, result2 ccv3.Warnings, result3 error) { fake.updateApplicationStopMutex.Lock() defer fake.updateApplicationStopMutex.Unlock() fake.UpdateApplicationStopStub = nil if fake.updateApplicationStopReturnsOnCall == nil { fake.updateApplicationStopReturnsOnCall = make(map[int]struct { - result1 ccv3.Application + result1 resources.Application result2 ccv3.Warnings result3 error }) } fake.updateApplicationStopReturnsOnCall[i] = struct { - result1 ccv3.Application + result1 resources.Application result2 ccv3.Warnings result3 error }{result1, result2, result3} } -func (fake *FakeCloudControllerClient) UpdateBuildpack(arg1 ccv3.Buildpack) (ccv3.Buildpack, ccv3.Warnings, error) { +func (fake *FakeCloudControllerClient) UpdateBuildpack(arg1 resources.Buildpack) (resources.Buildpack, ccv3.Warnings, error) { fake.updateBuildpackMutex.Lock() ret, specificReturn := fake.updateBuildpackReturnsOnCall[len(fake.updateBuildpackArgsForCall)] fake.updateBuildpackArgsForCall = append(fake.updateBuildpackArgsForCall, struct { - arg1 ccv3.Buildpack + arg1 resources.Buildpack }{arg1}) fake.recordInvocation("UpdateBuildpack", []interface{}{arg1}) fake.updateBuildpackMutex.Unlock() @@ -4863,53 +4864,53 @@ func (fake *FakeCloudControllerClient) UpdateBuildpackCallCount() int { return len(fake.updateBuildpackArgsForCall) } -func (fake *FakeCloudControllerClient) UpdateBuildpackCalls(stub func(ccv3.Buildpack) (ccv3.Buildpack, ccv3.Warnings, error)) { +func (fake *FakeCloudControllerClient) UpdateBuildpackCalls(stub func(resources.Buildpack) (resources.Buildpack, ccv3.Warnings, error)) { fake.updateBuildpackMutex.Lock() defer fake.updateBuildpackMutex.Unlock() fake.UpdateBuildpackStub = stub } -func (fake *FakeCloudControllerClient) UpdateBuildpackArgsForCall(i int) ccv3.Buildpack { +func (fake *FakeCloudControllerClient) UpdateBuildpackArgsForCall(i int) resources.Buildpack { fake.updateBuildpackMutex.RLock() defer fake.updateBuildpackMutex.RUnlock() argsForCall := fake.updateBuildpackArgsForCall[i] return argsForCall.arg1 } -func (fake *FakeCloudControllerClient) UpdateBuildpackReturns(result1 ccv3.Buildpack, result2 ccv3.Warnings, result3 error) { +func (fake *FakeCloudControllerClient) UpdateBuildpackReturns(result1 resources.Buildpack, result2 ccv3.Warnings, result3 error) { fake.updateBuildpackMutex.Lock() defer fake.updateBuildpackMutex.Unlock() fake.UpdateBuildpackStub = nil fake.updateBuildpackReturns = struct { - result1 ccv3.Buildpack + result1 resources.Buildpack result2 ccv3.Warnings result3 error }{result1, result2, result3} } -func (fake *FakeCloudControllerClient) UpdateBuildpackReturnsOnCall(i int, result1 ccv3.Buildpack, result2 ccv3.Warnings, result3 error) { +func (fake *FakeCloudControllerClient) UpdateBuildpackReturnsOnCall(i int, result1 resources.Buildpack, result2 ccv3.Warnings, result3 error) { fake.updateBuildpackMutex.Lock() defer fake.updateBuildpackMutex.Unlock() fake.UpdateBuildpackStub = nil if fake.updateBuildpackReturnsOnCall == nil { fake.updateBuildpackReturnsOnCall = make(map[int]struct { - result1 ccv3.Buildpack + result1 resources.Buildpack result2 ccv3.Warnings result3 error }) } fake.updateBuildpackReturnsOnCall[i] = struct { - result1 ccv3.Buildpack + result1 resources.Buildpack result2 ccv3.Warnings result3 error }{result1, result2, result3} } -func (fake *FakeCloudControllerClient) UpdateFeatureFlag(arg1 ccv3.FeatureFlag) (ccv3.FeatureFlag, ccv3.Warnings, error) { +func (fake *FakeCloudControllerClient) UpdateFeatureFlag(arg1 resources.FeatureFlag) (resources.FeatureFlag, ccv3.Warnings, error) { fake.updateFeatureFlagMutex.Lock() ret, specificReturn := fake.updateFeatureFlagReturnsOnCall[len(fake.updateFeatureFlagArgsForCall)] fake.updateFeatureFlagArgsForCall = append(fake.updateFeatureFlagArgsForCall, struct { - arg1 ccv3.FeatureFlag + arg1 resources.FeatureFlag }{arg1}) fake.recordInvocation("UpdateFeatureFlag", []interface{}{arg1}) fake.updateFeatureFlagMutex.Unlock() @@ -4929,53 +4930,53 @@ func (fake *FakeCloudControllerClient) UpdateFeatureFlagCallCount() int { return len(fake.updateFeatureFlagArgsForCall) } -func (fake *FakeCloudControllerClient) UpdateFeatureFlagCalls(stub func(ccv3.FeatureFlag) (ccv3.FeatureFlag, ccv3.Warnings, error)) { +func (fake *FakeCloudControllerClient) UpdateFeatureFlagCalls(stub func(resources.FeatureFlag) (resources.FeatureFlag, ccv3.Warnings, error)) { fake.updateFeatureFlagMutex.Lock() defer fake.updateFeatureFlagMutex.Unlock() fake.UpdateFeatureFlagStub = stub } -func (fake *FakeCloudControllerClient) UpdateFeatureFlagArgsForCall(i int) ccv3.FeatureFlag { +func (fake *FakeCloudControllerClient) UpdateFeatureFlagArgsForCall(i int) resources.FeatureFlag { fake.updateFeatureFlagMutex.RLock() defer fake.updateFeatureFlagMutex.RUnlock() argsForCall := fake.updateFeatureFlagArgsForCall[i] return argsForCall.arg1 } -func (fake *FakeCloudControllerClient) UpdateFeatureFlagReturns(result1 ccv3.FeatureFlag, result2 ccv3.Warnings, result3 error) { +func (fake *FakeCloudControllerClient) UpdateFeatureFlagReturns(result1 resources.FeatureFlag, result2 ccv3.Warnings, result3 error) { fake.updateFeatureFlagMutex.Lock() defer fake.updateFeatureFlagMutex.Unlock() fake.UpdateFeatureFlagStub = nil fake.updateFeatureFlagReturns = struct { - result1 ccv3.FeatureFlag + result1 resources.FeatureFlag result2 ccv3.Warnings result3 error }{result1, result2, result3} } -func (fake *FakeCloudControllerClient) UpdateFeatureFlagReturnsOnCall(i int, result1 ccv3.FeatureFlag, result2 ccv3.Warnings, result3 error) { +func (fake *FakeCloudControllerClient) UpdateFeatureFlagReturnsOnCall(i int, result1 resources.FeatureFlag, result2 ccv3.Warnings, result3 error) { fake.updateFeatureFlagMutex.Lock() defer fake.updateFeatureFlagMutex.Unlock() fake.UpdateFeatureFlagStub = nil if fake.updateFeatureFlagReturnsOnCall == nil { fake.updateFeatureFlagReturnsOnCall = make(map[int]struct { - result1 ccv3.FeatureFlag + result1 resources.FeatureFlag result2 ccv3.Warnings result3 error }) } fake.updateFeatureFlagReturnsOnCall[i] = struct { - result1 ccv3.FeatureFlag + result1 resources.FeatureFlag result2 ccv3.Warnings result3 error }{result1, result2, result3} } -func (fake *FakeCloudControllerClient) UpdateOrganization(arg1 ccv3.Organization) (ccv3.Organization, ccv3.Warnings, error) { +func (fake *FakeCloudControllerClient) UpdateOrganization(arg1 resources.Organization) (resources.Organization, ccv3.Warnings, error) { fake.updateOrganizationMutex.Lock() ret, specificReturn := fake.updateOrganizationReturnsOnCall[len(fake.updateOrganizationArgsForCall)] fake.updateOrganizationArgsForCall = append(fake.updateOrganizationArgsForCall, struct { - arg1 ccv3.Organization + arg1 resources.Organization }{arg1}) fake.recordInvocation("UpdateOrganization", []interface{}{arg1}) fake.updateOrganizationMutex.Unlock() @@ -4995,49 +4996,49 @@ func (fake *FakeCloudControllerClient) UpdateOrganizationCallCount() int { return len(fake.updateOrganizationArgsForCall) } -func (fake *FakeCloudControllerClient) UpdateOrganizationCalls(stub func(ccv3.Organization) (ccv3.Organization, ccv3.Warnings, error)) { +func (fake *FakeCloudControllerClient) UpdateOrganizationCalls(stub func(resources.Organization) (resources.Organization, ccv3.Warnings, error)) { fake.updateOrganizationMutex.Lock() defer fake.updateOrganizationMutex.Unlock() fake.UpdateOrganizationStub = stub } -func (fake *FakeCloudControllerClient) UpdateOrganizationArgsForCall(i int) ccv3.Organization { +func (fake *FakeCloudControllerClient) UpdateOrganizationArgsForCall(i int) resources.Organization { fake.updateOrganizationMutex.RLock() defer fake.updateOrganizationMutex.RUnlock() argsForCall := fake.updateOrganizationArgsForCall[i] return argsForCall.arg1 } -func (fake *FakeCloudControllerClient) UpdateOrganizationReturns(result1 ccv3.Organization, result2 ccv3.Warnings, result3 error) { +func (fake *FakeCloudControllerClient) UpdateOrganizationReturns(result1 resources.Organization, result2 ccv3.Warnings, result3 error) { fake.updateOrganizationMutex.Lock() defer fake.updateOrganizationMutex.Unlock() fake.UpdateOrganizationStub = nil fake.updateOrganizationReturns = struct { - result1 ccv3.Organization + result1 resources.Organization result2 ccv3.Warnings result3 error }{result1, result2, result3} } -func (fake *FakeCloudControllerClient) UpdateOrganizationReturnsOnCall(i int, result1 ccv3.Organization, result2 ccv3.Warnings, result3 error) { +func (fake *FakeCloudControllerClient) UpdateOrganizationReturnsOnCall(i int, result1 resources.Organization, result2 ccv3.Warnings, result3 error) { fake.updateOrganizationMutex.Lock() defer fake.updateOrganizationMutex.Unlock() fake.UpdateOrganizationStub = nil if fake.updateOrganizationReturnsOnCall == nil { fake.updateOrganizationReturnsOnCall = make(map[int]struct { - result1 ccv3.Organization + result1 resources.Organization result2 ccv3.Warnings result3 error }) } fake.updateOrganizationReturnsOnCall[i] = struct { - result1 ccv3.Organization + result1 resources.Organization result2 ccv3.Warnings result3 error }{result1, result2, result3} } -func (fake *FakeCloudControllerClient) UpdateOrganizationDefaultIsolationSegmentRelationship(arg1 string, arg2 string) (ccv3.Relationship, ccv3.Warnings, error) { +func (fake *FakeCloudControllerClient) UpdateOrganizationDefaultIsolationSegmentRelationship(arg1 string, arg2 string) (resources.Relationship, ccv3.Warnings, error) { fake.updateOrganizationDefaultIsolationSegmentRelationshipMutex.Lock() ret, specificReturn := fake.updateOrganizationDefaultIsolationSegmentRelationshipReturnsOnCall[len(fake.updateOrganizationDefaultIsolationSegmentRelationshipArgsForCall)] fake.updateOrganizationDefaultIsolationSegmentRelationshipArgsForCall = append(fake.updateOrganizationDefaultIsolationSegmentRelationshipArgsForCall, struct { @@ -5062,7 +5063,7 @@ func (fake *FakeCloudControllerClient) UpdateOrganizationDefaultIsolationSegment return len(fake.updateOrganizationDefaultIsolationSegmentRelationshipArgsForCall) } -func (fake *FakeCloudControllerClient) UpdateOrganizationDefaultIsolationSegmentRelationshipCalls(stub func(string, string) (ccv3.Relationship, ccv3.Warnings, error)) { +func (fake *FakeCloudControllerClient) UpdateOrganizationDefaultIsolationSegmentRelationshipCalls(stub func(string, string) (resources.Relationship, ccv3.Warnings, error)) { fake.updateOrganizationDefaultIsolationSegmentRelationshipMutex.Lock() defer fake.updateOrganizationDefaultIsolationSegmentRelationshipMutex.Unlock() fake.UpdateOrganizationDefaultIsolationSegmentRelationshipStub = stub @@ -5075,40 +5076,40 @@ func (fake *FakeCloudControllerClient) UpdateOrganizationDefaultIsolationSegment return argsForCall.arg1, argsForCall.arg2 } -func (fake *FakeCloudControllerClient) UpdateOrganizationDefaultIsolationSegmentRelationshipReturns(result1 ccv3.Relationship, result2 ccv3.Warnings, result3 error) { +func (fake *FakeCloudControllerClient) UpdateOrganizationDefaultIsolationSegmentRelationshipReturns(result1 resources.Relationship, result2 ccv3.Warnings, result3 error) { fake.updateOrganizationDefaultIsolationSegmentRelationshipMutex.Lock() defer fake.updateOrganizationDefaultIsolationSegmentRelationshipMutex.Unlock() fake.UpdateOrganizationDefaultIsolationSegmentRelationshipStub = nil fake.updateOrganizationDefaultIsolationSegmentRelationshipReturns = struct { - result1 ccv3.Relationship + result1 resources.Relationship result2 ccv3.Warnings result3 error }{result1, result2, result3} } -func (fake *FakeCloudControllerClient) UpdateOrganizationDefaultIsolationSegmentRelationshipReturnsOnCall(i int, result1 ccv3.Relationship, result2 ccv3.Warnings, result3 error) { +func (fake *FakeCloudControllerClient) UpdateOrganizationDefaultIsolationSegmentRelationshipReturnsOnCall(i int, result1 resources.Relationship, result2 ccv3.Warnings, result3 error) { fake.updateOrganizationDefaultIsolationSegmentRelationshipMutex.Lock() defer fake.updateOrganizationDefaultIsolationSegmentRelationshipMutex.Unlock() fake.UpdateOrganizationDefaultIsolationSegmentRelationshipStub = nil if fake.updateOrganizationDefaultIsolationSegmentRelationshipReturnsOnCall == nil { fake.updateOrganizationDefaultIsolationSegmentRelationshipReturnsOnCall = make(map[int]struct { - result1 ccv3.Relationship + result1 resources.Relationship result2 ccv3.Warnings result3 error }) } fake.updateOrganizationDefaultIsolationSegmentRelationshipReturnsOnCall[i] = struct { - result1 ccv3.Relationship + result1 resources.Relationship result2 ccv3.Warnings result3 error }{result1, result2, result3} } -func (fake *FakeCloudControllerClient) UpdateProcess(arg1 ccv3.Process) (ccv3.Process, ccv3.Warnings, error) { +func (fake *FakeCloudControllerClient) UpdateProcess(arg1 resources.Process) (resources.Process, ccv3.Warnings, error) { fake.updateProcessMutex.Lock() ret, specificReturn := fake.updateProcessReturnsOnCall[len(fake.updateProcessArgsForCall)] fake.updateProcessArgsForCall = append(fake.updateProcessArgsForCall, struct { - arg1 ccv3.Process + arg1 resources.Process }{arg1}) fake.recordInvocation("UpdateProcess", []interface{}{arg1}) fake.updateProcessMutex.Unlock() @@ -5128,43 +5129,43 @@ func (fake *FakeCloudControllerClient) UpdateProcessCallCount() int { return len(fake.updateProcessArgsForCall) } -func (fake *FakeCloudControllerClient) UpdateProcessCalls(stub func(ccv3.Process) (ccv3.Process, ccv3.Warnings, error)) { +func (fake *FakeCloudControllerClient) UpdateProcessCalls(stub func(resources.Process) (resources.Process, ccv3.Warnings, error)) { fake.updateProcessMutex.Lock() defer fake.updateProcessMutex.Unlock() fake.UpdateProcessStub = stub } -func (fake *FakeCloudControllerClient) UpdateProcessArgsForCall(i int) ccv3.Process { +func (fake *FakeCloudControllerClient) UpdateProcessArgsForCall(i int) resources.Process { fake.updateProcessMutex.RLock() defer fake.updateProcessMutex.RUnlock() argsForCall := fake.updateProcessArgsForCall[i] return argsForCall.arg1 } -func (fake *FakeCloudControllerClient) UpdateProcessReturns(result1 ccv3.Process, result2 ccv3.Warnings, result3 error) { +func (fake *FakeCloudControllerClient) UpdateProcessReturns(result1 resources.Process, result2 ccv3.Warnings, result3 error) { fake.updateProcessMutex.Lock() defer fake.updateProcessMutex.Unlock() fake.UpdateProcessStub = nil fake.updateProcessReturns = struct { - result1 ccv3.Process + result1 resources.Process result2 ccv3.Warnings result3 error }{result1, result2, result3} } -func (fake *FakeCloudControllerClient) UpdateProcessReturnsOnCall(i int, result1 ccv3.Process, result2 ccv3.Warnings, result3 error) { +func (fake *FakeCloudControllerClient) UpdateProcessReturnsOnCall(i int, result1 resources.Process, result2 ccv3.Warnings, result3 error) { fake.updateProcessMutex.Lock() defer fake.updateProcessMutex.Unlock() fake.UpdateProcessStub = nil if fake.updateProcessReturnsOnCall == nil { fake.updateProcessReturnsOnCall = make(map[int]struct { - result1 ccv3.Process + result1 resources.Process result2 ccv3.Warnings result3 error }) } fake.updateProcessReturnsOnCall[i] = struct { - result1 ccv3.Process + result1 resources.Process result2 ccv3.Warnings result3 error }{result1, result2, result3} @@ -5243,7 +5244,7 @@ func (fake *FakeCloudControllerClient) UpdateSpaceApplyManifestReturnsOnCall(i i }{result1, result2, result3} } -func (fake *FakeCloudControllerClient) UpdateSpaceIsolationSegmentRelationship(arg1 string, arg2 string) (ccv3.Relationship, ccv3.Warnings, error) { +func (fake *FakeCloudControllerClient) UpdateSpaceIsolationSegmentRelationship(arg1 string, arg2 string) (resources.Relationship, ccv3.Warnings, error) { fake.updateSpaceIsolationSegmentRelationshipMutex.Lock() ret, specificReturn := fake.updateSpaceIsolationSegmentRelationshipReturnsOnCall[len(fake.updateSpaceIsolationSegmentRelationshipArgsForCall)] fake.updateSpaceIsolationSegmentRelationshipArgsForCall = append(fake.updateSpaceIsolationSegmentRelationshipArgsForCall, struct { @@ -5268,7 +5269,7 @@ func (fake *FakeCloudControllerClient) UpdateSpaceIsolationSegmentRelationshipCa return len(fake.updateSpaceIsolationSegmentRelationshipArgsForCall) } -func (fake *FakeCloudControllerClient) UpdateSpaceIsolationSegmentRelationshipCalls(stub func(string, string) (ccv3.Relationship, ccv3.Warnings, error)) { +func (fake *FakeCloudControllerClient) UpdateSpaceIsolationSegmentRelationshipCalls(stub func(string, string) (resources.Relationship, ccv3.Warnings, error)) { fake.updateSpaceIsolationSegmentRelationshipMutex.Lock() defer fake.updateSpaceIsolationSegmentRelationshipMutex.Unlock() fake.UpdateSpaceIsolationSegmentRelationshipStub = stub @@ -5281,36 +5282,36 @@ func (fake *FakeCloudControllerClient) UpdateSpaceIsolationSegmentRelationshipAr return argsForCall.arg1, argsForCall.arg2 } -func (fake *FakeCloudControllerClient) UpdateSpaceIsolationSegmentRelationshipReturns(result1 ccv3.Relationship, result2 ccv3.Warnings, result3 error) { +func (fake *FakeCloudControllerClient) UpdateSpaceIsolationSegmentRelationshipReturns(result1 resources.Relationship, result2 ccv3.Warnings, result3 error) { fake.updateSpaceIsolationSegmentRelationshipMutex.Lock() defer fake.updateSpaceIsolationSegmentRelationshipMutex.Unlock() fake.UpdateSpaceIsolationSegmentRelationshipStub = nil fake.updateSpaceIsolationSegmentRelationshipReturns = struct { - result1 ccv3.Relationship + result1 resources.Relationship result2 ccv3.Warnings result3 error }{result1, result2, result3} } -func (fake *FakeCloudControllerClient) UpdateSpaceIsolationSegmentRelationshipReturnsOnCall(i int, result1 ccv3.Relationship, result2 ccv3.Warnings, result3 error) { +func (fake *FakeCloudControllerClient) UpdateSpaceIsolationSegmentRelationshipReturnsOnCall(i int, result1 resources.Relationship, result2 ccv3.Warnings, result3 error) { fake.updateSpaceIsolationSegmentRelationshipMutex.Lock() defer fake.updateSpaceIsolationSegmentRelationshipMutex.Unlock() fake.UpdateSpaceIsolationSegmentRelationshipStub = nil if fake.updateSpaceIsolationSegmentRelationshipReturnsOnCall == nil { fake.updateSpaceIsolationSegmentRelationshipReturnsOnCall = make(map[int]struct { - result1 ccv3.Relationship + result1 resources.Relationship result2 ccv3.Warnings result3 error }) } fake.updateSpaceIsolationSegmentRelationshipReturnsOnCall[i] = struct { - result1 ccv3.Relationship + result1 resources.Relationship result2 ccv3.Warnings result3 error }{result1, result2, result3} } -func (fake *FakeCloudControllerClient) UpdateTaskCancel(arg1 string) (ccv3.Task, ccv3.Warnings, error) { +func (fake *FakeCloudControllerClient) UpdateTaskCancel(arg1 string) (resources.Task, ccv3.Warnings, error) { fake.updateTaskCancelMutex.Lock() ret, specificReturn := fake.updateTaskCancelReturnsOnCall[len(fake.updateTaskCancelArgsForCall)] fake.updateTaskCancelArgsForCall = append(fake.updateTaskCancelArgsForCall, struct { @@ -5334,7 +5335,7 @@ func (fake *FakeCloudControllerClient) UpdateTaskCancelCallCount() int { return len(fake.updateTaskCancelArgsForCall) } -func (fake *FakeCloudControllerClient) UpdateTaskCancelCalls(stub func(string) (ccv3.Task, ccv3.Warnings, error)) { +func (fake *FakeCloudControllerClient) UpdateTaskCancelCalls(stub func(string) (resources.Task, ccv3.Warnings, error)) { fake.updateTaskCancelMutex.Lock() defer fake.updateTaskCancelMutex.Unlock() fake.UpdateTaskCancelStub = stub @@ -5347,36 +5348,36 @@ func (fake *FakeCloudControllerClient) UpdateTaskCancelArgsForCall(i int) string return argsForCall.arg1 } -func (fake *FakeCloudControllerClient) UpdateTaskCancelReturns(result1 ccv3.Task, result2 ccv3.Warnings, result3 error) { +func (fake *FakeCloudControllerClient) UpdateTaskCancelReturns(result1 resources.Task, result2 ccv3.Warnings, result3 error) { fake.updateTaskCancelMutex.Lock() defer fake.updateTaskCancelMutex.Unlock() fake.UpdateTaskCancelStub = nil fake.updateTaskCancelReturns = struct { - result1 ccv3.Task + result1 resources.Task result2 ccv3.Warnings result3 error }{result1, result2, result3} } -func (fake *FakeCloudControllerClient) UpdateTaskCancelReturnsOnCall(i int, result1 ccv3.Task, result2 ccv3.Warnings, result3 error) { +func (fake *FakeCloudControllerClient) UpdateTaskCancelReturnsOnCall(i int, result1 resources.Task, result2 ccv3.Warnings, result3 error) { fake.updateTaskCancelMutex.Lock() defer fake.updateTaskCancelMutex.Unlock() fake.UpdateTaskCancelStub = nil if fake.updateTaskCancelReturnsOnCall == nil { fake.updateTaskCancelReturnsOnCall = make(map[int]struct { - result1 ccv3.Task + result1 resources.Task result2 ccv3.Warnings result3 error }) } fake.updateTaskCancelReturnsOnCall[i] = struct { - result1 ccv3.Task + result1 resources.Task result2 ccv3.Warnings result3 error }{result1, result2, result3} } -func (fake *FakeCloudControllerClient) UploadBitsPackage(arg1 ccv3.Package, arg2 []ccv3.Resource, arg3 io.Reader, arg4 int64) (ccv3.Package, ccv3.Warnings, error) { +func (fake *FakeCloudControllerClient) UploadBitsPackage(arg1 resources.Package, arg2 []ccv3.Resource, arg3 io.Reader, arg4 int64) (resources.Package, ccv3.Warnings, error) { var arg2Copy []ccv3.Resource if arg2 != nil { arg2Copy = make([]ccv3.Resource, len(arg2)) @@ -5385,7 +5386,7 @@ func (fake *FakeCloudControllerClient) UploadBitsPackage(arg1 ccv3.Package, arg2 fake.uploadBitsPackageMutex.Lock() ret, specificReturn := fake.uploadBitsPackageReturnsOnCall[len(fake.uploadBitsPackageArgsForCall)] fake.uploadBitsPackageArgsForCall = append(fake.uploadBitsPackageArgsForCall, struct { - arg1 ccv3.Package + arg1 resources.Package arg2 []ccv3.Resource arg3 io.Reader arg4 int64 @@ -5408,43 +5409,43 @@ func (fake *FakeCloudControllerClient) UploadBitsPackageCallCount() int { return len(fake.uploadBitsPackageArgsForCall) } -func (fake *FakeCloudControllerClient) UploadBitsPackageCalls(stub func(ccv3.Package, []ccv3.Resource, io.Reader, int64) (ccv3.Package, ccv3.Warnings, error)) { +func (fake *FakeCloudControllerClient) UploadBitsPackageCalls(stub func(resources.Package, []ccv3.Resource, io.Reader, int64) (resources.Package, ccv3.Warnings, error)) { fake.uploadBitsPackageMutex.Lock() defer fake.uploadBitsPackageMutex.Unlock() fake.UploadBitsPackageStub = stub } -func (fake *FakeCloudControllerClient) UploadBitsPackageArgsForCall(i int) (ccv3.Package, []ccv3.Resource, io.Reader, int64) { +func (fake *FakeCloudControllerClient) UploadBitsPackageArgsForCall(i int) (resources.Package, []ccv3.Resource, io.Reader, int64) { fake.uploadBitsPackageMutex.RLock() defer fake.uploadBitsPackageMutex.RUnlock() argsForCall := fake.uploadBitsPackageArgsForCall[i] return argsForCall.arg1, argsForCall.arg2, argsForCall.arg3, argsForCall.arg4 } -func (fake *FakeCloudControllerClient) UploadBitsPackageReturns(result1 ccv3.Package, result2 ccv3.Warnings, result3 error) { +func (fake *FakeCloudControllerClient) UploadBitsPackageReturns(result1 resources.Package, result2 ccv3.Warnings, result3 error) { fake.uploadBitsPackageMutex.Lock() defer fake.uploadBitsPackageMutex.Unlock() fake.UploadBitsPackageStub = nil fake.uploadBitsPackageReturns = struct { - result1 ccv3.Package + result1 resources.Package result2 ccv3.Warnings result3 error }{result1, result2, result3} } -func (fake *FakeCloudControllerClient) UploadBitsPackageReturnsOnCall(i int, result1 ccv3.Package, result2 ccv3.Warnings, result3 error) { +func (fake *FakeCloudControllerClient) UploadBitsPackageReturnsOnCall(i int, result1 resources.Package, result2 ccv3.Warnings, result3 error) { fake.uploadBitsPackageMutex.Lock() defer fake.uploadBitsPackageMutex.Unlock() fake.UploadBitsPackageStub = nil if fake.uploadBitsPackageReturnsOnCall == nil { fake.uploadBitsPackageReturnsOnCall = make(map[int]struct { - result1 ccv3.Package + result1 resources.Package result2 ccv3.Warnings result3 error }) } fake.uploadBitsPackageReturnsOnCall[i] = struct { - result1 ccv3.Package + result1 resources.Package result2 ccv3.Warnings result3 error }{result1, result2, result3} @@ -5519,11 +5520,11 @@ func (fake *FakeCloudControllerClient) UploadBuildpackReturnsOnCall(i int, resul }{result1, result2, result3} } -func (fake *FakeCloudControllerClient) UploadPackage(arg1 ccv3.Package, arg2 string) (ccv3.Package, ccv3.Warnings, error) { +func (fake *FakeCloudControllerClient) UploadPackage(arg1 resources.Package, arg2 string) (resources.Package, ccv3.Warnings, error) { fake.uploadPackageMutex.Lock() ret, specificReturn := fake.uploadPackageReturnsOnCall[len(fake.uploadPackageArgsForCall)] fake.uploadPackageArgsForCall = append(fake.uploadPackageArgsForCall, struct { - arg1 ccv3.Package + arg1 resources.Package arg2 string }{arg1, arg2}) fake.recordInvocation("UploadPackage", []interface{}{arg1, arg2}) @@ -5544,43 +5545,43 @@ func (fake *FakeCloudControllerClient) UploadPackageCallCount() int { return len(fake.uploadPackageArgsForCall) } -func (fake *FakeCloudControllerClient) UploadPackageCalls(stub func(ccv3.Package, string) (ccv3.Package, ccv3.Warnings, error)) { +func (fake *FakeCloudControllerClient) UploadPackageCalls(stub func(resources.Package, string) (resources.Package, ccv3.Warnings, error)) { fake.uploadPackageMutex.Lock() defer fake.uploadPackageMutex.Unlock() fake.UploadPackageStub = stub } -func (fake *FakeCloudControllerClient) UploadPackageArgsForCall(i int) (ccv3.Package, string) { +func (fake *FakeCloudControllerClient) UploadPackageArgsForCall(i int) (resources.Package, string) { fake.uploadPackageMutex.RLock() defer fake.uploadPackageMutex.RUnlock() argsForCall := fake.uploadPackageArgsForCall[i] return argsForCall.arg1, argsForCall.arg2 } -func (fake *FakeCloudControllerClient) UploadPackageReturns(result1 ccv3.Package, result2 ccv3.Warnings, result3 error) { +func (fake *FakeCloudControllerClient) UploadPackageReturns(result1 resources.Package, result2 ccv3.Warnings, result3 error) { fake.uploadPackageMutex.Lock() defer fake.uploadPackageMutex.Unlock() fake.UploadPackageStub = nil fake.uploadPackageReturns = struct { - result1 ccv3.Package + result1 resources.Package result2 ccv3.Warnings result3 error }{result1, result2, result3} } -func (fake *FakeCloudControllerClient) UploadPackageReturnsOnCall(i int, result1 ccv3.Package, result2 ccv3.Warnings, result3 error) { +func (fake *FakeCloudControllerClient) UploadPackageReturnsOnCall(i int, result1 resources.Package, result2 ccv3.Warnings, result3 error) { fake.uploadPackageMutex.Lock() defer fake.uploadPackageMutex.Unlock() fake.UploadPackageStub = nil if fake.uploadPackageReturnsOnCall == nil { fake.uploadPackageReturnsOnCall = make(map[int]struct { - result1 ccv3.Package + result1 resources.Package result2 ccv3.Warnings result3 error }) } fake.uploadPackageReturnsOnCall[i] = struct { - result1 ccv3.Package + result1 resources.Package result2 ccv3.Warnings result3 error }{result1, result2, result3}