" /> Status for Andrew DeFaria: May 2007 Archives

« April 2007 | Main | June 2007 »

May 22, 2007

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.

May 10, 2007

CC Defaults report

  • Added CC Defaults Report
  • Changed export to export as per the tableName
  • Changed export to export some files not listed on the web page

May 8, 2007

GPDB Enhancements

  • Added export to CSV file to reports
  • Made DesignSync servers links to the server:port
  • Added links to Project names Site names on reports
  • Added edit link to screen after you update a Project or Site
Nelson, Bill wrote:

I took a look at GPDB - looking better each day. Looks like you have some links done in the reports

Yes I have...

still need a .CSV dump button.

Done!

When you display a page like the project@site one, I like the edit link up next to the Logout link but after I change something on the page and select Update, the link goes away. Can you have it so that after the page is re-displayed, the Edit link remains?

Done.

For the list of Users, when you select the user ID you go to the Directory Services look up but we also wanted to have a single User Display where you saw the ORG-SBE, Sites, and Projects the user was associated with.

I need to make the users display screen. All that's in the Users record is pretty much what you see on the user list (BTW: The user list needs to be paged too as it's growing lengthy). So, IOW, I need to make a display that displays the info in the Users table as well as bring in the Org/SBE mapping table. Of course I also need to do the Org/SBE stuff too. Since I have nowhere to link to yet I have not made this link/association.

Maybe we could do this link off of the user’s name.

I'm not sure that that will not be confusing, at least at first, to users. When the see the user list they only see that both AXID and User Name are linked. They would not immediately think "Oh one links to one place and the other links to another place". How best to present this is, of course, the question...

When we display the DesignSync info, we were going to link the Server name to go to the ProjectSync address using the following format ->http://<server>:<DS Port> so for the following we would have a link on Server of http://sync9136.design.ti.com:9136

DesignSync Vault

Site:

Bangalore

DS

PGS

Secure

HCM:

Status:

Server:

sync9136.design.ti.com

9136

9137

9138

N

Active

Path:

/data/sitd_vault/sync9136.design.ti.com/9136/server_vault

Cache:

/data/sitd_cache/sync9136.design.ti.com/9136/server_cache

Done, although I don't know how to log into such sites. I'm asked for my username and password. I use my normal username and enterprise password and I get access denied for this "projectsync" login. Now normally I'd ask one of the DesignSync guys around here but they all appear to be missing! ;-)

Oh, BTW, I added this link to the DesignSync Report, though many of them seem to not be set up or responding.

May 4, 2007

LDAP changes/Synonyms and Grants/Reports

  • Change primitives::login and ldap_authenticate to return a user record of user information if we can find it in LDAP, even if we could not authenticate the password, and pass back proper status
  • Straightened out new views WRT Synonyms and Grants
  • Implemented Users, Clearcase and DesignSync reports

Synonyms and Grants

When one creates a table or view in Oracle it appears to be "private" to the user who has created it. Others can get to the table but they need to specify a more qualified name. Additionally the need to have been granted access to it (at least select access).

So if we create a view, say foo, we also need to grant select access to those tables to the other users who might be using it. Additionally, in GPDB we have 3 DB level usernames: cm_gpdb, cm_gpdb_readonly and cm_gpdb_update. So if we create the view foo while logged in as cm_gpdb then login as say cm_gpdb_readonly, this new session will not be able to see foo.

So then the sequence is:

  1. Create the table or view
  2. create or replace view foo ...
    
  3. Grant select privileges to the table or view:
  4. grant select to foo on cm_gpdb.foo for cm_gpdb_readonly
    
  5. Log into Oracle database as other user and create synonym:
  6. create or replace synonym foo for cm_gpdb.foo
    

Notes

  1. The database's schema name for GPDB is cm_gpdb above
  2. Grants need to be done whenever the table or view is recreated. Synonyms, being pointers, need to be created only when a new pointer is needed

May 3, 2007

GPDB/LDAP/Org/SBE

  • Added Org/SBE drop down to edit Project
  • Integrated LDAP!
  • Changed primitive.pm to authenticate with LDAP!

  • Added description to Org/SBE and removed password
  • Added edit links to showProject and showSite

GPDB (Org/SBE and others)

  • Changed org_sbe.name to link up with parent_project
  • Created org_sbe.sql to add org_sbe entries
  • Added gpdb_getOrgSBE and gpdb_putOrgSBE to gpdb.pm
  • Added Org/SBE menu
  • Changed various new tables to to be uniform in width
  • Fixed a few bugs regarding adding of sites where no site domains are added
  • Added much of Update Project
  • Fixed bug with update CCDefaults for Projects
  • Added screen for adding CCDefaults when adding a project

May 1, 2007

GPDB Enhancements/Fixes

GPDB Login

  • Moved to the top.
  • Changed wording to be more friendly
  • Login with unknown username puts up a warning but grants read only access
  • Login with known username but wrong password is properly denoted

Other changes

  • In Project display, site defaults are not listed on top of the Project defaults.
  • Change width of tables to line up with the menus across the top.
  • Updating of project CC defaults still not working correctly
  • Added Add Project