Hello everybody,
I have successfully managed private cloud using command line. And then i
tried to write a simple program to test Java API. But when i use Java
API, i haven't authorized. I don't know why because i have had one_auth
file & i have successfully deployed virtual machine running in computer
nodes by using command line. My Netbeans IDE runs under oneadmin user.
_Here is my program in Java:_
package exampleusingopennebulaapi;
import org.opennebula.client.Client;
import org.opennebula.client.OneResponse;
import org.opennebula.client.host.HostPool;
/**
*
* @author oneadmin
*/
public class ExampleUsingOpenNebulaAPI {
public static void main(String[] args) throws Exception {
Client client = new Client();
OneResponse or = HostPool.info(client);
if (or.isError()) {
System.out.println("Error message: " + or.getErrorMessage());
}
else{
System.out.println("No errors. This is xml content: " +
or.getMessage());
}
}
}
And this is result i got:
Error message: [HostPoolInfo] User couldn't be authenticated, aborting call.
Can somebody help me? Thanks in advance.
--
Hoang Thai Xuan Khoa
Ho Chi Minh city, Vietnam
_______________________________________________
Users mailing list
[email protected]
http://lists.opennebula.org/listinfo.cgi/users-opennebula.org