From f34881d28131e13b6d99bc9a0f00c59d6d76ac3f Mon Sep 17 00:00:00 2001 From: lonely123 <30589800+lonely123@users.noreply.github.com> Date: Tue, 7 Dec 2021 09:40:58 +0800 Subject: [PATCH] cloudengine: Modify the bug in the query configuration method (#56) * ce_rollback * ce_rollback/changelog * rollback --- .../fragments/56-ce_modify_query_configuration_method.yml | 2 ++ plugins/modules/network/cloudengine/ce_rollback.py | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) create mode 100644 changelogs/fragments/56-ce_modify_query_configuration_method.yml diff --git a/changelogs/fragments/56-ce_modify_query_configuration_method.yml b/changelogs/fragments/56-ce_modify_query_configuration_method.yml new file mode 100644 index 00000000..8518cf7a --- /dev/null +++ b/changelogs/fragments/56-ce_modify_query_configuration_method.yml @@ -0,0 +1,2 @@ +bugfixes: +- "ce - Modify the bug in the query configuration method (https://github.com/ansible-collections/community.network/pull/56)." diff --git a/plugins/modules/network/cloudengine/ce_rollback.py b/plugins/modules/network/cloudengine/ce_rollback.py index 75d82a3e..d3a63cff 100644 --- a/plugins/modules/network/cloudengine/ce_rollback.py +++ b/plugins/modules/network/cloudengine/ce_rollback.py @@ -218,7 +218,7 @@ def get_rollback_dict(self): for cfg in cfg_line: if re.findall(r'^\d', cfg): pre_rollback_info = cfg.split() - rollback_info["RollBackInfos"].append(dict(commitId=pre_rollback_info[1], userLabel=pre_rollback_info[2])) + rollback_info["RollBackInfos"].append(dict(commitId=pre_rollback_info[1].replace('*', ''), userLabel=pre_rollback_info[2])) return rollback_info