Commit Graph

396 Commits

Author SHA1 Message Date
Enzo Candotti f04638e8f8 Add admin_password to mask_fields
This change adds the admin_password to the mask_fields in the
settings.py file, in order to prevent this password from being logged in
plain text.

Test Plan:
PASS: Apply this change and verify that in every user password change,
the admin_password is masked.

Closes-bug: 2058294

Signed-off-by: Enzo Candotti <enzo.candotti@windriver.com>
Change-Id: Iba80d682e7bd74c0903dd2f23334f3298229cb2e
2024-03-18 22:43:48 +00:00
Zuul 49a8a7a913 Merge "Fix Horizon crash on multiple unprovisioned hosts" 2024-03-13 13:43:51 +00:00
Davi Frossard fea758753b Remove "/v3" duplicate from OS_AUTH_URL
The filter "align_auth_url" is appending an extra (and hardcoded) "/v3".
This is causing wrong url for region == 'SystemController' at
starlingx-openrc.sh

TEST PLAN:
[PASS] Build, install
[PASS] Check if downloaded file shows correct endpoint for OS_AUTH_URL

Closes-Bug: 2056782

Change-Id: Ifb3c537e87573b7c710b8d94cd28ae232a14d2c9
Signed-off-by: Davi Frossard <dbarrosf@windriver.com>
2024-03-11 18:29:02 +00:00
Enzo Candotti ceec0af760 Fix Horizon crash on multiple unprovisioned hosts
This change fixes a problem that made Horizon to crash when there are
more than one unprovisioned host, in the Host Inventory dashboard.

Closes-Bug: 2055721

Test Plan:
PASS: Deploy a Standard system and add multiple unprovisioned hosts.
Verify that the Host Inventory dashboard is displayed correctly.

Signed-off-by: Enzo Candotti <enzo.candotti@windriver.com>
Change-Id: I68bdcfbc9f699d4c1f807500f1826560fb0c1eb9
2024-03-01 14:37:12 -03:00
Zuul 95e690315e Merge "Revert "Add the upload-only option to the Horizon upgrade orchestration UI"" 2024-02-06 18:35:49 +00:00
Christopher de Oliveira Souza 3dc04f2f69 Revert "Add the upload-only option to the Horizon upgrade orchestration UI"
This reverts commit b7955a50dc.

Reason for revert: this change no longer will be necessary

Change-Id: Ia3dc73452be1f429b1a50f2f969ea80cea16adb7
2024-02-06 17:05:01 +00:00
Zuul 3368e8241f Merge "Add the upload-only option to the Horizon upgrade orchestration UI" 2024-01-30 13:31:07 +00:00
Zuul 43ba49f2e0 Merge "Rename Cloud Patch Config & Subcloud group pages" 2024-01-24 17:36:28 +00:00
Agustin Carranza 151bdc4356 Rename Cloud Patch Config & Subcloud group pages
In order to improve the user experience, some labels have been modified
as part of the USM integration.

Test plan:
PASS: * Install starlingx-dashboard pkg in a DC deployment and restart
        horizon service.
      * Navigate to Distributed Cloud Admin -> Orchestration ->
        Subcloud Strategy Configurations.
      * Check new labels are showing 'Subcloud Strategy Configurations'
      * Test functionality (create, edit, delete).
PASS: * Navigate to Distributed Cloud Admin -> Orchestration ->
        Subcloud groups.
      * Check new labels are showing 'Subcloud groups'.
      * Test functionality (add, edit, delete).

Story: 2010676
Task: 49332
Task: 49333

Change-Id: Ic7bcfc20842d9a92c934fbb62bcff38d789e588c
Signed-off-by: Agustin Carranza <agustin.carranza@windriver.com>
2024-01-22 17:36:17 -03:00
Jorge Saffe 834c72fdb8 Adding support for Horizon FM CSV Reports
The Horizon interface has been enhanced with the addition of an
"Export" action (Button) on the Fault Management pages. This
feature allows for the comprehensive exportation of all
properties retrieved from the API, formatted as a CSV file.

