@@ -0,0 +1,1871 @@
+package ac.at.tuwien.infosys.visp.runtime.restAPI;%0A%0Aimport java.util.List;%0A%0Aimport ac.at.tuwien.infosys.visp.common.operators.Operator;%0Aimport ac.at.tuwien.infosys.visp.runtime.configuration.Configurationprovider;%0Aimport ac.at.tuwien.infosys.visp.runtime.reasoner.ReasonerUtility;%0Aimport ac.at.tuwien.infosys.visp.runtime.resourceManagement.ProcessingNodeManagement;%0Aimport ac.at.tuwien.infosys.visp.runtime.topology.TopologyManagement;%0Aimport org.springframework.beans.factory.annotation.Autowired;%0Aimport org.springframework.context.annotation.DependsOn;%0Aimport org.springframework.web.bind.annotation.PathVariable;%0Aimport org.springframework.web.bind.annotation.RequestMapping;%0Aimport org.springframework.web.bind.annotation.RequestMethod;%0Aimport org.springframework.web.bind.annotation.RestController;%0A%0A@RequestMapping(%22/control%22)%0A@RestController%0A@DependsOn(%22configurationprovider%22)%0Apublic class ScalingAPI %7B%0A%0A    @Autowired%0A    private TopologyManagement topologyMgmt;%0A%0A    @Autowired%0A    private Configurationprovider config;%0A%0A    @Autowired%0A    private ProcessingNodeManagement pcm;%0A%0A    @Autowired%0A    private ReasonerUtility reasonerUtility;%0A%0A    @RequestMapping(value = %7B%22/scaleup/%7BoperatorName%7D%22%7D, method = RequestMethod.GET)%0A    public String scaleup(@PathVariable String operatorName) %7B%0A%0A        List%3COperator%3E operators = topologyMgmt.getOperatorsForAConcreteLocation(config.getRuntimeIP());%0A%0A        Operator selectedOperator = null;%0A%0A        for (Operator op : operators) %7B%0A            if (operatorName.equals(op.getName())) %7B%0A                selectedOperator = op;%0A                break;%0A            %7D%0A        %7D%0A%0A        if (selectedOperator == null) %7B%0A            return %22no operator with that name exists.%22;%0A        %7D%0A%0A%0A        pcm.scaleup(reasonerUtility.selectSuitableDockerHost(selectedOperator), selectedOperator);%0A%0A        return %22ok%22;%0A    %7D%0A%0A%7D%0A%0A%0A

Add scaling API for Operator instances