Skip to content

Commit

Permalink
[FAB-3004] Remove extraneous flags
Browse files Browse the repository at this point in the history
See [FAB-3004].

The fabric-ca-server has extraneous flags which are not used
by the runtime.  This change set removes them and removes
resulting dead code.

Change-Id: I50843be43dfa82a98d55a843d030f974a463a874
Signed-off-by: Keith Smith <[email protected]>
  • Loading branch information
Keith Smith committed Apr 11, 2017
1 parent ee34334 commit db76a08
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 20 deletions.
2 changes: 0 additions & 2 deletions cmd/fabric-ca-server/init.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,6 @@ var initCmd = &cobra.Command{
func init() {
initCmd.RunE = runInit
rootCmd.AddCommand(initCmd)
flags := initCmd.Flags()
registerCommonFlags(flags)
}

// The server init main logic
Expand Down
12 changes: 0 additions & 12 deletions cmd/fabric-ca-server/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ import (
"github.com/hyperledger/fabric-ca/lib"
"github.com/hyperledger/fabric-ca/util"
"github.com/spf13/cobra"
"github.com/spf13/pflag"
"github.com/spf13/viper"
)

Expand Down Expand Up @@ -97,17 +96,6 @@ func RunMain(args []string) error {
return err
}

func registerCommonFlags(flags *pflag.FlagSet) {
util.FlagString(flags, "ca.keyfile", "", "key.pem",
"PEM-encoded key file for certificate issuance")
util.FlagString(flags, "ca.certfile", "", "cert.pem",
"PEM-encoded certificate file used for certificate issuance")
util.FlagString(flags, "tls.keyfile", "", "key.pem",
"PEM-encoded key file used for TLS")
util.FlagString(flags, "tls.certfile", "", "cert.pem",
"PEM-encoded certificate file used for TLS")
}

// Get a server for the init and start commands
func getServer() *lib.Server {
return &lib.Server{
Expand Down
6 changes: 0 additions & 6 deletions cmd/fabric-ca-server/start.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@ package main
import (
"fmt"

"github.com/hyperledger/fabric-ca/lib"
"github.com/hyperledger/fabric-ca/util"
"github.com/spf13/cobra"
)

Expand All @@ -33,10 +31,6 @@ var startCmd = &cobra.Command{
func init() {
startCmd.RunE = runStart
rootCmd.AddCommand(startCmd)
flags := startCmd.Flags()
util.FlagString(flags, "addr", "a", lib.DefaultServerAddr, "Listening address")
util.FlagInt(flags, "port", "p", lib.DefaultServerPort, "Listening port")
registerCommonFlags(flags)
}

// The server start main logic
Expand Down

0 comments on commit db76a08

Please sign in to comment.