Skip to content

Commit e0c8592

Browse files
authored
feat: Deprecate flags for creating spot market instances (#506)
This just marks the spot-market related flags as deprecated as the API no longer accepts requests for spot instances. More info can be found here: https://docs.equinix.com/metal/#retiring-spot-market
2 parents b8d8507 + 82d7b5b commit e0c8592

2 files changed

Lines changed: 3 additions & 2 deletions

File tree

docs/metal_device_create.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,6 @@ metal device create -p <project_id> (-m <metro> | -f <facility>) -P <plan> -H <h
3636
-P, --plan string Name of the plan
3737
-p, --project-id string The project's UUID. This flag is required, unless specified in the config created by metal init or set as METAL_PROJECT_ID environment variable.
3838
-S, --public-ipv4-subnet-size int Size of the public IPv4 subnet.
39-
-s, --spot-instance Provisions the device as a spot instance.
40-
--spot-price-max float Sets the maximum spot market price for the device: --spot-price-max=1.2
4139
-t, --tags strings Tag or list of tags for the device: --tags="tag1,tag2".
4240
-T, --termination-time string Device termination time: --termination-time="2023-08-24T15:04:05Z"
4341
-u, --userdata string Userdata for device initialization. Can not be used with --userdata-file.

internal/devices/create.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -224,5 +224,8 @@ func (c *Client) Create() *cobra.Command {
224224
createDeviceCmd.Flags().Float64VarP(&spotPriceMax, "spot-price-max", "", 0, `Sets the maximum spot market price for the device: --spot-price-max=1.2`)
225225
createDeviceCmd.Flags().StringVarP(&terminationTime, "termination-time", "T", "", `Device termination time: --termination-time="2023-08-24T15:04:05Z"`)
226226

227+
_ = createDeviceCmd.Flags().MarkDeprecated("spot-instance", "spot market is no longer available")
228+
_ = createDeviceCmd.Flags().MarkDeprecated("spot-price-max", "spot market is no longer available")
229+
227230
return createDeviceCmd
228231
}

0 commit comments

Comments
 (0)