Skip to content

Commit

Permalink
[FAB-5518] Move configtxgen to fabric/common/tools
Browse files Browse the repository at this point in the history
The configtxgen code is currently under fabric/common/configtx/tool
which is really a poor location for it.

For consistency with the other tool components, it should be moved to
common/tools/configtxgen.  This CR does that.

Change-Id: I72a6060c119a906343971fcb10a4dc53e557de85
Signed-off-by: Jason Yellick <[email protected]>
  • Loading branch information
Jason Yellick committed Aug 5, 2017
1 parent 307ee2d commit 094244d
Show file tree
Hide file tree
Showing 40 changed files with 54 additions and 54 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ RELEASE_PLATFORMS = windows-amd64 darwin-amd64 linux-amd64 linux-ppc64le linux-s
RELEASE_PKGS = configtxgen cryptogen configtxlator peer orderer

pkgmap.cryptogen := $(PKGNAME)/common/tools/cryptogen
pkgmap.configtxgen := $(PKGNAME)/common/configtx/tool/configtxgen
pkgmap.configtxgen := $(PKGNAME)/common/tools/configtxgen
pkgmap.configtxlator := $(PKGNAME)/common/tools/configtxlator
pkgmap.peer := $(PKGNAME)/peer
pkgmap.orderer := $(PKGNAME)/orderer
Expand Down
4 changes: 2 additions & 2 deletions bddtests/regression/go/ote/ote.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,8 @@ import (
"time"

"github.com/golang/protobuf/proto"
genesisconfig "github.com/hyperledger/fabric/common/configtx/tool/localconfig" // config for genesis.yaml
genesisconfigProvisional "github.com/hyperledger/fabric/common/configtx/tool/provisional"
genesisconfig "github.com/hyperledger/fabric/common/tools/configtxgen/localconfig" // config for genesis.yaml
genesisconfigProvisional "github.com/hyperledger/fabric/common/tools/configtxgen/provisional"
"github.com/hyperledger/fabric/orderer/localconfig" // config, for the orderer.yaml
cb "github.com/hyperledger/fabric/protos/common"
ab "github.com/hyperledger/fabric/protos/orderer"
Expand Down
4 changes: 2 additions & 2 deletions common/config/realconfig_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ import (
. "github.com/hyperledger/fabric/common/config"
"github.com/hyperledger/fabric/common/config/msp"
"github.com/hyperledger/fabric/common/configtx"
"github.com/hyperledger/fabric/common/configtx/tool/localconfig"
"github.com/hyperledger/fabric/common/configtx/tool/provisional"
"github.com/hyperledger/fabric/common/tools/configtxgen/localconfig"
"github.com/hyperledger/fabric/common/tools/configtxgen/provisional"
cb "github.com/hyperledger/fabric/protos/common"

"github.com/stretchr/testify/assert"
Expand Down
4 changes: 2 additions & 2 deletions common/configtx/test/helper.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@ import (
"github.com/hyperledger/fabric/common/config"
configtxmsp "github.com/hyperledger/fabric/common/config/msp"
"github.com/hyperledger/fabric/common/configtx"
genesisconfig "github.com/hyperledger/fabric/common/configtx/tool/localconfig"
"github.com/hyperledger/fabric/common/configtx/tool/provisional"
"github.com/hyperledger/fabric/common/flogging"
"github.com/hyperledger/fabric/common/genesis"
genesisconfig "github.com/hyperledger/fabric/common/tools/configtxgen/localconfig"
"github.com/hyperledger/fabric/common/tools/configtxgen/provisional"
cf "github.com/hyperledger/fabric/core/config"
"github.com/hyperledger/fabric/msp"
cb "github.com/hyperledger/fabric/protos/common"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ import (
)

const (
pkgLogID = "common/configtx/tool/localconfig"
pkgLogID = "common/tools/configtxgen/localconfig"

// Prefix identifies the prefix for the configtxgen-related ENV vars.
Prefix string = "CONFIGTX"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,10 @@ import (
"github.com/hyperledger/fabric/common/config"
mspconfig "github.com/hyperledger/fabric/common/config/msp"
"github.com/hyperledger/fabric/common/configtx"
"github.com/hyperledger/fabric/common/configtx/tool/configtxgen/metadata"
genesisconfig "github.com/hyperledger/fabric/common/configtx/tool/localconfig"
"github.com/hyperledger/fabric/common/configtx/tool/provisional"
"github.com/hyperledger/fabric/common/flogging"
genesisconfig "github.com/hyperledger/fabric/common/tools/configtxgen/localconfig"
"github.com/hyperledger/fabric/common/tools/configtxgen/metadata"
"github.com/hyperledger/fabric/common/tools/configtxgen/provisional"
cb "github.com/hyperledger/fabric/protos/common"
pb "github.com/hyperledger/fabric/protos/peer"
"github.com/hyperledger/fabric/protos/utils"
Expand All @@ -43,7 +43,7 @@ import (

var exitCode = 0

var logger = flogging.MustGetLogger("common/configtx/tool")
var logger = flogging.MustGetLogger("common/tools/configtxgen")

func doOutputBlock(config *genesisconfig.Profile, channelID string, outputBlock string) error {
pgen := provisional.New(config)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import (
"testing"

"github.com/hyperledger/fabric/bccsp/factory"
genesisconfig "github.com/hyperledger/fabric/common/configtx/tool/localconfig"
genesisconfig "github.com/hyperledger/fabric/common/tools/configtxgen/localconfig"

"github.com/stretchr/testify/assert"
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import (
"runtime"
"testing"

"github.com/hyperledger/fabric/common/configtx/tool/configtxgen/metadata"
"github.com/hyperledger/fabric/common/tools/configtxgen/metadata"
"github.com/stretchr/testify/assert"
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@ import (
"github.com/hyperledger/fabric/common/config"
configvaluesmsp "github.com/hyperledger/fabric/common/config/msp"
"github.com/hyperledger/fabric/common/configtx"
genesisconfig "github.com/hyperledger/fabric/common/configtx/tool/localconfig"
"github.com/hyperledger/fabric/common/flogging"
"github.com/hyperledger/fabric/common/genesis"
"github.com/hyperledger/fabric/common/policies"
genesisconfig "github.com/hyperledger/fabric/common/tools/configtxgen/localconfig"
"github.com/hyperledger/fabric/msp"
"github.com/hyperledger/fabric/orderer/common/bootstrap"
cb "github.com/hyperledger/fabric/protos/common"
Expand All @@ -37,7 +37,7 @@ import (
)

const (
pkgLogID = "common/configtx/tool/provisional"
pkgLogID = "common/tools/configtxgen/provisional"
)

var (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import (
"bytes"
"testing"

genesisconfig "github.com/hyperledger/fabric/common/configtx/tool/localconfig"
genesisconfig "github.com/hyperledger/fabric/common/tools/configtxgen/localconfig"
cb "github.com/hyperledger/fabric/protos/common"
"github.com/stretchr/testify/assert"
)
Expand Down
4 changes: 2 additions & 2 deletions common/tools/configtxlator/sanitycheck/sanitycheck_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ import (
"github.com/hyperledger/fabric/common/cauthdsl"
"github.com/hyperledger/fabric/common/config"
"github.com/hyperledger/fabric/common/configtx"
genesisconfig "github.com/hyperledger/fabric/common/configtx/tool/localconfig"
"github.com/hyperledger/fabric/common/configtx/tool/provisional"
genesisconfig "github.com/hyperledger/fabric/common/tools/configtxgen/localconfig"
"github.com/hyperledger/fabric/common/tools/configtxgen/provisional"
cb "github.com/hyperledger/fabric/protos/common"
mspprotos "github.com/hyperledger/fabric/protos/msp"
"github.com/hyperledger/fabric/protos/utils"
Expand Down
4 changes: 2 additions & 2 deletions common/tools/protolator/blackbox_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ import (
"bytes"
"testing"

genesisconfig "github.com/hyperledger/fabric/common/configtx/tool/localconfig"
"github.com/hyperledger/fabric/common/configtx/tool/provisional"
genesisconfig "github.com/hyperledger/fabric/common/tools/configtxgen/localconfig"
"github.com/hyperledger/fabric/common/tools/configtxgen/provisional"
. "github.com/hyperledger/fabric/common/tools/protolator"

"github.com/golang/protobuf/proto"
Expand Down
4 changes: 2 additions & 2 deletions core/committer/committer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ import (
"testing"

"github.com/hyperledger/fabric/common/configtx/test"
"github.com/hyperledger/fabric/common/configtx/tool/localconfig"
"github.com/hyperledger/fabric/common/configtx/tool/provisional"
"github.com/hyperledger/fabric/common/ledger/testutil"
"github.com/hyperledger/fabric/common/tools/configtxgen/localconfig"
"github.com/hyperledger/fabric/common/tools/configtxgen/provisional"
"github.com/hyperledger/fabric/core/ledger/ledgermgmt"
"github.com/hyperledger/fabric/core/mocks/validator"
"github.com/hyperledger/fabric/protos/common"
Expand Down
2 changes: 1 addition & 1 deletion core/common/validation/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import (
"testing"

"github.com/hyperledger/fabric/common/configtx"
genesisconfig "github.com/hyperledger/fabric/common/configtx/tool/localconfig"
genesisconfig "github.com/hyperledger/fabric/common/tools/configtxgen/localconfig"
"github.com/hyperledger/fabric/common/util"
cb "github.com/hyperledger/fabric/protos/common"
"github.com/hyperledger/fabric/protos/peer"
Expand Down
2 changes: 1 addition & 1 deletion orderer/common/deliver/deliver_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ import (
"testing"
"time"

"github.com/hyperledger/fabric/common/configtx/tool/provisional"
mockpolicies "github.com/hyperledger/fabric/common/mocks/policies"
"github.com/hyperledger/fabric/common/policies"
"github.com/hyperledger/fabric/common/tools/configtxgen/provisional"
"github.com/hyperledger/fabric/orderer/common/ledger"
ramledger "github.com/hyperledger/fabric/orderer/common/ledger/ram"
cb "github.com/hyperledger/fabric/protos/common"
Expand Down
2 changes: 1 addition & 1 deletion orderer/common/ledger/file/factory_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ import (
"io/ioutil"
"testing"

"github.com/hyperledger/fabric/common/configtx/tool/provisional"
"github.com/hyperledger/fabric/common/ledger/blkstorage"
"github.com/hyperledger/fabric/common/tools/configtxgen/provisional"
"github.com/hyperledger/fabric/orderer/common/ledger"
"github.com/stretchr/testify/assert"
)
Expand Down
2 changes: 1 addition & 1 deletion orderer/common/ledger/file/impl_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ import (
"os"
"testing"

"github.com/hyperledger/fabric/common/configtx/tool/provisional"
cl "github.com/hyperledger/fabric/common/ledger"
"github.com/hyperledger/fabric/common/tools/configtxgen/provisional"
"github.com/hyperledger/fabric/orderer/common/ledger"
cb "github.com/hyperledger/fabric/protos/common"
ab "github.com/hyperledger/fabric/protos/orderer"
Expand Down
2 changes: 1 addition & 1 deletion orderer/common/ledger/file_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import (
"io/ioutil"
"os"

"github.com/hyperledger/fabric/common/configtx/tool/provisional"
"github.com/hyperledger/fabric/common/tools/configtxgen/provisional"
. "github.com/hyperledger/fabric/orderer/common/ledger"
fileledger "github.com/hyperledger/fabric/orderer/common/ledger/file"
)
Expand Down
2 changes: 1 addition & 1 deletion orderer/common/ledger/json/impl_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import (
"testing"
"time"

"github.com/hyperledger/fabric/common/configtx/tool/provisional"
"github.com/hyperledger/fabric/common/tools/configtxgen/provisional"
"github.com/hyperledger/fabric/orderer/common/ledger"
cb "github.com/hyperledger/fabric/protos/common"
ab "github.com/hyperledger/fabric/protos/orderer"
Expand Down
2 changes: 1 addition & 1 deletion orderer/common/ledger/json_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import (
"io/ioutil"
"os"

"github.com/hyperledger/fabric/common/configtx/tool/provisional"
"github.com/hyperledger/fabric/common/tools/configtxgen/provisional"
. "github.com/hyperledger/fabric/orderer/common/ledger"
jsonledger "github.com/hyperledger/fabric/orderer/common/ledger/json"
cb "github.com/hyperledger/fabric/protos/common"
Expand Down
2 changes: 1 addition & 1 deletion orderer/common/ledger/ram/factory_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ package ramledger
import (
"testing"

"github.com/hyperledger/fabric/common/configtx/tool/provisional"
"github.com/hyperledger/fabric/common/tools/configtxgen/provisional"

logging "github.com/op/go-logging"
)
Expand Down
2 changes: 1 addition & 1 deletion orderer/common/ledger/ram/impl_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ package ramledger
import (
"testing"

"github.com/hyperledger/fabric/common/configtx/tool/provisional"
"github.com/hyperledger/fabric/common/tools/configtxgen/provisional"
"github.com/hyperledger/fabric/orderer/common/ledger"
cb "github.com/hyperledger/fabric/protos/common"
ab "github.com/hyperledger/fabric/protos/orderer"
Expand Down
2 changes: 1 addition & 1 deletion orderer/common/ledger/ram_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ limitations under the License.
package ledger_test

import (
"github.com/hyperledger/fabric/common/configtx/tool/provisional"
"github.com/hyperledger/fabric/common/tools/configtxgen/provisional"
. "github.com/hyperledger/fabric/orderer/common/ledger"
ramledger "github.com/hyperledger/fabric/orderer/common/ledger/ram"
)
Expand Down
2 changes: 1 addition & 1 deletion orderer/common/localconfig/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ import (
"path/filepath"

bccsp "github.com/hyperledger/fabric/bccsp/factory"
"github.com/hyperledger/fabric/common/configtx/tool/provisional"
"github.com/hyperledger/fabric/common/tools/configtxgen/provisional"
)

const (
Expand Down
2 changes: 1 addition & 1 deletion orderer/common/localconfig/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import (
"testing"
"time"

"github.com/hyperledger/fabric/common/configtx/tool/provisional"
"github.com/hyperledger/fabric/common/tools/configtxgen/provisional"
"github.com/stretchr/testify/assert"
)

Expand Down
4 changes: 2 additions & 2 deletions orderer/common/msgprocessor/systemchannel_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ import (
"github.com/hyperledger/fabric/common/config"
"github.com/hyperledger/fabric/common/configtx"
configtxapi "github.com/hyperledger/fabric/common/configtx/api"
genesisconfig "github.com/hyperledger/fabric/common/configtx/tool/localconfig"
"github.com/hyperledger/fabric/common/configtx/tool/provisional"
"github.com/hyperledger/fabric/common/crypto"
mockconfigtx "github.com/hyperledger/fabric/common/mocks/configtx"
genesisconfig "github.com/hyperledger/fabric/common/tools/configtxgen/localconfig"
"github.com/hyperledger/fabric/common/tools/configtxgen/provisional"
cb "github.com/hyperledger/fabric/protos/common"
"github.com/hyperledger/fabric/protos/utils"

Expand Down
4 changes: 2 additions & 2 deletions orderer/common/multichannel/registrar_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ import (

"github.com/golang/protobuf/proto"
"github.com/hyperledger/fabric/common/configtx"
genesisconfig "github.com/hyperledger/fabric/common/configtx/tool/localconfig"
"github.com/hyperledger/fabric/common/configtx/tool/provisional"
"github.com/hyperledger/fabric/common/crypto"
mockcrypto "github.com/hyperledger/fabric/common/mocks/crypto"
genesisconfig "github.com/hyperledger/fabric/common/tools/configtxgen/localconfig"
"github.com/hyperledger/fabric/common/tools/configtxgen/provisional"
"github.com/hyperledger/fabric/msp"
"github.com/hyperledger/fabric/orderer/common/ledger"
ramledger "github.com/hyperledger/fabric/orderer/common/ledger/ram"
Expand Down
2 changes: 1 addition & 1 deletion orderer/common/multichannel/util_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import (

"github.com/hyperledger/fabric/common/config"
"github.com/hyperledger/fabric/common/configtx"
"github.com/hyperledger/fabric/common/configtx/tool/provisional"
"github.com/hyperledger/fabric/common/tools/configtxgen/provisional"
"github.com/hyperledger/fabric/orderer/common/blockcutter"
"github.com/hyperledger/fabric/orderer/common/msgprocessor"
"github.com/hyperledger/fabric/orderer/consensus"
Expand Down
2 changes: 1 addition & 1 deletion orderer/common/performance/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ import (
"time"

"github.com/hyperledger/fabric/common/configtx"
genesisconfig "github.com/hyperledger/fabric/common/configtx/tool/localconfig"
"github.com/hyperledger/fabric/common/localmsp"
genesisconfig "github.com/hyperledger/fabric/common/tools/configtxgen/localconfig"
"github.com/hyperledger/fabric/msp"
mspmgmt "github.com/hyperledger/fabric/msp/mgmt"
"github.com/hyperledger/fabric/orderer/common/localconfig"
Expand Down
4 changes: 2 additions & 2 deletions orderer/common/server/benchmark_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ import (
"testing"
"time"

"github.com/hyperledger/fabric/common/configtx/tool/localconfig"
"github.com/hyperledger/fabric/common/configtx/tool/provisional"
"github.com/hyperledger/fabric/common/tools/configtxgen/localconfig"
"github.com/hyperledger/fabric/common/tools/configtxgen/provisional"
"github.com/hyperledger/fabric/orderer/common/localconfig"
perf "github.com/hyperledger/fabric/orderer/common/performance"
cb "github.com/hyperledger/fabric/protos/common"
Expand Down
4 changes: 2 additions & 2 deletions orderer/common/server/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ import (
_ "net/http/pprof" // This is essentially the main package for the orderer
"os"

genesisconfig "github.com/hyperledger/fabric/common/configtx/tool/localconfig"
"github.com/hyperledger/fabric/common/configtx/tool/provisional"
"github.com/hyperledger/fabric/common/crypto"
"github.com/hyperledger/fabric/common/flogging"
genesisconfig "github.com/hyperledger/fabric/common/tools/configtxgen/localconfig"
"github.com/hyperledger/fabric/common/tools/configtxgen/provisional"
"github.com/hyperledger/fabric/core/comm"
"github.com/hyperledger/fabric/orderer/common/bootstrap/file"
"github.com/hyperledger/fabric/orderer/common/ledger"
Expand Down
2 changes: 1 addition & 1 deletion orderer/common/server/main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ import (

"github.com/Shopify/sarama"
"github.com/hyperledger/fabric/bccsp/factory"
"github.com/hyperledger/fabric/common/configtx/tool/provisional"
"github.com/hyperledger/fabric/common/flogging"
"github.com/hyperledger/fabric/common/localmsp"
"github.com/hyperledger/fabric/common/tools/configtxgen/provisional"
coreconfig "github.com/hyperledger/fabric/core/config"
"github.com/hyperledger/fabric/orderer/common/localconfig"
"github.com/op/go-logging"
Expand Down
2 changes: 1 addition & 1 deletion orderer/sample_clients/broadcast_config/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import (

"google.golang.org/grpc"

genesisconfig "github.com/hyperledger/fabric/common/configtx/tool/localconfig"
genesisconfig "github.com/hyperledger/fabric/common/tools/configtxgen/localconfig"
"github.com/hyperledger/fabric/msp"
mspmgmt "github.com/hyperledger/fabric/msp/mgmt"
"github.com/hyperledger/fabric/orderer/common/localconfig"
Expand Down
2 changes: 1 addition & 1 deletion orderer/sample_clients/broadcast_config/newchain.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ package main

import (
"github.com/hyperledger/fabric/common/configtx"
genesisconfig "github.com/hyperledger/fabric/common/configtx/tool/localconfig"
genesisconfig "github.com/hyperledger/fabric/common/tools/configtxgen/localconfig"
cb "github.com/hyperledger/fabric/protos/common"
)

Expand Down
2 changes: 1 addition & 1 deletion orderer/sample_clients/broadcast_timestamp/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import (
"time"

"github.com/golang/protobuf/proto"
"github.com/hyperledger/fabric/common/configtx/tool/provisional"
"github.com/hyperledger/fabric/common/tools/configtxgen/provisional"
"github.com/hyperledger/fabric/orderer/common/localconfig"
cb "github.com/hyperledger/fabric/protos/common"
ab "github.com/hyperledger/fabric/protos/orderer"
Expand Down
2 changes: 1 addition & 1 deletion orderer/sample_clients/deliver_stdout/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import (
"fmt"
"math"

"github.com/hyperledger/fabric/common/configtx/tool/provisional"
"github.com/hyperledger/fabric/common/tools/configtxgen/provisional"
"github.com/hyperledger/fabric/orderer/common/localconfig"
cb "github.com/hyperledger/fabric/protos/common"
ab "github.com/hyperledger/fabric/protos/orderer"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import (
"fmt"
"time"

"github.com/hyperledger/fabric/common/configtx/tool/provisional"
"github.com/hyperledger/fabric/common/tools/configtxgen/provisional"
cb "github.com/hyperledger/fabric/protos/common"
ab "github.com/hyperledger/fabric/protos/orderer"
"github.com/hyperledger/fabric/protos/utils"
Expand Down
Loading

0 comments on commit 094244d

Please sign in to comment.