Skip to content

Commit

Permalink
Merge "Fixes to --extnet logic."
Browse files Browse the repository at this point in the history
  • Loading branch information
kambiz-aghaiepour authored and gerritforge-ltd committed Feb 13, 2019
2 parents bf676f4 + ac11363 commit 5f0f801
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
12 changes: 6 additions & 6 deletions bin/quads-daemon
Original file line number Diff line number Diff line change
Expand Up @@ -335,7 +335,7 @@ class HTTPRequestHandler(BaseHTTPRequestHandler):
data['wipe'][0])
self.wfile.write(json.dumps({'result': result}))
write_lock.release()
if data['extnet']:
if 'extnet' in data:
vlans_conf = os.path.dirname(__file__) + "/../conf/vlans.yml"

try:
Expand All @@ -346,7 +346,7 @@ class HTTPRequestHandler(BaseHTTPRequestHandler):
print "quads: Invalid YAML config: " + vlans_conf
exit(1)
for vlan, properties in vlans.iteritems():
if data["extnet"] == properties["id"]:
if int(data["extnet"][0]) == properties["id"]:
properties["cloud"] = data['cloud'][0]
properties["owner"] = data['owner'][0]
properties["ticket"] = data['ticket'][0]
Expand All @@ -360,10 +360,10 @@ class HTTPRequestHandler(BaseHTTPRequestHandler):
if not os.path.exists(vlans_dir):
os.makedirs(vlans_dir)
stub = os.path.join(vlans_dir, "%s-vlan%s-%s-%s" % (
data["cloud"],
data["extnet"],
data["owner"],
data['ticket'],
data["cloud"][0],
data["extnet"][0],
data["owner"][0],
data['ticket'][0],
))
if not os.path.exists(stub):
with open(stub, "a") as _:
Expand Down
2 changes: 1 addition & 1 deletion bin/quads-validate-env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ function validate_environment() {
touch $data_dir/release/${env}-${owner}-${ticket}
if [ -f $data_dir/release/.failreport.${env}-${owner}-${ticket} ]; then
for file in $data_dir/vlans/${env}*; do
if ! find $file &> /dev/null; then
if [ ! -f $file ]; then
report_success $env $owner $ticket
fi;
done
Expand Down

0 comments on commit 5f0f801

Please sign in to comment.