diff --git a/bocloud.ctstack.plugin/src/main/java/com/bocloud/ctstack/plugin/provider/TianyiProvider.java b/bocloud.ctstack.plugin/src/main/java/com/bocloud/ctstack/plugin/provider/TianyiProvider.java index 069051c1..669dbfb1 100644 --- a/bocloud.ctstack.plugin/src/main/java/com/bocloud/ctstack/plugin/provider/TianyiProvider.java +++ b/bocloud.ctstack.plugin/src/main/java/com/bocloud/ctstack/plugin/provider/TianyiProvider.java @@ -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() { diff --git a/bocloud.ctstack.plugin/src/main/java/com/bocloud/ctstack/plugin/provider/container/TianYiContainerClusterProvider.java b/bocloud.ctstack.plugin/src/main/java/com/bocloud/ctstack/plugin/provider/container/TianYiContainerClusterProvider.java index 816aed21..d80bc366 100644 --- a/bocloud.ctstack.plugin/src/main/java/com/bocloud/ctstack/plugin/provider/container/TianYiContainerClusterProvider.java +++ b/bocloud.ctstack.plugin/src/main/java/com/bocloud/ctstack/plugin/provider/container/TianYiContainerClusterProvider.java @@ -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; } diff --git a/bocloud.ctstack.plugin/src/main/java/com/bocloud/ctstack/plugin/provider/container/TianYiContainerNodeProvider.java b/bocloud.ctstack.plugin/src/main/java/com/bocloud/ctstack/plugin/provider/container/TianYiContainerNodeProvider.java index 9e5fa9a9..616a6d73 100644 --- a/bocloud.ctstack.plugin/src/main/java/com/bocloud/ctstack/plugin/provider/container/TianYiContainerNodeProvider.java +++ b/bocloud.ctstack.plugin/src/main/java/com/bocloud/ctstack/plugin/provider/container/TianYiContainerNodeProvider.java @@ -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) {