diff --git a/bin/quads-daemon b/bin/quads-daemon index e074d962a..e31df1571 100755 --- a/bin/quads-daemon +++ b/bin/quads-daemon @@ -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: @@ -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] @@ -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 _: diff --git a/bin/quads-validate-env.sh b/bin/quads-validate-env.sh index d7a6dbd5f..8c0af3230 100755 --- a/bin/quads-validate-env.sh +++ b/bin/quads-validate-env.sh @@ -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