mirror of
				https://git.proxmox.com/git/mirror_frr
				synced 2025-11-03 23:47:16 +00:00 
			
		
		
		
	tools: reload handle removal of entire address-family section under BGP
Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com> When an entire address-family section is removed from under BGP, we cannot just issue 'no address-family foo bar' as address-family line doesn't support 'no'. We have to delete the individual lines under the address-family.
This commit is contained in:
		
							parent
							
								
									825be4c27b
								
							
						
					
					
						commit
						afa2e8e187
					
				@ -814,6 +814,14 @@ def compare_context_objects(newconf, running):
 | 
			
		||||
            elif "router bgp" in running_ctx_keys[0] and len(running_ctx_keys) > 1 and delete_bgpd:
 | 
			
		||||
                continue
 | 
			
		||||
 | 
			
		||||
            elif ("router bgp" in running_ctx_keys[0] and
 | 
			
		||||
                  len(running_ctx_keys) > 1 and
 | 
			
		||||
                  running_ctx_keys[1].startswith('address-family')):
 | 
			
		||||
                # There's no 'no address-family' support and so we have to
 | 
			
		||||
                # delete each line individually again
 | 
			
		||||
                for line in running_ctx.lines:
 | 
			
		||||
                    lines_to_del.append((running_ctx_keys, line))
 | 
			
		||||
 | 
			
		||||
            # Non-global context
 | 
			
		||||
            elif running_ctx_keys and not any("address-family" in key for key in running_ctx_keys):
 | 
			
		||||
                lines_to_del.append((running_ctx_keys, None))
 | 
			
		||||
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user