FS#50516: mirrors: Extend /mirrors/status/json/ (#91)

Add the ipv4/ipv6 availability to the /mirrors/status/json api.
This commit is contained in:
jelle van der Waa 2018-03-24 00:15:01 +01:00 committed by Angel Velásquez
parent 165cb10fac
commit a9eae9ad70

View File

@ -27,6 +27,8 @@ def default(self, obj):
data['country'] = unicode(country.name) data['country'] = unicode(country.name)
data['country_code'] = country.code data['country_code'] = country.code
data['isos'] = obj.mirror.isos data['isos'] = obj.mirror.isos
data['ipv4'] = obj.has_ipv4
data['ipv6'] = obj.has_ipv6
data['details'] = obj.get_full_url() data['details'] = obj.get_full_url()
return data return data
if isinstance(obj, MirrorProtocol): if isinstance(obj, MirrorProtocol):