Merge ~steverydz/maas:deploy-options-os into maas:master

Proposed by Steve Rydz
Status: Merged
Approved by: Steve Rydz
Approved revision: 911863882a85434783bb407e073e0656c2f33830
Merge reported by: MAAS Lander
Merged at revision: not available
Proposed branch: ~steverydz/maas:deploy-options-os
Merge into: maas:master
Diff against target: 52 lines (+24/-6)
2 files modified
src/maasserver/static/js/angular/directives/os_select.js (+1/-6)
src/maasserver/static/js/angular/directives/tests/test_os_select.js (+23/-0)
Reviewer Review Type Date Requested Status
MAAS Lander Approve
Alberto Donato (community) Approve
Lilyana Videnova (community) Approve
Review via email: mp+361187@code.launchpad.net

Commit message

LP: #1776741 - Fix toggle between deploy os

To post a comment you must log in.
Revision history for this message
Lilyana Videnova (lilyanavidenova) wrote :

UX +1

review: Approve
Revision history for this message
MAAS Lander (maas-lander) wrote :

UNIT TESTS
-b deploy-options-os lp:~steverydz/maas/+git/maas into -b master lp:~maas-committers/maas

STATUS: SUCCESS
COMMIT: 7f18296591465baa944504dbc88877fed20e538b

review: Approve
Revision history for this message
MAAS Lander (maas-lander) wrote :

UNIT TESTS
-b deploy-options-os lp:~steverydz/maas/+git/maas into -b master lp:~maas-committers/maas

STATUS: FAILED
LOG: http://maas-ci-jenkins.internal:8080/job/maas/job/branch-tester/4844/console
COMMIT: 0bea9c19a3de4dc7bc389eb6700f1806e624171e

review: Needs Fixing
Revision history for this message
Alberto Donato (ack) wrote :

+1 lgtm.

there's a lint issue to fix for CI to be green, though

review: Approve
Revision history for this message
MAAS Lander (maas-lander) wrote :

UNIT TESTS
-b deploy-options-os lp:~steverydz/maas/+git/maas into -b master lp:~maas-committers/maas

STATUS: SUCCESS
COMMIT: 911863882a85434783bb407e073e0656c2f33830

review: Approve

There was an error fetching revisions from git servers. Please try again in a few minutes. If the problem persists, contact Launchpad support.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/src/maasserver/static/js/angular/directives/os_select.js b/src/maasserver/static/js/angular/directives/os_select.js
2index 551ddb1..3af32f1 100644
3--- a/src/maasserver/static/js/angular/directives/os_select.js
4+++ b/src/maasserver/static/js/angular/directives/os_select.js
5@@ -189,12 +189,7 @@ angular.module('MAAS').directive('maasOsSelect', ['KVMDeployOSBlacklist',
6 $scope.ngModel.hwe_kernel = null;
7 if($scope.releases.length > 0) {
8 var firstRelease = $scope.releases[0][0];
9- if (firstRelease.includes('ubuntu') &&
10- KVMDeployOSBlacklist.includes(firstRelease)) {
11- setDefault();
12- } else {
13- $scope.ngModel.release = firstRelease;
14- }
15+ $scope.ngModel.release = firstRelease;
16 }
17
18 $scope.hwe_kernels = getSelectableKernels();
19diff --git a/src/maasserver/static/js/angular/directives/tests/test_os_select.js b/src/maasserver/static/js/angular/directives/tests/test_os_select.js
20index c491dc1..c111a0a 100644
21--- a/src/maasserver/static/js/angular/directives/tests/test_os_select.js
22+++ b/src/maasserver/static/js/angular/directives/tests/test_os_select.js
23@@ -203,6 +203,29 @@ describe("maasOsSelect", function() {
24 $scope.osinfo.osystems[0][0], $scope.osinfo.releases));
25 });
26
27+ it("selectedOSChanged works on non-ubuntu os", function() {
28+ var directive = compileDirective("osinfo", "selected");
29+ $scope.osinfo = {
30+ osystems: [["centos", "CentOS"], ["ubuntu", "Ubuntu"]],
31+ releases: [
32+ ["centos/centos66", "CentOS 6"],
33+ ["centos/centos70", "CentOS 7"],
34+ ["ubuntu/xenial", "16.04 LTS \"Xenial Xerus\""],
35+ ["ubuntu/bionic", "18.04 LTS \"Bionic Beaver\""]
36+ ],
37+ default_osystem: "centos",
38+ default_release: "centos66"
39+ };
40+ $scope.selected = {
41+ osystem: "ubuntu",
42+ release: ""
43+ };
44+ $scope.$digest();
45+ directive.isolateScope().selectedOSChanged();
46+ expect(directive.isolateScope().releases[0][0])
47+ .toEqual('ubuntu/xenial');
48+ });
49+
50 it("selectedOSChanged updates releases", function() {
51 var directive = compileDirective("osinfo", "selected");
52 $scope.selected = {

Subscribers

People subscribed via source and target branches