Return value from get_next_subnet()
diff --git a/planetstack/observer/steps/sync_slices.py b/planetstack/observer/steps/sync_slices.py
index 53dc06b..5b34442 100644
--- a/planetstack/observer/steps/sync_slices.py
+++ b/planetstack/observer/steps/sync_slices.py
@@ -5,6 +5,9 @@
from planetstack.config import Config
from observer.openstacksyncstep import OpenStackSyncStep
from core.models.slice import Slice
+from util.logger import Logger, logging
+
+logger = Logger(logfile='observer.log', level=logging.INFO)
class SyncSlices(OpenStackSyncStep):
provides=[Slice]
@@ -23,8 +26,10 @@
last_ip = IPAddress(ints[-1])
last_network = IPNetwork(str(last_ip) + "/24")
next_network = IPNetwork(str(IPAddress(last_network) + last_network.size) + "/24")
+ return next_network
def sync_record(self, slice):
+ logger.info("sync'ing slice %s" % slice.name)
if not slice.tenant_id:
nova_fields = {'tenant_name': slice.name,
'description': slice.description,