diff --git a/napalm/junos/junos.py b/napalm/junos/junos.py index 48cb81e3a..a8ce51b98 100644 --- a/napalm/junos/junos.py +++ b/napalm/junos/junos.py @@ -283,12 +283,16 @@ def commit_config(self, message=""): self.device.cu.commit(ignore_warning=self.ignore_warning, **commit_args) if not self.lock_disable and not self.session_config_lock: self._unlock() + if self.config_private: + self.device.rpc.close_configuration() def discard_config(self): """Discard changes (rollback 0).""" self.device.cu.rollback(rb_id=0) if not self.lock_disable and not self.session_config_lock: self._unlock() + if self.config_private: + self.device.rpc.close_configuration() def rollback(self): """Rollback to previous commit."""