Skip to content

Commit

Permalink
fix(deps): update stackit sdk modules (#210)
Browse files Browse the repository at this point in the history
* fix(deps): update stackit sdk modules

* remove plugin field from instance create and update commands

* update docs

---------

Co-authored-by: Renovate Bot <[email protected]>
Co-authored-by: Gökçe Gök Klingel <[email protected]>
  • Loading branch information
3 people authored Apr 12, 2024
1 parent b72657f commit 69041f2
Show file tree
Hide file tree
Showing 20 changed files with 51 additions and 243 deletions.
1 change: 0 additions & 1 deletion docs/stackit_logme_instance_create.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ stackit logme instance create [flags]
-n, --name string Instance name
--plan-id string Plan ID
--plan-name string Plan name
--plugin strings Plugin
--syslog strings Syslog
--version string Instance LogMe version
```
Expand Down
1 change: 0 additions & 1 deletion docs/stackit_logme_instance_update.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ stackit logme instance update INSTANCE_ID [flags]
--monitoring-instance-id string Monitoring instance ID
--plan-id string Plan ID
--plan-name string Plan name
--plugin strings Plugin
--syslog strings Syslog
--version string Instance LogMe version
```
Expand Down
1 change: 0 additions & 1 deletion docs/stackit_mariadb_instance_create.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ stackit mariadb instance create [flags]
-n, --name string Instance name
--plan-id string Plan ID
--plan-name string Plan name
--plugin strings Plugin
--syslog strings Syslog
--version string Instance MariaDB version
```
Expand Down
1 change: 0 additions & 1 deletion docs/stackit_mariadb_instance_update.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ stackit mariadb instance update INSTANCE_ID [flags]
--monitoring-instance-id string Monitoring instance ID
--plan-id string Plan ID
--plan-name string Plan name
--plugin strings Plugin
--syslog strings Syslog
--version string Instance MariaDB version
```
Expand Down
1 change: 0 additions & 1 deletion docs/stackit_redis_instance_create.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ stackit redis instance create [flags]
-n, --name string Instance name
--plan-id string Plan ID
--plan-name string Plan name
--plugin strings Plugin
--syslog strings Syslog
--version string Instance Redis version
```
Expand Down
1 change: 0 additions & 1 deletion docs/stackit_redis_instance_update.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ stackit redis instance update INSTANCE_ID [flags]
--monitoring-instance-id string Monitoring instance ID
--plan-id string Plan ID
--plan-name string Plan name
--plugin strings Plugin
--syslog strings Syslog
--version string Instance Redis version
```
Expand Down
32 changes: 16 additions & 16 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,16 @@ require (
github.com/spf13/cobra v1.8.0
github.com/spf13/pflag v1.0.5
github.com/spf13/viper v1.18.2
github.com/stackitcloud/stackit-sdk-go/core v0.10.1
github.com/stackitcloud/stackit-sdk-go/services/authorization v0.1.1
github.com/stackitcloud/stackit-sdk-go/services/dns v0.8.4
github.com/stackitcloud/stackit-sdk-go/services/mongodbflex v0.11.1
github.com/stackitcloud/stackit-sdk-go/services/opensearch v0.10.1
github.com/stackitcloud/stackit-sdk-go/services/postgresflex v0.12.0
github.com/stackitcloud/stackit-sdk-go/services/resourcemanager v0.7.7
github.com/stackitcloud/stackit-sdk-go/services/secretsmanager v0.6.0
github.com/stackitcloud/stackit-sdk-go/services/serviceaccount v0.3.6
github.com/stackitcloud/stackit-sdk-go/services/ske v0.11.0
github.com/stackitcloud/stackit-sdk-go/core v0.12.0
github.com/stackitcloud/stackit-sdk-go/services/authorization v0.2.0
github.com/stackitcloud/stackit-sdk-go/services/dns v0.9.0
github.com/stackitcloud/stackit-sdk-go/services/mongodbflex v0.12.0
github.com/stackitcloud/stackit-sdk-go/services/opensearch v0.13.0
github.com/stackitcloud/stackit-sdk-go/services/postgresflex v0.13.0
github.com/stackitcloud/stackit-sdk-go/services/resourcemanager v0.8.0
github.com/stackitcloud/stackit-sdk-go/services/secretsmanager v0.7.0
github.com/stackitcloud/stackit-sdk-go/services/serviceaccount v0.4.0
github.com/stackitcloud/stackit-sdk-go/services/ske v0.12.0
github.com/zalando/go-keyring v0.2.4
golang.org/x/mod v0.17.0
golang.org/x/oauth2 v0.19.0
Expand Down Expand Up @@ -47,12 +47,12 @@ require (
github.com/sourcegraph/conc v0.3.0 // indirect
github.com/spf13/afero v1.11.0 // indirect
github.com/spf13/cast v1.6.0 // indirect
github.com/stackitcloud/stackit-sdk-go/services/argus v0.9.5
github.com/stackitcloud/stackit-sdk-go/services/logme v0.10.1
github.com/stackitcloud/stackit-sdk-go/services/mariadb v0.10.1
github.com/stackitcloud/stackit-sdk-go/services/objectstorage v0.8.6
github.com/stackitcloud/stackit-sdk-go/services/rabbitmq v0.10.0
github.com/stackitcloud/stackit-sdk-go/services/redis v0.10.1
github.com/stackitcloud/stackit-sdk-go/services/argus v0.10.0
github.com/stackitcloud/stackit-sdk-go/services/logme v0.13.0
github.com/stackitcloud/stackit-sdk-go/services/mariadb v0.13.0
github.com/stackitcloud/stackit-sdk-go/services/objectstorage v0.9.0
github.com/stackitcloud/stackit-sdk-go/services/rabbitmq v0.13.0
github.com/stackitcloud/stackit-sdk-go/services/redis v0.13.0
github.com/subosito/gotenv v1.6.0 // indirect
go.uber.org/multierr v1.11.0 // indirect
golang.org/x/exp v0.0.0-20240119083558-1b970713d09a // indirect
Expand Down
64 changes: 32 additions & 32 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -68,38 +68,38 @@ github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA=
github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg=
github.com/spf13/viper v1.18.2 h1:LUXCnvUvSM6FXAsj6nnfc8Q2tp1dIgUfY9Kc8GsSOiQ=
github.com/spf13/viper v1.18.2/go.mod h1:EKmWIqdnk5lOcmR72yw6hS+8OPYcwD0jteitLMVB+yk=
github.com/stackitcloud/stackit-sdk-go/core v0.10.1 h1:lzyualywD/2xIsYUHwlqCurG1OwlqCJVtJbOcPO6OzE=
github.com/stackitcloud/stackit-sdk-go/core v0.10.1/go.mod h1:mDX1mSTsB3mP+tNBGcFNx6gH1mGBN4T+dVt+lcw7nlw=
github.com/stackitcloud/stackit-sdk-go/services/argus v0.9.5 h1:RLsA2jO9sMNpn7NYdtFyumY5Vj4n4WtBm2J2NBKlsnw=
github.com/stackitcloud/stackit-sdk-go/services/argus v0.9.5/go.mod h1:lzGbqwV0hqeX/kUvaaFTgjOJRxUlsZ911TX1YAcKwqc=
github.com/stackitcloud/stackit-sdk-go/services/authorization v0.1.1 h1:h7dCaBlbU34WSGuEXREmCdCzQafZgdXDZuairAzeuo8=
github.com/stackitcloud/stackit-sdk-go/services/authorization v0.1.1/go.mod h1:V+wTIfuJRV8PiSOfMX6GCTaHWltGaLCz8ImOKeHIaIA=
github.com/stackitcloud/stackit-sdk-go/services/dns v0.8.4 h1:n/X2pVdETDXGHk+vCsg0p3b2zGxSRMJ065to/aAoncg=
github.com/stackitcloud/stackit-sdk-go/services/dns v0.8.4/go.mod h1:PvgUVFLgELRADWk2epZdCryk0fs8b4DN47ghEJjNWhk=
github.com/stackitcloud/stackit-sdk-go/services/logme v0.10.1 h1:/yEAySr1P+52l82g93EBEBHLcu74UNZxBg/32EwOzDo=
github.com/stackitcloud/stackit-sdk-go/services/logme v0.10.1/go.mod h1:HSMbEONG7BoixaR7McsYgYmt/lKRc5GMzn2eIj3HFKs=
github.com/stackitcloud/stackit-sdk-go/services/mariadb v0.10.1 h1:Y0BwYv2+B3Dg8Wo9GkaWYf+CcNww9Xm38FB/chj6OiM=
github.com/stackitcloud/stackit-sdk-go/services/mariadb v0.10.1/go.mod h1:2KR68oxSpkiuBGYTYlESMP37oNlSMZXVgyQbSC4PZ+8=
github.com/stackitcloud/stackit-sdk-go/services/mongodbflex v0.11.1 h1:SDeQf60BgAwsnB3366yz58ElvVwlyd7M/lPZIEqv9gU=
github.com/stackitcloud/stackit-sdk-go/services/mongodbflex v0.11.1/go.mod h1:/hQ7GW2hAqcKjKlNCcVJA9zNu3vGFzRaPdhMjfoIKFo=
github.com/stackitcloud/stackit-sdk-go/services/objectstorage v0.8.6 h1:+mcoBKs6ae4eJM0Whuf6lcGuwU341vaBQjr7W/WEGZg=
github.com/stackitcloud/stackit-sdk-go/services/objectstorage v0.8.6/go.mod h1:W9BML8bqZb2dOZe1K+M+qBBs8/QNirr3jA0xxy9tNRY=
github.com/stackitcloud/stackit-sdk-go/services/opensearch v0.10.1 h1:LKic8dXtXKsRst2+wY9dNjjkMyJ05QIDpOJuRmVb410=
github.com/stackitcloud/stackit-sdk-go/services/opensearch v0.10.1/go.mod h1:g1o1bmqtTliy9UkFlRV/6bn6GQk+hkvnny3UjMI69S0=
github.com/stackitcloud/stackit-sdk-go/services/postgresflex v0.12.0 h1:W2WSYUyhKaHQ+BZfmyRw9PKv5q7ihGRyNhNgIlyM+Y8=
github.com/stackitcloud/stackit-sdk-go/services/postgresflex v0.12.0/go.mod h1:P0YyvgwIsVKJijdWGVJVOp/ac7PVX99Oj+dr4v1zECc=
github.com/stackitcloud/stackit-sdk-go/services/rabbitmq v0.10.0 h1:Fle394socpyf662g3jMrtZpZaWVgBMBIEFnh4fnGock=
github.com/stackitcloud/stackit-sdk-go/services/rabbitmq v0.10.0/go.mod h1:JvqOSrTCiynS0x6Y9OsK54yvdB6AtIWLwXDEjoCkAIg=
github.com/stackitcloud/stackit-sdk-go/services/redis v0.10.1 h1:/tRad17HUcGRm448l8XyX6uhnnHVfj3VdUQquIwNq2Q=
github.com/stackitcloud/stackit-sdk-go/services/redis v0.10.1/go.mod h1:vR/0cYTcVrPTTAHJGH2VT0H2g1D+wlx1n2WiAo6r5LI=
github.com/stackitcloud/stackit-sdk-go/services/resourcemanager v0.7.7 h1:yFxTdMj5al2pR4ZIOKKxoN8CHo2kTylurArt+jJMzxI=
github.com/stackitcloud/stackit-sdk-go/services/resourcemanager v0.7.7/go.mod h1:GvNV2GR0x0VGHzixGNgAJibqjwiVFwbxakpyu+qdijc=
github.com/stackitcloud/stackit-sdk-go/services/secretsmanager v0.6.0 h1:VC7VWadRo8r0eQUXMrYv6vEyS/5acW8faMSv9lxQMgw=
github.com/stackitcloud/stackit-sdk-go/services/secretsmanager v0.6.0/go.mod h1:KRoLXZdH8yuO6FBu2Grl5VGqW9arH03qYAC0P6H8h9o=
github.com/stackitcloud/stackit-sdk-go/services/serviceaccount v0.3.6 h1:3kkNh2kHi55w9dgh0MC1Zbn8fDpYxcXl3tvYjH8t9xo=
github.com/stackitcloud/stackit-sdk-go/services/serviceaccount v0.3.6/go.mod h1:OOciROyQxPOYLo8OM/DE5ESH11+DvAyRt6wg7R+HVkg=
github.com/stackitcloud/stackit-sdk-go/services/ske v0.11.0 h1:BJ1Op7f3KJPNROkEXzqAREl55JCqyIAyQJ+Gfu4LYCM=
github.com/stackitcloud/stackit-sdk-go/services/ske v0.11.0/go.mod h1:yFLjTx58pjHCp0KZTaqHlW9Qk60CY5HpnBWR/zztv8Y=
github.com/stackitcloud/stackit-sdk-go/core v0.12.0 h1:auIzUUNRuydKOScvpICP4MifGgvOajiDQd+ncGmBL0U=
github.com/stackitcloud/stackit-sdk-go/core v0.12.0/go.mod h1:mDX1mSTsB3mP+tNBGcFNx6gH1mGBN4T+dVt+lcw7nlw=
github.com/stackitcloud/stackit-sdk-go/services/argus v0.10.0 h1:FAYOt6UBy/F2jPH2C/NnZnbjLZryJBjtM3afLVgGc4w=
github.com/stackitcloud/stackit-sdk-go/services/argus v0.10.0/go.mod h1:nVllQfYODhX1q3bgwVTLO7wHOp+8NMLiKbn3u/Dg5nU=
github.com/stackitcloud/stackit-sdk-go/services/authorization v0.2.0 h1:vdv8DiG9KN6r0UilBeNbwEWItX/HqUMm6kab3t71kpY=
github.com/stackitcloud/stackit-sdk-go/services/authorization v0.2.0/go.mod h1:1sLuXa7Qvp9f+wKWdRjyNe8B2F8JX7nSTd8fBKadri4=
github.com/stackitcloud/stackit-sdk-go/services/dns v0.9.0 h1:sxvlcey7EcBc52rU6vYJEFguWkz9dNbSv2xJ3+c+97M=
github.com/stackitcloud/stackit-sdk-go/services/dns v0.9.0/go.mod h1:MdZcRbs19s2NLeJmSLSoqTzm9IPIQhE1ZEMpo9gePq0=
github.com/stackitcloud/stackit-sdk-go/services/logme v0.13.0 h1:/wqs+pfHSjFWTakJVQGD/KwArxmFN8qdYrJDUgA1Gxw=
github.com/stackitcloud/stackit-sdk-go/services/logme v0.13.0/go.mod h1:bj9cn1treNSxKTRCEmESwqfENN8vCYn60HUnEA0P83c=
github.com/stackitcloud/stackit-sdk-go/services/mariadb v0.13.0 h1:qioXHNeQ2xdwT5iGOk0c3hQIpct7zlAYzLRqXvsJ7CA=
github.com/stackitcloud/stackit-sdk-go/services/mariadb v0.13.0/go.mod h1:kPetkX9hNm9HkRyiKQL/tlgdi8frZdMP8afg0mEvQ9s=
github.com/stackitcloud/stackit-sdk-go/services/mongodbflex v0.12.0 h1:/m6N/CdsFxomexsowU7PwT1S4UTmI39PnEvvWGsDh1s=
github.com/stackitcloud/stackit-sdk-go/services/mongodbflex v0.12.0/go.mod h1:iFerEzGmkg6R13ldFUyHUWHm0ac9cS4ftTDLhP0k/dU=
github.com/stackitcloud/stackit-sdk-go/services/objectstorage v0.9.0 h1:rWgy4/eCIgyA2dUuc4a30pldmS6taQDwiLqoeZmyeP8=
github.com/stackitcloud/stackit-sdk-go/services/objectstorage v0.9.0/go.mod h1:dkVMJI88eJ3Xs0ZV15r4tUpgitUGJXcvrX3RL4Zq2bQ=
github.com/stackitcloud/stackit-sdk-go/services/opensearch v0.13.0 h1:dzt2wd1QkFVctKPQDBlyMCsHEJV4Bf2bRkZTUFFCZhs=
github.com/stackitcloud/stackit-sdk-go/services/opensearch v0.13.0/go.mod h1:ZecMIf9oYj2DGZqWh93l97WdVaRdLl+tW5Fq3YKGwBM=
github.com/stackitcloud/stackit-sdk-go/services/postgresflex v0.13.0 h1:PGLjBZxWM7NIrH1+W1+f+/4kZEgwv9DGnXcUzOqM0M8=
github.com/stackitcloud/stackit-sdk-go/services/postgresflex v0.13.0/go.mod h1:SdrqGLCkilL6wl1+jcxmLtks2IocgIg+bsyeyYUIzR4=
github.com/stackitcloud/stackit-sdk-go/services/rabbitmq v0.13.0 h1:bdmZhVAuyPiaAeJnBRLMVtVix6DYzNYbpdPiq/Z3XCI=
github.com/stackitcloud/stackit-sdk-go/services/rabbitmq v0.13.0/go.mod h1:eSgnPBknTJh7t+jVKN+xzeAh+Cg1USOlH3QCyfvG20g=
github.com/stackitcloud/stackit-sdk-go/services/redis v0.13.0 h1:MlREN/9zDntk90kahS0aJa/gPGAoUV4NLNnrTLs9CLc=
github.com/stackitcloud/stackit-sdk-go/services/redis v0.13.0/go.mod h1:3LhiTR/DMbKR2HuleTzlFHltR1MT1KD0DeW46X6K2GE=
github.com/stackitcloud/stackit-sdk-go/services/resourcemanager v0.8.0 h1:7AIvLkB7JZ5lYKtYLwI0rgJ0185hwQC1PFiUrjcinDM=
github.com/stackitcloud/stackit-sdk-go/services/resourcemanager v0.8.0/go.mod h1:p16qz/pAW8b1gEhqMpIgJfutRPeDPqQLlbVGyCo3f8o=
github.com/stackitcloud/stackit-sdk-go/services/secretsmanager v0.7.0 h1:1Ho+M4DyZHrwbDe1peW//x+/hegIuaUdZqbQEbPlr4k=
github.com/stackitcloud/stackit-sdk-go/services/secretsmanager v0.7.0/go.mod h1:LX0Mcyr7/QP77zf7e05fHCJO38RMuTxr7nEDUDZ3oPQ=
github.com/stackitcloud/stackit-sdk-go/services/serviceaccount v0.4.0 h1:JB1O0E9+L50ZaO36uz7azurvUuB5JdX5s2ZXuIdb9t8=
github.com/stackitcloud/stackit-sdk-go/services/serviceaccount v0.4.0/go.mod h1:Ni9RBJvcaXRIrDIuQBpJcuQvCQSj27crQSyc+WM4p0c=
github.com/stackitcloud/stackit-sdk-go/services/ske v0.12.0 h1:sG45CkR+v8BUQBREROjTbJV/ZK5Xg+Rd6ulzM25UoGw=
github.com/stackitcloud/stackit-sdk-go/services/ske v0.12.0/go.mod h1:0fFs4R7kg+gU7FNAIzzFvlCZJz6gyZ8CFhbK3eSrAwQ=
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw=
github.com/stretchr/objx v0.5.0 h1:1zr/of2m5FGMsad5YfcqgdqdWrIhu+EBEJRhR1U7z/c=
Expand Down
5 changes: 0 additions & 5 deletions internal/cmd/logme/instance/create/create.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ const (
metricsFrequencyFlag = "metrics-frequency"
metricsPrefixFlag = "metrics-prefix"
monitoringInstanceIdFlag = "monitoring-instance-id"
pluginFlag = "plugin"
sgwAclFlag = "acl"
syslogFlag = "syslog"
planIdFlag = "plan-id"
Expand All @@ -49,7 +48,6 @@ type inputModel struct {
MetricsFrequency *int64
MetricsPrefix *string
MonitoringInstanceId *string
Plugin *[]string
SgwAcl *[]string
Syslog *[]string
PlanId *string
Expand Down Expand Up @@ -143,7 +141,6 @@ func configureFlags(cmd *cobra.Command) {
cmd.Flags().Int64(metricsFrequencyFlag, 0, "Metrics frequency")
cmd.Flags().String(metricsPrefixFlag, "", "Metrics prefix")
cmd.Flags().Var(flags.UUIDFlag(), monitoringInstanceIdFlag, "Monitoring instance ID")
cmd.Flags().StringSlice(pluginFlag, []string{}, "Plugin")
cmd.Flags().Var(flags.CIDRSliceFlag(), sgwAclFlag, "List of IP networks in CIDR notation which are allowed to access this instance")
cmd.Flags().StringSlice(syslogFlag, []string{}, "Syslog")
cmd.Flags().Var(flags.UUIDFlag(), planIdFlag, "Plan ID")
Expand Down Expand Up @@ -183,7 +180,6 @@ func parseInput(cmd *cobra.Command) (*inputModel, error) {
Graphite: flags.FlagToStringPointer(cmd, graphiteFlag),
MetricsFrequency: flags.FlagToInt64Pointer(cmd, metricsFrequencyFlag),
MetricsPrefix: flags.FlagToStringPointer(cmd, metricsPrefixFlag),
Plugin: flags.FlagToStringSlicePointer(cmd, pluginFlag),
SgwAcl: flags.FlagToStringSlicePointer(cmd, sgwAclFlag),
Syslog: flags.FlagToStringSlicePointer(cmd, syslogFlag),
PlanId: planId,
Expand Down Expand Up @@ -238,7 +234,6 @@ func buildRequest(ctx context.Context, model *inputModel, apiClient logMeClient)
MonitoringInstanceId: model.MonitoringInstanceId,
MetricsFrequency: model.MetricsFrequency,
MetricsPrefix: model.MetricsPrefix,
Plugins: model.Plugin,
SgwAcl: sgwAcl,
Syslog: model.Syslog,
},
Expand Down
25 changes: 0 additions & 25 deletions internal/cmd/logme/instance/create/create_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ func fixtureFlagValues(mods ...func(flagValues map[string]string)) map[string]st
metricsFrequencyFlag: "100",
metricsPrefixFlag: "example-prefix",
monitoringInstanceIdFlag: testMonitoringInstanceId,
pluginFlag: "example-plugin",
sgwAclFlag: "198.51.100.14/24",
syslogFlag: "example-syslog",
planIdFlag: testPlanId,
Expand All @@ -73,7 +72,6 @@ func fixtureInputModel(mods ...func(model *inputModel)) *inputModel {
MetricsFrequency: utils.Ptr(int64(100)),
MetricsPrefix: utils.Ptr("example-prefix"),
MonitoringInstanceId: utils.Ptr(testMonitoringInstanceId),
Plugin: utils.Ptr([]string{"example-plugin"}),
SgwAcl: utils.Ptr([]string{"198.51.100.14/24"}),
Syslog: utils.Ptr([]string{"example-syslog"}),
PlanId: utils.Ptr(testPlanId),
Expand All @@ -94,7 +92,6 @@ func fixtureRequest(mods ...func(request *logme.ApiCreateInstanceRequest)) logme
MetricsFrequency: utils.Ptr(int64(100)),
MetricsPrefix: utils.Ptr("example-prefix"),
MonitoringInstanceId: utils.Ptr(testMonitoringInstanceId),
Plugins: utils.Ptr([]string{"example-plugin"}),
SgwAcl: utils.Ptr("198.51.100.14/24"),
Syslog: utils.Ptr([]string{"example-syslog"}),
},
Expand All @@ -111,7 +108,6 @@ func TestParseInput(t *testing.T) {
description string
flagValues map[string]string
sgwAclValues []string
pluginValues []string
syslogValues []string
isValid bool
expectedModel *inputModel
Expand Down Expand Up @@ -249,17 +245,6 @@ func TestParseInput(t *testing.T) {
)
}),
},
{
description: "repeated plugin flags",
flagValues: fixtureFlagValues(),
pluginValues: []string{"example-plugin-1", "example-plugin-2"},
isValid: true,
expectedModel: fixtureInputModel(func(model *inputModel) {
model.Plugin = utils.Ptr(
append(*model.Plugin, "example-plugin-1", "example-plugin-2"),
)
}),
},
{
description: "repeated syslog flags",
flagValues: fixtureFlagValues(),
Expand Down Expand Up @@ -301,16 +286,6 @@ func TestParseInput(t *testing.T) {
}
}

for _, value := range tt.pluginValues {
err := cmd.Flags().Set(pluginFlag, value)
if err != nil {
if !tt.isValid {
return
}
t.Fatalf("setting flag --%s=%s: %v", pluginFlag, value, err)
}
}

for _, value := range tt.syslogValues {
err := cmd.Flags().Set(syslogFlag, value)
if err != nil {
Expand Down
7 changes: 1 addition & 6 deletions internal/cmd/logme/instance/update/update.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ type inputModel struct {
MetricsFrequency *int64
MetricsPrefix *string
MonitoringInstanceId *string
Plugin *[]string
SgwAcl *[]string
Syslog *[]string
PlanId *string
Expand Down Expand Up @@ -140,7 +139,6 @@ func configureFlags(cmd *cobra.Command) {
cmd.Flags().Int64(metricsFrequencyFlag, 0, "Metrics frequency")
cmd.Flags().String(metricsPrefixFlag, "", "Metrics prefix")
cmd.Flags().Var(flags.UUIDFlag(), monitoringInstanceIdFlag, "Monitoring instance ID")
cmd.Flags().StringSlice(pluginFlag, []string{}, "Plugin")
cmd.Flags().Var(flags.CIDRSliceFlag(), sgwAclFlag, "List of IP networks in CIDR notation which are allowed to access this instance")
cmd.Flags().StringSlice(syslogFlag, []string{}, "Syslog")
cmd.Flags().Var(flags.UUIDFlag(), planIdFlag, "Plan ID")
Expand All @@ -161,7 +159,6 @@ func parseInput(cmd *cobra.Command, inputArgs []string) (*inputModel, error) {
graphite := flags.FlagToStringPointer(cmd, graphiteFlag)
metricsFrequency := flags.FlagToInt64Pointer(cmd, metricsFrequencyFlag)
metricsPrefix := flags.FlagToStringPointer(cmd, metricsPrefixFlag)
plugin := flags.FlagToStringSlicePointer(cmd, pluginFlag)
sgwAcl := flags.FlagToStringSlicePointer(cmd, sgwAclFlag)
syslog := flags.FlagToStringSlicePointer(cmd, syslogFlag)
planId := flags.FlagToStringPointer(cmd, planIdFlag)
Expand All @@ -176,7 +173,7 @@ func parseInput(cmd *cobra.Command, inputArgs []string) (*inputModel, error) {
}

if enableMonitoring == nil && monitoringInstanceId == nil && graphite == nil &&
metricsFrequency == nil && metricsPrefix == nil && plugin == nil &&
metricsFrequency == nil && metricsPrefix == nil &&
sgwAcl == nil && syslog == nil && planId == nil &&
planName == "" && version == "" {
return nil, &cliErr.EmptyUpdateError{}
Expand All @@ -190,7 +187,6 @@ func parseInput(cmd *cobra.Command, inputArgs []string) (*inputModel, error) {
Graphite: graphite,
MetricsFrequency: metricsFrequency,
MetricsPrefix: metricsPrefix,
Plugin: plugin,
SgwAcl: sgwAcl,
Syslog: syslog,
PlanId: planId,
Expand Down Expand Up @@ -247,7 +243,6 @@ func buildRequest(ctx context.Context, model *inputModel, apiClient logMeClient)
MonitoringInstanceId: model.MonitoringInstanceId,
MetricsFrequency: model.MetricsFrequency,
MetricsPrefix: model.MetricsPrefix,
Plugins: model.Plugin,
SgwAcl: sgwAcl,
Syslog: model.Syslog,
},
Expand Down
Loading

0 comments on commit 69041f2

Please sign in to comment.