Allow passing version parameter in application/sync API call

This commit is contained in:
Alexander Matyushentsev 2018-03-08 11:18:37 -08:00
parent ebb24b65b7
commit 8081065160
4 changed files with 50 additions and 51 deletions

View file

@ -1,3 +1,3 @@
controller: go run ./cmd/argocd-application-controller/main.go
controller: go run ./cmd/argocd-application-controller/main.go --app-resync 10
api-server: go run ./cmd/argocd-server/main.go
repo-server: go run ./cmd/argocd-repo-server/main.go

View file

@ -525,45 +525,45 @@ var _ApplicationService_serviceDesc = grpc.ServiceDesc{
func init() { proto.RegisterFile("server/application/application.proto", fileDescriptor0) }
var fileDescriptor0 = []byte{
// 635 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x55, 0xc1, 0x6e, 0x13, 0x3d,
0x10, 0xd6, 0xb6, 0xf9, 0xf3, 0x37, 0xee, 0x01, 0x64, 0xda, 0x2a, 0x6c, 0x53, 0x11, 0xb9, 0x15,
0x0a, 0x95, 0xf0, 0x36, 0xe5, 0x82, 0x7a, 0x03, 0x0a, 0x08, 0xc4, 0xa1, 0x2c, 0x42, 0x48, 0x5c,
0xc0, 0xdd, 0x1d, 0x6d, 0x96, 0x24, 0xb6, 0x6b, 0x7b, 0x57, 0x8a, 0x10, 0x17, 0x5e, 0x00, 0x21,
0x1e, 0x80, 0xe7, 0xe0, 0xc8, 0x91, 0x33, 0xaf, 0xc0, 0x83, 0x20, 0xbb, 0xbb, 0xcd, 0xa6, 0x49,
0x93, 0x4b, 0x0e, 0xdc, 0xc6, 0x33, 0xb3, 0xf3, 0x7d, 0x33, 0xfe, 0x76, 0x8c, 0xf6, 0x34, 0xa8,
0x1c, 0x54, 0xc0, 0xa4, 0x1c, 0xa4, 0x11, 0x33, 0xa9, 0xe0, 0x55, 0x9b, 0x4a, 0x25, 0x8c, 0xc0,
0xeb, 0x15, 0x97, 0xbf, 0x91, 0x88, 0x44, 0x38, 0x7f, 0x60, 0xad, 0xf3, 0x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 0x4f, 0xf0, 0xd1,
0x0a, 0xf7, 0x13, 0xfe, 0xe5, 0xa1, 0xfa, 0x6b, 0x19, 0xff, 0x8b, 0xf3, 0x0c, 0x1c, 0xff, 0x3b,
0xfe, 0xde, 0x6c, 0xfe, 0x43, 0x30, 0x2c, 0x66, 0x86, 0x51, 0xd7, 0x88, 0x9d, 0x2f, 0x47, 0xf5,
0x63, 0x18, 0x80, 0x81, 0x45, 0x13, 0x6e, 0x5f, 0x15, 0xbe, 0xd8, 0x7a, 0xc5, 0xec, 0xf6, 0xe7,
0xce, 0x4e, 0xa2, 0x35, 0xfb, 0x4f, 0x9d, 0x88, 0x58, 0x2f, 0x42, 0xdc, 0xa6, 0xe7, 0x4b, 0xdf,
0xb6, 0x4e, 0xed, 0xd2, 0xa7, 0x79, 0x97, 0x9e, 0x88, 0xd8, 0xfd, 0x93, 0x1d, 0x07, 0x46, 0x70,
0x7b, 0x0e, 0x58, 0x20, 0x2d, 0xca, 0x08, 0xd5, 0xec, 0x7e, 0xc4, 0xbb, 0x57, 0xa1, 0x55, 0xf6,
0xb3, 0x4f, 0xe6, 0x27, 0xd9, 0x15, 0x5b, 0x42, 0x93, 0xb9, 0xd0, 0x7a, 0xc4, 0xa3, 0x87, 0x07,
0x6f, 0xe9, 0xbc, 0x37, 0x69, 0xfa, 0xe9, 0x3c, 0xad, 0xbb, 0xf7, 0xe7, 0xde, 0xdf, 0x00, 0x00,
0x00, 0xff, 0xff, 0x35, 0xab, 0xb5, 0x88, 0x57, 0x07, 0x00, 0x00,
// 639 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x55, 0xc1, 0x6e, 0x13, 0x31,
0x10, 0xd5, 0xb6, 0x21, 0x34, 0xee, 0x01, 0x64, 0xda, 0x2a, 0x6c, 0x53, 0x11, 0xb9, 0x05, 0x85,
0x22, 0xbc, 0x4d, 0xb9, 0xa0, 0xde, 0x80, 0x02, 0x02, 0x71, 0x28, 0x8b, 0x10, 0x12, 0x17, 0x70,
0x77, 0x47, 0x9b, 0x25, 0x89, 0xed, 0xda, 0xde, 0x95, 0x22, 0xe0, 0xc2, 0x0f, 0x20, 0xc4, 0x07,
0xf0, 0x1d, 0xdc, 0xb9, 0x70, 0xe6, 0x17, 0xf8, 0x10, 0x64, 0x77, 0xd3, 0x6c, 0x9a, 0x34, 0xb9,
0xe4, 0xc0, 0x6d, 0x3c, 0x33, 0x3b, 0xef, 0xcd, 0xf8, 0xed, 0x18, 0xed, 0x68, 0x50, 0x39, 0xa8,
0x80, 0x49, 0xd9, 0x4b, 0x23, 0x66, 0x52, 0xc1, 0xcb, 0x36, 0x95, 0x4a, 0x18, 0x81, 0x57, 0x4b,
0x2e, 0x7f, 0x2d, 0x11, 0x89, 0x70, 0xfe, 0xc0, 0x5a, 0xa7, 0x29, 0x7e, 0x23, 0x11, 0x22, 0xe9,
0x41, 0xc0, 0x64, 0x1a, 0x30, 0xce, 0x85, 0x71, 0xc9, 0xba, 0x88, 0x92, 0xee, 0x7d, 0x4d, 0x53,
0xe1, 0xa2, 0x91, 0x50, 0x10, 0xe4, 0xed, 0x20, 0x01, 0x0e, 0x8a, 0x19, 0x88, 0x8b, 0x9c, 0x67,
0x49, 0x6a, 0x3a, 0xd9, 0x31, 0x8d, 0x44, 0x3f, 0x60, 0xca, 0x41, 0x7c, 0x70, 0xc6, 0xdd, 0x28,
0x0e, 0x64, 0x37, 0xb1, 0x1f, 0xeb, 0x31, 0xa2, 0x79, 0x9b, 0xf5, 0x64, 0x87, 0x4d, 0x94, 0x22,
0xb7, 0xd0, 0xd5, 0x07, 0xa3, 0xbc, 0x97, 0x19, 0xa8, 0x01, 0xc6, 0xa8, 0xc2, 0x59, 0x1f, 0xea,
0x5e, 0xd3, 0x6b, 0xd5, 0x42, 0x67, 0x93, 0x75, 0x74, 0xad, 0x94, 0x17, 0x82, 0x96, 0x82, 0x6b,
0x20, 0xef, 0xd1, 0x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, 0xc5, 0x92, 0x3b, 0x0e, 0xfa, 0x26, 0x99, 0x09, 0xad, 0x07, 0x3c, 0x3a,
0xf0, 0x76, 0x1f, 0xee, 0xbd, 0xa5, 0xb3, 0x9e, 0xa5, 0xc9, 0xd7, 0xf3, 0xb8, 0xea, 0x9e, 0xa0,
0x7b, 0xff, 0x02, 0x00, 0x00, 0xff, 0xff, 0xa6, 0xc6, 0x2d, 0xbc, 0x5a, 0x07, 0x00, 0x00,
}

View file

@ -196,14 +196,14 @@ func request_ApplicationService_ListPods_0(ctx context.Context, marshaler runtim
}
var (
filter_ApplicationService_Sync_0 = &utilities.DoubleArray{Encoding: map[string]int{"name": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}}
)
func request_ApplicationService_Sync_0(ctx context.Context, marshaler runtime.Marshaler, client ApplicationServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var protoReq ApplicationSyncRequest
var metadata runtime.ServerMetadata
if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
}
var (
val string
ok bool
@ -222,10 +222,6 @@ func request_ApplicationService_Sync_0(ctx context.Context, marshaler runtime.Ma
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err)
}
if err := runtime.PopulateQueryParameters(&protoReq, req.URL.Query(), filter_ApplicationService_Sync_0); err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
}
msg, err := client.Sync(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
return msg, metadata, err

View file

@ -85,7 +85,10 @@ service ApplicationService {
// Sync syncs an application to its target state
rpc Sync(ApplicationSyncRequest) returns (ApplicationSyncResult) {
option (google.api.http).post = "/api/v1/applications/{name}/sync";
option (google.api.http) = {
post: "/api/v1/applications/{name}/sync"
body: "*"
};
}
}