Please increment version # in subject when updating.

    import sys
    import ruamel.yaml
    import yaml
    ryaml = ruamel.yaml.YAML()
    ryaml.preserve_quotes = True
    ryaml.indent(mapping=4, sequence=6, offset=4)
    ryaml.explicit_start = True
     
    pdf = "pod18.yaml"
    ipmi_file = "ipmi_admin_password.yaml"
     
    with open(pdf) as f:
        pdf_data = yaml.safe_load(f)
     
    #get password from pdf
    password = pdf_data['jumphost']['remote_params']['pass']
     
     
    with open(ipmi_file, 'r+') as f:
        ipmi_data = ryaml.load(f)
        #The password in the ipmi_admin_password.yaml file is called "data" a 
bit confusing...
        ipmi_data['data'] = password
     
        with open(ipmi_file, 'w') as f:
            ryaml.dump(ipmi_data, f)
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#23842): 
https://lists.opnfv.org/g/opnfv-tech-discuss/message/23842
Mute This Topic: https://lists.opnfv.org/mt/69717529/21656
Group Owner: opnfv-tech-discuss+ow...@lists.opnfv.org
Unsubscribe: https://lists.opnfv.org/g/opnfv-tech-discuss/unsub  
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to