@@ -245,6 +245,14 @@ var newallocationCmd = &cobra.Command{
245
245
}
246
246
}
247
247
248
+ var authRoundExpiry int64
249
+ if flags .Changed ("auth_round_expiry" ) {
250
+ authRoundExpiry , err = flags .GetInt64 ("auth_round_expiry" )
251
+ if err != nil {
252
+ log .Fatal ("invalid forbid_upload: " , err )
253
+ }
254
+ }
255
+
248
256
var allocationID string
249
257
if len (owner ) == 0 {
250
258
options := sdk.CreateAllocationOptions {
@@ -267,6 +275,7 @@ var newallocationCmd = &cobra.Command{
267
275
Force : force ,
268
276
IsEnterprise : isEnterprise ,
269
277
StorageVersion : int (storageVersion ),
278
+ AuthRoundExpiry : authRoundExpiry ,
270
279
}
271
280
allocationID , _ , _ , err = sdk .CreateAllocationWith (options )
272
281
if err != nil {
@@ -284,7 +293,7 @@ var newallocationCmd = &cobra.Command{
284
293
}
285
294
286
295
allocationID , _ , _ , err = sdk .CreateAllocationForOwner (owner , ownerPublicKey , * datashards , * parityshards ,
287
- * size , readPrice , writePrice , lock , preferred_blobbers , blobber_auth_tickets , thirdPartyExtendable , isEnterprise , force , & fileOptionParams , 0 )
296
+ * size , readPrice , writePrice , lock , preferred_blobbers , blobber_auth_tickets , thirdPartyExtendable , isEnterprise , force , & fileOptionParams , authRoundExpiry )
288
297
if err != nil {
289
298
log .Fatal ("Error creating allocation: " , err )
290
299
}
@@ -366,6 +375,7 @@ func init() {
366
375
newallocationCmd .Flags ().Bool ("forbid_rename" , false , "(default false) specify if the users cannot rename objects in this allocation" )
367
376
368
377
newallocationCmd .Flags ().Int64 ("storage_version" , 0 , "storaage version of allocation" )
378
+ newallocationCmd .Flags ().Int64 ("auth_round_expiry" , 0 , "storaage version of allocation" )
369
379
}
370
380
371
381
func storeAllocation (allocationID string ) {
0 commit comments