Update json schema
This commit is contained in:
parent
c206d8c90a
commit
58e31bed84
34
app.py
34
app.py
@ -40,7 +40,8 @@ def load_status():
|
|||||||
"server": "unknown",
|
"server": "unknown",
|
||||||
"sync_status": "UNKNOWN",
|
"sync_status": "UNKNOWN",
|
||||||
"drift_count": 0,
|
"drift_count": 0,
|
||||||
"files": [],
|
"deployed_files": [],
|
||||||
|
"drifted_files": [],
|
||||||
"last_check": ""
|
"last_check": ""
|
||||||
}
|
}
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
@ -89,8 +90,20 @@ def api_status():
|
|||||||
type: string
|
type: string
|
||||||
drift_count:
|
drift_count:
|
||||||
type: integer
|
type: integer
|
||||||
files:
|
deployed_files:
|
||||||
type: array
|
type: array
|
||||||
|
items:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
name:
|
||||||
|
type: string
|
||||||
|
drifted_files:
|
||||||
|
type: array
|
||||||
|
items:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
name:
|
||||||
|
type: string
|
||||||
last_check:
|
last_check:
|
||||||
type: string
|
type: string
|
||||||
post:
|
post:
|
||||||
@ -113,10 +126,22 @@ def api_status():
|
|||||||
enum: ["SYNCED", "OUT_OF_SYNC", "UNKNOWN", "PROGRESSING"]
|
enum: ["SYNCED", "OUT_OF_SYNC", "UNKNOWN", "PROGRESSING"]
|
||||||
drift_count:
|
drift_count:
|
||||||
type: integer
|
type: integer
|
||||||
files:
|
deployed_files:
|
||||||
type: array
|
type: array
|
||||||
items:
|
items:
|
||||||
type: object
|
type: object
|
||||||
|
properties:
|
||||||
|
name:
|
||||||
|
type: string
|
||||||
|
example: [{"name": "rsyslog.conf"}]
|
||||||
|
drifted_files:
|
||||||
|
type: array
|
||||||
|
items:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
name:
|
||||||
|
type: string
|
||||||
|
example: []
|
||||||
last_check:
|
last_check:
|
||||||
type: string
|
type: string
|
||||||
responses:
|
responses:
|
||||||
@ -206,7 +231,8 @@ def ready():
|
|||||||
"server": "unknown",
|
"server": "unknown",
|
||||||
"sync_status": "UNKNOWN",
|
"sync_status": "UNKNOWN",
|
||||||
"drift_count": 0,
|
"drift_count": 0,
|
||||||
"files": [],
|
"deployed_files": [],
|
||||||
|
"drifted_files": [],
|
||||||
"last_check": ""
|
"last_check": ""
|
||||||
}
|
}
|
||||||
save_status(default_status)
|
save_status(default_status)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user