Fix nics typing in configdrive generation

network_metadata's parameter "nics" is expected to be a list. In some
instances it will be left as a string unless the type is explicitly
set. Also the default of '' is incorrect since a string is not expected
but a list. Omitting it is the correct way, since it is not rquired.

Change-Id: If3376ee24507ed6f22e269e4440d2e371ff33eb4
This commit is contained in:
Clint Byrum 2016-03-19 16:45:34 -07:00
parent 2bbe254017
commit 0ce8c23ccf
2 changed files with 2 additions and 2 deletions

View File

@ -33,7 +33,7 @@ def main():
ipv4_subnet_mask=dict(required=False),
vlan_id=dict(required=False),
network_mtu=dict(required=False),
nics=dict(required=False),
nics=dict(required=False, type='list'),
node_network_info=dict(required=False)
)

View File

@ -47,7 +47,7 @@
ipv4_subnet_mask: "{{ ipv4_subnet_mask | default('') }}"
vlan_id: "{{ vlan_id | default('') }}"
network_mtu: "{{ network_mtu | default('1500') }}"
nics: "{{ nics | default('') }}"
nics: "{{ nics | default(omit) }}"
node_network_info: "{{ node_network_info | default('') }}"
when: addressing_mode is undefined and '"dhcp" not in addressing_mode'
- name: "Place network info template in each openstack/latest folder"