Skip to content

Commit

Permalink
Remove unused cfg variables after refactoring
Browse files Browse the repository at this point in the history
For refactoring PR see lf-edge#906

Signed-off-by: Pavel Abramov <uncle.decart@gmail.com>
  • Loading branch information
uncleDecart committed Oct 19, 2023
1 parent 44f8608 commit 2cc8108
Show file tree
Hide file tree
Showing 6 changed files with 26 additions and 26 deletions.
4 changes: 2 additions & 2 deletions cmd/edenPacket.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ func newPacketVMCmd(cfg *openevec.EdenSetupArgs, packetKey, packetProjectName *s
{
Message: "Basic Commands",
Commands: []*cobra.Command{
newPacketRunCmd(cfg, packetKey, packetProjectName),
newPacketRunCmd(packetKey, packetProjectName),
newPacketDeleteCmd(packetKey, packetProjectName),
newPacketGetIPCmd(packetKey, packetProjectName),
},
Expand All @@ -46,7 +46,7 @@ func newPacketVMCmd(cfg *openevec.EdenSetupArgs, packetKey, packetProjectName *s
return packetVMCmd
}

func newPacketRunCmd(cfg *openevec.EdenSetupArgs, packetKey, packetProjectName *string) *cobra.Command {
func newPacketRunCmd(packetKey, packetProjectName *string) *cobra.Command {
var packetVMName, packetZone, packetMachineType, packetIPXEUrl string

var packetRun = &cobra.Command{
Expand Down
20 changes: 10 additions & 10 deletions cmd/edenPod.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,18 +24,18 @@ func newPodCmd(configName, verbosity *string) *cobra.Command {
Commands: []*cobra.Command{
newPodDeployCmd(cfg),
newPodStopCmd(),
newPodStartCmd(cfg),
newPodStartCmd(),
newPodDeleteCmd(),
newPodRestartCmd(cfg),
newPodRestartCmd(),
newPodPurgeCmd(),
newPodModifyCmd(cfg),
newPodPublishCmd(cfg),
newPodModifyCmd(),
newPodPublishCmd(),
},
},
{
Message: "Printing Commands",
Commands: []*cobra.Command{
newPodPsCmd(cfg),
newPodPsCmd(),
newPodLogsCmd(cfg),
},
},
Expand All @@ -46,7 +46,7 @@ func newPodCmd(configName, verbosity *string) *cobra.Command {
return podCmd
}

func newPodPublishCmd(cfg *openevec.EdenSetupArgs) *cobra.Command {
func newPodPublishCmd() *cobra.Command {
var kernelFile, initrdFile, rootFile, formatStr, arch string
var disks []string
var local bool
Expand Down Expand Up @@ -126,7 +126,7 @@ You can set access VLAN ID (VID) for a particular network in the format '<networ
return podDeployCmd
}

func newPodPsCmd(cfg *openevec.EdenSetupArgs) *cobra.Command {
func newPodPsCmd() *cobra.Command {
var outputFormat types.OutputFormat
var podPsCmd = &cobra.Command{
Use: "ps",
Expand Down Expand Up @@ -182,7 +182,7 @@ func newPodPurgeCmd() *cobra.Command {
return podPurgeCmd
}

func newPodRestartCmd(cfg *openevec.EdenSetupArgs) *cobra.Command {
func newPodRestartCmd() *cobra.Command {
var podRestartCmd = &cobra.Command{
Use: "restart",
Short: "Restart pod",
Expand All @@ -198,7 +198,7 @@ func newPodRestartCmd(cfg *openevec.EdenSetupArgs) *cobra.Command {
return podRestartCmd
}

func newPodStartCmd(cfg *openevec.EdenSetupArgs) *cobra.Command {
func newPodStartCmd() *cobra.Command {
var podStartCmd = &cobra.Command{
Use: "start",
Short: "Start pod",
Expand Down Expand Up @@ -263,7 +263,7 @@ func newPodLogsCmd(cfg *openevec.EdenSetupArgs) *cobra.Command {
return podLogsCmd
}

func newPodModifyCmd(cfg *openevec.EdenSetupArgs) *cobra.Command {
func newPodModifyCmd() *cobra.Command {
var podNetworks, portPublish, acl, vlans []string
var startDelay uint32

Expand Down
8 changes: 4 additions & 4 deletions cmd/edenRol.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@ func newRolCmd(configName, verbosity *string) *cobra.Command {
PersistentPreRunE: preRunViperLoadFunction(cfg, configName, verbosity),
}

rolCmd.AddCommand(newRolRentCmd(cfg))
rolCmd.AddCommand(newRolRentCmd())

return rolCmd
}

func newRolRentCmd(cfg *openevec.EdenSetupArgs) *cobra.Command {
func newRolRentCmd() *cobra.Command {
var rolProjectID string

var rolRentCmd = &cobra.Command{
Expand All @@ -34,7 +34,7 @@ func newRolRentCmd(cfg *openevec.EdenSetupArgs) *cobra.Command {
{
Message: "Basic Commands",
Commands: []*cobra.Command{
newCreateRentCmd(&rolProjectID, cfg),
newCreateRentCmd(&rolProjectID),
newCloseRentCmd(&rolProjectID),
newGetRentCmd(&rolProjectID),
newGetRentConsoleOutputCmd(&rolProjectID),
Expand Down Expand Up @@ -72,7 +72,7 @@ func newGetRentConsoleOutputCmd(rolProjectID *string) *cobra.Command {
return getRentConsoleOutputCmd
}

func newCreateRentCmd(rolProjectID *string, cfg *openevec.EdenSetupArgs) *cobra.Command {
func newCreateRentCmd(rolProjectID *string) *cobra.Command {
var rolRentName, rolModel, rolManufacturer, rolIPXEUrl string

var createRentCmd = &cobra.Command{
Expand Down
8 changes: 4 additions & 4 deletions cmd/edenUtils.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ func newUtilsCmd(configName, verbosity *string) *cobra.Command {
newSdInfoEveCmd(),
newDebugCmd(cfg),
newUploadGitCmd(),
newImportCmd(cfg),
newExportCmd(cfg),
newImportCmd(),
newExportCmd(),
},
},
}
Expand Down Expand Up @@ -192,7 +192,7 @@ func newTemplateCmd(cfg *openevec.EdenSetupArgs) *cobra.Command {
return templateCmd
}

func newExportCmd(cfg *openevec.EdenSetupArgs) *cobra.Command {
func newExportCmd() *cobra.Command {
var exportCmd = &cobra.Command{
Use: "export <filename>",
Short: "export harness",
Expand All @@ -210,7 +210,7 @@ func newExportCmd(cfg *openevec.EdenSetupArgs) *cobra.Command {

}

func newImportCmd(cfg *openevec.EdenSetupArgs) *cobra.Command {
func newImportCmd() *cobra.Command {
var rewriteRoot bool

var importCmd = &cobra.Command{
Expand Down
8 changes: 4 additions & 4 deletions cmd/eve.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,11 @@ func newEveCmd(configName, verbosity *string) *cobra.Command {
newStartEveCmd(cfg),
newStopEveCmd(cfg),
newStatusEveCmd(cfg),
newIpEveCmd(cfg),
newIpEveCmd(),
newSshEveCmd(cfg),
newConsoleEveCmd(cfg),
newOnboardEveCmd(cfg),
newResetEveCmd(cfg),
newResetEveCmd(),
newVersionEveCmd(),
newEpochEveCmd(),
newLinkEveCmd(cfg),
Expand Down Expand Up @@ -156,7 +156,7 @@ func newStatusEveCmd(cfg *openevec.EdenSetupArgs) *cobra.Command {
return statusEveCmd
}

func newIpEveCmd(cfg *openevec.EdenSetupArgs) *cobra.Command {
func newIpEveCmd() *cobra.Command {
var ipEveCmd = &cobra.Command{
Use: "ip",
Short: "ip of eve",
Expand Down Expand Up @@ -230,7 +230,7 @@ func newOnboardEveCmd(cfg *openevec.EdenSetupArgs) *cobra.Command {
return onboardEveCmd
}

func newResetEveCmd(cfg *openevec.EdenSetupArgs) *cobra.Command {
func newResetEveCmd() *cobra.Command {
var resetEveCmd = &cobra.Command{
Use: "reset",
Short: "Reset EVE to initial config",
Expand Down
4 changes: 2 additions & 2 deletions cmd/registry.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ func newRegistryCmd(configName, verbosity *string) *cobra.Command {
Message: "Basic Commands",
Commands: []*cobra.Command{
newStartRegistryCmd(cfg),
newStopRegistryCmd(cfg),
newStopRegistryCmd(),
newStatusRegistryCmd(),
newLoadRegistryCmd(cfg),
},
Expand Down Expand Up @@ -53,7 +53,7 @@ func newStartRegistryCmd(cfg *openevec.EdenSetupArgs) *cobra.Command {
return startRegistryCmd
}

func newStopRegistryCmd(cfg *openevec.EdenSetupArgs) *cobra.Command {
func newStopRegistryCmd() *cobra.Command {
var registryRm bool

var stopRegistryCmd = &cobra.Command{
Expand Down

0 comments on commit 2cc8108

Please sign in to comment.