blob: cc277c6bec549548b3f4904a097c329b36d1754f [file] [log] [blame]
Sapan Bhatia26d40bc2014-05-12 15:28:02 -04001import os
2import base64
3from django.db.models import F, Q
4from planetstack.config import Config
5from observer.openstacksyncstep import OpenStackSyncStep
6from core.models.network import *
7from util.logger import Logger, logging
8
9logger = Logger(level=logging.INFO)
10
11class SyncNetworks(SyncStep):
12 provides=[Network]
13 requested_interval = 0
14
15 def fetch_pending(self):
16 return Network.objects.filter(Q(enacted__lt=F('updated')) | Q(enacted=None))
17
18 def sync_record(self, network):
19 network.save()
20