ContainX / openstack4j

A Fluent OpenStack SDK / Client Library for Java
http://openstack4j.com
Other
290 stars 366 forks source link

Floating ip address #23

Closed selvivg closed 10 years ago

selvivg commented 10 years ago

I create a instance using Openstack4j.Now i am trying get the public and private address assigned to the instance.I am using server.getaddress() it returns NovaAddresses{addresses={private=[NovaAddress{address=10.0.0.2, type=fixed, version=4, macaddr=fa:16:3e:c7:1f:87, }, NovaAddress{address=10.0.0.1, type=floating, version=4, macaddr=fa:16:3e:c7:1f:87, }]}, } i want to list private & public addresses separately without other information..Specifically public address

gondor commented 10 years ago

We support this now.. You can do this:

List<? extend Address> publicAddrs = server.getAddresses().getAddresses("public");
List<? extend Address> privateAddrs = server.getAddresses().getAddresses("private");