From aa29ad4d84b259d568f31524760f5ec2e89864ed Mon Sep 17 00:00:00 2001 From: "Thorsten A. Knieling" Date: Wed, 13 Feb 2019 08:16:04 +0100 Subject: [PATCH 1/2] Use dbid in JSON template if not provided as parameter --- src/softwareag.com/cmd/database/databases.go | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/softwareag.com/cmd/database/databases.go b/src/softwareag.com/cmd/database/databases.go index fd7bed2..04fd299 100644 --- a/src/softwareag.com/cmd/database/databases.go +++ b/src/softwareag.com/cmd/database/databases.go @@ -176,7 +176,9 @@ func Status(clientInstance *client.AdabasAdmin, dbid int, auth runtime.ClientAut func Create(clientInstance *client.AdabasAdmin, dbid int, input string, auth runtime.ClientAuthInfoWriter) error { params := offline.NewPostAdabasDatabaseParams() params.Database = createDatabaseInstance(dbid, input) - params.Database.Dbid = int64(dbid) + if dbid > 0 { + params.Database.Dbid = int64(dbid) + } resp, err := clientInstance.Offline.PostAdabasDatabase(params, auth) if err != nil { switch err.(type) { @@ -572,7 +574,8 @@ func SetParameter(clientInstance *client.AdabasAdmin, dbid int, param string, au if f.IsNil() && f.CanSet() { switch v[0] { case "NT", "TT", "NU", "NCL", "NISNHQ", "TNAE", "TNAA", "TNAX", "LAB", "LABX", "LBP", - "LWP", "LPXA", "ADATCPPORT", "ADATCPRECEIVER", "ADATCPATB", "APUUNITS", "APURECVS", "APUWORKERS", + "LWP", "LPXA", "ADATCPPORT", "ADATCPRECEIVER", "ADATCPATB", "ADATCPCONNECTIONS", + "APUUNITS", "APURECVS", "APUWORKERS", "RPLBLOCKS", "RPLTOTAL", "RPLRECORDS", "WRITELIMIT": i, err := strconv.Atoi(v[1]) if err != nil { From 7080f46665dc22a6ed0ed5faca57633aa4271ac2 Mon Sep 17 00:00:00 2001 From: "Thorsten A. Knieling" Date: Wed, 13 Feb 2019 08:16:23 +0100 Subject: [PATCH 2/2] Add ADATCPCONNECTION for Adabas parameters --- swagger/aif-swagger.yaml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/swagger/aif-swagger.yaml b/swagger/aif-swagger.yaml index d5f76e6..703b487 100644 --- a/swagger/aif-swagger.yaml +++ b/swagger/aif-swagger.yaml @@ -676,6 +676,9 @@ paths: - name: ADATCPRECEIVER in: query type: integer + - name: ADATCPCONNECTIONS + in: query + type: integer - name: type in: query description: Type of parameter static or dynamic @@ -2432,6 +2435,9 @@ definitions: ADATCPATB: type: integer x-isnullable: false + ADATCPCONNECTIONS: + type: integer + x-isnullable: false required: - AR - BI