mirror of
https://github.com/kevingruesser/bootstrap-vz.git
synced 2025-08-22 18:00:35 +00:00
Make mirror param in manifest optional
This commit is contained in:
parent
9de86b9b8a
commit
5864665b1f
3 changed files with 6 additions and 5 deletions
|
@ -10,11 +10,11 @@
|
|||
"type": "object",
|
||||
"properties": {
|
||||
"mount_dir": { "type": "string" },
|
||||
"mirror": { "type": "string" },
|
||||
"tarball": { "type": "boolean" },
|
||||
"tarball_dir": { "type": "string" },
|
||||
"mirror": { "type": "string" }
|
||||
"tarball_dir": { "type": "string" }
|
||||
},
|
||||
"required": ["mount_dir", "mirror"]
|
||||
"required": ["mount_dir"]
|
||||
},
|
||||
"system": {
|
||||
"type": "object",
|
||||
|
|
|
@ -47,6 +47,8 @@ class Manifest(object):
|
|||
def parse(self, data):
|
||||
self.provider = data['provider']
|
||||
self.bootstrapper = data['bootstrapper']
|
||||
if 'mirror' not in self.bootstrapper:
|
||||
self.bootstrapper['mirror'] = 'http://http.debian.net/debian'
|
||||
if 'tarball' not in self.bootstrapper:
|
||||
self.bootstrapper['tarball'] = False
|
||||
if 'tarball_dir' not in self.bootstrapper and self.bootstrapper['tarball']:
|
||||
|
|
|
@ -13,8 +13,7 @@ def get_bootstrap_args(info):
|
|||
options.append('--include=' + ','.join(include))
|
||||
if len(exclude) > 0:
|
||||
options.append('--exclude=' + ','.join(exclude))
|
||||
mirror = info.manifest.bootstrapper['mirror']
|
||||
arguments = [info.manifest.system['release'], info.root, mirror]
|
||||
arguments = [info.manifest.system['release'], info.root, info.manifest.bootstrapper['mirror']]
|
||||
return executable, options, arguments
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue