Merge lp:~ltrager/maas/lp1654432_2.1 into lp:maas/2.1

Proposed by Lee Trager on 2017-01-09
Status: Merged
Approved by: Lee Trager on 2017-01-09
Approved revision: 5576
Merged at revision: 5576
Proposed branch: lp:~ltrager/maas/lp1654432_2.1
Merge into: lp:maas/2.1
Diff against target: 77 lines (+44/-1)
3 files modified
docs/changelog.rst (+2/-0)
src/maasserver/static/js/angular/controllers/node_details.js (+2/-1)
src/maasserver/static/js/angular/controllers/tests/test_node_details.js (+40/-0)
To merge this branch: bzr merge lp:~ltrager/maas/lp1654432_2.1
Reviewer Review Type Date Requested Status
Lee Trager Approve on 2017-01-09
Review via email: mp+314374@code.launchpad.net

Commit message

Backport r5628 from trunk: Allow GA kernels to be selected when deploying on the node-details page.

To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'docs/changelog.rst'
2--- docs/changelog.rst 2016-12-21 12:55:00 +0000
3+++ docs/changelog.rst 2017-01-09 22:40:17 +0000
4@@ -38,6 +38,8 @@
5
6 LP: #1651452 Use correct escaping for EFI's kernel command line datasource_list.
7
8+LP: #1654432 Unable to deploy ga kernel on node-details page
9+
10
11 2.1.2
12 =====
13
14=== modified file 'src/maasserver/static/js/angular/controllers/node_details.js'
15--- src/maasserver/static/js/angular/controllers/node_details.js 2016-09-21 14:49:23 +0000
16+++ src/maasserver/static/js/angular/controllers/node_details.js 2017-01-09 22:40:17 +0000
17@@ -616,7 +616,8 @@
18 extra.distro_series = release;
19 // hwe_kernel is optional so only include it if its specified
20 if(angular.isString($scope.osSelection.hwe_kernel) &&
21- ($scope.osSelection.hwe_kernel.indexOf('hwe-') >= 0)) {
22+ ($scope.osSelection.hwe_kernel.indexOf('hwe-') >= 0 ||
23+ $scope.osSelection.hwe_kernel.indexOf('ga-') >= 0)) {
24 extra.hwe_kernel = $scope.osSelection.hwe_kernel;
25 }
26 } else if($scope.actionOption.name === "commission") {
27
28=== modified file 'src/maasserver/static/js/angular/controllers/tests/test_node_details.js'
29--- src/maasserver/static/js/angular/controllers/tests/test_node_details.js 2016-09-22 15:05:38 +0000
30+++ src/maasserver/static/js/angular/controllers/tests/test_node_details.js 2017-01-09 22:40:17 +0000
31@@ -1049,6 +1049,46 @@
32 });
33 });
34
35+ it("calls performAction with hwe kernel", function() {
36+ var controller = makeController();
37+ spyOn(MachinesManager, "performAction").and.returnValue(
38+ $q.defer().promise);
39+ $scope.node = node;
40+ $scope.actionOption = {
41+ name: "deploy"
42+ };
43+ $scope.osSelection.osystem = "ubuntu";
44+ $scope.osSelection.release = "ubuntu/xenial";
45+ $scope.osSelection.hwe_kernel = "hwe-16.04-edge";
46+ $scope.actionGo();
47+ expect(MachinesManager.performAction).toHaveBeenCalledWith(
48+ node, "deploy", {
49+ osystem: "ubuntu",
50+ distro_series: "xenial",
51+ hwe_kernel: "hwe-16.04-edge"
52+ });
53+ });
54+
55+ it("calls performAction with ga kernel", function() {
56+ var controller = makeController();
57+ spyOn(MachinesManager, "performAction").and.returnValue(
58+ $q.defer().promise);
59+ $scope.node = node;
60+ $scope.actionOption = {
61+ name: "deploy"
62+ };
63+ $scope.osSelection.osystem = "ubuntu";
64+ $scope.osSelection.release = "ubuntu/xenial";
65+ $scope.osSelection.hwe_kernel = "ga-16.04";
66+ $scope.actionGo();
67+ expect(MachinesManager.performAction).toHaveBeenCalledWith(
68+ node, "deploy", {
69+ osystem: "ubuntu",
70+ distro_series: "xenial",
71+ hwe_kernel: "ga-16.04"
72+ });
73+ });
74+
75 it("calls performAction with commissionOptions", function() {
76 var controller = makeController();
77 spyOn(MachinesManager, "performAction").and.returnValue(

Subscribers

People subscribed via source and target branches

to all changes: