From: Devops Date: Tue, 27 Jun 2017 08:28:25 +0000 (+0100) Subject: bin/ovh-api X-Git-Url: https://git.nbdom.net/?a=commitdiff_plain;h=64b9471b18ec2f82946b113c494ca48371911e0a;p=nb.git bin/ovh-api --- diff --git a/bin/ovh-api b/bin/ovh-api index b5522f18..d8850a4f 100755 --- a/bin/ovh-api +++ b/bin/ovh-api @@ -125,7 +125,7 @@ sub _query { $id = check_row($url,$id); next unless defined $id; - $id =~ s,/.*$,,; +# NB 27.06.17 $id =~ s,/.*$,,; eval { $response = $Api->rawCall(path=>$url.'/'.$id,method=>($method||'GET'),body=>{}); }; @@ -310,7 +310,6 @@ my @tbs = ( } if (!defined $val) { -# NB 09.02.17 no use of COALESCE $val = 'NULL'; $val = "''"; } elsif($fd->{sql} =~ /BOOLEAN/) { @@ -356,7 +355,10 @@ sub check_row { # Scalar return undef if $url eq '/ip' and $id !~ /\d+\./; - $id =~ s,/.*$,,; + +# NB 27.06.17 $id =~ s,/.*$,,; + $id =~ s,/32$,,; + return $id; }