mirror of
https://github.com/kevingruesser/bootstrap-vz.git
synced 2025-08-24 15:36:27 +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",
|
"type": "object",
|
||||||
"properties": {
|
"properties": {
|
||||||
"mount_dir": { "type": "string" },
|
"mount_dir": { "type": "string" },
|
||||||
|
"mirror": { "type": "string" },
|
||||||
"tarball": { "type": "boolean" },
|
"tarball": { "type": "boolean" },
|
||||||
"tarball_dir": { "type": "string" },
|
"tarball_dir": { "type": "string" }
|
||||||
"mirror": { "type": "string" }
|
|
||||||
},
|
},
|
||||||
"required": ["mount_dir", "mirror"]
|
"required": ["mount_dir"]
|
||||||
},
|
},
|
||||||
"system": {
|
"system": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
|
|
|
@ -47,6 +47,8 @@ class Manifest(object):
|
||||||
def parse(self, data):
|
def parse(self, data):
|
||||||
self.provider = data['provider']
|
self.provider = data['provider']
|
||||||
self.bootstrapper = data['bootstrapper']
|
self.bootstrapper = data['bootstrapper']
|
||||||
|
if 'mirror' not in self.bootstrapper:
|
||||||
|
self.bootstrapper['mirror'] = 'http://http.debian.net/debian'
|
||||||
if 'tarball' not in self.bootstrapper:
|
if 'tarball' not in self.bootstrapper:
|
||||||
self.bootstrapper['tarball'] = False
|
self.bootstrapper['tarball'] = False
|
||||||
if 'tarball_dir' not in self.bootstrapper and self.bootstrapper['tarball']:
|
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))
|
options.append('--include=' + ','.join(include))
|
||||||
if len(exclude) > 0:
|
if len(exclude) > 0:
|
||||||
options.append('--exclude=' + ','.join(exclude))
|
options.append('--exclude=' + ','.join(exclude))
|
||||||
mirror = info.manifest.bootstrapper['mirror']
|
arguments = [info.manifest.system['release'], info.root, info.manifest.bootstrapper['mirror']]
|
||||||
arguments = [info.manifest.system['release'], info.root, mirror]
|
|
||||||
return executable, options, arguments
|
return executable, options, arguments
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue