wrong path to setupnetworks component. Repo: ------------------------------------------------------------------------------ import java.io.IOException; import org.apache.http.client.ClientProtocolException; import org.ovirt.engine.sdk.Api; import org.ovirt.engine.sdk.decorators.Host; import org.ovirt.engine.sdk.decorators.HostNICs; import org.ovirt.engine.sdk.entities.Action; import org.ovirt.engine.sdk.exceptions.ServerException; import org.ovirt.engine.sdk.exceptions.UnsecuredConnectionAttemptError; public class foo { private static final String URL = "****:443/api"; public static void main(String[] args) throws ClientProtocolException, ServerException, UnsecuredConnectionAttemptError, IOException { Api api = new Api(URL, "admin@internal", "*******", true); Host hst = (Host) api.getHosts().list().get(0); HostNICs hsn = hst.getHostNics(); Action act = new Action(); hst.getHostNics().setupnetworks(act); //System.out.print(((org.ovirt.engine.sdk.entities.Host) api.getHosts().list().get(0)).getRebootAfterInstallation()); } } you will get next exception: Exception in thread "main" code : 404 reason: Not Found detail: <html><head><title>JBoss Web/7.2.0.Final-redhat-1 - JBWEB000064: Error report</title><style><!--H1 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:22px;} H2 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:16px;} H3 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:14px;} BODY {font-family:Tahoma,Arial,sans-serif;color:black;background-color:white;} B {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;} P {font-family:Tahoma,Arial,sans-serif;background:white;color:black;font-size:12px;}A {color : black;}A.name {color : black;}HR {color : #525D76;}--></style> </head><body><h1>JBWEB000065: HTTP Status 404 - Could not find resource for relative : /hosts/cc9a016e-e34f-4ac8-b8cd-f27b462cf716/setupnetworks of full path: https://ilia-rhevm.qa.lab.tlv.redhat.com/api/hosts/cc9a016e-e34f-4ac8-b8cd-f27b462cf716/setupnetworks</h1><HR size="1" noshade="noshade"><p><b>JBWEB000309: type</b> JBWEB000067: Status report</p><p><b>JBWEB000068: message</b> <u>Could not find resource for relative : /hosts/cc9a016e-e34f-4ac8-b8cd-f27b462cf716/setupnetworks of full path: https://ilia-rhevm.qa.lab.tlv.redhat.com/api/hosts/cc9a016e-e34f-4ac8-b8cd-f27b462cf716/setupnetworks</u></p><p><b>JBWEB000069: description</b> <u>JBWEB000124: The requested resource is not available.</u></p><HR size="1" noshade="noshade"><h3>JBoss Web/7.2.0.Final-redhat-1</h3></body></html> at org.ovirt.engine.sdk.web.HttpProxy.execute(HttpProxy.java:118) at org.ovirt.engine.sdk.web.HttpProxyBroker.add(HttpProxyBroker.java:209) at org.ovirt.engine.sdk.web.HttpProxyBroker.action(HttpProxyBroker.java:153) at org.ovirt.engine.sdk.decorators.HostNICs.setupnetworks(HostNICs.java:133) at foo.main(debugRemove.java:21)
verified with is15
Closing - RHEV 3.3 Released