blob: c8e7c52bd3ea731515ea98ade8d66498befb9b70 [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
19from synchronizers.new_base.syncstep import SyncStep
20from synchronizers.new_base.modelaccessor import *
21from xosconfig import Config
22from multistructlog import create_logger
23
24log = create_logger(Config().get('logging'))
25
26class SyncSimpleExampleServiceInstance(SyncStep):
27
28 provides = [SimpleExampleServiceInstance]
29
30 observes = SimpleExampleServiceInstance
31
32 requested_interval = 0
33
34 template_name = "simpleexampleserviceinstance_playbook.yaml"
35
36 service_key_name = "/opt/xos/synchronizers/exampleservicenew/simpleexampleservice_private_key"
37
38 def __init__(self, *args, **kwargs):
39 super(SyncSimpleExampleServiceInstance, self).__init__(*args, **kwargs)
40
41 def sync_record(self, o):
42 # There's nothing to do at this time. Configuration of ExampleServiceInstance is handled by Kubernetes
43 # through config maps, and that all happens in the model policy.
44 #
45 # TODO(smbaker): Consider deleting this sync step
46 pass