[OOM-CERT-SERVICE] Correct SANs documentation and logging 68/116268/1
authorPiotr Marcinkiewicz <piotr.marcinkiewicz@nokia.com>
Wed, 9 Dec 2020 17:45:13 +0000 (18:45 +0100)
committerPiotr Marcinkiewicz <piotr.marcinkiewicz@nokia.com>
Wed, 9 Dec 2020 17:45:13 +0000 (18:45 +0100)
- correct properties logging format in external provider
- correct SANs documentation

Issue-ID: OOM-2559
Signed-off-by: Piotr Marcinkiewicz <piotr.marcinkiewicz@nokia.com>
Change-Id: If58e6ca53849e6d091bba652b1cc091f37d8eeeb

certServiceK8sExternalProvider/src/cmpv2controller/logger/certificate_request_logger.go
docs/sections/usage.rst

index 5eeaf2e..1bf5556 100644 (file)
@@ -25,6 +25,7 @@ import (
        "net"
        "net/url"
        "strconv"
+       "strings"
 
        cmapi "github.com/jetstack/cert-manager/pkg/apis/certmanager/v1"
 
@@ -102,11 +103,8 @@ func logPropertiesNotSupportedByCertService(log leveledlogger.Logger, request *c
 }
 
 func extractStringArray(strArray []string) string {
-       values := ""
-       for _, val := range strArray {
-               values = values + val + ", "
-       }
-       return values
+       separator := ","
+       return strings.Join(strArray, separator)
 }
 
 func mapUrisToText(uris []*url.URL) []string {
index 6cba936..0bbf348 100644 (file)
@@ -31,7 +31,7 @@ CertService client needs the following configuration parameters to work properly
   - LOCATION *(optional)* - Location for which certificate from CMPv2 server should be issued
   - STATE *(required)* - State for which certificate from CMPv2 server should be issued
   - COUNTRY *(required)* - Country for which certificate from CMPv2 server should be issued
-  - SANS *(optional)(SANS's should be separated by a comma e.g. test.onap.org,onap.com)* - Subject Alternative Names (SANs) for which certificate from CMPv2 server should be issued. All SANs types are supported (DNS names, IPs, URIs, emails).
+  - SANS *(optional)(SANS's should be separated by a comma e.g. test.onap.org,onap.com)* - Subject Alternative Names (SANs) for which certificate from CMPv2 server should be issued. The following SANs types are supported: DNS names, IPs, URIs, emails.
 
 3. Parameters to establish secure communication to CertService: