-
Notifications
You must be signed in to change notification settings - Fork 86
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
demo-playground: update proposal/vote submission PoC
- Loading branch information
Showing
14 changed files
with
403 additions
and
11 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
#!/bin/sh | ||
|
||
demo-playground/submit-proposal.sh software --app-name '"foo"' --version 1 --system-tag \"linux64\" --installer-hash '0123456789012345678901234567890123456789012345678901234567890123' |
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,17 @@ | ||
#!/usr/bin/env bash | ||
|
||
now=`date "+%Y-%m-%d 00:00:00"` | ||
|
||
ptype=$1 | ||
case ${ptype} in | ||
protocol | software ) ;; | ||
* ) echo "Usage: $0 ( protocol | software ) [PROPOSAL-OPTION..]" >&2; exit 1;; esac | ||
shift | ||
|
||
set -x | ||
cabal new-run demo-playground -- \ | ||
--system-start "$now" \ | ||
propose-$ptype \ | ||
--topology demo-playground/simple-topology.json \ | ||
--node-id 0 \ | ||
$@ |
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,7 @@ | ||
#!/bin/sh | ||
|
||
NODE=${1:-0} | ||
## XXX: invalid upid for testing | ||
UPID=${2:-0001020304050607080910111213141516171819202122232425262728293031} | ||
|
||
$(dirname $0)/submit-vote.sh ${NODE} ${UPID} accept |
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,7 @@ | ||
#!/bin/sh | ||
|
||
NODE=${1:-0} | ||
## XXX: invalid upid for testing | ||
UPID=${2:-0001020304050607080910111213141516171819202122232425262728293031} | ||
|
||
$(dirname $0)/submit-vote.sh ${NODE} ${UPID} reject |
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,19 @@ | ||
#!/bin/sh | ||
|
||
now=`date "+%Y-%m-%d 00:00:00"` | ||
|
||
NODE=$1 | ||
UPID=$2 | ||
VOTE=$3 | ||
case ${VOTE} in | ||
accept | reject ) ;; | ||
* ) echo "Usage: $0 NODEID UPID ( accept | reject )" >&2; exit 1;; esac | ||
|
||
set -x | ||
cabal new-run demo-playground -- \ | ||
--system-start "${now}" \ | ||
vote \ | ||
--topology demo-playground/simple-topology.json \ | ||
--node-id ${NODE} \ | ||
--${VOTE} \ | ||
--proposal-id "\"${UPID}\"" |
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
Oops, something went wrong.