- def put(self, dc_label, compute_name):
- logging.debug("API CALL: compute start")
- try:
+ def put(self, dc_label, compute_name, resource=None, value=None):
+ # check if resource update
+ if resource and value:
+ c = self._update_resource(dc_label, compute_name, resource, value)
+ return c.getStatus(), 200
+
+ # deploy new container
+ # check if json data is a dict
+ data = request.json
+ if data is None:
+ data = {}
+ elif type(data) is not dict:
+ data = json.loads(request.json)
+
+ network = data.get("network")
+ nw_list = self._parse_network(network)
+ image = data.get("image")
+ command = data.get("docker_command")