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.
		
		
		
		
		
			
		
			
				
					
					
						
							24 lines
						
					
					
						
							360 B
						
					
					
				
			
		
		
	
	
							24 lines
						
					
					
						
							360 B
						
					
					
				| #!/bin/bash
 | |
| # eqx-get-deviceid-ip-private
 | |
| #
 | |
| # Give a device ID, get private IP
 | |
| 
 | |
| EQXDEVICEID="$1"
 | |
| 
 | |
| if [[ $1 == "" ]]
 | |
|  then   \
 | |
|         echo -e "Need device name"
 | |
|         echo
 | |
|         exit
 | |
| fi
 | |
| 
 | |
| # get IP
 | |
| packet									\
 | |
| 	device get							\
 | |
| 	--json								\
 | |
| 	--id $EQXDEVICEID						\
 | |
| 	2>/dev/null |							\
 | |
| 	jq '.ip_addresses[2].address' |					\
 | |
| 	sed -e 's/"//g'
 | |
| 
 |