plcapi.git
17 years ago- comments
Tony Mack [Tue, 21 Nov 2006 20:07:06 +0000 (20:07 +0000)]
- comments

17 years ago- fix db archive
Tony Mack [Tue, 21 Nov 2006 20:01:25 +0000 (20:01 +0000)]
- fix db archive

17 years ago- cast default values correctly
Mark Huang [Tue, 21 Nov 2006 20:00:53 +0000 (20:00 +0000)]
- cast default values correctly

17 years ago- fix db encoding check
Tony Mack [Tue, 21 Nov 2006 16:52:51 +0000 (16:52 +0000)]
- fix db encoding check

17 years ago- support joins and wheres in config file
Tony Mack [Tue, 21 Nov 2006 15:25:30 +0000 (15:25 +0000)]
- support joins and wheres in config file

17 years agoregenerate
Thierry Parmentelat [Tue, 21 Nov 2006 10:59:38 +0000 (10:59 +0000)]
regenerate

17 years agoiteration 4 & last:
Thierry Parmentelat [Tue, 21 Nov 2006 10:57:00 +0000 (10:57 +0000)]
iteration 4 & last:

- ForeignNode(s) and ForeignSlice(s) deprecated

- Node and Slice both have a peer_id field that can be used
  for testing locality (peer_is is None)

- associations peer x node and peer x slice not managed in
  a separate table anymore (were peer_node and peer_slice)
  peer_id is defined as a native column instead

- local nodes can be retrieved with
  GetNodes (auth, {'peer_id':None})
  GetNodes (auth, {'hostname':[name1,name2], 'peer_id':None})
or
  GetNodes (auth, None, None, 'local')
  GetNodes (auth, ['name1','name2'] , None, 'local')
- foreign nodes can be retrieved similarly with
  GetNodes (auth, {'hostname':[name1,name2], '~peer_id':None})
or
  GetNodes (auth, ['name1','name2'] , None, 'foreign')

- the 4th argument to GetNodes is named 'scope'.
  It is only experimental by now,  Slices do not have it as of now,
  will decide later whether we provide it for all cached entities

- WARNING :
  Having Nodes and Slices return ALL entities might have impacts on
  other methods; most of which making sense on LOCAL entities only.
  Might need a review.

17 years agosupport for negation with fields starting with ~
Thierry Parmentelat [Tue, 21 Nov 2006 10:22:05 +0000 (10:22 +0000)]
support for negation with fields starting with ~

17 years agoupdated
Thierry Parmentelat [Tue, 21 Nov 2006 10:06:40 +0000 (10:06 +0000)]
updated

