Re: [Freeipa-devel] [PATCH 0001] Test Topology plugin is listed among DS plugins

2015-07-27 Thread Martin Basti

On 23/07/15 16:27, Martin Basti wrote:

On 23/07/15 11:42, Oleg Fayans wrote:

Forgot to attach the new version, sorry!

On 07/23/2015 10:32 AM, Oleg Fayans wrote:

Hi Martin,

On 07/22/2015 05:48 PM, Martin Basti wrote:

On 22/07/15 15:19, Oleg Fayans wrote:

Hi Martin,

Fixed.

On 07/22/2015 09:26 AM, Martin Basti wrote:

On 22/07/15 09:23, Oleg Fayans wrote:

Hi Martin,

Patch updated. Thank you for the review!

On 07/21/2015 05:45 PM, Martin Basti wrote:

On 20/07/15 14:07, Oleg Fayans wrote:

Hi Martin,

Updated.


On 07/20/2015 12:46 PM, Martin Basti wrote:

On 20/07/15 11:57, Oleg Fayans wrote:

+pwfile = api.env.dot_ipa + os.sep + ".dmpw"
+if ipautil.file_exists(pwfile):
+fp = open(pwfile, "r")
+dm_password = fp.read().rstrip()
+fp.close()
+else:

Hello,

1) Can you use os.path.join() instead of "+ os.sep +" please

2) Can you use with statement with file?

with open(pwfile, "r") as f:
dm_password = f.read().rstrip()

3) Please keep PEP8 in new code

./ipatests/test_ipaserver/test_topology_plugin.py:30:80: E501 
line too long (102 > 79 characters)
./ipatests/test_ipaserver/test_topology_plugin.py:33:80: E501 
line too long (92 > 79 characters)
./ipatests/test_ipaserver/test_topology_plugin.py:39:80: E501 
line too long (124 > 79 characters)
./ipatests/test_ipaserver/test_topology_plugin.py:44:80: E501 
line too long (92 > 79 characters)
./ipatests/test_ipaserver/test_topology_plugin.py:45:48: E128 
continuation line under-indented for visual indent
./ipatests/test_ipaserver/test_topology_plugin.py:45:80: E501 
line too long (89 > 79 characters)
./ipatests/test_ipaserver/test_topology_plugin.py:46:48: E128 
continuation line under-indented for visual indent
./ipatests/test_ipaserver/test_topology_plugin.py:46:80: E501 
line too long (89 > 79 characters)
./ipatests/test_ipaserver/test_topology_plugin.py:58:80: E501 
line too long (87 > 79 characters)


4) Missing nose import
raise nose.SkipTest("No directory manager 
password in %s" % pwfile)


5) Can you use sets here instead of sorted lists?
assert(sorted(entry.keys()) == sorted(pluginattrs.keys()))


Martin^2




1)
Sorry, I didn't notice before, but there is missing header in 
that file.


2)
You don't need to specify ldap_uri, you just need to call 
ldap2(api), by default api.env.ldap_uri is used, which is the 
same as you specified


3)
Can you indent values of dict which are on newline? It is 
readable better.

u'nsslapd-topo-plugin-shared-config-base':
[u'cn=ipa,cn=etc,dc=example,dc=com'],
u'nsslapd-pluginDescription': 
[u'ipa-topology-plugin'],


4)
Please use lower F as variable, in python we use capital 
letters for class definitions

with open(pwfile, "r") as F:
dm_password = F.read().rstrip()

Otherwise it works as expected.

Martin^2







Sorry.
You added there old license format, we now use in new files new 
format


#
# Copyright (C) 2015  FreeIPA Contributors see COPYING for license
#




I cannot apply the last patch

$ git am 
freeipa-ofayans-0001.3-test-topologyplugin-is-listed-among-DS-plugins.patch 
-3

Applying: Added test - topology plugin is listed among DS plugins
fatal: corrupt patch at line 83
Repository lacks necessary blobs to fall back on 3-way merge.
Cannot fall back to three-way merge.


Fixed. Tested it locally, it applies






Thank you ACK

--
Martin Basti



Pushed to master: e5acd01ed2971be779e788937493844a9926bb96

--
Martin Basti

-- 
Manage your subscription for the Freeipa-devel mailing list:
https://www.redhat.com/mailman/listinfo/freeipa-devel
Contribute to FreeIPA: http://www.freeipa.org/page/Contribute/Code

Re: [Freeipa-devel] [PATCH 0001] Test Topology plugin is listed among DS plugins

2015-07-23 Thread Martin Basti

On 23/07/15 11:42, Oleg Fayans wrote:

Forgot to attach the new version, sorry!

On 07/23/2015 10:32 AM, Oleg Fayans wrote:

Hi Martin,

On 07/22/2015 05:48 PM, Martin Basti wrote:

On 22/07/15 15:19, Oleg Fayans wrote:

Hi Martin,

Fixed.

On 07/22/2015 09:26 AM, Martin Basti wrote:

On 22/07/15 09:23, Oleg Fayans wrote:

Hi Martin,

Patch updated. Thank you for the review!

On 07/21/2015 05:45 PM, Martin Basti wrote:

On 20/07/15 14:07, Oleg Fayans wrote:

Hi Martin,

Updated.


On 07/20/2015 12:46 PM, Martin Basti wrote:

On 20/07/15 11:57, Oleg Fayans wrote:

+pwfile = api.env.dot_ipa + os.sep + ".dmpw"
+if ipautil.file_exists(pwfile):
+fp = open(pwfile, "r")
+dm_password = fp.read().rstrip()
+fp.close()
+else:

Hello,

1) Can you use os.path.join() instead of "+ os.sep +" please

2) Can you use with statement with file?

with open(pwfile, "r") as f:
dm_password = f.read().rstrip()

3) Please keep PEP8 in new code

./ipatests/test_ipaserver/test_topology_plugin.py:30:80: E501 
line too long (102 > 79 characters)
./ipatests/test_ipaserver/test_topology_plugin.py:33:80: E501 
line too long (92 > 79 characters)
./ipatests/test_ipaserver/test_topology_plugin.py:39:80: E501 
line too long (124 > 79 characters)
./ipatests/test_ipaserver/test_topology_plugin.py:44:80: E501 
line too long (92 > 79 characters)
./ipatests/test_ipaserver/test_topology_plugin.py:45:48: E128 
continuation line under-indented for visual indent
./ipatests/test_ipaserver/test_topology_plugin.py:45:80: E501 
line too long (89 > 79 characters)
./ipatests/test_ipaserver/test_topology_plugin.py:46:48: E128 
continuation line under-indented for visual indent
./ipatests/test_ipaserver/test_topology_plugin.py:46:80: E501 
line too long (89 > 79 characters)
./ipatests/test_ipaserver/test_topology_plugin.py:58:80: E501 
line too long (87 > 79 characters)


