Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Display the VCH Management API version on plugin summary page #586

Closed
zjs opened this issue Aug 30, 2018 · 6 comments
Closed

Display the VCH Management API version on plugin summary page #586

zjs opened this issue Aug 30, 2018 · 6 comments
Assignees
Labels
component/plugin/h5c The plugin for the vSphere HTML5 client kind/enhancement Behavior that was intended, but we want to make better severity/3-moderate Medium usability or functional impact. Potentially has an inconvenient workaround. status/need-info Additional information is needed to make progress

Comments

@zjs
Copy link
Member

zjs commented Aug 30, 2018

As described in vmware/vic-product#1952, display the version of the VCH Management API the plugin is communicating with on the plugin's "summary" page, near where the plugin version is displayed.

As the user is not able to select which API server to use (#572), providing this information may greatly aid debugging when multiple versions of API servers are available.

@zjs zjs added kind/enhancement Behavior that was intended, but we want to make better component/plugin/h5c The plugin for the vSphere HTML5 client severity/3-moderate Medium usability or functional impact. Potentially has an inconvenient workaround. labels Aug 30, 2018
@zhoumeina
Copy link
Contributor

@zjs, Do you mean the version of this api: https://10.193.25.225/ui/vic/rest/services/get-vic-appliances

@zhoumeina
Copy link
Contributor

image

@zhoumeina
Copy link
Contributor

@zjs Is my understanding correct? @lweitzman , is this design ok?
Or call it :
VCH Versions:
XXX
XXX

@zjs
Copy link
Member Author

zjs commented Sep 7, 2018

Do you mean the version of this api: https://10.193.25.225/ui/vic/rest/services/get-vic-appliances

I'm not sure where that API sources its data from. If it's from the metadata on the VM, I worry that there are cases where it might be inaccurate.

I think the safest way to get the API server version is from the API server itself (from the /version API endpoint).

The code would be equivalent to this, but would call /container/version instead of /container/hello:

public verifyVicMachineApiEndpoint(): Observable<any | null> {
return this.getVicApplianceIp()
.catch((err: Error) => {
return Observable.throw({
type: 'vm_not_found'
});
})
.switchMap(ip => {
return this.http.get(`https://${ip}:8443/container/hello`)
.catch((err: Response) => {
console.error(err);
// network error. details are not visible in the browser level
// however, we are fairly confident in most cases that this is caused by the
// self-signed SSL certificate being blocked by the browser
if (err.status === 0) {
return Observable.throw({
type: 'ssl_cert',
payload: ip
});
}
// handle http response status codes such as 404, 500, etc.
return Observable.throw({
type: 'other',
payload: err
});
})
.map(response => ip);
});
}

I suspect there's a simple refactoring that would avoid duplication between verifyVicMachineApiEndpoint and the new method (getVicApplianceVersion?).

VIC Appliance Version

Strictly speaking, this is the VCH Management API endpoint version. The VIC OVA (aka VIC Appliance) actually has a separate version number.

@zjs
Copy link
Member Author

zjs commented Sep 10, 2018

Marking as need info: we need to confirm whether this is required for 1.4.3.

@zjs zjs added the status/need-info Additional information is needed to make progress label Sep 10, 2018
@zhoumeina
Copy link
Contributor

fixed by:#598

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component/plugin/h5c The plugin for the vSphere HTML5 client kind/enhancement Behavior that was intended, but we want to make better severity/3-moderate Medium usability or functional impact. Potentially has an inconvenient workaround. status/need-info Additional information is needed to make progress
Projects
None yet
Development

No branches or pull requests

2 participants