...
|
...
|
@@ -200,6 +200,10 @@ public class QcloudClientFactory { |
|
|
String hostid=jo.getString("InstanceId");
|
|
|
String hostname=jo.getString("InstanceName");
|
|
|
String ip=jo.getJSONArray("PrivateIpAddresses").size()>0?jo.getJSONArray("PrivateIpAddresses").getString(0):"";
|
|
|
String restrictState=jo.getString("RestrictState"); ///状态,不要EXPIRED状态的主机,NORMAL表示正常状态的实例 ,EXPIRED:表示过期的实例 ,PROTECTIVELY_ISOLATED:表示被安全隔离的实例。
|
|
|
if("EXPIRED".equalsIgnoreCase(restrictState)){
|
|
|
continue;
|
|
|
}
|
|
|
if(!instanceIDs.contains(hostid)){
|
|
|
instanceIDs.add(hostid);
|
|
|
Host host=new Host(DataCenter.qcloud,hostid, ip, hostname);
|
...
|
...
|
@@ -229,6 +233,10 @@ public class QcloudClientFactory { |
|
|
String hostid=jo.getString("InstanceId");
|
|
|
String hostname=jo.getString("InstanceName");
|
|
|
String ip=jo.getJSONArray("PrivateIpAddresses").size()>0?jo.getJSONArray("PrivateIpAddresses").getString(0):"";
|
|
|
String restrictState=jo.getString("RestrictState"); ///状态,不要EXPIRED状态的主机,NORMAL表示正常状态的实例 ,EXPIRED:表示过期的实例 ,PROTECTIVELY_ISOLATED:表示被安全隔离的实例。
|
|
|
if("EXPIRED".equalsIgnoreCase(restrictState)){
|
|
|
continue;
|
|
|
}
|
|
|
if(!instanceIDs.contains(hostid)){
|
|
|
instanceIDs.add(hostid);
|
|
|
Host host=new Host(DataCenter.qcloud,hostid, ip, hostname);
|
...
|
...
|
|