blob: 28dfddf355fb73e6afd38b7e2927a443eb12936b [file] [log] [blame]
Matteo Scandolodb7508e2018-03-19 15:06:06 -07001# 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
16import os
17import sys
18from synchronizers.new_base.SyncInstanceUsingAnsible import SyncStep
19from synchronizers.new_base.modelaccessor import VSGHWServiceInstance
20
21from xosconfig import Config
22from multistructlog import create_logger
23from time import sleep
24import requests
25
26log = 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
32class 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