Assert VXLAN local/remote is the same address family. Assert VXLAN VNI is unique.
This commit is contained in:
		
							
								
								
									
										16
									
								
								unittest/error-vxlan1.yaml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										16
									
								
								unittest/error-vxlan1.yaml
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,16 @@
 | 
			
		||||
test:
 | 
			
		||||
  description: "A VXLAN source and destination must be the same address family"
 | 
			
		||||
  errors:
 | 
			
		||||
    expected:
 | 
			
		||||
     - "vxlan_tunnel .* local and remote are not the same address family"
 | 
			
		||||
    count: 1
 | 
			
		||||
---
 | 
			
		||||
vxlan_tunnels:
 | 
			
		||||
  vxlan_tunnel0:
 | 
			
		||||
    local: 192.0.2.1
 | 
			
		||||
    remote: 2001:db8::1
 | 
			
		||||
    vni: 100
 | 
			
		||||
 | 
			
		||||
interfaces:
 | 
			
		||||
  vxlan_tunnel0:
 | 
			
		||||
    description: "My little tunnel"
 | 
			
		||||
							
								
								
									
										24
									
								
								unittest/error-vxlan2.yaml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										24
									
								
								unittest/error-vxlan2.yaml
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,24 @@
 | 
			
		||||
test:
 | 
			
		||||
  description: "VXLAN VNIs must be unique"
 | 
			
		||||
  errors:
 | 
			
		||||
    expected:
 | 
			
		||||
     - "vxlan_tunnel .* VNI .* is not unique"
 | 
			
		||||
    count: 2
 | 
			
		||||
---
 | 
			
		||||
vxlan_tunnels:
 | 
			
		||||
  vxlan_tunnel0:
 | 
			
		||||
    local: 192.0.2.1
 | 
			
		||||
    remote: 192.0.2.2
 | 
			
		||||
    vni: 100
 | 
			
		||||
 | 
			
		||||
  vxlan_tunnel1:
 | 
			
		||||
    local: 2001:db8::1
 | 
			
		||||
    remote: 2001:db8::2
 | 
			
		||||
    vni: 100
 | 
			
		||||
 | 
			
		||||
interfaces:
 | 
			
		||||
  vxlan_tunnel0:
 | 
			
		||||
    description: "This tunnel has the same VNI as vxlan_tunnel1"
 | 
			
		||||
 | 
			
		||||
  vxlan_tunnel1:
 | 
			
		||||
    description: "This tunnel has the same VNI as vxlan_tunnel0"
 | 
			
		||||
		Reference in New Issue
	
	Block a user