FreeKB - Entity mapping action with CA Technologies API Gateway using Gateway Migration Utility (manageMappings)
Entity mapping action with CA Technologies API Gateway using Gateway Migration Utility (manageMappings)

Home > Search


This assumes you are familiar with the basic usage of the Gateway Migration Utility and that you are using an arguments file with an encoded password to connect to your API Gateway. This also assumes you have migrated out an entity (service, policy, folder) into an XML file named foo.xml.

When you migrateOut, the defaultAction can be NewOrExisting, NewOrUpdate, or Ignore, and the action you use will be in the XML file that is migrated out, like this.

<l7:Mapping action="NewOrExisting">

 

If one of these three actions does not quite fit into your needs, then you can utilize the manageMappings command. With manageMappings, you have more fine tuned control over the action that will occur when the entity is migrated into the target environment. For example, you could use ForceNew to create a new entity in the target.

/path/to/GatewayMigrationUtility.sh manageMappings
–bundle foo.xml
-type "SERVICE" 
-action "ForceNew"

 

In this example, foo.xml is updated with the new mapping action.

<l7:Mapping action="ForceNew">

 

Or Delete the entity in the target.

/path/to/GatewayMigrationUtility.sh manageMappings
–bundle foo.xml
-type "SERVICE" 
-action "Delete"
-outputFile bar.xml

 

In this example, foo.xml is not changed. Instead, a new file (bar.xml) is created, and bar.xml contains the new mapping action.

<l7:Mapping action="Delete">

 

Here are the possible actions with manageMappings.

New Create new entity. Fail if entity exists.
Update Update existing entity. Fail if entity does not exist.
Existing Use existing entity. Fail if entity does not exist.
ForceNew Create new entity, using a new ID if necessary.
Delete Delete an entity. Fail if entity does not exist.
Ignore Ignore an entity regardless if entity exists or not.
NewOrUpdate Update an existing entity. Create one if entity does not exist.
NewOrExisting Use an existing entity. Create one if entity does not exist.
DeleteOrIgnore Delete an entity. Ignore if it does not exist.

 

After updating the mapping action, you are ready to migrate in.



Add a Comment




We will never share your name or email with anyone. Enter your email if you would like to be notified when we respond to your comment.




Please enter 56bd2 in the box below so that we can be sure you are a human.




Comments