Skip to content

Commit

Permalink
Merge pull request hyperledger#1072 from ArtObr/client_deletion
Browse files Browse the repository at this point in the history
Old client's lumps removal
  • Loading branch information
ashcherbakov authored Dec 4, 2018
2 parents 0c3a615 + 8786375 commit 924cc42
Show file tree
Hide file tree
Showing 18 changed files with 15 additions and 185 deletions.
1 change: 0 additions & 1 deletion .flake8
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ exclude =
# have to skip because the file should be fixed
setup.py,
# lots unused import because of fixtures
indy_client/test,
indy_node/test,
# config file
docker-files/indy_config.py
Expand Down
1 change: 0 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ before_install:

install:
- pip install -U -e .
- pip install -U indy-client

script:
- python -m indy_node.test
Expand Down
25 changes: 1 addition & 24 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -27,29 +27,6 @@ def nodeTestUbuntu = {
}
}

def clientTestUbuntu = {
try {
echo 'Ubuntu Test: Checkout csm'
checkout scm

echo 'Ubuntu Test: Build docker image'
def testEnv = dockerHelpers.build(name)

testEnv.inside('--network host') {
echo 'Ubuntu Test: Install dependencies'
testHelpers.install()

echo 'Ubuntu Test: Test'
testHelpers.testRunner([resFile: "test-result-client.${NODE_NAME}.txt", testDir: 'indy_client'])
//testHelpers.testJUnit(resFile: "test-result-client.${NODE_NAME}.xml")
}
}
finally {
echo 'Ubuntu Test: Cleanup'
step([$class: 'WsCleanup'])
}
}

