Exemplo n.º 1
0
 def _allocate_slot_share(self, bucketdir, secrets, sharenum, owner_num=0):
     (write_enabler, renew_secret, cancel_secret) = secrets
     my_nodeid = self.my_nodeid
     fileutil.make_dirs(bucketdir)
     filename = os.path.join(bucketdir, "%d" % sharenum)
     share = create_mutable_sharefile(filename, my_nodeid, write_enabler,
                                      self)
     return share
Exemplo n.º 2
0
 def _allocate_slot_share(self, bucketdir, secrets, sharenum,
                          allocated_size, owner_num=0):
     (write_enabler, renew_secret, cancel_secret) = secrets
     my_nodeid = self.my_nodeid
     fileutil.make_dirs(bucketdir)
     filename = os.path.join(bucketdir, "%d" % sharenum)
     share = create_mutable_sharefile(filename, my_nodeid, write_enabler,
                                      self)
     return share