예제 #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
예제 #2
0
파일: openflow.py 프로젝트: cygmris/enos
 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()
예제 #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()
예제 #4
0
파일: openflow.py 프로젝트: cygmris/enos
 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
예제 #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
예제 #6
0
파일: openflow.py 프로젝트: cygmris/enos
 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
예제 #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
예제 #8
0
파일: openflow.py 프로젝트: cygmris/enos
 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)
예제 #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)
예제 #10
0
 def __init__(self,name,props={}):
     Properties.__init__(self,name=name,props=props)
     self.id = generateId()
     self.name = name
     Intent.directory[name] = self