Browse Source

Delete rendered nic configs during --clean

Also delete the newly rendered per-role sample nic config templates when
process-templates.py is called with --clean.

Change-Id: Ic77b3c9e243839201065260b5807d145c4bb9972
changes/65/549865/2
James Slagle 4 years ago
parent
commit
9e0c55a7ac
  1. 10
      tools/process-templates.py

10
tools/process-templates.py

@ -311,6 +311,16 @@ def clean_templates(base_path, role_data_path, network_data_path):
delete(role_path)
delete(host_config_and_reboot_path)
nic_config_dir = os.path.join(base_path, 'network', 'config')
for sample_nic_config_dir in os.listdir(nic_config_dir):
delete(os.path.join(
nic_config_dir, sample_nic_config_dir,
'%s.yaml' % role['name'].lower()))
delete(os.path.join(
nic_config_dir, sample_nic_config_dir,
role['deprecated_nic_config_name']))
opts = parse_opts(sys.argv)
role_data_path = os.path.join(opts.base_path, opts.roles_data)

Loading…
Cancel
Save