Package com.vmware.bdd.apitypes

Examples of com.vmware.bdd.apitypes.BddErrorMessage


      }
      BddException ex =
            BddException.wrapIfNeeded(t, "REST API transport layer error.");
      logger.error("rest call error", ex);
      response.setStatus(getHttpErrorCode(ex.getFullErrorId()));
      return new BddErrorMessage(ex.getFullErrorId(), extractErrorMessage(ex));
   }
View Full Code Here


   }
  
   @Test
   public void testGetClusterFailure() throws Exception {
      CookieCache.put("Cookie","JSESSIONID=2AAF431F59ACEE1CC68B43C87772C54F");
      BddErrorMessage errorMsg = new BddErrorMessage();
      errorMsg.setMessage("not found");
      ObjectMapper mapper = new ObjectMapper();

      buildReqRespWithoutReqBody(
            "https://127.0.0.1:8443/serengeti/api/network/name1", HttpMethod.GET,
            HttpStatus.NOT_FOUND, mapper.writeValueAsString(errorMsg));
View Full Code Here

   }

   @Test
   public void testCreateDatastoreFailure() throws Exception {
      CookieCache.put("Cookie","JSESSIONID=2AAF431F59ACEE1CC68B43C87772C54F");
      BddErrorMessage errorMsg = new BddErrorMessage();
      errorMsg.setMessage("already exists");
      ObjectMapper mapper = new ObjectMapper();

      buildReqRespWithoutReqBody(
            "https://127.0.0.1:8443/serengeti/api/datastores", HttpMethod.POST,
            HttpStatus.BAD_REQUEST, mapper.writeValueAsString(errorMsg));
View Full Code Here

   }

   @Test
   public void testDeleteDatastoreFailure() throws Exception {
      CookieCache.put("Cookie","JSESSIONID=2AAF431F59ACEE1CC68B43C87772C54F");
      BddErrorMessage errorMsg = new BddErrorMessage();
      errorMsg.setMessage("not found");
      ObjectMapper mapper = new ObjectMapper();

      buildReqRespWithoutReqBody(
            "https://127.0.0.1:8443/serengeti/api/datastore/ds01", HttpMethod.DELETE,
            HttpStatus.NOT_FOUND, mapper.writeValueAsString(errorMsg));
View Full Code Here

   }

   @Test
   public void testListDatastoreFailure() throws Exception {
      CookieCache.put("Cookie","JSESSIONID=2AAF431F59ACEE1CC68B43C87772C54F");
      BddErrorMessage errorMsg = new BddErrorMessage();
      errorMsg.setMessage("not found");
      ObjectMapper mapper = new ObjectMapper();
      buildReqRespWithoutReqBody(
            "https://127.0.0.1:8443/serengeti/api/datastore/rd1Name",
            HttpMethod.GET, HttpStatus.NOT_FOUND, mapper.writeValueAsString(errorMsg));
      datastoreCommands.listDatastore("rd1Name", true);
View Full Code Here

   }

   @Test
   public void testDistroListFailure() throws Exception {
      CookieCache.put("Cookie","JSESSIONID=2AAF431F59ACEE1CC68B43C87772C54F");
      BddErrorMessage errorMsg = new BddErrorMessage();
      errorMsg.setMessage("not found");
      ObjectMapper mapper = new ObjectMapper();
      buildReqRespWithoutReqBody("https://127.0.0.1:8443/serengeti/api/appmanager/Default/distros",
            HttpMethod.GET, HttpStatus.NOT_FOUND, mapper.writeValueAsString(errorMsg));

      //get all distros
View Full Code Here

   }
  
   @Test
   public void testCreateRpFailure() throws Exception {
      CookieCache.put("Cookie","JSESSIONID=2AAF431F59ACEE1CC68B43C87772C54F");
      BddErrorMessage errorMsg = new BddErrorMessage();
      errorMsg.setMessage("already exists");
      ObjectMapper mapper = new ObjectMapper();

      buildReqRespWithoutReqBody(
            "https://127.0.0.1:8443/serengeti/api/resourcepools", HttpMethod.POST,
            HttpStatus.BAD_REQUEST, mapper.writeValueAsString(errorMsg));
View Full Code Here

   }
  
   @Test
   public void testDeleteRpFailure() throws Exception {
      CookieCache.put("Cookie","JSESSIONID=2AAF431F59ACEE1CC68B43C87772C54F");
      BddErrorMessage errorMsg = new BddErrorMessage();
      errorMsg.setMessage("not found");
      ObjectMapper mapper = new ObjectMapper();

      buildReqRespWithoutReqBody(
            "https://127.0.0.1:8443/serengeti/api/resourcepool/rp01", HttpMethod.DELETE,
            HttpStatus.NOT_FOUND, mapper.writeValueAsString(errorMsg));
View Full Code Here

   }
  
   @Test
   public void testRpListFailure() throws Exception {
      CookieCache.put("Cookie","JSESSIONID=2AAF431F59ACEE1CC68B43C87772C54F");
      BddErrorMessage errorMsg = new BddErrorMessage();
      errorMsg.setMessage("not found");
      ObjectMapper mapper = new ObjectMapper();

      this.buildReqRespWithoutReqBody("https://127.0.0.1:8443/serengeti/api/resourcepool/rp1",
            HttpMethod.GET, HttpStatus.NOT_FOUND, mapper.writeValueAsString(errorMsg));
View Full Code Here

   }

   @Test
   public void testListAppManagerFailure() throws Exception {
      CookieCache.put("Cookie", "JSESSIONID=2AAF431F59ACEE1CC68B43C87772C54F");
      BddErrorMessage errorMsg = new BddErrorMessage();
      errorMsg.setMessage("not found");
      ObjectMapper mapper = new ObjectMapper();
      buildReqRespWithoutReqBody(
            "https://127.0.0.1:8443/serengeti/api/appmanager/mm",
            HttpMethod.GET, HttpStatus.NOT_FOUND,
            mapper.writeValueAsString(errorMsg));
View Full Code Here

TOP

Related Classes of com.vmware.bdd.apitypes.BddErrorMessage

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.