from cdnmon.model.cdn import AbstractBGPViewCDN


class CDN(AbstractBGPViewCDN):
    def __init__(self):
        super(CDN, self).__init__(
            abbreviation="huawei",
        )
        self.asn_patterns = [
            "huawei",
            "futurewei",
        ]
        self.cname_suffixes = [
            ".cdnhwc1.cn",
            ".cdnhwc1.com",
            ".cdnhwc2.cn",
            ".cdnhwc2.com",
            ".cdnhwc22.com",
            ".cdnhwc3.cn",
            ".cdnhwc3.com",
            ".cdnhwc4.cn",
            ".cdnhwc4.com",
            ".cdnhwc5.cn",
            ".cdnhwc5.com",
            ".cdnhwc6.cn",
            ".cdnhwc6.com",
            ".cdnhwc7.cn",
            ".cdnhwc7.com",
            ".cdnhwc8.cn",
            ".cdnhwc8.com",
            ".cdnhwc9.cn",
            ".cdnhwc9.com",
            ".cdnhwc10.cn",
            ".cdnhwc10.com",
            ".cdnhwcaip122.cn",
            ".cdnhwcajk17.com",
            ".cdnhwcaoc115.cn",
            ".cdnhwcatq08.com",
            ".cdnhwcbie120.cn",
            ".cdnhwcbni108.com",
            ".cdnhwcbqs106.com",
            ".cdnhwcbvo20.cn",
            ".cdnhwcbzj102.com",
            ".cdnhwcchh18.com",
            ".cdnhwccmz121.com",
            ".cdnhwccvo19.cn",
            ".cdnhwcdkd21.cn",
            ".cdnhwcdvg22.cn",
            ".cdnhwcead111.com",
            ".cdnhwcedi10.com",
            ".cdnhwcedt124.com",
            ".cdnhwceft18.cn",
            ".cdnhwceod109.cn",
            ".cdnhwcfzp15.cn",
            ".cdnhwcggk22.com",
            ".cdnhwcgnc118.com",
            ".cdnhwcgqa21.com",
            ".cdnhwcgqs21.com",
            ".cdnhwcgrb01.cn",
            ".cdnhwcgvs16.cn",
            ".cdnhwchcg02.com",
            ".cdnhwcibv122.com",
            ".cdnhwcick110.com",
            ".cdnhwcidu117.cn",
            ".cdnhwcjbj05.cn",
            ".cdnhwcjkl10.cn",
            ".cdnhwcjlg112.com",
            ".cdnhwcjog12.com",
            ".cdnhwcjqv17.cn",
            ".cdnhwcjsb120.com",
            ".cdnhwckbw08.cn",
            ".cdnhwckfd24.cn",
            ".cdnhwckfz116.com",
            ".cdnhwckon103.com",
            ".cdnhwcljk104.com",
            ".cdnhwclkl04.cn",
            ".cdnhwcllh11.com",
            ".cdnhwclnh23.cn",
            ".cdnhwclrd102.cn",
            ".cdnhwclsl119.cn",
            ".cdnhwclxu105.com",
            ".cdnhwclxw05.com",
            ".cdnhwcoem01.com",
            ".cdnhwcofl101.cn",
            ".cdnhwcogx108.cn",
            ".cdnhwcohm19.com",
            ".cdnhwcojn124.cn",
            ".cdnhwconz06.cn",
            ".cdnhwcoph123.com",
            ".cdnhwcozb112.cn",
            ".cdnhwcpcw110.cn",
            ".cdnhwcpqh13.cn",
            ".cdnhwcprh113.com",
            ".cdnhwcpsd13.com",
            ".cdnhwcqgw115.com",
            ".cdnhwcqir15.com",
            ".cdnhwcqrr114.cn",
            ".cdnhwcqve117.com",
            ".cdnhwcqvk105.cn",
            ".cdnhwcqwg14.com",
            ".cdnhwcrgg07.cn",
            ".cdnhwcrpp12.cn",
            ".cdnhwcscc123.cn",
            ".cdnhwcsjs09.cn",
            ".cdnhwcsux118.cn",
            ".cdnhwctmz11.cn",
            ".cdnhwctnm107.com",
            ".cdnhwctxz24.com",
            ".cdnhwctyd116.cn",
            ".cdnhwcuim119.com",
            ".cdnhwcupf06.com",
            ".cdnhwcurq03.com",
            ".cdnhwcurr103.cn",
            ".cdnhwcuwd107.cn",
            ".cdnhwcuxc121.cn",
            ".cdnhwcvix16.com",
            ".cdnhwcwqz113.cn",
            ".cdnhwcxcy07.com",
            ".cdnhwcxsi14.cn",
            ".cdnhwcywp03.cn",
            ".cdnhwcyxb02.cn",
            ".cdnhwczba04.com",
            ".cdnhwczic111.cn",
            ".cdnhwczid104.cn",
            ".cdnhwczjt20.com",
            ".cdnhwczks109.com",
            ".cdnhwczmn114.com",
            ".cdnhwczoy106.cn",
            ".cdnhwczth23.com",
            ".cdnhwcztu09.com",
            ".cdnhwczxh101.com",
        ]
        self.ipv4_prefixes = self.transform(self.extract())["ipv4_prefixes"]
        self.ipv6_prefixes = self.transform(self.extract())["ipv6_prefixes"]
