Refactor result types into subclasses

Change-Id: Ib6c2c72b7cad1e69552e9e21d3f5b7a91fbc08e2
Reviewed-on: http://review.couchbase.org/26283
Reviewed-by: Volker Mische <volker.mische@gmail.com>
Tested-by: Matt Ingenthron <matt@couchbase.com>
Reviewed-by: Matt Ingenthron <matt@couchbase.com>
PYCBC-100: Couchbase Apache Copyrights

Change-Id: I76581c337b5df9aab203431f25eac6ab92631318
Reviewed-on: http://review.couchbase.org/26284
Reviewed-by: Matt Ingenthron <matt@couchbase.com>
Tested-by: Mordechai Nunberg <mnunberg@haskalah.org>
Tested-by: Matt Ingenthron <matt@couchbase.com>
Specify the value as bytes for bench example

Change-Id: Iaecd99f096b9316c5f82392cf63ec1776eab1054
Reviewed-on: http://review.couchbase.org/26285
Reviewed-by: Mordechai Nunberg <mnunberg@haskalah.org>
Tested-by: Mordechai Nunberg <mnunberg@haskalah.org>
PYCBC-110: Document C internals API

Change-Id: I1409ebf1378d43988b72744fedb04c713d461d52
Reviewed-on: http://review.couchbase.org/26288
Reviewed-by: Pavel Paulau <pavel.paulau@gmail.com>
Reviewed-by: Mordechai Nunberg <mnunberg@haskalah.org>
Tested-by: Mordechai Nunberg <mnunberg@haskalah.org>
PYCBC-111: Fix leak on bad arguments

Change-Id: I43e5ed18641985b5af2bd0f8f022e53818d20c0b
Reviewed-on: http://review.couchbase.org/26289
Reviewed-by: Volker Mische <volker.mische@gmail.com>
Reviewed-by: Pavel Paulau <pavel.paulau@gmail.com>
Tested-by: Mordechai Nunberg <mnunberg@haskalah.org>
Allow option to skip slow tests

Change-Id: Id2e07dd8b68cee407e4e3154c3787712ac60ce2f
Reviewed-on: http://review.couchbase.org/26298
Reviewed-by: Volker Mische <volker.mische@gmail.com>
Reviewed-by: Mordechai Nunberg <mnunberg@haskalah.org>
Tested-by: Mordechai Nunberg <mnunberg@haskalah.org>
Fix some more leaks

- Took recommendations from a static analyzer, cpychecker (gcc-python)
- Fixed leaked reference via PyIter_Next()
- As a result, refactored the sequence_next() function to always return
  a new reference (it INCREFs on list/tuple/dict)
Change-Id: Ic430be0993a6cfbe17026f14696c1bdc05c7ec7b
Reviewed-on: http://review.couchbase.org/26305
Reviewed-by: Volker Mische <volker.mische@gmail.com>
Reviewed-by: Pavel Paulau <pavel.paulau@gmail.com>
Tested-by: Mordechai Nunberg <mnunberg@haskalah.org>
Refactor tests to use generated keys

Wrapping a key generation function lets us expand things in the future,
such as providing an option to delete keys before they are used, or
allowing separate prefixes so tests can execute in parallel.

Change-Id: Id3b8362fde9720988f2f3816c18f91048306f342
Reviewed-on: http://review.couchbase.org/26316
Reviewed-by: Volker Mische <volker.mische@gmail.com>
Tested-by: Mordechai Nunberg <mnunberg@haskalah.org>
Rename tests.ini to tests.ini.sample

This allows modifications to the actual test configuration file without
having git complain about it.

Change-Id: I54a0bfb7f5629a4a3b4d220ffe3d1d37c4342448
Reviewed-on: http://review.couchbase.org/26319
Reviewed-by: Volker Mische <volker.mische@gmail.com>
Tested-by: Mordechai Nunberg <mnunberg@haskalah.org>
Convert constructor arg handling to xmacros

This makes it simpler to add/remove/change arguments in the future

Change-Id: I3a8f6d792e7e6c9a9855aca524441e7e89c6280b
Reviewed-on: http://review.couchbase.org/26322
Reviewed-by: Volker Mische <volker.mische@gmail.com>
Tested-by: Mordechai Nunberg <mnunberg@haskalah.org>
PYCBC-114: Internal HTTP wrappers

This provides basic wrappers around lcb's make_http_request, as well as
exposes the administrative handle API. Currently this is not
documented as the API may change.

Change-Id: Ibd084de2b7b56ac0eb09b8c5d62e09cc1e273ecc
Reviewed-on: http://review.couchbase.org/26323
Reviewed-by: Volker Mische <volker.mische@gmail.com>
Tested-by: Mordechai Nunberg <mnunberg@haskalah.org>
Some more fixes in sequence functions

Initialize dictpos to 0, if it's a dict
Return -1 if PyDict_Next returns < 1

Change-Id: Ied5af0048b02a4a397b9f70679658f9f4c256a1b
Reviewed-on: http://review.couchbase.org/26327
Reviewed-by: Volker Mische <volker.mische@gmail.com>
Tested-by: Mordechai Nunberg <mnunberg@haskalah.org>
Throw ArgumentError when dict is passed to get

To be more precise, we accept dicts for get, but values must be integers
which are TTLs (i.e. touch)

Change-Id: I8d5f7ab07885f2450c7e5a65fb96262cc696400a
Reviewed-on: http://review.couchbase.org/26328
Reviewed-by: Volker Mische <volker.mische@gmail.com>
Tested-by: Mordechai Nunberg <mnunberg@haskalah.org>
PYCBC-108: Pass ascii=false to json.dumps

Change-Id: If1b1cb8d9824461628865101ab8ffeac4a7b8ded
Reviewed-on: http://review.couchbase.org/26330
Reviewed-by: Volker Mische <volker.mische@gmail.com>
Reviewed-by: Rami Chowdhury <rami@esplorio.com>
Tested-by: Mordechai Nunberg <mnunberg@haskalah.org>
PYCBC-115: Add touch command

Change-Id: Ia41c3b4e38f9c90a9ad33bef4ec3f6cfdc437888
Reviewed-on: http://review.couchbase.org/26337
Reviewed-by: Pavel Paulau <pavel.paulau@gmail.com>
Reviewed-by: Volker Mische <volker.mische@gmail.com>
Tested-by: Mordechai Nunberg <mnunberg@haskalah.org>
Don't require two buckets for testing

This allows tests to be run against an established cluster, rather than
requiring the script to set up the buckets

Also fixed were some issues in automatically inserting the username
if a SASL bucket was being used

Change-Id: I1c81ed5d3718d33c9be1728ba8bbef70dcfbdd12
Reviewed-on: http://review.couchbase.org/25944
Reviewed-by: Rami Chowdhury <rami@esplorio.com>
Reviewed-by: Volker Mische <volker.mische@gmail.com>
Tested-by: Mordechai Nunberg <mnunberg@haskalah.org>
Add method to get libcouchbase version

Change-Id: Ie81a7f55433a36f28de7075de976d9e6255357f4
Reviewed-on: http://review.couchbase.org/26345
Reviewed-by: Volker Mische <volker.mische@gmail.com>
Tested-by: Mordechai Nunberg <mnunberg@haskalah.org>
Remove extraneous argument in Connection_server_nodes

Change-Id: I8516d7df4201d86f8b0ea07fbe1cdd5403333688
Reviewed-on: http://review.couchbase.org/26346
Reviewed-by: Mordechai Nunberg <mnunberg@haskalah.org>
Tested-by: Mordechai Nunberg <mnunberg@haskalah.org>
Fix compilation warnings adding stricter flags

-std=c89 -pdeantic -Wextra -Werror -Wno-long-long
-Wno-missing-field-initializers

Also, fix some compiler warnings under windows. There's still a LNK4197
warning which is yet to be resolved

Change-Id: Ia9e139b0cbce107c0ea9c49008b8b77f5fca8577
Reviewed-on: http://review.couchbase.org/26349
Reviewed-by: Volker Mische <volker.mische@gmail.com>
Tested-by: Mordechai Nunberg <mnunberg@haskalah.org>
PYCBC-105: Raw view API

Currently I've tagged the signatures as being unstable

Change-Id: I54a598b4f941fd0a01a85c799d6324d128b1e81a
Reviewed-on: http://review.couchbase.org/26365
Reviewed-by: Volker Mische <volker.mische@gmail.com>
Reviewed-by: Matt Ingenthron <matt@couchbase.com>
Tested-by: Mordechai Nunberg <mnunberg@haskalah.org>