Null during get Fixed IP with OpenStack4j
Dear All,
I want to get fixed IP from Openstack4J, I make a main method as below to test
public static void main(String[] args) {
OSClient osClient= OSFactory.builder().endpoint(enpoint).credentials("keystoneUsername", "keystonePasswd").tenantName("Tenant").authenticate();
List<String> pools = osClient.compute().floatingIps().getPoolNames();
for (String str: pools){
FloatingIP ip = osClient.compute().floatingIps().allocateIP(str);
System.out.println("Pool name is: " + ip.getPool());
System.out.println("Fixed_IP: "+ ip.getFixedIpAddress());
System.out.println("Floating_IP: "+ ip.getFloatingIpAddress());
}
}
The result is:
Pool name is: public
Fixed_IP: null
Floating_IP: 172.24.4.128
Pool name is: testNetwork
Fixed_IP: null
Floating_IP: 172.24.4.12
I dont know why Fixed_IP is null. But if i call create instance with fixed_ip it's work and i check in my dashboard "IP Address" field, it's have an ip address. I dont know why:( Please help me to check it