You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cloudstack.apache.org by Chip Childers <ch...@sungard.com> on 2013/09/06 21:32:31 UTC
Re: Questions about 4.2 RC - listVmwareDcs API
On Fri, Sep 06, 2013 at 06:30:52PM +0000, Jessica Wang wrote:
> > This API is called by UI to implement toggle effect for icon "Add/Remove VMware Datacenter".
>
> [Jesisca] No, listVmwareDcs API was called by UI to get VMware DataCenter info to display in zone detail page (which has 3 fields: "VMware dataCenter Name", "VMware dataCenter vcenter", "VMware dataCenter Id"), NOT to toggle effect for icon "Add/Remove VMware Datacenter".
>
>
> > [Chip] Shouldn't we consider making the UI respond appropriately to a missing API
> > (i.e.: don't show that feature if the API response to that call is an error saying that the API call doesn't exist)?
>
> [Jessica] There is no way for UI to know whether an API command is missing or not before calling it.
> After calling an API command, if API returns error "Unknown API command", UI will suppress the error message (i.e. UI will not pop up a dialog showing "Unknown API command").
> The error "Unknown API command" was seen in the log, NOT on UI.
> However, I just checked in an UI enhancement to skip calling listVmwareDcs API if a zone doesn't have any VMware cluster(s).
Sounds like a good workaround.
Perhaps a future enhancement would be to use the discovery service to
figure out what API's are being exposed by the specific management
server, and adjust the UI accordingly.
-chip
RE: Questions about 4.2 RC - listVmwareDcs API - Here's the
discovery API
Posted by Jessica Wang <Je...@citrix.com>.
Chip,
I just tested listApis and it worked! ^_^
Yes, this is enough and I'll change UI to use listApis to determine whether to call listVmwareDcs API in zone detail page.
Thanks!
Jessica
-----Original Message-----
From: Chip Childers [mailto:chip.childers@sungard.com]
Sent: Friday, September 06, 2013 1:49 PM
To: Jessica Wang
Cc: dev@cloudstack.apache.org; Animesh Chaturvedi; Edison Su; runseb@gmail.com; Sateesh Chodapuneedi
Subject: Re: Questions about 4.2 RC - listVmwareDcs API
On Fri, Sep 06, 2013 at 08:21:38PM +0000, Jessica Wang wrote:
> > [Chip] Perhaps a future enhancement would be to use the discovery service to figure out what API's are being exposed by the specific management server, and adjust the UI accordingly.
>
> [Jessica] +1
> It will be great if server-side is able to provide this info (what API's are being exposed).
> Then, yes, UI can definitely be adjusted accordingly.
Here's the discovery API ->
http://cloudstack.apache.org/docs/api/apidocs-4.1/root_admin/listApis.html
I think this would be enough for the functionality we're talking about,
right?
RE: Questions about 4.2 RC - listVmwareDcs API - Here's the
discovery API
Posted by Jessica Wang <Je...@citrix.com>.
Chip,
The downside of using listApis to detect whether an API command is being exposed is that an error will appear in the log (not on UI)
/client/api?command=listApis&name=listVmwareDcs
{
"listapisresponse": {
"uuidList": [],
"errorcode": 530,
"cserrorcode": 9999,
"errortext": "Api Discovery plugin was unable to find an api by that name or process any apis"
}
}
Jessica
-----Original Message-----
From: Jessica Wang
Sent: Friday, September 06, 2013 1:58 PM
To: 'Chip Childers'
Cc: dev@cloudstack.apache.org; Animesh Chaturvedi; Edison Su; runseb@gmail.com; Sateesh Chodapuneedi
Subject: RE: Questions about 4.2 RC - listVmwareDcs API - Here's the discovery API
Chip,
I just tested listApis and it worked! ^_^
Yes, this is enough and I'll change UI to use listApis to determine whether to call listVmwareDcs API in zone detail page.
Thanks!
Jessica
-----Original Message-----
From: Chip Childers [mailto:chip.childers@sungard.com]
Sent: Friday, September 06, 2013 1:49 PM
To: Jessica Wang
Cc: dev@cloudstack.apache.org; Animesh Chaturvedi; Edison Su; runseb@gmail.com; Sateesh Chodapuneedi
Subject: Re: Questions about 4.2 RC - listVmwareDcs API
On Fri, Sep 06, 2013 at 08:21:38PM +0000, Jessica Wang wrote:
> > [Chip] Perhaps a future enhancement would be to use the discovery service to figure out what API's are being exposed by the specific management server, and adjust the UI accordingly.
>
> [Jessica] +1
> It will be great if server-side is able to provide this info (what API's are being exposed).
> Then, yes, UI can definitely be adjusted accordingly.
Here's the discovery API ->
http://cloudstack.apache.org/docs/api/apidocs-4.1/root_admin/listApis.html
I think this would be enough for the functionality we're talking about,
right?
Re: Questions about 4.2 RC - listVmwareDcs API
Posted by Chip Childers <ch...@sungard.com>.
On Fri, Sep 06, 2013 at 08:21:38PM +0000, Jessica Wang wrote:
> > [Chip] Perhaps a future enhancement would be to use the discovery service to figure out what API's are being exposed by the specific management server, and adjust the UI accordingly.
>
> [Jessica] +1
> It will be great if server-side is able to provide this info (what API's are being exposed).
> Then, yes, UI can definitely be adjusted accordingly.
Here's the discovery API ->
http://cloudstack.apache.org/docs/api/apidocs-4.1/root_admin/listApis.html
I think this would be enough for the functionality we're talking about,
right?
RE: Questions about 4.2 RC - listVmwareDcs API
Posted by Jessica Wang <Je...@citrix.com>.
> [Chip] Perhaps a future enhancement would be to use the discovery service to figure out what API's are being exposed by the specific management server, and adjust the UI accordingly.
[Jessica] +1
It will be great if server-side is able to provide this info (what API's are being exposed).
Then, yes, UI can definitely be adjusted accordingly.
-----Original Message-----
From: Chip Childers [mailto:chip.childers@sungard.com]
Sent: Friday, September 06, 2013 12:33 PM
To: Jessica Wang
Cc: dev@cloudstack.apache.org; Animesh Chaturvedi; Edison Su; runseb@gmail.com; Sateesh Chodapuneedi
Subject: Re: Questions about 4.2 RC - listVmwareDcs API
On Fri, Sep 06, 2013 at 06:30:52PM +0000, Jessica Wang wrote:
> > This API is called by UI to implement toggle effect for icon "Add/Remove VMware Datacenter".
>
> [Jesisca] No, listVmwareDcs API was called by UI to get VMware DataCenter info to display in zone detail page (which has 3 fields: "VMware dataCenter Name", "VMware dataCenter vcenter", "VMware dataCenter Id"), NOT to toggle effect for icon "Add/Remove VMware Datacenter".
>
>
> > [Chip] Shouldn't we consider making the UI respond appropriately to a missing API
> > (i.e.: don't show that feature if the API response to that call is an error saying that the API call doesn't exist)?
>
> [Jessica] There is no way for UI to know whether an API command is missing or not before calling it.
> After calling an API command, if API returns error "Unknown API command", UI will suppress the error message (i.e. UI will not pop up a dialog showing "Unknown API command").
> The error "Unknown API command" was seen in the log, NOT on UI.
> However, I just checked in an UI enhancement to skip calling listVmwareDcs API if a zone doesn't have any VMware cluster(s).
Sounds like a good workaround.
Perhaps a future enhancement would be to use the discovery service to
figure out what API's are being exposed by the specific management
server, and adjust the UI accordingly.
-chip