blob: 8cbabcbc29b91d584bb969c1aeb74962b670f6f2 [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
Scott Bakerbba67b62019-01-28 17:38:21 -080024
25# hpclibrary will be in steps/..
26parentdir = os.path.join(os.path.dirname(__file__), "..")
27sys.path.insert(0, parentdir)
28
29
30class SyncContainer(SyncInstanceUsingAnsible):
Scott Bakerc2fddaa2019-01-30 15:45:03 -080031 observes = "Instance"
Scott Bakerbba67b62019-01-28 17:38:21 -080032 template_name = "sync_container.yaml"
33
34 def __init__(self, *args, **kwargs):
35 super(SyncContainer, self).__init__(*args, **kwargs)
36
37 def fetch_pending(self, deletion=False):
Scott Bakerc2fddaa2019-01-30 15:45:03 -080038 i = self.model_accessor.Instance()
Scott Bakerbba67b62019-01-28 17:38:21 -080039 i.name = "Spectacular Sponge"
Scott Bakerc2fddaa2019-01-30 15:45:03 -080040 j = self.model_accessor.Instance()
Scott Bakerbba67b62019-01-28 17:38:21 -080041 j.name = "Spontaneous Tent"
Scott Bakerc2fddaa2019-01-30 15:45:03 -080042 k = self.model_accessor.Instance()
Scott Bakerbba67b62019-01-28 17:38:21 -080043 k.name = "Embarrassed Cat"
44
45 objs = [i, j, k]
46 return objs
47
48 def sync_record(self, o):
49 pass
50
51 def delete_record(self, o):
52 pass