packethost / packet-python

A Python client for the Equinix Metal API
http://metal.equinix.com/
GNU Lesser General Public License v3.0
40 stars 50 forks source link

Question: replacement for "any" facility feature #137

Closed grossmj closed 10 months ago

grossmj commented 10 months ago

Hi,

I had the following code with facility='any' which allowed me to provisioning a server in "any" location. Facilities are now deprecated and I haven't found something similar when using metros. Is there a way or workaround to get the same as before? Thanks.

manager = packet.Manager(auth_token=token)
device = manager.create_device(
            project_id=project_id,
            hostname=hostname,
            plan=server_type,
            facility='any',
            operating_system="ubuntu_22_04")
displague commented 10 months ago

Hi @grossmj, (your username has a random derision for my initials)

There is no equivalent for metros. Metro rates can vary, Sao Paulo vs Chicago, for example. https://deploy.equinix.com/pricing/

You can check the price and capacity of a metro and plan combination using the following:

In the Terraform Provider's E2E tests, we use this pattern to ensure that E2E tests don't trip over capacity.

Also see #136. If Pricing and Capacity endpoints are not covered in this project, you can find them in metal-python.

grossmj commented 10 months ago

All clear, thanks for your answer :)