Ejemplo n.º 1
0
def save_variable(identifier, platform, name, varname):
  filepath = os.path.join(workspace_path, identifier, platform, name)
  config_loader = FileConfigLoader(filepath)
  conf = config_loader.dictionary
  res = [x for x in conf["Variables"] if x["name"] == varname][0]
  res["value"] = request.data
  config_loader.save_config(conf)
  return True
Ejemplo n.º 2
0
def save_variable(identifier, platform, name, varname):
    filepath = os.path.join(workspace_path, identifier, platform, name)
    config_loader = FileConfigLoader(filepath)
    conf = config_loader.dictionary
    res = [x for x in conf["Variables"] if x["name"] == varname][0]
    res["value"] = request.data
    config_loader.save_config(conf)
    return True
Ejemplo n.º 3
0
def save_config(identifier, platform, name):
  print "saved"
  filepath = os.path.join(workspace_path, identifier, platform, name)
  config_loader = FileConfigLoader(filepath)
  try:
    newconf = json.loads(request.data)
    config_loader.save_config(newconf)
    print 'all fine'
    return Response(response="True", status=200)
  except Exception, ex:  # @UnusedVariable
    print ex.message
    return Response(response="False", status=200)
Ejemplo n.º 4
0
def save_config(identifier, platform, name):
    print "saved"
    filepath = os.path.join(workspace_path, identifier, platform, name)
    config_loader = FileConfigLoader(filepath)
    try:
        newconf = json.loads(request.data)
        config_loader.save_config(newconf)
        print 'all fine'
        return Response(response="True", status=200)
    except Exception, ex:  # @UnusedVariable
        print ex.message
        return Response(response="False", status=200)