def get_repository_url(distribution, flocker_version):
 distribution_to_url = {'centos-7': 'https://{archive_bucket}.s3.amazonaws.com/{key}/clusterhq-release$(rpm -E %dist).noarch.rpm'.format(archive_bucket=ARCHIVE_BUCKET, key='centos'), 'rhel-7': 'https://{archive_bucket}.s3.amazonaws.com/{key}/clusterhq-release$(rpm -E %dist).noarch.rpm'.format(archive_bucket=ARCHIVE_BUCKET, key='rhel'), 'ubuntu-14.04': 'https://{archive_bucket}.s3.amazonaws.com/{key}/$(lsb_release --release --short)/\\$(ARCH)'.format(archive_bucket=ARCHIVE_BUCKET, key=('ubuntu' + get_package_key_suffix(flocker_version))), 'ubuntu-16.04': 'https://{archive_bucket}.s3.amazonaws.com/{key}/$(lsb_release --release --short)/\\$(ARCH)'.format(archive_bucket=ARCHIVE_BUCKET, key=('ubuntu' + get_package_key_suffix(flocker_version)))}
 try:
  return distribution_to_url[distribution]
 except KeyError:
  raise UnsupportedDistribution()

def get_repository_url ( distribution , flocker_version ) : distribution_to_url = { 'centos-7' : 'https://{archive_bucket}.s3.amazonaws.com/{key}/clusterhq-release$(rpm -E %dist).noarch.rpm' . format ( archive_bucket = ARCHIVE_BUCKET , key = 'centos' ) , 'rhel-7' : 'https://{archive_bucket}.s3.amazonaws.com/{key}/clusterhq-release$(rpm -E %dist).noarch.rpm' . format ( archive_bucket = ARCHIVE_BUCKET , key = 'rhel' ) , 'ubuntu-14.04' : 'https://{archive_bucket}.s3.amazonaws.com/{key}/$(lsb_release --release --short)/\\$(ARCH)' . format ( archive_bucket = ARCHIVE_BUCKET , key = ( 'ubuntu' + get_package_key_suffix ( flocker_version ) ) ) , 'ubuntu-16.04' : 'https://{archive_bucket}.s3.amazonaws.com/{key}/$(lsb_release --release --short)/\\$(ARCH)' . format ( archive_bucket = ARCHIVE_BUCKET , key = ( 'ubuntu' + get_package_key_suffix ( flocker_version ) ) ) } try : return distribution_to_url [ distribution ] except KeyError : raise UnsupportedDistribution ( )
return the url for the repository of a given distribution .