scaleway-sdk-python icon indicating copy to clipboard operation
scaleway-sdk-python copied to clipboard

Add a "How to create an instance" example

Open quantumsheep opened this issue 2 years ago • 6 comments

quantumsheep avatar Aug 11 '23 12:08 quantumsheep

Seconding. Is that even possible using this library right now?

d33tah avatar Dec 11 '23 14:12 d33tah

I guess that, by the time a real InstanceV1API.create_server() method is available, you could rely on InstanceV1API._create_server():

inst._create_server(commercial_type="PRO2-L", image="5cd3faa3-271a-4bba-9e25-fe66f5d34444", enable_ipv6=False)

Note that image= requires the UUID of the local-image of the target zone, given by the MarketplaceV2API.

NoSuchCommand avatar Dec 11 '23 15:12 NoSuchCommand

Still no news on this? Got a lot of errors trying to do so... Creating and starting a instance is a must have.

Failed to create instance: VolumeServer.__init__() missing 6 required positional arguments: 'name', 'organization', 'size', 'state', 'project', and 'zone'

            instance = instance_api._create_server(
                project=project_id,
                organization=organization_id,
                name=instance_name,
                enable_ipv6=False,
                dynamic_ip_required=True,
                commercial_type='DEV1-S', 
                image='docker'
            )

kinoute avatar Oct 15 '24 15:10 kinoute

Hi @kinoute,

You can use the master branch to fix the issue; it should be fixed for good in the next release.

We are currently working on the instance documentation.

Thank you very much,

Have a nice day

Laure-di avatar Dec 19 '24 14:12 Laure-di