Ignore:
Timestamp:
Dec 31, 2009, 2:23:04 AM (15 years ago)
Author:
gdb
Message:

Make the -internal into a config parameter

Location:
package_branches/invirt-xen-config/hvirt/debian
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • package_branches/invirt-xen-config/hvirt/debian/changelog

    r2487 r2817  
     1invirt-xen-config (0.0.27) unstable; urgency=low
     2
     3  * Make the internal IP into a parameter
     4
     5 -- Greg Brockman <gdb@mit.edu>  Thu, 31 Dec 2009 02:22:43 -0500
     6
    17invirt-xen-config (0.0.26) unstable; urgency=low
    28
  • package_branches/invirt-xen-config/hvirt/debian/transform_xend-config.sxp.invirt.mako

    r1786 r2817  
    44from invirt.config import structs as cfg
    55import os
    6 hostname = os.uname()[1].split('.')[0]
     6fqdn = os.uname()[1]
     7internal_ip = None
     8# This hack is necessary because cfg.hosts is an array rather than a dict.
     9for host in cfg.hosts:
     10  if host.hostname == fqdn:
     11    internal_ip = host.internal_ip
     12    break
     13
     14class xend_template_exception(Exception): pass
     15if internal_ip is None:
     16  raise xend_template_exception('Could not find an internal IP in the configuration for host %s' % fqdn)
    717%>
    818EOF
    919
    10 s/^\#?\(xend-relocation-address ''\)/(xend-relocation-address '\${hostname}-internal')/m or die;
     20s/^\#?\(xend-relocation-address ''\)/(xend-relocation-address '\${internal_ip}.')/m or die;
    1121s/^\(xend-relocation-hosts-allow '[^']*'\)/(xend-relocation-hosts-allow '')/m or die;
    1222s/^\(dom0-min-mem [0-9]*\)/(dom0-min-mem 1536)/m or die;
Note: See TracChangeset for help on using the changeset viewer.