diff --git a/cmd/kola/kola.go b/cmd/kola/kola.go index f36ecbdeb..81d91b27b 100644 --- a/cmd/kola/kola.go +++ b/cmd/kola/kola.go @@ -189,7 +189,6 @@ func writeProps() error { Flavor string `json:"flavor"` } type EquinixMetal struct { - Facility string `json:"facility"` Metro string `json:"metro"` Plan string `json:"plan"` InstallerImageBaseURL string `json:"installer"` @@ -256,7 +255,6 @@ func writeProps() error { Flavor: kola.OpenStackOptions.Flavor, }, EquinixMetal: EquinixMetal{ - Facility: kola.EquinixMetalOptions.Facility, Metro: kola.EquinixMetalOptions.Metro, Plan: kola.EquinixMetalOptions.Plan, InstallerImageBaseURL: kola.EquinixMetalOptions.InstallerImageBaseURL, diff --git a/cmd/kola/options.go b/cmd/kola/options.go index fdf607505..5f88ee97a 100644 --- a/cmd/kola/options.go +++ b/cmd/kola/options.go @@ -183,7 +183,6 @@ func init() { sv(&kola.EquinixMetalOptions.Profile, "packet-profile", "", "Packet profile (default \"default\")") sv(&kola.EquinixMetalOptions.ApiKey, "packet-api-key", "", "Packet API key (overrides config file)") sv(&kola.EquinixMetalOptions.Project, "packet-project", "", "Packet project UUID (overrides config file)") - sv(&kola.EquinixMetalOptions.Facility, "packet-facility", "sv15", "Packet facility code") sv(&kola.EquinixMetalOptions.Plan, "packet-plan", "c3.small.x86", "Packet plan slug (default board-dependent, e.g. \"baremetal_0\")") sv(&kola.EquinixMetalOptions.InstallerImageBaseURL, "packet-installer-image-base-url", "", "Packet installer image base URL, non-https (default board-dependent, e.g. \"http://stable.release.flatcar-linux.net/amd64-usr/current\")") sv(&kola.EquinixMetalOptions.InstallerImageKernelURL, "packet-installer-image-kernel-url", "", "Packet installer image kernel URL, (default packet-installer-image-base-url/flatcar_production_pxe.vmlinuz)") @@ -194,7 +193,6 @@ func init() { root.PersistentFlags().MarkDeprecated("packet-profile", "packet options are deprecated, please update to equinixmetal options") root.PersistentFlags().MarkDeprecated("packet-api-key", "packet options are deprecated, please update to equinixmetal options") root.PersistentFlags().MarkDeprecated("packet-project", "packet options are deprecated, please update to equinixmetal options") - root.PersistentFlags().MarkDeprecated("packet-facility", "packet options are deprecated, please update to equinixmetal options") root.PersistentFlags().MarkDeprecated("packet-plan", "packet options are deprecated, please update to equinixmetal options") root.PersistentFlags().MarkDeprecated("packet-installer-image-base-url", "packet options are deprecated, please update to equinixmetal options") root.PersistentFlags().MarkDeprecated("packet-installer-image-kernel-url", "packet options are deprecated, please update to equinixmetal options") @@ -207,7 +205,6 @@ func init() { sv(&kola.EquinixMetalOptions.Profile, "equinixmetal-profile", "", "EquinixMetal profile (default \"default\")") sv(&kola.EquinixMetalOptions.ApiKey, "equinixmetal-api-key", "", "EquinixMetal API key (overrides config file)") sv(&kola.EquinixMetalOptions.Project, "equinixmetal-project", "", "EquinixMetal project UUID (overrides config file)") - sv(&kola.EquinixMetalOptions.Facility, "equinixmetal-facility", "sv15", "EquinixMetal facility code") sv(&kola.EquinixMetalOptions.Plan, "equinixmetal-plan", "c3.small.x86", "EquinixMetal plan slug (default board-dependent, e.g. \"baremetal_0\")") sv(&kola.EquinixMetalOptions.InstallerImageBaseURL, "equinixmetal-installer-image-base-url", "", "EquinixMetal installer image base URL, non-https (default board-dependent, e.g. \"http://stable.release.flatcar-linux.net/amd64-usr/current\")") sv(&kola.EquinixMetalOptions.InstallerImageKernelURL, "equinixmetal-installer-image-kernel-url", "", "EquinixMetal installer image kernel URL, (default equinixmetal-installer-image-base-url/flatcar_production_pxe.vmlinuz)") diff --git a/cmd/ore/equinixmetal/create-device.go b/cmd/ore/equinixmetal/create-device.go index 453463f5a..6cda08a98 100644 --- a/cmd/ore/equinixmetal/create-device.go +++ b/cmd/ore/equinixmetal/create-device.go @@ -39,7 +39,7 @@ var ( func init() { EquinixMetal.AddCommand(cmdCreateDevice) - cmdCreateDevice.Flags().StringVar(&options.Facility, "facility", "sjc1", "facility code") + cmdCreateDevice.Flags().StringVar(&options.Metro, "metro", "DC", "metro code") cmdCreateDevice.Flags().StringVar(&options.Plan, "plan", "", "plan slug (default board-dependent, e.g. \"baremetal_0\")") cmdCreateDevice.Flags().StringVar(&options.Board, "board", "amd64-usr", "Container Linux board") cmdCreateDevice.Flags().StringVar(&options.InstallerImageBaseURL, "installer-image-base-url", "", "installer image base URL, non-https (default board-dependent, e.g. \"http://stable.release.flatcar-linux.net/amd64-usr/current\")") diff --git a/platform/api/equinixmetal/api.go b/platform/api/equinixmetal/api.go index 4d7ff9b0b..d7cea49ee 100644 --- a/platform/api/equinixmetal/api.go +++ b/platform/api/equinixmetal/api.go @@ -87,8 +87,6 @@ type Options struct { // Project UUID (overrides config profile) Project string - // EquinixMetal location code - Facility string // Slug of the device type (e.g. "baremetal_0") Plan string // e.g. http://alpha.release.flatcar-linux.net/amd64-usr/current @@ -641,15 +639,9 @@ func (a *API) createDevice(hostname, ipxeScriptURL, id string) (*packngo.Device, plog.Infof("device rebooted: %s", id) } else { plog.Infof("Recycling is not possible, creating a new instance") - // if the Metro is set, we set the Facility to empty string in order - // to not conflict with Metro value. - if a.opts.Metro != "" { - a.opts.Facility = "" - } device, response, err = a.c.Devices.Create(&packngo.DeviceCreateRequest{ ProjectID: a.opts.Project, - Facility: []string{a.opts.Facility}, Plan: a.opts.Plan, BillingCycle: "hourly", Hostname: hostname,