This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import asyncio | |
| import aiohttp | |
| async def download(session): | |
| async with session.get('http://localhost:8080/') as resp: | |
| while True: | |
| chunk = await resp.content.read(1024) | |
| # print(chunk) | |
| if not chunk: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Here's the core diff adding an optional param. Note that if plugin_context_manager is passed in, | |
| # it's already been fully configured by the plugin writer. | |
| diff --git a/pulpcore/plugin/serializers/content.py b/pulpcore/plugin/serializers/content.py | |
| index f2bc5d47e..72e116b56 100644 | |
| --- a/pulpcore/plugin/serializers/content.py | |
| +++ b/pulpcore/plugin/serializers/content.py | |
| @@ -77,7 +77,7 @@ class SingleArtifactContentUploadSerializer(SingleArtifactContentSerializer): | |
| """ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| diff --git a/pulpcore/app/tasks/repository.py b/pulpcore/app/tasks/repository.py | |
| index 1e9953dfc..25f787b9a 100644 | |
| --- a/pulpcore/app/tasks/repository.py | |
| +++ b/pulpcore/app/tasks/repository.py | |
| @@ -66,7 +66,8 @@ def delete_version(pk): | |
| version.delete() | |
| -def add_and_remove(repository_pk, add_content_units, remove_content_units, base_version_pk=None): | |
| +def add_and_remove(repository_pk, add_content_units, remove_content_units, base_version_pk=None, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import pdb | |
| import subprocess | |
| import tempfile | |
| from pulpcore.client.pulp_ansible import ( | |
| DistributionsAnsibleApi, | |
| RepositoriesAnsibleApi, | |
| RepositorySyncURL, | |
| RemotesAnsibleApi, | |
| ) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import pdb | |
| import random | |
| import string | |
| import subprocess | |
| import tempfile | |
| import unittest | |
| from pulpcore.client.pulp_ansible import ( | |
| DistributionsAnsibleApi, | |
| RemotesCollectionApi, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from os import path | |
| import pdb | |
| import subprocess | |
| import tempfile | |
| from pulpcore.client.pulp_ansible import ( | |
| DistributionsAnsibleApi, | |
| RepositoriesAnsibleApi, | |
| RepositorySyncURL, | |
| RemotesCollectionApi, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| --- | |
| pulp_default_admin_password: password | |
| pulp_install_plugins: | |
| pulp-ansible: {} | |
| pulp_settings: | |
| secret_key: secret | |
| content_origin: "http://{{ ansible_fqdn }}" | |
| pulp_workers: | |
| 1: | |
| state: started |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| tablename | indexname | indexdef | |
| -----------------------------------------+-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | |
| ansible_ansibledistribution | ansible_ansibledistribution_pkey | CREATE UNIQUE INDEX ansible_ansibledistribution_pkey ON public.ansible_ansibledistribution USING btree (basedistribution_ptr_id) | |
| ansible_ansibledistribution | ansible_ansibledistribution_repository_id_1795ee0a | CREATE INDEX ansible_ansibledistribution_repository_id_1795ee0a ON public.ansible_ansibledistribution USING |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| pulp=> explain select * from core_content where pulp_id = 'c310ae21-3c34-4c8c-a6a5-1985f244581d'; | |
| QUERY PLAN | |
| --------------------------------------------------------------------------------------- | |
| Index Scan using core_content_pkey on core_content (cost=0.29..8.30 rows=1 width=59) | |
| Index Cond: (pulp_id = 'c310ae21-3c34-4c8c-a6a5-1985f244581d'::uuid) | |
| (2 rows) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ```diff | |
| diff --git a/pulpcore/content/handler.py b/pulpcore/content/handler.py | |
| index 6cdc51136..532316a64 100644 | |
| --- a/pulpcore/content/handler.py | |
| +++ b/pulpcore/content/handler.py | |
| @@ -58,6 +58,11 @@ class ArtifactNotFound(Exception): | |
| pass | |
| +CONTENT_ARTIFACT = ContentArtifact.objects.select_related("artifact").get(pk="b41e3214-fadb-46dc-b1d7-2ffe44699dbf") |