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()
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
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
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