get/delete projects etc

master
root 4 years ago
parent fa89dcbf7f
commit cb2cefd7fb

@ -21,6 +21,8 @@ fi
EQXPROJECTID=`eqx-get-project-uuid $EQXPROJECT`
eqx-delete-project-devices $EQXPROJECT
packet \
project \
delete \

@ -0,0 +1,24 @@
#!/bin/bash
# eqx-delete-project-devices
#
# Usage:
# eqx-delete-project-devices [project name]
# Example:
# eqx-delete-project-devices fooproject
EQXPROJECT="$1"
if [[ $1 == "" ]]
then \
echo -e "Need project name, such as:\n"
eqx-get-project-names
echo
exit
fi
for i in `eqx-get-project-devices-id "$EQXPROJECT"`
do \
echo "Deleting $i"
packet device delete --id "$i"
done

@ -0,0 +1,24 @@
#!/bin/bash
# eqx-delete-project-devices
#
# Usage:
# eqx-delete-project-devices [project name]
# Example:
# eqx-delete-project-devices fooproject
EQXPROJECT="$1"
if [[ $1 == "" ]]
then \
echo -e "Need project name, such as:\n"
eqx-get-project-names
echo
exit
fi
for i in `eqx-get-project-devices-id "$EQXPROJECT"`
do \
echo "Deleting $i"
packet device delete --force --id "$i"
done

@ -25,6 +25,8 @@ EQXPROJECTID=`eqx-get-project-uuid $EQXPROJECT`
echo "ProjectID: $EQXPROJECTID"
sleep 1
eqx-delete-project-devices-force $EQXPROJECT
packet \
project \
delete \

@ -0,0 +1,27 @@
#!/bin/bash
# eqx-get-project-devices
#
# Usage:
# eqx-get-project-devices [project name]
# Example:
# eqx-get-project-devices fooproject
EQXPROJECT="$1"
if [[ $1 == "" ]]
then \
echo -e "Need project name, such as:\n"
eqx-get-project-names
echo
exit
fi
EQXPROJECTID=`eqx-get-project-uuid $EQXPROJECT`
packet \
device \
get \
--project-id \
$EQXPROJECTID \
2>/dev/null

@ -0,0 +1,24 @@
#!/bin/bash
# eqx-get-project-devices-id
#
# Usage:
# eqx-get-project-devices-id [project name]
# Example:
# eqx-get-project-devices-id fooproject
EQXPROJECT="$1"
if [[ $1 == "" ]]
then \
echo -e "Need project name, such as:\n"
eqx-get-project-names
echo
exit
fi
eqx-get-project-devices \
"$EQXPROJECT" | \
grep -v -e '^+' -e "CREATED" | \
cut -f 2 -d " "

@ -0,0 +1,24 @@
#!/bin/bash
# eqx-get-project-devices-id
#
# Usage:
# eqx-get-project-devices-id [project name]
# Example:
# eqx-get-project-devices-id fooproject
EQXPROJECT="$1"
if [[ $1 == "" ]]
then \
echo -e "Need project name, such as:\n"
eqx-get-project-names
echo
exit
fi
eqx-get-project-devices \
"$EQXPROJECT" | \
grep -v -e '^+' -e "CREATED" | \
cut -f 4 -d " "
Loading…
Cancel
Save