def remove_policy_alias(self, *aliases):
        """
        Removes a name or names from a policy. If the name removed is the
        primary name then the next available alias will be adopted
        as the new primary name.

        :param aliases: arbitrary number of existing policy names to remove.
        """
        for alias in aliases:
            policy = self.get_by_name(alias)
            if not policy:
                raise PolicyError('No policy with name %s exists.' % alias)
            if len(policy.alias_list) == 1:
                raise PolicyError('Policy %s with name %s has only one name. '
                                  'Policies must have at least one name.' % (
                                      policy, alias))
            else:
                policy.remove_name(alias)
                del self.by_name[alias.upper()]
dataset/ETHPy150Open openstack/swift/swift/common/storage_policy.py/StoragePolicyCollection.remove_policy_alias/original