[live-images] Rename repos_from to repo_from

It should be consistent with live media and image build.

Signed-off-by: Lubomír Sedlář <lsedlar@redhat.com>
This commit is contained in:
Lubomír Sedlář 2016-02-22 08:48:12 +01:00
parent 33d5440a8a
commit 1044fb01f8
4 changed files with 9 additions and 7 deletions

View File

@ -680,7 +680,7 @@ Live Images Settings
* ``name`` (*str*)
* ``version`` (*str*)
* ``additional_repos`` (*list*) -- external repos specified by URL
* ``repos_from`` (*list*) -- repos from other variants
* ``repo_from`` (*list*) -- repos from other variants
* ``specfile`` (*str*) -- for images wrapped in RPM
* ``scratch`` (*bool*) -- only RPM-wrapped images can use scratch builds,
but by default this is turned off

View File

@ -133,7 +133,7 @@ class LiveImagesPhase(PhaseBase):
# additional repos
cmd["repos"].extend(data.get("additional_repos", []))
cmd['repos'].extend(self._get_extra_repos(arch, variant, data.get('repos_from', [])))
cmd['repos'].extend(self._get_extra_repos(arch, variant, data.get('repo_from', [])))
# Explicit name and version
cmd["name"] = data.get("name", None)

View File

@ -165,7 +165,9 @@ class KojiWrapper(object):
return cmd
def get_create_image_cmd(self, name, version, target, arch, ks_file, repos, image_type="live", image_format=None, release=None, wait=True, archive=False, specfile=None, ksurl=None):
def get_create_image_cmd(self, name, version, target, arch, ks_file, repos,
image_type="live", image_format=None, release=None,
wait=True, archive=False, specfile=None, ksurl=None):
# Usage: koji spin-livecd [options] <name> <version> <target> <arch> <kickstart-file>
# Usage: koji spin-appliance [options] <name> <version> <target> <arch> <kickstart-file>
# Examples:

View File

@ -70,7 +70,7 @@ class TestLiveImagesPhase(unittest.TestCase):
'amd64': {
'kickstart': 'test.ks',
'additional_repos': ['http://example.com/repo/'],
'repos_from': ['Everything'],
'repo_from': ['Everything'],
'release': None,
}
})
@ -113,11 +113,11 @@ class TestLiveImagesPhase(unittest.TestCase):
'amd64': [{
'kickstart': 'test.ks',
'additional_repos': ['http://example.com/repo/'],
'repos_from': ['Everything'],
'repo_from': ['Everything'],
}, {
'kickstart': 'another.ks',
'additional_repos': ['http://example.com/repo/'],
'repos_from': ['Everything'],
'repo_from': ['Everything'],
}]
})
],
@ -180,7 +180,7 @@ class TestLiveImagesPhase(unittest.TestCase):
'kickstart': 'test.ks',
'ksurl': 'https://git.example.com/kickstarts.git?#HEAD',
'additional_repos': ['http://example.com/repo/'],
'repos_from': ['Everything'],
'repo_from': ['Everything'],
'type': 'appliance',
}
})