openstack-helm-infra/ceph-mon/templates/bin/keys/_bootstrap-keyring-generator.py.tpl
Steve Wilkerson 25bc83b580 Ceph: Move Ceph charts to openstack-helm-infra
This continues the work of moving infrastructure related services
out of openstack-helm, by moving the ceph charts to openstack
helm infra instead.

Change-Id: I306ccd9d494f72a7946a7850f96d5c22f36eb8a0
2018-08-28 15:03:35 -05: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'))