Separate accounts/host catalogs/host sets into their own packages (#311)

This commit is contained in:
Jeff Mitchell authored and GitHub committed 2020-08-27 20:43:33 -04:00
1 parent 936c970635
commit 17ecb6f2ce
64 files changed
+2298 -2265

No files matched your search

@@ -121,7 +121,7 @@ func (c *PasswordCommand) Run(args []string) int {
// note: Authenticate() calls SetToken() under the hood to set the
// auth bearer on the client so we do not need to do anything with the
// returned token after this call, so we ignore it
result, apiErr, err := authmethods.NewAuthMethodsClient(client).Authenticate(c.Context, c.flagAuthMethodId, c.flagLoginName, c.flagPassword)
result, apiErr, err := authmethods.NewClient(client).Authenticate(c.Context, c.flagAuthMethodId, c.flagLoginName, c.flagPassword)
if err != nil {
c.UI.Error(fmt.Sprintf("Error trying to perform authentication: %s", err.Error()))
return 2
@@ -127,7 +127,7 @@ func (c *Command) Run(args []string) int {
opts = append(opts, authmethods.WithDescription(c.FlagDescription))
}
authmethodClient := authmethods.NewAuthMethodsClient(client)
authmethodClient := authmethods.NewClient(client)
var existed bool
var method *authmethods.AuthMethod
@@ -164,7 +164,7 @@ func (c *PasswordCommand) Run(args []string) int {
opts = append(opts, authmethods.WithAttributes(attributes))
}
authmethodClient := authmethods.NewAuthMethodsClient(client)
authmethodClient := authmethods.NewClient(client)
// Perform check-and-set when needed
var version uint32
@@ -83,7 +83,7 @@ func (c *Command) Run(args []string) int {
return 2
}
authtokenClient := authtokens.NewAuthTokensClient(client)
authtokenClient := authtokens.NewClient(client)
var existed bool
var token *authtokens.AuthToken
+1 -1
View File
@@ -141,7 +141,7 @@ func (c *Command) Run(args []string) int {
}
}
groupClient := groups.NewGroupsClient(client)
groupClient := groups.NewClient(client)
// Perform check-and-set when needed
var version uint32
+1 -1
View File
@@ -110,7 +110,7 @@ func (c *CreateCommand) Run(args []string) int {
return 2
}
host, apiErr, err := hosts.NewHostsClient(client).Create(c.Context,
host, apiErr, err := hosts.NewClient(client).Create(c.Context,
c.flagCatalogId,
hosts.WithStaticHostAddress(c.flagAddress),
hosts.WithName(c.flagName),
+1 -1
View File
@@ -188,7 +188,7 @@ func (c *Command) Run(args []string) int {
}
}
roleClient := roles.NewRolesClient(client)
roleClient := roles.NewClient(client)
// Perform check-and-set when needed
var version uint32
+1 -1
View File
@@ -113,7 +113,7 @@ func (c *Command) Run(args []string) int {
opts = append(opts, scopes.WithSkipRoleCreation(c.flagSkipRoleCreation))
scopeClient := scopes.NewScopesClient(client)
scopeClient := scopes.NewClient(client)
// Perform check-and-set when needed
var version uint32
+1 -1
View File
@@ -102,7 +102,7 @@ func (c *Command) Run(args []string) int {
opts = append(opts, users.WithDescription(c.FlagDescription))
}
userClient := users.NewUsersClient(client)
userClient := users.NewClient(client)
// Perform check-and-set when needed
var version uint32