Example #1
0
 public List<RichDestination> call(ApiCaller ac, Deserializer parms) throws PerunException {
   return ac.getServicesManager()
       .getRichDestinations(
           ac.getSession(),
           ac.getFacilityById(parms.readInt("facility")),
           ac.getServiceById(parms.readInt("service")));
 }
Example #2
0
 @Override
 public ServiceAttributes call(ApiCaller ac, Deserializer parms) throws PerunException {
   return ac.getServicesManager()
       .getDataWithGroups(
           ac.getSession(),
           ac.getServiceById(parms.readInt("service")),
           ac.getFacilityById(parms.readInt("facility")));
 }
Example #3
0
    @Override
    public List<Destination> call(ApiCaller ac, Deserializer parms) throws PerunException {
      ac.stateChangingCheck();

      return ac.getServicesManager()
          .addDestinationsDefinedByHostsOnCluster(
              ac.getSession(),
              ac.getServiceById(parms.readInt("service")),
              ac.getFacilityById(parms.readInt("facility")));
    }
Example #4
0
    @Override
    public List<Destination> call(ApiCaller ac, Deserializer parms) throws PerunException {
      ac.stateChangingCheck();

      return ac.getServicesManager()
          .addDestinationsForAllServicesOnFacility(
              ac.getSession(),
              ac.getFacilityById(parms.readInt("facility")),
              ac.getDestination(parms.readString("destination"), parms.readString("type")));
    }
Example #5
0
    @Override
    public Void call(ApiCaller ac, Deserializer parms) throws PerunException {
      ac.stateChangingCheck();

      ac.getServicesManager()
          .removeAllDestinations(
              ac.getSession(),
              ac.getServiceById(parms.readInt("service")),
              ac.getFacilityById(parms.readInt("facility")));

      return null;
    }
Example #6
0
    @Override
    public List<Service> call(ApiCaller ac, Deserializer parms) throws PerunException {

      return ac.getServicesManager()
          .getAssignedServices(ac.getSession(), ac.getFacilityById(parms.readInt("facility")));
    }