forked from vmware/photon
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added fix for generating the json files for cloud images
- Loading branch information
1 parent
8d282b9
commit 94cdb4d
Showing
4 changed files
with
116 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
{ | ||
"iso" : { | ||
"title" : "ISO Packages", | ||
"file" : "packages_iso.json", | ||
"visible" : false, | ||
"include" : [] | ||
}, | ||
"minimal" : { | ||
"title" : "Photon Minimal", | ||
"file" : "packages_minimal.json", | ||
"visible" : true, | ||
"include" : [] | ||
}, | ||
"ami" : { | ||
"title" : "Photon AMI packages", | ||
"file" : "packages_ami.json", | ||
"visible" : false, | ||
"include" : ["minimal"] | ||
}, | ||
"azure" : { | ||
"title" : "Photon Azure packages", | ||
"file" : "packages_azure.json", | ||
"visible" : false, | ||
"include" : ["minimal"] | ||
}, | ||
"gce" : { | ||
"title" : "Photon GCE packages", | ||
"file" : "packages_gce.json", | ||
"visible" : false, | ||
"include" : ["minimal"] | ||
}, | ||
"minimal_ova" : { | ||
"title" : "Photon Minimal", | ||
"file" : "packages_minimal_ova.json", | ||
"visible" : false, | ||
"include" : [] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
#!/usr/bin/python2 | ||
# | ||
# Copyright (C) 2015 vmware inc. | ||
# | ||
# Author: Sharath George <sharathg@vmware.com> | ||
|
||
|
||
import json | ||
import collections | ||
|
||
class JsonWrapper(object): | ||
|
||
def __init__(self, filename): | ||
self.filename = filename | ||
|
||
def read(self): | ||
json_data = open(self.filename) | ||
self.data = json.load(json_data, object_pairs_hook=collections.OrderedDict) | ||
json_data.close() | ||
return self.data | ||
|
||
def write(self, data): | ||
self.data = data | ||
outfile = open(self.filename, 'wb') | ||
json.dump(data, outfile) |