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

Proposed by Lee Trager
Status: Merged
Approved by: Lee Trager
Approved revision: no longer in the source branch.
Merged at revision: 5628
Proposed branch: lp:~ltrager/maas/lp1654432
Merge into: lp:~maas-committers/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) Approve
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.
Revision history for this message
Gavin Panella (allenap) :
review: Approve
Revision history for this message
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
=== modified file 'src/maasserver/static/js/angular/controllers/node_details.js'
--- src/maasserver/static/js/angular/controllers/node_details.js 2016-12-07 12:46:14 +0000
+++ src/maasserver/static/js/angular/controllers/node_details.js 2017-01-06 00:30:19 +0000
@@ -616,7 +616,8 @@
616 extra.distro_series = release;616 extra.distro_series = release;
617 // hwe_kernel is optional so only include it if its specified617 // hwe_kernel is optional so only include it if its specified
618 if(angular.isString($scope.osSelection.hwe_kernel) &&618 if(angular.isString($scope.osSelection.hwe_kernel) &&
619 ($scope.osSelection.hwe_kernel.indexOf('hwe-') >= 0)) {619 ($scope.osSelection.hwe_kernel.indexOf('hwe-') >= 0 ||
620 $scope.osSelection.hwe_kernel.indexOf('ga-') >= 0)) {
620 extra.hwe_kernel = $scope.osSelection.hwe_kernel;621 extra.hwe_kernel = $scope.osSelection.hwe_kernel;
621 }622 }
622 } else if($scope.actionOption.name === "commission") {623 } else if($scope.actionOption.name === "commission") {
623624
=== modified file 'src/maasserver/static/js/angular/controllers/tests/test_node_details.js'
--- src/maasserver/static/js/angular/controllers/tests/test_node_details.js 2016-12-07 12:46:14 +0000
+++ src/maasserver/static/js/angular/controllers/tests/test_node_details.js 2017-01-06 00:30:19 +0000
@@ -1082,6 +1082,46 @@
1082 });1082 });
1083 });1083 });
10841084
1085 it("calls performAction with hwe kernel", function() {
1086 var controller = makeController();
1087 spyOn(MachinesManager, "performAction").and.returnValue(
1088 $q.defer().promise);
1089 $scope.node = node;
1090 $scope.actionOption = {
1091 name: "deploy"
1092 };
1093 $scope.osSelection.osystem = "ubuntu";
1094 $scope.osSelection.release = "ubuntu/xenial";
1095 $scope.osSelection.hwe_kernel = "hwe-16.04-edge";
1096 $scope.actionGo();
1097 expect(MachinesManager.performAction).toHaveBeenCalledWith(
1098 node, "deploy", {
1099 osystem: "ubuntu",
1100 distro_series: "xenial",
1101 hwe_kernel: "hwe-16.04-edge"
1102 });
1103 });
1104
1105 it("calls performAction with ga kernel", function() {
1106 var controller = makeController();
1107 spyOn(MachinesManager, "performAction").and.returnValue(
1108 $q.defer().promise);
1109 $scope.node = node;
1110 $scope.actionOption = {
1111 name: "deploy"
1112 };
1113 $scope.osSelection.osystem = "ubuntu";
1114 $scope.osSelection.release = "ubuntu/xenial";
1115 $scope.osSelection.hwe_kernel = "ga-16.04";
1116 $scope.actionGo();
1117 expect(MachinesManager.performAction).toHaveBeenCalledWith(
1118 node, "deploy", {
1119 osystem: "ubuntu",
1120 distro_series: "xenial",
1121 hwe_kernel: "ga-16.04"
1122 });
1123 });
1124
1085 it("calls performAction with commissionOptions", function() {1125 it("calls performAction with commissionOptions", function() {
1086 var controller = makeController();1126 var controller = makeController();
1087 spyOn(MachinesManager, "performAction").and.returnValue(1127 spyOn(MachinesManager, "performAction").and.returnValue(