'Expands an IPv6 address to long format i.e.
xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx'

def __expand_IPv6(self, address):

    fullAddress = ''
    expandedAddress = ''
    validGroupCount = 8
    validGroupSize = 4
    if ('::' not in address):
        fullAddress = address
    else:
        sides = address.split('::')
        groupsPresent = 0
        for side in sides:
            if (len(side) > 0):
                groupsPresent += len(side.split(':'))
        if (len(sides[0]) > 0):
            fullAddress += (sides[0] + ':')
        for i in range(0, (validGroupCount - groupsPresent)):
            fullAddress += '0000:'
        if (len(sides[1]) > 0):
            fullAddress += sides[1]
        if (fullAddress[(-1)] == ':'):
            fullAddress = fullAddress[:(-1)]
    groups = fullAddress.split(':')
    for group in groups:
        while (len(group) < validGroupSize):
            group = ('0' + group)
        expandedAddress += (group + ':')
    if (expandedAddress[(-1)] == ':'):
        expandedAddress = expandedAddress[:(-1)]
    return expandedAddress
