Tải bản đầy đủ (.pdf) (36 trang)

Tài liệu Module 5: Modifying and Creating Templates pdf

Bạn đang xem bản rút gọn của tài liệu. Xem và tải ngay bản đầy đủ của tài liệu tại đây (1.01 MB, 36 trang )






Contents
Overview 1
Introduction to Templates 2
Template Groups 3
Control Metadirectory Templates 5
Control Connected Directory Templates 8
The Template Language 11
Modifying Existing Templates 15
Lab A: Modifying Existing Templates 17
Creating Templates 18
Lab B: Creating Templates to Import Data
Into the Metadirectory 29
Best Practices 30
Review 31

Module 5: Modifying
and Creating Templates

BETA MATERIALS FOR MICROSOFT CERTIFIED TRAINER PREPARATION PURPOSES ONLY

Information in this document is subject to change without notice. The names of companies,
products, people, characters, and/or data mentioned herein are fictitious and are in no way intended
to represent any real individual, company, product, or event, unless otherwise noted. Complying
with all applicable copyright laws is the responsibility of the user. No part of this document may
be reproduced or transmitted in any form or by any means, electronic or mechanical, for any
purpose, without the express written permission of Microsoft Corporation. If, however, your only


means of access is electronic, permission to print one copy is hereby granted.

Microsoft may have patents, patent applications, trademarks, copyrights, or other intellectual
property rights covering subject matter in this document. Except as expressly provided in any
written license agreement from Microsoft, the furnishing of this document does not give you any
license to these patents, trademarks, copyrights, or other intellectual property.

 2000 Microsoft Corporation. All rights reserved.

Microsoft, BackOffice, MS-DOS, Windows, Windows NT, <plus other appropriate product
names or titles. The publications specialist replaces this example list with the list of trademarks
provided by the copy editor. Microsoft is listed first, followed by all other Microsoft trademarks
in alphabetical order. > are either registered trademarks or trademarks of Microsoft Corporation
in the U.S.A. and/or other countries.

<The publications specialist inserts mention of specific, contractually obligated to, third-party
trademarks, provided by the copy editor>

Other product and company names mentioned herein may be the trademarks of their respective
owners.


Module 5: Modifying and Creating Templates i

BETA MATERIALS FOR MICROSOFT CERTIFIED TRAINER PREPARATION PURPOSES ONLY

Instructor Notes
Instructor_notes.doc

Presentation:

xx Minutes

Lab:
45 Minutes

Module 5: Modifying and Creating Templates 1

BETA MATERIALS FOR MICROSOFT CERTIFIED TRAINER PREPARATION PURPOSES ONLY

Overview
!
Introduction to Templates
!
Template Groups
!
Control Metadirectory Templates
!
Control Connected Directory Templates
!
The Template Language
!
Modifying Existing Templates
!
Creating Templates
!
Best Practices


Management agents use templates to import directory update files from their
connected directories and export update files back to them. Modifying or

creating templates involves working with languages and functions. The
template language is used to create templates that are interpreted by
management agents when importing or exporting directory data. The template
language’s basic purpose is to assign values to attributes. An understanding
about how to create and use templates is essential to manage the flow of
identity information between the metadirectory and the connected directories in
Microsoft
®
Metadirectory Services version 2.2 (MMS).
At the end of this module, you will be able to:
!
Describe the purpose and function of templates.
!
Identify the different types of template groups used in the functioning of
management agents.
!
Describe the purpose of the different types of Control Metadirectory
templates.
!
Describe purpose of the different types of Control Connected Directory
templates.
!
Describe the template language used to modify and create templates.
!
Modify existing templates by editing the Parsing template and the
Metaverse Construction template.
!
Create Parsing and Construction templates.
!
Describe best practices for creating and modifying templates.


Topic Objective
To provide an overview of
the module topics and
objectives.
Lead-in
In this module, you will learn
about restructuring data
between a connected
directory and the
metadirectory by modifying
the Parsing and
Construction templates.
2 Module 5: Modifying and Creating Templates

