def delete_dataset_collection(self, history_id, dataset_collection_id): """ Mark corresponding dataset collection as deleted. """ url = self.gi._make_url(self, history_id, contents=True) # Append the dataset_id to the base history contents URL url = '/'.join([url, "dataset_collections", dataset_collection_id]) Client._delete(self, payload={}, url=url)
def delete_dataset_collection(self, history_id, dataset_collection_id): """ Mark corresponding dataset collection as deleted. :type history_id: str :param history_id: Encoded history ID :type dataset_collection_id: str :param dataset_collection_id: Encoded dataset collection ID """ url = self.gi._make_url(self, history_id, contents=True) # Append the dataset_id to the base history contents URL url = '/'.join([url, "dataset_collections", dataset_collection_id]) Client._delete(self, payload={}, url=url)
def delete_dataset(self, history_id, dataset_id): """ Mark corresponding dataset as deleted. :type history_id: str :param history_id: Encoded history ID :type dataset_id: str :param dataset_id: Encoded dataset ID """ url = self.gi._make_url(self, history_id, contents=True) # Append the dataset_id to the base history contents URL url = "/".join([url, dataset_id]) Client._delete(self, payload={}, url=url)
def delete_dataset_collection(self, history_id, dataset_collection_id): """ Mark corresponding dataset collection as deleted. :type history_id: str :param history_id: Encoded history ID :type dataset_collection_id: str :param dataset_collection_id: Encoded dataset collection ID """ url = self.gi._make_url(self, history_id, contents=True) # Append the dataset_id to the base history contents URL url = '/'.join([url, "dataset_collections", dataset_collection_id]) Client._delete(self, url=url)
def delete_library_dataset(self, library_id, dataset_id, purged=False): """ Deleta a library dataset in a data library :type library_id: string :param library_id: Encoded Library id where dataset is found in :type dataset_id: string :param dataset_id: Encoded dataset id to be deleted :type purged: Boolean :param purged: Indicate that the dataset should be purged (permanently deleted) :rtype: dict :return: A dictionary containing the datset id and whether the dataset has been deleted For example:: {u'deleted': True, u'id': u'60e680a037f41974'} """ url = self.gi._make_url(self, library_id, contents=True) # Append the dataset_id to the base history contents URL url = '/'.join([url, dataset_id]) return Client._delete(self, url=url, payload={'purged': purged})
def delete_library(self, library_id): """ Delete a data library identified by `library_id`. .. warning:: Deleting a data library is irreversible - all of the data from the library will be permanently deleted. """ payload = {} return Client._delete(self, payload, id=library_id)
def delete_workflow(self, workflow_id): """ Delete a workflow identified by `workflow_id`. .. warning:: Deleting a workflow is irreversible - all workflow data will be permanently deleted. """ payload = {} return Client._delete(self, payload, id=workflow_id)
def delete_data_table(self, data_table_id, values): """ Delete an item from a data table. The ``values`` is a "|" separated list of column contents, there must be a value for all the columns of the data table """ payload = {} payload['values'] = values return Client._delete(self, payload, id=data_table_id)
def cancel_invocation(self, workflow_id, invocation_id): """ Cancel the scheduling of a workflow. :type workflow_id: str :param workflow_id: Encoded workflow ID :type invocation_id: str :param invocation_id: Encoded workflow invocation ID """ url = self._invocation_url(workflow_id, invocation_id) return Client._delete(self, url=url)
def delete_group_user(self, group_id, user_id): """ Remove a user from the given group. :type group_id: str :param group_id: Encoded group ID :type user_id: str :param user_id: Encoded user ID to remove from the group """ url = '/'.join([self.gi._make_url(self, group_id), 'users', user_id]) return Client._delete(self, {}, url=url)
def delete_workflow(self, workflow_id): """ Delete a workflow identified by `workflow_id`. :type workflow_id: str :param workflow_id: Encoded workflow ID .. warning:: Deleting a workflow is irreversible - all workflow data will be permanently deleted. """ return Client._delete(self, id=workflow_id)
def delete_history(self, history_id, purge=False): """ Delete a history. If ``purge`` is set to ``True``, also purge the history. Note that for the purge option to work, ``allow_user_dataset_purge`` option must be set in the Galaxy's configuration file ``universe_wsgi.ini`` """ payload = {} if purge is True: payload['purge'] = purge return Client._delete(self, payload, id=history_id)
def delete_folder(self, folder_id, undelete=False): """ Marks the folder with the given ``id`` as `deleted` (or removes the `deleted` mark if the `undelete` param is true) :type folder_id: an encoded id string (has to be prefixed by 'F') :param folder_id: the folder's encoded id (required) :returns: detailed folder information :rtype: dictionary """ payload = {'undelete': undelete} return Client._delete(self, payload, id=folder_id)
def delete_group_role(self, group_id, role_id): """ Remove a role from the given group. :type group_id: str :param group_id: Encoded group ID :type role_id: str :param role_id: Encoded role ID to remove from the group """ url = '/'.join([self.gi._make_url(self, group_id), 'roles', role_id]) return Client._delete(self, {}, url=url)
def delete_data_table(self, data_table_id, values): """ Delete an item from a data table. :type data_table_id: str :param data_table_id: ID of the data table :type values: str :param values: a "|" separated list of column contents, there must be a value for all the columns of the data table """ payload = {'values': values} return Client._delete(self, payload=payload, id=data_table_id)
def delete_library(self, library_id): """ Delete a data library. :type library_id: str :param library_id: Encoded data library ID identifying the library to be deleted .. warning:: Deleting a data library is irreversible - all of the data from the library will be permanently deleted. """ payload = {} return Client._delete(self, payload, id=library_id)
def delete_history(self, history_id, purge=False): """ Delete a history. If ``purge`` is set to ``True``, also purge the history. .. note:: For the purge option to work, the Galaxy instance must have the ``allow_user_dataset_purge`` option set to ``True`` in the ``config/galaxy.ini`` configuration file. """ payload = {} if purge is True: payload['purge'] = purge return Client._delete(self, payload, id=history_id)
def delete_data_table(self, data_table_id, values): """ Delete an item from a data table. :type data_table_id: str :param data_table_id: ID of the data table :type values: str :param values: a "|" separated list of column contents, there must be a value for all the columns of the data table """ payload = {} payload['values'] = values return Client._delete(self, payload, id=data_table_id)
def delete_folder(self, folder_id, undelete=False): """ Marks the folder with the given ``id`` as `deleted` (or removes the `deleted` mark if the `undelete` param is True). :type folder_id: str :param folder_id: the folder's encoded id, prefixed by 'F' :type undelete: bool :param undelete: If set to True, the folder will be undeleted (i.e. the `deleted` mark will be removed) :returns: detailed folder information :rtype: dict """ payload = {'undelete': undelete} return Client._delete(self, payload, id=folder_id)
def delete_history(self, history_id, purge=False): """ Delete a history. :type history_id: str :param history_id: Encoded history ID :type purge: bool :param purge: if ``True``, also purge (permanently delete) the history .. note:: For the purge option to work, the Galaxy instance must have the ``allow_user_dataset_purge`` option set to ``True`` in the ``config/galaxy.ini`` configuration file. """ payload = {} if purge is True: payload['purge'] = purge return Client._delete(self, payload, id=history_id)
def delete_history(self, history_id, purge=False): """ Delete a history. :type history_id: str :param history_id: Encoded history ID :type purge: bool :param purge: if ``True``, also purge (permanently delete) the history .. note:: For the purge option to work, the Galaxy instance must have the ``allow_user_dataset_purge`` option set to ``True`` in the ``config/galaxy.ini`` configuration file. """ payload = {} if purge is True: payload['purge'] = purge return Client._delete(self, payload=payload, id=history_id)
def delete_user(self, user_id, purge=False): """ Delete a user. .. note:: For this method to work, the Galaxy instance must have the ``allow_user_deletion`` option set to ``True`` in the ``config/galaxy.ini`` configuration file. :type user_id: str :param user_id: encoded user ID :type purge: bool :param purge: if ``True``, also purge (permanently delete) the history :rtype: dict :return: a dictionary containing information about the deleted user """ params = {} if purge is True: params['purge'] = purge return Client._delete(self, id=user_id, params=params)