Re: [Freeipa-devel] [PATCH] 315 Added commands into metadata.
On 12/6/2011 4:02 PM, Rob Crittenden wrote: Web UI - ACK. Server side - seems fine - I would give it an ACK, but I'm not sure if I'm the right person for it. I think this is too radical a change. We can only bump the minor version in this release so while the api can be modified it still needs to be backwards compatible. New patch attached. The existing arguments are retained, new options are added. ACK on framework changes. Pushed to master. -- Endi S. Dewata ___ Freeipa-devel mailing list Freeipa-devel@redhat.com https://www.redhat.com/mailman/listinfo/freeipa-devel
Re: [Freeipa-devel] [PATCH] 315 Added commands into metadata.
Endi Sukma Dewata wrote: On 12/6/2011 10:30 AM, Rob Crittenden wrote: Updated patch attached. Web UI - ACK. Server side - seems fine - I would give it an ACK, but I'm not sure if I'm the right person for it. I think this is too radical a change. We can only bump the minor version in this release so while the api can be modified it still needs to be backwards compatible. New patch attached. The existing arguments are retained, new options are added. ACK on framework changes. rob ___ Freeipa-devel mailing list Freeipa-devel@redhat.com https://www.redhat.com/mailman/listinfo/freeipa-devel
Re: [Freeipa-devel] [PATCH] 315 Added commands into metadata.
Petr Vobornik wrote: On 12/06/2011 06:38 AM, Endi Sukma Dewata wrote: On 11/18/2011 12:27 PM, Endi Sukma Dewata wrote: Now the methods metadata seem to be a subset of commands metadata, so we probably can change the UI to use commands metadata and not pull the methods metadata. I did this change in the updated patch. It seems to be working fine. In the JSON API itself the parameters are specified as options, so the order shouldn't matter to the UI. Is there a way to define the execute() using unordered keywords? I'm trying to avoid changing the method signature again in the future. I replaced takes_args with takes_options which takes care the ordering problem. I verified the old UI way of calling json_metadata still works. Updated patch attached. Web UI - ACK. Server side - seems fine - I would give it an ACK, but I'm not sure if I'm the right person for it. I think this is too radical a change. We can only bump the minor version in this release so while the api can be modified it still needs to be backwards compatible. rob ___ Freeipa-devel mailing list Freeipa-devel@redhat.com https://www.redhat.com/mailman/listinfo/freeipa-devel
Re: [Freeipa-devel] [PATCH] 315 Added commands into metadata.
On 12/06/2011 06:38 AM, Endi Sukma Dewata wrote: On 11/18/2011 12:27 PM, Endi Sukma Dewata wrote: Now the methods metadata seem to be a subset of commands metadata, so we probably can change the UI to use commands metadata and not pull the methods metadata. I did this change in the updated patch. It seems to be working fine. In the JSON API itself the parameters are specified as options, so the order shouldn't matter to the UI. Is there a way to define the execute() using unordered keywords? I'm trying to avoid changing the method signature again in the future. I replaced takes_args with takes_options which takes care the ordering problem. I verified the old UI way of calling json_metadata still works. Updated patch attached. Web UI - ACK. Server side - seems fine - I would give it an ACK, but I'm not sure if I'm the right person for it. -- Petr Vobornik ___ Freeipa-devel mailing list Freeipa-devel@redhat.com https://www.redhat.com/mailman/listinfo/freeipa-devel
Re: [Freeipa-devel] [PATCH] 315 Added commands into metadata.
On 11/18/2011 4:58 AM, Petr Vobornik wrote: On 11/17/2011 08:27 PM, Endi Sukma Dewata wrote: The json_metadata command has been modified to return the command metadata. The API.txt has been updated as well. Needed by ticket #388 ACK from UI perspective. Ipalib changes seems fine to me, but I'm not 100% sure. Note: this patch depends on edewata-314 which isn't ACKed yet. Note 2: I hope this is really needed. It adds 400KB of data to load at UI start. Kind of. The current json_metadata only returns objects and methods. The hbactest plugin is defined as a Command, so the metadata for this plugin will not be returned unless we add the metadata for all commands. HBAC test's metadata is needed to show translated labels in the UI. We can also redefine it in i18n_messages to avoid adding commands into json_metadata, but that will create duplicate labels. Now the methods metadata seem to be a subset of commands metadata, so we probably can change the UI to use commands metadata and not pull the methods metadata. On 11/18/2011 5:37 AM, Alexander Bokovoy wrote: -def execute(self, objname, methodname): +def execute(self, cmdname, objname, methodname): I don't like this particular change of order of arguments but as API.Command.json_metadata is only used in two (three now) places in ipa.js, it is acceptable -- there is practically no old Web UI anywhere as it is downloaded from the server. In the JSON API itself the parameters are specified as options, so the order shouldn't matter to the UI. Is there a way to define the execute() using unordered keywords? I'm trying to avoid changing the method signature again in the future. -- Endi S. Dewata ___ Freeipa-devel mailing list Freeipa-devel@redhat.com https://www.redhat.com/mailman/listinfo/freeipa-devel
Re: [Freeipa-devel] [PATCH] 315 Added commands into metadata.
On Thu, 17 Nov 2011, Endi Sukma Dewata wrote: > The json_metadata command has been modified to return the command > metadata. The API.txt has been updated as well. > > Needed by ticket #388 ... > --- a/ipalib/plugins/internal.py > +++ b/ipalib/plugins/internal.py > @@ -49,15 +52,25 @@ class json_metadata(Command): > ) > > has_output = ( > +Output('commands', dict, doc=_('Dict of JSON encoded IPA Commands')), > Output('objects', dict, doc=_('Dict of JSON encoded IPA Objects')), > Output('methods', dict, doc=_('Dict of JSON encoded IPA Methods')), > ) > > -def execute(self, objname, methodname): > +def execute(self, cmdname, objname, methodname): > +commands = dict() > objects = dict() > methods = dict() I don't like this particular change of order of arguments but as API.Command.json_metadata is only used in two (three now) places in ipa.js, it is acceptable -- there is practically no old Web UI anywhere as it is downloaded from the server. -- / Alexander Bokovoy ___ Freeipa-devel mailing list Freeipa-devel@redhat.com https://www.redhat.com/mailman/listinfo/freeipa-devel
Re: [Freeipa-devel] [PATCH] 315 Added commands into metadata.
On 11/17/2011 08:27 PM, Endi Sukma Dewata wrote: The json_metadata command has been modified to return the command metadata. The API.txt has been updated as well. Needed by ticket #388 ACK from UI perspective. Ipalib changes seems fine to me, but I'm not 100% sure. Note: this patch depends on edewata-314 which isn't ACKed yet. Note 2: I hope this is really needed. It adds 400KB of data to load at UI start. -- Petr Vobornik ___ Freeipa-devel mailing list Freeipa-devel@redhat.com https://www.redhat.com/mailman/listinfo/freeipa-devel