# min -- minimum amount of connections required by this type of connector
self._min = min
+ def __str__(self):
+ return "ConnectorType%r" % (self._connector_type_id,)
+
@property
def connector_type_id(self):
return self._connector_type_id
self._connector_type = connector_type
self._connections = list()
+ def __str__(self):
+ return "Connector(%s, %s)" % (self.box, self.connector_type)
+
@property
def box(self):
return self._box
def connect(self, connector):
if not self.can_connect(connector) or not connector.can_connect(self):
- raise RuntimeError("Could not connect.")
+ raise RuntimeError("Could not connect. %s to %s" % (self, connector))
self._connections.append(connector)
connector._connections.append(self)
if attr.modified:
self._factory_attributes[attr.name] = attr.value
+ def __str__(self):
+ return "Box(%s, %s, %s)" % (self.guid, self.factory_id, self.testbed_guid)
+
@property
def guid(self):
return self._guid