mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-01 20:50:23 -07:00
eos_config: Fix test issues (#56180)
* Alter tests to pass * Change diff_against to make changed work again * Add another diff_against * Expose supports_sessions across all EOS connection types * Change session warning to failure * supports_sessions needs to be a method to survive the rpc boundary * Alter tests to match
This commit is contained in:
parent
a7bf728555
commit
0bead3672f
6 changed files with 109 additions and 69 deletions
|
@ -48,7 +48,6 @@ class HttpApi(HttpApiBase):
|
|||
self._device_info = None
|
||||
self._session_support = None
|
||||
|
||||
@property
|
||||
def supports_sessions(self):
|
||||
use_session = self.get_option('eos_use_sessions')
|
||||
try:
|
||||
|
@ -119,16 +118,16 @@ class HttpApi(HttpApiBase):
|
|||
def get_device_operations(self):
|
||||
return {
|
||||
'supports_diff_replace': True,
|
||||
'supports_commit': bool(self.supports_sessions),
|
||||
'supports_commit': bool(self.supports_sessions()),
|
||||
'supports_rollback': False,
|
||||
'supports_defaults': False,
|
||||
'supports_onbox_diff': bool(self.supports_sessions),
|
||||
'supports_onbox_diff': bool(self.supports_sessions()),
|
||||
'supports_commit_comment': False,
|
||||
'supports_multiline_delimiter': False,
|
||||
'supports_diff_match': True,
|
||||
'supports_diff_ignore_lines': True,
|
||||
'supports_generate_diff': not bool(self.supports_sessions),
|
||||
'supports_replace': bool(self.supports_sessions),
|
||||
'supports_generate_diff': not bool(self.supports_sessions()),
|
||||
'supports_replace': bool(self.supports_sessions()),
|
||||
}
|
||||
|
||||
def get_capabilities(self):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue