> -----Original Message----- > From: Alex Huang [mailto:alex.hu...@citrix.com] > Sent: Thursday, April 04, 2013 3:29 PM > To: dev@cloudstack.apache.org > Subject: RE: [DISCUSS] RESTful API for CloudStack agents > > > We made a messy cloudstack API already, and it's hard to get rid of > > it, as a lot of clients((UI/marvin/jcloud, other cloudstack bindings)) > > are using this APIs already. > > We shouldn't make the mistake again, assuming that only AgentManager > > will use this agent APIs. > > > > First, I don't think making things REST automatically makes it not messy. For > example, I don't see how REST would make VM any simpler than the start vm > command today because startvm command already contains a vm resource > in it. Second, this is the southbound api not the northbound. I generally > think our northbound api is a few magnitude messier than the southbound > api.
I am not saying RESTful API will solve everything, but the follow the RESTful paradigm may help to clean up the APIs. For example, we have AddHostCmd and CreateStoragePoolCmd, the verb(Add and Create) may cause confusion. While if using RESTful API, POST is the well defined verb for this operation. And RESTful API can represent relationship between resources more intuitively. GET VM/vm-id/disks/, will list all the disks related to a VM, instead of listVolumes?vm-id= > > I think it makes sense to have full fledge REST APIs for full fledge services. > The hypervisor resources are not really full fledge services. > > --Alex