[ 
https://issues.apache.org/jira/browse/CLOUDSTACK-1294?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Daan Hoogland closed CLOUDSTACK-1294.
-------------------------------------
    Resolution: Won't Fix

> default arguments in the __init__ function signature in the python API 
> binding <xyz>Cmd(...) class
> --------------------------------------------------------------------------------------------------
>
>                 Key: CLOUDSTACK-1294
>                 URL: https://issues.apache.org/jira/browse/CLOUDSTACK-1294
>             Project: CloudStack
>          Issue Type: New Feature
>      Security Level: Public(Anyone can view this level - this is the 
> default.) 
>         Environment: 4.0/4.1/4.2
>            Reporter: Ove Everlid
>            Priority: Minor
>              Labels: api
>
> enhance the API binding code generator to add default arguments to the 
> __init__ methods.
> This adds convenience in context where using a named instance of the 
> xyzCmd(...) class is not needed.
> Style with named instance;
>         phynet = createPhysicalNetwork.createPhysicalNetworkCmd()
>         phynet.zoneid = zoneid
>         phynet.name = net.name
>         phynetwrk = self.apiClient.createPhysicalNetwork(phynet)
> Style with anonymous instance;    
>        phynetwrk = self.apiClient.createPhysicalNetwork(
>           createPhysicalNetwork.createPhysicalNetworkCmd(
>               zoneid=zoneid,
>               name = net.name
>           ))
> By adding the default arguments to function signature, the option is there to 
> use the anonymous style.
> The named instance style will not be affected.
> Good idea?



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Reply via email to