Hi all,
Maybe I'm looking at it the wrong way ....
I created the standard Custom Property from vRO Action getApplicableReservationPolicies (as described in the Custom Property Doc page 116....just the normal stuff that one uses since 7.0)
Now I thought I give the new CustomForms a go and I run into problems.
The Property is in the selction...thats fine...BUT it dosnt use the CustomProperty definition I created. If one drags the Field onto the camvas and then runs it...it stays empty and is a text field. So next I recreated the value by setting:
Running that end with an error:
Some data cannot be retrieved. If the problem persists, contact your system administrator.;
[1][macOS_10.13.3~ReservationPolicyID.valueList][com.vmware.vra.reservations/getApplicableReservationPolicies] Error occurred executing action. Error: [Unable to start action 'com.vmware.vra.reservations/getApplicableReservationPolicies'. Reason 'Action 'getApplicableReservationPolicies' in module 'com.vmware.vra.reservations' failed : Supplied tenant 'null' is different from the token's tenant 'applebuild' (unnamed script#9)'.]
Which tells me that the context that was previously used to transport meta data between vRA and vRO isnt used anymore....
ANYHOW...donst work for me.
Thought/Ideas?
So....7.5 out and tested. Results:
What works
What dosn't Work:
The following component requests failed: vSphere__vCenter__Machine_1. Allocation request [Composition RequestId: [8a55591f-362a-41bf-bddd-fbeea44e8a17], CompTypeId: [Infrastructure.CatalogItem.Machine.Virtual.vSphere], BlueprintId: [test], CompId: [vSphere__vCenter__Machine_1], BlueprintRequestId: [c245f027-587c-4bc2-94d4-e14e2af5b8d9], RootCafeRequestId: [6548f844-339c-4008-be9c-6ea93bbee584], SubtenantId: [06890147-51f7-4857-98c7-e5b6ca2d9dcd]] with binding id [bef1c79c-1188-4cf6-9f04-41040d76816d] failed with [Infrastructure service provider error: A server error was encountered. Error requesting machine. Guid should contain 32 digits with 4 dashes (xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx).].
Which looks like some Web problem ...lots of entries...but I must pass on that.
EDIT 29.11.18
The loading and the reservationPolicyID problems are now fixed with this KB
EDIT 11.02.19
Well...the above wasnt true but a fluke that comes with the update. HERE Custom Forms ReservationPolicyID fixed is how to fix that problem once and for all.
Hi Dan,
This is a change in behaviour for custom form the out of th box action won’t work without modification. As you identifird already the context isn’t provided by vRA, you can duplicate the action and bind the tenant as an input via custom forms you can then link the input to the tenant ref.
I am still working my way through the differences between what xaas and customs forms offer.
So..yeah...I figured it out.
Thanks @SimonLynch ...I thought the same...but then I just went to bed with some wine.
Anyhow.
I do hope that will be fixed in 7.5, else why bother with custom Properties if one has to recreate them in the form fully again...well almost. Keep on reading.
So here is what I found:
This will create a VM in a Reservation of your choice
Hello!
I created a Custom Workflow from getApplicableNetworks and used the same input Parameter as you in your "getApplicableReservationPolicies_custom". My Problem was that if the "Blueprint Name" and the "Blueprint ID" are different the Action was failing. The ugly fix: i used the "Provider binding" instead of "Blueprint Name":
and in the Action:
THANKS to rwk1982 for finding this, good work mate
Fixed it.
//get BlueprintID from Name
blueprintsTMP=Server.findAllForType("vCACCAFE:CompositeBlueprint");
for each (blueprintTMP in blueprintsTMP){
if (blueprintTMP.name.toUpperCase() == blueprintName.toUpperCase())
break;
}
blueprint=blueprintTMP.id;
See attachment.
So....7.5 out and tested. Results:
What works
What dosn't Work:
The following component requests failed: vSphere__vCenter__Machine_1. Allocation request [Composition RequestId: [8a55591f-362a-41bf-bddd-fbeea44e8a17], CompTypeId: [Infrastructure.CatalogItem.Machine.Virtual.vSphere], BlueprintId: [test], CompId: [vSphere__vCenter__Machine_1], BlueprintRequestId: [c245f027-587c-4bc2-94d4-e14e2af5b8d9], RootCafeRequestId: [6548f844-339c-4008-be9c-6ea93bbee584], SubtenantId: [06890147-51f7-4857-98c7-e5b6ca2d9dcd]] with binding id [bef1c79c-1188-4cf6-9f04-41040d76816d] failed with [Infrastructure service provider error: A server error was encountered. Error requesting machine. Guid should contain 32 digits with 4 dashes (xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx).].
Which looks like some Web problem ...lots of entries...but I must pass on that.
EDIT 29.11.18
The loading and the reservationPolicyID problems are now fixed with this KB
EDIT 11.02.19
Well...the above wasnt true but a fluke that comes with the update. HERE Custom Forms ReservationPolicyID fixed is how to fix that problem once and for all.
IN addition to that:
CustomForms pass on Context...however incorrectly. I can't get Reserveation ID working with external Value (via customForms not customProp) as it seem not to pass on the context on submitting.
ReservationPolicyID (1st take):
ReservationPolicyID (2nd take):
ReservationPolicyID (3rd take):
So basically ReservationPolicyID isnt working at the moment at all.....or Im doing something very wrong...either way...let me know
HI,
Just want to know how custom for will reflect Annotation of vSphere
is there any specific way for it !! pls suggest
Hi Windspirit, I am also able to verify that the System.getContext() method doesn't work in custom forms. Is there any way you've found to work around that and get the current user (__requestedForUserId) via another method?
Hi,
as mentioned above...you need to input the user as a parameter. But it works again in 7.5....the context at least.
HI,
Not sure I understand your Question....
There is no direct correlation between vRA custom Forms and vSphere Anatoation...well except the _Notes ...but I havent tested that.
My problem is I'm trying to get that user name. I can't supply that as an input parameter. I need that as an output to use in an action I'm building.
The reservationID problem is now fixed with
Custom forms are stuck at "Loading" and the form does not populate in the UI. (59378)
Something else I've noticed (perhaps you too Windspirit) with custom forms, observed in 7.4 HF7 and 7.5, is when you have a custom property defined in the property dictionary with string values shown as a drop down. When you add that custom property to a custom form, it "pulls in" those values and sets the type to drop down in the custom form. But if you go back to the custom property definition and add a new string entry, this is NOT reflected in the form. The only way to "fix" this is to delete and re-add that same element to the custom form. It seems these values are only picked up when initially added and aren't actually queried from the custom property definition itself. And this is a major PITA when you have that custom property dropdown added to lots of blueprints. Not sure if anyone has found a better option at this point.