Use the Output tuple to determine the order of output

The attributes displayed is now dependant upon their definition in
a Param. This enhances that, giving some level of control over how
the result is displayed to the user.

This also fixes displaying group membership, including failures of
adding/removing entries.

All tests pass now though there is still one problem. We need to
return the dn as well. Once that is fixed we just need to comment
out all the dn entries in the tests and they should once again
pass.
This commit is contained in:
Rob Crittenden
2010-02-12 16:34:21 -05:00
committed by Jason Gerard DeRose
parent 99dcf9d4f9
commit 58746226d4
24 changed files with 388 additions and 161 deletions

View File

@@ -178,8 +178,8 @@ class test_hbac(XMLRPC_test):
assert 'group' in failed['memberuser']
assert not failed['memberuser']['group']
entry = ret['result']
assert_attr_equal(entry, 'memberuser user', self.test_user)
assert_attr_equal(entry, 'memberuser group', self.test_group)
assert_attr_equal(entry, 'memberuser_user', self.test_user)
assert_attr_equal(entry, 'memberuser_group', self.test_group)
def test_9_hbac_remove_user(self):
"""
@@ -196,8 +196,8 @@ class test_hbac(XMLRPC_test):
assert 'group' in failed['memberuser']
assert not failed['memberuser']['group']
entry = ret['result']
assert 'memberuser user' not in entry
assert 'memberuser group' not in entry
assert 'memberuser_user' not in entry
assert 'memberuser_group' not in entry
def test_a_hbac_add_host(self):
"""
@@ -214,8 +214,8 @@ class test_hbac(XMLRPC_test):
assert 'hostgroup' in failed['memberhost']
assert not failed['memberhost']['hostgroup']
entry = ret['result']
assert_attr_equal(entry, 'memberhost host', self.test_host)
assert_attr_equal(entry, 'memberhost hostgroup', self.test_hostgroup)
assert_attr_equal(entry, 'memberhost_host', self.test_host)
assert_attr_equal(entry, 'memberhost_hostgroup', self.test_hostgroup)
def test_b_hbac_remove_host(self):
"""
@@ -232,8 +232,8 @@ class test_hbac(XMLRPC_test):
assert 'hostgroup' in failed['memberhost']
assert not failed['memberhost']['hostgroup']
entry = ret['result']
assert 'memberhost host' not in res[1]
assert 'memberhost hostgroup' not in res[1]
assert 'memberhost_host' not in res[1]
assert 'memberhost_hostgroup' not in res[1]
def test_a_hbac_add_sourcehost(self):
"""
@@ -250,8 +250,8 @@ class test_hbac(XMLRPC_test):
assert 'hostgroup' in failed['sourcehost']
assert not failed['sourcehost']['hostgroup']
entry = ret['result']
assert_attr_equal(entry, 'sourcehost host', self.test_host)
assert_attr_equal(entry, 'sourcehost hostgroup', self.test_hostgroup)
assert_attr_equal(entry, 'sourcehost_host', self.test_host)
assert_attr_equal(entry, 'sourcehost_hostgroup', self.test_hostgroup)
def test_b_hbac_remove_host(self):
"""