Git Product home page Git Product logo

Comments (3)

gondor avatar gondor commented on June 18, 2024

So the example above is working as it should. Allocating a floating IP is only saying hey.. add a floating IP from the given pool to the current Tenant.

Fixed IP is assigned to a Server and the call you were making is at a Tenant level. Are you sure your not looking for the "addFloatingIP" call?

If you want to see all Floating IPs against the tenant and the ones which have an associated fixed address (otherwise it will be null) then the call would be:

client.compute().floatingIps().list()

from openstack4j.

anhdenday avatar anhdenday commented on June 18, 2024

Thanks you for you reply,
yes, I am not call addFloadtingIP() but in my method createAndLunchServer() i call ServerCreate.addNetwork(netwworkID, ip) which IP here is floatingIP or fixed_IP,
public void createAndLunchServer(String serverName, String flavorID, String imageID, String networkID, String ip){

    OSClient osClient = OSFactory.clientFromAccess(access);

    System.err.println("OS_CLIENT: " + osClient.toString());

    ServerCreate sc = Builders.server().name(serverName)

                                       .flavor(flavorID)

                                       .image(imageID) 

                                       .build();        
    sc.addNetwork(networkID, ip); // ip here is floatingIP or fixed_IP
    osClient.compute().servers().boot(sc);
}

I will try addFloatingIP() and let you the result later.
BR,

from openstack4j.

gondor avatar gondor commented on June 18, 2024

Closing until further correspondence

from openstack4j.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.