Changeset 2920
- Timestamp:
- Jan 22, 2010, 9:45:09 AM (15 years ago)
- Location:
- trunk/packages
- Files:
-
- 1 deleted
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/packages/hvirt-config/debian/changelog
r2908 r2920 1 hvirt-config (0.0.15) unstable; urgency=low 2 3 * Added vnc conf line 4 5 -- Greg Brockman <gdb@mit.edu> Tue, 19 Jan 2010 02:45:33 -0500 6 1 7 hvirt-config (0.0.14) unstable; urgency=low 2 8 -
trunk/packages/hvirt-config/dev/master.yaml
r2904 r2920 1 contact: &contact hvirt@hcs.harvard. .edu1 contact: &contact hvirt@hcs.harvard.edu 2 2 console: 3 3 hostname: hvirt-console-dev.hcs.harvard.edu … … 19 19 kerberos: 20 20 realm: HCS.HARVARD.EDU 21 keytab: /etc/invirt/keytab 21 22 22 23 remote: … … 28 29 29 30 web: 31 sites: 32 certs: 33 port: 443 34 suffix: "MIT.EDU" 35 cas: 36 login: https://secure.hcs.harvard.edu/login 37 validate: https://secure.hcs.harvard.edu/serviceValidate 38 authname: "HCS CAS Login" 39 port: 444 40 noauth: 41 port: 445 42 svn: 43 repopath: /home 44 authname: "testing" 45 port: 1111 46 alias: foo 47 localpath: /home 48 ssl: 49 rewriterules: 50 - rule: apt 51 target: '-' 52 type: L 53 redirects: 54 - rule: wiki 55 target: trac 56 cert: ssl/server.crt 57 key: ssl/server.key 58 ca: /etc/ssl/certs/hcs.ca 59 mods: rewrite 60 ssl 61 auth_cas 30 62 baseuri: https://hvirt-dev.hcs.harvard.edu/ 31 63 hostname: hvirt-dev.hcs.harvard.edu … … 40 72 lvm: 41 73 vg: root 74 75 vnc: 76 base_port: 10003 77 proxy_ip: 140.247.89.175 -
trunk/packages/invirt-base/debian/changelog
r2766 r2920 1 invirt-base (0.0.29) unstable; urgency=low 2 3 * Added a safestructs for doing config without raising. 4 5 -- Greg Brockman <gdb@mit.edu> Tue, 19 Jan 2010 23:49:19 -0500 6 1 7 invirt-base (0.0.28) unstable; urgency=low 2 8 -
trunk/packages/invirt-base/python/invirt/common.py
r2592 r2920 11 11 class struct(dict): 12 12 'A simple namespace object.' 13 def __init__(self, d = {}, __prefix = None, **kwargs):13 def __init__(self, d = {}, __prefix = None, __default=None, **kwargs): 14 14 super(struct, self).__init__(d) 15 15 self.__prefix = __prefix 16 self.__default = __default 16 17 self.update(kwargs) 17 18 def __getattr__(self, key): … … 19 20 return self[key] 20 21 except KeyError: 21 # XX ideally these would point a frame higher on the stack. 22 prefix = self.__prefix 23 if prefix is not None: 24 raise InvirtConfigError('missing configuration variable %s%s' 25 % (prefix, key)) 22 if self.__default is None: 23 # XX ideally these would point a frame higher on the stack. 24 prefix = self.__prefix 25 if prefix is not None: 26 raise InvirtConfigError('missing configuration variable ' 27 '%s%s' % (prefix, key)) 28 else: 29 raise AttributeError("anonymous struct has no member '%s'" 30 % (key,)) 26 31 else: 27 raise AttributeError("anonymous struct has no member '%s'" 28 % (key,)) 32 return struct({}, '', self.__default) 29 33 30 def dicts2struct(x, prefix = None ):34 def dicts2struct(x, prefix = None, default = None): 31 35 """ 32 36 Given a tree of lists/dicts, perform a deep traversal to transform all the … … 38 42 def newprefix(k): return prefix 39 43 if type(x) == dict: 40 return struct(((k, dicts2struct(v, newprefix(k) ))44 return struct(((k, dicts2struct(v, newprefix(k), default)) 41 45 for k,v in x.iteritems()), 42 prefix) 46 prefix, 47 default) 43 48 elif type(x) == list: 44 return [dicts2struct(v, newprefix(i)) for i, v in enumerate(x)] 49 return [dicts2struct(v, newprefix(i), default) 50 for i, v in enumerate(x)] 45 51 elif x is None: 46 return struct({}, prefix )52 return struct({}, prefix, default) 47 53 else: 48 54 return x -
trunk/packages/invirt-base/python/invirt/config.py
r1934 r2920 142 142 dicts = load() 143 143 structs = dicts2struct(dicts, '') 144 safestructs = dicts2struct(dicts, '', '') 144 145 145 146 # vim:et:sw=4:ts=4 -
trunk/packages/invirt-vnc-client/debian/control
r2056 r2920 8 8 Package: invirt-vnc-client 9 9 Architecture: all 10 Depends: ${misc:Depends}, java6-sdk, python, invirt-base 10 Depends: ${misc:Depends}, java6-sdk, python, invirt-base, invirt-kerberos-config 11 11 Description: Install the custom Invirt VNC client
Note: See TracChangeset
for help on using the changeset viewer.