Controllers have been integrated into the three Angular modules
of Fault Management (alarms, events, and event_suppression) to
facilitate data retrieval from the API, conversion to CSV format,
and subsequent download of the CSV file.

Test Plan:
 - PASS Runtime test on Standalone SX env:
   * Login as an admin user.
   * Download CSV reports for active alarms, events, and
     event-suppression.
   * Assess and confirm the CSV file contents.
   * Logout
   * Login with a user account with read-only permissions.
   * Download CSV reports for active alarms, events, and
     event-suppression.
   * Assess and confirm the CSV file contents

 - PASS Runtime test on DC env:
   * Login as an admin user.
   * Download CSV reports for active alarms, events, and
     event-suppression.
   * Assess and confirm the CSV file contents.
   * Logout
   * Login with a user account with read-only permissions.
   * Download CSV reports for active alarms, events, and
     event-suppression.
   * Assess and confirm the CSV file contents

Story: 2011009
Task: 49421

Change-Id: Id9e9b8971a31db8e8d1c8959af7769706fb492f5
Signed-off-by: Jorge Saffe <jorge.saffe@windriver.com>
2024-01-18 16:28:12 -03:00
Cristian Mondo de5edc47ce Update subcloud name only if it changes
As part of the subcloud renaming feature, it is possible to
change the name from the UI.

The API returns an error if the new name of the subcloud is
the same as the existing one, therefore this error is reflected
in the UI, preventing the ability to update the other parameters
when the name does not change.

This commit is to avoid sending the new subcloud name when it is
equal to the existing name. If some of the other parameters
change but not the subcloud name, only those other parameters
should be updated.

Story: 2010788
Task: 49287

PASS: Edit the subcloud, then click on submit to send the params
      without updates. The error should not appear informing
      that the subcloud name is the same.
PASS: Edit the subcloud, then update the name parameter with a
      new subcloud name. The subcloud name should be updated.
PASS: Edit the subcloud, then update other parameters without
      updating the subcloud name. The subcloud params should
      be updated successfully.

Change-Id: Idcb746b4bde3654062edaa69a11612439afe133f
Signed-off-by: Cristian Mondo <cristian.mondo@windriver.com>
2023-12-18 11:37:49 -03:00
Zuul df10b02e3e Merge "Update to_version field to return all kube versions" 2023-11-21 17:24:21 +00:00
Christopher Souza e113545cbc Update to_version field to return all kube versions
In this commit, the to_version field was updated to return
all kube versions and allow the user to install older versions.

Test Case:
PASS - Using Horizon, check all k8s are available under
drop-down menu.
PASS - Using Horizon, create and apply kube orchestration
with --to-version selecting a version available and verify
that the kube was upgraded to the correct version.


Closes-bug: 2043514

Change-Id: I72d5edd33188935e706649c8561b0d6eb7b9b6c6
Signed-off-by: Christopher Souza <Christopher.DeOliveiraSouza@windriver.com>
2023-11-16 11:02:40 +00:00
Zuul d51979ba5f Merge "Fix Horizon crash on a patch installation" 2023-11-06 15:55:41 +00:00
Wentao Zhang 7ce032a639 Fix the problem that patch upload fails of horizon
fb4c55d9ec
This commit disables FileField for uploading multiple files
directly and introduces a new method as a replacement.
the upgrade of python3-django from 2:2.2.28-1~deb11u1 to
2:2.2.28-1~deb11u2 includes this commit.
Replace FileField with MultipleFileField for uploading multiple files.
Refer to the method introduced in the commit to replace
the previous usage.

Test Plan
PASS: build-pkgs -c -p starlingx-dashboard && build-image
PASS: jenkins installation successfuly
PASS: upload a patch using Horizon Web interface successfully

Closes-Bug: 2042610

Change-Id: I7bb4a0db7621922e5f1c8811ec3f49be4a37d1a5
Signed-off-by: Wentao Zhang <wentao.zhang@windriver.com>
2023-11-03 23:28:07 +08:00
Enzo Candotti 7e8845bf25 Fix Horizon crash on a patch installation
When a patch installation is triggered on a locked host via Horizon,
it crashes redirecting to an error screen. The normal behaviour seen
using the CLI is just an error message saying that the host is unknown
because of being locked.

Horizon should show this error message instead of crashing. The root
cause is an issue during raising the ValueError expection, because
of an 'AttributeError' exception raised on the 'split_message'
function.

This commit fixes this problem by replacing the ValueError exception
with the Horizon error message function.

Closes-Bug: 2040495

Test Plan:
PASS: Build the starlingx-dashboard package, install it on a
system and verify the changes are applied correctly.
PASS: Execute test scenarios to receive errors in various
requests impacted by this function. Verify that the error message
is correctly displayed and logged.

Signed-off-by: Enzo Candotti <enzo.candotti@windriver.com>
Change-Id: Ia8cdce0b89be30abc632a8161201302cd9a51681
2023-11-03 11:46:10 -03:00
Christopher Souza b7955a50dc Add the upload-only option to the Horizon upgrade orchestration UI
This change adds the new DC upgrade orchestration upload-only option to
the upgrade orchestration UI. A new 'Upload Only' checkbox was added to
the 'Create Strategy' form when the selected strategy type is 'Upgrade'.

In the 'Orchestration Strategy' tab, if the current strategy is a upgrade
strategy, a new field 'Upload Only' with its current value is now shown
so that the user can know if an existing strategy is using this option.

Test Plan:
1. PASS - Verify that the 'Upload Only' checkbox appears correctly
          inside of the create strategy form only when the selected
          strategy type is equal to 'Upgrade';
2. PASS - Create a upgrade strategy with and without the upload-only
          option and verify that it gets created successfully;
3. PASS - Verify that the interface shows the 'Upload Only' field and
          its current value on the 'Orchestration Strategy' page only
          when using the patch and upgrade strategy type;
4. PASS - Create and delete another orchestration type (e.g. Kubernetes
          upgrade) through Horizon and verify that it still works as
          expected;

Depends-On: https://review.opendev.org/c/starlingx/distcloud-client/+/894169

Story: 2010676
Task: 48771

Change-Id: Id20dd42939165947eb377965557e9618e3b6b7ea
Signed-off-by: Christopher Souza <Christopher.DeOliveiraSouza@windriver.com>
2023-10-30 13:56:56 -03:00
Zuul 8121f7d24d Merge "Fix the problem that horizon launch fails due to python3-django upgrade" 2023-09-18 14:59:22 +00:00
Wentao Zhang b724f037f8 Fix the problem that horizon launch fails due to python3-django upgrade
fb4c55d9ec
This commit disables FileInput for uploading multiple files
directly and introduces a new method as a replacement.
the upgrade of python3-django from 2:2.2.28-1~deb11u1 to
2:2.2.28-1~deb11u2 includes this commit.
Refer to the method introduced in the commit to replace
the previous usage.

Test Plan
PASS: build-pkgs -c -p starlingx-dashboard && build-image
PASS: jenkins installation successfuly
PASS: horizon.service can been successfully loaded and restarted
      with python3-django 2:2.2.28-1~deb11u2

Closes-Bug: 2030473

Depends-On: https://review.opendev.org/c/starlingx/tools/+/894257

Change-Id: I5e07f3ec7e02090f1a04038c768a7e657131934e
Signed-off-by: Wentao Zhang <wentao.zhang@windriver.com>
2023-09-13 09:54:16 +08:00
Cristian Mondo 6b7d5ded67 Subcloud Name Reconfiguration
This change adds the capability to rename the subcloud after
bootstrap.
The "name" field is enabled in Horizon subcloud update form,
which allows to change the name of the subcloud.

Depends-On: https://review.opendev.org/c/starlingx/distcloud/+/885832

Test Plan:
    PASS: Update subcloud name from UI
    PASS: Change and check Subcloud status from UI

Story: 2010788
Task: 48218

Signed-off-by: Cristian Mondo <cristian.mondo@windriver.com>
Change-Id: Ibec87811c6355a623d15566efce3192719f819b9
2023-09-08 19:21:28 -03:00
Zuul 54a0486661 Merge "Fix Display Issue for vSwitch Hugepages" 2023-08-29 16:21:46 +00:00
fperez 99ece544e5 Fix for Horizon inventory in subclouds upgrade
When dealing with a subcloud where Centos and SystemController have
already been upgraded to Debian, Horizon encounters difficulties
loading Host Inventory and Software Management pages. This issue
arises due to variations in host attributes between different
versions.

To address this, any expected but missing attributes will be
assigned default values before loading the page.

Additionally, adding a fix for issues with sphinx version for this package

Test Plan:
- Select the target subcloud with the previous version. Navigate to
  Platform -> Host Inventory and confirm the successful loading of
  the Host table.
- Select the target subcloud. Navigate to Platform -> Host Inventory
  and confirm the ability to load the Edit Host modal and Host
  details.
- Select the target subcloud. Navigate to Platform -> Software
  Management and confirm the successful loading of patch details for
  this host.

closes-bug: 2032838

Signed-off-by: fperez <fabrizio.perez@windriver.com>
Change-Id: I671fcca81c14a787d4c55f823d1dae793fe2df35
2023-08-28 15:46:34 -03:00
Rafael Moyano 43ec976b18 Fix Display Issue for vSwitch Hugepages
Textbox label has been modified to "#of vSwitch 1G/2M Hugepages" in
order to give a better description when the vSwitch Hugepage Size
Node is changed from GB to MB in the Update Memory form.

Closes-Bug: 2033098

Change-Id: Id0029f9223af90f2f40050f8eb6fa0d5d796d63d
Signed-off-by: Rafael Moyano <rafael.moyano@windriver.com>
2023-08-28 15:24:58 -03:00
Rafael Moyano 26d37f6eb6 List default Address pools row actions as disabled
Default address pools are read-only by design, any attempt to delete
 or update them will fail. Default address pools row actions dropdown
 menu has been disabled in order to prevent the unwanted behaviour.

Test Plan:
PASS: Go to Admin > System Configuration > Address Pools. Create one
custom Address pool, save changes and wait until the address pools
list is updated properly.
PASS: Go to Admin > System Configuration > Address Pools. Select and
update custom Address pool, save changes and wait until the address
pools list is updated properly.
PASS: Go to Admin > System Configuration > Address Pools. Select and
delete custom Address pool, wait until the address pools list is
updated properly.
PASS: Go to Admin > System Configuration > Address Pools. Try to
update default Address pool, actions is not allowed.
PASS: Go to Admin > System Configuration > Address Pools. Try to
delete default Address pool using dropdown option, actions is not
allowed.

Closes-bug: 2030350

Depends-On: https://review.opendev.org/c/starlingx/upstream/+/891042

Change-Id: I6219e958cf56eef588e0de07911180c9f6bfc55a
Signed-off-by: Rafael Moyano <rafael.moyano@windriver.com>
2023-08-14 16:34:23 -03:00
Jorge Saffe 81e85845f0 Fix OS_AUTH_URL included in OpenStack RC file
When the OpenStack RC file is exported from Horizon,
the URL in the OS_AUTH_URL variable does not include
the /v3 API version.

When the system is configured in secure mode (HTTPS
enabled), an error is generated during the login
process when trying to use any of the StarlingX
CLIs (platform, fm, sw-manager, etc).

This issue can be resolved by appending the API
version to the OS_AUTH_URL.

Test Plan:
    PASS: Log-in Horizon, download openrc.sh file.

    Using a remote CLI:
      PASS: source downloaded openrc.sh file.
      PASS: Test Platform CLI (ej: system host-list)
      PASS: Test FM CLI (ej: fm alarm-list)
      PASS: Test sw-manager CLI (ej: sw-manager patch-strategy show)

    PASS: Enable secure-mode (HTTPS with Self-Signed Certificate)
    PASS: Log-in Horizon, download openrc.sh file.

    Using a remote CLI:
      PASS: source downloaded openrc.sh file.
      PASS: Test Platform CLI (ej: system host-list)
      PASS: Test FM CLI (ej: fm alarm-list)
      PASS: Test sw-manager CLI (ej: sw-manager patch-strategy show)

Closes-Bug: 1998949

Change-Id: I5c678a6ad89f9d5e56356189962e8c09d3ffa6c5
Signed-off-by: Jorge Saffe <jorge.saffe@windriver.com>
2023-07-21 12:19:04 -04:00
Agustin Carranza e4c24875c0 Fix NTP table 'Displaying 1 item' when being empty
Table in System Configuration page shows the message "Displaying 1 item"
when there is no item to display.
This change fixes the issue by appending items to the list only when
NTP servers are found.

Test plan:
PASS: * Deploy a system and not configure NTP services.
      * Explore GUI to System Configuration, tab NTP, and check the
        message 'No items to display.' is presented.
PASS: * Deploy a system and configure NTP services.
      * Explore GUI to System Configuration, tab NTP, and check the
        message 'Displaying 1 item.' is presented below and above
        the NTP servers URLs.

Closes-bug: 2027731

Signed-off-by: Agustin Carranza <agustin.carranza@windriver.com>
Change-Id: Ib318f5e9bd559f26a6a73e6189a6e6bd9f8a17df
2023-07-13 15:33:00 -03:00
Rafael Moyano d9ec96acc7 Remove extra colon in Create Strategy form.
This commit removes an extra colon from Patch description text in the
Create Strategy form.

Test Plan:
PASS: Install starlingx-dashboard package, restart
Horizon and open Create Strategy form in order to verify the patch
description has been updated properly.

Closes-bug: 2025388

Change-Id: I66573822f6581be70ac8c51ba72e3b7b70bd5edc
Signed-off-by: Rafael Moyano <rafael.moyano@windriver.com>
2023-06-29 21:24:07 +00:00
Zuul 161fe9f2f8 Merge "Configure pci-sriov interface without data network" 2023-06-23 17:24:30 +00:00
Abhishek jaiswal e9842cc174 Configure pci-sriov interface without data network
In existing implementation, it is mandatory to select data network
while creating and updating pci-sriov interface class. In this
patchset the limitation has been removed to make it as similar as CLI.

Test Plan:
PASS: creation of iface of class pci-sriov without datanetwork
PASS: updation of iface of class pci-sriov without datanetwork
PASS: updation of iface of class pci-sriov with datanetwork

Story: 2010706
Task: 48256

Change-Id: I2965a3d06e55825cb4efd51f4de01732b2bf2d45
Signed-off-by: Abhishek jaiswal <abhishek.jaiswal@windriver.com>
2023-06-21 10:52:43 +00:00
fperez 2cd23e44d0 Update debian package versions to use git commits
The Debian packaging has been changed to reflect all the
latest git commits under the directory, and not just the
commits to the metadata folder.

Test plan:
PASS build package with changes.
PASS build package again modifying src content. Check
     that a new pkg version is built.
PASS install new package

Story: 2010550
Task: 48221

Change-Id: Ic3d2fd91f1a981b19a016a757ad0a3dfca3767aa
Signed-off-by: fperez <fabrizio.perez@windriver.com>
2023-06-15 18:49:55 -03:00
Zuul 462aea585d Merge "Change 'uses' parameter from UUID to iface name" 2023-06-02 15:54:55 +00:00
Li Zhu 42f6086bea Update Horizon to support prestage orchestration
Support the operations of create/delete prestage orchestration strategy
on Horizon.

Test Plan:
PASS: Successfully create and apply prestage strategy with specified
      21.12/22.12 release.
PASS: Successfully create and apply prestage strategy with 22.12 release
      (the system controller active release) when the release field
      is absent.
PASS: Successfully abort or delete the prestage strategy.
PASS: Verify no broken functionalities of existing orchestration
      strategies.

Story: 2010611
Task: 48144

Change-Id: Ia560e6b9e8f3fa8f27e9864b204335cd0c6935f1
Signed-off-by: lzhu1 <li.zhu@windriver.com>
2023-05-31 10:42:58 -04:00
Agustin Carranza da087c7f04 Change 'uses' parameter from UUID to iface name
When creating a new interface, it can be selected a collection of
'used' interfaces by the new one.
This functionality makes use of the sysinv API in which the parameter
of such interfaces is required to be specified by the names of the
interfaces and not by the UUID.