BETA MATERIALS FOR MICROSOFT CERTIFIED TRAINER PREPARATION PURPOSES ONLY

Introduction to Templates
Create
File(s)
Create
File(s)
Connected
Directory
Connected
Connected
Directory
Directory
Metadirectory
Update

Update
Metaverse
Namespace
Metaverse
Namespace
MA’s
Connector
Namespace
MA’s
Connector
Namespace
Templates
Templates
Templates
Templates
Templates
Templates
Import
File(s)
Import
File(s)
Discovery
Discovery
Discovery
Synchronization
Synchronization
Synchronization


A management agent reads import file(s) and updates metadirectory entries. But

how does the management agent know the format and contents of the file, and
how does it know what to do with those contents? The management agent
templates provide this information.
Though the management agents import directory update files from their
connected directories and send update files back to them. However, the
management agent templates are the programs that read or write those files.
Templates are written in a high-level, interpreted language that the management
agent, in particular the Importt program, interprets and acts upon when
importing or exporting directory data.
Templates ultimately define the import and create files in terms of directory
attributes. Templates not only specify how the data in the input file(s) is to be
placed in the metadirectory; but they also specify what attribute information
from the metadirectory is to be placed in the create files to update connected
directory attributes.
Templates are the mechanism that MMS uses to map the attributes from
different connected directories to the attributes of the metadirectory. In other
words, map the schema of the connected directory to the MMS schema.

Topic Objective
To identify the purpose
templates.
Lead-in

Delivery Tip
Use the graphic on the slide
to show that it actually the
templates and not the
management agent that
import directory update files
from connected directories

and send update files back
to them.
Module 5: Modifying and Creating Templates 3

BETA MATERIALS FOR MICROSOFT CERTIFIED TRAINER PREPARATION PURPOSES ONLY

Template Groups
IMPORTT.EXE
Connected
Directory
Connected
Connected
Directory
Directory
Import Files
(located in
MA working
directory)
Import Files
(located in
MA working
directory)
Create
Files
Create
Files
CDIR_XX.EXE
CDIR_XX.EXE
Control
Connected

Directory
Templates
Control
Connected
Directory
Templates
Control
Metadirectory
Templates
Control
Metadirectory
Templates
Metaverse
Namespace
Entry
Metaverse
Metaverse
Namespace
Namespace
Entry
Entry
Control
Metadirectory
Templates
Control
Metadirectory
Templates
Connector
Namespace
Entry

Connector
Connector
Namespace
Namespace
Entry
Entry


Templates enable the management agent to read an import file extracted from a
connected directory and use the information to create or update entries in the
metadirectory. When constructing a metadirectory entry, it may not be
necessary to export all the attribute information; therefore, you may need
additional information. The additional information may include values for all
the attributes that make up the entry’s distinguished name, as well as the entry’s
object class. These attributes must be constructed from information in the input
record of the import file and other information that is known to the management
agent. Each management agent has different types of templates to move
information in and out of metadirectory.
Control Metadirectory Templates
These templates control the metadirectory data flow into the connector
namespace and the metaverse namespace. A program called Importt uses these
templates to process one or more import files discovered from a connected
directory resulting first in modifications to the connector namespace and then in
modifications to the metaverse namespace.
Control Connected Directory Templates
These templates control connected directory data by affecting the connector
namespace entries associated with a connected directory. Importt uses these
templates to process metaverse namespace data resulting first in modification to
the connector namespace data and then create files, which represent the
modifications to the connected directory.

Topic Objective
To identify the different
types of template groups
used in the functioning of
management agents.
Lead-in

4 Module 5: Modifying and Creating Templates

BETA MATERIALS FOR MICROSOFT CERTIFIED TRAINER PREPARATION PURPOSES ONLY

