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.

ping_me.py 2.1KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. # Licensed under the Apache License, Version 2.0 (the "License"); you may
  2. # not use this file except in compliance with the License. You may obtain
  3. # a copy of the License at
  4. #
  5. # http://www.apache.org/licenses/LICENSE-2.0
  6. #
  7. # Unless required by applicable law or agreed to in writing, software
  8. # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
  9. # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
  10. # License for the specific language governing permissions and limitations
  11. # under the License.
  12. """Script that is useful to run to make commands that will ping
  13. folks for the oslo weekly irc meeting.
  14. """
  15. import collections
  16. import sys
  17. NOTIFY_PEPS = [
  18. 'amotoki',
  19. 'amrith',
  20. 'ansmith',
  21. 'bnemec',
  22. 'dims',
  23. 'dougwig',
  24. 'e0ne',
  25. 'garyk',
  26. 'haypo',
  27. 'hberaud',
  28. 'electrocucaracha',
  29. 'jd__',
  30. 'johnsom',
  31. 'jungleboyj',
  32. 'kgiusti',
  33. 'kragniz',
  34. 'lhx_',
  35. 'moguimar',
  36. 'njohnston',
  37. 'raildo',
  38. 'redrobot',
  39. 'sileht',
  40. 'sreshetnyak',
  41. 'stephenfin',
  42. 'stevemar',
  43. 'therve',
  44. 'thinrichs',
  45. 'toabctl',
  46. 'zhiyan',
  47. 'zzzeek',
  48. 'gcb',
  49. 'zxy',
  50. ]
  51. NOTIFY_PEPS = sorted(NOTIFY_PEPS, key=str.lower)
  52. NUM_PER_LINE = 7
  53. INFO_MESSAGE = ('To be added or removed from the ping list, please submit a '
  54. 'patch to '
  55. 'http://git.openstack.org/cgit/openstack/oslo.tools/tree/'
  56. 'ping_me.py\n'
  57. )
  58. def main():
  59. sys.stdout.write("courtesy ping for ")
  60. num_in_line = 0
  61. peps = collections.deque(NOTIFY_PEPS)
  62. while peps:
  63. pep = peps.popleft()
  64. sys.stdout.write(pep)
  65. num_in_line += 1
  66. if num_in_line >= NUM_PER_LINE:
  67. sys.stdout.write("\n")
  68. if peps:
  69. sys.stdout.write("courtesy ping for ")
  70. num_in_line = 0
  71. else:
  72. if peps:
  73. sys.stdout.write(", ")
  74. if num_in_line:
  75. sys.stdout.write("\n")
  76. sys.stdout.write(INFO_MESSAGE)
  77. if __name__ == '__main__':
  78. main()