Beispiel #1
0
    def remove_resources(self, load_id):
        """
        Runs the resource_remover command found in package_utils

        """
        # resource_remover.delete_resources(load_id)
        resource_remover.clear_resources()
Beispiel #2
0
    def remove_resources(self, load_id):
        """
        Runs the resource_remover command found in package_utils

        """
        # resource_remover.delete_resources(load_id)
        resource_remover.clear_resources()
Beispiel #3
0
    def remove_resources(self, load_id='', force=False):
        """
        Runs the resource_remover command found in data_management.resources
        """
        # resource_remover.delete_resources(load_id)
        if not force:
            if not utils.get_yn_input("all resources will be removed. continue?"):
                return

        resource_remover.clear_resources()
        return
Beispiel #4
0
    def remove_resources(self, load_id='', force=False):
        """
        Runs the resource_remover command found in data_management.resources
        """
        # resource_remover.delete_resources(load_id)
        if not force:
            if not utils.get_yn_input(
                    "all resources will be removed. continue?"):
                return

        resource_remover.clear_resources()
        return
Beispiel #5
0
    def remove_resources(self, load_id='', graphid=None, force=False):
        """
        Runs the resource_remover command found in data_management.resources
        """
        # resource_remover.delete_resources(load_id)
        if not force:
            if graphid == None:
                if not utils.get_yn_input(
                        "all resources will be removed. continue?"):
                    return
            else:
                if not utils.get_yn_input(
                        "All resources associated with the '%s' Resource Model will be removed. continue?"
                        % Graph.objects.get(graphid=graphid).name):
                    return

        if graphid == None:
            resource_remover.clear_resources()
        else:
            graph = Graph.objects.get(graphid=graphid)
            graph.delete_instances(verbose=True)

        return