优化代码
parent
ffc9c77053
commit
1c9cfb6a85
|
@ -42,8 +42,8 @@ public class TianyiProvider {
|
|||
private Butler butler;
|
||||
private String regionId = "cn-jssz1";
|
||||
public static final Integer SUCCESS_STATUS_CODE = 800;
|
||||
public String PROTOCOL = "http://70.10.130.186:12315";
|
||||
public String apiDomain = "";
|
||||
public String apiPort = "31167";
|
||||
public Integer PAGE_SIZE = 50;
|
||||
private final HttpClient client = new HttpClient(60 * 1000, PostDataFormat.RAW);
|
||||
protected ResultBuilder resultBuilder = new CommonResultBuilder();
|
||||
|
@ -61,9 +61,10 @@ public class TianyiProvider {
|
|||
this.ctUserId = butler.getProjectId();
|
||||
this.regionId = butler.getRegionId() == null ? this.regionId : butler.getRegionId().trim();
|
||||
if (StringUtils.hasText(butler.getUrl())) {
|
||||
this.PROTOCOL = butler.getUrl();
|
||||
this.apiDomain = butler.getUrl();
|
||||
// TODO: 先写死,以后会从url中解析
|
||||
this.apiPort = "31167";
|
||||
}
|
||||
this.apiDomain = "http://ct-global.ctapi.ctyun.local:31167";
|
||||
}
|
||||
|
||||
public boolean accessable() {
|
||||
|
|
|
@ -32,7 +32,7 @@ public class TianYiContainerClusterProvider extends TianyiProvider {
|
|||
public TianYiContainerClusterProvider(Butler butler) {
|
||||
super(butler);
|
||||
this.butler = butler;
|
||||
this.apiDomain = "http://ccse-global.ctapi.ctyun.local:31167";
|
||||
this.apiDomain = "http://ccse-global.ctapi.ctyun.local:" + this.apiPort;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -33,7 +33,7 @@ public class TianYiContainerNodeProvider extends TianyiProvider {
|
|||
public TianYiContainerNodeProvider(Butler butler) {
|
||||
super(butler);
|
||||
this.butler = butler;
|
||||
this.apiDomain = "http://ccse-global.ctapi.ctyun.local:31167";
|
||||
this.apiDomain = "http://ccse-global.ctapi.ctyun.local:" + this.apiPort;
|
||||
}
|
||||
|
||||
public GeneralResult listNodes(String clusterName) {
|
||||
|
|
Loading…
Reference in New Issue