Commit cb167dee authored by Benjamin Blanc's avatar Benjamin Blanc

testnode: SlapOSMasterCommunicator: add logs

parent 98a6e3ab
......@@ -61,8 +61,11 @@ class ScalabilityTestRunner():
certificate = self.testnode.test_suite_portal.getSlaposAccountCertificate()
self.slapos_controler.createSlaposConfigurationFileAccount(key,certificate,
self.testnode.config)
self.slapos_communicator = SlapOSMasterCommunicator.SlapOSMasterCommunicator(key, certificate,
'https://rest.slapos.org/Base_getHateoasMaster')
self.slapos_communicator = SlapOSMasterCommunicator.SlapOSMasterCommunicator(
key,
certificate,
self.log,
url='https://rest.slapos.org/Base_getHateoasMaster')
self.remaining_software_installation_dict = {}
# Protection to prevent installation of softwares after checking
......
......@@ -27,11 +27,12 @@ class SlapOSMasterCommunicator(object):
print news['news']
"""
def __init__(self, certificate_path,
key_path,
def __init__(self, certificate_path, key_path, log,
url='https://rest.slapos.org/Base_getHateoasMaster'):
# Create connection
api_scheme, api_netloc, api_path, api_query, api_fragment = urlparse.urlsplit(url)
self.log = log
self.log("HTTPS Connection with: %s, cert=%s, key=%s" %(api_netloc,key_path,certificate_path))
self.connection = httplib.HTTPSConnection(api_netloc, key_file=key_path, cert_file=certificate_path)
# Get master
master_link = {'href':api_path,'type':"application/vnd.slapos.org.hal+json; class=slapos.org.master"}
......@@ -46,6 +47,8 @@ class SlapOSMasterCommunicator(object):
# has been visited)
self.hosting_subcriptions_dict = {}
self.visited_hosting_subcriptions_link_list = []
self.log("SlapOSMasterCommunicator will read all hosting subscriptions entries, "
"it may take several time...")
self._update_hosting_subscription_informations()
def _curl(self, link):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment