Important

   

Starting version 8.9.03, BMC Network Automation is renamed to TrueSight Network Automation. This space contains information about BMC Network Automation 8.9.02 and previous versions. For TrueSight Network Automation 8.9.03 and later releases, see the TrueSight Network Automation documentation.

Exporting and importing components using APIs

You can use the API to export components from one server and import them to another. The two servers must be running same version of BMC Network Automation. 

Import dependencies

A component might use or have dependency on other underlying components. Before you import a component, ensure that you import its underlying components. For more information about considerations and conditions while importing components, see the following table.

ComponentDependency description and other conditions
Combo groups

Components

  • Groups – The groups which comprise the combo group must be present in the destination system.
  • Dynamic fields – The dynamic fields associated with the combo group must be present in the destination system.
Conditions

Components

  • Keywords – The keywords used by the condition must be present in the destination system.
  • Devices – The devices for which the condition is applicable must be present in the destination system.
  • Groups – The groups for which the condition is applicable must be present in the destination system.
  • Realms – The realms for which the condition is applicable must be present in the destination system.
  • Dynamic fields – The dynamic fields associated with the condition must be present in the destination system.
Container blueprints

Components

  • Container blueprint template – The container blueprint template must be present in the destination system.
  • Custom actions – The custom actions (if used) in the container blueprint must be enabled in the destination system.
  • External script actions – The external script actions (if used) in the container blueprint must be enabled in the destination system.

Condition

  • If you had exported the container blueprint before installing BMC Network Automation and the <poolMask> tag existed, ensure that you change its value from dotted decimal format to CIDR format, otherwise, the import will fail.
Containers

Components

  • Container blueprint – The container blueprint must be present in the destination system.
  • Pod – The pod which the container belongs to must be present in the destination system.

Conditions

  • If a container with the same name already exists in the destination system, it must be deleted before a new one is imported.
  • If you had exported the container before installing BMC Network Automation and the <poolMask> tag existed, ensure that you change its value from dotted decimal format to CIDR format, otherwise, the import will fail.
Device security profiles

No dependencies

Condition

  • If a device security profile with the same name already exists on the destination system, that device security profile is overwritten.
Dynamic fields

These dependencies are applicable for only the configuration profiled (CAP) dynamic fields:

  • Devices – The devices with which the dynamic fields are associated must be present in the destination system.
  • Groups – The groups with which the dynamic fields are associated must be present in the destination system.
  • Realms – The realms with which the dynamic fields are associated must be present in the destination system
Global substitution parameters

Component

  • Dynamic fields – The dynamic fields associated with the global substitution parameter must be present in the destination system.
Keywords

Component

  • Dynamic fields – The dynamic fields associated with the keyword must be present in the destination system.
Pod blueprints

Condition

  • If you had exported the pod blueprint before installing BMC Network Automation and the <poolMask> tag existed, ensure that you change its value from dotted decimal format to CIDR format, otherwise, the import will fail.
Pods

Components

  • Pod blueprint – The pod blueprint must be present in the destination system.
  • Devices – The devices assigned to the pod must be present in the destination system.

Conditions

  • If a pod with the same name already exists in the destination system, it must be deleted before a new one is imported.
  • If you had exported the pod before installing BMC Network Automation and the <poolMask> tag existed, ensure that you change its value from dotted decimal format to CIDR format, otherwise, the import will fail.
Polices

Components

  • Devices – The devices for which the policy is applicable must be present in the destination system.
  • Groups – The groups for which the policy is applicable must be present in the destination system.
  • Realms – The realms for which the policy is applicable must be present in the destination system.
  • Keywords – The keywords being used by the policy must be present in the destination system.
  • Conditions – The conditions being used by the policy must be present in the destination system.
  • Users – If a notification is to be sent to a set of users, the same set of users must be present in the destination system.
Predefined jobs