17 years ago- changes to addresses, site_address, address_address_type table config (person_addre...
Tony Mack [Mon, 20 Nov 2006 16:17:26 +0000 (16:17 +0000)]
- changes to addresses, site_address, address_address_type table config (person_addresses with type 10001 now considered site_addresses)

17 years agoreverting deleted->is_deleted
Thierry Parmentelat [Mon, 20 Nov 2006 10:06:36 +0000 (10:06 +0000)]
reverting deleted->is_deleted

17 years ago- update sequences values after repopulating tables
Tony Mack [Fri, 17 Nov 2006 19:48:35 +0000 (19:48 +0000)]
- update sequences values after repopulating tables

17 years ago- updated to reflect recent db schema changes
Tony Mack [Fri, 17 Nov 2006 19:32:24 +0000 (19:32 +0000)]
- updated to reflect recent db schema changes

17 years ago- change all occurrences of slices.deleted to slices.is_deleted
Tony Mack [Fri, 17 Nov 2006 19:31:08 +0000 (19:31 +0000)]
- change all occurrences of slices.deleted to slices.is_deleted

17 years agoadapted to cope with a myplc that doesnt know about 'system' slices
Thierry Parmentelat [Fri, 17 Nov 2006 11:55:28 +0000 (11:55 +0000)]
adapted to cope with a myplc that doesnt know about 'system' slices

17 years agoupdated
Thierry Parmentelat [Fri, 17 Nov 2006 11:15:30 +0000 (11:15 +0000)]
updated

17 years agoadded in view site_slices
Thierry Parmentelat [Fri, 17 Nov 2006 10:43:17 +0000 (10:43 +0000)]
added in view site_slices
WHERE deleted is false
so that deleted slices dont get reported in Site,
and more importantly dont get counted when checking for max_slices at slice creation

17 years agoprovides tests for slice deletion
Thierry Parmentelat [Fri, 17 Nov 2006 10:01:00 +0000 (10:01 +0000)]
provides tests for slice deletion
scales to n nodes and s slices (currently 5 and 3)
kind of sslloooowww due to numerous xmlrpc requests
could use a generic mapper function in the API for optimizing that

17 years agooops, probably broke the build - my mistake
Thierry Parmentelat [Fri, 17 Nov 2006 09:57:28 +0000 (09:57 +0000)]
oops, probably broke the build - my mistake
this change was need togother with another one I made yesterday on
AddSliceToNodes.py DeleteSliceFromNodes.py
remove ugly hack - just assert node isinstance of Node OR ForeignNode

17 years ago- consider slices with slice attribute system=1 to be system slices
Mark Huang [Thu, 16 Nov 2006 18:44:27 +0000 (18:44 +0000)]
- consider slices with slice attribute system=1 to be system slices
- don't add the same sliver twice

17 years agoadd subject field to messages table
Mark Huang [Thu, 16 Nov 2006 17:03:36 +0000 (17:03 +0000)]
add subject field to messages table

17 years agoreviewed for (more) idempotence - parts are more independant
Thierry Parmentelat [Thu, 16 Nov 2006 11:54:58 +0000 (11:54 +0000)]
reviewed for (more) idempotence - parts are more independant

17 years agoremove ugly hack - just assert node isinstance of Node OR ForeignNode
Thierry Parmentelat [Thu, 16 Nov 2006 11:53:57 +0000 (11:53 +0000)]
remove ugly hack - just assert node isinstance of Node OR ForeignNode

17 years agochecks for node removal in slices
Thierry Parmentelat [Thu, 16 Nov 2006 10:20:32 +0000 (10:20 +0000)]
checks for node removal in slices

17 years agoDeleteSliceFromNodes needs the same cooking as AddSliceToNodes
Thierry Parmentelat [Thu, 16 Nov 2006 10:19:26 +0000 (10:19 +0000)]
DeleteSliceFromNodes needs the same cooking as AddSliceToNodes
this is not the right way to do it but it works for now

17 years ago- don't quit if no message template exists
Mark Huang [Wed, 15 Nov 2006 22:18:17 +0000 (22:18 +0000)]
- don't quit if no message template exists

17 years ago- define/modify logging variables
Tony Mack [Wed, 15 Nov 2006 21:36:04 +0000 (21:36 +0000)]
- define/modify logging variables

17 years ago- add SliceInstantiation as an object_type in object_types table
Tony Mack [Wed, 15 Nov 2006 21:34:48 +0000 (21:34 +0000)]
- add SliceInstantiation as an object_type in object_types table

17 years ago- add message as an object_type in object_types table
Tony Mack [Wed, 15 Nov 2006 21:07:30 +0000 (21:07 +0000)]
- add message as an object_type in object_types table

17 years ago- dump the db as postgres instead of pgsqluser
Tony Mack [Wed, 15 Nov 2006 20:19:55 +0000 (20:19 +0000)]
- dump the db as postgres instead of pgsqluser

17 years agotoo numerous changes to detail
Thierry Parmentelat [Wed, 15 Nov 2006 17:25:06 +0000 (17:25 +0000)]
too numerous changes to detail
can run in shell mode from empty databases
still need to check for slice deletions

17 years ago- remove object_ids as class variable declaration
Tony Mack [Wed, 15 Nov 2006 17:23:01 +0000 (17:23 +0000)]
- remove object_ids as class variable declaration

17 years agostill works in unfederated context, with a bug fix:
Thierry Parmentelat [Wed, 15 Nov 2006 16:55:28 +0000 (16:55 +0000)]
still works in unfederated context, with a bug fix:
  slice_ids needs to be initialized from a copy of default_slice_ids

also starts working on a federating peer. in this case
- and right now the keys/attributes that come from another peer
  - i.e. through ForiegnSlices - are filled with dummy data
- we expect GetSlivers to be called mainly from a node to its canonical(MA) plc

17 years ago- remove some print statements
Tony Mack [Wed, 15 Nov 2006 16:53:07 +0000 (16:53 +0000)]
- remove some print statements

17 years agonow returns a dict rather than a tuple
Thierry Parmentelat [Wed, 15 Nov 2006 16:50:58 +0000 (16:50 +0000)]
now returns a dict rather than a tuple

17 years ago- keep up to date with recent changes in planetlab4.sql schema
Tony Mack [Wed, 15 Nov 2006 16:46:50 +0000 (16:46 +0000)]
- keep up to date with recent changes in planetlab4.sql schema

17 years ago- fix peer_slice_slice_id_idx
Tony Mack [Wed, 15 Nov 2006 16:42:12 +0000 (16:42 +0000)]
- fix peer_slice_slice_id_idx

17 years ago- fix random bugs
Tony Mack [Wed, 15 Nov 2006 16:04:42 +0000 (16:04 +0000)]
- fix random bugs

17 years ago- fix bug in archive_db()
Tony Mack [Wed, 15 Nov 2006 15:23:27 +0000 (15:23 +0000)]
- fix bug in archive_db()

17 years ago- provides ability to cache foreign slices
Thierry Parmentelat [Wed, 15 Nov 2006 10:59:55 +0000 (10:59 +0000)]
- provides ability to cache foreign slices
  only LOCAL nodes are known to foreign slices, with their local id as expected

- RefreshPeer logic currently is
  *) invoke GetNodes and cache into ForeignNodes
  *) invoke ForeignNodes, not cached for now, used in next step
  *) invoke GetSlices, then caches into ForeignSlices,
     only local nodes are considered, with their alien node_ids transcoded
     to local node_ids