This change looks for the names and replace the UUID for every
selected interface.

Test plan
PASS: * Log in to Starlingx dashboard, navigate to a Host Detail.
      * Go to to the interface tab and click the 'Create Interface'
        button.
      * Select a compatible configuration and make sure to check an
        interface from the 'Interfaces' list.
      * The interface is created successfully.

Closes-bug: 2021893

Signed-off-by: Agustin Carranza <agustin.carranza@windriver.com>
Change-Id: I1242f05a936ff3d69f28cc6ff0ea65fe53ffc4b5
2023-05-30 15:19:48 -03:00
Zuul c4de9faa26 Merge "Horizon orchestration pop-up shows redundant error" 2023-05-16 14:57:38 +00:00
Zuul 717ab26f3c Merge "Update tox path for python3" 2023-05-11 20:31:57 +00:00
Rafael Moyano 694bd0fbc6 Horizon orchestration pop-up shows redundant error
When you try to create an orchestration Strategy and it failed, the
pop-up showed the same error message in the main and details section.

This change fixes this issue. In addition, has been fixed for the
Apply Strategy action too.

Test Plan:
PASS: Create an invalid strategy and verify the pop-up error message
is displayed properly for example:
Error: Strategy creation failed.
Details: The server could not comply with the request since its either malformed or otherwise incorrect. Invalid groud_id
PASS: Apply strategy and verify the pop-up error message
is displayed properly.

Closes-bug: 2018625

Change-Id: I805cc051a843af07f2dba1701aef8bc791b9450a
Signed-off-by: Rafael Moyano <rafael.moyano@windriver.com>
2023-05-09 17:56:15 +00:00
Enzo Candotti 8c0d3f5063 Fix to-version field on K8S Upgrade Strategy
When creating a Kubernetes Strategy, the 'to-version' field
was being sent without the 'v' prefix. This was making that the
kubernetes pre-check fails.

This change fixes this issue. Also, the default version that is
selected when the user doesn't select an item on the 'to-version'
drop-down menu will be the systemcontroller active version.

Test Plan:
PASS: Create and apply a kubernetes upgrade strategy selecting the
desired 'to-version' option. Verify the pre-check is passed and
the strategy is completed.
PASS: Create and apply a kubernetes upgrade strategy using the default
option on the drop-down menu. Verify that the version that it being
sent to dcmanager is the systemcontroller's active version.

Closes-bug: 2018611

Signed-off-by: Enzo Candotti <enzo.candotti@windriver.com>
Change-Id: Ifb76950dfdc67bdda57cbaea20433f65ebcc8aa3
2023-05-08 20:29:04 +00:00
Al Bailey 5fff425f25 Update tox path for python3
- The reference to cgcs_patch was the older centos python2
location, and has now bee updated to the python3 debian
package.

- Removed 'legacy-resolver' from the pip install command.

- The basepython is now python3 and the upper-constraints
for debian and python3 are now specified.

- The older python2 to 3 conversion directives in pylint
have been removed, and only the errors that are currently
valid are being suppressed.

- The python2 vs python3 requirements are now updated to
only reflect python3.

- The zuul job for pylint specifies the debian nodeset.

- override tox constraints file to use the STX constraints
  This means starlingx/root needs to be a required project

None of these changes have any runtime effect.
These changes only affect tox and zuul.

Test Plan:
  PASS: tox

Story: 2010642
Task: 47916
Change-Id: I1cd8a78e5e26efc4b3d4b346749735e4de9f6016
Signed-off-by: Al Bailey <al.bailey@windriver.com>
2023-05-01 14:01:17 +00:00
Davlet Panech af025a3604 Fix github mirroring for this repo
Updating the rsa ssh host key based on:
https://github.blog/2023-03-23-we-updated-our-rsa-ssh-host-key/

Note: In the future, StarlingX should have a zuul job and
secret setup for all repos so we do not need to do this
for every repo.

Needed to rename the secret, because zuul fails if like-named
secrets have diffent values in different branches of the same
repo.

Partial-Bug: #2015246
Change-Id: I22001d1e7f8db6e3f664a479299885acce7a8df4
Signed-off-by: Davlet Panech <davlet.panech@windriver.com>
2023-04-28 12:38:51 -04:00
fperez db9bb2cf03 Fix improper error message when reducing partition size
When attempting to reduce partition size from the GUI, a generic
error message is returned. This occurs because providing the complete
error details to the error handler can lead to the generation of
a distinct exception.

Test plan:
  Install Standard. Create partition and
  attempt to reduce size from GUI.
  Verify that error message indicates
  that is not possible to reduce partitions.
  Also verify that right error message is present in
  horizon.log and that any other exception dissapear
  for this action.

Closes-Bug: 2015918

Signed-off-by: fperez <fabrizio.perez@windriver.com>
Change-Id: I9ad7315f9e428d029b30ea230c343a4fe1df8a5f
2023-04-11 18:25:22 +00:00
Zuul ba46600775 Merge "Add the upload-only option to the Horizon patch orchestration UI" 2023-03-08 16:12:30 +00:00
Gustavo Herzmann 6310b0981b Add the upload-only option to the Horizon patch orchestration UI
This change adds the new DC patch orchestration upload-only option to
the patch orchestration UI. A new 'Upload Only' checkbox was added to
the 'Create Strategy' form when the selected strategy type is 'Patch'.

In the 'Orchestration Strategy' tab, if the current strategy is a patch
strategy, a new field 'Upload Only' with its current value is now shown
so that the user can know if an existing strategy is using this option.

Test Plan:
1. PASS - Verify that the 'Upload Only' checkbox appears correctly
          inside of the create strategy form only when the selected
          strategy type is equal to 'Patch';
2. PASS - Create a patch strategy with and without the upload-only
          option and verify that it gets created successfully;
3. PASS - Verify that the interface shows the 'Upload Only' field and
          its current value on the 'Orchestration Strategy' page only
          when using the patch strategy type;
4. PASS - Create and delete another orchestration type (e.g. Kubernetes
          upgrade) through Horizon and verify that it still works as
          expected;
5. PASS - Run the entire patch orchestration procedure through Horizon
          and verify that it completes successfully.

Depends-On: https://review.opendev.org/c/starlingx/distcloud-client/+/876629

Story: 2010584
Task: 47592

Signed-off-by: Gustavo Herzmann <gustavo.herzmann@windriver.com>
Change-Id: I18f680810fab367e8c0e123887a4e3dcd3bdf8d5
2023-03-08 09:12:35 -03:00
Cristian Mondo 3da7eef0dc Add new fields in the GUI to edit filesystem size for root var and log
The new filesystems - var, root and log - are not able to be modified
from the GUI, because the form does not show these filesystems.
This fix adds the new filesystems so they can be modified.

Closes-Bug: 2008810

Test Plan:

PASS: Modify the new filesystems from the GUI. If the size is
decreased, the appropriate error message will be displayed.
PASS: Modify the other filesystems from the GUI. If the size is
decreased, the appropriate error message will be displayed.

Signed-off-by: Cristian Mondo <cristian.mondo@windriver.com>
Change-Id: Idfe3b48762708fbed5f7d029445590667c1c43cc
2023-03-07 11:59:41 -03:00
Enzo Candotti adbbfc3fa5 Add "Apparmor Module" on Edit Host modal
This change adds a dropdown menu in order to enable or disable
the apparmor module when updating a host.

By default, apparmor will be disabled on creation and this value can
be modified using the Edit Host button, or system host-update
command.

Test Plan:

PASS: Build and install starlingx-dashboard package. Verify that
the changes are applied.
PASS: Edit a locked host in order to change the apparmor value.
Verify that the change impacts when running system host-show command.
PASS: Edit a unlocked host by changing the apparmor value. Verify
that an error message is shown since the host has to be locked.
PASS: Verify that the correct apparmor value is shown in
"Host Detail" page.

Story: 2010310
Task: 47249

Signed-off-by: Enzo Candotti <enzo.candotti@windriver.com>
Change-Id: I814896806479e141ce86961cc08b48da5600afed
2023-02-06 13:12:57 -03:00
Lucas Ratusznei Fonseca 5e81ff8710 Allow max_tx_rate config on Horizon
There was no field in the Horizon interface dialogs to specify the
max-tx-rate. This commit adds the max_tx_rate field to the Add,
Modify and Details dialogs.

