On 2.6.2016 17:53, Martin Basti wrote:
> <snip>
>>>>>> Typo - redundant ' ' at the end.
>>>>>>
>>>>>>
>>>>>> Conditional NACK, warnings mentioned in
>>>>>> http://www.freeipa.org/page/V4/DNS_Location_Mechanism#CLI
>>>>>> are not there.
>>>>>>
>>>>>> I'm open to changing this to ACK if you open a separate ticket for this
>>>>>> omission so we do not forget to add them later on.
> I forgot to add, this will be in next batch of patches (you may see that there
> are not marked DNS servers in output of location show), I do not see reason to
> open ticket when the current one is not finished.
> 
>>>>>
>>>>> +1
>>>>>
>> Done
>>
>>>>>
>>>>> Patch 480:
>>>>>
>>>>> 1) The code in location_show.execute() looks like it could be moved to
>>>>> location_show.post_callback()
>>>>>
>> I had to add it to execute because I modifies result entry not just 
>> entry_attrs
>>
>>>>>
>>>>> 2) Before calling super().output_for_cli(), pop 'servers' from result, so
>>>>> that
>>>>> it is not displayed with --all.
>>>>>
>>>>>
>> Done
>>
>>>>> Patch 481:
>>>>>
>>>>> 1) Could we rename --force to --nonempty (or something better)? I would 
>>>>> like
>>>>> to reserve --force for "ignore NotFound when deleting the entry", which
>>>>> is not
>>>>> the case here.
>>>>
>>>> IMHO option is unnecessary. Just delete the location (and unset location 
>>>> from
>>>> all member servers). The design does not contain --force anyway :-)
>>>
>>> OK, that's even better :-)
>>>
>> Done
>>
>> Updated patches attached

I had to add top object class to the plugin and tests to make tests pass.
Patch is attached.

CondACK: Fix this before pushing somehow.

-- 
Petr^2 Spacek
diff --git a/ipalib/plugins/location.py b/ipalib/plugins/location.py
index 3bf97fa..cf61094 100644
--- a/ipalib/plugins/location.py
+++ b/ipalib/plugins/location.py
@@ -58,7 +58,7 @@ class location(LDAPObject):
     container_dn = api.env.container_locations
     object_name = _('location')
     object_name_plural = _('locations')
-    object_class = ['ipaLocationObject']
+    object_class = ['ipaLocationObject', 'top']
     search_attributes = ['idnsName']
     default_attributes = [
         'idnsname', 'description'
diff --git a/ipatests/test_xmlrpc/tracker/location_plugin.py b/ipatests/test_xmlrpc/tracker/location_plugin.py
index 5e9713c..086442d 100644
--- a/ipatests/test_xmlrpc/tracker/location_plugin.py
+++ b/ipatests/test_xmlrpc/tracker/location_plugin.py
@@ -73,7 +73,7 @@ class LocationTracker(Tracker):
             dn=self.dn,
             idnsname=[self.idnsname_obj],
             description=[self.description],
-            objectclass=[u'ipaLocationObject'],
+            objectclass=[u'ipaLocationObject', u'top'],
         )
         self.exists = True
 
-- 
Manage your subscription for the Freeipa-devel mailing list:
https://www.redhat.com/mailman/listinfo/freeipa-devel
Contribute to FreeIPA: http://www.freeipa.org/page/Contribute/Code

Reply via email to