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
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
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()
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
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
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)
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)
def __init__(self,name="",props={}): Properties.__init__(self,name=name,props=props) self.props['domains'] = {}
def __init__(self,name,props={}): GenericHost.__init__(self,name) Properties.__init__(self,self.getResourceName(),props) self.props['links'] = []
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
def __init__(self,name,props={}): Properties.__init__(self,name=name,props=props) self.id = generateId() self.name = name Intent.directory[name] = self
def __init__(self, name="", props={}): Properties.__init__(self, name, props) self.controller = None # The controller will set it ip
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")
def __init__(self,name,props={}): Properties.__init__(self,name=name,props=props) self.props['services'] = {}
def __init__(self,name,type,props={}): Properties.__init__(self,name=name,props=props) self.props['type'] = type
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')