diff --git a/cmd/flags.go b/cmd/flags.go index 42ee24e1..241f1457 100644 --- a/cmd/flags.go +++ b/cmd/flags.go @@ -42,7 +42,6 @@ var ( MacBMCFlag = &flagDetails{name: "bmc-mac"} OutputFlag = &flagDetails{name: "output", short: "o"} ForceFlag = &flagDetails{name: "force"} - PreLoadFlag = &flagDetails{name: "preload"} DryRunFlag = &flagDetails{name: "dry-run"} SkipBmcResetFlag = &flagDetails{name: "skip-bmc-reset"} PowerOffRequiredFlag = &flagDetails{name: "power-off-required"} @@ -227,10 +226,6 @@ func AddOutputFlag(cmd *cobra.Command, ptr *string) { cmd.PersistentFlags().VarP(outputFlag, OutputFlag.name, OutputFlag.short, "{json|text}") } -func AddPreLoadFlag(cmd *cobra.Command, ptr *bool) { - cmd.PersistentFlags().BoolVar(ptr, PreLoadFlag.name, false, "set to true in order to also load sub items. Example: Listing servers with preload will also load their components, attributes, and versioned attributes") -} - func AddForceFlag(cmd *cobra.Command, ptr *bool, usage string) { cmd.PersistentFlags().BoolVar(ptr, ForceFlag.name, false, usage) } diff --git a/cmd/list/list.go b/cmd/list/list.go index 048cf615..5e8188b6 100644 --- a/cmd/list/list.go +++ b/cmd/list/list.go @@ -7,8 +7,7 @@ import ( ) var ( - output string - preload bool + output string ) var list = &cobra.Command{ @@ -27,5 +26,4 @@ func init() { list.AddCommand(cmdListServer) cmd.AddOutputFlag(list, &output) - cmd.AddPreLoadFlag(list, &preload) } diff --git a/cmd/list/server.go b/cmd/list/server.go index c2c3f2f3..a4174c9b 100644 --- a/cmd/list/server.go +++ b/cmd/list/server.go @@ -57,7 +57,7 @@ var cmdListServer = &cobra.Command{ PaginationParams{ Limit: flagsListServer.limit, Page: flagsListServer.page, - Preload: preload, + Preload: false, OrderBy: "", }, } diff --git a/docs/mctl_list.md b/docs/mctl_list.md index 1d7a42cc..935fe37d 100644 --- a/docs/mctl_list.md +++ b/docs/mctl_list.md @@ -13,7 +13,6 @@ mctl list [flags] ``` -h, --help help for list -o, --output outputType {json|text} (default json) - --preload set to true in order to also load sub items. Example: Listing servers with preload will also load their components, attributes, and versioned attributes ``` ### Options inherited from parent commands diff --git a/docs/mctl_list_component.md b/docs/mctl_list_component.md index 7f41b35a..24228018 100644 --- a/docs/mctl_list_component.md +++ b/docs/mctl_list_component.md @@ -26,7 +26,6 @@ mctl list component --slug SLUG [flags] ``` -c, --config string config file (default is $XDG_CONFIG_HOME/mctl/config.yml) -o, --output outputType {json|text} (default json) - --preload set to true in order to also load sub items. Example: Listing servers with preload will also load their components, attributes, and versioned attributes --reauth re-authenticate with oauth services ``` diff --git a/docs/mctl_list_firmware-set.md b/docs/mctl_list_firmware-set.md index 3283152e..dcf49ded 100644 --- a/docs/mctl_list_firmware-set.md +++ b/docs/mctl_list_firmware-set.md @@ -22,7 +22,6 @@ mctl list firmware-set [flags] ``` -c, --config string config file (default is $XDG_CONFIG_HOME/mctl/config.yml) -o, --output outputType {json|text} (default json) - --preload set to true in order to also load sub items. Example: Listing servers with preload will also load their components, attributes, and versioned attributes --reauth re-authenticate with oauth services ``` diff --git a/docs/mctl_list_firmware.md b/docs/mctl_list_firmware.md index 1e0e7c9d..d5f53176 100644 --- a/docs/mctl_list_firmware.md +++ b/docs/mctl_list_firmware.md @@ -25,7 +25,6 @@ mctl list firmware [flags] ``` -c, --config string config file (default is $XDG_CONFIG_HOME/mctl/config.yml) -o, --output outputType {json|text} (default json) - --preload set to true in order to also load sub items. Example: Listing servers with preload will also load their components, attributes, and versioned attributes --reauth re-authenticate with oauth services ``` diff --git a/docs/mctl_list_server.md b/docs/mctl_list_server.md index 0d56b2e1..86a1af93 100644 --- a/docs/mctl_list_server.md +++ b/docs/mctl_list_server.md @@ -29,7 +29,6 @@ mctl list server [flags] ``` -c, --config string config file (default is $XDG_CONFIG_HOME/mctl/config.yml) -o, --output outputType {json|text} (default json) - --preload set to true in order to also load sub items. Example: Listing servers with preload will also load their components, attributes, and versioned attributes --reauth re-authenticate with oauth services ``` diff --git a/go.mod b/go.mod index f66a4870..7f4fcc87 100644 --- a/go.mod +++ b/go.mod @@ -13,7 +13,7 @@ require ( github.com/google/uuid v1.6.0 github.com/metal-toolbox/bomservice v0.1.5 github.com/metal-toolbox/conditionorc v1.0.6 - github.com/metal-toolbox/fleetdb v1.18.5 + github.com/metal-toolbox/fleetdb v1.18.6-0.20240617210817-833f87cf7c69 github.com/metal-toolbox/rivets v1.0.5 github.com/nirasan/go-oauth-pkce-code-verifier v0.0.0-20220510032225-4f9f17eaec4c github.com/olekukonko/tablewriter v0.0.5 diff --git a/go.sum b/go.sum index b2262179..ba3ff72b 100644 --- a/go.sum +++ b/go.sum @@ -551,8 +551,8 @@ github.com/metal-toolbox/bomservice v0.1.5 h1:1QxDox9hiqxdv2uxEdOEoLBkA/IgvS2BBQ github.com/metal-toolbox/bomservice v0.1.5/go.mod h1:jS7IDe24FrNWmf7fRu5LmGjMBVNXxg8thctMy+a2i6Q= github.com/metal-toolbox/conditionorc v1.0.6 h1:SsFgAJdYaWbuJ12c9vuRlJxYfkx/AbRRCVcJpOS4njk= github.com/metal-toolbox/conditionorc v1.0.6/go.mod h1:KAzZINJE58V49+DsYAZ2mgFFGUJVNVPqyz20dZi4gu8= -github.com/metal-toolbox/fleetdb v1.18.5 h1:xFY6SzThdPMWtTnb8cNE0Dpa+kCMFcZdM72MITW530g= -github.com/metal-toolbox/fleetdb v1.18.5/go.mod h1:RRQt0MZQApuQKp4gUrE+ZwPVqvI6qhMbpakGBlxPJZc= +github.com/metal-toolbox/fleetdb v1.18.6-0.20240617210817-833f87cf7c69 h1:iWW59TeWTSi3wQXfIeEWaJod2I4dBUx2LYup0tEW+QA= +github.com/metal-toolbox/fleetdb v1.18.6-0.20240617210817-833f87cf7c69/go.mod h1:RRQt0MZQApuQKp4gUrE+ZwPVqvI6qhMbpakGBlxPJZc= github.com/metal-toolbox/rivets v1.0.5 h1:PIOT8OPoNMVeSRIbjZUMuDqZD+nHdiXwgIDjWV330m8= github.com/metal-toolbox/rivets v1.0.5/go.mod h1:JBbPEDevQkQmNHNGi4zalTjqTTMs0/0/xCtx1EKe10c= github.com/microsoft/go-mssqldb v0.17.0/go.mod h1:OkoNGhGEs8EZqchVTtochlXruEhEOaO4S0d2sB5aeGQ=