@@ -40,7 +40,7 @@ Service name: {{ .Service.ServiceName }}
40
40
` )
41
41
42
42
type addMongoDBResult struct {
43
- Service * mservice.AddMongoDBOKBodyService `json:"service"`
43
+ Service * mservice.AddServiceOKBodyMongodbService `json:"service"`
44
44
}
45
45
46
46
func (res * addMongoDBResult ) Result () {}
@@ -159,51 +159,53 @@ func (cmd *AddMongoDBCommand) RunCmd() (commands.Result, error) {
159
159
}
160
160
}
161
161
162
- params := & mservice.AddMongoDBParams {
163
- Body : mservice.AddMongoDBBody {
164
- NodeID : cmd .NodeID ,
165
- ServiceName : serviceName ,
166
- Address : host ,
167
- Socket : socket ,
168
- Port : int64 (port ),
169
- ExposeExporter : cmd .ExposeExporter ,
170
- PMMAgentID : cmd .PMMAgentID ,
171
- Environment : cmd .Environment ,
172
- Cluster : cmd .Cluster ,
173
- ReplicationSet : cmd .ReplicationSet ,
174
- Username : cmd .Username ,
175
- Password : cmd .Password ,
176
- AgentPassword : cmd .AgentPassword ,
177
-
178
- QANMongodbProfiler : cmd .QuerySource == MongodbQuerySourceProfiler ,
179
-
180
- CustomLabels : customLabels ,
181
- SkipConnectionCheck : cmd .SkipConnectionCheck ,
182
- MaxQueryLength : cmd .MaxQueryLength ,
183
- TLS : cmd .TLS ,
184
- TLSSkipVerify : cmd .TLSSkipVerify ,
185
- TLSCertificateKey : tlsCertificateKey ,
186
- TLSCertificateKeyFilePassword : cmd .TLSCertificateKeyFilePassword ,
187
- TLSCa : tlsCa ,
188
- AuthenticationMechanism : cmd .AuthenticationMechanism ,
189
- AuthenticationDatabase : cmd .AuthenticationDatabase ,
190
-
191
- MetricsMode : pointer .ToString (strings .ToUpper (cmd .MetricsMode )),
192
-
193
- EnableAllCollectors : cmd .EnableAllCollectors ,
194
- DisableCollectors : commands .ParseDisableCollectors (cmd .DisableCollectors ),
195
- StatsCollections : commands .ParseDisableCollectors (cmd .StatsCollections ),
196
- CollectionsLimit : cmd .CollectionsLimit ,
197
- LogLevel : & cmd .AddLogLevel ,
162
+ params := & mservice.AddServiceParams {
163
+ Body : mservice.AddServiceBody {
164
+ Mongodb : & mservice.AddServiceParamsBodyMongodb {
165
+ NodeID : cmd .NodeID ,
166
+ ServiceName : serviceName ,
167
+ Address : host ,
168
+ Socket : socket ,
169
+ Port : int64 (port ),
170
+ ExposeExporter : cmd .ExposeExporter ,
171
+ PMMAgentID : cmd .PMMAgentID ,
172
+ Environment : cmd .Environment ,
173
+ Cluster : cmd .Cluster ,
174
+ ReplicationSet : cmd .ReplicationSet ,
175
+ Username : cmd .Username ,
176
+ Password : cmd .Password ,
177
+ AgentPassword : cmd .AgentPassword ,
178
+
179
+ QANMongodbProfiler : cmd .QuerySource == MongodbQuerySourceProfiler ,
180
+
181
+ CustomLabels : customLabels ,
182
+ SkipConnectionCheck : cmd .SkipConnectionCheck ,
183
+ MaxQueryLength : cmd .MaxQueryLength ,
184
+ TLS : cmd .TLS ,
185
+ TLSSkipVerify : cmd .TLSSkipVerify ,
186
+ TLSCertificateKey : tlsCertificateKey ,
187
+ TLSCertificateKeyFilePassword : cmd .TLSCertificateKeyFilePassword ,
188
+ TLSCa : tlsCa ,
189
+ AuthenticationMechanism : cmd .AuthenticationMechanism ,
190
+ AuthenticationDatabase : cmd .AuthenticationDatabase ,
191
+
192
+ MetricsMode : pointer .ToString (strings .ToUpper (cmd .MetricsMode )),
193
+
194
+ EnableAllCollectors : cmd .EnableAllCollectors ,
195
+ DisableCollectors : commands .ParseDisableCollectors (cmd .DisableCollectors ),
196
+ StatsCollections : commands .ParseDisableCollectors (cmd .StatsCollections ),
197
+ CollectionsLimit : cmd .CollectionsLimit ,
198
+ LogLevel : & cmd .AddLogLevel ,
199
+ },
198
200
},
199
201
Context : commands .Ctx ,
200
202
}
201
- resp , err := client .Default .ManagementService .AddMongoDB (params )
203
+ resp , err := client .Default .ManagementService .AddService (params )
202
204
if err != nil {
203
205
return nil , err
204
206
}
205
207
206
208
return & addMongoDBResult {
207
- Service : resp .Payload .Service ,
209
+ Service : resp .Payload .Mongodb . Service ,
208
210
}, nil
209
211
}
0 commit comments