On 07/01/2013 05:19 PM, Raymond Mancy wrote:
----- Original Message -----
> From: "Nick Coghlan" <ncoghlan(a)redhat.com>
> To: beaker-devel(a)lists.fedorahosted.org
> Sent: Monday, July 1, 2013 4:35:24 PM
> Subject: Re: [Beaker-devel] Exposing the the host's hostname to the guest
>
> On 07/01/2013 04:25 PM, Raymond Mancy wrote:
>> We're currently considering a feature[1] request that would expose the
>> hypervisor's
>> host name to it's guest recipe via environment variables.
>>
>> We currently expose many guest recipe details via the to_xml() (which is
>> what produces
>> the output of the /recipes/<recipe_id> harness API call). To include the
>> host's FQDN
>> in this details would seem to be consistent with existing behaviour and
>> would take
>> minimal code changes (as opposed to creating a new harness API call,
>> controller, and model
>> methods).
>
> So that would be the server side change, and then we also update beah to
> make this readily accessible in the standard execution environment?
>
The change to beah should be even more minimal:
- GUEST_ATTRS = ('system', 'mac_address', 'location',
'guestargs', 'guestname')
+ GUEST_ATTRS = ('system', 'mac_address', 'location',
'guestargs', 'guestname', 'hostfqdn')
I don't know beah well enough to understand the implications of that change.
My question relates more to
http://beaker-project.org/docs/user-guide/task-environment.html#execution...,
and whether or not your proposed change affects that.
Currently, the "GUESTS" environment variable docs say to retrieve the
XML and parse it to retrieve those details. That would work for this use
case as well.
Cheers,
Nick.
--
Nick Coghlan
Red Hat Infrastructure Engineering & Development, Brisbane
Testing Solutions Team Lead
Beaker Development Lead (
http://beaker-project.org/)