api_exported's operation_name parameter is redundant

Bug #987635 reported by Julian Edwards
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
MAAS
Fix Released
Low
Julian Edwards

Bug Description

There are no instances of this decorator where the operation name is anything other than the same as the method it's decorating. Let's just get rid of it.

Tags: tech-debt

Related branches

Changed in maas:
status: New → Triaged
importance: Undecided → Low
tags: added: tech-debt
Revision history for this message
Raphaël Badin (rvb) wrote :

That's not entirely true: AnonFilesHandler and FilesHandler both expose an API method named 'get' and the actual python method is a (module level) utility method name get_file. Nontheless, since it's the only instance, we can rename that method and get rid of the operation_name parameter.

Revision history for this message
Julian Edwards (julian-edwards) wrote : Re: [Bug 987635] Re: api_exported's operation_name parameter is redundant

On Friday 27 April 2012 15:52:47 you wrote:
> That's not entirely true: AnonFilesHandler and FilesHandler both expose
> an API method named 'get' and the actual python method is a (module
> level) utility method name get_file. Nontheless, since it's the only
> instance, we can rename that method and get rid of the operation_name
> parameter.

Actually my plan is to make an optional "as=" parameter so you can override it
if you really want. This will be useful for backwardly compatible API changes
in the future.

Revision history for this message
Julian Edwards (julian-edwards) wrote :

Actually I can just rename operation_name to export_as (so it's consistent with LP) and make it optional.

Changed in maas:
status: Triaged → In Progress
assignee: nobody → Julian Edwards (julian-edwards)
Raphaël Badin (rvb)
Changed in maas:
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.