Scott Baker | edbb232 | 2018-05-08 11:46:25 -0700 | [diff] [blame] | 1 | |
| 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 | |
| 17 | import os |
| 18 | import sys |
Scott Baker | c6ed1c4 | 2019-01-29 16:57:10 -0800 | [diff] [blame^] | 19 | from xossynchronizer.steps.syncstep import SyncStep |
Scott Baker | edbb232 | 2018-05-08 11:46:25 -0700 | [diff] [blame] | 20 | from xosconfig import Config |
| 21 | from multistructlog import create_logger |
| 22 | |
| 23 | log = create_logger(Config().get('logging')) |
| 24 | |
| 25 | class SyncSimpleExampleServiceInstance(SyncStep): |
Scott Baker | c6ed1c4 | 2019-01-29 16:57:10 -0800 | [diff] [blame^] | 26 | observes = "SimpleExampleServiceInstance" |
Scott Baker | edbb232 | 2018-05-08 11:46:25 -0700 | [diff] [blame] | 27 | requested_interval = 0 |
| 28 | |
Scott Baker | edbb232 | 2018-05-08 11:46:25 -0700 | [diff] [blame] | 29 | def __init__(self, *args, **kwargs): |
| 30 | super(SyncSimpleExampleServiceInstance, self).__init__(*args, **kwargs) |
| 31 | |
| 32 | def sync_record(self, o): |
| 33 | # There's nothing to do at this time. Configuration of ExampleServiceInstance is handled by Kubernetes |
| 34 | # through config maps, and that all happens in the model policy. |
| 35 | # |
| 36 | # TODO(smbaker): Consider deleting this sync step |
| 37 | pass |