1 ##############################################################################
2 # Copyright (c) 2017 Huawei Technologies Co.,Ltd and others.
4 # All rights reserved. This program and the accompanying materials
5 # are made available under the terms of the Apache License, Version 2.0
6 # which accompanies this distribution, and is available at
7 # http://www.apaiche.org/licenses/LICENSE-2.0
8 ##############################################################################
11 from tornado.escape import json_encode
13 from api.handlers import BaseHandler
17 class Projects(BaseHandler):
21 url = '{}/projects'.format(conf.base_url)
22 projects = requests.get(url).json().get('projects', {})
24 project_url = 'https://wiki.opnfv.org/display/{}'
25 data = {p['name']: project_url.format(p['name']) for p in projects}
27 return self.write(json_encode(data))