Control Management Agent Operations
The script and template definitions control operations to and from a connected
directory, and the import and create files. The script, called the management
agent Control script is processed by a script engine called Zscript. The
management agent Control script is responsible for getting data from the
connected directory and creating one or more import files. The management
agent Control script also uses the create file to transfer modifications to the
connected directory. This Control script calls a program called Cdir_xx to
perform the actual communication to the connected directory.
The Cdir_xx Program
The management agent Control script invokes the Cdir_xx program during the
discovery and update phases. The Cdir_xx process, when running in the
discovery phase, produces a text file. The text file contains information, such as
name, address and mailbox from the connected directory. The _xx represents an
abbreviation for the type of management agent. For example, Cdir_ln represents
Lotus Notes.
The Importt Program
The management agent control script invokes the Importt program during the
synchronization phase. The Importt program reviews the text file data produced

by Cdir_xx, interprets templates, evaluates attribute flow rules, and then updates
the metadirectory. The Importt program also flow attributes from the
metadirectory back to the connected directory, through create files, which
Cdir_xx will send back to the connected directory.
Module 5: Modifying and Creating Templates 5

BETA MATERIALS FOR MICROSOFT CERTIFIED TRAINER PREPARATION PURPOSES ONLY

#
##
#

Control Metadirectory Templates
Output
Template
Connected
Directory
Create Files
CDIR_XX.EXE
CDIR_XX.EXE
Import Files
Import Files
IMPORTT.EXE
Construction
Template
Construction
Template
Construction
Template
Construction

Template
Connector
Namespace
Entry
Connector
Connector
Namespace
Namespace
Entry
Entry
Metaverse
Namespace
Entry
Metaverse
Metaverse
Namespace
Namespace
Entry
Entry
Parsing
Template
Parsing
Template
Control Metadirectory
Templates


The Control Metadirectory templates are used to build an entry, whether in the
metaverse namespace or the connector namespace. Each management agent has
a set of templates that operate as mediators between the metadirectory and the

connected directory. The following are the two types of Control Metadirectory
templates.
!
Parsing templates. Parsing templates enable the Importt program to
understand the data format in the import file, how to handle the data, and
identify the attributes.
!
Construction templates. The Construction templates act as a blueprint for
the management agent on how to use the attributes from the connected
directory to construct entries in the connector namespace and the metaverse
namespace. Each management agent has a set of Construction templates to
supplement the Parsing templates.

Topic Objective
To identify the Control
Metadirectory templates.
Lead-in

6 Module 5: Modifying and Creating Templates

BETA MATERIALS FOR MICROSOFT CERTIFIED TRAINER PREPARATION PURPOSES ONLY

What Are Parsing Templates?
Connected
Directory
Create Files
CDIR_XX.EXE
CDIR_XX.EXE
Parsing
Template

Parsing
Template
Import Files
Import Files
Parsing
Template
Parsing
Template
IMPORTT.EXE
Control MA Operations Control Connected Directory Connected Directory Foreign Entries
Overview of Controlling Metadirectory
Parsing
Templates
Construction Templates
Design MA
Control
Metadirectory
Header
Add Modify Delete Trailer


Parsing templates describe records in the one or more import files discovered
from the connected directory. Different types of Parsing templates help the
management agent interpret different types of records in import files.
The following list describes the different types of Parsing template:
!
Add. The Add template describes a record representing a complete
connected directory entry.
!
Modify. The Modify template is similar to the Add template for those

connected directories that output a modify record format. When processing
a Modify template, the management agent does not presume that the record
contains a complete set of attributes.
!
Delete. The Delete template describes a deletion record in the import file. A
deletion record is only processed if the management agent is in reflector
mode. If the Delete template is applied to an entry in a connector
namespace, the ConnectedDirectoryId (which is an attribute on the
connector) value is removed from the joined metaverse namespace entry,
and results in a disconnector. If there are no other connectors pointing to the
metaverse namespace entry, the metaverse namespace entry is deleted.
!
Header/Trailer. The Header and Trailer templates describe the header and
trailer records. The Header and Trailer templates also allow the management
agent to ignore information that is not relevant to the update phase.

