Use > Sequenced Designs > Resource Offerings > Import and export a resource offering

Import and export a resource offering

In this topic, an artifact refers to a resource offering.

You can import and export many of the artifacts that provide the basis for cloud automation. The export operation provides the ability to preserve the selected artifacts so they can be used to replicate the services on another system or to restore the artifacts. These exported archive files are preserved in an industry-standard zip archive file format.

Installing or replacing artifacts on the target system is supported by import and update operations. The import operation only adds artifacts, whereas the update operation replaces matching artifacts. See the Tasks section below for more information.

Process information

  • Resource categories and provider types - Resource categories (such as Compute) and provider types (such as VMware vCenter) are resolved first by name and second by display name during import of a resource offering.

    Out-of-the box resource categories and provider types have identical name values on all installations of CSA, and automatically resolve correctly during import. User-created resource categories and provider types do not have a name match on different installations of CSA, and instead are resolved by display name.

    For example, if a user created resource category with a display name of Auditing is used for a resource offering, when that resource offering is imported on another CSA installation, an attempt will be made to match a resource category with a display name of Auditing. This match is successful only if the user has already created this corresponding resource category on the system in which the import occurs.

    If a resource category or provider type cannot be resolved by either name or display name, a new resource category or provider type is automatically created during import of the resource offering. There is no need to add user-created resource categories and provider types ahead of time on the import system; however, if you have done so, ensure the display name values used match those on the export system.

  • Update operation — The update operation is destructive to existing data. You should understand the differences between the import operation, update operation, and update options to ensure you choose the operations and options that match your expectations. See the Tasks section below for more information.
  • Flows — During an import, update, or preview operation, if required dependencies do not exist on the Operations Orchestration system, an error message identifies these missing dependencies (dependencies such as flows). The content pack that contain these flows must have been deployed to the Operations Orchestration system prior to importing these artifacts. The flows must also have identical signatures and identical paths as the flows on the system from which the artifact was exported.

    During import, flow signature-related information is verified in or added to the CSA database (flow signatures are used during the creation of an artifact and when adding a resource synchronization action or an external approval type). This information is resolved by name which corresponds to the full path to the Operations Orchestration flow (for example, /Library/CSA Content Pack/CSA3.2/Providers/Infrastructure/vCenter/vCenter Clone Server/Actions/vCenter Simple Compute - Deploy). For information about how to deploy Operations Orchestration content packs, see the Central User Guide.

  • Archive content — The archive (.zip) file can only reference files or content contained within the .zip file itself, or that are already contained in the csa.war file.
  • Image files — All images in the archive files must end in one of the following suffix values (for information on adding additional suffix values, see the Cloud Service Automation Configuration Guide):

    jpg|jpeg|jpe|jfif|svg|tif|tiff|ras|cmx|ico|pnm|pbm|pgm|ppm|rgb|xbm|xpm|xwd|png

  • Back up your data — Create a backup of your system or data. Before proceeding, be sure to create a backup of any artifacts you may be affecting by using the export operation to save an archive zip file.

Tasks

  • Import option — Adds only new artifacts to the target system (the archived artifacts do no exist on the target system).

    Note The import operation identifies resource offerings by functional equivalence to determine if an identical resource offering exists on the target system. An archived resource offering is considered to be functionally equivalent to the resource offering on the target system if the archived resource offering has the same resource category, provider type, properties, and actions as a resource offering on the target system. If the import operation identifies a functionally equivalent resource offering on the target system, the archived resource offering is not imported. See How CSA identifies matching artifacts for more information.

  • Update option — Imports new artifacts and overwrites existing artifacts. New artifacts are created if they do not exist on the target system. Identical artifacts that exist on the target system are overwritten with changes from the archive.

    There may be cases where an existing artifact on the target system cannot be updated. For example, if the existing artifact is a service offering or design and the service offering or design is published, the service offering or design will not be updated because a published service offering or design cannot be edited.

    An existing service offering or design can be updated from a published offering or service design archive if the existing service offering or design is not published.

    Preserve originals — Select this option to create a copy of the original artifact if the artifact exists on the target system. On import, a copy of the original artifact is created and then the original artifact is overwritten by the imported artifact. The version of the copy is appended with "Superseded on" and the date. The version of the artifacts being imported remain intact. If the artifact does not exist on the target system, a copy is not created.

  • Note The update operation identifies resource offerings by name instead of functional equivalence to determine if the resource offering exists on the target system.

  • Preview — Generate a report of prospective results for the import process, including information about the artifacts and their status.
  • View Detailed Report - From the Import Summary dialog, select this link to see a summary and details of the import process, including information about the artifacts and their status.
  • Export — Create a content archive (.zip) file. The content archive contains XML documents for the artifacts you are exporting, as well as icons for customizing the artifacts, and the Manifest XML document, which contains meta-information about the archive files.

    The resource offerings are packaged in an archive file whose name is:

    RESOURCE_OFFERING_<resource_offering_display_name>_<resource_offering_id>.zip

How CSA identifies matching artifacts

When you import a resource offering, CSA determines if a functionally equivalent resource offering already exists on the system. If a functionally equivalent resource offering exists, then the import may be skipped depending on the options selected. Functional equivalence is determined by comparing the imported resource offering with other resource offerings that exist on the system, as follows:

  • At a high level, two resource offerings are functionally equivalent if they share the same Provider Type and Resource Category, the same set of user defined custom properties, and the same set of lifecycle actions.
  • Properties are considered equivalent if they share the same Type, Name, and Value (or Values for List properties).
  • Lifecycle actions are considered equivalent if they share the same internal action or flow, lifecycle stage and phase, execution order, and action input properties and values.
  • There are some additional attributes on properties and lifecycle actions that must be identical for equivalence.

For more specifics on the precise requirements for resource offering equivalence as it relates to entries in the .zip file produced during resource offering export, see the following table:

Element Necessary for Equivalence
property
  • name
  • valueType
  • values
  • confidential – only for String property types
action
  • processDefinition name
  • lifecycleState name
  • lifecycleSubstate name
  • lifecycleExecOrder
  • errorOnTimeout
  • failOnError
  • timeout
  • all properties must be identical, including the consumerVisible and consumerReadOnly elements for each property
  • consumerVisible
resourceCategory
  • isCriticalSystemObject determines if this is an out -of-box resourceCategory. If true, name determines equivalence, otherwise displayName determines equivalence.
providerType
  • isCriticalSystemObject determines if this is an out -of-box providerType. If true, name determines equivalence, otherwise displayName determines equivalence.

For more information about importing and exporting artifacts, see the Cloud Service Automation Content Archive Tool document.