#################### devel tools
tags:
- find . '(' -name '*.py' -o -name '*.sql' -o -name '*.php' -o -name Makefile -o -name '[0-9][0-9][0-9]*' ')' | xargs etags
+ find . '(' -name '*.py' -o -name '*.sql' -o -name '*.php' -o -name Makefile -o -name '[0-9][0-9][0-9]*' ')' | fgrep -v '.git/' | xargs etags
.PHONY: tags
# Mark Huang <mlhuang@cs.princeton.edu>
#
# Copyright (C) 2004-2006 The Trustees of Princeton University
-# $Id$
-# $URL$
#
import sys
# Mark Huang <mlhuang@cs.princeton.edu>
# Copyright (C) 2006 The Trustees of Princeton University
#
-# $Id$
-# $URL$
-#
from types import StringTypes
from PLC.Faults import *
-# $Id$
-# $URL$
-
from PLC.Faults import *
from PLC.Parameter import Parameter
from PLC.Table import Row, Table
# Mark Huang <mlhuang@cs.princeton.edu>
# Copyright (C) 2007 The Trustees of Princeton University
#
-# $Id$
-# $URL$
-#
from PLC.Faults import *
from PLC.Debug import log
# Mark Huang <mlhuang@cs.princeton.edu>
# Copyright (C) 2006 The Trustees of Princeton University
#
-# $Id$
-# $URL$
-#
from PLC.Faults import *
from PLC.Parameter import Parameter
", ".join(BootState.fields)
if boot_states:
- sql += " WHERE boot_state IN (%s)" % ", ".join(map(api.db.quote, boot_states))
+ sql += " WHERE boot_state IN (%s)" % ", ".join( [ api.db.quote (s) for s in boot_states ] )
self.selectall(sql)
# Mark Huang <mlhuang@cs.princeton.edu>
# Copyright (C) 2006 The Trustees of Princeton University
#
-# $Id$
-# $URL$
-#
from PLC.Faults import *
from PLC.Parameter import Parameter
# Mark Huang <mlhuang@cs.princeton.edu>
# Copyright (C) 2004-2006 The Trustees of Princeton University
#
-# $Id$
-# $URL$
-#
import os
import sys
# Tony Mack <tmack@cs.princeton.edu>
# Copyright (C) 2006 The Trustees of Princeton University
#
-# $Id$
-# $URL$
-#
from PLC.Faults import *
from PLC.Parameter import Parameter
# Tony Mack <tmack@cs.princeton.edu>
# Copyright (C) 2006 The Trustees of Princeton University
#
-# $Id$
-# $URL$
-#
from PLC.Faults import *
from PLC.Parameter import Parameter
# Mark Huang <mlhuang@cs.princeton.edu>
# Copyright (C) 2006 The Trustees of Princeton University
#
-# $Id$
-# $URL$
-#
import os
import xmlrpclib
-# $Id$
-# $URL$
#
# Functions for interacting with the initscripts table in the database
#
# Tony Mack <tmack@cs.princeton.edu>
# Copyright (C) 2006 The Trustees of Princeton University
#
-#
from types import StringTypes
from PLC.Faults import *
-# $Id$
-# $URL$
#
# Thierry Parmentelat - INRIA
#
-# $Revision$
-#
from PLC.Faults import *
from PLC.Parameter import Parameter
from PLC.Filter import Filter
# Mark Huang <mlhuang@cs.princeton.edu>
# Copyright (C) 2006 The Trustees of Princeton University
#
-# $Id$
-# $URL$
-#
from PLC.Faults import *
from PLC.Parameter import Parameter
", ".join(KeyType.fields)
if key_types:
- sql += " WHERE key_type IN (%s)" % ", ".join(map(api.db.quote, key_types))
+ sql += " WHERE key_type IN (%s)" % ", ".join( [ api.db.quote (t) for t in key_types ] )
self.selectall(sql)
-# $Id$
-# $URL$
import re
from PLC.Faults import *
# Tony Mack <tmack@cs.princeton.edu>
# Copyright (C) 2006 The Trustees of Princeton University
#
-# $Id: LDAP.py
-# $URL: svn+ssh://svn.planet-lab.org/svn/PLCAPI/trunk/PLC/LDAP.py $
-#
-#
import ldap
import traceback
#
-# $Id$
-# $URL$
# Thierry Parmentelat -- INRIA
#
# Utilities for filtering on leases
#
# Functions for interacting with the leases table in the database
#
-# $Id$
-# $URL$
# Thierry Parmentelat -- INRIA
#
# Tony Mack <tmack@cs.princeton.edu>
# Copyright (C) 2006 The Trustees of Princeton University
#
-# $Id$
-# $URL$
-#
from PLC.Parameter import Parameter
from PLC.Table import Row, Table
-# $Id$
-# $URL$
from PLC.Faults import *
from PLC.Method import Method
from PLC.Parameter import Parameter, Mixed
-# $Id$
-# $URL$
from PLC.Faults import *
from PLC.Method import Method
from PLC.Parameter import Parameter, Mixed
-# $Id$
-# $URL$
from PLC.Faults import *
from PLC.Method import Method
from PLC.Parameter import Parameter, Mixed
-# $Id$
-# $URL$
from PLC.Faults import *
from PLC.Method import Method
from PLC.Parameter import Parameter, Mixed
-# $Id$
-# $URL$
from PLC.Faults import *
from PLC.Method import Method
from PLC.Parameter import Parameter, Mixed
-# $Id$
-# $URL$
from PLC.Faults import *
from PLC.Method import Method
from PLC.Parameter import Parameter, Mixed
-# $Id$
-# $URL$
from PLC.Faults import *
from PLC.Method import Method
from PLC.Parameter import Parameter, Mixed
-# $Id$
-# $URL$
from PLC.Faults import *
from PLC.Method import Method
from PLC.Parameter import Parameter, Mixed
-# $Id$
-# $URL$
# Thierry Parmentelat -- INRIA
from PLC.Faults import *
-# $Id$
-# $URL$
from PLC.Faults import *
from PLC.Method import Method
from PLC.Parameter import Parameter
-# $Id$
-# $URL$
from PLC.Faults import *
from PLC.Method import Method
from PLC.Parameter import Parameter, Mixed
-# $Id$
-# $URL$
from PLC.Faults import *
from PLC.Method import Method
from PLC.Parameter import Parameter, Mixed
-# $Id$
-# $URL$
from PLC.Faults import *
from PLC.Auth import Auth
from PLC.Method import Method
-# $Id$
-# $URL$
from PLC.Faults import *
from PLC.Method import Method
from PLC.Parameter import Parameter, Mixed
-# $Id$
-# $URL$
from PLC.Faults import *
from PLC.Method import Method
from PLC.Parameter import Parameter, Mixed
-# $Id$
-# $URL$
from PLC.Faults import *
from PLC.Method import Method
from PLC.Parameter import Parameter, Mixed
-# $Id$
-# $URL$
from PLC.Faults import *
from PLC.Method import Method
from PLC.Parameter import Parameter, Mixed
-# $Id$
-# $URL$
from PLC.Faults import *
from PLC.Method import Method
from PLC.Parameter import Parameter, Mixed
-# $Id$
-# $URL$
from PLC.Faults import *
from PLC.Method import Method
from PLC.Parameter import Parameter, Mixed
-# $Id$
-# $URL$
#
# Thierry Parmentelat - INRIA
#
-# $Id$
-# $URL$
from PLC.Faults import *
from PLC.Method import Method
from PLC.Parameter import Parameter, Mixed
-# $Id$
-# $URL$
from PLC.Faults import *
from PLC.Method import Method
from PLC.Parameter import Parameter, Mixed
-# $Id$
-# $URL$
from PLC.Faults import *
from PLC.Method import Method
from PLC.Parameter import Parameter, Mixed
-# $Id$
-# $URL$
from PLC.Faults import *
from PLC.Method import Method
from PLC.Parameter import Parameter, Mixed
-# $Id$
-# $URL$
import time
from PLC.Method import Method
-# $Id$
-# $URL$
from PLC.Faults import *
from PLC.Method import Method
from PLC.Parameter import Parameter, Mixed
-# $Id$
-# $URL$
from PLC.Faults import *
from PLC.Method import Method
from PLC.Parameter import Parameter, Mixed
-# $Id$
-# $URL$
import re
from PLC.Faults import *
-# $Id$
-# $URL$
from PLC.Faults import *
from PLC.Method import Method
from PLC.Parameter import Parameter, Mixed
-# $Id$
-# $URL$
from PLC.Faults import *
from PLC.Method import Method
from PLC.Parameter import Parameter, Mixed
-# $Id$
-# $URL$
from PLC.Faults import *
from PLC.Method import Method
from PLC.Parameter import Parameter, Mixed
-# $Id$
-# $URL$
#
# Thierry Parmentelat - INRIA
#
-# $Revision: 9423 $
-#
-
from PLC.Faults import *
from PLC.Method import Method
-# $Id$
-# $URL$
-
from PLC.Method import Method
from PLC.Parameter import Parameter, Mixed
from PLC.Filter import Filter
-# $Id$
-# $URL$
from PLC.Faults import *
from PLC.Method import Method
from PLC.Parameter import Parameter, Mixed
-# $Id$
-# $URL$
from PLC.Methods.AuthCheck import AuthCheck
class BootCheckAuthentication(AuthCheck):
-# $Id$
-# $URL$
from PLC.Method import Method
from PLC.Parameter import Parameter, Mixed
from PLC.Auth import BootAuth
-# $Id$
-# $URL$
from PLC.Method import Method
from PLC.Parameter import Parameter, Mixed
from PLC.Auth import Auth, BootAuth, SessionAuth
-# $Id$
-# $URL$
import time
from PLC.Faults import *
-# $Id$
-# $URL$
from PLC.Faults import *
from PLC.Method import Method
from PLC.Parameter import Parameter, Mixed
-# $Id$
-# $URL$
from PLC.Faults import *
from PLC.Method import Method
from PLC.Parameter import Parameter, Mixed
-# $Id$
-# $URL$
from PLC.Faults import *
from PLC.Method import Method
from PLC.Parameter import Parameter, Mixed
-# $Id$
-# $URL$
from PLC.Faults import *
from PLC.Method import Method
from PLC.Parameter import Parameter, Mixed
-# $Id$
-# $URL$
from PLC.Faults import *
from PLC.Method import Method
from PLC.Parameter import Parameter, Mixed
-# $Id$
-# $URL$
from PLC.Faults import *
from PLC.Method import Method
from PLC.Parameter import Parameter, Mixed
-# $Id$
-# $URL$
from PLC.Faults import *
from PLC.Method import Method
from PLC.Parameter import Parameter, Mixed
-# $Id$
-# $URL$
from PLC.Faults import *
from PLC.Method import Method
from PLC.Parameter import Parameter, Mixed
-# $Id$
-# $URL$
from PLC.Faults import *
from PLC.Method import Method
from PLC.Parameter import Parameter, Mixed
-# $Id$
-# $URL$
from PLC.Faults import *
from PLC.Method import Method
from PLC.Parameter import Parameter, Mixed
-# $Id$
-# $URL$
from PLC.Faults import *
from PLC.Method import Method
from PLC.Parameter import Parameter, Mixed
-# $Id$
-# $URL$
from PLC.Faults import *
from PLC.Method import Method
from PLC.Parameter import Parameter, Mixed
-# $Id$
-# $URL$
from PLC.Faults import *
from PLC.Method import Method
from PLC.Parameter import Parameter, Mixed
-# $Id$
-# $URL$
from PLC.Faults import *
from PLC.Method import Method
from PLC.Parameter import Parameter, Mixed
-# $Id$
-# $URL$
from PLC.Faults import *
from PLC.Method import Method
from PLC.Parameter import Parameter, Mixed
-# $Id$
-# $URL$
from PLC.Faults import *
from PLC.Method import Method
from PLC.Parameter import Parameter, Mixed
-# $Id$
-# $URL$
from PLC.Faults import *
from PLC.Method import Method
from PLC.Parameter import Parameter, Mixed
-# $Id$
-# $URL$
from PLC.Faults import *
from PLC.Method import Method
from PLC.Parameter import Parameter, Mixed
-# $Id$
-# $URL$
from PLC.Faults import *
from PLC.Method import Method
from PLC.Parameter import Parameter, Mixed
-# $Id$
-# $URL$
from PLC.Faults import *
from PLC.Method import Method
from PLC.Parameter import Parameter, Mixed
-# $Id$
-# $URL$
from PLC.Faults import *
from PLC.Method import Method
from PLC.Parameter import Parameter, Mixed
-# $Id$
-# $URL$
from PLC.Faults import *
from PLC.Method import Method
from PLC.Parameter import Parameter, Mixed
-# $Id$
-# $URL$
from PLC.Faults import *
from PLC.Method import Method
from PLC.Parameter import Parameter, Mixed
-# $Id$
-# $URL$
from PLC.Faults import *
from PLC.Method import Method
from PLC.Parameter import Parameter, Mixed
-# $Id$
-# $URL$
from PLC.Faults import *
from PLC.Method import Method
from PLC.Parameter import Parameter, Mixed
-# $Id$
-# $URL$
from PLC.Faults import *
from PLC.Method import Method
from PLC.Parameter import Parameter, Mixed
-# $Id$
-# $URL$
import time
from PLC.Method import Method
-# $Id$
-# $URL$
from PLC.Faults import *
from PLC.Method import Method
from PLC.Parameter import Parameter, Mixed
-# $Id$
-# $URL$
from PLC.Faults import *
from PLC.Method import Method
from PLC.Parameter import Parameter, Mixed
-# $Id$
-# $URL$
from PLC.Faults import *
from PLC.Method import Method
from PLC.Parameter import Parameter, Mixed
-# $Id$
-# $URL$
from PLC.Faults import *
from PLC.Method import Method
from PLC.Parameter import Parameter, Mixed
-# $Id$
-# $URL$
#
# Thierry Parmentelat - INRIA
#
-# $Revision: 9423 $
-#
from PLC.Faults import *
from PLC.Method import Method
from PLC.Parameter import Parameter, Mixed
-# $Id$
-# $URL$
import random
import base64
-# $Id$
-# $URL$
from PLC.Faults import *
from PLC.Method import Method
from PLC.Parameter import Parameter, Mixed
-# $Id$
-# $URL$
from PLC.Faults import *
from PLC.Method import Method
from PLC.Parameter import Parameter, Mixed
-# $Id$
-# $URL$
from PLC.Faults import *
from PLC.Method import Method
from PLC.Parameter import Parameter, Mixed
-# $Id$
-# $URL$
from PLC.Faults import *
from PLC.Method import Method
from PLC.Parameter import Parameter, Mixed
-# $Id$
-# $URL$
from PLC.Faults import *
from PLC.Method import Method
from PLC.Parameter import Parameter, Mixed
-# $Id$
-# $URL$
from PLC.Faults import *
from PLC.Method import Method
from PLC.Parameter import Parameter, Mixed
-# $Id$
-# $URL$
from PLC.Faults import *
from PLC.Method import Method
from PLC.Parameter import Parameter, Mixed
-# $Id$
-# $URL$
from PLC.Faults import *
from PLC.Method import Method
from PLC.Parameter import Parameter, Mixed
-# $Id$
-# $URL$
from PLC.Faults import *
from PLC.Method import Method
from PLC.Parameter import Parameter, Mixed
-# $Id$
-# $URL$
from PLC.Faults import *
from PLC.Method import Method
from PLC.Parameter import Parameter, Mixed
-# $Id$
-# $URL$
from PLC.Method import Method
from PLC.Auth import Auth
from PLC.Faults import *
-# $Id$
-# $URL$
# Thierry Parmentelat -- INRIA
from PLC.Method import Method
-# $Id$
-# $URL$
from PLC.Faults import *
from PLC.Method import Method
from PLC.Parameter import Parameter, Mixed
-# $Id$
-# $URL$
from PLC.Faults import *
from PLC.Method import Method
from PLC.Parameter import Parameter, Mixed
-# $Id$
-# $URL$
from PLC.Faults import *
from PLC.Method import Method
from PLC.Parameter import Parameter, Mixed
-# $Id$
-# $URL$
from PLC.Faults import *
from PLC.Method import Method
from PLC.Parameter import Parameter, Mixed
-# $Id$
-# $URL$
from PLC.Faults import *
from PLC.Method import Method
from PLC.Parameter import Parameter, Mixed
-# $Id$
-# $URL$
from PLC.Faults import *
from PLC.Method import Method
from PLC.Parameter import Parameter, Mixed
-# $Id$
-# $URL$
from PLC.Faults import *
from PLC.Method import Method
from PLC.Parameter import Parameter, Mixed
-# $Id$
-# $URL$
from PLC.Faults import *
from PLC.Method import Method
from PLC.Parameter import Parameter, Mixed
-# $Id$
-# $URL$
from PLC.Faults import *
from PLC.Method import Method
from PLC.Parameter import Parameter, Mixed
#
# Thierry Parmentelat - INRIA
#
-# $Id$
-# $URL$
import time
-# $Id$
-# $URL$
from PLC.Method import Method
from PLC.Parameter import Parameter
from PLC.Auth import Auth
-# $Id$
-# $URL$
#
# Thierry Parmentelat - INRIA
#
-# $Id$
-# $URL$
from PLC.Method import Method
from PLC.Auth import Auth
from PLC.Faults import *
-# $Id$
-# $URL$
from PLC.Faults import *
from PLC.Method import Method
from PLC.Parameter import Parameter, Mixed
-# $Id$
-# $URL$
from PLC.Faults import *
from PLC.Method import Method
from PLC.Parameter import Parameter, Mixed
-# $Id$
-# $URL$
from PLC.Method import Method
from PLC.Parameter import Parameter, Mixed
from PLC.Filter import Filter
-# $Id$
-# $URL$
from PLC.Faults import *
from PLC.Method import Method
from PLC.Parameter import Parameter, Mixed
-# $Id$
-# $URL$
from PLC.Method import Method
from PLC.Parameter import Parameter, Mixed
from PLC.Filter import Filter
-# $Id$
-# $URL$
from PLC.Faults import *
from PLC.Method import Method
from PLC.Parameter import Parameter, Mixed
-# $Id$
-# $URL$
-
import time
from PLC.Faults import *
-# $Id$
-# $URL$
from PLC.Method import Method
from PLC.Parameter import Parameter, Mixed
from PLC.Filter import Filter
-# $Id$
-# $URL$
from PLC.Faults import *
from PLC.Method import Method
from PLC.Parameter import Parameter, Mixed
-# $Id$
-# $URL$
from PLC.Method import Method
from PLC.Parameter import Parameter, Mixed
from PLC.Filter import Filter
-# $Id$
-# $URL$
from PLC.Method import Method
from PLC.Parameter import Parameter, Mixed
from PLC.Auth import Auth
-# $Id$
-# $URL$
import socket
from PLC.Faults import *
-# $Id$
-# $URL$
import socket
from PLC.Faults import *
-# $Id$
-# $URL$
from PLC.Faults import *
from PLC.Method import Method
from PLC.Parameter import Parameter, Mixed
-# $Id$
-# $URL$
import random
import base64
import time
-# $Id$
-# $URL$
-
from PLC.Method import Method
from PLC.Parameter import Parameter, Mixed
from PLC.Filter import Filter
-# $Id$
-# $URL$
from PLC.Faults import *
from PLC.Method import Method
from PLC.Parameter import Parameter, Mixed
-# $Id$
-# $URL$
from PLC.Faults import *
from PLC.Method import Method
from PLC.Parameter import Parameter, Mixed
-# $Id$
-# $URL$
import re
from PLC.Faults import *
-# $Id$
-# $URL$
from PLC.Method import Method
from PLC.Parameter import Parameter, Mixed
from PLC.Filter import Filter
-# $Id$
-# $URL$
import os
import sys
from subprocess import Popen, PIPE, call
-# $Id$
-# $URL$
from PLC.Method import Method
from PLC.Parameter import Parameter, Mixed
from PLC.Faults import *
-# $Id$
-# $URL$
from PLC.Method import Method
from PLC.Parameter import Parameter, Mixed
from PLC.Filter import Filter
-# $Id$
-# $URL$
from PLC.Method import Method
from PLC.Parameter import Parameter, Mixed
from PLC.Filter import Filter
-# $Id$
-# $URL$
from PLC.Faults import *
from PLC.Method import Method
from PLC.Parameter import Parameter, Mixed
-# $Id$
-# $URL$
from PLC.Faults import *
from PLC.Method import Method
from PLC.Parameter import Parameter, Mixed
-# $Id$
-# $URL$
from PLC.Method import Method
from PLC.Parameter import Parameter, Mixed
from PLC.Filter import Filter
-# $Id$
-# $URL$
import time
from PLC.Faults import *
-# $Id$
-# $URL$
from PLC.Methods.SliceGetTicket import SliceGetTicket
class SliceTicketGet(SliceGetTicket):
-# $Id$
-# $URL$
import time
from PLC.Faults import *
-# $Id$
-# $URL$
from PLC.Faults import *
from PLC.Method import Method
from PLC.Parameter import Parameter, Mixed
-# $Id$
-# $URL$
from PLC.Faults import *
from PLC.Method import Method
from PLC.Parameter import Parameter, Mixed
-# $Id$
-# $URL$
from PLC.Method import Method
from PLC.Parameter import Parameter, Mixed
from PLC.Filter import Filter
-# $Id: UnBindObjectFromPeer.py 14587 2009-07-19 13:18:50Z thierry $
-# $URL: svn+ssh://svn.planet-lab.org/svn/PLCAPI/trunk/PLC/Methods/BindObjectToPeer.py $
-
from PLC.Method import Method
from PLC.Parameter import Parameter, Mixed
from PLC.Filter import Filter
-# $Id$
-# $URL$
from PLC.Faults import *
from PLC.Method import Method
from PLC.Parameter import Parameter, Mixed
-# $Id$
-# $URL$
from PLC.Faults import *
from PLC.Method import Method
from PLC.Parameter import Parameter, Mixed
-# $Id$
-# $URL$
from PLC.Faults import *
from PLC.Method import Method
from PLC.Parameter import Parameter, Mixed
-# $Id$
-# $URL$
from PLC.Faults import *
from PLC.Method import Method
from PLC.Parameter import Parameter, Mixed
-# $Id$
-# $URL$
from PLC.Faults import *
from PLC.Method import Method
from PLC.Parameter import Parameter, Mixed
-# $Id$
-# $URL$
from PLC.Faults import *
from PLC.Method import Method
from PLC.Parameter import Parameter, Mixed
-# $Id$
-# $URL$
from PLC.Faults import *
from PLC.Method import Method
from PLC.Parameter import Parameter, Mixed
-# $Id$
-# $URL$
from PLC.Faults import *
from PLC.Method import Method
from PLC.Parameter import Parameter, Mixed
-# $Id$
-# $URL$
from PLC.Faults import *
from PLC.Method import Method
from PLC.Parameter import Parameter, Mixed
-# $Id$
-# $URL$
from PLC.Faults import *
from PLC.Method import Method
from PLC.Parameter import Parameter, Mixed
-# $Id$
-# $URL$
from PLC.Faults import *
from PLC.Method import Method
from PLC.Parameter import Parameter, Mixed
-# $Id$
-# $URL$
from PLC.Faults import *
from PLC.Method import Method
from PLC.Parameter import Parameter, Mixed
-# $Id$
-# $URL$
from PLC.Faults import *
from PLC.Method import Method
from PLC.Parameter import Parameter, Mixed
-# $Id$
-# $URL$
from PLC.Faults import *
from PLC.Method import Method
from PLC.Parameter import Parameter, Mixed
-# $Id$
-# $URL$
from PLC.Faults import *
from PLC.Method import Method
from PLC.Parameter import Parameter, Mixed
-# $Id$
-# $URL$
from PLC.Faults import *
from PLC.Method import Method
from PLC.Parameter import Parameter, Mixed
-# $Id$
-# $URL$
import time
from PLC.Faults import *
-# $Id$
-# $URL$
import random
import base64
import time
# Mark Huang <mlhuang@cs.princeton.edu>
# Copyright (C) 2006 The Trustees of Princeton University
#
-# $Id$
-# $URL$
-#
from PLC.Faults import *
from PLC.Parameter import Parameter
", ".join(NetworkMethod.fields)
if methods:
- sql += " WHERE method IN (%s)" % ", ".join(map(api.db.quote, methods))
+ sql += " WHERE method IN (%s)" % ", ".join( [ api.db.quote (m) for m in methods ] )
self.selectall(sql)
# Mark Huang <mlhuang@cs.princeton.edu>
# Copyright (C) 2006 The Trustees of Princeton University
#
-# $Id$
-# $URL$
-#
from PLC.Faults import *
from PLC.Parameter import Parameter
", ".join(NetworkType.fields)
if types:
- sql += " WHERE type IN (%s)" % ", ".join(map(api.db.quote, types))
+ sql += " WHERE type IN (%s)" % ", ".join( [ api.db.quote (t) for t in types ] )
self.selectall(sql)
# Mark Huang <mlhuang@cs.princeton.edu>
# Copyright (C) 2006 The Trustees of Princeton University
#
-# $Id$
-# $URL$
-#
from types import StringTypes
#
# Functions for interacting with the node_types table in the database
#
-# $Id$
-# $URL$
#
from PLC.Faults import *
", ".join(NodeType.fields)
if node_types:
- sql += " WHERE node_type IN (%s)" % ", ".join(map(api.db.quote, node_types))
+ sql += " WHERE node_type IN (%s)" % ", ".join( [ api.db.quote (t) for t in node_types ] )
self.selectall(sql)
# Mark Huang <mlhuang@cs.princeton.edu>
# Copyright (C) 2006 The Trustees of Princeton University
#
-# $Id$
-# $URL$
-#
from PLC.Faults import *
from PLC.Parameter import Parameter
# Mark Huang <mlhuang@cs.princeton.edu>
# Copyright (C) 2006 The Trustees of Princeton University
#
-# $Id$
-# $URL$
-#
+
from types import StringTypes
from PLC.Faults import *
# Mark Huang <mlhuang@cs.princeton.edu>
# Copyright (C) 2006 The Trustees of Princeton University
#
-# $Id$
-# $URL$
-#
from PLC.Faults import *
from PLC.Parameter import Parameter
-# $Id$
-# $URL$
# Marc E. Fiuczynski <mef@cs.princeton.edu>
# Copyright (C) 2004 The Trustees of Princeton University
#
# Mark Huang <mlhuang@cs.princeton.edu>
# Copyright (C) 2006 The Trustees of Princeton University
#
-# $Id$
-# $URL$
-#
from types import *
from PLC.Faults import *
#
-# PostgreSQL database interface. Sort of like DBI(3) (Database
-# independent interface for Perl).
+# PostgreSQL database interface.
+# Sort of like DBI(3) (Database independent interface for Perl).
#
# Mark Huang <mlhuang@cs.princeton.edu>
# Copyright (C) 2006 The Trustees of Princeton University
#
-# $Id$
-# $URL$
-#
import psycopg2
import psycopg2.extensions
from PLC.Faults import *
from datetime import datetime as DateTimeType
-# From pgdb
-def _quote(x):
- if isinstance(x, DateTimeType):
- x = str(x)
- elif isinstance(x, unicode):
- x = x.encode( 'utf-8' )
-
- if isinstance(x, types.StringType):
- x = "'%s'" % str(x).replace("\\", "\\\\").replace("'", "''")
- elif isinstance(x, (types.IntType, types.LongType, types.FloatType)):
- pass
- elif x is None:
- x = 'NULL'
- elif isinstance(x, (types.ListType, types.TupleType, set)):
- x = 'ARRAY[%s]' % ', '.join(map(lambda x: str(_quote(x)), x))
- elif hasattr(x, '__pg_repr__'):
- x = x.__pg_repr__()
- else:
- raise pgdb.InterfaceError, 'do not know how to handle type %s' % type(x)
- return x
-
class PostgreSQL:
def __init__(self, api):
self.api = api
self.connection.close()
self.connection = None
- @classmethod
def quote(self, value):
"""
Returns quoted version of the specified value.
"""
- return _quote(value)
+ # The pgdb._quote function is good enough for general SQL
+ # quoting, except for array types.
+ if isinstance (value, (types.ListType, types.TupleType, set)):
+ 'ARRAY[%s]' % ', '.join( [ str(self.quote(x)) for x in value ] )
+ else:
+ try:
+ # up to PyGreSQL-3.x, function was pgdb._quote
+ return pgdb._quote(value)
+ except:
+ # from PyGreSQL-4.0, it's a cursor method
+ return self.cursor()._quote(value)
@classmethod
def param(self, name, value):
# Mark Huang <mlhuang@cs.princeton.edu>
# Copyright (C) 2006 The Trustees of Princeton University
#
-# $Id$
-# $URL$
-#
import os
import xmlrpclib
# Mark Huang <mlhuang@cs.princeton.edu>
# Copyright (C) 2006 The Trustees of Princeton University
#
-# $Id$
-# $URL$
-#
from types import StringTypes
from PLC.Faults import *
# Mark Huang <mlhuang@cs.princeton.edu>
# Copyright (C) 2006 The Trustees of Princeton University
#
-# $Id$
-# $URL$
-#
from PLC.Faults import *
from PLC.Parameter import Parameter
", ".join(SliceInstantiation.fields)
if instantiations:
- sql += " WHERE instantiation IN (%s)" % ", ".join(map(api.db.quote, instantiations))
+ sql += " WHERE instantiation IN (%s)" % ", ".join( [ api.db.quote (i) for i in instantiations ] )
self.selectall(sql)
-# $Id$
-# $URL$
from types import StringTypes
import time
import re
#
# Utilities to handle timestamps / durations from/to integers and strings
-#
-# $Id$
-# $URL$
-#
-
#
# datetime.{datetime,timedelta} are powerful tools, but these objects are not
# natively marshalled over xmlrpc
-# $Id$
-# $URL$
import os
import sys
import pprint
# Mark Huang <mlhuang@cs.princeton.edu>
# Copyright (C) 2006 The Trustees of Princeton University
#
-# $Id$
-# $URL$
-#
import os
import sys
# Mark Huang <mlhuang@cs.princeton.edu>
# Copyright (C) 2006 The Trustees of Princeton University
#
-# $Id$
-# $URL$
-#
import xml.dom.minidom
from xml.dom.minidom import Element, Text
--- $Id$
--- $URL$
-- myplc v5.0 starts with (5,100)
-- the expected former values would be (4,11)
--
-- if you somehow start from a 4.3 not entirely up-dated to rc17,
-- then manually run
--- http://svn.planet-lab.org/svn/PLCAPI/branches/4.3/migrations/011-up-site-and-person-tags.sql
+-- http://git.onelab.eu/?p=plcapi.git;a=blob;f=migrations/011-up-site-and-person-tags.sql;hb=refs/heads/4.3
--
UPDATE plc_db_version SET version = 5;
UPDATE plc_db_version SET subversion = 100;
--- $Id$
--- $URL$
-
-- revert cleanup on node_types
INSERT INTO node_types VALUES ('dummynet');
--- $Id$
--- $URL$
-
-- we're using the 'lease' nodetype to model reservable nodes
INSERT INTO node_types VALUES ('reservable');
-- also the dummynet node_type is obsolete
// Mark Huang <mlhuang@cs.princeton.edu>
// Copyright (C) 2005-2006 The Trustees of Princeton University
//
-// $Id$
-// $URL$
-//
-//
require_once 'plc_config.php';
# Mark Huang <mlhuang@cs.princeton.edu>
# Copyright (C) 2006 The Trustees of Princeton University
#
-# $Id$
-#
CC := gcc
CFLAGS := -g -O2 -I. -Ilibxmlrpc -fPIC
# Mark Huang <mlhuang@cs.princeton.edu>
# Copyright (C) 2006 The Trustees of Princeton University
#
-# $Id$
-# $URL$
-#
from distutils.core import setup
from glob import glob
# Mark Huang <mlhuang@cs.princeton.edu>
# Copyright (C) 2006 The Trustees of Princeton University
#
-# $Id$
-# $URL$
-#
import re
import base64