From: Devops Date: Mon, 3 Jul 2017 15:59:41 +0000 (+0100) Subject: bin/ovh-api X-Git-Url: https://git.nbdom.net/?a=commitdiff_plain;h=97d941ef81353a69797f7ab5d56b990a09db1b8c;p=nb.git bin/ovh-api --- diff --git a/bin/ovh-api b/bin/ovh-api index d70bcfa7..14a76dfa 100755 --- a/bin/ovh-api +++ b/bin/ovh-api @@ -139,10 +139,10 @@ sub ip_move { my $routed = $rec->{routedTo}{serviceName}; $localhost ne $routed or die "$ip is already routed to $localhost!\n"; - grep {$ip eq $_} ips() or die "$ip is is not installed on $localhost!\n"; - require Data::Dumper; - die Data::Dumper::Dumper([$localhost,$routed,$rec]); + + require Data::Dumper; die Data::Dumper::Dumper([$localhost,$routed,$rec]); + local $_ = _query("/ip/$ip/move",'POST',{'to' => $localhost}); print JSON::encode_json($_); exit;