def exit_container(self, container_name):
        """Sends message to Container and requesting to stop

        Args:
            container_name (String): name of the container to stop
        """
        if not ClaraUtils.is_container_name(container_name):
            raise ValueError("Bad Container name")

        dpe = ClaraUtils.get_dpe_name(container_name)
        name = ClaraUtils.get_container_name(container_name)

        topic = ClaraUtils.build_topic(CConstants.DPE, dpe)
        data = ClaraUtils.build_data(CConstants.STOP_CONTAINER, name)

        self.base.send(self._create_request(topic, data))
    def remove_service(self, service_name):
        """Sends request to DPE to remove given service

        Args:
            service_name (String): service name in canonical form
        """
        if not ClaraUtils.is_service_name(service_name):
            raise ValueError("Bad Service name")
        dpe_name = ClaraUtils.get_dpe_name(service_name)
        container_name = ClaraUtils.get_container_name(service_name)
        engine_name = ClaraUtils.get_engine_name(service_name)

        topic = ClaraUtils.build_topic(CConstants.DPE, dpe_name)
        data = ClaraUtils.build_data(CConstants.STOP_SERVICE,
                                     container_name,
                                     engine_name)

        self.base.send(self._create_request(topic, data))
    def deploy_container(self, container_name, pool_size=2,
                         description="Undefined"):
        """ Sends request to DPE to deploy given container

        Args:
            container_name (String): container name in canonical form
            pool_size (int): pool size for the given container
            description (String): short description for the container
        """
        if not ClaraUtils.is_container_name(container_name):
            raise ValueError("Bad Container name")

        dpe = ClaraUtils.get_dpe_name(container_name)
        name = ClaraUtils.get_container_name(container_name)

        topic = ClaraUtils.build_topic(CConstants.DPE, dpe)
        data = ClaraUtils.build_data(CConstants.START_CONTAINER,
                                     name, pool_size, description)

        self.base.send(self._create_request(topic, data))