projects
/
ganeti-local
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
check-python-code: Report EOL whitespace
[ganeti-local]
/
scripts
/
gnt-instance
diff --git
a/scripts/gnt-instance
b/scripts/gnt-instance
index
fd304df
..
4980614
100755
(executable)
--- a/
scripts/gnt-instance
+++ b/
scripts/gnt-instance
@@
-443,9
+443,7
@@
def BatchCreate(opts, args):
json_filename = args[0]
try:
json_filename = args[0]
try:
- fd = open(json_filename, 'r')
- instance_data = simplejson.load(fd)
- fd.close()
+ instance_data = simplejson.loads(utils.ReadFile(json_filename))
except Exception, err:
ToStderr("Can't parse the instance definition file: %s" % str(err))
return 1
except Exception, err:
ToStderr("Can't parse the instance definition file: %s" % str(err))
return 1
@@
-1371,7
+1369,8
@@
add_opts = [
DEBUG_OPT,
cli_option("-n", "--node", dest="node",
help="Target node and optional secondary node",
DEBUG_OPT,
cli_option("-n", "--node", dest="node",
help="Target node and optional secondary node",
- metavar="<pnode>[:<snode>]"),
+ metavar="<pnode>[:<snode>]",
+ completion_suggest=OPT_COMPL_INST_ADD_NODES),
os_opt,
cli_option("-B", "--backend", dest="beparams",
type="keyval", default={},
os_opt,
cli_option("-B", "--backend", dest="beparams",
type="keyval", default={},