Modified template to support neutron configuration input

Change-Id: I3dc57f3cc413fc36763ff5f75d7dd11b84b3d322
This commit is contained in:
grace.yu 2015-02-06 15:11:01 -08:00
parent be06a81171
commit 51364fe942
3 changed files with 78 additions and 46 deletions

View File

@ -0,0 +1,2 @@
NAME = 'general_list'
FIELD_TYPE = list

View File

@ -6,46 +6,46 @@ METADATA = {
},
'service_credentials': {
'_self': {
'required_in_whole_config': True,
'key_extensions': {
'$service': ['image', 'compute', 'dashboard', 'identity', 'metering', 'rabbitmq', 'volume', 'mysql']
},
'required_in_whole_config': True,
'key_extensions': {
'$service': ['image', 'compute', 'dashboard', 'identity', 'metering', 'rabbitmq', 'volume', 'mysql']
},
'mapping_to': 'service_credentials'
},
'$service': {
'_self': {
'required_in_whole_config': True,
'mapping_to': '$service'
},
'username': {
'_self': {
'is_required': True,
'field': 'username',
'mapping_to': 'username'
}
},
'password': {
'_self': {
'is_required': True,
'field': 'password',
'mapping_to': 'password'
}
}
'_self': {
'required_in_whole_config': True,
'mapping_to': '$service'
},
'username': {
'_self': {
'is_required': True,
'field': 'username',
'mapping_to': 'username'
}
},
'password': {
'_self': {
'is_required': True,
'field': 'password',
'mapping_to': 'password'
}
}
}
},
'console_credentials': {
'_self': {
'required_in_whole_config': True,
'key_extensions': {
'$console': ['admin', 'compute', 'dashboard', 'image', 'metering', 'network', 'object-store', 'volume']
},
'mapping_to': 'console_credentials'
},
'$console': {
'_self': {
'required_in_whole_config': True,
'mapping_to': '$console'
},
'required_in_whole_config': True,
'key_extensions': {
'$console': ['admin', 'compute', 'dashboard', 'image', 'metering', 'network', 'object-store', 'volume']
},
'mapping_to': 'console_credentials'
},
'$console': {
'_self': {
'required_in_whole_config': True,
'mapping_to': '$console'
},
'username': {
'_self': {
'is_required': True,
@ -80,26 +80,50 @@ METADATA = {
'options': ['gre', 'vlan'],
'default_value': 'gre'
}
},
'network_vlan_ranges': {
'_self': {
'mapping_to': 'vlan_ranges',
'is_required': False,
'field': 'general_list',
'default_value': ['physnet1:2700:2999']
}
},
'bridge_mappings': {
'_self': {
'mapping_to': 'bridge_mappings',
'is_required': False,
'field': 'general_list',
'default_value': ['physnet1:br-eth1']
}
},
'tunnel_id_ranges': {
'_self': {
'mapping_to': 'tunnel_id_ranges',
'is_required': False,
'field': 'general_list',
'default_value': ['1:1000']
}
}
}
},
'network_mapping': {
'_self': {
'required_in_whole_config': True,
'key_extensions': {
'$interface_type': ['management', 'external', 'storage', 'tenant']
}
'key_extensions': {
'$interface_type': ['management', 'external', 'storage', 'tenant']
}
},
'$interface_type': {
'_self': {
'required_in_whole_config': True,
'field': 'anytype',
'autofill_callback': autofill_network_mapping,
'mapping_to': '$interface_type'
'autofill_callback': autofill_network_mapping,
'mapping_to': '$interface_type'
},
'interface': {
'interface': {
'_self': {
'is_required': True,
'is_required': True,
'field': 'general',
}
},

View File

@ -58,10 +58,16 @@
## Set Openstack neutron config
#set tenant_network_type = $getDictValue('neutron_config/openvswitch/tenant_network_type', 'gre')
#set enable_tunneling = True
#set tunnel_id_ranges = ''
#set vlan_ranges = ''
#set bridge_mappings = ''
#if $tenant_network_type != 'gre'
#if $tenant_network_type == 'vlan'
#set enable_tunneling = False
#set bridge_mappings = 'physnet1:br-eth1'
#set bridge_mappings = ','.join($getDictValue('neutron_config/openvswitch/bridge_mappings', ['physnet1:br-eth1']))
#set vlan_ranges = ','.join($getDictValue('neutron_config/openvswitch/vlan_ranges', ['physnet1:2700:2999']))
#else
#set tunnel_id_ranges = ','.join($getDictValue('neutron_config/openvswitch/tunnel_id_ranges', ['1:1000']))
#end if
## Utility functions definition
@ -183,15 +189,15 @@
"ml2": {
"type_drivers": "$tenant_network_type",
"tenant_network_types": "$tenant_network_type",
"tunnel_id_ranges": "1:1000",
"network_vlan_ranges": "physnet1:2700:2999",
"tunnel_id_ranges": "$tunnel_id_ranges",
"network_vlan_ranges": "$vlan_ranges",
"enable_security_group": "True"
},
"openvswitch": {
"tenant_network_type": "$tenant_network_type",
"enable_tunneling": "$enable_tunneling",
"tunnel_id_ranges": "1:1000",
"network_vlan_ranges": "physnet1:2700:2999",
"tunnel_id_ranges": "$tunnel_id_ranges",
"network_vlan_ranges": "$vlan_ranges",
"bridge_mappings": "$bridge_mappings",
"bind_interface": "$network_worker_tenant_nic"
},