Ignore:
Timestamp:
Jul 29, 2008, 1:35:57 AM (16 years ago)
Author:
y_z
Message:
  • moved more generic code into common package
  • silently fail if cache fails
  • load the configuration on module load
  • produce a struct-based representation of the configuration
  • allowing full exception messages for OSErrors (default behavior)
  • added some dependencies specs
File:
1 edited

Legend:

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

    r771 r778  
    22
    33"""
    4 invirt-getconf [-f FILE] KEY prints the configuration the option named KEY from
    5 the invirt configuration file FILE.  Keys are dot-separated paths into the YAML
     4invirt-getconf loads an invirt configuration file (either the original YAML
     5source or the faster-to-load JSON cache) and prints the configuration option
     6with the given name (key).  Keys are dot-separated paths into the YAML
    67configuration tree.  List indexes (0-based) are also treated as path
    78components.
    89
    910(Due to this path language, certain restrictions are placed on the keys used in
    10 the YAML configuration, e.g. they cannot contain dots.)
     11the YAML configuration; e.g., they cannot contain dots.)
    1112
    1213Examples:
     
    5859                    '%s: index %s out of range' % (progress, component))
    5960        print conf
    60     except (invirt_exception, OSError), ex:
     61    except invirt_exception, ex:
    6162        print >> stderr, ex
    6263        return 1
Note: See TracChangeset for help on using the changeset viewer.