[Swift-commit] r7248 - provenancedb/tags

wilde at ci.uchicago.edu wilde at ci.uchicago.edu
Tue Oct 29 23:34:01 CDT 2013


Author: wilde
Date: 2013-10-29 23:34:01 -0500 (Tue, 29 Oct 2013)
New Revision: 7248

Added:
   provenancedb/tags/README
   provenancedb/tags/TODO
   provenancedb/tags/locate
Log:
Initial version of clent-server locate.

Added: provenancedb/tags/README
===================================================================
--- provenancedb/tags/README	                        (rev 0)
+++ provenancedb/tags/README	2013-10-30 04:34:01 UTC (rev 7248)
@@ -0,0 +1,66 @@
+Tagging Model
+
+Catalogs
+  ObjectTypes
+    RequiredTags
+      none | tag1, ..., tagN
+    AllowedTags
+      any | tag1, ..., tagN
+    SystemTags
+      _user
+      _group
+      _permission
+      _create_date
+      _modify_date
+    Objects
+      Tags
+
+
+Groups
+  Users
+
+
+
+
+Type Examples
+
+
+Dataset
+  type=dataset
+  name
+  create_date
+  location
+  nfiles
+  size
+
+Script
+  type=script
+  name
+  version
+  source
+  repo_url
+
+Application
+  type=app
+  name
+  version
+  source
+
+CMTSRun
+  type=run
+  start_date
+  id
+  script
+
+
+dataset-required name create_date location nfiles size
+dataset-allowed  member
+
+script-required name version source repo_url
+script-required name version source repo_url
+
+app-required name version source
+app-required name version source
+
+run-required start_date id script
+run-allowed  start_date id script

Added: provenancedb/tags/TODO
===================================================================
--- provenancedb/tags/TODO	                        (rev 0)
+++ provenancedb/tags/TODO	2013-10-30 04:34:01 UTC (rev 7248)
@@ -0,0 +1,4 @@
+BUGS
+
+FAILS: ./locate '(owner=oosode)or(owner=jgrime)'
+WORKS: ./locate '(owner=oosode) or (owner=jgrime)'

Added: provenancedb/tags/locate
===================================================================
--- provenancedb/tags/locate	                        (rev 0)
+++ provenancedb/tags/locate	2013-10-30 04:34:01 UTC (rev 7248)
@@ -0,0 +1,46 @@
+#! /bin/sh
+
+usage()
+{
+  echo $0: usage:
+  cat <<END
+    -u|--user       Defaults to $USER or set from ~/.tagpass
+    -p|--password   Or set from ~/.tagpass
+    -d|--database   Defaults to provdb or \$TAGDB or set from ~/.tagpass
+    -h|-?|?|--help  print this help
+END
+}
+
+HOST=swiftvm2.ci.uchicago.edu
+
+user=$USER
+database=provdb
+
+# Get user's preferred user name, password, and database if specified
+
+if [ -r ~/.tagpass ]; then
+  user=$(awk '{print $1}' < ~/.tagpass)
+  password=$(awk '{print $2}' < ~/.tagpass)
+  database=$(awk '{print $3}' < ~/.tagpass)
+fi
+database=${TAGDB:-$database}
+
+# Get command line option flags
+
+while [ $# -gt 0 ]; do
+  case $1 in
+    -u|--user)     user=$2;       shift 2 ;;
+    -p|--password) password=$2;   shift 2 ;;
+    -d|--database) database=$2;   shift 2 ;;
+    -h|-?|--help|-*|--*) usage;   exit    ;;
+    *) break                              ;;
+  esac
+done
+
+query=$@
+query="-u $user -p $password -d $database $query"
+query=$(echo $query | sed -e 's/ /\+/g')
+
+echo DEBUG: FINAL: curl http://$HOST/provdb.php?cmd="tags/locate.server+$query"
+
+curl http://$HOST/provdb.php?cmd="tags/locate.server+$query"


Property changes on: provenancedb/tags/locate
___________________________________________________________________
Added: svn:executable
   + *




More information about the Swift-commit mailing list