mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +01:00
19 lines
443 B
Python
19 lines
443 B
Python
import json
|
|
import os
|
|
import random
|
|
import sys
|
|
|
|
class GlobalConfig:
|
|
"""Updates global configuration values"""
|
|
def __init__(self, api):
|
|
self._api = api
|
|
|
|
def update(self, key, value):
|
|
jsonresult = self._api.GET({'command': 'updateConfiguration', 'name':key,
|
|
'value':value})
|
|
if jsonresult is None:
|
|
print "Failed to update configuration"
|
|
return 1
|
|
|
|
return 0
|