1. Trang chủ
  2. » Công Nghệ Thông Tin

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

36 468 0
Tài liệu đã được kiểm tra trùng lặp

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

THÔNG TIN TÀI LIỆU

Thông tin cơ bản

Tiêu đề Modifying and Creating Templates
Trường học Microsoft Corporation
Chuyên ngành Microsoft Certified Trainer Preparation
Thể loại Bản tài liệu
Năm xuất bản 2000
Thành phố Redmond
Định dạng
Số trang 36
Dung lượng 1,01 MB

Các công cụ chuyển đổi và chỉnh sửa cho tài liệu này

Nội dung

Introduction to Templates Create Files Create Files Connected Directory Connected Directory Metadirectory Update Update Metaverse Namespace Metaverse Namespace MA’s Connector Namespace M

Trang 1

Contents

Overview 1

Control Connected Directory Templates 8

Lab A: Modifying Existing Templates 17

Lab B: Creating Templates to Import Data

Review 31

Module 5: Modifying and Creating Templates

Trang 2

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

Trang 5

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

In this module, you will learn

about restructuring data

Trang 6

Introduction to Templates

Create File(s)

Create File(s)

Connected Directory

Connected Directory

Metadirectory

Update

Update

Metaverse Namespace

Metaverse Namespace

MA’s Connector Namespace

MA’s Connector Namespace

Templates

Templates

Templates

Import File(s)

Import File(s)

Discovery

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

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

Trang 7

Connected Directory

Import Files

(located in

MA working directory)

Import Files

(located in

MA working directory)

Create Files

Create Files

Control Connected Directory Templates

Control Metadirectory Templates

Control Metadirectory Templates

Metaverse Namespace Entry

Metaverse Namespace Entry

Control Metadirectory Templates

Control Metadirectory Templates

Connector Namespace Entry

Connector Namespace 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

Trang 8

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

Trang 9

# Control Metadirectory Templates

Output Template

Connected Directory

Construction Template

Construction Template

Construction Template Namespace Connector

Entry

Connector Namespace Entry

Metaverse Namespace Entry

Metaverse Namespace 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

Trang 10

What Are Parsing Templates?

Connected Directory

Parsing Template

Import Files

Parsing Template

Parsing Template

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

Trang 11

What Are Construction Templates?

Parsing Template

Connector Namespace Construction Template

Metaverse Construction Template

Metaverse Construction Template

Connector Namespace Entry

Connector Namespace Entry

Metaverse Namespace Entry

Metaverse Namespace 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

Trang 12

# Control Connected Directory Templates

Create Files

Create Files

Output Templates

Control Connected Directory Templates

Connector Namespace Construction Template

Metaverse Construction Template

Connector Namespace Entry

Metaverse Namespace Entry

Metaverse Namespace Entry

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

Trang 13

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 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 TemplatesNew

Connectors From Connectors CD Accounts From Connectors CD Lists

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

Trang 14

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 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

! 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

Trang 15

# The Template Language

! What Is the Template Language?

! Defining the Basic Elements of the Template Language

The primary purpose of all of the templates in MMS is to assign values to directory attributes, both in the metadirectory and the connected directory The template language is a simple language is used for creating templates

Topic Objective

To introduce the topics

related to the template

language

Lead-in

Trang 16

What Is the Template Language?

$Provides control over template execution

$Defines which records or entries are to be included

in or excluded from a directory update

Elements

$Attribute names and Qualifiers

$Operators

$Conditional control structures

$Template control characters

$Management agent functions

$ prefix, for example, $multi_valued() and $dn_component()

The following list identifies some of the functions of the template language:

! Performs simple direct modifications on data

! Uses built-in functions, such as $MA() to transform data

! Obtains additional information from other entries in the metadirectory

! Provides control over template execution through conditional control structures, such as IF THEN ENDIF

! Defines records or metadirectory entries to be included in or excluded from

a directory update

The template language consists of the following elements:

! Attribute names and qualifiers

! Operators

! Conditional control structures

! Template control characters

! Management agent functions

! User-defined variables

Topic Objective

To identify the purpose of

the template language

Lead-in

Trang 17

Defining the Basic Elements of the Template Language

g g

! Attribute Names

$ Indicate which value is to be put in the output record or which attribute of the directory entry is to be given the value found in the input record

$ Indicates that an attribute value is to be removed

Template language elements enable you to assign values to attributes in the metadirectory and create a reference to attributes in connected directory The following section describes some of the basic elements of the template language

Attribute Names

Attribute names indicate which value is to be put in the output record (on export) or which attribute of the directory entry is to be given the value found in the input record (on import) For example, if an employee name exists in three different directory entries, the same information (for example, last name) might appear in all three entries You can use the same basic directory attribute name

to refer to all of these instances of the last name attribute (sn), but you distinguish them by adding one of the prefixes listed in the following table

Prefix The last name attribute refers to which directory entry

$cd.sn The connected directory entry

$cs.sn The connecter namespace entry in the metadirectory

$mv.sn The integrated entry in the metadirectory, which is the entry

in the metaverse namespace

If an attribute name is used without a prefix, it refers to the entry in the metaverse namespace

Topic Objective

To identify the basic

elements of the template

language

Lead-in

Note

Trang 18

Standard Operators

The standard operators of the template language are the assignment and

conditional operators Assignment and conditional operators are defined in the

management agent template definitions The standard operators in the following table are used to express conditions in conditional statements

A hologram is a composite view of an entry in a connected directory and its corresponding entry in the connector namespace

The value of a connected directory attribute such as $cd.sn is the value found for it in the last import file as parsed by the import template The main purpose

of storing the $cd attributes, even after they have been used to update the metadirectory, is to allow a management agent to determine if a metadirectory attribute value is now different from the corresponding attribute in the

connected directory This kind of comparison is the basis for the operation of creator management agents, for controlling bi-directional attribute flow, and for merging multivalued attributes

$Dummy

$dummy is a virtual attribute, that is, it can be used in templates as if it were an

attribute name, but it does not correspond to any real directory attribute When

$dummy is used in import templates, it tells the import software to ignore the field in the record at this position in the template and go on to look for the next field

$Null

$null is used to remove an attribute value A null designates no value For example, $mv.zcPreferredMailbox = $null

Ngày đăng: 21/12/2013, 19:15