Taking more xs/xa settings from config.
This commit is contained in:
parent
1675d34918
commit
19d4e4452d
@ -134,7 +134,6 @@ xvpvncproxy_url = ${XVPVNCPROXY_URL:-http://$(host:ip):6081/console}
|
||||
vncserver_listen = ${VNCSERVER_LISTEN:-127.0.0.1}
|
||||
vncserver_proxyclient_address = ${VNCSERVER_PROXYCLIENT_ADDRESS:-}
|
||||
ec2_dmz_host = ${EC2_DMZ_HOST:-$(host:ip)}
|
||||
xen_firewall_driver = nova.virt.firewall.IptablesFirewallDriver
|
||||
libvirt_firewall_driver = nova.virt.libvirt.firewall.IptablesFirewallDriver
|
||||
|
||||
# Volume settings
|
||||
@ -166,6 +165,13 @@ glance_server = ${GLANCE_SERVER:-$(host:ip):9292}
|
||||
# Used however you want - ensure you know nova's conf file format if you use this!
|
||||
extra_flags = ${NOVA_EXTRA_FLAGS:-}
|
||||
|
||||
# Xen server/api settings
|
||||
xa_connection_url = http://169.254.0.1:80/
|
||||
xa_connection_username = root
|
||||
xs_firewall_driver = nova.virt.firewall.IptablesFirewallDriver
|
||||
xs_flat_interface = eth1
|
||||
xs_flat_network_bridge = xapi1
|
||||
|
||||
[extern]
|
||||
|
||||
# Set the ec2 url so euca2ools works
|
||||
|
@ -185,6 +185,7 @@ CLEANER_CMD_ROOT = [sh.joinpths("/", "bin", 'bash')]
|
||||
XS_DEF_INTERFACE = 'eth1'
|
||||
XA_CONNECTION_ADDR = '169.254.0.1'
|
||||
XA_CONNECTION_PORT = 80
|
||||
XA_DEF_USER = 'root'
|
||||
|
||||
#pip files that nova requires
|
||||
REQ_PIPS = ['general.json', 'nova.json']
|
||||
@ -717,17 +718,20 @@ class NovaConfConfigurator(object):
|
||||
drive_canon = driver.lower().strip()
|
||||
if drive_canon == 'xenserver':
|
||||
nova_conf.add('connection_type', 'xenapi')
|
||||
xa_url = urlunparse(('http', "%s:%s" % (XA_CONNECTION_ADDR, XA_CONNECTION_PORT), "", '', '', ''))
|
||||
xa_url = self._getstr('xa_connection_url') or \
|
||||
urlunparse(('http', "%s:%s" % (XA_CONNECTION_ADDR, XA_CONNECTION_PORT), "", '', '', ''))
|
||||
nova_conf.add('xenapi_connection_url', xa_url)
|
||||
nova_conf.add('xenapi_connection_username', 'root')
|
||||
xs_user = self._getstr('xa_connection_username') or XA_DEF_USER
|
||||
nova_conf.add('xenapi_connection_username', xs_user)
|
||||
nova_conf.add('xenapi_connection_password', self.cfg.get("passwords", "xenapi_connection"))
|
||||
nova_conf.add_simple('noflat_injected')
|
||||
if not utils.is_interface(XS_DEF_INTERFACE):
|
||||
msg = "Xenserver flat interface %s is not a known interface" % (XS_DEF_INTERFACE)
|
||||
xs_flat_ifc = self._getstr('xs_flat_interface') or XS_DEF_INTERFACE
|
||||
if not utils.is_interface(xs_flat_ifc):
|
||||
msg = "Xenserver flat interface %s is not a known interface" % (xs_flat_ifc)
|
||||
raise exceptions.ConfigException(msg)
|
||||
nova_conf.add('flat_interface', XS_DEF_INTERFACE)
|
||||
nova_conf.add('firewall_driver', self._getstr('xen_firewall_driver'))
|
||||
nova_conf.add('flat_network_bridge', 'xapi1')
|
||||
nova_conf.add('flat_interface', xs_flat_ifc)
|
||||
nova_conf.add('firewall_driver', self._getstr('xs_firewall_driver'))
|
||||
nova_conf.add('flat_network_bridge', self._getstr('xs_flat_network_bridge'))
|
||||
elif drive_canon == 'libvirt':
|
||||
nova_conf.add('connection_type', 'libvirt')
|
||||
nova_conf.add('firewall_driver', self._getstr('libvirt_firewall_driver'))
|
||||
|
Loading…
x
Reference in New Issue
Block a user