def create_local_servicepair(test):
 def create_service():
  path = FilePath(test.mktemp())
  path.createDirectory()
  pool = FilesystemStoragePool(path)
  service = VolumeService(FilePath(test.mktemp()), pool, reactor=Clock())
  service.startService()
  test.addCleanup(service.stopService)
  return service
 to_service = create_service()
 from_service = create_service()
 remote = LocalVolumeManager(to_service)
 return ServicePair(from_service=from_service, to_service=to_service, remote=remote, origin_remote=remote)

def create_local_servicepair ( test ) : def create_service ( ) : path = FilePath ( test . mktemp ( ) ) path . createDirectory ( ) pool = FilesystemStoragePool ( path ) service = VolumeService ( FilePath ( test . mktemp ( ) ) , pool , reactor = Clock ( ) ) service . startService ( ) test . addCleanup ( service . stopService ) return service to_service = create_service ( ) from_service = create_service ( ) remote = LocalVolumeManager ( to_service ) return ServicePair ( from_service = from_service , to_service = to_service , remote = remote , origin_remote = remote )
create a servicepair allowing testing of localvolumemanager .