2 ##############################################################################
3 # Copyright (c) 2015 Ericsson AB and others.
4 # stefan.k.berg@ericsson.com
5 # jonas.bjurel@ericsson.com
6 # All rights reserved. This program and the accompanying materials
7 # are made available under the terms of the Apache License, Version 2.0
8 # which accompanies this distribution, and is available at
9 # http://www.apache.org/licenses/LICENSE-2.0
10 ##############################################################################
19 echo "Syntax: `basename $0` adaptername dhafile"
23 if [ ! -f dha-adapters/${1}.sh ]; then
24 echo "No such adapter file: $1"
26 elif [ ! -f $2 ]; then
27 echo "No such DHA file: $2"
31 . dha-adapters/${1}.sh $2
35 echo "Verifying that expected functions are present..."
43 dha_useFuelCustomInstall \
44 dha_fuelCustomInstall \
45 dha_getPowerOnStrategy \
49 dha_nodeCanSetBootOrderLive \
50 dha_nodeSetBootOrder \
52 dha_nodeCanHandeIsoLive \
60 if type $function &>/dev/null; then
63 echo "$function: Missing!"
69 echo "Adapter API version: `dha getApiVersion`"
70 echo "Adapter name: `dha getAdapterName`"
72 echo "All PXE MAC addresses:"
73 for id in `(dha getAllNodeIds) | sort`
75 if [ "`dha getAdapterName`" == "libvirt" ]; then
76 libvirtName=`dha getNodeProperty $id libvirtName`
81 if [ $id == "`dha getFuelNodeId`" ]; then
82 echo "$id: `dha getNodeProperty $id pxeMac` $libvirtName <--- Fuel master"
84 echo "$id: `dha getNodeProperty $id pxeMac` $libvirtName"
89 echo -n "Using Fuel custom install: "
90 if dha useFuelCustomInstall; then
97 echo -n "Can set boot order live: "
98 if dha nodeCanSetBootOrderLive; then
104 echo -n "Can operate on ISO media: "
105 if dha nodeCanSetIso; then
111 echo -n "Can insert/eject ISO without power toggle: "
112 if dha nodeCanHandeIsoLive; then
118 echo -n "Can erase the boot disk MBR: "
119 if dha nodeCanZeroMBR; then