4) Missing nose import
raise nose.SkipTest("No directory manager password 
in %s" % pwfile)


5) Can you use sets here instead of sorted lists?
assert(sorted(entry.keys()) == sorted(pluginattrs.keys()))


Martin^2




1)
Sorry, I didn't notice before, but there is missing header in 
that file.


2)
You don't need to specify ldap_uri, you just need to call 
ldap2(api), by default api.env.ldap_uri is used, which is the 
same as you specified


3)
Can you indent values of dict which are on newline? It is 
readable better.

u'nsslapd-topo-plugin-shared-config-base':
[u'cn=ipa,cn=etc,dc=example,dc=com'],
u'nsslapd-pluginDescription': [u'ipa-topology-plugin'],

4)
Please use lower F as variable, in python we use capital letters 
for class definitions

with open(pwfile, "r") as F:
dm_password = F.read().rstrip()

Otherwise it works as expected.

Martin^2







Sorry.
You added there old license format, we now use in new files new 
format


#
# Copyright (C) 2015  FreeIPA Contributors see COPYING for license
#




I cannot apply the last patch

$ git am 
freeipa-ofayans-0001.3-test-topologyplugin-is-listed-among-DS-plugins.patch 
-3

Applying: Added test - topology plugin is listed among DS plugins
fatal: corrupt patch at line 83
Repository lacks necessary blobs to fall back on 3-way merge.
Cannot fall back to three-way merge.


Fixed. Tested it locally, it applies






Thank you ACK

--
Martin Basti

-- 
Manage your subscription for the Freeipa-devel mailing list:
https://www.redhat.com/mailman/listinfo/freeipa-devel
Contribute to FreeIPA: http://www.freeipa.org/page/Contribute/Code

Re: [Freeipa-devel] [PATCH 0001] Test Topology plugin is listed among DS plugins

2015-07-23 Thread Oleg Fayans

Forgot to attach the new version, sorry!

On 07/23/2015 10:32 AM, Oleg Fayans wrote:

Hi Martin,

On 07/22/2015 05:48 PM, Martin Basti wrote:

On 22/07/15 15:19, Oleg Fayans wrote:

Hi Martin,

Fixed.

On 07/22/2015 09:26 AM, Martin Basti wrote:

On 22/07/15 09:23, Oleg Fayans wrote:

Hi Martin,

Patch updated. Thank you for the review!

On 07/21/2015 05:45 PM, Martin Basti wrote:

On 20/07/15 14:07, Oleg Fayans wrote:

Hi Martin,

Updated.


On 07/20/2015 12:46 PM, Martin Basti wrote:

On 20/07/15 11:57, Oleg Fayans wrote:

+pwfile = api.env.dot_ipa + os.sep + ".dmpw"
+if ipautil.file_exists(pwfile):
+fp = open(pwfile, "r")
+dm_password = fp.read().rstrip()
+fp.close()
+else:

Hello,

1) Can you use os.path.join() instead of "+ os.sep +" please

2) Can you use with statement with file?

with open(pwfile, "r") as f:
dm_password = f.read().rstrip()

3) Please keep PEP8 in new code

./ipatests/test_ipaserver/test_topology_plugin.py:30:80: E501 
line too long (102 > 79 characters)
./ipatests/test_ipaserver/test_topology_plugin.py:33:80: E501 
line too long (92 > 79 characters)
./ipatests/test_ipaserver/test_topology_plugin.py:39:80: E501 
line too long (124 > 79 characters)
./ipatests/test_ipaserver/test_topology_plugin.py:44:80: E501 
line too long (92 > 79 characters)
./ipatests/test_ipaserver/test_topology_plugin.py:45:48: E128 
continuation line under-indented for visual indent
./ipatests/test_ipaserver/test_topology_plugin.py:45:80: E501 
line too long (89 > 79 characters)
./ipatests/test_ipaserver/test_topology_plugin.py:46:48: E128 
continuation line under-indented for visual indent
./ipatests/test_ipaserver/test_topology_plugin.py:46:80: E501 
line too long (89 > 79 characters)
./ipatests/test_ipaserver/test_topology_plugin.py:58:80: E501 
line too long (87 > 79 characters)


4) Missing nose import
raise nose.SkipTest("No directory manager password 
in %s" % pwfile)


5) Can you use sets here instead of sorted lists?
assert(sorted(entry.keys()) == sorted(pluginattrs.keys()))


Martin^2




1)
Sorry, I didn't notice before, but there is missing header in 
that file.


2)
You don't need to specify ldap_uri, you just need to call 
ldap2(api), by default api.env.ldap_uri is used, which is the 
same as you specified


3)
Can you indent values of dict which are on newline? It is 
readable better.

u'nsslapd-topo-plugin-shared-config-base':
[u'cn=ipa,cn=etc,dc=example,dc=com'],
u'nsslapd-pluginDescription': [u'ipa-topology-plugin'],

4)
Please use lower F as variable, in python we use capital letters 
for class definitions

with open(pwfile, "r") as F:
dm_password = F.read().rstrip()

Otherwise it works as expected.

Martin^2







Sorry.
You added there old license format, we now use in new files new format

#
# Copyright (C) 2015  FreeIPA Contributors see COPYING for license
#




I cannot apply the last patch

$ git am 
freeipa-ofayans-0001.3-test-topologyplugin-is-listed-among-DS-plugins.patch 
-3

Applying: Added test - topology plugin is listed among DS plugins
fatal: corrupt patch at line 83
Repository lacks necessary blobs to fall back on 3-way merge.
Cannot fall back to three-way merge.


Fixed. Tested it locally, it applies



--
Oleg Fayans
Quality Engineer
FreeIPA team
RedHat.

From 773e3243776f1e0983d564af4b7c8e889aa5f727 Mon Sep 17 00:00:00 2001
From: Oleg Fayans 
Date: Thu, 23 Jul 2015 10:28:47 +0200
Subject: [PATCH] Added test - topology plugin is listed among DS plugins

---
 ipatests/test_ipaserver/test_topology_plugin.py | 70 +
 1 file changed, 70 insertions(+)
 create mode 100644 ipatests/test_ipaserver/test_topology_plugin.py

diff --git a/ipatests/test_ipaserver/test_topology_plugin.py b/ipatests/test_ipaserver/test_topology_plugin.py
new file mode 100644
index ..6678974993cb1762abb01e89a30caa3ebd94e3d0
--- /dev/null
+++ b/ipatests/test_ipaserver/test_topology_plugin.py
@@ -0,0 +1,70 @@
+#
+# Copyright (C) 2015  FreeIPA Contributors see COPYING for license
+#
+
+import os
+from ipaserver.plugins.ldap2 import ldap2
+from ipalib import api
+from ipapython import ipautil
+from ipapython.dn import DN
+import nose
+
+
+class TestTopologyPlugin(object):
+"""
+Test Topology plugin from the DS point of view
+"""
+
+def setup(self):
+"""
+setup for test
+"""
+self.conn = None
+
+def teardown(self):
+if self.conn and self.conn.isconnected():
+self.conn.disconnect()
+
+def test_topologyplugin(self):
+pluginattrs = {
+u'nsslapd-pluginPath': [u'libtopology'],
+u'nsslapd-pluginVendor': [u'freeipa'],
+u'cn': [u'IPA Topology Configuration'],
+u'nsslapd-plugin-depends-on-named':
+[u'Multimaster Replication Plugin', u'ldbm database'],
+u'nss

Re: [Freeipa-devel] [PATCH 0001] Test Topology plugin is listed among DS plugins

2015-07-23 Thread Oleg Fayans

Hi Martin,

On 07/22/2015 05:48 PM, Martin Basti wrote:

On 22/07/15 15:19, Oleg Fayans wrote:

Hi Martin,

Fixed.

On 07/22/2015 09:26 AM, Martin Basti wrote:

On 22/07/15 09:23, Oleg Fayans wrote:

Hi Martin,

Patch updated. Thank you for the review!

On 07/21/2015 05:45 PM, Martin Basti wrote:

On 20/07/15 14:07, Oleg Fayans wrote:

Hi Martin,

Updated.


On 07/20/2015 12:46 PM, Martin Basti wrote:

On 20/07/15 11:57, Oleg Fayans wrote:

+pwfile = api.env.dot_ipa + os.sep + ".dmpw"
+if ipautil.file_exists(pwfile):
+fp = open(pwfile, "r")
+dm_password = fp.read().rstrip()
+fp.close()
+else:

Hello,

1) Can you use os.path.join() instead of "+ os.sep +" please

2) Can you use with statement with file?

with open(pwfile, "r") as f:
dm_password = f.read().rstrip()

3) Please keep PEP8 in new code

./ipatests/test_ipaserver/test_topology_plugin.py:30:80: E501 
line too long (102 > 79 characters)
./ipatests/test_ipaserver/test_topology_plugin.py:33:80: E501 
line too long (92 > 79 characters)
./ipatests/test_ipaserver/test_topology_plugin.py:39:80: E501 
line too long (124 > 79 characters)
./ipatests/test_ipaserver/test_topology_plugin.py:44:80: E501 
line too long (92 > 79 characters)
./ipatests/test_ipaserver/test_topology_plugin.py:45:48: E128 
continuation line under-indented for visual indent
./ipatests/test_ipaserver/test_topology_plugin.py:45:80: E501 
line too long (89 > 79 characters)
./ipatests/test_ipaserver/test_topology_plugin.py:46:48: E128 
continuation line under-indented for visual indent
./ipatests/test_ipaserver/test_topology_plugin.py:46:80: E501 
line too long (89 > 79 characters)
./ipatests/test_ipaserver/test_topology_plugin.py:58:80: E501 
line too long (87 > 79 characters)


4) Missing nose import
raise nose.SkipTest("No directory manager password 
in %s" % pwfile)


5) Can you use sets here instead of sorted lists?
assert(sorted(entry.keys()) == sorted(pluginattrs.keys()))


Martin^2




1)
Sorry, I didn't notice before, but there is missing header in that 
file.


2)
You don't need to specify ldap_uri, you just need to call 
ldap2(api), by default api.env.ldap_uri is used, which is the same 
as you specified


3)
Can you indent values of dict which are on newline? It is readable 
better.

u'nsslapd-topo-plugin-shared-config-base':
[u'cn=ipa,cn=etc,dc=example,dc=com'],
u'nsslapd-pluginDescription': [u'ipa-topology-plugin'],

4)
Please use lower F as variable, in python we use capital letters 
for class definitions

with open(pwfile, "r") as F:
dm_password = F.read().rstrip()

Otherwise it works as expected.

Martin^2







Sorry.
You added there old license format, we now use in new files new format

#
# Copyright (C) 2015  FreeIPA Contributors see COPYING for license
#




I cannot apply the last patch

$ git am 
freeipa-ofayans-0001.3-test-topologyplugin-is-listed-among-DS-plugins.patch 
-3

Applying: Added test - topology plugin is listed among DS plugins
fatal: corrupt patch at line 83
Repository lacks necessary blobs to fall back on 3-way merge.
Cannot fall back to three-way merge.


Fixed. Tested it locally, it applies

--
Oleg Fayans
Quality Engineer
FreeIPA team
RedHat.

--
Manage your subscription for the Freeipa-devel mailing list:
https://www.redhat.com/mailman/listinfo/freeipa-devel
Contribute to FreeIPA: http://www.freeipa.org/page/Contribute/Code


Re: [Freeipa-devel] [PATCH 0001] Test Topology plugin is listed among DS plugins

2015-07-22 Thread Martin Basti

On 22/07/15 15:19, Oleg Fayans wrote:

Hi Martin,

Fixed.

On 07/22/2015 09:26 AM, Martin Basti wrote:

On 22/07/15 09:23, Oleg Fayans wrote:

Hi Martin,

Patch updated. Thank you for the review!

On 07/21/2015 05:45 PM, Martin Basti wrote:

On 20/07/15 14:07, Oleg Fayans wrote:

Hi Martin,

Updated.


On 07/20/2015 12:46 PM, Martin Basti wrote:

On 20/07/15 11:57, Oleg Fayans wrote:

+pwfile = api.env.dot_ipa + os.sep + ".dmpw"
+if ipautil.file_exists(pwfile):
+fp = open(pwfile, "r")
+dm_password = fp.read().rstrip()
+fp.close()
+else:

Hello,

1) Can you use os.path.join() instead of "+ os.sep +" please

2) Can you use with statement with file?

with open(pwfile, "r") as f:
dm_password = f.read().rstrip()

3) Please keep PEP8 in new code

./ipatests/test_ipaserver/test_topology_plugin.py:30:80: E501 
line too long (102 > 79 characters)
./ipatests/test_ipaserver/test_topology_plugin.py:33:80: E501 
line too long (92 > 79 characters)
./ipatests/test_ipaserver/test_topology_plugin.py:39:80: E501 
line too long (124 > 79 characters)
./ipatests/test_ipaserver/test_topology_plugin.py:44:80: E501 
line too long (92 > 79 characters)
./ipatests/test_ipaserver/test_topology_plugin.py:45:48: E128 
continuation line under-indented for visual indent
./ipatests/test_ipaserver/test_topology_plugin.py:45:80: E501 
line too long (89 > 79 characters)
./ipatests/test_ipaserver/test_topology_plugin.py:46:48: E128 
continuation line under-indented for visual indent
./ipatests/test_ipaserver/test_topology_plugin.py:46:80: E501 
line too long (89 > 79 characters)
./ipatests/test_ipaserver/test_topology_plugin.py:58:80: E501 
line too long (87 > 79 characters)


4) Missing nose import
raise nose.SkipTest("No directory manager password in 
%s" % pwfile)


5) Can you use sets here instead of sorted lists?
assert(sorted(entry.keys()) == sorted(pluginattrs.keys()))


Martin^2




1)
Sorry, I didn't notice before, but there is missing header in that 
file.


2)
You don't need to specify ldap_uri, you just need to call 
ldap2(api), by default api.env.ldap_uri is used, which is the same 
as you specified


3)
Can you indent values of dict which are on newline? It is readable 
better.

u'nsslapd-topo-plugin-shared-config-base':
[u'cn=ipa,cn=etc,dc=example,dc=com'],
u'nsslapd-pluginDescription': [u'ipa-topology-plugin'],

4)
Please use lower F as variable, in python we use capital letters 
for class definitions

with open(pwfile, "r") as F:
dm_password = F.read().rstrip()

Otherwise it works as expected.

Martin^2







Sorry.
You added there old license format, we now use in new files new format

#
# Copyright (C) 2015  FreeIPA Contributors see COPYING for license
#




I cannot apply the last patch

$ git am 
freeipa-ofayans-0001.3-test-topologyplugin-is-listed-among-DS-plugins.patch 
-3

Applying: Added test - topology plugin is listed among DS plugins
fatal: corrupt patch at line 83
Repository lacks necessary blobs to fall back on 3-way merge.
Cannot fall back to three-way merge.


--
Martin Basti

--
Manage your subscription for the Freeipa-devel mailing list:
https://www.redhat.com/mailman/listinfo/freeipa-devel
Contribute to FreeIPA: http://www.freeipa.org/page/Contribute/Code


Re: [Freeipa-devel] [PATCH 0001] Test Topology plugin is listed among DS plugins

2015-07-22 Thread Oleg Fayans

Hi Martin,

Fixed.

On 07/22/2015 09:26 AM, Martin Basti wrote:

On 22/07/15 09:23, Oleg Fayans wrote:

Hi Martin,

Patch updated. Thank you for the review!

On 07/21/2015 05:45 PM, Martin Basti wrote:

On 20/07/15 14:07, Oleg Fayans wrote:

Hi Martin,

Updated.


On 07/20/2015 12:46 PM, Martin Basti wrote:

On 20/07/15 11:57, Oleg Fayans wrote:

+pwfile = api.env.dot_ipa + os.sep + ".dmpw"
+if ipautil.file_exists(pwfile):
+fp = open(pwfile, "r")
+dm_password = fp.read().rstrip()
+fp.close()
+else:

Hello,

1) Can you use os.path.join() instead of "+ os.sep +" please

2) Can you use with statement with file?

with open(pwfile, "r") as f:
dm_password = f.read().rstrip()

3) Please keep PEP8 in new code

./ipatests/test_ipaserver/test_topology_plugin.py:30:80: E501 line 
too long (102 > 79 characters)
./ipatests/test_ipaserver/test_topology_plugin.py:33:80: E501 line 
too long (92 > 79 characters)
./ipatests/test_ipaserver/test_topology_plugin.py:39:80: E501 line 
too long (124 > 79 characters)
./ipatests/test_ipaserver/test_topology_plugin.py:44:80: E501 line 
too long (92 > 79 characters)
./ipatests/test_ipaserver/test_topology_plugin.py:45:48: E128 
continuation line under-indented for visual indent
./ipatests/test_ipaserver/test_topology_plugin.py:45:80: E501 line 
too long (89 > 79 characters)
./ipatests/test_ipaserver/test_topology_plugin.py:46:48: E128 
continuation line under-indented for visual indent
./ipatests/test_ipaserver/test_topology_plugin.py:46:80: E501 line 
too long (89 > 79 characters)
./ipatests/test_ipaserver/test_topology_plugin.py:58:80: E501 line 
too long (87 > 79 characters)


4) Missing nose import
raise nose.SkipTest("No directory manager password in 
%s" % pwfile)


5) Can you use sets here instead of sorted lists?
assert(sorted(entry.keys()) == sorted(pluginattrs.keys()))


Martin^2




1)
Sorry, I didn't notice before, but there is missing header in that 
file.


2)
You don't need to specify ldap_uri, you just need to call 
ldap2(api), by default api.env.ldap_uri is used, which is the same 
as you specified


3)
Can you indent values of dict which are on newline? It is readable 
better.

u'nsslapd-topo-plugin-shared-config-base':
[u'cn=ipa,cn=etc,dc=example,dc=com'],
u'nsslapd-pluginDescription': [u'ipa-topology-plugin'],

4)
Please use lower F as variable, in python we use capital letters for 
class definitions

with open(pwfile, "r") as F:
dm_password = F.read().rstrip()

Otherwise it works as expected.

Martin^2







Sorry.
You added there old license format, we now use in new files new format

#
# Copyright (C) 2015  FreeIPA Contributors see COPYING for license
#



--
Oleg Fayans
Quality Engineer
FreeIPA team
RedHat.

From d9c0040ccdf07aad9c3ab2ca8dffee1865796409 Mon Sep 17 00:00:00 2001
From: Oleg Fayans 
Date: Wed, 22 Jul 2015 09:20:09 +0200
Subject: [PATCH] Added test - topology plugin is listed among DS plugins

---
 ipatests/test_ipaserver/test_topology_plugin.py | 85 +
 1 file changed, 85 insertions(+)
 create mode 100644 ipatests/test_ipaserver/test_topology_plugin.py

diff --git a/ipatests/test_ipaserver/test_topology_plugin.py b/ipatests/test_ipaserver/test_topology_plugin.py
new file mode 100644
index ..8cc9d351ac6ceefc75533de1ae17b318d01fe1ad
--- /dev/null
+++ b/ipatests/test_ipaserver/test_topology_plugin.py
@@ -0,0 +1,85 @@
+#
+# Copyright (C) 2015  FreeIPA Contributors see COPYING for license
+#
+
+import os
+from ipaserver.plugins.ldap2 import ldap2
+from ipalib import api
+from ipapython import ipautil
+from ipapython.dn import DN
+import nose
+
+
+class TestTopologyPlugin(object):
+"""
+Test Topology plugin from the DS point of view
+"""
+
+def setup(self):
+"""
+setup for test
+"""
+self.conn = None
+
+def teardown(self):
+if self.conn and self.conn.isconnected():
+self.conn.disconnect()
+
+def test_topologyplugin(self):
+pluginattrs = {
+u'nsslapd-pluginPath': [u'libtopology'],
+u'nsslapd-pluginVendor': [u'freeipa'],
+u'cn': [u'IPA Topology Configuration'],
+u'nsslapd-plugin-depends-on-named':
+[u'Multimaster Replication Plugin', u'ldbm database'],
+u'nsslapd-topo-plugin-shared-replica-root': [u'dc=example,dc=com'],
+u'nsslapd-pluginVersion': [u'1.0'],
+u'nsslapd-topo-plugin-shared-config-base':
+[u'cn=ipa,cn=etc,dc=example,dc=com'],
+u'nsslapd-pluginDescription': [u'ipa-topology-plugin'],
+u'nsslapd-pluginEnabled': [u'on'],
+u'nsslapd-pluginId': [u'ipa-topology-plugin'],
+u'objectClass': [u'top', u'nsSlapdPlugin', u'extensibleObject'],
+u'nsslapd-topo-plugin-startup-delay': [u'20'],
+ 

Re: [Freeipa-devel] [PATCH 0001] Test Topology plugin is listed among DS plugins

2015-07-22 Thread Martin Basti

On 22/07/15 09:23, Oleg Fayans wrote:

Hi Martin,

Patch updated. Thank you for the review!

On 07/21/2015 05:45 PM, Martin Basti wrote:

On 20/07/15 14:07, Oleg Fayans wrote:

Hi Martin,

Updated.


On 07/20/2015 12:46 PM, Martin Basti wrote:

On 20/07/15 11:57, Oleg Fayans wrote:

+pwfile = api.env.dot_ipa + os.sep + ".dmpw"
+if ipautil.file_exists(pwfile):
+fp = open(pwfile, "r")
+dm_password = fp.read().rstrip()
+fp.close()
+else:

Hello,

1) Can you use os.path.join() instead of "+ os.sep +" please

2) Can you use with statement with file?

with open(pwfile, "r") as f:
dm_password = f.read().rstrip()

3) Please keep PEP8 in new code

./ipatests/test_ipaserver/test_topology_plugin.py:30:80: E501 line 
too long (102 > 79 characters)
./ipatests/test_ipaserver/test_topology_plugin.py:33:80: E501 line 
too long (92 > 79 characters)
./ipatests/test_ipaserver/test_topology_plugin.py:39:80: E501 line 
too long (124 > 79 characters)
./ipatests/test_ipaserver/test_topology_plugin.py:44:80: E501 line 
too long (92 > 79 characters)
./ipatests/test_ipaserver/test_topology_plugin.py:45:48: E128 
continuation line under-indented for visual indent
./ipatests/test_ipaserver/test_topology_plugin.py:45:80: E501 line 
too long (89 > 79 characters)
./ipatests/test_ipaserver/test_topology_plugin.py:46:48: E128 
continuation line under-indented for visual indent
./ipatests/test_ipaserver/test_topology_plugin.py:46:80: E501 line 
too long (89 > 79 characters)
./ipatests/test_ipaserver/test_topology_plugin.py:58:80: E501 line 
too long (87 > 79 characters)


4) Missing nose import
raise nose.SkipTest("No directory manager password in 
%s" % pwfile)


5) Can you use sets here instead of sorted lists?
assert(sorted(entry.keys()) == sorted(pluginattrs.keys()))


Martin^2




1)
Sorry, I didn't notice before, but there is missing header in that file.

2)
You don't need to specify ldap_uri, you just need to call ldap2(api), 
by default api.env.ldap_uri is used, which is the same as you specified


3)
Can you indent values of dict which are on newline? It is readable 
better.

u'nsslapd-topo-plugin-shared-config-base':
[u'cn=ipa,cn=etc,dc=example,dc=com'],
u'nsslapd-pluginDescription': [u'ipa-topology-plugin'],

4)
Please use lower F as variable, in python we use capital letters for 
class definitions

with open(pwfile, "r") as F:
dm_password = F.read().rstrip()

Otherwise it works as expected.

Martin^2







Sorry.
You added there old license format, we now use in new files new format

#
# Copyright (C) 2015  FreeIPA Contributors see COPYING for license
#

--
Martin Basti

--
Manage your subscription for the Freeipa-devel mailing list:
https://www.redhat.com/mailman/listinfo/freeipa-devel
Contribute to FreeIPA: http://www.freeipa.org/page/Contribute/Code


Re: [Freeipa-devel] [PATCH 0001] Test Topology plugin is listed among DS plugins

2015-07-22 Thread Oleg Fayans

Hi Martin,

Patch updated. Thank you for the review!

On 07/21/2015 05:45 PM, Martin Basti wrote:

On 20/07/15 14:07, Oleg Fayans wrote:

Hi Martin,

Updated.


On 07/20/2015 12:46 PM, Martin Basti wrote:

On 20/07/15 11:57, Oleg Fayans wrote:

+pwfile = api.env.dot_ipa + os.sep + ".dmpw"
+if ipautil.file_exists(pwfile):
+fp = open(pwfile, "r")
+dm_password = fp.read().rstrip()
+fp.close()
+else:

Hello,

1) Can you use os.path.join() instead of "+ os.sep +" please

2) Can you use with statement with file?

with open(pwfile, "r") as f:
dm_password = f.read().rstrip()

3) Please keep PEP8 in new code

