from cdnmon.model.cdn import BGPViewCIDR
from cdnmon.model.cdn import CNAMEPattern
from cdnmon.model.cdn import CommonCDN

CDN = CommonCDN(
    name="baishan",
    asn_patterns=["baishan"],
    cname_suffixes=[
        # 北京白山耘科技有限公司
        CNAMEPattern(suffix=".baishan-cloud.com"),
        CNAMEPattern(suffix=".baishancloud.com"),
        CNAMEPattern(suffix=".baishangeek.cn", is_leaf=True),
        CNAMEPattern(suffix=".baishangeek.com"),
        CNAMEPattern(suffix=".bsclink.cn", is_leaf=True),
        CNAMEPattern(suffix=".bsclink.com"),
        CNAMEPattern(suffix=".bscstorage.com"),
        CNAMEPattern(suffix=".bsgslb.cn", pattern=r"${domain}.bsgslb.cn", is_leaf=True),
        CNAMEPattern(suffix=".bsgslb.com", is_leaf=True),
        CNAMEPattern(suffix=".qianxun.com", is_leaf=True),
        CNAMEPattern(suffix=".qingcdn.com", is_leaf=True),
        CNAMEPattern(suffix=".trpcdn.com", is_leaf=True),
        CNAMEPattern(suffix=".trpcdn.net", pattern=r"${domain}.bsgslb.cn"),
        # 贵州白山云科技股份有限公司
        CNAMEPattern(suffix=".5gcdnx.com"),
        CNAMEPattern(suffix=".baicdnx.com"),
        CNAMEPattern(suffix=".bainsx.cn"),
        CNAMEPattern(suffix=".baishan-cloud.net"),
        CNAMEPattern(suffix=".baishan-gateway.com"),
        CNAMEPattern(suffix=".baishan.com"),
        CNAMEPattern(suffix=".baishanyun.com"),
        CNAMEPattern(suffix=".bsccdn.net"),
        CNAMEPattern(suffix=".bscdns.cn"),
        CNAMEPattern(suffix=".bscdns.com"),
        CNAMEPattern(suffix=".v.bscedge.com", is_root=True, is_leaf=True),
        CNAMEPattern(suffix="global.v.bscedge.com", is_root=False, is_leaf=True),
        CNAMEPattern(suffix=".bscgslb.com"),
        CNAMEPattern(suffix=".bsydns.cn"),
        CNAMEPattern(suffix=".bsydns.com"),
        CNAMEPattern(suffix=".bsydns.net"),
        CNAMEPattern(suffix=".ccedge.cn"),
        CNAMEPattern(suffix=".cncdnx.com"),
        CNAMEPattern(suffix=".crazyrtc.com"),
        CNAMEPattern(suffix=".dolfincdnx.net"),
        CNAMEPattern(suffix=".dolfindnsx.top"),
        CNAMEPattern(suffix=".eccdnx.com"),
        CNAMEPattern(suffix=".edgefn.net"),
        CNAMEPattern(suffix=".fnedge.net"),
        CNAMEPattern(suffix=".ldgslb.com"),
        CNAMEPattern(suffix=".scdntop.com"),
        CNAMEPattern(suffix=".whitecdnx.com"),
        CNAMEPattern(suffix=".zzcdnx.com"),
    ],
    cidr=BGPViewCIDR(["baishan"]),
)