def commonTestUbuntu = {
try {
echo 'Ubuntu Test: Checkout csm'
Expand Down Expand Up @@ -90,4 +67,4 @@ def buildDebUbuntu = { repoName, releaseVersion, sourcePath ->
options = new TestAndPublishOptions()
options.enable([StagesEnum.PACK_RELEASE_COPY, StagesEnum.PACK_RELEASE_COPY_ST])
options.setCopyWithDeps(true)
testAndPublish(name, [ubuntu: [node: nodeTestUbuntu, client: clientTestUbuntu, common: commonTestUbuntu]], true, options, [ubuntu: buildDebUbuntu])
testAndPublish(name, [ubuntu: [node: nodeTestUbuntu, common: commonTestUbuntu]], true, options, [ubuntu: buildDebUbuntu])
6 changes: 1 addition & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
* [How to Contribute](#how-to-contribute)
* [How to Install a Test Network](#how-to-install-a-test-network)
* [How to Start Working with the Code](#how-to-start-working-with-the-code)
* [How to Start Indy Client CLI](#how-to-start-indy-client-cli)
* [Continuous integration and delivery](https://github.com/hyperledger/indy-node/blob/master/docs/ci-cd.md)
* [How to send a PR](#how-to-send-a-pr)
* [Docs and links](#docs-and-links)
Expand Down Expand Up @@ -49,11 +48,8 @@ Indy Node repo consists of the following parts:
- indy-node:
- [indy-plenum](https://github.com/hyperledger/indy-plenum)-based implementation of distributed ledger
- Extends plenum's base pool functionality with specific transactions support (CLAIM_DEF, SCHEMA, POOL_UPGRADE, etc.)
- indy-client
- Contains client and CLI code
- Will be deprecated soon in favor of [indy-sdk](https://github.com/hyperledger/indy-sdk), so please use indy-sdk for your own applications dealing with Indy ecosystem.
- indy-common
- Common code for both indy-node and indy-client parts
- Common code for indy-node
- scripts
- Some scripts that can be run for installed Node (in particular, scripts to start Nodes, generate keys, prepare test Network, etc.)
- doc
Expand Down
16 changes: 0 additions & 16 deletions build-scripts/ubuntu-1604/postinst_node
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,6 @@ GENERAL_CONFIG_DIR="/etc/indy"
GENERAL_DATA_DIR="/var/lib/indy"
GENERAL_LOG_DIR="/var/log/indy"

CLI_BASE_DIR="/home/indy/.indy-cli"
CLI_NETWORKS_DIR="$CLI_BASE_DIR/networks"
CLI_WALLETS_DIR="$CLI_BASE_DIR/wallets"

INSTALL_DIR='/usr/local/lib/python3.5/dist-packages'

NOFILES_SOFT_LIMIT=65536
Expand All @@ -18,11 +14,6 @@ NOFILES_HARD_LIMIT=131072
CLIENT_CONNECTIONS_LIMIT=500


# workaround when .indy become regular file
if [ -f $CLI_BASE_DIR ]; then
rm $CLI_BASE_DIR
fi

# create general indy config folder if does not exist
mkdir -p $GENERAL_CONFIG_DIR
# create general indy data folder if does not exist
Expand All @@ -43,13 +34,6 @@ chmod -R ug+rwx $GENERAL_CONFIG_DIR
chmod -R ug+rwx $GENERAL_DATA_DIR
chmod -R ug+rwx $GENERAL_LOG_DIR

# create indy cli folder if does not exist
mkdir -p $CLI_BASE_DIR
mkdir -p $CLI_NETWORKS_DIR
mkdir -p $CLI_WALLETS_DIR
chown -R indy:indy $CLI_BASE_DIR
chmod -R ug+rwx $CLI_BASE_DIR


# init_indy_node script
cat <<EOF > /usr/local/bin/init_indy_node
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3238,12 +3238,6 @@
"IPaddress": "10.0.0.201"
}
},
// "ClientCodePyPi": {
// "Ubuntu1604": {
// "stable": "indy-client",
// "master": "indy-client-dev"
// }
// },
"RegionBasedData": {
"ap-northeast-1": {
"Ubuntu1604": "ami-aae114cc"
Expand Down
16 changes: 0 additions & 16 deletions environment/openshift/scripts/agent/start.sh

This file was deleted.

14 changes: 0 additions & 14 deletions environment/openshift/scripts/client/start.sh

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -107,4 +107,3 @@ make install
#cd /home/$USER
#echo "Setup and activate a Python virtual environment..."
#virtualenv -p python${PYTHON_MAJOR_VERSION}.${PYTHON_MINOR_VERSION} indy-client
#source ./indy-client/bin/activate
3 changes: 0 additions & 3 deletions indy_common/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,6 @@

GENERAL_CONFIG_DIR = '/etc/indy/'

CLI_BASE_DIR = '~/.indy-cli/'
CLI_NETWORK_DIR = os.path.join(CLI_BASE_DIR, 'networks')

GENERAL_CONFIG_FILE = 'indy_config.py'
NETWORK_CONFIG_FILE = 'indy_config.py'
USER_CONFIG_FILE = 'indy_config.py'
Expand Down
66 changes: 0 additions & 66 deletions indy_common/plugin_helper.py

This file was deleted.

13 changes: 5 additions & 8 deletions indy_common/test/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
from plenum.test.conftest import GENERAL_CONFIG_DIR, \
txnPoolNodesLooper, overriddenConfigValues # noqa


logger = getlogger()


Expand Down Expand Up @@ -74,24 +73,22 @@ def general_conf_tdir_for_func(tdir_for_func):
return general_config_dir


def _tconf(general_config, client_temp_dir):
def _tconf(general_config):
config = getConfig(general_config_dir=general_config)
for k, v in overriddenConfigValues.items():
setattr(config, k, v)
config.MinSepBetweenNodeUpgrades = 5
config.CLI_BASE_DIR = client_temp_dir
config.CLI_NETWORK_DIR = os.path.join(config.CLI_BASE_DIR, 'networks')
return config


@pytest.fixture(scope="module")
def tconf(general_conf_tdir, client_tdir):
return _tconf(general_conf_tdir, client_tdir)
def tconf(general_conf_tdir):
return _tconf(general_conf_tdir)


@pytest.fixture()
def tconf_for_func(general_conf_tdir_for_func, client_tdir):
return _tconf(general_conf_tdir_for_func, client_tdir)
def tconf_for_func(general_conf_tdir_for_func):
return _tconf(general_conf_tdir_for_func)


@pytest.fixture(scope="module")
Expand Down
5 changes: 2 additions & 3 deletions indy_node/test/attrib_txn/test_nym_attrib.py
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ def test_user_add_attrs_for_herself_and_get_it(


@pytest.mark.skip(reason="INDY-896 ATTR cannot be added without dest")
def test_attr_with_no_dest_added(nodeSet, tdirWithClientPoolTxns, looper, attributeData):
def test_attr_with_no_dest_added(nodeSet, looper, attributeData):
pass
# user_wallet = Wallet()
# signer = DidSigner()
Expand Down Expand Up @@ -199,8 +199,7 @@ def testGetTxnsNoSeqNo():

@pytest.mark.skip(reason="SOV-560. Come back to it later since "
"requestPendingTxns move to wallet")
def testGetTxnsSeqNo(nodeSet, tdirWithClientPoolTxns,
trustAnchorWallet, looper):
def testGetTxnsSeqNo(nodeSet, trustAnchorWallet, looper):
pass
"""
Test GET_TXNS from client and provide seqNo to fetch from
Expand Down
4 changes: 2 additions & 2 deletions indy_node/test/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@
strict_types.defaultShouldCheck = True

# noinspection PyUnresolvedReferences
from plenum.test.conftest import tdir, client_tdir, nodeReg, \
from plenum.test.conftest import tdir, nodeReg, \
whitelist, concerningLogLevels, logcapture, \
tdirWithPoolTxns, tdirWithDomainTxns, \
tdirWithClientPoolTxns, txnPoolNodeSet, \
txnPoolNodeSet, \
poolTxnData, dirName, poolTxnNodeNames, allPluginsPath, tdirWithNodeKeepInited, \
poolTxnStewardData, poolTxnStewardNames, getValueFromModule, \
patchPluginManager, txnPoolNodesLooper, warncheck, \
Expand Down
1 change: 0 additions & 1 deletion requirement.txt

This file was deleted.

5 changes: 1 addition & 4 deletions scripts/create_dirs.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env bash

# dirs to be created
node_dirs="/etc/indy /var/lib/indy /var/log/indy /home/${USER}/.indy-cli"
node_dirs="/etc/indy /var/lib/indy /var/log/indy"

# create dirs
for dr in $node_dirs
Expand All @@ -20,9 +20,6 @@ if [ ! -f /etc/indy/indy_config.py ]; then
echo "BACKUP_DIR = '/var/lib/indy/backup'" | sudo tee -a /etc/indy/indy_config.py
echo "PLUGINS_DIR = '/var/lib/indy/plugins'" | sudo tee -a /etc/indy/indy_config.py
echo "NODE_INFO_DIR = '/var/lib/indy'" | sudo tee -a /etc/indy/indy_config.py

echo "CLI_BASE_DIR = '~/.indy-cli/'" | sudo tee -a /etc/indy/indy_config.py
echo "CLI_NETWORK_DIR = '~/.indy-cli/networks'" | sudo tee -a /etc/indy/indy_config.py
fi

# grant permissions
Expand Down
2 changes: 1 addition & 1 deletion scripts/git
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env bash
# set -e

dirs=( "indy-common" "indy-client" "indy-node" "plenum" "anoncreds" "ledger" )
dirs=( "indy-common" "indy-node" "plenum" "anoncreds" "ledger" )

# quiet pushd
pushd() {
Expand Down
15 changes: 2 additions & 13 deletions scripts/read_ledger
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ def read_args():
parser.add_argument('--count', required=False, action='store_true',
help="returns the number of txns in the given ledger")
parser.add_argument('--node_name', required=False, help="Node's name")
parser.add_argument('--client_name', required=False, help="Client's name")
parser.add_argument('--serializer', required=False, default='json',
help="How to represent the data (json by default)")
parser.add_argument('--network', required=False, type=str,
Expand All @@ -55,20 +54,10 @@ def read_args():
return parser.parse_args()


def get_ledger_dir(node_name, client_name, network):
if node_name and client_name:
print("Either 'node_name' or 'client_name' can be specified")
exit()

def get_ledger_dir(node_name, network):
config = getConfig()
_network = network if network else config.NETWORK_NAME
ledger_base_dir = config.LEDGER_DIR
if client_name:
# Build path to data if --client_name was specified
ledger_data_dir = os.path.join(config.CLI_BASE_DIR, _network,
config.clientDataDir, client_name)
return ledger_data_dir

if node_name:
# Build path to data if --node_name was specified
ledger_data_dir = os.path.join(ledger_base_dir, _network, _DATA, node_name)
Expand Down Expand Up @@ -178,7 +167,7 @@ if __name__ == '__main__':
args = read_args()
config = getConfig()

ledger_data_dir = get_ledger_dir(args.node_name, args.client_name, args.network)
ledger_data_dir = get_ledger_dir(args.node_name, args.network)
read_copy_ledger_data_dir = None
try:
# RocksDB supports real read-only mode and does not need to have a ledger copy.
Expand Down

0 comments on commit 924cc42

Please sign in to comment.