Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Retrieve IP Adress of VM #3

Open
christianhuening opened this issue Sep 20, 2014 · 1 comment
Open

Retrieve IP Adress of VM #3

christianhuening opened this issue Sep 20, 2014 · 1 comment

Comments

@christianhuening
Copy link

Is there currently an elegant way to receive the IP address of a running VM?
I found it in the TEMPLATE field of VM from VMGetInfo(int), but it's in there just as an XML text. What would be the best way to extract that information?

@emmanuelmathot
Copy link
Contributor

For now, the library provides with raw access to XML/RPC OpenNebula API. Thus the objects extracted are basic types such as string. The way you use to get the ip is the right one. We can suggest you to use the helpers of the .Net framework such as

public static IPAddress Parse(
    string ipString
)

http://msdn.microsoft.com/en-us/library/system.net.ipaddress.parse(v=vs.110).aspx

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants