Tools for working in the OpenStack Oslo community.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

list_oslo_projects.py 1.3KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. #!/usr/bin/env python
  2. # Licensed under the Apache License, Version 2.0 (the "License"); you may
  3. # not use this file except in compliance with the License. You may obtain
  4. # a copy of the License at
  5. #
  6. # http://www.apache.org/licenses/LICENSE-2.0
  7. #
  8. # Unless required by applicable law or agreed to in writing, software
  9. # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
  10. # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
  11. # License for the specific language governing permissions and limitations
  12. # under the License.
  13. """Print a list of the oslo project repository names.
  14. """
  15. from __future__ import print_function
  16. import os
  17. import oslo_tool_config as cfg
  18. import yaml
  19. def main():
  20. conf = cfg.get_config_parser()
  21. cfg.parse_arguments(conf)
  22. gov_repo = os.path.expanduser(os.path.join(conf.repo_root,
  23. 'governance'))
  24. project_input = os.path.join(gov_repo, 'reference/projects.yaml')
  25. with open(project_input, 'r') as f:
  26. project = yaml.safe_load(f.read())
  27. repos = []
  28. for v in project['oslo']['deliverables'].values():
  29. repos.append(v['repos'][0])
  30. for r in sorted(repos):
  31. print(r)
  32. if __name__ == '__main__':
  33. import sys
  34. sys.exit(main())