Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(iam): listing views #2471

Merged
merged 2 commits into from
Aug 25, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 13 additions & 21 deletions internal/namespaces/iam/v1alpha1/iam_cli.go
Original file line number Diff line number Diff line change
Expand Up @@ -216,16 +216,7 @@ func iamSSHKeyList() *core.Command {
FieldName: "ProjectID",
},
{
FieldName: "CreationInfo.Address",
},
{
FieldName: "CreationInfo.CountryCode",
},
{
FieldName: "CreationInfo.UserAgent",
},
{
FieldName: "OrganizationID",
FieldName: "CreationIP",
},
{
FieldName: "Disabled",
Expand All @@ -247,9 +238,10 @@ func iamSSHKeyCreate() *core.Command {
{
Name: "name",
Short: `The name of the SSH key. Max length is 1000`,
Required: false,
Required: true,
Deprecated: false,
Positional: false,
Default: core.RandomValueGenerator("key"),
},
{
Name: "public-key",
Expand Down Expand Up @@ -439,7 +431,7 @@ func iamUserList() *core.Command {
Short: `ID of organization to filter`,
Required: true,
Deprecated: false,
Positional: true,
Positional: false,
},
},
Run: func(ctx context.Context, args interface{}) (i interface{}, e error) {
Expand Down Expand Up @@ -565,6 +557,7 @@ func iamApplicationCreate() *core.Command {
Required: true,
Deprecated: false,
Positional: false,
Default: core.RandomValueGenerator("app"),
},
{
Name: "description",
Expand Down Expand Up @@ -762,7 +755,10 @@ func iamGroupList() *core.Command {
},
View: &core.View{Fields: []*core.ViewField{
{
FieldName: "OrganizationID",
FieldName: "ID",
},
{
FieldName: "Name",
},
{
FieldName: "UserIDs",
Expand All @@ -787,9 +783,10 @@ func iamGroupCreate() *core.Command {
{
Name: "name",
Short: `Name of the group to create (max length is 64 chars). MUST be unique inside an organization`,
Required: false,
Required: true,
Deprecated: false,
Positional: false,
Default: core.RandomValueGenerator("grp"),
},
{
Name: "description",
Expand Down Expand Up @@ -1130,6 +1127,7 @@ func iamPolicyCreate() *core.Command {
Required: true,
Deprecated: false,
Positional: false,
Default: core.RandomValueGenerator("pol"),
},
{
Name: "description",
Expand Down Expand Up @@ -1499,7 +1497,7 @@ func iamAPIKeyList() *core.Command {
Short: `ID of organization`,
Required: true,
Deprecated: false,
Positional: true,
Positional: false,
},
},
Run: func(ctx context.Context, args interface{}) (i interface{}, e error) {
Expand All @@ -1521,15 +1519,9 @@ func iamAPIKeyList() *core.Command {
{
FieldName: "SecretKey",
},
{
FieldName: "OrganizationID",
},
{
FieldName: "CreatedAt",
},
{
FieldName: "UpdatedAt",
},
{
FieldName: "ExpiresAt",
},
Expand Down