454 Commits

Author SHA1 Message Date
Jake Yip
a5ff9ecb4f Fix resize for CAPI clusters
Clusters created by the magnum-capi-helm driver do not have a heat stack, so
resize currently fails as it depends on the heat stack for a list of worker
nodes. To fix this, we change to querying the nodegroup information and
use that instead.

We keep the old heat stack way for now, as that is the way to get a list
of worker nodes to select candidate(s) for scaling down. This is not
available in capi driver yet, so capi will return an empty list of
worker nodes.

Change-Id: I0d66fc02a7f2c608a4a0b09b98c343017e04ed41
2024-12-16 21:10:20 +11:00
Andrew Bonney
bd7662480f Fix indexing into subnet list during cluster creation
When creating a cluster using an existing network,
once the network has been selected from the dropdown
the subnet dropdown fails to populate. This is due to
an off-by-one indexing error.

Closes-Bug: #2087843

Change-Id: I0f7b20576e25c9f93ddc90fcfb501422d2adb7e1
2024-11-13 08:46:55 +00:00
Zuul
3f8a06e895 Merge "Change floating_ip to use master_lb_floating_ip_enabled." 2024-10-10 05:50:03 +00:00
OpenStack Proposal Bot
736edbaa86 Imported Translations from Zanata
For more information about this automatic import see:
https://docs.openstack.org/i18n/latest/reviewing-translation-import.html

Change-Id: Ifd62f8ca08db229792618475379bffd30fd406ae
2024-06-07 03:10:59 +00:00
Zuul
64627563d8 Merge "Restrict actions based on cluster state" 2024-06-06 07:16:03 +00:00
Zuul
7a4d1d72cc Merge "Cluster Overview: Change columns and drawer items" 2024-06-05 06:57:56 +00:00
Dale Smith
207503080d Change floating_ip to use master_lb_floating_ip_enabled.
* Replace 'floating_ip_enabled' with 'master_lb_floating_ip_enabled',
  as the former implies floating ip on all nodes in addition to a
  Floating IP on the API loadbalancer.
* Add 'api_master_lb_allowed_cidrs' so limitations can be placed
  on K8s API loadbalancer.

Change-Id: I18bf64be9d9ddb4ee043cfba37bffe8e82f33d0d
2024-05-17 13:46:54 +00:00
Dale Smith
c724172972 Workflow updates for Create Cluster
* Apply limitations to 'master_lb_enabled' checkbox
  interactions, such as master_count.
* Basic validation for cluster name, to reduce create failures.
* Rename 'Master' to 'Control Plane' in line with upstream Kubernetes.
* Add validation for 'master_count': min/max and odd numbers.
* 'Network' tab required indicator no longer shows when the
  'create new network' checkbox is selected. This tab has no required
  options initially and the form can submit without visting the tab.
* Help text updates to reflect the updated options.

Change-Id: I7840ab606eb4a39fe34509d7b49d738391148bae
2024-05-16 11:16:45 +12:00
Simon Merrick
08e0d728b2 Restrict actions based on cluster state
Restrict enabled row actions on clusters which are not in
a 'COMPLETED' state. For example: disable resize cluster
action while cluster in 'IN_PROGRESS' or '_FAILED' state.

Change-Id: I78411dd91fb6e885a3407678472cbc6eef445cdb
2024-05-03 15:02:17 +12:00
Dale Smith
8680420c34 Fix all lint warnings
* Resolve all npm lint warnings so we don't hide new ones.
* Any functionality changes from this change are unintentional
  and should be fixed.

Change-Id: Ief1433bbe7e873999c94ca763f93a443d4234739
2024-05-03 12:14:31 +12:00
Dale Smith
8ceb568e70 Cluster Overview: Change columns and drawer items
* Remove column 'keypair'
* Add column 'coe_version' as "Kubernetes Version"
* Add 'status_reason' and 'health_status_reason' sections
  to cluster drawer.
* Rename 'Master' to 'Control Plane' in line with upstream.

Change-Id: I437d0f0f1ae07f29d41e1cd5d09b046d3d42b69e
2024-05-02 15:52:46 +12:00
OpenStack Proposal Bot
e85d41fd8b Imported Translations from Zanata
For more information about this automatic import see:
https://docs.openstack.org/i18n/latest/reviewing-translation-import.html

Change-Id: Iebf8bb328c9f446952e647f0f592400312590833
2024-04-19 04:22:58 +00:00
Zuul
7b609ce2f3 Merge "Add dropdown list to select fixed subnet" 2024-01-05 12:01:49 +00:00
Zuul
fc95b618a4 Merge "Test 'trackBy' property in cluster template object" 2024-01-04 00:18:43 +00:00
Felipe Reyes
6f6c3db282 Add dropdown list to select fixed subnet
When creating a cluster and the user decides to reuse an existing
network, it must also choose a subnet, otherwise the resulting
configuration may be invalid when trying to allocate a port.

Closes-Bug: #2038663
Related-Bug: #2038109
Change-Id: I08943f10418385a39eecc7b4117d162854d2d010
2023-12-06 18:59:24 -03:00
Felipe Reyes
85290621fb Test 'trackBy' property in cluster template object
This change tests that the generated trackBy property contains the
expected value composed by the object id and updated_at when available
otherwise fallback to created_at.

Change-Id: I7becdd513cd17879d1c99c7b60ed708bb5a34a09
2023-12-06 18:59:24 -03:00
Corey Bryant
4fd2ebcd51 Drop use of features removed in Django 4.0
These functions were deprecated in Django 3.0 and have been removed
in Django 4.0. Switch to the functions they were aliased to.

Closes-Bug: #2039226
Change-Id: Iafb6615a7cd26a7746c52a18f11a86b27f1a66e4
2023-10-13 11:02:26 -04:00
songwenping
a7278fce3e remove unicode from code
Co-authored-by: Jake Yip <jake.yip@ardc.edu.au>

Change-Id: I8f49f06df3894bda78c52a690bf0d712e33d862c
2023-09-14 21:04:21 +10:00
OpenStack Proposal Bot
df2de96e22 Imported Translations from Zanata
For more information about this automatic import see:
https://docs.openstack.org/i18n/latest/reviewing-translation-import.html

Change-Id: I57446a2c588dcf9303c77091e75a90ef0c6bf6cd
2023-09-10 02:11:11 +00:00
Zuul
4d69e88cc2 Merge "sign-certificate-modal.controller.js: replace success() with then()" 2023-08-30 07:48:08 +00:00
ricolin
61307d6aa5 Add magnum cluster config support
Add support to download cluster config from dashboard

Depends-On: https://review.opendev.org/c/openstack/python-magnumclient/+/890893
Change-Id: I533dbcefbe2828360b88291c0311cf3732050a68
2023-08-16 22:25:31 +08:00
Andrew Bogott
aab800ceb7 sign-certificate-modal.controller.js: replace success() with then()
success() is deprecated in modern Angular, causing
the 'Sign Certificate' UI to fail.

Fixes-bug: 2021588
Change-Id: Idf4ca74b8bc20a17bb53feeeaae9f9481b69b3e4
2023-07-31 13:28:09 -05:00
Zuul
7f27167a2e Merge "Imported Translations from Zanata" 2022-09-16 06:10:53 +00:00
Zuul
3fc1937949 Merge "Address RemovedInDjango40Warning" 2022-09-16 06:08:38 +00:00
OpenStack Proposal Bot
0a7bbdd079 Imported Translations from Zanata
For more information about this automatic import see:
https://docs.openstack.org/i18n/latest/reviewing-translation-import.html

Change-Id: I6a8d7e1eb6abe70a629f326ccf90868a2ae558ed
2022-09-02 04:32:35 +00:00
manchandavishal
44697255ee Migrate to AngularJS v1.8.2
This patch aligns current code with AngularJS v1.8.2 requirements.
It also updates zun-ui to use the Firefox browser instead of phantomjs
browser to fix "nodjs-run-test" job because phantomjs browser has some
issue with backticks.

Change-Id: I61d9cfb795f7e789cd3c160934f05f54eb48fcda
2022-08-12 13:56:45 +05:30
manchandavishal
5c806bf3a1 Address RemovedInDjango40Warning
In Django 3.1, django.conf.urls.url() is deprecated
in favor of django.urls.re_path(). For more info see [1]
These were already replaced in Horizon repo by [2].

