do not allocate default start_ip/end_ip
diff --git a/xos/services/helloworldservice_complete/migrations/0001_initial.py b/xos/services/helloworldservice_complete/migrations/0001_initial.py
deleted file mode 100644
index 00279f1..0000000
--- a/xos/services/helloworldservice_complete/migrations/0001_initial.py
+++ /dev/null
@@ -1,34 +0,0 @@
-# -*- coding: utf-8 -*-
-from __future__ import unicode_literals
-
-from django.db import models, migrations
-
-
-class Migration(migrations.Migration):
-
- dependencies = [
- ('core', '0001_initial'),
- ]
-
- operations = [
- migrations.CreateModel(
- name='HelloWorldServiceComplete',
- fields=[
- ],
- options={
- 'verbose_name': 'Hello World Service',
- 'proxy': True,
- },
- bases=('core.service',),
- ),
- migrations.CreateModel(
- name='HelloWorldTenantComplete',
- fields=[
- ],
- options={
- 'verbose_name': 'Hello World Tenant',
- 'proxy': True,
- },
- bases=('core.tenantwithcontainer',),
- ),
- ]
diff --git a/xos/services/helloworldservice_complete/migrations/__init__.py b/xos/services/helloworldservice_complete/migrations/__init__.py
deleted file mode 100644
index e69de29..0000000
--- a/xos/services/helloworldservice_complete/migrations/__init__.py
+++ /dev/null
diff --git a/xos/synchronizers/openstack/steps/sync_controller_networks.py b/xos/synchronizers/openstack/steps/sync_controller_networks.py
index f1a7f68..cf855c6 100644
--- a/xos/synchronizers/openstack/steps/sync_controller_networks.py
+++ b/xos/synchronizers/openstack/steps/sync_controller_networks.py
@@ -48,31 +48,6 @@
ip = struct.unpack("!L", socket.inet_aton(network))[0]
ip = ip & netmask | 1
return socket.inet_ntoa(struct.pack("!L", ip))
-#MCORD
- def alloc_start_ip(self, subnet):
- parts = subnet.split(".")
- if len(parts)!=4:
- raise Exception("Invalid subnet %s" % subnet)
- return ".".join(parts[:3]) + ".3"
-
- def alloc_end_ip(self, subnet):
- parts = subnet.split(".")
- if len(parts)!=4:
- raise Exception("Invalid subnet %s" % subnet)
- return ".".join(parts[:3]) + ".254"
-#MCORD
-
- def alloc_start_ip(self, subnet):
- parts = subnet.split(".")
- if len(parts)!=4:
- raise Exception("Invalid subnet %s" % subnet)
- return ".".join(parts[:3]) + ".3"
-
- def alloc_end_ip(self, subnet):
- parts = subnet.split(".")
- if len(parts)!=4:
- raise Exception("Invalid subnet %s" % subnet)
- return ".".join(parts[:3]) + ".254"
def save_controller_network(self, controller_network):
network_name = controller_network.network.name
@@ -88,20 +63,15 @@
if controller_network.network.start_ip and controller_network.network.start_ip.strip():
start_ip = controller_network.network.start_ip.strip()
- print "DEF_START_IP", start_ip
else:
- start_ip = self.alloc_start_ip(cidr)
- print "DEF_START_AIP", start_ip
+ start_ip = None
if controller_network.network.end_ip and controller_network.network.end_ip.strip():
end_ip = controller_network.network.end_ip.strip()
- print "DEF_START_IP", end_ip
else:
- end_ip = self.alloc_end_ip(cidr)
- print "DEF_END_AIP", end_ip
-
+ end_ip = None
+
self.cidr=cidr
- self.start_ip=start_ip
slice = controller_network.network.owner
network_fields = {'endpoint':controller_network.controller.auth_url,
diff --git a/xos/synchronizers/openstack/steps/sync_controller_networks.yaml b/xos/synchronizers/openstack/steps/sync_controller_networks.yaml
index 070a050..6fb9a92 100644
--- a/xos/synchronizers/openstack/steps/sync_controller_networks.yaml
+++ b/xos/synchronizers/openstack/steps/sync_controller_networks.yaml
@@ -35,7 +35,11 @@
{% endif %}
dns_nameservers=8.8.8.8
cidr={{ cidr }}
+ {% if start_ip %}
allocation_pool_start={{ start_ip }}
+ {% endif %}
+ {% if end_ip %}
allocation_pool_end={{ end_ip }}
+ {% endif %}
{% endif %}
{% endif %}