Skip to content

Commit

Permalink
fix of cluster list
Browse files Browse the repository at this point in the history
  • Loading branch information
Laure-di committed Mar 4, 2024
1 parent 585796d commit 10a1265
Show file tree
Hide file tree
Showing 8 changed files with 3 additions and 108 deletions.
2 changes: 1 addition & 1 deletion internal/namespaces/redis/v1/custom.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ func GetCommands() *core.Commands {
cmds := GetGeneratedCommands()

human.RegisterMarshalerFunc(redis.Cluster{}, redisClusterGetMarshalerFunc)
human.RegisterMarshalerFunc(redis.Cluster{}.Endpoints, redisEndpointsClusterGetMarshalerFunc)
human.RegisterMarshalerFunc(redis.Cluster{}, redisEndpointsClusterGetMarshalerFunc)

cmds.Merge(core.NewCommands(clusterWaitCommand()))
cmds.MustFind("redis", "cluster", "create").Override(clusterCreateBuilder)
Expand Down
7 changes: 2 additions & 5 deletions internal/namespaces/redis/v1/custom_cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -159,11 +159,8 @@ func ACLAddListBuilder(c *core.Command) *core.Command {
}

func redisEndpointsClusterGetMarshalerFunc(i interface{}, opt *human.MarshalOpt) (string, error) {
if opt == nil {
return "", nil
}
type tmp []*redis.Endpoint
endpoint := tmp(i.([]*redis.Endpoint))
type tmp redis.Cluster
endpoint := tmp(i.(redis.Cluster)).Endpoints
opt.Fields = []*human.MarshalFieldOpt{
{
FieldName: "ID",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,24 +1,7 @@
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
🟩🟩🟩 STDOUT️ 🟩🟩🟩️
ID e26d0bd5-e04d-4d92-8f39-7df210a40529
Name 1-pub-endpoint
ProjectID fa1e3217-dc80-42ac-85c3-3f034b78b552
Status ready
Version 7.0.5
NodeType RED1-micro
CreatedAt few seconds ago
UpdatedAt few seconds ago
TLSEnabled false
ClusterSize 1
Zone fr-par-1
UserName admin

Endpoints:
ID Port IPs
9212bfab-dead-42d6-80e2-5eaa4f8be5a6 6379 [163.172.151.197]

ACLRules:
ID IP CIDR DESCRIPTION
🟩🟩🟩 JSON STDOUT 🟩🟩🟩
{
"id": "e26d0bd5-e04d-4d92-8f39-7df210a40529",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,24 +1,7 @@
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
🟩🟩🟩 STDOUT️ 🟩🟩🟩️
ID 62e071a3-e206-471b-afdb-1bc013b7c426
Name 1-static-priv-endpoint
ProjectID fa1e3217-dc80-42ac-85c3-3f034b78b552
Status ready
Version 7.0.5
NodeType RED1-micro
CreatedAt few seconds ago
UpdatedAt few seconds ago
TLSEnabled false
ClusterSize 1
Zone fr-par-1
UserName admin

Endpoints:
ID Port IPs
a56f3126-4e97-46cf-89c6-f179359f96e9 6379 [172.16.4.1]

ACLRules:
ID IP CIDR DESCRIPTION
🟩🟩🟩 JSON STDOUT 🟩🟩🟩
{
"id": "62e071a3-e206-471b-afdb-1bc013b7c426",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,25 +1,8 @@
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
🟩🟩🟩 STDOUT️ 🟩🟩🟩️
ID 89ee8049-b2db-4204-96f0-4a1e69f87e45
Name 2-static-priv-endpoints
ProjectID fa1e3217-dc80-42ac-85c3-3f034b78b552
Status ready
Version 7.0.5
NodeType RED1-micro
CreatedAt few seconds ago
UpdatedAt few seconds ago
TLSEnabled false
ClusterSize 1
Zone fr-par-1
UserName admin

Endpoints:
ID Port IPs
13199053-663b-40e8-bf06-56161d32271b 6379 [172.16.4.1]
1ede35c6-c45a-4a24-b34b-0486a33c01f8 6379 [10.16.4.1]

ACLRules:
ID IP CIDR DESCRIPTION
🟩🟩🟩 JSON STDOUT 🟩🟩🟩
{
"id": "89ee8049-b2db-4204-96f0-4a1e69f87e45",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,25 +1,8 @@
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
🟩🟩🟩 STDOUT️ 🟩🟩🟩️
ID 79e54364-9013-427d-9e56-8085da929b70
Name 1-ipam-1-static-priv-endpoints
ProjectID fa1e3217-dc80-42ac-85c3-3f034b78b552
Status ready
Version 7.0.5
NodeType RED1-micro
CreatedAt few seconds ago
UpdatedAt few seconds ago
TLSEnabled false
ClusterSize 1
Zone fr-par-1
UserName admin

Endpoints:
ID Port IPs
0b9e8061-e10c-4fb8-815d-1dfd94bf2745 6379 [10.16.4.1]
c0be2bbb-d4d6-4043-9aaa-f8a96e1685dc 6379 [172.16.228.2]

ACLRules:
ID IP CIDR DESCRIPTION
🟩🟩🟩 JSON STDOUT 🟩🟩🟩
{
"id": "79e54364-9013-427d-9e56-8085da929b70",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,24 +1,7 @@
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
🟩🟩🟩 STDOUT️ 🟩🟩🟩️
ID caac7795-b1c1-407f-8635-7da21563691e
Name 1-ipam-priv-endpoint
ProjectID fa1e3217-dc80-42ac-85c3-3f034b78b552
Status ready
Version 7.0.5
NodeType RED1-micro
CreatedAt few seconds ago
UpdatedAt few seconds ago
TLSEnabled false
ClusterSize 1
Zone fr-par-1
UserName admin

Endpoints:
ID Port IPs
2aaf6524-7ce6-4f6e-96aa-3f5cdc24ce04 6379 [172.16.232.2]

ACLRules:
ID IP CIDR DESCRIPTION
🟩🟩🟩 JSON STDOUT 🟩🟩🟩
{
"id": "caac7795-b1c1-407f-8635-7da21563691e",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,25 +1,8 @@
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
🟩🟩🟩 STDOUT️ 🟩🟩🟩️
ID 7033bf65-a914-4612-98dd-20e677f7e040
Name 2-ipam-priv-endpoints
ProjectID fa1e3217-dc80-42ac-85c3-3f034b78b552
Status ready
Version 7.0.5
NodeType RED1-micro
CreatedAt few seconds ago
UpdatedAt few seconds ago
TLSEnabled false
ClusterSize 1
Zone fr-par-1
UserName admin

Endpoints:
ID Port IPs
003d16e6-7539-4058-9e59-b81b3fe8a4e6 6379 [172.16.220.2]
e6ac24ff-015a-4d2a-a29e-4b2eae03b259 6379 [172.16.208.2]

ACLRules:
ID IP CIDR DESCRIPTION
🟩🟩🟩 JSON STDOUT 🟩🟩🟩
{
"id": "7033bf65-a914-4612-98dd-20e677f7e040",
Expand Down

0 comments on commit 10a1265

Please sign in to comment.