Merge lp:~ltrager/maas/lp1654432 into lp:maas/trunk

Proposed by Lee Trager on 2017-01-06
Status: Merged
Approved by: Lee Trager on 2017-01-09
Approved revision: 5625
Merged at revision: 5628
Proposed branch: lp:~ltrager/maas/lp1654432
Merge into: lp:maas/trunk
Diff against target: 64 lines (+42/-1)
2 files modified
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
Reviewer Review Type Date Requested Status
Gavin Panella (community) 2017-01-06 Approve on 2017-01-09
Review via email: mp+314193@code.launchpad.net

Commit message

Allow GA kernels to be selected when deploying on the node-details page.

To post a comment you must log in.
Gavin Panella (allenap) :
review: Approve
Andres Rodriguez (andreserl) wrote :

please backport this to 2.1

On Mon, Jan 9, 2017 at 3:34 AM, Gavin Panella <email address hidden>
wrote:

> Review: Approve
>
>
> --
> https://code.launchpad.net/~ltrager/maas/lp1654432/+merge/314193
> You are subscribed to branch lp:maas.
>

--
Andres Rodriguez (RoAkSoAx)
Ubuntu Server Developer
MSc. Telecom & Networking
Systems Engineer

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/maasserver/static/js/angular/controllers/node_details.js'
2--- src/maasserver/static/js/angular/controllers/node_details.js 2016-12-07 12:46:14 +0000
3+++ src/maasserver/static/js/angular/controllers/node_details.js 2017-01-06 00:30:19 +0000
4@@ -616,7 +616,8 @@
5 extra.distro_series = release;
6 // hwe_kernel is optional so only include it if its specified
7 if(angular.isString($scope.osSelection.hwe_kernel) &&
8- ($scope.osSelection.hwe_kernel.indexOf('hwe-') >= 0)) {
9+ ($scope.osSelection.hwe_kernel.indexOf('hwe-') >= 0 ||
10+ $scope.osSelection.hwe_kernel.indexOf('ga-') >= 0)) {
11 extra.hwe_kernel = $scope.osSelection.hwe_kernel;
12 }
13 } else if($scope.actionOption.name === "commission") {
14
15=== modified file 'src/maasserver/static/js/angular/controllers/tests/test_node_details.js'
16--- src/maasserver/static/js/angular/controllers/tests/test_node_details.js 2016-12-07 12:46:14 +0000
17+++ src/maasserver/static/js/angular/controllers/tests/test_node_details.js 2017-01-06 00:30:19 +0000
18@@ -1082,6 +1082,46 @@
19 });
20 });
21
22+ it("calls performAction with hwe kernel", function() {
23+ var controller = makeController();
24+ spyOn(MachinesManager, "performAction").and.returnValue(
25+ $q.defer().promise);
26+ $scope.node = node;
27+ $scope.actionOption = {
28+ name: "deploy"
29+ };
30+ $scope.osSelection.osystem = "ubuntu";
31+ $scope.osSelection.release = "ubuntu/xenial";
32+ $scope.osSelection.hwe_kernel = "hwe-16.04-edge";
33+ $scope.actionGo();
34+ expect(MachinesManager.performAction).toHaveBeenCalledWith(
35+ node, "deploy", {
36+ osystem: "ubuntu",
37+ distro_series: "xenial",
38+ hwe_kernel: "hwe-16.04-edge"
39+ });
40+ });
41+
42+ it("calls performAction with ga kernel", function() {
43+ var controller = makeController();
44+ spyOn(MachinesManager, "performAction").and.returnValue(
45+ $q.defer().promise);
46+ $scope.node = node;
47+ $scope.actionOption = {
48+ name: "deploy"
49+ };
50+ $scope.osSelection.osystem = "ubuntu";
51+ $scope.osSelection.release = "ubuntu/xenial";
52+ $scope.osSelection.hwe_kernel = "ga-16.04";
53+ $scope.actionGo();
54+ expect(MachinesManager.performAction).toHaveBeenCalledWith(
55+ node, "deploy", {
56+ osystem: "ubuntu",
57+ distro_series: "xenial",
58+ hwe_kernel: "ga-16.04"
59+ });
60+ });
61+
62 it("calls performAction with commissionOptions", function() {
63 var controller = makeController();
64 spyOn(MachinesManager, "performAction").and.returnValue(