blob: baf108fc75dfdd1a84c302831d23c89248a53567 [file] [log] [blame]
Scott Bakerbba67b62019-01-28 17:38:21 -08001# 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 hashlib
17import os
18import socket
19import sys
20import base64
21import time
22from xossynchronizer.steps.SyncInstanceUsingAnsible import SyncInstanceUsingAnsible
23from xossynchronizer.steps.syncstep import DeferredException
24from xossynchronizer.mock_modelaccessor import *
25
26# hpclibrary will be in steps/..
27parentdir = os.path.join(os.path.dirname(__file__), "..")
28sys.path.insert(0, parentdir)
29
30
31class SyncContainer(SyncInstanceUsingAnsible):
32 provides = [Instance]
33 observes = Instance
34 template_name = "sync_container.yaml"
35
36 def __init__(self, *args, **kwargs):
37 super(SyncContainer, self).__init__(*args, **kwargs)
38
39 def fetch_pending(self, deletion=False):
40 i = Instance()
41 i.name = "Spectacular Sponge"
42 j = Instance()
43 j.name = "Spontaneous Tent"
44 k = Instance()
45 k.name = "Embarrassed Cat"
46
47 objs = [i, j, k]
48 return objs
49
50 def sync_record(self, o):
51 pass
52
53 def delete_record(self, o):
54 pass