aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorUlas Kozat <ulas.kozat@gmail.com>2016-07-12 14:38:09 -0700
committerUlas Kozat <ulas.kozat@gmail.com>2016-07-12 14:38:09 -0700
commitdd58fcf0591a4859ea5b1ff1232bf14502923c7a (patch)
tree0fbddee181dfbe8dda5af33dd335033449d1c78b
parent2ce4ce233e1f99c0c79eef3ab8df0d237d737b92 (diff)
Update multi node test
Change-Id: I45e743a982526c8f3b2765e4e625aa77f65e86e2 Signed-off-by: Ulas Kozat <ulas.kozat@gmail.com>
-rw-r--r--tests/logdata/client1.log66
-rw-r--r--tests/logdata/server.log90
-rwxr-xr-xtests/run_multinode.sh91
3 files changed, 117 insertions, 130 deletions
diff --git a/tests/logdata/client1.log b/tests/logdata/client1.log
index a696ed1..1486014 100644
--- a/tests/logdata/client1.log
+++ b/tests/logdata/client1.log
@@ -1,33 +1,33 @@
-07/08/2016 02:50:33 PM Domino Client Starting...
-07/08/2016 02:50:33 PM 1 Sending Registration
-07/08/2016 02:50:33 PM Registration Response: Response Code: 1
-07/08/2016 02:50:33 PM CLI Service is starting
-07/08/2016 02:50:33 PM RPC service for CLI is starting...
-07/08/2016 02:50:35 PM Received CLI ['heartbeat']
-07/08/2016 02:50:35 PM 12467 Sending heartbeat
-07/08/2016 02:50:35 PM heart beat received from: 0 ,sequence number: 2
-07/08/2016 02:50:36 PM Received CLI ['subscribe', '-t', 'hot', '-l', 'tosca.policies.Placement:properties:region:nova-1']
-07/08/2016 02:50:36 PM subscribing labels ['tosca.policies.Placement:properties:region:nova-1'] and templates ['hot']
-07/08/2016 02:50:36 PM Subscribe Response is received from: 0 ,sequence number: 3
-07/08/2016 02:50:37 PM Received CLI ['subscribe', '-t', 'dummy1,dummy2', '--top', 'OVERWRITE']
-07/08/2016 02:50:37 PM subscribing labels [] and templates ['dummy1', 'dummy2']
-07/08/2016 02:50:37 PM Subscribe Response is received from: 0 ,sequence number: 4
-07/08/2016 02:50:38 PM Received CLI ['subscribe', '-t', 'dummy1,dummy2', '--top', 'DELETE']
-07/08/2016 02:50:38 PM subscribing labels [] and templates ['dummy1', 'dummy2']
-07/08/2016 02:50:38 PM Subscribe Response is received from: 0 ,sequence number: 5
-07/08/2016 02:50:39 PM Received CLI ['subscribe', '-l', 'tosca.policies.Placement:properties:region:nova-2']
-07/08/2016 02:50:39 PM subscribing labels ['tosca.policies.Placement:properties:region:nova-2'] and templates []
-07/08/2016 02:50:39 PM Subscribe Response is received from: 0 ,sequence number: 6
-07/08/2016 02:50:40 PM Received CLI ['subscribe', '-l', 'tosca.policies.Placement:properties:region:nova-3', '--lop', 'OVERWRITE']
-07/08/2016 02:50:40 PM subscribing labels ['tosca.policies.Placement:properties:region:nova-3'] and templates []
-07/08/2016 02:50:40 PM Subscribe Response is received from: 0 ,sequence number: 7
-07/08/2016 02:50:41 PM Received CLI ['subscribe', '-l', 'tosca.policies.Placement:properties:region:nova-3', '--lop', 'DELETE']
-07/08/2016 02:50:41 PM subscribing labels ['tosca.policies.Placement:properties:region:nova-3'] and templates []
-07/08/2016 02:50:41 PM Subscribe Response is received from: 0 ,sequence number: 8
-07/08/2016 02:50:43 PM Received CLI ['publish', '-t', './tosca-templates/tosca_helloworld_nfv.yaml']
-07/08/2016 02:50:43 PM Publishing the template file: ./tosca-templates/tosca_helloworld_nfv.yaml
-07/08/2016 02:50:43 PM Publish Response is received from: 0 ,sequence number: 9 Op. Status: 2
-07/08/2016 02:50:44 PM Received CLI ['subscribe', '-l', 'tosca.policies.Placement.Geolocation:properties:region:us-west-1']
-07/08/2016 02:50:44 PM subscribing labels ['tosca.policies.Placement.Geolocation:properties:region:us-west-1'] and templates []
-07/08/2016 02:50:44 PM Subscribe Response is received from: 0 ,sequence number: 10
-07/08/2016 02:50:45 PM 12467 Received Template File
+07/12/2016 11:15:17 AM Domino Client Starting...
+07/12/2016 11:15:17 AM 1 Sending Registration
+07/12/2016 11:15:17 AM Registration Response: Response Code: 1
+07/12/2016 11:15:17 AM CLI Service is starting
+07/12/2016 11:15:17 AM RPC service for CLI is starting...
+07/12/2016 11:15:19 AM Received CLI ['heartbeat']
+07/12/2016 11:15:19 AM 12467 Sending heartbeat
+07/12/2016 11:15:19 AM heart beat received from: 0 ,sequence number: 2
+07/12/2016 11:15:20 AM Received CLI ['subscribe', '-t', 'hot', '-l', 'tosca.policies.Placement:properties:region:nova-1']
+07/12/2016 11:15:20 AM subscribing labels ['tosca.policies.Placement:properties:region:nova-1'] and templates ['hot']
+07/12/2016 11:15:20 AM Subscribe Response is received from: 0 ,sequence number: 3
+07/12/2016 11:15:21 AM Received CLI ['subscribe', '-t', 'dummy1,dummy2', '--top', 'OVERWRITE']
+07/12/2016 11:15:21 AM subscribing labels [] and templates ['dummy1', 'dummy2']
+07/12/2016 11:15:21 AM Subscribe Response is received from: 0 ,sequence number: 4
+07/12/2016 11:15:22 AM Received CLI ['subscribe', '-t', 'dummy1,dummy2', '--top', 'DELETE']
+07/12/2016 11:15:22 AM subscribing labels [] and templates ['dummy1', 'dummy2']
+07/12/2016 11:15:22 AM Subscribe Response is received from: 0 ,sequence number: 5
+07/12/2016 11:15:23 AM Received CLI ['subscribe', '-l', 'tosca.policies.Placement:properties:region:nova-2']
+07/12/2016 11:15:23 AM subscribing labels ['tosca.policies.Placement:properties:region:nova-2'] and templates []
+07/12/2016 11:15:23 AM Subscribe Response is received from: 0 ,sequence number: 6
+07/12/2016 11:15:24 AM Received CLI ['subscribe', '-l', 'tosca.policies.Placement:properties:region:nova-3', '--lop', 'OVERWRITE']
+07/12/2016 11:15:24 AM subscribing labels ['tosca.policies.Placement:properties:region:nova-3'] and templates []
+07/12/2016 11:15:24 AM Subscribe Response is received from: 0 ,sequence number: 7
+07/12/2016 11:15:25 AM Received CLI ['subscribe', '-l', 'tosca.policies.Placement:properties:region:nova-3', '--lop', 'DELETE']
+07/12/2016 11:15:25 AM subscribing labels ['tosca.policies.Placement:properties:region:nova-3'] and templates []
+07/12/2016 11:15:25 AM Subscribe Response is received from: 0 ,sequence number: 8
+07/12/2016 11:15:26 AM Received CLI ['publish', '-t', './tosca-templates/tosca_helloworld_nfv.yaml']
+07/12/2016 11:15:26 AM Publishing the template file: ./tosca-templates/tosca_helloworld_nfv.yaml
+07/12/2016 11:15:26 AM Publish Response is received from: 0 ,sequence number: 9 Op. Status: 2
+07/12/2016 11:15:27 AM Received CLI ['subscribe', '-l', 'tosca.policies.Placement.Geolocation:properties:region:us-west-1']
+07/12/2016 11:15:27 AM subscribing labels ['tosca.policies.Placement.Geolocation:properties:region:us-west-1'] and templates []
+07/12/2016 11:15:27 AM Subscribe Response is received from: 0 ,sequence number: 10
+07/12/2016 11:15:28 AM 12467 Received Template File
diff --git a/tests/logdata/server.log b/tests/logdata/server.log
index cd73717..96c2865 100644
--- a/tests/logdata/server.log
+++ b/tests/logdata/server.log
@@ -1,45 +1,45 @@
-07/08/2016 02:50:32 PM Domino Server Starting...
-07/08/2016 02:50:33 PM Registration Request received for UDID 12467 from IP: 192.168.254.12 port: 9091
-07/08/2016 02:50:34 PM Registration Request received for UDID 12467 from IP: 192.168.254.12 port: 9092
-07/08/2016 02:50:35 PM heartbeat received from 12467
-07/08/2016 02:50:36 PM Subscribe Request received from 12467
-07/08/2016 02:50:36 PM APPENDING Labels...
-07/08/2016 02:50:36 PM Supported Template: set(['hot']) Supported Labels: set(['tosca.policies.Placement:properties:region:nova-1'])
-07/08/2016 02:50:37 PM Subscribe Request received from 12467
-07/08/2016 02:50:37 PM APPENDING Labels...
-07/08/2016 02:50:37 PM Supported Template: set(['dummy2', 'dummy1']) Supported Labels: set(['tosca.policies.Placement:properties:region:nova-1'])
-07/08/2016 02:50:38 PM Subscribe Request received from 12467
-07/08/2016 02:50:38 PM APPENDING Labels...
-07/08/2016 02:50:38 PM Supported Template: set([]) Supported Labels: set(['tosca.policies.Placement:properties:region:nova-1'])
-07/08/2016 02:50:39 PM Subscribe Request received from 12467
-07/08/2016 02:50:39 PM APPENDING Labels...
-07/08/2016 02:50:39 PM Supported Template: set([]) Supported Labels: set(['tosca.policies.Placement:properties:region:nova-2', 'tosca.policies.Placement:properties:region:nova-1'])
-07/08/2016 02:50:40 PM Subscribe Request received from 12467
-07/08/2016 02:50:40 PM OVERWRITING Labels...
-07/08/2016 02:50:40 PM Supported Template: set([]) Supported Labels: set(['tosca.policies.Placement:properties:region:nova-3'])
-07/08/2016 02:50:41 PM Subscribe Request received from 12467
-07/08/2016 02:50:41 PM DELETING Labels...
-07/08/2016 02:50:41 PM Supported Template: set([]) Supported Labels: set([])
-07/08/2016 02:50:43 PM Publish Request received from 12467
-07/08/2016 02:50:43 PM ['tosca_definitions_version: tosca_simple_profile_for_nfv_1_0_0', '', 'description: Template for deploying a single server with predefined properties.', '', 'metadata:', ' template_name: TOSCA NFV Sample Template', '', 'policy_types:', ' tosca.policies.Placement.Geolocation:', ' description: Geolocation policy', ' derived_from: tosca.policies.Placement', '', 'topology_template:', ' node_templates:', ' VNF1:', ' type: tosca.nodes.nfv.VNF', ' properties:', ' id: vnf1', ' vendor: acmetelco', ' version: 1.0', '', ' VNF2:', ' type: tosca.nodes.nfv.VNF', ' properties:', ' id: vnf2', ' vendor: ericsson', ' version: 1.0', '', ' VNF3:', ' type: tosca.nodes.nfv.VNF', ' properties:', ' id: vnf3', ' vendor: huawei', ' version: 1.0', '', ' policies:', ' - rule1:', ' type: tosca.policies.Placement.Geolocation', ' targets: [ VNF1 ]', ' properties:', ' region: [ us-west-1 ]', ' - rule2:', ' type: tosca.policies.Placement.Geolocation', ' targets: [ VNF2, VNF3 ]', ' properties:', ' region: [ us-west-1 , us-west-2 ]']
-07/08/2016 02:50:43 PM nfv
-07/08/2016 02:50:43 PM nfv.py
-07/08/2016 02:50:43 PM The input "./toscafiles/template1.yaml" successfully passed validation.
-07/08/2016 02:50:43 PM Node Labels: {'VNF2': set(['tosca.policies.Placement.Geolocation:properties:region:us-west-1', 'tosca.policies.Placement.Geolocation:properties:region:us-west-2']), 'VNF3': set(['tosca.policies.Placement.Geolocation:properties:region:us-west-1', 'tosca.policies.Placement.Geolocation:properties:region:us-west-2']), 'VNF1': set(['tosca.policies.Placement.Geolocation:properties:region:us-west-1'])}
-07/08/2016 02:50:43 PM Site Maps: {'VNF2': set([]), 'VNF3': set([]), 'VNF1': set([])}
-07/08/2016 02:50:43 PM Selected Sites: {'VNF2': [], 'VNF3': [], 'VNF1': []}
-07/08/2016 02:50:43 PM Per domain file paths: {}
-07/08/2016 02:50:44 PM Subscribe Request received from 12467
-07/08/2016 02:50:44 PM APPENDING Labels...
-07/08/2016 02:50:44 PM Supported Template: set([]) Supported Labels: set(['tosca.policies.Placement.Geolocation:properties:region:us-west-1'])
-07/08/2016 02:50:45 PM Publish Request received from 1838360232553687883
-07/08/2016 02:50:45 PM ['tosca_definitions_version: tosca_simple_profile_for_nfv_1_0_0', '', 'description: Template for deploying a single server with predefined properties.', '', 'metadata:', ' template_name: TOSCA NFV Sample Template', '', 'policy_types:', ' tosca.policies.Placement.Geolocation:', ' description: Geolocation policy', ' derived_from: tosca.policies.Placement', '', 'topology_template:', ' node_templates:', ' VNF1:', ' type: tosca.nodes.nfv.VNF', ' properties:', ' id: vnf1', ' vendor: acmetelco', ' version: 1.0', '', ' VNF2:', ' type: tosca.nodes.nfv.VNF', ' properties:', ' id: vnf2', ' vendor: ericsson', ' version: 1.0', '', ' VNF3:', ' type: tosca.nodes.nfv.VNF', ' properties:', ' id: vnf3', ' vendor: huawei', ' version: 1.0', '', ' policies:', ' - rule1:', ' type: tosca.policies.Placement.Geolocation', ' targets: [ VNF1 ]', ' properties:', ' region: [ us-west-1 ]', ' - rule2:', ' type: tosca.policies.Placement.Geolocation', ' targets: [ VNF2, VNF3 ]', ' properties:', ' region: [ us-west-1 , us-west-2 ]']
-07/08/2016 02:50:45 PM ERRNO 17; ./toscafiles/ exists. Creating: ./toscafiles/template1.yaml
-07/08/2016 02:50:45 PM nfv
-07/08/2016 02:50:45 PM nfv.py
-07/08/2016 02:50:45 PM The input "./toscafiles/template1.yaml" successfully passed validation.
-07/08/2016 02:50:45 PM Node Labels: {'VNF2': set(['tosca.policies.Placement.Geolocation:properties:region:us-west-1', 'tosca.policies.Placement.Geolocation:properties:region:us-west-2']), 'VNF3': set(['tosca.policies.Placement.Geolocation:properties:region:us-west-1', 'tosca.policies.Placement.Geolocation:properties:region:us-west-2']), 'VNF1': set(['tosca.policies.Placement.Geolocation:properties:region:us-west-1'])}
-07/08/2016 02:50:45 PM Site Maps: {'VNF2': set([]), 'VNF3': set([]), 'VNF1': set([12467])}
-07/08/2016 02:50:45 PM Selected Sites: {'VNF2': [], 'VNF3': [], 'VNF1': 12467}
-07/08/2016 02:50:45 PM Per domain file paths: {12467: './toscafiles/template_part12467.yaml'}
-07/08/2016 02:50:45 PM Push Response received from 12467
+07/12/2016 11:15:16 AM Domino Server Starting...
+07/12/2016 11:15:17 AM Registration Request received for UDID 12467 from IP: 192.168.254.12 port: 9091
+07/12/2016 11:15:18 AM Registration Request received for UDID 12467 from IP: 192.168.254.12 port: 9092
+07/12/2016 11:15:19 AM heartbeat received from 12467
+07/12/2016 11:15:20 AM Subscribe Request received from 12467
+07/12/2016 11:15:20 AM APPENDING Labels...
+07/12/2016 11:15:20 AM Supported Template: set(['hot']) Supported Labels: set(['tosca.policies.Placement:properties:region:nova-1'])
+07/12/2016 11:15:21 AM Subscribe Request received from 12467
+07/12/2016 11:15:21 AM APPENDING Labels...
+07/12/2016 11:15:21 AM Supported Template: set(['dummy2', 'dummy1']) Supported Labels: set(['tosca.policies.Placement:properties:region:nova-1'])
+07/12/2016 11:15:22 AM Subscribe Request received from 12467
+07/12/2016 11:15:22 AM APPENDING Labels...
+07/12/2016 11:15:22 AM Supported Template: set([]) Supported Labels: set(['tosca.policies.Placement:properties:region:nova-1'])
+07/12/2016 11:15:23 AM Subscribe Request received from 12467
+07/12/2016 11:15:23 AM APPENDING Labels...
+07/12/2016 11:15:23 AM Supported Template: set([]) Supported Labels: set(['tosca.policies.Placement:properties:region:nova-2', 'tosca.policies.Placement:properties:region:nova-1'])
+07/12/2016 11:15:24 AM Subscribe Request received from 12467
+07/12/2016 11:15:24 AM OVERWRITING Labels...
+07/12/2016 11:15:24 AM Supported Template: set([]) Supported Labels: set(['tosca.policies.Placement:properties:region:nova-3'])
+07/12/2016 11:15:25 AM Subscribe Request received from 12467
+07/12/2016 11:15:25 AM DELETING Labels...
+07/12/2016 11:15:25 AM Supported Template: set([]) Supported Labels: set([])
+07/12/2016 11:15:26 AM Publish Request received from 12467
+07/12/2016 11:15:26 AM ['tosca_definitions_version: tosca_simple_profile_for_nfv_1_0_0', '', 'description: Template for deploying a single server with predefined properties.', '', 'metadata:', ' template_name: TOSCA NFV Sample Template', '', 'policy_types:', ' tosca.policies.Placement.Geolocation:', ' description: Geolocation policy', ' derived_from: tosca.policies.Placement', '', 'topology_template:', ' node_templates:', ' VNF1:', ' type: tosca.nodes.nfv.VNF', ' properties:', ' id: vnf1', ' vendor: acmetelco', ' version: 1.0', '', ' VNF2:', ' type: tosca.nodes.nfv.VNF', ' properties:', ' id: vnf2', ' vendor: ericsson', ' version: 1.0', '', ' VNF3:', ' type: tosca.nodes.nfv.VNF', ' properties:', ' id: vnf3', ' vendor: huawei', ' version: 1.0', '', ' policies:', ' - rule1:', ' type: tosca.policies.Placement.Geolocation', ' targets: [ VNF1 ]', ' properties:', ' region: [ us-west-1 ]', ' - rule2:', ' type: tosca.policies.Placement.Geolocation', ' targets: [ VNF2, VNF3 ]', ' properties:', ' region: [ us-west-1 , us-west-2 ]']
+07/12/2016 11:15:26 AM nfv
+07/12/2016 11:15:26 AM nfv.py
+07/12/2016 11:15:26 AM The input "./toscafiles/template1.yaml" successfully passed validation.
+07/12/2016 11:15:26 AM Node Labels: {'VNF2': set(['tosca.policies.Placement.Geolocation:properties:region:us-west-1', 'tosca.policies.Placement.Geolocation:properties:region:us-west-2']), 'VNF3': set(['tosca.policies.Placement.Geolocation:properties:region:us-west-1', 'tosca.policies.Placement.Geolocation:properties:region:us-west-2']), 'VNF1': set(['tosca.policies.Placement.Geolocation:properties:region:us-west-1'])}
+07/12/2016 11:15:26 AM Site Maps: {'VNF2': set([]), 'VNF3': set([]), 'VNF1': set([])}
+07/12/2016 11:15:26 AM Selected Sites: {'VNF2': [], 'VNF3': [], 'VNF1': []}
+07/12/2016 11:15:26 AM Per domain file paths: {}
+07/12/2016 11:15:27 AM Subscribe Request received from 12467
+07/12/2016 11:15:27 AM APPENDING Labels...
+07/12/2016 11:15:27 AM Supported Template: set([]) Supported Labels: set(['tosca.policies.Placement.Geolocation:properties:region:us-west-1'])
+07/12/2016 11:15:28 AM Publish Request received from 2672199677499651640
+07/12/2016 11:15:28 AM ['tosca_definitions_version: tosca_simple_profile_for_nfv_1_0_0', '', 'description: Template for deploying a single server with predefined properties.', '', 'metadata:', ' template_name: TOSCA NFV Sample Template', '', 'policy_types:', ' tosca.policies.Placement.Geolocation:', ' description: Geolocation policy', ' derived_from: tosca.policies.Placement', '', 'topology_template:', ' node_templates:', ' VNF1:', ' type: tosca.nodes.nfv.VNF', ' properties:', ' id: vnf1', ' vendor: acmetelco', ' version: 1.0', '', ' VNF2:', ' type: tosca.nodes.nfv.VNF', ' properties:', ' id: vnf2', ' vendor: ericsson', ' version: 1.0', '', ' VNF3:', ' type: tosca.nodes.nfv.VNF', ' properties:', ' id: vnf3', ' vendor: huawei', ' version: 1.0', '', ' policies:', ' - rule1:', ' type: tosca.policies.Placement.Geolocation', ' targets: [ VNF1 ]', ' properties:', ' region: [ us-west-1 ]', ' - rule2:', ' type: tosca.policies.Placement.Geolocation', ' targets: [ VNF2, VNF3 ]', ' properties:', ' region: [ us-west-1 , us-west-2 ]']
+07/12/2016 11:15:28 AM ERRNO 17; ./toscafiles/ exists. Creating: ./toscafiles/template1.yaml
+07/12/2016 11:15:28 AM nfv
+07/12/2016 11:15:28 AM nfv.py
+07/12/2016 11:15:28 AM The input "./toscafiles/template1.yaml" successfully passed validation.
+07/12/2016 11:15:28 AM Node Labels: {'VNF2': set(['tosca.policies.Placement.Geolocation:properties:region:us-west-1', 'tosca.policies.Placement.Geolocation:properties:region:us-west-2']), 'VNF3': set(['tosca.policies.Placement.Geolocation:properties:region:us-west-1', 'tosca.policies.Placement.Geolocation:properties:region:us-west-2']), 'VNF1': set(['tosca.policies.Placement.Geolocation:properties:region:us-west-1'])}
+07/12/2016 11:15:28 AM Site Maps: {'VNF2': set([]), 'VNF3': set([]), 'VNF1': set([12467])}
+07/12/2016 11:15:28 AM Selected Sites: {'VNF2': [], 'VNF3': [], 'VNF1': 12467}
+07/12/2016 11:15:28 AM Per domain file paths: {12467: './toscafiles/template_part12467.yaml'}
+07/12/2016 11:15:28 AM Push Response received from 12467
diff --git a/tests/run_multinode.sh b/tests/run_multinode.sh
index 4647899..e401c1d 100755
--- a/tests/run_multinode.sh
+++ b/tests/run_multinode.sh
@@ -12,7 +12,7 @@
# limitations under the License.
USERNAME=ubuntu
-SSH_KEY_PATH=/home/opnfv/.ssh/id_rsa
+SSH_KEY_PATH=/home/opnfv/repos/domino/tests/testkeys/id_rsa
DOMINO_CODE_PATH=/home/opnfv/repos/domino
CONTROLLER_NODE_1=192.168.2.165
CONTROLLER_NODE_2=192.168.2.180
@@ -30,56 +30,57 @@ test1_reffile2=./tests/refdata/test1_client2.ref
client1_log=./tests/logdata/client1.log
client2_log=./tests/logdata/client2.log
server_log=./tests/logdata/server.log
+ssh_opts="-o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no"
install_dependency() {
- ssh -i "$SSH_KEY_PATH" "$USERNAME"@"$CONTROLLER_NODE_1" 'sudo pip install tosca-parser'
- ssh -i "$SSH_KEY_PATH" "$USERNAME"@"$CONTROLLER_NODE_1" 'sudo pip install heat-translator'
- ssh -i "$SSH_KEY_PATH" "$USERNAME"@"$CONTROLLER_NODE_2" 'sudo pip install tosca-parser'
- ssh -i "$SSH_KEY_PATH" "$USERNAME"@"$CONTROLLER_NODE_2" 'sudo pip install heat-translator'
- ssh -i "$SSH_KEY_PATH" "$USERNAME"@"$CONTROLLER_NODE_3" 'sudo pip install tosca-parser'
- ssh -i "$SSH_KEY_PATH" "$USERNAME"@"$CONTROLLER_NODE_3" 'sudo pip install heat-translator'
+ ssh $ssh_opts -i "$SSH_KEY_PATH" "$USERNAME"@"$CONTROLLER_NODE_1" 'sudo pip install tosca-parser'
+ ssh $ssh_opts -i "$SSH_KEY_PATH" "$USERNAME"@"$CONTROLLER_NODE_1" 'sudo pip install heat-translator'
+ ssh $ssh_opts -i "$SSH_KEY_PATH" "$USERNAME"@"$CONTROLLER_NODE_2" 'sudo pip install tosca-parser'
+ ssh $ssh_opts -i "$SSH_KEY_PATH" "$USERNAME"@"$CONTROLLER_NODE_2" 'sudo pip install heat-translator'
+ ssh $ssh_opts -i "$SSH_KEY_PATH" "$USERNAME"@"$CONTROLLER_NODE_3" 'sudo pip install tosca-parser'
+ ssh $ssh_opts -i "$SSH_KEY_PATH" "$USERNAME"@"$CONTROLLER_NODE_3" 'sudo pip install heat-translator'
}
remove_codes(){
- ssh -i "$SSH_KEY_PATH" "$USERNAME"@"$CONTROLLER_NODE_1" 'rm -rf domino'
- ssh -i "$SSH_KEY_PATH" "$USERNAME"@"$CONTROLLER_NODE_2" 'rm -rf domino'
- ssh -i "$SSH_KEY_PATH" "$USERNAME"@"$CONTROLLER_NODE_3" 'rm -rf domino'
+ ssh $ssh_opts -i "$SSH_KEY_PATH" "$USERNAME"@"$CONTROLLER_NODE_1" 'rm -rf domino'
+ ssh $ssh_opts -i "$SSH_KEY_PATH" "$USERNAME"@"$CONTROLLER_NODE_2" 'rm -rf domino'
+ ssh $ssh_opts -i "$SSH_KEY_PATH" "$USERNAME"@"$CONTROLLER_NODE_3" 'rm -rf domino'
}
deploy_codes(){
- scp -i "$SSH_KEY_PATH" -r "$DOMINO_CODE_PATH" "$USERNAME"@"$CONTROLLER_NODE_1":.
- scp -i "$SSH_KEY_PATH" -r "$DOMINO_CODE_PATH" "$USERNAME"@"$CONTROLLER_NODE_2":.
- scp -i "$SSH_KEY_PATH" -r "$DOMINO_CODE_PATH" "$USERNAME"@"$CONTROLLER_NODE_3":.
+ scp $ssh_opts -i "$SSH_KEY_PATH" -r "$DOMINO_CODE_PATH" "$USERNAME"@"$CONTROLLER_NODE_1":.
+ scp $ssh_opts -i "$SSH_KEY_PATH" -r "$DOMINO_CODE_PATH" "$USERNAME"@"$CONTROLLER_NODE_2":.
+ scp $ssh_opts -i "$SSH_KEY_PATH" -r "$DOMINO_CODE_PATH" "$USERNAME"@"$CONTROLLER_NODE_3":.
}
start_server() {
- ssh -i "$SSH_KEY_PATH" "$USERNAME"@"$CONTROLLER_NODE_1" 'pgrep -f "python DominoServer.py"' && return 0
- ssh -f -i "$SSH_KEY_PATH" "$USERNAME"@"$CONTROLLER_NODE_1" "sh -c 'cd ./domino; nohup python DominoServer.py --log "$LOGLEVEL" > "$server_log" > /dev/null 2>&1 &'"
+ ssh $ssh_opts -i "$SSH_KEY_PATH" "$USERNAME"@"$CONTROLLER_NODE_1" 'pgrep -f "python DominoServer.py"' && return 0
+ ssh $ssh_opts -f -i "$SSH_KEY_PATH" "$USERNAME"@"$CONTROLLER_NODE_1" "sh -c 'cd ./domino; nohup python DominoServer.py --log "$LOGLEVEL" > "$server_log" > /dev/null 2>&1 &'"
}
start_client1() {
- ssh -i "$SSH_KEY_PATH" "$USERNAME"@"$CONTROLLER_NODE_2" 'pgrep -f "python DominoClient.py"' && return 0
- ssh -f -i "$SSH_KEY_PATH" "$USERNAME"@"$CONTROLLER_NODE_2" "sh -c 'cd ./domino; nohup python DominoClient.py -p $CLIENT1_PORT --cliport $CLIENT1_CLIPORT --ipaddr $CONTROLLER_NODE_1 --log "$LOGLEVEL" > "$client1_log" > /dev/null 2>&1 &'"
+ ssh $ssh_opts -i "$SSH_KEY_PATH" "$USERNAME"@"$CONTROLLER_NODE_2" 'pgrep -f "python DominoClient.py"' && return 0
+ ssh $ssh_opts -f -i "$SSH_KEY_PATH" "$USERNAME"@"$CONTROLLER_NODE_2" "sh -c 'cd ./domino; nohup python DominoClient.py -p $CLIENT1_PORT --cliport $CLIENT1_CLIPORT --ipaddr $CONTROLLER_NODE_1 --log "$LOGLEVEL" > "$client1_log" > /dev/null 2>&1 &'"
}
start_client2() {
- ssh -i "$SSH_KEY_PATH" "$USERNAME"@"$CONTROLLER_NODE_3" 'pgrep -f "python DominoClient.py"' && return 0
- ssh -f -i "$SSH_KEY_PATH" "$USERNAME"@"$CONTROLLER_NODE_3" "sh -c 'cd ./domino; nohup python DominoClient.py -p $CLIENT2_PORT --cliport $CLIENT2_CLIPORT --ipaddr $CONTROLLER_NODE_1 --log "$LOGLEVEL" > "$client2_log" > /dev/null 2>&1 &'"
+ ssh $ssh_opts -i "$SSH_KEY_PATH" "$USERNAME"@"$CONTROLLER_NODE_3" 'pgrep -f "python DominoClient.py"' && return 0
+ ssh $ssh_opts -f -i "$SSH_KEY_PATH" "$USERNAME"@"$CONTROLLER_NODE_3" "sh -c 'cd ./domino; nohup python DominoClient.py -p $CLIENT2_PORT --cliport $CLIENT2_CLIPORT --ipaddr $CONTROLLER_NODE_1 --log "$LOGLEVEL" > "$client2_log" > /dev/null 2>&1 &'"
}
stop_server() {
- ssh -i "$SSH_KEY_PATH" "$USERNAME"@"$CONTROLLER_NODE_1" 'pgrep -f "python DominoServer.py"' || return 0
- ssh -i "$SSH_KEY_PATH" "$USERNAME"@"$CONTROLLER_NODE_1" 'kill $(pgrep -f "python DominoServer.py")'
+ ssh $ssh_opts -i "$SSH_KEY_PATH" "$USERNAME"@"$CONTROLLER_NODE_1" 'pgrep -f "python DominoServer.py"' || return 0
+ ssh $ssh_opts -i "$SSH_KEY_PATH" "$USERNAME"@"$CONTROLLER_NODE_1" 'kill $(pgrep -f "python DominoServer.py")'
}
stop_client1() {
- ssh -i "$SSH_KEY_PATH" "$USERNAME"@"$CONTROLLER_NODE_2" 'pgrep -f "python DominoClient.py"' || return 0
- ssh -i "$SSH_KEY_PATH" "$USERNAME"@"$CONTROLLER_NODE_2" 'kill $(pgrep -f "python DominoClient.py")'
+ ssh $ssh_opts -i "$SSH_KEY_PATH" "$USERNAME"@"$CONTROLLER_NODE_2" 'pgrep -f "python DominoClient.py"' || return 0
+ ssh $ssh_opts -i "$SSH_KEY_PATH" "$USERNAME"@"$CONTROLLER_NODE_2" 'kill $(pgrep -f "python DominoClient.py")'
}
stop_client2() {
- ssh -i "$SSH_KEY_PATH" "$USERNAME"@"$CONTROLLER_NODE_3" 'pgrep -f "python DominoClient.py"' || return 0
- ssh -i "$SSH_KEY_PATH" "$USERNAME"@"$CONTROLLER_NODE_3" 'kill $(pgrep -f "python DominoClient.py")'
+ ssh $ssh_opts -i "$SSH_KEY_PATH" "$USERNAME"@"$CONTROLLER_NODE_3" 'pgrep -f "python DominoClient.py"' || return 0
+ ssh $ssh_opts -i "$SSH_KEY_PATH" "$USERNAME"@"$CONTROLLER_NODE_3" 'kill $(pgrep -f "python DominoClient.py")'
}
cleanup() {
@@ -88,7 +89,9 @@ cleanup() {
echo "Stopping Domino Clients..."
stop_client1
+ sleep 1
stop_client2
+ sleep 1
echo "Stopping Domino Server..."
stop_server
@@ -96,6 +99,7 @@ cleanup() {
}
prepare_testenv() {
+ chmod 600 "$SSH_KEY_PATH"
install_dependency
remove_codes
deploy_codes
@@ -123,47 +127,30 @@ launch_domino
echo "Test Heartbeat"
-ssh -i "$SSH_KEY_PATH" "$USERNAME"@"$CONTROLLER_NODE_1" \
- 'python domino-cli.py $CLIENT1_CLIPORT heartbeat'
+ssh $ssh_opts -i "$SSH_KEY_PATH" "$USERNAME"@"$CONTROLLER_NODE_2" "sh -c 'cd domino; python domino-cli.py $CLIENT1_CLIPORT heartbeat'"
sleep 1
echo "Test Subscribe API"
-ssh -i "$SSH_KEY_PATH" "$USERNAME"@"$CONTROLLER_NODE_1" \
- 'python domino-cli.py $CLIENT1_CLIPORT subscribe -t hot \
- -l tosca.policies.Placement:properties:region:nova-1'
+ssh $ssh_opts -i "$SSH_KEY_PATH" "$USERNAME"@"$CONTROLLER_NODE_2" "sh -c 'cd domino; python domino-cli.py $CLIENT1_CLIPORT subscribe -t hot -l tosca.policies.Placement:properties:region:nova-1'"
sleep 1
-ssh -i "$SSH_KEY_PATH" "$USERNAME"@"$CONTROLLER_NODE_1" \
- 'python domino-cli.py $CLIENT1_CLIPORT subscribe -t dummy1,dummy2 --top OVERWRITE'
+ssh $ssh_opts -i "$SSH_KEY_PATH" "$USERNAME"@"$CONTROLLER_NODE_2" "sh -c 'cd domino; python domino-cli.py $CLIENT1_CLIPORT subscribe -t dummy1,dummy2 --top OVERWRITE'"
sleep 1
-ssh -i "$SSH_KEY_PATH" "$USERNAME"@"$CONTROLLER_NODE_1" \
- 'python domino-cli.py $CLIENT1_CLIPORT subscribe -t dummy1,dummy2 --top DELETE'
+ssh $ssh_opts -i "$SSH_KEY_PATH" "$USERNAME"@"$CONTROLLER_NODE_2" "sh -c 'cd domino; python domino-cli.py $CLIENT1_CLIPORT subscribe -t dummy1,dummy2 --top DELETE'"
sleep 1
-ssh -i "$SSH_KEY_PATH" "$USERNAME"@"$CONTROLLER_NODE_1" \
- 'python domino-cli.py $CLIENT1_CLIPORT subscribe \
- -l tosca.policies.Placement:properties:region:nova-2'
+ssh $ssh_opts -i "$SSH_KEY_PATH" "$USERNAME"@"$CONTROLLER_NODE_2" "sh -c 'cd domino; python domino-cli.py $CLIENT1_CLIPORT subscribe -l tosca.policies.Placement:properties:region:nova-2'"
sleep 1
-ssh -i "$SSH_KEY_PATH" "$USERNAME"@"$CONTROLLER_NODE_1" \
- 'python domino-cli.py $CLIENT1_CLIPORT subscribe \
- -l tosca.policies.Placement:properties:region:nova-3 \
- --lop OVERWRITE'
+ssh $ssh_opts -i "$SSH_KEY_PATH" "$USERNAME"@"$CONTROLLER_NODE_2" "sh -c 'cd domino; python domino-cli.py $CLIENT1_CLIPORT subscribe -l tosca.policies.Placement:properties:region:nova-3 --lop OVERWRITE'"
sleep 1
-ssh -i "$SSH_KEY_PATH" "$USERNAME"@"$CONTROLLER_NODE_1" \
- 'python domino-cli.py $CLIENT1_CLIPORT subscribe \
- -l tosca.policies.Placement:properties:region:nova-3 \
- --lop DELETE'
+ssh $ssh_opts -i "$SSH_KEY_PATH" "$USERNAME"@"$CONTROLLER_NODE_2" "sh -c 'cd domino; python domino-cli.py $CLIENT1_CLIPORT subscribe -l tosca.policies.Placement:properties:region:nova-3 --lop DELETE'"
sleep 1
echo "Test Publish API"
-ssh -i "$SSH_KEY_PATH" "$USERNAME"@"$CONTROLLER_NODE_1" \
- 'python domino-cli.py $CLIENT1_CLIPORT publish -t "$toscafile_test1"'
+ssh $ssh_opts -i "$SSH_KEY_PATH" "$USERNAME"@"$CONTROLLER_NODE_3" "sh -c 'cd domino; python domino-cli.py $CLIENT2_CLIPORT publish -t "$toscafile_test1"'"
sleep 1
-ssh -i "$SSH_KEY_PATH" "$USERNAME"@"$CONTROLLER_NODE_1" \
- 'python domino-cli.py $CLIENT1_CLIPORT subscribe \
- -l tosca.policies.Placement.Geolocation:properties:region:us-west-1'
+ssh $ssh_opts -i "$SSH_KEY_PATH" "$USERNAME"@"$CONTROLLER_NODE_2" "sh -c 'cd domino; python domino-cli.py $CLIENT1_CLIPORT subscribe -l tosca.policies.Placement.Geolocation:properties:region:us-west-1'"
sleep 1
-ssh -i "$SSH_KEY_PATH" "$USERNAME"@"$CONTROLLER_NODE_2" \
- 'python domino-cli.py $CLIENT2_CLIPORT publish -t "$toscafile_test1"'
+ssh $ssh_opts -i "$SSH_KEY_PATH" "$USERNAME"@"$CONTROLLER_NODE_3" "sh -c 'cd domino; python domino-cli.py $CLIENT2_CLIPORT publish -t "$toscafile_test1"'"
echo "done"