ImportExport - importObject_1

ImportExport - importObject

Description :

This command imports an object into the BMC BladeLogic system.

This command uses an XML-based mapping file. The DTD for this mapping file is shown below

<!ELEMENT source_server (#PCDATA)>

<!ELEMENT target_server (#PCDATA)>

<!ELEMENT server_mapping (source_server, target_server)>

<!- source_server_group is the simple group name target_server_group is the fully qualified group name ->

<!ELEMENT source_server_group (#PCDATA)>

<!ELEMENT target_server_group (#PCDATA)>

<!ELEMENT server_group_mapping (source_server_group, target_server_group)>

<!ELEMENT property_set_class (#PCDATA)>

<!ELEMENT source_property (#PCDATA)>

<!ELEMENT target_property (#PCDATA)>

<!ELEMENT property_mapping (property_set_class, source_property, target_property)>

<!ELEMENT source_system_package_type (#PCDATA)>

<!ELEMENT target_system_package_type (#PCDATA)>

<!ELEMENT system_package_type_mapping (source_system_package_type, target_system_package_type)>

<!- object_type is the name of the model type of the object (e.g SNAPSHOT_JOB, BLPACKAGE etc) containing_group is a fully qualified group name ->

<!ELEMENT object_type (#PCDATA)>

<!ELEMENT object_name (#PCDATA)>

<!ELEMENT group_id (#PCDATA)>

<!ELEMENT source_object (object_type, object_name, group_id)>

<!ELEMENT containing_group (#PCDATA)>

<!ELEMENT grouped_object_mapping (source_object, containing_group)>

<!ELEMENT remediation_depot_group (#PCDATA)>

<!ELEMENT remediation_job_group (#PCDATA)>

<!ELEMENT remediation_group_mapping (source_object, remediation_depot_group, remediation_job_group)>

<!ELEMENT job_name (#PCDATA)>

<!ELEMENT job_group (#PCDATA)>

<!ELEMENT job_group_id (#PCDATA)>

<!ELEMENT source_discovery_job (job_name, job_group_id)>

<!ELEMENT target_discovery_job (job_name, job_group)>

<!ELEMENT discovery_job_mapping (source_discovery_job, target_discovery_job)>

<!ELEMENT source_compliance_job (job_name, job_group_id)>

<!ELEMENT target_compliance_job (job_name, job_group)>

<!ELEMENT compliance_job_mapping (source_compliance_job, target_compliance_job)>

<!ELEMENT source_deploy_job (job_name, job_group_id)>

<!ELEMENT target_deploy_job (job_name, job_group)>

<!ELEMENT deploy_job_mapping (source_deploy_job, target_deploy_job)>

<!ELEMENT source_nsh_script_job (job_name, job_group_id)>

<!ELEMENT target_nsh_script_job (job_name, job_group)>

<!ELEMENT nsh_script_job_mapping (source_nsh_script_job, target_nsh_script_job)>

<!ELEMENT template_name (#PCDATA)>

<!ELEMENT template_group (#PCDATA)>

<!ELEMENT template_group_id (#PCDATA)>

<!ELEMENT source_template (template_name, template_group_id)>

<!ELEMENT target_template (template_name, template_group)>

<!ELEMENT template_mapping (source_template, target_template)>

<!ELEMENT depot_software_name (#PCDATA)>

<!ELEMENT depot_software_group (#PCDATA)>

<!ELEMENT depot_software_location (#PCDATA)>

<!ELEMENT depot_software_type (#PCDATA)>

<!ELEMENT source_depot_software (depot_software_location, depot_software_type)>

<!ELEMENT target_depot_software (depot_software_name, depot_software_group)>

<!ELEMENT depot_software_mapping (source_depot_software, target_depot_software)>

<!ELEMENT blpackage_name (#PCDATA)>

<!ELEMENT blpackage_group (#PCDATA)>

<!ELEMENT source_blpackage_location (#PCDATA)>

<!ELEMENT target_blpackage (blpackage_name, blpackage_group)>

<!ELEMENT blpackage_mapping (source_blpackage_location, target_blpackage)>

<!ELEMENT nshscript_name (#PCDATA)>

<!ELEMENT nshscript_group (#PCDATA)>

<!ELEMENT source_nshscript_location (#PCDATA)>

<!ELEMENT target_nshscript (nshscript_name, nshscript_group)>

<!ELEMENT nshscript_mapping (source_nshscript_location, target_nshscript)>

<!ELEMENT depot_file_name (#PCDATA)>

<!ELEMENT depot_file_group (#PCDATA)>

<!ELEMENT source_depot_file_location (#PCDATA)>

<!ELEMENT target_depot_file (depot_file_name, depot_file_group)>

<!ELEMENT depot_file_mapping (source_depot_file_location, target_depot_file)>

<!ELEMENT source_grammar (#PCDATA)>

<!ELEMENT target_grammar (#PCDATA)>

<!ELEMENT grammar_mapping (source_grammar, target_grammar)>

<!ELEMENT required_value (property_set_class, target_property, value)>

<!ELEMENT value (#PCDATA | property_set_instance)*>

<!ELEMENT property_set_instance (required_value)*>

<!ELEMENT mapping (( server_mapping | server_group_mapping | property_mapping | system_package_type_mapping | grouped_object_mapping | discovery_job_mapping | compliance_job_mapping | deploy_job_mapping | template_mapping | depot_software_mapping | blpackage_mapping | grammar_mapping | required_value | remediation_group_mapping | nshscript_mapping | depot_file_mapping | nsh_script_job_mapping )* )>

Return type : java.lang.Void

Command Input :

Variable Name

Variable Type

Description

sourcePath

String

Name of the directory where the object you want to import is located.

mappingFile

String

Location of a mapping file used to resolve any conflicts that occur when importing. You can name this file whatever you want.

Examples :

Example

The following example shows a sample XML mapping file.

Script

<?xml version="1.0" encoding="UTF-8"?>

<!DOCTYPE mapping SYSTEM "file://bladelogic.com/dtds/Import-Mapping.dtd">

<mapping>

<grouped_object_mapping>

<source_object>

<object_type>TEMPLATE</object_type>

<object_name>testTemplate</object_name>

</source_object>

<containing_group>/import</containing_group>

</grouped_object_mapping>

<property_mapping>

<property_set_class>TestCustomPropertyClass</property_set_class>

<source_property>StringProp1</source_property>

<target_property>StringProp1</target_property>

</property_mapping>

<property_mapping>

<property_set_class>TestCustomPropertyClass</property_set_class>

<source_property>StringProp2</source_property>

<target_property>StringProp2</target_property>

</property_mapping>

<property_mapping>

<property_set_class>Component Template</property_set_class>

<source_property>TestProperty</source_property>

<target_property>TestProperty</target_property>

</property_mapping>

</mapping>

Example

The following example shows how to import an object stored in the directory /c/exportedObjects/template1, using the mapping file template1_mapping.xml.

Script

blcli ImportExport importObject /c/exportedObjects/template1 /c/exportedObjects/template1_mapping.xml
Was this page helpful? Yes No Submitting... Thank you

Comments