def ip_allocate(self, linode, public=True):
result = self.client.post('<STR_LIT>', data={<EOL>"<STR_LIT>": linode.id if isinstance(linode, Base) else linode,<EOL>"<STR_LIT:type>": "<STR_LIT>",<EOL>"<STR_LIT>": public,<EOL>})<EOL>if not '<STR_LIT:address>' in result:<EOL><INDENT>raise UnexpectedResponseError('<STR_LIT>',<EOL>json=result)<EOL><DEDENT>ip = IPAddress(self.client, result['<STR_LIT:address>'], result)<EOL>return ip<EOL>
Allocates an IP to a Instance you own.  Additional IPs must be requested
by opening a support ticket first.

:param linode: The Instance to allocate the new IP for.
:type linode: Instance or int
:param public: If True, allocate a public IP address.  Defaults to True.
:type public: bool

:returns: The new IPAddress
:rtype: IPAddress