public function updateFloatingIp($floatingIpId, $portId = null)
{
$result = null;
$options = new \stdClass();
if (isset($portId)) {
$options->port_id = (string) $portId;
}
$options = array('floatingip' => $options);
$response = $this->getClient()->call($this->service, sprintf('/floatingips/%s', $this->escape($floatingIpId)), array('_putData' => json_encode($options)), 'PUT');
if ($response->hasError() === false) {
$result = json_decode($response->getContent());
$result = $result->floatingip;
}
return $result;
}