import re


def get_ip_and_type(line):
  """
  This function will take a line from an open source file.
  It extracts the IP relevant information (either an IP address or CIDR class)
  It will return the IP value and the type of value('Address - cidr','Address - ipv4-addr') 

  :param A line containing an IP address or CIDR address class.
  :type line: str
  :returns: str, str
  """
  ip_result = re.match("^[0-9.]+([/0-9]+)?",line)

  if ip_result == None:
    return (None,None)

  ip = ip_result.group(0)

  if ip.find("/") != -1:
    return (ip,"Address - cidr")

  return (ip,"Address - ipv4-addr")