hostgroup: Selected PEP8 fixes for the hostgroup plugin

Part of: https://fedorahosted.org/freeipa/ticket/3979

Reviewed-By: Petr Viktorin <pviktori@redhat.com>
Reviewed-By: Petr Vobornik <pvoborni@redhat.com>
Reviewed-By: Alexander Bokovoy <abokovoy@redhat.com>
This commit is contained in:
Tomas Babej 2014-08-01 12:15:07 +02:00 committed by Martin Kosek
parent ce42bf282f
commit 6e94d23a92

View File

@ -67,6 +67,7 @@ def get_complete_hostgroup_member_list(hostgroup):
register = Registry()
@register()
class hostgroup(LDAPObject):
"""
@ -177,7 +178,6 @@ class hostgroup(LDAPObject):
entry_attrs['memberof'].remove(member)
@register()
class hostgroup_add(LDAPCreate):
__doc__ = _('Add a new hostgroup.')
@ -197,9 +197,9 @@ class hostgroup_add(LDAPCreate):
# when enabled, a managed netgroup is created for every hostgroup
# make sure that the netgroup can be created
api.Object['netgroup'].get_dn_if_exists(keys[-1])
raise errors.DuplicateEntry(message=unicode(_(\
u'netgroup with name "%s" already exists. ' \
u'Hostgroups and netgroups share a common namespace'\
raise errors.DuplicateEntry(message=unicode(_(
u'netgroup with name "%s" already exists. '
u'Hostgroups and netgroups share a common namespace'
) % keys[-1]))
except errors.NotFound:
pass
@ -217,8 +217,6 @@ class hostgroup_add(LDAPCreate):
return dn
@register()
class hostgroup_del(LDAPDelete):
__doc__ = _('Delete a hostgroup.')
@ -226,7 +224,6 @@ class hostgroup_del(LDAPDelete):
msg_summary = _('Deleted hostgroup "%(value)s"')
@register()
class hostgroup_mod(LDAPUpdate):
__doc__ = _('Modify a hostgroup.')
@ -239,7 +236,6 @@ class hostgroup_mod(LDAPUpdate):
return dn
@register()
class hostgroup_find(LDAPSearch):
__doc__ = _('Search for hostgroups.')
@ -257,7 +253,6 @@ class hostgroup_find(LDAPSearch):
return truncated
@register()
class hostgroup_show(LDAPRetrieve):
__doc__ = _('Display information about a hostgroup.')
@ -268,7 +263,6 @@ class hostgroup_show(LDAPRetrieve):
return dn
@register()
class hostgroup_add_member(LDAPAddMember):
__doc__ = _('Add members to a hostgroup.')
@ -279,7 +273,6 @@ class hostgroup_add_member(LDAPAddMember):
return (completed, dn)
@register()
class hostgroup_remove_member(LDAPRemoveMember):
__doc__ = _('Remove members from a hostgroup.')