Ejemplo n.º 1
0
        private static async Task PostConfigurationSystemHealth(string importFilepath)
        {
            if (string.IsNullOrEmpty(importFilepath))
            {
                Console.WriteLine("Missing option: --import-filepath");
                return;
            }

            var filecheck = new FileChecker(importFilepath);

            (bool flag, string reason) = filecheck.ValidateFile();
            if (flag == false)
            {
                Console.WriteLine(reason);
                return;
            }

            var sb = new StringBuilder();

            sb.Append(RestClient.baseUrl);
            sb.Append("/configuration");
            sb.Append("/system");
            sb.Append("/healthendpoints");
            await RestClient.HttpPoster(sb.ToString(), reason);
        }
Ejemplo n.º 2
0
        private static async Task PostConnectivityIdLogging(string connectivityId, string importFilepath = "as")
        {
            if (string.IsNullOrEmpty(connectivityId))
            {
                Console.WriteLine("Missing option: --connectivity-id");
                return;
            }

            if (string.IsNullOrEmpty(importFilepath))
            {
                Console.WriteLine("Missing option: --import-filepath");
                return;
            }

            var filecheck = new FileChecker(importFilepath);

            (bool flag, string reason) = filecheck.ValidateFile();
            if (flag == false)
            {
                Console.WriteLine(reason);
                return;
            }

            var sb = new StringBuilder();

            sb.Append(RestClient.baseUrl);
            sb.Append("/configuration");
            sb.Append($"/{connectivityId}");
            sb.Append("/Logging");
            await RestClient.HttpPoster(sb.ToString(), reason);
        }