Gopinath Taget | 22383d9 | 2018-08-22 12:28:52 -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 |
| 19 | from synchronizers.new_base.syncstep import SyncStep |
| 20 | from synchronizers.new_base.modelaccessor import * |
| 21 | from xosconfig import Config |
| 22 | from multistructlog import create_logger |
| 23 | |
| 24 | log = create_logger(Config().get('logging')) |
| 25 | |
| 26 | class SyncVEpcServiceInstance(SyncStep): |
| 27 | |
| 28 | provides = [VEpcServiceInstance] |
| 29 | |
| 30 | observes = VEpcServiceInstance |
| 31 | |
| 32 | requested_interval = 0 |
| 33 | |
| 34 | # template_name = "vepcserviceinstance_playbook.yaml" |
| 35 | |
| 36 | # service_key_name = "/opt/xos/synchronizers/vepcservicenew/vepcservice_private_key" |
| 37 | |
| 38 | def __init__(self, *args, **kwargs): |
| 39 | super(SyncVEpcServiceInstance, self).__init__(*args, **kwargs) |
| 40 | |
| 41 | def sync_record(self, o): |
| 42 | # There's nothing to do at this time. Configuration of VEpcServiceInstance 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 | # Note from Gopi: This method exists as the code is copied from Simple Example Service. Please |
| 47 | # discuss with smbaker if this function is necessary. |
| 48 | pass |