x
login Signup

How to modify snapshot component version in EC-Perl

We are trying to modify an existing snapshot with a certain component version. I'm pretty new to perl so I'm not sure how to handle the "componentVersion" of type map. Based on another question I found that component names need to be in the format of ec_mycomponent-version:1.0.0.0. Here is what I have so far.

 my $result = $cmdr->modifySnapshot($projectName,$applicationName,$snapshotName,
     {
         componentVersion => ["ec_$componentName-version=$componentVersion"]
     }
 );
avatar image By tlewis 95 asked Oct 26, 2017 at 03:09 AM
more ▼
(comments are locked)
10|750 characters needed characters left

1 answer: sort voted first

I found out how to do this. Unfortunately the API documentation doesn't mention the key names. But I found out the key name needs to be componentVersionName and value. Like this:

 my $result = $cmdr->modifySnapshot($projectName,$applicationName,$snapshotName,
     {
         componentVersion => [
             { componentVersionName => "ec_$componentName-version", value => $componentVersion }
         ]
     }
 );
avatar image By tlewis 95 answered Oct 24, 2017 at 05:06 PM
more ▼
(comments are locked)
avatar image david Aug 17 at 12:11 AM

For those that need it, the ectool version looks like this:

ectool modifySnapshot $projectName $snapshotName --componentVersion "ec_$componentName-version=$newVersionValue" --applicationName $applicationName

The 8.4 documentation dose not contain examples for modifySnapshot - it has examples for createSnapshot pasted in instead....

10|750 characters needed characters left
Your answer
toggle preview:

Up to 8 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.