Repository: ambari
Updated Branches:
  refs/heads/trunk 6b19bc46f -> 3affda38d


AMBARI-21960. Cluster provision should allow repo version and repo version id 
be null to allow default stack version deployment (ncole)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/3affda38
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/3affda38
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/3affda38

Branch: refs/heads/trunk
Commit: 3affda38defa4f74ae981e78b6c85c0048635fb2
Parents: 6b19bc4
Author: Nate Cole <nc...@hortonworks.com>
Authored: Thu Sep 14 12:30:12 2017 -0400
Committer: Nate Cole <nc...@hortonworks.com>
Committed: Thu Sep 14 12:30:12 2017 -0400

----------------------------------------------------------------------
 .../org/apache/ambari/server/topology/TopologyManager.java    | 7 -------
 .../apache/ambari/server/topology/TopologyManagerTest.java    | 2 +-
 2 files changed, 1 insertion(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/3affda38/ambari-server/src/main/java/org/apache/ambari/server/topology/TopologyManager.java
----------------------------------------------------------------------
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/topology/TopologyManager.java
 
b/ambari-server/src/main/java/org/apache/ambari/server/topology/TopologyManager.java
index 0863e37..ce99e05 100644
--- 
a/ambari-server/src/main/java/org/apache/ambari/server/topology/TopologyManager.java
+++ 
b/ambari-server/src/main/java/org/apache/ambari/server/topology/TopologyManager.java
@@ -116,9 +116,6 @@ public class TopologyManager {
   private Map<Long, ClusterTopology> clusterTopologyMap = new HashMap<>();
 
   @Inject
-  private Injector injector;
-
-  @Inject
   private StackAdvisorBlueprintProcessor stackAdvisorBlueprintProcessor;
 
   @Inject
@@ -277,10 +274,6 @@ public class TopologyManager {
     SecurityType securityType = null;
     Credential credential = null;
 
-    if (null == repoVersion && null == repoVersionID) {
-      throw new AmbariException("Repository should be created and the version 
passed in the request.");
-    }
-
     SecurityConfiguration securityConfiguration = 
processSecurityConfiguration(request);
 
     if (securityConfiguration != null && securityConfiguration.getType() == 
SecurityType.KERBEROS) {

http://git-wip-us.apache.org/repos/asf/ambari/blob/3affda38/ambari-server/src/test/java/org/apache/ambari/server/topology/TopologyManagerTest.java
----------------------------------------------------------------------
diff --git 
a/ambari-server/src/test/java/org/apache/ambari/server/topology/TopologyManagerTest.java
 
b/ambari-server/src/test/java/org/apache/ambari/server/topology/TopologyManagerTest.java
index 45c8b1a..ac643d7 100644
--- 
a/ambari-server/src/test/java/org/apache/ambari/server/topology/TopologyManagerTest.java
+++ 
b/ambari-server/src/test/java/org/apache/ambari/server/topology/TopologyManagerTest.java
@@ -118,6 +118,7 @@ public class TopologyManagerTest {
 
   @Mock(type = MockType.NICE)
   private ProvisionClusterRequest request;
+
   private final PersistedTopologyRequest persistedTopologyRequest = new 
PersistedTopologyRequest(1, request);
   @Mock(type = MockType.STRICT)
   private LogicalRequestFactory logicalRequestFactory;
@@ -284,7 +285,6 @@ public class TopologyManagerTest {
     expect(request.getDescription()).andReturn("Provision Cluster 
Test").anyTimes();
     expect(request.getConfiguration()).andReturn(topoConfiguration).anyTimes();
     expect(request.getHostGroupInfo()).andReturn(groupInfoMap).anyTimes();
-    expect(request.getRepositoryVersion()).andReturn("1").anyTimes();
     
expect(request.getConfigRecommendationStrategy()).andReturn(ConfigRecommendationStrategy.NEVER_APPLY).anyTimes();
     expect(request.getSecurityConfiguration()).andReturn(null).anyTimes();
 

Reply via email to