Test plan

PASS Add interface with max_tx_rate set to 100
PASS Add interface with max_tx_rate set to 0
PASS Add interface with max_tx_rate set to empty
PASS Modify interface with max_tx_rate previously set to 100, changing it to 200
PASS Modify interface with max_tx_rate previously set to 100, changing it to 0
PASS Modify interface with max_tx_rate previously set to 100, changing it to empty
PASS Modify interface with max_tx_rate previously set to 0, changing it to 100
PASS Modify interface with max_tx_rate previously set to 0, changing it to empty
PASS View details of interface with max_tx_rate set to 0
PASS View details of interface with max_tx_rate set to 100
PASS View details of interface with max_tx_rate set to empty

Closes-Bug: #2000635

Signed-off-by: Lucas Ratusznei Fonseca <lucas.ratuszneifonseca@windriver.com>
Change-Id: I16ce1dbd2dbf12367ed6a4428216ad37b4c31f14
2023-01-03 14:30:15 -03:00
Zuul 559f04a695 Merge "Fix 'Edit Host' modal" 2023-01-03 16:37:32 +00:00
Al Bailey 3136476a17 Update tox.ini to work with tox 4
This change will allow this repo to pass zuul now
that this has merged:
https://review.opendev.org/c/zuul/zuul-jobs/+/866943

Tox 4 deprecated whitelist_externals.
Replace whitelist_externals with allowlist_externals

Partial-Bug: #2000399

Signed-off-by: Al Bailey <al.bailey@windriver.com>
Change-Id: Ia05abf9e3a1fe3990716333fa88eb5c2b2865b10
2022-12-26 22:08:34 +00:00
Enzo Candotti 2cf939310e Fix 'Edit Host' modal
When trying to edit a host, the modal is not able to save the changes
unless the max_cpu_mhz_configured parameter is modified since it's
set as required.

This change fixes that problem by setting the max_cpu_mhz_configured as
not required and removing the forced assignment during clean()
function.

Test Plan:
PASS: Change BMC type, IP, User and Password. Verify changes
are listed in system show command.
PASS: Modify host location, CPU frequency, Clock Synchronization.
Verify changes are listed in system show command.

Closes-Bug: 2000484

Signed-off-by: Enzo Candotti <enzo.candotti@windriver.com>
Change-Id: Icb6d05fe170d9202e7cc01ede7154c8d2bb98c72
2022-12-26 17:42:43 -03:00
Enzo Candotti 40679dc464 Fix 'dictionary changed size during iteration'
The Python "RuntimeError: dictionary changed size during iteration"
has been seen on some points, e.g. when creating a strategy.
It occurs when the size of a dictionary is changed during iterating
over it.

To fix this error is needed to add a '.copy()' method to create a
shallow copy of the dictionary.

Test Plan:

PASS: Apply these changes and create a strategy. Verify the strategy
is being created successfully. Same test has been done for other
sections.

Closes-Bug: 1999069

Signed-off-by: Enzo Candotti <enzo.candotti@windriver.com>
Change-Id: I3f6dc0e27547d6439a2d14e9ba8ee6dd4f68e8be
2022-12-07 12:26:26 -03:00
Takamasa Takenaka e2c5d33fab Remove unnecessary button visibility logic
Current logic compares number of interface and number of
interface type for "Create Interface" button visibility.

Current interface type defines 4 types, so that if more than
4 interfaces are configured in any type, "Create Interface"
will be invisible, which should not.

This fix is to remove this logic, so that user can add
interfaces through gui.

Closes-bug: 1998638

Test Plan:
PASS: "Create Interface" button is visible
      after adding 8 interfaces and we can
      add more than 8 interfaces.

Signed-off-by: Takamasa Takenaka <takamasa.takenaka@windriver.com>
Change-Id: I409a3483d6e0c4e0f53436d02d710b4dcafe2d20
2022-12-02 15:56:32 -03:00