Combine() public static method

public static Combine ( ) : string
return string
Beispiel #1
0
        public string ReadVmProviderDataKey(string key)
        {
            var result = ReadDataKey(Constants.Combine(Constants.ReadOnlyDataConfigBase, Constants.ProviderDataBase, key));

            _logger.Log("ProviderData key:" + key + " value:" + result);
            return(result);
        }
Beispiel #2
0
        public void Remove(string key)
        {
            var keyPath   = Constants.Combine(Constants.WritableDataHostBase, key);
            var paramList = new Dictionary <string, string> {
                { "Pathname", keyPath }
            };
            var inParams = addPramsToMethod(Session, "RemoveValue", paramList);

            Session.InvokeMethod("RemoveValue", inParams, null);
        }
Beispiel #3
0
        public void Write(string key, string value)
        {
            var keyPath   = Constants.Combine(Constants.WritableDataGuestBase, key);
            var paramList = new Dictionary <string, string> {
                { "Pathname", keyPath }, { "value", value }
            };
            var inParams = addPramsToMethod(Session, "SetValue", paramList);

            Session.InvokeMethod("SetValue", inParams, null);
        }
Beispiel #4
0
        public string ReadVmProviderDataKey(string key)
        {
            var result = _executableProcess.Run(Constants.XenClientPath, "read " + Constants.Combine(Constants.ReadOnlyDataConfigBase, Constants.ProviderDataBase, key));

            if (result.ExitCode == "0" && result.Output != null && result.Output.Any())
            {
                return(result.Output.First());
            }
            return(string.Empty);
        }
        public void GetWhiteListIps(ref ProviderData providerData)
        {
            var numberOfWhiteListIps = _xenStore.Read(Constants.Combine(Constants.ReadOnlyDataConfigBase, Constants.ProviderDataBase, Constants.IpWhiteList));

            if (numberOfWhiteListIps != null && numberOfWhiteListIps.Any())
            {
                providerData.ip_whitelist.AddRange(numberOfWhiteListIps);

                foreach (var numberOfWhiteListIp in numberOfWhiteListIps)
                {
                    var jsonData = _xenStore.ReadVmProviderDataKey((Constants.Combine(Constants.IpWhiteList, numberOfWhiteListIp)));
                    if (!string.IsNullOrEmpty(jsonData))
                    {
                        providerData.white_List_Ips.Add(jsonData);
                    }
                }
            }
        }
Beispiel #6
0
 public string ReadVmData(string key)
 {
     return(ReadDataKey(Constants.Combine(Constants.ReadOnlyDataConfigBase, key)));
 }
Beispiel #7
0
 public string ReadKey(string key)
 {
     return(ReadDataKey(Constants.Combine(Constants.WritableDataHostBase, key)));
 }
Beispiel #8
0
 public void Remove(string key)
 {
     _executableProcess.Run(Constants.XenClientPath, "remove " + Constants.Combine(Constants.WritableDataHostBase, key));
 }
Beispiel #9
0
 public void Write(string key, string value)
 {
     _executableProcess.Run(Constants.XenClientPath, "write " + Constants.Combine(Constants.WritableDataGuestBase, key) + " " + value.EscapeQuotesForXenClientWrite());
 }
Beispiel #10
0
        public string ReadVmDataKey(string key)
        {
            var result = _executableProcess.Run(Constants.XenClientPath, "read " + Constants.Combine(Constants.ReadOnlyDataConfigBase, Constants.NetworkingBase, key));

            return(result.Output.First());
        }
Beispiel #11
0
        public string ReadKey(string key)
        {
            var result = _executableProcess.Run(Constants.XenClientPath, "read " + Constants.Combine(Constants.WritableDataHostBase, key));

            return(result.Output.First());
        }