Beispiel #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
Beispiel #2
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()
Beispiel #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()
Beispiel #4
0
 def __init__(self):
     super(SimpleController, self).__init__()
     if not SimpleController.id:
         # First time SimpleController is instanciated. Initialize globals
         SimpleController.forbiddenScopes = {}
         SimpleController.switches = {}
         SimpleController.id = generateId()
         SimpleController.instance = self
     self.scopes = {}  # [guid] = scope
     self.scopeIndex = {}  # ['port.vlan'] or ['port.vid'] = scope
Beispiel #5
0
 def __init__(self):
     super(SimpleController, self).__init__()
     if not SimpleController.id:
         # First time SimpleController is instanciated. Initialize globals
         SimpleController.forbiddenScopes = {}
         SimpleController.switches = {}
         SimpleController.id = generateId()
         SimpleController.instance = self
     self.scopes = {}  # [guid] = scope
     self.scopeIndex = {}  # ['port.vlan'] or ['port.vid'] = scope
Beispiel #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
Beispiel #7
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
Beispiel #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)
Beispiel #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)
Beispiel #10
0
 def __init__(self,name,props={}):
     Properties.__init__(self,name=name,props=props)
     self.id = generateId()
     self.name = name
     Intent.directory[name] = self