Skip to content

Commit

Permalink
Add extra validation check for v2plugin (#1096)
Browse files Browse the repository at this point in the history
* Add extra validation check for v2plugin

Currently, demo-v2plugin doesn't check if contiv is installed and
enabled.

This patchset is to check if v2plugin is installed and enabled at the
end of the installation

Signed-off-by: <kalei@cisco.com>

* Update don't care variable

* remove garbage text
  • Loading branch information
kahou82 committed Dec 6, 2017
1 parent a29e2c5 commit 51e5f6f
Showing 1 changed file with 18 additions and 3 deletions.
21 changes: 18 additions & 3 deletions scripts/python/startSwarm.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@

# Start netplugin and netmaster
import api.tnode
import time
import sys
import os
import argparse
import os
import re
import time

# Parse command line args
# Create the parser and sub parser
Expand Down Expand Up @@ -45,6 +45,21 @@
node.runCmdThread(command)

time.sleep(15)

print "Check netplugin is installed and enabled"
out, _, _ = nodes[0].runCmd("docker plugin ls")

installed = re.search('contiv/v2plugin', out[1])

if installed == None:
print "Make target failed: Contiv plugin is not installed"
os._exit(1)

enabled = re.search('false', out[1])
if enabled != None:
print "Make target failed: Contiv plugin is installed but disabled"
os._exit(1)

print "################### Swarm Mode is up #####################"
else:
swarmScript= scriptPath + "/start-swarm.sh"
Expand Down

0 comments on commit 51e5f6f

Please sign in to comment.