« CC Defaults report | Main | First productive day »

GPDB 2.0

  • Sent email to Donna describing how to work with GPDB 2.0
  • Implemented Aliases
  • Changed project search to go off of new view for project aliases
  • Fixed bug in displaying of DesignSync information for projects

This email is to describe to you how to use the new GPDB API. For the most part, for the functions you had been calling, the interface should be identical. Sometimes you'll need to change the hash that you pass in as the Perl module uses Perl hash's name/value pairs as a direct relationship to the field names and values in the database. So if you use a hash key that doesn't correspond to a database field name then it won't work.

Also (attached) is your syncGPDBAddDSProj.pl script ported to use GPDB 2.0.

Alternate Database

Note that until GPDB 2.0 is released we have GPDB 1.0 in production. The GPDB API has been augmented to allow you to specify an alternate database. The gpdb_login call supports an additional parameter to specify which database to open:

gpdb_login (username, password, db)

The gpdb_login() method takes a username and non-encrypted password as parameters and returns a user authentication string. Additionally an optional db parameter can be passed in. Default is "Oracle" and represents the production database. Use "OracleDevelopment" to access the test database. The authentication string make look like "::browse" or "readonly::browse" if (1) the username is not found in the gpdb user table or (2) the password does not match the user's enterprise password. This could be the desired effect as often the tool may be run by individuals that only need "browse" access for reference.

While gpdb_login supports this extra parameter I don't think you'll often use it. Instead you can specify which database to use in an environment variable GPDB_ACTIVE_DB:

$ export GPDB_ACTIVE_DB=OracleDevelopment
$ ./myscript.pl

Where to pick up the GPDB API

Again, because we have GPDB 1.0 in production we cannot push out the GPDB 2.0 API (Perl Modules) to the same locations as GPDB 1.0 API. As such you will need to temporarily point to them at an alternate location. Here's a full set of Perl use statements needed:

# Standard CDOE modules (Modules of the month!)
use lib "/apps/perl/modules-0609/lib";

# Perl/Oracle libraries
use lib "/apps/oracle/perl/10.2.0.1.0/lib";

#use lib "/apps/cmpackages/perl/lib/site_perl/5.8.0";
use lib "/web/gpdb/cgi-bin";

use GPDB::gpdb;

When the GPDB API 2.0 gets released we can use the /apps/cmpackages/perl/lib/site_perl/5.8.0 and remove the /web/gpdb/cgi-bin use statement.

GPDB now authenticates to the enterprise LDAP

GPDB logins now use your AXID and your enterprise password! If this is incorrect then you will only be granted read access. If you specify a proper AXID and enterprise password you will authenticate. GPDB then checks with its users table to see if you have been granted administrative, thus read/write, access. There is also a GPDB administrative user that can be used for long running, cron like scripts.

Did somebody ask for aliases?

I've implemented a rudimentary form of aliases since you were so interested in them. Aliases are global (and alias of "foo" related to a project "bar" at all sites). You can add or delete aliases on the Update Project screen (e.g. faraday Project). Additionally the Project: Search screen will search for projects based on name and alias.

Oracle/Linux issues

We are still kinda of working out how to access Oracle on Linux through Perl.

syncGPDBAddDSProj.pl script

I've ported this script (attached) to GPDB 2.0. Note the comments in the code about changed required for GPDB 2.0. Here is a command line execution:

$ ./syncGPDBAddDSProj.pl -f Dallas -p 10000 -a <userid> -w <password> \
> -n andrew_defaria -g ASIC -c /tmp -s drteeth.dal.design.ti.com

And you can see the project added here.

TrackBack

TrackBack URL for this entry:
http://defaria.com/mt/mt-tb.cgi/31