On Jul 08 12:10PM, dhbarboza82(a)gmail.com wrote:
From: Daniel Henrique Barboza <danielhb(a)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(a)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.
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(a)ovirt.org
http://lists.ovirt.org/mailman/listinfo/kimchi-devel
--
Paulo Ricardo Paz Vital
Linux Technology Center, IBM Systems
http://www.ibm.com/linux/ltc/