openstack-helm/ceph-mon/templates/bin/keys/_bootstrap-keyring-generator.py.tpl
Renis b6b6957a94 ceph - split chart into mon, osd and client
New charts:
 * ceph-mon
 * ceph-osd
 * ceph-client

Deleted:
 * ceph

Co-authored-by: Randeep Jalli <rj2083@att.com>
Co-authored-by: Pete Birley <pete@port.direct>

Change-Id: Ic476f5839e749f5765d44d46bcfd4eae9ef96849
2018-04-27 18:13:34 +00:00

15 lines
367 B
Smarty

#!/bin/python
import os
import struct
import time
import base64
key = os.urandom(16)
header = struct.pack(
'<hiih',
1, # le16 type: CEPH_CRYPTO_AES
int(time.time()), # le32 created: seconds
0, # le32 created: nanoseconds,
len(key), # le16: len(key)
)
print(base64.b64encode(header + key).decode('ascii'))