diff options
author | Andrew Brestick <brestick@mcs.anl.gov> | 2008-06-20 15:04:33 +0000 |
---|---|---|
committer | Andrew Brestick <brestick@mcs.anl.gov> | 2008-06-20 15:04:33 +0000 |
commit | 38b68c3c5f4024160a7acb90cfd621d3f13bce32 (patch) | |
tree | 901fb630c2cd7edae8d748c441668f479759662b /src | |
parent | c4de45d84a95ec7e3b61780eae6a591885fc9bbf (diff) | |
download | bcfg2-38b68c3c5f4024160a7acb90cfd621d3f13bce32.tar.gz bcfg2-38b68c3c5f4024160a7acb90cfd621d3f13bce32.tar.bz2 bcfg2-38b68c3c5f4024160a7acb90cfd621d3f13bce32.zip |
Probe data loaded whenever Metadata plugin is used
git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@4702 ce84e21b-d406-0410-9b95-82705330c041
Diffstat (limited to 'src')
-rw-r--r-- | src/lib/Options.py | 5 | ||||
-rw-r--r-- | src/lib/Server/Admin/Query.py | 1 | ||||
-rw-r--r-- | src/lib/Server/Admin/Viz.py | 2 | ||||
-rw-r--r-- | src/lib/Server/Plugins/Metadata.py | 3 | ||||
-rwxr-xr-x | src/sbin/bcfg2-admin | 8 | ||||
-rwxr-xr-x | src/sbin/bcfg2-info | 2 |
6 files changed, 10 insertions, 11 deletions
diff --git a/src/lib/Options.py b/src/lib/Options.py index aeb70e44c..6075d1ced 100644 --- a/src/lib/Options.py +++ b/src/lib/Options.py @@ -13,7 +13,8 @@ def bool_cook(x): class OptionFailure(Exception): pass -DEFAULT_CONFIG_LOCATION = '/etc/bcfg2.conf' +DEFAULT_CONFIG_LOCATION = '/etc/bcfg2.conf' #/etc/bcfg2.conf +DEFAULT_INSTALL_PREFIX = '/usr' #/usr class Option(object): cfpath = DEFAULT_CONFIG_LOCATION @@ -195,7 +196,7 @@ SERVER_KEY = Option('Path to SSL key', cf=('communication', 'key'), SERVER_PASSWORD = Option('Communication Password', cmd='-x', odesc='<password>', cf=('communication', 'password'), default=False) INSTALL_PREFIX = Option('Installation location', cf=('server', 'prefix'), - default='/usr', odesc='</path>') + default=DEFAULT_INSTALL_PREFIX, odesc='</path>') SERVER_PROTOCOL = Option('Server Protocol', cf=('communication', 'procotol'), default='xmlrpc/ssl') SENDMAIL_PATH = Option('Path to sendmail', cf=('reports', 'sendmailpath'), diff --git a/src/lib/Server/Admin/Query.py b/src/lib/Server/Admin/Query.py index a5e2a977e..322329bcb 100644 --- a/src/lib/Server/Admin/Query.py +++ b/src/lib/Server/Admin/Query.py @@ -15,7 +15,6 @@ class Query(Bcfg2.Server.Admin.Mode): self.errExit("Core load failed because %s" % msg) [self.bcore.fam.Service() for _ in range(1)] self.meta = self.bcore.metadata - self.meta.load_probedata() while self.bcore.fam.Service(): pass diff --git a/src/lib/Server/Admin/Viz.py b/src/lib/Server/Admin/Viz.py index 511adf4be..f7daa9453 100644 --- a/src/lib/Server/Admin/Viz.py +++ b/src/lib/Server/Admin/Viz.py @@ -9,7 +9,7 @@ class Viz(Bcfg2.Server.Admin.Mode): colors = ['steelblue1', 'chartreuse', 'gold', 'magenta', 'indianred1', 'limegreen', 'orange1', 'lightblue2', 'green1', 'blue1', 'yellow1', 'darkturquoise', 'gray66'] - + def __call__(self, args): Bcfg2.Server.Admin.Mode.__call__(self, args) # First get options to the 'viz' subcommand diff --git a/src/lib/Server/Plugins/Metadata.py b/src/lib/Server/Plugins/Metadata.py index 67959c968..996ba29f6 100644 --- a/src/lib/Server/Plugins/Metadata.py +++ b/src/lib/Server/Plugins/Metadata.py @@ -115,7 +115,8 @@ class Metadata(Bcfg2.Server.Plugin.MetadataPlugin, self.probedata = {} self.extra = {'groups.xml':[], 'clients.xml':[]} self.password = core.password - + self.load_probedata() + def HandleEvent(self, event): '''Handle update events for data files''' filename = event.filename.split('/')[-1] diff --git a/src/sbin/bcfg2-admin b/src/sbin/bcfg2-admin index 5b5053135..bb44bbc3f 100755 --- a/src/sbin/bcfg2-admin +++ b/src/sbin/bcfg2-admin @@ -2,7 +2,7 @@ '''bcfg2-admin is a script that helps to administrate a bcfg2 deployment''' import getopt, logging, sys -import Bcfg2.Server.Core, Bcfg2.Logging +import Bcfg2.Server.Core, Bcfg2.Logging, Bcfg2.Options log = logging.getLogger('bcfg-admin') @@ -17,10 +17,8 @@ def mode_import(modename): if __name__ == '__main__': Bcfg2.Logging.setup_logging('bcfg2-admin', to_console=True) - - # Some sensible defaults - configfile = "/etc/bcfg2.conf" - + # Get config file path + configfile = Bcfg2.Options.CFILE.default try: opts, args = getopt.getopt(sys.argv[1:], 'hC:', ['help', 'configfile=']) except getopt.GetoptError, msg: diff --git a/src/sbin/bcfg2-info b/src/sbin/bcfg2-info index 65310d6ee..dac7fa6bf 100755 --- a/src/sbin/bcfg2-info +++ b/src/sbin/bcfg2-info @@ -277,7 +277,7 @@ if __name__ == '__main__': loop = infoCore(setup['repo'], setup['structures'], setup['generators'], setup['password'], setup['svn']) - loop.plugins['Metadata'].load_probedata() + loop.plugins['Metadata'] if "args" in setup and setup['args']: loop.onecmd(" ".join(setup['args'])) raise SystemExit(0) |