Ignore:
Timestamp:
Aug 2, 2008, 8:28:18 PM (16 years ago)
Author:
y_z
Message:
  • use invirt.config to get hostnames
  • refactoring: extracted bcast() function into invirt.remote package
  • fixed os.rename import bug
  • using correct default paths in invirt-getconf
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/packages/sipb-xen-base/files/usr/sbin/invirt-getconf

    r802 r816  
    1717"""
    1818
    19 from invirt.config import load
     19from invirt.config import default_src_path, default_cache_path, load
    2020from sys import argv, exit, stderr, stdout
    2121from optparse import OptionParser
     
    2828                description = __doc__.strip().split('\n\n')[0])
    2929        parser.add_option('-s', '--src',
    30                 default = '/etc/invirt/master.yaml',
     30                default = default_src_path,
    3131                help = 'the source YAML configuration file to read from')
    3232        parser.add_option('-c', '--cache',
    33                 default = '/var/lib/invirt/invirt.json',
     33                default = default_cache_path,
    3434                help = 'path to the JSON cache')
    3535        parser.add_option('-r', '--refresh',
     
    8181            else:
    8282                import yaml
     83                try:    dumper = yaml.CSafeDumper
     84                except: dumper = yaml.SafeDumper
    8385                yaml.dump(conf, stdout,
    84                           Dumper=yaml.CSafeDumper, default_flow_style=False)
     86                          Dumper = dumper, default_flow_style = False)
    8587    except invirt_exception, ex:
    8688        print >> stderr, ex
Note: See TracChangeset for help on using the changeset viewer.