parent
fa89dcbf7f
commit
cb2cefd7fb
@ -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
|
||||
|
@ -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…
Reference in new issue