Comments (15)
Hi pvital, with proper server info designed which the front-end can retrieve from an API, I think this can be done as a filtered display mode. This means if the front-end can get the runtime detection info from the server by an API, we can either choose whether to display "Admin" tab or filtering different functinos that won't be activate in non-ppc machines.
from ginger.
We can use the Host API from kimchi (/host). The "cpu" info can be used to check if we're running in a POWER system or not by checking if this info has the string "POWER". This might be a bit inelegant but it solves the issue fast.
Using this API running in this Intel notebook:
$ curl -u danielhb -H "Content-Type: application/json" -H "Accept: application/json" http://localhost:8010/host -X GET
Enter host password for user 'danielhb':
{
"os_distro":"Fedora",
"cpu_model":"Intel(R) Core(TM) i5 CPU M 520 @ 2.40GHz",
"cpus":4,
"os_version":"20",
"os_codename":"Heisenbug",
"memory":6045294592
}
And in a POWER system:
$ curl -u root -H "Content-Type: application/json" -H "Accept: application/json" http://localhost:8010/host -X GET
Enter host password for user 'root':
{
(......)
"cpu":"POWER7+ (2.1) @ 4.228 GHz "
}
from ginger.
Is this feature aimed only for OPAL firmware? Shouldn't we be checking for firmware type, i.e. OPAL, instead of just CPU type?
from ginger.
Kimchi manages only machines running KVM. So I don't think we need to check whether it is OPAL or PowerVM (the other hypervisor available on Power systems).
from ginger.
wenwang1989, are you able to work in this issue? We need Ginger's UI to read the info of /host API to see if the host arch is Power and, if it's not, hide the Power exclusive features (IBM SEP and Firmware Update) from the user.
Thanks!
from ginger.
Hi dannielhb, I think I can do that. But also, one thing I considered is this Administrator, Ginger plugin, is made only for power. The way I understand this when people enable Ginger Administrator in a non-ppc machine, we need to hide some parts.
If "Administrator" is a tab only for power I don't think we need to hide anything cause x_86 user won't need this tab.
from ginger.
I am working in a mechanism, a new backend API, to properly tell the frontend which features to hide. It's not just a matter of Intel vs Power. There are features that even in Power should be hid if a certain package isn't present.
This is a preview of what I have at this moment. All the frontend needs to do is to send a GET to /plugins/ginger/capabilities and see which features are enabled or not. That way we relieve the UI to know specifics of the backend. If the feature is marked as "true", show it. Otherwise hide it:
$ curl -u danielhb -H "Content-Type: application/json" -H "Accept: application/json" http://localhost:8010/plugins/ginger/capabilities -X GET
Enter host password for user 'danielhb':
{
"PowerProfiles":false,
"Network":true,
"Sep":true,
"SanAdapters":true,
"Firmware":false,
"Sensors":false,
"Backup":true,
"Users":true
}
I'll ask you to wait for this API to be sent and approved by the ML before working in this issue. That way you'll change the code only once and we can control in the backend the behavior of the frontend.
from ginger.
Agreed. I can do this. I just checked that the end of 4th sprint is Dec. 16th which means we probably have no time for this feature in this release. I think we could add this work item in work item of the next release.
from ginger.
Yeah, it won't be ready for Dec 16th
from ginger.
@danielhb Let me know when you've done and I will do the rest work.
from ginger.
@wenwang1989 the capabilities API was just pushed to the master branch.
My suggestion is to get the contents from /plugins/ginger/capabilities and see which tabs the UI should show/hide. This values aren't supposed to change very often so it is OK to get the results once and then store it in the cache, expirating it when the session ends or the service restarts.
from ginger.
@danielhb Patch from UI side has been sent to mail list
from ginger.
@wenwang1989 thanks! I'll wait for a couple of reviews before pushing it. It would be great to have it upstream for this release!
from ginger.
@danielhb My pleasure!
from ginger.
@wenwang1989 patch works fine. Thanks!
from ginger.
Related Issues (20)
- HVM:Swap Devices: 'Adding' a /dev/dasd based swap device yields an error.
- HVM:Storage Devices panel 'Filter' sits at the 'Loading...' spinner
- Delete partition fails on multipath luns and iscsi devices HOT 1
- Create physical volume fails on dasd/iscsi/fclun partitions HOT 1
- FVT]: Network: Minor UI Observations in "Network Configuration" and "Add Adapter" panel
- Double popup issue after loading list of unloaded modules
- Frozen screen after loading module
- Cannot delete user when she doesn't have home directory
- Refresh button does not work for Administration->Users
- make check fails without sudo in opensuse 42.2
- check_i18n.py and tests are not included in dist tarball
- make check fails inside tarball F25
- Network Tab got problems with datatables on F25 HOT 3
- Translation not complete on F25
- Enable SMT configuration for ppc64 hosts
- Error while attaching interface to a ovs bridge and deleting the bridge
- make's error for SuSE and Fedora, and their patch
- [feature request] export function
- Version Update Needed
- plugin doesn't load
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ginger.