4.6.0
This commit is contained in:
@@ -78,6 +78,7 @@ func flattenLinkedJobs(ljl *audit.ListLinkedJobs) []map[string]interface{} {
|
||||
for _, item := range linkedJobs {
|
||||
temp := map[string]interface{}{
|
||||
"cmd": item.CMD,
|
||||
"guid": item.GUID,
|
||||
"nid": item.NID,
|
||||
"state": item.State,
|
||||
"time_create": item.TimeCreate,
|
||||
|
||||
@@ -87,10 +87,20 @@ func dataSourceAuditListSchemaMake() map[string]*schema.Schema {
|
||||
Optional: true,
|
||||
Description: "find by api endpoint (Mongo RegExp supported)",
|
||||
},
|
||||
"status_code": {
|
||||
"min_status_code": {
|
||||
Type: schema.TypeInt,
|
||||
Optional: true,
|
||||
Description: "find by HTTP status code",
|
||||
Description: "find by HTTP min status code",
|
||||
},
|
||||
"max_status_code": {
|
||||
Type: schema.TypeInt,
|
||||
Optional: true,
|
||||
Description: "find by HTTP max status code",
|
||||
},
|
||||
"sort_by": {
|
||||
Type: schema.TypeString,
|
||||
Optional: true,
|
||||
Description: "sort by one of supported fields, format +|-(field)",
|
||||
},
|
||||
"page": {
|
||||
Type: schema.TypeInt,
|
||||
@@ -161,6 +171,11 @@ func dataSourceLinkedJobsSchemaMake() map[string]*schema.Schema {
|
||||
Computed: true,
|
||||
Description: "cmd",
|
||||
},
|
||||
"guid": {
|
||||
Type: schema.TypeString,
|
||||
Computed: true,
|
||||
Description: "guid",
|
||||
},
|
||||
"nid": {
|
||||
Type: schema.TypeInt,
|
||||
Computed: true,
|
||||
|
||||
@@ -58,8 +58,14 @@ func utilityAuditListCheckPresence(ctx context.Context, d *schema.ResourceData,
|
||||
if call, ok := d.GetOk("call"); ok {
|
||||
req.Call = call.(string)
|
||||
}
|
||||
if statusCode, ok := d.GetOk("status_code"); ok {
|
||||
req.StatusCode = uint64(statusCode.(int))
|
||||
if minStatusCode, ok := d.GetOk("min_status_code"); ok {
|
||||
req.MinStatusCode = uint64(minStatusCode.(int))
|
||||
}
|
||||
if maxStatusCode, ok := d.GetOk("max_status_code"); ok {
|
||||
req.MaxStatusCode = uint64(maxStatusCode.(int))
|
||||
}
|
||||
if sortBy, ok := d.GetOk("sort_by"); ok {
|
||||
req.SortBy = sortBy.(string)
|
||||
}
|
||||
if Page, ok := d.GetOk("page"); ok {
|
||||
req.Page = uint64(Page.(int))
|
||||
|
||||
Reference in New Issue
Block a user