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
=== modified file 'docs/changelog.rst'
--- docs/changelog.rst 2016-12-21 12:55:00 +0000
+++ docs/changelog.rst 2017-01-09 22:40:17 +0000
@@ -38,6 +38,8 @@
3838
39LP: #1651452 Use correct escaping for EFI's kernel command line datasource_list.39LP: #1651452 Use correct escaping for EFI's kernel command line datasource_list.
4040
41LP: #1654432 Unable to deploy ga kernel on node-details page
42
4143
422.1.2442.1.2
43=====45=====
4446
=== modified file 'src/maasserver/static/js/angular/controllers/node_details.js'
--- src/maasserver/static/js/angular/controllers/node_details.js 2016-09-21 14:49:23 +0000
+++ src/maasserver/static/js/angular/controllers/node_details.js 2017-01-09 22:40:17 +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-09-22 15:05:38 +0000
+++ src/maasserver/static/js/angular/controllers/tests/test_node_details.js 2017-01-09 22:40:17 +0000
@@ -1049,6 +1049,46 @@
1049 });1049 });
1050 });1050 });
10511051
1052 it("calls performAction with hwe kernel", function() {
1053 var controller = makeController();
1054 spyOn(MachinesManager, "performAction").and.returnValue(
1055 $q.defer().promise);
1056 $scope.node = node;
1057 $scope.actionOption = {
1058 name: "deploy"
1059 };
1060 $scope.osSelection.osystem = "ubuntu";
1061 $scope.osSelection.release = "ubuntu/xenial";
1062 $scope.osSelection.hwe_kernel = "hwe-16.04-edge";
1063 $scope.actionGo();
1064 expect(MachinesManager.performAction).toHaveBeenCalledWith(
1065 node, "deploy", {
1066 osystem: "ubuntu",
1067 distro_series: "xenial",
1068 hwe_kernel: "hwe-16.04-edge"
1069 });
1070 });
1071
1072 it("calls performAction with ga kernel", function() {
1073 var controller = makeController();
1074 spyOn(MachinesManager, "performAction").and.returnValue(
1075 $q.defer().promise);
1076 $scope.node = node;
1077 $scope.actionOption = {
1078 name: "deploy"
1079 };
1080 $scope.osSelection.osystem = "ubuntu";
1081 $scope.osSelection.release = "ubuntu/xenial";
1082 $scope.osSelection.hwe_kernel = "ga-16.04";
1083 $scope.actionGo();
1084 expect(MachinesManager.performAction).toHaveBeenCalledWith(
1085 node, "deploy", {
1086 osystem: "ubuntu",
1087 distro_series: "xenial",
1088 hwe_kernel: "ga-16.04"
1089 });
1090 });
1091
1052 it("calls performAction with commissionOptions", function() {1092 it("calls performAction with commissionOptions", function() {
1053 var controller = makeController();1093 var controller = makeController();
1054 spyOn(MachinesManager, "performAction").and.returnValue(1094 spyOn(MachinesManager, "performAction").and.returnValue(

Subscribers

People subscribed via source and target branches

to all changes: