'Removes an alias name from the storage policy. Shouldn\'t be called
directly from the storage policy but instead through the storage
policy collection class, so lookups by name resolve correctly. If
the name removed is the primary name then the next available alias
will be adopted as the new primary name.
:param name: a name assigned to the storage policy'

def remove_name(self, name):

    if (name not in self.alias_list):
        raise PolicyError(('%s    is    not    a    name    assigned    to    policy    %s' % (name, self.idx)))
    if (len(self.alias_list) == 1):
        raise PolicyError(('Cannot    remove    only    name    %s    from    policy    %s.    Policies    must    have    at    least    one    name.' % (name, self.idx)))
    else:
        self.alias_list.remove(name)