./ipatests/test_ipaserver/test_topology_plugin.py:30:80: E501 line 
too long (102 > 79 characters)
./ipatests/test_ipaserver/test_topology_plugin.py:33:80: E501 line 
too long (92 > 79 characters)
./ipatests/test_ipaserver/test_topology_plugin.py:39:80: E501 line 
too long (124 > 79 characters)
./ipatests/test_ipaserver/test_topology_plugin.py:44:80: E501 line 
too long (92 > 79 characters)
./ipatests/test_ipaserver/test_topology_plugin.py:45:48: E128 
continuation line under-indented for visual indent
./ipatests/test_ipaserver/test_topology_plugin.py:45:80: E501 line 
too long (89 > 79 characters)
./ipatests/test_ipaserver/test_topology_plugin.py:46:48: E128 
continuation line under-indented for visual indent
./ipatests/test_ipaserver/test_topology_plugin.py:46:80: E501 line 
too long (89 > 79 characters)
./ipatests/test_ipaserver/test_topology_plugin.py:58:80: E501 line 
too long (87 > 79 characters)


4) Missing nose import
raise nose.SkipTest("No directory manager password in 
%s" % pwfile)


5) Can you use sets here instead of sorted lists?
assert(sorted(entry.keys()) == sorted(pluginattrs.keys()))


Martin^2




1)
Sorry, I didn't notice before, but there is missing header in that file.

2)
You don't need to specify ldap_uri, you just need to call ldap2(api), 
by default api.env.ldap_uri is used, which is the same as you specified


3)
Can you indent values of dict which are on newline? It is readable 
better.

u'nsslapd-topo-plugin-shared-config-base':
[u'cn=ipa,cn=etc,dc=example,dc=com'],
u'nsslapd-pluginDescription': [u'ipa-topology-plugin'],

4)
Please use lower F as variable, in python we use capital letters for 
class definitions

with open(pwfile, "r") as F:
dm_password = F.read().rstrip()

Otherwise it works as expected.

Martin^2






--
Oleg Fayans
Quality Engineer
FreeIPA team
RedHat.

From d9c0040ccdf07aad9c3ab2ca8dffee1865796409 Mon Sep 17 00:00:00 2001
From: Oleg Fayans 
Date: Wed, 22 Jul 2015 09:20:09 +0200
Subject: [PATCH] Added test - topology plugin is listed among DS plugins

---
 ipatests/test_ipaserver/test_topology_plugin.py | 85 +
 1 file changed, 85 insertions(+)
 create mode 100644 ipatests/test_ipaserver/test_topology_plugin.py

diff --git a/ipatests/test_ipaserver/test_topology_plugin.py b/ipatests/test_ipaserver/test_topology_plugin.py
new file mode 100644
index ..8cc9d351ac6ceefc75533de1ae17b318d01fe1ad
--- /dev/null
+++ b/ipatests/test_ipaserver/test_topology_plugin.py
@@ -0,0 +1,85 @@
+# Authors:
+#   Oleg Fayans 
+#
+# Copyright (C) 2015  Red Hat
+# see file 'COPYING' for use and warranty information
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see .
+
+import os
+from ipaserver.plugins.ldap2 import ldap2
+from ipalib import api
+from ipapython import ipautil
+from ipapython.dn import DN
+import nose
+
+
+class TestTopologyPlugin(object):
+"""
+Test Topology plugin from the DS point of view
+"""
+
+def setup(self):
+"""
+setup for test
+"""
+self.conn = None
+
+def teardown(self):
+if self.conn and self.conn.isconnected():
+self.conn.disconnect()
+
+def test_topologyplugin(self):
+pluginattrs = {
+u'nsslapd-pluginPath': [u'libtopology'],
+u'nsslapd-pluginVendor': [u'freeipa'],
+u'cn': [u'IPA Topology Configuration'],
+u'nsslapd-plugin-depends-on-named':
+[u'Multimaster Replication Plugin', u'ldbm database'],
+u'nsslapd-topo-plugin-shared-replica-root': [u'dc=example,dc=com'],
+u'nsslapd-pluginVersion': [u'1.0'],

Re: [Freeipa-devel] [PATCH 0001] Test Topology plugin is listed among DS plugins

2015-07-21 Thread Martin Basti

On 20/07/15 14:07, Oleg Fayans wrote:

Hi Martin,

Updated.


On 07/20/2015 12:46 PM, Martin Basti wrote:

On 20/07/15 11:57, Oleg Fayans wrote:

+pwfile = api.env.dot_ipa + os.sep + ".dmpw"
+if ipautil.file_exists(pwfile):
+fp = open(pwfile, "r")
+dm_password = fp.read().rstrip()
+fp.close()
+else:

Hello,

1) Can you use os.path.join() instead of "+ os.sep +" please

2) Can you use with statement with file?

with open(pwfile, "r") as f:
dm_password = f.read().rstrip()

3) Please keep PEP8 in new code

./ipatests/test_ipaserver/test_topology_plugin.py:30:80: E501 line 
too long (102 > 79 characters)
./ipatests/test_ipaserver/test_topology_plugin.py:33:80: E501 line 
too long (92 > 79 characters)
./ipatests/test_ipaserver/test_topology_plugin.py:39:80: E501 line 
too long (124 > 79 characters)
./ipatests/test_ipaserver/test_topology_plugin.py:44:80: E501 line 
too long (92 > 79 characters)
./ipatests/test_ipaserver/test_topology_plugin.py:45:48: E128 
continuation line under-indented for visual indent
./ipatests/test_ipaserver/test_topology_plugin.py:45:80: E501 line 
too long (89 > 79 characters)
./ipatests/test_ipaserver/test_topology_plugin.py:46:48: E128 
continuation line under-indented for visual indent
./ipatests/test_ipaserver/test_topology_plugin.py:46:80: E501 line 
too long (89 > 79 characters)
./ipatests/test_ipaserver/test_topology_plugin.py:58:80: E501 line 
too long (87 > 79 characters)


4) Missing nose import
raise nose.SkipTest("No directory manager password in %s" 
% pwfile)


5) Can you use sets here instead of sorted lists?
assert(sorted(entry.keys()) == sorted(pluginattrs.keys()))


Martin^2




1)
Sorry, I didn't notice before, but there is missing header in that file.

2)
You don't need to specify ldap_uri, you just need to call ldap2(api), by 
default api.env.ldap_uri is used, which is the same as you specified


