diff --git a/drivers/base.py b/drivers/base.py index 0e651a6..334b379 100644 --- a/drivers/base.py +++ b/drivers/base.py @@ -49,13 +49,19 @@ class NetworkDriver: """ 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 configuration of the device is replaced with the new configuration. """ raise NotImplementedError + def discard_config(self): + """ + Discards the configuration loaded into the candidate. + """ + raise NotImplementedError + def rollback(self): """ If changes have been made, revert changes to the original state. diff --git a/drivers/eos.py b/drivers/eos.py index 53a64b3..8df19a5 100644 --- a/drivers/eos.py +++ b/drivers/eos.py @@ -59,9 +59,12 @@ class EOSDriver(NetworkDriver): def compare_config(self): return self.device.compare_config() - def replace_config(self): + def commit_config(self): self.device.replace_config() + def discard_config(self): + pass + def rollback(self): self.device.rollback() diff --git a/drivers/junos.py b/drivers/junos.py new file mode 100644 index 0000000..e69de29