class Ixia(object): """This class supports only one chassis atm.""" def __init__(self, host): self.host = host self._tcl = TclClient(host) self._api = IxTclHalApi(self._tcl) self.chassis = Chassis(self._api, host) self.session = Session(self._api) def connect(self): self._tcl.connect() self.chassis.connect() def disconnect(self): self.chassis.disconnect() self._tcl.close() def new_port_group(self, id=None): return PortGroup(self._api, id) def discover(self): return self.chassis.discover()
def __init__(self, host): self.host = host self._tcl = TclClient(host) self._api = IxTclHalApi(self._tcl) self.chassis = Chassis(self._api, host) self.session = Session(self._api)