Ejemplo n.º 1
0
 def __init__(self,name,renderer,intent,props={}):
     Properties.__init__(self,name=name,props=props)
     self.id = generateId()
     self.name = name
     self.intent = intent
     self.renderer = renderer
     Expectation.directory[name] = self
Ejemplo n.º 2
0
 def __init__(self, inPort=None, srcMac=None, dstMac=None, vlan=0, payload=None, name=""):
     Properties.__init__(self, name)
     self.props["in_port"] = inPort
     self.props["dl_src"] = srcMac
     self.props["dl_dst"] = dstMac
     self.props["vlan"] = vlan
     if payload:
         self.props["payload"] = payload
Ejemplo n.º 3
0
 def __init__(self, name, scope, props={}):
     """
     :param name: str  human readable name of the event
     :param scope: Scope scope that is generating the event
     :param props: properties of the event
     """
     Properties.__init__(self, name, props={})
     self.id = generateId()
Ejemplo n.º 4
0
 def __init__(self, name, scope, props={}):
     """
     :param name: str  human readable name of the event
     :param scope: Scope scope that is generating the event
     :param props: properties of the event
     """
     Properties.__init__(self, name, props={})
     self.id = generateId()
Ejemplo n.º 5
0
 def __init__(self, name, switch, owner, props={}):
     """
     :param name: str human readable name of the scope
     :param switch: common.api.Node
     :param owner: ScopeController controller that owns this scope
     :param props: dict optional properties of the scope, such as ports, vlan, etc. See Layer2Scope for example.
     """
     Properties.__init__(self, name, props)
     self.owner = owner
     self.id = generateId()
     self.switch = switch
Ejemplo n.º 6
0
 def __init__(self, name, switch, owner, props={}):
     """
     :param name: str human readable name of the scope
     :param switch: common.api.Node
     :param owner: ScopeController controller that owns this scope
     :param props: dict optional properties of the scope, such as ports, vlan, etc. See Layer2Scope for example.
     """
     Properties.__init__(self, name, props)
     self.owner = owner
     self.id = generateId()
     self.switch = switch
Ejemplo n.º 7
0
 def __init__(self,
              inPort=None,
              srcMac=None,
              dstMac=None,
              vlan=0,
              payload=None,
              name=""):
     Properties.__init__(self, name)
     self.props['in_port'] = inPort
     self.props['dl_src'] = srcMac
     self.props['dl_dst'] = dstMac
     self.props['vlan'] = vlan
     if payload:
         self.props['payload'] = payload
Ejemplo n.º 8
0
 def __init__(self, scope, switch, match=None, name="", actions=[]):
     """
     :param scope: Scope owner
     :param switch: common.api.Node
     :param match: Match
     :param actions: Action
     """
     Properties.__init__(self, name)
     self.scope = scope
     self.scopeowner = scope.owner
     self.switch = switch
     self.actions = actions
     self.match = match
     self.props["priority"] = 1  # only configured in TapEntryWithSrcMac
     self.id = generateId()
     if not name:
         self.name = str(self.id)
Ejemplo n.º 9
0
 def __init__(self, scope, switch, match=None, name="", actions=[]):
     """
     :param scope: Scope owner
     :param switch: common.api.Node
     :param match: Match
     :param actions: Action
     """
     Properties.__init__(self, name)
     self.scope = scope
     self.scopeowner = scope.owner
     self.switch = switch
     self.actions = actions
     self.match = match
     self.props['priority'] = 1  # only configured in TapEntryWithSrcMac
     self.id = generateId()
     if not name:
         self.name = str(self.id)
Ejemplo n.º 10
0
 def __init__(self,name="",props={}):
     Properties.__init__(self,name=name,props=props)
     self.props['domains'] = {}
Ejemplo n.º 11
0
 def __init__(self,name,props={}):
     GenericHost.__init__(self,name)
     Properties.__init__(self,self.getResourceName(),props)
     self.props['links'] = []
Ejemplo n.º 12
0
 def __init__(self,node1,port1,node2,port2,props={}):
     GenericLink.__init__(self,node1,port1,node2,port2)
     Properties.__init__(self,self.getResourceName(),props)
     node1.props['links'].append(self)
     node2.props['links'].append(self)
     self.setSpeed(10*1024) # Assume 10G speed is in Mbps
Ejemplo n.º 13
0
 def __init__(self,name,props={}):
     Properties.__init__(self,name=name,props=props)
     self.id = generateId()
     self.name = name
     Intent.directory[name] = self
Ejemplo n.º 14
0
 def __init__(self,name,props={}):
     GenericHost.__init__(self,name)
     Properties.__init__(self,self.getResourceName(),props)
     self.props['links'] = []
Ejemplo n.º 15
0
 def __init__(self, name="", props={}):
     Properties.__init__(self, name, props)
     self.controller = None  # The controller will set it ip
Ejemplo n.º 16
0
 def __init__(self, name="", props={}):
     Properties.__init__(self, name, props)
     self.controller = None  # The controller will set it ip
Ejemplo n.º 17
0
 def __init__(self, name=None, props={}):
     Properties.__init__(self, name, props)
     # dl_dst might be None only on coreRouter
     if "dl_dst" in self.props and not self.props["dl_dst"]:
         self.props.pop("dl_dst")
Ejemplo n.º 18
0
 def __init__(self,name,props={}):
     Properties.__init__(self,name=name,props=props)
     self.props['services'] = {}
Ejemplo n.º 19
0
 def __init__(self,name,type,props={}):
     Properties.__init__(self,name=name,props=props)
     self.props['type'] = type
Ejemplo n.º 20
0
 def __init__(self, name=None, props={}):
     Properties.__init__(self, name, props)
     # dl_dst might be None only on coreRouter
     if 'dl_dst' in self.props and not self.props['dl_dst']:
         self.props.pop('dl_dst')
Ejemplo n.º 21
0
 def __init__(self,node1,port1,node2,port2,props={}):
     GenericLink.__init__(self,node1,port1,node2,port2)
     Properties.__init__(self,self.getResourceName(),props)
     node1.props['links'].append(self)
     node2.props['links'].append(self)
     self.setSpeed(10*1024) # Assume 10G speed is in Mbps