'Create a unique port group name under 12 characters.
:param portgroup_name: long portgroup_name
:returns: truncated portgroup_name'

def get_pg_short_name(self, portgroup_name):

    if (portgroup_name and (len(portgroup_name) > 12)):
        portgroup_name = portgroup_name.lower()
        m = hashlib.md5()
        m.update(portgroup_name.encode('utf-8'))
        uuid = m.hexdigest()
        new_name = ('%(pg)s%(uuid)s' % {'pg': portgroup_name[(-6):], 'uuid': uuid})
        portgroup_name = self.truncate_string(new_name, 12)
    return portgroup_name