Template types are matched to record types by the starting text string or label in
the record. If a management agent cannot positively identify a record type, the
management agent rejects it, displaying an error in the operator's log.
Topic Objective
To identify the purpose of
the Parsing templates in
MMS.
Lead-in

Delivery Tip
Display the Design MA tab
and show the students the
different types of Parsing
templates.

Module 5: Modifying and Creating Templates 7

BETA MATERIALS FOR MICROSOFT CERTIFIED TRAINER PREPARATION PURPOSES ONLY

What Are Construction Templates?
Parsing
Template
CDIR_XX.EXE
Create Files
Output
Template
IMPORTT.EXE
Connector
Namespace
Construction
Template
Connector
Namespace
Construction
Template
Metaverse
Construction
Template
Metaverse
Construction
Template
Connector
Namespace
Entry
Connector

Connector
Namespace
Namespace
Entry
Entry
Metaverse
Namespace
Entry
Metaverse
Metaverse
Namespace
Namespace
Entry
Entry
Design MA
Control MA Operations
Control
Metadirectory
Control Connected Directory Connected Directory Foreign Entries
Overview of Controlling Metadirectory Parsing Templates
Construction Templates
Connector Space Parents Metaverse Lists


The Construction templates supplement the Parsing templates by using the
parsed information as an input to construct entries in the connector namespace
and metaverse namespace. The Construction templates are interpreted after the
Parsing templates, and in the order in which they are listed. The following list
describes the four types of Construction templates:
!

Connector Space. This template is applied first, and its main purpose is to
create the distinguished name for the connector namespace entry and set the
MMS object class. The Connector Space template can also be used to assign
attributes to the connector namespace entry.
!
Parents. This template defines how to create the parent containers that do
not already exist in the metadirectory for imported entries. These templates
are needed if the parent container is a nonstandard object class, or if
additional attributes need to be defined for the parent container. The parent
containers are automatically created if the parent container is a standard
object class, such as O, OU, Country, and Locality by using the Importt
program’s addParent option.
!
Metaverse. This template creates metaverse namespace entries, and to create
the distinguished name and set the object class for those entries. Once this is
accomplished, then you can assign values to $mv (metaverse namespace)
attributes. Many of the existing management agents also use this template to
assign $cs (connector namespace) attributes.
!
Lists. This template only constructs searchable names for list members. If
this template exists, it is applied after the Add Parsing template to list
member records imported from a connected directory.

Topic Objective
To identify the purpose of
the Construction templates
in MMS.
Lead-in

Delivery Tip

Display the Design MA tab
and show the students the
different types of
Construction templates.

8 Module 5: Modifying and Creating Templates

BETA MATERIALS FOR MICROSOFT CERTIFIED TRAINER PREPARATION PURPOSES ONLY

#
##
#

Control Connected Directory Templates
Create
Files
Create
Files
CDIR_XX.EXE
CDIR_XX.EXE
Output
Templates
Output
Templates
Control Connected
Directory Templates
Connector
Namespace
Construction
Template

Metaverse
Construction
Template
Connector
Namespace
Entry
Metaverse
Namespace
Entry
Metaverse
Metaverse
Namespace
Namespace
Entry
Entry
IMPORTT.EXE
Parsing
Template
Import Files
Connected
Directory


The Control Connected Directory templates inform the Importt program how to
build create files that are sent back to the connected directory. These templates
are used when a management agent in Creator mode wants to create a new entry
in connected directory. These templates are also used for every update
operation when the attribute flow, as defined in the Attribute Flow rules, results
in changes to attribute values in the existing connected directory entries.
The following are the two types of Control Connected Directory templates:

