Revision ffa1c0dc lib/bdev.py
b/lib/bdev.py | ||
---|---|---|
804 | 804 |
|
805 | 805 |
if len(children) not in (0, 2): |
806 | 806 |
raise ValueError("Invalid configuration data %s" % str(children)) |
807 |
if not isinstance(unique_id, (tuple, list)) or len(unique_id) != 4:
|
|
807 |
if not isinstance(unique_id, (tuple, list)) or len(unique_id) != 5:
|
|
808 | 808 |
raise ValueError("Invalid configuration data %s" % str(unique_id)) |
809 |
self._lhost, self._lport, self._rhost, self._rport = unique_id |
|
809 |
(self._lhost, self._lport, |
|
810 |
self._rhost, self._rport, |
|
811 |
self._aminor) = unique_id |
|
812 |
if (self._lhost is not None and self._lhost == self._rhost and |
|
813 |
self._lport == self._rport): |
|
814 |
raise ValueError("Invalid configuration data, same local/remote %s" % |
|
815 |
(unique_id,)) |
|
810 | 816 |
self.Attach() |
811 | 817 |
|
812 | 818 |
@classmethod |
Also available in: Unified diff