'Reduce length of physical resource name to a limit.
The reduced name will consist of the following:
* the first 2 characters of the name
* a hyphen
* the end of the name, truncated on the left to bring
the name length within the limit
:param name: The name to reduce the length of
:param limit: The max length limit
:returns: A name whose length is less than or equal to the limit'

@staticmethod
def reduce_physical_resource_name(name, limit):

    if (len(name) <= limit):
        return name
    if (limit < 4):
        raise ValueError(_('limit    cannot    be    less    than    4'))
    postfix_length = (limit - 3)
    return ((name[0:2] + '-') + name[(- postfix_length):])
