Commit 978c6900 authored by Marco Mariani's avatar Marco Mariani

replaced _ with - in option keys

parent 69b8c08a
...@@ -70,7 +70,7 @@ class Recipe(GenericBaseRecipe): ...@@ -70,7 +70,7 @@ class Recipe(GenericBaseRecipe):
""" """
def _options(self, options): def _options(self, options):
options['url'] = 'postgresql://%(superuser)s:%(password)s@[%(ipv6_random)s]:%(port)s/%(dbname)s' % options options['url'] = 'postgresql://%(superuser)s:%(password)s@[%(ipv6-random)s]:%(port)s/%(dbname)s' % options
def install(self): def install(self):
...@@ -159,11 +159,11 @@ class Recipe(GenericBaseRecipe): ...@@ -159,11 +159,11 @@ class Recipe(GenericBaseRecipe):
'host all all ::1/128 md5', 'host all all ::1/128 md5',
] ]
ipv4_netmask_bits = self.options.get('ipv4_netmask_bits', '32') ipv4_netmask_bits = self.options.get('ipv4-netmask-bits', '32')
for ip in ipv4: for ip in ipv4:
cfg_lines.append('host all all %s/%s md5' % (ip, ipv4_netmask_bits)) cfg_lines.append('host all all %s/%s md5' % (ip, ipv4_netmask_bits))
ipv6_netmask_bits = self.options.get('ipv6_netmask_bits', '128') ipv6_netmask_bits = self.options.get('ipv6-netmask-bits', '128')
for ip in ipv6: for ip in ipv6:
cfg_lines.append('host all all %s/%s md5' % (ip, ipv6_netmask_bits)) cfg_lines.append('host all all %s/%s md5' % (ip, ipv6_netmask_bits))
......
...@@ -64,9 +64,9 @@ class Recipe(object): ...@@ -64,9 +64,9 @@ class Recipe(object):
Set of IPv4 addresses. Set of IPv4 addresses.
ipv6 ipv6
Set of IPv6 addresses. Set of IPv6 addresses.
ipv4_random ipv4-random
One of the IPv4 addresses. One of the IPv4 addresses.
ipv6_random ipv6-random
One of the IPv6 addresses. One of the IPv6 addresses.
tap tap
Set of TAP interfaces. Set of TAP interfaces.
...@@ -116,9 +116,9 @@ class Recipe(object): ...@@ -116,9 +116,9 @@ class Recipe(object):
# also export single ip values for those recipes that don't support sets. # also export single ip values for those recipes that don't support sets.
if ipv4_set: if ipv4_set:
options['ipv4_random'] = list(ipv4_set)[0] options['ipv4-random'] = list(ipv4_set)[0]
if ipv6_set: if ipv6_set:
options['ipv6_random'] = list(ipv6_set)[0] options['ipv6-random'] = list(ipv6_set)[0]
options['tap'] = tap_set options['tap'] = tap_set
options['configuration'] = parameter_dict options['configuration'] = parameter_dict
......
...@@ -32,11 +32,11 @@ recipe = slapos.cookbook:postgres ...@@ -32,11 +32,11 @@ recipe = slapos.cookbook:postgres
# Options # Options
ipv6 = $${instance-parameters:ipv6} ipv6 = $${instance-parameters:ipv6}
# listen to connections from anywhere # listen to connections from anywhere
ipv6_netmask_bits = 0 ipv6-netmask-bits = 0
ipv4 = $${instance-parameters:ipv4} ipv4 = $${instance-parameters:ipv4}
# listen to connections from anywhere # listen to connections from anywhere
ipv4_netmask_bits = 0 ipv4-netmask-bits = 0
ipv6_random = $${instance-parameters:ipv6_random} ipv6-random = $${instance-parameters:ipv6-random}
superuser = postgres superuser = postgres
password = $${gen-passwd:passwd} password = $${gen-passwd:passwd}
port = 5432 port = 5432
...@@ -64,7 +64,7 @@ bytes = 16 ...@@ -64,7 +64,7 @@ bytes = 16
[postgres-promise] [postgres-promise]
recipe = slapos.cookbook:check_port_listening recipe = slapos.cookbook:check_port_listening
path = $${directories:promises}/postgres path = $${directories:promises}/postgres
hostname = $${instance-parameters:ipv6_random} hostname = $${instance-parameters:ipv6-random}
port = $${postgres-instance:port} port = $${postgres-instance:port}
......
...@@ -17,7 +17,7 @@ parts = ...@@ -17,7 +17,7 @@ parts =
recipe = slapos.recipe.template recipe = slapos.recipe.template
url = ${:_profile_base_location_}/instance.cfg.in url = ${:_profile_base_location_}/instance.cfg.in
output = ${buildout:directory}/instance.cfg output = ${buildout:directory}/instance.cfg
md5sum = 2c54a291ed61910f69a35a6db414c051 md5sum = d8b833a2054b82b6031a9420008b58fd
mode = 0644 mode = 0644
......
...@@ -87,7 +87,7 @@ mode = 0644 ...@@ -87,7 +87,7 @@ mode = 0644
recipe = slapos.recipe.template recipe = slapos.recipe.template
url = ${:_profile_base_location_}/postgres/instance-postgres.cfg.in url = ${:_profile_base_location_}/postgres/instance-postgres.cfg.in
output = ${buildout:directory}/instance-postgres.cfg output = ${buildout:directory}/instance-postgres.cfg
md5sum = 67c7772b80f82642f0f7d12793698374 md5sum = a2370d9a23e436166b20203f66412608
mode = 0644 mode = 0644
[instance-postgres-import] [instance-postgres-import]
......
...@@ -134,9 +134,9 @@ config-file = $${directory:stunnel-conf}/stunnel.conf ...@@ -134,9 +134,9 @@ config-file = $${directory:stunnel-conf}/stunnel.conf
key-file = $${directory:stunnel-conf}/stunnel.key key-file = $${directory:stunnel-conf}/stunnel.key
cert-file = $${directory:stunnel-conf}/stunnel.crt cert-file = $${directory:stunnel-conf}/stunnel.crt
pid-file = $${basedirectory:run}/stunnel.pid pid-file = $${basedirectory:run}/stunnel.pid
local-host = $${instance-parameters:ipv4_random} local-host = $${instance-parameters:ipv4-random}
local-port = $${postgres-instance:port} local-port = $${postgres-instance:port}
remote-host = $${instance-parameters:ipv6_random} remote-host = $${instance-parameters:ipv6-random}
remote-port = 6446 remote-port = 6446
client = false client = false
post-rotate-script = $${rootdirectory:bin}/stunnel_post_rotate post-rotate-script = $${rootdirectory:bin}/stunnel_post_rotate
...@@ -174,11 +174,11 @@ crl = $${directory:ca-dir}/crl/ ...@@ -174,11 +174,11 @@ crl = $${directory:ca-dir}/crl/
recipe = slapos.cookbook:postgres recipe = slapos.cookbook:postgres
ipv6 = $${instance-parameters:ipv6} ipv6 = $${instance-parameters:ipv6}
# listen to connections from anywhere # listen to connections from anywhere
ipv6_netmask_bits = 0 ipv6-netmask-bits = 0
ipv4 = $${instance-parameters:ipv4} ipv4 = $${instance-parameters:ipv4}
# listen to connections from anywhere # listen to connections from anywhere
ipv4_netmask_bits = 0 ipv4-netmask-bits = 0
ipv6_random = $${instance-parameters:ipv6_random} ipv6-random = $${instance-parameters:ipv6-random}
superuser = postgres superuser = postgres
password = $${postgres-passwd:passwd} password = $${postgres-passwd:passwd}
port = 5432 port = 5432
...@@ -233,7 +233,7 @@ path = $${directory:report}/slapmonitor-xml ...@@ -233,7 +233,7 @@ path = $${directory:report}/slapmonitor-xml
[postgres-promise] [postgres-promise]
recipe = slapos.cookbook:check_port_listening recipe = slapos.cookbook:check_port_listening
path = $${basedirectory:promises}/postgres path = $${basedirectory:promises}/postgres
hostname = $${instance-parameters:ipv6_random} hostname = $${instance-parameters:ipv6-random}
port = $${postgres-instance:port} port = $${postgres-instance:port}
...@@ -244,7 +244,7 @@ port = $${postgres-instance:port} ...@@ -244,7 +244,7 @@ port = $${postgres-instance:port}
[urls] [urls]
recipe = slapos.cookbook:publish recipe = slapos.cookbook:publish
url = $${postgres-instance:url} url = $${postgres-instance:url}
ip = $${instance-parameters:ipv6_random} ip = $${instance-parameters:ipv6-random}
#---------------- #----------------
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment