mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-09 06:56:14 -06:00
Add netgroup as possible memberOf for hostgroups
https://fedorahosted.org/freeipa/ticket/1563
This commit is contained in:
parent
327d67fe8d
commit
e52f652873
4
API.txt
4
API.txt
@ -1486,7 +1486,7 @@ output: Output('summary', (<type 'unicode'>, <type 'NoneType'>), 'User-friendly
|
|||||||
output: Output('result', <type 'dict'>, 'list of deletions that failed')
|
output: Output('result', <type 'dict'>, 'list of deletions that failed')
|
||||||
output: Output('value', <type 'unicode'>, "The primary_key value of the entry, e.g. 'jdoe' for a user")
|
output: Output('value', <type 'unicode'>, "The primary_key value of the entry, e.g. 'jdoe' for a user")
|
||||||
command: hostgroup_find
|
command: hostgroup_find
|
||||||
args: 1,17,4
|
args: 1,19,4
|
||||||
arg: Str('criteria?', noextrawhitespace=False)
|
arg: Str('criteria?', noextrawhitespace=False)
|
||||||
option: Str('cn', attribute=True, autofill=False, cli_name='hostgroup_name', label=Gettext('Host-group', domain='ipa', localedir=None), multivalue=False, normalizer=<lambda>, primary_key=True, query=True, required=False)
|
option: Str('cn', attribute=True, autofill=False, cli_name='hostgroup_name', label=Gettext('Host-group', domain='ipa', localedir=None), multivalue=False, normalizer=<lambda>, primary_key=True, query=True, required=False)
|
||||||
option: Str('description', attribute=True, autofill=False, cli_name='desc', label=Gettext('Description', domain='ipa', localedir=None), multivalue=False, query=True, required=False)
|
option: Str('description', attribute=True, autofill=False, cli_name='desc', label=Gettext('Description', domain='ipa', localedir=None), multivalue=False, query=True, required=False)
|
||||||
@ -1501,6 +1501,8 @@ option: List('hostgroup?', cli_name='hostgroups', label=Gettext('host group', do
|
|||||||
option: List('no_hostgroup?', cli_name='no_hostgroups', label=Gettext('host group', domain='ipa', localedir=None), multivalue=True)
|
option: List('no_hostgroup?', cli_name='no_hostgroups', label=Gettext('host group', domain='ipa', localedir=None), multivalue=True)
|
||||||
option: List('in_hostgroup?', cli_name='in_hostgroups', label=Gettext('host group', domain='ipa', localedir=None), multivalue=True)
|
option: List('in_hostgroup?', cli_name='in_hostgroups', label=Gettext('host group', domain='ipa', localedir=None), multivalue=True)
|
||||||
option: List('not_in_hostgroup?', cli_name='not_in_hostgroups', label=Gettext('host group', domain='ipa', localedir=None), multivalue=True)
|
option: List('not_in_hostgroup?', cli_name='not_in_hostgroups', label=Gettext('host group', domain='ipa', localedir=None), multivalue=True)
|
||||||
|
option: List('in_netgroup?', cli_name='in_netgroups', label=Gettext('netgroup', domain='ipa', localedir=None), multivalue=True)
|
||||||
|
option: List('not_in_netgroup?', cli_name='not_in_netgroups', label=Gettext('netgroup', domain='ipa', localedir=None), multivalue=True)
|
||||||
option: List('in_hbacrule?', cli_name='in_hbacrules', label=Gettext('HBAC rule', domain='ipa', localedir=None), multivalue=True)
|
option: List('in_hbacrule?', cli_name='in_hbacrules', label=Gettext('HBAC rule', domain='ipa', localedir=None), multivalue=True)
|
||||||
option: List('not_in_hbacrule?', cli_name='not_in_hbacrules', label=Gettext('HBAC rule', domain='ipa', localedir=None), multivalue=True)
|
option: List('not_in_hbacrule?', cli_name='not_in_hbacrules', label=Gettext('HBAC rule', domain='ipa', localedir=None), multivalue=True)
|
||||||
option: List('in_sudorule?', cli_name='in_sudorules', label=Gettext('sudo rule', domain='ipa', localedir=None), multivalue=True)
|
option: List('in_sudorule?', cli_name='in_sudorules', label=Gettext('sudo rule', domain='ipa', localedir=None), multivalue=True)
|
||||||
|
@ -65,7 +65,7 @@ class hostgroup(LDAPObject):
|
|||||||
uuid_attribute = 'ipauniqueid'
|
uuid_attribute = 'ipauniqueid'
|
||||||
attribute_members = {
|
attribute_members = {
|
||||||
'member': ['host', 'hostgroup'],
|
'member': ['host', 'hostgroup'],
|
||||||
'memberof': ['hostgroup', 'hbacrule', 'sudorule'],
|
'memberof': ['hostgroup', 'netgroup', 'hbacrule', 'sudorule'],
|
||||||
'memberindirect': ['host', 'hostgroup'],
|
'memberindirect': ['host', 'hostgroup'],
|
||||||
'memberofindirect': ['hostgroup', 'hbacrule', 'sudorule'],
|
'memberofindirect': ['hostgroup', 'hbacrule', 'sudorule'],
|
||||||
}
|
}
|
||||||
|
@ -83,6 +83,7 @@ class test_hostgroup(Declarative):
|
|||||||
objectclass=objectclasses.hostgroup,
|
objectclass=objectclasses.hostgroup,
|
||||||
description=[u'Test hostgroup 1'],
|
description=[u'Test hostgroup 1'],
|
||||||
ipauniqueid=[fuzzy_uuid],
|
ipauniqueid=[fuzzy_uuid],
|
||||||
|
memberof_netgroup=[hostgroup1],
|
||||||
mepmanagedentry=lambda x: [DN(i) for i in x] == \
|
mepmanagedentry=lambda x: [DN(i) for i in x] == \
|
||||||
[DN(('cn',hostgroup1),('cn','ng'),('cn','alt'),
|
[DN(('cn',hostgroup1),('cn','ng'),('cn','alt'),
|
||||||
api.env.basedn)],
|
api.env.basedn)],
|
||||||
@ -146,6 +147,7 @@ class test_hostgroup(Declarative):
|
|||||||
'cn': [hostgroup1],
|
'cn': [hostgroup1],
|
||||||
'description': [u'Test hostgroup 1'],
|
'description': [u'Test hostgroup 1'],
|
||||||
'member_host': [fqdn1],
|
'member_host': [fqdn1],
|
||||||
|
'memberof_netgroup': [hostgroup1],
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
@ -162,6 +164,7 @@ class test_hostgroup(Declarative):
|
|||||||
'member_host': [u'testhost1.%s' % api.env.domain],
|
'member_host': [u'testhost1.%s' % api.env.domain],
|
||||||
'cn': [hostgroup1],
|
'cn': [hostgroup1],
|
||||||
'description': [u'Test hostgroup 1'],
|
'description': [u'Test hostgroup 1'],
|
||||||
|
'memberof_netgroup': [hostgroup1],
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
@ -180,6 +183,7 @@ class test_hostgroup(Declarative):
|
|||||||
'member_host': [u'testhost1.%s' % api.env.domain],
|
'member_host': [u'testhost1.%s' % api.env.domain],
|
||||||
'cn': [hostgroup1],
|
'cn': [hostgroup1],
|
||||||
'description': [u'Test hostgroup 1'],
|
'description': [u'Test hostgroup 1'],
|
||||||
|
'memberof_netgroup': [hostgroup1],
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
@ -198,6 +202,7 @@ class test_hostgroup(Declarative):
|
|||||||
cn=[hostgroup1],
|
cn=[hostgroup1],
|
||||||
description=[u'Updated hostgroup 1'],
|
description=[u'Updated hostgroup 1'],
|
||||||
member_host=[u'testhost1.%s' % api.env.domain],
|
member_host=[u'testhost1.%s' % api.env.domain],
|
||||||
|
memberof_netgroup=[hostgroup1],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
@ -214,6 +219,7 @@ class test_hostgroup(Declarative):
|
|||||||
'member_host': [u'testhost1.%s' % api.env.domain],
|
'member_host': [u'testhost1.%s' % api.env.domain],
|
||||||
'cn': [hostgroup1],
|
'cn': [hostgroup1],
|
||||||
'description': [u'Updated hostgroup 1'],
|
'description': [u'Updated hostgroup 1'],
|
||||||
|
'memberof_netgroup': [hostgroup1],
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
@ -236,6 +242,7 @@ class test_hostgroup(Declarative):
|
|||||||
'dn': lambda x: DN(x) == dn1,
|
'dn': lambda x: DN(x) == dn1,
|
||||||
'cn': [hostgroup1],
|
'cn': [hostgroup1],
|
||||||
'description': [u'Updated hostgroup 1'],
|
'description': [u'Updated hostgroup 1'],
|
||||||
|
'memberof_netgroup': [hostgroup1],
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
@ -705,6 +705,7 @@ class test_nesting(Declarative):
|
|||||||
objectclass=objectclasses.hostgroup,
|
objectclass=objectclasses.hostgroup,
|
||||||
description=[u'Test hostgroup 1'],
|
description=[u'Test hostgroup 1'],
|
||||||
ipauniqueid=[fuzzy_uuid],
|
ipauniqueid=[fuzzy_uuid],
|
||||||
|
memberof_netgroup=[hostgroup1],
|
||||||
mepmanagedentry=lambda x: [DN(i) for i in x] == \
|
mepmanagedentry=lambda x: [DN(i) for i in x] == \
|
||||||
[DN(('cn',hostgroup1),('cn','ng'),('cn','alt'),
|
[DN(('cn',hostgroup1),('cn','ng'),('cn','alt'),
|
||||||
api.env.basedn)],
|
api.env.basedn)],
|
||||||
@ -727,6 +728,7 @@ class test_nesting(Declarative):
|
|||||||
objectclass=objectclasses.hostgroup,
|
objectclass=objectclasses.hostgroup,
|
||||||
description=[u'Test hostgroup 2'],
|
description=[u'Test hostgroup 2'],
|
||||||
ipauniqueid=[fuzzy_uuid],
|
ipauniqueid=[fuzzy_uuid],
|
||||||
|
memberof_netgroup=[hostgroup2],
|
||||||
mepmanagedentry=lambda x: [DN(i) for i in x] == \
|
mepmanagedentry=lambda x: [DN(i) for i in x] == \
|
||||||
[DN(('cn',hostgroup2),('cn','ng'),('cn','alt'),
|
[DN(('cn',hostgroup2),('cn','ng'),('cn','alt'),
|
||||||
api.env.basedn)],
|
api.env.basedn)],
|
||||||
@ -753,6 +755,7 @@ class test_nesting(Declarative):
|
|||||||
'cn': [hostgroup2],
|
'cn': [hostgroup2],
|
||||||
'description': [u'Test hostgroup 2'],
|
'description': [u'Test hostgroup 2'],
|
||||||
'member_host': [fqdn1],
|
'member_host': [fqdn1],
|
||||||
|
'memberof_netgroup': [hostgroup2],
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
@ -776,6 +779,7 @@ class test_nesting(Declarative):
|
|||||||
'cn': [hostgroup1],
|
'cn': [hostgroup1],
|
||||||
'description': [u'Test hostgroup 1'],
|
'description': [u'Test hostgroup 1'],
|
||||||
'member_hostgroup': [hostgroup2],
|
'member_hostgroup': [hostgroup2],
|
||||||
|
'memberof_netgroup': [hostgroup1],
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
@ -791,6 +795,7 @@ class test_nesting(Declarative):
|
|||||||
'dn': lambda x: DN(x) == hgdn1,
|
'dn': lambda x: DN(x) == hgdn1,
|
||||||
'memberindirect_host': [u'testhost1.%s' % api.env.domain],
|
'memberindirect_host': [u'testhost1.%s' % api.env.domain],
|
||||||
'member_hostgroup': [hostgroup2],
|
'member_hostgroup': [hostgroup2],
|
||||||
|
'memberof_netgroup': [hostgroup1],
|
||||||
'cn': [hostgroup1],
|
'cn': [hostgroup1],
|
||||||
'description': [u'Test hostgroup 1'],
|
'description': [u'Test hostgroup 1'],
|
||||||
},
|
},
|
||||||
|
@ -188,6 +188,7 @@ class test_netgroup(Declarative):
|
|||||||
cn=[hostgroup1],
|
cn=[hostgroup1],
|
||||||
objectclass=objectclasses.hostgroup,
|
objectclass=objectclasses.hostgroup,
|
||||||
description=[u'Test hostgroup 1'],
|
description=[u'Test hostgroup 1'],
|
||||||
|
memberof_netgroup=[hostgroup1],
|
||||||
mepmanagedentry=lambda x: [DN(i) for i in x] == \
|
mepmanagedentry=lambda x: [DN(i) for i in x] == \
|
||||||
[DN(('cn',hostgroup1),('cn','ng'),('cn','alt'),
|
[DN(('cn',hostgroup1),('cn','ng'),('cn','alt'),
|
||||||
api.env.basedn)],
|
api.env.basedn)],
|
||||||
|
Loading…
Reference in New Issue
Block a user