pcs/SOURCES/bz1998454-01-fix-creating-resources-with-depth-operation-attribut.patch
2021-11-11 08:21:38 +00:00

46 lines
1.3 KiB
Diff

From 189c73e31f5033413fc4483e40d0bfc78d77f962 Mon Sep 17 00:00:00 2001
From: Tomas Jelinek <tojeline@redhat.com>
Date: Fri, 27 Aug 2021 12:05:18 +0200
Subject: [PATCH 1/2] fix creating resources with depth operation attribute
---
CHANGELOG.md | 9 +++++++++
pcs/lib/cib/resource/operations.py | 2 +-
2 files changed, 10 insertions(+), 1 deletion(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index f768cc36..c15546ba 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,14 @@
# Change Log
+## [Unreleased]
+
+### Fixed
+- Fixed an error when creating a resource which defines 'depth' attribute for
+ its operations ([rhbz#1998454])
+
+[rhbz#1998454]: https://bugzilla.redhat.com/show_bug.cgi?id=1998454
+
+
## [0.10.10] - 2021-08-19
### Added
diff --git a/pcs/lib/cib/resource/operations.py b/pcs/lib/cib/resource/operations.py
index 390db71a..44b2e7dd 100644
--- a/pcs/lib/cib/resource/operations.py
+++ b/pcs/lib/cib/resource/operations.py
@@ -197,7 +197,7 @@ def _action_dto_to_dict(
) -> Dict[str, str]:
result = dict(
filter(
- lambda item: item[0] != "deph" and item[1] not in (None, ""),
+ lambda item: item[0] != "depth" and item[1] not in (None, ""),
to_dict(dto).items(),
)
)
--
2.31.1