blob: b3628fe96eab8dfbd836ebe23a8330767ccf56c5 [file] [log] [blame]
Rizwan Haider65baf552016-09-28 16:47:28 -04001from services.metronetwork.models import *
2from synchronizers.metronetwork.invokers.networkmultipointtomultipointinvoker import NetworkMultipointToMultipointInvoker
3from synchronizers.metronetwork.invokers.networkedgetoedgepointinvoker import NetworkEdgeToEdgePointInvoker
4from synchronizers.metronetwork.invokers.networkedgetomultipointinvoker import NetworkEdgeToMultipointInvoker
Rizwan Haidere6ffdc02016-11-08 13:43:48 -05005from synchronizers.metronetwork.invokers.servicespokeinvoker import ServiceSpokeInvoker
6from synchronizers.metronetwork.invokers.vnodglobalserviceinvoker import VnodGlobalServiceInvoker
7from synchronizers.metronetwork.invokers.remoteportinvoker import RemotePortInvoker
Rizwan Haider65baf552016-09-28 16:47:28 -04008
9
10class InvokerFactory(object):
11 @staticmethod
12 def getinvoker(obj):
13 #
14 # Here is where we build various invokers
15 #
16 if isinstance(obj, NetworkMultipointToMultipointConnection):
17 return NetworkMultipointToMultipointInvoker()
18 elif isinstance(obj, NetworkEdgeToEdgePointConnection):
19 return NetworkEdgeToEdgePointInvoker()
20 elif isinstance(obj, NetworkEdgeToMultipointConnection):
21 return NetworkEdgeToMultipointInvoker()
Rizwan Haidere6ffdc02016-11-08 13:43:48 -050022 elif isinstance(obj, ServiceSpoke):
23 return ServiceSpokeInvoker()
24 elif isinstance(obj, VnodGlobalService):
25 return VnodGlobalServiceInvoker()
26 elif isinstance(obj, RemotePort):
27 return RemotePortInvoker()
Rizwan Haider65baf552016-09-28 16:47:28 -040028 else:
29 return None