blob: 60fd8274faf3114f1c332247a4a00be4fce4b0aa [file] [log] [blame]
Scott Bakeredbb2322018-05-08 11:46:25 -07001
2# Copyright 2017-present Open Networking Foundation
3#
4# Licensed under the Apache License, Version 2.0 (the "License");
5# you may not use this file except in compliance with the License.
6# You may obtain a copy of the License at
7#
8# http://www.apache.org/licenses/LICENSE-2.0
9#
10# Unless required by applicable law or agreed to in writing, software
11# distributed under the License is distributed on an "AS IS" BASIS,
12# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13# See the License for the specific language governing permissions and
14# limitations under the License.
15
16
17import os
18import sys
Scott Bakerc6ed1c42019-01-29 16:57:10 -080019from xossynchronizer.steps.syncstep import SyncStep
Himanshu Bhandari19836972020-06-01 17:39:13 +053020from xossynchronizer.modelaccessor import SimpleExampleService, SimpleExampleServiceInstance
21
Scott Bakeredbb2322018-05-08 11:46:25 -070022from xosconfig import Config
23from multistructlog import create_logger
24
25log = create_logger(Config().get('logging'))
26
27class SyncSimpleExampleServiceInstance(SyncStep):
Himanshu Bhandari19836972020-06-01 17:39:13 +053028 provides = [SimpleExampleServiceInstance]
29 observes = SimpleExampleServiceInstance
Scott Bakeredbb2322018-05-08 11:46:25 -070030 requested_interval = 0
31
Scott Bakeredbb2322018-05-08 11:46:25 -070032 def __init__(self, *args, **kwargs):
33 super(SyncSimpleExampleServiceInstance, self).__init__(*args, **kwargs)
34
35 def sync_record(self, o):
36 # There's nothing to do at this time. Configuration of ExampleServiceInstance is handled by Kubernetes
37 # through config maps, and that all happens in the model policy.
38 #
39 # TODO(smbaker): Consider deleting this sync step
40 pass