def create_and_copy(test, fixture):
 pool = fixture(test)
 service = service_for_pool(test, pool)
 volume = service.get(MY_VOLUME)
 pool2 = fixture(test)
 service2 = service_for_pool(test, pool2)
 volume2 = Volume(node_id=service.node_id, name=MY_VOLUME, service=service2)
 d = pool.create(volume)
 def created_filesystem(filesystem):
  path = filesystem.get_path()
  path.child('file').setContent('some bytes')
  path.child('directory').makedirs()
  copying = copy(volume, volume2)
  copying.addCallback((lambda ignored: CopyVolumes(from_volume=volume, to_volume=volume2)))
  return copying
 d.addCallback(created_filesystem)
 return d

def create_and_copy ( test , fixture ) : pool = fixture ( test ) service = service_for_pool ( test , pool ) volume = service . get ( MY_VOLUME ) pool2 = fixture ( test ) service2 = service_for_pool ( test , pool2 ) volume2 = Volume ( node_id = service . node_id , name = MY_VOLUME , service = service2 ) d = pool . create ( volume ) def created_filesystem ( filesystem ) : path = filesystem . get_path ( ) path . child ( 'file' ) . setContent ( 'some bytes' ) path . child ( 'directory' ) . makedirs ( ) copying = copy ( volume , volume2 ) copying . addCallback ( ( lambda ignored : CopyVolumes ( from_volume = volume , to_volume = volume2 ) ) ) return copying d . addCallback ( created_filesystem ) return d
create a volumes filesystem on one pool .