Commit 8497f115 authored by Christos Stavrakakis's avatar Christos Stavrakakis
Browse files

ci: Add options for server networking

parent 03f5d4bb
......@@ -55,6 +55,10 @@ images = name:SynnefoCIWheezy.*, name:^Debian Base$, id:72d9844f-1024-4a07-a3c3-
# File containing the ssh keys to upload/install to server
# If not set, no ssh keys will be installed
ssh_keys = ~/.ssh/id_rsa.pub
# Allocate a public floating IP for the new server
allocate_floating_ip = True
# List of networks IDs (comma seperated) to connect server
private_networks =
[Burnin]
......
......@@ -299,9 +299,16 @@ class SynnefoCI(object):
flavor_id = self._find_flavor(flavor)
# Create Server
fip = self._create_floating_ip()
port = self._create_port(fip)
networks = [{'port': port['id']}]
networks = []
if self.config.get("Deployment", "allocate_floating_ip") == "True":
fip = self._create_floating_ip()
port = self._create_port(fip)
networks.append({'port': port['id']})
private_networks = self.config.get('Deployment', 'private_networks')
if private_networks:
private_networks = private_networks.split(",")
networks.extend([{"uuid": uuid.strip()}
for uuid in private_networks])
if server_name is None:
server_name = self.config.get("Deployment", "server_name")
server_name = "%s(BID: %s)" % (server_name, self.build_id)
......
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