[1] https://docs.djangoproject.com/en/4.0/releases/3.1/#id2
[2] https://review.opendev.org/c/openstack/horizon/+/827093

Change-Id: I542d4a61168b294fda5a7f40b9759825cc4eef38
2022-04-29 18:29:16 +05:30
manchandavishal
e203d7791f Fixed Unit test for magnum-ui
After 7052b7f065 merged in openstack/horizon a new Unit
test class introduced in horizon i.e. RestAPITestCase.
This patch updates magnum-ui to import RestAPITestCase
class instead of TestCase. For more info. see [1]

[1] https://review.opendev.org/c/openstack/horizon/+/827097/2/openstack_dashboard/test/helpers.py#485

Change-Id: I4ef0cd315e615e390f15a8fa16fe4aaa380a2470
2022-03-31 17:11:24 +05:30
Md Safiyat Reza
bcd7fbfde7 Default floating_ip_enabled to true in cluster template
This matches the default value in the Magnum API backend.

Signed-off-by: Md Safiyat Reza <reza.safiyat@gmail.com>
Change-Id: Idf74601b8efa195bae756005cc8f4b83400eac87
2021-06-21 13:54:50 +00:00
Tobias Urdin
565614ff35 Add overlay2 to Docker storage driver dropdown
Change-Id: I382a56ddf4ecf7e76b1a0ecb4446754c1ceecce3
2021-04-22 15:15:31 +02:00
Zuul
e5a8eb4d2a Merge "Support zero workers nodes on Horizon dashboard" 2021-04-13 00:11:47 +00:00
Bharat Kunwar
1fc627fb21 Support zero workers nodes on Horizon dashboard
This ensures that magnum-ui requests default to DEFAULT_API_VERSION=1.10
to allow resize to zero worker nodes unless otherwise configured.

Story: 2005054
Task: 41835

Change-Id: I96d5cdbb669c4d2b92db6f7aa4f9970e33adf093
2021-04-08 13:39:20 +00:00
Jake Yip
335fb71a58 Remove hard_limit check in dashboard
This erroneously displays a quota of 20 if quota is 0. Since Change
I1b278d221d0f15d92d67869cd3ac897d041eaf90, API always returns a quota,
so this check is no longer necessary.

Also fixed to show 100% if quota = 0; without this dashboard will show
NaN% when 0/0 .

Change-Id: Id59e63639667e2ec5fa01b57ef4a7ff5cd0db37d
2021-03-29 03:14:04 +00:00
OpenStack Proposal Bot
e5518874c2 Imported Translations from Zanata
For more information about this automatic import see:
https://docs.openstack.org/i18n/latest/reviewing-translation-import.html

Change-Id: I49e34dc63146ed630368d7da02cd696b566f0a29
2021-03-03 06:55:56 +00:00
OpenStack Proposal Bot
086d1376e8 Imported Translations from Zanata
For more information about this automatic import see:
https://docs.openstack.org/i18n/latest/reviewing-translation-import.html

Change-Id: I4b6ca625c5c4c2f8a64aed653f29d3710ebb6393
2020-10-04 07:01:40 +00:00
Feilong Wang
2c07e667e1 Support enable/disable loadbalancer when creating cluster
Support enable/disable loadbalancer when creating cluster to
override the master_lb_enable config in cluster template.

Task: 40425
Story: 2007949

Change-Id: If548c7b7c95c3db191272a505ba3bff451076b13
2020-08-05 14:11:48 +12:00
OpenStack Proposal Bot
a73ec8d2cb Imported Translations from Zanata
For more information about this automatic import see:
https://docs.openstack.org/i18n/latest/reviewing-translation-import.html

Change-Id: I138561fee3783bf16dcf1b4f9c26d6a95c93e4a6
2020-06-24 07:15:30 +00:00
Zuul
c1d67c3dac Merge "Stop to use the __future__ module." 2020-06-03 13:59:25 +00:00
Simon Merrick
cba65fa1fb Fix formatting issue in workflow message
Change-Id: I4ceda3f3a4d8df604f626ad690bdf38e4db433a7
2020-06-03 15:35:58 +12:00
Hervé Beraud
aa600566f6 Stop to use the __future__ module.
The __future__ module [1] was used in this context to ensure compatibility
between python 2 and python 3.

We previously dropped the support of python 2.7 [2] and now we only support
python 3 so we don't need to continue to use this module and the imports
listed below.

Imports commonly used and their related PEPs:
- `division` is related to PEP 238 [3]
- `print_function` is related to PEP 3105 [4]
- `unicode_literals` is related to PEP 3112 [5]
- `with_statement` is related to PEP 343 [6]
- `absolute_import` is related to PEP 328 [7]

[1] https://docs.python.org/3/library/__future__.html
[2] https://governance.openstack.org/tc/goals/selected/ussuri/drop-py27.html
[3] https://www.python.org/dev/peps/pep-0238
[4] https://www.python.org/dev/peps/pep-3105
[5] https://www.python.org/dev/peps/pep-3112
[6] https://www.python.org/dev/peps/pep-0343
[7] https://www.python.org/dev/peps/pep-0328

Change-Id: I029a4125cb36f0238a64c6adee8b9a2cac186e33
2020-06-02 20:22:37 +02:00
Feilong Wang
96312eaf09 Fix cluster resize
There are two fixes included in this patch:

1. List nodes correctly. We have renamed minion to node, which
   cause the filter doesn't work correctly.
2. The response from magnumclient resize method is not a json,
   so we need to convert it to dict before return. Rolling upgrade
   has the same issue.

Task: 39810
Story: 2007697

Change-Id: I7a03dfea2c84a423f15cfbe4194a8492f72dbd35
2020-05-20 17:56:03 +12:00
Feilong Wang
a1e24b172f Show cluster health status
1. Show health status on cluster list table
2. Show health status and health status reason on the cluster
   details page

Change-Id: I4d0751fc39d90cddc909b28ca0767bc811b6c3b8
Task: 39794
Story: 2007682
2020-05-16 11:17:38 +12:00
OpenStack Proposal Bot
0a1150ebdd Imported Translations from Zanata
For more information about this automatic import see:
https://docs.openstack.org/i18n/latest/reviewing-translation-import.html

Change-Id: I07c8771b37dd3ecbe266218053db29f849b73052
2020-05-10 07:22:32 +00:00
OpenStack Proposal Bot
d2bfee2964 Imported Translations from Zanata
For more information about this automatic import see:
https://docs.openstack.org/i18n/latest/reviewing-translation-import.html

Change-Id: Icd586ce433e8d4f3a2985cb6a228f48ac2384439
2020-04-26 07:09:06 +00:00
Zuul
b77a92f531 Merge "Use default-worker instead of production_group" 2020-04-21 00:02:31 +00:00
Sean McGinnis
8cf50a15b5
Use unittest.mock instead of third party mock
Now that we no longer support py27, we can use the standard library
unittest.mock module instead of the third party mock lib.

Change-Id: Ie3c9acbcfd21a7ef02c48dace486e80c502f0833
Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
2020-04-18 11:54:06 -05:00
OpenStack Proposal Bot
a09f0c472b Imported Translations from Zanata
For more information about this automatic import see:
https://docs.openstack.org/i18n/latest/reviewing-translation-import.html

Change-Id: Id4f28780c93d6915502b87c683183f1d94c7618d
2020-04-17 08:39:04 +00:00
Bharat Kunwar
fb8eee430e Use default-worker instead of production_group
At present, resize cluster invocation via the magnum-ui fails because it
tries to resize production_group nodegroup which is not a thing. Until
we support ability to specify nodegroups, we ought to use the default of
default-worker nodegroup.

Change-Id: I3e9553e6d337ab1580c0e3bb3d1a88e8b97f2f23
2020-04-14 13:30:09 +00:00
OpenStack Proposal Bot
790e3f5008 Imported Translations from Zanata
For more information about this automatic import see:
https://docs.openstack.org/i18n/latest/reviewing-translation-import.html

Change-Id: I310d3b1b09b93eaa627b1255049004f594934ee6
2020-04-08 10:30:06 +00:00
Zuul
c70e807c54 Merge "Improve cluster launch workflow" 2020-02-17 06:38:18 +00:00