You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cloudstack.apache.org by "Ove Everlid (JIRA)" <ji...@apache.org> on 2013/02/15 13:21:12 UTC
[jira] [Created] (CLOUDSTACK-1294) default arguments in the
__init__ function signature in the python API binding Cmd(...) class
Ove Everlid created CLOUDSTACK-1294:
---------------------------------------
Summary: 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
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 is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira