source: package_branches/invirt-xen-config/hvirt/debian/transform_xend-config.sxp.invirt.mako @ 3042

Last change on this file since 3042 was 2824, checked in by gdb, 15 years ago

Removed stray period in transform_xend-config.sxp.invirt.mako

  • Property svn:executable set to *
File size: 726 bytes
Line 
1#!/usr/bin/perl -0n
2print <<'EOF';
3<%
4from invirt.config import structs as cfg
5import os
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)
17%>
18EOF
19
20s/^\#?\(xend-relocation-address ''\)/(xend-relocation-address '\${internal_ip}')/m or die;
21s/^\(xend-relocation-hosts-allow '[^']*'\)/(xend-relocation-hosts-allow '')/m or die;
22s/^\(dom0-min-mem [0-9]*\)/(dom0-min-mem 1536)/m or die;
23print;
Note: See TracBrowser for help on using the repository browser.