def _delete_catalog_item(self, item_name): """Delete a catalog item. The catalog item to delete, is searched in the catalog specified via build_params. :param str item_name: name of the item to delete. :param str item_type """ try: self.org.delete_catalog_item(name=self.catalog_name, item_name=item_name) wait_for_catalog_item_to_resolve(client=self.client, catalog_name=self.catalog_name, catalog_item_name=item_name, org=self.org) self.org.reload() msg = f"Deleted '{item_name}' from catalog '{self.catalog_name}'" if self.msg_update_callback: self.msg_update_callback.general(msg) if self.logger: self.logger.info(msg) except EntityNotFoundException: pass
def delete_catalog_item(item_name): org = Org(CLIENT, href=ORG_HREF) try: org.delete_catalog_item(CATALOG_NAME, item_name) pyvcloud_utils.wait_for_catalog_item_to_resolve(CLIENT, CATALOG_NAME, item_name, org=org) org.reload() except EntityNotFoundException: pass