Skip to content

Commit

Permalink
[FAB-5646] Move channel config to config/channel
Browse files Browse the repository at this point in the history
This is the first CR in a series designed to split the conflation of
configtx processing and channel configuration.  The bulk of the code in
fabric/common/config is specific to this channel configuration, so, this
CR moves the entirety of this directory to fabric/common/config/channel.

Ultimately, the common pieces will be extracted and moved back, but in
the interest of making things reviewable and minimizing the diff, it
makes sense to do this bulk move in one CR, then the move back in
another.

Change-Id: I124d48b0cbc7fd482e5118177ba9d59a81241d27
Signed-off-by: Jason Yellick <jyellick@us.ibm.com>
  • Loading branch information
Jason Yellick committed Aug 11, 2017
1 parent 8f3c705 commit 8dc7883
Show file tree
Hide file tree
Showing 60 changed files with 50 additions and 50 deletions.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ package config
import (
"fmt"

"github.com/hyperledger/fabric/common/config/msp"
"github.com/hyperledger/fabric/common/config/channel/msp"
)

const (
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ limitations under the License.
package config

import (
mspconfig "github.com/hyperledger/fabric/common/config/msp"
mspconfig "github.com/hyperledger/fabric/common/config/channel/msp"
pb "github.com/hyperledger/fabric/protos/peer"

logging "github.com/op/go-logging"
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import (
"math"

"github.com/hyperledger/fabric/bccsp"
"github.com/hyperledger/fabric/common/config/msp"
"github.com/hyperledger/fabric/common/config/channel/msp"
"github.com/hyperledger/fabric/common/util"
cb "github.com/hyperledger/fabric/protos/common"
)
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ package config
import (
"fmt"

"github.com/hyperledger/fabric/common/config/msp"
"github.com/hyperledger/fabric/common/config/channel/msp"
cb "github.com/hyperledger/fabric/protos/common"
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ package config
import (
"testing"

"github.com/hyperledger/fabric/common/config/msp"
"github.com/hyperledger/fabric/common/config/channel/msp"
cb "github.com/hyperledger/fabric/protos/common"
"github.com/stretchr/testify/assert"
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ package config
import (
"fmt"

"github.com/hyperledger/fabric/common/config/msp"
"github.com/hyperledger/fabric/common/config/channel/msp"
)

const (
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import (
"strings"
"time"

"github.com/hyperledger/fabric/common/config/msp"
"github.com/hyperledger/fabric/common/config/channel/msp"
ab "github.com/hyperledger/fabric/protos/orderer"
)

Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ package config
import (
"fmt"

mspconfig "github.com/hyperledger/fabric/common/config/msp"
mspconfig "github.com/hyperledger/fabric/common/config/channel/msp"
"github.com/hyperledger/fabric/msp"
mspprotos "github.com/hyperledger/fabric/protos/msp"
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ package config
import (
"testing"

mspconfig "github.com/hyperledger/fabric/common/config/msp"
mspconfig "github.com/hyperledger/fabric/common/config/channel/msp"
fabricconfig "github.com/hyperledger/fabric/core/config"
"github.com/hyperledger/fabric/msp"
mspprotos "github.com/hyperledger/fabric/protos/msp"
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ import (
"os"
"testing"

. "github.com/hyperledger/fabric/common/config"
"github.com/hyperledger/fabric/common/config/msp"
. "github.com/hyperledger/fabric/common/config/channel"
"github.com/hyperledger/fabric/common/config/channel/msp"
"github.com/hyperledger/fabric/common/configtx"
"github.com/hyperledger/fabric/common/tools/configtxgen/localconfig"
"github.com/hyperledger/fabric/common/tools/configtxgen/provisional"
Expand Down
2 changes: 1 addition & 1 deletion common/config/root.go → common/config/channel/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ package config
import (
"fmt"

"github.com/hyperledger/fabric/common/config/msp"
"github.com/hyperledger/fabric/common/config/channel/msp"

"github.com/golang/protobuf/proto"
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ package config
import (
"testing"

"github.com/hyperledger/fabric/common/config/msp"
"github.com/hyperledger/fabric/common/config/channel/msp"

logging "github.com/op/go-logging"
"github.com/stretchr/testify/assert"
Expand Down
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion common/configtx/api/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ limitations under the License.
package api

import (
"github.com/hyperledger/fabric/common/config"
"github.com/hyperledger/fabric/common/config/channel"
"github.com/hyperledger/fabric/common/policies"
"github.com/hyperledger/fabric/msp"
cb "github.com/hyperledger/fabric/protos/common"
Expand Down
2 changes: 1 addition & 1 deletion common/configtx/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ package configtx
import (
"fmt"

"github.com/hyperledger/fabric/common/config"
"github.com/hyperledger/fabric/common/config/channel"
"github.com/hyperledger/fabric/common/configtx/api"
"github.com/hyperledger/fabric/common/policies"
cb "github.com/hyperledger/fabric/protos/common"
Expand Down
4 changes: 2 additions & 2 deletions common/configtx/initializer.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ import (
"fmt"

"github.com/hyperledger/fabric/common/cauthdsl"
"github.com/hyperledger/fabric/common/config"
configtxmsp "github.com/hyperledger/fabric/common/config/msp"
"github.com/hyperledger/fabric/common/config/channel"
configtxmsp "github.com/hyperledger/fabric/common/config/channel/msp"
"github.com/hyperledger/fabric/common/configtx/api"
"github.com/hyperledger/fabric/common/policies"
"github.com/hyperledger/fabric/msp"
Expand Down
4 changes: 2 additions & 2 deletions common/configtx/template.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ package configtx
import (
"fmt"

"github.com/hyperledger/fabric/common/config"
configmsp "github.com/hyperledger/fabric/common/config/msp"
"github.com/hyperledger/fabric/common/config/channel"
configmsp "github.com/hyperledger/fabric/common/config/channel/msp"
"github.com/hyperledger/fabric/common/policies"
"github.com/hyperledger/fabric/common/util"
"github.com/hyperledger/fabric/msp"
Expand Down
4 changes: 2 additions & 2 deletions common/configtx/template_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ import (
"fmt"
"testing"

"github.com/hyperledger/fabric/common/config"
configmsp "github.com/hyperledger/fabric/common/config/msp"
"github.com/hyperledger/fabric/common/config/channel"
configmsp "github.com/hyperledger/fabric/common/config/channel/msp"
mmsp "github.com/hyperledger/fabric/common/mocks/msp"
cb "github.com/hyperledger/fabric/protos/common"
"github.com/hyperledger/fabric/protos/utils"
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 @@ -17,8 +17,8 @@ limitations under the License.
package test

import (
"github.com/hyperledger/fabric/common/config"
configtxmsp "github.com/hyperledger/fabric/common/config/msp"
"github.com/hyperledger/fabric/common/config/channel"
configtxmsp "github.com/hyperledger/fabric/common/config/channel/msp"
"github.com/hyperledger/fabric/common/configtx"
"github.com/hyperledger/fabric/common/flogging"
"github.com/hyperledger/fabric/common/genesis"
Expand Down
2 changes: 1 addition & 1 deletion common/mocks/config/channel_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ package config
import (
"testing"

"github.com/hyperledger/fabric/common/config"
"github.com/hyperledger/fabric/common/config/channel"
)

func TestChannelConfigInterface(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion common/mocks/config/orderer.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ package config
import (
"time"

"github.com/hyperledger/fabric/common/config"
"github.com/hyperledger/fabric/common/config/channel"
ab "github.com/hyperledger/fabric/protos/orderer"
)

Expand Down
2 changes: 1 addition & 1 deletion common/mocks/config/orderer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ package config
import (
"testing"

"github.com/hyperledger/fabric/common/config"
"github.com/hyperledger/fabric/common/config/channel"
)

func TestOrdererConfigInterface(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion common/mocks/configtx/configtx.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ limitations under the License.
package configtx

import (
"github.com/hyperledger/fabric/common/config"
"github.com/hyperledger/fabric/common/config/channel"
mockpolicies "github.com/hyperledger/fabric/common/mocks/policies"
"github.com/hyperledger/fabric/common/policies"
"github.com/hyperledger/fabric/msp"
Expand Down
4 changes: 2 additions & 2 deletions common/tools/configtxgen/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ import (
"strings"

"github.com/hyperledger/fabric/bccsp/factory"
"github.com/hyperledger/fabric/common/config"
mspconfig "github.com/hyperledger/fabric/common/config/msp"
"github.com/hyperledger/fabric/common/config/channel"
mspconfig "github.com/hyperledger/fabric/common/config/channel/msp"
"github.com/hyperledger/fabric/common/configtx"
"github.com/hyperledger/fabric/common/flogging"
genesisconfig "github.com/hyperledger/fabric/common/tools/configtxgen/localconfig"
Expand Down
4 changes: 2 additions & 2 deletions common/tools/configtxgen/provisional/provisional.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ import (
"fmt"

"github.com/hyperledger/fabric/common/cauthdsl"
"github.com/hyperledger/fabric/common/config"
configvaluesmsp "github.com/hyperledger/fabric/common/config/msp"
"github.com/hyperledger/fabric/common/config/channel"
configvaluesmsp "github.com/hyperledger/fabric/common/config/channel/msp"
"github.com/hyperledger/fabric/common/configtx"
"github.com/hyperledger/fabric/common/flogging"
"github.com/hyperledger/fabric/common/genesis"
Expand Down
2 changes: 1 addition & 1 deletion common/tools/configtxlator/sanitycheck/sanitycheck_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import (

"github.com/hyperledger/fabric/bccsp/factory"
"github.com/hyperledger/fabric/common/cauthdsl"
"github.com/hyperledger/fabric/common/config"
"github.com/hyperledger/fabric/common/config/channel"
"github.com/hyperledger/fabric/common/configtx"
genesisconfig "github.com/hyperledger/fabric/common/tools/configtxgen/localconfig"
"github.com/hyperledger/fabric/common/tools/configtxgen/provisional"
Expand Down
2 changes: 1 addition & 1 deletion core/peer/peer.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (
"net"
"sync"

"github.com/hyperledger/fabric/common/config"
"github.com/hyperledger/fabric/common/config/channel"
"github.com/hyperledger/fabric/common/configtx"
configtxapi "github.com/hyperledger/fabric/common/configtx/api"
configtxtest "github.com/hyperledger/fabric/common/configtx/test"
Expand Down
2 changes: 1 addition & 1 deletion core/scc/cscc/configure.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import (
"fmt"

"github.com/golang/protobuf/proto"
"github.com/hyperledger/fabric/common/config"
"github.com/hyperledger/fabric/common/config/channel"
"github.com/hyperledger/fabric/common/flogging"
"github.com/hyperledger/fabric/common/policies"
"github.com/hyperledger/fabric/core/chaincode/shim"
Expand Down
2 changes: 1 addition & 1 deletion gossip/service/eventer.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ package service
import (
"reflect"

"github.com/hyperledger/fabric/common/config"
"github.com/hyperledger/fabric/common/config/channel"

"github.com/hyperledger/fabric/protos/peer"
)
Expand Down
2 changes: 1 addition & 1 deletion gossip/service/eventer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
"reflect"
"testing"

"github.com/hyperledger/fabric/common/config"
"github.com/hyperledger/fabric/common/config/channel"
"github.com/hyperledger/fabric/gossip/util"
"github.com/hyperledger/fabric/protos/peer"
)
Expand Down
2 changes: 1 addition & 1 deletion gossip/service/gossip_service_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import (
"testing"
"time"

"github.com/hyperledger/fabric/common/config"
"github.com/hyperledger/fabric/common/config/channel"
"github.com/hyperledger/fabric/common/localmsp"
"github.com/hyperledger/fabric/core/deliverservice"
"github.com/hyperledger/fabric/core/deliverservice/blocksprovider"
Expand Down
2 changes: 1 addition & 1 deletion gossip/service/join_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
"testing"
"time"

"github.com/hyperledger/fabric/common/config"
"github.com/hyperledger/fabric/common/config/channel"
"github.com/hyperledger/fabric/gossip/api"
"github.com/hyperledger/fabric/gossip/comm"
"github.com/hyperledger/fabric/gossip/common"
Expand Down
2 changes: 1 addition & 1 deletion msp/mgmt/deserializer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import (
"os"
"testing"

msp2 "github.com/hyperledger/fabric/common/config/msp"
msp2 "github.com/hyperledger/fabric/common/config/channel/msp"
"github.com/hyperledger/fabric/core/config"
"github.com/hyperledger/fabric/msp"
"github.com/stretchr/testify/assert"
Expand Down
2 changes: 1 addition & 1 deletion msp/mgmt/mgmt.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import (
"errors"

"github.com/hyperledger/fabric/bccsp/factory"
configvaluesmsp "github.com/hyperledger/fabric/common/config/msp"
configvaluesmsp "github.com/hyperledger/fabric/common/config/channel/msp"
"github.com/hyperledger/fabric/common/flogging"
"github.com/hyperledger/fabric/core/config"
"github.com/hyperledger/fabric/msp"
Expand Down
2 changes: 1 addition & 1 deletion msp/mgmt/mgmt_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ package mgmt
import (
"testing"

configvaluesmsp "github.com/hyperledger/fabric/common/config/msp"
configvaluesmsp "github.com/hyperledger/fabric/common/config/channel/msp"
"github.com/hyperledger/fabric/msp"
"github.com/stretchr/testify/assert"
)
Expand Down
2 changes: 1 addition & 1 deletion orderer/common/blockcutter/blockcutter.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ limitations under the License.
package blockcutter

import (
"github.com/hyperledger/fabric/common/config"
"github.com/hyperledger/fabric/common/config/channel"
cb "github.com/hyperledger/fabric/protos/common"

"github.com/op/go-logging"
Expand Down
2 changes: 1 addition & 1 deletion orderer/common/msgprocessor/systemchannel.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ package msgprocessor
import (
"fmt"

"github.com/hyperledger/fabric/common/config"
"github.com/hyperledger/fabric/common/config/channel"
"github.com/hyperledger/fabric/common/configtx"
configtxapi "github.com/hyperledger/fabric/common/configtx/api"
"github.com/hyperledger/fabric/common/crypto"
Expand Down
2 changes: 1 addition & 1 deletion orderer/common/msgprocessor/systemchannel_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
"fmt"
"testing"

"github.com/hyperledger/fabric/common/config"
"github.com/hyperledger/fabric/common/config/channel"
"github.com/hyperledger/fabric/common/configtx"
configtxapi "github.com/hyperledger/fabric/common/configtx/api"
"github.com/hyperledger/fabric/common/crypto"
Expand Down
2 changes: 1 addition & 1 deletion orderer/common/msgprocessor/systemchannelfilter.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ package msgprocessor
import (
"fmt"

"github.com/hyperledger/fabric/common/config"
"github.com/hyperledger/fabric/common/config/channel"
"github.com/hyperledger/fabric/common/configtx"
configtxapi "github.com/hyperledger/fabric/common/configtx/api"
cb "github.com/hyperledger/fabric/protos/common"
Expand Down
2 changes: 1 addition & 1 deletion orderer/common/msgprocessor/systemchannelfilter_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
"fmt"
"testing"

"github.com/hyperledger/fabric/common/config"
"github.com/hyperledger/fabric/common/config/channel"
"github.com/hyperledger/fabric/common/configtx"
configtxapi "github.com/hyperledger/fabric/common/configtx/api"
"github.com/hyperledger/fabric/common/crypto"
Expand Down
2 changes: 1 addition & 1 deletion orderer/common/multichannel/registrar.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ package multichannel
import (
"fmt"

"github.com/hyperledger/fabric/common/config"
"github.com/hyperledger/fabric/common/config/channel"
"github.com/hyperledger/fabric/common/configtx"
configtxapi "github.com/hyperledger/fabric/common/configtx/api"
"github.com/hyperledger/fabric/orderer/common/ledger"
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 @@ -19,7 +19,7 @@ package multichannel
import (
"fmt"

"github.com/hyperledger/fabric/common/config"
"github.com/hyperledger/fabric/common/config/channel"
"github.com/hyperledger/fabric/common/configtx"
"github.com/hyperledger/fabric/common/tools/configtxgen/provisional"
"github.com/hyperledger/fabric/orderer/common/blockcutter"
Expand Down
2 changes: 1 addition & 1 deletion orderer/consensus/consensus.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ SPDX-License-Identifier: Apache-2.0
package consensus

import (
"github.com/hyperledger/fabric/common/config"
"github.com/hyperledger/fabric/common/config/channel"
"github.com/hyperledger/fabric/common/crypto"
"github.com/hyperledger/fabric/orderer/common/blockcutter"
"github.com/hyperledger/fabric/orderer/common/msgprocessor"
Expand Down
Loading

0 comments on commit 8dc7883

Please sign in to comment.