You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
40 lines
584 B
40 lines
584 B
4 years ago
|
#!/bin/bash
|
||
|
# eqx-delete-project
|
||
|
# Delete an Equinix Project.
|
||
|
#
|
||
|
# Usage:
|
||
|
# eqx-delete-project [name]
|
||
|
# Example:
|
||
|
# eqx-delete-project fooproject
|
||
|
|
||
|
EQXPROJECT="$1"
|
||
|
|
||
|
if [[ $1 == "" ]]
|
||
|
then \
|
||
|
echo -e "Need project name, such as:\n"
|
||
|
eqx-get-project-names
|
||
|
echo
|
||
|
exit
|
||
|
fi
|
||
|
|
||
4 years ago
|
echo "Deleting in one second..."
|
||
|
echo "Project: $EQXPROJECT"
|
||
|
|
||
4 years ago
|
EQXPROJECTID=`eqx-get-project-uuid $EQXPROJECT`
|
||
|
|
||
4 years ago
|
echo "ProjectID: $EQXPROJECTID"
|
||
|
sleep 1
|
||
|
|
||
4 years ago
|
eqx-delete-project-devices-force $EQXPROJECT
|
||
|
|
||
4 years ago
|
packet \
|
||
|
project \
|
||
|
delete \
|
||
|
--force \
|
||
|
--id \
|
||
|
$EQXPROJECTID \
|
||
|
2>/dev/null
|
||
|
|
||
|
exit
|
||
|
|