def share_ip(self, server, ipgroup=None, address=None, configure=True):
        """
        Share an IP address from the given IP group onto a server.

        :param server: The :class:`Server` (or its ID) to share onto.
        :param ipgroup: The :class:`IPGroup` that the given address belongs to.
                        DEPRICATED in OpenStack
        :param address: The IP address to share.
        :param configure: If ``True``, the server will be automatically
                         configured to use this IP. I don't know why you'd
                         want this to be ``False``.
        """
        # to make ipgroup optional without making address optional or changing the
        # order of the parameters in the function signature
        if address == None:
            raise TypeError("Address is required")

        if 'IPGROUPS' in API_OPTIONS[self.api.config.cloud_api]:
            if ipgroup == None:
                raise TypeError("IPGroup is required")
            server = base.getid(server)
            ipgroup = base.getid(ipgroup)
            body = {'shareIp': {'sharedIpGroupId': ipgroup, 'configureServer': configure}}
            self._update("/servers/%s/ips/public/%s" % (server, address), body)
        else:
            #TODO: Jwilcox(2011-04-18) share ip without ipgroup openstack 1.1 api
            pass
dataset/ETHPy150Open jacobian-archive/openstack.compute/openstack/compute/servers.py/ServerManager.share_ip/original