[Kimchi-devel] [PATCH] [Kimchi 2/9] Virt-Viewer launcher: Makefile and config changes
Daniel Henrique Barboza
danielhb at linux.vnet.ibm.com
Fri Jul 8 18:37:35 UTC 2016
On 07/08/2016 03:36 PM, Paulo Ricardo Paz Vital wrote:
> On Jul 08 12:10PM, dhbarboza82 at gmail.com wrote:
>> From: Daniel Henrique Barboza <danielhb at linux.vnet.ibm.com>
>>
>> The Virt-Viewer API will store the generated launcher
>> files into the 'data/virtviewerfiles' directory. This
>> patch adds this new dir to Makefile.am and config.py.in
>> files.
>>
>> tests/test_config.py.in was also changed to reflect
>> this new directory.
>>
>> Signed-off-by: Daniel Henrique Barboza <danielhb at linux.vnet.ibm.com>
>> ---
>> Makefile.am | 2 ++
>> config.py.in | 10 +++++++++-
>> tests/test_config.py.in | 6 ++++++
>> 3 files changed, 17 insertions(+), 1 deletion(-)
>>
>> diff --git a/Makefile.am b/Makefile.am
>> index 1b46773..eabf6ae 100644
>> --- a/Makefile.am
>> +++ b/Makefile.am
>> @@ -119,6 +119,7 @@ install-deb: install
>> mkdir -p $(DESTDIR)/$(localstatedir)/lib/kimchi/ws-tokens
>> mkdir -p $(DESTDIR)/$(localstatedir)/lib/kimchi/screenshots
>> mkdir -p $(DESTDIR)/$(localstatedir)/lib/kimchi/isos
>> + mkdir -p $(DESTDIR)/$(localstatedir)/lib/kimchi/virtviewerfiles
>>
>>
>> deb: contrib/make-deb.sh
>> @@ -168,6 +169,7 @@ install-data-local:
>> mkdir -p $(DESTDIR)/$(localstatedir)/lib/kimchi/ws-tokens
>> mkdir -p $(DESTDIR)/$(localstatedir)/lib/kimchi/screenshots
>> mkdir -p $(DESTDIR)/$(localstatedir)/lib/kimchi/isos
>> + mkdir -p $(DESTDIR)/$(localstatedir)/lib/kimchi/virviewerfiles
> Missing 't' in the name of the directory.
Good eye!
>> uninstall-local:
>> @if test -f $(DESTDIR)/etc/systemd/system/wokd.service.d/kimchi.conf; then \
>> diff --git a/config.py.in b/config.py.in
>> index 937f1ec..a887670 100644
>> --- a/config.py.in
>> +++ b/config.py.in
>> @@ -57,6 +57,10 @@ def get_screenshot_path():
>> return os.path.join(PluginPaths('kimchi').state_dir, 'screenshots')
>>
>>
>> +def get_virtviewerfiles_path():
>> + return os.path.join(PluginPaths('kimchi').state_dir, 'virtviewerfiles')
>> +
>> +
>> def get_config():
>> plugin_conf = PluginPaths('kimchi').conf_file
>> return Parser().dict_from_file(plugin_conf)
>> @@ -152,7 +156,11 @@ class KimchiConfig(PluginConfig):
>> '/data/screenshots': {'tools.nocache.on': False,
>> 'tools.staticdir.dir':
>> get_screenshot_path(),
>> - 'tools.staticdir.on': True}}
>> + 'tools.staticdir.on': True},
>> + '/data/virtviewerfiles': {'tools.nocache.on': False,
>> + 'tools.staticdir.dir':
>> + get_virtviewerfiles_path(),
>> + 'tools.staticdir.on': True}}
>> for uri, data in static_config.iteritems():
>> custom_config[uri] = {'tools.nocache.on': True,
>> 'tools.wokauth.on': True}
>> diff --git a/tests/test_config.py.in b/tests/test_config.py.in
>> index a6728e8..48f5579 100644
>> --- a/tests/test_config.py.in
>> +++ b/tests/test_config.py.in
>> @@ -24,6 +24,7 @@ from wok.config import CACHEEXPIRES
>> from wok.config import Paths, PluginPaths
>>
>> from wok.plugins.kimchi.config import get_screenshot_path
>> +from wok.plugins.kimchi.config import get_virtviewerfiles_path
>> from wok.plugins.kimchi.config import KimchiConfig, KimchiPaths
>>
>>
>> @@ -151,6 +152,11 @@ class ConfigTests(unittest.TestCase):
>> 'tools.staticdir.dir': get_screenshot_path(),
>> 'tools.staticdir.on': True
>> },
>> + '/data/virtviewerfiles': {
>> + 'tools.nocache.on': False,
>> + 'tools.staticdir.dir': get_virtviewerfiles_path(),
>> + 'tools.staticdir.on': True
>> + },
>> '/ui/config/tab-ext.xml': {
>> 'tools.nocache.on': True,
>> 'tools.staticfile.on': True,
>> --
>> 2.5.5
>>
>> _______________________________________________
>> Kimchi-devel mailing list
>> Kimchi-devel at ovirt.org
>> http://lists.ovirt.org/mailman/listinfo/kimchi-devel
>>
More information about the Kimchi-devel
mailing list