This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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/'}, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |