Revision ac7b865d ci/utils.py

b/ci/utils.py
496 496
        # Use the first network as IPv4
497 497
        server_ip = networks[0]['ipv4']
498 498

  
499
        if (".okeanos.io" in self.cyclades_client.base_url or
500
           ".demo.synnefo.org" in self.cyclades_client.base_url):
501
            tmp1 = int(server_ip.split(".")[2])
502
            tmp2 = int(server_ip.split(".")[3])
503
            server_ip = "gate.okeanos.io"
504
            server_port = 10000 + tmp1 * 256 + tmp2
499
        # Check if config has ssh_port option and if so, use that port.
500
        if self.config.has_option("Deployment", "ssh_port"):
501
            server_port = self.config.get("Deployment", "ssh_port")
505 502
        else:
506
            server_port = 22
503
            if (".okeanos.io" in self.cyclades_client.base_url or
504
            ".demo.synnefo.org" in self.cyclades_client.base_url):
505
                tmp1 = int(server_ip.split(".")[2])
506
                tmp2 = int(server_ip.split(".")[3])
507
                server_ip = "gate.okeanos.io"
508
                server_port = 10000 + tmp1 * 256 + tmp2
509
            else:
510
                server_port = 22
511

  
507 512
        self.write_temp_config('server_ip', server_ip)
508 513
        self.logger.debug("Server's IPv4 is %s" % _green(server_ip))
509 514
        self.write_temp_config('server_port', server_port)

Also available in: Unified diff