from parallels.core import MigrationError
from parallels.core.hosting_repository.reseller import ResellerModel
from parallels.plesk_multi_server import messages


class PleskMultiServerResellerModel(ResellerModel):
    def get_list(self, filter_username=None):
        """Retrieve list of resellers in target panel which username listed in given filter

        :type filter_username: list[str] | None
        :rtype: list[parallels.core.hosting_repository.reseller.ResellerEntity]
        """
        return []

    def create(self, reseller):
        """Create given reseller in target panel; return id of created reseller and list detected errors

        :type reseller: parallels.core.target_data_model.Reseller
        :rtype: int, list[str]
        """
        raise MigrationError(messages.RESELLERS_NOT_SUPPORTED)

    def set_external_id(self, username, external_id):
        """Set External ID for given reseller in target panel

        :type username: str
        :type external_id: str
        """
        raise MigrationError(messages.RESELLERS_NOT_SUPPORTED)
