Skip to content

Commit

Permalink
feat: using private cli with endpoint in rest
Browse files Browse the repository at this point in the history
  • Loading branch information
Hardikl committed Jun 27, 2024
1 parent 457ee51 commit e7590ff
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions cmd/collectors/rest/plugins/certificate/certificate.go
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,6 @@ func (my *Certificate) Run(dataMap map[string]*matrix.Matrix) ([]*matrix.Matrix,
continue
}
serialNumber := certificateInstance.GetLabel("serial_number")
scope := certificateInstance.GetLabel("scope")
CertType := certificateInstance.GetLabel("type")

if expiryTimeMetric = data.GetMetric("expiration"); expiryTimeMetric == nil {
Expand All @@ -110,9 +109,7 @@ func (my *Certificate) Run(dataMap map[string]*matrix.Matrix) ([]*matrix.Matrix,
unixTime = time.Now()
}

if serialNumber == adminVserverSerial && scope == "cluster" && CertType == "server" {
// Admin SVM certificate is cluster scoped, but the REST API does not return the SVM name in its response. Add here for ZAPI parity
certificateInstance.SetLabel("svm", adminVserver)
if serialNumber == adminVserverSerial && CertType == "server" {
my.setCertificateIssuerType(certificateInstance)
my.setCertificateValidity(unixTime, certificateInstance)
}
Expand Down

0 comments on commit e7590ff

Please sign in to comment.