Skip to content

Instantly share code, notes, and snippets.

@lbragstad
Last active August 29, 2015 14:07
Show Gist options
  • Save lbragstad/b4698583a6de482af82f to your computer and use it in GitHub Desktop.
Save lbragstad/b4698583a6de482af82f to your computer and use it in GitHub Desktop.
Publishing meeting from arbiter
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
import wiki_api
from arbiter import meeting
from arbiter import utils
def publish_meeting_to_wiki(meeting):
"""Publish a Meeting object to the OpenStack meeting wiki.
:param meeting: an arbiter Meeting object
"""
_WIKI_HOST = 'https://wiki.openstack.org/wiki/Meetings_Autogenerated'
# Here we can establish a connection to the wiki, specify formatting,
# and write each meeting entry with some python wiki API.
wiki_api.do_magic_write_to_wiki(meeting)
# Pull/update latest meeting .yaml repository
yaml_dir = '/path/to/yaml/dir/repo/'
# Load all meetings (stored as a list of Meeting object)
meetings = meeting.load_meetings(yaml_dir)
# We still havet to check for conflicts
utils._check_for_meeting_conflicts(meetings)
# At this point we have a list of the latest meeting information
# and we know we don't have conflicts, so move forward with the publish
for meeting in meetings:
publish_meeting_to_wiki(meeting)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment