summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars Wirzenius <lars.wirzenius@codethink.co.uk>2012-09-25 14:56:00 +0100
committerLars Wirzenius <lars.wirzenius@codethink.co.uk>2012-09-25 14:56:00 +0100
commitecdd22d0aa03ddb2bdac3fcba506d70d6ab45c4b (patch)
treeb28480b2e51286e05400b5c17899ab0b12435b7b
parent6d475ce9f719dd37c71b122cb2afe8895027d0ad (diff)
parent836ef48234c573a002f9d67667710caccc7e24e7 (diff)
downloadmorph-ecdd22d0aa03ddb2bdac3fcba506d70d6ab45c4b.tar.gz
Merge branch 'master' of git://git.baserock.org/baserock/morph
-rwxr-xr-xmorphlib/app.py16
1 files changed, 13 insertions, 3 deletions
diff --git a/morphlib/app.py b/morphlib/app.py
index b25cd42c..30efb215 100755
--- a/morphlib/app.py
+++ b/morphlib/app.py
@@ -58,7 +58,7 @@ class Morph(cliapp.Application):
'show no output unless there is an error')
self.settings.string(['trove-host'],
'hostname of Trove instance',
- metavar='HOST',
+ metavar='TROVEHOST',
default=defaults['trove-host'])
self.settings.string_list(['trove-prefix'],
'define URL prefix aliases stored '
@@ -82,11 +82,15 @@ class Morph(cliapp.Application):
'replaced',
default=defaults['repo-alias'])
self.settings.string(['bundle-server'],
- 'base URL to download bundles',
+ 'base URL to download bundles. '
+ 'If not provided, defaults to '
+ 'http://TROVEHOST/bundles/',
metavar='URL',
default=None)
self.settings.string(['cache-server'],
- 'HTTP URL of the morph cache server to use',
+ 'HTTP URL of the morph cache server to use. '
+ 'If not provided, defaults to '
+ 'http://TROVEHOST:8080/',
metavar='URL',
default=None)
self.settings.string(['cachedir'],
@@ -185,6 +189,12 @@ class Morph(cliapp.Application):
# treat settings['repo-alias'] as the sole source of prefixes for git
# URL expansion.
self.settings['repo-alias'] = morphlib.util.combine_aliases(self)
+ if self.settings['cache-server'] is None:
+ self.settings['cache-server'] = 'http://%s:8080/' % (
+ self.settings['trove-host'])
+ if self.settings['bundle-server'] is None:
+ self.settings['bundle-server'] = 'http://%s/bundles/' % (
+ self.settings['trove-host'])
if 'MORPH_DUMP_PROCESSED_CONFIG' in os.environ:
self.settings.dump_config(sys.stdout)
sys.exit(0)