summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
Diffstat (limited to 'doc')
-rw-r--r--doc/status.txt12
1 files changed, 7 insertions, 5 deletions
diff --git a/doc/status.txt b/doc/status.txt
index 5958fa85..60993216 100644
--- a/doc/status.txt
+++ b/doc/status.txt
@@ -3,7 +3,7 @@ wishing to use it to determine cloud-init status.
It will manage 2 files:
status.json
- finished.json
+ result.json
The files will be written to /var/lib/cloud/data/ .
A symlink will be created in /run/cloud-init. The link from /run is to ensure
@@ -33,18 +33,20 @@ status.json's format is:
of each of the above stages to determine the state.
}
-finished.json's format is:
+result.json's format is:
{
+ 'v1': {
'datasource': string describing the datasource found
'errors': [] # list of errors reported
+ }
}
Thus, to determine if cloud-init is finished:
- fin = "/run/cloud-init/finished.json"
+ fin = "/run/cloud-init/result.json"
if os.path.exists(fin):
ret = json.load(open(fin, "r"))
- if len(ret):
- print "Finished with errors:" + "\n".join(ret['errors'])
+ if len(ret['v1']['errors']):
+ print "Finished with errors:" + "\n".join(ret['v1']['errors'])
else:
print "Finished no errors"
else: