lines_to_del.remove((ctx_keys, line))
lines_to_del.insert(index, (ctx_keys, "description"))
+ # interface x ; description blah
+ # no form of description does not accept any argument,
+ # strip arg before rendering
+ if (
+ ctx_keys[0].startswith("interface ")
+ and line
+ and line.startswith("description ")
+ ):
+ lines_to_del.remove((ctx_keys, line))
+ lines_to_del.insert(index, (ctx_keys, "description"))
+
# If there is a change in the segment routing block ranges, do it
# in-place, to avoid requesting spurious label chunks which might fail
if line and "segment-routing global-block" in line: