. the port of k8s plugin has changed from 8081 to 9015
. the value from 200 to 300 is acceptable from k8s plugin
Change-Id: I85c61d2275c7913f8c8dbeee0751349552bec29d
Issue-ID: MULTICLOUD-650
Signed-off-by: liboNet <libo.zhu@intel.com>
public class K8sArtifactForwarder implements ArtifactForwarder {
private static final Logger LOGGER = FlexLogger.getLogger(K8sArtifactForwarder.class);
public class K8sArtifactForwarder implements ArtifactForwarder {
private static final Logger LOGGER = FlexLogger.getLogger(K8sArtifactForwarder.class);
- private static final String BASE_PATH = "http://localhost:8081/v1/rb/definition";
+ private static final String BASE_PATH = "http://localhost:9015/v1/rb/definition";
private static final String CLOUD_TECHNOLOGY_SPECIFIC_ARTIFACT = "CLOUD_TECHNOLOGY_SPECIFIC_ARTIFACT";
private Map<String, IArtifactInfo> artifactMap;
private static final String CLOUD_TECHNOLOGY_SPECIFIC_ARTIFACT = "CLOUD_TECHNOLOGY_SPECIFIC_ARTIFACT";
private Map<String, IArtifactInfo> artifactMap;
String result = EntityUtils.toString(closeableHttpResponse.getEntity());
System.out.println("result = {}" + result);
System.out.println("status = {}" + closeableHttpResponse.getStatusLine().getStatusCode());
String result = EntityUtils.toString(closeableHttpResponse.getEntity());
System.out.println("result = {}" + result);
System.out.println("status = {}" + closeableHttpResponse.getStatusLine().getStatusCode());
- if ( closeableHttpResponse.getStatusLine().getStatusCode() != 200 ) {
- System.out.println("exception: ret= " + closeableHttpResponse.getStatusLine().getStatusCode());
- } else {
+ int status = closeableHttpResponse.getStatusLine().getStatusCode();
+ // [200, 300] means pass
+ if ( (status >=200) && (status <= 300) ) {
+ } else {
+ System.out.println("exception: ret= " + status);
}
closeableHttpResponse.close();
}
closeableHttpResponse.close();