[live-media] Version is required argument

Signed-off-by: Lubomír Sedlář <lsedlar@redhat.com>
This commit is contained in:
Lubomír Sedlář 2016-02-10 18:26:43 +01:00
parent 2b897ec6ea
commit b35264cfba
3 changed files with 16 additions and 4 deletions

View File

@ -654,19 +654,23 @@ Live Media Settings
(*dict*) -- configuration for ``koji spin-livemedia``; format:
``{variant_uid_regex: [{opt:value}]}``
Available options:
Required options:
* ``name`` (*str*)
* ``version`` (*str*)
* ``target`` (*str*)
* ``arches`` (*[str]*) -- what architectures to build the media for; by default uses
all arches for the variant.
* ``kickstart`` (*str*) -- name of the kickstart file
Available options:
* ``ksurl`` (*str*)
* ``ksversion`` (*str*)
* ``scratch`` (*bool*)
* ``release`` (*str*) -- a string with the release, or explicit ``None``
for using compose date and respin.
* ``skip_tag`` (*bool*)
* ``name`` (*str*)
* ``repo`` (*[str]*) -- external repo
* ``repo_from`` (*[str]*) -- list of variants to take extra repos from
* ``title`` (*str*)

View File

@ -85,7 +85,8 @@ class LiveMediaPhase(PhaseBase):
'install_tree': translate_path(
self.compose,
self.compose.paths.compose.os_tree('$arch', variant, create_dir=False)
)
),
'version': image_conf['version'],
}
self.pool.add(LiveMediaThread(self.pool))
self.pool.queue_put((self.compose, variant, config))

View File

@ -79,6 +79,7 @@ class TestLiveMediaPhase(unittest.TestCase):
'kickstart': 'file.ks',
'ksurl': 'git://example.com/repo.git',
'name': 'Fedora Server Live',
'version': 'Rawhide',
}
]
},
@ -105,6 +106,7 @@ class TestLiveMediaPhase(unittest.TestCase):
'target': 'f24',
'title': None,
'install_tree': '/ostree/$arch/Server',
'version': 'Rawhide',
}))])
@mock.patch('pungi.phases.livemedia_phase.resolve_git_url')
@ -125,7 +127,8 @@ class TestLiveMediaPhase(unittest.TestCase):
'repo': ['http://example.com/extra_repo'],
'arches': ['x86_64'],
'ksversion': '24',
'release': None
'release': None,
'version': 'Rawhide',
}
]
}
@ -155,6 +158,7 @@ class TestLiveMediaPhase(unittest.TestCase):
'target': 'f24',
'title': 'Custom Title',
'install_tree': '/ostree/$arch/Server',
'version': 'Rawhide',
}))])
@ -179,6 +183,7 @@ class TestCreateImageBuildThread(unittest.TestCase):
'skip_tag': None,
'target': 'f24',
'title': None,
'version': 'Rawhide',
}
pool = mock.Mock()
@ -268,6 +273,7 @@ class TestCreateImageBuildThread(unittest.TestCase):
'skip_tag': None,
'target': 'f24',
'title': None,
'version': 'Rawhide',
}
pool = mock.Mock()
@ -306,6 +312,7 @@ class TestCreateImageBuildThread(unittest.TestCase):
'skip_tag': None,
'target': 'f24',
'title': None,
'version': 'Rawhide',
}
pool = mock.Mock()