Merge lp:~marcoceppi/charms/trusty/oai-epc/ip-hostname into lp:~navid-nikaein/charms/trusty/oai-epc/trunk

Proposed by Marco Ceppi
Status: Merged
Approved by: navid nikaein
Approved revision: 20
Merged at revision: 20
Proposed branch: lp:~marcoceppi/charms/trusty/oai-epc/ip-hostname
Merge into: lp:~navid-nikaein/charms/trusty/oai-epc/trunk
Diff against target: 16 lines (+5/-0)
1 file modified
utils/common (+5/-0)
To merge this branch: bzr merge lp:~marcoceppi/charms/trusty/oai-epc/ip-hostname
Reviewer Review Type Date Requested Status
navid nikaein Approve
Review via email: mp+286870@code.launchpad.net

Description of the change

some cloud hosts don't do just IP and use instead DNS. this is problematic

To post a comment you must log in.
Revision history for this message
navid nikaein (navid-nikaein) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'utils/common'
2--- utils/common 2016-02-21 05:09:52 +0000
3+++ utils/common 2016-02-23 07:09:31 +0000
4@@ -145,7 +145,12 @@
5 local status=1
6 local status_after=1
7
8+if ! validate_ip $ip; then
9+ ip=`host $ip | awk '{ print $4 }'`
10+fi
11+
12 validate_ip $ip
13+
14 status=$?
15 if [ "$status" == "1" ] ; then
16 echo "doing nslookup for the mme host name $ip"

Subscribers

People subscribed via source and target branches