def attach(self, to_linode, config=None):
result = self._client.post('<STR_LIT>'.format(Volume.api_endpoint), model=self,<EOL>data={<EOL>"<STR_LIT>": to_linode.id if issubclass(type(to_linode), Base) else to_linode,<EOL>"<STR_LIT>": None if not config else config.id if issubclass(type(config), Base) else config,<EOL>})<EOL>if not '<STR_LIT:id>' in result:<EOL><INDENT>raise UnexpectedResponseError('<STR_LIT>', json=result)<EOL><DEDENT>self._populate(result)<EOL>return True<EOL>
Attaches this Volume to the given Linode