...
|
...
|
@@ -145,30 +145,8 @@ public class TopoSwitchCtrl { |
|
|
}
|
|
|
|
|
|
//dns
|
|
|
String defaultDns = "";
|
|
|
|
|
|
MultiValueMap<String, String> requestEntity = new LinkedMultiValueMap<>();
|
|
|
requestEntity.add("login_token", "31578,5f5402160468dc375159e2e94eeef1da");
|
|
|
requestEntity.add("format","json");
|
|
|
requestEntity.add("domain_id", "16862974");
|
|
|
requestEntity.add("record_id","293178513");
|
|
|
|
|
|
try{
|
|
|
String requestResponse = httpRestClient.post("https://dnsapi.cn/Record.Info", requestEntity, String.class);
|
|
|
JSONObject responseJSON = JSONObject.parseObject(requestResponse);
|
|
|
JSONObject responseStatus = JSONObject.parseObject(responseJSON.getString("status"));
|
|
|
if ("1".equals(responseStatus.getString("code"))){
|
|
|
if (requestResponse.indexOf("amazonaws") == -1){
|
|
|
defaultDns = "qq";
|
|
|
}else{
|
|
|
defaultDns = "aws";
|
|
|
}
|
|
|
}else{
|
|
|
logger.error(" TopoSwitchCtrl - getNgixnStatus - JSON - err:" + responseJSON.getString("message"));
|
|
|
}
|
|
|
}catch (Exception e){
|
|
|
logger.error(" TopoSwitchCtrl - getNgixnStatus - https://dnsapi.cn/Record.Info - err", e);
|
|
|
}
|
|
|
String defaultDns = httpRestClient.defaultGet(HttpUriContants.CENTERSWITCH_DEFAULT_DNS,String.class);
|
|
|
|
|
|
resultMap.put("luaType", luaType);
|
|
|
resultMap.put("awsApiNginx", awsApiNginx);
|
|
|
resultMap.put("awsGrayNginx", awsGrayNginx);
|
...
|
...
|
|