Container Orchestration Engine list should not be hardcoded

Bug #1568890 reported by Marcos Lobo
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Magnum UI
Triaged
Low
Shu Muto

Bug Description

The Container Orchestration Engine list, in "Create Baymodel" view, is hardcoded as you can see here
https://github.com/openstack/magnum-ui/blob/1.0.0/magnum_ui/static/dashboard/containers/baymodels/create/info/baymodel.info.controller.js#L42

I would propose to mode that list to local_settings file. I this way, you can configure which Container Orchestration Engines you want to expose in Horizon.

description: updated
Revision history for this message
hongbin (hongbin034) wrote :

@Brad, @Shu, What do you think about this proposal?

Revision history for this message
Shu Muto (shu-mutou) wrote :

@Hongbin, of cause, we don't want to hardcode COE list, Network driver list and Volume driver list.
I think, UI should get these lists from Magnum API. I had commented last of https://review.openstack.org/#/c/235620/ .
And @Yuanying is planning that Magnum API provide these fixed value using Swagger.
We should wait for Yuanying's plan, IMO.

Revision history for this message
Bradley Jones (bradjones) wrote :

I recognize hardcoding these values is an issue, I would suggest that getting the information from the Magnum API would be the best approach here as it doesn't involve any extra configuration steps. Depending on how long we are looking before @Yuanying implements this change we could look at this as an intermediary solution.

Revision history for this message
Marcos Lobo (marcos-fermin-lobo) wrote :

@shu-mutou, @bradjones I'm totally agree with you guys, IMO this list should be provided by Magnum API.

As @bradjones said, if @Yuanying's implementation takes a long time, probably we could start whit something intermediary.

I'd propose to mimic the future real Magnum API call, I explain. I'd code in the Magnum-UI all the method calls chain (python) and, in the last method, close to HTTP request call, just return the hardcoded list.

Example pseudo-code:
In https://github.com/openstack/magnum-ui/blob/master/magnum_ui/api/magnum.py
def get_coe_list():
    # Future API call
    # return magnumclient(request).coe.list()

    # Temp patch
    return [{name: "swarm", label: gettext("Docker Swarm")},
                 {name: "kubernetes", label: gettext("Kubernetes")},
                 {name: "mesos", label: gettext("Mesos")}];

Any comments?

Revision history for this message
Shu Muto (shu-mutou) wrote :

@Marcos, I basically agree with the mimic.

According to COE selection, Magnum-UI changes pull-down options for Network Driver and Volume Driver.
So not only COE list, let us care Network Driver list and Volume Driver list at the same time.

https://github.com/openstack/magnum-ui/blob/1.0.0/magnum_ui/static/dashboard/containers/baymodels/create/info/baymodel.info.controller.js#L47
https://github.com/openstack/magnum-ui/blob/1.0.0/magnum_ui/static/dashboard/containers/baymodels/create/info/baymodel.info.controller.js#L55

Revision history for this message
Marcos Lobo (marcos-fermin-lobo) wrote :

shu-mutou, I agree

Shu Muto (shu-mutou)
Changed in magnum-ui:
assignee: nobody → Shu Muto (shu-mutou)
importance: Undecided → Wishlist
status: New → Triaged
importance: Wishlist → Low
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.