From c8ee01097c106fad5740e3a14e98c22323fd29e6 Mon Sep 17 00:00:00 2001 From: Frediano Ziglio Date: Fri, 9 Feb 2024 14:08:06 +0000 Subject: [PATCH] Makes xcp/net/ifrename/{dynamic.py,static.py} more similar They are pretty similar, sync some differences. Signed-off-by: Frediano Ziglio --- xcp/net/ifrename/dynamic.py | 1 - xcp/net/ifrename/static.py | 7 +++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/xcp/net/ifrename/dynamic.py b/xcp/net/ifrename/dynamic.py index 6578da57..ad8f61ba 100644 --- a/xcp/net/ifrename/dynamic.py +++ b/xcp/net/ifrename/dynamic.py @@ -238,7 +238,6 @@ def generate(self, state): LOG.critical("Unknown dynamic rule method %s" % method) - def write(self, header = True): """ Write the dynamic rules to a string diff --git a/xcp/net/ifrename/static.py b/xcp/net/ifrename/static.py index 59fda548..76ab3723 100644 --- a/xcp/net/ifrename/static.py +++ b/xcp/net/ifrename/static.py @@ -292,6 +292,9 @@ def generate(self, state): LOG.critical("Unknown static rule method %s" % method) def write(self, header = True): + """ + Write the static rules to a string + """ res = "" @@ -320,6 +323,10 @@ def write(self, header = True): return res def save(self, header = True): + """ + Save the static rules to a file/path. + Returns boolean indicating success or failure. + """ fd = None