-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Instance lease: Allow deployment of instances with lease duration and leaseexpiry action #10560
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 13 commits
Commits
Show all changes
37 commits
Select commit
Hold shift + click to select a range
d737cea
FR-248: Instance lease, WIP commit
sudo87 9bef279
insert lease expiry into db and use that to filter exiring vms, add a…
sudo87 759f1fa
Add leaseDuration and leaseExpiryAction in Service offering create flow
sudo87 8c7a9f2
Update listVM cmd to allow listing only leased instances
sudo87 1495b08
Add methods to fetch instances for which lease is expiring in next days
sudo87 e2da246
Changes included:
sudo87 0969bf0
Update UI screens for leased properties coming from config and servic…
sudo87 f239e92
use global lock before running scheduler
sudo87 e7ce8ae
Unit tests
sudo87 0cf2fe8
Flow changes done in UI based on discussion
sudo87 7bc5f2a
Include view changes in schema upgrade files and use feature in vario…
sudo87 aff544f
Added integration test for vm deployment, UI enhancements for user pe…
sudo87 62397cc
validate integration tests, minor ui changes and log messages
sudo87 faf484f
fix build: moving configkey from setup to test itself
sudo87 410a882
Disable testAlert to unblock build and trim whitespaces in integratio…
sudo87 f4aa2bc
Address review comments
sudo87 f77f3ab
Merge latest from main
sudo87 337401b
Minor changes in EditVM screen
sudo87 009e0b4
Use ExecutorService instead of Timer and TimerTask
sudo87 bd10721
Additional review comments
sudo87 78fc3e0
Incorporate following changes:
sudo87 b042167
Handle pr review comments
sudo87 89db8a2
merge latest changes from main
sudo87 5dbf822
address review comments
sudo87 aadc305
Merge latest from main
sudo87 7cd59df
move instance.lease.enabled config to VMLeaseManager interface
sudo87 764900b
resolve merge conflict with main
sudo87 5b09778
bug fix in edit instance flow and reject api request for invalid values
sudo87 3bc3a53
resolve merge conflict with main
sudo87 a04718f
max allowed lease is for 100 years
sudo87 41dd137
log instance ids for expired instance
sudo87 7e89a31
Fix config validation for value range and code coverage improvement
sudo87 11740db
fix lease expiry request failures in async
sudo87 8f3ab41
resolve merge conflict
sudo87 d5988a5
dont use forced: true for StopVmCmd
sudo87 785dbf4
Update server/src/main/java/org/apache/cloudstack/vm/lease/VMLeaseMan…
rohityadavcloud ba8802f
handle review comments
sudo87 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -154,6 +154,14 @@ public class UpdateVMCmd extends BaseCustomIdCmd implements SecurityGroupAction, | |||||
" autoscaling groups or CKS, delete protection will be ignored.") | ||||||
private Boolean deleteProtection; | ||||||
|
||||||
@Parameter(name = ApiConstants.INSTANCE_LEASE_DURATION, type = CommandType.LONG, since = "4.21.0", | ||||||
description = "Number of days instance is leased for.") | ||||||
sudo87 marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||
private Long leaseDuration; | ||||||
|
||||||
@Parameter(name = ApiConstants.INSTANCE_LEASE_EXPIRY_ACTION, type = CommandType.STRING, since = "4.21.0", | ||||||
description = "Lease expiry action") | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
private String leaseExpiryAction; | ||||||
|
||||||
///////////////////////////////////////////////////// | ||||||
/////////////////// Accessors /////////////////////// | ||||||
///////////////////////////////////////////////////// | ||||||
|
@@ -324,4 +332,13 @@ public Long getApiResourceId() { | |||||
public ApiCommandResourceType getApiResourceType() { | ||||||
return ApiCommandResourceType.VirtualMachine; | ||||||
} | ||||||
|
||||||
public Long getLeaseDuration() { | ||||||
return leaseDuration; | ||||||
} | ||||||
|
||||||
public String getLeaseExpiryAction() { | ||||||
return leaseExpiryAction; | ||||||
} | ||||||
|
||||||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.