mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-06 21:32:49 +00:00
vyos interfacefix and test cases (#57169)
Signed-off-by: rohitthakur2590 <rohitthakur2590@outlook.com>
This commit is contained in:
@@ -204,6 +204,8 @@ def map_obj_to_commands(updates):
|
||||
value = w.get(item)
|
||||
|
||||
if value and value != obj_in_have.get(item):
|
||||
if item == 'description':
|
||||
value = "\'" + str(value) + "\'"
|
||||
commands.append(set_interface + ' ' + item + ' ' + str(value))
|
||||
|
||||
if disable and not obj_in_have.get('disable', False):
|
||||
@@ -215,6 +217,8 @@ def map_obj_to_commands(updates):
|
||||
for item in params:
|
||||
value = w.get(item)
|
||||
if value:
|
||||
if item == 'description':
|
||||
value = "\'" + str(value) + "\'"
|
||||
commands.append(set_interface + ' ' + item + ' ' + str(value))
|
||||
|
||||
if disable:
|
||||
@@ -244,7 +248,7 @@ def map_config_to_obj(module):
|
||||
if match:
|
||||
param = match.group(1)
|
||||
if param == 'description':
|
||||
match = re.search(r'description (\S+)', line, re.M)
|
||||
match = re.search(r'description (.+)', line, re.M)
|
||||
description = match.group(1).strip("'")
|
||||
interface['description'] = description
|
||||
elif param == 'speed':
|
||||
|
||||
Reference in New Issue
Block a user