Merge "Remove hardcoded dns from config file"

This commit is contained in:
Jenkins 2015-07-17 19:12:51 +00:00 committed by Gerrit Code Review
commit 3aca47f6d2
6 changed files with 16 additions and 18 deletions

View File

@ -192,6 +192,10 @@ Install the API service and Engine
login = %RABBITMQ_USER%
password = %RABBITMQ_PASSWORD%
virtual_host = %RABBITMQ_SERVER_VIRTUAL_HOST%
[networking]
default_dns = 8.8.8.8 # In case openstack neutron has no default
# DNS configured
..
#. Create a virtual environment and install Murano prerequisites. We will use

View File

@ -27,14 +27,12 @@ Properties:
Contract: $.string()
Usage: InOut
dnsNameserver:
Contract: $.string()
dnsNameservers:
# This property is optional,
# since neutron default dns will be used in case of empty
Contract: [$.string()]
Usage: InOut
useDefaultDns:
Contract: $.bool().notNull()
Default: true
Methods:
initialize:
Body:
@ -46,10 +44,9 @@ Methods:
Body:
- If: not $.getAttr(deployed, false)
Then:
- If: $.useDefaultDns and (not bool($.dnsNameserver))
- If: $.dnsNameservers = null
Then:
- $.dnsNameserver: $._netExplorer.getDefaultDns()
- $.dnsNameservers: $._netExplorer.getDefaultDns()
- $template: $._createNetwork()
- If: $.autoUplink and (not bool($.externalRouterId))
Then:
@ -87,7 +84,7 @@ Methods:
properties:
network: { get_resource: $._getNetworkName() }
ip_version: 4
dns_nameservers: [ $.dnsNameserver ]
dns_nameservers: $.dnsNameservers
cidr: $.subnetCidr

View File

@ -162,9 +162,9 @@ networking_opts = [
help='Template IP address for generating environment '
'subnet cidrs'),
cfg.StrOpt('default_dns', default='8.8.8.8',
help='Default DNS nameserver to be assigned to '
'created Networks'),
cfg.ListOpt('default_dns', default=[],
help='List of default DNS nameservers to be assigned to '
'created Networks'),
cfg.StrOpt('external_network', default='ext-net',
help='ID or name of the external network for routers '

View File

@ -2,7 +2,6 @@ murano:objects+("83bff5acf8354816b08cf9b4917c898d", "de305d5475b4431badb2eb6b9e5
murano:properties+("83bff5acf8354816b08cf9b4917c898d", "name", "wordpress-env")
murano:parent_types+("83bff5acf8354816b08cf9b4917c898d", "io.murano.Object")
murano:objects+("c46770dec1db483ca2322914b842e50f", "83bff5acf8354816b08cf9b4917c898d", "io.murano.resources.NeutronNetwork")
murano:properties+("c46770dec1db483ca2322914b842e50f", "useDefaultDns", "True")
murano:properties+("c46770dec1db483ca2322914b842e50f", "name", "wordpress-env-network")
murano:properties+("c46770dec1db483ca2322914b842e50f", "autogenerateSubnet", "True")
murano:properties+("c46770dec1db483ca2322914b842e50f", "autoUplink", "True")

View File

@ -44,10 +44,9 @@ defaultNetworks:
'?': {id: 7bac482a4c194b6e8dea81e6ce606db6, type: io.murano.resources.NeutronNetwork}
autoUplink: true
autogenerateSubnet: true
dnsNameserver: null
dnsNameservers: null
externalRouterId: null
name: quick-env-12-network
subnetCidr: null
useDefaultDns: true
flat: null
name: quick-env-12

View File

@ -3,11 +3,10 @@ defaultNetworks:
'?': {id: c46770dec1db483ca2322914b842e50f, type: io.murano.resources.NeutronNetwork}
autoUplink: true
autogenerateSubnet: true
dnsNameserver: null
dnsNameservers: null
externalRouterId: null
name: wordpress-env-network
subnetCidr: null
useDefaultDns: true
flat: null
name: wordpress-env
'?': {type: io.murano.Environment, id: 83bff5acf8354816b08cf9b4917c898d}