30 Commits

Author SHA1 Message Date
Jenkins
ba483c7b90 Merge "Use stevedore directive to document plugins" 2015-12-02 03:30:40 +00:00
Jenkins
1232641b36 Merge "Update Trove Installation guide" 2015-11-28 18:40:20 +00:00
Mariam John
362cc26f5b Update Trove Installation guide
Updated the Trove Installation guide to reflect the ubuntu version
to use.

Change-Id: I5e61baa86d5352fa8ebd2106b250336bfa09708b
2015-11-23 15:23:05 -06:00
Craig Vyvial
68c1c61b54 fix the version info of trove to use pbr
Change-Id: I2a445cdea20e70399e331ea4e97042ecd0137c2e
Closes-Bug: #1513259
2015-11-05 11:04:46 -06:00
JuPing
1a1f4e616d Fix the bug of "Error spelling of 'AMPQ'"
The word "AMPQ" should be spelled as "AMQP",
so it is changed.

Change-Id: I7b93824c0adf7a7fef7c2b827607eccdfa7f3608
Closes-Bug: #1503504
2015-10-13 16:47:27 +00:00
Dong Ma
be1eed1183 Use stevedore directive to document plugins
The point behind the addition of the stevedore.sphinxext extension is
"to document drivers and other types of plugins to make the available
sets built into projects easier to discover"(dhellman).

More details in the ML thread at
http://lists.openstack.org/pipermail/openstack-dev/2015-August/073338.html

Change-Id: Ib1d4c23a64cbd0010c88ff77b97b1173da302bed
2015-09-26 09:24:09 +08:00
Denys Makogon
cdc826c358 Improving manual install docs
Reasons:
 - manual install docs are outdated;

Changes:
 - doc improvement;

Change-Id: I3580293eb92e9063b3989a852e8e80715a09156b
Closes-Bug: #1342697
2015-05-27 11:08:57 +03:00
Swapnil Kulkarni
7e08ba6f47 Updated glance API for creating public image
The glance command line parameter changed from
--public to --is-public {True|False}. Updated it in
documentation

Change-Id: Icfc81966608ace049fceef260ec2b18d9e3570bb
2015-05-12 09:22:20 +00:00
Petr Malik
4899f49401 Implement dangling mock detector for unittests
The Issue:

Dangling mock objects in global modules (mocked members of imported
modules that never get restored) have been causing various transient
failures in the unit test suite.

The main issues posed by dangling mock objects include:
- Such object references propagate across the entire test suite. Any
caller may be hit by a non-functional or worse crippled module member
because some other (potentially totally unrelated) test case failed to
restore it.
- Dangling mock references shared across different test modules may
lead to unexpected results/behavior in multi-threaded environments. One
example could be a test case failing because a mock got called multiple
times from unrelated modules.

Such issues are likely to exhibit transient random behavior depending
on the runtime environment making them difficult to debug.

This contribution is aiming to provide a simple transparent detection
layer that would help us prevent (most of) such issues.

Solution Strategy:

We extend the 'testtools.TestCase' class currently used as the base
class of Trove unit tests with functions that attempts to detect leaked
mock objects in imported modules. The new 'trove_testtools.TestCase'
implementation basically retrieves all loaded modules and scans their
members for mock objects before and after each test case.

An outline of the procedure follows:
1. Override the setUp() method and add a cleanup call (executed after
the tearDown()) to collect mock references before and after a test case.
2. Subtract the two sets after each test case and mark it as failed if
there are any new mock references left over.

Code Impact:

The existing test classes replace 'testtools.TestCase' base class with
'trove_testtools.TestCase'.

Documentation Impact:

Added a short document on recommended mocking strategies in unit tests
to the Trove Developer Documentation.

Known Limitations:

The current implementation has a configurable recursion depth which is
the number of nested levels to examine when searching for mocks.
Higher setting will potentially uncover more dangling objects,
at the cost of increased scanning time.
We set it to 2 by default to get better coverage.
This setting will increase test runtime.

Recommended Mocking Patterns:

Mock Guide: https://docs.python.org/3/library/unittest.mock.html

- Mocking a class or object shared across multiple test cases.
  Use the patcher pattern in conjunction with the setUp() and tearDown()
  methods [ see section 26.4.3.5. of Mock Guide ].

