1
0
Fork 0
mirror of https://github.com/fog/fog.git synced 2022-11-09 13:51:43 -05:00

[clodo|compute] Enable ip-management.

This commit is contained in:
Stepan G. Fedorov 2011-11-28 00:05:46 +04:00
parent 299e1f7960
commit a0b696629d
2 changed files with 15 additions and 0 deletions

View file

@ -26,6 +26,9 @@ module Fog
request :stop_server
request :reboot_server
request :rebuild_server
request :add_ip_address
request :delete_ip_address
request :move_ip_address
# request :list_addresses
# request :list_private_addresses
# request :list_public_addresses

View file

@ -76,6 +76,18 @@ module Fog
pubaddrs && !pubaddrs.empty? ? pubaddrs.first['ip'] : nil
end
def add_ip_address
connection.add_ip_address(id)
end
def move_ip_address(ip_address)
connection.move_ip_address(id, ip_address)
end
def delete_ip_address(ip_address)
connection.delete_ip_address(id, ip_address)
end
def public_key_path
@public_key_path ||= Fog.credentials[:public_key_path]
@public_key_path &&= File.expand_path(@public_key_path)