预期分2-3次完成
 

Understanding BDD rule processing

To truly unleash the potential of BDD 2007 you must first understand the concept of rule processing.
A rule is used to define the variables that drive the entire imaging process. They are used to define properties such as the computer name, the local administrator password, or how user data should be saved during an p_w_picpath deployment.
There are a number of methods by which rules can be used to define variables. The following sections review these methods and how to best use them to customize BDD 2007.
要真正释放BDD 2007的潜力,你就必须明白规则实施的概念.
我们使用规则来定义驱动镜像过程中的变量。它们常常是定义为各种属性值,像计算机名称、本地管理员密码或者在部署过程中用户数据的存储地址
我们有许多方法来定义各种变量。我们的最佳选择是使用以下方法来定制我们的BDD2007
 
Rule processing overview
 
Before you look at how to define rules it is important to understand how BDD processes rules.
The values that BDD obtains from rules are called “properties”. Properties are similar to environment variables, and once defined can be used by all other scripts. There are two types of properties:
1. Standard properties – Default properties defined within BDD
2. Custom properties – Properties you can define and assign as required
Note: Properties can be single valued or lists
在此之前,你需要先明白BDD如何实施各种规则的重要性。那些BDD从规则中获得的值称为“属性”。属性和环境变量类似,一旦定义就可以在所有脚本中使用。主要有两种属性
1.标准属性-所有BDD默认的属性
2.自定义属性 按照你需要定义并声明的属性
注意:属性可以单独赋值,也可以列表赋值(大概是这个意思吧,请牛人指正)
 
BDD uses a gathering mechanism to determine the values of the properties. It does this by running the script “ZTIGather.wsf”. The script performs the following steps:
1. Determines the standard properties by referring to the standard properties definition file “ZTIGather.xml”.
2. Parses the “CustomSettings.ini” file and determines what custom properties it should use.
3. The “CustomSettings.ini” file is then processed to gather values for all of the properties required to deploy the operating system to the client.
The rest of the post will explain how the rule gathering process works for each of the assignment methods.
BDD使用一种收集机制:运行“ZTIGather.wsf”去获取属性的值。 这个脚本使用以下步骤:
1.依靠"ZTIGather.xml"中的标准属性去取值
2.读取"CustomSettings.ini",获取需要读取的自定义属性列表
3.读取所有"CustomSettings.ini"中需要的属性值

Assigning values through rules

Values can be assigned to properties through a number of different methods.
1. You can use hard-coded values, for example you could statically define the logging share (SLShare) to point at the share “LOGS” on “SERVER”:
SLShare=\\SERVER\LOGS
有许多不同的方法把值分配给属性
1.你可以使用hard-coded值,例如静态定义日志共享为“LOGS”和“SERVER”
SLShare=\\SERVER\LOGS
 
2. You can use variable substitution, for example you could statically define your logging share (SLShare) to point at the share “LOGS” on the SMS deployment point that you are currently connected to:
SLShare=\\%SMSDP%\Logs
2.你可以使用代替变量,例如使用
SLShare=\\%SMSDP%\Logs
 
3. Rules can call script functions, for example you may want to assign the ComputerName based on information gathered from the Asset Tag, functions are recognized as being enclosed in “#”’s:
ComputerName=#MyFunction(‘%AssetTag%’)#
(See the Userexit script section below for further information)
3.规则可以使用脚本的函数
ComputerName=#MyFunction(‘%AssetTag%’)#
 
4. Rules can be selected based on the value of dynamic keys, the following example will return the computer name “Computer1” if the MAC Address is “00:01:AB:34:CD:02”
[Settings]
Priority=MACAddress,…
[00:01:AB:34:CD:02]
ComputerName=”Computer1”
4.动态值获取
[Settings]
Priority=MACAddress,…
[00:01:AB:34:CD:02]
ComputerName=”Computer1”
 
5. You can assign values based on database lookups. (See the database section below for further information)
5.从数据库中获取

0

收藏

xmuxsp

207篇文章,86W+人气,2粉丝

Ctrl+Enter 发布

发布

取消

推荐专栏更多

深入BDD规则实施(rule processing)(1)
全局视角看大型园区网

路由交换+安全+无线+优化+运维

共40章 | 51CTO夏杰

¥51.00 1682人订阅
深入BDD规则实施(rule processing)(1)
网工2.0晋级攻略 ——零基础入门Python/Ansible

网络工程师2.0进阶指南

共30章 | 姜汁啤酒

¥51.00 1567人订阅
深入BDD规则实施(rule processing)(1)
基于Python的DevOps实战

自动化运维开发新概念

共20章 | 抚琴煮酒

¥51.00 430人订阅
深入BDD规则实施(rule processing)(1)
负载均衡高手炼成记

高并发架构之路

共15章 | sery

¥51.00 507人订阅
深入BDD规则实施(rule processing)(1)
带你玩转高可用

前百度高级工程师的架构高可用实战

共15章 | 曹林华

¥51.00 462人订阅
深入BDD规则实施(rule processing)(1)
深入BDD规则实施(rule processing)(1)

扫一扫,领取大礼包

0

2
分享
深入BDD规则实施(rule processing)(1)
xmuxsp
深入BDD规则实施(rule processing)(1)