• Łukasz Nowak's avatar
    Implement asynchronous request call. · c47d0343
    Łukasz Nowak authored
    OpenOrder.request and ComputerPartition.request are not raising
    ResourceNotReady anymore.
    
    Instead if there is need to access value which needs server connection and
    ComputerPartition class detects that request have to be done, it is begin
    invoked, which *can* result with late ResourceNotReady.
    
    Some tests were moved from ERP5 Vifib test suite to slapos.core package, to do
    checks on library level, instead of client level.
    
    ERP5 Vifib test suite was updated in order to follow non raising Request. Also
    simplification was done, as there is no need to repeat logic of library testing.
    
    Squashed commit of the following:
    
    commit 4abc0e3d6bc22955ef062c9066ec2139fa74ff1b
    Author: Łukasz Nowak <luke@nexedi.com>
    Date:   Tue Sep 27 11:14:01 2011 +0200
    
        Rename in order to follow reality.
    
        This steps are checking for HTTP responses directly, and not library exception.
    
    commit 9222aab2fe026ff7e5ae63d0a0ce7c0a95e72b43
    Author: Łukasz Nowak <luke@nexedi.com>
    Date:   Tue Sep 27 11:13:04 2011 +0200
    
        Remove not used garbage.
    
    commit 9b035f2b497c5d33a01e8bde9e23154ec9fa844c
    Author: Łukasz Nowak <luke@nexedi.com>
    Date:   Tue Sep 27 11:11:31 2011 +0200
    
        Move specialised steps to proper module.
    
    commit 70ceace0ca08c55803d9c5f6db40f11a07bcb5cf
    Author: Łukasz Nowak <luke@nexedi.com>
    Date:   Tue Sep 27 11:05:31 2011 +0200
    
        Drop person based request with NotReadyResponse.
    
    commit 1464473c3ef99e89513df40b69b8ae096d183dac
    Author: Łukasz Nowak <luke@nexedi.com>
    Date:   Tue Sep 27 10:53:07 2011 +0200
    
        Drop not ready, tic in normal request (slave scenario).
    
    commit 9bf8944c168ef1d4394a6133aeb1ef09218dc3d1
    Author: Łukasz Nowak <luke@nexedi.com>
    Date:   Tue Sep 27 10:52:49 2011 +0200
    
        NotReady is not raised anymore by library.
    
    commit d85d73a3ddb386c048dc3cff688abb5a9fb8bcfa
    Author: Łukasz Nowak <luke@nexedi.com>
    Date:   Tue Sep 27 10:49:46 2011 +0200
    
        Logic of slave request is the same.
    
        slap library itself implements such tests, and change was applied: no
        NotReadyResponse is raised.
    
    commit 444b8d3f5b853e3a3120e36c7fc3451565ea0219
    Author: Łukasz Nowak <luke@nexedi.com>
    Date:   Tue Sep 27 10:40:59 2011 +0200
    
        No need to request twice.
    
        Library is sending request, which is being fulfilled after first call, as tic
        happens immediately on server side.
    
    commit 95232273592a79f91050c903469990c0c6243c85
    Author: Łukasz Nowak <luke@nexedi.com>
    Date:   Tue Sep 27 10:35:17 2011 +0200
    
        Covered in dc4cb3dcda23418e57c8faabdd7520850830aa5e
    
    commit dc4cb3dcda23418e57c8faabdd7520850830aa5e
    Author: Łukasz Nowak <luke@nexedi.com>
    Date:   Tue Sep 27 10:34:04 2011 +0200
    
        Cover more logic.
    
        Check that request is really send (with rest of tests replaces
        test_ComputerPartition_request_firstNotReady)
    
    commit f27992b951dff29072ba9c34fe29b8e32beac7bb
    Author: Łukasz Nowak <luke@nexedi.com>
    Date:   Tue Sep 27 10:22:01 2011 +0200
    
        Follow new BT5 addition.
    
    commit 3165c700faac2d32a9332438a94dfaab60bfdd88
    Author: Łukasz Nowak <luke@nexedi.com>
    Date:   Tue Sep 27 10:19:46 2011 +0200
    
        Follow egg restructuring.
    
    commit 1eddc381ff7bf055e29061804b1f44f920eab07d
    Author: Łukasz Nowak <luke@nexedi.com>
    Date:   Mon Sep 26 18:13:58 2011 +0200
    
        Tic in order to have all...
    
        ...but this test fails in Vifib.
    
        It shall be reimplemented on slap library level.
    
    commit 98ce5cc53fb5604bdff3c81262a5fcb60a0d30bc
    Author: Łukasz Nowak <luke@nexedi.com>
    Date:   Mon Sep 26 18:07:24 2011 +0200
    
        Typo.
    
    commit ac8cc9acfe6a05c71f06884ea01b36653feb8db8
    Author: Łukasz Nowak <luke@nexedi.com>
    Date:   Mon Sep 26 17:55:54 2011 +0200
    
        Request in simple manner.
    
    commit 9aa538e5f1e432f9db3c6d1890e9f430addba5eb
    Author: Łukasz Nowak <luke@nexedi.com>
    Date:   Mon Sep 26 18:03:34 2011 +0200
    
        Support requestComputerPartition.
    
    commit 5a3376d62567a405da91d6a05ddf0828a45788d6
    Author: Łukasz Nowak <luke@nexedi.com>
    Date:   Mon Sep 26 18:02:05 2011 +0200
    
        Really request during request.
    
        Just in case of ResourceNotReady request later.
    
    commit 085ae669f2763f02a955f2450ae1cec95e3c17f8
    Author: Łukasz Nowak <luke@nexedi.com>
    Date:   Mon Sep 26 17:49:39 2011 +0200
    
        Forgotten tic after another request.
    
    commit aef8445dfdefa09a806a6b94c64af7af61ce4fb6
    Author: Łukasz Nowak <luke@nexedi.com>
    Date:   Mon Sep 26 17:46:49 2011 +0200
    
        Typo.
    
    commit 1ac2cde4df2ef53a14418170a1c9fb1e81003160
    Author: Łukasz Nowak <luke@nexedi.com>
    Date:   Mon Sep 26 17:41:54 2011 +0200
    
        Drop ResourceNotReady exception.
    
        stepRequestComputerPartitionNotReadyResponse is removed, as request became
        asynchronous and stepRequestComputerPartition does all what is needed to have
        correctly requested partition.
    
    commit 9a7cf1c65cd8b17a08dee687e3a1657b048fab62
    Author: Łukasz Nowak <luke@nexedi.com>
    Date:   Mon Sep 26 17:39:05 2011 +0200
    
        Do not except ResourceNotReady while requesting.
    
    commit c8845909d24777e74d68cad292c341569a0cfb17
    Author: Łukasz Nowak <luke@nexedi.com>
    Date:   Mon Sep 26 17:36:41 2011 +0200
    
        Do not access async parameter.
    
        getId would raise ResourceNotReady.
    
    commit ebb3380d9ac0357a76393024eb19388360bc57c0
    Author: Łukasz Nowak <luke@nexedi.com>
    Date:   Mon Sep 26 17:35:25 2011 +0200
    
        Follow asynchronous request functionality.
    
        It raises ResourceNotReady in case of accessing first remote based parameter.
    
    commit 6650b58fec82242f4eb00f445155247849a6572d
    Author: Łukasz Nowak <luke@nexedi.com>
    Date:   Mon Sep 26 17:16:12 2011 +0200
    
        Follow ComputerPartition.request coverage.
    
    commit 5064bb93bf085d82e618bad6b0cf365f9c10b330
    Author: Łukasz Nowak <luke@nexedi.com>
    Date:   Mon Sep 26 17:13:11 2011 +0200
    
        Rename method name.
    
    commit b502321daff6562f81194357726da389bbbde846
    Author: Łukasz Nowak <luke@nexedi.com>
    Date:   Mon Sep 26 17:00:29 2011 +0200
    
        Cover more cases.
    
        Check that requesting raises correctly in case if not fulfilled.
        Check that data are fetched in async way in case of request.
    
    commit 3c2ed706f1c158ef0f25ca384b68331e743233b9
    Author: Łukasz Nowak <luke@nexedi.com>
    Date:   Mon Sep 26 16:38:18 2011 +0200
    
        Return passed status.
    
    commit 4c01e36979a0c023b69bfcffdd586e79dc87781e
    Author: Łukasz Nowak <luke@nexedi.com>
    Date:   Mon Sep 26 16:33:00 2011 +0200
    
        Mock current method.
    
    commit 4364b1de3c01f745a6b8de6893e9d6e1c692f92f
    Author: Łukasz Nowak <luke@nexedi.com>
    Date:   Mon Sep 26 16:32:34 2011 +0200
    
        Return always proper method call.
    
    commit 9366301aa8dddf91d77f515f78da0037179056d2
    Author: Łukasz Nowak <luke@nexedi.com>
    Date:   Mon Sep 26 15:57:10 2011 +0200
    
        Prove that request method is async and do not raise.
    
    commit 145a58332539ce2445b909da11c35072e864af39
    Author: Łukasz Nowak <luke@nexedi.com>
    Date:   Mon Sep 26 15:50:56 2011 +0200
    
        Use mocked server.
    
    commit 34068539f865b4e79f798e06790f14ec4c2d38b2
    Author: Łukasz Nowak <luke@nexedi.com>
    Date:   Mon Sep 26 15:24:24 2011 +0200
    
        Check parameters on runtime.
    
    commit 2269d2283b11bee74345e13482d8e7a3aa0aaea7
    Author: Łukasz Nowak <luke@nexedi.com>
    Date:   Mon Sep 26 14:15:55 2011 +0200
    
        Make request asynchronous.
    
        Do communication when data of computer partition are being accessed, thanks
        to this request method returns "lazy" CP object, and does not do any
        communication itself.
    
    commit 8bd6d7587821def17617c455be9729c71e8fd5df
    Author: Łukasz Nowak <luke@nexedi.com>
    Date:   Mon Sep 26 15:42:20 2011 +0200
    
        User not password are not used in slap.
    
        Authentication is done by SSL keys.
    
    commit 89fd61f45f60d9999dd281152e34bec24a50bb47
    Author: Łukasz Nowak <luke@nexedi.com>
    Date:   Mon Sep 26 15:41:42 2011 +0200
    
        Move and make test running (!=passing)
    c47d0343
testVifibSlapComputerPartitionRequest.py 32.2 KB