This appears to be an unmaintained fork of the original code, which
lives elsewhere [1]. Kill it.
[1] https://github.com/cloud-init/cloud-init
Change-Id: I1f57197f1f67aa6adce152b5e4acc63a72277c6a
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
To solve the problem of "db type could
not be determined" on py34 we have to run first the py34 env to, then, run
py27. This patch puts py34 first on the tox.ini list of envs to avoid this
problem to happen.
Change-Id: I50f894062cf681a44fe7da2342a74b31898f47e8
Upstream issue is:
https://github.com/gabrielfalcao/HTTPretty/issues/278
So until its fixed (and released) block those versions
from being used.
This also fixes the .gitreview file which no longer
works due to the move to openstack from stackforge.
Change-Id: I52d593cbf987081d53506cdae1ab59c240517a01
Python 2.6 support would be dropped by
Infra team from mitaka,CI would no longer be testing it,
so projects should drop it too.
Change-Id: I81d2a088bdf6f6052a45c4fabfdb32a662927098
--log-to-console will output messages at INFO and above to the
command-line. This is super-useful when running cloud-init from a
terminal, when you don't want to have to dig in a log file.
Change-Id: Ieb3db384b73441c19ef463649c94b04ffaac8026
The current patch proposes the addition of a new data source strategy
for filtering the strategies by a given list of versions.
Each data source exports a new API, called ``version()``, which should
return the underlying version of the said data source. This implies that
each data source module can export multiple versioned data sources and it's
the duty of an external strategy to select the appropiate data source with
regard to a particular set of versions.
Change-Id: I6ef2fdd6520a53fc600232247f23bd22b848461e
The patch brings a couple of new concepts into cloudinit.
We have a general miniframework for defining plugins and discovering them,
with an actual implementation which uses the *pkgutil* builtin module.
Built atop of this framework, we have a new data source loader, found
in cloudinit.bases.DataSourceLoader. The loader operates on three concepts:
- the *module iterator*, which is used to list modules from a specific
location (in our case, from cloudinit.sources.__path__). The data
source loader takes care to use only the modules that exports a
given API.
- the data source discovery API assumes that each data source module exports
a function called `data_sources`, which should return a tuple of data source
classes that the said module exports. The loader filters the modules
that provides this API.
- the data source loader uses a new concept called *search strategy*
for discovering a potential data source. The search strategies
are classes whose purpose is to select one or more data sources
from a data source stream (any iterable).
There are multiple ways to implement a strategy, the search
can be either serial or parallel, there's no additional requirement
as long as they return an iterable.
Also, the strategies can be stacked together, for instance, having
two strategies, one for selecting only the network data sources
and another for selecting the available data sources from a list
of potential data sources.
This patch also adds a new API that uses the DataSourceLoader
with a given module iterator and strategies for selecting one
data source that cloudinit can use.
Change-Id: I30f312191ce40e45445ed9e3fc8a3d4651903280
unregister allows us to unregister things, so that applying
configuration changes will affect the reporting.
Change-Id: I35932c95784060349c60a11b523bf6897fb80090
This adds a new class ReportingEvent Stack for using
report_start_event and report_finish_event easily with a context
handler.
It also modifies FinishReportingEvent (and finish_event) accordingly
to take a status rather than simply a boolean successful. The intent
is that WARN is provided when a non-desireable result occurred but it
is non-fatal.
Change-Id: I978c76e429790036f8740d7eb7279e925a1e74d0
Having a method that raises NotImplementedError is usually not ideal,
since the implementations of the class can't delegate control
through super to the parent or to other classes found in the MRO.
Instead, we mark a priori ReportingHandler as a base class, leaving
the implementation of `publish_event` empty.
Change-Id: Id5c442b6998743b1caffbad627847ee5e88f2982
This will give us a clearer separation between the core reporting code
(which shouldn't change very often) and the handler code (which is
likely to change more often as we add new handlers and new features to
existing handlers).
It is also the first (baby) step on the path of making handlers
pluggable so third-parties can easily drop their own in.
Change-Id: I648df057d2ff719a2a81398afc80aaef9225ff5c
It seems sane to have consistent use of a 'TestCase' class wherever
possible.
I stumbled on need for this in porting some code (the reporter)
back to cloud-init 0.7.
Change-Id: Ia10546484dfe73154a68e817129ac2f950d5fe85
This will allow us to actually have parameters passed in, which we'll
need for handlers with configuration options.
Change-Id: If105b8108d80b49b6da9e16c7520ddcee1f20c8f
We had a test that was sleeping for around a second, this fudges
time.now() to make it look like it doesn't need to sleep.
Change-Id: I7f4b64ef906fcea50d88bfbf4c3f20f848b26274
pbr has issues invoking sphinx versions >1.3 (http://pad.lv/1379998)
The fix here is two-fold:
a.) no longer use 'pip install --pre'
I'd rather spend less time debugging failures due to new pip packages.
b.) shorten the list of requirements on sphinx as a result of 'a'
Since 1.3b* versions were pre, and we're no longer installing with --pre
we do not need to explicitly blacklist them.
At a future date when pbr is available with a fix, we can remove the upper
limit on sphinx.
Change-Id: I696fc3e4ef8803bbb2a95e34501d5330a64ab93c
this improves tox-venv to:
a.) consider ./.tox as the tox dir
useful if you run tox-venv from ~/bin and you're in cloud-init dir
with .tox there.
if no tox.ini and .tox are in this dir, fall back to using
the old look ${0%/*}/../.tox
b.) support '--list'
ie, running tox-venv adds support to tox-venv so you can list environments
explicitly
c.) outputs the list of available environments with --help
a '*' at the end indicates the environment appears presnt.
d.) any environment not present will be created with unless '--no-create'
e.) 4 spaces instead of 3 for indentation consistency with python
Example usage:
$ tox-venv docs python --version
Python 3.4.3+
Change-Id: I8a3d07c27fc3e4e41421e59ac5f47628a3612b83