Authored by qinchao

dns提供新的接口

... ... @@ -6,6 +6,7 @@ import com.ui.model.BaseResponse;
import com.ui.model.MonitAlarmInfo;
import com.ui.model.req.ZkDetailReq;
import com.ui.model.req.ZkTreeReq;
import org.apache.commons.lang.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
... ... @@ -83,4 +84,40 @@ public class OuterIntfCtrl {
httpClient.defaultPostJson("/maliciousIp/writeMipsInfoToOpsDb",ipsObjs,String.class);
}
/***
* DNS 更新接口
*/
@RequestMapping("/dnsJustForShell")
@ResponseBody
public String dnsJustForShell(String domain, String cloud, String type, String operate, String record, String value) {
if (StringUtils.isBlank(domain) || StringUtils.isBlank(cloud) || StringUtils.isBlank(operate)) {
return "param error";
}
Map<String, String> map=new HashMap<>();
map.put("domain",domain);
map.put("cloud",cloud);
map.put("type",type);
map.put("operate",operate);
map.put("record",record);
map.put("value",value);
return httpClient.defaultGet("/internalDns/justForShell",String.class,map);
}
@RequestMapping("/dnsJustForShellUpdate")
@ResponseBody
public String dnsJustForShellUpdate( String cloud, String record, String value) {
String domain="yohoops.org";
String operate="update";
String type=null;
return this.dnsJustForShell(domain,cloud,type,operate,record,value);
}
@RequestMapping("/dnsJustForShellCommit")
@ResponseBody
public String dnsJustForShellCommit( String cloud) {
String domain="yohoops.org";
String operate="commit";
return this.dnsJustForShell(domain,cloud,null,operate,null,null);
}
}
... ...