def test_start_add_node(self):
     hub = GridHub()
     ip = hub.get_ip()
     print "Grid Hub IP: " + hub.get_ip()
     # sudo docker run -d -e GRID_IP=${GRID_IP} brady/${1}-node
     adapter = DockerAdapter()
     response = adapter.client.create_container('brady/firefox-node', [], environment={"GRID_IP": ip})
     if response['Id']:
         adapter.client.start(response)
Exemple #2
0
 def test_start_add_node(self):
     hub = GridHub()
     ip = hub.get_ip()
     print "Grid Hub IP: " + hub.get_ip()
     # sudo docker run -d -e GRID_IP=${GRID_IP} brady/${1}-node
     adapter = DockerAdapter()
     response = adapter.client.create_container('brady/firefox-node', [],
                                                environment={"GRID_IP": ip})
     if response['Id']:
         adapter.client.start(response)
Exemple #3
0
    def get_status():
        hub = GridHub()

        ff_count = 0
        ph_count = 0
        ch_count = 0

        nodes = hub.get_nodes()
        for node in nodes:
            if "firefox" in node["Image"]:
                ff_count += 1
            elif "phantomjs" in node["Image"]:
                ph_count += 1
            elif "chrome" in node["Image"]:
                ch_count += 1

        status = {"Ip": hub.get_ip(), "firefox_count": ff_count, "phantomjs_count": ph_count, "chrome_count": ch_count}

        return status
Exemple #4
0
    def get_status():
        hub = GridHub()

        ff_count = 0
        ph_count = 0
        ch_count = 0

        nodes = hub.get_nodes()
        for node in nodes:
            if "firefox" in node['Image']:
                ff_count += 1
            elif "phantomjs" in node['Image']:
                ph_count += 1
            elif "chrome" in node['Image']:
                ch_count += 1

        status = {
            "Ip": hub.get_ip(),
            "firefox_count": ff_count,
            "phantomjs_count": ph_count,
            "chrome_count": ch_count
        }

        return status