Commit Graph

6 Commits

Author SHA1 Message Date
Gregory Haynes
fd0708286c Check python with flake8 instead of dib-lint
We check python files with dib-lint rather than flake8 which have
conflicting opinions. This means weve been (forcibly) writing non pep8
python.

Also fixing pep8 issues so tests pass.

Change-Id: Idc9db40334f6e15738a7802c06697270df68741c
2014-11-21 09:04:52 -08:00
Jenkins
9d252ba318 Merge "Handle extra spaces in merge-svc-map-files" 2014-10-24 07:42:02 +00:00
James Slagle
ccd292c10a svc-map requires PyYAML
svc-map requires PyYAML, so install it. It's not always installed on all base
images.

Change-Id: I7ce5325e8afa0047f67153baa1fc7d4a90196c88
2014-10-21 16:13:16 -04:00
Michael Kerrin
730e7bd76e Handle extra spaces in merge-svc-map-files
During internal testing we are getting the following error from
merge-svc-map-files
File "/tmp/image.K2MYCphY/hooks/extra-data.d/10-merge-svc-map-files", line 54, in main
    with open(data_path, 'r') as dataFile:
IOError: [Errno 21] Is a directory: '...diskimage-builder/elements/svc-map'

Somehow IMAGE_ELEMENT contains a extra white space that manifests itself
as an element without a name. It is very hard to find where this is coming from so
instead this patch makes merge-svc-map-files more robost to this situation

Change-Id: Id1500ead8a77d691408617dcdc4e095bc5775be8
2014-10-20 18:16:39 +01:00
Ryan Brady
c8037cc73f Fix $DISTRO_NAME usage for centos7 element
In both of the changed files in this patch, the $DISTRO_NAME usage
is checking against "centos".  The valid value for the centos7
element for $DISTRO_NAME is "centos7"[1].

[1] http://git.io/8IvuTw

Change-Id: I0c4a4b2ecf87c7a9283d10071f6feb494a6c716a
2014-10-01 21:42:47 -04:00
Ryan Brady
e1853a7d5b Add svc-map element.
Adds a new svc-map element which can be used to install
services based on an in element 'svc-map' YAML config
file format.

This change is intended to decouple elements from DIB
and allow new elements to support multiple distributions
(with various service naming schemes) without having to
constantly maintain DIB's various bin/map-services files.

This patch ensures all of the YAML files are compiled into
a single file without namespaces.  The YAML compilation
process occurs during image creation time and errors if
conflicting mappings are found.

Change-Id: Id11433ea342aace71a358936a7ca3151ec11d506
2014-09-26 12:00:38 -04:00