From b9764eefc17528eada409829149afa7b010adfbd Mon Sep 17 00:00:00 2001 From: Sietse Snel Date: Thu, 18 Apr 2024 13:56:57 +0200 Subject: [PATCH] importgroups: update check existing groups Update status codes that reflect that a group already exists, based on tests on Yoda 1.10 (development version). --- CHANGELOG.md | 1 + yclienttools/importgroups.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index bffa869..4dfac4f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,7 @@ - Fix regression that broke the ensuremembers tool - Ensuremembers: add message in verbose mode that confirms validation checks passed +- Importgroups: update check existing groups in update mode for Yoda 1.10 ## 2024-04-08 v1.1.0 diff --git a/yclienttools/importgroups.py b/yclienttools/importgroups.py index 1e7b919..5c3c794 100644 --- a/yclienttools/importgroups.py +++ b/yclienttools/importgroups.py @@ -231,7 +231,7 @@ def apply_data(rule_interface, args, data): [status, msg] = rule_interface.call_uuGroupAdd( groupname, category, subcategory, '', 'unspecified', schema_id, expiration_date) - if ((status == '-1089000') | (status == '-809000')) and args.allow_update: + if ((status in '-1089000', '-809000', '-806000')) and args.allow_update: print( 'WARNING: group "{}" not created, it already exists'.format(groupname)) if schema_id != '':