3)
Can you indent values of dict which are on newline? It is readable better.
u'nsslapd-topo-plugin-shared-config-base':
[u'cn=ipa,cn=etc,dc=example,dc=com'],
u'nsslapd-pluginDescription': [u'ipa-topology-plugin'],

4)
Please use lower F as variable, in python we use capital letters for 
class definitions

with open(pwfile, "r") as F:
dm_password = F.read().rstrip()

Otherwise it works as expected.

Martin^2




--
Martin Basti

--
Manage your subscription for the Freeipa-devel mailing list:
https://www.redhat.com/mailman/listinfo/freeipa-devel
Contribute to FreeIPA: http://www.freeipa.org/page/Contribute/Code


Re: [Freeipa-devel] [PATCH 0001] Test Topology plugin is listed among DS plugins

2015-07-20 Thread Oleg Fayans

Hi Martin,

Updated.


On 07/20/2015 12:46 PM, Martin Basti wrote:

On 20/07/15 11:57, Oleg Fayans wrote:

+pwfile = api.env.dot_ipa + os.sep + ".dmpw"
+if ipautil.file_exists(pwfile):
+fp = open(pwfile, "r")
+dm_password = fp.read().rstrip()
+fp.close()
+else:

Hello,

1) Can you use os.path.join() instead of "+ os.sep +" please

2) Can you use with statement with file?

with open(pwfile, "r") as f:
dm_password = f.read().rstrip()

3) Please keep PEP8 in new code

./ipatests/test_ipaserver/test_topology_plugin.py:30:80: E501 line too 
long (102 > 79 characters)
./ipatests/test_ipaserver/test_topology_plugin.py:33:80: E501 line too 
long (92 > 79 characters)
./ipatests/test_ipaserver/test_topology_plugin.py:39:80: E501 line too 
long (124 > 79 characters)
./ipatests/test_ipaserver/test_topology_plugin.py:44:80: E501 line too 
long (92 > 79 characters)
./ipatests/test_ipaserver/test_topology_plugin.py:45:48: E128 
continuation line under-indented for visual indent
./ipatests/test_ipaserver/test_topology_plugin.py:45:80: E501 line too 
long (89 > 79 characters)
./ipatests/test_ipaserver/test_topology_plugin.py:46:48: E128 
continuation line under-indented for visual indent
./ipatests/test_ipaserver/test_topology_plugin.py:46:80: E501 line too 
long (89 > 79 characters)
./ipatests/test_ipaserver/test_topology_plugin.py:58:80: E501 line too 
long (87 > 79 characters)


4) Missing nose import
raise nose.SkipTest("No directory manager password in %s" 
% pwfile)


5) Can you use sets here instead of sorted lists?
assert(sorted(entry.keys()) == sorted(pluginattrs.keys()))


Martin^2



--
Oleg Fayans
Quality Engineer
FreeIPA team
RedHat.

From f0704006927c340ee0ce16589d521f11e7af0f15 Mon Sep 17 00:00:00 2001
From: Oleg Fayans 
Date: Mon, 20 Jul 2015 14:00:13 +0200
Subject: [PATCH] Added test - topology plugin is listed among DS plugins

---
 ipatests/test_ipaserver/test_topology_plugin.py | 68 +
 1 file changed, 68 insertions(+)
 create mode 100644 ipatests/test_ipaserver/test_topology_plugin.py

diff --git a/ipatests/test_ipaserver/test_topology_plugin.py b/ipatests/test_ipaserver/test_topology_plugin.py
new file mode 100644
index ..972aa5248e34eb2e3c22b1185b9d0d4b6982ed76
--- /dev/null
+++ b/ipatests/test_ipaserver/test_topology_plugin.py
@@ -0,0 +1,68 @@
+import os
+from ipaserver.plugins.ldap2 import ldap2
+from ipalib import api
+from ipapython import ipautil
+from ipapython.dn import DN
+import nose
+
+
+class TestTopologyPlugin(object):
+"""
+Test Topology plugin from the DS point of view
+"""
+
+def setup(self):
+"""
+setup for test
+"""
+
+self.ldapuri = 'ldap://%s' % ipautil.format_netloc(api.env.host)
+self.conn = None
+
+def teardown(self):
+if self.conn and self.conn.isconnected():
+self.conn.disconnect()
+
+def test_topologyplugin(self):
+pluginattrs = {
+u'nsslapd-pluginPath': [u'libtopology'],
+u'nsslapd-pluginVendor': [u'freeipa'],
+u'cn': [u'IPA Topology Configuration'],
+u'nsslapd-plugin-depends-on-named':
+[u'Multimaster Replication Plugin', u'ldbm database'],
+u'nsslapd-topo-plugin-shared-replica-root': [u'dc=example,dc=com'],
+u'nsslapd-pluginVersion': [u'1.0'],
+u'nsslapd-topo-plugin-shared-config-base':
+[u'cn=ipa,cn=etc,dc=example,dc=com'],
+u'nsslapd-pluginDescription': [u'ipa-topology-plugin'],
+u'nsslapd-pluginEnabled': [u'on'],
+u'nsslapd-pluginId': [u'ipa-topology-plugin'],
+u'objectClass': [u'top', u'nsSlapdPlugin', u'extensibleObject'],
+u'nsslapd-topo-plugin-startup-delay': [u'20'],
+u'nsslapd-topo-plugin-shared-binddngroup':
+[u'cn=replication managers,cn=sysaccounts,cn=etc,dc=example,dc=com'],
+u'nsslapd-pluginType': [u'object'],
+u'nsslapd-pluginInitfunc': [u'ipa_topo_init']
+}
+variable_attrs = {u'nsslapd-topo-plugin-shared-replica-root',
+  u'nsslapd-topo-plugin-shared-config-base',
+  u'nsslapd-topo-plugin-shared-binddngroup'}
+
+# Now eliminate keys that have domain-dependent values.
+checkvalues = set(pluginattrs.keys()) - variable_attrs
+topoplugindn = DN(('cn', 'IPA Topology Configuration'),
+  ('cn', 'plugins'),
+  ('cn', 'config'))
+pwfile = os.path.join(api.env.dot_ipa, ".dmpw")
+if ipautil.file_exists(pwfile):
+with open(pwfile, "r") as F:
+dm_password = F.read().rstrip()
+else:
+raise nose.SkipTest("No directory manager password in %s" % pwfile)
+self.conn = ldap2(api, ldap_uri=self.ldapuri)
+self.conn.connect(bind

Re: [Freeipa-devel] [PATCH 0001] Test Topology plugin is listed among DS plugins

2015-07-20 Thread Martin Basti

On 20/07/15 11:57, Oleg Fayans wrote:

+pwfile = api.env.dot_ipa + os.sep + ".dmpw"
+if ipautil.file_exists(pwfile):
+fp = open(pwfile, "r")
+dm_password = fp.read().rstrip()
+fp.close()
+else:

Hello,

1) Can you use os.path.join() instead of "+ os.sep +" please

