Commit Graph

2761 Commits

Author SHA1 Message Date
Zuul 09c3dd9aec Merge "Retire cloud-init" 2019-05-02 17:09:01 +00:00
OpenDev Sysadmins 1e3ca9500a OpenDev Migration Patch
This commit was bulk generated and pushed by the OpenDev sysadmins
as a part of the Git hosting and code review systems migration
detailed in these mailing list posts:

http://lists.openstack.org/pipermail/openstack-discuss/2019-March/003603.html
http://lists.openstack.org/pipermail/openstack-discuss/2019-April/004920.html

Attempts have been made to correct repository namespaces and
hostnames based on simple pattern matching, but it's possible some
were updated incorrectly or missed entirely. Please reach out to us
via the contact information listed at https://opendev.org/ with any
questions you may have.
2019-04-19 19:50:02 +00:00
Stephen Finucane 868096bb52 Retire cloud-init
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>
2019-04-01 16:48:35 +01:00
malei d0f880277b Put py34 first in the env order of tox
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
2015-10-19 03:26:29 +08:00
Jenkins 53373f0030 Merge "Update stackforge to openstack" 2016-01-08 23:49:14 +00:00
Jenkins 20229fb08e Merge "Deprecated tox -downloadcache option removed" 2016-01-08 23:26:29 +00:00
Jenkins 1915913388 Merge "py26 is no longer supported by Infra's CI" 2016-01-08 23:19:42 +00:00
XiaBing Yao c658dfc6bb Update stackforge to openstack
Change-Id: Id4a3fea29bcc58edaf34c84e032ce8dc86321cbb
2016-01-08 23:11:16 +00:00
Joshua Harlow e77b9eda21 It seems like httppretty 0.8.11 and 0.8.12 are broken
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
2016-01-06 15:19:45 -08:00
janonymous 36a416726b py26 is no longer supported by Infra's CI
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
2015-12-26 15:45:58 +05:30
Ondřej Nový 2109d5a196 Deprecated tox -downloadcache option removed
Caching is enabled by default from pip version 6.0

More info:
https://testrun.org/tox/latest/config.html#confval-downloadcache=path
https://pip.pypa.io/en/stable/reference/pip_install/#caching

Change-Id: Icf45281133b540aa556cb9812396328f368d6f02
2015-12-11 21:18:43 +01:00
Scott Moser 0c2db7d8d2 LICENSE: correct wording with respect to Apache 2
The license document contained some logical errors, which are
fixed here.

Change-Id: I2a966ea8e0f680c775b9b5c1076cc922c099e187
2015-09-28 10:05:19 -04:00
Daniel Watkins cb1cf39109 Use a single source for version information.
Standardise on using the version given in setup.cfg.

Change-Id: I24d44fd0e3d7a5ab90ecfd2a34c8e4bb88b50ee4
2015-09-04 15:52:47 +01:00
Daniel Watkins a51119762c Configure basic logging, and make it possible to log to console.
--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
2015-09-04 15:40:22 +01:00
Claudiu Popa dc3efec379 Add a version filtering strategy
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
2015-09-01 13:19:32 +03:00
Jenkins a6a6466035 Merge "Add an API for loading a data source" 2015-08-31 15:48:23 +00:00
Claudiu Popa 42559c7f19 Add an API for loading a data source
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
2015-08-31 16:56:25 +03:00
Daniel Watkins 833dbbb28c Fix running cloud-init with no arguments on Python 3.
Change-Id: I4c1b27aa5a762fd2e9fbec7085c719060c60071c
2015-08-07 13:51:57 +01:00
Jenkins cf4f35ddac Merge "add cloud-init main" 2015-08-07 09:55:01 +00:00
Jenkins 9da7967e49 Merge "Use an explicit absolute import for importing the logging module" 2015-08-07 09:38:38 +00:00
Scott Moser fe616bf41b Add unregister and reset to DictRegistry and use
unregister allows us to unregister things, so that applying
configuration changes will affect the reporting.

Change-Id: I35932c95784060349c60a11b523bf6897fb80090
2015-08-06 18:04:43 +01:00
Claudiu Popa 62c23a29b7 Use an explicit absolute import for importing the logging module
Change-Id: Ic8a6107e202644a8a5298332712cbf2896a5e408
2015-08-06 20:03:07 +03:00
Scott Moser 735f0ac4ad add ReportingEventStack
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
2015-08-05 10:33:50 -05:00
Claudiu Popa 628e1a2fb0 Make ReportingHandler a proper base class
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
2015-08-05 14:12:22 +03:00
Scott Moser ecb7a5a389 add cloud-init main
This is start of the cloud-init main executable.

