junos_user: additonal sshkey types added (#43685)
This commit is contained in:
parent
c325fd9a46
commit
7feef1b64b
1 changed files with 8 additions and 1 deletions
|
@ -208,7 +208,14 @@ def map_obj_to_ele(module, want):
|
||||||
|
|
||||||
if item.get('sshkey'):
|
if item.get('sshkey'):
|
||||||
auth = SubElement(user, 'authentication')
|
auth = SubElement(user, 'authentication')
|
||||||
|
if 'ssh-rsa' in item['sshkey']:
|
||||||
ssh_rsa = SubElement(auth, 'ssh-rsa')
|
ssh_rsa = SubElement(auth, 'ssh-rsa')
|
||||||
|
elif 'ssh-dss' in item['sshkey']:
|
||||||
|
ssh_rsa = SubElement(auth, 'ssh-dsa')
|
||||||
|
elif 'ecdsa-sha2' in item['sshkey']:
|
||||||
|
ssh_rsa = SubElement(auth, 'ssh-ecdsa')
|
||||||
|
elif 'ssh-ed25519' in item['sshkey']:
|
||||||
|
ssh_rsa = SubElement(auth, 'ssh-ed25519')
|
||||||
key = SubElement(ssh_rsa, 'name').text = item['sshkey']
|
key = SubElement(ssh_rsa, 'name').text = item['sshkey']
|
||||||
|
|
||||||
return element
|
return element
|
||||||
|
|
Loading…
Reference in a new issue