コード例 #1
0
ファイル: test_gather_keys.py プロジェクト: ceph/ceph-deploy
def get_key_static(keytype, key_path):
    with open(key_path, 'w') as f:
        f.write("[%s]\n" % (gatherkeys.keytype_identity(keytype)))
        f.write("key=fred\n")
コード例 #2
0
def get_key_static(keytype, key_path):
    with file(key_path, 'w') as f:
        f.write("[%s]\n" % (gatherkeys.keytype_identity(keytype)))
        f.write("key=fred\n")
コード例 #3
0
ファイル: test_gather_keys.py プロジェクト: ceph/ceph-deploy
def get_key_dynamic(keytype, key_path):
    with open(key_path, 'w', 0o600) as f:
        f.write("[%s]\n" % (gatherkeys.keytype_identity(keytype)))
        f.write("key='%s'" % (new.generate_auth_key()))
コード例 #4
0
def get_key_dynamic(keytype, key_path):
    with open(key_path, 'w', 0600) as f:
        f.write("[%s]\n" % (gatherkeys.keytype_identity(keytype)))
        f.write("key='%s'" % (new.generate_auth_key()))