This repository was archived by the owner on Aug 15, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 14 files changed +124
-8
lines changed
Expand file tree Collapse file tree 14 files changed +124
-8
lines changed Original file line number Diff line number Diff line change 33After=vyos-router.service
44ConditionPathExists=
55ConditionPathExists=/run/vpp/vpp.conf
6+ OnFailure=vpp-failure-handler.service
67
78[Service]
89EnvironmentFile=
910ExecStart=
1011ExecStart=/usr/bin/vpp -c /run/vpp/vpp.conf
1112WorkingDirectory=
1213WorkingDirectory=/run/vpp
13- Restart=always
14- RestartSec=10
14+ Restart=no
Original file line number Diff line number Diff line change @@ -147,6 +147,10 @@ def get_config(config=None) -> dict:
147147 with_recursive_defaults = True ,
148148 )
149149
150+ if not conf .exists (['vpp' ]):
151+ config ['remove_vpp' ] = True
152+ return config
153+
150154 # Get effective config as we need full dictionary for deletion
151155 effective_config = conf .get_config_dict (
152156 base ,
@@ -190,7 +194,7 @@ def get_config(config=None) -> dict:
190194
191195
192196def verify (config ):
193- if 'remove' in config :
197+ if 'remove' in config or 'remove_vpp' in config :
194198 return None
195199
196200 for acl_type in ['ip' , 'macip' ]:
@@ -319,6 +323,9 @@ def generate(config):
319323
320324
321325def apply (config ):
326+ if 'remove_vpp' in config :
327+ return None
328+
322329 acl = Acl ()
323330
324331 if 'effective' in config :
Original file line number Diff line number Diff line change @@ -86,6 +86,10 @@ def get_config(config=None) -> dict:
8686 with_recursive_defaults = True ,
8787 )
8888
89+ if not conf .exists (['vpp' ]):
90+ config ['remove_vpp' ] = True
91+ return config
92+
8993 # Get effective config as we need full dicitonary per interface delete
9094 effective_config = conf .get_config_dict (
9195 base + [ifname ],
@@ -155,6 +159,9 @@ def get_config(config=None) -> dict:
155159
156160
157161def verify (config ):
162+ if 'remove_vpp' in config :
163+ return None
164+
158165 verify_vpp_remove_kernel_interface (config )
159166 verify_vpp_remove_xconnect_interface (config )
160167
@@ -175,6 +182,9 @@ def generate(config):
175182
176183
177184def apply (config ):
185+ if 'remove_vpp' in config :
186+ return None
187+
178188 ifname = config .get ('ifname' )
179189 # remove old members
180190 if 'effective' in config :
Original file line number Diff line number Diff line change @@ -53,6 +53,10 @@ def get_config(config=None) -> dict:
5353 with_recursive_defaults = True ,
5454 )
5555
56+ if not conf .exists (['vpp' ]):
57+ config ['remove_vpp' ] = True
58+ return config
59+
5660 # Get effective config as we need full dicitonary per interface delete
5761 effective_config = conf .get_config_dict (
5862 base + [ifname ],
@@ -87,7 +91,7 @@ def get_config(config=None) -> dict:
8791
8892
8993def verify (config ):
90- if 'remove' in config :
94+ if 'remove' in config or 'remove_vpp' in config :
9195 return None
9296
9397 # Check if interface exists in vpp before adding to bridge-domain
@@ -122,6 +126,9 @@ def generate(config):
122126
123127
124128def apply (config ):
129+ if 'remove_vpp' in config :
130+ return None
131+
125132 ifname = config .get ('ifname' )
126133 # vxlan10 in the vpp is vxlan_tunnel10
127134 interface_transform_filter = ('geneve' , 'vxlan' )
Original file line number Diff line number Diff line change @@ -65,6 +65,10 @@ def get_config(config=None) -> dict:
6565 with_recursive_defaults = True ,
6666 )
6767
68+ if not conf .exists (['vpp' ]):
69+ config ['remove_vpp' ] = True
70+ return config
71+
6872 # Get effective config as we need full dicitonary per interface delete
6973 effective_config = conf .get_config_dict (
7074 base + [ifname ],
@@ -112,6 +116,10 @@ def get_config(config=None) -> dict:
112116
113117
114118def verify (config ):
119+ # No need to verify anything if vpp is removed
120+ if 'remove_vpp' in config :
121+ return None
122+
115123 # Verify that removed kernel interface is not used in 'vpp kernel-interfaces'.
116124 # vpp interfaces geneve geneveX kernel-interface vpp-tunX
117125 # vpp kernel-interface vpp-tunX
@@ -141,6 +149,9 @@ def generate(config):
141149
142150
143151def apply (config ):
152+ if 'remove_vpp' in config :
153+ return None
154+
144155 ifname = config .get ('ifname' )
145156 # Delete interface
146157 if 'effective' in config :
Original file line number Diff line number Diff line change @@ -65,6 +65,10 @@ def get_config(config=None) -> dict:
6565 with_recursive_defaults = True ,
6666 )
6767
68+ if not conf .exists (['vpp' ]):
69+ config ['remove_vpp' ] = True
70+ return config
71+
6872 # Get effective config as we need full dicitonary per interface delete
6973 effective_config = conf .get_config_dict (
7074 base + [ifname ],
@@ -125,6 +129,10 @@ def get_config(config=None) -> dict:
125129
126130
127131def verify (config ):
132+ # No need to verify anything if vpp is removed
133+ if 'remove_vpp' in config :
134+ return None
135+
128136 # Verify that removed kernel interface is not used in 'vpp kernel-interfaces'.
129137 # vpp interfaces gre greX kernel-interface vpp-tunX
130138 # vpp kernel-interface vpp-tunX
@@ -167,6 +175,9 @@ def generate(config):
167175
168176
169177def apply (config ):
178+ if 'remove_vpp' in config :
179+ return None
180+
170181 ifname = config .get ('ifname' )
171182 # Delete interface
172183 if 'effective' in config :
Original file line number Diff line number Diff line change @@ -64,6 +64,10 @@ def get_config(config=None) -> dict:
6464 with_recursive_defaults = True ,
6565 )
6666
67+ if not conf .exists (['vpp' ]):
68+ config ['remove_vpp' ] = True
69+ return config
70+
6771 # Get effective config as we need full dicitonary per interface delete
6872 effective_config = conf .get_config_dict (
6973 base + [ifname ],
@@ -125,6 +129,10 @@ def get_config(config=None) -> dict:
125129
126130
127131def verify (config ):
132+ # No need to verify anything if vpp is removed
133+ if 'remove_vpp' in config :
134+ return None
135+
128136 # Verify that removed kernel interface is not used in 'vpp kernel-interfaces'.
129137 # vpp interfaces ipip ipipX kernel-interface vpp-tunX
130138 # vpp kernel-interface vpp-tunX
@@ -161,6 +169,9 @@ def generate(config):
161169
162170
163171def apply (config ):
172+ if 'remove_vpp' in config :
173+ return None
174+
164175 ifname = config .get ('ifname' )
165176 # Delete interface
166177 if 'effective' in config :
Original file line number Diff line number Diff line change @@ -62,6 +62,10 @@ def get_config(config=None) -> dict:
6262 with_recursive_defaults = True ,
6363 )
6464
65+ if not conf .exists (['vpp' ]):
66+ config ['remove_vpp' ] = True
67+ return config
68+
6569 # Get effective config as we need full dicitonary per interface delete
6670 effective_config = conf .get_config_dict (
6771 base + [ifname ],
@@ -114,6 +118,10 @@ def get_config(config=None) -> dict:
114118
115119
116120def verify (config ):
121+ # No need to verify anything if vpp is removed
122+ if 'remove_vpp' in config :
123+ return None
124+
117125 verify_vpp_remove_kernel_interface (config )
118126
119127 if 'remove' in config :
@@ -128,6 +136,9 @@ def generate(config):
128136
129137
130138def apply (config ):
139+ if 'remove_vpp' in config :
140+ return None
141+
131142 ifname = config .get ('ifname' )
132143 # Delete interface
133144 if 'effective' in config :
Original file line number Diff line number Diff line change @@ -66,6 +66,10 @@ def get_config(config=None) -> dict:
6666 with_recursive_defaults = True ,
6767 )
6868
69+ if not conf .exists (['vpp' ]):
70+ config ['remove_vpp' ] = True
71+ return config
72+
6973 # Get effective config as we need full dicitonary per interface delete
7074 effective_config = conf .get_config_dict (
7175 base + [ifname ],
@@ -131,6 +135,10 @@ def get_config(config=None) -> dict:
131135
132136
133137def verify (config ):
138+ # No need to verify anything if vpp is removed
139+ if 'remove_vpp' in config :
140+ return None
141+
134142 # Verify that removed kernel interface is not used in 'vpp kernel-interfaces'.
135143 # vpp interfaces vxlan vxlanX kernel-interface vpp-tunX
136144 # vpp kernel-interface vpp-tunX
@@ -165,6 +173,9 @@ def generate(config):
165173
166174
167175def apply (config ):
176+ if 'remove_vpp' in config :
177+ return None
178+
168179 ifname = config .get ('ifname' )
169180 # Delete interface
170181 if 'effective' in config :
Original file line number Diff line number Diff line change @@ -53,6 +53,10 @@ def get_config(config=None) -> dict:
5353 with_recursive_defaults = True ,
5454 )
5555
56+ if not conf .exists (['vpp' ]):
57+ config ['remove_vpp' ] = True
58+ return config
59+
5660 # Get effective config as we need full dicitonary per interface delete
5761 effective_config = conf .get_config_dict (
5862 base + [ifname ],
@@ -85,7 +89,7 @@ def get_config(config=None) -> dict:
8589
8690
8791def verify (config ):
88- if 'remove' in config :
92+ if 'remove' in config or 'remove_vpp' in config :
8993 return None
9094
9195 # Xconnect requires 2 members
@@ -110,6 +114,9 @@ def generate(config):
110114
111115
112116def apply (config ):
117+ if 'remove_vpp' in config :
118+ return None
119+
113120 ifname = config .get ('ifname' )
114121
115122 # Delete xconnect
You can’t perform that action at this time.
0 commit comments