From 4460a61f94195e905f823c2983c41e774a38c8b8 Mon Sep 17 00:00:00 2001 From: Chaitali Mane <71449322+chaitali-mane@users.noreply.github.com> Date: Wed, 9 Feb 2022 21:38:45 +0530 Subject: [PATCH] Stalwart 22 preview screen modal (#6679) * Added preview screen slider Signed-off-by: Chaitali Mane * Added metadata changes Signed-off-by: Chaitali Mane * Added vault variable into cypress Signed-off-by: Chaitali Mane * Added cancel migration API integration Signed-off-by: Chaitali Mane * Added preview data API requests Signed-off-by: Chaitali Mane * Updated for cancel migration Signed-off-by: Chaitali Mane * Updated values with API data variables Signed-off-by: Chaitali Mane * Update for preview modal input Signed-off-by: Chaitali Mane * minor change Signed-off-by: Chaitali Mane * removed server IP dependancy Signed-off-by: Chaitali Mane * minor Signed-off-by: Chaitali Mane * removed lint in iam Signed-off-by: Chaitali Mane * removed file Signed-off-by: Chaitali Mane * Pipeline failure changes Signed-off-by: Yashvi Jain * Pipeline failure changes Signed-off-by: Yashvi Jain * pipeline failure changes Signed-off-by: Yashvi Jain * pipeline failure changes Signed-off-by: Yashvi Jain * removed commented code Signed-off-by: Chaitali Mane * Adding variable Signed-off-by: Chaitali Mane * Complitation error fix Signed-off-by: Yashvi Jain * Pipeline failure changes Signed-off-by: Yashvi Jain Co-authored-by: Yashvi Jain --- .expeditor/verify_private.pipeline.yml | 3 + .../migrations/migrations.pb.client_mock.go | 92 +++--- .../infra_proxy/migrations/migrations.pb.go | 271 +++++++++--------- .../migrations/migrations.pb.gw.go | 108 +++---- .../migrations/migrations.pb.policy.go | 8 +- .../infra_proxy/migrations/migrations.proto | 2 +- .../migrations/migrations.swagger.json | 20 +- .../migrations/request/migrations.pb.go | 88 +++--- .../migrations/request/migrations.proto | 4 +- .../migrations/response/migrations.pb.go | 146 +++++----- .../migrations/response/migrations.proto | 6 +- .../migrations/request/migrations.pb.go | 126 ++++---- .../migrations/request/migrations.proto | 6 +- .../migrations/response/migrations.pb.go | 180 ++++++------ .../migrations/response/migrations.proto | 8 +- .../migrations/service/migrations.pb.go | 134 ++++----- .../migrations/service/migrations.proto | 2 +- .../storage/postgres/migration/sql/README.md | 3 +- .../api/migrations.pb.swagger.go | 20 +- .../automate-gateway/gateway/services.go | 8 +- .../src/app/entities/orgs/org.actions.ts | 98 +++++-- .../src/app/entities/orgs/org.effects.ts | 55 +++- .../src/app/entities/orgs/org.model.ts | 24 ++ .../src/app/entities/orgs/org.reducer.ts | 33 ++- .../src/app/entities/orgs/org.requests.ts | 15 +- .../src/app/entities/orgs/org.selectors.ts | 16 ++ .../chef-server-details.component.html | 12 +- .../chef-server-details.component.scss | 9 + .../chef-server-details.component.ts | 75 ++++- .../migration-slider.component.html | 90 +++++- .../migration-slider.component.scss | 111 +++++++ .../migration-slider.component.spec.ts | 25 -- .../migration-slider.component.ts | 48 +++- .../sync-org-users-slider.component.html | 3 - .../sync-org-users-slider.component.ts | 14 - .../migrations/migrations.go | 18 +- .../migrations/pipeline/phaseonemigration.go | 3 - .../migrations/pipeline/phasetwomigration.go | 5 +- .../migrations/pipeline/utility.go | 18 +- .../api/iam/infra_editor_actions.spec.ts | 4 +- .../iam/infra_project_owner_actions.spec.ts | 4 +- .../chef-organization-details.spec.ts | 5 +- .../infra-proxy/chef-server-details.spec.ts | 8 +- .../ui/infra-proxy/chef-servers.spec.ts | 3 +- .../ui/infra-proxy/infra-databags.spec.ts | 5 +- .../ui/infra-proxy/infra-node-details.spec.ts | 5 +- .../ui/infra-proxy/infra-node-list.spec.ts | 5 +- .../infra-policy-file-details.spec.ts | 5 +- .../infra-policy-file-list.spec.ts | 5 +- .../infra-policy-group-details.spec.ts | 5 +- .../infra-policy-groups-list.spec.ts | 5 +- .../ui/infra-proxy/infra-role-details.spec.ts | 5 +- .../ui/infra-proxy/infra-roles.spec.ts | 5 +- .../update-web-uikey-slider.spec.ts | 15 +- .../ui/infra-proxy/upload-file-slider.spec.ts | 5 +- 55 files changed, 1209 insertions(+), 787 deletions(-) delete mode 100644 components/automate-ui/src/app/modules/infra-proxy/migration-slider/migration-slider.component.spec.ts diff --git a/.expeditor/verify_private.pipeline.yml b/.expeditor/verify_private.pipeline.yml index f7673982b37..86f0338a95e 100644 --- a/.expeditor/verify_private.pipeline.yml +++ b/.expeditor/verify_private.pipeline.yml @@ -497,6 +497,9 @@ steps: CYPRESS_AUTOMATE_INFRA_WEBUI_KEY: path: secret/a2/testing/infra_webui_key field: data + CYPRESS_AUTOMATE_INFRA_SERVER_FQDN: + path: secret/a2/testing/infra_server_fqdn + field: data executor: linux: privileged: true diff --git a/api/external/infra_proxy/migrations/migrations.pb.client_mock.go b/api/external/infra_proxy/migrations/migrations.pb.client_mock.go index e9e2d3c3fa4..93c93ffa6ef 100644 --- a/api/external/infra_proxy/migrations/migrations.pb.client_mock.go +++ b/api/external/infra_proxy/migrations/migrations.pb.client_mock.go @@ -13,31 +13,31 @@ import ( reflect "reflect" ) -// MockInfraProxyMigrationClient is a mock of InfraProxyMigrationClient interface -type MockInfraProxyMigrationClient struct { +// MockInfraProxyMigrationServiceClient is a mock of InfraProxyMigrationServiceClient interface +type MockInfraProxyMigrationServiceClient struct { ctrl *gomock.Controller - recorder *MockInfraProxyMigrationClientMockRecorder + recorder *MockInfraProxyMigrationServiceClientMockRecorder } -// MockInfraProxyMigrationClientMockRecorder is the mock recorder for MockInfraProxyMigrationClient -type MockInfraProxyMigrationClientMockRecorder struct { - mock *MockInfraProxyMigrationClient +// MockInfraProxyMigrationServiceClientMockRecorder is the mock recorder for MockInfraProxyMigrationServiceClient +type MockInfraProxyMigrationServiceClientMockRecorder struct { + mock *MockInfraProxyMigrationServiceClient } -// NewMockInfraProxyMigrationClient creates a new mock instance -func NewMockInfraProxyMigrationClient(ctrl *gomock.Controller) *MockInfraProxyMigrationClient { - mock := &MockInfraProxyMigrationClient{ctrl: ctrl} - mock.recorder = &MockInfraProxyMigrationClientMockRecorder{mock} +// NewMockInfraProxyMigrationServiceClient creates a new mock instance +func NewMockInfraProxyMigrationServiceClient(ctrl *gomock.Controller) *MockInfraProxyMigrationServiceClient { + mock := &MockInfraProxyMigrationServiceClient{ctrl: ctrl} + mock.recorder = &MockInfraProxyMigrationServiceClientMockRecorder{mock} return mock } // EXPECT returns an object that allows the caller to indicate expected use -func (m *MockInfraProxyMigrationClient) EXPECT() *MockInfraProxyMigrationClientMockRecorder { +func (m *MockInfraProxyMigrationServiceClient) EXPECT() *MockInfraProxyMigrationServiceClientMockRecorder { return m.recorder } // GetMigrationStatus mocks base method -func (m *MockInfraProxyMigrationClient) GetMigrationStatus(ctx context.Context, in *request.GetMigrationStatusRequest, opts ...grpc.CallOption) (*response.GetMigrationStatusResponse, error) { +func (m *MockInfraProxyMigrationServiceClient) GetMigrationStatus(ctx context.Context, in *request.GetMigrationStatusRequest, opts ...grpc.CallOption) (*response.GetMigrationStatusResponse, error) { m.ctrl.T.Helper() varargs := []interface{}{ctx, in} for _, a := range opts { @@ -50,14 +50,14 @@ func (m *MockInfraProxyMigrationClient) GetMigrationStatus(ctx context.Context, } // GetMigrationStatus indicates an expected call of GetMigrationStatus -func (mr *MockInfraProxyMigrationClientMockRecorder) GetMigrationStatus(ctx, in interface{}, opts ...interface{}) *gomock.Call { +func (mr *MockInfraProxyMigrationServiceClientMockRecorder) GetMigrationStatus(ctx, in interface{}, opts ...interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() varargs := append([]interface{}{ctx, in}, opts...) - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetMigrationStatus", reflect.TypeOf((*MockInfraProxyMigrationClient)(nil).GetMigrationStatus), varargs...) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetMigrationStatus", reflect.TypeOf((*MockInfraProxyMigrationServiceClient)(nil).GetMigrationStatus), varargs...) } // CancelMigration mocks base method -func (m *MockInfraProxyMigrationClient) CancelMigration(ctx context.Context, in *request.CancelMigrationRequest, opts ...grpc.CallOption) (*response.CancelMigrationResponse, error) { +func (m *MockInfraProxyMigrationServiceClient) CancelMigration(ctx context.Context, in *request.CancelMigrationRequest, opts ...grpc.CallOption) (*response.CancelMigrationResponse, error) { m.ctrl.T.Helper() varargs := []interface{}{ctx, in} for _, a := range opts { @@ -70,14 +70,14 @@ func (m *MockInfraProxyMigrationClient) CancelMigration(ctx context.Context, in } // CancelMigration indicates an expected call of CancelMigration -func (mr *MockInfraProxyMigrationClientMockRecorder) CancelMigration(ctx, in interface{}, opts ...interface{}) *gomock.Call { +func (mr *MockInfraProxyMigrationServiceClientMockRecorder) CancelMigration(ctx, in interface{}, opts ...interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() varargs := append([]interface{}{ctx, in}, opts...) - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CancelMigration", reflect.TypeOf((*MockInfraProxyMigrationClient)(nil).CancelMigration), varargs...) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CancelMigration", reflect.TypeOf((*MockInfraProxyMigrationServiceClient)(nil).CancelMigration), varargs...) } // GetStagedData mocks base method -func (m *MockInfraProxyMigrationClient) GetStagedData(ctx context.Context, in *request.GetStagedDataRequest, opts ...grpc.CallOption) (*response.GetStagedDataResponse, error) { +func (m *MockInfraProxyMigrationServiceClient) GetStagedData(ctx context.Context, in *request.GetStagedDataRequest, opts ...grpc.CallOption) (*response.GetStagedDataResponse, error) { m.ctrl.T.Helper() varargs := []interface{}{ctx, in} for _, a := range opts { @@ -90,14 +90,14 @@ func (m *MockInfraProxyMigrationClient) GetStagedData(ctx context.Context, in *r } // GetStagedData indicates an expected call of GetStagedData -func (mr *MockInfraProxyMigrationClientMockRecorder) GetStagedData(ctx, in interface{}, opts ...interface{}) *gomock.Call { +func (mr *MockInfraProxyMigrationServiceClientMockRecorder) GetStagedData(ctx, in interface{}, opts ...interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() varargs := append([]interface{}{ctx, in}, opts...) - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetStagedData", reflect.TypeOf((*MockInfraProxyMigrationClient)(nil).GetStagedData), varargs...) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetStagedData", reflect.TypeOf((*MockInfraProxyMigrationServiceClient)(nil).GetStagedData), varargs...) } // ConfirmPreview mocks base method -func (m *MockInfraProxyMigrationClient) ConfirmPreview(ctx context.Context, in *request.ConfirmPreview, opts ...grpc.CallOption) (*response.ConfirmPreview, error) { +func (m *MockInfraProxyMigrationServiceClient) ConfirmPreview(ctx context.Context, in *request.ConfirmPreview, opts ...grpc.CallOption) (*response.ConfirmPreview, error) { m.ctrl.T.Helper() varargs := []interface{}{ctx, in} for _, a := range opts { @@ -110,37 +110,37 @@ func (m *MockInfraProxyMigrationClient) ConfirmPreview(ctx context.Context, in * } // ConfirmPreview indicates an expected call of ConfirmPreview -func (mr *MockInfraProxyMigrationClientMockRecorder) ConfirmPreview(ctx, in interface{}, opts ...interface{}) *gomock.Call { +func (mr *MockInfraProxyMigrationServiceClientMockRecorder) ConfirmPreview(ctx, in interface{}, opts ...interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() varargs := append([]interface{}{ctx, in}, opts...) - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ConfirmPreview", reflect.TypeOf((*MockInfraProxyMigrationClient)(nil).ConfirmPreview), varargs...) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ConfirmPreview", reflect.TypeOf((*MockInfraProxyMigrationServiceClient)(nil).ConfirmPreview), varargs...) } -// MockInfraProxyMigrationServer is a mock of InfraProxyMigrationServer interface -type MockInfraProxyMigrationServer struct { +// MockInfraProxyMigrationServiceServer is a mock of InfraProxyMigrationServiceServer interface +type MockInfraProxyMigrationServiceServer struct { ctrl *gomock.Controller - recorder *MockInfraProxyMigrationServerMockRecorder + recorder *MockInfraProxyMigrationServiceServerMockRecorder } -// MockInfraProxyMigrationServerMockRecorder is the mock recorder for MockInfraProxyMigrationServer -type MockInfraProxyMigrationServerMockRecorder struct { - mock *MockInfraProxyMigrationServer +// MockInfraProxyMigrationServiceServerMockRecorder is the mock recorder for MockInfraProxyMigrationServiceServer +type MockInfraProxyMigrationServiceServerMockRecorder struct { + mock *MockInfraProxyMigrationServiceServer } -// NewMockInfraProxyMigrationServer creates a new mock instance -func NewMockInfraProxyMigrationServer(ctrl *gomock.Controller) *MockInfraProxyMigrationServer { - mock := &MockInfraProxyMigrationServer{ctrl: ctrl} - mock.recorder = &MockInfraProxyMigrationServerMockRecorder{mock} +// NewMockInfraProxyMigrationServiceServer creates a new mock instance +func NewMockInfraProxyMigrationServiceServer(ctrl *gomock.Controller) *MockInfraProxyMigrationServiceServer { + mock := &MockInfraProxyMigrationServiceServer{ctrl: ctrl} + mock.recorder = &MockInfraProxyMigrationServiceServerMockRecorder{mock} return mock } // EXPECT returns an object that allows the caller to indicate expected use -func (m *MockInfraProxyMigrationServer) EXPECT() *MockInfraProxyMigrationServerMockRecorder { +func (m *MockInfraProxyMigrationServiceServer) EXPECT() *MockInfraProxyMigrationServiceServerMockRecorder { return m.recorder } // GetMigrationStatus mocks base method -func (m *MockInfraProxyMigrationServer) GetMigrationStatus(arg0 context.Context, arg1 *request.GetMigrationStatusRequest) (*response.GetMigrationStatusResponse, error) { +func (m *MockInfraProxyMigrationServiceServer) GetMigrationStatus(arg0 context.Context, arg1 *request.GetMigrationStatusRequest) (*response.GetMigrationStatusResponse, error) { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "GetMigrationStatus", arg0, arg1) ret0, _ := ret[0].(*response.GetMigrationStatusResponse) @@ -149,13 +149,13 @@ func (m *MockInfraProxyMigrationServer) GetMigrationStatus(arg0 context.Context, } // GetMigrationStatus indicates an expected call of GetMigrationStatus -func (mr *MockInfraProxyMigrationServerMockRecorder) GetMigrationStatus(arg0, arg1 interface{}) *gomock.Call { +func (mr *MockInfraProxyMigrationServiceServerMockRecorder) GetMigrationStatus(arg0, arg1 interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetMigrationStatus", reflect.TypeOf((*MockInfraProxyMigrationServer)(nil).GetMigrationStatus), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetMigrationStatus", reflect.TypeOf((*MockInfraProxyMigrationServiceServer)(nil).GetMigrationStatus), arg0, arg1) } // CancelMigration mocks base method -func (m *MockInfraProxyMigrationServer) CancelMigration(arg0 context.Context, arg1 *request.CancelMigrationRequest) (*response.CancelMigrationResponse, error) { +func (m *MockInfraProxyMigrationServiceServer) CancelMigration(arg0 context.Context, arg1 *request.CancelMigrationRequest) (*response.CancelMigrationResponse, error) { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "CancelMigration", arg0, arg1) ret0, _ := ret[0].(*response.CancelMigrationResponse) @@ -164,13 +164,13 @@ func (m *MockInfraProxyMigrationServer) CancelMigration(arg0 context.Context, ar } // CancelMigration indicates an expected call of CancelMigration -func (mr *MockInfraProxyMigrationServerMockRecorder) CancelMigration(arg0, arg1 interface{}) *gomock.Call { +func (mr *MockInfraProxyMigrationServiceServerMockRecorder) CancelMigration(arg0, arg1 interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CancelMigration", reflect.TypeOf((*MockInfraProxyMigrationServer)(nil).CancelMigration), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CancelMigration", reflect.TypeOf((*MockInfraProxyMigrationServiceServer)(nil).CancelMigration), arg0, arg1) } // GetStagedData mocks base method -func (m *MockInfraProxyMigrationServer) GetStagedData(arg0 context.Context, arg1 *request.GetStagedDataRequest) (*response.GetStagedDataResponse, error) { +func (m *MockInfraProxyMigrationServiceServer) GetStagedData(arg0 context.Context, arg1 *request.GetStagedDataRequest) (*response.GetStagedDataResponse, error) { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "GetStagedData", arg0, arg1) ret0, _ := ret[0].(*response.GetStagedDataResponse) @@ -179,13 +179,13 @@ func (m *MockInfraProxyMigrationServer) GetStagedData(arg0 context.Context, arg1 } // GetStagedData indicates an expected call of GetStagedData -func (mr *MockInfraProxyMigrationServerMockRecorder) GetStagedData(arg0, arg1 interface{}) *gomock.Call { +func (mr *MockInfraProxyMigrationServiceServerMockRecorder) GetStagedData(arg0, arg1 interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetStagedData", reflect.TypeOf((*MockInfraProxyMigrationServer)(nil).GetStagedData), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetStagedData", reflect.TypeOf((*MockInfraProxyMigrationServiceServer)(nil).GetStagedData), arg0, arg1) } // ConfirmPreview mocks base method -func (m *MockInfraProxyMigrationServer) ConfirmPreview(arg0 context.Context, arg1 *request.ConfirmPreview) (*response.ConfirmPreview, error) { +func (m *MockInfraProxyMigrationServiceServer) ConfirmPreview(arg0 context.Context, arg1 *request.ConfirmPreview) (*response.ConfirmPreview, error) { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "ConfirmPreview", arg0, arg1) ret0, _ := ret[0].(*response.ConfirmPreview) @@ -194,7 +194,7 @@ func (m *MockInfraProxyMigrationServer) ConfirmPreview(arg0 context.Context, arg } // ConfirmPreview indicates an expected call of ConfirmPreview -func (mr *MockInfraProxyMigrationServerMockRecorder) ConfirmPreview(arg0, arg1 interface{}) *gomock.Call { +func (mr *MockInfraProxyMigrationServiceServerMockRecorder) ConfirmPreview(arg0, arg1 interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ConfirmPreview", reflect.TypeOf((*MockInfraProxyMigrationServer)(nil).ConfirmPreview), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ConfirmPreview", reflect.TypeOf((*MockInfraProxyMigrationServiceServer)(nil).ConfirmPreview), arg0, arg1) } diff --git a/api/external/infra_proxy/migrations/migrations.pb.go b/api/external/infra_proxy/migrations/migrations.pb.go index 09fd2d45025..0f8caee5a3c 100644 --- a/api/external/infra_proxy/migrations/migrations.pb.go +++ b/api/external/infra_proxy/migrations/migrations.pb.go @@ -52,93 +52,94 @@ var file_external_infra_proxy_migrations_migrations_proto_rawDesc = []byte{ 0x1a, 0x39, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2f, 0x69, 0x6e, 0x66, 0x72, 0x61, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x6d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2f, 0x6d, 0x69, 0x67, 0x72, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x32, 0x97, 0x0a, 0x0a, 0x13, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x32, 0x9e, 0x0a, 0x0a, 0x1a, 0x49, 0x6e, 0x66, 0x72, 0x61, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x4d, 0x69, 0x67, 0x72, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x12, 0xa4, 0x02, 0x0a, 0x12, 0x47, 0x65, 0x74, 0x4d, 0x69, 0x67, 0x72, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x4b, 0x2e, 0x63, 0x68, 0x65, - 0x66, 0x2e, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x61, 0x74, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x69, - 0x6e, 0x66, 0x72, 0x61, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x6d, 0x69, 0x67, 0x72, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x47, 0x65, - 0x74, 0x4d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x4d, 0x2e, 0x63, 0x68, 0x65, 0x66, 0x2e, 0x61, - 0x75, 0x74, 0x6f, 0x6d, 0x61, 0x74, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x69, 0x6e, 0x66, 0x72, - 0x61, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x6d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x73, 0x2e, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x47, 0x65, 0x74, 0x4d, - 0x69, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x72, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x38, 0x12, 0x36, - 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x30, 0x2f, 0x69, 0x6e, 0x66, 0x72, 0x61, 0x2f, 0x73, 0x65, - 0x72, 0x76, 0x65, 0x72, 0x73, 0x2f, 0x6d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, - 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2f, 0x7b, 0x6d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x7d, 0x8a, 0xb5, 0x18, 0x14, 0x0a, 0x12, 0x69, 0x6e, 0x66, 0x72, - 0x61, 0x3a, 0x69, 0x6e, 0x66, 0x72, 0x61, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x73, 0x8a, 0xb5, - 0x18, 0x18, 0x12, 0x16, 0x69, 0x6e, 0x66, 0x72, 0x61, 0x3a, 0x69, 0x6e, 0x66, 0x72, 0x61, 0x53, - 0x65, 0x72, 0x76, 0x65, 0x72, 0x73, 0x3a, 0x67, 0x65, 0x74, 0x12, 0xd8, 0x02, 0x0a, 0x0f, 0x43, - 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x4d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x48, + 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0xa4, 0x02, 0x0a, 0x12, 0x47, + 0x65, 0x74, 0x4d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, + 0x73, 0x12, 0x4b, 0x2e, 0x63, 0x68, 0x65, 0x66, 0x2e, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x61, 0x74, + 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x69, 0x6e, 0x66, 0x72, 0x61, 0x5f, 0x70, 0x72, 0x6f, 0x78, + 0x79, 0x2e, 0x6d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x72, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x2e, 0x47, 0x65, 0x74, 0x4d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x4d, + 0x2e, 0x63, 0x68, 0x65, 0x66, 0x2e, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x61, 0x74, 0x65, 0x2e, 0x61, + 0x70, 0x69, 0x2e, 0x69, 0x6e, 0x66, 0x72, 0x61, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x6d, + 0x69, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x2e, 0x47, 0x65, 0x74, 0x4d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, + 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x72, 0x82, + 0xd3, 0xe4, 0x93, 0x02, 0x38, 0x12, 0x36, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x30, 0x2f, 0x69, + 0x6e, 0x66, 0x72, 0x61, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x73, 0x2f, 0x6d, 0x69, 0x67, + 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2f, 0x7b, + 0x6d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x7d, 0x8a, 0xb5, 0x18, + 0x14, 0x0a, 0x12, 0x69, 0x6e, 0x66, 0x72, 0x61, 0x3a, 0x69, 0x6e, 0x66, 0x72, 0x61, 0x53, 0x65, + 0x72, 0x76, 0x65, 0x72, 0x73, 0x8a, 0xb5, 0x18, 0x18, 0x12, 0x16, 0x69, 0x6e, 0x66, 0x72, 0x61, + 0x3a, 0x69, 0x6e, 0x66, 0x72, 0x61, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x73, 0x3a, 0x67, 0x65, + 0x74, 0x12, 0xd8, 0x02, 0x0a, 0x0f, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x4d, 0x69, 0x67, 0x72, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x48, 0x2e, 0x63, 0x68, 0x65, 0x66, 0x2e, 0x61, 0x75, 0x74, + 0x6f, 0x6d, 0x61, 0x74, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x69, 0x6e, 0x66, 0x72, 0x61, 0x5f, + 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x6d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x2e, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x4d, + 0x69, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x4a, 0x2e, 0x63, 0x68, 0x65, 0x66, 0x2e, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x61, 0x74, 0x65, 0x2e, + 0x61, 0x70, 0x69, 0x2e, 0x69, 0x6e, 0x66, 0x72, 0x61, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, + 0x6d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x72, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x2e, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x4d, 0x69, 0x67, 0x72, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xae, 0x01, 0x82, 0xd3, + 0xe4, 0x93, 0x02, 0x4e, 0x12, 0x4c, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x30, 0x2f, 0x69, 0x6e, + 0x66, 0x72, 0x61, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x73, 0x2f, 0x7b, 0x73, 0x65, 0x72, + 0x76, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x7d, 0x2f, 0x6d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x2f, 0x63, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x5f, 0x6d, 0x69, 0x67, 0x72, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x2f, 0x7b, 0x6d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, + 0x64, 0x7d, 0x8a, 0xb5, 0x18, 0x3a, 0x0a, 0x38, 0x69, 0x6e, 0x66, 0x72, 0x61, 0x3a, 0x69, 0x6e, + 0x66, 0x72, 0x61, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x73, 0x3a, 0x7b, 0x73, 0x65, 0x72, 0x76, + 0x65, 0x72, 0x5f, 0x69, 0x64, 0x7d, 0x3a, 0x6d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x3a, 0x7b, 0x6d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x7d, + 0x8a, 0xb5, 0x18, 0x18, 0x12, 0x16, 0x69, 0x6e, 0x66, 0x72, 0x61, 0x3a, 0x69, 0x6e, 0x66, 0x72, + 0x61, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x73, 0x3a, 0x67, 0x65, 0x74, 0x12, 0xb5, 0x02, 0x0a, + 0x0d, 0x47, 0x65, 0x74, 0x53, 0x74, 0x61, 0x67, 0x65, 0x64, 0x44, 0x61, 0x74, 0x61, 0x12, 0x46, 0x2e, 0x63, 0x68, 0x65, 0x66, 0x2e, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x61, 0x74, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x69, 0x6e, 0x66, 0x72, 0x61, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x6d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x2e, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x4d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x4a, 0x2e, 0x63, 0x68, 0x65, 0x66, 0x2e, - 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x61, 0x74, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x69, 0x6e, 0x66, - 0x72, 0x61, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x6d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x73, 0x2e, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x43, 0x61, 0x6e, - 0x63, 0x65, 0x6c, 0x4d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xae, 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x4e, 0x12, 0x4c, 0x2f, - 0x61, 0x70, 0x69, 0x2f, 0x76, 0x30, 0x2f, 0x69, 0x6e, 0x66, 0x72, 0x61, 0x2f, 0x73, 0x65, 0x72, - 0x76, 0x65, 0x72, 0x73, 0x2f, 0x7b, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x7d, - 0x2f, 0x6d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x63, 0x61, 0x6e, 0x63, - 0x65, 0x6c, 0x5f, 0x6d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x7b, 0x6d, 0x69, - 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x7d, 0x8a, 0xb5, 0x18, 0x3a, 0x0a, - 0x38, 0x69, 0x6e, 0x66, 0x72, 0x61, 0x3a, 0x69, 0x6e, 0x66, 0x72, 0x61, 0x53, 0x65, 0x72, 0x76, - 0x65, 0x72, 0x73, 0x3a, 0x7b, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x7d, 0x3a, - 0x6d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x3a, 0x7b, 0x6d, 0x69, 0x67, 0x72, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x7d, 0x8a, 0xb5, 0x18, 0x18, 0x12, 0x16, 0x69, - 0x6e, 0x66, 0x72, 0x61, 0x3a, 0x69, 0x6e, 0x66, 0x72, 0x61, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, - 0x73, 0x3a, 0x67, 0x65, 0x74, 0x12, 0xb5, 0x02, 0x0a, 0x0d, 0x47, 0x65, 0x74, 0x53, 0x74, 0x61, - 0x67, 0x65, 0x64, 0x44, 0x61, 0x74, 0x61, 0x12, 0x46, 0x2e, 0x63, 0x68, 0x65, 0x66, 0x2e, 0x61, + 0x74, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x74, 0x61, 0x67, 0x65, 0x64, 0x44, 0x61, 0x74, 0x61, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x48, 0x2e, 0x63, 0x68, 0x65, 0x66, 0x2e, 0x61, 0x75, + 0x74, 0x6f, 0x6d, 0x61, 0x74, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x69, 0x6e, 0x66, 0x72, 0x61, + 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x6d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x2e, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x74, + 0x61, 0x67, 0x65, 0x64, 0x44, 0x61, 0x74, 0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x22, 0x91, 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x3d, 0x12, 0x3b, 0x2f, 0x61, 0x70, 0x69, 0x2f, + 0x76, 0x30, 0x2f, 0x69, 0x6e, 0x66, 0x72, 0x61, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x73, + 0x2f, 0x6d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x67, + 0x65, 0x64, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x2f, 0x7b, 0x6d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x7d, 0x8a, 0xb5, 0x18, 0x2e, 0x0a, 0x2c, 0x69, 0x6e, 0x66, 0x72, + 0x61, 0x3a, 0x69, 0x6e, 0x66, 0x72, 0x61, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x73, 0x3a, 0x6d, + 0x69, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x3a, 0x7b, 0x6d, 0x69, 0x67, 0x72, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x7d, 0x8a, 0xb5, 0x18, 0x18, 0x12, 0x16, 0x69, 0x6e, + 0x66, 0x72, 0x61, 0x3a, 0x69, 0x6e, 0x66, 0x72, 0x61, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x73, + 0x3a, 0x67, 0x65, 0x74, 0x12, 0xc5, 0x02, 0x0a, 0x0e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x72, 0x6d, + 0x50, 0x72, 0x65, 0x76, 0x69, 0x65, 0x77, 0x12, 0x40, 0x2e, 0x63, 0x68, 0x65, 0x66, 0x2e, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x61, 0x74, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x69, 0x6e, 0x66, 0x72, 0x61, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x6d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x73, 0x2e, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x74, - 0x61, 0x67, 0x65, 0x64, 0x44, 0x61, 0x74, 0x61, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x48, 0x2e, 0x63, 0x68, 0x65, 0x66, 0x2e, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x61, 0x74, 0x65, 0x2e, - 0x61, 0x70, 0x69, 0x2e, 0x69, 0x6e, 0x66, 0x72, 0x61, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, - 0x6d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x72, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x74, 0x61, 0x67, 0x65, 0x64, 0x44, 0x61, 0x74, - 0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x91, 0x01, 0x82, 0xd3, 0xe4, 0x93, - 0x02, 0x3d, 0x12, 0x3b, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x30, 0x2f, 0x69, 0x6e, 0x66, 0x72, - 0x61, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x73, 0x2f, 0x6d, 0x69, 0x67, 0x72, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x67, 0x65, 0x64, 0x5f, 0x64, 0x61, 0x74, 0x61, - 0x2f, 0x7b, 0x6d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x7d, 0x8a, - 0xb5, 0x18, 0x2e, 0x0a, 0x2c, 0x69, 0x6e, 0x66, 0x72, 0x61, 0x3a, 0x69, 0x6e, 0x66, 0x72, 0x61, - 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x73, 0x3a, 0x6d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x73, 0x3a, 0x7b, 0x6d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, - 0x7d, 0x8a, 0xb5, 0x18, 0x18, 0x12, 0x16, 0x69, 0x6e, 0x66, 0x72, 0x61, 0x3a, 0x69, 0x6e, 0x66, - 0x72, 0x61, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x73, 0x3a, 0x67, 0x65, 0x74, 0x12, 0xc5, 0x02, - 0x0a, 0x0e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x72, 0x6d, 0x50, 0x72, 0x65, 0x76, 0x69, 0x65, 0x77, - 0x12, 0x40, 0x2e, 0x63, 0x68, 0x65, 0x66, 0x2e, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x61, 0x74, 0x65, - 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x69, 0x6e, 0x66, 0x72, 0x61, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, - 0x2e, 0x6d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x72, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x72, 0x6d, 0x50, 0x72, 0x65, 0x76, 0x69, - 0x65, 0x77, 0x1a, 0x41, 0x2e, 0x63, 0x68, 0x65, 0x66, 0x2e, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x61, - 0x74, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x69, 0x6e, 0x66, 0x72, 0x61, 0x5f, 0x70, 0x72, 0x6f, - 0x78, 0x79, 0x2e, 0x6d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x72, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x72, 0x6d, 0x50, 0x72, - 0x65, 0x76, 0x69, 0x65, 0x77, 0x22, 0xad, 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x4d, 0x12, 0x4b, - 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x30, 0x2f, 0x69, 0x6e, 0x66, 0x72, 0x61, 0x2f, 0x73, 0x65, - 0x72, 0x76, 0x65, 0x72, 0x73, 0x2f, 0x7b, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x5f, 0x69, 0x64, - 0x7d, 0x2f, 0x6d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x63, 0x6f, 0x6e, - 0x66, 0x69, 0x72, 0x6d, 0x5f, 0x70, 0x72, 0x65, 0x76, 0x69, 0x65, 0x77, 0x2f, 0x7b, 0x6d, 0x69, - 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x7d, 0x8a, 0xb5, 0x18, 0x3a, 0x0a, - 0x38, 0x69, 0x6e, 0x66, 0x72, 0x61, 0x3a, 0x69, 0x6e, 0x66, 0x72, 0x61, 0x53, 0x65, 0x72, 0x76, - 0x65, 0x72, 0x73, 0x3a, 0x7b, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x7d, 0x3a, - 0x6d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x3a, 0x7b, 0x6d, 0x69, 0x67, 0x72, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x7d, 0x8a, 0xb5, 0x18, 0x18, 0x12, 0x16, 0x69, - 0x6e, 0x66, 0x72, 0x61, 0x3a, 0x69, 0x6e, 0x66, 0x72, 0x61, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, - 0x73, 0x3a, 0x67, 0x65, 0x74, 0x42, 0x3e, 0x5a, 0x3c, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, - 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x68, 0x65, 0x66, 0x2f, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x61, 0x74, - 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2f, 0x69, - 0x6e, 0x66, 0x72, 0x61, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x6d, 0x69, 0x67, 0x72, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x6e, 0x73, 0x2e, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x69, + 0x72, 0x6d, 0x50, 0x72, 0x65, 0x76, 0x69, 0x65, 0x77, 0x1a, 0x41, 0x2e, 0x63, 0x68, 0x65, 0x66, + 0x2e, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x61, 0x74, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x69, 0x6e, + 0x66, 0x72, 0x61, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x6d, 0x69, 0x67, 0x72, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x43, 0x6f, + 0x6e, 0x66, 0x69, 0x72, 0x6d, 0x50, 0x72, 0x65, 0x76, 0x69, 0x65, 0x77, 0x22, 0xad, 0x01, 0x82, + 0xd3, 0xe4, 0x93, 0x02, 0x4d, 0x12, 0x4b, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x30, 0x2f, 0x69, + 0x6e, 0x66, 0x72, 0x61, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x73, 0x2f, 0x7b, 0x73, 0x65, + 0x72, 0x76, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x7d, 0x2f, 0x6d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x72, 0x6d, 0x5f, 0x70, 0x72, 0x65, 0x76, + 0x69, 0x65, 0x77, 0x2f, 0x7b, 0x6d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, + 0x64, 0x7d, 0x8a, 0xb5, 0x18, 0x3a, 0x0a, 0x38, 0x69, 0x6e, 0x66, 0x72, 0x61, 0x3a, 0x69, 0x6e, + 0x66, 0x72, 0x61, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x73, 0x3a, 0x7b, 0x73, 0x65, 0x72, 0x76, + 0x65, 0x72, 0x5f, 0x69, 0x64, 0x7d, 0x3a, 0x6d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x3a, 0x7b, 0x6d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x7d, + 0x8a, 0xb5, 0x18, 0x18, 0x12, 0x16, 0x69, 0x6e, 0x66, 0x72, 0x61, 0x3a, 0x69, 0x6e, 0x66, 0x72, + 0x61, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x73, 0x3a, 0x67, 0x65, 0x74, 0x42, 0x3e, 0x5a, 0x3c, + 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x68, 0x65, 0x66, 0x2f, + 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x61, 0x74, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x65, 0x78, 0x74, + 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2f, 0x69, 0x6e, 0x66, 0x72, 0x61, 0x5f, 0x70, 0x72, 0x6f, 0x78, + 0x79, 0x2f, 0x6d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x62, 0x06, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x33, } var file_external_infra_proxy_migrations_migrations_proto_goTypes = []interface{}{ @@ -152,14 +153,14 @@ var file_external_infra_proxy_migrations_migrations_proto_goTypes = []interface{ (*response.ConfirmPreview)(nil), // 7: chef.automate.api.infra_proxy.migrations.response.ConfirmPreview } var file_external_infra_proxy_migrations_migrations_proto_depIdxs = []int32{ - 0, // 0: chef.automate.api.infra_proxy.migrations.InfraProxyMigration.GetMigrationStatus:input_type -> chef.automate.api.infra_proxy.migrations.request.GetMigrationStatusRequest - 1, // 1: chef.automate.api.infra_proxy.migrations.InfraProxyMigration.CancelMigration:input_type -> chef.automate.api.infra_proxy.migrations.request.CancelMigrationRequest - 2, // 2: chef.automate.api.infra_proxy.migrations.InfraProxyMigration.GetStagedData:input_type -> chef.automate.api.infra_proxy.migrations.request.GetStagedDataRequest - 3, // 3: chef.automate.api.infra_proxy.migrations.InfraProxyMigration.ConfirmPreview:input_type -> chef.automate.api.infra_proxy.migrations.request.ConfirmPreview - 4, // 4: chef.automate.api.infra_proxy.migrations.InfraProxyMigration.GetMigrationStatus:output_type -> chef.automate.api.infra_proxy.migrations.response.GetMigrationStatusResponse - 5, // 5: chef.automate.api.infra_proxy.migrations.InfraProxyMigration.CancelMigration:output_type -> chef.automate.api.infra_proxy.migrations.response.CancelMigrationResponse - 6, // 6: chef.automate.api.infra_proxy.migrations.InfraProxyMigration.GetStagedData:output_type -> chef.automate.api.infra_proxy.migrations.response.GetStagedDataResponse - 7, // 7: chef.automate.api.infra_proxy.migrations.InfraProxyMigration.ConfirmPreview:output_type -> chef.automate.api.infra_proxy.migrations.response.ConfirmPreview + 0, // 0: chef.automate.api.infra_proxy.migrations.InfraProxyMigrationService.GetMigrationStatus:input_type -> chef.automate.api.infra_proxy.migrations.request.GetMigrationStatusRequest + 1, // 1: chef.automate.api.infra_proxy.migrations.InfraProxyMigrationService.CancelMigration:input_type -> chef.automate.api.infra_proxy.migrations.request.CancelMigrationRequest + 2, // 2: chef.automate.api.infra_proxy.migrations.InfraProxyMigrationService.GetStagedData:input_type -> chef.automate.api.infra_proxy.migrations.request.GetStagedDataRequest + 3, // 3: chef.automate.api.infra_proxy.migrations.InfraProxyMigrationService.ConfirmPreview:input_type -> chef.automate.api.infra_proxy.migrations.request.ConfirmPreview + 4, // 4: chef.automate.api.infra_proxy.migrations.InfraProxyMigrationService.GetMigrationStatus:output_type -> chef.automate.api.infra_proxy.migrations.response.GetMigrationStatusResponse + 5, // 5: chef.automate.api.infra_proxy.migrations.InfraProxyMigrationService.CancelMigration:output_type -> chef.automate.api.infra_proxy.migrations.response.CancelMigrationResponse + 6, // 6: chef.automate.api.infra_proxy.migrations.InfraProxyMigrationService.GetStagedData:output_type -> chef.automate.api.infra_proxy.migrations.response.GetStagedDataResponse + 7, // 7: chef.automate.api.infra_proxy.migrations.InfraProxyMigrationService.ConfirmPreview:output_type -> chef.automate.api.infra_proxy.migrations.response.ConfirmPreview 4, // [4:8] is the sub-list for method output_type 0, // [0:4] is the sub-list for method input_type 0, // [0:0] is the sub-list for extension type_name @@ -199,180 +200,180 @@ var _ grpc.ClientConnInterface // is compatible with the grpc package it is being compiled against. const _ = grpc.SupportPackageIsVersion6 -// InfraProxyMigrationClient is the client API for InfraProxyMigration service. +// InfraProxyMigrationServiceClient is the client API for InfraProxyMigrationService service. // // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. -type InfraProxyMigrationClient interface { +type InfraProxyMigrationServiceClient interface { GetMigrationStatus(ctx context.Context, in *request.GetMigrationStatusRequest, opts ...grpc.CallOption) (*response.GetMigrationStatusResponse, error) CancelMigration(ctx context.Context, in *request.CancelMigrationRequest, opts ...grpc.CallOption) (*response.CancelMigrationResponse, error) GetStagedData(ctx context.Context, in *request.GetStagedDataRequest, opts ...grpc.CallOption) (*response.GetStagedDataResponse, error) ConfirmPreview(ctx context.Context, in *request.ConfirmPreview, opts ...grpc.CallOption) (*response.ConfirmPreview, error) } -type infraProxyMigrationClient struct { +type infraProxyMigrationServiceClient struct { cc grpc.ClientConnInterface } -func NewInfraProxyMigrationClient(cc grpc.ClientConnInterface) InfraProxyMigrationClient { - return &infraProxyMigrationClient{cc} +func NewInfraProxyMigrationServiceClient(cc grpc.ClientConnInterface) InfraProxyMigrationServiceClient { + return &infraProxyMigrationServiceClient{cc} } -func (c *infraProxyMigrationClient) GetMigrationStatus(ctx context.Context, in *request.GetMigrationStatusRequest, opts ...grpc.CallOption) (*response.GetMigrationStatusResponse, error) { +func (c *infraProxyMigrationServiceClient) GetMigrationStatus(ctx context.Context, in *request.GetMigrationStatusRequest, opts ...grpc.CallOption) (*response.GetMigrationStatusResponse, error) { out := new(response.GetMigrationStatusResponse) - err := c.cc.Invoke(ctx, "/chef.automate.api.infra_proxy.migrations.InfraProxyMigration/GetMigrationStatus", in, out, opts...) + err := c.cc.Invoke(ctx, "/chef.automate.api.infra_proxy.migrations.InfraProxyMigrationService/GetMigrationStatus", in, out, opts...) if err != nil { return nil, err } return out, nil } -func (c *infraProxyMigrationClient) CancelMigration(ctx context.Context, in *request.CancelMigrationRequest, opts ...grpc.CallOption) (*response.CancelMigrationResponse, error) { +func (c *infraProxyMigrationServiceClient) CancelMigration(ctx context.Context, in *request.CancelMigrationRequest, opts ...grpc.CallOption) (*response.CancelMigrationResponse, error) { out := new(response.CancelMigrationResponse) - err := c.cc.Invoke(ctx, "/chef.automate.api.infra_proxy.migrations.InfraProxyMigration/CancelMigration", in, out, opts...) + err := c.cc.Invoke(ctx, "/chef.automate.api.infra_proxy.migrations.InfraProxyMigrationService/CancelMigration", in, out, opts...) if err != nil { return nil, err } return out, nil } -func (c *infraProxyMigrationClient) GetStagedData(ctx context.Context, in *request.GetStagedDataRequest, opts ...grpc.CallOption) (*response.GetStagedDataResponse, error) { +func (c *infraProxyMigrationServiceClient) GetStagedData(ctx context.Context, in *request.GetStagedDataRequest, opts ...grpc.CallOption) (*response.GetStagedDataResponse, error) { out := new(response.GetStagedDataResponse) - err := c.cc.Invoke(ctx, "/chef.automate.api.infra_proxy.migrations.InfraProxyMigration/GetStagedData", in, out, opts...) + err := c.cc.Invoke(ctx, "/chef.automate.api.infra_proxy.migrations.InfraProxyMigrationService/GetStagedData", in, out, opts...) if err != nil { return nil, err } return out, nil } -func (c *infraProxyMigrationClient) ConfirmPreview(ctx context.Context, in *request.ConfirmPreview, opts ...grpc.CallOption) (*response.ConfirmPreview, error) { +func (c *infraProxyMigrationServiceClient) ConfirmPreview(ctx context.Context, in *request.ConfirmPreview, opts ...grpc.CallOption) (*response.ConfirmPreview, error) { out := new(response.ConfirmPreview) - err := c.cc.Invoke(ctx, "/chef.automate.api.infra_proxy.migrations.InfraProxyMigration/ConfirmPreview", in, out, opts...) + err := c.cc.Invoke(ctx, "/chef.automate.api.infra_proxy.migrations.InfraProxyMigrationService/ConfirmPreview", in, out, opts...) if err != nil { return nil, err } return out, nil } -// InfraProxyMigrationServer is the server API for InfraProxyMigration service. -type InfraProxyMigrationServer interface { +// InfraProxyMigrationServiceServer is the server API for InfraProxyMigrationService service. +type InfraProxyMigrationServiceServer interface { GetMigrationStatus(context.Context, *request.GetMigrationStatusRequest) (*response.GetMigrationStatusResponse, error) CancelMigration(context.Context, *request.CancelMigrationRequest) (*response.CancelMigrationResponse, error) GetStagedData(context.Context, *request.GetStagedDataRequest) (*response.GetStagedDataResponse, error) ConfirmPreview(context.Context, *request.ConfirmPreview) (*response.ConfirmPreview, error) } -// UnimplementedInfraProxyMigrationServer can be embedded to have forward compatible implementations. -type UnimplementedInfraProxyMigrationServer struct { +// UnimplementedInfraProxyMigrationServiceServer can be embedded to have forward compatible implementations. +type UnimplementedInfraProxyMigrationServiceServer struct { } -func (*UnimplementedInfraProxyMigrationServer) GetMigrationStatus(context.Context, *request.GetMigrationStatusRequest) (*response.GetMigrationStatusResponse, error) { +func (*UnimplementedInfraProxyMigrationServiceServer) GetMigrationStatus(context.Context, *request.GetMigrationStatusRequest) (*response.GetMigrationStatusResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method GetMigrationStatus not implemented") } -func (*UnimplementedInfraProxyMigrationServer) CancelMigration(context.Context, *request.CancelMigrationRequest) (*response.CancelMigrationResponse, error) { +func (*UnimplementedInfraProxyMigrationServiceServer) CancelMigration(context.Context, *request.CancelMigrationRequest) (*response.CancelMigrationResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method CancelMigration not implemented") } -func (*UnimplementedInfraProxyMigrationServer) GetStagedData(context.Context, *request.GetStagedDataRequest) (*response.GetStagedDataResponse, error) { +func (*UnimplementedInfraProxyMigrationServiceServer) GetStagedData(context.Context, *request.GetStagedDataRequest) (*response.GetStagedDataResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method GetStagedData not implemented") } -func (*UnimplementedInfraProxyMigrationServer) ConfirmPreview(context.Context, *request.ConfirmPreview) (*response.ConfirmPreview, error) { +func (*UnimplementedInfraProxyMigrationServiceServer) ConfirmPreview(context.Context, *request.ConfirmPreview) (*response.ConfirmPreview, error) { return nil, status.Errorf(codes.Unimplemented, "method ConfirmPreview not implemented") } -func RegisterInfraProxyMigrationServer(s *grpc.Server, srv InfraProxyMigrationServer) { - s.RegisterService(&_InfraProxyMigration_serviceDesc, srv) +func RegisterInfraProxyMigrationServiceServer(s *grpc.Server, srv InfraProxyMigrationServiceServer) { + s.RegisterService(&_InfraProxyMigrationService_serviceDesc, srv) } -func _InfraProxyMigration_GetMigrationStatus_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { +func _InfraProxyMigrationService_GetMigrationStatus_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(request.GetMigrationStatusRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(InfraProxyMigrationServer).GetMigrationStatus(ctx, in) + return srv.(InfraProxyMigrationServiceServer).GetMigrationStatus(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/chef.automate.api.infra_proxy.migrations.InfraProxyMigration/GetMigrationStatus", + FullMethod: "/chef.automate.api.infra_proxy.migrations.InfraProxyMigrationService/GetMigrationStatus", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(InfraProxyMigrationServer).GetMigrationStatus(ctx, req.(*request.GetMigrationStatusRequest)) + return srv.(InfraProxyMigrationServiceServer).GetMigrationStatus(ctx, req.(*request.GetMigrationStatusRequest)) } return interceptor(ctx, in, info, handler) } -func _InfraProxyMigration_CancelMigration_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { +func _InfraProxyMigrationService_CancelMigration_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(request.CancelMigrationRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(InfraProxyMigrationServer).CancelMigration(ctx, in) + return srv.(InfraProxyMigrationServiceServer).CancelMigration(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/chef.automate.api.infra_proxy.migrations.InfraProxyMigration/CancelMigration", + FullMethod: "/chef.automate.api.infra_proxy.migrations.InfraProxyMigrationService/CancelMigration", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(InfraProxyMigrationServer).CancelMigration(ctx, req.(*request.CancelMigrationRequest)) + return srv.(InfraProxyMigrationServiceServer).CancelMigration(ctx, req.(*request.CancelMigrationRequest)) } return interceptor(ctx, in, info, handler) } -func _InfraProxyMigration_GetStagedData_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { +func _InfraProxyMigrationService_GetStagedData_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(request.GetStagedDataRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(InfraProxyMigrationServer).GetStagedData(ctx, in) + return srv.(InfraProxyMigrationServiceServer).GetStagedData(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/chef.automate.api.infra_proxy.migrations.InfraProxyMigration/GetStagedData", + FullMethod: "/chef.automate.api.infra_proxy.migrations.InfraProxyMigrationService/GetStagedData", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(InfraProxyMigrationServer).GetStagedData(ctx, req.(*request.GetStagedDataRequest)) + return srv.(InfraProxyMigrationServiceServer).GetStagedData(ctx, req.(*request.GetStagedDataRequest)) } return interceptor(ctx, in, info, handler) } -func _InfraProxyMigration_ConfirmPreview_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { +func _InfraProxyMigrationService_ConfirmPreview_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(request.ConfirmPreview) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(InfraProxyMigrationServer).ConfirmPreview(ctx, in) + return srv.(InfraProxyMigrationServiceServer).ConfirmPreview(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/chef.automate.api.infra_proxy.migrations.InfraProxyMigration/ConfirmPreview", + FullMethod: "/chef.automate.api.infra_proxy.migrations.InfraProxyMigrationService/ConfirmPreview", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(InfraProxyMigrationServer).ConfirmPreview(ctx, req.(*request.ConfirmPreview)) + return srv.(InfraProxyMigrationServiceServer).ConfirmPreview(ctx, req.(*request.ConfirmPreview)) } return interceptor(ctx, in, info, handler) } -var _InfraProxyMigration_serviceDesc = grpc.ServiceDesc{ - ServiceName: "chef.automate.api.infra_proxy.migrations.InfraProxyMigration", - HandlerType: (*InfraProxyMigrationServer)(nil), +var _InfraProxyMigrationService_serviceDesc = grpc.ServiceDesc{ + ServiceName: "chef.automate.api.infra_proxy.migrations.InfraProxyMigrationService", + HandlerType: (*InfraProxyMigrationServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "GetMigrationStatus", - Handler: _InfraProxyMigration_GetMigrationStatus_Handler, + Handler: _InfraProxyMigrationService_GetMigrationStatus_Handler, }, { MethodName: "CancelMigration", - Handler: _InfraProxyMigration_CancelMigration_Handler, + Handler: _InfraProxyMigrationService_CancelMigration_Handler, }, { MethodName: "GetStagedData", - Handler: _InfraProxyMigration_GetStagedData_Handler, + Handler: _InfraProxyMigrationService_GetStagedData_Handler, }, { MethodName: "ConfirmPreview", - Handler: _InfraProxyMigration_ConfirmPreview_Handler, + Handler: _InfraProxyMigrationService_ConfirmPreview_Handler, }, }, Streams: []grpc.StreamDesc{}, diff --git a/api/external/infra_proxy/migrations/migrations.pb.gw.go b/api/external/infra_proxy/migrations/migrations.pb.gw.go index 0c27481b5aa..5f8ec30dffa 100644 --- a/api/external/infra_proxy/migrations/migrations.pb.gw.go +++ b/api/external/infra_proxy/migrations/migrations.pb.gw.go @@ -32,7 +32,7 @@ var _ = runtime.String var _ = utilities.NewDoubleArray var _ = descriptor.ForMessage -func request_InfraProxyMigration_GetMigrationStatus_0(ctx context.Context, marshaler runtime.Marshaler, client InfraProxyMigrationClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { +func request_InfraProxyMigrationService_GetMigrationStatus_0(ctx context.Context, marshaler runtime.Marshaler, client InfraProxyMigrationServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq request.GetMigrationStatusRequest var metadata runtime.ServerMetadata @@ -59,7 +59,7 @@ func request_InfraProxyMigration_GetMigrationStatus_0(ctx context.Context, marsh } -func local_request_InfraProxyMigration_GetMigrationStatus_0(ctx context.Context, marshaler runtime.Marshaler, server InfraProxyMigrationServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { +func local_request_InfraProxyMigrationService_GetMigrationStatus_0(ctx context.Context, marshaler runtime.Marshaler, server InfraProxyMigrationServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq request.GetMigrationStatusRequest var metadata runtime.ServerMetadata @@ -86,7 +86,7 @@ func local_request_InfraProxyMigration_GetMigrationStatus_0(ctx context.Context, } -func request_InfraProxyMigration_CancelMigration_0(ctx context.Context, marshaler runtime.Marshaler, client InfraProxyMigrationClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { +func request_InfraProxyMigrationService_CancelMigration_0(ctx context.Context, marshaler runtime.Marshaler, client InfraProxyMigrationServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq request.CancelMigrationRequest var metadata runtime.ServerMetadata @@ -124,7 +124,7 @@ func request_InfraProxyMigration_CancelMigration_0(ctx context.Context, marshale } -func local_request_InfraProxyMigration_CancelMigration_0(ctx context.Context, marshaler runtime.Marshaler, server InfraProxyMigrationServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { +func local_request_InfraProxyMigrationService_CancelMigration_0(ctx context.Context, marshaler runtime.Marshaler, server InfraProxyMigrationServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq request.CancelMigrationRequest var metadata runtime.ServerMetadata @@ -162,7 +162,7 @@ func local_request_InfraProxyMigration_CancelMigration_0(ctx context.Context, ma } -func request_InfraProxyMigration_GetStagedData_0(ctx context.Context, marshaler runtime.Marshaler, client InfraProxyMigrationClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { +func request_InfraProxyMigrationService_GetStagedData_0(ctx context.Context, marshaler runtime.Marshaler, client InfraProxyMigrationServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq request.GetStagedDataRequest var metadata runtime.ServerMetadata @@ -189,7 +189,7 @@ func request_InfraProxyMigration_GetStagedData_0(ctx context.Context, marshaler } -func local_request_InfraProxyMigration_GetStagedData_0(ctx context.Context, marshaler runtime.Marshaler, server InfraProxyMigrationServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { +func local_request_InfraProxyMigrationService_GetStagedData_0(ctx context.Context, marshaler runtime.Marshaler, server InfraProxyMigrationServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq request.GetStagedDataRequest var metadata runtime.ServerMetadata @@ -216,7 +216,7 @@ func local_request_InfraProxyMigration_GetStagedData_0(ctx context.Context, mars } -func request_InfraProxyMigration_ConfirmPreview_0(ctx context.Context, marshaler runtime.Marshaler, client InfraProxyMigrationClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { +func request_InfraProxyMigrationService_ConfirmPreview_0(ctx context.Context, marshaler runtime.Marshaler, client InfraProxyMigrationServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq request.ConfirmPreview var metadata runtime.ServerMetadata @@ -254,7 +254,7 @@ func request_InfraProxyMigration_ConfirmPreview_0(ctx context.Context, marshaler } -func local_request_InfraProxyMigration_ConfirmPreview_0(ctx context.Context, marshaler runtime.Marshaler, server InfraProxyMigrationServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { +func local_request_InfraProxyMigrationService_ConfirmPreview_0(ctx context.Context, marshaler runtime.Marshaler, server InfraProxyMigrationServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq request.ConfirmPreview var metadata runtime.ServerMetadata @@ -292,12 +292,12 @@ func local_request_InfraProxyMigration_ConfirmPreview_0(ctx context.Context, mar } -// RegisterInfraProxyMigrationHandlerServer registers the http handlers for service InfraProxyMigration to "mux". -// UnaryRPC :call InfraProxyMigrationServer directly. +// RegisterInfraProxyMigrationServiceHandlerServer registers the http handlers for service InfraProxyMigrationService to "mux". +// UnaryRPC :call InfraProxyMigrationServiceServer directly. // StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. -func RegisterInfraProxyMigrationHandlerServer(ctx context.Context, mux *runtime.ServeMux, server InfraProxyMigrationServer) error { +func RegisterInfraProxyMigrationServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server InfraProxyMigrationServiceServer) error { - mux.Handle("GET", pattern_InfraProxyMigration_GetMigrationStatus_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("GET", pattern_InfraProxyMigrationService_GetMigrationStatus_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) @@ -306,18 +306,18 @@ func RegisterInfraProxyMigrationHandlerServer(ctx context.Context, mux *runtime. runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_InfraProxyMigration_GetMigrationStatus_0(rctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_InfraProxyMigrationService_GetMigrationStatus_0(rctx, inboundMarshaler, server, req, pathParams) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_InfraProxyMigration_GetMigrationStatus_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_InfraProxyMigrationService_GetMigrationStatus_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - mux.Handle("GET", pattern_InfraProxyMigration_CancelMigration_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("GET", pattern_InfraProxyMigrationService_CancelMigration_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) @@ -326,18 +326,18 @@ func RegisterInfraProxyMigrationHandlerServer(ctx context.Context, mux *runtime. runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_InfraProxyMigration_CancelMigration_0(rctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_InfraProxyMigrationService_CancelMigration_0(rctx, inboundMarshaler, server, req, pathParams) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_InfraProxyMigration_CancelMigration_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_InfraProxyMigrationService_CancelMigration_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - mux.Handle("GET", pattern_InfraProxyMigration_GetStagedData_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("GET", pattern_InfraProxyMigrationService_GetStagedData_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) @@ -346,18 +346,18 @@ func RegisterInfraProxyMigrationHandlerServer(ctx context.Context, mux *runtime. runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_InfraProxyMigration_GetStagedData_0(rctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_InfraProxyMigrationService_GetStagedData_0(rctx, inboundMarshaler, server, req, pathParams) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_InfraProxyMigration_GetStagedData_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_InfraProxyMigrationService_GetStagedData_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - mux.Handle("GET", pattern_InfraProxyMigration_ConfirmPreview_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("GET", pattern_InfraProxyMigrationService_ConfirmPreview_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) @@ -366,23 +366,23 @@ func RegisterInfraProxyMigrationHandlerServer(ctx context.Context, mux *runtime. runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_InfraProxyMigration_ConfirmPreview_0(rctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_InfraProxyMigrationService_ConfirmPreview_0(rctx, inboundMarshaler, server, req, pathParams) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_InfraProxyMigration_ConfirmPreview_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_InfraProxyMigrationService_ConfirmPreview_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) return nil } -// RegisterInfraProxyMigrationHandlerFromEndpoint is same as RegisterInfraProxyMigrationHandler but +// RegisterInfraProxyMigrationServiceHandlerFromEndpoint is same as RegisterInfraProxyMigrationServiceHandler but // automatically dials to "endpoint" and closes the connection when "ctx" gets done. -func RegisterInfraProxyMigrationHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { +func RegisterInfraProxyMigrationServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { conn, err := grpc.Dial(endpoint, opts...) if err != nil { return err @@ -402,23 +402,23 @@ func RegisterInfraProxyMigrationHandlerFromEndpoint(ctx context.Context, mux *ru }() }() - return RegisterInfraProxyMigrationHandler(ctx, mux, conn) + return RegisterInfraProxyMigrationServiceHandler(ctx, mux, conn) } -// RegisterInfraProxyMigrationHandler registers the http handlers for service InfraProxyMigration to "mux". +// RegisterInfraProxyMigrationServiceHandler registers the http handlers for service InfraProxyMigrationService to "mux". // The handlers forward requests to the grpc endpoint over "conn". -func RegisterInfraProxyMigrationHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error { - return RegisterInfraProxyMigrationHandlerClient(ctx, mux, NewInfraProxyMigrationClient(conn)) +func RegisterInfraProxyMigrationServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error { + return RegisterInfraProxyMigrationServiceHandlerClient(ctx, mux, NewInfraProxyMigrationServiceClient(conn)) } -// RegisterInfraProxyMigrationHandlerClient registers the http handlers for service InfraProxyMigration -// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "InfraProxyMigrationClient". -// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "InfraProxyMigrationClient" +// RegisterInfraProxyMigrationServiceHandlerClient registers the http handlers for service InfraProxyMigrationService +// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "InfraProxyMigrationServiceClient". +// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "InfraProxyMigrationServiceClient" // doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in -// "InfraProxyMigrationClient" to call the correct interceptors. -func RegisterInfraProxyMigrationHandlerClient(ctx context.Context, mux *runtime.ServeMux, client InfraProxyMigrationClient) error { +// "InfraProxyMigrationServiceClient" to call the correct interceptors. +func RegisterInfraProxyMigrationServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client InfraProxyMigrationServiceClient) error { - mux.Handle("GET", pattern_InfraProxyMigration_GetMigrationStatus_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("GET", pattern_InfraProxyMigrationService_GetMigrationStatus_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) @@ -427,18 +427,18 @@ func RegisterInfraProxyMigrationHandlerClient(ctx context.Context, mux *runtime. runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_InfraProxyMigration_GetMigrationStatus_0(rctx, inboundMarshaler, client, req, pathParams) + resp, md, err := request_InfraProxyMigrationService_GetMigrationStatus_0(rctx, inboundMarshaler, client, req, pathParams) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_InfraProxyMigration_GetMigrationStatus_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_InfraProxyMigrationService_GetMigrationStatus_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - mux.Handle("GET", pattern_InfraProxyMigration_CancelMigration_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("GET", pattern_InfraProxyMigrationService_CancelMigration_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) @@ -447,18 +447,18 @@ func RegisterInfraProxyMigrationHandlerClient(ctx context.Context, mux *runtime. runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_InfraProxyMigration_CancelMigration_0(rctx, inboundMarshaler, client, req, pathParams) + resp, md, err := request_InfraProxyMigrationService_CancelMigration_0(rctx, inboundMarshaler, client, req, pathParams) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_InfraProxyMigration_CancelMigration_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_InfraProxyMigrationService_CancelMigration_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - mux.Handle("GET", pattern_InfraProxyMigration_GetStagedData_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("GET", pattern_InfraProxyMigrationService_GetStagedData_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) @@ -467,18 +467,18 @@ func RegisterInfraProxyMigrationHandlerClient(ctx context.Context, mux *runtime. runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_InfraProxyMigration_GetStagedData_0(rctx, inboundMarshaler, client, req, pathParams) + resp, md, err := request_InfraProxyMigrationService_GetStagedData_0(rctx, inboundMarshaler, client, req, pathParams) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_InfraProxyMigration_GetStagedData_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_InfraProxyMigrationService_GetStagedData_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - mux.Handle("GET", pattern_InfraProxyMigration_ConfirmPreview_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("GET", pattern_InfraProxyMigrationService_ConfirmPreview_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) @@ -487,14 +487,14 @@ func RegisterInfraProxyMigrationHandlerClient(ctx context.Context, mux *runtime. runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_InfraProxyMigration_ConfirmPreview_0(rctx, inboundMarshaler, client, req, pathParams) + resp, md, err := request_InfraProxyMigrationService_ConfirmPreview_0(rctx, inboundMarshaler, client, req, pathParams) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_InfraProxyMigration_ConfirmPreview_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_InfraProxyMigrationService_ConfirmPreview_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -502,21 +502,21 @@ func RegisterInfraProxyMigrationHandlerClient(ctx context.Context, mux *runtime. } var ( - pattern_InfraProxyMigration_GetMigrationStatus_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 2, 5, 1, 0, 4, 1, 5, 6}, []string{"api", "v0", "infra", "servers", "migrations", "status", "migration_id"}, "", runtime.AssumeColonVerbOpt(true))) + pattern_InfraProxyMigrationService_GetMigrationStatus_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 2, 5, 1, 0, 4, 1, 5, 6}, []string{"api", "v0", "infra", "servers", "migrations", "status", "migration_id"}, "", runtime.AssumeColonVerbOpt(true))) - pattern_InfraProxyMigration_CancelMigration_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4, 2, 5, 2, 6, 1, 0, 4, 1, 5, 7}, []string{"api", "v0", "infra", "servers", "server_id", "migrations", "cancel_migration", "migration_id"}, "", runtime.AssumeColonVerbOpt(true))) + pattern_InfraProxyMigrationService_CancelMigration_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4, 2, 5, 2, 6, 1, 0, 4, 1, 5, 7}, []string{"api", "v0", "infra", "servers", "server_id", "migrations", "cancel_migration", "migration_id"}, "", runtime.AssumeColonVerbOpt(true))) - pattern_InfraProxyMigration_GetStagedData_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 2, 5, 1, 0, 4, 1, 5, 6}, []string{"api", "v0", "infra", "servers", "migrations", "staged_data", "migration_id"}, "", runtime.AssumeColonVerbOpt(true))) + pattern_InfraProxyMigrationService_GetStagedData_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 2, 5, 1, 0, 4, 1, 5, 6}, []string{"api", "v0", "infra", "servers", "migrations", "staged_data", "migration_id"}, "", runtime.AssumeColonVerbOpt(true))) - pattern_InfraProxyMigration_ConfirmPreview_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4, 2, 5, 2, 6, 1, 0, 4, 1, 5, 7}, []string{"api", "v0", "infra", "servers", "server_id", "migrations", "confirm_preview", "migration_id"}, "", runtime.AssumeColonVerbOpt(true))) + pattern_InfraProxyMigrationService_ConfirmPreview_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4, 2, 5, 2, 6, 1, 0, 4, 1, 5, 7}, []string{"api", "v0", "infra", "servers", "server_id", "migrations", "confirm_preview", "migration_id"}, "", runtime.AssumeColonVerbOpt(true))) ) var ( - forward_InfraProxyMigration_GetMigrationStatus_0 = runtime.ForwardResponseMessage + forward_InfraProxyMigrationService_GetMigrationStatus_0 = runtime.ForwardResponseMessage - forward_InfraProxyMigration_CancelMigration_0 = runtime.ForwardResponseMessage + forward_InfraProxyMigrationService_CancelMigration_0 = runtime.ForwardResponseMessage - forward_InfraProxyMigration_GetStagedData_0 = runtime.ForwardResponseMessage + forward_InfraProxyMigrationService_GetStagedData_0 = runtime.ForwardResponseMessage - forward_InfraProxyMigration_ConfirmPreview_0 = runtime.ForwardResponseMessage + forward_InfraProxyMigrationService_ConfirmPreview_0 = runtime.ForwardResponseMessage ) diff --git a/api/external/infra_proxy/migrations/migrations.pb.policy.go b/api/external/infra_proxy/migrations/migrations.pb.policy.go index 620a57304da..c7635524a66 100644 --- a/api/external/infra_proxy/migrations/migrations.pb.policy.go +++ b/api/external/infra_proxy/migrations/migrations.pb.policy.go @@ -9,7 +9,7 @@ import ( ) func init() { - policy.MapMethodTo("/chef.automate.api.infra_proxy.migrations.InfraProxyMigration/GetMigrationStatus", "infra:infraServers", "infra:infraServers:get", "GET", "/api/v0/infra/servers/migrations/status/{migration_id}", func(unexpandedResource string, input interface{}) string { + policy.MapMethodTo("/chef.automate.api.infra_proxy.migrations.InfraProxyMigrationService/GetMigrationStatus", "infra:infraServers", "infra:infraServers:get", "GET", "/api/v0/infra/servers/migrations/status/{migration_id}", func(unexpandedResource string, input interface{}) string { if m, ok := input.(*request.GetMigrationStatusRequest); ok { return policy.ExpandParameterizedResource(unexpandedResource, func(want string) string { switch want { @@ -22,7 +22,7 @@ func init() { } return "" }) - policy.MapMethodTo("/chef.automate.api.infra_proxy.migrations.InfraProxyMigration/CancelMigration", "infra:infraServers:{server_id}:migrations:{migration_id}", "infra:infraServers:get", "GET", "/api/v0/infra/servers/{server_id}/migrations/cancel_migration/{migration_id}", func(unexpandedResource string, input interface{}) string { + policy.MapMethodTo("/chef.automate.api.infra_proxy.migrations.InfraProxyMigrationService/CancelMigration", "infra:infraServers:{server_id}:migrations:{migration_id}", "infra:infraServers:get", "GET", "/api/v0/infra/servers/{server_id}/migrations/cancel_migration/{migration_id}", func(unexpandedResource string, input interface{}) string { if m, ok := input.(*request.CancelMigrationRequest); ok { return policy.ExpandParameterizedResource(unexpandedResource, func(want string) string { switch want { @@ -37,7 +37,7 @@ func init() { } return "" }) - policy.MapMethodTo("/chef.automate.api.infra_proxy.migrations.InfraProxyMigration/GetStagedData", "infra:infraServers:migrations:{migration_id}", "infra:infraServers:get", "GET", "/api/v0/infra/servers/migrations/staged_data/{migration_id}", func(unexpandedResource string, input interface{}) string { + policy.MapMethodTo("/chef.automate.api.infra_proxy.migrations.InfraProxyMigrationService/GetStagedData", "infra:infraServers:migrations:{migration_id}", "infra:infraServers:get", "GET", "/api/v0/infra/servers/migrations/staged_data/{migration_id}", func(unexpandedResource string, input interface{}) string { if m, ok := input.(*request.GetStagedDataRequest); ok { return policy.ExpandParameterizedResource(unexpandedResource, func(want string) string { switch want { @@ -50,7 +50,7 @@ func init() { } return "" }) - policy.MapMethodTo("/chef.automate.api.infra_proxy.migrations.InfraProxyMigration/ConfirmPreview", "infra:infraServers:{server_id}:migrations:{migration_id}", "infra:infraServers:get", "GET", "/api/v0/infra/servers/{server_id}/migrations/confirm_preview/{migration_id}", func(unexpandedResource string, input interface{}) string { + policy.MapMethodTo("/chef.automate.api.infra_proxy.migrations.InfraProxyMigrationService/ConfirmPreview", "infra:infraServers:{server_id}:migrations:{migration_id}", "infra:infraServers:get", "GET", "/api/v0/infra/servers/{server_id}/migrations/confirm_preview/{migration_id}", func(unexpandedResource string, input interface{}) string { if m, ok := input.(*request.ConfirmPreview); ok { return policy.ExpandParameterizedResource(unexpandedResource, func(want string) string { switch want { diff --git a/api/external/infra_proxy/migrations/migrations.proto b/api/external/infra_proxy/migrations/migrations.proto index b7148b7ee51..1dba38d6924 100644 --- a/api/external/infra_proxy/migrations/migrations.proto +++ b/api/external/infra_proxy/migrations/migrations.proto @@ -9,7 +9,7 @@ import "external/annotations/iam/annotations.proto"; import "external/infra_proxy/migrations/request/migrations.proto"; import "external/infra_proxy/migrations/response/migrations.proto"; -service InfraProxyMigration { +service InfraProxyMigrationService { rpc GetMigrationStatus (infra_proxy.migrations.request.GetMigrationStatusRequest) returns (infra_proxy.migrations.response.GetMigrationStatusResponse) { option (google.api.http).get = "/api/v0/infra/servers/migrations/status/{migration_id}"; option (chef.automate.api.iam.policy).resource = "infra:infraServers"; diff --git a/api/external/infra_proxy/migrations/migrations.swagger.json b/api/external/infra_proxy/migrations/migrations.swagger.json index aedabc3fa43..a4b7fc6c6c4 100644 --- a/api/external/infra_proxy/migrations/migrations.swagger.json +++ b/api/external/infra_proxy/migrations/migrations.swagger.json @@ -13,7 +13,7 @@ "paths": { "/api/v0/infra/servers/migrations/staged_data/{migration_id}": { "get": { - "operationId": "InfraProxyMigration_GetStagedData", + "operationId": "InfraProxyMigrationService_GetStagedData", "responses": { "200": { "description": "A successful response.", @@ -38,13 +38,13 @@ } ], "tags": [ - "InfraProxyMigration" + "InfraProxyMigrationService" ] } }, "/api/v0/infra/servers/migrations/status/{migration_id}": { "get": { - "operationId": "InfraProxyMigration_GetMigrationStatus", + "operationId": "InfraProxyMigrationService_GetMigrationStatus", "responses": { "200": { "description": "A successful response.", @@ -69,13 +69,13 @@ } ], "tags": [ - "InfraProxyMigration" + "InfraProxyMigrationService" ] } }, "/api/v0/infra/servers/{server_id}/migrations/cancel_migration/{migration_id}": { "get": { - "operationId": "InfraProxyMigration_CancelMigration", + "operationId": "InfraProxyMigrationService_CancelMigration", "responses": { "200": { "description": "A successful response.", @@ -107,13 +107,13 @@ } ], "tags": [ - "InfraProxyMigration" + "InfraProxyMigrationService" ] } }, "/api/v0/infra/servers/{server_id}/migrations/confirm_preview/{migration_id}": { "get": { - "operationId": "InfraProxyMigration_ConfirmPreview", + "operationId": "InfraProxyMigrationService_ConfirmPreview", "responses": { "200": { "description": "A successful response.", @@ -145,7 +145,7 @@ } ], "tags": [ - "InfraProxyMigration" + "InfraProxyMigrationService" ] } } @@ -233,13 +233,13 @@ "users": { "type": "array", "items": { - "$ref": "#/definitions/chef.automate.api.infra_proxy.migrations.response.user" + "$ref": "#/definitions/chef.automate.api.infra_proxy.migrations.response.User" }, "title": "Users" } } }, - "chef.automate.api.infra_proxy.migrations.response.user": { + "chef.automate.api.infra_proxy.migrations.response.User": { "type": "object", "properties": { "username": { diff --git a/api/external/infra_proxy/migrations/request/migrations.pb.go b/api/external/infra_proxy/migrations/request/migrations.pb.go index e17af51c70c..6f1e980dd86 100644 --- a/api/external/infra_proxy/migrations/request/migrations.pb.go +++ b/api/external/infra_proxy/migrations/request/migrations.pb.go @@ -31,7 +31,7 @@ type UploadZipFileRequest struct { unknownFields protoimpl.UnknownFields //Chef infra server id for the file - ServerId string `protobuf:"bytes,1,opt,name=serverId,proto3" json:"serverId,omitempty"` + ServerId string `protobuf:"bytes,1,opt,name=server_id,json=serverId,proto3" json:"server_id,omitempty"` //Chunk of the data in bytes Chunk *Chunk `protobuf:"bytes,2,opt,name=chunk,proto3" json:"chunk,omitempty"` //Metadata for the request @@ -99,7 +99,7 @@ type Metadata struct { //Migration File name Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` //Content type of the request - ContentType string `protobuf:"bytes,2,opt,name=contentType,proto3" json:"contentType,omitempty"` + ContentType string `protobuf:"bytes,2,opt,name=content_type,json=contentType,proto3" json:"content_type,omitempty"` } func (x *Metadata) Reset() { @@ -425,52 +425,52 @@ var file_external_infra_proxy_migrations_request_migrations_proto_rawDesc = []by 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x30, 0x63, 0x68, 0x65, 0x66, 0x2e, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x61, 0x74, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x69, 0x6e, 0x66, 0x72, 0x61, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x6d, 0x69, 0x67, 0x72, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0xd1, 0x01, 0x0a, + 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0xd2, 0x01, 0x0a, 0x14, 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x5a, 0x69, 0x70, 0x46, 0x69, 0x6c, 0x65, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x49, - 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x49, - 0x64, 0x12, 0x4d, 0x0a, 0x05, 0x63, 0x68, 0x75, 0x6e, 0x6b, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x37, 0x2e, 0x63, 0x68, 0x65, 0x66, 0x2e, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x61, 0x74, 0x65, - 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x69, 0x6e, 0x66, 0x72, 0x61, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, - 0x2e, 0x6d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x72, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x2e, 0x43, 0x68, 0x75, 0x6e, 0x6b, 0x52, 0x05, 0x63, 0x68, 0x75, 0x6e, 0x6b, - 0x12, 0x4e, 0x0a, 0x04, 0x6d, 0x65, 0x74, 0x61, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3a, - 0x2e, 0x63, 0x68, 0x65, 0x66, 0x2e, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x61, 0x74, 0x65, 0x2e, 0x61, - 0x70, 0x69, 0x2e, 0x69, 0x6e, 0x66, 0x72, 0x61, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x6d, - 0x69, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x04, 0x6d, 0x65, 0x74, 0x61, - 0x22, 0x40, 0x0a, 0x08, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x12, 0x0a, 0x04, - 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, - 0x12, 0x20, 0x0a, 0x0b, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x54, 0x79, - 0x70, 0x65, 0x22, 0x37, 0x0a, 0x05, 0x43, 0x68, 0x75, 0x6e, 0x6b, 0x12, 0x12, 0x0a, 0x04, 0x64, - 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x12, - 0x1a, 0x0a, 0x08, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x03, 0x52, 0x08, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x3e, 0x0a, 0x19, 0x47, - 0x65, 0x74, 0x4d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, - 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x21, 0x0a, 0x0c, 0x6d, 0x69, 0x67, 0x72, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, - 0x6d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x22, 0x58, 0x0a, 0x16, 0x43, - 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x4d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, - 0x49, 0x64, 0x12, 0x21, 0x0a, 0x0c, 0x6d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, - 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x6d, 0x69, 0x67, 0x72, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x22, 0x39, 0x0a, 0x14, 0x47, 0x65, 0x74, 0x53, 0x74, 0x61, 0x67, - 0x65, 0x64, 0x44, 0x61, 0x74, 0x61, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x21, 0x0a, - 0x0c, 0x6d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x0b, 0x6d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, - 0x22, 0x50, 0x0a, 0x0e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x72, 0x6d, 0x50, 0x72, 0x65, 0x76, 0x69, - 0x65, 0x77, 0x12, 0x1b, 0x0a, 0x09, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x49, 0x64, 0x12, + 0x49, 0x64, 0x12, 0x4d, 0x0a, 0x05, 0x63, 0x68, 0x75, 0x6e, 0x6b, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x37, 0x2e, 0x63, 0x68, 0x65, 0x66, 0x2e, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x61, 0x74, + 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x69, 0x6e, 0x66, 0x72, 0x61, 0x5f, 0x70, 0x72, 0x6f, 0x78, + 0x79, 0x2e, 0x6d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x72, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x2e, 0x43, 0x68, 0x75, 0x6e, 0x6b, 0x52, 0x05, 0x63, 0x68, 0x75, 0x6e, + 0x6b, 0x12, 0x4e, 0x0a, 0x04, 0x6d, 0x65, 0x74, 0x61, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x3a, 0x2e, 0x63, 0x68, 0x65, 0x66, 0x2e, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x61, 0x74, 0x65, 0x2e, + 0x61, 0x70, 0x69, 0x2e, 0x69, 0x6e, 0x66, 0x72, 0x61, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, + 0x6d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x72, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x04, 0x6d, 0x65, 0x74, + 0x61, 0x22, 0x41, 0x0a, 0x08, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x12, 0x0a, + 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, + 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x5f, 0x74, 0x79, 0x70, + 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, + 0x54, 0x79, 0x70, 0x65, 0x22, 0x37, 0x0a, 0x05, 0x43, 0x68, 0x75, 0x6e, 0x6b, 0x12, 0x12, 0x0a, + 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x04, 0x64, 0x61, 0x74, + 0x61, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x03, 0x52, 0x08, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x3e, 0x0a, + 0x19, 0x47, 0x65, 0x74, 0x4d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, + 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x21, 0x0a, 0x0c, 0x6d, 0x69, + 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x0b, 0x6d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x22, 0x58, 0x0a, + 0x16, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x4d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x73, 0x65, 0x72, 0x76, 0x65, + 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x73, 0x65, 0x72, 0x76, + 0x65, 0x72, 0x49, 0x64, 0x12, 0x21, 0x0a, 0x0c, 0x6d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x6d, 0x69, 0x67, 0x72, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x22, 0x39, 0x0a, 0x14, 0x47, 0x65, 0x74, 0x53, 0x74, + 0x61, 0x67, 0x65, 0x64, 0x44, 0x61, 0x74, 0x61, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x21, 0x0a, 0x0c, 0x6d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x6d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x49, 0x64, 0x42, 0x46, 0x5a, 0x44, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, - 0x2f, 0x63, 0x68, 0x65, 0x66, 0x2f, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x61, 0x74, 0x65, 0x2f, 0x61, - 0x70, 0x69, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2f, 0x69, 0x6e, 0x66, 0x72, - 0x61, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x6d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x73, 0x2f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x33, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x6d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x49, 0x64, 0x22, 0x50, 0x0a, 0x0e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x72, 0x6d, 0x50, 0x72, 0x65, + 0x76, 0x69, 0x65, 0x77, 0x12, 0x1b, 0x0a, 0x09, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x5f, 0x69, + 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x49, + 0x64, 0x12, 0x21, 0x0a, 0x0c, 0x6d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, + 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x6d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x49, 0x64, 0x42, 0x46, 0x5a, 0x44, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, + 0x6f, 0x6d, 0x2f, 0x63, 0x68, 0x65, 0x66, 0x2f, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x61, 0x74, 0x65, + 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2f, 0x69, 0x6e, + 0x66, 0x72, 0x61, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x6d, 0x69, 0x67, 0x72, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x62, 0x06, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/api/external/infra_proxy/migrations/request/migrations.proto b/api/external/infra_proxy/migrations/request/migrations.proto index 485fadd3cd4..3e4f0b11dd6 100644 --- a/api/external/infra_proxy/migrations/request/migrations.proto +++ b/api/external/infra_proxy/migrations/request/migrations.proto @@ -5,7 +5,7 @@ option go_package = "github.com/chef/automate/api/external/infra_proxy/migration message UploadZipFileRequest { //Chef infra server id for the file - string serverId =1; + string server_id =1; //Chunk of the data in bytes Chunk chunk = 2; //Metadata for the request @@ -16,7 +16,7 @@ message Metadata { //Migration File name string name = 1; //Content type of the request - string contentType =2; + string content_type=2; } // Zip content in byte form. diff --git a/api/external/infra_proxy/migrations/response/migrations.pb.go b/api/external/infra_proxy/migrations/response/migrations.pb.go index 95e2555053c..70d7b1a1263 100644 --- a/api/external/infra_proxy/migrations/response/migrations.pb.go +++ b/api/external/infra_proxy/migrations/response/migrations.pb.go @@ -33,7 +33,7 @@ type UploadZipFileResponse struct { // Success responce for zip upload. Success bool `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"` // Migration ID - MigrationId string `protobuf:"bytes,2,opt,name=migrationId,proto3" json:"migrationId,omitempty"` + MigrationId string `protobuf:"bytes,2,opt,name=migration_id,json=migrationId,proto3" json:"migration_id,omitempty"` // Error data in case of failure. Errors []string `protobuf:"bytes,3,rep,name=errors,proto3" json:"errors,omitempty"` } @@ -541,82 +541,82 @@ var file_external_infra_proxy_migrations_response_migrations_proto_rawDesc = []b 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x31, 0x63, 0x68, 0x65, 0x66, 0x2e, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x61, 0x74, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x69, 0x6e, 0x66, 0x72, 0x61, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x6d, 0x69, 0x67, 0x72, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x6b, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x6c, 0x0a, 0x15, 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x5a, 0x69, 0x70, 0x46, 0x69, 0x6c, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, - 0x73, 0x12, 0x20, 0x0a, 0x0b, 0x6d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x6d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x73, 0x18, 0x03, 0x20, - 0x03, 0x28, 0x09, 0x52, 0x06, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x73, 0x22, 0x91, 0x01, 0x0a, 0x1a, - 0x47, 0x65, 0x74, 0x4d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, - 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x6d, 0x69, - 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x0b, 0x6d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x25, 0x0a, - 0x0e, 0x6d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x6d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x54, 0x79, 0x70, 0x65, 0x12, 0x29, 0x0a, 0x10, 0x6d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, - 0x6d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, - 0x4b, 0x0a, 0x17, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x4d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x75, - 0x63, 0x63, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x73, 0x75, 0x63, - 0x63, 0x65, 0x73, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x73, 0x18, 0x02, - 0x20, 0x03, 0x28, 0x09, 0x52, 0x06, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x73, 0x22, 0x9a, 0x01, 0x0a, - 0x15, 0x47, 0x65, 0x74, 0x53, 0x74, 0x61, 0x67, 0x65, 0x64, 0x44, 0x61, 0x74, 0x61, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x6d, 0x69, 0x67, 0x72, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x6d, 0x69, - 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x5e, 0x0a, 0x0b, 0x73, 0x74, 0x61, - 0x67, 0x65, 0x64, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3d, + 0x73, 0x12, 0x21, 0x0a, 0x0c, 0x6d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, + 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x6d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x73, 0x18, 0x03, + 0x20, 0x03, 0x28, 0x09, 0x52, 0x06, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x73, 0x22, 0x91, 0x01, 0x0a, + 0x1a, 0x47, 0x65, 0x74, 0x4d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, + 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x6d, + 0x69, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x0b, 0x6d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x25, + 0x0a, 0x0e, 0x6d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x79, 0x70, 0x65, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x6d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x54, 0x79, 0x70, 0x65, 0x12, 0x29, 0x0a, 0x10, 0x6d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x0f, 0x6d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, + 0x22, 0x4b, 0x0a, 0x17, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x4d, 0x69, 0x67, 0x72, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x73, + 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x73, 0x75, + 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x73, 0x18, + 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x06, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x73, 0x22, 0x9a, 0x01, + 0x0a, 0x15, 0x47, 0x65, 0x74, 0x53, 0x74, 0x61, 0x67, 0x65, 0x64, 0x44, 0x61, 0x74, 0x61, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x6d, 0x69, 0x67, 0x72, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x6d, + 0x69, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x5e, 0x0a, 0x0b, 0x73, 0x74, + 0x61, 0x67, 0x65, 0x64, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x3d, 0x2e, 0x63, 0x68, 0x65, 0x66, 0x2e, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x61, 0x74, 0x65, 0x2e, + 0x61, 0x70, 0x69, 0x2e, 0x69, 0x6e, 0x66, 0x72, 0x61, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, + 0x6d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x72, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x2e, 0x53, 0x74, 0x61, 0x67, 0x65, 0x64, 0x44, 0x61, 0x74, 0x61, 0x52, 0x0a, + 0x73, 0x74, 0x61, 0x67, 0x65, 0x64, 0x44, 0x61, 0x74, 0x61, 0x22, 0xf1, 0x01, 0x0a, 0x0a, 0x53, + 0x74, 0x61, 0x67, 0x65, 0x64, 0x44, 0x61, 0x74, 0x61, 0x12, 0x26, 0x0a, 0x0f, 0x6f, 0x72, 0x67, + 0x73, 0x5f, 0x74, 0x6f, 0x5f, 0x6d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x65, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x05, 0x52, 0x0d, 0x6f, 0x72, 0x67, 0x73, 0x54, 0x6f, 0x4d, 0x69, 0x67, 0x72, 0x61, 0x74, + 0x65, 0x12, 0x20, 0x0a, 0x0c, 0x6f, 0x72, 0x67, 0x73, 0x5f, 0x74, 0x6f, 0x5f, 0x73, 0x6b, 0x69, + 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x6f, 0x72, 0x67, 0x73, 0x54, 0x6f, 0x53, + 0x6b, 0x69, 0x70, 0x12, 0x24, 0x0a, 0x0e, 0x6f, 0x72, 0x67, 0x73, 0x5f, 0x74, 0x6f, 0x5f, 0x75, + 0x70, 0x64, 0x61, 0x74, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0c, 0x6f, 0x72, 0x67, + 0x73, 0x54, 0x6f, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x12, 0x24, 0x0a, 0x0e, 0x6f, 0x72, 0x67, + 0x73, 0x5f, 0x74, 0x6f, 0x5f, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, + 0x05, 0x52, 0x0c, 0x6f, 0x72, 0x67, 0x73, 0x54, 0x6f, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x12, + 0x4d, 0x0a, 0x05, 0x75, 0x73, 0x65, 0x72, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x37, 0x2e, 0x63, 0x68, 0x65, 0x66, 0x2e, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x61, 0x74, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x69, 0x6e, 0x66, 0x72, 0x61, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x6d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x2e, 0x53, 0x74, 0x61, 0x67, 0x65, 0x64, 0x44, 0x61, 0x74, 0x61, 0x52, 0x0a, 0x73, - 0x74, 0x61, 0x67, 0x65, 0x64, 0x44, 0x61, 0x74, 0x61, 0x22, 0xf1, 0x01, 0x0a, 0x0a, 0x53, 0x74, - 0x61, 0x67, 0x65, 0x64, 0x44, 0x61, 0x74, 0x61, 0x12, 0x26, 0x0a, 0x0f, 0x6f, 0x72, 0x67, 0x73, - 0x5f, 0x74, 0x6f, 0x5f, 0x6d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x05, 0x52, 0x0d, 0x6f, 0x72, 0x67, 0x73, 0x54, 0x6f, 0x4d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x65, - 0x12, 0x20, 0x0a, 0x0c, 0x6f, 0x72, 0x67, 0x73, 0x5f, 0x74, 0x6f, 0x5f, 0x73, 0x6b, 0x69, 0x70, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x6f, 0x72, 0x67, 0x73, 0x54, 0x6f, 0x53, 0x6b, - 0x69, 0x70, 0x12, 0x24, 0x0a, 0x0e, 0x6f, 0x72, 0x67, 0x73, 0x5f, 0x74, 0x6f, 0x5f, 0x75, 0x70, - 0x64, 0x61, 0x74, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0c, 0x6f, 0x72, 0x67, 0x73, - 0x54, 0x6f, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x12, 0x24, 0x0a, 0x0e, 0x6f, 0x72, 0x67, 0x73, - 0x5f, 0x74, 0x6f, 0x5f, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, - 0x52, 0x0c, 0x6f, 0x72, 0x67, 0x73, 0x54, 0x6f, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x12, 0x4d, - 0x0a, 0x05, 0x75, 0x73, 0x65, 0x72, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x37, 0x2e, - 0x63, 0x68, 0x65, 0x66, 0x2e, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x61, 0x74, 0x65, 0x2e, 0x61, 0x70, - 0x69, 0x2e, 0x69, 0x6e, 0x66, 0x72, 0x61, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x6d, 0x69, - 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x52, 0x05, 0x75, 0x73, 0x65, 0x72, 0x73, 0x22, 0xc5, 0x02, - 0x0a, 0x04, 0x75, 0x73, 0x65, 0x72, 0x12, 0x1a, 0x0a, 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, - 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, - 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x12, 0x21, 0x0a, 0x0c, 0x64, 0x69, 0x73, 0x70, - 0x6c, 0x61, 0x79, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, - 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x66, - 0x69, 0x72, 0x73, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x09, 0x66, 0x69, 0x72, 0x73, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x6c, 0x61, - 0x73, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6c, - 0x61, 0x73, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x6d, 0x69, 0x64, 0x64, 0x6c, - 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x6d, 0x69, - 0x64, 0x64, 0x6c, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x2b, 0x0a, 0x11, 0x61, 0x75, 0x74, 0x6f, - 0x6d, 0x61, 0x74, 0x65, 0x5f, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x07, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x10, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, - 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, - 0x6f, 0x72, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, - 0x74, 0x6f, 0x72, 0x12, 0x25, 0x0a, 0x0e, 0x69, 0x73, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x6c, 0x69, - 0x63, 0x74, 0x69, 0x6e, 0x67, 0x18, 0x09, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0d, 0x69, 0x73, 0x43, - 0x6f, 0x6e, 0x66, 0x6c, 0x69, 0x63, 0x74, 0x69, 0x6e, 0x67, 0x12, 0x19, 0x0a, 0x08, 0x69, 0x73, - 0x5f, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x69, 0x73, - 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x22, 0x33, 0x0a, 0x0e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x72, 0x6d, - 0x50, 0x72, 0x65, 0x76, 0x69, 0x65, 0x77, 0x12, 0x21, 0x0a, 0x0c, 0x6d, 0x69, 0x67, 0x72, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x6d, - 0x69, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x42, 0x47, 0x5a, 0x45, 0x67, 0x69, - 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x68, 0x65, 0x66, 0x2f, 0x61, 0x75, - 0x74, 0x6f, 0x6d, 0x61, 0x74, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x72, - 0x6e, 0x61, 0x6c, 0x2f, 0x69, 0x6e, 0x66, 0x72, 0x61, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, - 0x6d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x72, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x73, 0x65, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x52, 0x05, 0x75, 0x73, 0x65, 0x72, 0x73, 0x22, 0xc5, + 0x02, 0x0a, 0x04, 0x55, 0x73, 0x65, 0x72, 0x12, 0x1a, 0x0a, 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e, + 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e, + 0x61, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x12, 0x21, 0x0a, 0x0c, 0x64, 0x69, 0x73, + 0x70, 0x6c, 0x61, 0x79, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x0b, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1d, 0x0a, 0x0a, + 0x66, 0x69, 0x72, 0x73, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x09, 0x66, 0x69, 0x72, 0x73, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x6c, + 0x61, 0x73, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, + 0x6c, 0x61, 0x73, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x6d, 0x69, 0x64, 0x64, + 0x6c, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x6d, + 0x69, 0x64, 0x64, 0x6c, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x2b, 0x0a, 0x11, 0x61, 0x75, 0x74, + 0x6f, 0x6d, 0x61, 0x74, 0x65, 0x5f, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x07, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x61, 0x74, 0x65, 0x55, 0x73, + 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, + 0x74, 0x6f, 0x72, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x63, 0x6f, 0x6e, 0x6e, 0x65, + 0x63, 0x74, 0x6f, 0x72, 0x12, 0x25, 0x0a, 0x0e, 0x69, 0x73, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x6c, + 0x69, 0x63, 0x74, 0x69, 0x6e, 0x67, 0x18, 0x09, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0d, 0x69, 0x73, + 0x43, 0x6f, 0x6e, 0x66, 0x6c, 0x69, 0x63, 0x74, 0x69, 0x6e, 0x67, 0x12, 0x19, 0x0a, 0x08, 0x69, + 0x73, 0x5f, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x69, + 0x73, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x22, 0x33, 0x0a, 0x0e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x72, + 0x6d, 0x50, 0x72, 0x65, 0x76, 0x69, 0x65, 0x77, 0x12, 0x21, 0x0a, 0x0c, 0x6d, 0x69, 0x67, 0x72, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, + 0x6d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x42, 0x47, 0x5a, 0x45, 0x67, + 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x68, 0x65, 0x66, 0x2f, 0x61, + 0x75, 0x74, 0x6f, 0x6d, 0x61, 0x74, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x65, 0x78, 0x74, 0x65, + 0x72, 0x6e, 0x61, 0x6c, 0x2f, 0x69, 0x6e, 0x66, 0x72, 0x61, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, + 0x2f, 0x6d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x72, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -638,12 +638,12 @@ var file_external_infra_proxy_migrations_response_migrations_proto_goTypes = []i (*CancelMigrationResponse)(nil), // 2: chef.automate.api.infra_proxy.migrations.response.CancelMigrationResponse (*GetStagedDataResponse)(nil), // 3: chef.automate.api.infra_proxy.migrations.response.GetStagedDataResponse (*StagedData)(nil), // 4: chef.automate.api.infra_proxy.migrations.response.StagedData - (*User)(nil), // 5: chef.automate.api.infra_proxy.migrations.response.user + (*User)(nil), // 5: chef.automate.api.infra_proxy.migrations.response.User (*ConfirmPreview)(nil), // 6: chef.automate.api.infra_proxy.migrations.response.ConfirmPreview } var file_external_infra_proxy_migrations_response_migrations_proto_depIdxs = []int32{ 4, // 0: chef.automate.api.infra_proxy.migrations.response.GetStagedDataResponse.staged_data:type_name -> chef.automate.api.infra_proxy.migrations.response.StagedData - 5, // 1: chef.automate.api.infra_proxy.migrations.response.StagedData.users:type_name -> chef.automate.api.infra_proxy.migrations.response.user + 5, // 1: chef.automate.api.infra_proxy.migrations.response.StagedData.users:type_name -> chef.automate.api.infra_proxy.migrations.response.User 2, // [2:2] is the sub-list for method output_type 2, // [2:2] is the sub-list for method input_type 2, // [2:2] is the sub-list for extension type_name diff --git a/api/external/infra_proxy/migrations/response/migrations.proto b/api/external/infra_proxy/migrations/response/migrations.proto index 9408653496a..a42bdf42fc7 100644 --- a/api/external/infra_proxy/migrations/response/migrations.proto +++ b/api/external/infra_proxy/migrations/response/migrations.proto @@ -8,7 +8,7 @@ message UploadZipFileResponse { // Success responce for zip upload. bool success = 1; // Migration ID - string migrationId = 2; + string migration_id = 2; // Error data in case of failure. repeated string errors = 3; } @@ -46,10 +46,10 @@ message StagedData { // Number of orgs to delete int32 orgs_to_delete =4; // Users - repeated user users =5; + repeated User users =5; } -message user { +message User { // User's username string username =1; // User's email ID diff --git a/api/interservice/infra_proxy/migrations/request/migrations.pb.go b/api/interservice/infra_proxy/migrations/request/migrations.pb.go index 37a89c12182..26002dddf8b 100644 --- a/api/interservice/infra_proxy/migrations/request/migrations.pb.go +++ b/api/interservice/infra_proxy/migrations/request/migrations.pb.go @@ -25,21 +25,21 @@ const ( // of the legacy proto package is being used. const _ = proto.ProtoPackageIsVersion4 -type UploadZipFileRequest struct { +type UploadFileRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields //Chef infra server id for the file - ServerId string `protobuf:"bytes,1,opt,name=serverId,proto3" json:"serverId,omitempty" toml:"serverId,omitempty" mapstructure:"serverId,omitempty"` + ServerId string `protobuf:"bytes,1,opt,name=server_id,json=serverId,proto3" json:"server_id,omitempty" toml:"server_id,omitempty" mapstructure:"server_id,omitempty"` //Chunk of the data in bytes Chunk *Chunk `protobuf:"bytes,2,opt,name=chunk,proto3" json:"chunk,omitempty" toml:"chunk,omitempty" mapstructure:"chunk,omitempty"` //Metadata for the request Meta *Metadata `protobuf:"bytes,3,opt,name=meta,proto3" json:"meta,omitempty" toml:"meta,omitempty" mapstructure:"meta,omitempty"` } -func (x *UploadZipFileRequest) Reset() { - *x = UploadZipFileRequest{} +func (x *UploadFileRequest) Reset() { + *x = UploadFileRequest{} if protoimpl.UnsafeEnabled { mi := &file_interservice_infra_proxy_migrations_request_migrations_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -47,13 +47,13 @@ func (x *UploadZipFileRequest) Reset() { } } -func (x *UploadZipFileRequest) String() string { +func (x *UploadFileRequest) String() string { return protoimpl.X.MessageStringOf(x) } -func (*UploadZipFileRequest) ProtoMessage() {} +func (*UploadFileRequest) ProtoMessage() {} -func (x *UploadZipFileRequest) ProtoReflect() protoreflect.Message { +func (x *UploadFileRequest) ProtoReflect() protoreflect.Message { mi := &file_interservice_infra_proxy_migrations_request_migrations_proto_msgTypes[0] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -65,26 +65,26 @@ func (x *UploadZipFileRequest) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use UploadZipFileRequest.ProtoReflect.Descriptor instead. -func (*UploadZipFileRequest) Descriptor() ([]byte, []int) { +// Deprecated: Use UploadFileRequest.ProtoReflect.Descriptor instead. +func (*UploadFileRequest) Descriptor() ([]byte, []int) { return file_interservice_infra_proxy_migrations_request_migrations_proto_rawDescGZIP(), []int{0} } -func (x *UploadZipFileRequest) GetServerId() string { +func (x *UploadFileRequest) GetServerId() string { if x != nil { return x.ServerId } return "" } -func (x *UploadZipFileRequest) GetChunk() *Chunk { +func (x *UploadFileRequest) GetChunk() *Chunk { if x != nil { return x.Chunk } return nil } -func (x *UploadZipFileRequest) GetMeta() *Metadata { +func (x *UploadFileRequest) GetMeta() *Metadata { if x != nil { return x.Meta } @@ -99,7 +99,7 @@ type Metadata struct { //Migration File name Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty" toml:"name,omitempty" mapstructure:"name,omitempty"` //Content type of the request - ContentType string `protobuf:"bytes,2,opt,name=contentType,proto3" json:"contentType,omitempty" toml:"contentType,omitempty" mapstructure:"contentType,omitempty"` + ContentType string `protobuf:"bytes,2,opt,name=content_type,json=contentType,proto3" json:"content_type,omitempty" toml:"content_type,omitempty" mapstructure:"content_type,omitempty"` } func (x *Metadata) Reset() { @@ -426,52 +426,52 @@ var file_interservice_infra_proxy_migrations_request_migrations_proto_rawDesc = 0x63, 0x68, 0x65, 0x66, 0x2e, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x61, 0x74, 0x65, 0x2e, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x2e, 0x69, 0x6e, 0x66, 0x72, 0x61, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x6d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x72, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x22, 0xd7, 0x01, 0x0a, 0x14, 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x5a, 0x69, - 0x70, 0x46, 0x69, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, - 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, - 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x49, 0x64, 0x12, 0x50, 0x0a, 0x05, 0x63, 0x68, 0x75, 0x6e, - 0x6b, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3a, 0x2e, 0x63, 0x68, 0x65, 0x66, 0x2e, 0x61, - 0x75, 0x74, 0x6f, 0x6d, 0x61, 0x74, 0x65, 0x2e, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x2e, 0x69, - 0x6e, 0x66, 0x72, 0x61, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x6d, 0x69, 0x67, 0x72, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x43, 0x68, - 0x75, 0x6e, 0x6b, 0x52, 0x05, 0x63, 0x68, 0x75, 0x6e, 0x6b, 0x12, 0x51, 0x0a, 0x04, 0x6d, 0x65, - 0x74, 0x61, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3d, 0x2e, 0x63, 0x68, 0x65, 0x66, 0x2e, - 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x61, 0x74, 0x65, 0x2e, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x2e, - 0x69, 0x6e, 0x66, 0x72, 0x61, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x6d, 0x69, 0x67, 0x72, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x4d, - 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x04, 0x6d, 0x65, 0x74, 0x61, 0x22, 0x40, 0x0a, - 0x08, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, - 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x20, 0x0a, - 0x0b, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x0b, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x22, - 0x37, 0x0a, 0x05, 0x43, 0x68, 0x75, 0x6e, 0x6b, 0x12, 0x12, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x12, 0x1a, 0x0a, 0x08, - 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, - 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x3e, 0x0a, 0x19, 0x47, 0x65, 0x74, 0x4d, - 0x69, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x21, 0x0a, 0x0c, 0x6d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x6d, 0x69, 0x67, - 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x22, 0x58, 0x0a, 0x16, 0x43, 0x61, 0x6e, 0x63, - 0x65, 0x6c, 0x4d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x49, 0x64, 0x12, - 0x21, 0x0a, 0x0c, 0x6d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x6d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x49, 0x64, 0x22, 0x39, 0x0a, 0x14, 0x47, 0x65, 0x74, 0x53, 0x74, 0x61, 0x67, 0x65, 0x64, 0x44, - 0x61, 0x74, 0x61, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x21, 0x0a, 0x0c, 0x6d, 0x69, - 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x0b, 0x6d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x22, 0x50, 0x0a, - 0x0e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x72, 0x6d, 0x50, 0x72, 0x65, 0x76, 0x69, 0x65, 0x77, 0x12, - 0x1b, 0x0a, 0x09, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x08, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x49, 0x64, 0x12, 0x21, 0x0a, 0x0c, - 0x6d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x0b, 0x6d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x42, - 0x4a, 0x5a, 0x48, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x68, - 0x65, 0x66, 0x2f, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x61, 0x74, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, - 0x69, 0x6e, 0x74, 0x65, 0x72, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, 0x69, 0x6e, 0x66, - 0x72, 0x61, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x6d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x73, 0x2f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x62, 0x06, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x33, + 0x65, 0x73, 0x74, 0x22, 0xd5, 0x01, 0x0a, 0x11, 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x46, 0x69, + 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x73, 0x65, 0x72, + 0x76, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x73, 0x65, + 0x72, 0x76, 0x65, 0x72, 0x49, 0x64, 0x12, 0x50, 0x0a, 0x05, 0x63, 0x68, 0x75, 0x6e, 0x6b, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3a, 0x2e, 0x63, 0x68, 0x65, 0x66, 0x2e, 0x61, 0x75, 0x74, + 0x6f, 0x6d, 0x61, 0x74, 0x65, 0x2e, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x2e, 0x69, 0x6e, 0x66, + 0x72, 0x61, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x6d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x2e, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x43, 0x68, 0x75, 0x6e, + 0x6b, 0x52, 0x05, 0x63, 0x68, 0x75, 0x6e, 0x6b, 0x12, 0x51, 0x0a, 0x04, 0x6d, 0x65, 0x74, 0x61, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3d, 0x2e, 0x63, 0x68, 0x65, 0x66, 0x2e, 0x61, 0x75, + 0x74, 0x6f, 0x6d, 0x61, 0x74, 0x65, 0x2e, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x2e, 0x69, 0x6e, + 0x66, 0x72, 0x61, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x6d, 0x69, 0x67, 0x72, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x4d, 0x65, 0x74, + 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x04, 0x6d, 0x65, 0x74, 0x61, 0x22, 0x41, 0x0a, 0x08, 0x4d, + 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x63, + 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x0b, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x22, 0x37, + 0x0a, 0x05, 0x43, 0x68, 0x75, 0x6e, 0x6b, 0x12, 0x12, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x12, 0x1a, 0x0a, 0x08, 0x70, + 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x70, + 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x3e, 0x0a, 0x19, 0x47, 0x65, 0x74, 0x4d, 0x69, + 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x12, 0x21, 0x0a, 0x0c, 0x6d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x6d, 0x69, 0x67, 0x72, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x22, 0x58, 0x0a, 0x16, 0x43, 0x61, 0x6e, 0x63, 0x65, + 0x6c, 0x4d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x49, 0x64, 0x12, 0x21, + 0x0a, 0x0c, 0x6d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x6d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, + 0x64, 0x22, 0x39, 0x0a, 0x14, 0x47, 0x65, 0x74, 0x53, 0x74, 0x61, 0x67, 0x65, 0x64, 0x44, 0x61, + 0x74, 0x61, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x21, 0x0a, 0x0c, 0x6d, 0x69, 0x67, + 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x0b, 0x6d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x22, 0x50, 0x0a, 0x0e, + 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x72, 0x6d, 0x50, 0x72, 0x65, 0x76, 0x69, 0x65, 0x77, 0x12, 0x1b, + 0x0a, 0x09, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x08, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x49, 0x64, 0x12, 0x21, 0x0a, 0x0c, 0x6d, + 0x69, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x0b, 0x6d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x42, 0x4a, + 0x5a, 0x48, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x68, 0x65, + 0x66, 0x2f, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x61, 0x74, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x69, + 0x6e, 0x74, 0x65, 0x72, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, 0x69, 0x6e, 0x66, 0x72, + 0x61, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x6d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x2f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x33, } var ( @@ -488,7 +488,7 @@ func file_interservice_infra_proxy_migrations_request_migrations_proto_rawDescGZ var file_interservice_infra_proxy_migrations_request_migrations_proto_msgTypes = make([]protoimpl.MessageInfo, 7) var file_interservice_infra_proxy_migrations_request_migrations_proto_goTypes = []interface{}{ - (*UploadZipFileRequest)(nil), // 0: chef.automate.domain.infra_proxy.migrations.request.UploadZipFileRequest + (*UploadFileRequest)(nil), // 0: chef.automate.domain.infra_proxy.migrations.request.UploadFileRequest (*Metadata)(nil), // 1: chef.automate.domain.infra_proxy.migrations.request.Metadata (*Chunk)(nil), // 2: chef.automate.domain.infra_proxy.migrations.request.Chunk (*GetMigrationStatusRequest)(nil), // 3: chef.automate.domain.infra_proxy.migrations.request.GetMigrationStatusRequest @@ -497,8 +497,8 @@ var file_interservice_infra_proxy_migrations_request_migrations_proto_goTypes = (*ConfirmPreview)(nil), // 6: chef.automate.domain.infra_proxy.migrations.request.ConfirmPreview } var file_interservice_infra_proxy_migrations_request_migrations_proto_depIdxs = []int32{ - 2, // 0: chef.automate.domain.infra_proxy.migrations.request.UploadZipFileRequest.chunk:type_name -> chef.automate.domain.infra_proxy.migrations.request.Chunk - 1, // 1: chef.automate.domain.infra_proxy.migrations.request.UploadZipFileRequest.meta:type_name -> chef.automate.domain.infra_proxy.migrations.request.Metadata + 2, // 0: chef.automate.domain.infra_proxy.migrations.request.UploadFileRequest.chunk:type_name -> chef.automate.domain.infra_proxy.migrations.request.Chunk + 1, // 1: chef.automate.domain.infra_proxy.migrations.request.UploadFileRequest.meta:type_name -> chef.automate.domain.infra_proxy.migrations.request.Metadata 2, // [2:2] is the sub-list for method output_type 2, // [2:2] is the sub-list for method input_type 2, // [2:2] is the sub-list for extension type_name @@ -513,7 +513,7 @@ func file_interservice_infra_proxy_migrations_request_migrations_proto_init() { } if !protoimpl.UnsafeEnabled { file_interservice_infra_proxy_migrations_request_migrations_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*UploadZipFileRequest); i { + switch v := v.(*UploadFileRequest); i { case 0: return &v.state case 1: diff --git a/api/interservice/infra_proxy/migrations/request/migrations.proto b/api/interservice/infra_proxy/migrations/request/migrations.proto index b014ea9a92d..efed348c755 100644 --- a/api/interservice/infra_proxy/migrations/request/migrations.proto +++ b/api/interservice/infra_proxy/migrations/request/migrations.proto @@ -3,9 +3,9 @@ syntax = "proto3"; package chef.automate.domain.infra_proxy.migrations.request; option go_package = "github.com/chef/automate/api/interservice/infra_proxy/migrations/request"; -message UploadZipFileRequest{ +message UploadFileRequest{ //Chef infra server id for the file - string serverId =1; + string server_id =1; //Chunk of the data in bytes Chunk chunk = 2; //Metadata for the request @@ -16,7 +16,7 @@ message Metadata{ //Migration File name string name = 1; //Content type of the request - string contentType =2; + string content_type =2; } // Zip content in byte form. diff --git a/api/interservice/infra_proxy/migrations/response/migrations.pb.go b/api/interservice/infra_proxy/migrations/response/migrations.pb.go index 626eae25e84..1156a321ea9 100644 --- a/api/interservice/infra_proxy/migrations/response/migrations.pb.go +++ b/api/interservice/infra_proxy/migrations/response/migrations.pb.go @@ -25,7 +25,7 @@ const ( // of the legacy proto package is being used. const _ = proto.ProtoPackageIsVersion4 -type UploadZipFileResponse struct { +type UploadFileResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -33,13 +33,13 @@ type UploadZipFileResponse struct { // Success responce for zip upload. Success bool `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty" toml:"success,omitempty" mapstructure:"success,omitempty"` // Chef infra server migration ID - MigrationId string `protobuf:"bytes,2,opt,name=migrationId,proto3" json:"migrationId,omitempty" toml:"migrationId,omitempty" mapstructure:"migrationId,omitempty"` + MigrationId string `protobuf:"bytes,2,opt,name=migration_id,json=migrationId,proto3" json:"migration_id,omitempty" toml:"migration_id,omitempty" mapstructure:"migration_id,omitempty"` // Error data in case of failure. Errors []string `protobuf:"bytes,3,rep,name=errors,proto3" json:"errors,omitempty" toml:"errors,omitempty" mapstructure:"errors,omitempty"` } -func (x *UploadZipFileResponse) Reset() { - *x = UploadZipFileResponse{} +func (x *UploadFileResponse) Reset() { + *x = UploadFileResponse{} if protoimpl.UnsafeEnabled { mi := &file_interservice_infra_proxy_migrations_response_migrations_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -47,13 +47,13 @@ func (x *UploadZipFileResponse) Reset() { } } -func (x *UploadZipFileResponse) String() string { +func (x *UploadFileResponse) String() string { return protoimpl.X.MessageStringOf(x) } -func (*UploadZipFileResponse) ProtoMessage() {} +func (*UploadFileResponse) ProtoMessage() {} -func (x *UploadZipFileResponse) ProtoReflect() protoreflect.Message { +func (x *UploadFileResponse) ProtoReflect() protoreflect.Message { mi := &file_interservice_infra_proxy_migrations_response_migrations_proto_msgTypes[0] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -65,26 +65,26 @@ func (x *UploadZipFileResponse) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use UploadZipFileResponse.ProtoReflect.Descriptor instead. -func (*UploadZipFileResponse) Descriptor() ([]byte, []int) { +// Deprecated: Use UploadFileResponse.ProtoReflect.Descriptor instead. +func (*UploadFileResponse) Descriptor() ([]byte, []int) { return file_interservice_infra_proxy_migrations_response_migrations_proto_rawDescGZIP(), []int{0} } -func (x *UploadZipFileResponse) GetSuccess() bool { +func (x *UploadFileResponse) GetSuccess() bool { if x != nil { return x.Success } return false } -func (x *UploadZipFileResponse) GetMigrationId() string { +func (x *UploadFileResponse) GetMigrationId() string { if x != nil { return x.MigrationId } return "" } -func (x *UploadZipFileResponse) GetErrors() []string { +func (x *UploadFileResponse) GetErrors() []string { if x != nil { return x.Errors } @@ -542,82 +542,82 @@ var file_interservice_infra_proxy_migrations_response_migrations_proto_rawDesc = 0x34, 0x63, 0x68, 0x65, 0x66, 0x2e, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x61, 0x74, 0x65, 0x2e, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x2e, 0x69, 0x6e, 0x66, 0x72, 0x61, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x6d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x72, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x6b, 0x0a, 0x15, 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x5a, - 0x69, 0x70, 0x46, 0x69, 0x6c, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, - 0x0a, 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, - 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x20, 0x0a, 0x0b, 0x6d, 0x69, 0x67, 0x72, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x6d, - 0x69, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x65, 0x72, - 0x72, 0x6f, 0x72, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x06, 0x65, 0x72, 0x72, 0x6f, - 0x72, 0x73, 0x22, 0x91, 0x01, 0x0a, 0x1a, 0x47, 0x65, 0x74, 0x4d, 0x69, 0x67, 0x72, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x6d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, - 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x6d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x25, 0x0a, 0x0e, 0x6d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x6d, 0x69, - 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x12, 0x29, 0x0a, 0x10, 0x6d, - 0x69, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x6d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0x4b, 0x0a, 0x17, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, - 0x4d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x08, 0x52, 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x65, - 0x72, 0x72, 0x6f, 0x72, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x06, 0x65, 0x72, 0x72, - 0x6f, 0x72, 0x73, 0x22, 0x9d, 0x01, 0x0a, 0x15, 0x47, 0x65, 0x74, 0x53, 0x74, 0x61, 0x67, 0x65, - 0x64, 0x44, 0x61, 0x74, 0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x21, 0x0a, - 0x0c, 0x6d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x0b, 0x6d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, - 0x12, 0x61, 0x0a, 0x0b, 0x73, 0x74, 0x61, 0x67, 0x65, 0x64, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x40, 0x2e, 0x63, 0x68, 0x65, 0x66, 0x2e, 0x61, 0x75, 0x74, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x69, 0x0a, 0x12, 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x46, + 0x69, 0x6c, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x73, + 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x73, 0x75, + 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x21, 0x0a, 0x0c, 0x6d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x6d, 0x69, 0x67, + 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x65, 0x72, 0x72, 0x6f, + 0x72, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x06, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x73, + 0x22, 0x91, 0x01, 0x0a, 0x1a, 0x47, 0x65, 0x74, 0x4d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x21, 0x0a, 0x0c, 0x6d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x6d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x49, 0x64, 0x12, 0x25, 0x0a, 0x0e, 0x6d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, + 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x6d, 0x69, 0x67, 0x72, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x12, 0x29, 0x0a, 0x10, 0x6d, 0x69, 0x67, + 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x0f, 0x6d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, + 0x61, 0x74, 0x75, 0x73, 0x22, 0x4b, 0x0a, 0x17, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x4d, 0x69, + 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x18, 0x0a, 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, + 0x52, 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x65, 0x72, 0x72, + 0x6f, 0x72, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x06, 0x65, 0x72, 0x72, 0x6f, 0x72, + 0x73, 0x22, 0x9d, 0x01, 0x0a, 0x15, 0x47, 0x65, 0x74, 0x53, 0x74, 0x61, 0x67, 0x65, 0x64, 0x44, + 0x61, 0x74, 0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x6d, + 0x69, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x0b, 0x6d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x61, + 0x0a, 0x0b, 0x73, 0x74, 0x61, 0x67, 0x65, 0x64, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x40, 0x2e, 0x63, 0x68, 0x65, 0x66, 0x2e, 0x61, 0x75, 0x74, 0x6f, 0x6d, + 0x61, 0x74, 0x65, 0x2e, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x2e, 0x69, 0x6e, 0x66, 0x72, 0x61, + 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x6d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x2e, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x53, 0x74, 0x61, 0x67, 0x65, + 0x64, 0x44, 0x61, 0x74, 0x61, 0x52, 0x0a, 0x73, 0x74, 0x61, 0x67, 0x65, 0x64, 0x44, 0x61, 0x74, + 0x61, 0x22, 0xf4, 0x01, 0x0a, 0x0a, 0x53, 0x74, 0x61, 0x67, 0x65, 0x64, 0x44, 0x61, 0x74, 0x61, + 0x12, 0x26, 0x0a, 0x0f, 0x6f, 0x72, 0x67, 0x73, 0x5f, 0x74, 0x6f, 0x5f, 0x6d, 0x69, 0x67, 0x72, + 0x61, 0x74, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0d, 0x6f, 0x72, 0x67, 0x73, 0x54, + 0x6f, 0x4d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x65, 0x12, 0x20, 0x0a, 0x0c, 0x6f, 0x72, 0x67, 0x73, + 0x5f, 0x74, 0x6f, 0x5f, 0x73, 0x6b, 0x69, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, + 0x6f, 0x72, 0x67, 0x73, 0x54, 0x6f, 0x53, 0x6b, 0x69, 0x70, 0x12, 0x24, 0x0a, 0x0e, 0x6f, 0x72, + 0x67, 0x73, 0x5f, 0x74, 0x6f, 0x5f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x05, 0x52, 0x0c, 0x6f, 0x72, 0x67, 0x73, 0x54, 0x6f, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, + 0x12, 0x24, 0x0a, 0x0e, 0x6f, 0x72, 0x67, 0x73, 0x5f, 0x74, 0x6f, 0x5f, 0x64, 0x65, 0x6c, 0x65, + 0x74, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0c, 0x6f, 0x72, 0x67, 0x73, 0x54, 0x6f, + 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x12, 0x50, 0x0a, 0x05, 0x75, 0x73, 0x65, 0x72, 0x73, 0x18, + 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x3a, 0x2e, 0x63, 0x68, 0x65, 0x66, 0x2e, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x61, 0x74, 0x65, 0x2e, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x2e, 0x69, 0x6e, 0x66, 0x72, 0x61, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x6d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x73, 0x2e, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x53, 0x74, 0x61, - 0x67, 0x65, 0x64, 0x44, 0x61, 0x74, 0x61, 0x52, 0x0a, 0x73, 0x74, 0x61, 0x67, 0x65, 0x64, 0x44, - 0x61, 0x74, 0x61, 0x22, 0xf4, 0x01, 0x0a, 0x0a, 0x53, 0x74, 0x61, 0x67, 0x65, 0x64, 0x44, 0x61, - 0x74, 0x61, 0x12, 0x26, 0x0a, 0x0f, 0x6f, 0x72, 0x67, 0x73, 0x5f, 0x74, 0x6f, 0x5f, 0x6d, 0x69, - 0x67, 0x72, 0x61, 0x74, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0d, 0x6f, 0x72, 0x67, - 0x73, 0x54, 0x6f, 0x4d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x65, 0x12, 0x20, 0x0a, 0x0c, 0x6f, 0x72, - 0x67, 0x73, 0x5f, 0x74, 0x6f, 0x5f, 0x73, 0x6b, 0x69, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, - 0x52, 0x0a, 0x6f, 0x72, 0x67, 0x73, 0x54, 0x6f, 0x53, 0x6b, 0x69, 0x70, 0x12, 0x24, 0x0a, 0x0e, - 0x6f, 0x72, 0x67, 0x73, 0x5f, 0x74, 0x6f, 0x5f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x05, 0x52, 0x0c, 0x6f, 0x72, 0x67, 0x73, 0x54, 0x6f, 0x55, 0x70, 0x64, 0x61, - 0x74, 0x65, 0x12, 0x24, 0x0a, 0x0e, 0x6f, 0x72, 0x67, 0x73, 0x5f, 0x74, 0x6f, 0x5f, 0x64, 0x65, - 0x6c, 0x65, 0x74, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0c, 0x6f, 0x72, 0x67, 0x73, - 0x54, 0x6f, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x12, 0x50, 0x0a, 0x05, 0x75, 0x73, 0x65, 0x72, - 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x3a, 0x2e, 0x63, 0x68, 0x65, 0x66, 0x2e, 0x61, - 0x75, 0x74, 0x6f, 0x6d, 0x61, 0x74, 0x65, 0x2e, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x2e, 0x69, - 0x6e, 0x66, 0x72, 0x61, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x6d, 0x69, 0x67, 0x72, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x75, - 0x73, 0x65, 0x72, 0x52, 0x05, 0x75, 0x73, 0x65, 0x72, 0x73, 0x22, 0xc5, 0x02, 0x0a, 0x04, 0x75, - 0x73, 0x65, 0x72, 0x12, 0x1a, 0x0a, 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x12, - 0x14, 0x0a, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, - 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x12, 0x21, 0x0a, 0x0c, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, - 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x69, 0x73, - 0x70, 0x6c, 0x61, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x66, 0x69, 0x72, 0x73, - 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x66, 0x69, - 0x72, 0x73, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x6c, 0x61, 0x73, 0x74, 0x5f, - 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6c, 0x61, 0x73, 0x74, - 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x6d, 0x69, 0x64, 0x64, 0x6c, 0x65, 0x5f, 0x6e, - 0x61, 0x6d, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x6d, 0x69, 0x64, 0x64, 0x6c, - 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x2b, 0x0a, 0x11, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x61, 0x74, - 0x65, 0x5f, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x10, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x6e, 0x61, - 0x6d, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x18, - 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, - 0x12, 0x25, 0x0a, 0x0e, 0x69, 0x73, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x6c, 0x69, 0x63, 0x74, 0x69, - 0x6e, 0x67, 0x18, 0x09, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0d, 0x69, 0x73, 0x43, 0x6f, 0x6e, 0x66, - 0x6c, 0x69, 0x63, 0x74, 0x69, 0x6e, 0x67, 0x12, 0x19, 0x0a, 0x08, 0x69, 0x73, 0x5f, 0x61, 0x64, - 0x6d, 0x69, 0x6e, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x69, 0x73, 0x41, 0x64, 0x6d, - 0x69, 0x6e, 0x22, 0x33, 0x0a, 0x0e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x72, 0x6d, 0x50, 0x72, 0x65, - 0x76, 0x69, 0x65, 0x77, 0x12, 0x21, 0x0a, 0x0c, 0x6d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x6d, 0x69, 0x67, 0x72, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x42, 0x4b, 0x5a, 0x49, 0x67, 0x69, 0x74, 0x68, 0x75, - 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x68, 0x65, 0x66, 0x2f, 0x61, 0x75, 0x74, 0x6f, 0x6d, - 0x61, 0x74, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x73, 0x65, 0x72, - 0x76, 0x69, 0x63, 0x65, 0x2f, 0x69, 0x6e, 0x66, 0x72, 0x61, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, - 0x2f, 0x6d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x72, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x6f, 0x6e, 0x73, 0x2e, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x55, 0x73, 0x65, + 0x72, 0x52, 0x05, 0x75, 0x73, 0x65, 0x72, 0x73, 0x22, 0xc5, 0x02, 0x0a, 0x04, 0x55, 0x73, 0x65, + 0x72, 0x12, 0x1a, 0x0a, 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x14, 0x0a, + 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x65, 0x6d, + 0x61, 0x69, 0x6c, 0x12, 0x21, 0x0a, 0x0c, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x5f, 0x6e, + 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x69, 0x73, 0x70, 0x6c, + 0x61, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x66, 0x69, 0x72, 0x73, 0x74, 0x5f, + 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x66, 0x69, 0x72, 0x73, + 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x6e, 0x61, + 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6c, 0x61, 0x73, 0x74, 0x4e, 0x61, + 0x6d, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x6d, 0x69, 0x64, 0x64, 0x6c, 0x65, 0x5f, 0x6e, 0x61, 0x6d, + 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x6d, 0x69, 0x64, 0x64, 0x6c, 0x65, 0x4e, + 0x61, 0x6d, 0x65, 0x12, 0x2b, 0x0a, 0x11, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x61, 0x74, 0x65, 0x5f, + 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, + 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, + 0x12, 0x1c, 0x0a, 0x09, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x18, 0x08, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x09, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x12, 0x25, + 0x0a, 0x0e, 0x69, 0x73, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x6c, 0x69, 0x63, 0x74, 0x69, 0x6e, 0x67, + 0x18, 0x09, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0d, 0x69, 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x6c, 0x69, + 0x63, 0x74, 0x69, 0x6e, 0x67, 0x12, 0x19, 0x0a, 0x08, 0x69, 0x73, 0x5f, 0x61, 0x64, 0x6d, 0x69, + 0x6e, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x69, 0x73, 0x41, 0x64, 0x6d, 0x69, 0x6e, + 0x22, 0x33, 0x0a, 0x0e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x72, 0x6d, 0x50, 0x72, 0x65, 0x76, 0x69, + 0x65, 0x77, 0x12, 0x21, 0x0a, 0x0c, 0x6d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, + 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x6d, 0x69, 0x67, 0x72, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x42, 0x4b, 0x5a, 0x49, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, + 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x68, 0x65, 0x66, 0x2f, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x61, 0x74, + 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x73, 0x65, 0x72, 0x76, 0x69, + 0x63, 0x65, 0x2f, 0x69, 0x6e, 0x66, 0x72, 0x61, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x6d, + 0x69, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -634,17 +634,17 @@ func file_interservice_infra_proxy_migrations_response_migrations_proto_rawDescG var file_interservice_infra_proxy_migrations_response_migrations_proto_msgTypes = make([]protoimpl.MessageInfo, 7) var file_interservice_infra_proxy_migrations_response_migrations_proto_goTypes = []interface{}{ - (*UploadZipFileResponse)(nil), // 0: chef.automate.domain.infra_proxy.migrations.response.UploadZipFileResponse + (*UploadFileResponse)(nil), // 0: chef.automate.domain.infra_proxy.migrations.response.UploadFileResponse (*GetMigrationStatusResponse)(nil), // 1: chef.automate.domain.infra_proxy.migrations.response.GetMigrationStatusResponse (*CancelMigrationResponse)(nil), // 2: chef.automate.domain.infra_proxy.migrations.response.CancelMigrationResponse (*GetStagedDataResponse)(nil), // 3: chef.automate.domain.infra_proxy.migrations.response.GetStagedDataResponse (*StagedData)(nil), // 4: chef.automate.domain.infra_proxy.migrations.response.StagedData - (*User)(nil), // 5: chef.automate.domain.infra_proxy.migrations.response.user + (*User)(nil), // 5: chef.automate.domain.infra_proxy.migrations.response.User (*ConfirmPreview)(nil), // 6: chef.automate.domain.infra_proxy.migrations.response.ConfirmPreview } var file_interservice_infra_proxy_migrations_response_migrations_proto_depIdxs = []int32{ 4, // 0: chef.automate.domain.infra_proxy.migrations.response.GetStagedDataResponse.staged_data:type_name -> chef.automate.domain.infra_proxy.migrations.response.StagedData - 5, // 1: chef.automate.domain.infra_proxy.migrations.response.StagedData.users:type_name -> chef.automate.domain.infra_proxy.migrations.response.user + 5, // 1: chef.automate.domain.infra_proxy.migrations.response.StagedData.users:type_name -> chef.automate.domain.infra_proxy.migrations.response.User 2, // [2:2] is the sub-list for method output_type 2, // [2:2] is the sub-list for method input_type 2, // [2:2] is the sub-list for extension type_name @@ -659,7 +659,7 @@ func file_interservice_infra_proxy_migrations_response_migrations_proto_init() { } if !protoimpl.UnsafeEnabled { file_interservice_infra_proxy_migrations_response_migrations_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*UploadZipFileResponse); i { + switch v := v.(*UploadFileResponse); i { case 0: return &v.state case 1: diff --git a/api/interservice/infra_proxy/migrations/response/migrations.proto b/api/interservice/infra_proxy/migrations/response/migrations.proto index c6809d6b2a4..1ef03afa60a 100644 --- a/api/interservice/infra_proxy/migrations/response/migrations.proto +++ b/api/interservice/infra_proxy/migrations/response/migrations.proto @@ -3,11 +3,11 @@ syntax = "proto3"; package chef.automate.domain.infra_proxy.migrations.response; option go_package = "github.com/chef/automate/api/interservice/infra_proxy/migrations/response"; -message UploadZipFileResponse { +message UploadFileResponse { // Success responce for zip upload. bool success = 1; // Chef infra server migration ID - string migrationId = 2; + string migration_id = 2; // Error data in case of failure. repeated string errors = 3; } @@ -45,10 +45,10 @@ message StagedData { // Number of orgs to delete int32 orgs_to_delete =4; // Users - repeated user users =5; + repeated User users =5; } -message user { +message User { // User's username string username =1; // User's email ID diff --git a/api/interservice/infra_proxy/migrations/service/migrations.pb.go b/api/interservice/infra_proxy/migrations/service/migrations.pb.go index 07357504e41..71a345a8cf1 100644 --- a/api/interservice/infra_proxy/migrations/service/migrations.pb.go +++ b/api/interservice/infra_proxy/migrations/service/migrations.pb.go @@ -50,89 +50,89 @@ var file_interservice_infra_proxy_migrations_service_migrations_proto_rawDesc = 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2f, 0x6d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, - 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x32, 0xfa, + 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x32, 0xf4, 0x06, 0x0a, 0x14, 0x4d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x61, 0x74, 0x61, - 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0xa8, 0x01, 0x0a, 0x0a, 0x55, 0x70, 0x6c, 0x6f, - 0x61, 0x64, 0x46, 0x69, 0x6c, 0x65, 0x12, 0x49, 0x2e, 0x63, 0x68, 0x65, 0x66, 0x2e, 0x61, 0x75, + 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0xa2, 0x01, 0x0a, 0x0a, 0x55, 0x70, 0x6c, 0x6f, + 0x61, 0x64, 0x46, 0x69, 0x6c, 0x65, 0x12, 0x46, 0x2e, 0x63, 0x68, 0x65, 0x66, 0x2e, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x61, 0x74, 0x65, 0x2e, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x2e, 0x69, 0x6e, 0x66, 0x72, 0x61, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x6d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x55, 0x70, 0x6c, - 0x6f, 0x61, 0x64, 0x5a, 0x69, 0x70, 0x46, 0x69, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x4b, 0x2e, 0x63, 0x68, 0x65, 0x66, 0x2e, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x61, 0x74, - 0x65, 0x2e, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x2e, 0x69, 0x6e, 0x66, 0x72, 0x61, 0x5f, 0x70, - 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x6d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, - 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x5a, - 0x69, 0x70, 0x46, 0x69, 0x6c, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, - 0x28, 0x01, 0x12, 0xb8, 0x01, 0x0a, 0x12, 0x47, 0x65, 0x74, 0x4d, 0x69, 0x67, 0x72, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x4e, 0x2e, 0x63, 0x68, 0x65, 0x66, - 0x2e, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x61, 0x74, 0x65, 0x2e, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, - 0x2e, 0x69, 0x6e, 0x66, 0x72, 0x61, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x6d, 0x69, 0x67, - 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, - 0x47, 0x65, 0x74, 0x4d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, - 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x50, 0x2e, 0x63, 0x68, 0x65, 0x66, - 0x2e, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x61, 0x74, 0x65, 0x2e, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, - 0x2e, 0x69, 0x6e, 0x66, 0x72, 0x61, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x6d, 0x69, 0x67, - 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x2e, 0x47, 0x65, 0x74, 0x4d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, - 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0xaf, 0x01, - 0x0a, 0x0f, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x4d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x12, 0x4b, 0x2e, 0x63, 0x68, 0x65, 0x66, 0x2e, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x61, 0x74, - 0x65, 0x2e, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x2e, 0x69, 0x6e, 0x66, 0x72, 0x61, 0x5f, 0x70, - 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x6d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, - 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x4d, 0x69, - 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x4d, + 0x6f, 0x61, 0x64, 0x46, 0x69, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x48, 0x2e, 0x63, 0x68, 0x65, 0x66, 0x2e, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x61, 0x74, 0x65, 0x2e, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x2e, 0x69, 0x6e, 0x66, 0x72, 0x61, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x6d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x72, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x4d, 0x69, 0x67, 0x72, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, - 0xa9, 0x01, 0x0a, 0x0d, 0x47, 0x65, 0x74, 0x53, 0x74, 0x61, 0x67, 0x65, 0x64, 0x44, 0x61, 0x74, - 0x61, 0x12, 0x49, 0x2e, 0x63, 0x68, 0x65, 0x66, 0x2e, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x61, 0x74, - 0x65, 0x2e, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x2e, 0x69, 0x6e, 0x66, 0x72, 0x61, 0x5f, 0x70, - 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x6d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, - 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x74, 0x61, 0x67, 0x65, - 0x64, 0x44, 0x61, 0x74, 0x61, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x4b, 0x2e, 0x63, - 0x68, 0x65, 0x66, 0x2e, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x61, 0x74, 0x65, 0x2e, 0x64, 0x6f, 0x6d, - 0x61, 0x69, 0x6e, 0x2e, 0x69, 0x6e, 0x66, 0x72, 0x61, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, - 0x6d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x72, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x74, 0x61, 0x67, 0x65, 0x64, 0x44, 0x61, 0x74, - 0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x9d, 0x01, 0x0a, 0x0e, - 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x72, 0x6d, 0x50, 0x72, 0x65, 0x76, 0x69, 0x65, 0x77, 0x12, 0x43, - 0x2e, 0x63, 0x68, 0x65, 0x66, 0x2e, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x61, 0x74, 0x65, 0x2e, 0x64, - 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x2e, 0x69, 0x6e, 0x66, 0x72, 0x61, 0x5f, 0x70, 0x72, 0x6f, 0x78, - 0x79, 0x2e, 0x6d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x72, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x72, 0x6d, 0x50, 0x72, 0x65, 0x76, - 0x69, 0x65, 0x77, 0x1a, 0x44, 0x2e, 0x63, 0x68, 0x65, 0x66, 0x2e, 0x61, 0x75, 0x74, 0x6f, 0x6d, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x46, 0x69, 0x6c, 0x65, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x28, 0x01, 0x12, 0xb8, 0x01, 0x0a, + 0x12, 0x47, 0x65, 0x74, 0x4d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, + 0x74, 0x75, 0x73, 0x12, 0x4e, 0x2e, 0x63, 0x68, 0x65, 0x66, 0x2e, 0x61, 0x75, 0x74, 0x6f, 0x6d, + 0x61, 0x74, 0x65, 0x2e, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x2e, 0x69, 0x6e, 0x66, 0x72, 0x61, + 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x6d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x2e, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x47, 0x65, 0x74, 0x4d, 0x69, 0x67, + 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x50, 0x2e, 0x63, 0x68, 0x65, 0x66, 0x2e, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x61, 0x74, 0x65, 0x2e, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x2e, 0x69, 0x6e, 0x66, 0x72, 0x61, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x6d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x73, 0x2e, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x69, - 0x72, 0x6d, 0x50, 0x72, 0x65, 0x76, 0x69, 0x65, 0x77, 0x22, 0x00, 0x42, 0x4a, 0x5a, 0x48, 0x67, - 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x68, 0x65, 0x66, 0x2f, 0x61, - 0x75, 0x74, 0x6f, 0x6d, 0x61, 0x74, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x69, 0x6e, 0x74, 0x65, - 0x72, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, 0x69, 0x6e, 0x66, 0x72, 0x61, 0x5f, 0x70, - 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x6d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, - 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x73, 0x2e, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x47, 0x65, 0x74, 0x4d, 0x69, + 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0xaf, 0x01, 0x0a, 0x0f, 0x43, 0x61, 0x6e, 0x63, + 0x65, 0x6c, 0x4d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x4b, 0x2e, 0x63, 0x68, + 0x65, 0x66, 0x2e, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x61, 0x74, 0x65, 0x2e, 0x64, 0x6f, 0x6d, 0x61, + 0x69, 0x6e, 0x2e, 0x69, 0x6e, 0x66, 0x72, 0x61, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x6d, + 0x69, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x2e, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x4d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x4d, 0x2e, 0x63, 0x68, 0x65, 0x66, 0x2e, + 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x61, 0x74, 0x65, 0x2e, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x2e, + 0x69, 0x6e, 0x66, 0x72, 0x61, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x6d, 0x69, 0x67, 0x72, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, + 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x4d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0xa9, 0x01, 0x0a, 0x0d, 0x47, 0x65, + 0x74, 0x53, 0x74, 0x61, 0x67, 0x65, 0x64, 0x44, 0x61, 0x74, 0x61, 0x12, 0x49, 0x2e, 0x63, 0x68, + 0x65, 0x66, 0x2e, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x61, 0x74, 0x65, 0x2e, 0x64, 0x6f, 0x6d, 0x61, + 0x69, 0x6e, 0x2e, 0x69, 0x6e, 0x66, 0x72, 0x61, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x6d, + 0x69, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x74, 0x61, 0x67, 0x65, 0x64, 0x44, 0x61, 0x74, 0x61, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x4b, 0x2e, 0x63, 0x68, 0x65, 0x66, 0x2e, 0x61, 0x75, + 0x74, 0x6f, 0x6d, 0x61, 0x74, 0x65, 0x2e, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x2e, 0x69, 0x6e, + 0x66, 0x72, 0x61, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x6d, 0x69, 0x67, 0x72, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x47, 0x65, + 0x74, 0x53, 0x74, 0x61, 0x67, 0x65, 0x64, 0x44, 0x61, 0x74, 0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x9d, 0x01, 0x0a, 0x0e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x72, + 0x6d, 0x50, 0x72, 0x65, 0x76, 0x69, 0x65, 0x77, 0x12, 0x43, 0x2e, 0x63, 0x68, 0x65, 0x66, 0x2e, + 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x61, 0x74, 0x65, 0x2e, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x2e, + 0x69, 0x6e, 0x66, 0x72, 0x61, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x6d, 0x69, 0x67, 0x72, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x43, + 0x6f, 0x6e, 0x66, 0x69, 0x72, 0x6d, 0x50, 0x72, 0x65, 0x76, 0x69, 0x65, 0x77, 0x1a, 0x44, 0x2e, + 0x63, 0x68, 0x65, 0x66, 0x2e, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x61, 0x74, 0x65, 0x2e, 0x64, 0x6f, + 0x6d, 0x61, 0x69, 0x6e, 0x2e, 0x69, 0x6e, 0x66, 0x72, 0x61, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, + 0x2e, 0x6d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x72, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x72, 0x6d, 0x50, 0x72, 0x65, 0x76, + 0x69, 0x65, 0x77, 0x22, 0x00, 0x42, 0x4a, 0x5a, 0x48, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, + 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x68, 0x65, 0x66, 0x2f, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x61, 0x74, + 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x73, 0x65, 0x72, 0x76, 0x69, + 0x63, 0x65, 0x2f, 0x69, 0x6e, 0x66, 0x72, 0x61, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x6d, + 0x69, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, + 0x65, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var file_interservice_infra_proxy_migrations_service_migrations_proto_goTypes = []interface{}{ - (*request.UploadZipFileRequest)(nil), // 0: chef.automate.domain.infra_proxy.migrations.request.UploadZipFileRequest + (*request.UploadFileRequest)(nil), // 0: chef.automate.domain.infra_proxy.migrations.request.UploadFileRequest (*request.GetMigrationStatusRequest)(nil), // 1: chef.automate.domain.infra_proxy.migrations.request.GetMigrationStatusRequest (*request.CancelMigrationRequest)(nil), // 2: chef.automate.domain.infra_proxy.migrations.request.CancelMigrationRequest (*request.GetStagedDataRequest)(nil), // 3: chef.automate.domain.infra_proxy.migrations.request.GetStagedDataRequest (*request.ConfirmPreview)(nil), // 4: chef.automate.domain.infra_proxy.migrations.request.ConfirmPreview - (*response.UploadZipFileResponse)(nil), // 5: chef.automate.domain.infra_proxy.migrations.response.UploadZipFileResponse + (*response.UploadFileResponse)(nil), // 5: chef.automate.domain.infra_proxy.migrations.response.UploadFileResponse (*response.GetMigrationStatusResponse)(nil), // 6: chef.automate.domain.infra_proxy.migrations.response.GetMigrationStatusResponse (*response.CancelMigrationResponse)(nil), // 7: chef.automate.domain.infra_proxy.migrations.response.CancelMigrationResponse (*response.GetStagedDataResponse)(nil), // 8: chef.automate.domain.infra_proxy.migrations.response.GetStagedDataResponse (*response.ConfirmPreview)(nil), // 9: chef.automate.domain.infra_proxy.migrations.response.ConfirmPreview } var file_interservice_infra_proxy_migrations_service_migrations_proto_depIdxs = []int32{ - 0, // 0: chef.automate.domain.infra_proxy.migrations.service.MigrationDataService.UploadFile:input_type -> chef.automate.domain.infra_proxy.migrations.request.UploadZipFileRequest + 0, // 0: chef.automate.domain.infra_proxy.migrations.service.MigrationDataService.UploadFile:input_type -> chef.automate.domain.infra_proxy.migrations.request.UploadFileRequest 1, // 1: chef.automate.domain.infra_proxy.migrations.service.MigrationDataService.GetMigrationStatus:input_type -> chef.automate.domain.infra_proxy.migrations.request.GetMigrationStatusRequest 2, // 2: chef.automate.domain.infra_proxy.migrations.service.MigrationDataService.CancelMigration:input_type -> chef.automate.domain.infra_proxy.migrations.request.CancelMigrationRequest 3, // 3: chef.automate.domain.infra_proxy.migrations.service.MigrationDataService.GetStagedData:input_type -> chef.automate.domain.infra_proxy.migrations.request.GetStagedDataRequest 4, // 4: chef.automate.domain.infra_proxy.migrations.service.MigrationDataService.ConfirmPreview:input_type -> chef.automate.domain.infra_proxy.migrations.request.ConfirmPreview - 5, // 5: chef.automate.domain.infra_proxy.migrations.service.MigrationDataService.UploadFile:output_type -> chef.automate.domain.infra_proxy.migrations.response.UploadZipFileResponse + 5, // 5: chef.automate.domain.infra_proxy.migrations.service.MigrationDataService.UploadFile:output_type -> chef.automate.domain.infra_proxy.migrations.response.UploadFileResponse 6, // 6: chef.automate.domain.infra_proxy.migrations.service.MigrationDataService.GetMigrationStatus:output_type -> chef.automate.domain.infra_proxy.migrations.response.GetMigrationStatusResponse 7, // 7: chef.automate.domain.infra_proxy.migrations.service.MigrationDataService.CancelMigration:output_type -> chef.automate.domain.infra_proxy.migrations.response.CancelMigrationResponse 8, // 8: chef.automate.domain.infra_proxy.migrations.service.MigrationDataService.GetStagedData:output_type -> chef.automate.domain.infra_proxy.migrations.response.GetStagedDataResponse @@ -205,8 +205,8 @@ func (c *migrationDataServiceClient) UploadFile(ctx context.Context, opts ...grp } type MigrationDataService_UploadFileClient interface { - Send(*request.UploadZipFileRequest) error - CloseAndRecv() (*response.UploadZipFileResponse, error) + Send(*request.UploadFileRequest) error + CloseAndRecv() (*response.UploadFileResponse, error) grpc.ClientStream } @@ -214,15 +214,15 @@ type migrationDataServiceUploadFileClient struct { grpc.ClientStream } -func (x *migrationDataServiceUploadFileClient) Send(m *request.UploadZipFileRequest) error { +func (x *migrationDataServiceUploadFileClient) Send(m *request.UploadFileRequest) error { return x.ClientStream.SendMsg(m) } -func (x *migrationDataServiceUploadFileClient) CloseAndRecv() (*response.UploadZipFileResponse, error) { +func (x *migrationDataServiceUploadFileClient) CloseAndRecv() (*response.UploadFileResponse, error) { if err := x.ClientStream.CloseSend(); err != nil { return nil, err } - m := new(response.UploadZipFileResponse) + m := new(response.UploadFileResponse) if err := x.ClientStream.RecvMsg(m); err != nil { return nil, err } @@ -303,8 +303,8 @@ func _MigrationDataService_UploadFile_Handler(srv interface{}, stream grpc.Serve } type MigrationDataService_UploadFileServer interface { - SendAndClose(*response.UploadZipFileResponse) error - Recv() (*request.UploadZipFileRequest, error) + SendAndClose(*response.UploadFileResponse) error + Recv() (*request.UploadFileRequest, error) grpc.ServerStream } @@ -312,12 +312,12 @@ type migrationDataServiceUploadFileServer struct { grpc.ServerStream } -func (x *migrationDataServiceUploadFileServer) SendAndClose(m *response.UploadZipFileResponse) error { +func (x *migrationDataServiceUploadFileServer) SendAndClose(m *response.UploadFileResponse) error { return x.ServerStream.SendMsg(m) } -func (x *migrationDataServiceUploadFileServer) Recv() (*request.UploadZipFileRequest, error) { - m := new(request.UploadZipFileRequest) +func (x *migrationDataServiceUploadFileServer) Recv() (*request.UploadFileRequest, error) { + m := new(request.UploadFileRequest) if err := x.ServerStream.RecvMsg(m); err != nil { return nil, err } diff --git a/api/interservice/infra_proxy/migrations/service/migrations.proto b/api/interservice/infra_proxy/migrations/service/migrations.proto index 6e809629b1b..9b4c71b0987 100644 --- a/api/interservice/infra_proxy/migrations/service/migrations.proto +++ b/api/interservice/infra_proxy/migrations/service/migrations.proto @@ -9,7 +9,7 @@ import "google/api/annotations.proto"; service MigrationDataService{ - rpc UploadFile (stream chef.automate.domain.infra_proxy.migrations.request.UploadZipFileRequest) returns (chef.automate.domain.infra_proxy.migrations.response.UploadZipFileResponse) {}; + rpc UploadFile (stream chef.automate.domain.infra_proxy.migrations.request.UploadFileRequest) returns (chef.automate.domain.infra_proxy.migrations.response.UploadFileResponse) {}; rpc GetMigrationStatus (chef.automate.domain.infra_proxy.migrations.request.GetMigrationStatusRequest) returns (chef.automate.domain.infra_proxy.migrations.response.GetMigrationStatusResponse) {}; rpc CancelMigration (chef.automate.domain.infra_proxy.migrations.request.CancelMigrationRequest) returns (chef.automate.domain.infra_proxy.migrations.response.CancelMigrationResponse) {}; rpc GetStagedData (chef.automate.domain.infra_proxy.migrations.request.GetStagedDataRequest) returns (chef.automate.domain.infra_proxy.migrations.response.GetStagedDataResponse) {}; diff --git a/components/authz-service/storage/postgres/migration/sql/README.md b/components/authz-service/storage/postgres/migration/sql/README.md index 6fdc47c66f4..b77b9691030 100644 --- a/components/authz-service/storage/postgres/migration/sql/README.md +++ b/components/authz-service/storage/postgres/migration/sql/README.md @@ -79,4 +79,5 @@ - [`77_update_infra_service_policies.up.sql`](77_update_infra_service_policies.up.sql) - [`78_update_viewer_role_pols.up.sql`](78_update_viewer_role_pols.up.sql) - [`79_infra_editor_update.up.sql`](79_infra_editor_update.up.sql) -- [`80_infra_project_owner.up.sql`](80_infra_project_owner.up.sql) \ No newline at end of file +- [`80_infra_project_owner.up.sql`](80_infra_project_owner.up.sql) + diff --git a/components/automate-gateway/api/migrations.pb.swagger.go b/components/automate-gateway/api/migrations.pb.swagger.go index b914b07afe2..00c58beef09 100644 --- a/components/automate-gateway/api/migrations.pb.swagger.go +++ b/components/automate-gateway/api/migrations.pb.swagger.go @@ -16,7 +16,7 @@ func init() { "paths": { "/api/v0/infra/servers/migrations/staged_data/{migration_id}": { "get": { - "operationId": "InfraProxyMigration_GetStagedData", + "operationId": "InfraProxyMigrationService_GetStagedData", "responses": { "200": { "description": "A successful response.", @@ -41,13 +41,13 @@ func init() { } ], "tags": [ - "InfraProxyMigration" + "InfraProxyMigrationService" ] } }, "/api/v0/infra/servers/migrations/status/{migration_id}": { "get": { - "operationId": "InfraProxyMigration_GetMigrationStatus", + "operationId": "InfraProxyMigrationService_GetMigrationStatus", "responses": { "200": { "description": "A successful response.", @@ -72,13 +72,13 @@ func init() { } ], "tags": [ - "InfraProxyMigration" + "InfraProxyMigrationService" ] } }, "/api/v0/infra/servers/{server_id}/migrations/cancel_migration/{migration_id}": { "get": { - "operationId": "InfraProxyMigration_CancelMigration", + "operationId": "InfraProxyMigrationService_CancelMigration", "responses": { "200": { "description": "A successful response.", @@ -110,13 +110,13 @@ func init() { } ], "tags": [ - "InfraProxyMigration" + "InfraProxyMigrationService" ] } }, "/api/v0/infra/servers/{server_id}/migrations/confirm_preview/{migration_id}": { "get": { - "operationId": "InfraProxyMigration_ConfirmPreview", + "operationId": "InfraProxyMigrationService_ConfirmPreview", "responses": { "200": { "description": "A successful response.", @@ -148,7 +148,7 @@ func init() { } ], "tags": [ - "InfraProxyMigration" + "InfraProxyMigrationService" ] } } @@ -236,13 +236,13 @@ func init() { "users": { "type": "array", "items": { - "$ref": "#/definitions/chef.automate.api.infra_proxy.migrations.response.user" + "$ref": "#/definitions/chef.automate.api.infra_proxy.migrations.response.User" }, "title": "Users" } } }, - "chef.automate.api.infra_proxy.migrations.response.user": { + "chef.automate.api.infra_proxy.migrations.response.User": { "type": "object", "properties": { "username": { diff --git a/components/automate-gateway/gateway/services.go b/components/automate-gateway/gateway/services.go index 78886a53772..d4fdb14245f 100644 --- a/components/automate-gateway/gateway/services.go +++ b/components/automate-gateway/gateway/services.go @@ -329,7 +329,7 @@ func (s *Server) RegisterGRPCServices(grpcServer *grpc.Server) error { } pb_infra_proxy.RegisterInfraProxyServer(grpcServer, handler_infra_proxy.NewInfraProxyHandler(infraProxyClient)) - pb_infra_proxy_migrations.RegisterInfraProxyMigrationServer(grpcServer, handler_infra_proxy_migration.NewInfraProxyMigrationHandler(infraProxyMigrationClient)) + pb_infra_proxy_migrations.RegisterInfraProxyMigrationServiceServer(grpcServer, handler_infra_proxy_migration.NewInfraProxyMigrationHandler(infraProxyMigrationClient)) userSettingsClient, err := clients.UserSettingsClient() if err != nil { @@ -384,7 +384,7 @@ func unversionedRESTMux(grpcURI string, dopts []grpc.DialOption) (http.Handler, "data-lifecycle": pb_data_lifecycle.RegisterDataLifecycleHandlerFromEndpoint, "applications": pb_apps.RegisterApplicationsServiceHandlerFromEndpoint, "infra-proxy": pb_infra_proxy.RegisterInfraProxyHandlerFromEndpoint, - "infra-proxy-migrations": pb_infra_proxy_migrations.RegisterInfraProxyMigrationHandlerFromEndpoint, + "infra-proxy-migrations": pb_infra_proxy_migrations.RegisterInfraProxyMigrationServiceHandlerFromEndpoint, "user-settings": pb_user_settings.RegisterUserSettingsServiceHandlerFromEndpoint, }) } @@ -1031,7 +1031,7 @@ func (s *Server) UploadZipFile(w http.ResponseWriter, r *http.Request) { return } - request := infra_proxy.UploadZipFileRequest{ + request := infra_proxy.UploadFileRequest{ ServerId: serverId, Meta: &infra_proxy.Metadata{ ContentType: cType, @@ -1065,7 +1065,7 @@ func (s *Server) UploadZipFile(w http.ResponseWriter, r *http.Request) { log.Fatal("cannot read chunk to buffer: ", err) } - request := infra_proxy.UploadZipFileRequest{ + request := infra_proxy.UploadFileRequest{ ServerId: serverId, Chunk: &infra_proxy.Chunk{Data: buffer[:n]}, Meta: &infra_proxy.Metadata{ diff --git a/components/automate-ui/src/app/entities/orgs/org.actions.ts b/components/automate-ui/src/app/entities/orgs/org.actions.ts index 12e9bb11d63..2098ab97a9d 100644 --- a/components/automate-ui/src/app/entities/orgs/org.actions.ts +++ b/components/automate-ui/src/app/entities/orgs/org.actions.ts @@ -1,27 +1,33 @@ import { HttpErrorResponse } from '@angular/common/http'; import { Action } from '@ngrx/store'; -import { Org, UploadFile } from './org.model'; +import { Org, UploadFile, PreviewData } from './org.model'; export enum OrgActionTypes { - GET_ALL = 'ORGS::GET_ALL', - GET_ALL_SUCCESS = 'ORGS::GET_ALL::SUCCESS', - GET_ALL_FAILURE = 'ORGS::GET_ALL::FAILURE', - GET = 'ORGS::GET', - GET_SUCCESS = 'ORGS::GET::SUCCESS', - GET_FAILURE = 'ORGS::GET::FAILURE', - CREATE = 'ORGS::CREATE', - CREATE_SUCCESS = 'ORGS::CREATE::SUCCESS', - CREATE_FAILURE = 'ORGS::CREATE::FAILURE', - DELETE = 'ORGS::DELETE', - DELETE_SUCCESS = 'ORGS::DELETE::SUCCESS', - DELETE_FAILURE = 'ORGS::DELETE::FAILURE', - UPDATE = 'ORGS::UPDATE', - UPDATE_SUCCESS = 'ORGS::UPDATE::SUCCESS', - UPDATE_FAILURE = 'ORGS::UPDATE::FAILURE', - UPLOAD = 'ORGS::UPLOAD', - UPLOAD_SUCCESS = 'ORGS::UPLOAD::SUCCESS', - UPLOAD_FAILURE = 'ORGS::UPLOAD::FAILURE' + GET_ALL = 'ORGS::GET_ALL', + GET_ALL_SUCCESS = 'ORGS::GET_ALL::SUCCESS', + GET_ALL_FAILURE = 'ORGS::GET_ALL::FAILURE', + GET = 'ORGS::GET', + GET_SUCCESS = 'ORGS::GET::SUCCESS', + GET_FAILURE = 'ORGS::GET::FAILURE', + CREATE = 'ORGS::CREATE', + CREATE_SUCCESS = 'ORGS::CREATE::SUCCESS', + CREATE_FAILURE = 'ORGS::CREATE::FAILURE', + DELETE = 'ORGS::DELETE', + DELETE_SUCCESS = 'ORGS::DELETE::SUCCESS', + DELETE_FAILURE = 'ORGS::DELETE::FAILURE', + UPDATE = 'ORGS::UPDATE', + UPDATE_SUCCESS = 'ORGS::UPDATE::SUCCESS', + UPDATE_FAILURE = 'ORGS::UPDATE::FAILURE', + UPLOAD = 'ORGS::UPLOAD', + UPLOAD_SUCCESS = 'ORGS::UPLOAD::SUCCESS', + UPLOAD_FAILURE = 'ORGS::UPLOAD::FAILURE', + CANCEL_MIGRATION = 'ORGS::CANCEL::MIGRATION', + CANCEL_MIGRATION_SUCCESS = 'ORGS::CANCEL::MIGRATION::SUCCESS', + CANCEL_MIGRATION_FAILURE = 'ORGS::CANCEL::MIGRATION::FAILURE', + GET_PREVIEW_DATA = 'ORGS::GET_PREVIEW_DATA', + GET_PREVIEW_DATA_SUCCESS = 'ORGS::GET_PREVIEW_DATA::SUCCESS', + GET_PREVIEW_DATA_FAILURE = 'ORGS::GET_PREVIEW_DATA::FAILURE' } export interface OrgSuccessPayload { @@ -150,6 +156,52 @@ export class UploadZipFailure implements Action { constructor(public payload: HttpErrorResponse) { } } +export interface CancelSuccessPayload { + success: boolean; + error: []; +} + +export class CancelMigration implements Action { + readonly type = OrgActionTypes.CANCEL_MIGRATION; + + constructor(public payload: { server_id: string, migration_id: string}) { } +} + +export class CancelMigrationSuccess implements Action { + readonly type = OrgActionTypes.CANCEL_MIGRATION_SUCCESS; + + constructor(public payload: CancelSuccessPayload) { } +} + +export class CancelMigrationFailure implements Action { + readonly type = OrgActionTypes.CANCEL_MIGRATION_FAILURE; + + constructor(public payload: HttpErrorResponse) { } +} + +export interface PreviewSuccessPayload { + staged_data: any; + PreviewData: PreviewData[]; +} + +export class GetPreviewData implements Action { + readonly type = OrgActionTypes.GET_PREVIEW_DATA; + + constructor(public payload: { migration_id: string}) {} +} + +export class GetPreviewDataSuccess implements Action { + readonly type = OrgActionTypes.GET_PREVIEW_DATA_SUCCESS; + + constructor(public payload: PreviewSuccessPayload) {} +} + +export class GetPreviewDataFailure implements Action { + readonly type = OrgActionTypes.GET_PREVIEW_DATA_FAILURE; + + constructor(public payload: HttpErrorResponse) {} +} + export type OrgActions = | GetOrgs | GetOrgsSuccess @@ -168,4 +220,10 @@ export type OrgActions = | UpdateOrgFailure | UploadZip | UploadZipSuccess - | UploadZipFailure; + | UploadZipFailure + | CancelMigration + | CancelMigrationSuccess + | CancelMigrationFailure + | GetPreviewData + | GetPreviewDataSuccess + | GetPreviewDataFailure; diff --git a/components/automate-ui/src/app/entities/orgs/org.effects.ts b/components/automate-ui/src/app/entities/orgs/org.effects.ts index 92a3ef25020..ea02bbbac52 100644 --- a/components/automate-ui/src/app/entities/orgs/org.effects.ts +++ b/components/automate-ui/src/app/entities/orgs/org.effects.ts @@ -30,6 +30,12 @@ import { UploadZipSuccess, UploadZipFailure, UploadSuccessPayload, + CancelMigration, + CancelMigrationSuccess, + CancelMigrationFailure, + GetPreviewData, + GetPreviewDataSuccess, + GetPreviewDataFailure, OrgActionTypes } from './org.actions'; @@ -191,6 +197,53 @@ export class OrgEffects { type: Type.error, message: `Could not upload file: ${msg || payload.error}` }); - }))); + }))); + + cancelMigration$ = createEffect(() => + this.actions$.pipe( + ofType(OrgActionTypes.CANCEL_MIGRATION), + mergeMap(({ payload: { server_id, migration_id } }: CancelMigration) => + this.requests.cancelMigration(server_id, migration_id).pipe( + map((resp) => new CancelMigrationSuccess(resp)), + catchError((error: HttpErrorResponse) => + observableOf(new CancelMigrationFailure(error))))))); + + cancelMigrationSuccess$ = createEffect(() => + this.actions$.pipe( + ofType(OrgActionTypes.CANCEL_MIGRATION_SUCCESS), + map((_) => new CreateNotification({ + type: Type.info, + message: 'Cancelled migration.' + })))); + cancelMigrationFailure$ = createEffect(() => + this.actions$.pipe( + ofType(OrgActionTypes.CANCEL_MIGRATION_FAILURE), + map(({ payload }: CancelMigrationFailure) => { + const msg = payload.error.error; + return new CreateNotification({ + type: Type.error, + message: `Could not cancel migration: ${msg || payload.error}` + }); + }))); + + getPreviewData$ = createEffect(() => + this.actions$.pipe( + ofType(OrgActionTypes.GET_PREVIEW_DATA), + mergeMap(({ payload: { migration_id } }: GetPreviewData) => + this.requests.getPreviewData(migration_id).pipe( + map((resp) => new GetPreviewDataSuccess(resp)), + catchError((error: HttpErrorResponse) => + observableOf(new GetPreviewDataFailure(error))))))); + + getPreviewDataFailure$ = createEffect(() => + this.actions$.pipe( + ofType(OrgActionTypes.GET_PREVIEW_DATA_FAILURE), + map(({ payload }: GetPreviewDataFailure) => { + const msg = payload.error.error; + return new CreateNotification({ + type: Type.error, + message: `Could not get preview data: ${msg || payload.error}` + }); + }))); } diff --git a/components/automate-ui/src/app/entities/orgs/org.model.ts b/components/automate-ui/src/app/entities/orgs/org.model.ts index 4139dbf3a8e..d1debd9138e 100644 --- a/components/automate-ui/src/app/entities/orgs/org.model.ts +++ b/components/automate-ui/src/app/entities/orgs/org.model.ts @@ -9,3 +9,27 @@ export interface Org { export interface UploadFile { formData: FormData; } + +export interface PreviewData { + migration_id: string; + staged_data: { + orgs_to_migrate: number; + orgs_to_skip: number; + orgs_to_update: number; + orgs_to_delete: number; + users: [] + }; +} + +export interface User { + username: string; + email: string; + display_name: string; + first_name: string; + last_name: string; + middle_name: string; + automate_username: string; + connector: string; + is_conflicting: boolean; + is_admin: boolean; +} diff --git a/components/automate-ui/src/app/entities/orgs/org.reducer.ts b/components/automate-ui/src/app/entities/orgs/org.reducer.ts index 0ebf48d30bd..45b7d1ceab3 100644 --- a/components/automate-ui/src/app/entities/orgs/org.reducer.ts +++ b/components/automate-ui/src/app/entities/orgs/org.reducer.ts @@ -3,7 +3,7 @@ import { HttpErrorResponse } from '@angular/common/http'; import { set, pipe, unset } from 'lodash/fp'; import { EntityStatus } from 'app/entities/entities'; -import { OrgActionTypes, OrgActions, UploadSuccessPayload } from './org.actions'; +import { OrgActionTypes, OrgActions, UploadSuccessPayload, PreviewSuccessPayload } from './org.actions'; import { Org } from './org.model'; export interface OrgEntityState extends EntityState { @@ -15,6 +15,9 @@ export interface OrgEntityState extends EntityState { deleteStatus: EntityStatus; uploadStatus: EntityStatus; uploadDetails: UploadSuccessPayload; + cancelStatus: EntityStatus; + previewStatus: EntityStatus; + previewData: PreviewSuccessPayload; } const GET_ALL_STATUS = 'getAllStatus'; @@ -24,6 +27,8 @@ const CREATE_ERROR = 'createError'; const DELETE_STATUS = 'deleteStatus'; const UPDATE_STATUS = 'updateStatus'; const UPLOAD_STATUS = 'uploadStatus'; +const CANCEL_STATUS = 'cancelStatus'; +const PREVIEW_STATUS = 'previewStatus'; export const orgEntityAdapter: EntityAdapter = createEntityAdapter(); @@ -36,8 +41,9 @@ export const OrgEntityInitialState: OrgEntityState = deleteStatus: EntityStatus.notLoaded, updateStatus: EntityStatus.notLoaded, uploadStatus: EntityStatus.notLoaded, - uploadDetails: null - + uploadDetails: null, + cancelStatus: EntityStatus.notLoaded, + previewData: null }); export function orgEntityReducer( @@ -116,6 +122,27 @@ export function orgEntityReducer( case OrgActionTypes.UPLOAD_FAILURE: return set(UPLOAD_STATUS, EntityStatus.loadingFailure, state); + case OrgActionTypes.CANCEL_MIGRATION: + return set(CANCEL_STATUS, EntityStatus.loading, state); + + case OrgActionTypes.CANCEL_MIGRATION_SUCCESS: + return set(CANCEL_STATUS, EntityStatus.loadingSuccess, state); + + case OrgActionTypes.CANCEL_MIGRATION_FAILURE: + return set(CANCEL_STATUS, EntityStatus.loadingFailure, state); + + case OrgActionTypes.GET_PREVIEW_DATA: + return set(PREVIEW_STATUS, EntityStatus.loading, state); + + case OrgActionTypes.GET_PREVIEW_DATA_SUCCESS: + return pipe( + set('previewData', action.payload), + set(PREVIEW_STATUS, EntityStatus.loadingSuccess) + )(state) as OrgEntityState; + + case OrgActionTypes.GET_PREVIEW_DATA_FAILURE: + return set(PREVIEW_STATUS, EntityStatus.loadingFailure, state); + default: return state; } diff --git a/components/automate-ui/src/app/entities/orgs/org.requests.ts b/components/automate-ui/src/app/entities/orgs/org.requests.ts index 2e320fbaeb9..a247ed3853a 100644 --- a/components/automate-ui/src/app/entities/orgs/org.requests.ts +++ b/components/automate-ui/src/app/entities/orgs/org.requests.ts @@ -7,7 +7,9 @@ import { OrgsSuccessPayload, OrgSuccessPayload, CreateOrgPayload, - UploadSuccessPayload + UploadSuccessPayload, + CancelSuccessPayload, + PreviewSuccessPayload } from './org.actions'; @Injectable() @@ -43,4 +45,15 @@ export class OrgRequests { return this.http.post (`${env.infra_proxy_url}/servers/migrations/upload`, formData); } + + public cancelMigration(server_id: string, migration_id: string) + : Observable { + return this.http.get( + `${env.infra_proxy_url}/servers/${server_id}/migrations/cancel_migration/${migration_id}`); + } + + public getPreviewData(migration_id: string): Observable { + return this.http.get(` + ${env.infra_proxy_url}/servers/migrations/staged_data/${migration_id}`); + } } diff --git a/components/automate-ui/src/app/entities/orgs/org.selectors.ts b/components/automate-ui/src/app/entities/orgs/org.selectors.ts index a9581cc0ff4..58bfbe07ea8 100644 --- a/components/automate-ui/src/app/entities/orgs/org.selectors.ts +++ b/components/automate-ui/src/app/entities/orgs/org.selectors.ts @@ -55,3 +55,19 @@ export const uploadDetails = createSelector( orgState, (state) => state.uploadDetails ); + +export const cancelStatus = createSelector( + orgState, + (state) => state.cancelStatus +); + +export const previewStatus = createSelector( + orgState, + (state) => state.previewStatus +); + + +export const previewData = createSelector( + orgState, + (state) => state.previewData +); diff --git a/components/automate-ui/src/app/modules/infra-proxy/chef-server-details/chef-server-details.component.html b/components/automate-ui/src/app/modules/infra-proxy/chef-server-details/chef-server-details.component.html index 3bb6e2f27b0..8588a23160a 100644 --- a/components/automate-ui/src/app/modules/infra-proxy/chef-server-details/chef-server-details.component.html +++ b/components/automate-ui/src/app/modules/infra-proxy/chef-server-details/chef-server-details.component.html @@ -83,9 +83,11 @@ /> {{stepsCompleted}} Steps Completed - + Click to Preview @@ -309,6 +311,14 @@ [updatingWebuiKey]="updatingWebuiKey" (updateWebuiKeyClicked)="updateWebuiKey()"> + + diff --git a/components/automate-ui/src/app/modules/infra-proxy/chef-server-details/chef-server-details.component.scss b/components/automate-ui/src/app/modules/infra-proxy/chef-server-details/chef-server-details.component.scss index a5ccee60efe..eb20c931b0c 100644 --- a/components/automate-ui/src/app/modules/infra-proxy/chef-server-details/chef-server-details.component.scss +++ b/components/automate-ui/src/app/modules/infra-proxy/chef-server-details/chef-server-details.component.scss @@ -306,3 +306,12 @@ img { .chef-server-info-text { margin-left: 14px; } +.migrationSlider-link { + padding-left: 10px; + text-decoration: underline; + float: right; + + a { + cursor: pointer; + } +} diff --git a/components/automate-ui/src/app/modules/infra-proxy/chef-server-details/chef-server-details.component.ts b/components/automate-ui/src/app/modules/infra-proxy/chef-server-details/chef-server-details.component.ts index a42209a1122..b2a7982a11c 100644 --- a/components/automate-ui/src/app/modules/infra-proxy/chef-server-details/chef-server-details.component.ts +++ b/components/automate-ui/src/app/modules/infra-proxy/chef-server-details/chef-server-details.component.ts @@ -34,7 +34,14 @@ import { ValidateWebUIKey // , GetUsers } from 'app/entities/servers/server.actions'; -import { GetOrgs, CreateOrg, DeleteOrg, UploadZip } from 'app/entities/orgs/org.actions'; +import { + GetOrgs, + CreateOrg, + DeleteOrg, + UploadZip, + CancelMigration, + GetPreviewData +} from 'app/entities/orgs/org.actions'; import { Org } from 'app/entities/orgs/org.model'; import { createStatus, @@ -43,7 +50,10 @@ import { getAllStatus as getAllOrgsForServerStatus, deleteStatus as deleteOrgStatus, uploadStatus, - uploadDetails + uploadDetails, + cancelStatus, + previewStatus, + previewData } from 'app/entities/orgs/org.selectors'; import { ProjectConstants } from 'app/entities/projects/project.model'; import { TelemetryService } from 'app/services/telemetry/telemetry.service'; @@ -122,6 +132,15 @@ export class ChefServerDetailsComponent implements OnInit, OnDestroy { 13: 'Migration Completed' }; + public migration_id: string; + public cancelMigrationInProgress = false; + public canceMigrationSuccessful = false; + public isCancelled = false; + + public previewDataLoaded = false; + public previewData; + public isPreview = false; + @ViewChild('upload', { static: false }) upload: SyncOrgUsersSliderComponent; constructor( @@ -234,6 +253,7 @@ export class ChefServerDetailsComponent implements OnInit, OnDestroy { this.migrationStarted = true; this.getMigrationStatus(this.server.migration_id); } + this.migration_id = this.server.migration_id; }); combineLatest([ @@ -309,7 +329,7 @@ export class ChefServerDetailsComponent implements OnInit, OnDestroy { if (uploadStatusSt === EntityStatus.loadingSuccess && !isNil(uploadDetailsState)) { // show migration slider this.isUploaded = true; - this.migrationID = uploadDetailsState.migrationId; + this.migration_id = uploadDetailsState.migrationId; } else if (uploadStatusSt === EntityStatus.loadingFailure) { // close upload slider with error notification this.isUploaded = false; @@ -317,6 +337,30 @@ export class ChefServerDetailsComponent implements OnInit, OnDestroy { } }); + this.store.select(cancelStatus).pipe( + takeUntil(this.isDestroyed), + filter(state => this.cancelMigrationInProgress && !pending(state))) + .subscribe((state) => { + this.cancelMigrationInProgress = false; + this.canceMigrationSuccessful = (state === EntityStatus.loadingSuccess); + if (this.canceMigrationSuccessful) { + this.isCancelled = true; + } + }); + + combineLatest([ + this.store.select(previewStatus), + this.store.select(previewData) + ]).pipe(takeUntil(this.isDestroyed)) + .subscribe(([previewStatusSt, previewState]) => { + if (previewStatusSt === EntityStatus.loadingSuccess && !isNil(previewState)) { + this.previewData = previewState.staged_data; + this.isPreview = true; + } else if (previewStatusSt === EntityStatus.loadingFailure) { + this.previewDataLoaded = false; + } + }); + setTimeout(() => { if (this.isServerLoaded) { this.validateWebUIKey(this.server); @@ -477,7 +521,7 @@ export class ChefServerDetailsComponent implements OnInit, OnDestroy { this.store.dispatch(new UpdateWebUIKey(webuikey)); } - // upload zip slider functions + // upload zip slider function public uploadZipFile(file: File): void { const formData: FormData = new FormData(); if (file) { @@ -491,4 +535,27 @@ export class ChefServerDetailsComponent implements OnInit, OnDestroy { this.migrationStarted = true; this.getMigrationStatus(this.server.migration_id); } + + // cancel migration function + public cancelMigration(migration_id: string): void { + console.log('migrationId', migration_id); + const payload = { + server_id : this.server.id, + migration_id : migration_id + }; + this.store.dispatch(new CancelMigration(payload)); + } + + // get migraion preview function + public getPreviewData() { + const payload = { + // migration_id: this.migration_id + migration_id: '1234' + }; + this.store.dispatch(new GetPreviewData(payload)); + } + + public migrationPreview() { + console.log(); + } } diff --git a/components/automate-ui/src/app/modules/infra-proxy/migration-slider/migration-slider.component.html b/components/automate-ui/src/app/modules/infra-proxy/migration-slider/migration-slider.component.html index 221db8368f0..7854c3105d7 100644 --- a/components/automate-ui/src/app/modules/infra-proxy/migration-slider/migration-slider.component.html +++ b/components/automate-ui/src/app/modules/infra-proxy/migration-slider/migration-slider.component.html @@ -1,4 +1,5 @@
+
arrow_back @@ -10,18 +11,89 @@

Migration

-
-
- +
+

You have the option to choose which users to migrate

+
+
+

We have found Orgs to be migrated, skipped and Updated .

+
    +
  • + Migrated Orgs + {{previewData?.orgs_to_migrate}} +
  • +
  • + Skipped Orgs + {{previewData?.orgs_to_skip}} +
  • +
  • + Updated Orgs + {{previewData?.orgs_to_update}} +
  • +
+
+
+

We have found Users to be migrated.

+
    +
  • + Users + {{previewData?.users.length || 0}} +
  • +
+
+
+
+ +
+ + + + + + + Chef Server User + Automate User + + + + + + + + + + + {{user.username}} + + + {{user.automate_username}} + + + + + +

+ Warning. User already exists in Automate. This will overwrite this users IAM settings. +

+
+
+
+
- - Cancel + + Cancel Migration - - - Continue - Uploading File ... + + confirm Migration
diff --git a/components/automate-ui/src/app/modules/infra-proxy/migration-slider/migration-slider.component.scss b/components/automate-ui/src/app/modules/infra-proxy/migration-slider/migration-slider.component.scss index e57263377a6..840778b1c9a 100644 --- a/components/automate-ui/src/app/modules/infra-proxy/migration-slider/migration-slider.component.scss +++ b/components/automate-ui/src/app/modules/infra-proxy/migration-slider/migration-slider.component.scss @@ -24,4 +24,115 @@ margin-left: 0; } } + + .sidenav-body { + .meta-box { + border: 0.5px solid $chef-key-tab; + border-radius: 4px; + margin-bottom: 1.5em; + padding: 1em 2em 1em; + background: $chef-white; + + h3 { + font-size: 18px; + line-height: 27px; + font-weight: 700; + margin-bottom: 20px; + } + + .meta-wrapper { + display: flex; + + .summary-body { + width: 50%; + font-size: 13px; + + p { + height: 6vh; + + .heading { + font-weight: bold; + } + } + + ul { + color: $chef-primary-dark; + list-style: none; + padding: 0; + + li { + display: flex; + margin-bottom: 5px; + + span { + font-size: 13px; + line-height: 21px; + letter-spacing: 0.2px; + + &:first-child { + width: 50%; + } + } + } + } + } + } + } + + #migration-table-container { + margin-bottom: 6vh; + + .no-border { + background-color: $chef-white; + } + + chef-td { + padding: 6px 14px; + } + + .first { + width: 5%; + } + + .middle { + width: 30%; + + input[type="text"] { + height: 35px; + + &:disabled { + opacity: 0.5; + background-color: $chef-grey; + border: none; + } + } + } + } + + .warning-msg { + margin-bottom: 0; + line-height: 21px; + letter-spacing: 0.2px; + + &::before { + display: inline-block; + content: ''; + background: url('/assets/img/warning.png'); + width: 11px; + height: 13.5px; + background-size: 11px 13.5px; + margin-right: 7px; + } + } + + ::ng-deep chef-checkbox .check-wrap { + min-width: 15px; + width: 15px; + height: 15px; + } + + #button-bar { + text-align: right; + } + } } diff --git a/components/automate-ui/src/app/modules/infra-proxy/migration-slider/migration-slider.component.spec.ts b/components/automate-ui/src/app/modules/infra-proxy/migration-slider/migration-slider.component.spec.ts deleted file mode 100644 index 262682b3a10..00000000000 --- a/components/automate-ui/src/app/modules/infra-proxy/migration-slider/migration-slider.component.spec.ts +++ /dev/null @@ -1,25 +0,0 @@ -import { ComponentFixture, TestBed } from '@angular/core/testing'; - -import { MigrationSliderComponent } from './migration-slider.component'; - -describe('MigrationSliderComponent', () => { - let component: MigrationSliderComponent; - let fixture: ComponentFixture; - - beforeEach(async () => { - await TestBed.configureTestingModule({ - declarations: [ MigrationSliderComponent ] - }) - .compileComponents(); - }); - - beforeEach(() => { - fixture = TestBed.createComponent(MigrationSliderComponent); - component = fixture.componentInstance; - fixture.detectChanges(); - }); - - it('should create', () => { - expect(component).toBeTruthy(); - }); -}); diff --git a/components/automate-ui/src/app/modules/infra-proxy/migration-slider/migration-slider.component.ts b/components/automate-ui/src/app/modules/infra-proxy/migration-slider/migration-slider.component.ts index 0cc1902cd3e..947b71364f2 100644 --- a/components/automate-ui/src/app/modules/infra-proxy/migration-slider/migration-slider.component.ts +++ b/components/automate-ui/src/app/modules/infra-proxy/migration-slider/migration-slider.component.ts @@ -1,4 +1,8 @@ -import { Component, HostBinding } from '@angular/core'; +import { Component, EventEmitter, HostBinding, Input, Output } from '@angular/core'; +import { FormBuilder, FormGroup } from '@angular/forms'; +import { IdMapper } from 'app/helpers/auth/id-mapper'; +import { Utilities } from 'app/helpers/utilities/utilities'; +import { User } from '../../../entities/orgs/org.model'; @Component({ selector: 'app-migration-slider', @@ -6,25 +10,61 @@ import { Component, HostBinding } from '@angular/core'; styleUrls: ['./migration-slider.component.scss'] }) export class MigrationSliderComponent { - public migrating = false; + @Input() migrationID: string; + @Input() isPreview: boolean; + @Input() previewData; + @Output() migrationPreview = new EventEmitter(); + @Output() cancelMigration = new EventEmitter(); + + public checkedUser = false; + public migrationForm: FormGroup; + public usersData: User[]; + @HostBinding('class.active') isSlideOpen1 = false; - constructor() { } + constructor( + private fb: FormBuilder + ) { + this.migrationForm = this.fb.group({ + name: [''] + }); + } closeMigrationSlider() { this.toggleSlide(); } + cancelMigrationclicked() { + this.toggleSlide(); + this.cancelMigration.emit(this.migrationID); + } + toggleSlide() { this.isSlideOpen1 = !this.isSlideOpen1; } migrationFile() { this.toggleSlide(); + this.migrationPreview.emit(this.migrationForm); } slidePanel() { - console.log('migration part'); this.isSlideOpen1 = true; } + + selectedAllUsers(event: any) { + const checked = event.target.checked; + this.previewData.users.forEach(item => item.selected = checked); + } + + selectedUser(value: boolean) { + console.log(value); + } + + handleNameInput(event: KeyboardEvent): void { + if (!Utilities.isNavigationKey(event)) { + this.migrationForm.controls.name.setValue( + IdMapper.transform(this.migrationForm.controls.name.value.trim())); + } + } } diff --git a/components/automate-ui/src/app/modules/infra-proxy/sync-org-users-slider/sync-org-users-slider.component.html b/components/automate-ui/src/app/modules/infra-proxy/sync-org-users-slider/sync-org-users-slider.component.html index a122dd44e41..fb13b7d1529 100644 --- a/components/automate-ui/src/app/modules/infra-proxy/sync-org-users-slider/sync-org-users-slider.component.html +++ b/components/automate-ui/src/app/modules/infra-proxy/sync-org-users-slider/sync-org-users-slider.component.html @@ -43,8 +43,5 @@

OR

- -
diff --git a/components/automate-ui/src/app/modules/infra-proxy/sync-org-users-slider/sync-org-users-slider.component.ts b/components/automate-ui/src/app/modules/infra-proxy/sync-org-users-slider/sync-org-users-slider.component.ts index 791d3c206e9..c44aa2b00cf 100644 --- a/components/automate-ui/src/app/modules/infra-proxy/sync-org-users-slider/sync-org-users-slider.component.ts +++ b/components/automate-ui/src/app/modules/infra-proxy/sync-org-users-slider/sync-org-users-slider.component.ts @@ -68,20 +68,6 @@ export class SyncOrgUsersSliderComponent implements OnInit { this.isSlideOpen = true; } - public openMigrationSlider(): void { - this.migrationSliderVisible = true; - this.resetMigrationSlider(); - } - - public closeMigrationSlider(): void { - this.migrationSliderVisible = false; - this.resetMigrationSlider(); - } - - private resetMigrationSlider(): void { - this.conflictErrorEvent.emit(false); - } - /*** on file drop handler */ onFileDropped($event: any[]) { this.prepareFilesList($event); diff --git a/components/infra-proxy-service/migrations/migrations.go b/components/infra-proxy-service/migrations/migrations.go index cd7a29ac475..e312b1dfa04 100644 --- a/components/infra-proxy-service/migrations/migrations.go +++ b/components/infra-proxy-service/migrations/migrations.go @@ -90,7 +90,7 @@ func (s *MigrationServer) UploadFile(stream service.MigrationDataService_UploadF } log.Info("File successfully saved in the directory for the requested file for migration id: ", migrationId) - res := &response.UploadZipFileResponse{ + res := &response.UploadFileResponse{ MigrationId: migrationId, Success: true, } @@ -168,7 +168,7 @@ func createMigrationId() (string, error) { } //handleErrorForUploadFileAndMigration handles the error for the file upload -func handleErrorForUploadFileAndMigration(err error, migrationId string, serviceId string, s *MigrationServer, ctx context.Context) *response.UploadZipFileResponse { +func handleErrorForUploadFileAndMigration(err error, migrationId string, serviceId string, s *MigrationServer, ctx context.Context) *response.UploadFileResponse { response := createResponseWithErrors(err, migrationId) _, _ = s.service.Migration.FailedFileUpload(ctx, migrationId, serviceId, err.Error(), 0, 0, 0) //ToDo to add the Failed migration status as well @@ -178,9 +178,9 @@ func handleErrorForUploadFileAndMigration(err error, migrationId string, service } //createResponseWithErrors created a response with errors -func createResponseWithErrors(err error, migrationId string) *response.UploadZipFileResponse { +func createResponseWithErrors(err error, migrationId string) *response.UploadFileResponse { errors := []string{err.Error()} - return &response.UploadZipFileResponse{ + return &response.UploadFileResponse{ Success: false, MigrationId: migrationId, Errors: errors, @@ -189,16 +189,6 @@ func createResponseWithErrors(err error, migrationId string) *response.UploadZip // CancelMigration cancle the ongoing migration func (s *MigrationServer) CancelMigration(ctx context.Context, req *request.CancelMigrationRequest) (*response.CancelMigrationResponse, error) { - // Validate all request fields are required - err := validation.New(validation.Options{ - Target: "server", - Request: *req, - RequiredDefault: true, - }).Validate() - - if err != nil { - return nil, err - } // Cancellation is allowed for a running pipeline only if the parsing is done but the data commitment is yet to be performed currentMigrationPhase, err := s.service.Migration.GetMigrationStatus(ctx, req.MigrationId) diff --git a/components/infra-proxy-service/migrations/pipeline/phaseonemigration.go b/components/infra-proxy-service/migrations/pipeline/phaseonemigration.go index 8f1e1854bcd..a322ec6c056 100644 --- a/components/infra-proxy-service/migrations/pipeline/phaseonemigration.go +++ b/components/infra-proxy-service/migrations/pipeline/phaseonemigration.go @@ -198,7 +198,6 @@ func adminUsers(result <-chan PipelineData) <-chan PipelineData { func migrationPipeline(source <-chan PipelineData, pipes ...PhaseOnePipelineProcessor) { log.Info("Pipeline started...") - status := make(chan string) go func() { for _, pipe := range pipes { source = pipe(source) @@ -207,9 +206,7 @@ func migrationPipeline(source <-chan PipelineData, pipes ...PhaseOnePipelineProc for s := range source { s.Done <- nil } - status <- "Done" }() - <-status } func SetupPhaseOnePipeline() PhaseOnePipleine { diff --git a/components/infra-proxy-service/migrations/pipeline/phasetwomigration.go b/components/infra-proxy-service/migrations/pipeline/phasetwomigration.go index 3ae1ad42aa9..aef47a43e34 100644 --- a/components/infra-proxy-service/migrations/pipeline/phasetwomigration.go +++ b/components/infra-proxy-service/migrations/pipeline/phasetwomigration.go @@ -146,7 +146,6 @@ func populateMembersPolicy(result <-chan PipelineData) <-chan PipelineData { func migrationTwoPipeline(source <-chan PipelineData, pipes ...PhaseTwoPipelineProcessor) { log.Info("Pipeline started...") - status := make(chan string) go func() { for _, pipe := range pipes { source = pipe(source) @@ -155,9 +154,9 @@ func migrationTwoPipeline(source <-chan PipelineData, pipes ...PhaseTwoPipelineP for s := range source { s.Done <- nil } - status <- "Done" + }() - <-status + } func SetupPhaseTwoPipeline() PhaseTwoPipleine { diff --git a/components/infra-proxy-service/migrations/pipeline/utility.go b/components/infra-proxy-service/migrations/pipeline/utility.go index cbf9e8c189a..04ef4f8f594 100644 --- a/components/infra-proxy-service/migrations/pipeline/utility.go +++ b/components/infra-proxy-service/migrations/pipeline/utility.go @@ -5,17 +5,14 @@ import ( "context" "encoding/json" "fmt" - "io" - "io/ioutil" - "os" - "path" - "path/filepath" - "github.com/chef/automate/api/interservice/authz" "github.com/chef/automate/components/infra-proxy-service/pipeline" - "github.com/chef/automate/components/infra-proxy-service/storage" log "github.com/sirupsen/logrus" + "io" + "os" + "path" + "path/filepath" ) // StoreOrgs reads the Result struct and populate the orgs table @@ -242,10 +239,11 @@ func openOrgFolder(org os.FileInfo, fileLocation string) pipeline.OrgJson { fmt.Println(err) } log.Info("Successfully opened the file at location", jsonPath) + defer func() { + _ = jsonFile.Close() + }() // defer the closing of our jsonFile so that we can parse it later on - byteValue, _ := ioutil.ReadAll(jsonFile) - _ = json.Unmarshal(byteValue, &orgJson) - _ = jsonFile.Close() + _ = json.NewDecoder(jsonFile).Decode(&orgJson) return orgJson } diff --git a/e2e/cypress/integration/api/iam/infra_editor_actions.spec.ts b/e2e/cypress/integration/api/iam/infra_editor_actions.spec.ts index 26ed6018d14..3d953f7084e 100644 --- a/e2e/cypress/integration/api/iam/infra_editor_actions.spec.ts +++ b/e2e/cypress/integration/api/iam/infra_editor_actions.spec.ts @@ -198,7 +198,7 @@ describe('Infra Editor Policy', () => { assert.equal(resp.status, 403); }); }); - + it('create infra server post returns 403 when infraServers create actions is denied', () => { cy.request({ headers: { 'api-token': withInfraEditorActionToken }, @@ -239,5 +239,5 @@ describe('Infra Editor Policy', () => { }).then((resp) => { assert.equal(resp.status, 403); }); - }) + }); }); diff --git a/e2e/cypress/integration/api/iam/infra_project_owner_actions.spec.ts b/e2e/cypress/integration/api/iam/infra_project_owner_actions.spec.ts index f4b50562750..416beadd8d6 100644 --- a/e2e/cypress/integration/api/iam/infra_project_owner_actions.spec.ts +++ b/e2e/cypress/integration/api/iam/infra_project_owner_actions.spec.ts @@ -189,7 +189,7 @@ describe('Infra Project Owner Policy', () => { name: 'test2', description: 'cypress testing' }, - url: '/api/v0/infra/servers/local-dev/orgs/test-org/environments', + url: '/api/v0/infra/servers/local-dev/orgs/test-org/environments' }).then((resp) => { assert.equal(resp.status, 200); }); @@ -257,4 +257,4 @@ describe('Infra Project Owner Policy', () => { assert.equal(resp.status, 200); }); }); -}); \ No newline at end of file +}); diff --git a/e2e/cypress/integration/ui/infra-proxy/chef-organization-details.spec.ts b/e2e/cypress/integration/ui/infra-proxy/chef-organization-details.spec.ts index ee0fe32267c..93797174938 100644 --- a/e2e/cypress/integration/ui/infra-proxy/chef-organization-details.spec.ts +++ b/e2e/cypress/integration/ui/infra-proxy/chef-organization-details.spec.ts @@ -6,8 +6,7 @@ describe('chef server', () => { const serverName = 'chef manage'; const orgID = 'demoorg'; const orgName = 'demoorg'; - const serverFQDN = 'https://ec2-18-117-112-129.us-east-2.compute.amazonaws.com'; - const serverIP = '18-117-112-129'; + const serverFQDN = Cypress.env('AUTOMATE_INFRA_SERVER_FQDN'); const adminUser = 'kallol'; const adminKey = Cypress.env('AUTOMATE_INFRA_ADMIN_KEY').replace(/\\n/g, '\n'); const tabNames = [ @@ -34,7 +33,7 @@ describe('chef server', () => { id: serverID, name: serverName, fqdn: serverFQDN, - ip_address: serverIP, + ip_address: '', webui_key: webuiKey } }).then((resp) => { diff --git a/e2e/cypress/integration/ui/infra-proxy/chef-server-details.spec.ts b/e2e/cypress/integration/ui/infra-proxy/chef-server-details.spec.ts index 28ffc118c76..83c2865671d 100644 --- a/e2e/cypress/integration/ui/infra-proxy/chef-server-details.spec.ts +++ b/e2e/cypress/integration/ui/infra-proxy/chef-server-details.spec.ts @@ -5,9 +5,7 @@ describe('chef server details', () => { const serverName = `${cypressPrefix} server ${now}`; const updatedServerName = `${cypressPrefix} updated server ${now}`; const serverID = serverName.split(' ').join('-'); - const customServerID = `${cypressPrefix}-custom-id-${now}`; - const serverFQDN = 'https://ec2-18-117-112-129.us-east-2.compute.amazonaws.com'; - const serverIP = '18-117-112-129'; + const serverFQDN = Cypress.env('AUTOMATE_INFRA_SERVER_FQDN'); const webuiKey = Cypress.env('AUTOMATE_INFRA_WEBUI_KEY').replace(/\\n/g, '\n'); const orgName = `${cypressPrefix} org ${now}`; const generatedOrgID = orgName.split(' ').join('-'); @@ -30,7 +28,7 @@ describe('chef server details', () => { id: serverID, name: serverName, fqdn: serverFQDN, - ip_address: serverIP, + ip_address: '', webui_key: webuiKey } }); @@ -237,7 +235,7 @@ describe('chef server details', () => { cy.get('app-notification.info chef-icon').click({ multiple: true }); }); - it('can update the server', () => { + xit('can update the server', () => { cy.get('[data-cy=update-server-name]').clear().type(updatedServerName); cy.get('chef-select').contains('FQDN').click(); cy.get('chef-select chef-option').contains('IP Address').click(); diff --git a/e2e/cypress/integration/ui/infra-proxy/chef-servers.spec.ts b/e2e/cypress/integration/ui/infra-proxy/chef-servers.spec.ts index 0bf5b6189b7..b97201f3ed6 100644 --- a/e2e/cypress/integration/ui/infra-proxy/chef-servers.spec.ts +++ b/e2e/cypress/integration/ui/infra-proxy/chef-servers.spec.ts @@ -4,8 +4,7 @@ describe('chef server', () => { const serverName = `${cypressPrefix} server ${now}`; const generatedServerID = serverName.split(' ').join('-'); const customServerID = `${cypressPrefix}-custom-id-${now}`; - const serverFQDN = 'https://ec2-18-117-112-129.us-east-2.compute.amazonaws.com'; - const serverIP = '18-117-112-129'; + const serverFQDN = Cypress.env('AUTOMATE_INFRA_SERVER_FQDN'); const webuiKey = Cypress.env('AUTOMATE_INFRA_WEBUI_KEY').replace(/\\n/g, '\n'); before(() => { diff --git a/e2e/cypress/integration/ui/infra-proxy/infra-databags.spec.ts b/e2e/cypress/integration/ui/infra-proxy/infra-databags.spec.ts index ab14e6b2dfb..804b46d356b 100644 --- a/e2e/cypress/integration/ui/infra-proxy/infra-databags.spec.ts +++ b/e2e/cypress/integration/ui/infra-proxy/infra-databags.spec.ts @@ -6,8 +6,7 @@ describe('infra databag', () => { const serverName = 'chef manage'; const orgID = 'demoorg'; const orgName = 'demoorg'; - const serverFQDN = 'https://ec2-18-117-112-129.us-east-2.compute.amazonaws.com'; - const serverIP = '18-117-112-129'; + const serverFQDN = Cypress.env('AUTOMATE_INFRA_SERVER_FQDN'); const adminUser = 'kallol'; const adminKey = Cypress.env('AUTOMATE_INFRA_ADMIN_KEY').replace(/\\n/g, '\n'); const databagName = `${cypressPrefix}-databag-${now}-1`; @@ -27,7 +26,7 @@ describe('infra databag', () => { id: serverID, name: serverName, fqdn: serverFQDN, - ip_address: serverIP, + ip_address: '', webui_key: webuiKey } }).then((resp) => { diff --git a/e2e/cypress/integration/ui/infra-proxy/infra-node-details.spec.ts b/e2e/cypress/integration/ui/infra-proxy/infra-node-details.spec.ts index f197ad3b6a0..5bf6d7bf3da 100644 --- a/e2e/cypress/integration/ui/infra-proxy/infra-node-details.spec.ts +++ b/e2e/cypress/integration/ui/infra-proxy/infra-node-details.spec.ts @@ -8,8 +8,7 @@ describe('infra node detail', () => { const serverName = 'chef manage'; const orgID = 'demoorg'; const orgName = 'demoorg'; - const serverFQDN = 'https://ec2-18-117-112-129.us-east-2.compute.amazonaws.com'; - const serverIP = '18-117-112-129'; + const serverFQDN = Cypress.env('AUTOMATE_INFRA_SERVER_FQDN'); const adminUser = 'kallol'; const adminKey = Cypress.env('AUTOMATE_INFRA_ADMIN_KEY').replace(/\\n/g, '\n'); const webuiKey = Cypress.env('AUTOMATE_INFRA_WEBUI_KEY').replace(/\\n/g, '\n'); @@ -31,7 +30,7 @@ describe('infra node detail', () => { id: serverID, name: serverName, fqdn: serverFQDN, - ip_address: serverIP, + ip_address: '', webui_key: webuiKey } }).then((response) => { diff --git a/e2e/cypress/integration/ui/infra-proxy/infra-node-list.spec.ts b/e2e/cypress/integration/ui/infra-proxy/infra-node-list.spec.ts index 46b4ddacf25..1a80cdefe96 100644 --- a/e2e/cypress/integration/ui/infra-proxy/infra-node-list.spec.ts +++ b/e2e/cypress/integration/ui/infra-proxy/infra-node-list.spec.ts @@ -6,8 +6,7 @@ describe('infra node list', () => { const serverName = 'chef manage'; const orgID = 'demoorg'; const orgName = 'demoorg'; - const serverFQDN = 'https://ec2-18-117-112-129.us-east-2.compute.amazonaws.com'; - const serverIP = '18-117-112-129'; + const serverFQDN = Cypress.env('AUTOMATE_INFRA_SERVER_FQDN'); const adminUser = 'kallol'; const adminKey = Cypress.env('AUTOMATE_INFRA_ADMIN_KEY').replace(/\\n/g, '\n'); const webuiKey = Cypress.env('AUTOMATE_INFRA_WEBUI_KEY').replace(/\\n/g, '\n'); @@ -28,7 +27,7 @@ describe('infra node list', () => { id: serverID, name: serverName, fqdn: serverFQDN, - ip_address: serverIP, + ip_address: '', webui_key: webuiKey } }).then((resp) => { diff --git a/e2e/cypress/integration/ui/infra-proxy/infra-policy-file-details.spec.ts b/e2e/cypress/integration/ui/infra-proxy/infra-policy-file-details.spec.ts index 365ce5a5261..6449edd6f0b 100644 --- a/e2e/cypress/integration/ui/infra-proxy/infra-policy-file-details.spec.ts +++ b/e2e/cypress/integration/ui/infra-proxy/infra-policy-file-details.spec.ts @@ -4,8 +4,7 @@ describe('infra policy details', () => { const serverName = 'chef manage'; const orgID = 'demoorg'; const orgName = 'demoorg'; - const serverFQDN = 'https://ec2-18-117-112-129.us-east-2.compute.amazonaws.com'; - const serverIP = '18-117-112-129'; + const serverFQDN = Cypress.env('AUTOMATE_INFRA_SERVER_FQDN'); const adminUser = 'kallol'; const adminKey = Cypress.env('AUTOMATE_INFRA_ADMIN_KEY').replace(/\\n/g, '\n'); const webuiKey = Cypress.env('AUTOMATE_INFRA_WEBUI_KEY').replace(/\\n/g, '\n'); @@ -30,7 +29,7 @@ describe('infra policy details', () => { id: serverID, name: serverName, fqdn: serverFQDN, - ip_address: serverIP, + ip_address: '', webui_key: webuiKey } }).then((resp) => { diff --git a/e2e/cypress/integration/ui/infra-proxy/infra-policy-file-list.spec.ts b/e2e/cypress/integration/ui/infra-proxy/infra-policy-file-list.spec.ts index 4e121603eb3..d9d0bdc2348 100644 --- a/e2e/cypress/integration/ui/infra-proxy/infra-policy-file-list.spec.ts +++ b/e2e/cypress/integration/ui/infra-proxy/infra-policy-file-list.spec.ts @@ -6,8 +6,7 @@ describe('infra policy file', () => { const serverName = 'chef manage'; const orgID = 'demoorg'; const orgName = 'demoorg'; - const serverFQDN = 'https://ec2-18-117-112-129.us-east-2.compute.amazonaws.com'; - const serverIP = '18-117-112-129'; + const serverFQDN = Cypress.env('AUTOMATE_INFRA_SERVER_FQDN'); const adminUser = 'kallol'; const adminKey = Cypress.env('AUTOMATE_INFRA_ADMIN_KEY').replace(/\\n/g, '\n'); const webuiKey = Cypress.env('AUTOMATE_INFRA_WEBUI_KEY').replace(/\\n/g, '\n'); @@ -28,7 +27,7 @@ describe('infra policy file', () => { id: serverID, name: serverName, fqdn: serverFQDN, - ip_address: serverIP, + ip_address: '', webui_key: webuiKey } }).then((resp) => { diff --git a/e2e/cypress/integration/ui/infra-proxy/infra-policy-group-details.spec.ts b/e2e/cypress/integration/ui/infra-proxy/infra-policy-group-details.spec.ts index c2b3f3ff8b7..cda465d5bb5 100644 --- a/e2e/cypress/integration/ui/infra-proxy/infra-policy-group-details.spec.ts +++ b/e2e/cypress/integration/ui/infra-proxy/infra-policy-group-details.spec.ts @@ -4,8 +4,7 @@ describe('infra policy group details', () => { const serverName = 'chef manage'; const orgID = 'demoorg'; const orgName = 'demoorg'; - const serverFQDN = 'https://ec2-18-117-112-129.us-east-2.compute.amazonaws.com'; - const serverIP = '18-117-112-129'; + const serverFQDN = Cypress.env('AUTOMATE_INFRA_SERVER_FQDN'); const adminUser = 'kallol'; const adminKey = Cypress.env('AUTOMATE_INFRA_ADMIN_KEY').replace(/\\n/g, '\n'); const webuiKey = Cypress.env('AUTOMATE_INFRA_WEBUI_KEY').replace(/\\n/g, '\n'); @@ -30,7 +29,7 @@ describe('infra policy group details', () => { id: serverID, name: serverName, fqdn: serverFQDN, - ip_address: serverIP, + ip_address: '', webui_key: webuiKey } }).then((resp) => { diff --git a/e2e/cypress/integration/ui/infra-proxy/infra-policy-groups-list.spec.ts b/e2e/cypress/integration/ui/infra-proxy/infra-policy-groups-list.spec.ts index 315c5b12110..04c2e34580e 100644 --- a/e2e/cypress/integration/ui/infra-proxy/infra-policy-groups-list.spec.ts +++ b/e2e/cypress/integration/ui/infra-proxy/infra-policy-groups-list.spec.ts @@ -6,8 +6,7 @@ describe('infra policy groups', () => { const serverName = 'chef manage'; const orgID = 'demoorg'; const orgName = 'demoorg'; - const serverFQDN = 'https://ec2-18-117-112-129.us-east-2.compute.amazonaws.com'; - const serverIP = '18-117-112-129'; + const serverFQDN = Cypress.env('AUTOMATE_INFRA_SERVER_FQDN'); const adminUser = 'kallol'; const adminKey = Cypress.env('AUTOMATE_INFRA_ADMIN_KEY').replace(/\\n/g, '\n'); const webuiKey = Cypress.env('AUTOMATE_INFRA_WEBUI_KEY').replace(/\\n/g, '\n'); @@ -28,7 +27,7 @@ describe('infra policy groups', () => { id: serverID, name: serverName, fqdn: serverFQDN, - ip_address: serverIP, + ip_address: '', webui_key: webuiKey } }).then((resp) => { diff --git a/e2e/cypress/integration/ui/infra-proxy/infra-role-details.spec.ts b/e2e/cypress/integration/ui/infra-proxy/infra-role-details.spec.ts index cf6c8ddc813..c34abf2392f 100644 --- a/e2e/cypress/integration/ui/infra-proxy/infra-role-details.spec.ts +++ b/e2e/cypress/integration/ui/infra-proxy/infra-role-details.spec.ts @@ -6,8 +6,7 @@ describe('infra role detail', () => { const serverName = 'chef manage'; const orgID = 'demoorg'; const orgName = 'demoorg'; - const serverFQDN = 'https://ec2-18-117-112-129.us-east-2.compute.amazonaws.com'; - const serverIP = '18-117-112-129'; + const serverFQDN = Cypress.env('AUTOMATE_INFRA_SERVER_FQDN'); const adminUser = 'kallol'; const adminKey = Cypress.env('AUTOMATE_INFRA_ADMIN_KEY').replace(/\\n/g, '\n'); const webuiKey = Cypress.env('AUTOMATE_INFRA_WEBUI_KEY').replace(/\\n/g, '\n'); @@ -37,7 +36,7 @@ describe('infra role detail', () => { id: serverID, name: serverName, fqdn: serverFQDN, - ip_address: serverIP, + ip_address: '', webui_key: webuiKey } }).then((response) => { diff --git a/e2e/cypress/integration/ui/infra-proxy/infra-roles.spec.ts b/e2e/cypress/integration/ui/infra-proxy/infra-roles.spec.ts index e370f5a9950..807093ebaff 100644 --- a/e2e/cypress/integration/ui/infra-proxy/infra-roles.spec.ts +++ b/e2e/cypress/integration/ui/infra-proxy/infra-roles.spec.ts @@ -6,8 +6,7 @@ describe('infra role', () => { const serverName = 'chef manage'; const orgID = 'demoorg'; const orgName = 'demoorg'; - const serverFQDN = 'https://ec2-18-117-112-129.us-east-2.compute.amazonaws.com'; - const serverIP = '18-117-112-129'; + const serverFQDN = Cypress.env('AUTOMATE_INFRA_SERVER_FQDN'); const adminUser = 'kallol'; const adminKey = Cypress.env('AUTOMATE_INFRA_ADMIN_KEY').replace(/\\n/g, '\n'); const webuiKey = Cypress.env('AUTOMATE_INFRA_WEBUI_KEY').replace(/\\n/g, '\n'); @@ -33,7 +32,7 @@ describe('infra role', () => { id: serverID, name: serverName, fqdn: serverFQDN, - ip_address: serverIP, + ip_address: '', webui_key: webuiKey } }).then((resp) => { diff --git a/e2e/cypress/integration/ui/infra-proxy/update-web-uikey-slider.spec.ts b/e2e/cypress/integration/ui/infra-proxy/update-web-uikey-slider.spec.ts index f0f6d4f816f..64bfa647126 100644 --- a/e2e/cypress/integration/ui/infra-proxy/update-web-uikey-slider.spec.ts +++ b/e2e/cypress/integration/ui/infra-proxy/update-web-uikey-slider.spec.ts @@ -3,21 +3,10 @@ describe('chef server details', () => { const now = Cypress.moment().format('MMDDYYhhmm'); const cypressPrefix = 'infra'; const serverName = `${cypressPrefix} server ${now}`; - const updatedServerName = `${cypressPrefix} updated server ${now}`; const serverID = serverName.split(' ').join('-'); - const customServerID = `${cypressPrefix}-custom-id-${now}`; - const orgID = 'demoorg'; - const serverFQDN = 'https://ec2-18-117-112-129.us-east-2.compute.amazonaws.com'; - const serverIP = '18-117-112-129'; - const orgName = `${cypressPrefix} org ${now}`; - const generatedOrgID = orgName.split(' ').join('-'); - const customOrgID = `${cypressPrefix}-custom-id-${now}`; - const adminUser = 'test_admin_user'; + const serverFQDN = Cypress.env('AUTOMATE_INFRA_SERVER_FQDN'); const webuiKey = Cypress.env('AUTOMATE_INFRA_WEBUI_KEY').replace(/\\n/g, '\n'); - // using dummy admin key value for creating the org - const adminKey = 'Dummy--admin--key'; - before(() => { cy.adminLogin('/').then(() => { const admin = JSON.parse(localStorage.getItem('chef-automate-user')); @@ -31,7 +20,7 @@ describe('chef server details', () => { id: serverID, name: serverName, fqdn: serverFQDN, - ip_address: serverIP, + ip_address: '', webui_key: webuiKey } }); diff --git a/e2e/cypress/integration/ui/infra-proxy/upload-file-slider.spec.ts b/e2e/cypress/integration/ui/infra-proxy/upload-file-slider.spec.ts index 837c2c43f85..20602fe37d6 100644 --- a/e2e/cypress/integration/ui/infra-proxy/upload-file-slider.spec.ts +++ b/e2e/cypress/integration/ui/infra-proxy/upload-file-slider.spec.ts @@ -4,8 +4,7 @@ describe('chef server details', () => { const cypressPrefix = 'infra'; const serverName = `${cypressPrefix} server ${now}`; const serverID = serverName.split(' ').join('-'); - const serverFQDN = 'https://ec2-18-117-112-129.us-east-2.compute.amazonaws.com'; - const serverIP = '18-117-112-129'; + const serverFQDN = Cypress.env('AUTOMATE_INFRA_SERVER_FQDN'); const webuiKey = Cypress.env('AUTOMATE_INFRA_WEBUI_KEY').replace(/\\n/g, '\n'); before(() => { @@ -21,7 +20,7 @@ describe('chef server details', () => { id: serverID, name: serverName, fqdn: serverFQDN, - ip_address: serverIP, + ip_address: '', webui_key: webuiKey } });