@staticmethod
def calc_cidr_mask(mask):
    """
        Calculate the CIDR mask from the given full notation subnet mask.
        :param mask: full notation subnet mask (i.e. 255.255.255.0)
        :return: subnet mask in CIDR notation (i.e. /24)
        """
    mask_splitter = mask.split('.')
    cidr_mask = 0
    for i in range(0, len(mask_splitter)):
        mask_octet = format(int(str(bin(int(mask_splitter[i])))[2:], 2),
            '{fill}{width}b'.format(width=8, fill=0))
        cidr_mask += mask_octet.count('1')
    return cidr_mask
