Customizing the IdML book
The following example shows the IdML book used for the import.
- Add the section before the
BEGINNING OF CONTENTcomment to any custom IdML book. - Append the section after the
END OF CONTENTcomment to any custom IdML book.
<?xml version="1.0" encoding="UTF-8" ?>
<idml:idml xmlns:idml="http://www.ibm.com/xmlns/swg/idml"
xmlns:cdm="http://www.ibm.com/xmlns/swg/cdm"
xmlns:tbsm="http://www.ibm.com/xmlns/swg/tbsm"
xmlns:my="http://www.ibm.com/xmlns/swg/my"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.ibm.com/xmlns/swg/idml
idml.xsd">
<!-- NOTE THIS IDML BOOK DOES NOT FOLLOW STANDARD IDML CONVENTION
ITS CONTENTS ARE SUPPORTED ONLY WITH TBSM 4.2 PLUS ENHANCEMENTS
-->
<!-- Source and Software... -->
<idml:source IdMLSchemaVersion="0.8">
<cdm:process.ManagementSoftwareSystem CDMSchemaVersion="2.7">
<cdm:MSSName>ibm-cdm:///CDMMSS/ManufacturerName=AnyCustomer+ProductName=
AnyProductName</cdm:MSSName>
</cdm:process.ManagementSoftwareSystem>
</idml:source>
<!-- Operation... -->
<idml:operationSet opid="1">
<idml:refresh>
<idml:create>
<cdm:CDM-ER-Specification>
<!-- BEGINNING OF CONTENT -->
<my:router id='RouterA' >
<tbsm:resType>Router</tbsm:resType>
<tbsm:Label>RouterA: Cisco 3845</tbsm:Label>
<my:identity>RouterA</my:identity>
<tbsm:attr1>192.168.1.0</tbsm:attr1>
</my:router>
<my:router id='Router1' >
<tbsm:resType>Router</tbsm:resType>
<tbsm:Label>Router1: Cisco 3845</tbsm:Label>
<my:identity>Router1</my:identity>
<tbsm:attr1>192.168.1.2</tbsm:attr1>
</my:router>
<my:router id='Router2' >
<tbsm:resType>Router</tbsm:resType>
<tbsm:Label>Router2: Cisco 3845</tbsm:Label>
<my:identity>Router2</my:identity>
<tbsm:attr1>192.168.1.3</tbsm:attr1>
</my:router>
<my:vlan id='VLAN1' >
<tbsm:resType>VLAN</tbsm:resType>
<tbsm:Label>VLAN1</tbsm:Label>
<my:identity>VLAN1</my:identity>
<tbsm:attr1>192.168.1.10-50</tbsm:attr1>
</my:vlan>
<my:vlan id='VLAN2' >
<tbsm:resType>VLAN</tbsm:resType>
<tbsm:Label>VLAN2</tbsm:Label>
<my:identity>VLAN2</my:identity>
<tbsm:attr1>192.168.10.100-200</tbsm:attr1>
</my:vlan>
<my:switch id='Switch1' >
<tbsm:resType>Switch</tbsm:resType>
<tbsm:Label>Switch1: Cisco 14 2950 (24 Port)</tbsm:Label>
<my:identity>Switch1</my:identity>
<tbsm:attr1>192.168.1.10</tbsm:attr1>
</my:switch>
<my:switch id='Switch2' >
<tbsm:resType>Switch</tbsm:resType>
<tbsm:Label>Switch2: Cisco 3560</tbsm:Label>
<my:identity>Switch2</my:identity>
<tbsm:attr1>192.168.2.10</tbsm:attr1>
</my:switch>
<my:switch id='Switch3' >
<tbsm:resType>Switch</tbsm:resType>
<tbsm:Label>Switch3: Cisco 3560</tbsm:Label>
<my:identity>Switch3</my:identity>
<tbsm:attr1>192.168.3.10</tbsm:attr1>
</my:switch>
<my:switch id='Switch4' >
<tbsm:resType>Switch</tbsm:resType>
<tbsm:Label>Switch4: Cisco 2950 (24 Port)</tbsm:Label>
<my:identity>Switch4</my:identity>
<tbsm:attr1>192.168.4.10</tbsm:attr1>
</my:switch>
<my:switch id='Switch5' >
<tbsm:resType>Switch</tbsm:resType>
<tbsm:Label>Switch5: Cisco 2950 (24 Port)</tbsm:Label>
<my:identity>Switch5</my:identity>
<tbsm:attr1>192.168.5.10</tbsm:attr1>
</my:switch>
<my:server id='Server1' >
<tbsm:resType>Linux Server</tbsm:resType>
<tbsm:Label>server1</tbsm:Label>
<my:identity>server1</my:identity>
<tbsm:attr1>192.168.1.18</tbsm:attr1>
</my:server>
<my:server id='Server2' >
<tbsm:resType>Linux Server</tbsm:resType>
<tbsm:Label>server2</tbsm:Label>
<my:identity>server2</my:identity>
<tbsm:attr1>192.168.1.19</tbsm:attr1>
</my:server>
<my:server id='Server3' >
<tbsm:resType>Linux Server</tbsm:resType>
<tbsm:Label>server3</tbsm:Label>
<my:identity>server3</my:identity>
<tbsm:attr1>192.168.1.20</tbsm:attr1>
</my:server>
<my:server id='Server4' >
<tbsm:resType>Windows Server</tbsm:resType>
<tbsm:Label>server4</tbsm:Label>
<my:identity>server4</my:identity>
<tbsm:attr1>192.168.1.21</tbsm:attr1>
</my:server>
<my:server id='Server5' >
<tbsm:resType>Windows Server</tbsm:resType>
<tbsm:Label>server5</tbsm:Label>
<my:identity>server5</my:identity>
<tbsm:attr1>192.168.1.22</tbsm:attr1>
</my:server>
<cdm:app.Application id=”myapp”>
<cdm:Name>Inventory Application</cdm:Name>
</cdm:app.Application>
<!-- relationships that link vlans, routers, switches, servers
-->
< !—first assign the VLAN resources as children
of the Inventory Application service that was imported from TADDM -->
<tbsm:uses source='myapp' target= 'VLAN1' />
<tbsm:uses source='myapp' target= 'VLAN1' />
<tbsm:uses source='RouterA' target= 'Router1' />
<tbsm:uses source='RouterA' target= 'Router2' />
<tbsm:uses source='VLAN1' target= 'Router1' />
<tbsm:uses source='VLAN2' target= 'Router2' />
<tbsm:uses source='Router1' target= 'Switch1' />
<tbsm:uses source='Router1' target= 'Switch2' />
<tbsm:uses source='Router2' target= 'Switch3' />
<tbsm:uses source='Router2' target= 'Switch4' />
<tbsm:uses source='Switch1' target= 'Switch5' />
<tbsm:uses source='Switch1' target= 'Server1' />
<tbsm:uses source='Switch1' target= 'Server2' />
<tbsm:uses source='Switch5' target= 'Server3' />
<tbsm:uses source='Switch4' target= 'Server4' />
<tbsm:uses source='Switch4' target= 'Server5' />
<!-- END OF CONTENT -->
</cdm:CDM-ER-Specification>
</idml:create>
</idml:refresh>
</idml:operationSet>
</idml:idml>
The two main configuration entities in the xml file are the resource definitions and the relationship definitions. A resource definition is similar to the following example:
<my:router id='Router2' >
<tbsm:resType>Router</tbsm:resType>
<tbsm:Label>Router2: Cisco 3845</tbsm:Label>
<my:identity>Router2</my:identity>
<tbsm:attr1>192.168.1.3</tbsm:attr1>
</my:router>
- The
my:routerentity name is what TBSM uses as the “class” of the resource. Themy:routerentity name is mapped to a defined set of templates in TBSM.my:routeris referred to as a custom namespace element since it is not part of the IBM cdm (common data model) set of classes. All custom namespace elements need to be configured in the OtherNamespaces.xml file. - The id attribute,
Router2is not imported to TBSM, but it needs to be uniquely assigned in the IdML book, as this is how other elements in the book refer to this element. - The
tbsm:LabelelementRouter2: Cisco 3845is the field TBSM uses to configure the display name of the service in TBSM. - The
my:identityelementRouter2is what TBSM uses to uniquely identify this element. my:identityis not a cdm attribute, so it also needs to be configured in the OtherNamespaces.xml. See Configuring OtherNamespaces.xml.- The
tbsm:resTypeandtbsm:attr1elements are not used for anything in this example. They demonstrate that other resource information can be assigned to the resources, and they can be pulled into TBSM as additional properties through custom configuration of the toolkit.
The dependency definitions are represented as simple xml entries as follows:
<tbsm:uses source='Router2' target= 'Switch3' />
This entry instructs for the element whose id is Router2 to
depend on that whose id is Switch3.
One other resource to note in the IdML book is the cdm:app.Application entry:
<cdm:app.Application id=”myapp”>
<cdm:Name>Inventory Application</cdm:Name>
</cdm:app.Application>
This entry represents the Business Application named Inventory
Application that we created and imported from TADDM.
The IdML book references this resource through the cdm:Name attribute,
which matches the cdm:Name attribute of the resource
from TADDM and
assigns the VLAN resources as children of the Inventory Application.
This is necessary to assign network resources from the book into a
technology type, since the resource to type assignment only occurs
when the resources live under a Business Service or Application.
The same configuration applies when the Inventory Application does not come from TADDM. TBSM creates the service rather than "reconciles" it with the service imported from TBSM.