Showing
1 changed file
with
0 additions
and
24 deletions
@@ -181,30 +181,6 @@ public class NginxSwitchCtrl { | @@ -181,30 +181,6 @@ public class NginxSwitchCtrl { | ||
181 | @ResponseBody | 181 | @ResponseBody |
182 | public BaseResponse viewToChangeNginxConf(String cloudName, String target, String onlineOrGray) { | 182 | public BaseResponse viewToChangeNginxConf(String cloudName, String target, String onlineOrGray) { |
183 | try{ | 183 | try{ |
184 | - //线上切换 | ||
185 | - /*String tag = StringUtils.equals("gray", target) ? HostTagConstant.tag_huidu_cn : HostTagConstant.tag_gateway; | ||
186 | - | ||
187 | - //需要查询的gateway机子 | ||
188 | - int gatewayCloudType = StringUtils.equals("aws", target) ? 1 : 2; | ||
189 | - | ||
190 | - //获取gateway或graygateway服务器 | ||
191 | - List<HostInfo> gatewayHosts = hostInfoMapper.selectHostInfosByTagAndCloudType(tag, gatewayCloudType); | ||
192 | - | ||
193 | - if (CollectionUtils.isEmpty(gatewayHosts)) { | ||
194 | - return new BaseResponse(500, cloudName + "在cmdb中未找到对应" + tag + "的服务器!"); | ||
195 | - } | ||
196 | - Iterator<HostInfo> infoIterator = gatewayHosts.iterator(); | ||
197 | - while (infoIterator.hasNext()) { | ||
198 | - HostInfo hostInfo = infoIterator.next(); | ||
199 | - if (HostTagConstant.tag_gateway.equals(tag)) { | ||
200 | - if (hostInfo.getTags().indexOf(HostTagConstant.tag_huidu_cn) != -1) { | ||
201 | - infoIterator.remove(); | ||
202 | - } | ||
203 | - } else if (hostInfo.getTags().indexOf(HostTagConstant.tag_gateway) == -1) { | ||
204 | - infoIterator.remove(); | ||
205 | - } | ||
206 | - }*/ | ||
207 | - | ||
208 | List<String> gatewayHostIps=new ArrayList<>(); | 184 | List<String> gatewayHostIps=new ArrayList<>(); |
209 | if(StringUtils.equals("gray", target)){ | 185 | if(StringUtils.equals("gray", target)){ |
210 | gatewayHostIps = getGatewayHostIPs(HostTagConstant.tag_huidu_cn); | 186 | gatewayHostIps = getGatewayHostIPs(HostTagConstant.tag_huidu_cn); |
-
Please register or login to post a comment