Merge "Config drive spec uses network_data.json"
This commit is contained in:
commit
1d25482d96
@ -448,7 +448,7 @@ Deployment and configuration of operating systems
|
||||
|
||||
By default, Bifrost deploys a configuration drive which includes the user SSH
|
||||
public key, hostname, and the network configuration in the form of
|
||||
network_info.json that can be read/parsed by the
|
||||
network_data.json that can be read/parsed by the
|
||||
`glean <https://github.com/openstack-infra/glean>`_ utility. This allows for
|
||||
the deployment of Ubuntu, CentOS, or Fedora "tenants" on baremetal. This file
|
||||
format is not yet supported by Cloud-Init, however it is on track for
|
||||
|
@ -34,12 +34,12 @@ def main():
|
||||
vlan_id=dict(required=False),
|
||||
network_mtu=dict(required=False),
|
||||
nics=dict(required=False, type='list'),
|
||||
node_network_info=dict(required=False, type='dict')
|
||||
node_network_data=dict(required=False, type='dict')
|
||||
)
|
||||
|
||||
module = AnsibleModule(argument_spec)
|
||||
|
||||
network_metadata = module.params['node_network_info']
|
||||
network_metadata = module.params['node_network_data']
|
||||
if not network_metadata:
|
||||
links = []
|
||||
networks = []
|
||||
|
@ -53,8 +53,8 @@ write_interfaces_file: Legacy option to write an debian style network
|
||||
interfaces configuration file. This is required for
|
||||
deployment where simple-init cannot be used, in
|
||||
particular when using Cirros.
|
||||
node_network_info: Optional: If defined, the contents are written out to the
|
||||
network_info.json file, effectively allowing a user to
|
||||
node_network_data: Optional: If defined, the contents are written out to the
|
||||
network_data.json file, effectively allowing a user to
|
||||
override the network configuration contents based on
|
||||
the inventory data.
|
||||
|
||||
|
@ -24,3 +24,6 @@ ironic_url: "http://localhost:6385/"
|
||||
|
||||
# Default ISO generation utility
|
||||
iso_gen_utility: "mkisofs"
|
||||
|
||||
# Deprecated, remove in Queens release
|
||||
node_network_info: {}
|
||||
|
@ -45,7 +45,7 @@
|
||||
src: openstack_meta_data.json.j2
|
||||
dest: "{{ variable_configdrive_location.stdout }}/{{ uuid }}/openstack/latest/meta_data.json"
|
||||
|
||||
- name: "Generate network_info"
|
||||
- name: "Generate network_data"
|
||||
network_metadata:
|
||||
ipv4_address: "{{ ipv4_address | default('') }}"
|
||||
ipv4_gateway: "{{ ipv4_gateway | default('') }}"
|
||||
@ -55,12 +55,22 @@
|
||||
vlan_id: "{{ vlan_id | default('') }}"
|
||||
network_mtu: "{{ network_mtu | default('1500') }}"
|
||||
nics: "{{ nics | default(omit) }}"
|
||||
node_network_info: "{{ node_network_info | default({}) }}"
|
||||
node_network_data: "{{ node_network_data | default(node_network_info) }}"
|
||||
when: addressing_mode is undefined or "dhcp" not in addressing_mode
|
||||
|
||||
- name: "Place network info template in each openstack/latest folder"
|
||||
- name: "Place network data template in each openstack/latest folder"
|
||||
template:
|
||||
src: network_info.json.j2
|
||||
src: network_data.json.j2
|
||||
dest: "{{ variable_configdrive_location.stdout }}/{{ uuid }}/openstack/latest/network_data.json"
|
||||
when: addressing_mode is undefined or "dhcp" not in addressing_mode
|
||||
|
||||
# TODO(TheJulia): Deprecation removal of the old network_info file name
|
||||
# should likely take place after an elongated deprecation cycle.
|
||||
# Begind eprecated in the Ocata release suggests Queens as the point
|
||||
# in which we should remove it.
|
||||
- name: "Place deprecated network info file location in each openstack/latest folder"
|
||||
template:
|
||||
src: network_data.json.j2
|
||||
dest: "{{ variable_configdrive_location.stdout }}/{{ uuid }}/openstack/latest/network_info.json"
|
||||
when: addressing_mode is undefined or "dhcp" not in addressing_mode
|
||||
|
||||
|
@ -0,0 +1,17 @@
|
||||
---
|
||||
deprecations:
|
||||
- The ``node_network_info`` parameter has been deperecated
|
||||
in favor for the ``node_network_data`` parameter as the
|
||||
relaated configurtion drive ``network_info.json`` file was
|
||||
misnamed origionally, and should have been named
|
||||
``network_data.json``.
|
||||
Support for the node_network_info, and the continued
|
||||
write-out of the network_info.json file in configuration
|
||||
drives will be removed in the Queens cycle.
|
||||
fixes:
|
||||
- When support for passing configuration drive data to the
|
||||
nodes was originally created, the file was accidently named
|
||||
incorrectly as ``network_info.json``. The correct filename
|
||||
is ``network_data.json``. Both files will now be written
|
||||
until support for writing ``network_info.json`` is removed
|
||||
in the Queens cycle.
|
Loading…
Reference in New Issue
Block a user