VMware Cloud Community
aenagy
Hot Shot
Hot Shot
Jump to solution

EBS subscription for approval-com.vmware.cafe.catalog.request.pre not working with defined condition (vRA 7.3)

I have been experimenting with EBS subscriptions and pre-approval policies and the results are not as expected. Regardless of the condition specified for the EBS subscription the specified workflow is executed. What I was expecting to do was have a subscription condition something like:

Run for all events

Run based on conditions

Description Does not equal Foobar

... that if the description = "Foobar" (I did this for both the blueprint and machine) then the subscription would skip the specified workflow. For any condition I can think of the workflow executes.

(1) Is it possible to conditionally skip a pre-approval subscription workflow?

(2) If so, how?

(3) If not, does this mean that my workflow will always be executed and therefor the go/no-go logic must be in the workflow?

(4) Is this expected behavior?

Reply
0 Kudos
1 Solution

Accepted Solutions
aenagy
Hot Shot
Hot Shot
Jump to solution

I never got this to work. What did work was setting the condition to "Run for all events" and then moving the logic to the logic to the workflow.

View solution in original post

Reply
0 Kudos
5 Replies
samwalker1380
VMware Employee
VMware Employee
Jump to solution

Hi Aenagy,

Without knowing the exact condition, it's difficult to say... but you should be able to handle 'Does not equals'  in either EBS conditioning or approval policies.  I would double check the you're using 'All of the following'.   I tend to do this a lot with EBS, but prefer things like 'blueprint contains Windows' type conditioning... What are you trying to achieve?

Reply
0 Kudos
aenagy
Hot Shot
Hot Shot
Jump to solution

samwalker1380​:

I have tried a number of conditions based on machine property (NOT data~machine~properties~MyPropertyNameHere Contains "some value here") or some variation. I used Description in the OP to illustrate the problem.

The goal is to indirectly address another problem I posted here: vra catalog request submit --inputfile <catalog item JSON file> results in request with custo...

More precisely, the goal is to configure the EBS subscription condition to skip the workflow depending on the presence of a property that is included with IaaS requests made using CloudClient but execute the workflow if submitted via the web console (which will not have this arbitrary property). The CloudClient (4.5) request will look something like this:

vra catalog request submit --description "MyTest" --id "Name of catalog item" --properties "<list of properties and their values>,skip_workflow=TRUE"  --groupid NameOfBusinessGroup --reason "IaaS request via CloudClient"

The property "skip_workflow" will only existing in CloudClient requests but not web console requests.

Condition remains same:Run for all eventsRun based on conditionsNot the followingData > Information about the request > Justification provided by the user specifying why the request is required Contains PA-139

Reply
0 Kudos
aenagy
Hot Shot
Hot Shot
Jump to solution

So, I have some good news and not so good news.

First the good news. If I change the EBS subscription condition to:

Condition remains same:

Run for all events

Run based on conditions

Not the following

Data > Information about the request > Justification provided by the user specifying why the request is required Contains mySpecialKeyword

... and submit the request like so:

vra catalog request submit --description "MyTest" --id "Name of catalog item" --properties "<list of properties and their values>,__ReservationPolicyID=<some suitable value>,skip_workflow=TRUE"  --groupid NameOfBusinessGroup --reason "IaaS request via CloudClient (mySpecialKeyword)"

... then the workflow is bypassed and the request goes straight to "In-progress".

Now the not so good news. The result of the request eventually is:

The following component requests failed: <blueprint name>. Allocation request [Composition RequestId: [494b84fd-6f6e-4dc4-80f2-be43d094aa37], CompTypeId: [Infrastructure.CatalogItem.Machine.Virtual.vSphere], BlueprintId: [<blueprint name>], CompId: [<machine in blueprint>], BlueprintRequestId: [4af04901-d457-4093-9d0c-6e933fb78c26], RootCafeRequestId: [168fab7a-930d-4bd5-bb38-c4a1e31678e1], SubtenantId: [650f8c4c-b356-42f3-9c9f-5389e2d53294]] with binding id [80595a92-0240-46e2-b370-c93d8a5fe4e1] failed with [IaaS property already exists. Key: __ReservationPolicyID].

This defeats the purpose of this approach as "__ReservationPolicyID" is one of the properties being passed in the CloudClient request. I have already done some experimenting by including this property in the machine properties with Overrideable = TRUE in the blueprint and got the same result.

Reply
0 Kudos
aenagy
Hot Shot
Hot Shot
Jump to solution

So, I have some good news and not so good news.

First the good news. If I change the EBS subscription condition to:

Condition remains same:

Run for all events

Run based on conditions

Not the following

Data > Information about the request > Justification provided by the user specifying why the request is required Contains mySpecialKeyword

... and submit the request like so:

vra catalog request submit --description "MyTest" --id "Name of catalog item" --properties "<list of properties and their values>,__ReservationPolicyID=<some suitable value>,skip_workflow=TRUE"  --groupid NameOfBusinessGroup --reason "IaaS request via CloudClient (mySpecialKeyword)"

... then the workflow is bypassed and the request goes straight to "In-progress".

Now the not so good news. The result of the request eventually is:

The following component requests failed: <blueprint name>. Allocation request [Composition RequestId: [494b84fd-6f6e-4dc4-80f2-be43d094aa37], CompTypeId: [Infrastructure.CatalogItem.Machine.Virtual.vSphere], BlueprintId: [<blueprint name>], CompId: [<machine in blueprint>], BlueprintRequestId: [4af04901-d457-4093-9d0c-6e933fb78c26], RootCafeRequestId: [168fab7a-930d-4bd5-bb38-c4a1e31678e1], SubtenantId: [650f8c4c-b356-42f3-9c9f-5389e2d53294]] with binding id [80595a92-0240-46e2-b370-c93d8a5fe4e1] failed with [IaaS property already exists. Key: __ReservationPolicyID].

This defeats the purpose of this approach as "__ReservationPolicyID" is one of the properties being passed in the CloudClient request. I have already done some experimenting by including this property in the machine properties with Overrideable = TRUE in the blueprint and got the same result.

Reply
0 Kudos
aenagy
Hot Shot
Hot Shot
Jump to solution

I never got this to work. What did work was setting the condition to "Run for all events" and then moving the logic to the logic to the workflow.

Reply
0 Kudos