{
"name": "osm-lw-ui",
"authors": [
- "Francesco Lombardo <flombardo@cnit.it>"
+ "Francesco Lombardo <lombardo@everyup.it>"
],
"description": "OSM Light UI",
"main": "",
"vimAccountId": request.POST.get('vimAccountId', ''),
}
if 'ssh_key' in request.POST and request.POST.get('ssh_key') != '':
- ns_data["ssh-authorized-key"] = [request.POST.get('ssh_key')]
+ ns_data["ssh_keys"] = request.POST.get('ssh_key')
if 'config' in request.POST:
ns_config = yaml.load(request.POST.get('config'))
from lib.util import Util
import hashlib
import os
+from requests.packages.urllib3.exceptions import InsecureRequestWarning
-logging.basicConfig(level=logging.DEBUG)
-log = logging.getLogger('helper.py')
+requests.packages.urllib3.disable_warnings(InsecureRequestWarning)
+logging.basicConfig(level=logging.INFO)
+log = logging.getLogger('helper.py')
+logging.getLogger("urllib3").setLevel(logging.INFO)
class Client(object):
def __init__(self):
'Authorization': 'Bearer {}'.format(token['id'])}
_url = "{0}/admin/v1/users/{1}".format(self._base_path, id)
- print _url
- print user_data
try:
r = requests.post(_url, json=user_data, verify=False, headers=headers)
except Exception as e: