Increase amount of options

This commit is contained in:
vic 2013-03-20 19:32:27 +04:00
parent bda3b7fc6f
commit 3c4a6a78be
2 changed files with 31 additions and 8 deletions

View File

@ -138,6 +138,14 @@ class ConfigYaml
end
end
def master_hostname()
if self.ha?
self.mandatory('master_hostname')
else
self.obligatory('master_hostname')
end
end
def floating_range()
self.obligatory('floating_range')
end
@ -249,18 +257,29 @@ class ConfigYaml
def swift_loopback()
self.obligatory('swift_loopback')
end
def network_manager()
self.obligatory('network_manager')
end
def auto_assign_floating_ip()
self.obligatory('auto_assign_floating_ip')
end
def quantum_netnode_on_cnt()
self.obligatory('quantum_netnode_on_cnt')
end
end
class Manifest
def self.prepare_manifest(template, config)
if config.ha?
template.replace(:internal_virtual_ip => config.internal_virtual_ip(),
:public_virtual_ip => config.public_virtual_ip())
:public_virtual_ip => config.public_virtual_ip(),
:master_hostname => config.master_hostname()
)
end
template.replace(:deployment_id => config.deployment_id()) unless config.deployment_id().nil?
template.replace(:swift_loopback => config.swift_loopback()) unless config.swift_loopback().nil?
template.replace(:floating_range => config.floating_range(),
:fixed_range => config.fixed_range(),
:mirror_type => config.mirror_type(),
@ -279,11 +298,13 @@ class Manifest
:segment_range => config.segment_range(),
:repo_proxy => config.repo_proxy(),
:public_netmask => config.public_netmask(),
:internal_netmask => config.internal_netmask()
:internal_netmask => config.internal_netmask(),
:network_manager => config.network_manager(),
:auto_assign_floating_ip => config.auto_assign_floating_ip(),
:quantum_netnode_on_cnt=> config.quantum_netnode_on_cnt()
)
if config.swift()
template.replace(:swift_loopback => config.loopback())
template.replace(:swift_loopback => config.swift_loopback()) unless config.swift_loopback().nil?
end
template.replace(:quantum => config.quantum())
end

View File

@ -21,6 +21,9 @@ common:
pool_start: 10.49.54.225
pool_end: 10.49.54.239
segment_range: 900:999
network_manager: nova.network.manager.FlatDHCPManager
auto_assign_floating_ip: true
quantum_netnode_on_cnt: true
use_syslog: true
syslog_server: 10.49.63.12
mirror_type: custom
@ -32,7 +35,6 @@ common:
internal_netmask: 255.255.255.0
default_gateway: 10.0.1.100
nagios_master: fuel-controller-01.your-domain-name.com
loopback: loopback
cinder: true
cinder_on_computes: true
swift: true