Skip to content

Instantly share code, notes, and snippets.

View sql_query_output_showing_index_scan
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)
View pulp_ansible and pulpcore database indexes
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
View pulp_ansible_16_worker_user_install_config_3_5_2020.yaml
---
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
View config_mgmt_camp_2020_collection_install.py
from os import path
import pdb
import subprocess
import tempfile
from pulpcore.client.pulp_ansible import (
DistributionsAnsibleApi,
RepositoriesAnsibleApi,
RepositorySyncURL,
RemotesCollectionApi,
View config_mgmt_camp_2020_collection_upload.py
import pdb
import random
import string
import subprocess
import tempfile
import unittest
from pulpcore.client.pulp_ansible import (
DistributionsAnsibleApi,
RemotesCollectionApi,
View config_mgmt_camp_2020_roles.py
import pdb
import subprocess
import tempfile
from pulpcore.client.pulp_ansible import (
DistributionsAnsibleApi,
RepositoriesAnsibleApi,
RepositorySyncURL,
RemotesAnsibleApi,
)
View add_and_remove.diff
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,
View uploads.diff
# 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):
"""
View aiohttp_test_client.py
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:
View aiohttp_test_server.py
import asyncio
import logging
import os
import signal
from aiohttp import web
log = logging.getLogger(__name__)
You can’t perform that action at this time.