From 8a897440738f86558eb634d9c419a3a16d8cba68 Mon Sep 17 00:00:00 2001 From: Tristan Cacqueray Date: Mon, 29 Apr 2019 03:38:02 +0000 Subject: [PATCH] Add license header and fix integration test Change-Id: I45f501beb8876a7abdfd9827772b5e08b059ace6 --- distroinfo/exception.py | 15 +++++++++++++++ distroinfo/fetch.py | 14 ++++++++++++++ distroinfo/helpers.py | 14 ++++++++++++++ distroinfo/info.py | 14 ++++++++++++++ distroinfo/parse.py | 14 ++++++++++++++ distroinfo/query.py | 14 ++++++++++++++ distroinfo/repoman.py | 14 ++++++++++++++ tests/assets/info/rdoinfo/rdo.yml | 12 ++++++------ tests/test_common.py | 2 +- 9 files changed, 106 insertions(+), 7 deletions(-) diff --git a/distroinfo/exception.py b/distroinfo/exception.py index 3fee9c2..4f94a27 100644 --- a/distroinfo/exception.py +++ b/distroinfo/exception.py @@ -1,3 +1,18 @@ +# Copyright (c) 2019 Red Hat +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may +# not use this file except in compliance with the License. You may obtain +# a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. + + class DistroInfoException(Exception): msg_fmt = "An unknown error occurred" diff --git a/distroinfo/fetch.py b/distroinfo/fetch.py index 48a002b..f112f77 100644 --- a/distroinfo/fetch.py +++ b/distroinfo/fetch.py @@ -1,3 +1,17 @@ +# Copyright (c) 2019 Red Hat +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may +# not use this file except in compliance with the License. You may obtain +# a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. + import hashlib import logging import os diff --git a/distroinfo/helpers.py b/distroinfo/helpers.py index d648365..ac1ee5f 100644 --- a/distroinfo/helpers.py +++ b/distroinfo/helpers.py @@ -1,3 +1,17 @@ +# Copyright (c) 2019 Red Hat +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may +# not use this file except in compliance with the License. You may obtain +# a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. + import contextlib import os import subprocess diff --git a/distroinfo/info.py b/distroinfo/info.py index 5ce1653..7a01625 100644 --- a/distroinfo/info.py +++ b/distroinfo/info.py @@ -1,3 +1,17 @@ +# Copyright (c) 2019 Red Hat +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may +# not use this file except in compliance with the License. You may obtain +# a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. + import six from distroinfo import exception diff --git a/distroinfo/parse.py b/distroinfo/parse.py index 8e8a74d..200c56f 100644 --- a/distroinfo/parse.py +++ b/distroinfo/parse.py @@ -1,3 +1,17 @@ +# Copyright (c) 2019 Red Hat +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may +# not use this file except in compliance with the License. You may obtain +# a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. + import collections import copy import six diff --git a/distroinfo/query.py b/distroinfo/query.py index 5626150..a5f8058 100644 --- a/distroinfo/query.py +++ b/distroinfo/query.py @@ -1,3 +1,17 @@ +# Copyright (c) 2019 Red Hat +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may +# not use this file except in compliance with the License. You may obtain +# a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. + from __future__ import print_function import collections from functools import partial diff --git a/distroinfo/repoman.py b/distroinfo/repoman.py index 7a7ae88..30cd4e4 100644 --- a/distroinfo/repoman.py +++ b/distroinfo/repoman.py @@ -1,3 +1,17 @@ +# Copyright (c) 2019 Red Hat +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may +# not use this file except in compliance with the License. You may obtain +# a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. + import logging import os import re diff --git a/tests/assets/info/rdoinfo/rdo.yml b/tests/assets/info/rdoinfo/rdo.yml index a8f003b..1033a6d 100644 --- a/tests/assets/info/rdoinfo/rdo.yml +++ b/tests/assets/info/rdoinfo/rdo.yml @@ -123,7 +123,7 @@ package-configs: # templates using rpmfactory's repositories rpmfactory-core: name: openstack-%(project)s - upstream: git://git.openstack.org/openstack/%(project)s + upstream: https://git.openstack.org/openstack/%(project)s # distgit: http://review.rdoproject.org/r/p/openstack/%(project)s-distgit.git distgit: https://github.com/rdo-packages/%(project)s-distgit.git patches: http://review.rdoproject.org/r/p/openstack/%(project)s.git @@ -136,7 +136,7 @@ package-configs: - hguemar@fedoraproject.org rpmfactory-client: name: python-%(project)s - upstream: git://git.openstack.org/openstack/python-%(project)s + upstream: https://git.openstack.org/openstack/python-%(project)s # distgit: http://review.rdoproject.org/r/p/openstack/%(project)s-distgit.git distgit: https://github.com/rdo-packages/%(project)s-distgit.git patches: http://review.rdoproject.org/r/p/openstack/%(project)s.git @@ -149,7 +149,7 @@ package-configs: - hguemar@fedoraproject.org rpmfactory-lib: name: python-%(project)s - upstream: git://git.openstack.org/openstack/%(project)s + upstream: https://git.openstack.org/openstack/%(project)s # distgit: http://review.rdoproject.org/r/p/openstack/%(project)s-distgit.git distgit: https://github.com/rdo-packages/%(project)s-distgit.git patches: http://review.rdoproject.org/r/p/openstack/%(project)s.git @@ -163,7 +163,7 @@ package-configs: - lbezdick@redhat.com rpmfactory-puppet: name: '%(project)s' - upstream: git://git.openstack.org/openstack/%(project)s + upstream: https://git.openstack.org/openstack/%(project)s # distgit: http://review.rdoproject.org/r/p/puppet/%(project)s-distgit.git distgit: https://github.com/rdo-packages/%(project)s-distgit.git patches: http://review.rdoproject.org/r/p/puppet/%(project)s.git @@ -186,7 +186,7 @@ package-configs: rpmfactory-tempest-plugin: # Name and Project will be defined. name: '%(project)s' - upstream: git://git.openstack.org/openstack/%(project)s + upstream: https://git.openstack.org/openstack/%(project)s # distgit: http://review.rdoproject.org/r/p/openstack/%(project)s-distgit.git distgit: https://github.com/rdo-packages/%(project)s-distgit.git patches: http://review.rdoproject.org/r/p/openstack/%(project)s.git @@ -204,7 +204,7 @@ package-configs: pike: rpm-packaging: name: '%(project)s' - upstream: git://git.openstack.org/openstack/%(project)s.git + upstream: https://git.openstack.org/openstack/%(project)s.git distgit: https://github.com/openstack/rpm-packaging distgit-path: /openstack/%(project)s master-distgit: https://github.com/openstack/rpm-packaging diff --git a/tests/test_common.py b/tests/test_common.py index 4c9be7a..4dd12c4 100644 --- a/tests/test_common.py +++ b/tests/test_common.py @@ -42,7 +42,7 @@ def assert_rdoinfo_base(info): 'project': 'nova', 'conf': 'rpmfactory-core', 'upstream': - 'git://git.openstack.org/openstack/nova', + 'https://git.openstack.org/openstack/nova', 'patches': 'http://review.rdoproject.org/r/p/openstack/nova.git', 'distgit':