Skip to content

Instantly share code, notes, and snippets.

Avatar
🔫
I'm here

Sebastian Wagner sebastian-philipp

🔫
I'm here
View GitHub Profile
View drive-groups-debug.md

create

root@ubuntu:~# losetup -f
/dev/loop12
root@ubuntu:~# LANG=C losetup /dev/loop12 disk-image
root@ubuntu:~# pvcreate /dev/loop12
  Physical volume "/dev/loop12" successfully created.
root@ubuntu:~# vgcreate MyVg /dev/loop12
  Volume group "MyVg" successfully created
View get_commands.py
#!/usr/bin/python
import json
import rados
import sys
from itertools import groupby
PY2 = False
def run_command(cluster_handle, cmd):
return cluster_handle.mon_command(json.dumps(cmd), b'', timeout=5)
View mypy_report.txt
pybind/Found 70 errors in 3 files (checked 3 source files)
pybind/mgr/Found 966 errors in 119 files (checked 213 source files)
ceph-volume/ceph_volume/Found 115 errors in 17 files (checked 45 source files)
ceph-volume/ceph_volume/api/lvm.py: note: In function "_splitname_parser":
ceph-volume/ceph_volume/api/lvm.py:70: error: Need type annotation for 'parsed' (hint: "parsed: Dict[<type>, <type>] = ...")
ceph-volume/ceph_volume/api/lvm.py: note: In function "_is_vdo":
ceph-volume/ceph_volume/api/lvm.py:218: error: Need type annotation for 'devices' (hint: "devices: List[<type>] = ...")
ceph-volume/ceph_volume/api/lvm.py: note: In member "set_tags" of class "PVolume":
ceph-volume/ceph_volume/api/lvm.py:336: error: "PVolume" has no attribute "pv_name"
ceph-volume/ceph_volume/api/lvm.py:336: error: "PVolume" has no attribute "pv_uuid"
@sebastian-philipp
sebastian-philipp / json_to_plain.py
Created Nov 29, 2018
json_to_plain.py -- convert any JSON to plain text.
View json_to_plain.py
import json
from prettytable import PrettyTable
from functools import reduce
from orchestrator import InventoryDevice, InventoryNode, ServiceDescription
d = [
{
"path": "/dev/nvme0n1",
View Strange Keybase proof
### Keybase proof
I hereby claim:
* I am sebastian-philipp on github.
* I am sebastianwagner (https://keybase.io/sebastianwagner) on keybase.
* I have a public key whose fingerprint is 6FF5 5FAC A1E2 3BEA CB21 0E0D 8D24 4280 7E69 79F8
To claim this, I am signing this object: