plcapi.git
17 years ago- register a few more globals for backward compatibility
Mark Huang [Thu, 11 Jan 2007 05:28:49 +0000 (05:28 +0000)]
- register a few more globals for backward compatibility

17 years ago- only allow local users (i.e. peer_id = None) to authenticate using
Mark Huang [Thu, 11 Jan 2007 05:28:21 +0000 (05:28 +0000)]
- only allow local users (i.e. peer_id = None) to authenticate using
  password and session authentication
- only allow local keys to be used for GPG authentication
- only allow local nodes to authenticate using session or boot
  authentication

17 years ago- remove peer_id from all object tables
Mark Huang [Thu, 11 Jan 2007 05:26:34 +0000 (05:26 +0000)]
- remove peer_id from all object tables
- replace with join tables and augmented views
- set invalid persons.password if not set when inserting
- make person_key.key_id the primary key (only one person per key)
- remove unused node, anonymous, and peer roles (these are virtual roles
  in the API)
- set default events.runtime
- add events.message to view_events
- remove slice_attribute_types and slice_attributes from peer caching

17 years ago- save url
Mark Huang [Wed, 10 Jan 2007 21:04:40 +0000 (21:04 +0000)]
- save url
- try to continue with initialized values if config file is not specified

17 years ago- add gpg_export() to export keys from a public keyring to ASCII
Mark Huang [Wed, 10 Jan 2007 20:18:52 +0000 (20:18 +0000)]
- add gpg_export() to export keys from a public keyring to ASCII

17 years agoongoing work - uses new Shell, and creates peers with gpg key and certs
Thierry Parmentelat [Wed, 10 Jan 2007 17:40:30 +0000 (17:40 +0000)]
ongoing work - uses new Shell, and creates peers with gpg key and certs

17 years ago- use Row.add_object and Row.remove_object
Mark Huang [Tue, 9 Jan 2007 19:16:18 +0000 (19:16 +0000)]
- use Row.add_object and Row.remove_object

17 years ago- install plcsh instead of Shell.py
Mark Huang [Tue, 9 Jan 2007 16:33:16 +0000 (16:33 +0000)]
- install plcsh instead of Shell.py

17 years agorevert accidental (too early) checkin
Mark Huang [Tue, 9 Jan 2007 16:23:47 +0000 (16:23 +0000)]
revert accidental (too early) checkin

17 years agorevert accidental (too early) checkin
Mark Huang [Tue, 9 Jan 2007 16:22:50 +0000 (16:22 +0000)]
revert accidental (too early) checkin

17 years agorevert accidental (too early) checkin
Mark Huang [Tue, 9 Jan 2007 16:22:49 +0000 (16:22 +0000)]
revert accidental (too early) checkin

17 years agoremove old Shell.py implementation (moved to plcsh and PLC/Shell.py)
Mark Huang [Tue, 9 Jan 2007 16:13:36 +0000 (16:13 +0000)]
remove old Shell.py implementation (moved to plcsh and PLC/Shell.py)

17 years ago- python < 2.4 does not support function decorators
Mark Huang [Mon, 8 Jan 2007 20:01:11 +0000 (20:01 +0000)]
- python < 2.4 does not support function decorators

17 years ago- link plcsh, not Shell.py
Mark Huang [Mon, 8 Jan 2007 18:23:50 +0000 (18:23 +0000)]
- link plcsh, not Shell.py

17 years ago- separate out command-line parsing/interpreter from PLC.Shell
Mark Huang [Mon, 8 Jan 2007 18:23:14 +0000 (18:23 +0000)]
- separate out command-line parsing/interpreter from PLC.Shell

17 years ago- import Faults
Mark Huang [Mon, 8 Jan 2007 18:19:07 +0000 (18:19 +0000)]
- import Faults
- add peer check

17 years ago- add class methods add_object() and remove_object() which can be used
Mark Huang [Mon, 8 Jan 2007 18:14:55 +0000 (18:14 +0000)]
- add class methods add_object() and remove_object() which can be used
  as generic join/unjoin functions
- add db_fields() function to return only those fields that can be set
  or updated directly (i.e., intrinsic fields)
- add __eq__() operator to compare two objects (just intrinsic fields)

17 years agoprint GPG errors to log
Mark Huang [Mon, 8 Jan 2007 18:11:54 +0000 (18:11 +0000)]
print GPG errors to log

17 years agoPLC.Shell class
Mark Huang [Mon, 8 Jan 2007 18:10:30 +0000 (18:10 +0000)]
PLC.Shell class

17 years ago- if the appropriate message template doesn't exist log error and exit without throwi...
Tony Mack [Mon, 8 Jan 2007 16:34:12 +0000 (16:34 +0000)]
- if the appropriate message template doesn't exist log error and exit without throwing exception

17 years ago- send email
Tony Mack [Fri, 5 Jan 2007 20:40:27 +0000 (20:40 +0000)]
- send email

17 years ago- send_account_registered_email() after adding person to site
Tony Mack [Fri, 5 Jan 2007 19:56:56 +0000 (19:56 +0000)]
- send_account_registered_email() after adding person to site

17 years ago- added Person.send_account_registered_email method
Tony Mack [Fri, 5 Jan 2007 19:50:20 +0000 (19:50 +0000)]
- added Person.send_account_registered_email method

17 years ago- use temporary home directory since apache user does not have write
Mark Huang [Fri, 5 Jan 2007 18:50:40 +0000 (18:50 +0000)]
- use temporary home directory since apache user does not have write
  access to its own home directory or /etc/planetlab

17 years ago- moved email notification code to Person class. call send_initiate_password_reset_em...
Tony Mack [Fri, 5 Jan 2007 18:05:16 +0000 (18:05 +0000)]
- moved email notification code to Person class. call send_initiate_password_reset_email method instead

17 years ago- added Person.send_initiate_password_reset_email method
Tony Mack [Fri, 5 Jan 2007 18:03:39 +0000 (18:03 +0000)]
- added Person.send_initiate_password_reset_email method

17 years ago- Initial checkin of new API implementation
Tony Mack [Fri, 5 Jan 2007 16:35:25 +0000 (16:35 +0000)]
- Initial checkin of new API implementation

17 years ago- initial checkin of new API implementation
Tony Mack [Fri, 5 Jan 2007 16:16:16 +0000 (16:16 +0000)]
- initial checkin of new API implementation

17 years ago- checkin of previous plc sendmail.py
Tony Mack [Fri, 5 Jan 2007 16:12:12 +0000 (16:12 +0000)]
- checkin of previous plc sendmail.py

17 years ago- added sendmail object ('mailer') as a member of PLCAPI class
Tony Mack [Fri, 5 Jan 2007 16:09:09 +0000 (16:09 +0000)]
- added sendmail object ('mailer') as a member of PLCAPI class

17 years ago- dont return 'password', 'verification_key' or 'verification_expires' fields
Tony Mack [Fri, 5 Jan 2007 16:00:09 +0000 (16:00 +0000)]
- dont return 'password', 'verification_key' or 'verification_expires' fields

17 years ago- added 'verification_key', 'verification_expires' to Person.fields
Tony Mack [Fri, 5 Jan 2007 15:56:16 +0000 (15:56 +0000)]
- added 'verification_key', 'verification_expires' to Person.fields

17 years ago*** empty log message ***
Tony Mack [Fri, 5 Jan 2007 15:54:39 +0000 (15:54 +0000)]
*** empty log message ***

17 years agothrow an error if methods.py fails
Mark Huang [Thu, 4 Jan 2007 16:05:35 +0000 (16:05 +0000)]
throw an error if methods.py fails

17 years agominimal hacks so that the PHP bindings can be built under FC2
Mark Huang [Thu, 4 Jan 2007 16:01:28 +0000 (16:01 +0000)]
minimal hacks so that the PHP bindings can be built under FC2

17 years ago- added 'message' instance variable (high level description of this event)
Tony Mack [Wed, 20 Dec 2006 14:11:52 +0000 (14:11 +0000)]
- added 'message' instance variable (high level description of this event)

17 years ago- Log event['message']
Tony Mack [Wed, 20 Dec 2006 14:08:40 +0000 (14:08 +0000)]
- Log event['message']

17 years ago- added 'message' as an event field
Tony Mack [Wed, 20 Dec 2006 14:07:22 +0000 (14:07 +0000)]
- added 'message' as an event field

17 years ago- added 'message' column to events table
Tony Mack [Wed, 20 Dec 2006 14:06:40 +0000 (14:06 +0000)]
- added 'message' column to events table

17 years agodisable pycurl build for fc2 (not supported anyway)
Mark Huang [Mon, 18 Dec 2006 17:55:58 +0000 (17:55 +0000)]
disable pycurl build for fc2 (not supported anyway)

17 years agoregenerate
Mark Huang [Fri, 15 Dec 2006 19:47:33 +0000 (19:47 +0000)]
regenerate

17 years ago- lowercase subdirs
Mark Huang [Fri, 15 Dec 2006 19:46:19 +0000 (19:46 +0000)]
- lowercase subdirs

17 years agomove docclean into clean
Mark Huang [Fri, 15 Dec 2006 19:45:49 +0000 (19:45 +0000)]
move docclean into clean

17 years ago- be a little more verbose in the returns doc
Mark Huang [Fri, 15 Dec 2006 19:43:37 +0000 (19:43 +0000)]
- be a little more verbose in the returns doc
- use peer.connect()

17 years ago- add peer to roles
Mark Huang [Fri, 15 Dec 2006 19:42:27 +0000 (19:42 +0000)]
- add peer to roles
- fix returns

17 years ago- add peer to roles
Mark Huang [Fri, 15 Dec 2006 19:42:09 +0000 (19:42 +0000)]
- add peer to roles
- fix accepts
- be a little more verbose in the returns doc

17 years ago- add DeletePeer method
Mark Huang [Fri, 15 Dec 2006 19:41:12 +0000 (19:41 +0000)]
- add DeletePeer method

17 years ago- add UpdatePeer method
Mark Huang [Fri, 15 Dec 2006 19:41:02 +0000 (19:41 +0000)]
- add UpdatePeer method

17 years ago- style nits, fix docs
Mark Huang [Fri, 15 Dec 2006 19:40:45 +0000 (19:40 +0000)]
- style nits, fix docs

17 years ago- add peer_keys, peer_slice_attribute_types, and peer_slice_attributes
Mark Huang [Fri, 15 Dec 2006 19:39:55 +0000 (19:39 +0000)]
- add peer_keys, peer_slice_attribute_types, and peer_slice_attributes
- use urlparse to validate peer URL scheme
- delete all peer entities when deleting peer

17 years ago- add peer_keys, peer_slice_attribute_types, and peer_slice_attributes
Mark Huang [Fri, 15 Dec 2006 19:39:04 +0000 (19:39 +0000)]
- add peer_keys, peer_slice_attribute_types, and peer_slice_attributes

17 years ago- no need to pass auth struct, Peer now signs calls automatically
Mark Huang [Fri, 15 Dec 2006 18:40:21 +0000 (18:40 +0000)]
- no need to pass auth struct, Peer now signs calls automatically

17 years ago- make Peer a wrapper around xmlrpclib.ServerProxy, that also magically
Mark Huang [Fri, 15 Dec 2006 18:39:51 +0000 (18:39 +0000)]
- make Peer a wrapper around xmlrpclib.ServerProxy, that also magically
  signs each call and checks the SSL certificate

17 years ago- use PyCurlTransport and add --cacert to optionally check certificates
Mark Huang [Fri, 15 Dec 2006 18:36:16 +0000 (18:36 +0000)]
- use PyCurlTransport and add --cacert to optionally check certificates
  if going over XML-RPC

17 years ago- add GPGAuth signature authentication, primarily for peers
Mark Huang [Fri, 15 Dec 2006 18:35:38 +0000 (18:35 +0000)]
- add GPGAuth signature authentication, primarily for peers
- require AuthMethod for consistency in SessionAuth

17 years ago- peers: replace persons authentication with GPG/SSL authentication
Mark Huang [Fri, 15 Dec 2006 18:34:46 +0000 (18:34 +0000)]
- peers: replace persons authentication with GPG/SSL authentication

17 years agoPython "binding" for GPG. I'll write GPGME bindings eventually. The
Mark Huang [Fri, 15 Dec 2006 18:21:57 +0000 (18:21 +0000)]
Python "binding" for GPG. I'll write GPGME bindings eventually. The
intent is to use GPG to sign method calls, as a way of identifying
and authenticating peers. Calls should still go over an encrypted
transport such as HTTPS, with certificate checking.

17 years agoReplacement for xmlrpclib.SafeTransport, which does not validate
Mark Huang [Fri, 15 Dec 2006 18:21:39 +0000 (18:21 +0000)]
Replacement for xmlrpclib.SafeTransport, which does not validate
SSL certificates. Requires PyCurl.

17 years ago- must build modules before subdirs
Mark Huang [Fri, 15 Dec 2006 16:20:20 +0000 (16:20 +0000)]
- must build modules before subdirs

17 years ago- build psycopg2, pycurl generically
Mark Huang [Fri, 15 Dec 2006 16:19:49 +0000 (16:19 +0000)]
- build psycopg2, pycurl generically
- build subdirs after metafiles

17 years agoThis commit was generated by cvs2svn to compensate for changes in r600,
Mark Huang [Fri, 15 Dec 2006 16:18:06 +0000 (16:18 +0000)]
This commit was generated by cvs2svn to compensate for changes in r600,
which included commits to RCS files with non-trunk default branches.

17 years ago- fix bugs
Mark Huang [Wed, 13 Dec 2006 22:29:28 +0000 (22:29 +0000)]
- fix bugs

17 years agoProvides test results references for
Thierry Parmentelat [Tue, 12 Dec 2006 13:02:51 +0000 (13:02 +0000)]
Provides test results references for

- run-m : start from 2 empty dbs, performs all tests, in mini mode
          (1 instance of each object)

- run-en : the dbs are suposed to have been populated by running -p -n
           that is with normal size, like a handful of each object
- run-eb : idem in big mode, a few hundreds of each type -
           like the public PL
- run-eh : idem in huge mode, a few thousands of each type -

1st mode is rather complete and convenient, just wipe off both dbs,
  everything is done remotely from the test node

other modes are more tedious to run,
  I usually run the populate phase locally, save the db dumps, and reinstall later on
  otherwise it's not workable
  they provide good indications of performance for
  (*) RefreshPeer from scratch
  (*) RefreshPeer in usual mode (no change done)
  (*) GetSlivers()

a rough indication in huge mode:
each plc gets populated with
1000 sites, 2000 persons, 3000 nodes & 2000 slices
1 keys/person, 3 nodes/slice & 3 persons/slice

- 1st refresh peer
   all : 407 s
   xmit:  25 s
   proc: 383 s

- 2nd refresh peer
   all :  42 s
   xmit:  25 s
   proc:  17 s
note that updating slice attributes is still not optimized wrt sync operations,
reasonably processing time could be improved to less than 10s.

- GetSlivers ()
   536 s just for getting the result from the peer, no processing

17 years ago(*) Peer has new fields person_ids and site_ids
Thierry Parmentelat [Tue, 12 Dec 2006 10:59:01 +0000 (10:59 +0000)]
(*) Peer has new fields person_ids and site_ids
    also the former person_id field gets renamed as auth_person_id
(*) new method GetPeerName to access remote plc's name as configured in PLC_NAME
(*) System slices are cached - assuming PLC_SLICE_PREFIX are different, this is no problem
    so GetSlivers filters out remote system slices
(*) RefreshPeer returns *remote* peer name as 'peername'
    formerly 'plcname' returned *local* plc name
(*) Caching mechanism now should be operational in 3+ peers federations,
       that is to say GetPeerData returns only local and caller's objects, not third-peer's
       this requires various plc names to be correctly up to date
(*) RefreshPeer attempts to ensure this is true after a few hiccups,
       this might get improved once we have peer authentication
(*) various docs updated

17 years agoremoves requirement that /etc/planetlab/plc_config should exist, for use on non-myplc...
Thierry Parmentelat [Mon, 11 Dec 2006 13:02:41 +0000 (13:02 +0000)]
removes requirement that /etc/planetlab/plc_config should exist, for use on non-myplc boxes

17 years agooops - usage was broken, still referred to global
Thierry Parmentelat [Mon, 11 Dec 2006 11:56:37 +0000 (11:56 +0000)]
oops - usage was broken, still referred to global

17 years agoprevents side-effect on foreign objects when appropriate
Thierry Parmentelat [Thu, 7 Dec 2006 09:13:55 +0000 (09:13 +0000)]
prevents side-effect on foreign objects when appropriate

17 years agovarious changes in the test suite
Thierry Parmentelat [Tue, 5 Dec 2006 16:45:33 +0000 (16:45 +0000)]
various changes in the test suite

17 years agoCache:
Thierry Parmentelat [Tue, 5 Dec 2006 16:45:03 +0000 (16:45 +0000)]
Cache:
(*) sync only when needed - drastic improvements on peering refresh
    when up2date
(*) reverted Tony's change in Cache
(*) returns a lot of timing info in the 'timers' key

Other classes:
(*) removes refreshing of timestamps - were read-only and broke sync optim.

17 years agosame function but in a class
Thierry Parmentelat [Tue, 5 Dec 2006 16:25:26 +0000 (16:25 +0000)]
same function but in a class
backward-compatible
and also provides the ability to create several instances
  for testing federation scripts

17 years ago- Fix casting of unicode strings in arrays
Mark Huang [Mon, 4 Dec 2006 19:10:47 +0000 (19:10 +0000)]
- Fix casting of unicode strings in arrays

From federico on psycopg mailing list:

Il giorno mar, 28/11/2006 alle 15.33 -0500, Mark Huang ha scritto:
>> I've noticed that Unicode strings in PostgreSQL arrays are not cast to
>> Python unicode objects:

You need to register UNICODEARRAY just as you registered UNICODE but,
ouch!, it is not exported! I'll make it exported in next release, right
now you can use one of the internals:

psycopg2.extensions.register_type(psycopg2._psycopg.UNICODEARRAY)

17 years ago- spacing nits
Mark Huang [Mon, 4 Dec 2006 15:41:43 +0000 (15:41 +0000)]
- spacing nits
- fix wildcard check

17 years agobefore we switch to using new Shell.py
Thierry Parmentelat [Mon, 4 Dec 2006 15:25:17 +0000 (15:25 +0000)]
before we switch to using new Shell.py

17 years ago- modified insert_new_item to support multiple value insert in single sql statement
Tony Mack [Fri, 1 Dec 2006 16:37:15 +0000 (16:37 +0000)]
- modified insert_new_item to support multiple value insert in single sql statement

17 years agooops-need to revert last move
Thierry Parmentelat [Fri, 1 Dec 2006 14:52:10 +0000 (14:52 +0000)]
oops-need to revert last move

17 years agocosmetic
Thierry Parmentelat [Fri, 1 Dec 2006 14:32:39 +0000 (14:32 +0000)]
cosmetic

17 years agoreturns ellapsed time
Thierry Parmentelat [Fri, 1 Dec 2006 13:16:54 +0000 (13:16 +0000)]
returns ellapsed time

17 years agodefines persons_per_slice to avoid quadratic complexity - can run with DB dumps
Thierry Parmentelat [Fri, 1 Dec 2006 08:22:59 +0000 (08:22 +0000)]
defines persons_per_slice to avoid quadratic complexity - can run with DB dumps

17 years ago- populate sites.max_slices correctly
Tony Mack [Thu, 30 Nov 2006 22:13:56 +0000 (22:13 +0000)]
- populate sites.max_slices correctly

17 years agoforeign_xrefs should be a list and not a dict anymore
Thierry Parmentelat [Thu, 30 Nov 2006 10:55:32 +0000 (10:55 +0000)]
foreign_xrefs should be a list and not a dict anymore

17 years agoGetPeerData returns separate items for local and peer data
Thierry Parmentelat [Thu, 30 Nov 2006 10:53:01 +0000 (10:53 +0000)]
GetPeerData returns separate items for local and peer data

17 years agonew naming scheme for outputs and reference outputs
Thierry Parmentelat [Thu, 30 Nov 2006 10:23:25 +0000 (10:23 +0000)]
new naming scheme for outputs and reference outputs

17 years agonew limit on nodes_per_slice to avoid quadratic total time on big tests
Thierry Parmentelat [Thu, 30 Nov 2006 10:14:06 +0000 (10:14 +0000)]
new limit on nodes_per_slice to avoid quadratic total time on big tests

17 years ago(*) implements validate_ methods for all timestamp objects
Thierry Parmentelat [Thu, 30 Nov 2006 10:12:01 +0000 (10:12 +0000)]
(*) implements validate_ methods for all timestamp objects
(*) now allows multiple sync() calls on the same object by
    reverting human-readable form to unix timestamp if needed
(*) removes extra reload formerly needed in Cache

17 years ago- order queried events by event_id
Tony Mack [Wed, 29 Nov 2006 22:14:32 +0000 (22:14 +0000)]
- order queried events by event_id

17 years ago- added support for wildcards in dictionary filters
Tony Mack [Wed, 29 Nov 2006 19:46:58 +0000 (19:46 +0000)]
- added support for wildcards in dictionary filters

17 years ago- only add optional arguments if specified
Mark Huang [Wed, 29 Nov 2006 19:43:17 +0000 (19:43 +0000)]
- only add optional arguments if specified

17 years ago- log affected object_ids
Tony Mack [Wed, 29 Nov 2006 19:05:37 +0000 (19:05 +0000)]
- log affected object_ids

17 years ago- - removed anything having to do with event_type/event_object
Tony Mack [Wed, 29 Nov 2006 18:30:10 +0000 (18:30 +0000)]
- - removed anything having to do with event_type/event_object

17 years ago- removed anything having to with event_type/event_object
Tony Mack [Wed, 29 Nov 2006 17:57:27 +0000 (17:57 +0000)]
- removed anything having to with event_type/event_object

17 years ago- fix probable checkin of debug code
Mark Huang [Wed, 29 Nov 2006 03:44:36 +0000 (03:44 +0000)]
- fix probable checkin of debug code

17 years ago- added logging vars
Tony Mack [Tue, 28 Nov 2006 22:02:33 +0000 (22:02 +0000)]
- added logging vars

17 years ago- insert Sliver into object_types table
Tony Mack [Tue, 28 Nov 2006 22:00:14 +0000 (22:00 +0000)]
- insert Sliver into object_types table

17 years ago- insert peers to object_types table
Tony Mack [Tue, 28 Nov 2006 21:48:08 +0000 (21:48 +0000)]
- insert peers to object_types table

17 years ago- fix check for foreign node
Mark Huang [Tue, 28 Nov 2006 21:34:48 +0000 (21:34 +0000)]
- fix check for foreign node
- fix case when multiple slice attributes of the same type have been set
  (e.g. proper_op)

17 years agocreates a fixed number of keys, huge test would issue 200x200 keys through xmlrpc...
Thierry Parmentelat [Tue, 28 Nov 2006 16:23:56 +0000 (16:23 +0000)]
creates a fixed number of keys, huge test would issue 200x200 keys through xmlrpc otherwise

17 years agoupdated with dump
Thierry Parmentelat [Tue, 28 Nov 2006 16:23:45 +0000 (16:23 +0000)]
updated with dump

17 years ago(*) direct cross refs redefined as NOT NULL in the database
Thierry Parmentelat [Tue, 28 Nov 2006 14:55:00 +0000 (14:55 +0000)]
(*) direct cross refs redefined as NOT NULL in the database
    (e.g. Node:site_id, Person:site_id, Slice:creator_person_id)
    NOTE. I screwed up, this was already in former commit of planetlab4.sql,

(*) cross-ref mechanism reviewed
    could not handle several xrefs with the same type in the same table

(*) undid ad-hoc trick for selecting local/foreign nodes (was named scope)
    had no added-value and was only used in TestPeers anyway

17 years agoadopted as reference
Thierry Parmentelat [Tue, 28 Nov 2006 10:25:03 +0000 (10:25 +0000)]
adopted as reference

17 years ago- fixed how node['slice_ids'] are filterd
Tony Mack [Tue, 28 Nov 2006 01:02:15 +0000 (01:02 +0000)]
- fixed how node['slice_ids'] are filterd