From 9569e8c98cf650de74ccd9f2a13a82041f76b218 Mon Sep 17 00:00:00 2001 From: Simon Rettberg Date: Wed, 19 Aug 2015 17:18:30 +0200 Subject: Extend ThriftAPI: delete imaghe base, update hash list for running upload --- src/main/thrift/bwlp.thrift | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'src/main/thrift/bwlp.thrift') diff --git a/src/main/thrift/bwlp.thrift b/src/main/thrift/bwlp.thrift index e348d58..710ce49 100644 --- a/src/main/thrift/bwlp.thrift +++ b/src/main/thrift/bwlp.thrift @@ -306,7 +306,7 @@ struct MasterSoftware { } struct TransferInformation { - 1: string token, + 1: Token token, 2: i32 plainPort, 3: i32 sslPort, 4: optional list blockHashes, // Only if transfer is a download (and list is known) @@ -314,7 +314,7 @@ struct TransferInformation { } // Used to tell status of an upload. The blockStatus is one byte per 16MB block, -// 0 = complete, 1 = missing, 2 = uploading, 3 = queued for copying, 4 = copying +// 0 = complete, 1 = missing, 2 = uploading, 3 = queued for copying, 4 = copying, 5 = hashing struct TransferStatus { 1: binary blockStatus, 2: TransferState state, @@ -379,6 +379,9 @@ service SatelliteServer { TransferInformation requestImageVersionUpload(1: Token userToken, 2: UUID imageBaseId, 3: i64 fileSize, 4: list blockHashes, 5: binary machineDescription) throws (1:TTransferRejectedException rejection, 2:TAuthorizationException authError, 3:TInternalServerError ffff, 4:TNotFoundException sdf), + void updateBlockHashes(1: Token uploadToken, 2: list blockHashes) + throws (1:TInvalidTokenException ex1), + void cancelUpload(1: Token uploadToken) throws (1:TInvalidTokenException ex1), @@ -439,6 +442,9 @@ service SatelliteServer { // deleted and false is returned void deleteImageVersion(1: Token userToken, 2: UUID imageVersionId) throws (1:TAuthorizationException authError, 2:TNotFoundException notFound, 3:TInternalServerError serverError), + // Delete image and all its versions + void deleteImageBase(1:Token userToken, 2:UUID imageBaseId) + throws (1:TAuthorizationException authError, 2:TNotFoundException notFound, 3:TInternalServerError serverError), // Write list of permissions for given image void writeImagePermissions(1: Token userToken, 2: UUID imageBaseId, 3: map permissions) throws (1:TAuthorizationException authError, 2:TNotFoundException notFound, 3:TInternalServerError serverError), -- cgit v1.2.3-55-g7522