def create_target_from_node(self, node, type=BackupTargetType.VIRTUAL,
                                extra=None):
        # Get the first EBS volume.
        device_mapping = node.extra['block_device_mapping']
        if device_mapping is not None:
            return self.create_target(
                name=node.name,
                address=device_mapping['ebs'][0]['volume_id'],
                type=BackupTargetType.VOLUME,
                extra=None)
        else:
            raise RuntimeError("Node does not have any block devices")
Creates a new backup target from an existing node
dataset/ETHPy150Open apache/libcloud/libcloud/backup/drivers/ebs.py/EBSBackupDriver.create_target_from_node