Add validation for kube rootca during strategy create
The validation code has been duplicated from sysinv since
there is no validation library that can be imported for
the certificate subject and expiry date.
This is a usability fix, since the code acts the same, but
the strategy will not need to wait and be applied to see
the error.
Test Plan:
Verified invalid subject is rejected during creation
Verified invalid subject arguments rejected during creation
Verified invalid expiry-date is rejected during creation
Verified expired expiry-date is rejected during creation
Verified valid values are accepted for subject and expiry date
Verified cert-file cannot be passed with subject or expiry_date
Reviewed: https:/ /review. opendev. org/c/starlingx /distcloud/ +/815912 /opendev. org/starlingx/ distcloud/ commit/ 671ea28adc03cd3 1d0da5cc6db2cab b83ca47e63
Committed: https:/
Submitter: "Zuul (22348)"
Branch: master
commit 671ea28adc03cd3 1d0da5cc6db2cab b83ca47e63
Author: albailey <email address hidden>
Date: Thu Oct 28 16:50:39 2021 -0500
Add validation for kube rootca during strategy create
The validation code has been duplicated from sysinv since
there is no validation library that can be imported for
the certificate subject and expiry date.
This is a usability fix, since the code acts the same, but
the strategy will not need to wait and be applied to see
the error.
Test Plan:
Verified invalid subject is rejected during creation
Verified invalid subject arguments rejected during creation
Verified invalid expiry-date is rejected during creation
Verified expired expiry-date is rejected during creation
Verified valid values are accepted for subject and expiry date
Verified cert-file cannot be passed with subject or expiry_date
Change-Id: I24875dbe129eb2 ad4c52b26177102 77472b9a89e
Closes-Bug: 1949119
Signed-off-by: albailey <email address hidden>