Skip to content

Commit

Permalink
fixup! Utils: Add helper to call sync NM methods
Browse files Browse the repository at this point in the history
  • Loading branch information
tyll committed Jun 14, 2019
1 parent 8ee53ba commit 42736cc
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions library/network_connections.py
Original file line number Diff line number Diff line change
Expand Up @@ -1065,7 +1065,7 @@ def volatilize_connection(self, connection, timeout=10):

def create_checkpoint(self, timeout):
""" Create a new checkpoint """
checkpoint = Util.call_async(
checkpoint = Util.call_async_method(
self.nmclient,
"checkpoint_create",
[
Expand All @@ -1082,11 +1082,11 @@ def create_checkpoint(self, timeout):

def destroy_checkpoint(self, path):
""" Destroy the specified checkpoint """
Util.call_async(self.nmclient, "checkpoint_destroy", [path])
Util.call_async_method(self.nmclient, "checkpoint_destroy", [path])

def rollback_checkpoint(self, path):
""" Rollback the specified checkpoint """
Util.call_async(
Util.call_async_method(
self.nmclient,
"checkpoint_rollback",
[path],
Expand Down
2 changes: 1 addition & 1 deletion module_utils/network_lsr/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ def GMainLoop_iterate_all(cls):
return c

@classmethod
def call_async(cls, object_, action, args, mainloop_timeout=10):
def call_async_method(cls, object_, action, args, mainloop_timeout=10):
""" Asynchronously call a NetworkManager method """
cancellable = cls.create_cancellable()
async_action = action + "_async"
Expand Down

0 comments on commit 42736cc

Please sign in to comment.