diff --git a/lib/jnpr/junos/utils/config.py b/lib/jnpr/junos/utils/config.py index b12ed5aa9..e6d7efbe8 100644 --- a/lib/jnpr/junos/utils/config.py +++ b/lib/jnpr/junos/utils/config.py @@ -208,7 +208,7 @@ def commit_check(self): # show | compare rollback # ------------------------------------------------------------------------- - def diff(self, rb_id=0): + def diff(self, rb_id=0, ignore_warning=False): """ Retrieve a diff (patch-format) report of the candidate config against either the current active config, or a different rollback. @@ -224,9 +224,9 @@ def diff(self, rb_id=0): raise ValueError("Invalid rollback #" + str(rb_id)) try: - rsp = self.rpc.get_configuration(dict( - compare='rollback', rollback=str(rb_id), format='text' - )) + rsp = self.rpc.get_configuration( + dict(compare='rollback', rollback=str(rb_id), format='text'), + ignore_warning=ignore_warning) except RpcTimeoutError: raise except RpcError as err: diff --git a/tests/unit/utils/test_config.py b/tests/unit/utils/test_config.py index c258b1a2c..fda25f3db 100644 --- a/tests/unit/utils/test_config.py +++ b/tests/unit/utils/test_config.py @@ -184,7 +184,8 @@ def test_config_diff(self): self.conf.diff() self.conf.rpc.get_configuration.\ assert_called_with( - {'compare': 'rollback', 'rollback': '0', 'format': 'text'}) + {'compare': 'rollback', 'rollback': '0', 'format': 'text'}, + ignore_warning=False) def test_config_diff_exception_severity_warning(self): rpc_xml = '''