-
Notifications
You must be signed in to change notification settings - Fork 1.3k
api,server,ui: granular resource limit management #8362
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 2 commits
Commits
Show all changes
49 commits
Select commit
Hold shift + click to select a range
fcaa40a
api,server,ui: tagged resource limits
shwstppr bb4b1cf
Merge remote-tracking branch 'apache/main' into add-resource-limit-tag
shwstppr 533be6e
add unit tests
shwstppr a1806bb
fix eof
shwstppr f423c5b
fix import
shwstppr 596ac91
fix
shwstppr fa15616
build fix
shwstppr 2f6df91
ui: fix templatetag required
shwstppr 300e0be
api,server; allow template tag update
shwstppr 06ef971
license
shwstppr 28ce02f
eof
shwstppr 9ebda78
Merge remote-tracking branch 'apache/main' into add-resource-limit-tag
shwstppr a52db17
Merge remote-tracking branch 'apache/main' into add-resource-limit-tag
shwstppr 5cfe107
Merge remote-tracking branch 'apache/main' into add-resource-limit-tag
shwstppr e4538c8
show tagged capcity in ui
shwstppr 87deba0
change for list for tag and type
shwstppr 1037ef7
fix
shwstppr b7984ec
fix and refactor for clearing up of tagged limits and counts
shwstppr 806ee61
Merge remote-tracking branch 'apache/main' into add-resource-limit-tag
shwstppr c4c6083
tests
shwstppr a04c253
Merge remote-tracking branch 'apache/main' into add-resource-limit-tag
shwstppr b0c0520
move schema changes to 4.20
shwstppr bfd2d32
build fix
shwstppr d504753
api,server: allow listing diskofferings with suitability for vm
shwstppr 1dbce17
api,server: enable filtering service offerings with templateid
shwstppr 8596354
api,server,ui: improve template tag functionality
shwstppr 2dea392
fix
shwstppr 6458311
fix failure
shwstppr 06080f0
add test and a fix
shwstppr 6ccb5b6
add tests
shwstppr 72f0768
add license
shwstppr f4d9715
tests
shwstppr 3a8dd5c
add tests
shwstppr ed927b5
api,server,ui: tagged resource limits
shwstppr 67e6206
fix
shwstppr 20a5555
test and fix
shwstppr a69798b
Merge branch 'serviceoffering-template-filtering' into add-resource-l…
shwstppr 9762b8e
Merge branch 'listdiskofferings-vmsuitability' into add-resource-limi…
shwstppr ce37cab
Merge branch 'template-tag-enhancements' into add-resource-limit-tag
shwstppr e1d07cf
Merge branch 'feature-resource-limit-tag' into add-resource-limit-tag
shwstppr aab1df3
Merge branch 'main' into add-resource-limit-tag
shwstppr ef3d2fb
Merge branch 'main' into feature-resource-limit-tag
shwstppr 9581f7a
more tests
shwstppr 5fbf1d5
Merge branch 'feature-resource-limit-tag' into add-resource-limit-tag
shwstppr 3c969a7
fix
shwstppr 4474c87
address comments
shwstppr 7a6442d
Merge remote-tracking branch 'shwstppr/feature-resource-limit-tag' in…
shwstppr 5bab94f
address comment
shwstppr 711d9cb
Merge remote-tracking branch 'apache/main' into add-resource-limit-tag
shwstppr 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
33 changes: 33 additions & 0 deletions
33
api/src/test/java/org/apache/cloudstack/api/command/user/template/UpdateTemplateCmdTest.java
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 |
|---|---|---|
| @@ -0,0 +1,33 @@ | ||
| package org.apache.cloudstack.api.command.user.template; | ||
|
|
||
| import org.junit.Assert; | ||
| import org.junit.Test; | ||
| import org.junit.runner.RunWith; | ||
| import org.mockito.junit.MockitoJUnitRunner; | ||
| import org.springframework.test.util.ReflectionTestUtils; | ||
|
|
||
| import com.cloud.storage.Storage; | ||
|
|
||
| @RunWith(MockitoJUnitRunner.class) | ||
| public class UpdateTemplateCmdTest { | ||
|
|
||
| @Test | ||
| public void testGetTemplateType() { | ||
| UpdateTemplateCmd cmd = new UpdateTemplateCmd(); | ||
| ReflectionTestUtils.setField(cmd, "templateType", null); | ||
| Assert.assertNull(cmd.getTemplateType()); | ||
| String type = Storage.TemplateType.ROUTING.toString(); | ||
| ReflectionTestUtils.setField(cmd, "templateTag", type); | ||
| Assert.assertEquals(type, cmd.getTemplateTag()); | ||
| } | ||
|
|
||
| @Test | ||
| public void testGetTemplateTag() { | ||
| UpdateTemplateCmd cmd = new UpdateTemplateCmd(); | ||
| ReflectionTestUtils.setField(cmd, "templateTag", null); | ||
| Assert.assertNull(cmd.getTemplateTag()); | ||
| String tag = "ABC"; | ||
| ReflectionTestUtils.setField(cmd, "templateTag", tag); | ||
| Assert.assertEquals(tag, cmd.getTemplateTag()); | ||
| } | ||
| } | ||
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
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.