Excerpts from James Page's message of 2012-12-07 10:03:27 UTC:
> Review: Needs Fixing
>
> Hi Adam
>
> I gave this a try; the changes generally look OK BUT I do hit issues when `relation-get private-address` returns an IP address instead of a hostname; this will happen when using the openstack and local providers so I think the charm needs to deal with this as well.
>
Smells like something for charm helper to do.
the sh/net.sh helper already has a 'ch_is_ip' that uses awk to test if the input is an ipv4 address.
Even better would be something like
ch_relation_get_private_ip
and
ch_unit_get_private_ip
Which would hide all the details of turning that into an IP.
Excerpts from James Page's message of 2012-12-07 10:03:27 UTC:
> Review: Needs Fixing
>
> Hi Adam
>
> I gave this a try; the changes generally look OK BUT I do hit issues when `relation-get private-address` returns an IP address instead of a hostname; this will happen when using the openstack and local providers so I think the charm needs to deal with this as well.
>
Smells like something for charm helper to do.
the sh/net.sh helper already has a 'ch_is_ip' that uses awk to test if the input is an ipv4 address.
Even better would be something like
ch_relation_ get_private_ ip
and
ch_unit_ get_private_ ip
Which would hide all the details of turning that into an IP.