2012-02-16 15:46:13 +08:00
|
|
|
module Fog
|
|
|
|
module Compute
|
2012-02-22 00:09:26 +08:00
|
|
|
class OpenStack
|
2012-02-16 15:46:13 +08:00
|
|
|
class Real
|
|
|
|
|
|
|
|
def disassociate_address(server_id, ip_address)
|
2012-02-24 11:37:35 +08:00
|
|
|
body = { "removeFloatingIp" => {"address" => ip_address}}
|
|
|
|
server_action(server_id, body)
|
2012-02-16 15:46:13 +08:00
|
|
|
end
|
|
|
|
|
|
|
|
end
|
|
|
|
|
|
|
|
class Mock
|
2012-02-24 19:24:00 +08:00
|
|
|
def disassociate_address(server_id, ip_address)
|
|
|
|
response = Excon::Response.new
|
|
|
|
response.status = 202
|
|
|
|
response.headers = {
|
|
|
|
"Content-Type" => "text/html, charset=UTF-8",
|
|
|
|
"Content-Length" => "0",
|
|
|
|
"Date"=> Date.new
|
|
|
|
}
|
|
|
|
response
|
|
|
|
end
|
2012-02-16 15:46:13 +08:00
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|