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 python | |
# Copyright (c) 2021 Nvidia | |
# | |
# Licensed under the Apache License, Version 2.0 (the "License"); | |
# you may not use this file except in compliance with the License. | |
# You may obtain a copy of the License at | |
# | |
# http://www.apache.org/licenses/LICENSE-2.0 | |
# | |
# Unless required by applicable law or agreed to in writing, software |
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 | |
from subprocess import Popen, PIPE | |
import json | |
import sys | |
from operator import itemgetter | |
import time | |
import string | |
from signal import signal, SIGINT | |
COLOURS = [16, 17, 18, 19, 20, 21, 57, 56, 55, 54, 53, 52, 88, 124, 125, 160, |
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 python | |
from graphviz import Graph | |
import sys | |
import time | |
import re | |
from collections import OrderedDict | |
from hashlib import md5 | |
graph = Graph("config_info") |
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
from swift.common.utils import Timestamp, ShardRange | |
from swift.container.sharder import DEFAULT_SHARD_CONTAINER_THRESHOLD, \ | |
DEFAULT_SHARD_SHRINK_POINT | |
from itertools import chain | |
# This doesn't have to be in a class, was just trying to brainstorm and write something. | |
class RangesScanner(object): | |
def __init__(self, shard_account=None, root_conatiner=None, | |
ranges=None, shard_threshold=None, shrink_size=None): |
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
from swift.common.utils import Timestamp, ShardRange | |
from collections import defaultdict | |
from pprint import pprint | |
range_list_sharded = (('', 'b'), ('b', 'c'), ('c','d'), ('b', 'd'), ('d', 'l'), ('l', 'q'), ('q', '')) | |
range_list_good = (('', 'c'), ('c', 'f'), ('f', 't'), ('t', '')) | |
range_list_extra = (('', 'd'), ('d', 'g'), ('g', 's'), ('s', '')) |
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
[10:34:09] <mordred> mattoliverau: https://opendev.org/zuul/zuul/src/branch/master/.zuul.yaml#L77-L155 | |
[10:34:36] <mordred> mattoliverau: https://opendev.org/zuul/zuul/src/branch/master/Dockerfile | |
[10:34:46] <corvus> mattoliverau: https://zuul-ci.org/docs/zuul/user/encryption.html | |
[10:35:06] <corvus> mattoliverau: https://opendev.org/zuul/zuul/raw/branch/master/tools/encrypt_secret.py | |
[10:36:04] <AJaeger> mordred: looking at https://review.opendev.org/#/c/484163 - the process for the proposal bot is: Push to service-types page, then download directly. If we cache the site, a new content will not be available directly, won't it? | |
[10:37:06] <mattoliverau> corvus, mordred: sweet, thanks heaps guys! | |
[10:38:08] <fungi> mattoliverau: please also review https://governance.openstack.org/tc/resolutions/20170530-binary-artifacts.html and keep those guidelines in mind |
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
diff --git a/swift/common/middleware/keystoneauth.py b/swift/common/middleware/keystoneauth.py | |
index cb1b4c7c3..57405079d 100644 | |
--- a/swift/common/middleware/keystoneauth.py | |
+++ b/swift/common/middleware/keystoneauth.py | |
@@ -17,7 +17,8 @@ from swift.common.http import is_success | |
from swift.common.middleware import acl as swift_acl | |
from swift.common.request_helpers import get_sys_meta_prefix | |
from swift.common.swob import HTTPNotFound, HTTPForbidden, HTTPUnauthorized | |
-from swift.common.utils import config_read_reseller_options, list_from_csv | |
+from swift.common.utils import config_read_reseller_options, list_from_csv, \ |
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 | |
from swift.common.ring.builder import RingBuilder | |
from swift.common.ring import Ring | |
import optparse | |
class PartDiff(object): | |
def _load_file(self, filename): | |
if filename.endswith('.gz'): | |
builder = Ring(filename) | |
builder.parts = builder.partition_count |
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 multiprocessing | |
import time | |
from swift.common.wsgi import run_wsgi | |
def start_daemon(conf_file='/etc/swift/proxy-server.conf', options={}): | |
run_wsgi(conf_file, 'proxy-server', **options) | |
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
self.qemu_cmd = '%s -netdev type=%s,id=net0 -device %s,netdev=net0' % \ | |
(self.qemu_cmd, 'user', netdev) |
NewerOlder