Skip to content

Commit

Permalink
FS-1316; remove flag, update fleetdb to make sure preload is parsed.
Browse files Browse the repository at this point in the history
  • Loading branch information
jakeschuurmans committed Jun 24, 2024
1 parent ff58d92 commit 0355047
Show file tree
Hide file tree
Showing 10 changed files with 5 additions and 17 deletions.
5 changes: 0 additions & 5 deletions cmd/flags.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"}
Expand Down Expand Up @@ -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)
}
Expand Down
4 changes: 1 addition & 3 deletions cmd/list/list.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@ import (
)

var (
output string
preload bool
output string
)

var list = &cobra.Command{
Expand All @@ -27,5 +26,4 @@ func init() {
list.AddCommand(cmdListServer)

cmd.AddOutputFlag(list, &output)
cmd.AddPreLoadFlag(list, &preload)
}
2 changes: 1 addition & 1 deletion cmd/list/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ var cmdListServer = &cobra.Command{
PaginationParams{
Limit: flagsListServer.limit,
Page: flagsListServer.page,
Preload: preload,
Preload: false,
OrderBy: "",
},
}
Expand Down
1 change: 0 additions & 1 deletion docs/mctl_list.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 0 additions & 1 deletion docs/mctl_list_component.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
```

Expand Down
1 change: 0 additions & 1 deletion docs/mctl_list_firmware-set.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
```

Expand Down
1 change: 0 additions & 1 deletion docs/mctl_list_firmware.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
```

Expand Down
1 change: 0 additions & 1 deletion docs/mctl_list_server.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
```

Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -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=
Expand Down

0 comments on commit 0355047

Please sign in to comment.