+if [ $? -eq 0 ]; then
+ # If the datacenter exists, the current approach is to delete the existing
+ # one and create a new one. We may want to change this behavior to retain
+ # the existing datacenter, but this script will also go away in favour of
+ # a python API to OpenMano
+
+ # If the datacenter exists, remove all traces of it before continuing
+ OPENMANO_DATACENTER=`echo $OPENMANO_DATACENTER |gawk '{print $1}'`
+
+ # Delete netmap
+ $OPENMANO datacenter-netmap-delete --all -f --datacenter $OPENMANO_DATACENTER
+
+ # detach
+ $OPENMANO datacenter-detach -a $OPENMANO_DATACENTER
+