Package com.vmware.bdd.plugin.ambari.api.model.cluster

Examples of com.vmware.bdd.plugin.ambari.api.model.cluster.ApiRequestInfo


      AmbariManagerClientbuilder clientbuilder = makeClientBuilder();
      ApiManager apiManager = new FakeApiManager(clientbuilder) {
         @Override
         public ApiRequest stopAllServicesInCluster(String clusterName) throws AmbariApiException {
            ApiRequest apiRequest = new ApiRequest();
            apiRequest.setApiRequestInfo(new ApiRequestInfo());
            return apiRequest;
         }
      };

      Mockito.when(spy.isProvisioned(blueprint.getName())).thenReturn(true);
View Full Code Here


      AmbariManagerClientbuilder clientbuilder = makeClientBuilder();
      ApiManager apiManager = new FakeApiManager(clientbuilder) {
         @Override
         public ApiRequest startAllServicesInCluster(String clusterName) throws AmbariApiException {
            ApiRequest apiRequest = new ApiRequest();
            apiRequest.setApiRequestInfo(new ApiRequestInfo());
            return apiRequest;
         }
      };
      try {
         Mockito.when(spy.doSoftwareOperation(Mockito.anyString(), Mockito.<ApiRequest>any(),
View Full Code Here

      AmbariImpl spy = Mockito.spy(provider);
      ApiManager apiManager = new FakeApiManager(makeClientBuilder());
      ApiManager backup = spy.getApiManager();
      spy.setApiManager(apiManager);
      ApiRequest request = new ApiRequest();
      ApiRequestInfo requestInfo = new ApiRequestInfo();
      request.setApiRequestInfo(requestInfo);
      try {
         spy.doSoftwareOperation(blueprint.getName(), request, clusterReport, reportQueue);
      } catch (Exception e) {
         e.printStackTrace();
View Full Code Here

      taskInfo.setStatus("FAILED");
      taskInfo.setHostName("host01");
      apiTask.setApiTaskInfo(taskInfo);
      apiTasks.add(apiTask);
      apiRequest.setApiTasks(apiTasks);
      ApiRequestInfo apiRequestInfo = new ApiRequestInfo();
      apiRequestInfo.setRequestStatus("FAILED");
      apiRequest.setApiRequestInfo(apiRequestInfo);
      return  apiRequest;
   }
View Full Code Here

      logger.info("Ambari is stopping all services in cluster " + clusterName);
      ApiServiceInfo serviceInfo = new ApiServiceInfo();
      serviceInfo.setState(ApiServiceStatus.INSTALLED.name());
      ApiBody body = new ApiBody();
      body.setServiceInfo(serviceInfo);
      ApiRequestInfo requestInfo = new ApiRequestInfo();
      requestInfo.setContext("Stop All Services");
      ApiPutRequest stopRequest = new ApiPutRequest(requestInfo, body);
      String request = ApiUtils.objectToJson(stopRequest);
      logger.debug("The request in stop cluster is :" + request);

      Response response = null;
View Full Code Here

   public ApiRequest startAllServicesInCluster(String clusterName) throws AmbariApiException {
      ApiServiceInfo serviceInfo = new ApiServiceInfo();
      serviceInfo.setState(ApiServiceStatus.STARTED.name());
      ApiBody body = new ApiBody();
      body.setServiceInfo(serviceInfo);
      ApiRequestInfo requestInfo = new ApiRequestInfo();
      requestInfo.setContext("Start All Services");
      ApiPutRequest stopRequest = new ApiPutRequest(requestInfo, body);
      String request = ApiUtils.objectToJson(stopRequest);
      logger.debug("The request in start cluster is :" + request);

      Response response = null;
View Full Code Here

TOP

Related Classes of com.vmware.bdd.plugin.ambari.api.model.cluster.ApiRequestInfo

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.