def setUp(self):
    super(CouchbaseBackupTests, self).setUp()
    self.exe_timeout_patch = patch.object(utils, 'execute_with_timeout')

def test_case(self):
    # This line can be moved to the setUp() method if the mock object
    # is not needed.
    mock_object = self.exe_timeout_patch.start()

def tearDown(self):
    super(CouchbaseBackupTests, self).tearDown()
    self.exe_timeout_patch.stop()

Note also: patch.stopall()
Stop all active patches. Only stops patches started with start.

- Mocking a class or object for a single entire test case.
  Use the decorator pattern.

@patch.object(utils, 'execute_with_timeout')
@patch.object(os, 'popen')
def test_case(self, popen_mock, execute_with_timeout_mock):
    pass

@patch.multiple(utils, execute_with_timeout=DEFAULT,
                generate_random_password=MagicMock(return_value=1))
def test_case(self, generate_random_password, execute_with_timeout):
    pass

- Mocking a class or object for a smaller scope within one test case.
  Use the context manager pattern.

def test_case(self):
    # Some code using real implementation of 'generate_random_password'.
    with patch.object(utils, 'generate_random_password') as pwd_mock:
        # Using the mocked implementation of 'generate_random_password'.
    # Again code using the actual implementation of the method.

def test_case(self):
    with patch.multiple(utils, execute_with_timeout_mock=DEFAULT,
                        generate_random_password=MagicMock(
                                return_value=1)) as mocks:
        password_mock = mocks['generate_random_password']
        execute_mock = mocks['execute_with_timeout_mock']

Change-Id: Ia487fada249aa903410a1a3fb3f717d6e0d581d2
Closes-Bug: 1447833
2015-05-04 17:53:53 -04:00
Amrith Kumar
d8d8450f1b Add short document on building guest images
It has long been felt that we need more (better) documentation on
building guest images. This document is a starting point in that
direction.

Authored-By: Amrith Kumar <amrith@tesora.com>
Co-Authored-By: Peter Stachowski <peter@tesora.com>

Change-Id: I2fe0cd1856778a47f1bfad2b9098a1f98e701f91
2015-03-27 14:50:23 -04:00
Monty Taylor
28e8fcf0ee Clean up github references from docs
OpenStack hosts things in places that are not github. Also, it seems
that there is a big blob of unrelated readme in the README file.

Closes-Bug: 1399839
Change-Id: I70cc6772b50591c4b3badd6c92567a7a6541bacf
2014-12-05 23:24:53 -08:00
Jenkins
87d60494ce Merge "Stop using intersphinx" 2014-10-09 19:45:44 +00:00
Anna Philips
a681bea342 Docs: Fix Sphinx warnings
Sphinx emits warnings messages when building docs. Correct identation fixes this.

Change-Id: Ic84f10e13b6dc9ea70575dcea3bd2104007f1d56
Closes-Bug:1333205
2014-10-02 17:58:01 +00:00
Andreas Jaeger
e94b266ee2 Stop using intersphinx
Remove intersphinx from the docs build as it triggers network calls that
occasionally fail, and we don't really use intersphinx (links other
sphinx documents out on the internet)

This also removes the requirement for internet access during docs build.

This causes docs jobs to fail because we error out on warnings.

Change-Id: I71e941e2a639641a662a163c682eb86d51de42fb
Related-Bug: #1368910
2014-09-12 22:45:37 +02:00
Laurel Michaels
112f280c6f Manual install page needed swift info
The "manual install" developer doc located here:

http://docs.openstack.org/developer/trove/dev/manual_install.html

did not indicate that you need swift for backups.

I added the swift info.

Change-Id: I23e8565aee7e7036e4e6065e2c22f568e65ca7a7
Closes-Bug: #1342273
2014-07-17 12:44:02 -04:00
shayne-burgess
cc59703754 Updates developer install doc to use trove cli
Closes-Bug: #1260284
Change-Id: I293675592c2385bfab8ba73333ac515e68184d43
2014-06-16 11:16:46 -07:00
Sergey Lukjanov
d1d517a544 Start using oslosphinx theme for docs
Change-Id: I0d08e7abbbf51d526d379e8fcea7151ba16d1746
2014-03-26 15:50:05 +04:00
Jenkins
8a443dab5b Merge "rename and fix the db_wipe command" 2014-03-11 08:37:56 +00:00
Ionuț Arțăriși
a5d745dd87 rename and fix the db_wipe command
* rename db_wipe to db_recreate
* make --repo-path an optional argument for db_wipe and use it
* add command line help strings for db_wipe

