added dummy servers and repos to aid in automated deployments.
This commit is contained in:
@@ -127,6 +127,8 @@ class Backup(object):
|
||||
for repo in server.findall('{0}repo'.format(self.ns)):
|
||||
if reponames and repo.attrib['name'] not in reponames:
|
||||
continue
|
||||
if repo.attrib.get('dummy', 'false').lower()[0] in ('1', 't'):
|
||||
continue
|
||||
r = {}
|
||||
for a in repo.attrib:
|
||||
r[a] = repo.attrib[a]
|
||||
@@ -163,6 +165,8 @@ class Backup(object):
|
||||
if 'all' in self.args['server']:
|
||||
self.args['server'] = []
|
||||
for server in self.cfg.findall('{0}server'.format(self.ns)):
|
||||
if server.attrib.get('dummy', 'false').lower()[0] in ('1', 't'):
|
||||
continue
|
||||
# The server elements are uniquely constrained to the "target" attrib.
|
||||
# *NO TWO <server> ELEMENTS WITH THE SAME target= SHOULD EXIST.*
|
||||
self.args['server'].append(server.attrib['target'])
|
||||
@@ -170,6 +174,8 @@ class Backup(object):
|
||||
sname = server.attrib['target']
|
||||
if sname not in self.args['server']:
|
||||
continue
|
||||
if server.attrib.get('dummy', 'false').lower()[0] in ('1', 't'):
|
||||
continue
|
||||
self.repos[sname] = {}
|
||||
for x in server.attrib:
|
||||
if x != 'target':
|
||||
|
||||
Reference in New Issue
Block a user