DESCRIPTION

CBQE:3685- Create a structure to encapsulate bucket creation params.
I changed cluster.py's create bucket commands to accept a dict. I also added a method inside cluster.py that takes in bucket parameters and returns a dict that contains those parameters. This dict is then passed to the create bucket commands which then passes those to the CreateBucketTask. Inside CreateBucketTask the dictionary is unpacked and the parameters are sent to the rest_client.create_bucket command. The rest of the changes are everywhere that the cluster create bucket commands are used. The conf file I changed was to fix the spelling of structure, I also fixed the affected tests method header to spell structure correctly. Finally I modified BaseTestCase to create dicts and then send them to the cluster create calls, essentially just modified BaseTestCase to work with the above changes.

Change-Id: I8afc1753e3519b5692811c7a9c160530dc25c447


COMMENTS

author: Titus Ho
date: 2016-12-07 20:44:28.644000000

Patch Set 4:

Thanks Ajay!  Overall code looks great, and my only concern is that the benefit of having params are not being completely realized.  

For instance, calls to create bucket now have an extra intermediate step of create_bucket_params - which doesn't save much from tester's vantage point.  If instead we created the params in basetestcase... ie during Setup, then every test would only need to pass self.base_params to create bucket call.  As seen here, we've already created all the params bucket_create would need:
https://github.com/couchbase/testrunner/blob/master/pytests/basetestcase.py#L139

So all we need to to next is create a self.bucket_params(...) from either the params we just computed or pass input var itself.  This way tests will not have to come back and do it later.

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