Drop legacy networking resources

This change removes the resources and implementations for the legacy
networking method by OS::TripleO::{{role.name}}::Net::SoftwareConfig
resource types, because now the new ansible implementation is used by
default.

Depends-on: https://review.opendev.org/c/openstack/tripleo-ansible/+/859517
Depends-on: https://review.opendev.org/c/openstack/tripleo-common/+/859518
Change-Id: I74040e12503961d286a00b9e011831e77cac835b
This commit is contained in:
Takashi Kajinami 2022-09-28 15:30:49 +09:00
parent f1cf81eec2
commit 2090ef676f
3 changed files with 0 additions and 68 deletions

View File

@ -594,25 +594,16 @@ outputs:
run_once: true
debug:
msg: Use --start-at-task 'Network Configuration' to resume from this task
- name: Check NetworkConfig script existence
delegate_to: localhost
stat:
path: "{{ tripleo_role_name ~ '/NetworkConfig' }}"
register: NetworkConfig_stat
when: not tripleo_network_config_with_ansible
- name: Run Network Config
import_role:
name: tripleo_network_config
vars:
tripleo_network_config_script_path: "{{ NetworkConfig_stat.stat.path }}"
tripleo_network_config_update: "{{ network_config_update }}"
tripleo_network_config_async_timeout: "{{ async_timeout | default(300) }}"
tripleo_network_config_async_poll: "{{ async_poll | default(3) }}"
tripleo_network_config_hide_sensitive_logs: false
tripleo_network_config_legacy_script: false
tripleo_network_config_safe_defaults: "{{ network_safe_defaults }}|bool"
when:
- tripleo_network_config_with_ansible or NetworkConfig_stat.stat.exists
tags:
- overcloud
- pre_deploy_steps

View File

@ -22,7 +22,6 @@ resource_registry:
OS::TripleO::Tasks::{{role.name}}PreConfig: OS::Heat::None
OS::TripleO::Tasks::{{role.name}}PostConfig: OS::Heat::None
OS::TripleO::{{role.name}}ExtraConfigPre: puppet/extraconfig/pre_deploy/default.yaml
OS::TripleO::{{role.name}}::Net::SoftwareConfig: OS::Heat::None
# Port assignments for the {{role.name}} role
{%- for network in networks if network.enabled|default(true) and network.name in role.networks|default([]) %}
OS::TripleO::{{role.name}}::Ports::{{network.name}}Port: network/ports/noop.yaml

View File

@ -194,11 +194,6 @@ parameters:
description: The balance-tcp bond mode is known to cause packet loss and
should not be used in BondInterfaceOvsOptions.
NetworkConfigWithAnsible:
description: NetworkConfig with ansible flag
type: boolean
default: True
# Jinja loop for Role in role_data.yaml
{% for role in roles %}
@ -978,7 +973,6 @@ resources:
{%- endfor %}
service_metadata_settings: {get_attr: [{{role.name}}ServiceChainRoleData, value, service_metadata_settings]}
tripleo_network_config_template: {get_param: {{role.name}}NetworkConfigTemplate}
tripleo_network_config_with_ansible: {get_param: NetworkConfigWithAnsible}
default_route_networks: {{role.default_route_networks|default(['ControlPlane'])}}
networks_skip_config: {{ role.networks_skip_config|default([]) }}
tripleo_firewall_rules: {get_attr: [{{role.name}}ServiceChainRoleData, value, firewall_rules]}
@ -987,52 +981,6 @@ resources:
tripleo_firewall_edge_frontend_rules: {get_attr: [FirewallFrontendRules, value, edge_frontend]}
tripleo_firewall_edge_ssl_frontend_rules: {get_attr: [FirewallFrontendRules, value, edge_ssl_frontend]}
role_tags: {{role.tags}}
{{role.name}}NetworkConfig:
type: OS::TripleO::{{role.name}}::Net::SoftwareConfig
properties:
ControlPlaneIp: "{{ '{{' }} ctlplane_ip {{ '}}' }}"
ControlPlaneSubnetCidr: {str_split: ['/', {get_attr: [Networks, net_attributes_map, ctlplane, subnets, {get_param: {{role.name}}ControlPlaneSubnet}, cidr]}, 1]}
ControlPlaneDefaultRoute: {get_attr: [Networks, net_attributes_map, ctlplane, subnets, {get_param: {{role.name}}ControlPlaneSubnet}, gateway_ip]}
ControlPlaneStaticRoutes:
list_concat_unique:
- {get_attr: [Networks, net_attributes_map, ctlplane, subnets, {get_param: {{role.name}}ControlPlaneSubnet}, host_routes]}
{%- if role.default_route_networks is not defined or 'ControlPlane' in role.default_route_networks %}
- - default: true
next_hop: {get_attr: [Networks, net_attributes_map, ctlplane, subnets, {get_param: {{role.name}}ControlPlaneSubnet}, gateway_ip]}
{%- endif %}
ControlPlaneMtu: {get_attr: [Networks, net_attributes_map, ctlplane, network, mtu]}
DnsServers:
if:
- dnsservers_set
- {get_param: DnsServers}
- {get_attr: [Networks, net_attributes_map, ctlplane, subnets, {get_param: {{role.name}}ControlPlaneSubnet}, dns_nameservers]}
{%- for network in networks if network.enabled|default(true) and network.name in role.networks|default([]) %}
{%- if role.networks is mapping %}
{%- set _role_net_subnet = role.networks[network.name]['subnet'] %}
{%- else %}
{%- set _role_net_subnet = network.name_lower + '_subnet' %}
{%- endif %}
{{network.name}}IpSubnet: "{{ '{{' }} {{network.name_lower}}_ip ~ '/' ~ {{network.name_lower}}_cidr {{ '}}' }}"
{{network.name}}InterfaceRoutes:
list_concat_unique:
- {get_attr: [Networks, net_attributes_map, {{network.name_lower}}, subnets, {{_role_net_subnet}}, host_routes]}
{%- if role.default_route_networks is defined and network.name in role.default_route_networks %}
- - default: true
next_hop: {get_attr: [Networks, net_attributes_map, {{network.name_lower}}, subnets, {{_role_net_subnet}}, gateway_ip]}
{%- endif %}
{{network.name}}Mtu: {get_attr: [Networks, net_attributes_map, {{network.name_lower}}, network, mtu]}
{{network.name}}NetworkVlanID:
yaql:
expression: >
switch(not isList($.data) => 1,
not $.data.where($.startsWith('tripleo_vlan_id')).len() => 1,
true => int($.data.where($.startsWith('tripleo_vlan_id')).first().split('=').last()))
data: {get_attr: [Networks, net_attributes_map, {{network.name_lower}}, subnets, {{_role_net_subnet}}, tags]}
{%- if role.default_route_networks is defined and network.name in role.default_route_networks %}
{{network.name}}InterfaceDefaultRoute: {get_attr: [Networks, net_attributes_map, {{network.name_lower}}, subnets, {{_role_net_subnet}}, gateway_ip]}
{%- endif %}
{%- endfor %}
{%- endfor %}
ControlVirtualIP:
@ -1331,12 +1279,6 @@ outputs:
GlobalConfig:
description: The global_config (hieradata).
value: {get_attr: [GlobalConfig, value]}
RoleNetworkConfigMap:
description: Mapping of roles to network config
value:
{%- for role in roles %}
{{role.name}}: {get_attr: [{{role.name}}NetworkConfig, config]}
{%- endfor %}
AnsibleHostVarsMap:
description: Map of Ansible Host variables per role
value: