Skip to content

Instantly share code, notes, and snippets.

View daviddavis's full-sized avatar

David Davis daviddavis

View GitHub Profile
import aiohttp
import asyncio
from multidict import MultiDict
async def main():
headers = MultiDict({"User-Agent": "ua1"})
headers.extend({"User-Agent": "ua2"})
async with aiohttp.ClientSession(headers=headers) as session:
{"pulp_href":"/pulp/api/v3/tasks/3b70d642-9183-47ae-b8f5-8ae30598b2c9/","pulp_created":"2021-04-19T14:59:29.064868Z","state":"completed","name":"pulp_file.app.tasks.synchronizing.synchronize","logging_cid":"6238ee221b734178b9fdc3b943a222c6","started_at":"2021-04-19T14:59:29.421834Z","finished_at":"2021-04-19T14:59:46.758362Z","error":null,"worker":"/pulp/api/v3/workers/5ceeb724-4e4a-4d15-9e4f-12780c5e513c/","parent_task":null,"child_tasks":[],"task_group":null,"progress_reports":[{"message":"Downloading Metadata","code":"sync.downloading.metadata","state":"completed","total":null,"done":1,"suffix":null},{"message":"Downloading Artifacts","code":"sync.downloading.artifacts","state":"completed","total":null,"done":10,"suffix":null},{"message":"Associating Content","code":"associating.content","state":"completed","total":null,"done":10,"suffix":null},{"message":"Parsing Metadata Lines","code":"sync.parsing.metadata","state":"completed","total":10,"done":10,"suffix":null}],"created_resources":[null],"reserved_res
{"pulp_href":"/pulp/api/v3/tasks/3da7b9e7-5fd8-4e08-8a53-d92f4c8d1d59/","pulp_created":"2021-04-19T14:59:27.409020Z","state":"completed","name":"pulpcore.app.tasks.orphan.orphan_cleanup","logging_cid":"6972c006cfae4449870e61bb20c80e8c","started_at":"2021-04-19T14:59:27.634439Z","finished_at":"2021-04-19T14:59:27.684986Z","error":null,"worker":"/pulp/api/v3/workers/d595e253-5c95-4460-b50c-d7e9b09c7506/","parent_task":null,"child_tasks":[],"task_group":null,"progress_reports":[{"message":"Clean up orphan Content","code":"clean-up.content","state":"completed","total":0,"done":0,"suffix":null},{"message":"Clean up orphan Artifacts","code":"clean-up.content","state":"completed","total":0,"done":0,"suffix":null}],"created_resources":[],"reserved_resources_record":[]}
{"count":8,"next":null,"previous":null,"results":[{"pulp_href":"/pulp/api/v3/tasks/d159fdc9-0fc0-48d8-8ef9-9633229a634c/","pulp_created":"2021-04-19T14:59:57.470596Z","state":"completed","name":"pulpcore.app.tasks.base.general_delete","logging_cid":"7a6d7d6de7d04b8ea8aee791ee7afb1e","started_at":"2021-04-19T14:59:57.849885Z","finished_at":"2021-04-19T14:59:58.025496Z","error":null,"worker":"/pulp/api/v3/workers/5ceeb724-4e4a-4d15-9e4f-12780c5e513c/","parent_task":null,"child_tasks":[],"task_group":null,"progress_reports":[],"created_resources":[],"reserved_resources_record":["/pulp/api/v3/repositories/file/file/6249133d-f0b9-442c-935d-eee40bc793fd/"]},{"pulp_href":"/pulp/api/v3/tasks/dcfe9b13-87ba-4f3c-ad09-348da72440e6/","pulp_created":"2021-04-19T14:59:55.284182Z","state":"completed","name":"pulpcore.app.tasks.repository.add_and_remove","logging_cid":"cc7a908eb64d4c879ab4072b12ba4cab","started_at":"2021-04-19T14:59:55.694705Z","finished_at":"2021-04-19T14:59:55.958974Z","error":null,"worker":"/pulp/api/v3/w
This file has been truncated, but you can view the full file.
{
"openapi": "3.0.3",
"info": {
"title": "Pulp 3 API",
"version": "v3",
"description": "Fetch, Upload, Organize, and Distribute Software Packages",
"contact": {
"name": "Pulp Team",
"email": "[email protected]",
"url": "https://pulpproject.org"
/ansible/collections/ pulp_ansible.app.viewsets.CollectionUploadViewSet
/pulp/api/v3/ansible/collections/ pulp_ansible.app.viewsets.CollectionViewset ansible/collections-list
/pulp/api/v3/ansible/collections/<pk>/ pulp_ansible.app.viewsets.CollectionViewset ansible/collections-detail
/pulp/api/v3/ansible/collections/<pk>\.<format>/ pulp_ansible.app.viewsets.CollectionViewset ansible/collections-detail
/pulp/api/v3/ansible/collections\.<format>/ pulp_ansible.app.viewsets.CollectionViewset ansible/collections-list
/pulp/api/v3/content/ansible/collection_versions/ pulp_ansible.app.viewsets.CollectionVersionViewSet content-ansible/collection_versions-list
/pulp/api/v3/content/ansible/collection_versions/<pk>/ pulp_ansible.app.viewsets.CollectionVersionViewSet content-ansible/collection_versions-detail
/pulp/api/v3/content/ansible/collection_versions/<pk>\.<format>/ pulp_ansible.app.viewsets.CollectionVersionViewSet content-ansible/collection_versions-detail
/pulp/api/v3/content/ansible/collection_versions\.<forma
---
document: modulemd
version: 2
data:
name: walrus
stream: 5.21
summary: Walrus 5.21 module
description: >-
A module for the walrus 5.21 package
license:
{"swagger": "2.0", "info": {"title": "Pulp3 API", "version": "v3"}, "host": "localhost:8000", "schemes": ["http"], "basePath": "/pulp/api/v3", "consumes": ["application/json"], "produces": ["application/json"], "securityDefinitions": {"basic": {"type": "basic"}}, "security": [{"basic": []}], "paths": {"/artifacts/": {"get": {"operationId": "artifacts_list", "description": "", "parameters": [{"name": "md5", "in": "query", "description": "Filter results where md5 matches value", "required": false, "type": "string"}, {"name": "sha1", "in": "query", "description": "Filter results where sha1 matches value", "required": false, "type": "string"}, {"name": "sha224", "in": "query", "description": "Filter results where sha224 matches value", "required": false, "type": "string"}, {"name": "sha256", "in": "query", "description": "Filter results where sha256 matches value", "required": false, "type": "string"}, {"name": "sha384", "in": "query", "description": "Filter results where sha384 matches value", "required": false,
{
"_meta": {
"title": "Pulp API",
"url": "http://localhost:8000/api/v3/"
},
"_type": "document",
"artifacts": {
"create": {
"_type": "link",
"action": "post",
{
 "_meta": {
 "title": "Pulp API",
 "url": "http://localhost:8000/api/v3/"
 },
 "_type": "document",
 "artifacts": {
 "create": {
 "_type": "link",
 "action": "post",