Pull JSON schemas at build/test not run time
[dcaegen2/platform.git] / adapter / acumos / aoconversion / scanner.py
index 41f18de..aecf760 100644 (file)
@@ -1,7 +1,7 @@
 # ============LICENSE_START====================================================
 # org.onap.dcae
 # =============================================================================
-# Copyright (c) 2019 AT&T Intellectual Property. All rights reserved.
+# Copyright (c) 2019-2020 AT&T Intellectual Property. All rights reserved.
 # =============================================================================
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
@@ -47,8 +47,7 @@ class Config(object):
     Configuration parameters as attributes, make sure the required ones are there,
     populate defaults.
     """
-    def __init__(self, dcaeurl, dcaeuser, onboardingurl, onboardinguser, onboardingpass, certfile, dockerregistry, dockeruser, dockerpass, acumosurl=None, interval=900, dockerhost='unix:///var/run/docker.sock', tmpdir='/var/tmp/aoadapter', certverify=True, catalogs=None, port=None, **extras):
-        self.dcaeurl = dcaeurl
+    def __init__(self, dcaeuser, onboardingurl, onboardinguser, onboardingpass, certfile, dockerregistry, dockeruser, dockerpass, acumosurl=None, interval=900, dockerhost='tcp://localhost:2375', tmpdir='/var/tmp/aoadapter', certverify=True, catalogs=None, port=None, **extras):
         self.dcaeuser = dcaeuser
 
         def x(fmt, *args, **kwargs):
@@ -299,7 +298,7 @@ class Apihandler(BaseHTTPRequestHandler):
             else:
                 solution = aa.jsonget('/solutions/{}', self.qparams['solutionId'])
                 onboard(aa, callback, solution, self.qparams['revisionId'])
-            self.replyraw('OK', 'text/plain')
+            self.replyraw('OK'.encode('utf-8'), 'text/plain')
             return
         self.send_error(400)