Skip to content

Instantly share code, notes, and snippets.

View mhrivnak's full-sized avatar

Michael Hrivnak mhrivnak

View GitHub Profile
#!/usr/bin/env python
import subprocess
from urlparse import urlparse
repos = [
# Centos
{'name': 'centos-6-x86_64-base', 'feed': 'http://mirror.centos.org/centos/6/os/x86_64/'},
{'name': 'centos-6-x86_64-updates', 'feed': 'http://mirror.centos.org/centos/6/updates/x86_64/'},
{'name': 'centos-6-x86_64-extras', 'feed': 'http://mirror.centos.org/centos/6/extras/x86_64/'},
@mhrivnak
mhrivnak / gist:4980483
Created February 18, 2013 20:37 — forked from jdob/gist:4980468
def sync_repo(self, repo, sync_conduit, config):
metadata = _fetch_repo_metadata(repo, config)
new_units = _resolve_units_to_download(metadata, sync_conduit)
def _fetch_repo_metadata(repo, config):
"""
Retrieves the listing of Puppet modules at the configured 'feed' location.
:return: list of modules in the external repository