def __init__(self, unique_id, children, size, params, dyn_params, *args):
    """Attaches to a static block device.

    The unique_id is a path under /dev.

    """
    super(PersistentBlockDevice, self).__init__(unique_id, children, size,
                                                params, dyn_params, *args)
    if not isinstance(unique_id, (tuple, list)) or len(unique_id) != 2:
      raise ValueError(str(unique_id) % "Invalid configuration data %s")
    self.dev_path = unique_id[1]
    if not os.path.realpath(self.dev_path).startswith("/dev/"):
      raise ValueError("Full path '%s' lies outside /dev" %
                              os.path.realpath(self.dev_path))
    # TODO: this is just a safety guard checking that we only deal with devices
    # we know how to handle. In the future this will be integrated with
    # external storage backends and possible values will probably be collected
    # from the cluster configuration.
    if unique_id[0] != constants.BLOCKDEV_DRIVER_MANUAL:
      raise ValueError("Got persistent block device of invalid type: %s" %
                       unique_id[0])

    self.major = self.minor = None
    self.Attach()
dataset/ETHPy150Open ganeti/ganeti/lib/storage/bdev.py/PersistentBlockDevice.__init__/swapped operands of `%`