This file contains 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 select | |
from proton import Message | |
from proton import Messenger | |
known_selectables = {} | |
def epoll_events(sel): | |
events = 0 | |
if sel.capacity > 0: |
This file contains 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 sys | |
class fake_out: | |
def __init__(self, stream): | |
self._stream = stream | |
for name in dir(stream): | |
if name != "write" and not name.startswith("_"): | |
setattr(self, name, getattr(stream, name)) | |
def write(self, s): | |
self._stream.write(s) | |
if "enter your password" in s.lower(): |
This file contains 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
@startuml | |
[Browser] as browser | |
node "Client" { | |
[Client (RHSM)] as client_rhsm | |
[Goferd+Katello Agent] as client_goferd | |
[Puppet] as client_puppet | |
} |
This file contains 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
@startuml | |
title Synchronous Task Example (create repo) | |
autonumber | |
actor "API Client" as client | |
client -> "Pulp API (httpd)" as httpd : create repo | |
httpd -> MongoDB: create repo record(s) | |
MongoDB -> httpd: return after creating new record(s) | |
httpd -> client: create repo API response |
This file contains 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
@startuml | |
title Asynchronous Task Example (sync) | |
actor "API Client" as client | |
autonumber | |
client -> httpd: sync repo | |
httpd -> MongoDB: create TaskStatus record | |
httpd -> "resource_manager Queue" as rmQueue: dispatch Task to Resource Manager Queue | |
httpd -> client: TaskStatus info including UUID |
This file contains 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
@startuml | |
title Pulp Consumer Action Example (bind to repo) | |
actor "API Client" as client | |
autonumber | |
client -> httpd: bind consumer 'foo' to repo 'bar' | |
httpd -> MongoDB: create TaskStatus record | |
httpd -> "Dedicated Queue for Consumer 'foo'" as fooQueue: dispatch message to bind to repo 'bar' | |
...Time passes until consumer 'foo' Connects to Qpid... |
This file contains 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
@startuml | |
title Pulp Architecture Diagram | |
actor client | |
node httpd | |
database MongoDB | |
node pulp_celerybeat | |
node pulp_resource_manager | |
node "pulp_worker1" as worker1 |
This file contains 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
# This gist will cancel all incomplete and unstarted Pulp 2.y tasks | |
pulp-admin -u admin -p admin tasks list | grep -ohe '[0-9a-f]\{8\}-[0-9a-f]\{4\}-[0-9a-f]\{4\}-[0-9a-f]\{4\}-[0-9a-f]\{12\}' | sort | uniq | while read uuid ; do | |
pulp-admin -u admin -p admin tasks cancel --task-id $uuid | |
done |
This file contains 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 argparse | |
import csv | |
""" | |
Make a Python 3 virtualenv and install requests and PyYAML | |
pyvenv sprint_demos | |
source sprint_demos/bin/activate | |
Run the script using the Python3 interpreter |
This file contains 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
#!/usr/bin/env python26 | |
# python26 docs-fixer.py /path/to/docs/html | |
# originally made by github user werwty. | |
import os | |
import sys | |
inserted_html=""" |
OlderNewer