stratos-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From R-Rajkumar <...@git.apache.org>
Subject [GitHub] stratos pull request: implementing STRATOS-1628
Date Sat, 21 Nov 2015 14:29:50 GMT
Github user R-Rajkumar commented on a diff in the pull request:

    https://github.com/apache/stratos/pull/492#discussion_r45546692
  
    --- Diff: components/org.apache.stratos.mock.iaas.client/src/main/java/org/apache/stratos/mock/iaas/client/MockIaasApiClient.java
---
    @@ -48,6 +49,20 @@ public MockIaasApiClient(String endpoint) {
             this.endpoint = endpoint;
         }
     
    +    public boolean isMockIaaSReady() {
    +        try {
    +            URI uri = new URIBuilder(endpoint + INIT_CONTEXT).build();
    +            HttpResponse response = restClient.doGet(uri);
    +            if (response != null) {
    +                return response.getStatusCode() == 200;
    +            }
    +            throw new RuntimeException("An unknown error occurred");
    +        } catch (Exception e) {
    +            String message = "Could not check whether mock-iaas is active";
    +            throw new RuntimeException(message, e);
    --- End diff --
    
    RuntimeException is used all over this class. We will fix this in a separate commit. 


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message