Skip to content

Commit

Permalink
feat(jimmctl): add Roles to jimmctl (#1465)
Browse files Browse the repository at this point in the history
* feat(jimmctl): add Roles to jimmctl

Adds role management to jimmctl.

* chore(pr): small pr comments
  • Loading branch information
ale8k authored Nov 26, 2024
1 parent 2dcf77e commit a6e5b7a
Show file tree
Hide file tree
Showing 5 changed files with 567 additions and 1 deletion.
1 change: 1 addition & 0 deletions cmd/jimmctl/cmd/auth.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ func NewAuthCommand() *jujucmd.SuperCommand {
})
cmd.Register(NewGroupCommand())
cmd.Register(NewRelationCommand())
cmd.Register(NewRoleCommand())

return cmd
}
36 changes: 36 additions & 0 deletions cmd/jimmctl/cmd/export_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,42 @@ func NewImportCloudCredentialsCommandForTesting(store jujuclient.ClientStore, lp
return modelcmd.WrapBase(cmd)
}

func NewAddRoleCommandForTesting(store jujuclient.ClientStore, lp jujuapi.LoginProvider) cmd.Command {
cmd := &addRoleCommand{
store: store,
dialOpts: cmdtest.TestDialOpts(lp),
}

return modelcmd.WrapBase(cmd)
}

func NewRenameRoleCommandForTesting(store jujuclient.ClientStore, lp jujuapi.LoginProvider) cmd.Command {
cmd := &renameRoleCommand{
store: store,
dialOpts: cmdtest.TestDialOpts(lp),
}

return modelcmd.WrapBase(cmd)
}

func NewRemoveRoleCommandForTesting(store jujuclient.ClientStore, lp jujuapi.LoginProvider) cmd.Command {
cmd := &removeRoleCommand{
store: store,
dialOpts: cmdtest.TestDialOpts(lp),
}

return modelcmd.WrapBase(cmd)
}

func NewListRolesCommandForTesting(store jujuclient.ClientStore, lp jujuapi.LoginProvider) cmd.Command {
cmd := &listRolesCommand{
store: store,
dialOpts: cmdtest.TestDialOpts(lp),
}

return modelcmd.WrapBase(cmd)
}

func NewAddGroupCommandForTesting(store jujuclient.ClientStore, lp jujuapi.LoginProvider) cmd.Command {
cmd := &addGroupCommand{
store: store,
Expand Down
Loading

0 comments on commit a6e5b7a

Please sign in to comment.