/// <summary> /// Gets deployment.properties from specified CM /// </summary> /// <param name="host">The host on which the CM is installed</param> /// <param name="cm">The CM to query</param> /// <param name="hashCode">The hash of the sending VM</param> public static void GetCmParams(VibesHost host, VibesCm cm, int hashCode) { ValidateParameters(host, cm); string sshCommand = SshCommands.EchoCmProperties(cm); Task <string> sshResult = Task.Run(() => ExecuteSshCommand(host, sshCommand)); OnCmCommandComplete(host, cm, sshResult.Result, hashCode: hashCode); }
/// <summary> /// Gets deployment.properties for a list of supplied CM's /// </summary> /// <param name="host">The host on which the CM is installed</param> /// <param name="cms">The CM to query</param> /// <param name="hashCode">The has of the sending VM</param> public static void GetAllCmParams(VibesHost host, List <VibesCm> cms, int hashCode) { ValidateParameters(host); List <(VibesCm, string command)> commands = new List <(VibesCm, string)>(); foreach (VibesCm cm in cms) { string sshCommand = SshCommands.EchoCmProperties(cm); commands.Add((cm, sshCommand)); } var results = Task.Run(() => ExecuteMultipleSshCommand(host, commands)); foreach (var result in results.Result) { OnCmCommandComplete(result.host, result.cm, result.result, hashCode: hashCode); } }