|
6 | 6 | "fmt"
|
7 | 7 | "math"
|
8 | 8 | "strconv"
|
9 |
| - "strings" |
10 | 9 | "time"
|
11 | 10 |
|
12 | 11 | "github.com/rancher/csp-adapter/pkg/clients/aws"
|
@@ -43,7 +42,6 @@ const (
|
43 | 42 | tokenKey = "consumptionToken"
|
44 | 43 | nodeKey = "entitledNodes"
|
45 | 44 | expiryKey = "expiry"
|
46 |
| - awsCSP = "aws" |
47 | 45 | statusPrefix = "AWS Marketplace Adapter:"
|
48 | 46 | )
|
49 | 47 |
|
@@ -148,8 +146,8 @@ func (m *AWS) runComplianceCheck(ctx context.Context) error {
|
148 | 146 | if currentCheckoutInfo.EntitledLicenses == requiredLicenses {
|
149 | 147 | statusMessage = fmt.Sprintf("%s Rancher server has the required amount of licenses", statusPrefix)
|
150 | 148 | } else {
|
151 |
| - statusMessage = fmt.Sprintf("%s You have exceeded your licensed node count. At least %d more licens(es) are required in %s to become compliant.", |
152 |
| - statusPrefix, requiredLicenses-currentCheckoutInfo.EntitledLicenses, strings.ToUpper(awsCSP)) |
| 149 | + statusMessage = fmt.Sprintf("%s You have exceeded your licensed node count. At least %d more licens(es) are required in AWS to become compliant.", |
| 150 | + statusPrefix, requiredLicenses-currentCheckoutInfo.EntitledLicenses) |
153 | 151 | }
|
154 | 152 | configMessage := fmt.Sprintf("Rancher server required %d licens(es) and was able to check out %d licens(es)", requiredLicenses, currentCheckoutInfo.EntitledLicenses)
|
155 | 153 |
|
@@ -217,7 +215,7 @@ func (m *AWS) saveCheckoutInfo(info *licenseCheckoutInfo) error {
|
217 | 215 | func (m *AWS) updateAdapterOutput(inCompliance bool, configMessage string, notificationMessage string) error {
|
218 | 216 | config := GetDefaultSupportConfig(m.k8s)
|
219 | 217 | config.CSP = CSPInfo{
|
220 |
| - Name: awsCSP, |
| 218 | + Name: awsSupportConfigCSP, |
221 | 219 | AcctNumber: m.aws.AccountNumber(),
|
222 | 220 | }
|
223 | 221 | rancherVersion, err := m.k8s.GetRancherVersion()
|
|
0 commit comments