Matteo Scandolo | db7508e | 2018-03-19 15:06:06 -0700 | [diff] [blame] | 1 | # Copyright 2017-present Open Networking Foundation |
| 2 | # |
| 3 | # Licensed under the Apache License, Version 2.0 (the "License"); |
| 4 | # you may not use this file except in compliance with the License. |
| 5 | # You may obtain a copy of the License at |
| 6 | # |
| 7 | # http://www.apache.org/licenses/LICENSE-2.0 |
| 8 | # |
| 9 | # Unless required by applicable law or agreed to in writing, software |
| 10 | # distributed under the License is distributed on an "AS IS" BASIS, |
| 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 12 | # See the License for the specific language governing permissions and |
| 13 | # limitations under the License. |
| 14 | |
| 15 | |
| 16 | import os |
| 17 | import sys |
| 18 | from synchronizers.new_base.SyncInstanceUsingAnsible import SyncStep |
| 19 | from synchronizers.new_base.modelaccessor import VSGHWServiceInstance |
| 20 | |
| 21 | from xosconfig import Config |
| 22 | from multistructlog import create_logger |
| 23 | from time import sleep |
| 24 | import requests |
| 25 | |
| 26 | log = create_logger(Config().get('logging')) |
| 27 | |
| 28 | # parentdir = os.path.join(os.path.dirname(__file__), "..") |
| 29 | # sys.path.insert(0, parentdir) |
| 30 | # sys.path.insert(0, os.path.dirname(__file__)) |
| 31 | |
| 32 | class SyncVSGHWServiceInstance(SyncStep): |
| 33 | provides = [VSGHWServiceInstance] |
| 34 | |
| 35 | observes = VSGHWServiceInstance |
| 36 | |
| 37 | def sync_record(self, o): |
| 38 | log.info("Sync'ing VSG-HW Service Instance", service_instance=o) |
| 39 | |
| 40 | def delete_record(self, o): |
| 41 | log.info("Deleting VSG-HW Service Instance", service_instance=o) |
| 42 | pass |