<mapper_template/> is used for creation of new <mapper/>s. Mapper templates are retrieved using “get_mapper_templates” function.
New mappers are created by submitting <mapper_template/> to
Storage Module using “create_mapper” function.
Modify <properties/> tag, move at least “min_sources”
<block_device/>s from <new_sources/> to <sources/>,submit
<mapper_template/> using “create_mapper”, and new <mapper/>
will be created.
Mapper Template XML description:
<mapper mapper_type="mapper type"> <properties/> <sources/> <new_sources/> </mapper>
Every mapper template has “mapper_type” that represents a type of mapper that can be created using this template.
<properties/> tag, which has variables
for children.
Some properties can be mutable.
Every
“mapper_type” template has different set of properties defined.
Every mapper template will have “min_sources” and
“max_sources” defined.
Example of properties for
Partition Tables:
<properties>
<var mutable="false" name="min_sources" type="int" value="1"/> <var mutable="false" name="max_sources" type="int" value="1"/> <var mutable="true" name="label" type="string_select" valid_values="bsd;gpt;msdos;sun" value="gpt"/>
</properties>
<sources/> tag, which is empty. Move <block_device/>s from <new_sources/> to <sources/> tag, and those <block_device/>s will be made sources of newly created mapper.
<new_sources/> tag, which has <block_device/>s for children. These block devices can become initial sources of newly created mapper. Move at least “min_sources” of them to <sources/>.