4.10.1
This commit is contained in:
@@ -43,6 +43,7 @@ func flattenAudit(d *schema.ResourceData, au *audit.RecordAudit) {
|
||||
|
||||
d.Set("args", au.Arguments)
|
||||
d.Set("call", au.Call)
|
||||
d.Set("correlation_id", au.CorrelationID)
|
||||
d.Set("guid", au.GUID)
|
||||
d.Set("kwargs", au.Kwargs)
|
||||
d.Set("remote_addr", au.RemoteAddr)
|
||||
@@ -54,3 +55,26 @@ func flattenAudit(d *schema.ResourceData, au *audit.RecordAudit) {
|
||||
d.Set("timestamp_end", au.TimestampEnd)
|
||||
d.Set("user", au.User)
|
||||
}
|
||||
|
||||
func flattenAuditList(au *audit.ListAudits) []map[string]interface{} {
|
||||
res := make([]map[string]interface{}, 0, len(au.Data))
|
||||
for _, item := range au.Data {
|
||||
temp := map[string]interface{}{
|
||||
"args": item.Args,
|
||||
"call": item.Call,
|
||||
"correlation_id": item.CorrelationID,
|
||||
"guid": item.GUID,
|
||||
"kwargs": item.Kwargs,
|
||||
"remote_addr": item.RemoteAddr,
|
||||
"result": item.Result,
|
||||
"responsetime": item.ResponseTime,
|
||||
"status_code": item.StatusCode,
|
||||
"timestamp": item.Timestamp,
|
||||
"timestamp_end": item.TimestampEnd,
|
||||
"ttl": item.TTL,
|
||||
"user": item.User,
|
||||
}
|
||||
res = append(res, temp)
|
||||
}
|
||||
return res
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user