def offload_all_service_containers(self, service):
        """Deletes all containers related to the service.
        """
        def anonymous(anonymous_service):
            if not isinstance(anonymous_service, Service):
                raise TypeError("service must be an instance of Service.")

            containers = self.find_service_containers(anonymous_service)
            if containers:
                logger.info("Deleting service: {0} containers.".format(anonymous_service.name))
                for container in six.itervalues(containers):
                    container.delete()

        self._service_map(service, anonymous, descending=True)
def offload_all_service_containers ( self , service ) : def anonymous ( anonymous_service ) : if not isinstance ( anonymous_service , Service ) : raise TypeError ( "service must be an instance of Service." ) containers = self . find_service_containers ( anonymous_service ) if containers : logger . info ( "Deleting service: {0} containers." . format ( anonymous_service . name ) ) for container in six . itervalues ( containers ) : container . delete ( ) self . _service_map ( service , anonymous , descending = True )
Deletes all containers related to the service.