- gets rid of the foreign_id columns in peer_node and peer_slice,
  that turned out useless

=== a few pending issues

- GetSlivers not yet updated accordingly
  it still works on non-federated plcs

- site_id and creator_person_id in the slices table
  are not declared 'NOT NULL' anymore.
  as far as GetSlices is concerned these entries are still non null,
  as per the WHERE stuff added on view_slices

- refreshing the db to update the slice x node association is done
  in a clear-all/add-all fashion that clearly sucks.

- the caching logic is currently in Peers.py which is clearly wrong
  there's a need for refactoring these 2 types of cached objects
  to provide more genericity

17 years agoold commented stuff for indexing (now that we use Table.dict) really deleted
Thierry Parmentelat [Wed, 15 Nov 2006 10:18:36 +0000 (10:18 +0000)]
old commented stuff for indexing (now that we use Table.dict) really deleted

17 years ago- reconnect to db after utf8 encoding
Tony Mack [Tue, 14 Nov 2006 22:08:31 +0000 (22:08 +0000)]
- reconnect to db after utf8 encoding

17 years ago- initial checking of db upgrade scripts
Tony Mack [Tue, 14 Nov 2006 21:52:00 +0000 (21:52 +0000)]
- initial checking of db upgrade scripts

17 years agorename column is_deleted in slices as deleted for consistency with all other tables
Thierry Parmentelat [Tue, 14 Nov 2006 10:04:07 +0000 (10:04 +0000)]
rename column is_deleted in slices as deleted for consistency with all other tables

17 years agopkills instances of Shell.py prior to dropping database
Thierry Parmentelat [Tue, 14 Nov 2006 09:46:48 +0000 (09:46 +0000)]
pkills instances of Shell.py prior to dropping database

17 years agorename column is_deleted in slices as deleted for consistency with all other tables
Thierry Parmentelat [Tue, 14 Nov 2006 09:44:40 +0000 (09:44 +0000)]
rename column is_deleted in slices as deleted for consistency with all other tables

17 years agotake advantage of the new Table::dict method
Thierry Parmentelat [Tue, 14 Nov 2006 09:43:28 +0000 (09:43 +0000)]
take advantage of the new Table::dict method

17 years ago- add default system slices (those beginning with PLC_SLICE_PREFIX) to
Mark Huang [Mon, 13 Nov 2006 18:47:34 +0000 (18:47 +0000)]
- add default system slices (those beginning with PLC_SLICE_PREFIX) to
  each local node
- use Table.dict()

17 years ago- allow login_base to be updated
Mark Huang [Mon, 13 Nov 2006 18:43:37 +0000 (18:43 +0000)]
- allow login_base to be updated

17 years ago- rename Table.row to Table.classobj for clarity
Mark Huang [Mon, 13 Nov 2006 18:43:21 +0000 (18:43 +0000)]
- rename Table.row to Table.classobj for clarity
- add Table.dict() for returning table as a dict keyed on
  Row.primary_key

17 years ago- add unique constraint on peer_node.node_id
Mark Huang [Mon, 13 Nov 2006 18:41:59 +0000 (18:41 +0000)]
- add unique constraint on peer_node.node_id

17 years agoupdated
Thierry Parmentelat [Mon, 13 Nov 2006 16:24:06 +0000 (16:24 +0000)]
updated

17 years agoregenerated
Thierry Parmentelat [Mon, 13 Nov 2006 16:23:40 +0000 (16:23 +0000)]
regenerated

17 years agoeverything ready to receive foreign slices
Thierry Parmentelat [Mon, 13 Nov 2006 16:23:11 +0000 (16:23 +0000)]
everything ready to receive foreign slices
the actual part in RefreshPeer still needs to be written
based on what's done with nodes
also, peer_node and peer_slice now hold foreign_id,
i.e. the id as known on the peer side, for being able to
perform the right mapping at the time GetSlivers gets called

17 years ago- allow max_slices and max_slivers to be set when adding a new site
Mark Huang [Sat, 11 Nov 2006 17:58:17 +0000 (17:58 +0000)]
- allow max_slices and max_slivers to be set when adding a new site

17 years agonodenetworks cannot be referred to by ip (may be NULL)
Mark Huang [Fri, 10 Nov 2006 19:30:10 +0000 (19:30 +0000)]
nodenetworks cannot be referred to by ip (may be NULL)

17 years agoworks reasonably well, still requires manual tweak in the DB for (*& plain passwd
Thierry Parmentelat [Fri, 10 Nov 2006 17:22:28 +0000 (17:22 +0000)]
works reasonably well, still requires manual tweak in the DB for (*& plain passwd

17 years ago- fix quoting of message_id
Mark Huang [Fri, 10 Nov 2006 17:06:35 +0000 (17:06 +0000)]
- fix quoting of message_id

17 years agoconvenience for test: scratch db, push api, this kind of stuff
Thierry Parmentelat [Fri, 10 Nov 2006 17:02:22 +0000 (17:02 +0000)]
convenience for test: scratch db, push api, this kind of stuff

17 years ago- RefreshPeer & AddSliceToNodes had bugs
Thierry Parmentelat [Fri, 10 Nov 2006 17:00:21 +0000 (17:00 +0000)]
- RefreshPeer & AddSliceToNodes had bugs
- foreign nodes have timestamps

17 years ago- use php module directory given by php-config
Mark Huang [Fri, 10 Nov 2006 15:54:14 +0000 (15:54 +0000)]
- use php module directory given by php-config

17 years agopeer x foreign_node relationship in a separate peer_node table -- uses new db interface
Thierry Parmentelat [Fri, 10 Nov 2006 15:05:52 +0000 (15:05 +0000)]
peer x foreign_node relationship in a separate peer_node table -- uses new db interface

17 years agobuild and install our own custom xmlrpc.so extension
Mark Huang [Fri, 10 Nov 2006 06:34:19 +0000 (06:34 +0000)]
build and install our own custom xmlrpc.so extension

17 years agoNULL is no longer a special value and can be marshalled; set optional parameters...
Mark Huang [Fri, 10 Nov 2006 06:32:26 +0000 (06:32 +0000)]
NULL is no longer a special value and can be marshalled; set optional parameters to their appropriate defaults

17 years agosupport marshalling NULL as <nil/>
Mark Huang [Fri, 10 Nov 2006 06:31:50 +0000 (06:31 +0000)]
support marshalling NULL as <nil/>

17 years agobuild xmlrpc.so PHP extension
Mark Huang [Fri, 10 Nov 2006 06:30:44 +0000 (06:30 +0000)]
build xmlrpc.so PHP extension

17 years agoThis commit was generated by cvs2svn to compensate for changes in r467,
Mark Huang [Fri, 10 Nov 2006 02:41:39 +0000 (02:41 +0000)]
This commit was generated by cvs2svn to compensate for changes in r467,
which included commits to RCS files with non-trunk default branches.

17 years agoadd pldistro and date to release tag
Mark Huang [Thu, 9 Nov 2006 19:56:23 +0000 (19:56 +0000)]
add pldistro and date to release tag

17 years agoregenerate
Mark Huang [Thu, 9 Nov 2006 19:49:23 +0000 (19:49 +0000)]
regenerate

17 years ago- re-enable return_fields specification
Mark Huang [Thu, 9 Nov 2006 19:43:57 +0000 (19:43 +0000)]
- re-enable return_fields specification
- since the primary key of each table may not be specified in
  return_fields, Table is now a list instead of a dict, which
  mirrors the actual return type of the Get() functions anyway

17 years ago- selectall: key_field implies hashref
Mark Huang [Thu, 9 Nov 2006 19:34:04 +0000 (19:34 +0000)]
- selectall: key_field implies hashref

17 years ago- Filters can be null
Mark Huang [Thu, 9 Nov 2006 19:32:20 +0000 (19:32 +0000)]
- Filters can be null

17 years agoallow tuples and sets as sequence filters
Mark Huang [Thu, 9 Nov 2006 03:07:42 +0000 (03:07 +0000)]
allow tuples and sets as sequence filters

17 years agooops, allow nodes to be specified by node_id for now
Mark Huang [Thu, 9 Nov 2006 03:07:20 +0000 (03:07 +0000)]
oops, allow nodes to be specified by node_id for now

17 years ago- fix clean rule
Mark Huang [Wed, 8 Nov 2006 23:27:52 +0000 (23:27 +0000)]
- fix clean rule

17 years agoregenerate
Mark Huang [Wed, 8 Nov 2006 23:15:10 +0000 (23:15 +0000)]
regenerate

17 years ago- use Filter to select rows
Mark Huang [Wed, 8 Nov 2006 23:13:11 +0000 (23:13 +0000)]
- use Filter to select rows
- psycopg2 obviates the need for manual aggregation
- remove from pcu_node when deleting

17 years agoallow filters to be specified in most Get() calls
Mark Huang [Wed, 8 Nov 2006 23:11:49 +0000 (23:11 +0000)]
allow filters to be specified in most Get() calls

17 years agoimplement slice_instantiatins modification
Mark Huang [Wed, 8 Nov 2006 23:11:35 +0000 (23:11 +0000)]
implement slice_instantiatins modification

17 years agoadded Filter
Mark Huang [Wed, 8 Nov 2006 23:11:25 +0000 (23:11 +0000)]
added Filter

17 years ago- fix documentation
Mark Huang [Wed, 8 Nov 2006 23:08:47 +0000 (23:08 +0000)]
- fix documentation
- don't accept node_ids, only hostnames
- if caller is a node, just return that node's slivers

17 years ago- no need for os
Mark Huang [Wed, 8 Nov 2006 23:06:08 +0000 (23:06 +0000)]
- no need for os
- use Filter to select rows
- should be admin-only

17 years ago- don't validate creator_person_id; if creator is deleted, then slice
Mark Huang [Wed, 8 Nov 2006 23:04:44 +0000 (23:04 +0000)]
- don't validate creator_person_id; if creator is deleted, then slice
  cannot be updated
- use Filter to select rows
- psycopg2 obviates the need for manual aggregation

17 years ago- implement for real
Mark Huang [Wed, 8 Nov 2006 23:03:18 +0000 (23:03 +0000)]
- implement for real

17 years ago- use Filter to select rows
Mark Huang [Wed, 8 Nov 2006 23:03:05 +0000 (23:03 +0000)]
- use Filter to select rows

17 years ago- use Filter to select rows
Mark Huang [Wed, 8 Nov 2006 23:02:39 +0000 (23:02 +0000)]
- use Filter to select rows
- psycopg2 obviates the need for manual aggregation

17 years ago- use Table.selectall()
Mark Huang [Wed, 8 Nov 2006 23:02:10 +0000 (23:02 +0000)]
- use Table.selectall()

17 years ago- timestamp is r/o
Mark Huang [Wed, 8 Nov 2006 22:55:55 +0000 (22:55 +0000)]
- timestamp is r/o
- use Filter to select rows
- psycopg2 obviates the need for manual aggregation

17 years ago- Auth does not need to be a subclass of dict
Mark Huang [Wed, 8 Nov 2006 22:53:30 +0000 (22:53 +0000)]
- Auth does not need to be a subclass of dict
- use dict filter for looking up accounts

17 years ago- use Filter to select rows
Mark Huang [Wed, 8 Nov 2006 22:45:20 +0000 (22:45 +0000)]
- use Filter to select rows
- psycopg2 obviates the need for manual aggregation

17 years ago- use Filter to select rows
Mark Huang [Wed, 8 Nov 2006 22:44:02 +0000 (22:44 +0000)]
- use Filter to select rows

17 years ago- support psycopg2
Mark Huang [Wed, 8 Nov 2006 22:43:02 +0000 (22:43 +0000)]
- support psycopg2
- fix quote() (require it to be map()-ed onto lists of parameters, so
  that we can quote arrays)

17 years ago- use Filter to select rows
Mark Huang [Wed, 8 Nov 2006 22:34:05 +0000 (22:34 +0000)]
- use Filter to select rows

17 years ago- move python_type and xmlrpc_type to Parameter
Mark Huang [Wed, 8 Nov 2006 22:11:26 +0000 (22:11 +0000)]
- move python_type and xmlrpc_type to Parameter
- allow min and max for list parameters

17 years ago- move python_type() and xmlrpc_type() here
Mark Huang [Wed, 8 Nov 2006 22:10:00 +0000 (22:10 +0000)]
- move python_type() and xmlrpc_type() here

17 years ago- add generic Filter class for Get() requests: eases filtering on one
Mark Huang [Wed, 8 Nov 2006 22:09:41 +0000 (22:09 +0000)]
- add generic Filter class for Get() requests: eases filtering on one
  or more columns of a table, for a specific value for each column, or a
  list of possible values for each column

17 years ago- rename fill to selectall
Mark Huang [Wed, 8 Nov 2006 22:08:09 +0000 (22:08 +0000)]
- rename fill to selectall

17 years ago- remove array_to_string() casts; psycopg2 automatically converts
Mark Huang [Wed, 8 Nov 2006 22:07:29 +0000 (22:07 +0000)]
- remove array_to_string() casts; psycopg2 automatically converts
  PostgreSQL array types to Python lists

17 years agobuild and install psycopg2
Mark Huang [Wed, 8 Nov 2006 21:56:32 +0000 (21:56 +0000)]
build and install psycopg2

17 years agoUnicode array elements are always cast to regular Python strings; always cast strings...
Mark Huang [Wed, 8 Nov 2006 21:53:50 +0000 (21:53 +0000)]
Unicode array elements are always cast to regular Python strings; always cast strings to unicode objects for now