On Wed, 2011-07-27 at 10:35 -0400, Rob Crittenden wrote:
> Martin Kosek wrote:
> > On Wed, 2011-07-27 at 11:28 +0200, Martin Kosek wrote:
> >> The summary value was set to invalid primary key - automount map
> >> instead of automount key.
> >>
> >> https://fedorahosted.org/freeipa/ticket/1524
> >>
> >
> > The other commands' summary may be wrong in some cases as well. Updated
> > patch fixes summary for all automountkey commands.
> >
> > Martin
> 
> nack
> 
> ipalib/plugins/automount.py:926: [E0602, automountkey_show.execute] 
> Undefined variable 'key'
> 
> I think you meant to set result['value'] = options['automountkey']
> 
> rob

Ah, that's embarrassing. That happens when one makes "just one small
change before commit". Attaching fixed patch.

Martin
>From 99f774b742e27c6a153f2c70624229e41f9994c0 Mon Sep 17 00:00:00 2001
From: Martin Kosek <mko...@redhat.com>
Date: Wed, 27 Jul 2011 11:24:04 +0200
Subject: [PATCH] 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
---
 ipalib/plugins/automount.py |   16 ++++++++++++----
 1 files changed, 12 insertions(+), 4 deletions(-)

diff --git a/ipalib/plugins/automount.py b/ipalib/plugins/automount.py
index d692b2c866f787f46623abb01dad87e560a9c797..1879c56c0f724b3c0d42b4ae331d8cc0ea1c57d0 100644
--- a/ipalib/plugins/automount.py
+++ b/ipalib/plugins/automount.py
@@ -761,7 +761,9 @@ class automountkey_add(LDAPCreate):
         else:
             options[self.obj.primary_key.name] = self.obj.get_pk(key, None)
         options['add_operation'] = True
-        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)
 
@@ -828,7 +830,9 @@ class automountkey_del(LDAPDelete):
         options[self.obj.primary_key.name] = self.obj.get_pk(
                                             options['automountkey'],
                                             options.get('automountinformation', None))
-        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)
 
@@ -864,7 +868,9 @@ class automountkey_mod(LDAPUpdate):
         options[self.obj.primary_key.name] = self.obj.get_pk(
                                             options['automountkey'],
                                             options.get('automountinformation', None))
-        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)
 
@@ -909,6 +915,8 @@ class automountkey_show(LDAPRetrieve):
                                             options['automountkey'],
                                             options.get('automountinformation', None))
 
-        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)
-- 
1.7.6

_______________________________________________
Freeipa-devel mailing list
Freeipa-devel@redhat.com
https://www.redhat.com/mailman/listinfo/freeipa-devel

Reply via email to