[389-ds-base] branch 389-ds-base-1.3.9 updated: Ticket 50062 - Replace error by warning in the state machine defined in repl5_inc_run
by git repository hosting
This is an automated email from the git hooks/post-receive script.
mreynolds pushed a commit to branch 389-ds-base-1.3.9
in repository 389-ds-base.
The following commit(s) were added to refs/heads/389-ds-base-1.3.9 by this push:
new 181ff36 Ticket 50062 - Replace error by warning in the state machine defined in repl5_inc_run
181ff36 is described below
commit 181ff36ec5bdafadf075c1cb1ebb217740273293
Author: Mark Reynolds <mreynolds(a)redhat.com>
AuthorDate: Fri Nov 30 10:48:35 2018 -0500
Ticket 50062 - Replace error by warning in the state machine defined in repl5_inc_run
Description: Replace error log severity message from ERR to WARNING
https://pagure.io/389-ds-base/issue/50062
Reviewed by: mreynolds(one line commit rule)
(cherry picked from commit bae33f97c05932c95225beb2dd2b6f76c1970bef)
---
ldap/servers/plugins/replication/repl5_inc_protocol.c | 2 +-
ldap/servers/plugins/replication/windows_inc_protocol.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/ldap/servers/plugins/replication/repl5_inc_protocol.c b/ldap/servers/plugins/replication/repl5_inc_protocol.c
index 5cd4941..2aefb79 100644
--- a/ldap/servers/plugins/replication/repl5_inc_protocol.c
+++ b/ldap/servers/plugins/replication/repl5_inc_protocol.c
@@ -717,7 +717,7 @@ repl5_inc_run(Private_Repl_Protocol *prp)
} else if ((e1 = event_occurred(prp, EVENT_WINDOW_CLOSED)) ||
event_occurred(prp, EVENT_BACKOFF_EXPIRED)) {
/* this events - should not occur - log a warning and go to sleep */
- slapi_log_err(SLAPI_LOG_ERR, repl_plugin_name,
+ slapi_log_err(SLAPI_LOG_WARNING, repl_plugin_name,
"repl5_inc_run - %s: "
"Event %s should not occur in state %s; going to sleep\n",
agmt_get_long_name(prp->agmt), e1 ? event2name(EVENT_WINDOW_CLOSED) : event2name(EVENT_BACKOFF_EXPIRED), state2name(current_state));
diff --git a/ldap/servers/plugins/replication/windows_inc_protocol.c b/ldap/servers/plugins/replication/windows_inc_protocol.c
index 871a768..853467e 100644
--- a/ldap/servers/plugins/replication/windows_inc_protocol.c
+++ b/ldap/servers/plugins/replication/windows_inc_protocol.c
@@ -364,7 +364,7 @@ windows_inc_run(Private_Repl_Protocol *prp)
} else if ((e1 = event_occurred(prp, EVENT_WINDOW_CLOSED)) ||
event_occurred(prp, EVENT_BACKOFF_EXPIRED)) {
/* this events - should not occur - log a warning and go to sleep */
- slapi_log_err(SLAPI_LOG_ERR, windows_repl_plugin_name,
+ slapi_log_err(SLAPI_LOG_WARNING, windows_repl_plugin_name,
"windows_inc_run - %s: "
"Event %s should not occur in state %s; going to sleep\n",
agmt_get_long_name(prp->agmt),
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
5 years
[389-ds-base] branch master updated: Ticket 50062 - Replace error by warning in the state machine defined in repl5_inc_run
by git repository hosting
This is an automated email from the git hooks/post-receive script.
mreynolds pushed a commit to branch master
in repository 389-ds-base.
The following commit(s) were added to refs/heads/master by this push:
new bae33f9 Ticket 50062 - Replace error by warning in the state machine defined in repl5_inc_run
bae33f9 is described below
commit bae33f97c05932c95225beb2dd2b6f76c1970bef
Author: Mark Reynolds <mreynolds(a)redhat.com>
AuthorDate: Fri Nov 30 10:48:35 2018 -0500
Ticket 50062 - Replace error by warning in the state machine defined in repl5_inc_run
Description: Replace error log severity message from ERR to WARNING
https://pagure.io/389-ds-base/issue/50062
Reviewed by: mreynolds(one line commit rule)
---
ldap/servers/plugins/replication/repl5_inc_protocol.c | 2 +-
ldap/servers/plugins/replication/windows_inc_protocol.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/ldap/servers/plugins/replication/repl5_inc_protocol.c b/ldap/servers/plugins/replication/repl5_inc_protocol.c
index 5cd4941..2aefb79 100644
--- a/ldap/servers/plugins/replication/repl5_inc_protocol.c
+++ b/ldap/servers/plugins/replication/repl5_inc_protocol.c
@@ -717,7 +717,7 @@ repl5_inc_run(Private_Repl_Protocol *prp)
} else if ((e1 = event_occurred(prp, EVENT_WINDOW_CLOSED)) ||
event_occurred(prp, EVENT_BACKOFF_EXPIRED)) {
/* this events - should not occur - log a warning and go to sleep */
- slapi_log_err(SLAPI_LOG_ERR, repl_plugin_name,
+ slapi_log_err(SLAPI_LOG_WARNING, repl_plugin_name,
"repl5_inc_run - %s: "
"Event %s should not occur in state %s; going to sleep\n",
agmt_get_long_name(prp->agmt), e1 ? event2name(EVENT_WINDOW_CLOSED) : event2name(EVENT_BACKOFF_EXPIRED), state2name(current_state));
diff --git a/ldap/servers/plugins/replication/windows_inc_protocol.c b/ldap/servers/plugins/replication/windows_inc_protocol.c
index 871a768..853467e 100644
--- a/ldap/servers/plugins/replication/windows_inc_protocol.c
+++ b/ldap/servers/plugins/replication/windows_inc_protocol.c
@@ -364,7 +364,7 @@ windows_inc_run(Private_Repl_Protocol *prp)
} else if ((e1 = event_occurred(prp, EVENT_WINDOW_CLOSED)) ||
event_occurred(prp, EVENT_BACKOFF_EXPIRED)) {
/* this events - should not occur - log a warning and go to sleep */
- slapi_log_err(SLAPI_LOG_ERR, windows_repl_plugin_name,
+ slapi_log_err(SLAPI_LOG_WARNING, windows_repl_plugin_name,
"windows_inc_run - %s: "
"Event %s should not occur in state %s; going to sleep\n",
agmt_get_long_name(prp->agmt),
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
5 years
[389-ds-base] branch 389-ds-base-1.3.9 updated: Ticket 50028 - Update ds-replcheck usage for password options
by git repository hosting
This is an automated email from the git hooks/post-receive script.
mreynolds pushed a commit to branch 389-ds-base-1.3.9
in repository 389-ds-base.
The following commit(s) were added to refs/heads/389-ds-base-1.3.9 by this push:
new d808e3d Ticket 50028 - Update ds-replcheck usage for password options
d808e3d is described below
commit d808e3d68718a26166132f8ce7f99a77f548897c
Author: Mark Reynolds <mreynolds(a)redhat.com>
AuthorDate: Fri Nov 30 10:21:04 2018 -0500
Ticket 50028 - Update ds-replcheck usage for password options
Description: Update usage for password file, and ignore tombstones from
the missing entry stats
https://pagure.io/389-ds-base/issue/50028
Reviedwed by: spichugi(Thanks!)
---
ldap/admin/src/scripts/ds-replcheck | 43 +++++++++++++++++++++++++++++++------
1 file changed, 36 insertions(+), 7 deletions(-)
diff --git a/ldap/admin/src/scripts/ds-replcheck b/ldap/admin/src/scripts/ds-replcheck
index 5c195f9..f482406 100755
--- a/ldap/admin/src/scripts/ds-replcheck
+++ b/ldap/admin/src/scripts/ds-replcheck
@@ -117,8 +117,15 @@ def convert_entries(entries):
it must be skipped
'''
continue
- if ('nsds5replconflict' in new_entry.data and 'nsTombstone' not in new_entry.data['objectclass'] and
- 'nstombstone' not in new_entry.data['objectclass']):
+
+ # lowercase all the objectclass values (easier for tombstone checking)
+ oc_vals = new_entry.data['objectclass']
+ new_oc_vals = []
+ for val in oc_vals:
+ new_oc_vals.append(val.lower())
+ new_entry.data['objectclass'] = new_oc_vals
+
+ if ('nsds5replconflict' in new_entry.data and 'nstombstone' not in new_entry.data['objectclass']):
# This is a conflict entry that is NOT a tombstone entry (should this be reconsidered?)
conflict_entries.append(new_entry)
if 'glue' in new_entry.data['objectclass']:
@@ -638,9 +645,11 @@ def do_offline_report(opts, output_file=None):
if mresult['tombstone']:
mtombstones += 1
- # continue
if rresult['tombstone']:
rtombstones += 1
+ if mresult['tombstone'] or rresult['tombstone']:
+ # skip over tombstones
+ continue
if mresult['conflict'] is not None or rresult['conflict'] is not None:
# If either entry is a conflict we still process it here
@@ -690,7 +699,7 @@ def do_offline_report(opts, output_file=None):
mresult = ldif_search(MLDIF, dn)
if rresult['tombstone']:
rtombstones += 1
- # continue
+ continue
if rresult['conflict'] is not None:
rconflicts.append(rresult['conflict'])
@@ -769,9 +778,12 @@ def check_for_diffs(mentries, mglue, rentries, rglue, report, opts):
rentries += report['m_missing']
for mentry in mentries:
+ if 'nstombstone' in mentry.data['objectclass']:
+ # Ignore tombstones
+ continue
rentry = get_entry(rentries, mentry.dn)
if rentry:
- if 'nsTombstone' not in rentry.data['objectclass'] and 'nstombstone' not in rentry.data['objectclass']:
+ if 'nstombstone' not in rentry.data['objectclass'] and 'nstombstone' not in rentry.data['objectclass']:
diff = cmp_entry(mentry, rentry, opts)
if diff:
diff_report.append(format_diff(diff))
@@ -788,6 +800,9 @@ def check_for_diffs(mentries, mglue, rentries, rglue, report, opts):
for rentry in rentries:
# We should not have any entries if we are sync
+ if 'nstombstone' in rentry.data['objectclass']:
+ # Ignore tombstones
+ continue
mentry = get_entry(mglue, rentry.dn)
if mentry is None:
m_missing.append(rentry)
@@ -1159,6 +1174,7 @@ def main():
parser.add_argument('-D', '--binddn', help='The Bind DN', dest='binddn', default=None)
parser.add_argument('-w', '--bindpw', help='The Bind password', dest='bindpw', default=None)
parser.add_argument('-W', '--prompt', help='Prompt for the bind password', action='store_true', dest='prompt', default=False)
+ parser.add_argument('-y', '--pass-file', help='A text file contained the clear text password for the bind dn', dest='pass_file', default=None)
parser.add_argument('-m', '--master_url', help='The LDAP URL for the Master server (REQUIRED)',
dest='murl', default=None)
parser.add_argument('-r', '--replica_url', help='The LDAP URL for the Replica server (REQUIRED)',
@@ -1292,8 +1308,21 @@ def main():
print("Can't open file: " + args.file)
exit(1)
- if args.prompt:
- opts['bindpw'] = getpass.getpass('Enter password:')
+ # Get the password from a file or by prompting
+ if args.pass_file:
+ # Read password from file
+ try:
+ with open(args.pass_file, "r") as f:
+ opts['bindpw'] = f.readline().rstrip()
+ f.close()
+ except EnvironmentError as e:
+ print("Failed to open password file: " + str(e))
+ sys.exit(1)
+ elif args.prompt or args.bindpw is None:
+ # prompt for password
+ opts['bindpw'] = getpass.getpass('Enter password: ')
+
+
if opts['mldif'] is not None and opts['rldif'] is not None:
print ("Performing offline report...")
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
5 years
[389-ds-base] branch master updated (3fe4b5b -> b844aab)
by git repository hosting
This is an automated email from the git hooks/post-receive script.
spichugi pushed a change to branch master
in repository 389-ds-base.
from 3fe4b5b Ticket 50028 - Revise ds-replcheck usage
add b844aab Issue 50041 - Set the React dataflow foundation and add basic plugin UI
No new revisions were added by this update.
Summary of changes:
src/cockpit/389-console/.eslintrc.json | 1 +
src/cockpit/389-console/src/banner.html | 1 -
src/cockpit/389-console/src/css/ds.css | 1567 ++++++++++----------
src/cockpit/389-console/src/ds.js | 14 +-
src/cockpit/389-console/src/index.es6 | 30 +-
.../389-console/src/lib/customTableToolbar.jsx | 61 +
src/cockpit/389-console/src/lib/notifications.jsx | 44 +
.../389-console/src/lib/plugins/pluginModal.jsx | 220 +++
.../389-console/src/lib/plugins/pluginTable.jsx | 376 +++++
src/cockpit/389-console/src/lib/tools.jsx | 58 +
src/cockpit/389-console/src/plugins.jsx | 187 ++-
src/cockpit/389-console/src/plugins.scss | 3 -
src/cockpit/389-console/src/servers.js | 107 +-
src/lib389/lib389/cli_conf/plugin.py | 76 +-
14 files changed, 1888 insertions(+), 857 deletions(-)
create mode 100644 src/cockpit/389-console/src/lib/customTableToolbar.jsx
create mode 100644 src/cockpit/389-console/src/lib/notifications.jsx
create mode 100644 src/cockpit/389-console/src/lib/plugins/pluginModal.jsx
create mode 100644 src/cockpit/389-console/src/lib/plugins/pluginTable.jsx
create mode 100644 src/cockpit/389-console/src/lib/tools.jsx
delete mode 100644 src/cockpit/389-console/src/plugins.scss
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
5 years
[389-ds-base] branch master updated (b646e4d -> 3fe4b5b)
by git repository hosting
This is an automated email from the git hooks/post-receive script.
mreynolds pushed a change to branch master
in repository 389-ds-base.
from b646e4d Pass argument into hashtable_new
add 3fe4b5b Ticket 50028 - Revise ds-replcheck usage
No new revisions were added by this update.
Summary of changes:
.../tests/suites/ds_tools/replcheck_test.py | 44 +-
ldap/admin/src/scripts/ds-replcheck | 755 ++++++++++++++-------
man/man1/ds-replcheck.1 | 196 ++++--
3 files changed, 666 insertions(+), 329 deletions(-)
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
5 years
[389-ds-base] branch 389-ds-base-1.3.7 updated: Pass argument into hashtable_new
by git repository hosting
This is an automated email from the git hooks/post-receive script.
mreynolds pushed a commit to branch 389-ds-base-1.3.7
in repository 389-ds-base.
The following commit(s) were added to refs/heads/389-ds-base-1.3.7 by this push:
new 1b193a1 Pass argument into hashtable_new
1b193a1 is described below
commit 1b193a1e97aaf0ab36ba819111239a7f71ef157c
Author: Stanislav Levin <slev(a)altlinux.org>
AuthorDate: Wed Nov 28 12:49:07 2018 +0300
Pass argument into hashtable_new
@8915d8d87 and @4471b7350 modified "usetxn" parameter in
"hashtable_new" scope (was a global variable before).
But the callers of this function don't pass argument into.
Thus, "usetxn" acts as an uninitialized auto variable.
Fixes: https://pagure.io/389-ds-base/issue/50057
---
ldap/servers/plugins/memberof/memberof.h | 2 +-
ldap/servers/plugins/memberof/memberof_config.c | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/ldap/servers/plugins/memberof/memberof.h b/ldap/servers/plugins/memberof/memberof.h
index cf02845..f049d38 100644
--- a/ldap/servers/plugins/memberof/memberof.h
+++ b/ldap/servers/plugins/memberof/memberof.h
@@ -102,7 +102,7 @@ void *memberof_get_plugin_id(void);
void memberof_release_config(void);
PRUint64 get_plugin_started(void);
void ancestor_hashtable_entry_free(memberof_cached_value *entry);
-PLHashTable *hashtable_new();
+PLHashTable *hashtable_new(int usetxn);
int memberof_use_txn();
#endif /* _MEMBEROF_H_ */
diff --git a/ldap/servers/plugins/memberof/memberof_config.c b/ldap/servers/plugins/memberof/memberof_config.c
index 8a27f52..04d5924 100644
--- a/ldap/servers/plugins/memberof/memberof_config.c
+++ b/ldap/servers/plugins/memberof/memberof_config.c
@@ -698,8 +698,8 @@ memberof_copy_config(MemberOfConfig *dest, MemberOfConfig *src)
/* Allocate our caches here since we only copy the config at the start of an op */
if (memberof_use_txn() == 1){
- dest->ancestors_cache = hashtable_new();
- dest->fixup_cache = hashtable_new();
+ dest->ancestors_cache = hashtable_new(1);
+ dest->fixup_cache = hashtable_new(1);
}
/* Check if the copy is already up to date */
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
5 years
[389-ds-base] branch 389-ds-base-1.3.8 updated: Pass argument into hashtable_new
by git repository hosting
This is an automated email from the git hooks/post-receive script.
mreynolds pushed a commit to branch 389-ds-base-1.3.8
in repository 389-ds-base.
The following commit(s) were added to refs/heads/389-ds-base-1.3.8 by this push:
new 87aed55 Pass argument into hashtable_new
87aed55 is described below
commit 87aed55eeeb9979760ed0414f0711349fa48fd3f
Author: Stanislav Levin <slev(a)altlinux.org>
AuthorDate: Wed Nov 28 12:49:07 2018 +0300
Pass argument into hashtable_new
@8915d8d87 and @4471b7350 modified "usetxn" parameter in
"hashtable_new" scope (was a global variable before).
But the callers of this function don't pass argument into.
Thus, "usetxn" acts as an uninitialized auto variable.
Fixes: https://pagure.io/389-ds-base/issue/50057
---
ldap/servers/plugins/memberof/memberof.h | 2 +-
ldap/servers/plugins/memberof/memberof_config.c | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/ldap/servers/plugins/memberof/memberof.h b/ldap/servers/plugins/memberof/memberof.h
index cf02845..f049d38 100644
--- a/ldap/servers/plugins/memberof/memberof.h
+++ b/ldap/servers/plugins/memberof/memberof.h
@@ -102,7 +102,7 @@ void *memberof_get_plugin_id(void);
void memberof_release_config(void);
PRUint64 get_plugin_started(void);
void ancestor_hashtable_entry_free(memberof_cached_value *entry);
-PLHashTable *hashtable_new();
+PLHashTable *hashtable_new(int usetxn);
int memberof_use_txn();
#endif /* _MEMBEROF_H_ */
diff --git a/ldap/servers/plugins/memberof/memberof_config.c b/ldap/servers/plugins/memberof/memberof_config.c
index 8a27f52..04d5924 100644
--- a/ldap/servers/plugins/memberof/memberof_config.c
+++ b/ldap/servers/plugins/memberof/memberof_config.c
@@ -698,8 +698,8 @@ memberof_copy_config(MemberOfConfig *dest, MemberOfConfig *src)
/* Allocate our caches here since we only copy the config at the start of an op */
if (memberof_use_txn() == 1){
- dest->ancestors_cache = hashtable_new();
- dest->fixup_cache = hashtable_new();
+ dest->ancestors_cache = hashtable_new(1);
+ dest->fixup_cache = hashtable_new(1);
}
/* Check if the copy is already up to date */
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
5 years
[389-ds-base] branch master updated: Pass argument into hashtable_new
by git repository hosting
This is an automated email from the git hooks/post-receive script.
mreynolds pushed a commit to branch master
in repository 389-ds-base.
The following commit(s) were added to refs/heads/master by this push:
new b646e4d Pass argument into hashtable_new
b646e4d is described below
commit b646e4dafe63ea7a4bb471b1fbb06a031c9499a2
Author: Stanislav Levin <slev(a)altlinux.org>
AuthorDate: Wed Nov 28 12:49:07 2018 +0300
Pass argument into hashtable_new
@8915d8d87 and @4471b7350 modified "usetxn" parameter in
"hashtable_new" scope (was a global variable before).
But the callers of this function don't pass argument into.
Thus, "usetxn" acts as an uninitialized auto variable.
Fixes: https://pagure.io/389-ds-base/issue/50057
---
ldap/servers/plugins/memberof/memberof.h | 2 +-
ldap/servers/plugins/memberof/memberof_config.c | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/ldap/servers/plugins/memberof/memberof.h b/ldap/servers/plugins/memberof/memberof.h
index cf02845..f049d38 100644
--- a/ldap/servers/plugins/memberof/memberof.h
+++ b/ldap/servers/plugins/memberof/memberof.h
@@ -102,7 +102,7 @@ void *memberof_get_plugin_id(void);
void memberof_release_config(void);
PRUint64 get_plugin_started(void);
void ancestor_hashtable_entry_free(memberof_cached_value *entry);
-PLHashTable *hashtable_new();
+PLHashTable *hashtable_new(int usetxn);
int memberof_use_txn();
#endif /* _MEMBEROF_H_ */
diff --git a/ldap/servers/plugins/memberof/memberof_config.c b/ldap/servers/plugins/memberof/memberof_config.c
index f081391..89fd012 100644
--- a/ldap/servers/plugins/memberof/memberof_config.c
+++ b/ldap/servers/plugins/memberof/memberof_config.c
@@ -698,8 +698,8 @@ memberof_copy_config(MemberOfConfig *dest, MemberOfConfig *src)
/* Allocate our caches here since we only copy the config at the start of an op */
if (memberof_use_txn() == 1){
- dest->ancestors_cache = hashtable_new();
- dest->fixup_cache = hashtable_new();
+ dest->ancestors_cache = hashtable_new(1);
+ dest->fixup_cache = hashtable_new(1);
}
/* Check if the copy is already up to date */
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
5 years
[389-ds-base] branch 389-ds-base-1.3.9 updated (ac500d3 -> 851fcf8)
by git repository hosting
This is an automated email from the git hooks/post-receive script.
mreynolds pushed a change to branch 389-ds-base-1.3.9
in repository 389-ds-base.
from ac500d3 Ticket 49950 - PassSync not setting pwdLastSet attribute in Active Directory after Pw update from LDAP sync for normal user
add 851fcf8 Pass argument into hashtable_new
No new revisions were added by this update.
Summary of changes:
ldap/servers/plugins/memberof/memberof.h | 2 +-
ldap/servers/plugins/memberof/memberof_config.c | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
5 years
[389-ds-base] branch master updated: Ticket 50053 - improve testcase
by git repository hosting
This is an automated email from the git hooks/post-receive script.
tbordaz pushed a commit to branch master
in repository 389-ds-base.
The following commit(s) were added to refs/heads/master by this push:
new f2ff28e Ticket 50053 - improve testcase
f2ff28e is described below
commit f2ff28e027dabccc92b43e079f90f5f86c4d8332
Author: Thierry Bordaz <tbordaz(a)redhat.com>
AuthorDate: Wed Nov 28 17:50:11 2018 +0100
Ticket 50053 - improve testcase
---
dirsrvtests/tests/suites/plugins/cos_test.py | 75 ++++++++++++++++++----------
1 file changed, 50 insertions(+), 25 deletions(-)
diff --git a/dirsrvtests/tests/suites/plugins/cos_test.py b/dirsrvtests/tests/suites/plugins/cos_test.py
index a0551b9..c624e8f 100644
--- a/dirsrvtests/tests/suites/plugins/cos_test.py
+++ b/dirsrvtests/tests/suites/plugins/cos_test.py
@@ -29,7 +29,8 @@ def add_user(server, uid, testbase, locality=None, tel=None, title=None):
'uid': uid,
'l': locality,
'title': title,
- 'telephoneNumber': tel})))
+ 'telephoneNumber': tel,
+ 'description': 'description real'})))
@pytest.mark.ds50053
def test_cos_operational_default(topo):
@@ -123,7 +124,9 @@ def test_cos_operational_default(topo):
'cosAttribute': 'description override'})))
# title cos override
- TITLE_VIRT = "title is %s" % VIRTUAL
+ TITLE_VIRT = []
+ for i in range(2):
+ TITLE_VIRT.append("title is %s %d" % (VIRTUAL, i))
TITLE_COS_TEMPLATE = "cn=title_template,%s" % PEOPLE
TITLE_COS_DEFINITION = "cn=title_definition,%s" % PEOPLE
inst.add_s(Entry((TITLE_COS_TEMPLATE, {
@@ -142,52 +145,74 @@ def test_cos_operational_default(topo):
assert len(ents) == 1
ent = ents[0]
- # Check telephonenumber (specifier default)
+ # Check telephonenumber (specifier default) with real value => real
assert ent.hasAttr('telephonenumber')
value = ent.getValue('telephonenumber')
- log.info('Returned telephonenumber: %s' % value)
+ log.info('Returned telephonenumber (exp. real): %s' % value)
log.info('Returned telephonenumber: %d' % value.find(REAL.encode()))
assert value.find(REAL.encode()) != -1
- # Check 'locality' (specifier operational-default)
+ # Check 'locality' (specifier operational-default) with real value => real
assert ent.hasAttr('l')
value = ent.getValue('l')
- log.info('Returned l: %s' % value)
+ log.info('Returned l (exp. real): %s ' % value)
log.info('Returned l: %d' % value.find(REAL.encode()))
assert value.find(REAL.encode()) != -1
- # Check 'seealso' (specifier operational)
+ # Check 'seealso' (specifier operational) without real value => virtual
assert not ent.hasAttr('seealso')
ents = inst.search_s(SUFFIX, ldap.SCOPE_SUBTREE, "uid=user_0", ["seealso"])
assert len(ents) == 1
ent = ents[0]
value = ent.getValue('seealso')
- log.info('Returned seealso: %s' % value)
+ log.info('Returned seealso (exp. virtual): %s' % value)
log.info('Returned seealso: %d' % value.find(VIRTUAL.encode()))
assert value.find(VIRTUAL.encode()) != -1
- # Check 'description' (specifier override)
+ # Check 'description' (specifier override) with real value => virtual
assert not ent.hasAttr('description')
ents = inst.search_s(SUFFIX, ldap.SCOPE_SUBTREE, "uid=user_0")
assert len(ents) == 1
ent = ents[0]
value = ent.getValue('description')
- log.info('Returned description: %s' % value)
+ log.info('Returned description (exp. virtual): %s' % value)
log.info('Returned description: %d' % value.find(VIRTUAL.encode()))
assert value.find(VIRTUAL.encode()) != -1
- # Check 'title' (specifier merge-schemes)
- # commented because it does not work need to open a new ticket
-# ents = inst.search_s(SUFFIX, ldap.SCOPE_SUBTREE, "uid=user_0")
-# assert len(ents) == 1
-# ent = ents[0]
-# found_real = False
-# found_virtual = False
-# for value in ent.getValues('title'):
-# log.info('Returned title: %s' % value)
-# if value.find(VIRTUAL.encode()) != -1:
-# found_virtual = True
-# if value.find(REAL.encode()) != -1:
-# found_real = True
-# assert found_virtual
-# assert found_real
\ No newline at end of file
+ # Check 'title' (specifier merge-schemes) with real value => real value returned
+ ents = inst.search_s(SUFFIX, ldap.SCOPE_SUBTREE, "uid=user_0")
+ assert len(ents) == 1
+ ent = ents[0]
+ found_real = False
+ found_virtual = False
+ for value in ent.getValues('title'):
+ log.info('Returned title (exp. real): %s' % value)
+ if value.find(VIRTUAL.encode()) != -1:
+ found_virtual = True
+ if value.find(REAL.encode()) != -1:
+ found_real = True
+ assert not found_virtual
+ assert found_real
+
+ # Check 'title ((specifier merge-schemes) without real value => real value returned
+ ents = inst.search_s(SUFFIX, ldap.SCOPE_SUBTREE, "uid=user_0")
+ assert len(ents) == 1
+ inst.modify_s(ents[0].dn,[(ldap.MOD_DELETE, 'title', None)])
+
+ inst.restart()
+ ents = inst.search_s(SUFFIX, ldap.SCOPE_SUBTREE, "uid=user_0")
+ assert len(ents) == 1
+ ent = ents[0]
+ found_real = False
+ found_virtual = False
+ count = 0
+ for value in ent.getValues('title'):
+ log.info('Returned title(exp. virt): %s' % value)
+ count = count + 1
+ if value.find(VIRTUAL.encode()) != -1:
+ found_virtual = True
+ if value.find(REAL.encode()) != -1:
+ found_real = True
+ assert not found_real
+ assert found_virtual
+ assert count == 2
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
5 years