summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTomas Babej <tbabej@redhat.com>2014-08-01 12:15:07 +0200
committerTomas Babej <tbabej@redhat.com>2014-09-17 14:41:50 +0200
commit38f7933e2857ef5dd33386d4c51417c33d1b54c5 (patch)
treeb510dc042bc2c12b12f0972488202f0de599e1bd
parent1909bfc5c1eef8840efe26e5331f4c96d07b60c4 (diff)
downloadfreeipa-38f7933e2857ef5dd33386d4c51417c33d1b54c5.zip
freeipa-38f7933e2857ef5dd33386d4c51417c33d1b54c5.tar.gz
freeipa-38f7933e2857ef5dd33386d4c51417c33d1b54c5.tar.xz
hostgroup: Selected PEP8 fixes for the hostgroup plugin
Part of: https://fedorahosted.org/freeipa/ticket/3979
-rw-r--r--ipalib/plugins/hostgroup.py15
1 files changed, 4 insertions, 11 deletions
diff --git a/ipalib/plugins/hostgroup.py b/ipalib/plugins/hostgroup.py
index 276d1ef..4007940 100644
--- a/ipalib/plugins/hostgroup.py
+++ b/ipalib/plugins/hostgroup.py
@@ -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.')