-
Notifications
You must be signed in to change notification settings - Fork 108
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Documentation/helper script changes done in 'origin/develop' deployed…
… to _master
- Loading branch information
Showing
82 changed files
with
1,069 additions
and
106 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
#! /bin/bash | ||
|
||
SCRIPTPATH="$( cd -- "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P )" | ||
echo "$SCRIPTPATH" | ||
|
||
LOG_FILE=run_cli_wallet_img.log | ||
source "$SCRIPTPATH/common.sh" | ||
|
||
log_exec_params "$@" | ||
|
||
print_help () { | ||
echo "Usage: $0 <docker_container_name> [OPTION[=VALUE]]... [<cli_wallet_option>]..." | ||
echo | ||
echo "Allows to start a cli_wallet placed inside started Hive docker container." | ||
echo "OPTIONS:" | ||
echo " --rpc-http-endpoint=<endpoint> Allows to set cli_wallet http endpoint to specified one. This should match to the port specified as cli_wallet port mapping at hived container start (defaults to 8093)" | ||
echo " --rpc-http-allowip=ip_addr Allows to specify the ip allowed to establish connections to the cli_wallet API HTTP server" | ||
echo " --help Display this help screen and exit" | ||
echo | ||
} | ||
|
||
CLI_WALLET_ARGS=() | ||
|
||
CONTAINER_NAME=instance | ||
|
||
add_cli_wallet_arg() { | ||
local arg="$1" | ||
# echo "Processing cli_wallet argument: ${arg}" | ||
|
||
CLI_WALLET_ARGS+=("$arg") | ||
} | ||
|
||
while [ $# -gt 0 ]; do | ||
case "$1" in | ||
--rpc-http-endpoint=*) | ||
arg="${1#*=}" | ||
add_cli_wallet_arg "--daemon" | ||
add_cli_wallet_arg "--rpc-http-endpoint=${arg}" | ||
;; | ||
--rpc-http-allowip=*) | ||
arg="${1#*=}" | ||
add_cli_wallet_arg "--rpc-http-allowip=${arg}" | ||
;; | ||
-d*) | ||
;; # ignore to avoid duplicated option error | ||
--daemon*) | ||
;; # ignore to avoid duplicated option error | ||
|
||
--help) | ||
print_help | ||
exit 0 | ||
;; | ||
-*) | ||
add_cli_wallet_arg "$1" | ||
;; | ||
*) | ||
CONTAINER_NAME="${1}" | ||
echo "Using container instance name: $CONTAINER_NAME" | ||
;; | ||
esac | ||
shift | ||
done | ||
|
||
docker container exec -it ${CONTAINER_NAME} /home/hived/bin/cli_wallet --wallet-file=/home/hived/datadir/wallet.json "${CLI_WALLET_ARGS[@]}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import json | ||
from pathlib import Path | ||
from typing import Any, Dict | ||
|
||
|
||
def read_from_json_pattern(directory: Path, method_name: str) -> Dict[str, Any]: | ||
with open(directory / f'{method_name}.pat.json', 'r') as json_file: | ||
return json.load(json_file) | ||
|
||
|
||
def write_to_json_pattern(directory: Path, method_name: str, json_response) -> None: | ||
directory.mkdir(parents=True, exist_ok=True) | ||
with open(directory / f'{method_name}.pat.json', 'w') as json_file: | ||
json.dump(json_response, json_file) |
File renamed without changes.
Empty file.
Empty file.
Binary file added
BIN
+1.2 KB
...pi_tests/message_format_tests/cli_wallet_tests/output_formatter_tests/block_log/block_log
Binary file not shown.
Oops, something went wrong.