Closes-Bug: #1279734

Change-Id: I1a1d3ad56989026fb10f6c57bb479814dc51328e
2014-03-10 10:16:03 +01:00
tanlin
066843cb50 Rename Openstack to OpenStack
Change-Id: I5ac475b3fc2c72abf9a082b3ee406029082fee87
2014-02-13 17:04:13 +08:00
Felipe Reyes
2fab11b82c Adds missing dependency to the documentation
Trove depends on MySQL-python package, to compile and install it is
required libmysqlclient-dev, otherwise the installation procedure
described in 'doc/source/dev/manual_install.rst' will fail in recently
installed boxes.

Closes-Bug: #1261525
Change-Id: I0cc325eb7efb056efe9682fa3478795ae025bfa1
2013-12-17 22:25:25 -03:00
Jenkins
453c58a800 Merge "Fixed misspellings of common words" 2013-12-12 18:29:47 +00:00
Cyril Roelandt
cb58f8ca0d Replace "tokenauth" by "authtoken" in configuration files
This is the standard word used by all other projects.

Change-Id: Ibd52056bd1214f5fd7b2f2fd315086542d34fd0c
Closes-Bug: 1234314
2013-12-10 15:34:06 +01:00
Nikhil Manchanda
be39d7be30 Fixed misspellings of common words
Fixed misspelling of common words found by the 'misspellings' tool.

Closes-Bug: #1257531
Change-Id: If317929be260c5efb0949921be1143d1ccd4e283
2013-12-03 15:52:47 -08:00
Ed Cranford
384576675f Conductor proxies host db access for guests
Previously, instances updated their status by
updating the database on the host directly.
Necessarily, each instance would need access to the
database to stay updated.

Trove's new conductor service eliminates that need by
working as a proxy for those instances. By sending a heartbeat
to conductor via RPC, conductor updates the database
on the host on behalf of the instance.

As backups also made use of the host database, the backup
code has been refactored to take richer inputs to remove
the need to query the host database, and now conductor is
also used to submit updates to backup states.

Implements: blueprint trove-conductor

Change-Id: I4cb34baedd0e3a50051f9e66de95c9028c66e4b5
2013-11-26 11:52:00 -06:00
Jenkins
307b014b78 Merge "Adds instructions for manual Trove installation" 2013-09-25 02:57:42 +00:00
Michael Basnight
15b706e2e0 Vote for channel logging
Change-Id: I795a77a9aeec07cc720a550ae66f888e3b208d78
2013-09-23 13:57:55 -07:00
ZhiQiang Fan
e52c0f568e Replace OpenStack LLC with OpenStack Foundation
Some files still use trademark OpenStack LLC in header, which
should be changed to OpenStack Foundation.

NOTE: tools/install_venv.py is not touched, should sync with oslo,
so does trove/openstack/common/*

Change-Id: I7218ae896eb7db681bb224a209df47f203952606
Fixes-Bug: #1214176
2013-09-20 05:02:14 +08:00
Illia Khudoshyn
db1fe87fe3 Adds instructions for manual Trove installation
Adds step-by-step instructions for installing Trove
with existing OpenStack environment

blueprint provide-documentation-for-manual-setup-of-trove
Change-Id: I56f3f0f6b99f405febb8e4734775b3c16fc292ce
2013-09-17 10:48:41 +03:00
Nikhil Manchanda
708f3230d0 Added developer documentation for Trove
Added initial sphinx/docutils documentation for Trove. Also made
corresponding changes to setup.cfg so that OpenStack CI is able
to build the Trove developer docs.

Fixes blueprint: trove-dev-docs

Change-Id: I900ffd2c0b661fb7642fa06c08ee92892eb176f0
2013-07-18 17:21:00 -07:00