DESCRIPTION

CBQE-2411:
1. Added code for XDCRRemoteCluster, XDCReplication classes
2. Created wrapper function for rebalance operations for master and non-master nodes separately to avoid any mistake
3. add code for views/create/query/compaction/monitor-fragmentation

Change-Id: Iaa9bf0a453298fb92dc3d236016d5d3375fb510e


COMMENTS

author: Fisher Vargas
date: 2014-10-31 11:32:28.735000000

Uploaded patch set 1.

-------------------------------------
author: Hugo Blankenship
date: 2014-10-31 11:32:35.812000000

Patch Set 1:

Build Started http://factory.couchbase.com/job/testrunner-Jasmin Rangel-master/2875/

-------------------------------------
author: Fisher Vargas
date: 2014-10-31 11:42:17.751000000

Patch Set 1:

Sample Test:

from xdcrnewbasetests import XDCRNewBaseTest



class NewTest(XDCRNewBaseTest):

    def setUp(self):
        XDCRNewBaseTest.setUp(self)

    def tearDown(self):
        XDCRNewBaseTest.tearDown(self)

    def load_with_ops(self):
        self.set_topology_chain()
        self.setup_all_replications()
        self.load_chain()
        self.verify_results()

-------------------------------------
author: Hugo Blankenship
date: 2014-10-31 11:50:23.856000000

Patch Set 1: Verified+1

Build Successful 

http://factory.couchbase.com/job/testrunner-Jasmin Rangel-master/2875/ : SUCCESS

-------------------------------------
author: Angelina Mayer
date: 2014-11-01 01:39:07.396000000

Patch Set 1:

(6 comments)

I'm not completely done with the code review. I'm done reading just 1/3rd of the code.

It's good that we've been able to get the concept of source and dest down to the replication level as opposed to cluster level. Im still analyzing the design of classes. Expect to have the code reviewed completely by Monday/Tuesday.

Meanwhile, can you attach a sample run?

Line:40, pytests/xdcr/xdcrnewbasetests.py -> what does this continuous mean ?

Line:224, pytests/xdcr/xdcrnewbasetests.py -> This is actually a REST exception. Can we have one such exception type?

Line:241, pytests/xdcr/xdcrnewbasetests.py -> XDCRRemoteClusterRef instead?

Line:261, pytests/xdcr/xdcrnewbasetests.py -> Pls add one line description above every class and method.

Line:301, pytests/xdcr/xdcrnewbasetests.py -> I like this composition - nesting XDCReplication object inside XDCRemoteRef.

Line:316, pytests/xdcr/xdcrnewbasetests.py -> This needs to be clearly mentioned as remote_cluster_ref. Remote_cluster sounds like a cluster object and I was wondering why you were doing 
self.__remote_cluster.get_src_cluster().get_master_node().

Also it would be great if you can avoid the get_src_cluster() in RemoteRef class.  get_src_cluster() methods in different classes is affecting readability.

say the above can be written as -
master = self.__remote_cluster_ref.src_cluster.get_master_node().

OR 

we can have the src_cluster and dest_cluster defined inside XDCReplication class itself like -
src_cluster = self.__remote_cluster.get_src_cluster().
So it would be easier to reference source cluster of a replication as 
replication1.src_cluster

-------------------------------------
author: Fisher Vargas
date: 2014-11-03 10:41:07.406000000

Patch Set 1:

(5 comments)

Line:40, pytests/xdcr/xdcrnewbasetests.py -> http://docs.couchbase.com/couchbase-manual-2.2/#creating-xdcr-replications

Corrected created new class REPLICATION_TYPE.

Line:224, pytests/xdcr/xdcrnewbasetests.py -> Done

Line:241, pytests/xdcr/xdcrnewbasetests.py -> Done

Line:301, pytests/xdcr/xdcrnewbasetests.py -> Done

Line:316, pytests/xdcr/xdcrnewbasetests.py -> Done

-------------------------------------
