Add possibility to create arbitrary properties via portal-app-manager.py
This commit is contained in:
parent
7f9da048ba
commit
0dd2c10b87
@ -17,6 +17,9 @@ def main(args):
|
|||||||
data[args.app]['login'] = args.login
|
data[args.app]['login'] = args.login
|
||||||
if args.password:
|
if args.password:
|
||||||
data[args.app]['password'] = args.password
|
data[args.app]['password'] = args.password
|
||||||
|
if args.property:
|
||||||
|
for key, value in args.property:
|
||||||
|
data[args.app][key] = value
|
||||||
with open(jsonfile, 'w') as f:
|
with open(jsonfile, 'w') as f:
|
||||||
json.dump(data, f)
|
json.dump(data, f)
|
||||||
|
|
||||||
@ -26,4 +29,5 @@ if __name__ == '__main__':
|
|||||||
parser.add_argument('url', nargs='?', help='URL to the application. Use "{host}" as a host placeholder.')
|
parser.add_argument('url', nargs='?', help='URL to the application. Use "{host}" as a host placeholder.')
|
||||||
parser.add_argument('login', nargs='?', help='Administrative login.')
|
parser.add_argument('login', nargs='?', help='Administrative login.')
|
||||||
parser.add_argument('password', nargs='?', help='Administrative password.')
|
parser.add_argument('password', nargs='?', help='Administrative password.')
|
||||||
|
parser.add_argument('-p', '--property', nargs=2, action='append', help='Add arbitrary key-value to the application properties')
|
||||||
main(parser.parse_args())
|
main(parser.parse_args())
|
||||||
|
Loading…
Reference in New Issue
Block a user