-
Notifications
You must be signed in to change notification settings - Fork 102
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
Add hostname attribute to machine object #474
Comments
@achilleasa ping, how feasible is it to get that information. I'm assuming that it would require a separate call as that information isn't coming over via the AllWatcher. |
@SimonRichardson Not sure how this works in python-land. Does the AllWatcher simply marshal the entity and send it through? If that's the case, it should show up as a 'hostname' attribute on the machine model (we would just need a helper to check if it's there because this will only work on 2.8.10+; not yet ported to 2.9). Otherwise, we need to find where the |
@achilleasa This is the underlying type that is sent via the |
Hmmm... So I presume we get the Machine via another API call? https://github.com/juju/python-libjuju/blob/master/juju/machine.py#L178 (this one has dns_name as an attribute; do we populate this from FullStatus reponses?) |
It uses the following https://github.com/juju/python-libjuju/blob/master/juju/machine.py#L311 as a best guess. |
…hostname-field #475 This allows users to access the hostname value reported by the machine agent when it starts. This feature only works on 2.8.10+ controllers; in all other cases (older controllers, machines with pending agents), the property returns None. Fixes #474 and works in conjunction with the changes from juju/juju#12760
With juju/juju#12754 being merged, and in 2.8.10, I'd like to access this new information via libjuju. It would be great if we could have this available via machine.hostname, same as we can have machine.dns_name now.
The text was updated successfully, but these errors were encountered: