Skip to content

Commit

Permalink
Makes xcp/net/ifrename/{dynamic.py,static.py} more similar
Browse files Browse the repository at this point in the history
They are pretty similar, sync some differences.

Signed-off-by: Frediano Ziglio <[email protected]>
  • Loading branch information
freddy77 committed Feb 9, 2024
1 parent e75274d commit 1290609
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
1 change: 0 additions & 1 deletion xcp/net/ifrename/dynamic.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
7 changes: 7 additions & 0 deletions xcp/net/ifrename/static.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 = ""

Expand Down Expand Up @@ -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

Expand Down

0 comments on commit 1290609

Please sign in to comment.