Ask Your Question
0

HEAT: Get IP address of a server using php-opencloud

asked 2016-08-06 20:07:09 -0500

carlos.mataguzman gravatar image

updated 2016-08-10 10:43:41 -0500

I'm triying to get the IP address of a server in a stack. Im using the php-opencloud library for this, but I cant find a clean way of doing this. I'll appreciate any help regarding this topic.

edit retag flag offensive close merge delete

2 answers

Sort by ยป oldest newest most voted
1

answered 2016-08-10 08:56:12 -0500

here the answer.

edit flag offensive delete link more

Comments

Thanks Antonio. But my case is a bit different, since the ip address of the server I'm trying to fetch is inside a stack. Also I'm using the prior verison of the library, the one that requires PHP 5.6 not 7.0. :/

carlos.mataguzman gravatar imagecarlos.mataguzman ( 2016-08-10 10:30:18 -0500 )edit

What about getting the server resource and then getting the IP

Antonio G. gravatar imageAntonio G. ( 2016-08-10 10:46:47 -0500 )edit
1

Thanks Antonio that solves my problem! :)

carlos.mataguzman gravatar imagecarlos.mataguzman ( 2016-08-22 14:14:37 -0500 )edit
0

answered 2016-08-13 03:27:57 -0500

Hamzoz gravatar image

try to list the subnet, that give you the private and public ip adresse or you can do this :

$ipAddresses = $server->listAddresses();

$public = $ipAddresses['public']; $private = $ipAddresses['private'];

know that you have need PHP 7.0

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Get to know Ask OpenStack

Resources for moderators

Question Tools

Stats

Asked: 2016-08-06 20:07:09 -0500

Seen: 496 times

Last updated: Aug 13 '16