[성현모] CPMeta 기능 수정

This commit is contained in:
SHM
2026-02-12 10:59:13 +09:00
parent 4bfcf64720
commit 3626030124
3 changed files with 61 additions and 27 deletions

View File

@ -21,37 +21,61 @@ namespace CPMeta
public static async Task<string> HealthCheck(string host)
{
Guid guid = Guid.NewGuid();
string url = $"https://{host}:{Port}/CPMeta/Health/health";
var res = await RestAPI.GetAsync<string>(url);
var res = await RestAPI.GetAsync<string>(url, guid);
Console.ForegroundColor = ConsoleColor.Blue;
Console.WriteLine($"Response: {res} (Trace Guid:{guid})");
Console.ForegroundColor = ConsoleColor.White;
return res;
}
public static async Task<Response_SetWbmsMeta> SetWbmsMetaAsync(string host, Request_SetWbmsMeta request)
{
string url = $"https://{host}:{Port}/CPMeta/SetWbmsMeta";
Guid guid = Guid.NewGuid();
Response_SetWbmsMeta res = await RestAPI.PostAsync<Request_SetWbmsMeta,Response_SetWbmsMeta>(url, request);
string url = $"https://{host}:{Port}/CPMeta/SetWbmsMeta";
Response_SetWbmsMeta res = await RestAPI.PostAsync<Request_SetWbmsMeta,Response_SetWbmsMeta>(url, request, guid);
Console.ForegroundColor = ConsoleColor.Blue;
Console.WriteLine($"Response: {JsonConvert.SerializeObject(res, Formatting.Indented)} (Trace Guid:{guid})");
Console.ForegroundColor = ConsoleColor.White;
return res;
}
public static async Task<Response_GetWbmsMeta> GetWbmsMetaByProductId(string host, string productID, int shardID = 1)
{
Guid guid = Guid.NewGuid();
string url = $"https://{host}:{Port}/CPMeta/GetWbmsMetaByProductID?";
url += $"ProductID={productID}&";
url += $"ShardID={shardID}";
Response_GetWbmsMeta res = await RestAPI.GetAsync<Response_GetWbmsMeta>(url);
Response_GetWbmsMeta res = await RestAPI.GetAsync<Response_GetWbmsMeta>(url, guid);
Console.ForegroundColor = ConsoleColor.Blue;
Console.WriteLine($"Response: {JsonConvert.SerializeObject(res, Formatting.Indented)} (Trace Guid: {guid})");
Console.ForegroundColor = ConsoleColor.White;
return res;
}
public static async Task<Response_GetWbmsMeta> GetWbmsMetaByMacAddress(string host, string macAddress, int shardID = 1)
{
Guid guid = Guid.NewGuid();
string url = $"https://{host}:{Port}/CPMeta/GetWbmsMetaByMacAddress?";
url += $"MacAddress={macAddress}&";
url += $"ShardID={shardID}";
Response_GetWbmsMeta res = await RestAPI.GetAsync<Response_GetWbmsMeta>(url);
Response_GetWbmsMeta res = await RestAPI.GetAsync<Response_GetWbmsMeta>(url, guid);
Console.ForegroundColor = ConsoleColor.DarkYellow;
Console.WriteLine($"Response: {JsonConvert.SerializeObject(res, Formatting.Indented)} (Trace Guid: {guid})");
Console.ForegroundColor = ConsoleColor.White;
return res;
}
}