#!/bin/bash # eqx-market-convert-spot # Convert a "spot" server into "on demand" server # # Usage: # eqx-market-convert-spot [device id] # Example: # eqx-market-convert-spot 00000001-2000-3000-4000-500000000000 EQXTOKEN=`cat ~/.packet-cli.json | jq ".token" --raw-output` EQXDEVICEID="$1" if [[ $1 == "" ]] then \ echo -e "Need device ID" echo -e "To get device IDs in a project, run:" echo -e "eqx-get-project-devices [project name]" echo exit fi EQXFACILITY=`eqx-get-deviceid-facility $EQXDEVICEID` generate_post_data() { cat </dev/null 2>/dev/null echo "Is spot? `eqx-market-deviceid-spot $EQXDEVICEID`"