Hello Harmon,

Based on this line the ips should be just list of floating IP addresses:

https://github.com/openstack/openstacksdk/blob/30d5753bcf08b262a7879bd0831ea8c510743d9d/openstack/cloud/_floating_ip.py#L911


  1. You are saying that the server is getting created but not assigning the ip-address to the server that is specified in the call - does it mean that the server is created with a different ip-address or there is no specified ip-address at all or the server creation fails?

  2. Are you sure that it is physically possible for the instance to assign with the specified ip-address (network)? Specifically - are both on the same network or are the networks connected using a router?


On Fri, May 3, 2024 at 6:58 AM Hoai-Thu Vuong <thuvh87@gmail.com> wrote:
according to this, you can use fixed_ip 

On Fri, May 3, 2024 at 10:22 AM Nine, Harmon S <harmon.s.nine@vanderbilt.edu> wrote:
Hello.

I'm using the openstack connection api in python to create a server.

The server is getting created, but the "create_server" call is not assigning the ip-address to the server that is specified in the call.


flavor_id = 'ed88b5d6-150d-4715-8de0-8a2df0a1746a'
image_id = '399ae60e-7f73-476e-aad7-13aebcad84a1'
networks = [{'uuid': '978ebb40-8ee4-4c0b-932e-83dce7e182dd'}]
ip_addresses =[{'subnet_id': '978ebb40-8ee4-4c0b-932e-83dce7e182dd', 'ip_address': '10.0.0.153'}]

# also tried ip_addresses = ['10.0.0.153']

instance = conn.compute.create_server(
    name='testmachine',
    flavor_id=flavor_id,
    image_id=image_id,
    ips=ip_addresses,
    networks=network_uuid_list,
    key_name='key_name'
)


What is the format of the "ips" argument?  Are there other arguments that need to be specified?


Thanks for any help you can provide 🙂

-- Harmon


--
Thu.