From 8f7674515c00ea3878ace146bc564cda64823b05 Mon Sep 17 00:00:00 2001 From: Martin Kosek Date: Jul 27 2011 16:23:24 +0000 Subject: Fix automountkey commands summary The summary value was set to primary key. However, the primary key may contain also an info option as a workaround for multiple direct maps problem. This patch sets the result 'value' and thus summary text to expected and consistent value. https://fedorahosted.org/freeipa/ticket/1524 --- diff --git a/ipalib/plugins/automount.py b/ipalib/plugins/automount.py index 8465ef3..8f850ad 100644 --- a/ipalib/plugins/automount.py +++ b/ipalib/plugins/automount.py @@ -705,7 +705,9 @@ class automountkey_add(LDAPCreate): options[self.obj.primary_key.name] = self.obj.get_pk( options['automountkey'], options['automountinformation']) - return super(automountkey_add, self).execute(*keys, **options) + result = super(automountkey_add, self).execute(*keys, **options) + result['value'] = options['automountkey'] + return result api.register(automountkey_add) @@ -772,7 +774,9 @@ class automountkey_del(LDAPDelete): options[self.obj.primary_key.name] = self.obj.get_pk( options['automountkey'], options['automountinformation']) - return super(automountkey_del, self).execute(*keys, **options) + result = super(automountkey_del, self).execute(*keys, **options) + result['value'] = options['automountkey'] + return result api.register(automountkey_del) @@ -808,7 +812,9 @@ class automountkey_mod(LDAPUpdate): options[self.obj.primary_key.name] = self.obj.get_pk( options['automountkey'], options['automountinformation']) - return super(automountkey_mod, self).execute(*keys, **options) + result = super(automountkey_mod, self).execute(*keys, **options) + result['value'] = options['automountkey'] + return result api.register(automountkey_mod) @@ -852,6 +858,8 @@ class automountkey_show(LDAPRetrieve): options[self.obj.primary_key.name] = self.obj.get_pk( options['automountkey'], options['automountinformation']) - return super(automountkey_show, self).execute(*keys, **options) + result = super(automountkey_show, self).execute(*keys, **options) + result['value'] = options['automountkey'] + return result api.register(automountkey_show)