Renamed replace_config method for clarity and added discard_config method

This commit is contained in:
David Barroso committed 2015-03-13 12:51:56 +01:00
1 parent ec7b3f052e
commit eab9cd75b8
3 files changed
+11 -2

No files matched your search

+7 -1
View File
@@ -49,13 +49,19 @@ class NetworkDriver:
""" """
raise NotImplementedError raise NotImplementedError
def replace_config(self): def commit_config(self):
""" """
Applies the configuration loaded with the method load_candidate_config on the device. Note that the current Applies the configuration loaded with the method load_candidate_config on the device. Note that the current
configuration of the device is replaced with the new configuration. configuration of the device is replaced with the new configuration.
""" """
raise NotImplementedError raise NotImplementedError
def discard_config(self):
"""
Discards the configuration loaded into the candidate.
"""
raise NotImplementedError
def rollback(self): def rollback(self):
""" """
If changes have been made, revert changes to the original state. If changes have been made, revert changes to the original state.
+4 -1
View File
@@ -59,9 +59,12 @@ class EOSDriver(NetworkDriver):
def compare_config(self): def compare_config(self):
return self.device.compare_config() return self.device.compare_config()
def replace_config(self): def commit_config(self):
self.device.replace_config() self.device.replace_config()
def discard_config(self):
pass
def rollback(self): def rollback(self):
self.device.rollback() self.device.rollback()
View File
Whitespace-only changes.