I am writing a script to create a host using public ssh keythe function I am using is add_using_ssh:
my ssh_key is a an Ssh type already
ssh_key = types.Ssh(public_key=my_ssh_key_string)
host = hosts_service.add_using_ssh(
types.Host(
name=name,
description='',
address=address,
root_password=None,
port=22,
ssh=ssh_key,
cluster=types.Cluster(
name=cluster,
),
),
)
When I choose from GUI, it doesn't ask me to put in root password, so I set it as None (Not sure if this is correct)
I got error:
ovirtsdk4.Error: Fault reason is "Request syntactically incorrect.". Fault detail is "For correct usage, see: ovirt-engine/apidoc#services/hosts/methods/add". HTTP response code is 400.
looks like I didn't get all the parameters assigned?
Can anybody help with this?