Allow template names upto 255 chars#6768
Conversation
|
@blueorangutan package |
|
@DaanHoogland a Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress. |
|
Packaging result: ✖️ el7 ✖️ el8 ✖️ debian ✖️ suse15. SL-JID 4286 |
Codecov Report
@@ Coverage Diff @@
## 4.17 #6768 +/- ##
============================================
- Coverage 10.34% 10.34% -0.01%
Complexity 6610 6610
============================================
Files 2451 2451
Lines 242339 242340 +1
Branches 37923 37924 +1
============================================
Hits 25058 25058
Misses 214195 214195
- Partials 3086 3087 +1
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
|
@blueorangutan package |
|
@DaanHoogland a Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress. |
|
Packaging result: ✔️ el7 ✔️ el8 ✔️ debian ✔️ suse15. SL-JID 4291 |
|
@blueorangutan test |
|
@DaanHoogland a Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests |
|
Trillian test result (tid-5030)
|
|
@DaanHoogland have you checked if there are any DB constraints (see create table rules?) for the column that stores the name (now 255 chars)? If not, then let's merge this. |
@rohityadavcloud for template registration 255 chars are already allowed. This limitation was only there when creating a template from a volume. |
|
Ah okay thanks for checking @DaanHoogland |
| String name = cmd.getTemplateName(); | ||
| if ((name == null) || (name.length() > 32)) { | ||
| throw new InvalidParameterValueException("Template name cannot be null and should be less than 32 characters"); | ||
| if ((name == null) || (name.length() > 255)) { |
There was a problem hiding this comment.
would be good to define a const ?
There was a problem hiding this comment.
yes, but that constant would have to be used in more than just this method (also for registiring/editting of a template. That would be a bit beyond the scope of this change.
There was a problem hiding this comment.
did it anyway, I didn´t implement it in the other APIs though)
|
@blueorangutan package |
|
@DaanHoogland a Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress. |
|
Packaging result: ✖️ el7 ✖️ el8 ✖️ debian ✖️ suse15. SL-JID 4315 |
|
@blueorangutan package |
|
@shwstppr a Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress. |
|
Kudos, SonarCloud Quality Gate passed! |
|
Packaging result: ✔️ el7 ✔️ el8 ✔️ debian ✔️ suse15. SL-JID 4317 |
|
Packaging result: ✔️ el7 ✔️ el8 ✔️ debian ✔️ suse15. SL-JID 4318 |
|
@blueorangutan test |
|
@DaanHoogland a Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests |
|
Trillian test result (tid-5052)
|








Description
This PR...
Fixes: #6766
Types of changes
Feature/Enhancement Scale or Bug Severity
Feature/Enhancement Scale
Bug Severity
Screenshots (if appropriate):
How Has This Been Tested?
registere a template with the name
thisIsAVerySmallTemplateWithAnExtremelyLongNameThatIsExcesiveInGivingInformationThatIsEitherUsefulOrUtterlyUselessAboutTheTemplateWhichIsReallyNotBigEnoughToSpendTheNameMiniOnand deployed it.When deployed stop it
From the Root Volume create a template with the name
thisIsAVerySmallTemplateWithAnExtremelyLongNameThatIsExcesiveInGivingInformationThatIsEitherUsefulOrUtterlyUselessAboutTheTemplateWhichIsReallyNotBigEnoughToSpendTheNameMiniOnEitherThe last step would fail in without this fix.