!
Output Construction templates The Output Construction templates are used
to build connected directory attribute information that is not directly
available from a single metadirectory attribute.
!
Output File-Description templates. The Output File-Description templates
are used to build the records in the output file. The Output File-Description
templates use metadirectory attributes, and attributes and variables created
by the Output Construction templates, to describe the format and contents of
records in the create file.

Topic Objective
To identify the Control
Connected Directory
templates.
Lead-in

Module 5: Modifying and Creating Templates 9

BETA MATERIALS FOR MICROSOFT CERTIFIED TRAINER PREPARATION PURPOSES ONLY

What Are Output Construction Templates?
Connected
Directory
Import Files
Connector
Namespace
Construction
Template
Connector

Namespace
Entry
Parsing
Template
Metaverse
Construction
Template
Create
Files
Create
Files
Output
Construction
Template
Output
Construction
Template
Metaverse
Entry
Metaverse
Metaverse
Entry
Entry
CDIR_XX.EXE
Design MA
Control MA Operations Control Metadirectory
Control Connected
Directory
Connected Directory Foreign Entries
Overview of Controlling Metadirectory

Output Construction
Templates
Output Templates
New
Connectors
CD Accounts
From Connectors
CD Lists
From Connectors


The new connector's Construction template constructs the basic $cs attributes
required to create a new connector entry. When a management agent is in
Creator mode, new entries created in the metaverse namespace must be sent to
the connected directory. Because the management agent synchronizes the
connector namespace with the connected directory, new connector entries must
first be created.
The following list describes the different types of Output Construction
templates:
!
CD Accounts from Connectors. This template constructs the $cd attributes
that the Output File-Description templates will use to build the create files
for new or changed data that is sent back to the connected directory.
!
CD Lists from Connectors. This template constructs output names for list
members. If this template exists, this template is applied before the Add
Output File-Description template when exporting list member records to a
connected directory. The template constructs a variable which the Add
Output File-Description template uses in the $list_member() function. The
variable is used to create the actual output member records in the format

expected by the connected directory.

Topic Objective
To identify the purpose of
the Output Construction
templates in MMS.
Lead-in

Delivery Tip
Display the Design MA tab
and show the students the
different types of Output
templates.

10 Module 5: Modifying and Creating Templates

BETA MATERIALS FOR MICROSOFT CERTIFIED TRAINER PREPARATION PURPOSES ONLY

What Are Output File-Description Templates?
Connected
Directory
Import Files
Connector
Namespace
Construction
Template
Connector
Namespace
Entry
Parsing

Template
Metaverse
Construction
Template
CDIR_XX.EXE
Create
Files
Create
Files
Output
File-Description
Template
Output
File-Description
Template
Metaverse
Entry
Metaverse
Metaverse
Entry
Entry
Design MA
Control MA Operations Control Metadirectory
Control Connected
Directory
Connected Directory Foreign Entries
Overview of Controlling Metadirectory Output Construction Templates
Output Templates
Header
Add Modify Delete Trailer

CDIR_XX.EXE


The Output File-Description templates are similar in format to the Parsing
templates, but they specify what attribute information is placed in the output
file to update attributes in connected directory entries. The following list
describes the different types of Output File-Description templates:
!
Add. This template describes a full record in the create file that is sent to the
connected directory for an update, and indicates the location (in the
connected directory) of the data for the update.
!
Modify. This template is similar to the Add Output File-Description
template for those connected directories that recognize a modify record
format containing changed rather than new entry data.
!
Delete. This template informs the management agent that is configured for
creator mode how to build a record that will result in the deletion of an entry
in the connected directory.
!
Header/Trailer. The Header and Trailer Output File-Description templates
enable you to define the form and content of the header and trailer records.
These templates are useful for the connected directories that might require
headers or trailers on files they import.


In MMS Compass user interface, the Output File-Description templates
are referred to as Output Templates.



Topic Objective
To identify the purpose of
the Output File-Description
templates in MMS.
Lead-in

Note

×