internal static StandAloneCluster ConstructClusterFromJson(StandAloneInstallerJsonModelBase jsonModel, FabricNativeConfigStore configStore) { UpgradeOrchestrationTrace.TraceSource.WriteInfo(TraceType, "Creating userconfig, cluster topology, adminconfig."); var userConfig = jsonModel.GetUserConfig(); var clusterTopology = jsonModel.GetClusterTopology(); var adminConfig = new StandaloneAdminConfig(); var logger = new StandAloneTraceLogger("StandAloneDeploymentManager"); UpgradeOrchestrationTrace.TraceSource.WriteInfo(TraceType, "Creating new StandAlone cluster resource."); var clusterId = configStore.ReadUnencryptedString(Constants.SectionName, Constants.ClusterIdParameterName); var clusterResource = new StandAloneCluster(adminConfig, userConfig, clusterTopology, clusterId, logger); return(clusterResource); }
internal static StandAloneCluster PopulateStandAloneClusterWithBaselineJson(string jsonFilePath) { StandAloneInstallerJsonModelBase jsonConfig = StandAloneInstallerJsonModelBase.GetJsonConfigFromFile(Path.Combine(Utility.TestDirectory, jsonFilePath)); var userConfig = jsonConfig.GetUserConfig(); var clusterTopology = jsonConfig.GetClusterTopology(); var adminConfig = new StandaloneAdminConfig(); var logger = new StandAloneTraceLogger("StandAloneDeploymentManager"); string customizedClusterId = jsonConfig.GetClusterRegistrationId(); return(new StandAloneCluster( adminConfig, userConfig, clusterTopology, customizedClusterId ?? "acf4dc93-9b64-4504-8b6f-0b7fd052e096", logger)); }