ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jai...@apache.org
Subject [1/3] ambari git commit: AMBARI-16674. Cluster deployment fails when using base stack version. (jaimin)
Date Mon, 16 May 2016 07:00:15 GMT
Repository: ambari
Updated Branches:
  refs/heads/branch-2.4 c41a1eb12 -> 7f333cc02


http://git-wip-us.apache.org/repos/asf/ambari/blob/7f333cc0/ambari-web/app/mappers/stack_mapper.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/mappers/stack_mapper.js b/ambari-web/app/mappers/stack_mapper.js
index f9400c4..473c466 100644
--- a/ambari-web/app/mappers/stack_mapper.js
+++ b/ambari-web/app/mappers/stack_mapper.js
@@ -99,8 +99,6 @@ App.stackMapper = App.QuickDataMapper.create({
     var operatingSystemsArray = [];
     var servicesArray = [];
 
-    stack.id = stack.stack_name + "-" + stack.stack_version + "-" + stack.repository_version;
//HDP-2.5-2.5.0.0
-
     item.operating_systems.forEach(function(ops) {
       var operatingSystems = ops.OperatingSystems;
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/7f333cc0/ambari-web/app/utils/ajax/ajax.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/utils/ajax/ajax.js b/ambari-web/app/utils/ajax/ajax.js
index 866c454..e7059e7 100644
--- a/ambari-web/app/utils/ajax/ajax.js
+++ b/ambari-web/app/utils/ajax/ajax.js
@@ -2187,7 +2187,7 @@ var urls = {
   },
 
   'wizard.stacks_versions_definitions': {
-    'real': '/version_definitions?fields=operating_systems/repositories/Repositories/*,operating_systems/OperatingSystems/*,VersionDefinition/stack_services,VersionDefinition/repository_version'
+
+    'real': '/version_definitions?fields=VersionDefinition/stack_default,operating_systems/repositories/Repositories/*,operating_systems/OperatingSystems/*,VersionDefinition/stack_services,VersionDefinition/repository_version'
+
       '&VersionDefinition/show_available=true&VersionDefinition/stack_name={stackName}',
     'mock': '/data/wizard/stack/{stackName}_version_definitions.json'
   },

http://git-wip-us.apache.org/repos/asf/ambari/blob/7f333cc0/ambari-web/test/mappers/stack_mapper_test.js
----------------------------------------------------------------------
diff --git a/ambari-web/test/mappers/stack_mapper_test.js b/ambari-web/test/mappers/stack_mapper_test.js
index 37138ee..709c749 100644
--- a/ambari-web/test/mappers/stack_mapper_test.js
+++ b/ambari-web/test/mappers/stack_mapper_test.js
@@ -30,12 +30,11 @@ describe('App.stackMapper', function () {
       "items" : [
       {
         "VersionDefinition" : {
-          "id" : 1,
+          "id" : "HDP-2.3",
           "show_available": true,
           "stack_name" : "HDP",
           "stack_version" : "2.3",
-          "repository_version" : "2.3.4.0-3396",
-          "type" : "STANDARD",
+          "repository_version" : "2.3",
           "version_url" : "file:/Users/ncole/src/hwx/ambari/contrib/version-builder/version_234-3396.xml",
           "release" : {
             "build" : "3396",
@@ -158,12 +157,11 @@ describe('App.stackMapper', function () {
 
       {
         "VersionDefinition" : {
-          "id" : 2,
+          "id" : "HDP-2.3-2.3.4.0",
           "stack_name" : "HDP",
           "stack_version" : "2.3",
           "show_available": true,
-          "repository_version" : "2.3.4.0-3397",
-          "type" : "STANDARD",
+          "repository_version" : "2.3.4.0",
           "version_url" : "file:/Users/ncole/src/hwx/ambari/contrib/version-builder/version_234-3397.xml",
           "release" : {
             "build" : "3397",
@@ -302,12 +300,11 @@ describe('App.stackMapper', function () {
 
       {
         "VersionDefinition" : {
-          "id" : 5,
+          "id" : "HDP-2.3-2.3.6.0",
           "stack_name" : "HDP",
           "stack_version" : "2.3",
           "show_available": true,
-          "repository_version" : "2.3.6.0-3646",
-          "type" : "STANDARD",
+          "repository_version" : "2.3.6.0",
           "version_url" : "file:/Users/ncole/src/hwx/ambari/contrib/version-builder/version_234-3646.xml",
           "release" : {
             "build" : "3646",
@@ -447,12 +444,11 @@ describe('App.stackMapper', function () {
 
       {
         "VersionDefinition" : {
-          "id" : 3,
+          "id" : "HDP-2.4-2.4.0.0",
           "stack_name" : "HDP",
           "stack_version" : "2.4",
           "show_available": true,
-          "repository_version" : "2.4.0.0-169",
-          "type" : "STANDARD",
+          "repository_version" : "2.4.0.0",
           "version_url" : "file:/Users/ncole/src/hwx/ambari/contrib/version-builder/version_169.xml",
           "release" : {
             "build" : "169",
@@ -607,19 +603,14 @@ describe('App.stackMapper', function () {
       expect(App.Stack.find().everyProperty('isSelected')).to.equal(false);
     });
 
-    it ('stack ids are valid', function() {
-      expect(App.Stack.find().mapProperty('id')).to.eql(
-        ['HDP-2.4-2.4.0.0-169','HDP-2.3-2.3.6.0-3646', 'HDP-2.3-2.3.4.0-3397', 'HDP-2.3-2.3.4.0-3396']);
-    });
-
     it ('7 OSes are mapped', function() {
       expect(App.OperatingSystem.find().get('length')).to.equal(7);
     });
 
     it ('OSes have valid ids', function() {
       expect(App.OperatingSystem.find().mapProperty('id')).to.eql(
-        ['HDP-2.4-2.4.0.0-169-debian7', 'HDP-2.3-2.3.6.0-3646-debian7', 'HDP-2.3-2.3.6.0-3646-redhat6',
'HDP-2.3-2.3.4.0-3397-debian7',
-        'HDP-2.3-2.3.4.0-3397-redhat6', 'HDP-2.3-2.3.4.0-3396-debian7', 'HDP-2.3-2.3.4.0-3396-redhat6']);
+        ['HDP-2.4-2.4.0.0-debian7', 'HDP-2.3-2.3.6.0-debian7', 'HDP-2.3-2.3.6.0-redhat6',
'HDP-2.3-2.3.4.0-debian7',
+        'HDP-2.3-2.3.4.0-redhat6', 'HDP-2.3-debian7', 'HDP-2.3-redhat6']);
     });
 
     it ('14 repositories are mapped', function() {
@@ -628,13 +619,13 @@ describe('App.stackMapper', function () {
 
     it ('Repositories ids are valid', function() {
       expect(App.Repository.find().mapProperty('id')).to.eql(
-        ['HDP-2.4-2.4.0.0-169-debian7-HDP-2.4', 'HDP-2.4-2.4.0.0-169-debian7-HDP-UTILS-1.1.0.20',
-          'HDP-2.3-2.3.6.0-3646-debian7-HDP-2.3', 'HDP-2.3-2.3.6.0-3646-debian7-HDP-UTILS-1.1.0.20',
-          'HDP-2.3-2.3.6.0-3646-redhat6-HDP-2.3','HDP-2.3-2.3.6.0-3646-redhat6-HDP-UTILS-1.1.0.20',
-          'HDP-2.3-2.3.4.0-3397-debian7-HDP-2.3','HDP-2.3-2.3.4.0-3397-debian7-HDP-UTILS-1.1.0.20',
-          'HDP-2.3-2.3.4.0-3397-redhat6-HDP-2.3', 'HDP-2.3-2.3.4.0-3397-redhat6-HDP-UTILS-1.1.0.20',
-          'HDP-2.3-2.3.4.0-3396-debian7-HDP-2.3', 'HDP-2.3-2.3.4.0-3396-debian7-HDP-UTILS-1.1.0.20',
-          'HDP-2.3-2.3.4.0-3396-redhat6-HDP-2.3', 'HDP-2.3-2.3.4.0-3396-redhat6-HDP-UTILS-1.1.0.20'
+        ['HDP-2.4-2.4.0.0-debian7-HDP-2.4', 'HDP-2.4-2.4.0.0-debian7-HDP-UTILS-1.1.0.20',
+          'HDP-2.3-2.3.6.0-debian7-HDP-2.3', 'HDP-2.3-2.3.6.0-debian7-HDP-UTILS-1.1.0.20',
+          'HDP-2.3-2.3.6.0-redhat6-HDP-2.3','HDP-2.3-2.3.6.0-redhat6-HDP-UTILS-1.1.0.20',
+          'HDP-2.3-2.3.4.0-debian7-HDP-2.3','HDP-2.3-2.3.4.0-debian7-HDP-UTILS-1.1.0.20',
+          'HDP-2.3-2.3.4.0-redhat6-HDP-2.3', 'HDP-2.3-2.3.4.0-redhat6-HDP-UTILS-1.1.0.20',
+          'HDP-2.3-debian7-HDP-2.3', 'HDP-2.3-debian7-HDP-UTILS-1.1.0.20',
+          'HDP-2.3-redhat6-HDP-2.3', 'HDP-2.3-redhat6-HDP-UTILS-1.1.0.20'
         ]);
     });
   });


Mime
View raw message