Skip to content

Commit

Permalink
Fixup
Browse files Browse the repository at this point in the history
  • Loading branch information
vishesh92 committed May 21, 2024
1 parent 5eea6e8 commit eba72cf
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
5 changes: 3 additions & 2 deletions pkg/cloud/user_credentials.go
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ func (c *client) ResolveAccount(account *Account) error {
return nil
}

// ResolveAccount resolves an account's information.
// ResolveProject resolves a project's information.
func (c *client) ResolveProject(user *User) error {
if user.Project.Name == "" {
return nil
Expand All @@ -187,14 +187,15 @@ func (c *client) ResolveProject(user *User) error {
p := c.cs.Project.NewListProjectsParams()
p.SetListall(true)
p.SetDomainid(user.Domain.ID)
p.SetAccount(user.Account.Name)
p.SetName(user.Project.Name)
setIfNotEmpty(user.Project.ID, p.SetId)
resp, retErr := c.cs.Project.ListProjects(p)
if retErr != nil {
c.customMetrics.EvaluateErrorAndIncrementAcsReconciliationErrorCounter(retErr)
return retErr
} else if resp.Count == 0 {
return errors.Errorf("could not find account %s", user.Project.Name)
return errors.Errorf("could not find project %s", user.Project.Name)
} else if resp.Count != 1 {
return errors.Errorf("expected 1 Project with name %s in domain ID %s, but got %d",
user.Project.Name, user.Domain.ID, resp.Count)
Expand Down
3 changes: 1 addition & 2 deletions test/e2e/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,9 @@ stringData:
secret-key: XXXX
api-url: http://1.2.3.4:8080/client/api
verify-ssl: "false"
project-id: <project id>
```
This will be applied to the kind cluster that hosts CAPI/CAPC for the test, allowing CAPC to access the cluster.
The api-key and secret-key can be found or generated at Home > Accounts > admin > Users > admin of the ACS management UI. `verify-ssl` is an optional flag and its default value is true. CAPC skips verifying the host SSL certificates when the flag is set to false. `project-id` is also optional and is used to specify the project id to be used for the k8s cluster.
The api-key and secret-key can be found or generated at Home > Accounts > admin > Users > admin of the ACS management UI. `verify-ssl` is an optional flag and its default value is true. CAPC skips verifying the host SSL certificates when the flag is set to false.

### Running the e2e tests

Expand Down

0 comments on commit eba72cf

Please sign in to comment.