[ovirt-users] python sdk and /api/hosts/{host:id}/install
Fabrice Bacchella
fabrice.bacchella at orange.fr
Thu Apr 21 14:58:28 UTC 2016
I'm trying to the use the API to reinstall an hosts.
But if a post the following content :
POST /api/hosts/XXXXX/install
> <action>
> <host>
> <override_iptables>false</override_iptables>
> </host>
> <ssh>
> <port>22</port>
> <fingerprint>SHA256:XXXX</fingerprint>
> <authentication_method>publickey</authentication_method>
> </ssh>
> </action>
I get the error :
[Cannot edit Host. Power Management is enabled for Host but no Agent type selected.]
But the agent was set when I created the host, the GUI don't ask for power management informations when reinstalling the hosts and when I look the the rsdl ( at https://ovirt/api?rsdl), the agent type was not required.
So what's wrong with the install command and that is not in the rsdl ?
I'm using ovirt-engine 3.6.5.3
The rsdl for install that I got :
<link href="/api/hosts/{host:id}/install" rel="install">
<description>
install vdsm and other packages required to get the host ready to be used in the engine
</description>
<request>
<http_method>POST</http_method>
<headers>
<header required="false">
<name>Correlation-Id</name>
<value>any string</value>
</header>
<header required="true">
<name>Content-Type</name>
<value>application/xml|json</value>
</header>
</headers>
<url>
<parameters_set>
<parameter required="false" type="xs:boolean" context="matrix">
<name>async</name>
<value>true|false</value>
</parameter>
</parameters_set>
</url>
<body>
<type>Action</type>
...
<parameters_set>
<description>
install vdsm and other packages required to get the host ready to be used in the engine providing the ssh password
</description>
<parameter required="false" type="xs:int">
<name>action.ssh.port</name>
</parameter>
<parameter required="false" type="xs:string">
<name>action.ssh.fingerprint</name>
</parameter>
<parameter required="false" type="xs:string">
<name>action.ssh.authentication_method</name>
</parameter>
<parameter required="false" type="xs:string">
<name>action.ssh.user.user_name</name>
</parameter>
<parameter required="false" type="xs:string">
<name>action.ssh.user.password</name>
</parameter>
<parameter required="false" type="xs:string">
<name>action.image</name>
</parameter>
<parameter required="false" type="xs:boolean">
<name>action.host.override_iptables</name>
</parameter>
<parameter required="false" type="xs:boolean">
<name>action.async</name>
</parameter>
<parameter required="false" type="xs:long">
<name>action.grace_period.expiry</name>
</parameter>
</parameters_set>
</body>
</request>
<response>
<type>Action</type>
</response>
</link>
More information about the Users
mailing list