import os
import base64
from netaddr import IPAddress, IPNetwork
from django.db.models import F, Q
from planetstack.config import Config
from observer.openstacksyncstep import OpenStackSyncStep
from core.models.slice import Slice, SliceDeployments
from util.logger import Logger, logging
from observer.steps.sync_slice_deployments import *

logger = Logger(level=logging.INFO)

class SyncSlices(OpenStackSyncStep):
    provides=[Slice]
    requested_interval=0

    def sync_record(self, slice):
        for slice_deployment in SliceDeployment.objects.filter(slice=slice):
            # bump the 'updated' timestamp and trigger observer to update
            # slice across all deployments 
            slice_deployment.save()    

    def delete_record(self, slice):
        slice_deployment_deleter = SyncSliceDeployment().delete_record
        for slice_deployment in SliceDeployment.objects.filter(slice=slice):
            try:
                slice_deployment_deleter(slice_deployment)
            except Exception,e:
                logger.log_exc("Failed to delete slice_deployment %s" % slice_deployment) 
                raise e
