VMware Cloud Community
oddrune
Contributor
Contributor
Jump to solution

Change default lease time


Hi,


Is there a way to set a default value (for lease time) when people order a server based on a blueprint?


The default in the form seem to always be the minimum value from the blueprint. I want it to be possible to set 1 day as lease time, but that's not very user-friendly as a default.


Is there a magic custom property I've missed?


edit: vRA 6.2

1 Solution

Accepted Solutions
SeanKohler
Expert
Expert
Jump to solution

This has been a pretty consistent complaint with the IaaS blueprints.  Lease management as a whole needs some improvement including...

1. Setting Default (Iaas).

2. Better approvals for ranged selection (IaaS).

3. Setting Range min-max. (Built-in Resource Action for Change Lease) As right now you can extend a lease 20 years if you like with no controlling it.

The last one you can get around by not Entitling "Change Lease" to the user, and instead write your own Resource Action in ASD for change lease.  The vRO workflow or the ASD action maintains your field constraints to set defaults and to prevent a change lease outside of bounds you determine.  (e.g. not greater than 365 days)

If you have a change lease with constraints, you COULD (though I know it isn't your desire) set your min/max IaaS lease to very close numbers (cannot be the same) which forces a default.  For example you could put 90min-91max and then every machine that gets built will have 90 days to start with... then through the change lease custom resource action, the user can extend the lease up to one year with a default of 90 days more.

Those are the kinds of things you can do now.  We need to put in feature requests for better lease management capabilities to move into the main product.  (others already have)  The more people who want something, the more likely it will be prioritized into the coding effort for future releases.

View solution in original post

9 Replies
Craig_G2
Hot Shot
Hot Shot
Jump to solution

Hey,

You can configure this in the blueprint, from the build information tab...

If you want to just have a one day lease time, then set the minimum to one and leave maximum blank... This works the same for an other lease length you want.

Once set, the end user won't get prompted to choose a lease when requesting the blueprint.

Cheers

oddrune
Contributor
Contributor
Jump to solution

Hi,

That's not quite what I'm looking for.

I want minimum lease = 1 day, maximum lease = 364 days. But I want the default in the request form to be something else - say 30 days.

Craig_G2
Hot Shot
Hot Shot
Jump to solution

Hmm... maybe you will have to use ASD for this? I don't think the standard requests form can do it. 😞

Reply
0 Kudos
SeanKohler
Expert
Expert
Jump to solution

This has been a pretty consistent complaint with the IaaS blueprints.  Lease management as a whole needs some improvement including...

1. Setting Default (Iaas).

2. Better approvals for ranged selection (IaaS).

3. Setting Range min-max. (Built-in Resource Action for Change Lease) As right now you can extend a lease 20 years if you like with no controlling it.

The last one you can get around by not Entitling "Change Lease" to the user, and instead write your own Resource Action in ASD for change lease.  The vRO workflow or the ASD action maintains your field constraints to set defaults and to prevent a change lease outside of bounds you determine.  (e.g. not greater than 365 days)

If you have a change lease with constraints, you COULD (though I know it isn't your desire) set your min/max IaaS lease to very close numbers (cannot be the same) which forces a default.  For example you could put 90min-91max and then every machine that gets built will have 90 days to start with... then through the change lease custom resource action, the user can extend the lease up to one year with a default of 90 days more.

Those are the kinds of things you can do now.  We need to put in feature requests for better lease management capabilities to move into the main product.  (others already have)  The more people who want something, the more likely it will be prioritized into the coding effort for future releases.

oddrune
Contributor
Contributor
Jump to solution

Thanks. I'm not happy, but "no it's not possible" is a perfectly valid answer Smiley Happy

I'll have a word with our TAM tomorrow to see how we can get a feature request in.

Reply
0 Kudos
raptorirl
Enthusiast
Enthusiast
Jump to solution

If it's allowing the user to select a specific no. of days at build time, the way I'm doing that is,

as in 1) of  SeanKohler's reply...

Add the property VirtualMachine.LeaseDays as a prompted property to the blueprint

set the property dictionary  to then be a dropdown list,

Set the default value to what ever, and set the value list for the property in the dictionary..

So on our Blueprints it looks like:

pastedImage_0.png

Alternately, if you wanted to you could leave it freeform, and put a min/max constraint in the property dictionary.

Now, for me the issue's 3), in Sean's reply,   I've seen mention in a few instances the ability to use ASD to create an alternative Lease action, so that it can be constrained, I can do that bit, but it's the vCO workflow to update the actual Expiry that has me stumped...(seen mention of an example in a few posts, that all appear to be dead 😞

     Regards,

          John.

SeanKohler
Expert
Expert
Jump to solution

I suppose I have three ways you should be able to handle this, John.

Two use the vRA plugin service account in vRO which must have an entitlement to the builtin change lease action for machine types in the business group.

- One of these two uses the plugin API for the REST catalog-service:  (Using vCAC 6 REST APIs - Part 1 - Elastic Skies)  Part2 of this shows running an action.  I have done this with ChangeLease and it works fine.

- The other of the two uses one of the GA Library workflows: "Request a Resource Action".

In both of these you use an ASD form/workflow to capture all your relevant data to feed the request.  Some things to consider with the first is you need to capture the response of the REST call and determine if you succeeded or failed and pass that back to the calling request.

The third leverages any account entitled to the builtin change lease action for machine types in the business group and uses cloudclient. I am not 100% sure how to do this, but I am pretty sure it can be done.  Cloudclient is an execution wrapper to the REST services... and you would effectively use a Run Command capability in vRO to call out your change lease request.

I can give you very specific examples later if you need them.

Reply
0 Kudos
Mackopes
Enthusiast
Enthusiast
Jump to solution

I know this is an old post, but I'd put my vote in for the ability to do this 'simply' out of box as well. It could be put in the Blueprint properties, then the counter would default to this.

Same 'need' here.. Most people want say a 30 day lease, but 'some' want very short leases. The problem with setting the min to 1 today, is most people don't notice and get a 1 day lease.

Would rather have people manually lower the lease time.

AK

Reply
0 Kudos
PowerPaul201110
Enthusiast
Enthusiast
Jump to solution

Hi John,

I tried to implement your solution on vRA 6.2.5 with no success. I am able to promt the custom field for lease days to the user but after submitting the request my provided value for VirtualMachine.LeaseDays is overwritten by the value of the minimum lease days of the blueprint definition. If there is no minimum value defined in the blueprint it is set to 0.

Any ideas what I am missing? Or had the behavior changed in version 6.2.5?

Thanks Paul

Reply
0 Kudos