summaryrefslogtreecommitdiffstats
path: root/VNFs/DPPD-PROX/helper-scripts/rapid/createrapid.py
diff options
context:
space:
mode:
authorLuc Provoost <luc.provoost@intel.com>2019-06-30 09:46:10 +0200
committerLuc Provoost <luc.provoost@intel.com>2019-06-30 09:46:10 +0200
commitccae9496c217020455acfe337aaf2b2f0c5644d8 (patch)
tree4f9165a7f2cbf77290b80a6545400e9cd7d7b00c /VNFs/DPPD-PROX/helper-scripts/rapid/createrapid.py
parent080733bfa5facd0eb457fc3db1c3ee7885f2a438 (diff)
Multiple changes for June release
- Change inittest in warmuptest. This has now a warmuptime, warmupspeed, packet size and flow size. - Change in centos.json. This will now also copy deploycentostools.sh during image building so that it can be used to re-compile prox in the VM by typing "./deploycentostools.sh compile" - runrapid.py parameters needing a file name, need to be complete file names: no extensions will be added any more by the scripts. - Changes in createrapid.py to handel the openstack CLI output in a simpler way. - The management interface of the VMs can now also be an SRIOV interface. We have now an extra optional parameter in the VM sections of the rapiVMs.vms file: SRIOV_mgmt_port - Changed the name of some sections and keys in the environment file since runrapid.py will not always communicate to OpenStack VMs. This could be containers or any other (virtual) machine. - The previous MachineMap.cfg has been renamed to machine.map - A new test has been added: monitorswap is just showing the statistics of a swap (virtual) machine, without generating any packets. This is useful in situations where an external tester is used. - Latency and core statistics can now be measured even if there are multiple PROX cores and tasks running. A new parameter has been added in the test files with following default value: tasks=[0]. During the collection of statistics, all tasks in this list will be queried. It is ok to have a non-existing task in such a query since it will be ignored. - A --screenlog parameter was added for runrapid.py allowing for more detailed output on the screen during debugging. No need to check the log file. - Previous tests to run multiple packet size with a given flow size and to run multiple flow size, with a given packet size are now combined by specifiying 2 lists: packetsizes & flows - The screen output of this test has also been reworked with more meaningful column names and the test result is now in the field "core received". This allows also for faster termination of the test: When the all packets sent by Gen NIC are received by the cores within the thresholds for packet loss and latency, the test is now stopped, even we were requesting more packets to be sent. Change-Id: I3307e7a972f2140e739f376f146fe875df0303e6 Signed-off-by: Luc Provoost <luc.provoost@intel.com>
Diffstat (limited to 'VNFs/DPPD-PROX/helper-scripts/rapid/createrapid.py')
-rwxr-xr-xVNFs/DPPD-PROX/helper-scripts/rapid/createrapid.py279
1 files changed, 130 insertions, 149 deletions
diff --git a/VNFs/DPPD-PROX/helper-scripts/rapid/createrapid.py b/VNFs/DPPD-PROX/helper-scripts/rapid/createrapid.py
index a1c1de60..3fbdc4c3 100755
--- a/VNFs/DPPD-PROX/helper-scripts/rapid/createrapid.py
+++ b/VNFs/DPPD-PROX/helper-scripts/rapid/createrapid.py
@@ -31,10 +31,10 @@ from logging import handlers
from prox_ctrl import prox_ctrl
import ConfigParser
-version="19.4.15"
+version="19.6.30"
stack = "rapid" #Default string for stack. This is not an OpenStack Heat stack, just a group of VMs
-vms = "rapidVMs" #Default string for vms file
-key = "prox" # default name for kay
+vms = "rapidVMs.vms" #Default string for vms file
+key = "prox" # default name for key
image = "rapidVM" # default name for the image
image_file = "rapidVM.qcow2"
dataplane_network = "dataplane-network" # default name for the dataplane network
@@ -43,7 +43,6 @@ subnet_cidr="10.10.10.0/24" # cidr for dataplane
internal_network="admin_internal_net"
floating_network="admin_floating_net"
loglevel="DEBUG" # sets log level for writing to file
-runtime=10 # time in seconds for 1 test run
def usage():
print("usage: createrapid [--version] [-v]")
@@ -65,7 +64,7 @@ def usage():
print("optional arguments:")
print(" -v, --version Show program's version number and exit")
print(" --stack STACK_NAME Specify a name for the stack. Default is %s."%stack)
- print(" --vms VMS_FILE Specify the vms file to be used. Default is %s.vms."%vms)
+ print(" --vms VMS_FILE Specify the vms file to be used. Default is %s."%vms)
print(" --key KEY_NAME Specify the key to be used. Default is %s."%key)
print(" --image IMAGE_NAME Specify the image to be used. Default is %s."%image)
print(" --image_file IMAGE_FILE Specify the image qcow2 file to be used. Default is %s."%image_file)
@@ -142,7 +141,7 @@ file_formatter = logging.Formatter("%(asctime)s - %(levelname)s - %(message)s")
log = logging.getLogger()
numeric_level = getattr(logging, loglevel.upper(), None)
if not isinstance(numeric_level, int):
- raise ValueError('Invalid log level: %s' % loglevel)
+ raise ValueError('Invalid log level: %s' % loglevel)
log.setLevel(numeric_level)
log.propagate = 0
@@ -173,58 +172,82 @@ needRoll = os.path.isfile(log_file)
# This is a stale log, so roll it
if needRoll:
- # Add timestamp
- log.debug('\n---------\nLog closed on %s.\n---------\n' % time.asctime())
-
- # Roll over on application start
- log.handlers[0].doRollover()
+ # Add timestamp
+ log.debug('\n---------\nLog closed on %s.\n---------\n' % time.asctime())
+ # Roll over on application start
+ log.handlers[0].doRollover()
# Add timestamp
log.debug('\n---------\nLog started on %s.\n---------\n' % time.asctime())
log.debug("createrapid.py version: "+version)
# Checking if the control network already exists, if not, stop the script
-log.debug("Checking control plane network: "+internal_network)
-cmd = 'openstack network show '+internal_network
+log.debug("Checking control plane network: " + internal_network)
+cmd = 'openstack network list -f value -c Name'
log.debug (cmd)
-cmd = cmd + ' |grep "status " | tr -s " " | cut -d" " -f 4'
-NetworkExist = subprocess.check_output(cmd , shell=True).strip()
-if NetworkExist == 'ACTIVE':
- log.info("Control plane network ("+internal_network+") already active")
+Networks = subprocess.check_output(cmd , shell=True).decode().strip()
+if internal_network in Networks:
+ log.info("Control plane network (" + internal_network+") already active")
else:
log.exception("Control plane network " + internal_network + " not existing")
raise Exception("Control plane network " + internal_network + " not existing")
-# Checking if the floating ip network already exists, if not, stop the script
-if floating_network <>'NO':
- log.debug("Checking floating ip network: "+floating_network)
- cmd = 'openstack network show '+floating_network
- log.debug (cmd)
- cmd = cmd + ' |grep "status " | tr -s " " | cut -d" " -f 4'
- NetworkExist = subprocess.check_output(cmd , shell=True).strip()
- if NetworkExist == 'ACTIVE':
- log.info("Floating ip network ("+floating_network+") already active")
+# Checking if the floating ip network should be used. If yes, check if it exists and stop the script if it doesn't
+if floating_network !='NO':
+ log.debug("Checking floating ip network: " + floating_network)
+ if floating_network in Networks:
+ log.info("Floating ip network (" + floating_network + ") already active")
else:
log.exception("Floating ip network " + floating_network + " not existing")
raise Exception("Floating ip network " + floating_network + " not existing")
+# Checking if the dataplane network already exists, if not create it
+log.debug("Checking dataplane network: " + dataplane_network)
+if dataplane_network in Networks:
+ log.info("Dataplane network (" + dataplane_network + ") already active")
+else:
+ log.info('Creating dataplane network ...')
+ cmd = 'openstack network create '+dataplane_network+' -f value -c status'
+ log.debug(cmd)
+ NetworkExist = subprocess.check_output(cmd , shell=True).decode().strip()
+ if 'ACTIVE' in NetworkExist:
+ log.info("Dataplane network created")
+ # Checking if the dataplane subnet already exists, if not create it
+ log.debug("Checking subnet: "+subnet)
+ cmd = 'openstack subnet list -f value -c Name'
+ log.debug (cmd)
+ Subnets = subprocess.check_output(cmd , shell=True).decode().strip()
+ if subnet in Subnets:
+ log.info("Subnet (" +subnet+ ") already exists")
+ else:
+ log.info('Creating subnet ...')
+ cmd = 'openstack subnet create --network ' + dataplane_network + ' --subnet-range ' + subnet_cidr +' --gateway none ' + subnet+' -f value -c name'
+ log.debug(cmd)
+ Subnets = subprocess.check_output(cmd , shell=True).decode().strip()
+ if subnet in Subnets:
+ log.info("Subnet created")
+ else :
+ log.exception("Failed to create subnet: " + subnet)
+ raise Exception("Failed to create subnet: " + subnet)
+ else :
+ log.exception("Failed to create dataplane network: " + dataplane_network)
+ raise Exception("Failed to create dataplane network: " + dataplane_network)
+
# Checking if the image already exists, if not create it
-log.debug("Checking image: "+image)
-cmd = 'openstack image show '+image
+log.debug("Checking image: " + image)
+cmd = 'openstack image list -f value -c Name'
log.debug(cmd)
-cmd = cmd +' |grep "status " | tr -s " " | cut -d" " -f 4'
-ImageExist = subprocess.check_output(cmd , shell=True).strip()
-if ImageExist == 'active':
- log.info("Image ("+image+") already available")
+Images = subprocess.check_output(cmd , shell=True).decode().strip()
+if image in Images:
+ log.info("Image (" + image + ") already available")
else:
log.info('Creating image ...')
- cmd = 'openstack image create --disk-format qcow2 --container-format bare --public --file ./'+image_file+ ' ' +image
+ cmd = 'openstack image create -f value -c status --disk-format qcow2 --container-format bare --public --file ./'+image_file+ ' ' +image
log.debug(cmd)
- cmd = cmd + ' |grep "status " | tr -s " " | cut -d" " -f 4'
- ImageExist = subprocess.check_output(cmd , shell=True).strip()
- if ImageExist == 'active':
+ ImageExist = subprocess.check_output(cmd , shell=True).decode().strip()
+ if 'active' in ImageExist:
log.info('Image created and active')
- cmd = 'openstack image set --property hw_vif_multiqueue_enabled="true" ' +image
+# cmd = 'openstack image set --property hw_vif_multiqueue_enabled="true" ' +image
# subprocess.check_call(cmd , shell=True)
else :
log.exception("Failed to create image")
@@ -232,11 +255,10 @@ else:
# Checking if the key already exists, if not create it
log.debug("Checking key: "+key)
-cmd = 'openstack keypair show '+key
+cmd = 'openstack keypair list -f value -c Name'
log.debug (cmd)
-cmd = cmd + ' |grep "name " | tr -s " " | cut -d" " -f 4'
-KeyExist = subprocess.check_output(cmd , shell=True).strip()
-if KeyExist == key:
+KeyExist = subprocess.check_output(cmd , shell=True).decode().strip()
+if key in KeyExist:
log.info("Key ("+key+") already installed")
else:
log.info('Creating key ...')
@@ -245,95 +267,51 @@ else:
subprocess.check_call(cmd , shell=True)
cmd = 'chmod 600 ' +key+'.pem'
subprocess.check_call(cmd , shell=True)
- cmd = 'openstack keypair show '+key
+ cmd = 'openstack keypair list -f value -c Name'
log.debug(cmd)
- cmd = cmd + ' |grep "name " | tr -s " " | cut -d" " -f 4'
- KeyExist = subprocess.check_output(cmd , shell=True).strip()
- if KeyExist == key:
+ KeyExist = subprocess.check_output(cmd , shell=True).decode().strip()
+ if key in KeyExist:
log.info("Key created")
else :
log.exception("Failed to create key: " + key)
raise Exception("Failed to create key: " + key)
-
-# Checking if the dataplane network already exists, if not create it
-log.debug("Checking dataplane network: "+dataplane_network)
-cmd = 'openstack network show '+dataplane_network
-log.debug (cmd)
-cmd = cmd + ' |grep "status " | tr -s " " | cut -d" " -f 4'
-NetworkExist = subprocess.check_output(cmd , shell=True).strip()
-if NetworkExist == 'ACTIVE':
- log.info("Dataplane network ("+dataplane_network+") already active")
-else:
- log.info('Creating dataplane network ...')
- cmd = 'openstack network create '+dataplane_network
- log.debug(cmd)
- cmd = cmd + ' |grep "status " | tr -s " " | cut -d" " -f 4'
- NetworkExist = subprocess.check_output(cmd , shell=True).strip()
- if NetworkExist == 'ACTIVE':
- log.info("Dataplane network created")
- else :
- log.exception("Failed to create dataplane network: " + dataplane_network)
- raise Exception("Failed to create dataplane network: " + dataplane_network)
-
-# Checking if the dataplane subnet already exists, if not create it
-log.debug("Checking subnet: "+subnet)
-cmd = 'openstack subnet show '+ subnet
-log.debug (cmd)
-cmd = cmd +' |grep "name " | tr -s " " | cut -d"|" -f 3'
-SubnetExist = subprocess.check_output(cmd , shell=True).strip()
-if SubnetExist == subnet:
- log.info("Subnet (" +subnet+ ") already exists")
-else:
- log.info('Creating subnet ...')
- cmd = 'openstack subnet create --network ' + dataplane_network + ' --subnet-range ' + subnet_cidr +' --gateway none ' + subnet
- log.debug(cmd)
- cmd = cmd + ' |grep "name " | tr -s " " | cut -d"|" -f 3'
- SubnetExist = subprocess.check_output(cmd , shell=True).strip()
- if SubnetExist == subnet:
- log.info("Subnet created")
- else :
- log.exception("Failed to create subnet: " + subnet)
- raise Exception("Failed to create subnet: " + subnet)
-
ServerToBeCreated=[]
ServerName=[]
config = ConfigParser.RawConfigParser()
vmconfig = ConfigParser.RawConfigParser()
-vmconfig.read(vms+'.vms')
+vmconfig.read(vms)
total_number_of_VMs = vmconfig.get('DEFAULT', 'total_number_of_vms')
+cmd = 'openstack server list -f value -c Name'
+log.debug (cmd)
+Servers = subprocess.check_output(cmd , shell=True).decode().strip()
+cmd = 'openstack flavor list -f value -c Name'
+log.debug (cmd)
+Flavors = subprocess.check_output(cmd , shell=True).decode().strip()
for vm in range(1, int(total_number_of_VMs)+1):
flavor_info = vmconfig.get('VM%d'%vm, 'flavor_info')
flavor_meta_data = vmconfig.get('VM%d'%vm, 'flavor_meta_data')
boot_info = vmconfig.get('VM%d'%vm, 'boot_info')
SRIOV_port = vmconfig.get('VM%d'%vm, 'SRIOV_port')
+ SRIOV_mgmt_port = vmconfig.get('VM%d'%vm, 'SRIOV_mgmt_port')
ServerName.append('%s-VM%d'%(stack,vm))
flavor_name = '%s-VM%d-flavor'%(stack,vm)
- log.debug("Checking server: "+ServerName[-1])
- cmd = 'openstack server show '+ServerName[-1]
- log.debug (cmd)
- cmd = cmd + ' |grep "\sname\s" | tr -s " " | cut -d" " -f 4'
- ServerExist = subprocess.check_output(cmd , shell=True).strip()
- if ServerExist == ServerName[-1]:
- log.info("Server ("+ServerName[-1]+") already active")
+ log.debug("Checking server: " + ServerName[-1])
+ if ServerName[-1] in Servers:
+ log.info("Server (" + ServerName[-1] + ") already active")
ServerToBeCreated.append("no")
else:
ServerToBeCreated.append("yes")
# Checking if the flavor already exists, if not create it
- log.debug("Checking flavor: "+flavor_name)
- cmd = 'openstack flavor show '+flavor_name
- log.debug (cmd)
- cmd = cmd + ' |grep "\sname\s" | tr -s " " | cut -d" " -f 4'
- FlavorExist = subprocess.check_output(cmd , shell=True).strip()
- if FlavorExist == flavor_name:
- log.info("Flavor ("+flavor_name+") already installed")
+ log.debug("Checking flavor: " + flavor_name)
+ if flavor_name in Flavors:
+ log.info("Flavor (" + flavor_name+") already installed")
else:
log.info('Creating flavor ...')
- cmd = 'openstack flavor create %s %s'%(flavor_name,flavor_info)
+ cmd = 'openstack flavor create %s %s -f value -c name'%(flavor_name,flavor_info)
log.debug(cmd)
- cmd = cmd + ' |grep "\sname\s" | tr -s " " | cut -d" " -f 4'
- FlavorExist = subprocess.check_output(cmd , shell=True).strip()
- if FlavorExist == flavor_name:
+ NewFlavor = subprocess.check_output(cmd , shell=True).decode().strip()
+ if flavor_name in NewFlavor:
cmd = 'openstack flavor set %s %s'%(flavor_name, flavor_meta_data)
log.debug(cmd)
subprocess.check_call(cmd , shell=True)
@@ -341,55 +319,61 @@ for vm in range(1, int(total_number_of_VMs)+1):
else :
log.exception("Failed to create flavor: " + flavor_name)
raise Exception("Failed to create flavor: " + flavor_name)
+ if SRIOV_mgmt_port == 'NO':
+ nic_info = '--nic net-id=%s'%(internal_network)
+ else:
+ for port in SRIOV_mgmt_port.split(','):
+ nic_info = '--nic port-id=%s'%(port)
if SRIOV_port == 'NO':
- nic_info = '--nic net-id=%s --nic net-id=%s'%(internal_network,dataplane_network)
+ nic_info = nic_info + ' --nic net-id=%s'%(dataplane_network)
else:
- nic_info = '--nic net-id=%s'%(internal_network)
for port in SRIOV_port.split(','):
nic_info = nic_info + ' --nic port-id=%s'%(port)
if vm==int(total_number_of_VMs):
# For the last server, we want to wait for the server creation to complete, so the next operations will succeeed (e.g. IP allocation)
# Note that this waiting is not bullet proof. Imagine, we loop through all the VMs, and the last VM was already running, while the previous
# VMs still needed to be created. Or the previous server creations take much longer than the last one.
- # In that case, we might be to fast when we query for the IP & MAC addresses.
- wait = ' --wait '
+ # In that case, we might be too fast when we query for the IP & MAC addresses.
+ wait = '--wait'
else:
- wait = ' '
+ wait = ''
log.info("Creating server...")
- cmd = 'openstack server create --flavor %s --key-name %s --image %s %s %s%s%s'%(flavor_name,key,image,nic_info,boot_info,wait,ServerName[-1])
+ cmd = 'openstack server create --flavor %s --key-name %s --image %s %s %s %s %s'%(flavor_name,key,image,nic_info,boot_info,wait,ServerName[-1])
log.debug(cmd)
- cmd = cmd + ' |grep "\sname\s" | tr -s " " | cut -d" " -f 4'
- ServerExist = subprocess.check_output(cmd , shell=True).strip()
-if floating_network <> 'NO':
+ output = subprocess.check_output(cmd , shell=True).decode().strip()
+if floating_network != 'NO':
for vm in range(0, int(total_number_of_VMs)):
if ServerToBeCreated[vm] =="yes":
- log.info('Creating & Associating floating IP for ('+ServerName[vm]+')...')
- cmd = 'openstack server show %s -c addresses -f value |grep -Eo "%s=[0-9]*\.[0-9]*\.[0-9]*\.[0-9]*" | cut -d"=" -f2'%(ServerName[vm],internal_network)
- log.debug(cmd)
- vmportIP = subprocess.check_output(cmd , shell=True).strip()
- cmd = 'openstack port list -c ID -c "Fixed IP Addresses" | grep %s' %(vmportIP)
- cmd = cmd + ' | cut -d" " -f 2 '
- log.debug(cmd)
- vmportID = subprocess.check_output(cmd , shell=True).strip()
- cmd = 'openstack floating ip create --port %s %s'%(vmportID,floating_network)
- log.debug(cmd)
- output = subprocess.check_output(cmd , shell=True).strip()
-
+ log.info('Creating & Associating floating IP for ('+ServerName[vm]+')...')
+ cmd = 'openstack server show %s -c addresses -f value |grep -Eo "%s=[0-9]*\.[0-9]*\.[0-9]*\.[0-9]*" | cut -d"=" -f2'%(ServerName[vm],internal_network)
+ log.debug(cmd)
+ vmportIP = subprocess.check_output(cmd , shell=True).decode().strip()
+ cmd = 'openstack port list -c ID -c "Fixed IP Addresses" | grep %s | cut -d" " -f 2 ' %(vmportIP)
+ log.debug(cmd)
+ vmportID = subprocess.check_output(cmd , shell=True).decode().strip()
+ cmd = 'openstack floating ip create --port %s %s'%(vmportID,floating_network)
+ log.debug(cmd)
+ output = subprocess.check_output(cmd , shell=True).decode().strip()
+
+config.add_section('rapid')
+config.set('rapid', 'loglevel', loglevel)
+config.set('rapid', 'version', version)
+config.set('rapid', 'total_number_of_machines', total_number_of_VMs)
for vm in range(1, int(total_number_of_VMs)+1):
cmd = 'openstack server show %s'%(ServerName[vm-1])
log.debug(cmd)
- output = subprocess.check_output(cmd , shell=True).strip()
- searchString = '.*%s=([0-9]*\.[0-9]*\.[0-9]*\.[0-9]*)' %(dataplane_network)
- matchObj = re.search(searchString, output, re.DOTALL)
+ output = subprocess.check_output(cmd , shell=True).decode().strip()
+ searchString = '.*%s=([0-9]*\.[0-9]*\.[0-9]*\.[0-9]*)' %(dataplane_network)
+ matchObj = re.search(searchString, output, re.DOTALL)
vmDPIP = matchObj.group(1)
- searchString = '.*%s=([0-9]+\.[0-9]+\.[0-9]+\.[0-9]+),*\s*([0-9]+\.[0-9]+\.[0-9]+\.[0-9]+)*' %(internal_network)
- matchObj = re.search(searchString, output, re.DOTALL)
+ searchString = '.*%s=([0-9]+\.[0-9]+\.[0-9]+\.[0-9]+),*\s*([0-9]+\.[0-9]+\.[0-9]+\.[0-9]+)*' %(internal_network)
+ matchObj = re.search(searchString, output, re.DOTALL)
vmAdminIP = matchObj.group(2)
if vmAdminIP == None:
vmAdminIP = matchObj.group(1)
cmd = 'openstack port list |egrep "\\b%s\\b" | tr -s " " | cut -d"|" -f 4'%(vmDPIP)
log.debug(cmd)
- vmDPmac = subprocess.check_output(cmd , shell=True).strip()
+ vmDPmac = subprocess.check_output(cmd , shell=True).decode().strip()
config.add_section('M%d'%vm)
config.set('M%d'%vm, 'name', ServerName[vm-1])
config.set('M%d'%vm, 'admin_ip', vmAdminIP)
@@ -397,22 +381,19 @@ for vm in range(1, int(total_number_of_VMs)+1):
config.set('M%d'%vm, 'dp_mac', vmDPmac)
log.info('%s: (admin IP: %s), (dataplane IP: %s), (dataplane MAC: %s)' % (ServerName[vm-1],vmAdminIP,vmDPIP,vmDPmac))
-config.add_section('OpenStack')
-config.set('OpenStack', 'stack', stack)
-config.set('OpenStack', 'VMs', vms)
-config.set('OpenStack', 'key', key)
-config.set('OpenStack', 'image', image)
-config.set('OpenStack', 'image_file', image_file)
-config.set('OpenStack', 'dataplane_network', dataplane_network)
-config.set('OpenStack', 'subnet', subnet)
-config.set('OpenStack', 'subnet_cidr', subnet_cidr)
-config.set('OpenStack', 'internal_network', internal_network)
-config.set('OpenStack', 'floating_network', floating_network)
-config.add_section('rapid')
-config.set('rapid', 'loglevel', loglevel)
-config.set('rapid', 'version', version)
-config.set('rapid', 'total_number_of_machines', total_number_of_VMs)
-config.set('DEFAULT', 'admin_ip', 'none')
+config.add_section('ssh')
+config.set('ssh', 'key', key)
+config.add_section('Varia')
+config.set('Varia', 'VIM', 'OpenStack')
+config.set('Varia', 'stack', stack)
+config.set('Varia', 'VMs', vms)
+config.set('Varia', 'image', image)
+config.set('Varia', 'image_file', image_file)
+config.set('Varia', 'dataplane_network', dataplane_network)
+config.set('Varia', 'subnet', subnet)
+config.set('Varia', 'subnet_cidr', subnet_cidr)
+config.set('Varia', 'internal_network', internal_network)
+config.set('Varia', 'floating_network', floating_network)
# Writing the environment file
with open(stack+'.env', 'wb') as envfile:
- config.write(envfile)
+ config.write(envfile)