[sdk]: compute service create_server method, how to create multiple servers
dmeng
dmeng at uvic.ca
Fri Apr 16 22:56:24 UTC 2021
Hello there,
Hope this email finds you well.
We are currently using the openstacksdk for developing our product, and
have a question about the openstacksdk compute service create_server()
method. We are wondering if the "max_count" and "min_count" are
supported by openstackskd for creating multiple servers at once. I tried
both the max_count and the min_count, and they both only create one
server for me, but I'd like to create multiple servers at once. The code
I'm using is like the following:
conn = connection.Connection(
session=sess,
region_name=None,
compute_api_version='2')
nova = conn.compute
nova.create_server(
name='sdk-test-create',
image_id=image_id,
flavor_id=flavor_id,
key_name=my_key_name,
networks=[{"uuid": network_id}],
security_groups=[{'name':security_group_name}],
min_count=3,
)
The above code will create one server "sdk-test-create", but I'm
assuming it should create three. Wondering did I miss anything, or if we
have any other option to archive this?
Thanks for your help and have a great day!
Catherine
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack-discuss/attachments/20210416/3558e2e6/attachment.html>
More information about the openstack-discuss
mailing list