Components

  • Devices – The devices on which the predefined job needs to be run must be present in the destination system.
  • Groups – The groups on which the predefined job needs to be run must be present in the destination system.
  • Realms – The realms on which the predefined job needs to be run must be present in the destination system. If you are importing a predefined job containing a span action with group as the span and the system contains groups with the same name in multiple realms, you must specify the realm name under the spanParams tag in the XML file being imported. If you do not specify a realm, a random group (as a span) gets associated with the job.
  • Rules – The rules being used in the predefined job actions must be present in the destination system.
  • Templates – When importing a predefined job containing a template (for example, Deploy to Active), the destination system should already have a template by that name. Alternatively, you can import the template, but import it prior to importing the predefined job, or add the template to the XML file that is being imported and place it before the predefined job.
Roles

Components

  • Dynamic fields – The dynamic fields associated with the role must be present in the destination system.
  • Custom action adpaters – The custom action adapter (if used) in the role must be present in the destination system.

Conditions

  • No users are associated with roles while importing or exporting roles.
  • You cannot add a new root role, or modify a role to be the root role while importing.
  • You can modify only the dynamic fields of an Administrator role while importing.
  • If a role with the same name already exists on the destination system, that role is overwritten.
  • The user who is importing a new role or the changes to an existing role must have rights to add or edit such a role.
    If you want to change the rights assigned to a role in the XML file, see the Javadoc documentation for the values that you can pass in the XML file. Note that you must log on to access the documentation. 

Rules

Components

  • Rule sets – The rule set which the rule belongs to must be present and enabled in the destination system.
  • Device types – The device types for which the rule is applicable must be enabled in the destination system.
  • Devices – The devices for which the rule is applicable must be present in the destination system.
  • Groups – The groups for which the rule is applicable must be present in the destination system.
  • Relams – The realms for which the rule is applicable must be present in the destination system.
  • Dynamic fields – The dynamic fields associated with the rule must be present in the destination system.
Rule sets

Components

  • Devices – The devices for which the rule set is applicable must be present in the destination system.
  • Groups – The groups for which the rule set is applicable must be present in the destination system.
  • Realms – The realms for which the rule set is applicable must be present in the destination system.
Remote file servers

Component

  • Dynamic fields – The dynamic fields associated with the remote file server must be present in the destination system.
Templates

Component

  • Dynamic fields – The dynamic fields associated with the template must be present in the destination system.

Import and export APIs

The ImportExportService class provides services to execute export and import of BMC Network Automation components.

The Web Service Definition Language (WSDL) URL for this service has the following syntax:

https://SERVER:PORT/bca-networks/services/ImportExportService?wsdl

Note

In the exported XML, the component attributes are embedded in CDATA sections if the attribute value for a particular component instance is detected to contain embedded XML metacharacters (for example, < or > character).

The following table lists the methods that are available:

MethodDescription
(Version 8.9.01 and later)
exportCombogroups()
Exports all combo groups from database to XML data.
(Version 8.9.01 and later)
exportConditions()
Exports all conditions from database to XML data.
exportContainerBlueprints()

Exports all container blueprints from database to XML data.

exportContainers()Exports all containers from database to XML data.
exportDeviceSecurityProfiles()

Exports device security profiles (DSP) from database to XML.

(Version 8.9.01 and later)
exportDynamicTypes()
Exports dynamic fields from database to XML.
(Version 8.9.01 and later)
exportKeywords()
Exports all keywords from database to XML data.
exportPodBlueprints()

Exports all pod blueprints from database to XML data.

exportPods()Exports all pods from database to XML data.
(Version 8.9.01 and later)
exportPolicies()
Exports all policies from database to XML data.
exportPredefinedJobs()

Exports predefined jobs from database to XML data.

exportRemoteFileServers()

Exports remote file servers from database to XML data.

(Version 8.9.01 and later)
exportRoles()
Exports roles from database to XML data.
exportRules()Exports rules from database to XML data.
exportRuleSets()Exports rule sets from database to XML data.

The XML schema being used for the rule set XML files includes a full representation of each rule and its attributes within the rule set. 

exportSubstitutionParameters()Exports global substitution parameters from database to XML data.
exportTemplateGroups()

Exports template groups from database to XML data.

importComponents()

Imports any of the components that can be exported using the methods listed above into the BMC Network Automation database.
Whenever a new component is added or an existing component is modified during import, an event is logged into the event log.

Related topic

Exporting and importing components using a script

Was this page helpful? Yes No Submitting... Thank you

Comments