sureshanaparti commented on code in PR #10560:
URL: https://github.com/apache/cloudstack/pull/10560#discussion_r2053567163
##########
server/src/main/java/com/cloud/configuration/ConfigurationManagerImpl.java:
##########
@@ -3470,6 +3484,39 @@ protected ServiceOfferingVO createServiceOffering(final
long userId, final boole
}
}
+ /**
+ * This method will return valid and non-empty expiryAction when
+ * "instance.lease.enabled" feature is enabled at global level
+ * leaseDuration is positive > 0 and has valid leaseExpiryAction provided
+ * @param leaseDuration
+ * @param cmdExpiryAction
+ * @return leaseExpiryAction
+ */
+ public static String validateAndGetLeaseExpiryAction(Integer
leaseDuration, String cmdExpiryAction) {
+ if (!VMLeaseManagerImpl.InstanceLeaseEnabled.value() ||
ObjectUtils.allNull(leaseDuration, cmdExpiryAction)) { // both are null
Review Comment:
no need to check lease enabled for validations
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]