Change-Id: I795e1d279a99476fb6cd33d1e7ad6a7af0978c8d
2015-08-04 20:20:57 -05:00
Daniel Watkins 523967580a Refactor handlers out of main reporting module.
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
2015-07-31 17:13:46 +01:00
Scott Moser c8fd01e292 tests: use cloudinit.tests.TestCase everywhere
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
2015-07-28 16:07:37 -04:00
Jenkins a433358bbc Merge "Make reporting handlers configurable." 2015-07-28 17:53:30 +00:00
Jenkins 0be0d1dec0 Merge "Use a registry to configure reporting handlers." 2015-07-28 17:44:06 +00:00
Jenkins e82788e033 Merge "Implement a DictRegistry." 2015-07-28 17:40:55 +00:00
Jenkins e9f42d1014 Merge "improve test coverage" 2015-07-20 17:53:44 +00:00
Scott Moser 303afb7e74 improve test coverage
add some tests for safeyaml and test_url_helper

Change-Id: I3a88f52e6c02f6f1f8f31363886f6fab223c14e3
2015-07-20 11:33:19 -04:00
Daniel Watkins af671321af Make reporting handlers configurable.
And configure the LogHandler by default.

Change-Id: Ic3a1cebbe8684033fb8d46bf4baebb55a43fc890
2015-07-20 10:19:18 +01:00
Daniel Watkins b5f5a16704 Use a registry to configure reporting handlers.
Also ensure that the LogHandler is registered by default.

Change-Id: Ib9e306a0aa45ab6f5c9b543782b5dd7019b72cf1
2015-07-20 09:40:02 +01:00
Daniel Watkins 91a5942fb9 Implement a DictRegistry.
Change-Id: I67b177169285f30c7a980a51a81265c621c5f3ff
2015-07-20 09:33:54 +01:00
Jenkins 973ef45fce Merge "README.rst: mention bugs are tracked in launchpad" 2015-07-17 15:26:04 +00:00
Daniel Watkins 4722397ef4 Convert reporting handlers to be instantiated.
This will allow us to actually have parameters passed in, which we'll
need for handlers with configuration options.

Change-Id: If105b8108d80b49b6da9e16c7520ddcee1f20c8f
2015-07-17 13:08:47 +01:00
Scott Moser 4e207ac339 README.rst: mention bugs are tracked in launchpad
Change-Id: I4d0b3c4eb76da29f2204461d7992f0f78c2042ed
2015-07-16 09:59:06 -04:00
Daniel Watkins 2856779179 Basic implementation of a reporting framework.
Change-Id: Ic468e388a4b3d66763b5db5c1b3e599f3005fa4d
2015-07-07 09:05:36 +01:00
Daniel Watkins f512e05819 Move our TestCase in to the cloudinit.tests package.
Instead of a separate cloudinit.test package.

Change-Id: I6ea05a0f57c93a944f435f306a064d918fd26152
2015-07-06 17:48:55 +01:00
Daniel Watkins a09499fc2c Don't consider version-specific code for coverage.
(Also add generated coverage reports to .gitignore)

Change-Id: Ide59ffe812d99774e9e4d0d1ad266ab665f02321
2015-07-06 17:46:10 +01:00
Daniel Watkins e10de8835b Speed up a slow test.
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
2015-07-03 14:16:39 +01:00
Jenkins 0208bc2a9f Merge "Expose api response properties and cache buffer decoding" 2015-07-02 21:42:00 +00:00
Jenkins e20d63d98c Merge "fix 'tox -e docs' by limiting sphinx versions" 2015-07-02 21:38:09 +00:00
Joshua Harlow 1479f92ab6 Expose api response properties and cache buffer decoding
Change-Id: I1e47be192eade575d2954d57991c0dd6d25e47d1
2015-07-02 21:37:32 +00:00
Scott Moser 3e9bfcfd7a fix 'tox -e docs' by limiting sphinx versions
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
2015-07-02 17:11:08 -04:00
Jenkins d072623527 Merge "tools/tox-venv: support running other than ./tools/tox-venv" 2015-07-02 18:16:29 +00:00
Jenkins 476654ce03 Merge "Bring over the 'safeyaml' from bzr" 2015-07-02 18:16:27 +00:00
Scott Moser 37927ffd9c tools/tox-venv: support running other than ./tools/tox-venv
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
2015-07-02 17:53:53 +00:00
Joshua Harlow 92405e6712 Bring over the 'templater' from bzr
Change-Id: Iefcceb1c0d47ae455985f1d027465b0db0a0e467
2015-07-02 17:52:51 +00:00