Commit 7b698eb4 by Heechul Kim

ssh pub/pri key pair creation is not needed so commented out.

parent 31c9e5a7
Showing with 3 additions and 1 deletions
...@@ -165,6 +165,7 @@ def provision_machine(name): ...@@ -165,6 +165,7 @@ def provision_machine(name):
return (False, s_msg) return (False, s_msg)
# Create ssh private/public keys # Create ssh private/public keys
"""
key = rsa.generate_private_key(backend=default_backend(), \ key = rsa.generate_private_key(backend=default_backend(), \
public_exponent=65537, key_size=2048) public_exponent=65537, key_size=2048)
pubkey = key.public_key().public_bytes(serialization.Encoding.OpenSSH, \ pubkey = key.public_key().public_bytes(serialization.Encoding.OpenSSH, \
...@@ -194,6 +195,7 @@ def provision_machine(name): ...@@ -194,6 +195,7 @@ def provision_machine(name):
except: except:
s_msg = 'Fail to create ssh public key.' s_msg = 'Fail to create ssh public key.'
return (False, s_msg) return (False, s_msg)
"""
# Create fai config tar file on TFTP_FAI_DIR # Create fai config tar file on TFTP_FAI_DIR
# copy base tar file to d['name'].tar # copy base tar file to d['name'].tar
...@@ -207,7 +209,7 @@ def provision_machine(name): ...@@ -207,7 +209,7 @@ def provision_machine(name):
# add pubkeys/<ip> into tarfile. # add pubkeys/<ip> into tarfile.
with tarfile.open(s_dst, 'a') as o_tar: with tarfile.open(s_dst, 'a') as o_tar:
o_tar.add(s_pubkey_file, arcname='pubkeys/{}'.format(d['ip'])) # o_tar.add(s_pubkey_file, arcname='pubkeys/{}'.format(d['ip']))
if svc_iface_file: if svc_iface_file:
o_tar.add(svc_iface_file, arcname='svc-interface') o_tar.add(svc_iface_file, arcname='svc-interface')
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment