Commit Graph

3 Commits

Author SHA1 Message Date
Bence Romsics 705c52bf1f Trunks panel: eliminate spinner at create/edit
Change how the UI reacts to neutron responding to API requests.

Without this change when the user clicks create or edit:
* we display a spinner
* wait for the neutron to respond
* then we open the modal.

With this change:
* we open the modal immediately and
* send the request(s) to neutron asynchronously.
* We display a 'please wait' message in place of the relevant (but not
  all) input forms (or transfer tables) of the workflow steps.
* When neutron responds to each request we replace the 'please wait'
  message with the pre-filled input forms.

The latter is better experience for the user because he or she can
progress with parts of the workflow until the rest is loaded.

Partially-Implements: blueprint neutron-trunk-ui
Change-Id: I9ac8f75a390424ad05cf51fa679ef9803124179c
2018-01-24 13:44:33 +01:00
Bence Romsics e7505cfdf6 Trunks panel: simplify code for easier testing
The crossHide boolean flag was never a necessary part of the trunks
panel. The only downside of not having it is that we expose a data
structure between the step controllers even when that's not needed
(when crossHide previously was false).

Eliminating the if/else simplifies coverage testing in the followup
patch.

Change-Id: Id7b51997b48d2dd91057975c2fcfb2c40c33aa51
Partially-Implements: blueprint neutron-trunk-ui
2018-01-11 14:24:27 +01:00
Bence Romsics 1ab4b498f2 Trunks panel: create button
Trunk creation is a 3-step workflow:
  * Basic trunk attributes
  * Parent port selector transfertable:
      Selects a single port (mandatory)
  * Subports selector transfertable:
      Selects many ports with segmentation details (optional)

In the port selector steps reused and built on port allocator
transfertable from launch instance.

The easiest way to test is to take the whole change series by taking the
last change in it, then build devstack with neutron trunk support. Eg:

  local.conf:
  enable_plugin neutron https://git.openstack.org/openstack/neutron
  enable_service q-trunk

If you want to test this change in isolation you also need the following
Horizon config:

  openstack_dashboard/enabled/_1500_project_trunks_panel.py:
  DISABLED = False  # or just remove this line

As long as the 'trunk' API extension is available (openstack
extension show trunk) the panel should automatically appear under
Project/Network/Trunks.

To try the 'inherit' segmentation type the subports must be ports of
vlan type provider networks.

Co-Authored-By: Lajos Katona <lajos.katona@ericsson.com>
Co-Authored-By: Elod Illes <elod.illes@ericsson.com>
Change-Id: I663a7e0158335155fe11f0fc40d9fa86bf984ae0
Partially-Implements: blueprint neutron-trunk-ui
2017-11-27 14:05:43 +01:00