2) Can you use with statement with file?

with open(pwfile, "r") as f:
dm_password = f.read().rstrip()

3) Please keep PEP8 in new code

./ipatests/test_ipaserver/test_topology_plugin.py:30:80: E501 line too 
long (102 > 79 characters)
./ipatests/test_ipaserver/test_topology_plugin.py:33:80: E501 line too 
long (92 > 79 characters)
./ipatests/test_ipaserver/test_topology_plugin.py:39:80: E501 line too 
long (124 > 79 characters)
./ipatests/test_ipaserver/test_topology_plugin.py:44:80: E501 line too 
long (92 > 79 characters)
./ipatests/test_ipaserver/test_topology_plugin.py:45:48: E128 
continuation line under-indented for visual indent
./ipatests/test_ipaserver/test_topology_plugin.py:45:80: E501 line too 
long (89 > 79 characters)
./ipatests/test_ipaserver/test_topology_plugin.py:46:48: E128 
continuation line under-indented for visual indent
./ipatests/test_ipaserver/test_topology_plugin.py:46:80: E501 line too 
long (89 > 79 characters)
./ipatests/test_ipaserver/test_topology_plugin.py:58:80: E501 line too 
long (87 > 79 characters)


4) Missing nose import
raise nose.SkipTest("No directory manager password in %s" % 
pwfile)


5) Can you use sets here instead of sorted lists?
assert(sorted(entry.keys()) == sorted(pluginattrs.keys()))


Martin^2

--
Martin Basti

--
Manage your subscription for the Freeipa-devel mailing list:
https://www.redhat.com/mailman/listinfo/freeipa-devel
Contribute to FreeIPA: http://www.freeipa.org/page/Contribute/Code


[Freeipa-devel] [PATCH 0001] Test Topology plugin is listed among DS plugins

2015-07-20 Thread Oleg Fayans
A simple test to check that Topology Plugin has registered itself in the 
ldap tree.


--
Oleg Fayans
Quality Engineer
FreeIPA team
RedHat.

From 49280b12b1701c3baf095c8d3c209e14dce0dcde Mon Sep 17 00:00:00 2001
From: Oleg Fayans 
Date: Mon, 20 Jul 2015 11:50:32 +0200
Subject: [PATCH] Added test - topology plugin is listed among DS plugins

---
 ipatests/test_ipaserver/test_topology_plugin.py | 62 +
 1 file changed, 62 insertions(+)
 create mode 100644 ipatests/test_ipaserver/test_topology_plugin.py

diff --git a/ipatests/test_ipaserver/test_topology_plugin.py b/ipatests/test_ipaserver/test_topology_plugin.py
new file mode 100644
index ..fc457190f2280197c523520db4a41375ace1fb03
--- /dev/null
+++ b/ipatests/test_ipaserver/test_topology_plugin.py
@@ -0,0 +1,62 @@
+import os
+from ipaserver.plugins.ldap2 import ldap2
+from ipalib import api
+from ipapython import ipautil
+from ipapython.dn import DN
+
+
+class TestTopologyPlugin(object):
+"""
+Test Topology plugin from the DS point of view
+"""
+
+def setup(self):
+"""
+setup for test
+"""
+
+self.ldapuri = 'ldap://%s' % ipautil.format_netloc(api.env.host)
+self.conn = None
+
+def teardown(self):
+if self.conn and self.conn.isconnected():
+self.conn.disconnect()
+
+def test_topologyplugin(self):
+pluginattrs = {
+u'nsslapd-pluginPath': [u'libtopology'],
+u'nsslapd-pluginVendor': [u'freeipa'],
+u'cn': [u'IPA Topology Configuration'],
+u'nsslapd-plugin-depends-on-named': [u'Multimaster Replication Plugin', u'ldbm database'],
+u'nsslapd-topo-plugin-shared-replica-root': [u'dc=example,dc=com'],
+u'nsslapd-pluginVersion': [u'1.0'],
+u'nsslapd-topo-plugin-shared-config-base': [u'cn=ipa,cn=etc,dc=example,dc=com'],
+u'nsslapd-pluginDescription': [u'ipa-topology-plugin'],
+u'nsslapd-pluginEnabled': [u'on'],
+u'nsslapd-pluginId': [u'ipa-topology-plugin'],
+u'objectClass': [u'top', u'nsSlapdPlugin', u'extensibleObject'],
+u'nsslapd-topo-plugin-startup-delay': [u'20'],
+u'nsslapd-topo-plugin-shared-binddngroup': [u'cn=replication managers,cn=sysaccounts,cn=etc,dc=example,dc=com'],
+u'nsslapd-pluginType': [u'object'],
+u'nsslapd-pluginInitfunc': [u'ipa_topo_init']
+}
+# Now eliminate keys that have domain-dependent values.
+checkvalues = set(pluginattrs.keys()) - {u'nsslapd-topo-plugin-shared-replica-root',
+   u'nsslapd-topo-plugin-shared-config-base',
+   u'nsslapd-topo-plugin-shared-binddngroup'}
+topoplugindn = DN(('cn', 'IPA Topology Configuration'),
+  ('cn', 'plugins'),
+  ('cn', 'config'))
+pwfile = api.env.dot_ipa + os.sep + ".dmpw"
+if ipautil.file_exists(pwfile):
+fp = open(pwfile, "r")
+dm_password = fp.read().rstrip()
+fp.close()
+else:
+raise nose.SkipTest("No directory manager password in %s" % pwfile)
+self.conn = ldap2(api, ldap_uri=self.ldapuri)
+self.conn.connect(bind_dn=DN(('cn', 'directory manager')), bind_pw=dm_password)
+entry = self.conn.get_entry(topoplugindn)
+assert(sorted(entry.keys()) == sorted(pluginattrs.keys()))
+for i in checkvalues:
+assert(pluginattrs[i] == entry[i])
-- 
2.4.3

-- 
Manage your subscription for the Freeipa-devel mailing list:
https://www.redhat.com/mailman/listinfo/freeipa-devel
Contribute to FreeIPA: http://www.freeipa.org/page/Contribute/Code