X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=blobdiff_plain;ds=sidebyside;f=lib%2Futility-functions.sh;h=c12619ae9dfa0decfd9a03c33f4873a2a40f02be;hb=bc60e373f9784f6e2dd13a958a653563d80c4347;hp=bf4128a09abe11972564be637da397f8c8e4d511;hpb=1041cbfc25fa59f12e00cf4480edf4fd742a4715;p=apex.git diff --git a/lib/utility-functions.sh b/lib/utility-functions.sh index bf4128a0..c12619ae 100644 --- a/lib/utility-functions.sh +++ b/lib/utility-functions.sh @@ -24,7 +24,7 @@ function undercloud_connect { ##outputs the Undercloud's IP address ##params: none function get_undercloud_ip { - echo $(arp -a | grep $(virsh domiflist undercloud | grep default |\ + echo $(arp -an | grep $(virsh domiflist undercloud | grep default |\ awk '{print $5}') | grep -Eo "[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+") } @@ -80,26 +80,6 @@ function opendaylight_connect { ##outputs heat stack deployment failures ##params: none function debug_stack { - local failure_output - local phys_id - declare -a resource_arr - declare -a phys_id_arr - source ~/stackrc - - IFS=$'\n' - for resource in $(openstack stack resource list -n 5 overcloud | grep FAILED); do - unset IFS - resource_arr=(${resource//|/ }) - phys_id=$(openstack stack resource show ${resource_arr[-1]} ${resource_arr[0]} | grep physical_resource_id 2> /dev/null) - if [ -n "$phys_id" ]; then - phys_id_arr=(${phys_id//|/ }) - failure_output+="******************************************************" - failure_output+="\n${resource}:\n\n$(openstack stack deployment show ${phys_id_arr[-1]} 2> /dev/null)" - failure_output+="\n******************************************************" - fi - unset phys_id - done - - echo -e $failure_output + openstack stack failures list overcloud --long }