In case anyone is interested, this is how I went about implementing an ORACLE RAC on iTOP 1.2:
1) Create a 'parent_id' attribute in the SoftwareInstance class. This will allow you to establish relationships between SoftwareInstance and its derived classes.
2) Modify the GetRelationQueries function in SoftwareInstnace class, adding the child_softwareinstances and parent_dbinstances lines.
This will make sure iTop draws the relationships between SoftwareInstances when you generate an IMPACT or DEPENDS ON graph.
3. Create class called DBRacInstance (or whatever name you like). Just copy and paste code from DBServerInstance and adjust. I also suggest making your own ICON for the RAC to make it stand out from the others.
4. (VERY IMPORTANT) Go back to the SoftwareInstance class and change the attribute device_id so that it allows null values. You do this because the Oracle RAC is composed of any number of node instanaces each installed on its own machine (server)…but the RAC itself isn't confined to a single machine:
MetaModel::Init_AddAttribute(newAttributeExternalKey("device_id",array("targetclass"=>"Device","jointype"=>null,"allowed_values"=>newValueSetObjects('SELECT Device WHERE org_id = :this->org_id'),"sql"=>"device_id","is_null_allowed"=>true,"on_target_delete"=>DEL_MANUAL,"depends_on"=>array("org_id"))));
5. Make the necessary adjustments to the dictionary to ensure that your labels and fields appear the way they should.
With this I was able to link different Oracle DBServerIntances. each linked to their own Server, to a DBRacInstance . Here is a screen shot: http://img213.imageshack.us/img213/358/rac.png
Obviously this was a workaround solution….what I probably should have done was make my all my adaptations to the new class, and make more use of object orientation…I'll work on an update and post here when I'm done.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi again…I had to make afew adjustments to the solution:
- When you create the class for the RAC, make sure you change the db_table paramter in the init function to its own particular table. Originally because I simply copied the DBServerInStance Class it was pointing to the SoftwareInstance_DB Server Table which resulted in the DB Server Instances and DBRacInstances being listed in both categories.
- In order to link the DatabaseInstance to either a regular DBServerInstance or a DBRacInstance I had to add an attribute to the DBInstance class to allow me to specify a RAC Server for a given Database Instance. And I had to make this field as well DBServer both accept NULL values.
- I modified the CIS_MENU.HTML file to list the RAC along with teh other CI classes:
<divclass="element"><itopblockBlockClass="DisplayBlock"type="actions"asynchronous="false"encoding="text/oql"parameters="context_filter:1">SELECT DBRacInstance</itopblock></div><!-- element -->
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
In case anyone is interested, this is how I went about implementing an ORACLE RAC on iTOP 1.2:
1) Create a 'parent_id' attribute in the SoftwareInstance class. This will allow you to establish relationships between SoftwareInstance and its derived classes.
2) Modify the GetRelationQueries function in SoftwareInstnace class, adding the child_softwareinstances and parent_dbinstances lines.
This will make sure iTop draws the relationships between SoftwareInstances when you generate an IMPACT or DEPENDS ON graph.
3. Create class called DBRacInstance (or whatever name you like). Just copy and paste code from DBServerInstance and adjust. I also suggest making your own ICON for the RAC to make it stand out from the others.
4. (VERY IMPORTANT) Go back to the SoftwareInstance class and change the attribute device_id so that it allows null values. You do this because the Oracle RAC is composed of any number of node instanaces each installed on its own machine (server)…but the RAC itself isn't confined to a single machine:
5. Make the necessary adjustments to the dictionary to ensure that your labels and fields appear the way they should.
With this I was able to link different Oracle DBServerIntances. each linked to their own Server, to a DBRacInstance . Here is a screen shot: http://img213.imageshack.us/img213/358/rac.png
Obviously this was a workaround solution….what I probably should have done was make my all my adaptations to the new class, and make more use of object orientation…I'll work on an update and post here when I'm done.
Hi again…I had to make afew adjustments to the solution:
- When you create the class for the RAC, make sure you change the db_table paramter in the init function to its own particular table. Originally because I simply copied the DBServerInStance Class it was pointing to the SoftwareInstance_DB Server Table which resulted in the DB Server Instances and DBRacInstances being listed in both categories.
- In order to link the DatabaseInstance to either a regular DBServerInstance or a DBRacInstance I had to add an attribute to the DBInstance class to allow me to specify a RAC Server for a given Database Instance. And I had to make this field as well DBServer both accept NULL values.
- I modified the CIS_MENU.HTML file to list the RAC along with teh other CI classes: